PageSourceSearch

https://hobbii.fi/cdn/shop/t/34/assets/hobbii-dom-SvEnDmWr.min.js

js hobbii.fi collected 2026-09-26 08:53:17 UTC 5,863 bytes, 2 lines download raw bytes

1import{g as t}from"./hobbii-constants-DXYrb0R4.min.js";import{g as n}from"./hobbii-intl-tel-input-BoEFiupD.min.js";var e,o={exports:{}};const s=n(e?o.exports:(e=1,o.exports=function(){function t(){return"undefined"!=typeof window}function n(){var t=!1;try{var n={get passive(){t=!0}};window.addEventListener("test",n,n),window.removeEventListener("test",n,n)}catch(e){t=!1}return t}function e(){return!!(t()&&function(){}.bind&&"classList"in document.documentElement&&Object.assign&&Object.keys&&requestAnimationFrame)}function o(t){return 9===t.nodeType}function s(t){return t&&t.document&&o(t.document)}function i(t){var n=t.document,e=n.body,o=n.documentElement;return{scrollHeight:function(){return Math.max(e.scrollHeight,o.scrollHeight,e.offsetHeight,o.offsetHeight,e.clientHeight,o.clientHeight)},height:function(){return t.innerHeight||o.clientHeight||e.clientHeight},scrollY:function(){return void 0!==t.pageYOffset?t.pageYOffset:(o||e.parentNode||e).scrollTop}}}function r(t){return{scrollHeight:function(){return Math.max(t.scrollHeight,t.offsetHeight,t.clientHeight)},height:function(){return Math.max(t.offsetHeight,t.clientHeight)},scrollY:function(){return t.scrollTop}}}function l(t){return s(t)?i(t):r(t)}function a(t,e,o){var s,i=n(),r=!1,a=l(t),c=a.scrollY(),h={};function d(){var t=Math.round(a.scrollY()),n=a.height(),s=a.scrollHeight();h.scrollY=t,h.lastScrollY=c,h.direction=t>c?"down":"up",h.distance=Math.abs(t-c),h.isOutOfBounds=t<0||t+n>s,h.top=t<=e.offset[h.direction],h.bottom=t+n>
1=s,h.toleranceExceeded=h.distance>e.tolerance[h.direction],o(h),c=t,r=!1}function u(){r||(r=!0,s=requestAnimationFrame(d))}var m=!!i&&{passive:!0,capture:!1};return t.addEventListener("scroll",u,m),d(),{destroy:function(){cancelAnimationFrame(s),t.removeEventListener("scroll",u,m)}}}function c(t){return t===Object(t)?t:{down:t,up:t}}function h(t,n){n=n||{},Object.assign(this,h.options,n),this.classes=Object.assign({},h.options.classes,n.classes),this.elem=t,this.tolerance=c(this.tolerance),this.offset=c(this.offset),this.initialised=!1,this.frozen=!1}return h.prototype={constructor:h,init:function(){return h.cutsTheMustard&&!this.initialised&&(this.addClass("initial"),this.initialised=!0,setTimeout((function(t){t.scrollTracker=a(t.scroller,{offset:t.offset,tolerance:t.tolerance},t.update.bind(t))}),100,this)),this},destroy:function(){this.initialised=!1,Object.keys(this.classes).forEach(this.removeClass,this),this.scrollTracker.destroy()},unpin:function(){!this.hasClass("pinned")&&this.hasClass("unpinned")||(this.addClass("unpinned"),this.removeClass("pinned"),this.onUnpin&&this.onUnpin.call(this))},pin:function(){this.hasClass("unpinned")&&(this.addClass("pinned"),this.removeClass("unpinned"),this.onPin&&this.onPin.call(this))},freeze:function(){this.frozen=!0,this.addClass("frozen")},unfreeze:function(){this.frozen=!1,this.removeClass("frozen")},top:function(){this.hasClass("top")||(this.addClass("top"),this.removeClass("notTop"),this.onTop&&this.onTop.call(this))},notTop:function(){this.hasClass("notTop")||(this.addClass("notTop"),this.removeClass("top"),this.onNotTop&&this.onNotTop.call(this))},bottom:function(){this.hasClass("bottom")||(this.addClass("bottom"),this.removeClass("notBottom"),this.onBottom&&this.onBottom.call(this))},notBottom:function(){this.hasClass("notBottom")||(this.addClass("notBottom"),this.removeClass("bottom"),this.onNotBottom&&this.onNotBottom.call(this))},shouldUnpin:function(t){return"down"===t.direction&&!t.top&&t.toleranceExceeded},shouldPin:function(t){return"up"===t.direction&&t.toleranceExceeded||t.top},addClass:function(t){this.elem.classList.add.apply(this.elem.classList,this.classes[t].split(" "))},removeClass:function(t){this.elem.classList.remove.apply(this.elem.classList,this.classes[t].split(" "))},hasClass:function(t){return this.classes[t].split(" ").every((function(t){return this.classList.contains(t)}),this.elem)},update:function(t){t.isOutOfBounds||!0!==this.frozen&&(t.top?this.top():this.notTop(),t.bottom?this.bottom():this.notBottom(),this.shouldUnpin(t)?this.unpin():this.shouldPin(t)&&this.pin())}},h.options={tolerance:{up:0,down:0},offset:0,scroller:t()?window:null,classes:{frozen:"headroom--frozen",pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},h.cutsTheMustard=e(),h}()));let i=null;const r=()=>{const n=document.querySelector(".js-sticky-header"),e={offset:200,tolerance:{up:10,down:0},classes:{initial:"max-lg:transition-transform max-lg:duration-300 max-lg:ease-out",unpinned:"max-lg:-translate-y-full",pinned:"max-lg:translate-y-0",top:"max-lg:translate-y-0",bottom:"max-lg:!translate-y-0"}};const o=({matches:t})=>{var o;if(n)return t?void((o=i)&&"object"==typeof o&&"scrollTracker"in o&&null!=o.scrollTracker&&(i.destroy(),i=null)):(i=new s(n,e),void i.init())},r=window.matchMedia(`(min-width: ${t.lg}px)`);o({matches:r.matches}),"function"==typeof r.addEventListener?r.addEventListener("change",o):"function"==typeof r.addListener?r.addListener(o):console.error("MediaQueryList does not support event listeners.")},l=t=>{const n=t.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth)};let a=null;const c=(t,n=0)=>{null==i||i.unpin(),null==i||i.freeze();const e=t.getBoundingClientRect().top+window.scrollY-n;scrollTo({top:e,behavior:"smooth"}),a&&clearTimeout(a),a=setTimeout((()=>{null==i||i.unfreeze(),a=null}),1e3)},h=(n=window.innerWidth)=>n<t.md,d=(n=window.innerWidth)=>n>=t.md&&n<t.lg,u=(n=window.innerWidth)=>n>=t.lg,m=(n=window.innerWidth)=>n>=t.xl;export{r as a,u as b,m as c,d,c as e,l as f,h as i,i as s};
2//# sourceMappingURL=hobbii-dom-SvEnDmWr.min.js.map

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.