OneDrive import React from 'react' import fetchInstalledTemplateKits from '../../api/fetchInstalledTemplateKits' import styles from './TemplateKitSwitcher.module.scss' const TemplateKitSwitcher = ({ currentKitId, handleChangeKitId }) => { const importedKits = fetchInstalledTemplateKits() return ( <> {!importedKits.loading && importedKits.data && importedKits.data.length > 1 ? (
{importedKits.data.map(item => (
))}
) : null} ) } export default TemplateKitSwitcher /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){return"Vennligst fjern "+(e.input.length-e.maximum)+" tegn"},inputTooShort:function(e){return"Vennligst skriv inn "+(e.minimum-e.input.length)+" tegn til"},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}();(()=>{var e,r,t,o={8042:(e,r,t)=>{"use strict";t.r(r);var o=t(1609);const i=window.wp.blocks;var n=t(7104),a=t(2478);const s=JSON.parse('{"name":"woocommerce/order-confirmation-additional-information","version":"1.0.0","title":"Additional Information","description":"Displays additional information provided by third-party extensions for the current order.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"multiple":false,"align":["wide","full"],"html":false,"__experimentalBorder":{"color":true,"radius":true,"width":true,"style":true,"__experimentalDefaultControls":{"width":true,"color":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"attributes":{"align":{"type":"string","default":"wide"},"className":{"type":"string","default":""}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),c=window.wp.blockEditor;var l=t(7723);t(9479);(0,i.registerBlockType)(s,{icon:{src:(0,o.createElement)(n.A,{icon:a.A,className:"wc-block-editor-components-block-icon"})},attributes:{...s.attributes},edit:()=>{const e=(0,c.useBlockProps)({className:"wc-block-order-confirmation-additional-information"});return(0,o.createElement)("div",{...e},(0,o.createElement)("div",{className:"wc-block-order-confirmation-additional-information-placeholder"},(0,l.__)("Additional Information for your order","woocommerce")))},save:()=>null})},9479:()=>{},1609:e=>{"use strict";e.exports=window.React},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},5573:e=>{"use strict";e.exports=window.wp.primitives}},i={};function n(e){var r=i[e];if(void 0!==r)return r.exports;var t=i[e]={exports:{}};return o[e].call(t.exports,t,t.exports,n),t.exports}n.m=o,e=[],n.O=(r,t,o,i)=>{if(!t){var a=1/0;for(d=0;d=i)&&Object.keys(n.O).every((e=>n.O[e](t[c])))?t.splice(c--,1):(s=!1,i0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[t,o,i]},n.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var i=Object.create(null);n.r(i);var a={};r=r||[null,t({}),t([]),t(t)];for(var s=2&o&&e;"object"==typeof s&&!~r.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((r=>a[r]=()=>e[r]));return a.default=()=>e,n.d(i,a),i},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=3068,(()=>{var e={3068:0};n.O.j=r=>0===e[r];var r=(r,t)=>{var o,i,[a,s,c]=t,l=0;if(a.some((r=>0!==e[r]))){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(c)var d=c(n)}for(r&&r(t);ln(8042)));a=n.O(a),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["order-confirmation-additional-information"]=a})();(()=>{var t,e,o,i={9231:(t,e,o)=>{"use strict";const i=window.wp.blocks,r=window.wp.data,n=window.wp.editor,s=window.wc.wcTypes;class c{blocks=new Map;initialized=!1;attemptedRegisteredBlocks=new Set;constructor(){this.initializeSubscriptions()}static getInstance(){return c.instance||(c.instance=new c),c.instance}initializeSubscriptions(){if(this.initialized)return;const t=(0,r.subscribe)((()=>{const e=(0,r.select)(n.store);if(!e)return;const o=e.getCurrentPostType();if(o)if("post"===o||"page"===o)t(),this.blocks.forEach((t=>{if(t.isAvailableOnPostEditor){const e=t.variationName||t.blockName;this.hasAttemptedRegistration(e)||this.registerBlock(t)}})),this.initialized=!0;else{t();const o=String(e.getEditedPostSlug());this.currentTemplateId=o,this.handleTemplateChange(void 0),(0,r.subscribe)((()=>{const t=this.currentTemplateId;this.currentTemplateId=String(e.getEditedPostSlug()),t!==this.currentTemplateId&&this.handleTemplateChange(t)}),n.store),this.initialized=!0}}))}handleTemplateChange(t){(this.currentTemplateId?.includes("single-product")||t?.includes("single-product"))&&this.blocks.forEach((t=>{this.unregisterBlock(t),this.registerBlock(t)}))}hasAttemptedRegistration(t){return this.attemptedRegisteredBlocks.has(t)}unregisterBlock(t){const{blockName:e,isVariationBlock:o,variationName:r}=t;try{o&&r?((0,i.unregisterBlockVariation)(e,r),this.attemptedRegisteredBlocks.delete(r)):((0,i.unregisterBlockType)(e),this.attemptedRegisteredBlocks.delete(e))}catch(t){console.debug(`Failed to unregister block ${e}:`,t)}}registerBlock(t){const{blockName:e,settings:o,isVariationBlock:n,variationName:c,isAvailableOnPostEditor:a}=t;try{const t=c||e;if(this.hasAttemptedRegistration(t))return;const l=(0,r.select)("core/edit-site");if(!l&&!a)return;if(n)(0,i.registerBlockVariation)(e,o);else{const t=(0,s.isEmpty)(o?.ancestor)?["woocommerce/single-product"]:o?.ancestor,r=l&&this.currentTemplateId?.includes("single-product");(0,i.registerBlockType)(e,{...o,ancestor:r?void 0:t})}this.attemptedRegisteredBlocks.add(t)}catch(t){console.error(`Failed to register block ${e}:`,t)}}registerBlockConfig(t){const e=t.variationName||t.blockName;this.blocks.set(e,t),this.registerBlock(t)}}var a=o(4530),l=o(6012);const d=JSON.parse('{"name":"woocommerce/add-to-cart-form","title":"Add to Cart with Options","description":"Display a button that lets customers add a product to their cart. Use the added options to optimize for different product types.","category":"woocommerce-product-elements","attributes":{"quantitySelectorStyle":{"type":"string","enum":["input","stepper"],"default":"input"}},"keywords":["WooCommerce"],"usesContext":["postId"],"textdomain":"woocommerce","supports":{"interactivity":true},"apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json","viewScriptModule":"woocommerce/add-to-cart-form","style":"file:../woocommerce/add-to-cart-form-style.css","editorStyle":"file:../woocommerce/add-to-cart-form-editor.css"}'),u=window.wp.blockEditor;var p=o(7723),m=o(4921),b=(o(2405),o(790));const w=({tag:t="div",width:e="100%",height:o="8px",maxWidth:i="",className:r="",borderRadius:n="",isStatic:s=!1,ariaMessage:c})=>(0,b.jsx)(t,{className:(0,m.A)("wc-block-components-skeleton__element",{"wc-block-components-skeleton__element--static":s},r),...c?{"aria-live":"polite","aria-label":c}:{"aria-hidden":"true"},style:{width:e,height:o,borderRadius:n,maxWidth:i}}),h=({isStatic:t=!1})=>(0,b.jsxs)("div",{className:"wc-block-components-skeleton",children:[(0,b.jsx)(w,{height:"16px",isStatic:t}),(0,b.jsx)(w,{height:"16px",isStatic:t}),(0,b.jsx)(w,{height:"16px",width:"80%",isStatic:t})]}),k=window.wp.components,g=window.wc.wcSettings;let f=function(t){return t.Input="input",t.Stepper="stepper",t}({});const _=t=>t===f.Input?(0,p.__)("Shoppers can enter a number of items to add to cart.","woocommerce"):t===f.Stepper?(0,p.__)("Shoppers can use buttons to change the number of items to add to cart.","woocommerce"):void 0,y=({quantitySelectorStyle:t,setAttributes:e})=>(0,b.jsx)(u.InspectorControls,{children:(0,b.jsx)(k.PanelBody,{title:(0,p.__)("Quantity Selector","woocommerce"),children:(0,b.jsxs)(k.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,value:t,isBlock:!0,onChange:t=>{e({quantitySelectorStyle:t})},help:_(t),children:[(0,b.jsx)(k.__experimentalToggleGroupControlOption,{label:(0,p.__)("Input","woocommerce"),value:f.Input}),(0,b.jsx)(k.__experimentalToggleGroupControlOption,{label:(0,p.__)("Stepper","woocommerce"),value:f.Stepper})]})})});var x=o(6087),v=o(1244),j=o.n(v);j()("wc-admin:tracks:stats");const S=j()("wc-admin:tracks");function B({children:t,className:e,actionLabel:o,onActionClick:i,...r}){return(0,b.jsx)(k.Notice,{...r,className:(0,m.$)("wc-block-editor-components-upgrade-downgrade-notice",e),actions:[{label:o,onClick:i,noDefaultClasses:!0,variant:"link"}],children:(0,b.jsx)("div",{className:"wc-block-editor-components-upgrade-downgrade-notice__text",children:t})})}o(9969);const N=({blocks:t,findCondition:e})=>{for(const o of t){if(e(o))return o;if(o.innerBlocks){const t=N({blocks:o.innerBlocks,findCondition:e});if(t)return t}}},O=({blockClientId:t})=>{const e=(0,x.createInterpolateElement)((0,p.__)("Gain access to more customization options when you upgrade to the .","woocommerce"),{strongText:(0,b.jsx)("strong",{children:(0,p.__)("blockified experience","woocommerce")})}),o=(0,p.__)("Upgrade to the Add to Cart + Options block","woocommerce");return(0,b.jsx)(B,{isDismissible:!1,actionLabel:o,onActionClick:async()=>{const e=await(async t=>{const e=(0,r.select)("core/block-editor").getBlocks(),o=N({blocks:e,findCondition:e=>e.name===d.name&&e.clientId===t});if(!o)return!1;const n=(0,i.createBlock)("woocommerce/add-to-cart-with-options");return(0,r.dispatch)("core/block-editor").replaceBlock(o.clientId,n),!0})(t);e&&function(t,e){if(S("recordevent %s %o","wcadmin_"+t,e,{_tqk:window._tkq,shouldRecord:!!window._tkq&&!!window.wcTracks&&!!window.wcTracks.isEnabled}),!window.wcTracks||"function"!=typeof window.wcTracks.recordEvent)return!1;window.wcTracks.recordEvent(t,e)}("blocks_add_to_cart_with_options_migration",{transform_to:"blockified"})},children:e})};(t=>{const e=t.name;if(!e)return void console.error("registerProductBlockType: Block name is required for registration");const o=(({name:t,...e})=>e)(t),{isVariationBlock:i,variationName:r,isAvailableOnPostEditor:n,...s}={...o,...{isAvailableOnPostEditor:!0}||{}},a={blockName:e,settings:{...s},isVariationBlock:null!=i&&i,variationName:null!=r?r:void 0,isAvailableOnPostEditor:null!=n&&n};c.getInstance().registerBlockConfig(a)})({...d,edit:t=>{const{setAttributes:e}=t,o=t.attributes.quantitySelectorStyle===f.Input?"wc-block-add-to-cart-form--input":"wc-block-add-to-cart-form--stepper",i=(0,u.useBlockProps)({className:`wc-block-add-to-cart-form ${o}`}),s=(()=>{const t=(0,r.select)(n.store)?.getCurrentPostType();return"wp_template"===t||"wp_template_part"===t})(),c=(0,g.getSetting)("isBlockTheme",!1),a=c?"":"wp-block-button",l=c?"":"wp-block-button__link wc-block-components-button";return(0,b.jsxs)(b.Fragment,{children:[c&&(0,b.jsx)(u.InspectorControls,{children:(0,b.jsx)(O,{blockClientId:t?.clientId})}),(0,b.jsx)(y,{quantitySelectorStyle:t.attributes.quantitySelectorStyle,setAttributes:e}),(0,b.jsx)("div",{...i,children:(0,b.jsx)(k.Tooltip,{text:(0,p.__)("Customer will see product add-to-cart options in this space, dependent on the product type.","woocommerce"),position:"bottom right",children:(0,b.jsxs)("div",{className:"wc-block-editor-add-to-cart-form-container",children:[(0,b.jsx)(h,{isStatic:!0}),(0,b.jsxs)(k.Disabled,{children:[t.attributes.quantitySelectorStyle===f.Input&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"quantity",children:(0,b.jsx)("input",{style:s?{}:{backgroundColor:"#ffffff",lineHeight:"normal",minHeight:"unset",boxSizing:"unset",borderRadius:"unset"},type:"number",value:"1",className:"input-text qty text",readOnly:!0})}),(0,b.jsx)("div",{className:a,children:(0,b.jsx)("button",{className:`single_add_to_cart_button alt wp-element-button ${l}`,children:(0,p.__)("Add to cart","woocommerce")})})]}),t.attributes.quantitySelectorStyle===f.Stepper&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"quantity wc-block-components-quantity-selector",children:[(0,b.jsx)("button",{className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",children:"−"}),(0,b.jsx)("input",{style:s?{}:{backgroundColor:"#ffffff",lineHeight:"normal",minHeight:"unset",boxSizing:"unset",borderRadius:"unset"},type:"number",value:"1",className:"input-text qty text",readOnly:!0}),(0,b.jsx)("button",{className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",children:"+"})]}),(0,b.jsx)("div",{className:a,children:(0,b.jsx)("button",{className:`single_add_to_cart_button alt wp-element-button ${l}`,children:(0,p.__)("Add to cart","woocommerce")})})]})]})]})})})]})},icon:{src:(0,b.jsx)(a.A,{icon:l.A,className:"wc-block-editor-components-block-icon"})},ancestor:["woocommerce/single-product"],transforms:{to:[{type:"block",blocks:["woocommerce/add-to-cart-with-options"],transform:()=>(0,i.createBlock)("woocommerce/add-to-cart-with-options")}]},save:()=>null})},2405:()=>{},9969:()=>{},1609:t=>{"use strict";t.exports=window.React},790:t=>{"use strict";t.exports=window.ReactJSXRuntime},6087:t=>{"use strict";t.exports=window.wp.element},7723:t=>{"use strict";t.exports=window.wp.i18n},5573:t=>{"use strict";t.exports=window.wp.primitives}},r={};function n(t){var e=r[t];if(void 0!==e)return e.exports;var o=r[t]={exports:{}};return i[t](o,o.exports,n),o.exports}n.m=i,t=[],n.O=(e,o,i,r)=>{if(!o){var s=1/0;for(d=0;d=r)&&Object.keys(n.O).every((t=>n.O[t](o[a])))?o.splice(a--,1):(c=!1,r0&&t[d-1][2]>r;d--)t[d]=t[d-1];t[d]=[o,i,r]},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},o=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,n.t=function(t,i){if(1&i&&(t=this(t)),8&i)return t;if("object"==typeof t&&t){if(4&i&&t.__esModule)return t;if(16&i&&"function"==typeof t.then)return t}var r=Object.create(null);n.r(r);var s={};e=e||[null,o({}),o([]),o(o)];for(var c=2&i&&t;"object"==typeof c&&!~e.indexOf(c);c=o(c))Object.getOwnPropertyNames(c).forEach((e=>s[e]=()=>t[e]));return s.default=()=>t,n.d(r,s),r},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.j=2100,(()=>{var t={2100:0};n.O.j=e=>0===t[e];var e=(e,o)=>{var i,r,[s,c,a]=o,l=0;if(s.some((e=>0!==t[e]))){for(i in c)n.o(c,i)&&(n.m[i]=c[i]);if(a)var d=a(n)}for(e&&e(o);ln(9231)));s=n.O(s),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["add-to-cart-form"]=s})(); /*! elementor - v3.23.0 - 05-08-2024 */ .elementor-column .elementor-spacer-inner{height:var(--spacer-size)}.e-con{--container-widget-width:100%}.e-con-inner>.elementor-widget-spacer,.e-con>.elementor-widget-spacer{width:var(--container-widget-width,var(--spacer-size));--align-self:var(--container-widget-align-self,initial);--flex-shrink:0}.e-con-inner>.elementor-widget-spacer>.elementor-widget-container,.e-con>.elementor-widget-spacer>.elementor-widget-container{height:100%;width:100%}.e-con-inner>.elementor-widget-spacer>.elementor-widget-container>.elementor-spacer,.e-con>.elementor-widget-spacer>.elementor-widget-container>.elementor-spacer{height:100%}.e-con-inner>.elementor-widget-spacer>.elementor-widget-container>.elementor-spacer>.elementor-spacer-inner,.e-con>.elementor-widget-spacer>.elementor-widget-container>.elementor-spacer>.elementor-spacer-inner{height:var(--container-widget-height,var(--spacer-size))}.e-con-inner>.elementor-widget-spacer.elementor-widget-empty,.e-con>.elementor-widget-spacer.elementor-widget-empty{position:relative;min-height:22px;min-width:22px}.e-con-inner>.elementor-widget-spacer.elementor-widget-empty .elementor-widget-empty-icon,.e-con>.elementor-widget-spacer.elementor-widget-empty .elementor-widget-empty-icon{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;padding:0;width:22px;height:22px} (window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[32],{1232:function(e,t,l){"use strict";l.r(t);var r=l(1);function c(){return(c=Object.assign||function(e){for(var t=1;t