PageSourceSearch

https://www.rijksmuseum.nl/statics/generated/ticketshop-modal.68838b38946a48e267d5.js

js rijksmuseum.nl collected 2026-09-24 07:50:09 UTC 11,710 bytes, 2 lines download raw bytes

1/*! For license information please see ticketshop-modal.68838b38946a48e267d5.js.LICENSE.txt */
2"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[807,6638],{94748:function(t,e,n){n.r(e);n(52697);var r=n(41827),o=n(44899);function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var a=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).selectedAmount=e.value.amount||0,e}var n,r;return r=t,(n=e).prototype=Object.create(r.prototype),n.prototype.constructor=n,i(n,r),e.prototype.onSelectedAmountChange=function(){this.$emit("input",{id:this.value.id,amount:this.selectedAmount})},e}(o.Vue);(0,r.Cg)([(0,o.Prop)()],a.prototype,"value",void 0),(0,r.Cg)([(0,o.Watch)("selectedAmount")],a.prototype,"onSelectedAmountChange",null),a=(0,r.Cg)([o.Component],a),e.default=a},89867:function(t,e,n){n(29305),n(32733),n(81678),n(4754),n(94),n(26437),n(52697),n(78557),n(90076);var r=n(41827),o=n(44899),i=n(73929),a=n(32044);function c(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof s?r:s,l=Object.create(c.prototype);return u(l,"_invoke",function(n,r,o){var i,c,u,s=0,l=o||[],f=!1,d={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return i=e,c=0,u=t,d.n=n,a}};function p(n,r){for(c=n,u=r,e=0;!f&&s&&!o&&e<l.length;e++){var o,i=l[e],p=d.p,h=i[2];n>3?(o=h===r)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=n<2&&p<i[1])?(c=0,d.v=r,d.n=i[1]):p<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,d.n=h,c=0))}if(o||n>1)return a;throw f=!0,r}return function(o,l,h){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,h),c=l,u=h;(e=c<2?t:u)||!f;){i||(c?c<3?(c>1&&(d.n=-1),p(c,u)):d.n=u:d.v=u);try{if(s=2,i){if(c||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,c<2&&(c=0)}else 1===c&&(e=i.return)&&e.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=t}else if((e=(f=d.n<0)?u:n.call(r,d))!==a)break}catch(e){i=t,c=1,u=e}finally{s=1}}return{value:e,done:f}}}(n,o,i),!0),l}var a={};function s(){}function l(){}function f(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),p=f.prototype=s.prototype=Object.create(d);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,u(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return l.prototype=f,u(p,"constructor",f),u(f,"constructor",l),l.displayName="GeneratorFunction",u(f,o,"GeneratorFunction"),u(p),u(p,o,"Generator"),u(p,r,function(){return this}),u(p,"toString",function(){return"[object Generator]"}),(c=function(){return{w:i,m:h}})()}function u(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}u=function(t,e,n,r){function i(e,n){u(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},u(t,e,n,r)}function s(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){s(i,r,o,a,c,"next",t)}function c(t){s(i,r,o,a,c,"throw",t)}a(void 0)})}}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,d(r.key),r)}}function d(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}var h=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).modalIsOpen=!1,e.isMobileQuery=window.matchMedia("only screen and (max-width: 50.6875rem)"),e.isMobile=e.isMobileQuery.matches,e.scrollBarWidthUnderContent=0,e.lastActiveElementOutsideModal=null,e}var n,r;r=t,(n=e).prototype=Object.create(r.prototype),n.prototype.constructor=n,p(n,r);var i=e.prototype;return i.mounted=function(){window.addEventListener("resize",this.onResize)},i.beforeDestroy=function(){window.removeEventListener("resize",this.onResize)},i.onResize=function(){this.isMobile=this.isMobileQuery.matches,this.checkForScrollBar()},i.checkForScrollBar=function(){var t=l(c().m(function t(){return c().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,o.Vue.nextTick();case 1:if(this.$refs.modal){t.n=2;break}return t.a(2);case 2:this.scrollBarWidthUnderContent=document.documentElement.clientWidth-this.$refs.modal.clientWidth;case 3:return t.a(2)}},t,this)}));return function(){return t.apply(this,arguments)}}(),i.toggleTicketModal=function(){var t=l(c().m(function t(){return c().w(function(t){for(;;)switch(t.n){case 0:if(this.modalIsOpen=!this.modalIsOpen,!this.modalIsOpen){t.n=2;break}return this.checkForScrollBar(),t.n=1,o.Vue.nextTick();case 1:return a.A.fullscreenModalOpened(this.$refs.modal),t.a(2);case 2:a.A.fullscreenModalClosed();case 3:return t.a(2)}},t,this)}));return function(){return t.apply(this,arguments)}}(),i.keyboardNavigationEnabled=function(){return this.$root.$el.classList.contains("floating-focus-enabled")},i.shiftFocusIn=function(){this.lastActiveElementOutsideModal=document.activeElement;var t=this.$el.querySelector("select, input");t instanceof HTMLElement&&t.focus()},i.shiftFocusOut=function(){this.lastActiveElementOutsideModal&&this.lastActiveElementOutsideModal.focus()},i.onModalIsOpenChanged=function(t){var e=this;if(t)return document.documentElement.classList.add("overlay-open"),void this.$nextTick(function(){return e.shiftFocusIn()});this.keyboardNavigationEnabled()&&this.shiftFocusOut(),document.documentElement.classList.remove("overlay-open")},function(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"scrollBarOffset",get:function(){return this.isMobile?{right:this.scrollBarWidthUnderContent+"px"}:{right:""}}}])}(o.Vue);(0,r.Cg)([(0,i.S)(500)],h.prototype,"onResize",null),(0,r.Cg)([(0,o.Watch)("modalIsOpen")],h.prototype,"onModalIsOpenChanged",null),h=(0,r.Cg)([o.Component],h),e.A=h},69479:function(t,e,n){n.r(e);n(81678),n(14382),n(68854),n(86584),n(20518),n(4754),n(51908),n(94),n(52697),n(78557);var r=n(41827),o=n(44899),i=n(94748),a=n(89867),c=n(23692);function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s(r.key),r)}}function s(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
2(t,"string");return"symbol"==typeof e?e:e+""}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}var f=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).selectedLanguage=e.initialLanguage,e.allAvailableArticles=e.allArticleAmounts,e.showMessage=!1,e.messageTimer=0,e}var n,r;r=t,(n=e).prototype=Object.create(r.prototype),n.prototype.constructor=n,l(n,r);var o=e.prototype;return o.changeLanguage=function(t){this.selectedLanguage=t,this.allAvailableArticles=this.allAvailableArticles.map(function(t){return{id:t.id,name:t.name,amount:0}})},o.setWarningMessage=function(){var t=this;this.showMessage=!0,this.messageTimer=window.setTimeout(function(){t.showMessage=!1},5e3)},o.sendBookActivityEvent=function(){var t=this.allAvailableArticles.map(function(t){return{item_id:t.id,item_name:t.name,item_brand:"Rijksmuseum"}});c.b.pushBookActivityEvent(t)},o.sendTicketShopBtnEvent=function(){c.b.pushInteractionEvent("click","click_button","related_content_block","ticket_cta")},o.onTotalArticleAmountChange=function(){this.totalArticleAmount===this.maxArticles&&this.setWarningMessage()},function(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"totalArticleAmount",get:function(){return 0===this.selectedArticles.length?0:this.selectedArticles.reduce(function(t,e){return t+e.amount},0)}},{key:"totalArticles",get:function(){return this.selectedArticles.reduce(function(t,e){return t+e.amount},0)}},{key:"ticketshopConfigUrl",get:function(){return this.ticketShopBaseUrl+"/"+this.selectedLanguage.name+"/tickets/widget-articles?variantKey="+this.configId}},{key:"maxArticles",get:function(){var t=this,e=this.allMaxArticles.findIndex(function(e){return e.language===t.selectedLanguage.name});return this.allMaxArticles[e].maxArticles}},{key:"selectedArticles",get:function(){return this.allAvailableArticles.filter(function(t){return t.amount>0})}}])}(a.A);(0,r.Cg)([(0,o.Prop)()],f.prototype,"allArticleAmounts",void 0),(0,r.Cg)([(0,o.Prop)()],f.prototype,"allMaxArticles",void 0),(0,r.Cg)([(0,o.Prop)()],f.prototype,"availableLanguages",void 0),(0,r.Cg)([(0,o.Prop)()],f.prototype,"initialLanguage",void 0),(0,r.Cg)([(0,o.Prop)()],f.prototype,"configId",void 0),(0,r.Cg)([(0,o.Prop)()],f.prototype,"ticketShopBaseUrl",void 0),(0,r.Cg)([(0,o.Watch)("totalArticleAmount")],f.prototype,"onTotalArticleAmountChange",null),f=(0,r.Cg)([(0,o.Component)({components:{"ticketshop-modal-article":i.default}})],f),e.default=f},32044:function(t,e,n){n(76281),n(78557),n(99425),n(23630);var r=function(){function t(){this.hiddenElements=[],this.scrollPosition=0}var e=t.prototype;return e.fullscreenModalOpened=function(t){if(this.hiddenElements.length>0)throw new Error("A modal is already open");this.scrollPosition=window.pageYOffset;var e=document.querySelector(".floating-focus"),n=[t];e instanceof HTMLElement&&n.push(e),this.hideChildrenExcept(n,document.body)},e.fullscreenModalClosed=function(){this.hiddenElements.forEach(function(t){t.style.display=""}),this.hiddenElements=[],window.scrollTo(0,this.scrollPosition)},e.hideChildrenExcept=function(t,e){var n=this;e.childNodes.forEach(function(e){if(e instanceof HTMLElement&&"script"!==e.tagName.toLowerCase()&&!t.includes(e))return t.every(function(t){return!e.contains(t)})&&"none"!==e.style.display?(e.style.display="none",void n.hiddenElements.push(e)):void n.hideChildrenExcept(t,e)})},t}();e.A=new r},78228:function(t,e,n){var r=n(68120),o=n(22347),i=n(32121),a=n(66960),c=TypeError,u="Reduce of empty array with no initial value",s=function(t){return function(e,n,s,l){var f=o(e),d=i(f),p=a(f);if(r(n),0===p&&s<2)throw new c(u);var h=t?p-1:0,v=t?-1:1;if(s<2)for(;;){if(h in d){l=d[h],h+=v;break}if(h+=v,t?h<0:p<=h)throw new c(u)}for(;t?h>=0:p>h;h+=v)h in d&&(l=n(l,d[h],h,f));return l}};t.exports={left:s(!1),right:s(!0)}},14382:function(t,e,n){var r=n(28612),o=n(12867).filter;r({target:"Array",proto:!0,forced:!n(24595)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},68854:function(t,e,n){var r=n(28612),o=n(12867).findIndex,i=n(37095),a="findIndex",c=!0;a in[]&&Array(1)[a](function(){c=!1}),r({target:"Array",proto:!0,forced:c},{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(a)},20518:function(t,e,n){var r=n(28612),o=n(78228).left,i=n(13152),a=n(66477);r({target:"Array",proto:!0,forced:!n(35207)&&a>79&&a<83||!i("reduce")},{reduce:function(t){var e=arguments.length;return o(this,t,e,e>1?arguments[1]:void 0)}})}}]);

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.