1 line
9.7 KiB
JavaScript
1 line
9.7 KiB
JavaScript
|
"use strict";(self.webpackChunk_npwd_nui=self.webpackChunk_npwd_nui||[]).push([[7860],{47860:function(n,t,e){e.r(t),e.d(t,{createBrowserHistory:function(){return k},createHashHistory:function(){return S},createLocation:function(){return w},createMemoryHistory:function(){return U},createPath:function(){return p},locationsAreEqual:function(){return g},parsePath:function(){return v}});var o=e(97538);function r(n){return"/"===n.charAt(0)}function i(n,t){for(var e=t,o=e+1,r=n.length;o<r;e+=1,o+=1)n[e]=n[o];n.pop()}var a=function(n,t){void 0===t&&(t="");var e,o=n&&n.split("/")||[],a=t&&t.split("/")||[],c=n&&r(n),u=t&&r(t),f=c||u;if(n&&r(n)?a=o:o.length&&(a.pop(),a=a.concat(o)),!a.length)return"/";if(a.length){var s=a[a.length-1];e="."===s||".."===s||""===s}else e=!1;for(var h=0,l=a.length;l>=0;l--){var d=a[l];"."===d?i(a,l):".."===d?(i(a,l),h++):h&&(i(a,l),h--)}if(!f)for(;h--;h)a.unshift("..");!f||""===a[0]||a[0]&&r(a[0])||a.unshift("");var v=a.join("/");return e&&"/"!==v.substr(-1)&&(v+="/"),v};function c(n){return n.valueOf?n.valueOf():Object.prototype.valueOf.call(n)}var u=function n(t,e){if(t===e)return!0;if(null==t||null==e)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every((function(t,o){return n(t,e[o])}));if("object"==typeof t||"object"==typeof e){var o=c(t),r=c(e);return o!==t||r!==e?n(o,r):Object.keys(Object.assign({},t,e)).every((function(o){return n(t[o],e[o])}))}return!1},f=e(65669);function s(n){return"/"===n.charAt(0)?n:"/"+n}function h(n){return"/"===n.charAt(0)?n.substr(1):n}function l(n,t){return function(n,t){return 0===n.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(n.charAt(t.length))}(n,t)?n.substr(t.length):n}function d(n){return"/"===n.charAt(n.length-1)?n.slice(0,-1):n}function v(n){var t=n||"/",e="",o="",r=t.indexOf("#");-1!==r&&(o=t.substr(r),t=t.substr(0,r));var i=t.indexOf("?");return-1!==i&&(e=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===e?"":e,hash:"#"===o?"":o}}function p(n){var t=n.pathname,e=n.search,o=n.hash,r=t||"/";return e&&"?"!==e&&(r+="?"===e.charAt(0)?e:"?"+e),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r}function w(n,t,e,r){var i;"string"==typeof n?(i=v(n)).state=t:(void 0===(i=(0,o.Z)({},n)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(n){throw n instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):n}return e&&(i.key=e),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i}function g(n,t){return n.pathname===t.pathname&&n.search===t.search&&n.hash===t.hash&&n.key===t.key&&u(n.state,t.state)}function m(){var n=null,t=[];return{setPrompt:function(t){return n=t,function(){n===t&&(n=null)}},confirmTransitionTo:function(t,e,o,r){if(null!=n){var i="function"==typeof n?n(t,e):n;"string"==typeof i?"function"==typeof o?o(i,r):r(!0):r(!1!==i)}else r(!0)},appendListener:function(n){var e=!0;function o(){e&&n.apply(void 0,arguments)}return t.push(o),function(){e=!1,t=t.filter((function(n){return n!==o}))}},notifyListeners:function(){for(var n=arguments.length,e=new Array(n),o=0;o<n;o++)e[o]=arguments[o];t.forEach((function(n){return n.apply(void 0,e)}))}}}var y=!("undefined"==typeof window||!window.document||!window.document.createElement);function P(n,t){t(window.confirm(n))}var O="popstate",x="hashchange";function b(){try{return window.history.state||{}}catch(n){return{}}}function k(n){void 0===n&&(n={}),y||(0,f.Z)(!1);var t,e=window.history,r=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=n,c=a.forceRefresh,u=void 0!==c&&c,h=a.getUserConfirmation,v=v
|