1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
|
"use strict";(self.webpackChunk_npwd_nui=self.webpackChunk_npwd_nui||[]).push([[2776,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 r=e(97538);function o(n){return"/"===n.charAt(0)}function i(n,t){for(var e=t,r=e+1,o=n.length;r<o;e+=1,r+=1)n[e]=n[r];n.pop()}var a=function(n,t){void 0===t&&(t="");var e,r=n&&n.split("/")||[],a=t&&t.split("/")||[],c=n&&o(n),u=t&&o(t),f=c||u;if(n&&o(n)?a=r:r.length&&(a.pop(),a=a.concat(r)),!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]&&o(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,r){return n(t,e[r])}));if("object"==typeof t||"object"==typeof e){var r=c(t),o=c(e);return r!==t||o!==e?n(r,o):Object.keys(Object.assign({},t,e)).every((function(r){return n(t[r],e[r])}))}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="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(e=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===e?"":e,hash:"#"===r?"":r}}function p(n){var t=n.pathname,e=n.search,r=n.hash,o=t||"/";return e&&"?"!==e&&(o+="?"===e.charAt(0)?e:"?"+e),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function w(n,t,e,o){var i;"string"==typeof n?(i=v(n)).state=t:(void 0===(i=(0,r.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),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.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 y(){var n=null,t=[];return{setPrompt:function(t){return n=t,function(){n===t&&(n=null)}},confirmTransitionTo:function(t,e,r,o){if(null!=n){var i="function"==typeof n?n(t,e):n;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(n){var e=!0;function r(){e&&n.apply(void 0,arguments)}return t.push(r),function(){e=!1,t=t.filter((function(n){return n!==r}))}},notifyListeners:function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];t.forEach((function(n){return n.apply(void 0,e)}))}}}var m=!("undefined"==typeof window||!window.document||!window.document.createElement);function O(n,t){t(window.confirm(n))}var P="popstate",b="hashchange";function x(){try{return window.history.state||{}}catch(n){return{}}}function k(n){void 0===n&&(n={}),m||(0,f.Z)(!1);var t,e=window.history,o=(-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.getUserConfirmatio
|