@knighttower/utility
Advanced tools
Comparing version 4.3.14 to 4.3.15
@@ -26,3 +26,9 @@ define(['exports'], (function (exports) { 'use strict'; | ||
*/ | ||
const doc = document; | ||
const doc = (() => { | ||
try { | ||
return document; | ||
} catch (e) { | ||
return undefined['document']; | ||
} | ||
})(); | ||
@@ -29,0 +35,0 @@ /** |
@@ -1,1 +0,1 @@ | ||
(()=>{"use strict";var t={d:(n,r)=>{for(var e in r)t.o(r,e)&&!t.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:r[e]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n)},n={};function r(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===n){if(Object(r)!==r)return;l=!1}else for(;!(l=(e=a.call(r)).done)&&(c.push(e.value),c.length!==n);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,n)||e(t,n)||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(t,n){if(t){if("string"==typeof t)return o(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,n):void 0}}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}t.d(n,{default:()=>b});var a,i,c,l,u,f,s,y,h,d,p,v,m,b=(a=function(){try{return window}catch(t){return}}(),i=document,c=a.$HOST||!1,l=a.$TEMPLATE||!1,u=a.location.protocol.replace(":",""),f=c||a.location.host,s=l||"",y=location.pathname,h=c||"".concat(u,"://").concat(f),d=c?"".concat(c).concat(y):"".concat(u,"://").concat(f).concat(y),p=null,v=function(){if(p)return p;var t,n=new URLSearchParams(a.location.search),o={},i=function(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=e(t))){r&&(t=r);var o=0,a=function(){};return{s:a,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},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,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){l=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(l)throw i}}}}(n.entries());try{for(i.s();!(t=i.n()).done;){var c=r(t.value,2),l=c[0],u=c[1];o[l]=u}}catch(t){i.e(t)}finally{i.f()}return p={params:n,queryString:n.toString(),search:a.location.search,keys:Array.from(n.keys()),values:Array.from(n.values()),collection:o}},(m={getPage:function(){return i.location.toString().toLowerCase().split("/").pop().split(".")[0]||"index"},getParams:function(){return v()},getQuery:function(){return v().queryString},addToQuery:function(t){var n=v().collection;return Object.assign(n,t),{collection:n,queryString:Object.entries(n).map((function(t){var n=r(t,2),e=n[0],o=n[1];return"".concat(e,"=").concat(o)})).join("&")}},getHash:function(){return a.location.hash.substring(1)},setHash:function(t){i.location.hash=t},deleteHash:function(){history.pushState("",i.title,a.location.pathname)},goTo:function(t){return a.location.href=t,!1},open:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return a.open(t,n,r)},onChange:function(t){"function"==typeof t&&a.addEventListener("hashchange",t)}}).fullUrl=d,m.siteUrl=h,m.template=s,m.protocol=u,m.host=f,m.path=y,m.readUrl=i.URL,m);window.UrlHelper=n.default})(); | ||
(()=>{"use strict";var t={d:(n,r)=>{for(var e in r)t.o(r,e)&&!t.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:r[e]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n)},n={};t.d(n,{default:()=>g});var r=void 0;function e(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===n){if(Object(r)!==r)return;u=!1}else for(;!(u=(e=a.call(r)).done)&&(c.push(e.value),c.length!==n);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,n)||o(t,n)||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 o(t,n){if(t){if("string"==typeof t)return a(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,n):void 0}}function a(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var i,c,u,l,f,s,y,h,d,p,v,m,b,g=(i=function(){try{return window}catch(t){return r}}(),c=function(){try{return document}catch(t){return r.document}}(),u=i.$HOST||!1,l=i.$TEMPLATE||!1,f=i.location.protocol.replace(":",""),s=u||i.location.host,y=l||"",h=location.pathname,d=u||"".concat(f,"://").concat(s),p=u?"".concat(u).concat(h):"".concat(f,"://").concat(s).concat(h),v=null,m=function(){if(v)return v;var t,n=new URLSearchParams(i.location.search),r={},a=function(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=o(t))){r&&(t=r);var e=0,a=function(){};return{s:a,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},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(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}(n.entries());try{for(a.s();!(t=a.n()).done;){var c=e(t.value,2),u=c[0],l=c[1];r[u]=l}}catch(t){a.e(t)}finally{a.f()}return v={params:n,queryString:n.toString(),search:i.location.search,keys:Array.from(n.keys()),values:Array.from(n.values()),collection:r}},(b={getPage:function(){return c.location.toString().toLowerCase().split("/").pop().split(".")[0]||"index"},getParams:function(){return m()},getQuery:function(){return m().queryString},addToQuery:function(t){var n=m().collection;return Object.assign(n,t),{collection:n,queryString:Object.entries(n).map((function(t){var n=e(t,2),r=n[0],o=n[1];return"".concat(r,"=").concat(o)})).join("&")}},getHash:function(){return i.location.hash.substring(1)},setHash:function(t){c.location.hash=t},deleteHash:function(){history.pushState("",c.title,i.location.pathname)},goTo:function(t){return i.location.href=t,!1},open:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return i.open(t,n,r)},onChange:function(t){"function"==typeof t&&i.addEventListener("hashchange",t)}}).fullUrl=p,b.siteUrl=d,b.template=y,b.protocol=f,b.host=s,b.path=h,b.readUrl=c.URL,b);window.UrlHelper=n.default})(); |
@@ -24,3 +24,9 @@ /** | ||
*/ | ||
const doc = document; | ||
const doc = (() => { | ||
try { | ||
return document; | ||
} catch (e) { | ||
return undefined['document']; | ||
} | ||
})(); | ||
@@ -27,0 +33,0 @@ /** |
@@ -27,3 +27,9 @@ var UrlHelper = (function (exports) { | ||
*/ | ||
const doc = document; | ||
const doc = (() => { | ||
try { | ||
return document; | ||
} catch (e) { | ||
return undefined['document']; | ||
} | ||
})(); | ||
@@ -30,0 +36,0 @@ /** |
@@ -29,3 +29,9 @@ System.register('UrlHelper', [], (function (exports) { | ||
*/ | ||
const doc = document; | ||
const doc = (() => { | ||
try { | ||
return document; | ||
} catch (e) { | ||
return undefined['document']; | ||
} | ||
})(); | ||
@@ -32,0 +38,0 @@ /** |
@@ -1,1 +0,1 @@ | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("UrlHelper",[],n):"object"==typeof exports?exports.UrlHelper=n():t.UrlHelper=n()}(this,(()=>(()=>{"use strict";var t={d:(n,e)=>{for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n)},n={};function e(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;l=!1}else for(;!(l=(r=a.call(e)).done)&&(c.push(r.value),c.length!==n);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=e.return&&(i=e.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,n)||r(t,n)||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 r(t,n){if(t){if("string"==typeof t)return o(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(t,n):void 0}}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}t.d(n,{default:()=>b});var a,i,c,l,u,f,s,y,h,p,d,m,v,b=(a=function(){try{return window}catch(t){return}}(),i=document,c=a.$HOST||!1,l=a.$TEMPLATE||!1,u=a.location.protocol.replace(":",""),f=c||a.location.host,s=l||"",y=location.pathname,h=c||"".concat(u,"://").concat(f),p=c?"".concat(c).concat(y):"".concat(u,"://").concat(f).concat(y),d=null,m=function(){if(d)return d;var t,n=new URLSearchParams(a.location.search),o={},i=function(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=r(t))){e&&(t=e);var o=0,a=function(){};return{s:a,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},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,l=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return c=t.done,t},e:function(t){l=!0,i=t},f:function(){try{c||null==e.return||e.return()}finally{if(l)throw i}}}}(n.entries());try{for(i.s();!(t=i.n()).done;){var c=e(t.value,2),l=c[0],u=c[1];o[l]=u}}catch(t){i.e(t)}finally{i.f()}return d={params:n,queryString:n.toString(),search:a.location.search,keys:Array.from(n.keys()),values:Array.from(n.values()),collection:o}},(v={getPage:function(){return i.location.toString().toLowerCase().split("/").pop().split(".")[0]||"index"},getParams:function(){return m()},getQuery:function(){return m().queryString},addToQuery:function(t){var n=m().collection;return Object.assign(n,t),{collection:n,queryString:Object.entries(n).map((function(t){var n=e(t,2),r=n[0],o=n[1];return"".concat(r,"=").concat(o)})).join("&")}},getHash:function(){return a.location.hash.substring(1)},setHash:function(t){i.location.hash=t},deleteHash:function(){history.pushState("",i.title,a.location.pathname)},goTo:function(t){return a.location.href=t,!1},open:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return a.open(t,n,e)},onChange:function(t){"function"==typeof t&&a.addEventListener("hashchange",t)}}).fullUrl=p,v.siteUrl=h,v.template=s,v.protocol=u,v.host=f,v.path=y,v.readUrl=i.URL,v);return n.default})())); | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("UrlHelper",[],n):"object"==typeof exports?exports.UrlHelper=n():t.UrlHelper=n()}(this,(()=>(()=>{"use strict";var t={d:(n,r)=>{for(var e in r)t.o(r,e)&&!t.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:r[e]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n)},n={};t.d(n,{default:()=>g});var r=void 0;function e(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===n){if(Object(r)!==r)return;u=!1}else for(;!(u=(e=a.call(r)).done)&&(c.push(e.value),c.length!==n);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,n)||o(t,n)||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 o(t,n){if(t){if("string"==typeof t)return a(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,n):void 0}}function a(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var i,c,u,l,f,s,y,h,p,d,m,v,b,g=(i=function(){try{return window}catch(t){return r}}(),c=function(){try{return document}catch(t){return r.document}}(),u=i.$HOST||!1,l=i.$TEMPLATE||!1,f=i.location.protocol.replace(":",""),s=u||i.location.host,y=l||"",h=location.pathname,p=u||"".concat(f,"://").concat(s),d=u?"".concat(u).concat(h):"".concat(f,"://").concat(s).concat(h),m=null,v=function(){if(m)return m;var t,n=new URLSearchParams(i.location.search),r={},a=function(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=o(t))){r&&(t=r);var e=0,a=function(){};return{s:a,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},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(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}(n.entries());try{for(a.s();!(t=a.n()).done;){var c=e(t.value,2),u=c[0],l=c[1];r[u]=l}}catch(t){a.e(t)}finally{a.f()}return m={params:n,queryString:n.toString(),search:i.location.search,keys:Array.from(n.keys()),values:Array.from(n.values()),collection:r}},(b={getPage:function(){return c.location.toString().toLowerCase().split("/").pop().split(".")[0]||"index"},getParams:function(){return v()},getQuery:function(){return v().queryString},addToQuery:function(t){var n=v().collection;return Object.assign(n,t),{collection:n,queryString:Object.entries(n).map((function(t){var n=e(t,2),r=n[0],o=n[1];return"".concat(r,"=").concat(o)})).join("&")}},getHash:function(){return i.location.hash.substring(1)},setHash:function(t){c.location.hash=t},deleteHash:function(){history.pushState("",c.title,i.location.pathname)},goTo:function(t){return i.location.href=t,!1},open:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return i.open(t,n,r)},onChange:function(t){"function"==typeof t&&i.addEventListener("hashchange",t)}}).fullUrl=d,b.siteUrl=p,b.template=y,b.protocol=f,b.host=s,b.path=h,b.readUrl=c.URL,b);return n.default})())); |
{ | ||
"name": "@knighttower/utility", | ||
"version": "4.3.14", | ||
"version": "4.3.15", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "main": "index.cjs", |
Sorry, the diff of this file is not supported yet
677868
14454