PageSourceSearch

https://heidiland.com/layout/opening-hours-state.72ebd4ed.js

js heidiland.com collected 2026-10-02 07:29:30 UTC 6,408 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7583],{21633:(e,t)=>{function n(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||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 r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=o(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],s=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,a=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,t)||o(e,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 o(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.getState=f;var l={"https://schema.org/Sunday":0,"https://schema.org/Monday":1,"https://schema.org/Tuesday":2,"https://schema.org/Wednesday":3,"https://schema.org/Thursday":4,"https://schema.org/Friday":5,"https://schema.org/Saturday":6};function s(e,t,n,r){var o=a(e.split("T")[0].split("-").map(Number),3),i=o[0],l=o[1],s=o[2];return new Date(Date.UTC(i,l-1,s,t,n,r))}function u(e,t,n){var r=new Date(e),o=r.getUTCDay(),i=l[t],s=a(n.split(":").map((function(e){return parseInt(e,10)})),2),u=s[0],c=s[1];return r.setUTCHours(u,c,0),(o!==i||e>=r)&&r.setUTCDate(r.getUTCDate()+((i+7-o)%7||7)),r}function c(e,t){var n=a(t.split(":").map((function(e){return parseInt(e,10)})),2),r=n[0],o=n[1],i=new Date(e);return i.setUTCDate(e.getUTCDate()+1),i.setUTCHours(r,o,0,0),i}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t?new Date(t):new Date,a=n.toISOString().split("T")[0],o=n.getUTCDay(),i=new Date(n);i.setUTCDate(i.getUTCDate()-1);var f,d=i.toISOString().split("T")[0],p=i.getUTCDay(),v=!1,h=function(){var e,t=void 0,i=r(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);try{for(i.s();!(e=i.n()).done;){var s=e.value,u=Boolean(s.dayOfWeek),h=!u||l[s.dayOfWeek]===o,y=u&&l[s.dayOfWeek]===p;if((h||y)&&(h&&(t=!1),s.opens&&s.closes)){var g=h?a:d,m=new Date("".concat(g,"T").concat(s.opens.replace("Z",""),":00Z")),T=new Date("".concat(g,"T").concat(s.closes.replace("Z",""),":00Z"));if(m.getTime()-T.getTime()==6e4)return f=T,v=!0,!0;if(T<m&&(T=c(m,s.closes)),m<=n&&T>n)return f=T,!0}}}catch(e){i.e(e)}finally{i.f()}return t},y=function(){var e,t=[],n={},a=r(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);try{for(a.s();!(e=a.n()).done;){var o=e.value;o.opens||o.closes?(o.opens&&(n.opens=o.opens),o.closes&&(n.closes=o.closes),n.opens&&n.closes&&(t.push(Object.assign(Object.assign({},o),n)),n={})):t.push(o)}}catch(e){a.e(e)}finally{a.f()}return t}(e),g=y.filter((function(e){if(!e.validFrom||!e.validThrough)return!1;var t=s(e.validFrom,0,0,0),r=s(e.validThrough,23,59,59);return t<=n&&r>=n})),m=h(g);void 0===m&&(m=h(y.filter((function(e){return!e.validFrom||!e.validThrough}))));var T=void 0,b=new Date(n);if(m)T=f;else{var S,w=[],C=r(e);try{for(C.s();!(S=C.n()).done;){var D=S.value;if(!D.opens&&!D.dayOfWeek&&D.validFrom&&D.validThrough){var O=s(D.validFrom,0,0,0),U=s(D.val
1idThrough,23,59,59);b>=O&&b<=U&&(b=U).setSeconds(b.getSeconds()+1)}}}catch(e){C.e(e)}finally{C.f()}var I,k=r(e);try{for(k.s();!(I=k.n()).done;){var A=I.value;if(A.opens)if(A.validFrom&&A.validThrough){var j=s(A.validFrom,0,0,0),F=s(A.validThrough,23,59,59),W=u(j>b?j:b,A.dayOfWeek,A.opens);W<=F&&w.push(W)}else A.dayOfWeek&&w.push(u(b,A.dayOfWeek,A.opens))}}catch(e){k.e(e)}finally{k.f()}w.length>0&&(w.sort((function(e,t){return e-t})),T=w[0])}return{isOpen:Boolean(m),isOpen24:Boolean(v),nextChange:T}}t.default=function(e){var t,a,o,i=r(e);try{var l=function(){var e=o.value,r=JSON.parse(e.dataset.openingHoursState);if(!(null===(t=r.items)||void 0===t?void 0:t.regular)||!(null===(a=r.items)||void 0===a?void 0:a.special))return 1;var i,l=f([].concat(n(r.items.special),n(r.items.regular))),s=l.isOpen,u=l.isOpen24,c=l.nextChange,d=s?r.labels.open:r.labels.closed;if(r.mini){var p=document.createElement("span");p.className="visually-hidden",p.innerText=d,e.appendChild(p)}else e.innerText=d;e.classList.add("state--".concat(s?"open":"closed")),u?i=r.labels.open24Tooltip:c&&(c.setUTCHours(c.getUTCHours()+r.offset),i=function(e,t,n){var r=new Date,a=r.getUTCDay()||7,o=n.getUTCDay()||7,i=t[o===a?"today":"day_".concat(o)];Math.abs(n.getTime()-r.getTime())>6048e5&&(i="".concat(String(n.getDate()).padStart(2,"0"),".").concat(String(n.getMonth()+1).padStart(2,"0"),".").concat(n.getFullYear()));var l,s,u,c={day:i,time:(l=n,s=String(l.getUTCHours()).padStart(2,"0"),u=String(l.getUTCMinutes()).padStart(2,"0"),"".concat(s,":").concat(u))};return e.replace(/\{(\w+)}/g,(function(e,t){return c[t]||e}))}(s?r.labels.openTooltip:r.labels.closedTooltip,r.labels.days,c)),i&&window.openFrontend.Tooltip.then((function(t){return t.getOrCreateInstance(e,{title:i})}))};for(i.s();!(o=i.n()).done;)l()}catch(e){i.e(e)}finally{i.f()}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.