WordPress/wp-includes/js/dist/block-library.min.js

23 lines
219 KiB
JavaScript
Raw Normal View History

Block Editor: Update the WordPress Packages from Gutenberg 5.2. Updated Packages: - @wordpress/a11y@2.1.0 - @wordpress/annotations@1.1.0 - @wordpress/api-fetch@3.0.0 - @wordpress/autop@2.1.0 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0 - @wordpress/babel-plugin-makepot@3.0.0 - @wordpress/babel-preset-default@4.0.0 - @wordpress/blob@2.2.0 - @wordpress/block-editor@1.0.0 - @wordpress/block-library@2.3.0 - @wordpress/block-serialization-default-parser@3.0.0 - @wordpress/block-serialization-spec-parser@3.0.0 - @wordpress/blocks@6.1.0 - @wordpress/browserslist-config@2.3.0 - @wordpress/components@7.1.0 - @wordpress/compose@3.1.0 - @wordpress/core-data@2.1.0 - @wordpress/custom-templated-path-webpack-plugin@1.2.0 - @wordpress/data@4.3.0 - @wordpress/date@3.1.0 - @wordpress/deprecated@2.1.0 - @wordpress/docgen@1.0.0 - @wordpress/dom-ready@2.1.0 - @wordpress/dom@2.1.0 - @wordpress/e2e-test-utils@1.0.0 - @wordpress/e2e-tests@1.0.0 - @wordpress/edit-post@3.2.0 - @wordpress/editor@9.1.0 - @wordpress/element@2.2.0 - @wordpress/escape-html@1.1.0 - @wordpress/eslint-plugin@2.0.0 - @wordpress/format-library@1.3.0 - @wordpress/hooks@2.1.0 - @wordpress/html-entities@2.1.0 - @wordpress/i18n@3.2.0 - @wordpress/is-shallow-equal@1.2.0 - @wordpress/jest-console@3.0.0 - @wordpress/jest-preset-default@4.0.0 - @wordpress/jest-puppeteer-axe@1.0.0 - @wordpress/keycodes@2.1.0 - @wordpress/library-export-default-webpack-plugin@1.1.0 - @wordpress/list-reusable-blocks@1.2.0 - @wordpress/notices@1.2.0 - @wordpress/npm-package-json-lint-config@1.2.0 - @wordpress/nux@3.1.0 - @wordpress/plugins@2.1.0 - @wordpress/postcss-themes@2.0.0 - @wordpress/priority-queue@1.0.0 - @wordpress/redux-routine@3.1.0 - @wordpress/rich-text@3.1.0 - @wordpress/scripts@3.0.0 - @wordpress/shortcode@2.1.0 - @wordpress/token-list@1.2.0 - @wordpress/url@2.4.0 - @wordpress/viewport@2.2.0 - @wordpress/wordcount@2.1.0 This also includes the update to the scripts dependencies and the new widgets php files. Props iseulde. Fixes #46429. Built from https://develop.svn.wordpress.org/trunk@44808 git-svn-id: http://core.svn.wordpress.org/trunk@44640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 10:09:59 +01:00
this.wp=this.wp||{},this.wp.blockLibrary=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=306)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},101:function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(a){t&&t.nodeType,e&&e.nodeType;var c="object"==typeof r&&r;c.global!==c&&c.window!==c&&c.self;var i,l=2147483647,s=36,u=1,b=26,m=38,d=700,h=72,p=128,g="-",O=/^xn--/,j=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=s-u,k=Math.floor,w=String.fromCharCode;function C(e){throw new RangeError(v[e])}function E(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function _(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+E((e=e.replace(f,".")).split("."),t).join(".")}function x(e){for(var t,n,r=[],o=0,a=e.length;o<a;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<a?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function S(e){return E(e,function(e){var t="";return e>65535&&(t+=w((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=w(e)}).join("")}function T(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function N(e,t,n){var r=0;for(e=n?k(e/d):e>>1,e+=k(e/t);e>y*b>>1;r+=s)e=k(e/y);return k(r+(y+1)*e/(e+m))}function R(e){var t,n,r,o,a,c,i,m,d,O,j,f=[],v=e.length,y=0,w=p,E=h;for((n=e.lastIndexOf(g))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&C("not-basic"),f.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<v;){for(a=y,c=1,i=s;o>=v&&C("invalid-input"),((m=(j=e.charCodeAt(o++))-48<10?j-22:j-65<26?j-65:j-97<26?j-97:s)>=s||m>k((l-y)/c))&&C("overflow"),y+=m*c,!(m<(d=i<=E?u:i>=E+b?b:i-E));i+=s)c>k(l/(O=s-d))&&C("overflow"),c*=O;E=N(y-a,t=f.length+1,0==a),k(y/t)>l-w&&C("overflow"),w+=k(y/t),y%=t,f.splice(y++,0,w)}return S(f)}function B(e){var t,n,r,o,a,c,i,m,d,O,j,f,v,y,E,_=[];for(f=(e=x(e)).length,t=p,n=0,a=h,c=0;c<f;++c)(j=e[c])<128&&_.push(w(j));for(r=o=_.length,o&&_.push(g);r<f;){for(i=l,c=0;c<f;++c)(j=e[c])>=t&&j<i&&(i=j);for(i-t>k((l-n)/(v=r+1))&&C("overflow"),n+=(i-t)*v,t=i,c=0;c<f;++c)if((j=e[c])<t&&++n>l&&C("overflow"),j==t){for(m=n,d=s;!(m<(O=d<=a?u:d>=a+b?b:d-a));d+=s)E=m-O,y=s-O,_.push(w(T(O+E%y,0))),m=k(E/y);_.push(w(T(m,0))),a=N(n,v,r==o),n=0,++r}++n,++t}return _.join("")}i={version:"1.4.1",ucs2:{decode:x,encode:S},decode:R,encode:B,toASCII:function(e){return _(e,function(e){return j.test(e)?"xn--"+B(e):e})},toUnicode:function(e){return _(e,function(e){return O.test(e)?R(e.slice(4).toLowerCase()):e})}},void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(102)(e),n(51))},102:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},103:fun
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
Block Editor: Update the WordPress Packages from Gutenberg 5.2. Updated Packages: - @wordpress/a11y@2.1.0 - @wordpress/annotations@1.1.0 - @wordpress/api-fetch@3.0.0 - @wordpress/autop@2.1.0 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0 - @wordpress/babel-plugin-makepot@3.0.0 - @wordpress/babel-preset-default@4.0.0 - @wordpress/blob@2.2.0 - @wordpress/block-editor@1.0.0 - @wordpress/block-library@2.3.0 - @wordpress/block-serialization-default-parser@3.0.0 - @wordpress/block-serialization-spec-parser@3.0.0 - @wordpress/blocks@6.1.0 - @wordpress/browserslist-config@2.3.0 - @wordpress/components@7.1.0 - @wordpress/compose@3.1.0 - @wordpress/core-data@2.1.0 - @wordpress/custom-templated-path-webpack-plugin@1.2.0 - @wordpress/data@4.3.0 - @wordpress/date@3.1.0 - @wordpress/deprecated@2.1.0 - @wordpress/docgen@1.0.0 - @wordpress/dom-ready@2.1.0 - @wordpress/dom@2.1.0 - @wordpress/e2e-test-utils@1.0.0 - @wordpress/e2e-tests@1.0.0 - @wordpress/edit-post@3.2.0 - @wordpress/editor@9.1.0 - @wordpress/element@2.2.0 - @wordpress/escape-html@1.1.0 - @wordpress/eslint-plugin@2.0.0 - @wordpress/format-library@1.3.0 - @wordpress/hooks@2.1.0 - @wordpress/html-entities@2.1.0 - @wordpress/i18n@3.2.0 - @wordpress/is-shallow-equal@1.2.0 - @wordpress/jest-console@3.0.0 - @wordpress/jest-preset-default@4.0.0 - @wordpress/jest-puppeteer-axe@1.0.0 - @wordpress/keycodes@2.1.0 - @wordpress/library-export-default-webpack-plugin@1.1.0 - @wordpress/list-reusable-blocks@1.2.0 - @wordpress/notices@1.2.0 - @wordpress/npm-package-json-lint-config@1.2.0 - @wordpress/nux@3.1.0 - @wordpress/plugins@2.1.0 - @wordpress/postcss-themes@2.0.0 - @wordpress/priority-queue@1.0.0 - @wordpress/redux-routine@3.1.0 - @wordpress/rich-text@3.1.0 - @wordpress/scripts@3.0.0 - @wordpress/shortcode@2.1.0 - @wordpress/token-list@1.2.0 - @wordpress/url@2.4.0 - @wordpress/viewport@2.2.0 - @wordpress/wordcount@2.1.0 This also includes the update to the scripts dependencies and the new widgets php files. Props iseulde. Fixes #46429. Built from https://develop.svn.wordpress.org/trunk@44808 git-svn-id: http://core.svn.wordpress.org/trunk@44640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 10:09:59 +01:00
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===a)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},17:function(e,t){!function(){e.exports=this.wp.keycodes}()},18:function(e,t,n){"use strict";var r=n(33);function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||Object(r.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(t,"a",function(){return o})},19:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",function(){return r})},2:function(e,t){!function(){e.exports=this.lodash}()},20:function(e,t){!function(){e.exports=this.wp.richText}()},21:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",function(){return r})},22:function(e,t){!function(){e.exports=this.wp.url}()},25:function(e,t,n){"use strict";var r=n(34);var o=n(35);function a(e,t){return Object(r.a)(e)||function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||Object(o.a)()}n.d(t,"a",function(){return a})},27:function(e,t){!function(){e.exports=this.moment}()},29:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}n.d(t,"a",function(){return o})},3:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return r})},306:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"name",function(){return pe}),n.d(r,"settings",function(){return ge});var o={};n.r(o),n.d(o,"name",function(){return et}),n.d(o,"settings",function(){return at});var a={};n.r(a),n.d(a,"getLevelFromHeadingNodeName",function(){return lt}),n.d(a,"name",function(){return mt}),n.d(a,"settings",function(){return dt});var c={};n.r(c),n.d(c,"name",function(){return gt}),n.d(c,"settings",function(){return Ot});var i={};n.r(i),n.d(i,"name",function(){return Tt}),n.d(i,"settings",function(){return Rt});var l={};n.r(l),n.d(l,"name",function(){return Bt}),n.d(l,"settings",function(){return At});var s={};n.r(s),n.d(s,"name",function(){return zt}),n.d(s,"settings",function(){return Ht});var u={};n.r(u),n.d(u,"name",function(){return Gt}),n.d(u,"settings",function(){return Kt});var b={};n.r(b),n.d(b,"name",function(){return en}),n.d(b,"settings",function(){return tn});var m={};n.r(m),n.d(m,"name",function(){return on}),n.d(m,"settings",function(){return an});var d={};n.r(d),n.d(d,"name",function(){return cn}),n.d(d,"settings",function(){return ln});var h={};n.r(h),n.d(h,"name",function(){return mn}),n.d(h,"settings",function(){return dn});var p={};n.r(p),n.d(p,"name",function(){return hn}),n.d(p,"settings",
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
Block Editor: Update the WordPress Packages from Gutenberg 5.2. Updated Packages: - @wordpress/a11y@2.1.0 - @wordpress/annotations@1.1.0 - @wordpress/api-fetch@3.0.0 - @wordpress/autop@2.1.0 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0 - @wordpress/babel-plugin-makepot@3.0.0 - @wordpress/babel-preset-default@4.0.0 - @wordpress/blob@2.2.0 - @wordpress/block-editor@1.0.0 - @wordpress/block-library@2.3.0 - @wordpress/block-serialization-default-parser@3.0.0 - @wordpress/block-serialization-spec-parser@3.0.0 - @wordpress/blocks@6.1.0 - @wordpress/browserslist-config@2.3.0 - @wordpress/components@7.1.0 - @wordpress/compose@3.1.0 - @wordpress/core-data@2.1.0 - @wordpress/custom-templated-path-webpack-plugin@1.2.0 - @wordpress/data@4.3.0 - @wordpress/date@3.1.0 - @wordpress/deprecated@2.1.0 - @wordpress/docgen@1.0.0 - @wordpress/dom-ready@2.1.0 - @wordpress/dom@2.1.0 - @wordpress/e2e-test-utils@1.0.0 - @wordpress/e2e-tests@1.0.0 - @wordpress/edit-post@3.2.0 - @wordpress/editor@9.1.0 - @wordpress/element@2.2.0 - @wordpress/escape-html@1.1.0 - @wordpress/eslint-plugin@2.0.0 - @wordpress/format-library@1.3.0 - @wordpress/hooks@2.1.0 - @wordpress/html-entities@2.1.0 - @wordpress/i18n@3.2.0 - @wordpress/is-shallow-equal@1.2.0 - @wordpress/jest-console@3.0.0 - @wordpress/jest-preset-default@4.0.0 - @wordpress/jest-puppeteer-axe@1.0.0 - @wordpress/keycodes@2.1.0 - @wordpress/library-export-default-webpack-plugin@1.1.0 - @wordpress/list-reusable-blocks@1.2.0 - @wordpress/notices@1.2.0 - @wordpress/npm-package-json-lint-config@1.2.0 - @wordpress/nux@3.1.0 - @wordpress/plugins@2.1.0 - @wordpress/postcss-themes@2.0.0 - @wordpress/priority-queue@1.0.0 - @wordpress/redux-routine@3.1.0 - @wordpress/rich-text@3.1.0 - @wordpress/scripts@3.0.0 - @wordpress/shortcode@2.1.0 - @wordpress/token-list@1.2.0 - @wordpress/url@2.4.0 - @wordpress/viewport@2.2.0 - @wordpress/wordcount@2.1.0 This also includes the update to the scripts dependencies and the new widgets php files. Props iseulde. Fixes #46429. Built from https://develop.svn.wordpress.org/trunk@44808 git-svn-id: http://core.svn.wordpress.org/trunk@44640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 10:09:59 +01:00
!function(){"use strict";var n=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)o(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function o(e,o){if(o){var a=typeof o;"string"===a?function(e,t){for(var n=t.split(r),o=n.length,a=0;a<o;++a)e[n[a]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===a?function(e,t){for(var r in t)n.call(t,r)&&(e[r]=!!t[r])}(e,o):"number"===a&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=new e;t(a,r);var c=[];for(var i in a)a[i]&&c.push(i);return c.join(" ")}}();e.exports?(n.default=n,e.exports=n):void 0===(r=function(){return n}.apply(t,[]))||(e.exports=r)}()},7:function(e,t){!function(){e.exports=this.wp.compose}()},77:function(e,t,n){"use strict";var r=n(101),o=n(103);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=f,t.resolve=function(e,t){return f(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?f(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=f(e));return e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var c=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,s=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(s),b=["%","/","?",";","#"].concat(u),m=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},O={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},j=n(104);function f(e,t,n){if(e&&o.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),i=-1!==a&&a<e.indexOf("#")?"?":"#",s=e.split(i);s[0]=s[0].replace(/\\/g,"/");var f=e=s.join(i);if(f=f.trim(),!n&&1===e.split("#").length){var v=l.exec(f);if(v)return this.path=f,this.href=f,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?j.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var y=c.exec(f);if(y){var k=(y=y[0]).toLowerCase();this.protocol=k,f=f.substr(y.length)}if(n||y||f.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===f.substr(0,2);!w||y&&g[y]||(f=f.substr(2),this.slashes=!0)}if(!g[y]&&(w||y&&!O[y])){for(var C,E,_=-1,x=0;x<m.length;x++){-1!==(S=f.indexOf(m[x]))&&(-1===_||S<_)&&(_=S)}-1!==(E=-1===_?f.lastIndexOf("@"):f.lastIndexOf("@",_))&&(C=f.slice(0,E),f=f.slice(E+1),this.auth=decodeURIComponent(C)),_=-1;for(x=0;x<b.length;x++){var S;-1!==(S=f.indexOf(b[x]))&&(-1===_||S<_)&&(_=S)}-1===_&&(_=f.length),this.host=f.slice(0,_),f=f.slice(_),this.parseHost(),this.hostname=this.hostname||"";var T="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!T)for(var N=this.hostname.split(/\./),R=(x=0,N.length);x<R;x++){var B=N[x];if(B&&!B.match(d)){for(var A="",P=0,I=B.length;P<I;P++)B.charCodeAt(P)>127?A+="x":A+=B[P];if(!A.match(d)){var L=N.slice(0,x),M=N.slice(x+1),z=B.match(h);z&&(L.push(z[1]),M.unshift(z[2])),M.length&&(f="/"+M.join(".")+f),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=r.toASCII(this.hostname));var H=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+H,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==f[0]&&(f="/"+f))}if(!p[k])for(x=0,R=u.length;x<R;x++){var F=u[x];if(-1!==f.indexOf(F)){var V=encodeURIComponent(F);V===F&&(V=escape(F)),f=f.split(F).join(V)}}var U=f.indexOf("#");-1!==U&&(this.hash=f.substr(U),f=f.slice(0,U));var W=f.indexOf("?");if(-1!==W?(this.search=f.substr(W),this.query=f.substr(W+1),t&&(this.query=j.parse(this.query)),f=f.slice(0,W)):t&&(this.search="",this.query={}),f&&(this.pathname=f),O[k]&&this.hostname&&!this.pathname&&