1 |
- !function(){function r(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function t(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null==e)return;var n,o,a=[],i=!0,c=!1;try{for(e=e.call(r);!(i=(n=e.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(u){c=!0,o=u}finally{try{i||null==e.return||e.return()}finally{if(c)throw o}}return a}(r,t)||n(r,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(r){return function(r){if(Array.isArray(r))return o(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||n(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(r,t){if(r){if("string"==typeof r)return o(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(r,t):void 0}}function o(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function a(r){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},a(r)}System.register([],(function(o){"use strict";return{execute:function(){var i=o("q",{}),c=function(r){return encodeURIComponent(r).replace(/[!'()*]/g,(function(r){return"%".concat(r.charCodeAt(0).toString(16).toUpperCase())}))},u="%[a-f0-9]{2}",l=new RegExp(u,"gi"),s=new RegExp("("+u+")+","gi");function f(r,t){try{return decodeURIComponent(r.join(""))}catch(o){}if(1===r.length)return r;t=t||1;var e=r.slice(0,t),n=r.slice(t);return Array.prototype.concat.call([],f(e),f(n))}function y(r){try{return decodeURIComponent(r)}catch(n){for(var t=r.match(l),e=1;e<t.length;e++)t=(r=f(t,e).join("")).match(l);return r}}var p=function(r){if("string"!=typeof r)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+a(r)+"`");try{return r=r.replace(/\+/g," "),decodeURIComponent(r)}catch(t){return function(r){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=s.exec(r);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch(t){var o=y(n[0]);o!==n[0]&&(e[n[0]]=o)}n=s.exec(r)}e["%C2"]="�";for(var a=Object.keys(e),i=0;i<a.length;i++){var c=a[i];r=r.replace(new RegExp(c,"g"),e[c])}return r}(r)}},m=function(r,t){if("string"!=typeof r||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[r];var e=r.indexOf(t);return-1===e?[r]:[r.slice(0,e),r.slice(e+t.length)]},d=function(r,t){for(var e={},n=Object.keys(r),o=Array.isArray(t),a=0;a<n.length;a++){var i=n[a],c=r[i];(o?-1!==t.indexOf(i):t(i,c,r))&&(e[i]=c)}return e};!function(o){var i=c,u=p,l=m,s=d,f=Symbol("encodeFragmentIdentifier");function y(r){if("string"!=typeof r||1!==r.length)throw new TypeError("arrayFormatSeparator must be single character string")}function b(r,t){return t.encode?t.strict?i(r):encodeURIComponent(r):r}function g(r,t){return t.decode?u(r):r}function v(r){return Array.isArray(r)?r.sort():"object"===a(r)?v(Object.keys(r)).sort((function(r,t){return Number(r)-Number(t)})).map((function(t){return r[t]})):r}function h(r){var t=r.indexOf("#");return-1!==t&&(r=r.slice(0,t)),r}function j(r){var t=(r=h(r)).indexOf("?");return-1===t?"":r.slice(t+1)}function S(r,t){return t.parseNumbers&&!Number.isNaN(Number(r))&&"string"==typeof r&&""!==r.trim()?r=Number(r):!t.parseBooleans||null===r||"true"!==r.toLowerCase()&&"false"!==r.toLowerCase()||(r="true"===r.toLowerCase()),r}function k(r,e){y((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);var o=function(r){var t;switch(r.arrayFormat){case"index":return function(r,e,n){t=/\[(\d*)\]$/.exec(r),r=r.replace(/\[\d*\]$/,""),t?(void 0===n[r]&&(n[r]={}),n[r][t[1]]=e):n[r]=e};case"bracket":return function(r,e,n){t=/(\[\])$/.exec(r),r=r.replace(/\[\]$/,""),t?void 0!==n[r]?n[r]=[].concat(n[r],e):n[r]=[e]:n[r]=e};case"colon-list-separator":return function(r,e,n){t=/(:list)$/.exec(r),r=r.replace(/:list$/,""),t?void 0!==n[r]?n[r]=[].concat(n[r],e):n[r]=[e]:n[r]=e};case"comma":case"separator":return function(t,e,n){var o="string"==typeof e&&e.includes(r.arrayFormatSeparator),a="string"==typeof e&&!o&&g(e,r).includes(r.arrayFormatSeparator);e=a?g(e,r):e;var i=o||a?e.split(r.arrayFormatSeparator).map((function(t){return g(t,r)})):null===e?e:g(e,r);n[t]=i};case"bracket-separator":return function(t,e,n){var o=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),o){var a=null===e?[]:e.split(r.arrayFormatSeparator).map((function(t){return g(t,r)}));void 0!==n[t]?n[t]=[].concat(n[t],a):n[t]=a}else n[t]=e?g(e,r):e};default:return function(r,t,e){void 0!==e[r]?e[r]=[].concat(e[r],t):e[r]=t}}}(e),i=Object.create(null);if("string"!=typeof r)return i;if(!(r=r.trim().replace(/^[?#&]/,"")))return i;var c,u=function(r,t){var e="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=n(r))||t&&r&&"number"==typeof r.length){e&&(r=e);var o=0,a=function(){};return{s:a,n:function(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}},e:function(r){throw r},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){e=e.call(r)},n:function(){var r=e.next();return c=r.done,r},e:function(r){u=!0,i=r},f:function(){try{c||null==e.return||e.return()}finally{if(u)throw i}}}}(r.split("&"));try{for(u.s();!(c=u.n()).done;){var s=c.value;if(""!==s){var f=t(l(e.decode?s.replace(/\+/g," "):s,"="),2),p=f[0],m=f[1];m=void 0===m?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?m:g(m,e),o(g(p,e),m,i)}}}catch(w){u.e(w)}finally{u.f()}for(var d=0,b=Object.keys(i);d<b.length;d++){var h=b[d],j=i[h];if("object"===a(j)&&null!==j)for(var k=0,F=Object.keys(j);k<F.length;k++){var O=F[k];j[O]=S(j[O],e)}else i[h]=S(j,e)}return!1===e.sort?i:(!0===e.sort?Object.keys(i).sort():Object.keys(i).sort(e.sort)).reduce((function(r,t){var e=i[t];return Boolean(e)&&"object"===a(e)&&!Array.isArray(e)?r[t]=v(e):r[t]=e,r}),Object.create(null))}o.extract=j,o.parse=k,o.stringify=function(r,t){if(!r)return"";y((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);for(var n=function(e){return t.skipNull&&null==r[e]||t.skipEmptyString&&""===r[e]},o=function(r){switch(r.arrayFormat){case"index":return function(t){return function(n,o){var a=n.length;return void 0===o||r.skipNull&&null===o||r.skipEmptyString&&""===o?n:[].concat(e(n),null===o?[[b(t,r),"[",a,"]"].join("")]:[[b(t,r),"[",b(a,r),"]=",b(o,r)].join("")])}};case"bracket":return function(t){return function(n,o){return void 0===o||r.skipNull&&null===o||r.skipEmptyString&&""===o?n:[].concat(e(n),null===o?[[b(t,r),"[]"].join("")]:[[b(t,r),"[]=",b(o,r)].join("")])}};case"colon-list-separator":return function(t){return function(n,o){return void 0===o||r.skipNull&&null===o||r.skipEmptyString&&""===o?n:[].concat(e(n),null===o?[[b(t,r),":list="].join("")]:[[b(t,r),":list=",b(o,r)].join("")])}};case"comma":case"separator":case"bracket-separator":var t="bracket-separator"===r.arrayFormat?"[]=":"=";return function(e){return function(n,o){return void 0===o||r.skipNull&&null===o||r.skipEmptyString&&""===o?n:(o=null===o?"":o,0===n.length?[[b(e,r),t,b(o,r)].join("")]:[[n,b(o,r)].join(r.arrayFormatSeparator)])}};default:return function(t){return function(n,o){return void 0===o||r.skipNull&&null===o||r.skipEmptyString&&""===o?n:[].concat(e(n),null===o?[b(t,r)]:[[b(t,r),"=",b(o,r)].join("")])}}}}(t),a={},i=0,c=Object.keys(r);i<c.length;i++){var u=c[i];n(u)||(a[u]=r[u])}var l=Object.keys(a);return!1!==t.sort&&l.sort(t.sort),l.map((function(e){var n=r[e];return void 0===n?"":null===n?b(e,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?b(e,t)+"[]":n.reduce(o(e),[]).join("&"):b(e,t)+"="+b(n,t)})).filter((function(r){return r.length>0})).join("&")},o.parseUrl=function(r,e){e=Object.assign({decode:!0},e);var n=t(l(r,"#"),2),o=n[0],a=n[1];return Object.assign({url:o.split("?")[0]||"",query:k(j(r),e)},e&&e.parseFragmentIdentifier&&a?{fragmentIdentifier:g(a,e)}:{})},o.stringifyUrl=function(t,e){e=Object.assign(r({encode:!0,strict:!0},f,!0),e);var n=h(t.url).split("?")[0]||"",a=o.extract(t.url),i=o.parse(a,{sort:!1}),c=Object.assign(i,t.query),u=o.stringify(c,e);u&&(u="?".concat(u));var l=function(r){var t="",e=r.indexOf("#");return-1!==e&&(t=r.slice(e)),t}(t.url);return t.fragmentIdentifier&&(l="#".concat(e[f]?b(t.fragmentIdentifier,e):t.fragmentIdentifier)),"".concat(n).concat(u).concat(l)},o.pick=function(t,e,n){n=Object.assign(r({parseFragmentIdentifier:!0},f,!1),n);var a=o.parseUrl(t,n),i=a.url,c=a.query,u=a.fragmentIdentifier;return o.stringifyUrl({url:i,query:s(c,e),fragmentIdentifier:u},n)},o.exclude=function(r,t,e){var n=Array.isArray(t)?function(r){return!t.includes(r)}:function(r,e){return!t(r,e)};return o.pick(r,n,e)}}(i)}}}))}();
|