vendor: 8,101 bytes, line 1
1(()=>{var t={127(){!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=function(){for(var t=window.document,e=r(t);e;)e=r(t=e.ownerDocument);return t}(),e=[],n=null,o=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return n||(n=function(t,n){o=t&&n?d(t,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},e.forEach(function(t){t._checkForIntersections()})}),n},s._resetCrossOriginUpdater=function(){n=null,o=null},s.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},s.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},s.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]})},s.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},s.prototype._monitorIntersections=function(e){var n=e.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(e)){var o=this._checkForIntersections,i=null,s=null;this.POLL_INTERVAL?i=n.setInterval(o,this.POLL_INTERVAL):(a(n,"resize",o,!0),a(e,"scroll",o,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(s=new n.MutationObserver(o)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push(function(){var t=e.defaultView;t&&(i&&t.clearInterval(i),h(t,"resize",o,!0)),h(e,"scroll",o,!0),s&&s.disconnect()});var l=this.root&&(this.root.ownerDocument||this.root)||t;if(e!=l){var c=r(e);c&&this._monitorIntersections(c.ownerDocument)}}},s.prototype._unmonitorIntersections=function(e){var n=this._monitoringDocuments.indexOf(e);if(-1!=n){var o=this.root&&(this.root.ownerDocument||this.root)||t,i=this._observationTargets.some(function(t){var n=t.element.ownerDocument;if(n==e)return!0;for(;n&&n!=o;){var i=r(n);if((n=i&&i.ownerDocument)==e)return!0}return!1});if(!i){var s=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),s(),e!=o){var a=r(e);a&&this._unmonitorIntersections(a.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e<t.length;e++)t[e]()},s.prototype._checkForIntersections=function(){if(this.root||!n||o){var t=this._rootIsInDom(),e=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(o){var r=o.element,s=c(r),a=this._rootContainsTarget(r),h=o.entry,l=t&&a&&this._computeTargetAndRootIntersection(r,s,e),u=null;this._rootContainsTarget(r)?n&&!this.root||(u=e):u={top:0,bottom:0,left:0,right:0,width:0,height:0};var d=o.entry=new i({time:window.performance&&performance.now&&performance.now(),target:r,boundingClientRect:s,rootBounds:u,intersectionRect:l});h?t&&a?this._hasCrossedThreshold(h,d)&&this._queuedEntries.push(d):h&&h.isIntersecting&&this._queuedEntries.push(d):this._queuedEntries.push(d)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},s.prototype._computeTargetAndRootIntersection=function(e,r,i){if("none"!=window.getComputedStyle(e).display){for(var s=r,a=p(e),h=!1;!h&&a;){var u=null,f=1==a.nodeType?window.getComputedStyle(a):{};if("none"==f.display)return null;if(a==this.root||9==a.nodeType)if(h=!0,a==this.root||a==t)n&&!this.root?!o||0==o.width&&0==o.height?(a=null,u=null,s=null):u=o:u=i;else{var m=p(a),g=m&&c(m),v=m&&this._computeTargetAndRootIntersection(m,g,i);g&&v?(a=m,u=d(g,v)):(a=null,s=null)}else{var b=a.ownerDocument;a!=b.body&&a!=b.documentElement&&"visible"!=f.overflow&&(u=c(a))}if(u&&(s=l(u,s)),!s)break;a=a&&p(a)}return s}},s.prototype._getRootRect=function(){var e;if(this.root&&!m(this.root))e=c(this.root);else{var n=m(this.root)?this.root:t,o=n.documentElement,r=n.body;e={top:0,left:0,right:o.clientWidth||r.clientWidth,width:o.clientWidth||r.clientWidth,bottom:o.clientHeight||r.clientHeight,height:o.clientHeight||r.clientHeight}}return this._expandRectByRootMargin(e)},s.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100}),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},s.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,o=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==o)for(var r=0;r<this.thresholds.length;r++){var i=this.thresholds[r];if(i==n||i==o||i<n!=i<o)return!0}},s.prototype._rootIsInDom=function(){return!this.root||f(t,this.root)},s.prototype._rootContainsTarget=function(e){var n=this.root&&(this.root.ownerDocument||this.root)||t;return f(n,e)&&(!this.root||n==e.ownerDocument)},s.prototype._registerInstance=function(){e.indexOf(this)<0&&e.push(this)},s.prototype._unregisterInstance=function(){var t=e.indexOf(this);-1!=t&&e.splice(t,1)},window.IntersectionObserver=s,window.IntersectionObserverEntry=i}function r(t){try{return t.defaultView&&t.defaultView.frameElement||null}catch(t){return null}}function i(t){this.time=t.time,this.target=t.target,this.rootBounds=u(t.rootBounds),this.boundingClientRect=u(t.boundingClientRect),this.intersectionRect=u(t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,o=this.intersectionRect,r=o.width*o.height;this.intersectionRatio=n?Number((r/n).toFixed(4)):this.isIntersecting?1:0}function s(t,e){var n,o,r,i=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(i.root&&1!=i.root.nodeType&&9!=i.root.nodeType)throw new Error("root must be a Document or Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),o=this.THROTTLE_TIMEOUT,r=null,function(){r||(r=setTimeout(function(){n(),r=null},o))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(i.rootMargin),this.thresholds=this._initThresholds(i.threshold),this.root=i.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function a(t,e,n,o){"function"==typeof t.addEventListener?t.addEventListener(e,n,o||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function h(t,e,n,o){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,o||!1):"function"==typeof t.detachEvent&&t.detachEvent("on"+e,n)}function l(t,e){var n=Math.max(t.top,e.top),o=Math.min(t.bottom,e.bottom),r=Math.max(t.left,e.left),i=Math.min(t.right,e.right),s=i-r,a=o-n;return s>=0&&a>
1=0&&{top:n,bottom:o,left:r,right:i,width:s,height:a}||null}function c(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function u(t){return!t||"x"in t?t:{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function d(t,e){var n=e.top-t.top,o=e.left-t.left;return{top:n,left:o,height:e.height,width:e.width,bottom:n+e.height,right:o+e.width}}function f(t,e){for(var n=e;n;){if(n==t)return!0;n=p(n)}return!1}function p(e){var n=e.parentNode;return 9==e.nodeType&&e!=t?r(e):(n&&n.assignedSlot&&(n=n.assignedSlot.parentNode),n&&11==n.nodeType&&n.host?n.host:n)}function m(t){return t&&9===t.nodeType}}()},406(){!function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),n[this.key]=this,e+=1}var e=0,n={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete n[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in n)e.push(n[o]);for(var r=0,i=e.length;i>r;r++)e[r][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){for(var e in t.Context.refreshAll(),n)n[e].enabled=!0;return this},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=r.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+n,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,n+=1,r.windowContext||(r.windowContext=!0,r.windowContext=new e(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var n=0,o={},r=window.Waypoint,i=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),n=this.element==this.element.window;t&&e&&!n&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,r.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||r.isTouch)&&(e.didScroll=!0,r.requestAnimationFrame(t))})},e.prototype.handleResize=function(){r.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var n in e){var o=e[n],r=o.newScroll>o.oldScroll?o.forward:o.backward;for(var i in this.waypoints[n]){var s=this.waypoints[n][i];if(null!==s.triggerPoint){var a=o.oldScroll<s.triggerPoint,h=o.newScroll>=s.triggerPoint;(a&&h||!a&&!h)&&(s.queueTrigger(r),t[s.group.id]=s.group)}}}for(var l in t)t[l].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}}
vendor: 5,836 bytes, line 1
1,e.prototype.innerHeight=function(){return this.element==this.element.window?r.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?r.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var n in this.waypoints[e])t.push(this.waypoints[e][n]);for(var o=0,r=t.length;r>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,n=e?void 0:this.adapter.offset(),o={};for(var i in this.handleScroll(),t={horizontal:{contextOffset:e?0:n.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:n.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}}){var s=t[i];for(var a in this.waypoints[i]){var h,l,c,u,d=this.waypoints[i][a],f=d.options.offset,p=d.triggerPoint,m=0,g=null==p;d.element!==d.element.window&&(m=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),h=s.contextScroll-s.contextOffset,d.triggerPoint=Math.floor(m+h-f),l=p<s.oldScroll,c=d.triggerPoint>=s.oldScroll,u=!l&&!c,!g&&(l&&c)?(d.queueTrigger(s.backward),o[d.group.id]=d.group):(!g&&u||g&&s.oldScroll>=d.triggerPoint)&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return r.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){i&&i(),e.refreshAll()},r.requestAnimationFrame=function(e){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t).call(window,e)},r.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function n(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},r=window.Waypoint;n.prototype.add=function(t){this.waypoints.push(t)},n.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},n.prototype.flushTriggers=function(){for(var n in this.triggerQueues){var o=this.triggerQueues[n],r="up"===n||"left"===n;o.sort(r?e:t);for(var i=0,s=o.length;s>i;i+=1){var a=o[i];(a.options.continuous||i===o.length-1)&&a.trigger([n])}}this.clearTriggerQueues()},n.prototype.next=function(e){this.waypoints.sort(t);var n=r.Adapter.inArray(e,this.waypoints);return n===this.waypoints.length-1?null:this.waypoints[n+1]},n.prototype.previous=function(e){this.waypoints.sort(t);var n=r.Adapter.inArray(e,this.waypoints);return n?this.waypoints[n-1]:null},n.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},n.prototype.remove=function(t){var e=r.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},n.prototype.first=function(){return this.waypoints[0]},n.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},n.findOrCreate=function(t){return o[t.axis][t.name]||new n(t)},r.Group=n}(),function(){"use strict";function t(t){return t===t.window}function e(e){return t(e)?e:e.defaultView}function n(t){this.element=t,this.handlers={}}var o=window.Waypoint;n.prototype.innerHeight=function(){return t(this.element)?this.element.innerHeight:this.element.clientHeight},n.prototype.innerWidth=function(){return t(this.element)?this.element.innerWidth:this.element.clientWidth},n.prototype.off=function(t,e){function n(t,e,n){for(var o=0,r=e.length-1;r>o;o++){var i=e[o];n&&n!==i||t.removeEventListener(i)}}var o=t.split("."),r=o[0],i=o[1],s=this.element;if(i&&this.handlers[i]&&r)n(s,this.handlers[i][r],e),this.handlers[i][r]=[];else if(r)for(var a in this.handlers)n(s,this.handlers[a][r]||[],e),this.handlers[a][r]=[];else if(i&&this.handlers[i]){for(var h in this.handlers[i])n(s,this.handlers[i][h],e);this.handlers[i]={}}},n.prototype.offset=function(){if(!this.element.ownerDocument)return null;var t=this.element.ownerDocument.documentElement,n=e(this.element.ownerDocument),o={top:0,left:0};return this.element.getBoundingClientRect&&(o=this.element.getBoundingClientRect()),{top:o.top+n.pageYOffset-t.clientTop,left:o.left+n.pageXOffset-t.clientLeft}},n.prototype.on=function(t,e){var n=t.split("."),o=n[0],r=n[1]||"__default",i=this.handlers[r]=this.handlers[r]||{};(i[o]=i[o]||[]).push(e),this.element.addEventListener(o,e)},n.prototype.outerHeight=function(e){var n,o=this.innerHeight();return e&&!t(this.element)&&(n=window.getComputedStyle(this.element),o+=parseInt(n.marginTop,10),o+=parseInt(n.marginBottom,10)),o},n.prototype.outerWidth=function(e){var n,o=this.innerWidth();return e&&!t(this.element)&&(n=window.getComputedStyle(this.element),o+=parseInt(n.marginLeft,10),o+=parseInt(n.marginRight,10)),o},n.prototype.scrollLeft=function(){var t=e(this.element);return t?t.pageXOffset:this.element.scrollLeft},n.prototype.scrollTop=function(){var t=e(this.element);return t?t.pageYOffset:this.element.scrollTop},n.extend=function(){function t(t,e){if("object"==typeof t&&"object"==typeof e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}for(var e=Array.prototype.slice.call(arguments),n=1,o=e.length;o>n;n++)t(e[0],e[n]);return e[0]},n.inArray=function(t,e,n){return null==e?-1:e.indexOf(t,n)},n.isEmptyObject=function(t){for(var e in t)return!1;return!0}
1,o.adapters.push({name:"noframework",Adapter:n}),o.Adapter=n}()}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,n),i.exports}(()=>{"use strict";n(406);function t(t,e,n){var o,r=n||{},i=r.noTrailing,s=void 0!==i&&i,a=r.noLeading,h=void 0!==a&&a,l=r.debounceMode,c=void 0===l?void 0:l,u=!1,d=0;function f(){o&&clearTimeout(o)}function p(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=this,l=Date.now()-d;function p(){d=Date.now(),e.apply(a,r)}function m(){o=void 0}u||(h||!c||o||p(),f(),void 0===c&&l>t?h?(d=Date.now(),s||(o=setTimeout(c?m:p,t))):p():!0!==s&&(o=setTimeout(c?m:p,void 0===c?t-l:t)))}return p.cancel=function(t){var e=(t||{}).upcomingOnly,n=void 0!==e&&e;f(),u=!n},p}const e=function(t,e={}){return new CustomEvent(t,{detail:e})};new class{constructor(){this.resizeEvent=e("WINDOW_RESIZE"),window.addEventListener("resize",t(100,this.handleResize),{passive:!0})}handleResize=()=>{window.dispatchEvent(this.resizeEvent)}};var o=function(t,e,n,o){return(t/=o/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};const i=function(){var t=void 0,e=void 0,n=void 0,i=void 0,s=void 0,a=void 0,h=void 0,l=void 0,c=void 0,u=void 0,d=void 0,f=void 0;function p(t){return t.getBoundingClientRect().top+e}function m(n){c||(c=n),d=s(u=n-c,e,h,l),window.scrollTo(0,d),u<l?window.requestAnimationFrame(m):function(){window.scrollTo(0,e+h),t&&a&&(t.setAttribute("tabindex","-1"),t.focus());"function"==typeof f&&f();c=!1}()}return function(c){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(l=u.duration||1e3,i=u.offset||0,f=u.callback,s=u.easing||o,a=u.a11y||!1,e=window.scrollY||window.pageYOffset,void 0===c?"undefined":r(c)){case"number":t=void 0,a=!1,n=e+c;break;case"object":n=p(t=c);break;case"string":t=document.querySelector(c),n=p(t)}switch(h=n-e+i,r(u.duration)){case"number":l=u.duration;break;case"function":l=u.duration(h)}window.requestAnimationFrame(m)}}();new class{constructor(t){this.links=document.querySelectorAll('a[href*="#"]:not([href="#!"])'),this.init()}init=()=>{this.links.forEach(t=>{t.addEventListener("click",this.handleScrollTo)})};handleScrollTo=t=>{if(location.pathname.replace(/^\//,"")===t.currentTarget.pathname.replace(/^\//,"")&&location.hostname===t.currentTarget.hostname){let e=document.querySelector(t.currentTarget.hash);if(e){const t=document.querySelector(".header")||document.querySelector("header"),n=(t&&t.getBoundingClientRect().height,40);return i(e,{duration:500,offset:-Math.round(n)}),!1}}}};n(127);let s;const a=new Uint8Array(16);function h(){if(!s){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");s=crypto.getRandomValues.bind(crypto)}return s(a)}const l=[];for(let t=0;t<256;++t)l.push((t+256).toString(16).slice(1));function c(t,e=0){return(l[t[e+0]]+l[t[e+1]]+l[t[e+2]]+l[t[e+3]]+"-"+l[t[e+4]]+l[t[e+5]]+"-"+l[t[e+6]]+l[t[e+7]]+"-"+l[t[e+8]]+l[t[e+9]]+"-"+l[t[e+10]]+l[t[e+11]]+l[t[e+12]]+l[t[e+13]]+l[t[e+14]]+l[t[e+15]]).toLowerCase()}const u={};function d(t,e,n,o,r,i,s=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(i){if(s<0||s+16>i.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`)}else i=new Uint8Array(16),s=0;e??=Date.now(),n??=0,o??=16383&(t[8]<<8|t[9]),r??=t.slice(10,16);const a=(1e4*(268435455&(e+=122192928e5))+n)%4294967296;i[s++]=a>>>24&255,i[s++]=a>>>16&255,i[s++]=a>>>8&255,i[s++]=255&a;const h=e/4294967296*1e4&268435455;i[s++]=h>>>8&255,i[s++]=255&h,i[s++]=h>>>24&15|16,i[s++]=h>>>16&255,i[s++]=o>>>8|128,i[s++]=255&o;for(let t=0;t<6;++t)i[s++]=r[t];return i}const f=function(t,e,n){let o;const r=t?._v6??!1;if(t){const e=Object.keys(t);1===e.length&&"_v6"===e[0]&&(t=void 0)}if(t)o=d(t.random??t.rng?.()??h(),t.msecs,t.nsecs,t.clockseq,t.node,e,n);else{const t=Date.now(),i=h();!function(t,e,n){t.msecs??=-1/0,t.nsecs??=0,e===t.msecs?(t.nsecs++,t.nsecs>=1e4&&(t.node=void 0,t.nsecs=0)):e>t.msecs?t.nsecs=0:e<t.msecs&&(t.node=void 0);t.node||(t.node=n.slice(10,16),t.node[0]|=1,t.clockseq=16383&(n[8]<<8|n[9]));t.msecs=e}(u,t,i),o=d(i,u.msecs,u.nsecs,r?void 0:u.clockseq,r?void 0:u.node,e,n)}return e??c(o)},p={root:null,rootMargin:"0px",datasetId:"intersectionUid"};const m=class{constructor(t){t=Object.assign({},p,t),this.datasetId=t.datasetId,delete t.datasetId,this.bind(),this.observer=new IntersectionObserver(this.handleInstersection,t),this.callbacks={}}bind(){this.handleInstersection=this.handleInstersection.bind(this)}handleInstersection(t){t.forEach(t=>{const e=t.target.dataset[this.datasetId];this.callbacks[e]instanceof Function&&this.callbacks[e](t)})}disconnect(){this.observer.disconnect()}observe(t,e){const n=f(10);t.dataset[this.datasetId]=n,this.callbacks[n]=e,this.observer.observe(t)}unobserve(t){const e=t.dataset[this.datasetId];delete t.dataset[this.datasetId],delete this.callbacks[e],this.observer.unobserve(t)}};new class{constructor(t){this.observerElemsRoot=document.querySelectorAll('[data-observe="root"]'),this.observerElemsThreshold=document.querySelectorAll('[data-observe="threshold"]'),this.lastScrollPos=0,this.init()}init=()=>{this.observerRoot=new m({rootMargin:"-60% 0% -40% 0%"}),this.observerThreshold=new m({rootMargin:"0% 0% 0% 0%",threshold:.1}),this.observerElemsRoot.length&&this.observerElemsRoot.forEach(t=>{this.observerRoot.observe(t,this.handleSectionIntersection)}),this.observerElemsThreshold.length&&this.observerElemsThreshold.forEach(t=>{this.observerThreshold.observe(t,this.handleSectionIntersection)})};handleSectionIntersection=t=>{const e=window.scrollY||document.documentElement.scrollTop;t.isIntersecting?t.target.classList.add("in-view"):t.target.dataset.exit&&t.target.classList.remove("in-view"),this.lastScrollPos=e}},document.addEventListener("DOMContentLoaded",()=>{const t=document.querySelector(".header"),e=document.querySelector(".js-
1header-toggle"),n=document.querySelectorAll(".js-header-close"),o=document.querySelector(".js-header-flyout"),r=document.querySelector("button.js-header-close"),i=document.querySelector(".js-header-overlay"),s=document.querySelectorAll(".header__item--has-submenu"),a=document.querySelectorAll(".js-flyout-toggle");if(e&&o){function h(){o.classList.remove("is-active"),e.setAttribute("aria-expanded","false"),o.setAttribute("aria-hidden","true"),document.body.classList.remove("menu-open"),document.body.style.overflow="",e.focus()}e.addEventListener("click",()=>{"true"===e.getAttribute("aria-expanded")?h():(o.classList.add("is-active"),e.setAttribute("aria-expanded","true"),o.setAttribute("aria-hidden","false"),document.body.classList.add("menu-open"),document.body.style.overflow="hidden",r&&r.focus())}),n.forEach(t=>{t.addEventListener("click",h)}),document.addEventListener("keydown",t=>{"Escape"===t.key&&o.classList.contains("is-active")&&h()})}a.forEach(t=>{t.addEventListener("click",()=>{const e=t.closest(".js-flyout-item"),n=e?e.querySelector(".js-flyout-submenu-wrap"):null,o=t.querySelector(".header__flyout-icon");"true"===t.getAttribute("aria-expanded")?(t.setAttribute("aria-expanded","false"),e&&e.classList.remove("is-open"),n&&n.classList.remove("is-open"),o&&(o.textContent="+")):(t.setAttribute("aria-expanded","true"),e&&e.classList.add("is-open"),n&&n.classList.add("is-open"),o&&(o.textContent="â"))})}),s.length&&t&&(s.forEach(e=>{const n=e.querySelector(".header__link");function o(){e.classList.add("is-open"),t.classList.add("has-submenu-open"),n&&n.setAttribute("aria-expanded","true")}function r(){e.classList.remove("is-open");Array.from(s).some(t=>t.classList.contains("is-open"))||t.classList.remove("has-submenu-open"),n&&n.setAttribute("aria-expanded","false")}e.addEventListener("mouseenter",o),e.addEventListener("mouseleave",r),e.addEventListener("focusin",o),e.addEventListener("focusout",t=>{e.contains(t.relatedTarget)||r()})}),i&&i.addEventListener("click",()=>{s.forEach(t=>{t.classList.remove("is-open");const e=t.querySelector(".header__link");e&&e.setAttribute("aria-expanded","false")}),t.classList.remove("has-submenu-open")}),document.addEventListener("keydown",e=>{"Escape"===e.key&&t.classList.contains("has-submenu-open")&&(s.forEach(t=>{t.classList.remove("is-open");const e=t.querySelector(".header__link");e&&(e.setAttribute("aria-expanded","false"),e.blur())}),t.classList.remove("has-submenu-open"))}))});var g,v,b,w,y,x,_,E,T,k=Object.defineProperty,I=Object.getOwnPropertyNames,S=(t,e)=>function(){return t&&(e=(0,t[I(t)[0]])(t=0)),e},M=(t,e)=>{for(var n in e)k(t,n,{get:e[n],enumerable:!0})};function C(t){const e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}
1function L(t){const e=t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055;return Math.round(Math.max(0,Math.min(255,255*e)))}function A(t,e){const n=[[0,0,0],[0,0,0],[0,0,0]];for(let o=0;o<3;o++)for(let r=0;r<3;r++)n[o][r]=t[o][0]*e[0][r]+t[o][1]*e[1][r]+t[o][2]*e[2][r];return n}function R(t){const[e,n,o]=t[0],[r,i,s]=t[1],[a,h,l]=t[2],c=i*l-s*h,u=-(r*l-s*a),d=r*h-i*a,f=1/(e*c+n*u+o*d);return[[c*f,(o*h-n*l)*f,(n*s-o*i)*f],[u*f,(e*l-o*a)*f,(o*r-e*s)*f],[d*f,(n*a-e*h)*f,(e*i-n*r)*f]]}function q(t,e,n,o){return[t[0][0]*e+t[0][1]*n+t[0][2]*o,t[1][0]*e+t[1][1]*n+t[1][2]*o,t[2][0]*e+t[2][1]*n+t[2][2]*o]}function O(t,e,n){const[o,r,i]=q(b,C(t),C(e),C(n));return function(t,e,n){const o=.2104542553*t+.793617785*e-.0040720468*n,r=1.9779984951*t-2.428592205*e+.4505937099*n,i=.0259040371*t+.7827717662*e-.808675766*n,s=Math.sqrt(r*r+i*i);let a=Math.atan2(i,r)*(180/Math.PI);return a<0&&(a+=360),{l:o,c:s,h:a}}(Math.cbrt(o),Math.cbrt(r),Math.cbrt(i))}function j(t,e,n,o="srgb"){if("display-p3"===o)return O(t,e,n);const r=C(t),i=C(e),s=C(n),a=.4122214708*r+.5363325363*i+.0514459929*s,h=.2119034982*r+.6806995451*i+.1073969566*s,l=.0883024619*r+.2817188376*i+.6299787005*s,c=Math.cbrt(a),u=Math.cbrt(h),d=Math.cbrt(l),f=.2104542553*c+.793617785*u-.0040720468*d,p=1.9779984951*c-2.428592205*u+.4505937099*d,m=.0259040371*c+.7827717662*u-.808675766*d,g=Math.sqrt(p*p+m*m);let v=Math.atan2(m,p)*(180/Math.PI);return v<0&&(v+=360),{l:f,c:g,h:v}}function D(t,e,n){const[o,r,i]=function(t,e,n){const o=n*(Math.PI/180),r=e*Math.cos(o),i=e*Math.sin(o),s=t+.3963377774*r+.2158037573*i,a=t-.1055613458*r-.0638541728*i,h=t-.0894841775*r-1.291485548*i;return[s*s*s,a*a*a,h*h*h]}(t,e,n),[s,a,h]=q(w,o,r,i);return[L(s),L(a),L(h)]}function P(t,e,n,o="srgb"){if("display-p3"===o)return D(t,e,n);const r=n*(Math.PI/180),i=e*Math.cos(r),s=e*Math.sin(r),a=t+.3963377774*i+.2158037573*s,h=t-.1055613458*i-.0638541728*s,l=t-.0894841775*i-1.291485548*s,c=a*a*a,u=h*h*h,d=l*l*l,f=-1.2684380046*c+2.6097574011*u-.3413193965*d,p=-.0041960863*c-.7034186147*u+1.707614701*d;return[L(4.0767416621*c-3.3077115913*u+.2309699292*d),L(f),L(p)]}function W(t,e,n){const[o,r,i]=q(x,C(t),C(e),C(n));return[L(o),L(r),L(i)]}var H,F=S({"src/color-space.ts"(){v=[[.4123907993,.3575843394,.1804807884],[.2126390059,.7151686788,.0721923154],[.0193308187,.1191947798,.9505321522]],b=A([[.8189330101,.3618667424,-.1288597137],[.0329845436,.9293118715,.0361456387],[.0482003018,.2643662691,.633851707]],g=[[.4865709486,.2656676932,.1982172852],[.2289745641,.6917385218,.0792869141],[0,.0451133819,1.0439443689]]),w=R(b),y=R(v),x=A(y,g),_=R(x),E=[.2126,.7152,.0722],T=.001}});function z(t,e){return(Math.max(t,e)+.05)/(Math.min(t,e)+.05)}function V(t,e,n,o,r=0,i="srgb"){return new H(t,e,n,o,r,i)}var B=S({"src/color.ts"(){F(),H=class{constructor(t,e,n,o,r,i="srgb"){this._r=t,this._g=e,this._b=n,this.gamut=i,this.population=o,this.proportion=r}get srgb(){return this._srgb||(this._srgb="display-p3"===this.gamut?W(this._r,this._g,this._b):[this._r,this._g,this._b]),this._srgb}rgb(t="srgb"){if(t===this.gamut)return{r:this._r,g:this._g,b:this._b};const[e,n,o]="display-p3"===t?function(t,e,n){const[o,r,i]=q(_,C(t),C(e),C(n));return[L(o),L(r),L(i)]}(this._r,this._g,this._b):this.srgb;return{r:e,g:n,b:o}}hex(){const[t,e,n]=this.srgb,o=t=>t.toString(16).padStart(2,"0");return`#${o(t)}${o(e)}${o(n)}`}hsl(){if(!this._hsl){const[t,e,n]=this.srgb;this._hsl=function(t,e,n){const o=t/255,r=e/255,i=n/255,s=Math.max(o,r,i),a=Math.min(o,r,i),h=(s+a)/2;let l=0,c=0;if(s!==a){const t=s-a;c=h>.5?t/(2-s-a):t/(s+a),l=s===o?((r-i)/t+(r<i?6:0))/6:s===r?((i-o)/t+2)/6:((o-r)/t+4)/6}return{h:Math.round(360*l),s:Math.round(100*c),l:Math.round(100*h)}}(t,e,n)}return this._hsl}oklch(){return this._oklch||(this._oklch=j(this._r,this._g,this._b,this.gamut)),this._oklch}css(t){if(void 0===t){if("display-p3"===this.gamut){const t=t=>+(t/255).toFixed(4);return`color(display-p3 ${t(this._r)} ${t(this._g)} ${t(this._b)})`}t="rgb"}switch(t){case"hsl":{const{h:t,s:e,l:n}=this.hsl();return`hsl(${t}, ${e}%, ${n}%)`}case"oklch":{const{l:t,c:e,h:n}=this.oklch();return`oklch(${t.toFixed(3)} ${e.toFixed(3)} ${n.toFixed(1)})`}default:{const[t,e,n]=this.srgb;return`rgb(${t}, ${e}, ${n})`}}}array(){return[...this.srgb]}toString(){return this.hex()}
1get textColor(){return this.isDark?"#ffffff":"#000000"}get luminance(){return void 0===this._luminance&&(this._luminance=function(t,e,n,o="srgb"){const r=C(t),i=C(e),s=C(n),[a,h,l]="display-p3"===o?g[1]:E;return a*r+h*i+l*s}(this._r,this._g,this._b,this.gamut)),this._luminance}get isDark(){return this.luminance<=.179}get isLight(){return!this.isDark}get contrast(){if(!this._contrast){const t=this.luminance,e=z(t,1),n=z(t,0),o=this.isDark?V(255,255,255,0,0):V(0,0,0,0,0);this._contrast={white:Math.round(100*e)/100,black:Math.round(100*n)/100,foreground:o}}return this._contrast}}}}),U={};function $(t){let{colorCount:e,quality:n}=t;if(void 0!==e&&Number.isInteger(e)){if(1===e)throw new Error("colorCount should be between 2 and 20. To get one color, call getColor() instead of getPalette()");e=Math.max(e,2),e=Math.min(e,20)}else e=10;(void 0===n||!Number.isInteger(n)||n<1)&&(n=10);return{colorCount:e,quality:n,ignoreWhite:void 0===t.ignoreWhite||!!t.ignoreWhite,whiteThreshold:"number"==typeof t.whiteThreshold?t.whiteThreshold:250,alphaThreshold:"number"==typeof t.alphaThreshold?t.alphaThreshold:125,minSaturation:"number"==typeof t.minSaturation?Math.max(0,Math.min(1,t.minSaturation)):0,colorSpace:t.colorSpace??"oklch",gamut:t.gamut??"srgb"}}function N(t,e,n){return"srgb"===n||"display-p3"!==e?"srgb":"auto"===n?t.some(([t,e,n])=>function(t,e,n){const[o,r,i]=q(x,C(t),C(e),C(n));return o<-T||o>1+T||r<-T||r>1+T||i<-T||i>1+T}(t,e,n))?"display-p3":"srgb":"display-p3"}function Q(t,e,n,o){const{ignoreWhite:r=!0,whiteThreshold:i=250,alphaThreshold:s=125,minSaturation:a=0}=o,h=[];for(let o=0;o<e;o+=n){const e=4*o,n=t[e],l=t[e+1],c=t[e+2],u=t[e+3];if(!(void 0!==u&&u<s)&&!(r&&n>i&&l>i&&c>i)){if(a>0){const t=Math.max(n,l,c);if(0===t||(t-Math.min(n,l,c))/t<a)continue}h.push([n,l,c])}}return h}function G(t,e,n){let o=0,r=0,i=0,s=0;for(let a=0;a<e;a+=n){const e=4*a;o+=t[e],r+=t[e+1],i+=t[e+2],s++}return 0===s?null:[Math.round(o/s),Math.round(r/s),Math.round(i/s)]}function Y(t,e,n,o,r,i="srgb"){const s=e*n,a={ignoreWhite:o.ignoreWhite,whiteThreshold:o.whiteThreshold,alphaThreshold:o.alphaThreshold,minSaturation:o.minSaturation};let h=Q(t,s,o.quality,a);0===h.length&&(h=Q(t,s,o.quality,{...a,ignoreWhite:!1})),0===h.length&&(h=Q(t,s,o.quality,{...a,ignoreWhite:!1,alphaThreshold:0}));const l=i,c=N(h,l,o.gamut),u=t=>l===c?t:W(t[0],t[1],t[2]);let d;const f=new Set,p=[];for(const t of h){const e=t.join(",");if(!f.has(e)&&(f.add(e),p.push(t),p.length>o.colorCount))break}if(p.length<=o.colorCount){const t=new Map;for(const e of h){const n=e.join(",");t.set(n,(t.get(n)||0)+1)}d=p.map(e=>({color:e,population:t.get(e.join(","))}))}else if("oklch"===o.colorSpace){const t=function(t,e="srgb"){const n=new Array(t.length);for(let o=0;o<t.length;o++){const[r,i,s]=t[o],{l:a,c:h,h:l}=j(r,i,s,e);n[o]=[Math.round(255*a),Math.round(h/.4*255),Math.round(l/360*255)]}return n}(h,l);d=function(t,e="srgb"){return t.map(({color:[t,n,o],population:r})=>({color:P(t/255,n/255*.4,o/255*360,e),population:r}))}(r.quantize(t,o.colorCount),l)}else d=r.quantize(h,o.colorCount);if(d.length>0){const t=d.reduce((t,e)=>t+e.population,0);return d.map(({color:e,population:n})=>{const[o,r,i]=u(e);return V(o,r,i,n,t>0?n/t:0,c)})}const m=G(t,s,o.quality);if(!m)return null;const[g,v,b]=u(m);return[V(g,v,b,1,1,c)]}M(U,{computeFallbackColor:()=>G,createPixelArray:()=>Q,extractPalette:()=>Y,resolveOutputGamut:()=>N,validateOptions:()=>$});var X,K=S({"src/pipeline.ts"(){B(),F()}});function Z(t){return function(t){return"display-p3"===t||"auto"===t}(t)&&function(){if(void 0!==X)return X;try{const t=document.createElement("canvas").getContext("2d",{colorSpace:"display-p3"});X=!!t&&"display-p3"===t.getContextAttributes?.().colorSpace}catch{X=!1}return X}()?"display-p3":"srgb"}function J(t,e,n,o){try{return"display-p3"===o?t.getImageData(0,0,e,n,{colorSpace:"display-p3"}):t.getImageData(0,0,e,n)}catch(t){if(t instanceof DOMException&&"SecurityError"===t.name){const e=new Error('Image is tainted by cross-origin data. Add crossorigin="anonymous" to the <img> tag and ensure the server sends appropriate CORS headers.');throw e.cause=t,e}throw t}}function tt(t,e,n,o){const r=Z(n),i=document.createElement("canvas");i.width=t,i.height=e;const s="display-p3"===r?i.getContext("2d",{colorSpace:"display-p3"}):i.getContext("2d");o(s);return{data:J(s,t,e,r).data,width:t,height:e,colorSpace:r}}function et(t,e,n,o){const r=Z(o);
1return{data:J(t,e,n,r).data,width:e,height:n,colorSpace:r}}var nt,ot=S({"src/loaders/canvas-utils.ts"(){}}),rt={};M(rt,{BrowserPixelLoader:()=>nt});var it,st,at,ht,lt,ct=S({"src/loaders/browser.ts"(){ot(),nt=class{async load(t,e,n="srgb"){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement)return this.loadFromImage(t,n);if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)return this.loadFromCanvas(t,n);if("undefined"!=typeof ImageData&&t instanceof ImageData)return{data:t.data,width:t.width,height:t.height,colorSpace:t.colorSpace??"srgb"};if("undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement)return this.loadFromVideo(t,n);if("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap)return this.loadFromImageBitmap(t,n);if("undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)return this.loadFromOffscreenCanvas(t,n);throw new Error("Unsupported source type. Expected HTMLImageElement, HTMLCanvasElement, HTMLVideoElement, ImageData, ImageBitmap, or OffscreenCanvas.")}loadFromImage(t,e){if(!t.complete)throw new Error('Image has not finished loading. Wait for the "load" event before calling getColor/getPalette.');if(!t.naturalWidth)throw new Error("Image has no dimensions. It may not have loaded successfully.");return tt(t.naturalWidth,t.naturalHeight,e,e=>e.drawImage(t,0,0,t.naturalWidth,t.naturalHeight))}loadFromCanvas(t,e){return et(t.getContext("2d"),t.width,t.height,e)}loadFromVideo(t,e){if(t.readyState<2)throw new Error('Video is not ready. Wait for the "loadeddata" or "canplay" event before calling getColor/getPalette.');const n=t.videoWidth,o=t.videoHeight;if(!n||!o)throw new Error("Video has no dimensions. It may not have loaded successfully.");return tt(n,o,e,e=>e.drawImage(t,0,0,n,o))}loadFromOffscreenCanvas(t,e){const n=t.getContext("2d");if(!n)throw new Error("Could not get 2D context from OffscreenCanvas.");return et(n,t.width,t.height,e)}loadFromImageBitmap(t,e){return tt(t.width,t.height,e,e=>e.drawImage(t,0,0))}}}}),ut=S({"src/worker/worker-script.ts"(){it="\n'use strict';\n\n// -------------------------------------------------------------------------\n// Inlined MMCQ (Modified Median Cut Quantization)\n// -------------------------------------------------------------------------\n\nvar SIGBITS = 5;\nvar RSHIFT = 3;\nvar MAX_ITER = 1000;\nvar FRACT_POP = 0.75;\nvar HISTO_SIZE = 32768;\n\nfunction colorIndex(r, g, b) {\n return (r << 10) + (g << 5) + b;\n}\n\nfunction getHisto(pixels) {\n var h = new Uint32Array(HISTO_SIZE);\n for (var i = 0; i < pixels.length; i++) {\n var p = pixels[i];\n h[colorIndex(p[0] >> RSHIFT, p[1] >> RSHIFT, p[2] >> RSHIFT)]++;\n }\n return h;\n}\n\nfunction VBox(r1, r2, g1, g2, b1, b2, histo) {\n this.r1 = r1; this.r2 = r2;\n this.g1 = g1; this.g2 = g2;\n this.b1 = b1; this.b2 = b2;\n this.histo = histo;\n this._count = -1;\n this._volume = -1;\n this._avg = null;\n}\n\nVBox.prototype.volume = function(force) {\n if (this._volume < 0 || force) {\n this._volume = (this.r2 - this.r1 + 1) * (this.g2 - this.g1 + 1) * (this.b2 - this.b1 + 1);\n }\n return this._volume;\n};\n\nVBox.prototype.count = function(force) {\n if (this._count < 0 || force) {\n var n = 0;\n for (var i = this.r1; i <= this.r2; i++)\n for (var j = this.g1; j <= this.g2; j++)\n for (var k = this.b1; k <= this.b2; k++)\n n += this.histo[colorIndex(i, j, k)] || 0;\n this._count = n;\n }\n return this._count;\n};\n\nVBox.prototype.copy = function() {\n return new VBox(this.r1, this.r2, this.g1, this.g2, this.b1, this.b2, this.histo);\n};\n\nVBox.prototype.avg = function(force) {\n if (!this._avg || force) {\n var mult = 1 << RSHIFT;\n if (this.r1 === this.r2 && this.g1 === this.g2 && this.b1 === this.b2) {\n this._avg = [this.r1 << RSHIFT, this.g1 << RSHIFT, this.b1 << RSHIFT];\n } else {\n var ntot = 0, rsum = 0, gsum = 0, bsum = 0;\n for (var i = this.r1; i <= this.r2; i++)\n for (var j = this.g1; j <= this.g2; j++)\n for (var k = this.b1; k <= this.b2; k++) {\n var hval = this.histo[colorIndex(i, j, k)] || 0;\n ntot += hval;\n rsum += hval * (i + 0.5) * mult;\n gsum += hval * (j + 0.5) * mult;\n bsum += hval * (k + 0.5) * mult;\n }\n this._avg = ntot\n ? [~~(rsum / ntot), ~~(gsum / ntot), ~~(bsum / ntot)]\n : [~~(mult * (this.r1 + this.r2 + 1) / 2), ~~(mult * (this.g1 + this.g2 + 1) / 2), ~~(mult * (this.b1 + this.b2 + 1) / 2)];\n }\n }\n return this._avg;\n};\n\nfunction PQueue(comparator) {\n this.contents = [];\n this.sorted = false;\n this.comparator = comparator;\n}\n\nPQueue.prototype.push = function(item) { this.contents.push(item); this.sorted = false; };
1\nPQueue.prototype.pop = function() {\n if (!this.sorted) { this.contents.sort(this.comparator); this.sorted = true; }\n return this.contents.pop();\n};\nPQueue.prototype.size = function() { return this.contents.length; };\n\nfunction vboxFromPixels(pixels, histo) {\n var rmin = 1e6, rmax = 0, gmin = 1e6, gmax = 0, bmin = 1e6, bmax = 0;\n for (var i = 0; i < pixels.length; i++) {\n var p = pixels[i];\n var rv = p[0] >> RSHIFT, gv = p[1] >> RSHIFT, bv = p[2] >> RSHIFT;\n if (rv < rmin) rmin = rv; if (rv > rmax) rmax = rv;\n if (gv < gmin) gmin = gv; if (gv > gmax) gmax = gv;\n if (bv < bmin) bmin = bv; if (bv > bmax) bmax = bv;\n }\n return new VBox(rmin, rmax, gmin, gmax, bmin, bmax, histo);\n}\n\nfunction medianCutApply(histo, vbox) {\n if (!vbox.count()) return undefined;\n if (vbox.count() === 1) return [vbox.copy(), null];\n\n var rw = vbox.r2 - vbox.r1 + 1;\n var gw = vbox.g2 - vbox.g1 + 1;\n var bw = vbox.b2 - vbox.b1 + 1;\n var maxw = Math.max(rw, gw, bw);\n var total = 0;\n var partialsum = [];\n var lookaheadsum = [];\n var i, j, k, sum;\n\n if (maxw === rw) {\n for (i = vbox.r1; i <= vbox.r2; i++) {\n sum = 0;\n for (j = vbox.g1; j <= vbox.g2; j++)\n for (k = vbox.b1; k <= vbox.b2; k++)\n sum += histo[colorIndex(i, j, k)] || 0;\n total += sum; partialsum[i] = total;\n }\n } else if (maxw === gw) {\n for (i = vbox.g1; i <= vbox.g2;
1 i++) {\n sum = 0;\n for (j = vbox.r1; j <= vbox.r2; j++)\n for (k = vbox.b1; k <= vbox.b2; k++)\n sum += histo[colorIndex(j, i, k)] || 0;\n total += sum; partialsum[i] = total;\n }\n } else {\n for (i = vbox.b1; i <= vbox.b2; i++) {\n sum = 0;\n for (j = vbox.r1; j <= vbox.r2; j++)\n for (k = vbox.g1; k <= vbox.g2; k++)\n sum += histo[colorIndex(j, k, i)] || 0;\n total += sum; partialsum[i] = total;\n }\n }\n\n partialsum.forEach(function(d, idx) { lookaheadsum[idx] = total - d; });\n\n function doCut(color) {\n var dim1 = color + '1', dim2 = color + '2';\n for (var i = vbox[dim1]; i <= vbox[dim2]; i++) {\n if (partialsum[i] > total / 2) {\n var vbox1 = vbox.copy(), vbox2 = vbox.copy();\n var left = i - vbox[dim1], right = vbox[dim2] - i;\n var d2 = left <= right\n ? Math.min(vbox[dim2] - 1, ~~(i + right / 2))\n : Math.max(vbox[dim1], ~~(i - 1 - left / 2));\n while (!partialsum[d2]) d2++;\n var count2 = lookaheadsum[d2];\n while (!count2 && partialsum[d2 - 1]) count2 = lookaheadsum[--d2];\n vbox1[dim2] = d2;\n vbox2[dim1] = d2 + 1;\n return [vbox1, vbox2];\n }\n }\n }\n\n if (maxw === rw) return doCut('r');\n if (maxw === gw) return doCut('g');\n return doCut('b');\n}\n\nfunction iterate(pq, target, histo) {\n var ncolors = pq.size(), niters = 0;\n while (niters < MAX_ITER) {\n if (ncolors >= target) return;\n niters++;\n var vbox = pq.pop();\n if (!vbox.count()) { pq.push(vbox); continue; }\n var result = medianCutApply(histo, vbox);\n if (!result || !result[0]) return;\n pq.push(result[0]);\n if (result[1]) { pq.push(result[1]); ncolors++; }\n }\n}\n\nfunction quantize(pixels, maxColors) {\n if (!pixels.length || maxColors < 2 || maxColors > 256) return [];\n\n var histo = getHisto(pixels);\n var vbox = vboxFromPixels(pixels, histo);\n var pq = new PQueue(function(a, b) { return a.count() - b.count(); });\n pq.push(vbox);\n iterate(pq, FRACT_POP * maxColors, histo);\n\n var pq2 = new PQueue(function(a, b) { return a.count() * a.volume() - b.count() * b.volume(); });\n while (pq.size()) pq2.push(pq.pop());\n iterate(pq2, maxColors, histo);\n\n var results = [];\n while (pq2.size()) {\n var box = pq2.pop();\n results.push({ color: box.avg(), population: box.count() });\n }\n return results;\n}\n\n// -------------------------------------------------------------------------\n// Worker message handler\n// -------------------------------------------------------------------------\n\nself.onmessage = function (e) {\n var data = e.data;\n var id = data.id;\n try {\n var palette = quantize(data.pixels, data.maxColors);\n self.postMessage({ id: id, palette: palette });\n } catch (err) {\n self.postMessage({ id: id, error: err.message || 'Unknown worker error' });\n }\n};\n"}}),dt={};function ft(){return"undefined"!=typeof Worker}function pt(t,e,n,o="srgb",r="srgb"){return new Promise((i,s)=>{if(n?.aborted)return void s(n.reason??new DOMException("Aborted","AbortError"));const a=ht++;lt.set(a,{resolve:i,reject:s,nativeGamut:o,outputGamut:r});const h=()=>{lt.delete(a),s(n.reason??new DOMException("Aborted","AbortError"))};n?.addEventListener("abort",h,{once:!0});try{const n=function(){if(st)return st;if(!ft())throw new Error("Web Workers are not supported in this environment.");return at=URL.createObjectURL(new Blob([it],{type:"application/javascript"})),(st=new Worker(at)).onmessage=t=>{const{id:e,palette:n,error:o}=t.data,r=lt.get(e);if(r)if(lt.delete(e),o)r.reject(new Error(o));else{const t=n,{nativeGamut:e,outputGamut:o}=r,i=t.reduce((t,e)=>t+e.population,0),s=t.map(({color:t,population:n})=>{const[r,s,a]=e===o?t:W(t[0],t[1],t[2]);return V(r,s,a,n,i>0?n/i:0,o)});r.resolve(s)}},st.onerror=t=>{for(const[,e]of lt)e.reject(new Error(t.message));lt.clear()},st}();n.postMessage({id:a,pixels:t,maxColors:e})}catch(t){lt.delete(a),n?.removeEventListener("abort",h),s(t)}})}function mt(){st&&(st.terminate(),st=null),at&&(URL.revokeObjectURL(at),at=null);for(const[,t]of lt)t.reject(new Error("Worker terminated"));lt.clear()}M(dt,{extractInWorker:()=>pt,isWorkerSupported:()=>ft,terminateWorker:()=>mt});var gt=S({"src/worker/manager.ts"(){B(),F(),ut(),st=null,at=null,ht=0,lt=new Map}});K(),K();B();var vt=[{role:"Vibrant",targetL:.65,minL:.4,maxL:.85,targetC:.2,minC:.08},{role:"Muted",targetL:.65,minL:.4,maxL:.85,targetC:.04,minC:0},{role:"DarkVibrant",targetL:.3,minL:0,maxL:.45,targetC:.2,minC:.08},{role:"DarkMuted",targetL:.3,minL:0,maxL:.45,targetC:.04,minC:0},{role:"LightVibrant",targetL:.85,minL:.7,maxL:1,targetC:.2,minC:.08},{role:"LightMuted",targetL:.85,minL:.7,maxL:1,targetC:.04,minC:0}];function bt(t,e,n){const{l:o,c:r}=t.oklch();if(o<e.minL||o>e.maxL)return-1/0;if(r<e.minC)return-1/0;return 6*(1-Math.abs(o-e.targetL))+3*(1-Math.min(Math.abs(r-e.targetC)/.2,1))+1*(n>0?t.population/n:0)}var wt=V(255,255,255,0),yt=V(0,0,0,0);function xt(t){return{title:t.isDark?wt:yt,body:t.isDark?wt:yt}}function _t(t){const e=Math.max(...t.map(t=>t.population),1),n=[];for(const o of vt){let r=null,i=-1/0;for(const n of t){const t=bt(n,o,e);t>i&&(i=t,r=n)}r&&i>-1/0&&n.push({role:o.role,color:r,score:i})}const o=new Set,r={};n.sort((t,e)=>e.score-t.score);for(const i of n)if(o.has(i.color)){const n=vt.find(t=>t.role===i.role);let s=null,a=-1/0;for(const r of t){if(o.has(r))continue;const t=bt(r,n,e);t>a&&(a=t,s=r)}
1if(s&&a>-1/0){o.add(s);const{title:t,body:e}=xt(s);r[i.role]={color:s,role:i.role,titleTextColor:t,bodyTextColor:e}}else r[i.role]=null}else{o.add(i.color);const{title:t,body:e}=xt(i.color);r[i.role]={color:i.color,role:i.role,titleTextColor:t,bodyTextColor:e}}for(const t of vt)t.role in r||(r[t.role]=null);return r}function Et(t,e,n){return(t<<10)+(e<<5)+n}var Tt=class t{constructor(t,e,n,o,r,i,s){this.r1=t,this.r2=e,this.g1=n,this.g2=o,this.b1=r,this.b2=i,this.histo=s}volume(t=!1){return(void 0===this._volume||t)&&(this._volume=(this.r2-this.r1+1)*(this.g2-this.g1+1)*(this.b2-this.b1+1)),this._volume}count(t=!1){if(void 0===this._count||t){let t=0;for(let e=this.r1;e<=this.r2;e++)for(let n=this.g1;n<=this.g2;n++)for(let o=this.b1;o<=this.b2;o++)t+=this.histo[Et(e,n,o)]||0;this._count=t}return this._count}copy(){return new t(this.r1,this.r2,this.g1,this.g2,this.b1,this.b2,this.histo)}avg(t=!1){if(void 0===this._avg||t){const t=8;if(this.r1===this.r2&&this.g1===this.g2&&this.b1===this.b2)this._avg=[this.r1<<3,this.g1<<3,this.b1<<3];else{let e=0,n=0,o=0,r=0;for(let i=this.r1;i<=this.r2;i++)for(let s=this.g1;s<=this.g2;s++)for(let a=this.b1;a<=this.b2;a++){const h=this.histo[Et(i,s,a)]||0;e+=h,n+=h*(i+.5)*t,o+=h*(s+.5)*t,r+=h*(a+.5)*t}this._avg=e?[~~(n/e),~~(o/e),~~(r/e)]:[~~(t*(this.r1+this.r2+1)/2),~~(t*(this.g1+this.g2+1)/2),~~(t*(this.b1+this.b2+1)/2)]}}return this._avg}},kt=class{constructor(t){this.comparator=t,this.contents=[],this.sorted=!1}sort(){this.contents.sort(this.comparator),this.sorted=!0}push(t){this.contents.push(t),this.sorted=!1}peek(t){return this.sorted||this.sort(),this.contents[t??this.contents.length-1]}pop(){return this.sorted||this.sort(),this.contents.pop()}size(){return this.contents.length}map(t){return this.contents.map(t)}};function It(t,e){if(!e.count())return;if(1===e.count())return[e.copy(),null];const n=e.r2-e.r1+1,o=e.g2-e.g1+1,r=e.b2-e.b1+1,i=Math.max(n,o,r);let s=0;const a=[],h=[];if(i===n)for(let n=e.r1;n<=e.r2;n++){let o=0;for(let r=e.g1;r<=e.g2;r++)for(let i=e.b1;i<=e.b2;i++)o+=t[Et(n,r,i)]||0;s+=o,a[n]=s}else if(i===o)for(let n=e.g1;n<=e.g2;n++){let o=0;for(let r=e.r1;r<=e.r2;r++)for(let i=e.b1;i<=e.b2;i++)o+=t[Et(r,n,i)]||0;s+=o,a[n]=s}else for(let n=e.b1;n<=e.b2;n++){let o=0;for(let r=e.r1;r<=e.r2;r++)for(let i=e.g1;i<=e.g2;i++)o+=t[Et(r,i,n)]||0;s+=o,a[n]=s}function l(t){const n=t+"1",o=t+"2";for(let t=e[n];t<=e[o];t++)if(a[t]>s/2){const r=e.copy(),i=e.copy(),s=t-e[n],l=e[o]-t;let c;for(c=s<=l?Math.min(e[o]-1,~~(t+l/2)):Math.max(e[n],~~(t-1-s/2));!a[c];)c++;let u=h[c];for(;!u&&a[c-1];)u=h[--c];return r[o]=c,i[n]=r[o]+1,[r,i]}}return a.forEach((t,e)=>{h[e]=s-t}),l(i===n?"r":i===o?"g":"b")}function St(t,e,n){let o=t.size(),r=0;for(;r<1e3;){if(o>=e)return;r++;const i=t.pop();if(!i.count()){t.push(i);continue}const s=It(n,i);if(!s||!s[0])return;t.push(s[0]),s[1]&&(t.push(s[1]),o++)}}function Mt(t,e){if(!t.length||e<2||e>256)return[];const n=function(t){const e=new Uint32Array(32768);for(const n of t)e[Et(n[0]>>3,n[1]>>3,n[2]>>3)]++;return e}(t),o=function(t,e){let n=1e6,o=0,r=1e6,i=0,s=1e6,a=0;for(const e of t){const t=e[0]>>3,h=e[1]>>3,l=e[2]>>3;t<n?n=t:t>o&&(o=t),h<r?r=h:h>i&&(i=h),l<s?s=l:l>a&&(a=l)}return new Tt(n,o,r,i,s,a,e)}(t,n),r=new kt((t,e)=>t.count()-e.count());r.push(o),St(r,.75*e,n);const i=new kt((t,e)=>t.count()*t.volume()-e.count()*e.volume());for(;r.size();)i.push(r.pop());St(i,e,n);const s=[];for(;i.size();){const t=i.pop();s.push({color:t.avg(),population:t.count()})}return s}var Ct=class{async init(){}quantize(t,e){return Mt(t,e)}};var Lt=null,At=null;async function Rt(t){return t||(Lt||(Lt=await async function(){const{BrowserPixelLoader:t}=await Promise.resolve().then(()=>(ct(),rt));return new t}()))}async function qt(t){if(t)return await t.init(),t;if(At)return At;const e=new Ct;return await e.init(),At=e,e}function Ot(t){if(t?.aborted)throw t.reason??new DOMException("Aborted","AbortError")}async function jt(t,e){Ot(e?.signal);return(await Rt(e?.loader)).load(t,e?.signal,e?.gamut??"srgb")}async function Dt(t,e){const n=$(e??{});if(Ot(e?.signal),e?.worker){const{isWorkerSupported:o,extractInWorker:r}=await Promise.resolve().then(()=>(gt(),dt));if(o()){const o=await jt(t,e),{createPixelArray:i,resolveOutputGamut:s}=await Promise.resolve().then(()=>(K(),U)),a=i(o.data,o.width*o.height,n.quality,{ignoreWhite:n.ignoreWhite,whiteThreshold:n.whiteThreshold,alphaThreshold:n.alphaThreshold,minSaturation:n.minSaturation}),h=o.colorSpace??"srgb",l=s(a,h,n.gamut);return r(a,n.colorCount,e?.signal,h,l)}}const[o,r]=await Promise.all([jt(t,e),qt(e?.quantizer)]);return Ot(e?.signal),Y(o.data,o.width,o.height,n,r,o.colorSpace??"srgb")}K(),ot();new Ct;function Pt(){const t=document.querySelectorAll(".js-exhibition-card");t.length&&t.forEach(t=>{const e=t.getAttribute("data-img-src");if(!e)return;!function(t,e,n){const o=new Image;o.crossOrigin="anonymous",o.onload=async()=>{try{const t=await async function(t,e){return _t(await Dt(t,{colorCount:16,...e})??[])}(o),r=await async function(t,e){const n=await Dt(t,{colorCount:5,...e});return n?n[0]:null}(o),i=Wt(t?.Muted)||Wt(t?.DarkMuted)||Wt(t?.DarkVibrant)||Wt(t?.Vibrant)||Wt(r);let s=i?i.r:107,a=i?i.g:86,h=i?i.b:69;const l=Math.max(s,a,h),c=Math.min(s,a,h);let u=!1;if(l-c<25)s=Math.min(s,35),a=Math.min(a,35),h=Math.min(h,35),u=!1;else{const t=document.createElement("canvas"),n=t.getContext("2d");if(n){t.width=40,t.height=40,n.drawImage(o,0,0,40,40);const r=n.getImageData(0,0,40,40).data;let i=0,l=0,c=0,d=0;const f=e?20:40;for(let t=e?0:20;t<f;t++)for(let e=0;e<25;e++){const n=4*(40*t+e);r[n+3]>128&&(i+=r[n],l+=r[n+1],c+=r[n+2],d++)}const p=d?Math.round(i/d):s,m=d?Math.round(l/d):a,g=d?Math.round(c/d):h;u=.299*p+.587*m+.114*g>140}else{u=.299*s+.587*a+.114*h>140}}n({r:s,g:a,b:h},u)}catch(t){console.warn("ColorThief analysis fallback:",t),n(null,!1)}},o.onerror=()=>{n(null,!1)},o.src=t}(e,"flex-start"===window.getComputedStyle(t).justifyContent,(e,n)=>{e&&t.style.setProperty("--overlay-color",`rgb(${e.r}, ${e.g}, ${e.b})`),n?(t.classList.remove("exhibition-card--dark-theme"),t.classList.add("exhibition-card--light-theme")):(t.classList.remove("exhibition-card--light-theme"),t.classList.add("exhibition-card--dark-theme"))})})}function Wt(t){if(!t)return null;const e=t.color||t;if(e&&"function"==typeof e.rgb){const t=e.rgb();return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}
1return e&&Array.isArray(e.srgb)?{r:Math.round(e.srgb[0]),g:Math.round(e.srgb[1]),b:Math.round(e.srgb[2])}:Array.isArray(e)?{r:Math.round(e[0]),g:Math.round(e[1]),b:Math.round(e[2])}:e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r?{r:Math.round(e.r),g:Math.round(e.g),b:Math.round(e.b)}:null}B(),document.addEventListener("DOMContentLoaded",()=>{Pt(),function(){const t=document.querySelector(".js-past-exhibitions-list");if(!t)return;const e=t.querySelector(".js-past-exhibitions-load-more");e&&e.addEventListener("click",()=>{t.querySelectorAll(".PastExbtLst__sec.is-hidden").forEach(t=>{t.classList.remove("is-hidden"),t.style.display=""});const n=e.closest(".PastExbtLst__load-more-btn");n&&(n.style.display="none")})}()})})()})();
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.