summaryrefslogtreecommitdiffstats
path: root/js/vendor/js-url/url.min.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/vendor/js-url/url.min.js')
-rw-r--r--js/vendor/js-url/url.min.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/vendor/js-url/url.min.js b/js/vendor/js-url/url.min.js
index e7854ce59..6ee98b163 100644
--- a/js/vendor/js-url/url.min.js
+++ b/js/vendor/js-url/url.min.js
@@ -1 +1 @@
-/*! url - v1.8.6 - 2015-08-21 */window.url=function(){function a(a){return!isNaN(parseFloat(a))&&isFinite(a)}function b(a){return decodeURIComponent(a.replace(/\+/g," "))}return function(c,d){var e=d||window.location.toString();if(!c)return e;c=c.toString(),"//"===e.substring(0,2)?e="http:"+e:1===e.split("://").length&&(e="http://"+e),d=e.split("/");var f={auth:""},g=d[2].split("@");1===g.length?g=g[0].split(":"):(f.auth=g[0],g=g[1].split(":")),f.protocol=d[0],f.hostname=g[0],f.port=g[1]||("https"===f.protocol.split(":")[0].toLowerCase()?"443":"80"),f.pathname=(d.length>3?"/":"")+d.slice(3,d.length).join("/").split("?")[0].split("#")[0];var h=f.pathname;"/"===h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));var i=f.hostname,j=i.split("."),k=h.split("/");if("hostname"===c)return i;if("domain"===c)return/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(i)?i:j.slice(-2).join(".");if("sub"===c)return j.slice(0,j.length-2).join(".");if("port"===c)return f.port;if("protocol"===c)return f.protocol.split(":")[0];if("auth"===c)return f.auth;if("user"===c)return f.auth.split(":")[0];if("pass"===c)return f.auth.split(":")[1]||"";if("path"===c)return f.pathname;if("."===c.charAt(0)){if(c=c.substring(1),a(c))return c=parseInt(c,10),j[0>c?j.length+c:c-1]||""}else{if(a(c))return c=parseInt(c,10),k[0>c?k.length+c:c]||"";if("file"===c)return k.slice(-1)[0];if("filename"===c)return k.slice(-1)[0].split(".")[0];if("fileext"===c)return k.slice(-1)[0].split(".")[1]||"";if("?"===c.charAt(0)||"#"===c.charAt(0)){var l=e,m=null;if("?"===c.charAt(0)?l=(l.split("?")[1]||"").split("#")[0]:"#"===c.charAt(0)&&(l=l.split("#")[1]||""),!c.charAt(1))return l?b(l):l;c=c.substring(1),l=l.split("&");for(var n=0,o=l.length;o>n;n++)if(m=l[n].split(/(.*?)=(.*)/).filter(Boolean),m[0]===c)return(m[1]?b(m[1]):m[1])||"";return null}}return""}}(),"undefined"!=typeof jQuery&&jQuery.extend({url:function(a,b){return window.url(a,b)}}); \ No newline at end of file
+/*! js-url - v2.1.0 - 2016-01-16 */window.url=function(){function a(){}function b(a){return decodeURIComponent(a.replace(/\+/g," "))}function c(a,b){var c=a.charAt(0),d=b.split(c);return c===a?d:(a=parseInt(a.substring(1),10),d[0>a?d.length+a:a-1])}function d(a,c){var d=a.charAt(0),e=c.split("&"),f=[],g={},h=[],i=a.substring(1);for(var j in e)if(f=e[j].match(/(.*?)=(.*)/),f||(f=[e[j],e[j],""]),""!==f[1].replace(/\s/g,"")){if(f[2]=b(f[2]||""),i===f[1])return f[2];h=f[1].match(/(.*)\[([0-9]+)\]/),h?(g[h[1]]=g[h[1]]||[],g[h[1]][h[2]]=f[2]):g[f[1]]=f[2]}return d===a?g:g[i]}return function(b,e){var f,g={};if("tld?"===b)return a();if(e=e||window.location.toString(),!b)return e;if(b=b.toString(),f=e.match(/^mailto:([^\/].+)/))g.protocol="mailto",g.email=f[1];else{if((f=e.match(/(.*?)#(.*)/))&&(g.hash=f[2],e=f[1]),g.hash&&b.match(/^#/))return d(b,g.hash);if((f=e.match(/(.*?)\?(.*)/))&&(g.query=f[2],e=f[1]),g.query&&b.match(/^\?/))return d(b,g.query);if((f=e.match(/(.*?)\:?\/\/(.*)/))&&(g.protocol=f[1].toLowerCase(),e=f[2]),(f=e.match(/(.*?)(\/.*)/))&&(g.path=f[2],e=f[1]),g.path=(g.path||"").replace(/^([^\/])/,"/$1").replace(/\/$/,""),b.match(/^[\-0-9]+$/)&&(b=b.replace(/^([^\/])/,"/$1")),b.match(/^\//))return c(b,g.path.substring(1));if(f=c("/-1",g.path.substring(1)),f&&(f=f.match(/(.*?)\.(.*)/))&&(g.file=f[0],g.filename=f[1],g.fileext=f[2]),(f=e.match(/(.*)\:([0-9]+)$/))&&(g.port=f[2],e=f[1]),(f=e.match(/(.*?)@(.*)/))&&(g.auth=f[1],e=f[2]),g.auth&&(f=g.auth.match(/(.*)\:(.*)/),g.user=f?f[1]:g.auth,g.pass=f?f[2]:void 0),g.hostname=e.toLowerCase(),"."===b.charAt(0))return c(b,g.hostname);a()&&(f=g.hostname.match(a()),f&&(g.tld=f[3],g.domain=f[2]?f[2]+"."+f[3]:void 0,g.sub=f[1]||void 0)),g.port=g.port||("https"===g.protocol?"443":"80"),g.protocol=g.protocol||("443"===g.port?"https":"http")}return b in g?g[b]:"{}"===b?g:void 0}}(),"undefined"!=typeof jQuery&&jQuery.extend({url:function(a,b){return window.url(a,b)}}); \ No newline at end of file