PageSourceSearch

https://www.rumundco.de/theme/1e32d675276b66654678d68370ff42b7/js/…n.subscription-product-box.plugin.fcf7ad.js

js rumundco.de collected 2026-09-24 22:39:47 UTC 7,234 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[64118],{118(t,e,i){i.r(e),i.d(e,{default:()=>r});var s=i(373);class r extends s.A{static #t=this.options={radioName:"subscription-plan-option",subscriptionPlanInputSelector:".subscription-product-box-select-options-option-radio",oneTimeBuyWidgetFormSelector:"#productDetailPageBuyProductForm",subscriptionMixedWidgetFormSelector:"#productDetailPageSubscriptionMixedBuyProductForm",subscriptionBuyWidgetSelector:".subscription-product-box-buy-widget",subscriptionIntervalSelectSelector:".subscription-product-box-select-options-interval-select",subscriptionMinimumExecutionLabelSelector:".subscription-minimum-execution-label",subscriptionPlanExperienceHint:".subscription-product-box-select-options-experience-hint",mixedCartSupportedAttribute:"data-mixed-carts-supported"};init(){this._registerEvents(),this._matchState(),this._setRadioContentVisibility()}get _planInputs(){return this.el.querySelectorAll(this.options.subscriptionPlanInputSelector)}_registerEvents(){this._planInputs.forEach(t=>{t.addEventListener("change",t=>this._onChange(t.target))})}_onChange(t){let e=!!t.getAttribute(this.options.mixedCartSupportedAttribute);this._setBuyButtonVisibility(t.value?e?"mixed":"separate":"one-time"),this._setRadioContentVisibility()}_matchState(){this._planInputs.forEach(t=>{t.checked&&this._onChange(t)}),this._setRadioContentVisibility()}_setBuyButtonVisibility(t){let e=this.el.parentElement.querySelector(this.options.subscriptionBuyWidgetSelector),i=this.el.parentElement.querySelector(this.options.subscriptionMixedWidgetFormSelector),s=this.el.parentElement.querySelector(this.options.oneTimeBuyWidgetFormSelector);switch(t){case"separate":e?.classList.remove("d-none"),i?.classList.add("d-none"),s?.classList.add("d-none");break;case"mixed":e?.classList.add("d-none"),i?.classList.remove("d-none"),s?.classList.add("d-none");break;case"one-time":e?.classList.add("d-none"),i?.classList.add("d-none"),s?.classList.remove("d-none");break;default:throw Error(`Unknown widget type: ${t}`)}}_setRadioContentVisibility(){this._planInputs.forEach(t=>{let e=t.parentElement.querySelector(this.options.subscriptionIntervalSelectSelector),i=t.parentElement.querySelector(this.options.subscriptionMinimumExecutionLabelSelector),s=t.parentElement.querySelector(this.options.subscriptionPlanExperienceHint);e&&(e.classList.add("d-none"),e.disabled=!0,t.checked&&(e.classList.remove("d-none"),e.disabled=!1)),i&&(i.classList.add("d-none"),t.checked&&i.classList.remove("d-none")),s&&(s.classList.add("d-none"),t.checked&&s.classList.remove("d-none"))})}}},156(t){var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a(Array.isArray(t)?[]:{},t,e):t}function r(t,e,i){return t.concat(e).map(function(t){return s(t,i)})}function n(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function o(t,e){try{return e in t}catch(t){return!1}}function a(t,i,c){(c=c||{}).arrayMerge=c.arrayMerge||r,c.isMergeableObject=c.isMergeableObject||e,c.cloneUnlessOtherwiseSpecified=s;var l,u,p=Array.isArray(i);return p!==Array.isArray(t)?s(i,c):p?c.arrayMerge(t,i,c):(u={},(l=c).isMergeableObject(t)&&n(t).forEach(function(e){u[e]=s(t[e],l)}),n(i).forEach(function(e){(!o(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(o(t,e)&&l.isMergeableObject(i[e])?u[e]=(function(t,e){if(!e.customMerge)return a;var i=e.customMerge(t);return"function"==typeof i?i:a})(e,l)(t[e],i[e],l):u[e]=s(i[e],l))}),u)}a.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,i){return a(t,i,e)},{})},t.exports=a},373(t,e,i){i.d(e,{A:()=>a});var s=i(156),r=i.n(s);class n{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let i=n.toUpperCamelCase(t,e);return n.lcFirst(i)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>n.ucFirst(t.toLowerCase())).join(""):n.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class o{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=new CustomEvent(t,{detail:e,cancelable:i});return this.el.dispatchEvent(s),s}subscribe(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this,r=t.split("."),n=i.scope?e.bind(i.scope):e;if(i.once&&!0===i.once){let e=n;n=function(i){s.unsubscribe(t),e(i)}}return this.el.addEventListener(r[0],n),this.listeners.push({splitEventName:r,opts:i,cb:n}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,i)=>([...i.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):t.push(i),t),[]),!0}
1reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}}class a{constructor(t,e={},i=!1){if(!(t instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${i}".`);return}this.el=t,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=[this.constructor.options,this.options,t];return e.push(this._getConfigFromDataAttribute()),e.push(this._getOptionsFromDataAttribute()),r().all(e.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_getConfigFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=n.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):t}_getOptionsFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=n.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-options`);if(i)try{return JSON.parse(i)}catch(t){console.error(`The data attribute "data-${e}-options" could not be parsed to json: ${t.message}`)}return t}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}}}}]);

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.