PageSourceSearch

https://www.centerpartiet.se/sitevision/system-resource/706c47851a…171ef52fc04ec9b767285/js/booking-portlet.js

js centerpartiet.se collected 2026-09-25 21:03:04 UTC 5,943 bytes, 2 lines download raw bytes

1(globalThis.webpackChunk_sv_portlet=globalThis.webpackChunk_sv_portlet||[]).push([[3802,9215],{4888(t,e,r){"use strict";r.r(e);r(4458)},2700(){document.addEventListener("click",t=>{if(!(t.target instanceof Element))return;const e=t.target.closest(".sv-form-portlet [data-sv-form-popup], .sv-dbform-portlet [data-sv-form-popup], .sv-survey-portlet [data-sv-form-popup], .sv-booking-portlet [data-sv-form-popup]");if(e)return t.preventDefault(),void(t=>{const e=t.dataset.svFormPopupUrl||t.getAttribute("href");if(!e)return!1;const r=Number.parseInt(t.dataset.svFormPopupWidth,10),o=Number.parseInt(t.dataset.svFormPopupHeight,10),a=t.dataset.svFormPopupName||"svFormValues",s=["toolbar=0","scrollbars=1","location=0","statusbar=0","menubar=0","resizable=1",`width=${r}`,`height=${o}`,"left="+(Number.isNaN(r)?0:(screen.width-r)/2),"top="+(Number.isNaN(o)?0:(screen.height-o)/2)].join(",");window.open(e,a,s)?.focus()})(e);const r=t.target.closest(".sv-signup-portlet [data-sv-form-confirm-msg], .sv-dbform-portlet [data-sv-form-confirm-msg], .sv-survey-portlet [data-sv-form-confirm-msg], .sv-booking-portlet [data-sv-form-confirm-msg]");if(r){const e=r.dataset.svFormConfirmMsg;if(!e)return;if(!window.confirm(e))return void t.preventDefault();const o=(t=>"A"===t.tagName?t.getAttribute("href"):t.dataset.svFormNewLocation)(r);return void(o&&(t.preventDefault(),window.location.href=o))}const o=t.target.closest(".sv-dbform-portlet [data-sv-form-new-location], .sv-survey-portlet [data-sv-form-new-location], .sv-booking-portlet [data-sv-form-new-location]");if(o){const e=o.dataset.svFormNewLocation;return void(e&&(t.preventDefault(),window.location.href=e))}if(t.target.closest(".sv-survey-portlet [data-sv-form-history-back]"))return t.preventDefault(),void window.history.back();const a=t.target.closest("[data-sv-form-close-action]");if(!a)return;t.preventDefault();const s=a.dataset.svFormCloseAction;return"reload-opener-top"===s?(window.opener?.top?.location?.reload(),void window.close()):"reload-opener"===s?(window.opener?.location?.reload(),void window.close()):void("close"===s&&window.close())}),document.addEventListener("change",t=>{if(!(t.target instanceof HTMLSelectElement))return;const e=t.target.closest(".sv-survey-portlet [data-sv-form-new-location-on-change]");if(!e)return;const r=e.value;r&&(window.location.href=r)})},4458(t,e,r){"use strict";r.r(e);r(8536),r(8392),r(7340),r(2417),r(106),r(1119),r(2700)},8392(t,e,r){"use strict";var o=r(3501),a=r.n(o);a()(".sv-has-error").each(function(){const t=a()(this),e="input, textarea, select",r=t.is(e)?t:t.find(e);r.attr("aria-invalid","true"),t.on("change keyup",function(){t.removeClass("sv-has-error"),r.removeAttr("aria-invalid"),t.off()})})},8536(t,e,r){"use strict";var o=r(3501),a=r.n(o);a()("form[data-sv-single-click]").one("submit",function(){a()(this).find("input[type=submit]").prop("disabled",!0)})},7340(t,e,r){"use strict";var o=r(3501),a=r.n(o);const s=(t,e)=>{const r=parseInt(t.val(),10),o=t.closest("table").find("[data-sv-form-participants-row]"),s=(t,e,r)=>{t.attr(r,t.attr(e)),t.removeAttr(e)};o.slice(0,r).show(),o.slice(r).hide(),e&&(o.slice(0,r).find("input").each((t,e)=>{const r=a()(e);r.prop("required",!0),s(r,"data-sv-form-req-invalid-disabled","data-sv-form-req-invalid")}),o.slice(r).find("input").each((t,e)=>{const r=a()(e);r.prop("required",!1),s(r,"data-sv-form-req-invalid","data-sv-form-req-invalid-disabled")}))};a()("[data-sv-form-participants]").each((t,e)=>{const r=a()(e),o=r.data("sv-form-participants");r.on("change",()=>{s(r,o)}),s(r,o)})},2417(t,e,r){"use strict";var o=r(3501),a=r.n(o);const s=(t,e,r)=>{t.removeAttr("aria-invalid").closest(t.data("sv-form-req-error-selector")||"div").removeClass("sv-has-error").find(".sv-form-field-message").remove(),e?(t[0].setCustomValidity(r),t.attr("aria-invalid","true").closest(t.data("sv-form-req-error-selector")||"div").addClass("sv-has-error").append(`<div class="sv-form-field-message" style="margin-top: 1p
1x">\n                <span id="sv-field-message-${t[0].id}"\n                role="alert"\n                style="vertical-align:top"\n                class="normal">\n                ${r}</span>\n                <br></div>`)):t[0].setCustomValidity("")},n=t=>{let e=!0;return a()(t.target).closest("form").find("[data-sv-form-req-invalid]").each(function(t,r){const o=a()(r),n=r.validity;n.valueMissing&&(e=!1),s(o,n.valueMissing,o.attr("data-sv-form-req-invalid"))}),e};a()("[data-sv-form-req-invalid]").each((t,e)=>{const r=a()(e),o=r.closest("form");r.on("input",t=>{const e=a()(t.target);s(e,t.target.validity.valueMissing,e.attr("data-sv-form-req-invalid"))}),o.data("sv-form-req-invalid-listener")||o.on("submit",n).on("click","[type=submit]",n).attr("novalidate","novalidate").data("sv-form-req-invalid-listener",!0)})},1119(){const t=(t,e,r)=>{if(!t||t.selectedIndex<0)return;const o=t.options[t.selectedIndex].value;try{const t=new URL(r,window.location.href);t.searchParams.set(e,o),window.location.href=t.toString()}catch{const t=String(r||""),a=-1===t.indexOf("?")?"?":"&";window.location.href=t+a+encodeURIComponent(e)+"="+encodeURIComponent(o)}},e=document.querySelectorAll("[data-sv-select-action-url]");for(const r of e)r.addEventListener("change",e=>{const r=e.currentTarget,o=r.getAttribute("data-sv-select-action-url")||r.dataset.svSelectActionUrl||"",a=r.getAttribute("name");t(r,a,o)})},106(t,e,r){"use strict";var o=r(3501),a=r.n(o);const s={},n=function(t){const e=t.val(),r=e?e.trim():"",o=s[t.attr("id")],a=o.initialSize-r.length;a<0?o.$el.addClass("sv-textfield-limit-exceeded"):o.$el.removeClass("sv-textfield-limit-exceeded"),o.$el.text(a)};a()(".sv-form-textfield.sv-limit-characters").each(function(){const t=a()(this),e=t.parent().find(".sv-textfield-input-size"),r=t.attr("id");s[r]={$el:e,initialSize:e.text()},t.on("keyup",function(t){n(a()(t.currentTarget))}),t.val().length&&n(t)})}}]);
2//# sourceMappingURL=booking-portlet.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.