diff --git a/README.md b/README.md index 31053dd..b4bb56c 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ _Note: This SDK is supported on Node JS, AWS Lambda, React Native, and modern br Simply copy this line into your HTML: ```html - + ``` ## Install using yarn / npm @@ -129,6 +129,9 @@ This SDK is released under the [BSD 3-Clause License](LICENSE). ## CHANGELOG +### v1.3.1 +* CHANGE: `getDocument` updated to support v2 of the Document API + ### v1.3.0 * FEATURE: Add support for managing scoped access tokens diff --git a/build/index-node.js b/build/index-node.js index 9cbfb42..2675b7b 100644 --- a/build/index-node.js +++ b/build/index-node.js @@ -6930,15 +6930,7 @@ var TrueVaultClient = function () { return _context48.abrupt('return', []); case 5: - if (documentIds.length === 1) { - // Sending a single ID to the API will only return the document's contents. In order to - // retrieve a proper multiget response with `id` and `owner_id`, we need to send a - // request with two instances of the same document ID. We will then only return the - // first result from the response. - requestDocumentIds = [documentIds[0], documentIds[0]]; - } else { - requestDocumentIds = documentIds; - } + requestDocumentIds = documentIds; case 6: _context48.next = 8; @@ -27395,7 +27387,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ module.exports = { "name": "truevault", "description": "The official TrueVault JavaScript SDK", - "version": "1.3.0", + "version": "1.3.1", "repository": { "type": "git", "url": "https://github.com/truevault/truevault-js-sdk" diff --git a/build/index-web.js b/build/index-web.js index 3ba955d..abc2257 100644 --- a/build/index-web.js +++ b/build/index-web.js @@ -52,7 +52,7 @@ * MIT License http://www.opensource.org/licenses/mit-license * */ -!function(i,u){"use strict";"object"==typeof t&&t.exports?t.exports=u():void 0===(o="function"==typeof(n=u)?n.call(e,r,e,t):n)||(t.exports=o)}(0,function(t){"use strict";var e=t&&t.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return!1;var o=r.list[t.slice(e+1)];return!!o&&o.indexOf(" "+t.slice(n+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var n=r.list[t.slice(e+1)];return!!n&&n.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return null;var o=r.list[t.slice(e+1)];return o?o.indexOf(" "+t.slice(n+1,e)+" ")<0?null:t.slice(n+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return r})},function(t,e,r){(function(t,n){var o;/*! https://mths.be/punycode v1.4.0 by @mathias */!function(i){"object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType;var u="object"==typeof n&&n;u.global!==u&&u.window!==u&&u.self;var a,s=2147483647,c=36,f=1,h=26,p=38,l=700,d=72,v=128,g="-",m=/^xn--/,y=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=c-f,x=Math.floor,S=String.fromCharCode;function k(t){throw new RangeError(w[t])}function R(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function E(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+R((t=t.replace(b,".")).split("."),e).join(".")}function A(t){for(var e,r,n=[],o=0,i=t.length;o=55296&&e<=56319&&o65535&&(e+=S((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=S(t)}).join("")}function O(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function T(t,e,r){var n=0;for(t=r?x(t/l):t>>1,t+=x(t/e);t>_*h>>1;n+=c)t=x(t/_);return x(n+(_+1)*t/(t+p))}function I(t){var e,r,n,o,i,u,a,p,l,m,y,b=[],w=t.length,_=0,S=v,R=d;for((r=t.lastIndexOf(g))<0&&(r=0),n=0;n=128&&k("not-basic"),b.push(t.charCodeAt(n));for(o=r>0?r+1:0;o=w&&k("invalid-input"),((p=(y=t.charCodeAt(o++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:c)>=c||p>x((s-_)/u))&&k("overflow"),_+=p*u,!(p<(l=a<=R?f:a>=R+h?h:a-R));a+=c)u>x(s/(m=c-l))&&k("overflow"),u*=m;R=T(_-i,e=b.length+1,0==i),x(_/e)>s-S&&k("overflow"),S+=x(_/e),_%=e,b.splice(_++,0,S)}return P(b)}function j(t){var e,r,n,o,i,u,a,p,l,m,y,b,w,_,R,E=[];for(b=(t=A(t)).length,e=v,r=0,i=d,u=0;u=e&&yx((s-r)/(w=n+1))&&k("overflow"),r+=(a-e)*w,e=a,u=0;us&&k("overflow"),y==e){for(p=r,l=c;!(p<(m=l<=i?f:l>=i+h?h:l-i));l+=c)R=p-m,_=c-m,E.push(S(O(m+R%_,0))),p=x(R/_);E.push(S(O(p,0))),i=T(r,w,n==o),r=0,++n}++r,++e}return E.join("")}a={version:"1.3.2",ucs2:{decode:A,encode:P},decode:I,encode:j,toASCII:function(t){return E(t,function(t){return y.test(t)?"xn--"+j(t):t})},toUnicode:function(t){return E(t,function(t){return m.test(t)?I(t.slice(4).toLowerCase()):t})}},void 0===(o=function(){return a}.call(e,r,e,t))||(t.exports=o)}()}).call(e,r(117)(t),r(48))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var r=0;r=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return n("end");if(u.tryLoc<=this.prev){var s=o.call(u,"catchLoc"),c=o.call(u,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:I(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),v}}}function w(t,e,r,n){var o=e&&e.prototype instanceof x?e:x,i=Object.create(o.prototype),u=new T(n||[]);return i._invoke=function(t,e,r){var n=h;return function(o,i){if(n===l)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return j()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=A(u,r);if(a){if(a===v)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=l;var s=_(t,e,r);if("normal"===s.type){if(n=r.done?d:p,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=d,r.method="throw",r.arg=s.arg)}}}(t,r,u),i}function _(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function x(){}function S(){}function k(){}function R(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function E(t){function r(e,n,i,u){var a=_(t[e],t,n);if("throw"!==a.type){var s=a.arg,c=s.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(t){r("next",t,i,u)},function(t){r("throw",t,i,u)}):Promise.resolve(c).then(function(t){s.value=t,i(s)},u)}u(a.arg)}var n;"object"==typeof e.process&&e.process.domain&&(r=e.process.domain.bind(r)),this._invoke=function(t,e){function o(){return new Promise(function(n,o){r(t,e,n,o)})}return n=n?n.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,A(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=_(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function I(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n>18&63)+f.charAt(o>>12&63)+f.charAt(o>>6&63)+f.charAt(63&o);return 2==i?(e=t.charCodeAt(a)<<8,r=t.charCodeAt(++a),u+=f.charAt((o=e+r)>>10)+f.charAt(o>>4&63)+f.charAt(o<<2&63)+"="):1==i&&(o=t.charCodeAt(a),u+=f.charAt(o>>2)+f.charAt(o<<4&63)+"=="),u},decode:function(t){var e=(t=String(t).replace(h,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&c("Invalid character: the string to be decoded is not correctly encoded.");for(var r,n,o=0,i="",u=-1;++u>(-2*o&6)));return i},version:"0.1.0"};void 0===(o=function(){return p}.call(e,r,e,t))||(t.exports=o)}()}).call(e,r(117)(t),r(48))},function(t,e,r){"use strict";e.byteLength=function(t){return 3*t.length/4-c(t)},e.toByteArray=function(t){var e,r,n,u,a,s,f=t.length;a=c(t),s=new i(3*f/4-a),n=a>0?f-4:f;var h=0;for(e=0,r=0;e>16&255,s[h++]=u>>8&255,s[h++]=255&u;2===a?(u=o[t.charCodeAt(e)]<<2|o[t.charCodeAt(e+1)]>>4,s[h++]=255&u):1===a&&(u=o[t.charCodeAt(e)]<<10|o[t.charCodeAt(e+1)]<<4|o[t.charCodeAt(e+2)]>>2,s[h++]=u>>8&255,s[h++]=255&u);return s},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i="",u=[],a=0,s=r-o;as?s:a+16383));1===o?(e=t[r-1],i+=n[e>>2],i+=n[e<<4&63],i+="=="):2===o&&(e=(t[r-2]<<8)+t[r-1],i+=n[e>>10],i+=n[e>>4&63],i+=n[e<<2&63],i+="=");return u.push(i),u.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=u.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function f(t,e,r){for(var o,i,u=[],a=e;a>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return u.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e,r){"use strict";(function(t){ +!function(i,u){"use strict";"object"==typeof t&&t.exports?t.exports=u():void 0===(o="function"==typeof(n=u)?n.call(e,r,e,t):n)||(t.exports=o)}(0,function(t){"use strict";var e=t&&t.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return!1;var o=r.list[t.slice(e+1)];return!!o&&o.indexOf(" "+t.slice(n+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var n=r.list[t.slice(e+1)];return!!n&&n.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return null;var o=r.list[t.slice(e+1)];return o?o.indexOf(" "+t.slice(n+1,e)+" ")<0?null:t.slice(n+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return r})},function(t,e,r){(function(t,n){var o;/*! https://mths.be/punycode v1.4.0 by @mathias */!function(i){"object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType;var u="object"==typeof n&&n;u.global!==u&&u.window!==u&&u.self;var a,s=2147483647,c=36,f=1,h=26,p=38,l=700,d=72,v=128,g="-",m=/^xn--/,y=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=c-f,x=Math.floor,S=String.fromCharCode;function k(t){throw new RangeError(w[t])}function R(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function E(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+R((t=t.replace(b,".")).split("."),e).join(".")}function A(t){for(var e,r,n=[],o=0,i=t.length;o=55296&&e<=56319&&o65535&&(e+=S((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=S(t)}).join("")}function O(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function T(t,e,r){var n=0;for(t=r?x(t/l):t>>1,t+=x(t/e);t>_*h>>1;n+=c)t=x(t/_);return x(n+(_+1)*t/(t+p))}function I(t){var e,r,n,o,i,u,a,p,l,m,y,b=[],w=t.length,_=0,S=v,R=d;for((r=t.lastIndexOf(g))<0&&(r=0),n=0;n=128&&k("not-basic"),b.push(t.charCodeAt(n));for(o=r>0?r+1:0;o=w&&k("invalid-input"),((p=(y=t.charCodeAt(o++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:c)>=c||p>x((s-_)/u))&&k("overflow"),_+=p*u,!(p<(l=a<=R?f:a>=R+h?h:a-R));a+=c)u>x(s/(m=c-l))&&k("overflow"),u*=m;R=T(_-i,e=b.length+1,0==i),x(_/e)>s-S&&k("overflow"),S+=x(_/e),_%=e,b.splice(_++,0,S)}return P(b)}function j(t){var e,r,n,o,i,u,a,p,l,m,y,b,w,_,R,E=[];for(b=(t=A(t)).length,e=v,r=0,i=d,u=0;u=e&&yx((s-r)/(w=n+1))&&k("overflow"),r+=(a-e)*w,e=a,u=0;us&&k("overflow"),y==e){for(p=r,l=c;!(p<(m=l<=i?f:l>=i+h?h:l-i));l+=c)R=p-m,_=c-m,E.push(S(O(m+R%_,0))),p=x(R/_);E.push(S(O(p,0))),i=T(r,w,n==o),r=0,++n}++r,++e}return E.join("")}a={version:"1.3.2",ucs2:{decode:A,encode:P},decode:I,encode:j,toASCII:function(t){return E(t,function(t){return y.test(t)?"xn--"+j(t):t})},toUnicode:function(t){return E(t,function(t){return m.test(t)?I(t.slice(4).toLowerCase()):t})}},void 0===(o=function(){return a}.call(e,r,e,t))||(t.exports=o)}()}).call(e,r(117)(t),r(48))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var r=0;r=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return n("end");if(u.tryLoc<=this.prev){var s=o.call(u,"catchLoc"),c=o.call(u,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:I(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),v}}}function w(t,e,r,n){var o=e&&e.prototype instanceof x?e:x,i=Object.create(o.prototype),u=new T(n||[]);return i._invoke=function(t,e,r){var n=h;return function(o,i){if(n===l)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return j()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=A(u,r);if(a){if(a===v)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=l;var s=_(t,e,r);if("normal"===s.type){if(n=r.done?d:p,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=d,r.method="throw",r.arg=s.arg)}}}(t,r,u),i}function _(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function x(){}function S(){}function k(){}function R(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function E(t){function r(e,n,i,u){var a=_(t[e],t,n);if("throw"!==a.type){var s=a.arg,c=s.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(t){r("next",t,i,u)},function(t){r("throw",t,i,u)}):Promise.resolve(c).then(function(t){s.value=t,i(s)},u)}u(a.arg)}var n;"object"==typeof e.process&&e.process.domain&&(r=e.process.domain.bind(r)),this._invoke=function(t,e){function o(){return new Promise(function(n,o){r(t,e,n,o)})}return n=n?n.then(o,o):o()}}function A(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,A(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=_(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function I(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n>18&63)+f.charAt(o>>12&63)+f.charAt(o>>6&63)+f.charAt(63&o);return 2==i?(e=t.charCodeAt(a)<<8,r=t.charCodeAt(++a),u+=f.charAt((o=e+r)>>10)+f.charAt(o>>4&63)+f.charAt(o<<2&63)+"="):1==i&&(o=t.charCodeAt(a),u+=f.charAt(o>>2)+f.charAt(o<<4&63)+"=="),u},decode:function(t){var e=(t=String(t).replace(h,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&c("Invalid character: the string to be decoded is not correctly encoded.");for(var r,n,o=0,i="",u=-1;++u>(-2*o&6)));return i},version:"0.1.0"};void 0===(o=function(){return p}.call(e,r,e,t))||(t.exports=o)}()}).call(e,r(117)(t),r(48))},function(t,e,r){"use strict";e.byteLength=function(t){return 3*t.length/4-c(t)},e.toByteArray=function(t){var e,r,n,u,a,s,f=t.length;a=c(t),s=new i(3*f/4-a),n=a>0?f-4:f;var h=0;for(e=0,r=0;e>16&255,s[h++]=u>>8&255,s[h++]=255&u;2===a?(u=o[t.charCodeAt(e)]<<2|o[t.charCodeAt(e+1)]>>4,s[h++]=255&u):1===a&&(u=o[t.charCodeAt(e)]<<10|o[t.charCodeAt(e+1)]<<4|o[t.charCodeAt(e+2)]>>2,s[h++]=u>>8&255,s[h++]=255&u);return s},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i="",u=[],a=0,s=r-o;as?s:a+16383));1===o?(e=t[r-1],i+=n[e>>2],i+=n[e<<4&63],i+="=="):2===o&&(e=(t[r-2]<<8)+t[r-1],i+=n[e>>10],i+=n[e>>4&63],i+=n[e<<2&63],i+="=");return u.push(i),u.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=u.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function f(t,e,r){for(var o,i,u=[],a=e;a>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return u.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,e,r){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * @@ -90,4 +90,4 @@ t.exports=function(t,e){var r=e||{},o=r.type||"attachment",u=function(t,e){if(vo * MIT License http://www.opensource.org/licenses/mit-license * */ -!function(u,a){"use strict";"object"==typeof t&&t.exports?t.exports=a(r(116),r(114),r(115)):(o=[r(116),r(114),r(115)],void 0===(i="function"==typeof(n=a)?n.apply(e,o):n)||(t.exports=i))}(0,function(t,e,r,n){"use strict";var o=n&&n.URI;function i(t,e){var r=arguments.length>=1,n=arguments.length>=2;if(!(this instanceof i))return r?n?new i(t,e):new i(t):new i;if(void 0===t){if(r)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&r)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}i.version="1.18.12";var u=i.prototype,a=Object.prototype.hasOwnProperty;function s(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function f(t){return"Array"===c(t)}function h(t,e){var r,n,o={};if("RegExp"===c(e))o=null;else if(f(e))for(r=0,n=e.length;r]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return i.domAttributes[e]}},i.encode=g,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=g,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(t,e){var r=i.encode(t+"");return void 0===e&&(e=i.escapeQuerySpace),e?r.replace(/%20/g,"+"):r},i.decodeQuery=function(t,e){t+="",void 0===e&&(e=i.escapeQuerySpace);try{return i.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var m,y={encode:"encode",decode:"decode"},b=function(t,e){return function(r){try{return i[e](r+"").replace(i.characters[t][e].expression,function(r){return i.characters[t][e].map[r]})}catch(t){return r}}};for(m in y)i[m+"PathSegment"]=b("pathname",y[m]),i[m+"UrnPathSegment"]=b("urnpath",y[m]);var w=function(t,e,r){return function(n){var o;o=r?function(t){return i[e](i[r](t))}:i[e];for(var u=(n+"").split(t),a=0,s=u.length;a-1&&(e.fragment=t.substring(r+1)||null,t=t.substring(0,r)),(r=t.indexOf("?"))>-1&&(e.query=t.substring(r+1)||null,t=t.substring(0,r)),"//"===t.substring(0,2)?(e.protocol=null,t=t.substring(2),t=i.parseAuthority(t,e)):(r=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,r)||null,e.protocol&&!e.protocol.match(i.protocol_expression)?e.protocol=void 0:"//"===t.substring(r+1,r+3)?(t=t.substring(r+3),t=i.parseAuthority(t,e)):(t=t.substring(r+1),e.urn=!0)),e.path=t,e},i.parseHost=function(t,e){var r,n,o=(t=t.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=t.length),"["===t.charAt(0))r=t.indexOf("]"),e.hostname=t.substring(1,r)||null,e.port=t.substring(r+2,o)||null,"/"===e.port&&(e.port=null);else{var u=t.indexOf(":"),a=t.indexOf("/"),s=t.indexOf(":",u+1);-1!==s&&(-1===a||s-1?n:t.length-1);return o>-1&&(-1===n||o-1?l.slice(0,d)+l.slice(d).replace(u,""):l.replace(u,"")).length<=c[0].length||r.ignore&&r.ignore.test(l))){var m=e(l,f,p=f+l.length,t);void 0!==m?(m=String(m),t=t.slice(0,f)+m+t.slice(p),n.lastIndex=f+m.length):n.lastIndex=p}}return n.lastIndex=0,t},i.ensureValidHostname=function(e,r){var n=!!e,o=!1;if(!!r&&(o=p(i.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(e&&e.match(i.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(e).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(t){if(t){var e=Number(t);if(!(/^[0-9]+$/.test(e)&&e>0&&e<65536))throw new TypeError('Port "'+t+'" is not a valid port')}},i.noConflict=function(t){if(t){var e={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(e.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(e.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=n.SecondLevelDomains.noConflict()),e}return n.URI===this&&(n.URI=o),this},u.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},u.clone=function(){return new i(this)},u.valueOf=u.toString=function(){return this.build(!1)._string},u.protocol=_("protocol"),u.username=_("username"),u.password=_("password"),u.hostname=_("hostname"),u.port=_("port"),u.query=x("query","?"),u.fragment=x("fragment","#"),u.search=function(t,e){var r=this.query(t,e);return"string"==typeof r&&r.length?"?"+r:r},u.hash=function(t,e){var r=this.fragment(t,e);return"string"==typeof r&&r.length?"#"+r:r},u.pathname=function(t,e){if(void 0===t||!0===t){var r=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=t?i.recodeUrnPath(t):"":this._parts.path=t?i.recodePath(t):"/",this.build(!e),this},u.path=u.pathname,u.href=function(t,e){var r;if(void 0===t)return this.toString();this._string="",this._parts=i._parts();var n=t instanceof i,o="object"==typeof t&&(t.hostname||t.path||t.pathname);t.nodeName&&(t=t[i.getDomAttribute(t)]||"",o=!1);if(!n&&o&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=i.parse(String(t),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var u=n?t._parts:t;for(r in u)a.call(this._parts,r)&&(this._parts[r]=u[r])}return this.build(!e),this},u.is=function(t){var e=!1,n=!1,o=!1,u=!1,a=!1,s=!1,c=!1,f=!this._parts.urn;switch(this._parts.hostname&&(f=!1,n=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),a=(u=!(e=n||o))&&r&&r.has(this._parts.hostname),s=u&&i.idn_expression.test(this._parts.hostname),c=u&&i.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return f;case"absolute":return!f;case"domain":case"name":return u;case"sld":return a;case"ip":return e;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return s;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var S=u.protocol,k=u.port,R=u.hostname;u.protocol=function(t,e){if(void 0!==t&&t&&!(t=t.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return S.call(this,t,e)},u.scheme=u.protocol,u.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(":"===(t+="").charAt(0)&&(t=t.substring(1)),i.ensureValidPort(t))),k.call(this,t,e))},u.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var r={};if("/"!==i.parseHost(t,r))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=r.hostname,i.ensureValidHostname(t,this._parts.protocol)}return R.call(this,t,e)},u.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(t);return this.protocol(n.protocol()).authority(n.authority()).build(!e),this},u.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},u.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},u.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=i.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==t[t.length-1]&&(t+="@"),i.parseUserinfo(t,this._parts),this.build(!e),this},u.resource=function(t,e){var r;return void 0===t?this.path()+this.search()+this.hash():(r=i.parse(t),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!e),this)},u.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),u=new RegExp("^"+s(o));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&i.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(u,t),this.build(!e),this},u.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(e).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var o=new RegExp(s(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,t)}return this.build(!e),this},u.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==e&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var i;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');i=new RegExp(s(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(s(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},u.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return t?i.decodePath(n):n}var o=this._parts.path.length-this.filename().length,u=this._parts.path.substring(0,o),a=new RegExp("^"+s(u));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=i.recodePath(t),this._parts.path=this._parts.path.replace(a,t),this.build(!e),this},u.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return t?i.decodePathSegment(n):n}var o=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(o=!0);var u=new RegExp(s(this.filename())+"$");return t=i.recodePath(t),this._parts.path=this._parts.path.replace(u,t),o?this.normalizePath(e):this.build(!e),this},u.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),u=o.lastIndexOf(".");return-1===u?"":(r=o.substring(u+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",t?i.decodePathSegment(n):n)}"."===t.charAt(0)&&(t=t.substring(1));var a,c=this.suffix();if(c)a=t?new RegExp(s(c)+"$"):new RegExp(s("."+c)+"$");else{if(!t)return this;this._parts.path+="."+i.recodePath(t)}return a&&(t=i.recodePath(t),this._parts.path=this._parts.path.replace(a,t)),this.build(!e),this},u.segment=function(t,e,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),u=o.split(n);if(void 0!==t&&"number"!=typeof t&&(r=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(i&&u.shift(),t<0&&(t=Math.max(u.length+t,0)),void 0===e)return void 0===t?u:u[t];if(null===t||void 0===u[t])if(f(e)){u=[];for(var a=0,s=e.length;a=1,n=arguments.length>=2;if(!(this instanceof i))return r?n?new i(t,e):new i(t):new i;if(void 0===t){if(r)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&r)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}i.version="1.18.12";var u=i.prototype,a=Object.prototype.hasOwnProperty;function s(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function f(t){return"Array"===c(t)}function h(t,e){var r,n,o={};if("RegExp"===c(e))o=null;else if(f(e))for(r=0,n=e.length;r]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return i.domAttributes[e]}},i.encode=g,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=g,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(t,e){var r=i.encode(t+"");return void 0===e&&(e=i.escapeQuerySpace),e?r.replace(/%20/g,"+"):r},i.decodeQuery=function(t,e){t+="",void 0===e&&(e=i.escapeQuerySpace);try{return i.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var m,y={encode:"encode",decode:"decode"},b=function(t,e){return function(r){try{return i[e](r+"").replace(i.characters[t][e].expression,function(r){return i.characters[t][e].map[r]})}catch(t){return r}}};for(m in y)i[m+"PathSegment"]=b("pathname",y[m]),i[m+"UrnPathSegment"]=b("urnpath",y[m]);var w=function(t,e,r){return function(n){var o;o=r?function(t){return i[e](i[r](t))}:i[e];for(var u=(n+"").split(t),a=0,s=u.length;a-1&&(e.fragment=t.substring(r+1)||null,t=t.substring(0,r)),(r=t.indexOf("?"))>-1&&(e.query=t.substring(r+1)||null,t=t.substring(0,r)),"//"===t.substring(0,2)?(e.protocol=null,t=t.substring(2),t=i.parseAuthority(t,e)):(r=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,r)||null,e.protocol&&!e.protocol.match(i.protocol_expression)?e.protocol=void 0:"//"===t.substring(r+1,r+3)?(t=t.substring(r+3),t=i.parseAuthority(t,e)):(t=t.substring(r+1),e.urn=!0)),e.path=t,e},i.parseHost=function(t,e){var r,n,o=(t=t.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=t.length),"["===t.charAt(0))r=t.indexOf("]"),e.hostname=t.substring(1,r)||null,e.port=t.substring(r+2,o)||null,"/"===e.port&&(e.port=null);else{var u=t.indexOf(":"),a=t.indexOf("/"),s=t.indexOf(":",u+1);-1!==s&&(-1===a||s-1?n:t.length-1);return o>-1&&(-1===n||o-1?l.slice(0,d)+l.slice(d).replace(u,""):l.replace(u,"")).length<=c[0].length||r.ignore&&r.ignore.test(l))){var m=e(l,f,p=f+l.length,t);void 0!==m?(m=String(m),t=t.slice(0,f)+m+t.slice(p),n.lastIndex=f+m.length):n.lastIndex=p}}return n.lastIndex=0,t},i.ensureValidHostname=function(e,r){var n=!!e,o=!1;if(!!r&&(o=p(i.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(e&&e.match(i.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(e).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(t){if(t){var e=Number(t);if(!(/^[0-9]+$/.test(e)&&e>0&&e<65536))throw new TypeError('Port "'+t+'" is not a valid port')}},i.noConflict=function(t){if(t){var e={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(e.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(e.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=n.SecondLevelDomains.noConflict()),e}return n.URI===this&&(n.URI=o),this},u.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},u.clone=function(){return new i(this)},u.valueOf=u.toString=function(){return this.build(!1)._string},u.protocol=_("protocol"),u.username=_("username"),u.password=_("password"),u.hostname=_("hostname"),u.port=_("port"),u.query=x("query","?"),u.fragment=x("fragment","#"),u.search=function(t,e){var r=this.query(t,e);return"string"==typeof r&&r.length?"?"+r:r},u.hash=function(t,e){var r=this.fragment(t,e);return"string"==typeof r&&r.length?"#"+r:r},u.pathname=function(t,e){if(void 0===t||!0===t){var r=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=t?i.recodeUrnPath(t):"":this._parts.path=t?i.recodePath(t):"/",this.build(!e),this},u.path=u.pathname,u.href=function(t,e){var r;if(void 0===t)return this.toString();this._string="",this._parts=i._parts();var n=t instanceof i,o="object"==typeof t&&(t.hostname||t.path||t.pathname);t.nodeName&&(t=t[i.getDomAttribute(t)]||"",o=!1);if(!n&&o&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=i.parse(String(t),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var u=n?t._parts:t;for(r in u)a.call(this._parts,r)&&(this._parts[r]=u[r])}return this.build(!e),this},u.is=function(t){var e=!1,n=!1,o=!1,u=!1,a=!1,s=!1,c=!1,f=!this._parts.urn;switch(this._parts.hostname&&(f=!1,n=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),a=(u=!(e=n||o))&&r&&r.has(this._parts.hostname),s=u&&i.idn_expression.test(this._parts.hostname),c=u&&i.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return f;case"absolute":return!f;case"domain":case"name":return u;case"sld":return a;case"ip":return e;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return s;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var S=u.protocol,k=u.port,R=u.hostname;u.protocol=function(t,e){if(void 0!==t&&t&&!(t=t.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return S.call(this,t,e)},u.scheme=u.protocol,u.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(":"===(t+="").charAt(0)&&(t=t.substring(1)),i.ensureValidPort(t))),k.call(this,t,e))},u.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var r={};if("/"!==i.parseHost(t,r))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=r.hostname,i.ensureValidHostname(t,this._parts.protocol)}return R.call(this,t,e)},u.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(t);return this.protocol(n.protocol()).authority(n.authority()).build(!e),this},u.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},u.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},u.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=i.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==t[t.length-1]&&(t+="@"),i.parseUserinfo(t,this._parts),this.build(!e),this},u.resource=function(t,e){var r;return void 0===t?this.path()+this.search()+this.hash():(r=i.parse(t),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!e),this)},u.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),u=new RegExp("^"+s(o));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&i.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(u,t),this.build(!e),this},u.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(e).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var o=new RegExp(s(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,t)}return this.build(!e),this},u.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==e&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var i;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');i=new RegExp(s(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(s(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},u.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return t?i.decodePath(n):n}var o=this._parts.path.length-this.filename().length,u=this._parts.path.substring(0,o),a=new RegExp("^"+s(u));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=i.recodePath(t),this._parts.path=this._parts.path.replace(a,t),this.build(!e),this},u.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return t?i.decodePathSegment(n):n}var o=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(o=!0);var u=new RegExp(s(this.filename())+"$");return t=i.recodePath(t),this._parts.path=this._parts.path.replace(u,t),o?this.normalizePath(e):this.build(!e),this},u.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),u=o.lastIndexOf(".");return-1===u?"":(r=o.substring(u+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",t?i.decodePathSegment(n):n)}"."===t.charAt(0)&&(t=t.substring(1));var a,c=this.suffix();if(c)a=t?new RegExp(s(c)+"$"):new RegExp(s("."+c)+"$");else{if(!t)return this;this._parts.path+="."+i.recodePath(t)}return a&&(t=i.recodePath(t),this._parts.path=this._parts.path.replace(a,t)),this.build(!e),this},u.segment=function(t,e,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),u=o.split(n);if(void 0!==t&&"number"!=typeof t&&(r=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(i&&u.shift(),t<0&&(t=Math.max(u.length+t,0)),void 0===e)return void 0===t?u:u[t];if(null===t||void 0===u[t])if(f(e)){u=[];for(var a=0,s=e.length;a - truevault 1.3.0 | Documentation + truevault 1.3.1 | Documentation @@ -14,7 +14,7 @@

truevault

-
1.3.0
+
1.3.1