hemfixarna-web-components 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -715,7 +715,7 @@ const HemfixarnaCheckout = class {
715
715
  get el() { return index.getElement(this); }
716
716
  };
717
717
 
718
- const hemfixarnaCss = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap\"); *{box-sizing:border-box}:host{font-family:\"Inter\", sans-serif}:host .mb-2{margin-bottom:2rem}:host button{color:#474444}:host form{display:flex;flex-direction:column;gap:1rem}:host form img{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none}:host form img:first-of-type{left:1rem}:host form img:last-of-type{right:1rem}:host form span{margin-top:-0.5rem;color:#ec6632}:host form p{text-align:center}:host form p{margin:0}:host form div{position:relative}:host form div label{pointer-events:none;position:absolute;left:1rem;top:50%;transform:translateY(-50%);background:#fff;padding:0.25rem;transition:0.2s all cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host form div input{padding:1rem;width:100%;font-size:1rem;border:1px solid #fcd9c9}:host form div input:focus~label,:host form div .input_active~label{top:0;transform:translateY(-50%);background:linear-gradient(180deg, #fffaf2 50%, #fff 50%)}:host h1{font-size:24px;font-weight:400;line-height:32px;letter-spacing:-3%;text-align:left;margin:0 0 0.5rem}:host h2{margin:0 0 1.5rem;font-weight:700;font-size:20px;line-height:28px;letter-spacing:-3%}:host p{font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna{width:100%;}:host .hemfixarna_nav{position:absolute;top:0;width:100dvw;left:0;height:80px;z-index:9999}:host .hemfixarna_nav--links{display:none !important}@media (min-width: 769px){:host .hemfixarna_nav--links{display:flex !important}}:host .hemfixarna_nav--links a{color:#ec6632;text-decoration:none;border:1px solid rgba(255, 255, 255, 0.3);border-radius:3.5rem;padding:0.5rem 2rem}:host .hemfixarna_nav>div{position:relative;overflow:hidden;width:100%;height:100%;display:flex;justify-content:space-between;align-items:center;padding:0 1rem}@media (min-width: 769px){:host .hemfixarna_nav>div{padding:0 2rem}}:host .hemfixarna_nav>div>div{display:flex;gap:2rem;justify-content:space-between}:host .hemfixarna_nav>div>img{position:absolute;width:100%;height:100%;top:0;left:0;z-index:-1}:host .hemfixarna_nav p{color:#fff}:host .hemfixarna_standalone .hemfixarna_backdrop{background:#fffaf2;opacity:1}:host .hemfixarna_standalone .hemfixarna_modal{top:80px;transform:translateX(-50%);border:none;height:calc(100dvh - 80px);opacity:0}:host .hemfixarna_standalone .hemfixarna_modal--open{opacity:1}:host .hemfixarna .switch{position:relative;display:inline-block;width:40px;height:20px}:host .hemfixarna .switch input{opacity:0;width:0;height:0}:host .hemfixarna .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:0.4s;transition:0.4s;border-radius:34px}:host .hemfixarna .slider:before{position:absolute;content:\"\";height:18px;width:18px;left:2px;bottom:1px;background-color:white;-webkit-transition:0.4s;transition:0.4s;border-radius:50%}:host .hemfixarna input:checked+.slider{background-color:#fcd9c9}:host .hemfixarna input:focus+.slider{box-shadow:0 0 1px #fcd9c9}:host .hemfixarna input:checked+.slider:before{-webkit-transform:translateX(18px);-ms-transform:translateX(18px);transform:translateX(18px);background:#ec6632}:host .hemfixarna_checkbox{display:grid;grid-template-columns:2.5rem auto;font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna_checkbox>span{transform:translateY(6px)}:host .hemfixarna_checkbox span,:host .hemfixarna_checkbox span p{color:#474444;font-size:14px}:host .hemfixarna_checkbox p{text-align:left}:host .hemfixarna_info{display:flex;flex-direction:column;gap:1.5rem;padding:2rem;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);border-radius:0.25rem;border:1px solid #fcd9c9}:host .hemfixarna_info h2{margin:0}@media (min-width: 769px){:host .hemfixarna_info{position:sticky;top:0}}:host .hemfixarna_infomodal{position:absolute;top:40%;left:50%;transform:translate(-50%, -50%);width:100%;max-width:80%;background:#fffaf2;border:1px solid #fcd9c9;padding:2rem;z-index:99;border-radius:0.25rem;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;flex-direction:column;gap:1rem}:host .hemfixarna_infomodal p,:host .hemfixarna_infomodal h4{margin:0}:host .hemfixarna_infomodal button{background:#ec6632;color:#fff;border-radius:60px;font-size:16px;padding:0.5rem 1rem}:host .hemfixarna_addressinfo{padding:1rem 1rem 4rem;border:1px solid #fcd9c9;position:relative;margin-bottom:2rem;display:grid;grid-template-columns:1fr;gap:0.5rem}@media (min-width: 769px){:host .hemfixarna_addressinfo{grid-template-columns:1fr 1fr}}:host .hemfixarna_addressinfo button{position:absolute;bottom:1rem;right:1rem;font-weight:500;text-underline-offset:2px;text-decoration:underline}:host .hemfixarna_part{background:#fff;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:grid;padding:1rem;grid-template-columns:auto 75px}:host .hemfixarna_counter{display:flex;align-items:center}:host .hemfixarna_counter span{padding:0 0.5rem}:host .hemfixarna_counter img{cursor:pointer}:host .hemfixarna_counter img:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_description{display:grid;gap:1rem}:host .hemfixarna_description ul{list-style:disc;padding-right:0.75rem;transform:translateX(0.75rem)}:host .hemfixarna_description--hidden{max-height:140px;overflow:hidden;position:relative;cursor:pointer}:host .hemfixarna_description--hidden::after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:8rem;background:linear-gradient(180deg, rgba(255, 253, 250, 0), rgba(255, 253, 250, 0.46) 50%, #fffaf2)}:host .hemfixarna_terms{font-size:14px}:host .hemfixarna_terms a{color:inherit}:host .hemfixarna_logo{height:4rem}:host .hemfixarna_box{padding:1rem;display:flex;align-items:center;justify-content:space-between;background:#fffaf2;border:1px solid #fcd9c9;width:100%;box-sizing:border-box;border-radius:0.25rem;gap:1rem 0.5rem}:host .hemfixarna_box>div{display:grid;gap:0.5rem}:host .hemfixarna_btn,:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{border:none;border-radius:60px;font-weight:600;letter-spacing:0.5px;line-height:20px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn:not(.disabled):hover,:host .hemfixarna_buy:not(.disabled):hover,:host .hemfixarna input[type=submit]:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn{font-size:14px;background:#c84e18;color:#fff;padding:1rem 1.5rem;white-space:nowrap;position:relative}:host .hemfixarna_btn span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-0.5rem;right:-0.75rem}:host .hemfixarna_btn span{background:#25a710;color:#fff;right:0 !important}:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{font-size:21px;background:#25a710;color:#fff;padding:1rem 1.5rem}:host .hemfixarna .disabled{opacity:0.5;cursor:default}:host .hemfixarna_modal{position:fixed;background:#fffaf2;border:1px solid #fcd9c9;border-radius:0.25rem;top:50%;left:50%;z-index:1000;transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);transform:translate(-50%, -50%) scale(0.7);opacity:0;height:92%;width:92%;max-width:920px;display:flex;flex-direction:column;gap:0.5rem}:host .hemfixarna_modal--open{opacity:1;transform:translate(-50%, -50%) scale(1)}:host .hemfixarna_backdrop{z-index:999;position:fixed;background:#474444;top:0;left:0;bottom:0;right:0;opacity:0;transition:transform 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946), opacity 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host .hemfixarna_backdrop--open{opacity:0.3}:host .hemfixarna_order{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;background-repeat:no-repeat !important;background-size:cover !important;background-position:center !important;display:grid;grid-template-columns:1fr 1fr;padding:3rem 2rem 4rem}@media (max-width: 768px){:host .hemfixarna_order{grid-template-columns:1fr;grid-template-rows:0 auto}}:host .hemfixarna_order>div:last-of-type{background:#fffaf2;padding:2rem;display:flex;flex-direction:column;max-height:100%;overflow:auto}:host .hemfixarna_order img{cursor:pointer}:host .hemfixarna_order button{margin:1rem 0;padding:0;text-decoration:underline;text-underline-offset:2px;font-size:14px;font-weight:600}:host .hemfixarna_cart{display:grid;grid-template-columns:1fr 1fr;gap:2rem}@media (max-width: 768px){:host .hemfixarna_cart{grid-template-columns:1fr;gap:0}}:host .hemfixarna_cart--right h2,:host .hemfixarna_cart--left h2{display:flex;align-items:center}:host .hemfixarna_cart--right h2 img,:host .hemfixarna_cart--left h2 img{margin-top:0.2rem}@media (min-width: 769px){:host .hemfixarna_cart--left h2 button{display:none}}@media (max-width: 768px){:host .hemfixarna_cart--right h2 button{display:none}}:host .hemfixarna_cart--startfee{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot div{display:flex;gap:1rem;align-items:center}:host .hemfixarna_cart--additional{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--additional p{font-size:14px}:host .hemfixarna_cart--additional strong{text-decoration:underline;text-underline-offset:2px;cursor:pointer;position:relative}:host .hemfixarna_cart--additional strong img{position:absolute;top:50%;transform:translateY(-50%);right:-1.5rem}:host .hemfixarna_cart--price{border-top:1px solid #fcd9c9;padding:1rem;display:flex;justify-content:space-between}:host .hemfixarna_cart--price h3{margin:0}:host .hemfixarna_cart--item{display:flex;flex-direction:column;gap:0.5rem;padding:1rem 0;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--item>div{display:flex;justify-content:space-between}:host .hemfixarna_cart--item>div>div{display:flex;align-items:center;gap:1rem}:host .hemfixarna_cart--item>div button{color:#ec6632}:host .hemfixarna_categories{display:grid;gap:1.5rem}:host .hemfixarna_categories--wrapper{gap:2rem;display:grid;grid-template-columns:1fr 1fr}@media (max-width: 768px){:host .hemfixarna_categories--wrapper{grid-template-columns:1fr}}:host .hemfixarna_categories li{position:relative;background:#fff;border-radius:0.25rem;min-height:132px;padding:1.5rem;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;align-items:center;gap:1.5rem;cursor:pointer}:host .hemfixarna_categories li:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_categories li>button{height:100%;width:100%}:host .hemfixarna_categories li .price{font-weight:700}:host .hemfixarna_content{height:100%;overflow:auto;padding:0 2rem 4rem}:host .hemfixarna_content--5{padding-top:1rem}:host .hemfixarna_crumbs{position:relative;padding:1rem 1.5rem;border-bottom:1px solid #fcd9c9;display:flex;justify-content:space-between}:host .hemfixarna_crumbs--back{padding:1rem 1.5rem 0.5rem;display:flex;align-items:center;gap:0.5rem;box-shadow:none !important}:host .hemfixarna_crumbs--back:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs img{cursor:pointer}:host .hemfixarna_crumbs .close{position:absolute;right:-1rem;top:-1rem;z-index:9}:host .hemfixarna_crumbs .cart{padding-left:1rem;position:relative}:host .hemfixarna_crumbs .cart img{cursor:inherit}:host .hemfixarna_crumbs .cart span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-0.5rem;right:-0.75rem}:host .hemfixarna_crumbs .cart_active{cursor:pointer}:host .hemfixarna_crumbs .cart_active span{background:#25a710;color:#fff}:host .hemfixarna_crumbs--links{display:flex;align-items:center;gap:1rem;overflow:auto}@media (min-width: 769px){:host .hemfixarna_crumbs--links{-ms-overflow-style:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar{display:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar-button{display:none}}:host .hemfixarna_crumbs button{white-space:nowrap;background:#f1ded6;border-radius:4rem;padding:0.75rem 1rem;font-size:12px;font-weight:600;letter-spacing:0.3px;box-shadow:none !important}:host .hemfixarna_crumbs button:not(.active):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs .active{background:#fffaf2;cursor:default}:host .hemfixarna_features{gap:0.75rem !important}:host .hemfixarna_features li{display:flex;gap:1rem;align-items:center}:host .hemfixarna_address{margin-bottom:1rem}:host .hemfixarna_product{display:grid;gap:1rem}:host .hemfixarna_product--link{font-weight:700;color:#474444;text-underline-offset:0.25rem}:host .hemfixarna_product--left{gap:2rem}:host .hemfixarna_product--right{gap:2rem}:host .hemfixarna_product--price{margin-top:0.25rem;font-weight:700}:host .hemfixarna_product--total{text-align:center;margin:-1rem 0;font-size:21px;line-height:28px}:host .hemfixarna_product--item{background:#fff;padding:1rem;display:grid;grid-template-columns:auto 75px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_product--grid{display:grid;grid-template-columns:1fr 1fr;gap:2rem}@media (max-width: 768px){:host .hemfixarna_product--grid{grid-template-columns:1fr}}:host .hemfixarna_product--grid>div{display:flex;flex-direction:column}:host .hemfixarna_product--grid ul{display:flex;flex-direction:column;gap:0.25rem}:host .hemfixarna_product p{margin:0}:host .hemfixarna_product--top{display:flex;gap:2rem}:host .hemfixarna_product--top>div{width:100%}:host .hemfixarna_product--top>div h1{max-width:80%}@media (max-width: 768px){:host .hemfixarna_product--top>div h1{max-width:100%}}:host .hemfixarna_product--top h4{margin-bottom:0.5rem}:host h5,:host p{margin:0}:host input[type=submit]{cursor:pointer}:host input[type=date]~label{left:3.5rem}:host input[type=date]{border:1px solid #fcd9c9;padding-left:4rem}:host input[type=checkbox]{height:1.125rem;width:1.125rem;border:1px solid #fcd9c9}:host input[type=checkbox]:checked{background:red}:host input[type=date]::-webkit-calendar-picker-indicator{background:transparent;bottom:0;color:transparent;cursor:pointer;height:auto;left:0;position:absolute;right:0;top:0;width:auto}:host button,:host a{cursor:pointer;background:none;border:none}:host ul{list-style:none;margin:0;padding:0}";
718
+ const hemfixarnaCss = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap\"); *{box-sizing:border-box}:host{font-family:\"Inter\", sans-serif}:host .mb-2{margin-bottom:32px}:host button{color:#474444}:host form{display:flex;flex-direction:column;gap:16px}:host form img{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none}:host form img:first-of-type{left:16px}:host form img:last-of-type{right:16px}:host form span{margin-top:-8px;color:#ec6632}:host form p{text-align:center}:host form p{margin:0}:host form div{position:relative}:host form div label{pointer-events:none;position:absolute;left:16px;top:50%;transform:translateY(-50%);background:#fff;padding:4px;transition:0.2s all cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host form div input{padding:16px;width:100%;font-size:16px;border:1px solid #fcd9c9}:host form div input:focus~label,:host form div .input_active~label{top:0;transform:translateY(-50%);background:linear-gradient(180deg, #fffaf2 50%, #fff 50%)}:host h1{font-size:24px;font-weight:400;line-height:32px;letter-spacing:-3%;text-align:left;margin:0 0 8px}:host h2{margin:0 0 24px;font-weight:700;font-size:20px;line-height:28px;letter-spacing:-3%}:host p{font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna{width:100%;}:host .hemfixarna_nav{position:absolute;top:0;width:100dvw;left:0;height:80px;z-index:9999}:host .hemfixarna_nav--links{display:none !important}@media (min-width: 769px){:host .hemfixarna_nav--links{display:flex !important}}:host .hemfixarna_nav--links a{color:#ec6632;text-decoration:none;border:1px solid rgba(255, 255, 255, 0.3);border-radius:56px;padding:8px 32px}:host .hemfixarna_nav>div{position:relative;overflow:hidden;width:100%;height:100%;display:flex;justify-content:space-between;align-items:center;padding:0 16px}@media (min-width: 769px){:host .hemfixarna_nav>div{padding:0 32px}}:host .hemfixarna_nav>div>div{display:flex;gap:32px;justify-content:space-between}:host .hemfixarna_nav>div>img{position:absolute;width:100%;height:100%;top:0;left:0;z-index:-1}:host .hemfixarna_nav p{color:#fff}:host .hemfixarna_standalone .hemfixarna_backdrop{background:#fffaf2;opacity:1}:host .hemfixarna_standalone .hemfixarna_modal{top:80px;transform:translateX(-50%);border:none;height:calc(100dvh - 80px);opacity:0}:host .hemfixarna_standalone .hemfixarna_modal--open{opacity:1}:host .hemfixarna .switch{position:relative;display:inline-block;width:40px;height:20px}:host .hemfixarna .switch input{opacity:0;width:0;height:0}:host .hemfixarna .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:0.4s;transition:0.4s;border-radius:34px}:host .hemfixarna .slider:before{position:absolute;content:\"\";height:18px;width:18px;left:2px;bottom:1px;background-color:white;-webkit-transition:0.4s;transition:0.4s;border-radius:50%}:host .hemfixarna input:checked+.slider{background-color:#fcd9c9}:host .hemfixarna input:focus+.slider{box-shadow:0 0 1px #fcd9c9}:host .hemfixarna input:checked+.slider:before{-webkit-transform:translateX(18px);-ms-transform:translateX(18px);transform:translateX(18px);background:#ec6632}:host .hemfixarna_checkbox{display:grid;grid-template-columns:40px auto;font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna_checkbox>span{transform:translateY(6px)}:host .hemfixarna_checkbox span,:host .hemfixarna_checkbox span p{color:#474444;font-size:14px}:host .hemfixarna_checkbox p{text-align:left}:host .hemfixarna_info{display:flex;flex-direction:column;gap:24px;padding:32px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);border-radius:4px;border:1px solid #fcd9c9}:host .hemfixarna_info h2{margin:0}@media (min-width: 769px){:host .hemfixarna_info{position:sticky;top:0}}:host .hemfixarna_infomodal{position:absolute;top:40%;left:50%;transform:translate(-50%, -50%);width:100%;max-width:80%;background:#fffaf2;border:1px solid #fcd9c9;padding:32px;z-index:99;border-radius:4px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;flex-direction:column;gap:16px}:host .hemfixarna_infomodal p,:host .hemfixarna_infomodal h4{margin:0}:host .hemfixarna_infomodal button{background:#ec6632;color:#fff;border-radius:60px;font-size:16px;padding:8px 16px}:host .hemfixarna_addressinfo{padding:16px 16px 64px;border:1px solid #fcd9c9;position:relative;margin-bottom:32px;display:grid;grid-template-columns:1fr;gap:8px}@media (min-width: 769px){:host .hemfixarna_addressinfo{grid-template-columns:1fr 1fr}}:host .hemfixarna_addressinfo button{position:absolute;bottom:16px;right:16px;font-weight:500;text-underline-offset:2px;text-decoration:underline}:host .hemfixarna_part{background:#fff;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:grid;padding:16px;grid-template-columns:auto 75px}:host .hemfixarna_counter{display:flex;align-items:center}:host .hemfixarna_counter span{padding:0 8px}:host .hemfixarna_counter img{cursor:pointer}:host .hemfixarna_counter img:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_description{display:grid;gap:16px}:host .hemfixarna_description ul{list-style:disc;padding-right:12px;transform:translateX(12px)}:host .hemfixarna_description--hidden{max-height:140px;overflow:hidden;position:relative;cursor:pointer}:host .hemfixarna_description--hidden::after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:128px;background:linear-gradient(180deg, rgba(255, 253, 250, 0), rgba(255, 253, 250, 0.46) 50%, #fffaf2)}:host .hemfixarna_terms{font-size:14px}:host .hemfixarna_terms a{color:inherit}:host .hemfixarna_logo{height:64px}:host .hemfixarna_box{padding:16px;display:flex;align-items:center;justify-content:space-between;background:#fffaf2;border:1px solid #fcd9c9;width:100%;box-sizing:border-box;border-radius:4px;gap:16px 8px}:host .hemfixarna_box>div{display:grid;gap:8px}:host .hemfixarna_btn,:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{border:none;border-radius:60px;font-weight:600;letter-spacing:0.5px;line-height:20px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn:not(.disabled):hover,:host .hemfixarna_buy:not(.disabled):hover,:host .hemfixarna input[type=submit]:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn{font-size:14px;background:#c84e18;color:#fff;padding:16px 24px;white-space:nowrap;position:relative}:host .hemfixarna_btn span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-8px;right:-12px}:host .hemfixarna_btn span{background:#25a710;color:#fff;right:0 !important}:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{font-size:21px;background:#25a710;color:#fff;padding:16px 24px}:host .hemfixarna .disabled{opacity:0.5;cursor:default}:host .hemfixarna_modal{position:fixed;background:#fffaf2;border:1px solid #fcd9c9;border-radius:4px;top:50%;left:50%;z-index:1000;transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);transform:translate(-50%, -50%) scale(0.7);opacity:0;height:92%;width:92%;max-width:920px;display:flex;flex-direction:column;gap:8px}:host .hemfixarna_modal--open{opacity:1;transform:translate(-50%, -50%) scale(1)}:host .hemfixarna_backdrop{z-index:999;position:fixed;background:#474444;top:0;left:0;bottom:0;right:0;opacity:0;transition:transform 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946), opacity 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host .hemfixarna_backdrop--open{opacity:0.3}:host .hemfixarna_order{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;background-repeat:no-repeat !important;background-size:cover !important;background-position:center !important;display:grid;grid-template-columns:1fr 1fr;padding:48px 32px 64px}@media (max-width: 768px){:host .hemfixarna_order{grid-template-columns:1fr;grid-template-rows:0 auto}}:host .hemfixarna_order>div:last-of-type{background:#fffaf2;padding:32px;display:flex;flex-direction:column;max-height:100%;overflow:auto}:host .hemfixarna_order img{cursor:pointer}:host .hemfixarna_order button{margin:16px 0;padding:0;text-decoration:underline;text-underline-offset:2px;font-size:14px;font-weight:600}:host .hemfixarna_cart{display:grid;grid-template-columns:1fr 1fr;gap:32px}@media (max-width: 768px){:host .hemfixarna_cart{grid-template-columns:1fr;gap:0}}:host .hemfixarna_cart--right h2,:host .hemfixarna_cart--left h2{display:flex;align-items:center}:host .hemfixarna_cart--right h2 img,:host .hemfixarna_cart--left h2 img{margin-top:3.2px}@media (min-width: 769px){:host .hemfixarna_cart--left h2 button{display:none}}@media (max-width: 768px){:host .hemfixarna_cart--right h2 button{display:none}}:host .hemfixarna_cart--startfee{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot div{display:flex;gap:16px;align-items:center}:host .hemfixarna_cart--additional{display:flex;flex-direction:column;gap:16px;padding:16px;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--additional p{font-size:14px}:host .hemfixarna_cart--additional strong{text-decoration:underline;text-underline-offset:2px;cursor:pointer;position:relative}:host .hemfixarna_cart--additional strong img{position:absolute;top:50%;transform:translateY(-50%);right:-24px}:host .hemfixarna_cart--price{border-top:1px solid #fcd9c9;padding:16px;display:flex;justify-content:space-between}:host .hemfixarna_cart--price h3{margin:0}:host .hemfixarna_cart--item{display:flex;flex-direction:column;gap:8px;padding:16px 0;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--item>div{display:flex;justify-content:space-between}:host .hemfixarna_cart--item>div>div{display:flex;align-items:center;gap:16px}:host .hemfixarna_cart--item>div button{color:#ec6632}:host .hemfixarna_categories{display:grid;gap:24px}:host .hemfixarna_categories--wrapper{gap:32px;display:grid;grid-template-columns:1fr 1fr}@media (max-width: 768px){:host .hemfixarna_categories--wrapper{grid-template-columns:1fr}}:host .hemfixarna_categories li{position:relative;background:#fff;border-radius:4px;min-height:132px;padding:24px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;align-items:center;gap:24px;cursor:pointer}:host .hemfixarna_categories li:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_categories li>button{height:100%;width:100%}:host .hemfixarna_categories li .price{font-weight:700}:host .hemfixarna_content{height:100%;overflow:auto;padding:0 32px 64px}:host .hemfixarna_content--5{padding-top:16px}:host .hemfixarna_crumbs{position:relative;padding:16px 24px;border-bottom:1px solid #fcd9c9;display:flex;justify-content:space-between}:host .hemfixarna_crumbs--back{padding:16px 24px 8px;display:flex;align-items:center;gap:8px;box-shadow:none !important}:host .hemfixarna_crumbs--back:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs img{cursor:pointer}:host .hemfixarna_crumbs .close{position:absolute;right:-16px;top:-16px;z-index:9}:host .hemfixarna_crumbs .cart{padding-left:16px;position:relative}:host .hemfixarna_crumbs .cart img{cursor:inherit}:host .hemfixarna_crumbs .cart span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-8px;right:-12px}:host .hemfixarna_crumbs .cart_active{cursor:pointer}:host .hemfixarna_crumbs .cart_active span{background:#25a710;color:#fff}:host .hemfixarna_crumbs--links{display:flex;align-items:center;gap:16px;overflow:auto}@media (min-width: 769px){:host .hemfixarna_crumbs--links{-ms-overflow-style:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar{display:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar-button{display:none}}:host .hemfixarna_crumbs button{white-space:nowrap;background:#f1ded6;border-radius:64px;padding:12px 16px;font-size:12px;font-weight:600;letter-spacing:0.3px;box-shadow:none !important}:host .hemfixarna_crumbs button:not(.active):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs .active{background:#fffaf2;cursor:default}:host .hemfixarna_features{gap:12px !important}:host .hemfixarna_features li{display:flex;gap:16px;align-items:center}:host .hemfixarna_address{margin-bottom:16px}:host .hemfixarna_product{display:grid;gap:16px}:host .hemfixarna_product--link{font-weight:700;color:#474444;text-underline-offset:4px}:host .hemfixarna_product--left{gap:32px}:host .hemfixarna_product--right{gap:32px}:host .hemfixarna_product--price{margin-top:4px;font-weight:700}:host .hemfixarna_product--total{text-align:center;margin:-16px 0;font-size:21px;line-height:28px}:host .hemfixarna_product--item{background:#fff;padding:16px;display:grid;grid-template-columns:auto 75px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_product--grid{display:grid;grid-template-columns:1fr 1fr;gap:32px}@media (max-width: 768px){:host .hemfixarna_product--grid{grid-template-columns:1fr}}:host .hemfixarna_product--grid>div{display:flex;flex-direction:column}:host .hemfixarna_product--grid ul{display:flex;flex-direction:column;gap:4px}:host .hemfixarna_product p{margin:0}:host .hemfixarna_product--top{display:flex;gap:32px}:host .hemfixarna_product--top>div{width:100%}:host .hemfixarna_product--top>div h1{max-width:80%}@media (max-width: 768px){:host .hemfixarna_product--top>div h1{max-width:100%}}:host .hemfixarna_product--top h4{margin-bottom:8px}:host h5,:host p{margin:0}:host input[type=submit]{cursor:pointer}:host input[type=date]~label{left:56px}:host input[type=date]{border:1px solid #fcd9c9;padding-left:64px}:host input[type=checkbox]{height:18px;width:18px;border:1px solid #fcd9c9}:host input[type=checkbox]:checked{background:red}:host input[type=date]::-webkit-calendar-picker-indicator{background:transparent;bottom:0;color:transparent;cursor:pointer;height:auto;left:0;position:absolute;right:0;top:0;width:auto}:host button,:host a{cursor:pointer;background:none;border:none}:host ul{list-style:none;margin:0;padding:0}";
719
719
 
720
720
  const HemfixarnaComponent = class {
721
721
  constructor(hostRef) {
@@ -928,7 +928,7 @@ const HemfixarnaComponent = class {
928
928
  };
929
929
  HemfixarnaComponent.style = hemfixarnaCss;
930
930
 
931
- const hemfixarnaDemoCss = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap\"); :host{font-family:\"Inter\", sans-serif}:host .hemfixarna_example{margin-bottom:1rem;background:#000;padding:1rem;color:#fff;display:flex;justify-content:space-between;cursor:pointer;max-width:500px;box-sizing:border-box;position:relative}:host .hemfixarna_example--tooltip{background:#000;top:-3rem;font-size:16px;left:40%;color:white;padding:0.5rem;position:absolute;opacity:0}:host .hemfixarna_example--tooltip::after{content:\"\";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}:host .hemfixarna_example:hover .hemfixarna_example--tooltip{opacity:1}:host .hemfixarna_example p{font-size:14px}:host .hemfixarna_example img{filter:invert(1)}:host .hemfixarna_install{display:grid;gap:0.5rem;margin-top:1rem}:host .hemfixarna_product--label{background:#e1e0f5}:host .hemfixarna_categories{max-height:100%;overflow:auto;position:relative}:host .hemfixarna_categories--label{display:flex;align-items:center;justify-content:space-between;padding:0.5rem}:host .hemfixarna_categories--label button{background:#3f3a92;border:none;font-weight:600;padding:0.2rem 0.6rem;border-radius:10px;margin-right:0.5rem;color:#ece8e8}:host .hemfixarna_categories--label button:active{transform:scale(0.95)}:host .hemfixarna_categories--label--big{font-weight:600;border-bottom:1px solid black}:host p{margin:0}:host span{color:darkolivegreen;font-size:10px}:host button{cursor:pointer}:host>div{display:grid;gap:2rem;width:100%;grid-template-columns:1fr 1fr;height:100vh;place-items:center;overflow:hidden;padding:1rem 2rem;box-sizing:border-box}:host>div>*{width:100%}:host>div>div{max-width:500px}:host>div ul{margin:0;padding:0;list-style:none}:host>div ul ul{gap:1px;display:grid}:host>div ul li{padding-left:1rem;background:#fff}";
931
+ const hemfixarnaDemoCss = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap\"); :host{font-family:\"Inter\", sans-serif}:host .hemfixarna_example{margin-bottom:16px;background:#000;padding:16px;color:#fff;display:flex;justify-content:space-between;cursor:pointer;max-width:500px;box-sizing:border-box;position:relative}:host .hemfixarna_example--tooltip{background:#000;top:-48px;font-size:16px;left:40%;color:white;padding:8px;position:absolute;opacity:0}:host .hemfixarna_example--tooltip::after{content:\"\";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}:host .hemfixarna_example:hover .hemfixarna_example--tooltip{opacity:1}:host .hemfixarna_example p{font-size:14px}:host .hemfixarna_example img{filter:invert(1)}:host .hemfixarna_install{display:grid;gap:8px;margin-top:16px}:host .hemfixarna_product--label{background:#e1e0f5}:host .hemfixarna_categories{max-height:100%;overflow:auto;position:relative}:host .hemfixarna_categories--label{display:flex;align-items:center;justify-content:space-between;padding:8px}:host .hemfixarna_categories--label button{background:#3f3a92;border:none;font-weight:600;padding:3.2px 9.6px;border-radius:10px;margin-right:8px;color:#ece8e8}:host .hemfixarna_categories--label button:active{transform:scale(0.95)}:host .hemfixarna_categories--label--big{font-weight:600;border-bottom:1px solid black}:host p{margin:0}:host span{color:darkolivegreen;font-size:10px}:host button{cursor:pointer}:host>div{display:grid;gap:32px;width:100%;grid-template-columns:1fr 1fr;height:100vh;place-items:center;overflow:hidden;padding:16px 32px;box-sizing:border-box}:host>div>*{width:100%}:host>div>div{max-width:500px}:host>div ul{margin:0;padding:0;list-style:none}:host>div ul ul{gap:1px;display:grid}:host>div ul li{padding-left:16px;background:#fff}";
932
932
 
933
933
  const MyComponent$4 = class {
934
934
  constructor(hostRef) {
@@ -7,7 +7,7 @@
7
7
  font-family: "Inter", sans-serif;
8
8
  }
9
9
  :host .mb-2 {
10
- margin-bottom: 2rem;
10
+ margin-bottom: 32px;
11
11
  }
12
12
  :host button {
13
13
  color: #474444;
@@ -15,7 +15,7 @@
15
15
  :host form {
16
16
  display: flex;
17
17
  flex-direction: column;
18
- gap: 1rem;
18
+ gap: 16px;
19
19
  }
20
20
  :host form img {
21
21
  position: absolute;
@@ -24,13 +24,13 @@
24
24
  pointer-events: none;
25
25
  }
26
26
  :host form img:first-of-type {
27
- left: 1rem;
27
+ left: 16px;
28
28
  }
29
29
  :host form img:last-of-type {
30
- right: 1rem;
30
+ right: 16px;
31
31
  }
32
32
  :host form span {
33
- margin-top: -0.5rem;
33
+ margin-top: -8px;
34
34
  color: #ec6632;
35
35
  }
36
36
  :host form p {
@@ -45,17 +45,17 @@
45
45
  :host form div label {
46
46
  pointer-events: none;
47
47
  position: absolute;
48
- left: 1rem;
48
+ left: 16px;
49
49
  top: 50%;
50
50
  transform: translateY(-50%);
51
51
  background: #fff;
52
- padding: 0.25rem;
52
+ padding: 4px;
53
53
  transition: 0.2s all cubic-bezier(0.465, 0.183, 0.153, 0.946);
54
54
  }
55
55
  :host form div input {
56
- padding: 1rem;
56
+ padding: 16px;
57
57
  width: 100%;
58
- font-size: 1rem;
58
+ font-size: 16px;
59
59
  border: 1px solid #fcd9c9;
60
60
  }
61
61
  :host form div input:focus ~ label,
@@ -70,10 +70,10 @@
70
70
  line-height: 32px;
71
71
  letter-spacing: -3%;
72
72
  text-align: left;
73
- margin: 0 0 0.5rem;
73
+ margin: 0 0 8px;
74
74
  }
75
75
  :host h2 {
76
- margin: 0 0 1.5rem;
76
+ margin: 0 0 24px;
77
77
  font-weight: 700;
78
78
  font-size: 20px;
79
79
  line-height: 28px;
@@ -110,8 +110,8 @@
110
110
  color: #ec6632;
111
111
  text-decoration: none;
112
112
  border: 1px solid rgba(255, 255, 255, 0.3);
113
- border-radius: 3.5rem;
114
- padding: 0.5rem 2rem;
113
+ border-radius: 56px;
114
+ padding: 8px 32px;
115
115
  }
116
116
  :host .hemfixarna_nav > div {
117
117
  position: relative;
@@ -121,16 +121,16 @@
121
121
  display: flex;
122
122
  justify-content: space-between;
123
123
  align-items: center;
124
- padding: 0 1rem;
124
+ padding: 0 16px;
125
125
  }
126
126
  @media (min-width: 769px) {
127
127
  :host .hemfixarna_nav > div {
128
- padding: 0 2rem;
128
+ padding: 0 32px;
129
129
  }
130
130
  }
131
131
  :host .hemfixarna_nav > div > div {
132
132
  display: flex;
133
- gap: 2rem;
133
+ gap: 32px;
134
134
  justify-content: space-between;
135
135
  }
136
136
  :host .hemfixarna_nav > div > img {
@@ -207,7 +207,7 @@
207
207
  }
208
208
  :host .hemfixarna_checkbox {
209
209
  display: grid;
210
- grid-template-columns: 2.5rem auto;
210
+ grid-template-columns: 40px auto;
211
211
  font-size: 16px;
212
212
  font-weight: 400;
213
213
  line-height: 24px;
@@ -227,10 +227,10 @@
227
227
  :host .hemfixarna_info {
228
228
  display: flex;
229
229
  flex-direction: column;
230
- gap: 1.5rem;
231
- padding: 2rem;
230
+ gap: 24px;
231
+ padding: 32px;
232
232
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);
233
- border-radius: 0.25rem;
233
+ border-radius: 4px;
234
234
  border: 1px solid #fcd9c9;
235
235
  }
236
236
  :host .hemfixarna_info h2 {
@@ -251,13 +251,13 @@
251
251
  max-width: 80%;
252
252
  background: #fffaf2;
253
253
  border: 1px solid #fcd9c9;
254
- padding: 2rem;
254
+ padding: 32px;
255
255
  z-index: 99;
256
- border-radius: 0.25rem;
256
+ border-radius: 4px;
257
257
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);
258
258
  display: flex;
259
259
  flex-direction: column;
260
- gap: 1rem;
260
+ gap: 16px;
261
261
  }
262
262
  :host .hemfixarna_infomodal p,
263
263
  :host .hemfixarna_infomodal h4 {
@@ -268,16 +268,16 @@
268
268
  color: #fff;
269
269
  border-radius: 60px;
270
270
  font-size: 16px;
271
- padding: 0.5rem 1rem;
271
+ padding: 8px 16px;
272
272
  }
273
273
  :host .hemfixarna_addressinfo {
274
- padding: 1rem 1rem 4rem;
274
+ padding: 16px 16px 64px;
275
275
  border: 1px solid #fcd9c9;
276
276
  position: relative;
277
- margin-bottom: 2rem;
277
+ margin-bottom: 32px;
278
278
  display: grid;
279
279
  grid-template-columns: 1fr;
280
- gap: 0.5rem;
280
+ gap: 8px;
281
281
  }
282
282
  @media (min-width: 769px) {
283
283
  :host .hemfixarna_addressinfo {
@@ -286,8 +286,8 @@
286
286
  }
287
287
  :host .hemfixarna_addressinfo button {
288
288
  position: absolute;
289
- bottom: 1rem;
290
- right: 1rem;
289
+ bottom: 16px;
290
+ right: 16px;
291
291
  font-weight: 500;
292
292
  text-underline-offset: 2px;
293
293
  text-decoration: underline;
@@ -296,7 +296,7 @@
296
296
  background: #fff;
297
297
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);
298
298
  display: grid;
299
- padding: 1rem;
299
+ padding: 16px;
300
300
  grid-template-columns: auto 75px;
301
301
  }
302
302
  :host .hemfixarna_counter {
@@ -304,7 +304,7 @@
304
304
  align-items: center;
305
305
  }
306
306
  :host .hemfixarna_counter span {
307
- padding: 0 0.5rem;
307
+ padding: 0 8px;
308
308
  }
309
309
  :host .hemfixarna_counter img {
310
310
  cursor: pointer;
@@ -317,12 +317,12 @@
317
317
  }
318
318
  :host .hemfixarna_description {
319
319
  display: grid;
320
- gap: 1rem;
320
+ gap: 16px;
321
321
  }
322
322
  :host .hemfixarna_description ul {
323
323
  list-style: disc;
324
- padding-right: 0.75rem;
325
- transform: translateX(0.75rem);
324
+ padding-right: 12px;
325
+ transform: translateX(12px);
326
326
  }
327
327
  :host .hemfixarna_description--hidden {
328
328
  max-height: 140px;
@@ -336,7 +336,7 @@
336
336
  bottom: 0;
337
337
  left: 0;
338
338
  right: 0;
339
- height: 8rem;
339
+ height: 128px;
340
340
  background: linear-gradient(180deg, rgba(255, 253, 250, 0), rgba(255, 253, 250, 0.46) 50%, #fffaf2);
341
341
  }
342
342
  :host .hemfixarna_terms {
@@ -346,10 +346,10 @@
346
346
  color: inherit;
347
347
  }
348
348
  :host .hemfixarna_logo {
349
- height: 4rem;
349
+ height: 64px;
350
350
  }
351
351
  :host .hemfixarna_box {
352
- padding: 1rem;
352
+ padding: 16px;
353
353
  display: flex;
354
354
  align-items: center;
355
355
  justify-content: space-between;
@@ -357,12 +357,12 @@
357
357
  border: 1px solid #fcd9c9;
358
358
  width: 100%;
359
359
  box-sizing: border-box;
360
- border-radius: 0.25rem;
361
- gap: 1rem 0.5rem;
360
+ border-radius: 4px;
361
+ gap: 16px 8px;
362
362
  }
363
363
  :host .hemfixarna_box > div {
364
364
  display: grid;
365
- gap: 0.5rem;
365
+ gap: 8px;
366
366
  }
367
367
  :host .hemfixarna_btn, :host .hemfixarna_buy,
368
368
  :host .hemfixarna input[type=submit] {
@@ -384,7 +384,7 @@
384
384
  font-size: 14px;
385
385
  background: #c84e18;
386
386
  color: #fff;
387
- padding: 1rem 1.5rem;
387
+ padding: 16px 24px;
388
388
  white-space: nowrap;
389
389
  position: relative;
390
390
  }
@@ -400,8 +400,8 @@
400
400
  font-weight: 600;
401
401
  font-size: 13px;
402
402
  line-height: 11px;
403
- top: -0.5rem;
404
- right: -0.75rem;
403
+ top: -8px;
404
+ right: -12px;
405
405
  }
406
406
  :host .hemfixarna_btn span {
407
407
  background: #25a710;
@@ -413,7 +413,7 @@
413
413
  font-size: 21px;
414
414
  background: #25a710;
415
415
  color: #fff;
416
- padding: 1rem 1.5rem;
416
+ padding: 16px 24px;
417
417
  }
418
418
  :host .hemfixarna .disabled {
419
419
  opacity: 0.5;
@@ -423,7 +423,7 @@
423
423
  position: fixed;
424
424
  background: #fffaf2;
425
425
  border: 1px solid #fcd9c9;
426
- border-radius: 0.25rem;
426
+ border-radius: 4px;
427
427
  top: 50%;
428
428
  left: 50%;
429
429
  z-index: 1000;
@@ -435,7 +435,7 @@
435
435
  max-width: 920px;
436
436
  display: flex;
437
437
  flex-direction: column;
438
- gap: 0.5rem;
438
+ gap: 8px;
439
439
  }
440
440
  :host .hemfixarna_modal--open {
441
441
  opacity: 1;
@@ -466,7 +466,7 @@
466
466
  background-position: center !important;
467
467
  display: grid;
468
468
  grid-template-columns: 1fr 1fr;
469
- padding: 3rem 2rem 4rem;
469
+ padding: 48px 32px 64px;
470
470
  }
471
471
  @media (max-width: 768px) {
472
472
  :host .hemfixarna_order {
@@ -476,7 +476,7 @@
476
476
  }
477
477
  :host .hemfixarna_order > div:last-of-type {
478
478
  background: #fffaf2;
479
- padding: 2rem;
479
+ padding: 32px;
480
480
  display: flex;
481
481
  flex-direction: column;
482
482
  max-height: 100%;
@@ -486,7 +486,7 @@
486
486
  cursor: pointer;
487
487
  }
488
488
  :host .hemfixarna_order button {
489
- margin: 1rem 0;
489
+ margin: 16px 0;
490
490
  padding: 0;
491
491
  text-decoration: underline;
492
492
  text-underline-offset: 2px;
@@ -496,7 +496,7 @@
496
496
  :host .hemfixarna_cart {
497
497
  display: grid;
498
498
  grid-template-columns: 1fr 1fr;
499
- gap: 2rem;
499
+ gap: 32px;
500
500
  }
501
501
  @media (max-width: 768px) {
502
502
  :host .hemfixarna_cart {
@@ -509,7 +509,7 @@
509
509
  align-items: center;
510
510
  }
511
511
  :host .hemfixarna_cart--right h2 img, :host .hemfixarna_cart--left h2 img {
512
- margin-top: 0.2rem;
512
+ margin-top: 3.2px;
513
513
  }
514
514
  @media (min-width: 769px) {
515
515
  :host .hemfixarna_cart--left h2 button {
@@ -531,14 +531,14 @@
531
531
  }
532
532
  :host .hemfixarna_cart--rutrot div {
533
533
  display: flex;
534
- gap: 1rem;
534
+ gap: 16px;
535
535
  align-items: center;
536
536
  }
537
537
  :host .hemfixarna_cart--additional {
538
538
  display: flex;
539
539
  flex-direction: column;
540
- gap: 1rem;
541
- padding: 1rem;
540
+ gap: 16px;
541
+ padding: 16px;
542
542
  border-top: 1px solid #fcd9c9;
543
543
  }
544
544
  :host .hemfixarna_cart--additional p {
@@ -554,11 +554,11 @@
554
554
  position: absolute;
555
555
  top: 50%;
556
556
  transform: translateY(-50%);
557
- right: -1.5rem;
557
+ right: -24px;
558
558
  }
559
559
  :host .hemfixarna_cart--price {
560
560
  border-top: 1px solid #fcd9c9;
561
- padding: 1rem;
561
+ padding: 16px;
562
562
  display: flex;
563
563
  justify-content: space-between;
564
564
  }
@@ -568,8 +568,8 @@
568
568
  :host .hemfixarna_cart--item {
569
569
  display: flex;
570
570
  flex-direction: column;
571
- gap: 0.5rem;
572
- padding: 1rem 0;
571
+ gap: 8px;
572
+ padding: 16px 0;
573
573
  border-top: 1px solid #fcd9c9;
574
574
  }
575
575
  :host .hemfixarna_cart--item > div {
@@ -579,17 +579,17 @@
579
579
  :host .hemfixarna_cart--item > div > div {
580
580
  display: flex;
581
581
  align-items: center;
582
- gap: 1rem;
582
+ gap: 16px;
583
583
  }
584
584
  :host .hemfixarna_cart--item > div button {
585
585
  color: #ec6632;
586
586
  }
587
587
  :host .hemfixarna_categories {
588
588
  display: grid;
589
- gap: 1.5rem;
589
+ gap: 24px;
590
590
  }
591
591
  :host .hemfixarna_categories--wrapper {
592
- gap: 2rem;
592
+ gap: 32px;
593
593
  display: grid;
594
594
  grid-template-columns: 1fr 1fr;
595
595
  }
@@ -601,13 +601,13 @@
601
601
  :host .hemfixarna_categories li {
602
602
  position: relative;
603
603
  background: #fff;
604
- border-radius: 0.25rem;
604
+ border-radius: 4px;
605
605
  min-height: 132px;
606
- padding: 1.5rem;
606
+ padding: 24px;
607
607
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);
608
608
  display: flex;
609
609
  align-items: center;
610
- gap: 1.5rem;
610
+ gap: 24px;
611
611
  cursor: pointer;
612
612
  }
613
613
  :host .hemfixarna_categories li:hover {
@@ -626,23 +626,23 @@
626
626
  :host .hemfixarna_content {
627
627
  height: 100%;
628
628
  overflow: auto;
629
- padding: 0 2rem 4rem;
629
+ padding: 0 32px 64px;
630
630
  }
631
631
  :host .hemfixarna_content--5 {
632
- padding-top: 1rem;
632
+ padding-top: 16px;
633
633
  }
634
634
  :host .hemfixarna_crumbs {
635
635
  position: relative;
636
- padding: 1rem 1.5rem;
636
+ padding: 16px 24px;
637
637
  border-bottom: 1px solid #fcd9c9;
638
638
  display: flex;
639
639
  justify-content: space-between;
640
640
  }
641
641
  :host .hemfixarna_crumbs--back {
642
- padding: 1rem 1.5rem 0.5rem;
642
+ padding: 16px 24px 8px;
643
643
  display: flex;
644
644
  align-items: center;
645
- gap: 0.5rem;
645
+ gap: 8px;
646
646
  box-shadow: none !important;
647
647
  }
648
648
  :host .hemfixarna_crumbs--back:hover {
@@ -656,12 +656,12 @@
656
656
  }
657
657
  :host .hemfixarna_crumbs .close {
658
658
  position: absolute;
659
- right: -1rem;
660
- top: -1rem;
659
+ right: -16px;
660
+ top: -16px;
661
661
  z-index: 9;
662
662
  }
663
663
  :host .hemfixarna_crumbs .cart {
664
- padding-left: 1rem;
664
+ padding-left: 16px;
665
665
  position: relative;
666
666
  }
667
667
  :host .hemfixarna_crumbs .cart img {
@@ -679,8 +679,8 @@
679
679
  font-weight: 600;
680
680
  font-size: 13px;
681
681
  line-height: 11px;
682
- top: -0.5rem;
683
- right: -0.75rem;
682
+ top: -8px;
683
+ right: -12px;
684
684
  }
685
685
  :host .hemfixarna_crumbs .cart_active {
686
686
  cursor: pointer;
@@ -692,7 +692,7 @@
692
692
  :host .hemfixarna_crumbs--links {
693
693
  display: flex;
694
694
  align-items: center;
695
- gap: 1rem;
695
+ gap: 16px;
696
696
  overflow: auto;
697
697
  }
698
698
  @media (min-width: 769px) {
@@ -709,8 +709,8 @@
709
709
  :host .hemfixarna_crumbs button {
710
710
  white-space: nowrap;
711
711
  background: #f1ded6;
712
- border-radius: 4rem;
713
- padding: 0.75rem 1rem;
712
+ border-radius: 64px;
713
+ padding: 12px 16px;
714
714
  font-size: 12px;
715
715
  font-weight: 600;
716
716
  letter-spacing: 0.3px;
@@ -727,44 +727,44 @@
727
727
  cursor: default;
728
728
  }
729
729
  :host .hemfixarna_features {
730
- gap: 0.75rem !important;
730
+ gap: 12px !important;
731
731
  }
732
732
  :host .hemfixarna_features li {
733
733
  display: flex;
734
- gap: 1rem;
734
+ gap: 16px;
735
735
  align-items: center;
736
736
  }
737
737
  :host .hemfixarna_address {
738
- margin-bottom: 1rem;
738
+ margin-bottom: 16px;
739
739
  }
740
740
  :host .hemfixarna_product {
741
741
  display: grid;
742
- gap: 1rem;
742
+ gap: 16px;
743
743
  }
744
744
  :host .hemfixarna_product--link {
745
745
  font-weight: 700;
746
746
  color: #474444;
747
- text-underline-offset: 0.25rem;
747
+ text-underline-offset: 4px;
748
748
  }
749
749
  :host .hemfixarna_product--left {
750
- gap: 2rem;
750
+ gap: 32px;
751
751
  }
752
752
  :host .hemfixarna_product--right {
753
- gap: 2rem;
753
+ gap: 32px;
754
754
  }
755
755
  :host .hemfixarna_product--price {
756
- margin-top: 0.25rem;
756
+ margin-top: 4px;
757
757
  font-weight: 700;
758
758
  }
759
759
  :host .hemfixarna_product--total {
760
760
  text-align: center;
761
- margin: -1rem 0;
761
+ margin: -16px 0;
762
762
  font-size: 21px;
763
763
  line-height: 28px;
764
764
  }
765
765
  :host .hemfixarna_product--item {
766
766
  background: #fff;
767
- padding: 1rem;
767
+ padding: 16px;
768
768
  display: grid;
769
769
  grid-template-columns: auto 75px;
770
770
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);
@@ -772,7 +772,7 @@
772
772
  :host .hemfixarna_product--grid {
773
773
  display: grid;
774
774
  grid-template-columns: 1fr 1fr;
775
- gap: 2rem;
775
+ gap: 32px;
776
776
  }
777
777
  @media (max-width: 768px) {
778
778
  :host .hemfixarna_product--grid {
@@ -786,14 +786,14 @@
786
786
  :host .hemfixarna_product--grid ul {
787
787
  display: flex;
788
788
  flex-direction: column;
789
- gap: 0.25rem;
789
+ gap: 4px;
790
790
  }
791
791
  :host .hemfixarna_product p {
792
792
  margin: 0;
793
793
  }
794
794
  :host .hemfixarna_product--top {
795
795
  display: flex;
796
- gap: 2rem;
796
+ gap: 32px;
797
797
  }
798
798
  :host .hemfixarna_product--top > div {
799
799
  width: 100%;
@@ -807,7 +807,7 @@
807
807
  }
808
808
  }
809
809
  :host .hemfixarna_product--top h4 {
810
- margin-bottom: 0.5rem;
810
+ margin-bottom: 8px;
811
811
  }
812
812
  :host h5,
813
813
  :host p {
@@ -817,15 +817,15 @@
817
817
  cursor: pointer;
818
818
  }
819
819
  :host input[type=date] ~ label {
820
- left: 3.5rem;
820
+ left: 56px;
821
821
  }
822
822
  :host input[type=date] {
823
823
  border: 1px solid #fcd9c9;
824
- padding-left: 4rem;
824
+ padding-left: 64px;
825
825
  }
826
826
  :host input[type=checkbox] {
827
- height: 1.125rem;
828
- width: 1.125rem;
827
+ height: 18px;
828
+ width: 18px;
829
829
  border: 1px solid #fcd9c9;
830
830
  }
831
831
  :host input[type=checkbox]:checked {
@@ -3,9 +3,9 @@
3
3
  font-family: "Inter", sans-serif;
4
4
  }
5
5
  :host .hemfixarna_example {
6
- margin-bottom: 1rem;
6
+ margin-bottom: 16px;
7
7
  background: #000;
8
- padding: 1rem;
8
+ padding: 16px;
9
9
  color: #fff;
10
10
  display: flex;
11
11
  justify-content: space-between;
@@ -16,11 +16,11 @@
16
16
  }
17
17
  :host .hemfixarna_example--tooltip {
18
18
  background: #000;
19
- top: -3rem;
19
+ top: -48px;
20
20
  font-size: 16px;
21
21
  left: 40%;
22
22
  color: white;
23
- padding: 0.5rem;
23
+ padding: 8px;
24
24
  position: absolute;
25
25
  opacity: 0;
26
26
  }
@@ -45,8 +45,8 @@
45
45
  }
46
46
  :host .hemfixarna_install {
47
47
  display: grid;
48
- gap: 0.5rem;
49
- margin-top: 1rem;
48
+ gap: 8px;
49
+ margin-top: 16px;
50
50
  }
51
51
  :host .hemfixarna_product--label {
52
52
  background: #e1e0f5;
@@ -60,15 +60,15 @@
60
60
  display: flex;
61
61
  align-items: center;
62
62
  justify-content: space-between;
63
- padding: 0.5rem;
63
+ padding: 8px;
64
64
  }
65
65
  :host .hemfixarna_categories--label button {
66
66
  background: #3f3a92;
67
67
  border: none;
68
68
  font-weight: 600;
69
- padding: 0.2rem 0.6rem;
69
+ padding: 3.2px 9.6px;
70
70
  border-radius: 10px;
71
- margin-right: 0.5rem;
71
+ margin-right: 8px;
72
72
  color: #ece8e8;
73
73
  }
74
74
  :host .hemfixarna_categories--label button:active {
@@ -90,13 +90,13 @@
90
90
  }
91
91
  :host > div {
92
92
  display: grid;
93
- gap: 2rem;
93
+ gap: 32px;
94
94
  width: 100%;
95
95
  grid-template-columns: 1fr 1fr;
96
96
  height: 100vh;
97
97
  place-items: center;
98
98
  overflow: hidden;
99
- padding: 1rem 2rem;
99
+ padding: 16px 32px;
100
100
  box-sizing: border-box;
101
101
  }
102
102
  :host > div > * {
@@ -115,6 +115,6 @@
115
115
  display: grid;
116
116
  }
117
117
  :host > div ul li {
118
- padding-left: 1rem;
118
+ padding-left: 16px;
119
119
  background: #fff;
120
120
  }
@@ -711,7 +711,7 @@ const HemfixarnaCheckout = class {
711
711
  get el() { return getElement(this); }
712
712
  };
713
713
 
714
- const hemfixarnaCss = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap\"); *{box-sizing:border-box}:host{font-family:\"Inter\", sans-serif}:host .mb-2{margin-bottom:2rem}:host button{color:#474444}:host form{display:flex;flex-direction:column;gap:1rem}:host form img{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none}:host form img:first-of-type{left:1rem}:host form img:last-of-type{right:1rem}:host form span{margin-top:-0.5rem;color:#ec6632}:host form p{text-align:center}:host form p{margin:0}:host form div{position:relative}:host form div label{pointer-events:none;position:absolute;left:1rem;top:50%;transform:translateY(-50%);background:#fff;padding:0.25rem;transition:0.2s all cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host form div input{padding:1rem;width:100%;font-size:1rem;border:1px solid #fcd9c9}:host form div input:focus~label,:host form div .input_active~label{top:0;transform:translateY(-50%);background:linear-gradient(180deg, #fffaf2 50%, #fff 50%)}:host h1{font-size:24px;font-weight:400;line-height:32px;letter-spacing:-3%;text-align:left;margin:0 0 0.5rem}:host h2{margin:0 0 1.5rem;font-weight:700;font-size:20px;line-height:28px;letter-spacing:-3%}:host p{font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna{width:100%;}:host .hemfixarna_nav{position:absolute;top:0;width:100dvw;left:0;height:80px;z-index:9999}:host .hemfixarna_nav--links{display:none !important}@media (min-width: 769px){:host .hemfixarna_nav--links{display:flex !important}}:host .hemfixarna_nav--links a{color:#ec6632;text-decoration:none;border:1px solid rgba(255, 255, 255, 0.3);border-radius:3.5rem;padding:0.5rem 2rem}:host .hemfixarna_nav>div{position:relative;overflow:hidden;width:100%;height:100%;display:flex;justify-content:space-between;align-items:center;padding:0 1rem}@media (min-width: 769px){:host .hemfixarna_nav>div{padding:0 2rem}}:host .hemfixarna_nav>div>div{display:flex;gap:2rem;justify-content:space-between}:host .hemfixarna_nav>div>img{position:absolute;width:100%;height:100%;top:0;left:0;z-index:-1}:host .hemfixarna_nav p{color:#fff}:host .hemfixarna_standalone .hemfixarna_backdrop{background:#fffaf2;opacity:1}:host .hemfixarna_standalone .hemfixarna_modal{top:80px;transform:translateX(-50%);border:none;height:calc(100dvh - 80px);opacity:0}:host .hemfixarna_standalone .hemfixarna_modal--open{opacity:1}:host .hemfixarna .switch{position:relative;display:inline-block;width:40px;height:20px}:host .hemfixarna .switch input{opacity:0;width:0;height:0}:host .hemfixarna .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:0.4s;transition:0.4s;border-radius:34px}:host .hemfixarna .slider:before{position:absolute;content:\"\";height:18px;width:18px;left:2px;bottom:1px;background-color:white;-webkit-transition:0.4s;transition:0.4s;border-radius:50%}:host .hemfixarna input:checked+.slider{background-color:#fcd9c9}:host .hemfixarna input:focus+.slider{box-shadow:0 0 1px #fcd9c9}:host .hemfixarna input:checked+.slider:before{-webkit-transform:translateX(18px);-ms-transform:translateX(18px);transform:translateX(18px);background:#ec6632}:host .hemfixarna_checkbox{display:grid;grid-template-columns:2.5rem auto;font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna_checkbox>span{transform:translateY(6px)}:host .hemfixarna_checkbox span,:host .hemfixarna_checkbox span p{color:#474444;font-size:14px}:host .hemfixarna_checkbox p{text-align:left}:host .hemfixarna_info{display:flex;flex-direction:column;gap:1.5rem;padding:2rem;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);border-radius:0.25rem;border:1px solid #fcd9c9}:host .hemfixarna_info h2{margin:0}@media (min-width: 769px){:host .hemfixarna_info{position:sticky;top:0}}:host .hemfixarna_infomodal{position:absolute;top:40%;left:50%;transform:translate(-50%, -50%);width:100%;max-width:80%;background:#fffaf2;border:1px solid #fcd9c9;padding:2rem;z-index:99;border-radius:0.25rem;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;flex-direction:column;gap:1rem}:host .hemfixarna_infomodal p,:host .hemfixarna_infomodal h4{margin:0}:host .hemfixarna_infomodal button{background:#ec6632;color:#fff;border-radius:60px;font-size:16px;padding:0.5rem 1rem}:host .hemfixarna_addressinfo{padding:1rem 1rem 4rem;border:1px solid #fcd9c9;position:relative;margin-bottom:2rem;display:grid;grid-template-columns:1fr;gap:0.5rem}@media (min-width: 769px){:host .hemfixarna_addressinfo{grid-template-columns:1fr 1fr}}:host .hemfixarna_addressinfo button{position:absolute;bottom:1rem;right:1rem;font-weight:500;text-underline-offset:2px;text-decoration:underline}:host .hemfixarna_part{background:#fff;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:grid;padding:1rem;grid-template-columns:auto 75px}:host .hemfixarna_counter{display:flex;align-items:center}:host .hemfixarna_counter span{padding:0 0.5rem}:host .hemfixarna_counter img{cursor:pointer}:host .hemfixarna_counter img:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_description{display:grid;gap:1rem}:host .hemfixarna_description ul{list-style:disc;padding-right:0.75rem;transform:translateX(0.75rem)}:host .hemfixarna_description--hidden{max-height:140px;overflow:hidden;position:relative;cursor:pointer}:host .hemfixarna_description--hidden::after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:8rem;background:linear-gradient(180deg, rgba(255, 253, 250, 0), rgba(255, 253, 250, 0.46) 50%, #fffaf2)}:host .hemfixarna_terms{font-size:14px}:host .hemfixarna_terms a{color:inherit}:host .hemfixarna_logo{height:4rem}:host .hemfixarna_box{padding:1rem;display:flex;align-items:center;justify-content:space-between;background:#fffaf2;border:1px solid #fcd9c9;width:100%;box-sizing:border-box;border-radius:0.25rem;gap:1rem 0.5rem}:host .hemfixarna_box>div{display:grid;gap:0.5rem}:host .hemfixarna_btn,:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{border:none;border-radius:60px;font-weight:600;letter-spacing:0.5px;line-height:20px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn:not(.disabled):hover,:host .hemfixarna_buy:not(.disabled):hover,:host .hemfixarna input[type=submit]:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn{font-size:14px;background:#c84e18;color:#fff;padding:1rem 1.5rem;white-space:nowrap;position:relative}:host .hemfixarna_btn span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-0.5rem;right:-0.75rem}:host .hemfixarna_btn span{background:#25a710;color:#fff;right:0 !important}:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{font-size:21px;background:#25a710;color:#fff;padding:1rem 1.5rem}:host .hemfixarna .disabled{opacity:0.5;cursor:default}:host .hemfixarna_modal{position:fixed;background:#fffaf2;border:1px solid #fcd9c9;border-radius:0.25rem;top:50%;left:50%;z-index:1000;transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);transform:translate(-50%, -50%) scale(0.7);opacity:0;height:92%;width:92%;max-width:920px;display:flex;flex-direction:column;gap:0.5rem}:host .hemfixarna_modal--open{opacity:1;transform:translate(-50%, -50%) scale(1)}:host .hemfixarna_backdrop{z-index:999;position:fixed;background:#474444;top:0;left:0;bottom:0;right:0;opacity:0;transition:transform 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946), opacity 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host .hemfixarna_backdrop--open{opacity:0.3}:host .hemfixarna_order{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;background-repeat:no-repeat !important;background-size:cover !important;background-position:center !important;display:grid;grid-template-columns:1fr 1fr;padding:3rem 2rem 4rem}@media (max-width: 768px){:host .hemfixarna_order{grid-template-columns:1fr;grid-template-rows:0 auto}}:host .hemfixarna_order>div:last-of-type{background:#fffaf2;padding:2rem;display:flex;flex-direction:column;max-height:100%;overflow:auto}:host .hemfixarna_order img{cursor:pointer}:host .hemfixarna_order button{margin:1rem 0;padding:0;text-decoration:underline;text-underline-offset:2px;font-size:14px;font-weight:600}:host .hemfixarna_cart{display:grid;grid-template-columns:1fr 1fr;gap:2rem}@media (max-width: 768px){:host .hemfixarna_cart{grid-template-columns:1fr;gap:0}}:host .hemfixarna_cart--right h2,:host .hemfixarna_cart--left h2{display:flex;align-items:center}:host .hemfixarna_cart--right h2 img,:host .hemfixarna_cart--left h2 img{margin-top:0.2rem}@media (min-width: 769px){:host .hemfixarna_cart--left h2 button{display:none}}@media (max-width: 768px){:host .hemfixarna_cart--right h2 button{display:none}}:host .hemfixarna_cart--startfee{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot div{display:flex;gap:1rem;align-items:center}:host .hemfixarna_cart--additional{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--additional p{font-size:14px}:host .hemfixarna_cart--additional strong{text-decoration:underline;text-underline-offset:2px;cursor:pointer;position:relative}:host .hemfixarna_cart--additional strong img{position:absolute;top:50%;transform:translateY(-50%);right:-1.5rem}:host .hemfixarna_cart--price{border-top:1px solid #fcd9c9;padding:1rem;display:flex;justify-content:space-between}:host .hemfixarna_cart--price h3{margin:0}:host .hemfixarna_cart--item{display:flex;flex-direction:column;gap:0.5rem;padding:1rem 0;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--item>div{display:flex;justify-content:space-between}:host .hemfixarna_cart--item>div>div{display:flex;align-items:center;gap:1rem}:host .hemfixarna_cart--item>div button{color:#ec6632}:host .hemfixarna_categories{display:grid;gap:1.5rem}:host .hemfixarna_categories--wrapper{gap:2rem;display:grid;grid-template-columns:1fr 1fr}@media (max-width: 768px){:host .hemfixarna_categories--wrapper{grid-template-columns:1fr}}:host .hemfixarna_categories li{position:relative;background:#fff;border-radius:0.25rem;min-height:132px;padding:1.5rem;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;align-items:center;gap:1.5rem;cursor:pointer}:host .hemfixarna_categories li:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_categories li>button{height:100%;width:100%}:host .hemfixarna_categories li .price{font-weight:700}:host .hemfixarna_content{height:100%;overflow:auto;padding:0 2rem 4rem}:host .hemfixarna_content--5{padding-top:1rem}:host .hemfixarna_crumbs{position:relative;padding:1rem 1.5rem;border-bottom:1px solid #fcd9c9;display:flex;justify-content:space-between}:host .hemfixarna_crumbs--back{padding:1rem 1.5rem 0.5rem;display:flex;align-items:center;gap:0.5rem;box-shadow:none !important}:host .hemfixarna_crumbs--back:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs img{cursor:pointer}:host .hemfixarna_crumbs .close{position:absolute;right:-1rem;top:-1rem;z-index:9}:host .hemfixarna_crumbs .cart{padding-left:1rem;position:relative}:host .hemfixarna_crumbs .cart img{cursor:inherit}:host .hemfixarna_crumbs .cart span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-0.5rem;right:-0.75rem}:host .hemfixarna_crumbs .cart_active{cursor:pointer}:host .hemfixarna_crumbs .cart_active span{background:#25a710;color:#fff}:host .hemfixarna_crumbs--links{display:flex;align-items:center;gap:1rem;overflow:auto}@media (min-width: 769px){:host .hemfixarna_crumbs--links{-ms-overflow-style:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar{display:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar-button{display:none}}:host .hemfixarna_crumbs button{white-space:nowrap;background:#f1ded6;border-radius:4rem;padding:0.75rem 1rem;font-size:12px;font-weight:600;letter-spacing:0.3px;box-shadow:none !important}:host .hemfixarna_crumbs button:not(.active):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs .active{background:#fffaf2;cursor:default}:host .hemfixarna_features{gap:0.75rem !important}:host .hemfixarna_features li{display:flex;gap:1rem;align-items:center}:host .hemfixarna_address{margin-bottom:1rem}:host .hemfixarna_product{display:grid;gap:1rem}:host .hemfixarna_product--link{font-weight:700;color:#474444;text-underline-offset:0.25rem}:host .hemfixarna_product--left{gap:2rem}:host .hemfixarna_product--right{gap:2rem}:host .hemfixarna_product--price{margin-top:0.25rem;font-weight:700}:host .hemfixarna_product--total{text-align:center;margin:-1rem 0;font-size:21px;line-height:28px}:host .hemfixarna_product--item{background:#fff;padding:1rem;display:grid;grid-template-columns:auto 75px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_product--grid{display:grid;grid-template-columns:1fr 1fr;gap:2rem}@media (max-width: 768px){:host .hemfixarna_product--grid{grid-template-columns:1fr}}:host .hemfixarna_product--grid>div{display:flex;flex-direction:column}:host .hemfixarna_product--grid ul{display:flex;flex-direction:column;gap:0.25rem}:host .hemfixarna_product p{margin:0}:host .hemfixarna_product--top{display:flex;gap:2rem}:host .hemfixarna_product--top>div{width:100%}:host .hemfixarna_product--top>div h1{max-width:80%}@media (max-width: 768px){:host .hemfixarna_product--top>div h1{max-width:100%}}:host .hemfixarna_product--top h4{margin-bottom:0.5rem}:host h5,:host p{margin:0}:host input[type=submit]{cursor:pointer}:host input[type=date]~label{left:3.5rem}:host input[type=date]{border:1px solid #fcd9c9;padding-left:4rem}:host input[type=checkbox]{height:1.125rem;width:1.125rem;border:1px solid #fcd9c9}:host input[type=checkbox]:checked{background:red}:host input[type=date]::-webkit-calendar-picker-indicator{background:transparent;bottom:0;color:transparent;cursor:pointer;height:auto;left:0;position:absolute;right:0;top:0;width:auto}:host button,:host a{cursor:pointer;background:none;border:none}:host ul{list-style:none;margin:0;padding:0}";
714
+ const hemfixarnaCss = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap\"); *{box-sizing:border-box}:host{font-family:\"Inter\", sans-serif}:host .mb-2{margin-bottom:32px}:host button{color:#474444}:host form{display:flex;flex-direction:column;gap:16px}:host form img{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none}:host form img:first-of-type{left:16px}:host form img:last-of-type{right:16px}:host form span{margin-top:-8px;color:#ec6632}:host form p{text-align:center}:host form p{margin:0}:host form div{position:relative}:host form div label{pointer-events:none;position:absolute;left:16px;top:50%;transform:translateY(-50%);background:#fff;padding:4px;transition:0.2s all cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host form div input{padding:16px;width:100%;font-size:16px;border:1px solid #fcd9c9}:host form div input:focus~label,:host form div .input_active~label{top:0;transform:translateY(-50%);background:linear-gradient(180deg, #fffaf2 50%, #fff 50%)}:host h1{font-size:24px;font-weight:400;line-height:32px;letter-spacing:-3%;text-align:left;margin:0 0 8px}:host h2{margin:0 0 24px;font-weight:700;font-size:20px;line-height:28px;letter-spacing:-3%}:host p{font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna{width:100%;}:host .hemfixarna_nav{position:absolute;top:0;width:100dvw;left:0;height:80px;z-index:9999}:host .hemfixarna_nav--links{display:none !important}@media (min-width: 769px){:host .hemfixarna_nav--links{display:flex !important}}:host .hemfixarna_nav--links a{color:#ec6632;text-decoration:none;border:1px solid rgba(255, 255, 255, 0.3);border-radius:56px;padding:8px 32px}:host .hemfixarna_nav>div{position:relative;overflow:hidden;width:100%;height:100%;display:flex;justify-content:space-between;align-items:center;padding:0 16px}@media (min-width: 769px){:host .hemfixarna_nav>div{padding:0 32px}}:host .hemfixarna_nav>div>div{display:flex;gap:32px;justify-content:space-between}:host .hemfixarna_nav>div>img{position:absolute;width:100%;height:100%;top:0;left:0;z-index:-1}:host .hemfixarna_nav p{color:#fff}:host .hemfixarna_standalone .hemfixarna_backdrop{background:#fffaf2;opacity:1}:host .hemfixarna_standalone .hemfixarna_modal{top:80px;transform:translateX(-50%);border:none;height:calc(100dvh - 80px);opacity:0}:host .hemfixarna_standalone .hemfixarna_modal--open{opacity:1}:host .hemfixarna .switch{position:relative;display:inline-block;width:40px;height:20px}:host .hemfixarna .switch input{opacity:0;width:0;height:0}:host .hemfixarna .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:0.4s;transition:0.4s;border-radius:34px}:host .hemfixarna .slider:before{position:absolute;content:\"\";height:18px;width:18px;left:2px;bottom:1px;background-color:white;-webkit-transition:0.4s;transition:0.4s;border-radius:50%}:host .hemfixarna input:checked+.slider{background-color:#fcd9c9}:host .hemfixarna input:focus+.slider{box-shadow:0 0 1px #fcd9c9}:host .hemfixarna input:checked+.slider:before{-webkit-transform:translateX(18px);-ms-transform:translateX(18px);transform:translateX(18px);background:#ec6632}:host .hemfixarna_checkbox{display:grid;grid-template-columns:40px auto;font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna_checkbox>span{transform:translateY(6px)}:host .hemfixarna_checkbox span,:host .hemfixarna_checkbox span p{color:#474444;font-size:14px}:host .hemfixarna_checkbox p{text-align:left}:host .hemfixarna_info{display:flex;flex-direction:column;gap:24px;padding:32px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);border-radius:4px;border:1px solid #fcd9c9}:host .hemfixarna_info h2{margin:0}@media (min-width: 769px){:host .hemfixarna_info{position:sticky;top:0}}:host .hemfixarna_infomodal{position:absolute;top:40%;left:50%;transform:translate(-50%, -50%);width:100%;max-width:80%;background:#fffaf2;border:1px solid #fcd9c9;padding:32px;z-index:99;border-radius:4px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;flex-direction:column;gap:16px}:host .hemfixarna_infomodal p,:host .hemfixarna_infomodal h4{margin:0}:host .hemfixarna_infomodal button{background:#ec6632;color:#fff;border-radius:60px;font-size:16px;padding:8px 16px}:host .hemfixarna_addressinfo{padding:16px 16px 64px;border:1px solid #fcd9c9;position:relative;margin-bottom:32px;display:grid;grid-template-columns:1fr;gap:8px}@media (min-width: 769px){:host .hemfixarna_addressinfo{grid-template-columns:1fr 1fr}}:host .hemfixarna_addressinfo button{position:absolute;bottom:16px;right:16px;font-weight:500;text-underline-offset:2px;text-decoration:underline}:host .hemfixarna_part{background:#fff;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:grid;padding:16px;grid-template-columns:auto 75px}:host .hemfixarna_counter{display:flex;align-items:center}:host .hemfixarna_counter span{padding:0 8px}:host .hemfixarna_counter img{cursor:pointer}:host .hemfixarna_counter img:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_description{display:grid;gap:16px}:host .hemfixarna_description ul{list-style:disc;padding-right:12px;transform:translateX(12px)}:host .hemfixarna_description--hidden{max-height:140px;overflow:hidden;position:relative;cursor:pointer}:host .hemfixarna_description--hidden::after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:128px;background:linear-gradient(180deg, rgba(255, 253, 250, 0), rgba(255, 253, 250, 0.46) 50%, #fffaf2)}:host .hemfixarna_terms{font-size:14px}:host .hemfixarna_terms a{color:inherit}:host .hemfixarna_logo{height:64px}:host .hemfixarna_box{padding:16px;display:flex;align-items:center;justify-content:space-between;background:#fffaf2;border:1px solid #fcd9c9;width:100%;box-sizing:border-box;border-radius:4px;gap:16px 8px}:host .hemfixarna_box>div{display:grid;gap:8px}:host .hemfixarna_btn,:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{border:none;border-radius:60px;font-weight:600;letter-spacing:0.5px;line-height:20px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn:not(.disabled):hover,:host .hemfixarna_buy:not(.disabled):hover,:host .hemfixarna input[type=submit]:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn{font-size:14px;background:#c84e18;color:#fff;padding:16px 24px;white-space:nowrap;position:relative}:host .hemfixarna_btn span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-8px;right:-12px}:host .hemfixarna_btn span{background:#25a710;color:#fff;right:0 !important}:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{font-size:21px;background:#25a710;color:#fff;padding:16px 24px}:host .hemfixarna .disabled{opacity:0.5;cursor:default}:host .hemfixarna_modal{position:fixed;background:#fffaf2;border:1px solid #fcd9c9;border-radius:4px;top:50%;left:50%;z-index:1000;transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);transform:translate(-50%, -50%) scale(0.7);opacity:0;height:92%;width:92%;max-width:920px;display:flex;flex-direction:column;gap:8px}:host .hemfixarna_modal--open{opacity:1;transform:translate(-50%, -50%) scale(1)}:host .hemfixarna_backdrop{z-index:999;position:fixed;background:#474444;top:0;left:0;bottom:0;right:0;opacity:0;transition:transform 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946), opacity 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host .hemfixarna_backdrop--open{opacity:0.3}:host .hemfixarna_order{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;background-repeat:no-repeat !important;background-size:cover !important;background-position:center !important;display:grid;grid-template-columns:1fr 1fr;padding:48px 32px 64px}@media (max-width: 768px){:host .hemfixarna_order{grid-template-columns:1fr;grid-template-rows:0 auto}}:host .hemfixarna_order>div:last-of-type{background:#fffaf2;padding:32px;display:flex;flex-direction:column;max-height:100%;overflow:auto}:host .hemfixarna_order img{cursor:pointer}:host .hemfixarna_order button{margin:16px 0;padding:0;text-decoration:underline;text-underline-offset:2px;font-size:14px;font-weight:600}:host .hemfixarna_cart{display:grid;grid-template-columns:1fr 1fr;gap:32px}@media (max-width: 768px){:host .hemfixarna_cart{grid-template-columns:1fr;gap:0}}:host .hemfixarna_cart--right h2,:host .hemfixarna_cart--left h2{display:flex;align-items:center}:host .hemfixarna_cart--right h2 img,:host .hemfixarna_cart--left h2 img{margin-top:3.2px}@media (min-width: 769px){:host .hemfixarna_cart--left h2 button{display:none}}@media (max-width: 768px){:host .hemfixarna_cart--right h2 button{display:none}}:host .hemfixarna_cart--startfee{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot div{display:flex;gap:16px;align-items:center}:host .hemfixarna_cart--additional{display:flex;flex-direction:column;gap:16px;padding:16px;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--additional p{font-size:14px}:host .hemfixarna_cart--additional strong{text-decoration:underline;text-underline-offset:2px;cursor:pointer;position:relative}:host .hemfixarna_cart--additional strong img{position:absolute;top:50%;transform:translateY(-50%);right:-24px}:host .hemfixarna_cart--price{border-top:1px solid #fcd9c9;padding:16px;display:flex;justify-content:space-between}:host .hemfixarna_cart--price h3{margin:0}:host .hemfixarna_cart--item{display:flex;flex-direction:column;gap:8px;padding:16px 0;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--item>div{display:flex;justify-content:space-between}:host .hemfixarna_cart--item>div>div{display:flex;align-items:center;gap:16px}:host .hemfixarna_cart--item>div button{color:#ec6632}:host .hemfixarna_categories{display:grid;gap:24px}:host .hemfixarna_categories--wrapper{gap:32px;display:grid;grid-template-columns:1fr 1fr}@media (max-width: 768px){:host .hemfixarna_categories--wrapper{grid-template-columns:1fr}}:host .hemfixarna_categories li{position:relative;background:#fff;border-radius:4px;min-height:132px;padding:24px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;align-items:center;gap:24px;cursor:pointer}:host .hemfixarna_categories li:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_categories li>button{height:100%;width:100%}:host .hemfixarna_categories li .price{font-weight:700}:host .hemfixarna_content{height:100%;overflow:auto;padding:0 32px 64px}:host .hemfixarna_content--5{padding-top:16px}:host .hemfixarna_crumbs{position:relative;padding:16px 24px;border-bottom:1px solid #fcd9c9;display:flex;justify-content:space-between}:host .hemfixarna_crumbs--back{padding:16px 24px 8px;display:flex;align-items:center;gap:8px;box-shadow:none !important}:host .hemfixarna_crumbs--back:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs img{cursor:pointer}:host .hemfixarna_crumbs .close{position:absolute;right:-16px;top:-16px;z-index:9}:host .hemfixarna_crumbs .cart{padding-left:16px;position:relative}:host .hemfixarna_crumbs .cart img{cursor:inherit}:host .hemfixarna_crumbs .cart span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-8px;right:-12px}:host .hemfixarna_crumbs .cart_active{cursor:pointer}:host .hemfixarna_crumbs .cart_active span{background:#25a710;color:#fff}:host .hemfixarna_crumbs--links{display:flex;align-items:center;gap:16px;overflow:auto}@media (min-width: 769px){:host .hemfixarna_crumbs--links{-ms-overflow-style:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar{display:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar-button{display:none}}:host .hemfixarna_crumbs button{white-space:nowrap;background:#f1ded6;border-radius:64px;padding:12px 16px;font-size:12px;font-weight:600;letter-spacing:0.3px;box-shadow:none !important}:host .hemfixarna_crumbs button:not(.active):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs .active{background:#fffaf2;cursor:default}:host .hemfixarna_features{gap:12px !important}:host .hemfixarna_features li{display:flex;gap:16px;align-items:center}:host .hemfixarna_address{margin-bottom:16px}:host .hemfixarna_product{display:grid;gap:16px}:host .hemfixarna_product--link{font-weight:700;color:#474444;text-underline-offset:4px}:host .hemfixarna_product--left{gap:32px}:host .hemfixarna_product--right{gap:32px}:host .hemfixarna_product--price{margin-top:4px;font-weight:700}:host .hemfixarna_product--total{text-align:center;margin:-16px 0;font-size:21px;line-height:28px}:host .hemfixarna_product--item{background:#fff;padding:16px;display:grid;grid-template-columns:auto 75px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_product--grid{display:grid;grid-template-columns:1fr 1fr;gap:32px}@media (max-width: 768px){:host .hemfixarna_product--grid{grid-template-columns:1fr}}:host .hemfixarna_product--grid>div{display:flex;flex-direction:column}:host .hemfixarna_product--grid ul{display:flex;flex-direction:column;gap:4px}:host .hemfixarna_product p{margin:0}:host .hemfixarna_product--top{display:flex;gap:32px}:host .hemfixarna_product--top>div{width:100%}:host .hemfixarna_product--top>div h1{max-width:80%}@media (max-width: 768px){:host .hemfixarna_product--top>div h1{max-width:100%}}:host .hemfixarna_product--top h4{margin-bottom:8px}:host h5,:host p{margin:0}:host input[type=submit]{cursor:pointer}:host input[type=date]~label{left:56px}:host input[type=date]{border:1px solid #fcd9c9;padding-left:64px}:host input[type=checkbox]{height:18px;width:18px;border:1px solid #fcd9c9}:host input[type=checkbox]:checked{background:red}:host input[type=date]::-webkit-calendar-picker-indicator{background:transparent;bottom:0;color:transparent;cursor:pointer;height:auto;left:0;position:absolute;right:0;top:0;width:auto}:host button,:host a{cursor:pointer;background:none;border:none}:host ul{list-style:none;margin:0;padding:0}";
715
715
 
716
716
  const HemfixarnaComponent = class {
717
717
  constructor(hostRef) {
@@ -924,7 +924,7 @@ const HemfixarnaComponent = class {
924
924
  };
925
925
  HemfixarnaComponent.style = hemfixarnaCss;
926
926
 
927
- const hemfixarnaDemoCss = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap\"); :host{font-family:\"Inter\", sans-serif}:host .hemfixarna_example{margin-bottom:1rem;background:#000;padding:1rem;color:#fff;display:flex;justify-content:space-between;cursor:pointer;max-width:500px;box-sizing:border-box;position:relative}:host .hemfixarna_example--tooltip{background:#000;top:-3rem;font-size:16px;left:40%;color:white;padding:0.5rem;position:absolute;opacity:0}:host .hemfixarna_example--tooltip::after{content:\"\";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}:host .hemfixarna_example:hover .hemfixarna_example--tooltip{opacity:1}:host .hemfixarna_example p{font-size:14px}:host .hemfixarna_example img{filter:invert(1)}:host .hemfixarna_install{display:grid;gap:0.5rem;margin-top:1rem}:host .hemfixarna_product--label{background:#e1e0f5}:host .hemfixarna_categories{max-height:100%;overflow:auto;position:relative}:host .hemfixarna_categories--label{display:flex;align-items:center;justify-content:space-between;padding:0.5rem}:host .hemfixarna_categories--label button{background:#3f3a92;border:none;font-weight:600;padding:0.2rem 0.6rem;border-radius:10px;margin-right:0.5rem;color:#ece8e8}:host .hemfixarna_categories--label button:active{transform:scale(0.95)}:host .hemfixarna_categories--label--big{font-weight:600;border-bottom:1px solid black}:host p{margin:0}:host span{color:darkolivegreen;font-size:10px}:host button{cursor:pointer}:host>div{display:grid;gap:2rem;width:100%;grid-template-columns:1fr 1fr;height:100vh;place-items:center;overflow:hidden;padding:1rem 2rem;box-sizing:border-box}:host>div>*{width:100%}:host>div>div{max-width:500px}:host>div ul{margin:0;padding:0;list-style:none}:host>div ul ul{gap:1px;display:grid}:host>div ul li{padding-left:1rem;background:#fff}";
927
+ const hemfixarnaDemoCss = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap\"); :host{font-family:\"Inter\", sans-serif}:host .hemfixarna_example{margin-bottom:16px;background:#000;padding:16px;color:#fff;display:flex;justify-content:space-between;cursor:pointer;max-width:500px;box-sizing:border-box;position:relative}:host .hemfixarna_example--tooltip{background:#000;top:-48px;font-size:16px;left:40%;color:white;padding:8px;position:absolute;opacity:0}:host .hemfixarna_example--tooltip::after{content:\"\";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}:host .hemfixarna_example:hover .hemfixarna_example--tooltip{opacity:1}:host .hemfixarna_example p{font-size:14px}:host .hemfixarna_example img{filter:invert(1)}:host .hemfixarna_install{display:grid;gap:8px;margin-top:16px}:host .hemfixarna_product--label{background:#e1e0f5}:host .hemfixarna_categories{max-height:100%;overflow:auto;position:relative}:host .hemfixarna_categories--label{display:flex;align-items:center;justify-content:space-between;padding:8px}:host .hemfixarna_categories--label button{background:#3f3a92;border:none;font-weight:600;padding:3.2px 9.6px;border-radius:10px;margin-right:8px;color:#ece8e8}:host .hemfixarna_categories--label button:active{transform:scale(0.95)}:host .hemfixarna_categories--label--big{font-weight:600;border-bottom:1px solid black}:host p{margin:0}:host span{color:darkolivegreen;font-size:10px}:host button{cursor:pointer}:host>div{display:grid;gap:32px;width:100%;grid-template-columns:1fr 1fr;height:100vh;place-items:center;overflow:hidden;padding:16px 32px;box-sizing:border-box}:host>div>*{width:100%}:host>div>div{max-width:500px}:host>div ul{margin:0;padding:0;list-style:none}:host>div ul ul{gap:1px;display:grid}:host>div ul li{padding-left:16px;background:#fff}";
928
928
 
929
929
  const MyComponent$4 = class {
930
930
  constructor(hostRef) {
@@ -1,2 +1,2 @@
1
- import{p as r,b as e}from"./p-62a7c1a2.js";export{s as setNonce}from"./p-62a7c1a2.js";const o=()=>{const e=import.meta.url;const o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return r(o)};o().then((r=>e([["p-1adf10af",[[1,"hemfixarna-demo",{selectedSlug:[32],selectedID:[32],tooltipText:[32],tree:[32],customer:[32]}],[1,"hemfixarna-byggmax",{slug:[1],id:[1],forceOldTree:[4,"force-old-tree"],loadFromQuery:[4,"load-from-query"],tree:[32]}],[1,"hemfixarna-hornbach",{id:[1],loadFromQuery:[4,"load-from-query"],isDemo:[4,"is-demo"]}],[1,"hemfixarna-kund",{id:[1],loadFromQuery:[4,"load-from-query"]}],[1,"hemfixarna-skanska",{id:[1],customer:[1],loadFromQuery:[4,"load-from-query"]}],[1,"hemfixarna-string-furniture",{id:[1],loadFromQuery:[4,"load-from-query"]}],[1,"hemfixarna-component",{slug:[1],id:[1],business:[1],topCategory:[1,"top-category"],forceOldTree:[4,"force-old-tree"],loadFromQuery:[4,"load-from-query"],isDemo:[4,"is-demo"],nav:[16],modal:[32],showModal:[32],tree:[32],product:[32],proppedProduct:[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart",{tree:[16]}],[0,"hemfixarna-category"],[0,"hemfixarna-order",{tree:[16]}],[0,"hemfixarna-service"],[0,"hemfixarna-start",{tree:[16],slug:[1]}],[0,"hemfixarna-product",{amount:[32],hideDescription:[32]}],[0,"hemfixarna-breadcrumbs",{tree:[16],closeModal:[16],loadFromQuery:[4,"load-from-query"],isDemo:[4,"is-demo"]}],[0,"hemfixarna-checkout",{date:[32],dateError:[32],generalError:[32]}],[0,"hemfixarna-address",{street:[32],streetError:[32],zip:[32],zipError:[32],town:[32],townError:[32]}],[0,"hemfixarna-getuser",{email:[32],emailError:[32],phone:[32],phoneError:[32],ssn:[32],ssnError:[32]}],[0,"hemfixarna-orderrows",{cart:[4],tree:[16]}],[0,"hemfixarna-box",{post:[16],category:[16],icon:[1],postTitle:[1,"post-title"]}],[0,"hemfixarna-info",{list:[16]}]]]],r)));
1
+ import{p as r,b as e}from"./p-62a7c1a2.js";export{s as setNonce}from"./p-62a7c1a2.js";const o=()=>{const e=import.meta.url;const o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return r(o)};o().then((r=>e([["p-618089b8",[[1,"hemfixarna-demo",{selectedSlug:[32],selectedID:[32],tooltipText:[32],tree:[32],customer:[32]}],[1,"hemfixarna-byggmax",{slug:[1],id:[1],forceOldTree:[4,"force-old-tree"],loadFromQuery:[4,"load-from-query"],tree:[32]}],[1,"hemfixarna-hornbach",{id:[1],loadFromQuery:[4,"load-from-query"],isDemo:[4,"is-demo"]}],[1,"hemfixarna-kund",{id:[1],loadFromQuery:[4,"load-from-query"]}],[1,"hemfixarna-skanska",{id:[1],customer:[1],loadFromQuery:[4,"load-from-query"]}],[1,"hemfixarna-string-furniture",{id:[1],loadFromQuery:[4,"load-from-query"]}],[1,"hemfixarna-component",{slug:[1],id:[1],business:[1],topCategory:[1,"top-category"],forceOldTree:[4,"force-old-tree"],loadFromQuery:[4,"load-from-query"],isDemo:[4,"is-demo"],nav:[16],modal:[32],showModal:[32],tree:[32],product:[32],proppedProduct:[32]},[[0,"click","handleClick"]]],[0,"hemfixarna-cart",{tree:[16]}],[0,"hemfixarna-category"],[0,"hemfixarna-order",{tree:[16]}],[0,"hemfixarna-service"],[0,"hemfixarna-start",{tree:[16],slug:[1]}],[0,"hemfixarna-product",{amount:[32],hideDescription:[32]}],[0,"hemfixarna-breadcrumbs",{tree:[16],closeModal:[16],loadFromQuery:[4,"load-from-query"],isDemo:[4,"is-demo"]}],[0,"hemfixarna-checkout",{date:[32],dateError:[32],generalError:[32]}],[0,"hemfixarna-address",{street:[32],streetError:[32],zip:[32],zipError:[32],town:[32],townError:[32]}],[0,"hemfixarna-getuser",{email:[32],emailError:[32],phone:[32],phoneError:[32],ssn:[32],ssnError:[32]}],[0,"hemfixarna-orderrows",{cart:[4],tree:[16]}],[0,"hemfixarna-box",{post:[16],category:[16],icon:[1],postTitle:[1,"post-title"]}],[0,"hemfixarna-info",{list:[16]}]]]],r)));
2
2
  //# sourceMappingURL=hemfixarna-components.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{g as t,f as i,r as e,h as n,a as s,F as a,c as r}from"./p-62a7c1a2.js";const o=(t,i,e)=>{const n=t.get(i);if(!n){t.set(i,[e])}else if(!n.includes(e)){n.push(e)}};const l=(t,i)=>{let e;return(...n)=>{if(e){clearTimeout(e)}e=setTimeout((()=>{e=0;t(...n)}),i)}};const h=t=>!("isConnected"in t)||t.isConnected;const c=l((t=>{for(let i of t.keys()){t.set(i,t.get(i).filter(h))}}),2e3);const u=()=>{if(typeof t!=="function"){return{}}const e=new Map;return{dispose:()=>e.clear(),get:i=>{const n=t();if(n){o(e,i,n)}},set:t=>{const n=e.get(t);if(n){e.set(t,n.filter(i))}c(e)},reset:()=>{e.forEach((t=>t.forEach(i)));c(e)}}};const d=t=>typeof t==="function"?t():t;const p=(t,i=((t,i)=>t!==i))=>{const e=d(t);let n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));const s={dispose:[],get:[],set:[],reset:[]};const a=()=>{var i;n=new Map(Object.entries((i=d(t))!==null&&i!==void 0?i:{}));s.reset.forEach((t=>t()))};const r=()=>{s.dispose.forEach((t=>t()));a()};const o=t=>{s.get.forEach((i=>i(t)));return n.get(t)};const l=(t,e)=>{const a=n.get(t);if(i(e,a,t)){n.set(t,e);s.set.forEach((i=>i(t,e,a)))}};const h=typeof Proxy==="undefined"?{}:new Proxy(e,{get(t,i){return o(i)},ownKeys(t){return Array.from(n.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,i){return n.has(i)},set(t,i,e){l(i,e);return true}});const c=(t,i)=>{s[t].push(i);return()=>{f(s[t],i)}};const u=(i,e)=>{const n=c("set",((t,n)=>{if(t===i){e(n)}}));const s=c("reset",(()=>e(d(t)[i])));return()=>{n();s()}};const p=(...t)=>{const i=t.reduce(((t,i)=>{if(i.set){t.push(c("set",i.set))}if(i.get){t.push(c("get",i.get))}if(i.reset){t.push(c("reset",i.reset))}if(i.dispose){t.push(c("dispose",i.dispose))}return t}),[]);return()=>i.forEach((t=>t()))};const m=t=>{const i=n.get(t);s.set.forEach((e=>e(t,i,i)))};return{state:h,get:o,set:l,on:c,onChange:u,use:p,dispose:r,reset:a,forceUpdate:m}};const f=(t,i)=>{const e=t.indexOf(i);if(e>=0){t[e]=t[t.length-1];t.length--}};const m=(t,i)=>{const e=p(t,i);e.use(u());return e};const{state:x,onChange:g}=m({step:1,checkoutStep:1,checkoutEdit:false,selectedCategory:null,selectedService:null,selectedProduct:null,cart:[],business:"undefined",options:null,rut:true,rot:true,token:null,user:null,modal:null,rutOptions:null,rotOptions:null,customer:null,selectedCustomerCategory:null,parentCategory:null});g("cart",(t=>{window.sessionStorage.setItem(`hemfixarna-${x.business}-cart`,JSON.stringify(t))}));g("user",(t=>{window.sessionStorage.setItem(`hemfixarna-${x.business}-user`,JSON.stringify(t))}));g("selectedProduct",(t=>{if(!x.customer||!t)return;const i=[...x.customer.categories,...x.customer.categories.map((t=>{var i;return(i=t.sub_categories)!==null&&i!==void 0?i:[]}))].flat();const e=i.find((i=>i&&i.id===t.category));if(e){x.parentCategory=e;return}x.parentCategory=null}));g("selectedCustomerCategory",(t=>{if(!x.customer||!t)return;if(t.parent){const i=x.customer.categories.find((i=>i.id===t.parent));if(i){x.parentCategory=i;return}}x.parentCategory=null}));const b=t=>t.split(" ").reduce(((t,i)=>i.length<2?i:t+i.slice(0,1)+"*".repeat(i.length-2)+i.slice(i.length-1,i.length)+" "),"");const v=t=>{if(!t)return;t.scrollTo({top:0,behavior:"smooth"})};const _=class{constructor(t){e(this,t);this.handleSubmit=t=>{t.preventDefault();const i=this.street.length>0;if(!i){this.streetError="Ange en gatuadress"}const e=this.zip.length>0;if(!e){this.zipError="Ange ett postnummer"}const n=this.town.length>0;if(!n){this.townError="Ange en ort"}if(i&&e&&n){x.user=Object.assign(Object.assign({},x.user),{street:this.street,zip:this.zip,town:this.town});x.checkoutStep=2;x.checkoutEdit=false;const t=this.el.closest(".hemfixarna_content");v(t)}};this.handleChangeStreet=t=>{this.streetError=null;this.street=this.street===x.user.street?"":t.target.value};this.handleChangeZip=t=>{this.zipError=null;this.zip=this.zip===x.user.zip?"":t.target.value};this.handleChangeTown=t=>{this.townError=null;this.town=this.town===x.user.town?"":t.target.value};this.render=()=>n("form",{class:"hemfixarna_address",onSubmit:t=>this.handleSubmit(t)},n("div",null,n("input",{class:`${this.street.length?"input_active":""}`,onInput:this.handleChangeStreet,type:"text",name:"street",value:this.street===x.user.street?b(this.street):this.street}),n("label",{htmlFor:"street"},"Gatuaddress ")),this.streetError&&n("span",null,this.streetError),n("div",null,n("input",{class:`${this.zip.length?"input_active":""}`,onInput:this.handleChangeZip,type:"tel",name:"zip",value:this.zip===x.user.zip?b(this.zip):this.zip}),n("label",{htmlFor:"zip"},"Postnummer ")),this.zipError&&n("span",null,this.zipError),n("div",null,n("input",{class:`${this.town.length?"input_active":""}`,onInput:this.handleChangeTown,type:"text",name:"town",value:this.town===x.user.town?b(this.town):this.town}),n("label",{htmlFor:"town"},"Ort ")),this.townError&&n("span",null,this.townError),n("input",{type:"submit",value:"Fortsätt och Boka"}));this.street="";this.streetError=null;this.zip="";this.zipError=null;this.town="";this.townError=null}componentWillLoad(){if(x.user){this.street=x.user.street;this.zip=x.user.zip;this.town=x.user.town}}get el(){return s(this)}};const k=t=>Math.ceil(t/2);const w=t=>Math.ceil(t*.7);const y=(t,i,e=1)=>{if(t.rot&&x.rot){return w((i||t.price)*e)}else if(t.rut&&x.rut){return k((i||t.price)*e)}else{return(i||t.price)*e}};const $=t=>{if(t.rot){return w(t.price)}else if(t.rut&&x.rut){return k(t.price)}else{return t.price}};const C=(t,i,e=1)=>{if(i.rot&&x.rot){return w(t.price*e)}else if(i.rut&&x.rut){return k(t.price*e)}else{return t.price*e}};const T=()=>{if(!x.cart)return{rut:0,rot:0};const t=x.cart.some((t=>t.rut&&t.start_fee));const i=x.cart.some((t=>t.rot&&t.start_fee));const e=x.rut?k(x.options.start_fee):x.options.start_fee*1;const n=x.rot?w(x.options.start_fee):x.options.start_fee*1;if(t&&i){return{rut:e,rot:n,length:2}}else if(t){return{rut:e,rot:0,length:1}}else if(i){return{rut:0,rot:n,length:1}}else{return{rut:0,rot:0,length:0}}};const z=t=>{const i=t.parts.reduce(((t,i)=>t+i.price*i.amount),0);return y(t,t.price*t.amount+i)};const S=()=>{const t=x.cart.reduce(((t,i)=>i.rot?t+z(i):t),0)+T().rot;const i=x.cart.reduce(((t,i)=>{const e=i.parts.reduce(((t,i)=>t+i.price*i.amount),0);return i.rot?t+i.price*i.amount+e:t}),0)+Number(x.options.start_fee);return i-t};const j=()=>{const t=x.cart.reduce(((t,i)=>i.rut?t+z(i):t),0)+T().rut;const i=x.cart.reduce(((t,i)=>{const e=i.parts.reduce(((t,i)=>t+i.price*i.amount),0);return i.rut?t+i.price*i.amount+e:t}),0)+Number(x.options.start_fee);return i-t};const O=()=>x.cart.reduce(((t,i)=>t+z(i)),0)+T().rot+T().rut;const I=t=>t.post_name!==undefined;const L=class{constructor(t){e(this,t);this.post=undefined;this.category=undefined;this.icon=undefined;this.postTitle=undefined}setTaxonomy(t){if(t){if((t===null||t===void 0?void 0:t.taxonomy)==="service_cat"){x.selectedCategory=t;x.step=2}else if((t===null||t===void 0?void 0:t.post_type)==="service"){x.selectedService=t;x.step=3}else if((t===null||t===void 0?void 0:t.post_type)==="ikea_product"){x.selectedProduct=t;x.step=4}const i=this.el.closest(".hemfixarna_content");v(i)}}setProduct(){x.selectedProduct=this.category;x.step=4;x.selectedCustomerCategory=null;const t=this.el.closest(".hemfixarna_content");v(t)}render(){return this.category?n(a,null,I(this.category)?n("li",{onClick:()=>this.setProduct()},n("img",{class:"hemfixarna_logo",height:82,src:this.category.icon,alt:this.category.post_name}),n("div",null,n("p",null,this.category.post_title),n("p",{class:"price"},"Från ",y(this.category),"kr"))):n("li",{onClick:()=>x.selectedCustomerCategory=this.category},n("img",{class:"hemfixarna_logo",height:82,src:this.category.icon,alt:this.category.name}),n("div",null,n("p",null,this.category.name)))):n("li",{onClick:()=>this.setTaxonomy(this.post)},this.post.icon&&n("img",{class:"hemfixarna_logo",height:82,src:this.icon,alt:this.postTitle}),n("div",null,n("p",null,this.postTitle),x.step===3&&n("p",{class:"price"},"Från ",y(this.post),"kr")))}get el(){return s(this)}};const M=class{constructor(t){e(this,t);this.triggerScrollTotop=()=>{const t=this.el.nextSibling;v(t)};this.tree=undefined;this.closeModal=undefined;this.loadFromQuery=false;this.isDemo=false}getCartLength(){return x.cart.reduce(((t,i)=>t+i.amount),0)}handleCartClick(){var t;if((t=x.cart)===null||t===void 0?void 0:t.length){x.step=5;this.triggerScrollTotop()}}handleHomePageClick(){x.step=1;x.parentCategory=null;x.selectedCustomerCategory=null;this.triggerScrollTotop();setTimeout((()=>{x.selectedCategory=null;x.selectedProduct=null;x.selectedService=null}),200)}render(){const t=r(`./assets/hemfixarna.svg`);const i=r(`./assets/close.svg`);const e=r(`./assets/cart.svg`);const s=r(`./assets/back.svg`);return n("div",null,n("div",{class:"hemfixarna_crumbs"},n("div",{class:"hemfixarna_crumbs--links"},n("img",{onClick:()=>this.handleHomePageClick(),src:t,width:110}),!this.loadFromQuery||this.isDemo?n("img",{onClick:()=>this.closeModal(),class:"close",src:i,width:32}):null,n("div",null,n("button",{onClick:()=>this.handleHomePageClick()},"Alla tjänster"))),n("div",{onClick:()=>this.handleCartClick(),class:`cart ${this.getCartLength()>0?"cart_active":""}`},n("img",{src:e,width:24}),n("span",null,this.getCartLength()))),[3,4].includes(x.step)&&!x.customer&&n("button",{class:"hemfixarna_crumbs--back",onClick:()=>{x.step=x.step===4?3:2}},n("img",{width:24,src:s,alt:"back arrow"}),n("span",null,"Se allt ",x.step===4?x.selectedService.post_title:x.selectedCategory.name)),x.parentCategory&&x.step<5&&n("button",{class:"hemfixarna_crumbs--back",onClick:()=>{x.step=1;x.selectedCustomerCategory=x.parentCategory;x.selectedProduct=null}},n("img",{width:24,src:s,alt:"back arrow"}),n("span",null,"Se allt ",x.parentCategory.name)))}get el(){return s(this)}};var D;(function(t){t["kund"]="kund";t["byggmax"]="byggmax";t["skanska"]="skanska";t["string"]="string-furniture";t["hornbach"]="hornbach"})(D||(D={}));var N;(function(t){t["byggmax"]="category/bygg"})(N||(N={}));const P="";const F=class{constructor(t){e(this,t);this.tree=null;this.slug=undefined;this.id=undefined;this.forceOldTree=false;this.loadFromQuery=false}render(){return n("hemfixarna-component",{loadFromQuery:this.loadFromQuery,forceOldTree:this.forceOldTree,id:this.id,slug:this.slug,business:D.byggmax,topCategory:N.byggmax})}};F.style=P;const A=class{constructor(t){e(this,t);this.tree=undefined}render(){const t=r(`./assets/back.svg`);return n("div",{class:"hemfixarna_cart"},n("div",{class:"hemfixarna_cart--left"},n("h2",null,x.checkoutStep===2&&!x.checkoutEdit&&n("button",{onClick:()=>{x.checkoutStep=1}},n("img",{width:24,src:t,alt:"back arrow"})),"Din bokning"),n("hemfixarna-orderrows",{tree:this.tree})),n("div",{class:"hemfixarna_cart--right"},n("h2",null,x.checkoutStep===2&&!x.checkoutEdit&&n("button",{onClick:()=>{x.checkoutStep=1}},n("img",{width:24,src:t,alt:"back arrow"})),"Dina uppgifter"),n("hemfixarna-checkout",null),n("hemfixarna-info",null)))}};const R=class{constructor(t){e(this,t)}setSelectedService(t){x.selectedService=t;x.step=3}render(){return n("div",null,n("h2",null,x.selectedCategory.name),n("div",{class:"hemfixarna_categories--wrapper"},n("div",null,n("ul",{class:"hemfixarna_categories"},x.selectedCategory.services.sort(((t,i)=>t.post_title<i.post_title?-1:1)).map((t=>{var i;return n("hemfixarna-box",{post:t,icon:(i=t.icon.url)!==null&&i!==void 0?i:t.icon,postTitle:t.post_title})})))),n("hemfixarna-info",{list:x.options.trust})))}};const K=`${"https://hemfixarna.se"}/wp-json/headless`;const J=async t=>{if(!t){return}const i=t.split("/")[0];const e=t.split("/")[1];try{const t=await fetch(`${K}/${i}/${e}`);return await t.json()}catch(t){console.log(t)}};const H=async t=>{try{const i=await fetch(`${K}/customer/${t}`);return await i.json()}catch(t){console.log(t)}};const E=async()=>{try{const t=await fetch(`${K}/webcoptions`);return await t.json()}catch(t){console.log(t)}};const U=async()=>{try{const t=await fetch(`${K}/rut`);return await t.json()}catch(t){console.log(t)}};const W=async()=>{try{const t=await fetch(`${K}/rot`);return await t.json()}catch(t){console.log(t)}};const X=async t=>{try{const i=await fetch(`${K}/weborder`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}});return await i.json()}catch(t){console.log(t)}};const B=class{constructor(t){e(this,t);this.handleChangeDate=t=>{this.dateError=null;this.date=t.target.value};this.handleChangeTerms=()=>{this.generalError=null};this.sendOrder=async()=>{const t={name:x.user.firstName+" "+x.user.lastName,customer:x.business,phone:x.user.phone,social_security_number:x.user.ssn,email:x.user.email,address:`${x.user.street} | ${x.user.zip} | ${x.user.town}`,earliest_visit_date:this.date,order_items:JSON.stringify(x.cart.map((t=>`${t.amount}st ${t.name} ${y(t,t.price,t.amount)}kr ${t.parts.length?`| ${t.parts.map((i=>`${i.amount}st ${i.name} ${C(i,t,i.amount)}kr`)).join(" | ")} `:""} ${t.rot&&x.rot?"(med rot)":x.rut&&t.rut?"(med rut)":"(utan rut/rot)"}`))),start_fee:`${T().rut>0?`Rut: ${T().rut}kr`:"Rut: 0"} `+`${T().rot>0?`Rot: ${T().rot}kr`:"Rot: 0"}`,total:O()};try{const{data:i,status:e}=await X(t);if(i&&e&&e===200){x.step=6;const t=this.el.closest(".hemfixarna_content");v(t)}else{this.generalError="Något gick fel, försök igen senare"}}catch(t){this.generalError="Något gick fel, försök igen senare"}};this.handleSubmit=t=>{t.preventDefault();this.generalError=null;const i=this.date.length>0;if(!i){this.dateError="Ange ett giltigt datum"}const e=Array.from(this.el.querySelectorAll('input[type="checkbox"]'));const n=e.find((t=>!t.checked));if(n){this.generalError="Du måste godkänna villkoren"}if(i&&!n){this.sendOrder()}};this.render=()=>{const t=r(`./assets/date.svg`);const i=r(`./assets/down.svg`);if(x.checkoutEdit){return n("hemfixarna-address",null)}else if(x.checkoutStep===1){return n("hemfixarna-getuser",null)}else if(x.checkoutStep===2){return n("div",{class:"mb-2"},n("div",{class:"hemfixarna_addressinfo"},n("div",null,n("p",null,b(x.user.firstName)),n("p",null,b(x.user.lastName)),n("p",null,x.user.email),n("p",null,x.user.phone)),n("div",null,n("p",null,b(x.user.street)),n("p",null,b(x.user.zip)),n("p",null,b(x.user.town))),n("button",{onClick:()=>x.checkoutEdit=true},"Behöver du ändra adressen?")),n("form",{onSubmit:t=>this.handleSubmit(t)},n("div",null,n("img",{src:t,width:24}),n("input",{class:`${this.date.length?"input_active":""}`,min:(new Date).toISOString().split("T")[0],onChange:t=>this.handleChangeDate(t),type:"date",name:"date",value:this.date}),n("label",{htmlFor:"date"},"Tidigaste datum för hembesök"),n("img",{src:i,width:24})),this.dateError&&n("span",null,this.dateError),n("label",{class:"hemfixarna_checkbox"},n("input",{onChange:()=>this.handleChangeTerms(),type:"checkbox"}),n("span",{innerHTML:x.options.terms})),x.cart.filter((t=>t.terms_checkout&&t.terms_show_checkbox)).map((t=>n(a,null,n("label",{class:"hemfixarna_checkbox"},n("input",{onChange:()=>this.handleChangeTerms(),type:"checkbox"}),n("span",null,t.terms_checkout))))),this.generalError&&n("span",null,this.generalError),n("input",{type:"submit",value:"Slutför Bokning"})))}};this.date="";this.dateError=null;this.generalError=null}componentWillLoad(){if(Boolean(x.user&&x.user.street)){x.checkoutStep=2}}get el(){return s(this)}};const V='@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap"); *{box-sizing:border-box}:host{font-family:"Inter", sans-serif}:host .mb-2{margin-bottom:32px}:host button{color:#474444}:host form{display:flex;flex-direction:column;gap:16px}:host form img{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none}:host form img:first-of-type{left:16px}:host form img:last-of-type{right:16px}:host form span{margin-top:-8px;color:#ec6632}:host form p{text-align:center}:host form p{margin:0}:host form div{position:relative}:host form div label{pointer-events:none;position:absolute;left:16px;top:50%;transform:translateY(-50%);background:#fff;padding:4px;transition:0.2s all cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host form div input{padding:16px;width:100%;font-size:16px;border:1px solid #fcd9c9}:host form div input:focus~label,:host form div .input_active~label{top:0;transform:translateY(-50%);background:linear-gradient(180deg, #fffaf2 50%, #fff 50%)}:host h1{font-size:24px;font-weight:400;line-height:32px;letter-spacing:-3%;text-align:left;margin:0 0 8px}:host h2{margin:0 0 24px;font-weight:700;font-size:20px;line-height:28px;letter-spacing:-3%}:host p{font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna{width:100%;}:host .hemfixarna_nav{position:absolute;top:0;width:100dvw;left:0;height:80px;z-index:9999}:host .hemfixarna_nav--links{display:none !important}@media (min-width: 769px){:host .hemfixarna_nav--links{display:flex !important}}:host .hemfixarna_nav--links a{color:#ec6632;text-decoration:none;border:1px solid rgba(255, 255, 255, 0.3);border-radius:56px;padding:8px 32px}:host .hemfixarna_nav>div{position:relative;overflow:hidden;width:100%;height:100%;display:flex;justify-content:space-between;align-items:center;padding:0 16px}@media (min-width: 769px){:host .hemfixarna_nav>div{padding:0 32px}}:host .hemfixarna_nav>div>div{display:flex;gap:32px;justify-content:space-between}:host .hemfixarna_nav>div>img{position:absolute;width:100%;height:100%;top:0;left:0;z-index:-1}:host .hemfixarna_nav p{color:#fff}:host .hemfixarna_standalone .hemfixarna_backdrop{background:#fffaf2;opacity:1}:host .hemfixarna_standalone .hemfixarna_modal{top:80px;transform:translateX(-50%);border:none;height:calc(100dvh - 80px);opacity:0}:host .hemfixarna_standalone .hemfixarna_modal--open{opacity:1}:host .hemfixarna .switch{position:relative;display:inline-block;width:40px;height:20px}:host .hemfixarna .switch input{opacity:0;width:0;height:0}:host .hemfixarna .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:0.4s;transition:0.4s;border-radius:34px}:host .hemfixarna .slider:before{position:absolute;content:"";height:18px;width:18px;left:2px;bottom:1px;background-color:white;-webkit-transition:0.4s;transition:0.4s;border-radius:50%}:host .hemfixarna input:checked+.slider{background-color:#fcd9c9}:host .hemfixarna input:focus+.slider{box-shadow:0 0 1px #fcd9c9}:host .hemfixarna input:checked+.slider:before{-webkit-transform:translateX(18px);-ms-transform:translateX(18px);transform:translateX(18px);background:#ec6632}:host .hemfixarna_checkbox{display:grid;grid-template-columns:40px auto;font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna_checkbox>span{transform:translateY(6px)}:host .hemfixarna_checkbox span,:host .hemfixarna_checkbox span p{color:#474444;font-size:14px}:host .hemfixarna_checkbox p{text-align:left}:host .hemfixarna_info{display:flex;flex-direction:column;gap:24px;padding:32px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);border-radius:4px;border:1px solid #fcd9c9}:host .hemfixarna_info h2{margin:0}@media (min-width: 769px){:host .hemfixarna_info{position:sticky;top:0}}:host .hemfixarna_infomodal{position:absolute;top:40%;left:50%;transform:translate(-50%, -50%);width:100%;max-width:80%;background:#fffaf2;border:1px solid #fcd9c9;padding:32px;z-index:99;border-radius:4px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;flex-direction:column;gap:16px}:host .hemfixarna_infomodal p,:host .hemfixarna_infomodal h4{margin:0}:host .hemfixarna_infomodal button{background:#ec6632;color:#fff;border-radius:60px;font-size:16px;padding:8px 16px}:host .hemfixarna_addressinfo{padding:16px 16px 64px;border:1px solid #fcd9c9;position:relative;margin-bottom:32px;display:grid;grid-template-columns:1fr;gap:8px}@media (min-width: 769px){:host .hemfixarna_addressinfo{grid-template-columns:1fr 1fr}}:host .hemfixarna_addressinfo button{position:absolute;bottom:16px;right:16px;font-weight:500;text-underline-offset:2px;text-decoration:underline}:host .hemfixarna_part{background:#fff;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:grid;padding:16px;grid-template-columns:auto 75px}:host .hemfixarna_counter{display:flex;align-items:center}:host .hemfixarna_counter span{padding:0 8px}:host .hemfixarna_counter img{cursor:pointer}:host .hemfixarna_counter img:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_description{display:grid;gap:16px}:host .hemfixarna_description ul{list-style:disc;padding-right:12px;transform:translateX(12px)}:host .hemfixarna_description--hidden{max-height:140px;overflow:hidden;position:relative;cursor:pointer}:host .hemfixarna_description--hidden::after{content:"";position:absolute;bottom:0;left:0;right:0;height:128px;background:linear-gradient(180deg, rgba(255, 253, 250, 0), rgba(255, 253, 250, 0.46) 50%, #fffaf2)}:host .hemfixarna_terms{font-size:14px}:host .hemfixarna_terms a{color:inherit}:host .hemfixarna_logo{height:64px}:host .hemfixarna_box{padding:16px;display:flex;align-items:center;justify-content:space-between;background:#fffaf2;border:1px solid #fcd9c9;width:100%;box-sizing:border-box;border-radius:4px;gap:16px 8px}:host .hemfixarna_box>div{display:grid;gap:8px}:host .hemfixarna_btn,:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{border:none;border-radius:60px;font-weight:600;letter-spacing:0.5px;line-height:20px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn:not(.disabled):hover,:host .hemfixarna_buy:not(.disabled):hover,:host .hemfixarna input[type=submit]:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn{font-size:14px;background:#c84e18;color:#fff;padding:16px 24px;white-space:nowrap;position:relative}:host .hemfixarna_btn span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-8px;right:-12px}:host .hemfixarna_btn span{background:#25a710;color:#fff;right:0 !important}:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{font-size:21px;background:#25a710;color:#fff;padding:16px 24px}:host .hemfixarna .disabled{opacity:0.5;cursor:default}:host .hemfixarna_modal{position:fixed;background:#fffaf2;border:1px solid #fcd9c9;border-radius:4px;top:50%;left:50%;z-index:1000;transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);transform:translate(-50%, -50%) scale(0.7);opacity:0;height:92%;width:92%;max-width:920px;display:flex;flex-direction:column;gap:8px}:host .hemfixarna_modal--open{opacity:1;transform:translate(-50%, -50%) scale(1)}:host .hemfixarna_backdrop{z-index:999;position:fixed;background:#474444;top:0;left:0;bottom:0;right:0;opacity:0;transition:transform 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946), opacity 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host .hemfixarna_backdrop--open{opacity:0.3}:host .hemfixarna_order{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;background-repeat:no-repeat !important;background-size:cover !important;background-position:center !important;display:grid;grid-template-columns:1fr 1fr;padding:48px 32px 64px}@media (max-width: 768px){:host .hemfixarna_order{grid-template-columns:1fr;grid-template-rows:0 auto}}:host .hemfixarna_order>div:last-of-type{background:#fffaf2;padding:32px;display:flex;flex-direction:column;max-height:100%;overflow:auto}:host .hemfixarna_order img{cursor:pointer}:host .hemfixarna_order button{margin:16px 0;padding:0;text-decoration:underline;text-underline-offset:2px;font-size:14px;font-weight:600}:host .hemfixarna_cart{display:grid;grid-template-columns:1fr 1fr;gap:32px}@media (max-width: 768px){:host .hemfixarna_cart{grid-template-columns:1fr;gap:0}}:host .hemfixarna_cart--right h2,:host .hemfixarna_cart--left h2{display:flex;align-items:center}:host .hemfixarna_cart--right h2 img,:host .hemfixarna_cart--left h2 img{margin-top:3.2px}@media (min-width: 769px){:host .hemfixarna_cart--left h2 button{display:none}}@media (max-width: 768px){:host .hemfixarna_cart--right h2 button{display:none}}:host .hemfixarna_cart--startfee{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot div{display:flex;gap:16px;align-items:center}:host .hemfixarna_cart--additional{display:flex;flex-direction:column;gap:16px;padding:16px;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--additional p{font-size:14px}:host .hemfixarna_cart--additional strong{text-decoration:underline;text-underline-offset:2px;cursor:pointer;position:relative}:host .hemfixarna_cart--additional strong img{position:absolute;top:50%;transform:translateY(-50%);right:-24px}:host .hemfixarna_cart--price{border-top:1px solid #fcd9c9;padding:16px;display:flex;justify-content:space-between}:host .hemfixarna_cart--price h3{margin:0}:host .hemfixarna_cart--item{display:flex;flex-direction:column;gap:8px;padding:16px 0;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--item>div{display:flex;justify-content:space-between}:host .hemfixarna_cart--item>div>div{display:flex;align-items:center;gap:16px}:host .hemfixarna_cart--item>div button{color:#ec6632}:host .hemfixarna_categories{display:grid;gap:24px}:host .hemfixarna_categories--wrapper{gap:32px;display:grid;grid-template-columns:1fr 1fr}@media (max-width: 768px){:host .hemfixarna_categories--wrapper{grid-template-columns:1fr}}:host .hemfixarna_categories li{position:relative;background:#fff;border-radius:4px;min-height:132px;padding:24px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;align-items:center;gap:24px;cursor:pointer}:host .hemfixarna_categories li:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_categories li>button{height:100%;width:100%}:host .hemfixarna_categories li .price{font-weight:700}:host .hemfixarna_content{height:100%;overflow:auto;padding:0 32px 64px}:host .hemfixarna_content--5{padding-top:16px}:host .hemfixarna_crumbs{position:relative;padding:16px 24px;border-bottom:1px solid #fcd9c9;display:flex;justify-content:space-between}:host .hemfixarna_crumbs--back{padding:16px 24px 8px;display:flex;align-items:center;gap:8px;box-shadow:none !important}:host .hemfixarna_crumbs--back:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs img{cursor:pointer}:host .hemfixarna_crumbs .close{position:absolute;right:-16px;top:-16px;z-index:9}:host .hemfixarna_crumbs .cart{padding-left:16px;position:relative}:host .hemfixarna_crumbs .cart img{cursor:inherit}:host .hemfixarna_crumbs .cart span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-8px;right:-12px}:host .hemfixarna_crumbs .cart_active{cursor:pointer}:host .hemfixarna_crumbs .cart_active span{background:#25a710;color:#fff}:host .hemfixarna_crumbs--links{display:flex;align-items:center;gap:16px;overflow:auto}@media (min-width: 769px){:host .hemfixarna_crumbs--links{-ms-overflow-style:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar{display:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar-button{display:none}}:host .hemfixarna_crumbs button{white-space:nowrap;background:#f1ded6;border-radius:64px;padding:12px 16px;font-size:12px;font-weight:600;letter-spacing:0.3px;box-shadow:none !important}:host .hemfixarna_crumbs button:not(.active):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs .active{background:#fffaf2;cursor:default}:host .hemfixarna_features{gap:12px !important}:host .hemfixarna_features li{display:flex;gap:16px;align-items:center}:host .hemfixarna_address{margin-bottom:16px}:host .hemfixarna_product{display:grid;gap:16px}:host .hemfixarna_product--link{font-weight:700;color:#474444;text-underline-offset:4px}:host .hemfixarna_product--left{gap:32px}:host .hemfixarna_product--right{gap:32px}:host .hemfixarna_product--price{margin-top:4px;font-weight:700}:host .hemfixarna_product--total{text-align:center;margin:-16px 0;font-size:21px;line-height:28px}:host .hemfixarna_product--item{background:#fff;padding:16px;display:grid;grid-template-columns:auto 75px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_product--grid{display:grid;grid-template-columns:1fr 1fr;gap:32px}@media (max-width: 768px){:host .hemfixarna_product--grid{grid-template-columns:1fr}}:host .hemfixarna_product--grid>div{display:flex;flex-direction:column}:host .hemfixarna_product--grid ul{display:flex;flex-direction:column;gap:4px}:host .hemfixarna_product p{margin:0}:host .hemfixarna_product--top{display:flex;gap:32px}:host .hemfixarna_product--top>div{width:100%}:host .hemfixarna_product--top>div h1{max-width:80%}@media (max-width: 768px){:host .hemfixarna_product--top>div h1{max-width:100%}}:host .hemfixarna_product--top h4{margin-bottom:8px}:host h5,:host p{margin:0}:host input[type=submit]{cursor:pointer}:host input[type=date]~label{left:56px}:host input[type=date]{border:1px solid #fcd9c9;padding-left:64px}:host input[type=checkbox]{height:18px;width:18px;border:1px solid #fcd9c9}:host input[type=checkbox]:checked{background:red}:host input[type=date]::-webkit-calendar-picker-indicator{background:transparent;bottom:0;color:transparent;cursor:pointer;height:auto;left:0;position:absolute;right:0;top:0;width:auto}:host button,:host a{cursor:pointer;background:none;border:none}:host ul{list-style:none;margin:0;padding:0}';const Q=class{constructor(t){e(this,t);this.slugIsOldFormat=t=>{if(!t)return false;return["product","service","category"].some((i=>t.includes(i)))};this.triggerScrollTotop=()=>{const t=this.el.shadowRoot.querySelector(".hemfixarna_content");v(t)};this.modal=false;this.showModal=false;this.tree=null;this.product=null;this.proppedProduct=null;this.slug=undefined;this.id=undefined;this.business=undefined;this.topCategory=undefined;this.forceOldTree=false;this.loadFromQuery=false;this.isDemo=false;this.nav=undefined}loadCategoryOrProduct(t){this.proppedProduct=null;if(t.startsWith("c-")){const i=[...x.customer.categories,...x.customer.categories.map((t=>{var i;return(i=t.sub_categories)!==null&&i!==void 0?i:[]}))].flat();const e=i.find((i=>i&&i.id===t.replace("c-","")));if(e){x.selectedCustomerCategory=e;x.step=2}}else{const i=x.customer.categories.map((t=>t.show_products?t.products:t.sub_categories?t.sub_categories.map((t=>t.products)):[])).flat().flat();const e=i.find((i=>i&&i.fields.ID===parseInt(t)));if(e){x.selectedProduct=e.fields;x.step=4;this.proppedProduct=e.fields}}}async watchSlugChange(t){if(this.slugIsOldFormat(t)){this.fetchNewTaxonomy(t)}else if(x.customer&&t){this.loadCategoryOrProduct(t)}}async watchIdChange(t){if(t&&x.customer){this.loadCategoryOrProduct(t)}}async fetchNewTaxonomy(t){x.selectedCategory=null;x.selectedProduct=null;x.selectedService=null;const i=await J(t);if((i===null||i===void 0?void 0:i.code)==="not_found"||(i===null||i===void 0?void 0:i.code)==="rest_no_route"){console.log("taxonomy not found")}else if(i){this.setTaxonomy(i);if((i===null||i===void 0?void 0:i.post_type)==="ikea_product"){this.product=i}}}async componentWillLoad(){x.business=this.business;const t=window.sessionStorage.getItem(`hemfixarna-${this.business}-cart`);if(t){x.cart=JSON.parse(t)}const i=window.sessionStorage.getItem(`hemfixarna-${this.business}-user`);if(i){x.user=JSON.parse(i)}const[e,n,s,a,r]=await Promise.all([this.topCategory?J(this.topCategory):null,this.slug?J(this.slug):Promise.resolve(null),E(),U(),W()]);if((!this.slug||!this.slugIsOldFormat(this.slug))&&!this.forceOldTree){try{const t=await H(this.business);if((t===null||t===void 0?void 0:t.code)==="not_found"){console.warn("customer not found")}else if(t){x.customer=t;if(this.id){this.loadCategoryOrProduct(this.id)}else if(this.slug&&!this.slugIsOldFormat(this.slug)){this.loadCategoryOrProduct(this.slug)}}}catch(t){console.warn("customer not found")}}if((e===null||e===void 0?void 0:e.code)==="not_found");else if(e){this.tree=e}if((n===null||n===void 0?void 0:n.code)==="not_found"){console.log("taxonomy not found")}else if(n){this.setTaxonomy(n);if((n===null||n===void 0?void 0:n.post_type)==="ikea_product"){this.product=n}}if(this.loadFromQuery){const t=new URL(document.location.toString()).searchParams;this.id=t.get("id");if(!this.isDemo){this.openModal()}}x.rotOptions=r;x.rutOptions=a;x.options=s}setTaxonomy(t){if(t){if((t===null||t===void 0?void 0:t.taxonomy)==="service_cat"){x.selectedCategory=t;x.step=2}else if((t===null||t===void 0?void 0:t.post_type)==="service"){x.selectedService=t;x.selectedCategory=this.tree.sub_cats.find((i=>i.services.find((i=>i.ID===t.ID))));x.step=3}else if((t===null||t===void 0?void 0:t.post_type)==="ikea_product"){x.selectedProduct=t;x.selectedService=this.tree.sub_cats.map((t=>t.services)).flat().find((t=>t.products.find((t=>t.ID===x.selectedProduct.ID))));x.selectedCategory=this.tree.sub_cats.find((t=>t.services.find((t=>t.ID===x.selectedService.ID))));x.step=4}this.triggerScrollTotop()}}openModal(){this.modal=true;setTimeout((()=>{this.showModal=true}),50)}closeModal(){this.showModal=false;setTimeout((()=>{this.modal=false}),200)}handleClick(t){if(this.loadFromQuery&&!this.isDemo)return;const i=this.el.shadowRoot.querySelector(".hemfixarna_modal");if(i){const e=i.contains(t.composedPath()[0]);if(!e){this.closeModal()}}const e=this.el.shadowRoot.querySelector(".hemfixarna_infomodal");if(e){const i=e.contains(t.composedPath()[0]);if(!i){x.modal=null}}}getCartLength(){return x.cart.reduce(((t,i)=>t+i.amount),0)}render(){var t,i,e,s,a;const o=r(`./assets/hemfixarna.svg`);const l=((t=this.nav)===null||t===void 0?void 0:t.background)?r(this.nav.background):"";const h=((i=this.nav)===null||i===void 0?void 0:i.logo)?r(this.nav.logo):"";return n("div",{class:`hemfixarna ${this.loadFromQuery?"hemfixarna_standalone":""}`},this.loadFromQuery&&!this.isDemo&&this.nav?n("nav",{class:"hemfixarna_nav"},n("div",null,n("div",{class:"hemfixarna_nav--logos"},n("a",{href:this.nav.url,target:"_blank"},n("img",{src:h,alt:`${this.business} logo`})),n("a",{href:"https://hemfixarna.se/",target:"_blank"},n("p",null,"I samarbete med:"),n("img",{src:o,alt:"hemfixarna_logo",width:104}))),n("div",{class:"hemfixarna_nav--links"},n("a",{href:this.nav.url,target:"_blank"},"Till ",this.business),n("a",{href:"https://www.hemfixarna.se/",target:"_blank"},"Till Hemfixarna")),n("img",{src:l,alt:"nav_background"}))):null,!this.loadFromQuery||this.isDemo?n("div",{class:"hemfixarna_box"},n("div",null,n("div",null,n("p",null,((e=this.product)===null||e===void 0?void 0:e.post_title)||((s=this.proppedProduct)===null||s===void 0?void 0:s.post_title)||n("span",null,"Montering",n("wbr",null),"/Installation på plats - ",n("strong",null,"se priser här")),this.product&&((a=this.slug)===null||a===void 0?void 0:a.includes("product"))||this.proppedProduct?n("span",null," från"," ",n("strong",null,$(this.proppedProduct||this.product),"kr")):null)),n("img",{src:o,width:104})),n("button",{onClick:()=>this.openModal(),class:"hemfixarna_btn"},"Till montering",this.getCartLength()>0&&n("span",null,this.getCartLength()))):null,this.modal&&n("div",null,n("div",{class:`hemfixarna_modal ${this.showModal?"hemfixarna_modal--open":""}`},x.modal&&n("div",{class:"hemfixarna_infomodal"},x.modal.title&&n("h2",null,x.modal.title),x.modal.text.map((t=>n("p",{innerHTML:t}))),n("div",null,n("button",{onClick:()=>x.modal=null},"Stäng"))),(this.tree||x.customer)&&n("hemfixarna-breadcrumbs",{isDemo:this.isDemo,loadFromQuery:this.loadFromQuery,closeModal:()=>this.closeModal(),tree:this.tree}),!x.customer||this.slugIsOldFormat(this.slug)?n("div",{class:`hemfixarna_content hemfixarna_content--${x.step}`},x.step===1&&this.tree&&n("hemfixarna-start",{tree:this.tree}),x.step===2&&x.selectedCategory&&n("hemfixarna-category",null),x.step===3&&x.selectedService&&n("hemfixarna-service",null),x.step===4&&x.selectedProduct&&n("hemfixarna-product",null),x.step===5&&n("hemfixarna-cart",{tree:this.tree}),x.step===6&&n("hemfixarna-order",{tree:this.tree})):n("div",{class:`hemfixarna_content hemfixarna_content--${x.step}`},x.step<4&&n("hemfixarna-start",null),x.step===4&&x.selectedProduct&&n("hemfixarna-product",null),x.step===5&&n("hemfixarna-cart",{tree:this.tree}),x.step===6&&n("hemfixarna-order",{tree:this.tree}))),!this.isDemo?n("div",{class:`hemfixarna_backdrop ${this.showModal?"hemfixarna_backdrop--open":""}`}):null))}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{slug:["watchSlugChange"],id:["watchIdChange"]}}};Q.style=V;const Y='@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap"); :host{font-family:"Inter", sans-serif}:host .hemfixarna_example{margin-bottom:16px;background:#000;padding:16px;color:#fff;display:flex;justify-content:space-between;cursor:pointer;max-width:500px;box-sizing:border-box;position:relative}:host .hemfixarna_example--tooltip{background:#000;top:-48px;font-size:16px;left:40%;color:white;padding:8px;position:absolute;opacity:0}:host .hemfixarna_example--tooltip::after{content:"";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}:host .hemfixarna_example:hover .hemfixarna_example--tooltip{opacity:1}:host .hemfixarna_example p{font-size:14px}:host .hemfixarna_example img{filter:invert(1)}:host .hemfixarna_install{display:grid;gap:8px;margin-top:16px}:host .hemfixarna_product--label{background:#e1e0f5}:host .hemfixarna_categories{max-height:100%;overflow:auto;position:relative}:host .hemfixarna_categories--label{display:flex;align-items:center;justify-content:space-between;padding:8px}:host .hemfixarna_categories--label button{background:#3f3a92;border:none;font-weight:600;padding:3.2px 9.6px;border-radius:10px;margin-right:8px;color:#ece8e8}:host .hemfixarna_categories--label button:active{transform:scale(0.95)}:host .hemfixarna_categories--label--big{font-weight:600;border-bottom:1px solid black}:host p{margin:0}:host span{color:darkolivegreen;font-size:10px}:host button{cursor:pointer}:host>div{display:grid;gap:32px;width:100%;grid-template-columns:1fr 1fr;height:100vh;place-items:center;overflow:hidden;padding:16px 32px;box-sizing:border-box}:host>div>*{width:100%}:host>div>div{max-width:500px}:host>div ul{margin:0;padding:0;list-style:none}:host>div ul ul{gap:1px;display:grid}:host>div ul li{padding-left:16px;background:#fff}';const q=class{constructor(t){e(this,t);this.cdnLink='<script type="module" src="https://cdn.jsdelivr.net/npm//hemfixarna-web-components@latest/dist/hemfixarna-components/hemfixarna-components.esm.js"><\/script>';this.selectedSlug=undefined;this.selectedID=undefined;this.tooltipText="Kopiera till urklipp";this.tree=null;this.customer=null}getTopLevelCategory(){switch("hornbach"){case D.byggmax:return N.byggmax;default:return""}}async componentWillLoad(){if(process.env.FORCE_OLD_TREE){const t=await J(this.getTopLevelCategory());if((t===null||t===void 0?void 0:t.code)==="not_found");else if(t){this.tree=t}}else{const t=await H("hornbach");if(t.code!=="not_found"&&t){this.customer=t}}}getExample(){return`<hemfixarna-${"hornbach"}${this.selectedSlug?` slug="${this.selectedSlug}" `:""}${this.selectedID?` id="${this.selectedID}" `:""}></hemfixarna-${"hornbach"}>`}copyExample(){navigator.clipboard.writeText(this.getExample());this.tooltipText="Snippet kopierad";setTimeout((()=>{this.tooltipText="Kopiera till urklipp"}),2e3)}copyCdn(){navigator.clipboard.writeText(this.cdnLink);this.tooltipText="Text kopierad";setTimeout((()=>{this.tooltipText="Kopiera till urklipp"}),2e3)}copyNpmInstall(){navigator.clipboard.writeText("npm i hemfixarna-web-components");this.tooltipText="Text kopierad";setTimeout((()=>{this.tooltipText="Kopiera till urklipp"}),2e3)}render(){const t=r(`./assets/copy.png`);return n("div",null,n("div",null,n("div",{onClick:()=>this.copyExample(),class:"hemfixarna_example"},n("p",null,this.getExample()),n("img",{src:t,height:20}),n("span",{class:"hemfixarna_example--tooltip"},this.tooltipText)),"hornbach"===D.byggmax&&n("hemfixarna-byggmax",{forceOldTree:Boolean(process.env.FORCE_OLD_TREE),slug:this.selectedSlug,id:this.selectedID}),"hornbach"===D.skanska&&n("hemfixarna-skanska",{id:this.selectedID}),"hornbach"===D.string&&n("hemfixarna-string-furniture",{id:this.selectedID}),"hornbach"===D.hornbach&&n("hemfixarna-hornbach",{isDemo:true,id:this.selectedID}),"hornbach"===D.kund&&n("hemfixarna-kund",{id:this.selectedID}),n("div",{class:"hemfixarna_install"},n("div",{onClick:()=>this.copyCdn(),class:"hemfixarna_example"},n("p",null,this.cdnLink),n("span",{class:"hemfixarna_example--tooltip"},this.tooltipText),n("img",{src:t,height:20})))),n("ul",{class:"hemfixarna_categories"},this.customer?n("div",null,this.customer.categories.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label hemfixarna_categories--label--big"},n("div",null,n("p",null,t.name),n("span",null,`c-${t.id}`)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(`c-${t.id}`)},"Kopiera ID"),n("button",{onClick:()=>this.selectedID=`c-${t.id}`},"Ladda kategori"))),t.show_products&&t.products?n("ul",null,t.products.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label hemfixarna_product--label"},n("div",null,n("p",null,t.fields.post_title),n("span",null,t.fields.ID)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(String(t.fields.ID))},"Kopiera ID"),n("button",{onClick:()=>this.selectedID=String(t.fields.ID)},"Ladda produkt"))))))):n("ul",null,t.sub_categories&&t.sub_categories.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label"},n("div",null,n("p",null,t.name),n("span",null,`c-${t.id}`)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(`c-${t.id}`)},"Kopiera ID"),n("button",{onClick:()=>this.selectedID=`c-${t.id}`},"Ladda kategori"))),n("ul",null,t.products.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label hemfixarna_product--label"},n("div",null,n("p",null,t.fields.post_title),n("span",null,t.fields.ID)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(String(t.fields.ID))},"Kopiera ID"),n("button",{onClick:()=>this.selectedID=String(t.fields.ID)},"Ladda produkt"))))))))))))))):n("div",null,this.tree.sub_cats.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label hemfixarna_categories--label--big"},n("div",null,n("p",null,t.name),n("span",null,`category/${t.slug}`)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(`category/${t.slug}`)},"Kopiera slug"),n("button",{onClick:()=>this.selectedSlug=`category/${t.slug}`},"Ladda kategori"))),n("ul",null,t.services.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label"},n("div",null,n("p",null,t.post_title),n("span",null,`service/${t.post_name}`)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(`service/${t.post_name}`)},"Kopiera slug"),n("button",{onClick:()=>this.selectedSlug=`service/${t.post_name}`},"Ladda kategori"))),n("ul",null,t.products.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label"},n("div",null,n("p",null,t.post_title),n("span",null,`product/${t.post_name}`)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(`product/${t.post_name}`)},"Kopiera slug"),n("button",{onClick:()=>this.selectedSlug=`product/${t.post_name}`},"Ladda kategori")))))))))))))))))}};q.style=Y;var G=class extends Error{constructor(){super("Invalid swedish personal identity number")}};var Z=(t,i)=>{const e=t.getTime()-i.getTime();return e<0?-1:e>0?1:e};var tt=(t,i)=>{const e=Z(t,i);const n=Math.abs(t.getFullYear()-i.getFullYear());t.setFullYear(t.getFullYear()-e*n);const s=Z(t,i)===-e;const a=e*(n-+s);return a===0?0:a};var it=t=>{let i=0;t+="";for(let e=0,n=t.length;e<n;e++){let n=parseInt(t[e]);n*=2-e%2;if(n>9){n-=9}i+=n}return Math.ceil(i/10)*10-i};var et=(t,i,e)=>{i-=1;const n=new Date(t,i,e);return!(n.getFullYear()!==t||n.getMonth()!==i||n.getDate()!==e)};var nt=class{constructor(t,i){this._century="";this._fullYear="";this._year="";this._month="";this._day="";this._sep="";this._num="";this._check="";this.parse(t,{allowCoordinationNumber:true,allowInterimNumber:false,...i})}get century(){return this._century}get fullYear(){return this._fullYear}get year(){return this._year}get month(){return this._month}get day(){return this._day}get sep(){return this._sep}get num(){return this._num}get check(){return this._check}static parse(t,i){return new nt(t,i)}static valid(t,i){try{nt.parse(t,i);return true}catch(t){return false}}parse(t,i){if(t.length<10||t.length>13){throw new G}const e=/^(\d{2}){0,1}(\d{2})(\d{2})(\d{2})([+-]?)((?!000)\d{3}|[TRSUWXJKLMN]\d{2})(\d)$/;const n=e.exec(t);if(!n){throw new G}const s=n[1];const a=n[2];const r=n[3];const o=n[4];const l=n[5];const h=n[6];const c=n[7];if(typeof s==="undefined"||!s.length){const t=new Date;let i=0;if(l==="+"){this._sep="+";i=t.getFullYear()-100}else{this._sep="-";i=t.getFullYear()}this._century=(""+(i-(i-parseInt(a))%100)).substr(0,2)}else{this._century=s;if((new Date).getFullYear()-parseInt(s+a,10)<100){this._sep="-"}else{this._sep="+"}}this._year=a;this._fullYear=this._century+a;this._month=r;this._day=o;this._num=h;this._check=c;if(!this.valid()){throw new G}if(!(i==null?void 0:i.allowCoordinationNumber)&&this.isCoordinationNumber()){throw new G}if(!(i==null?void 0:i.allowInterimNumber)&&this.isInterimNumber()){throw new G}}valid(){const t=it(this.year+this.month+this.day+this.num.replace(/[TRSUWXJKLMN]/,"1"))===+this.check&&!!this.check;if(t&&et(parseInt(this.century+this.year),+this.month,+this.day)){return t}return t&&et(parseInt(this.century+this.year),+this.month,+this.day-60)}format(t=false){if(t){return`${this.century}${this.year}${this.month}${this.day}${this.num}${this.check}`}return`${this.year}${this.month}${this.day}${this.sep}${this.num}${this.check}`}getAge(){const t=this.getDate();return tt(new Date(Date.now()),t)}getDate(){let t=+this.day;if(this.isCoordinationNumber()){t-=60}const i=this.century+this.year+"-"+this.month+"-"+(t<10?"0"+t:t);return new Date(i)}isInterimNumber(){return/[TRSUWXJKLMN]/.test(this.num[0])}isCoordinationNumber(){return et(parseInt(this.century+this.year),+this.month,+this.day-60)}isFemale(){return!this.isMale()}isMale(){const t=parseInt(this.num.substr(-1));return t%2===1}};var st=nt;function at(t,i,e){return e={path:i,exports:{},require:function(t,i){return rt()}},t(e,e.exports),e.exports}function rt(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var ot=at((function(t,i){Object.defineProperty(i,"__esModule",{value:true});i.utf8=void 0;i.utf8={encode:e,decode:n};function e(t){t=t.replace(/\r\n/g,"\n");var i="";for(var e=0;e<t.length;e++){var n=t.charCodeAt(e);if(n<128){i+=String.fromCharCode(n)}else if(n>127&&n<2048){i+=String.fromCharCode(n>>6|192);i+=String.fromCharCode(n&63|128)}else{i+=String.fromCharCode(n>>12|224);i+=String.fromCharCode(n>>6&63|128);i+=String.fromCharCode(n&63|128)}}return i}function n(t){var i="";var e=0;var n=0;var s=0;var a=0;while(e<t.length){n=t.charCodeAt(e);if(n<128){i+=String.fromCharCode(n);e++}else if(n>191&&n<224){s=t.charCodeAt(e+1);i+=String.fromCharCode((n&31)<<6|s&63);e+=2}else{s=t.charCodeAt(e+1);a=t.charCodeAt(e+2);i+=String.fromCharCode((n&15)<<12|(s&63)<<6|a&63);e+=3}}return i}}));var lt=at((function(t,i){Object.defineProperty(i,"__esModule",{value:true});i.generate=void 0;function e(t){var i=[];var e;var n;var a;var r;var o;var l;var m;var x;var g;var b=7;var v=12;var _=17;var k=22;var w=5;var y=9;var $=14;var C=20;var T=4;var z=11;var S=16;var j=23;var O=6;var I=10;var L=15;var M=21;var D=ot.utf8.encode(t);i=p(D);l=1732584193;m=4023233417;x=2562383102;g=271733878;for(e=0;e<i.length;e+=16){n=l;a=m;r=x;o=g;l=h(l,m,x,g,i[e+0],b,3614090360);g=h(g,l,m,x,i[e+1],v,3905402710);x=h(x,g,l,m,i[e+2],_,606105819);m=h(m,x,g,l,i[e+3],k,3250441966);l=h(l,m,x,g,i[e+4],b,4118548399);g=h(g,l,m,x,i[e+5],v,1200080426);x=h(x,g,l,m,i[e+6],_,2821735955);m=h(m,x,g,l,i[e+7],k,4249261313);l=h(l,m,x,g,i[e+8],b,1770035416);g=h(g,l,m,x,i[e+9],v,2336552879);x=h(x,g,l,m,i[e+10],_,4294925233);m=h(m,x,g,l,i[e+11],k,2304563134);l=h(l,m,x,g,i[e+12],b,1804603682);g=h(g,l,m,x,i[e+13],v,4254626195);x=h(x,g,l,m,i[e+14],_,2792965006);m=h(m,x,g,l,i[e+15],k,1236535329);l=c(l,m,x,g,i[e+1],w,4129170786);g=c(g,l,m,x,i[e+6],y,3225465664);x=c(x,g,l,m,i[e+11],$,643717713);m=c(m,x,g,l,i[e+0],C,3921069994);l=c(l,m,x,g,i[e+5],w,3593408605);g=c(g,l,m,x,i[e+10],y,38016083);x=c(x,g,l,m,i[e+15],$,3634488961);m=c(m,x,g,l,i[e+4],C,3889429448);l=c(l,m,x,g,i[e+9],w,568446438);g=c(g,l,m,x,i[e+14],y,3275163606);x=c(x,g,l,m,i[e+3],$,4107603335);m=c(m,x,g,l,i[e+8],C,1163531501);l=c(l,m,x,g,i[e+13],w,2850285829);g=c(g,l,m,x,i[e+2],y,4243563512);x=c(x,g,l,m,i[e+7],$,1735328473);m=c(m,x,g,l,i[e+12],C,2368359562);l=u(l,m,x,g,i[e+5],T,4294588738);g=u(g,l,m,x,i[e+8],z,2272392833);x=u(x,g,l,m,i[e+11],S,1839030562);m=u(m,x,g,l,i[e+14],j,4259657740);l=u(l,m,x,g,i[e+1],T,2763975236);g=u(g,l,m,x,i[e+4],z,1272893353);x=u(x,g,l,m,i[e+7],S,4139469664);m=u(m,x,g,l,i[e+10],j,3200236656);l=u(l,m,x,g,i[e+13],T,681279174);g=u(g,l,m,x,i[e+0],z,3936430074);x=u(x,g,l,m,i[e+3],S,3572445317);m=u(m,x,g,l,i[e+6],j,76029189);l=u(l,m,x,g,i[e+9],T,3654602809);g=u(g,l,m,x,i[e+12],z,3873151461);x=u(x,g,l,m,i[e+15],S,530742520);m=u(m,x,g,l,i[e+2],j,3299628645);l=d(l,m,x,g,i[e+0],O,4096336452);g=d(g,l,m,x,i[e+7],I,1126891415);x=d(x,g,l,m,i[e+14],L,2878612391);m=d(m,x,g,l,i[e+5],M,4237533241);l=d(l,m,x,g,i[e+12],O,1700485571);g=d(g,l,m,x,i[e+3],I,2399980690);x=d(x,g,l,m,i[e+10],L,4293915773);m=d(m,x,g,l,i[e+1],M,2240044497);l=d(l,m,x,g,i[e+8],O,1873313359);g=d(g,l,m,x,i[e+15],I,4264355552);x=d(x,g,l,m,i[e+6],L,2734768916);m=d(m,x,g,l,i[e+13],M,1309151649);l=d(l,m,x,g,i[e+4],O,4149444226);g=d(g,l,m,x,i[e+11],I,3174756917);x=d(x,g,l,m,i[e+2],L,718787259);m=d(m,x,g,l,i[e+9],M,3951481745);l=s(l,n);m=s(m,a);x=s(x,r);g=s(g,o)}return f(l)+f(m)+f(x)+f(g)}i.generate=e;function n(t,i){return t<<i|t>>>32-i}function s(t,i){var e;var n;var s;var a;var r;s=t&2147483648;a=i&2147483648;e=t&1073741824;n=i&1073741824;r=(t&1073741823)+(i&1073741823);if(e&n){return r^2147483648^s^a}if(e|n){if(r&1073741824){return r^3221225472^s^a}else{return r^1073741824^s^a}}else{return r^s^a}}function a(t,i,e){return t&i|~t&e}function r(t,i,e){return t&e|i&~e}function o(t,i,e){return t^i^e}function l(t,i,e){return i^(t|~e)}function h(t,i,e,r,o,l,h){t=s(t,s(s(a(i,e,r),o),h));return s(n(t,l),i)}function c(t,i,e,a,o,l,h){t=s(t,s(s(r(i,e,a),o),h));return s(n(t,l),i)}function u(t,i,e,a,r,l,h){t=s(t,s(s(o(i,e,a),r),h));return s(n(t,l),i)}function d(t,i,e,a,r,o,h){t=s(t,s(s(l(i,e,a),r),h));return s(n(t,o),i)}function p(t){var i;var e=t.length;var n=e+8;var s=(n-n%64)/64;var a=(s+1)*16;var r=Array(a-1);var o=0;var l=0;while(l<e){i=(l-l%4)/4;o=l%4*8;r[i]=r[i]|t.charCodeAt(l)<<o;l++}i=(l-l%4)/4;o=l%4*8;r[i]=r[i]|128<<o;r[a-2]=e<<3;r[a-1]=e>>>29;return r}function f(t){var i="";var e="";var n;var s;for(s=0;s<=3;s++){n=t>>>s*8&255;e="0"+n.toString(16);i=i+e.substr(e.length-2,2)}return i}}));var ht=at((function(t,i){Object.defineProperty(i,"__esModule",{value:true});i.MD5=i.generate=void 0;var e=lt;Object.defineProperty(i,"generate",{enumerable:true,get:function(){return e.generate}});i.MD5={generate:lt.generate}}));const ct=async t=>{var i;const e=await fetch((i="https://hemfixare-lookup.vercel.app/api")!==null&&i!==void 0?i:"https://hemfixare-lookup.vercel.app/api",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:t,hash:ht.MD5.generate(String.fromCharCode(83,101,67,82,101,116)+t)})});const n=await e.json();return n};const ut=class{constructor(t){e(this,t);this.handleChangeEmail=t=>{this.emailError=null;this.email=t.target.value};this.handleChangePhone=t=>{this.phoneError=null;this.phone=t.target.value};this.handleChangessn=t=>{this.ssnError=null;this.ssn=t.target.value};this.handleSubmit=async t=>{t.preventDefault();const i=new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);const e=i.test(this.email);if(!e){this.emailError="Ange en giltig e-postadress"}const n=this.phone.length>6;if(!n){this.phoneError="Ange ett giltigt telefonnummer"}const s=st.valid(this.ssn);if(!s){this.ssnError="Ange ett giltigt personnummer"}else if(s){const t=st.parse(this.ssn).format(true);this.ssn=[t.slice(0,8),"-",t.slice(8)].join("")}if(e&&n&&s){try{const t=await ct(this.ssn);if(t){x.checkoutStep=2;x.user=Object.assign(Object.assign({},t),{email:this.email,phone:this.phone,ssn:this.ssn});const i=this.el.closest(".hemfixarna_content");v(i)}else{this.ssnError="Vi kunde tyvärr inte hitta en address med ditt angivna personnummer"}}catch(t){this.ssnError="Vi kunde tyvärr inte hitta en address med ditt angivna personnummer";console.log(t)}}};this.render=()=>n("form",{class:"mb-2",onSubmit:t=>this.handleSubmit(t)},n("div",null,n("input",{class:`${this.email.length?"input_active":""}`,onChange:t=>this.handleChangeEmail(t),type:"email",name:"email",value:this.email}),n("label",{htmlFor:"email"},"E-post ")),this.emailError&&n("span",null,this.emailError),n("div",null,n("input",{class:`${this.phone.length?"input_active":""}`,onChange:t=>this.handleChangePhone(t),type:"tel",name:"phone",value:this.phone}),n("label",{htmlFor:"phone"},"Mobiltelefon ")),this.phoneError&&n("span",null,this.phoneError),n("div",null,n("input",{class:`${this.ssn.length?"input_active":""}`,onChange:t=>this.handleChangessn(t),type:"tel",name:"ssn",value:this.ssn}),n("label",{htmlFor:"phone"},"Personnummer*")),this.ssnError&&n("span",null,this.ssnError),n("input",{type:"submit",value:"Fortsätt och Boka*"}),n("p",null,"*Vi hämtar din adress"));this.email="";this.emailError=null;this.phone="";this.phoneError=null;this.ssn="";this.ssnError=null}componentWillLoad(){if(x.user){this.email=x.user.email;this.phone=x.user.phone;this.ssn=x.user.ssn}}get el(){return s(this)}};const dt="";const pt=class{constructor(t){e(this,t);this.id=undefined;this.loadFromQuery=true;this.isDemo=false}render(){return n("hemfixarna-component",{nav:{url:"https://www.hornbach.se/",logo:"assets/hornbach/logo.svg",background:"./assets/hornbach/nav.jpg"},isDemo:this.isDemo,loadFromQuery:this.loadFromQuery,id:this.id,business:D.hornbach})}};pt.style=dt;const ft=class{constructor(t){e(this,t);this.logo=r(`./assets/hemfixarna.svg`);this.checkoutList=[{trust_badge:"Efter att du fyllt i formuläret blir du kontaktad av en Hemfixare för bokning av tid."},{trust_badge:"När jobbet är klart kommer du få en faktura med RUT/ROT-avdrag."}];this.list=null}getList(){return this.list?this.list:this.checkoutList}render(){const t=r(`./assets/checked.svg`);return n("div",{class:"hemfixarna_info"},x.step<5?n(a,null,n("h2",null,"Vilka är Hemfixarna?"),n("p",null,"Vi fixar allt från krångliga datorer till montering av möbler. Vi finns i hela Sverige och är alltid redo att rycka ut.")):n("h2",null,"Vad händer nu?"),n("ul",{class:"hemfixarna_features"},this.getList().map((i=>n("li",{key:i.trust_badge},n("img",{src:t,alt:"checked"}),n("p",null,i.trust_badge))))),n("img",{src:this.logo,width:200,alt:"hemfixarna"}),n("a",{class:"hemfixarna_product--link",target:"_blank",href:x.options.link.url},x.options.link.title))}};const mt=class{constructor(t){e(this,t);this.id=undefined;this.loadFromQuery=false}render(){return n("hemfixarna-component",{loadFromQuery:this.loadFromQuery,id:this.id,business:D.kund})}};const xt=class{constructor(t){e(this,t);this.render=()=>n("div",{style:{background:`url(${x.options.thank_you_image})`},class:"hemfixarna_order"},n("div",null),n("div",null,n("h2",null,"Tack för din bokning"),n("hemfixarna-orderrows",{tree:this.tree,cart:false}),n("span",{onClick:()=>this.resetShop()},n("button",null,"Gör en ny bokning")),n("hemfixarna-info",{list:[{trust_badge:"Du kommer bli kontaktad av en Hemfixare för bokning av tid."},{trust_badge:"När jobbet är klart kommer du få en faktura med RUT/ROT-avdrag."}]})));this.tree=undefined}resetShop(){x.step=1;x.cart=[];x.selectedCategory=null;x.selectedService=null;x.selectedProduct=null;x.checkoutStep=1}disconnectedCallback(){this.resetShop()}};const gt=class{constructor(t){e(this,t);this.cart=true;this.tree=undefined}goToProduct(t){if(x.customer){const i=x.customer.categories.map((t=>t.show_products?t.products:t.sub_categories?t.sub_categories.map((t=>t.products)):[])).flat().flat();const e=i.find((i=>i&&i.fields.ID===t));if(e){x.selectedProduct=e.fields;x.step=4}}else{const i=this.tree.sub_cats.map((t=>t.services)).flat();const e=i.map((t=>t.products)).flat();const n=e.find((i=>i.ID===t));const s=i.find((i=>i.products.find((i=>i.ID===t))));const a=this.tree.sub_cats.find((i=>i.services.find((i=>i.products.find((i=>i.ID===t))))));x.selectedCategory=a;x.selectedService=s;x.selectedProduct=n;x.step=4}}openRot(){x.modal={title:x.rotOptions.rot_start_fee_heading,text:[x.rotOptions.rot_start_fee_text,x.rotOptions.rot_start_fee_text_secondary]}}openRut(){x.modal={title:x.rutOptions.rut_start_fee_heading,text:[x.rutOptions.rut_start_fee_text,x.rutOptions.rut_start_fee_text_secondary]}}render(){const t=r(`./assets/info.svg`);return n(a,null,n("ul",{class:"hemfixarna_cart--items"},x.cart.map((t=>{var i;return n("li",{class:"hemfixarna_cart--item"},n("div",null,n("div",null,t.icon&&n("img",{width:30,src:(i=t.icon.url)!==null&&i!==void 0?i:t.icon,alt:t.name}),n("p",null,n("strong",null,t.amount,"x "),t.name)),this.cart&&n("button",{onClick:()=>this.goToProduct(t.id)},"Ändra")),n("p",null,n("strong",null,y(t,t.price,t.amount),"kr")),t.parts.length>0&&n("ul",null,t.parts.map((i=>n("li",null,n("p",null,n("strong",null,i.amount,"x "),i.name),n("p",null,n("strong",null,C(i,t,i.amount),"kr")))))))}))),n("div",{class:"hemfixarna_cart--additional"},T().rot>0&&n("div",{class:"hemfixarna_cart--startfee"},n("p",null,n("strong",{onClick:()=>this.openRot()},x.rotOptions.rot_start_fee_heading,n("img",{height:16,src:t,alt:"info monteringsavgift"}))),n("p",null,T().rot,"kr")),T().rut>0&&n("div",{class:"hemfixarna_cart--startfee"},n("p",null,n("strong",{onClick:()=>this.openRut()},x.rutOptions.rut_start_fee_heading,n("img",{height:16,src:t,alt:"info monteringsavgift"}))),n("p",null,T().rut,"kr")),x.cart.find((t=>t.rot))&&n("div",{class:"hemfixarna_cart--rutrot"},n("div",null,this.cart&&n("label",{class:"switch"},n("input",{checked:x.rot,onChange:()=>x.rot=!x.rot,type:"checkbox"}),n("span",{class:"slider"})),n("p",null,"ROT-avdrag")),n("p",null,"(-",x.rot?S():0,"kr)")),x.cart.find((t=>t.rut))&&n("div",{class:"hemfixarna_cart--rutrot"},n("div",null,n("label",{class:"switch"},n("input",{onChange:()=>x.rut=!x.rut,checked:x.rut,type:"checkbox"}),n("span",{class:"slider"})),n("p",null,"RUT-avdrag")),n("p",null,"(-",x.rut?j():0,"kr)"))),n("div",{class:"hemfixarna_cart--price"},n("h2",null,"Totalbelopp: "),n("h2",null,O(),"kr")))}};const bt=class{constructor(t){e(this,t);this.amount=0;this.hideDescription=true}addProduct(){const t=x.cart.find((t=>t.id===x.selectedProduct.ID));if(t){t.amount++;x.cart=[...x.cart]}else{x.cart=[...x.cart,{id:x.selectedProduct.ID,rut:x.selectedProduct.rut,rot:x.selectedProduct.rot,amount:1,parts:[],price:x.selectedProduct.price,name:x.selectedProduct.post_title,start_fee:!x.selectedProduct.hide_start_fee,terms_checkout:x.selectedProduct.terms_checkout,terms_show_checkbox:x.selectedProduct.terms_show_checkbox,icon:x.selectedProduct.icon}]}}removeProduct(){const t=x.cart.find((t=>t.id===x.selectedProduct.ID));if(t&&t.amount>1){t.amount--;x.cart=[...x.cart]}else{x.cart=x.cart.filter((t=>t.id!==x.selectedProduct.ID))}}addPart(t){const i=x.cart.find((t=>t.id===x.selectedProduct.ID));if(i){const e=i.parts.find((i=>i.id===t.ID));if(e){e.amount++;i.parts=[...i.parts]}else{i.parts=[...i.parts,{id:t.ID,amount:1,price:t.price,name:t.post_title}]}x.cart=[...x.cart.filter((t=>t.id!==i.id)),i]}}removePart(t){const i=x.cart.find((t=>t.id===x.selectedProduct.ID));if(i){const e=i.parts.find((i=>i.id===t.ID));if(e&&e.amount>1){e.amount--;i.parts=[...i.parts]}else{i.parts=i.parts.filter((i=>i.id!==t.ID))}x.cart=[...x.cart.filter((t=>t.id!==i.id)),i]}}goToCart(){const t=x.cart.find((t=>t.id===x.selectedProduct.ID));if(t){x.step=5;const t=this.el.closest(".hemfixarna_content");v(t)}}getAmount(){var t;return((t=x.cart.find((t=>t.id===x.selectedProduct.ID)))===null||t===void 0?void 0:t.amount)||0}getPartAmount(t){var i;const e=x.cart.find((t=>t.id===x.selectedProduct.ID));return((i=e===null||e===void 0?void 0:e.parts.find((i=>i.id===t)))===null||i===void 0?void 0:i.amount)||0}getTotalPrice(){let t=0;const i=x.cart.find((t=>t.id===x.selectedProduct.ID));if(i){const e=i.parts.reduce(((t,i)=>{const e=x.selectedProduct.parts.find((t=>t.ID===i.id));if(e){return t+e.price*i.amount}return t}),0);t=x.selectedProduct.price*i.amount+e}else{t=x.selectedProduct.price}return y(x.selectedProduct,t)}render(){var t,i,e;const s=r(`./assets/checked.svg`);const a=r(`./assets/plus.svg`);const o=r(`./assets/minus.svg`);return n("div",{class:"hemfixarna_product"},n("div",{class:"hemfixarna_product--top"},x.selectedProduct.icon&&n("img",{width:80,src:(t=x.selectedProduct.icon.url)!==null&&t!==void 0?t:x.selectedProduct.icon,alt:x.selectedProduct.post_title}),n("div",null,n("h1",null,x.selectedProduct.post_title),n("h2",null,"Från: ",y(x.selectedProduct)," kr"))),n("div",{class:"hemfixarna_product--grid"},n("div",{class:"hemfixarna_product--left"},((i=x.selectedProduct.list)===null||i===void 0?void 0:i.length)&&n("ul",{class:"hemfixarna_features"},x.selectedProduct.list.map((t=>n("li",{key:t.bullet},n("img",{src:s,alt:"checked"}),n("p",null,t.bullet))))),x.selectedProduct.description&&n("p",{onClick:()=>this.hideDescription=false,class:`hemfixarna_description ${this.hideDescription?"hemfixarna_description--hidden":""}`,innerHTML:x.selectedProduct.description})),n("div",{class:"hemfixarna_product--right"},n("ul",null,n("li",{class:"hemfixarna_product--item"},n("div",null,n("p",null,"Antal ",x.selectedProduct.post_title),n("p",{class:"hemfixarna_product--price"},y(x.selectedProduct),"kr/st")),n("div",{class:"hemfixarna_counter"},n("img",{class:`${this.getAmount()===0?"disabled":""}`,src:o,onClick:()=>this.removeProduct()}),n("span",null,this.getAmount()),n("img",{src:a,onClick:()=>this.addProduct()}))),((e=x.selectedProduct.parts)===null||e===void 0?void 0:e.length)&&x.selectedProduct.parts.map((t=>{var i;return n("li",{class:"hemfixarna_part"},n("div",null,n("p",null,(i=t.title)!==null&&i!==void 0?i:t.post_title),n("p",{class:"hemfixarna_product--price"},C(t,x.selectedProduct),"kr/st")),n("div",{class:"hemfixarna_counter"},n("img",{class:`${this.getPartAmount(t.ID)===0?"disabled":""}`,src:o,onClick:()=>this.removePart(t)}),n("span",null,this.getPartAmount(t.ID)),n("img",{class:`${this.getAmount()===0?"disabled":""}`,src:a,onClick:()=>this.addPart(t)})))}))),n("h4",{class:"hemfixarna_product--total"},"Totalt ",this.getTotalPrice()," kr"),n("button",{onClick:()=>this.goToCart(),class:`hemfixarna_buy ${this.getAmount()===0?"disabled":""}`},"Boka"),!x.selectedProduct.hide_start_fee&&(x.selectedProduct.rot||x.selectedProduct.rut)&&x.rutOptions&&x.rotOptions&&n("p",{class:"hemfixarna_terms"},n("strong",null,x.selectedProduct.rot?x.rotOptions.rot_start_fee_heading:x.rutOptions.rut_start_fee_heading),n("br",null),n("span",{innerHTML:x.selectedProduct.rot?x.rotOptions.rot_start_fee_text:x.rutOptions.rut_start_fee_text})),x.options&&n("hemfixarna-info",{list:x.options.trust}))))}get el(){return s(this)}};const vt=class{constructor(t){e(this,t)}render(){return n("div",null,n("h2",null,x.selectedService.post_title),n("div",{class:"hemfixarna_categories--wrapper"},n("div",null,n("ul",{class:"hemfixarna_categories"},x.selectedService.products.sort(((t,i)=>t.post_title<i.post_title?-1:1)).map((t=>{var i;return n("hemfixarna-box",{post:t,icon:(i=t.icon.url)!==null&&i!==void 0?i:t.icon,postTitle:t.post_title})})))),n("hemfixarna-info",{list:x.options.trust})))}};const _t="";const kt=class{constructor(t){e(this,t);this.id=undefined;this.customer=undefined;this.loadFromQuery=false}render(){return n("hemfixarna-component",{loadFromQuery:this.loadFromQuery,id:this.id,business:D.skanska})}};kt.style=_t;const wt=class{constructor(t){e(this,t);this.tree=undefined;this.slug=undefined}isMainCategory(t){return t.show_products!==undefined}render(){return x.customer?n("div",null,n("h2",null,x.selectedCustomerCategory?x.selectedCustomerCategory.name:"Alla tjänster"),n("div",{class:"hemfixarna_categories--wrapper"},n("ul",{class:"hemfixarna_categories"},x.selectedCustomerCategory?this.isMainCategory(x.selectedCustomerCategory)&&x.selectedCustomerCategory.sub_categories&&!x.selectedCustomerCategory.show_products?x.selectedCustomerCategory.sub_categories.map((t=>n("hemfixarna-box",{category:t}))):x.selectedCustomerCategory.products?x.selectedCustomerCategory.products.map((t=>n("hemfixarna-box",{category:t.fields}))):null:x.customer.categories.map((t=>n("hemfixarna-box",{category:t})))),n("hemfixarna-info",{list:x.options.trust}))):n("div",null,n("h2",null,"Alla tjänster"),n("div",{class:"hemfixarna_categories--wrapper"},n("ul",{class:"hemfixarna_categories"},this.tree.sub_cats.sort(((t,i)=>t.name<i.name?-1:1)).map((t=>{var i;return n("hemfixarna-box",{post:t,icon:(i=t.icon.url)!==null&&i!==void 0?i:t.icon,postTitle:t.name})}))),n("hemfixarna-info",{list:x.options.trust})))}};const yt="";const $t=class{constructor(t){e(this,t);this.id=undefined;this.loadFromQuery=false}render(){return n("hemfixarna-component",{loadFromQuery:this.loadFromQuery,id:this.id,business:D.string})}};$t.style=yt;export{_ as hemfixarna_address,L as hemfixarna_box,M as hemfixarna_breadcrumbs,F as hemfixarna_byggmax,A as hemfixarna_cart,R as hemfixarna_category,B as hemfixarna_checkout,Q as hemfixarna_component,q as hemfixarna_demo,ut as hemfixarna_getuser,pt as hemfixarna_hornbach,ft as hemfixarna_info,mt as hemfixarna_kund,xt as hemfixarna_order,gt as hemfixarna_orderrows,bt as hemfixarna_product,vt as hemfixarna_service,kt as hemfixarna_skanska,wt as hemfixarna_start,$t as hemfixarna_string_furniture};
2
+ //# sourceMappingURL=p-618089b8.entry.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hemfixarna-web-components",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "author": "Afonso <info@afonso.se> (http://afonso.se)",
5
5
  "description": "Web components to integrate with hemfixarna api",
6
6
  "main": "dist/index.cjs.js",
@@ -1,2 +0,0 @@
1
- import{g as t,f as i,r as e,h as n,a as r,F as s,c as a}from"./p-62a7c1a2.js";const o=(t,i,e)=>{const n=t.get(i);if(!n){t.set(i,[e])}else if(!n.includes(e)){n.push(e)}};const l=(t,i)=>{let e;return(...n)=>{if(e){clearTimeout(e)}e=setTimeout((()=>{e=0;t(...n)}),i)}};const h=t=>!("isConnected"in t)||t.isConnected;const c=l((t=>{for(let i of t.keys()){t.set(i,t.get(i).filter(h))}}),2e3);const u=()=>{if(typeof t!=="function"){return{}}const e=new Map;return{dispose:()=>e.clear(),get:i=>{const n=t();if(n){o(e,i,n)}},set:t=>{const n=e.get(t);if(n){e.set(t,n.filter(i))}c(e)},reset:()=>{e.forEach((t=>t.forEach(i)));c(e)}}};const d=t=>typeof t==="function"?t():t;const f=(t,i=((t,i)=>t!==i))=>{const e=d(t);let n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));const r={dispose:[],get:[],set:[],reset:[]};const s=()=>{var i;n=new Map(Object.entries((i=d(t))!==null&&i!==void 0?i:{}));r.reset.forEach((t=>t()))};const a=()=>{r.dispose.forEach((t=>t()));s()};const o=t=>{r.get.forEach((i=>i(t)));return n.get(t)};const l=(t,e)=>{const s=n.get(t);if(i(e,s,t)){n.set(t,e);r.set.forEach((i=>i(t,e,s)))}};const h=typeof Proxy==="undefined"?{}:new Proxy(e,{get(t,i){return o(i)},ownKeys(t){return Array.from(n.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,i){return n.has(i)},set(t,i,e){l(i,e);return true}});const c=(t,i)=>{r[t].push(i);return()=>{m(r[t],i)}};const u=(i,e)=>{const n=c("set",((t,n)=>{if(t===i){e(n)}}));const r=c("reset",(()=>e(d(t)[i])));return()=>{n();r()}};const f=(...t)=>{const i=t.reduce(((t,i)=>{if(i.set){t.push(c("set",i.set))}if(i.get){t.push(c("get",i.get))}if(i.reset){t.push(c("reset",i.reset))}if(i.dispose){t.push(c("dispose",i.dispose))}return t}),[]);return()=>i.forEach((t=>t()))};const p=t=>{const i=n.get(t);r.set.forEach((e=>e(t,i,i)))};return{state:h,get:o,set:l,on:c,onChange:u,use:f,dispose:a,reset:s,forceUpdate:p}};const m=(t,i)=>{const e=t.indexOf(i);if(e>=0){t[e]=t[t.length-1];t.length--}};const p=(t,i)=>{const e=f(t,i);e.use(u());return e};const{state:x,onChange:g}=p({step:1,checkoutStep:1,checkoutEdit:false,selectedCategory:null,selectedService:null,selectedProduct:null,cart:[],business:"undefined",options:null,rut:true,rot:true,token:null,user:null,modal:null,rutOptions:null,rotOptions:null,customer:null,selectedCustomerCategory:null,parentCategory:null});g("cart",(t=>{window.sessionStorage.setItem(`hemfixarna-${x.business}-cart`,JSON.stringify(t))}));g("user",(t=>{window.sessionStorage.setItem(`hemfixarna-${x.business}-user`,JSON.stringify(t))}));g("selectedProduct",(t=>{if(!x.customer||!t)return;const i=[...x.customer.categories,...x.customer.categories.map((t=>{var i;return(i=t.sub_categories)!==null&&i!==void 0?i:[]}))].flat();const e=i.find((i=>i&&i.id===t.category));if(e){x.parentCategory=e;return}x.parentCategory=null}));g("selectedCustomerCategory",(t=>{if(!x.customer||!t)return;if(t.parent){const i=x.customer.categories.find((i=>i.id===t.parent));if(i){x.parentCategory=i;return}}x.parentCategory=null}));const b=t=>t.split(" ").reduce(((t,i)=>i.length<2?i:t+i.slice(0,1)+"*".repeat(i.length-2)+i.slice(i.length-1,i.length)+" "),"");const v=t=>{if(!t)return;t.scrollTo({top:0,behavior:"smooth"})};const _=class{constructor(t){e(this,t);this.handleSubmit=t=>{t.preventDefault();const i=this.street.length>0;if(!i){this.streetError="Ange en gatuadress"}const e=this.zip.length>0;if(!e){this.zipError="Ange ett postnummer"}const n=this.town.length>0;if(!n){this.townError="Ange en ort"}if(i&&e&&n){x.user=Object.assign(Object.assign({},x.user),{street:this.street,zip:this.zip,town:this.town});x.checkoutStep=2;x.checkoutEdit=false;const t=this.el.closest(".hemfixarna_content");v(t)}};this.handleChangeStreet=t=>{this.streetError=null;this.street=this.street===x.user.street?"":t.target.value};this.handleChangeZip=t=>{this.zipError=null;this.zip=this.zip===x.user.zip?"":t.target.value};this.handleChangeTown=t=>{this.townError=null;this.town=this.town===x.user.town?"":t.target.value};this.render=()=>n("form",{class:"hemfixarna_address",onSubmit:t=>this.handleSubmit(t)},n("div",null,n("input",{class:`${this.street.length?"input_active":""}`,onInput:this.handleChangeStreet,type:"text",name:"street",value:this.street===x.user.street?b(this.street):this.street}),n("label",{htmlFor:"street"},"Gatuaddress ")),this.streetError&&n("span",null,this.streetError),n("div",null,n("input",{class:`${this.zip.length?"input_active":""}`,onInput:this.handleChangeZip,type:"tel",name:"zip",value:this.zip===x.user.zip?b(this.zip):this.zip}),n("label",{htmlFor:"zip"},"Postnummer ")),this.zipError&&n("span",null,this.zipError),n("div",null,n("input",{class:`${this.town.length?"input_active":""}`,onInput:this.handleChangeTown,type:"text",name:"town",value:this.town===x.user.town?b(this.town):this.town}),n("label",{htmlFor:"town"},"Ort ")),this.townError&&n("span",null,this.townError),n("input",{type:"submit",value:"Fortsätt och Boka"}));this.street="";this.streetError=null;this.zip="";this.zipError=null;this.town="";this.townError=null}componentWillLoad(){if(x.user){this.street=x.user.street;this.zip=x.user.zip;this.town=x.user.town}}get el(){return r(this)}};const k=t=>Math.ceil(t/2);const w=t=>Math.ceil(t*.7);const y=(t,i,e=1)=>{if(t.rot&&x.rot){return w((i||t.price)*e)}else if(t.rut&&x.rut){return k((i||t.price)*e)}else{return(i||t.price)*e}};const $=t=>{if(t.rot){return w(t.price)}else if(t.rut&&x.rut){return k(t.price)}else{return t.price}};const C=(t,i,e=1)=>{if(i.rot&&x.rot){return w(t.price*e)}else if(i.rut&&x.rut){return k(t.price*e)}else{return t.price*e}};const T=()=>{if(!x.cart)return{rut:0,rot:0};const t=x.cart.some((t=>t.rut&&t.start_fee));const i=x.cart.some((t=>t.rot&&t.start_fee));const e=x.rut?k(x.options.start_fee):x.options.start_fee*1;const n=x.rot?w(x.options.start_fee):x.options.start_fee*1;if(t&&i){return{rut:e,rot:n,length:2}}else if(t){return{rut:e,rot:0,length:1}}else if(i){return{rut:0,rot:n,length:1}}else{return{rut:0,rot:0,length:0}}};const z=t=>{const i=t.parts.reduce(((t,i)=>t+i.price*i.amount),0);return y(t,t.price*t.amount+i)};const S=()=>{const t=x.cart.reduce(((t,i)=>i.rot?t+z(i):t),0)+T().rot;const i=x.cart.reduce(((t,i)=>{const e=i.parts.reduce(((t,i)=>t+i.price*i.amount),0);return i.rot?t+i.price*i.amount+e:t}),0)+Number(x.options.start_fee);return i-t};const j=()=>{const t=x.cart.reduce(((t,i)=>i.rut?t+z(i):t),0)+T().rut;const i=x.cart.reduce(((t,i)=>{const e=i.parts.reduce(((t,i)=>t+i.price*i.amount),0);return i.rut?t+i.price*i.amount+e:t}),0)+Number(x.options.start_fee);return i-t};const O=()=>x.cart.reduce(((t,i)=>t+z(i)),0)+T().rot+T().rut;const I=t=>t.post_name!==undefined;const L=class{constructor(t){e(this,t);this.post=undefined;this.category=undefined;this.icon=undefined;this.postTitle=undefined}setTaxonomy(t){if(t){if((t===null||t===void 0?void 0:t.taxonomy)==="service_cat"){x.selectedCategory=t;x.step=2}else if((t===null||t===void 0?void 0:t.post_type)==="service"){x.selectedService=t;x.step=3}else if((t===null||t===void 0?void 0:t.post_type)==="ikea_product"){x.selectedProduct=t;x.step=4}const i=this.el.closest(".hemfixarna_content");v(i)}}setProduct(){x.selectedProduct=this.category;x.step=4;x.selectedCustomerCategory=null;const t=this.el.closest(".hemfixarna_content");v(t)}render(){return this.category?n(s,null,I(this.category)?n("li",{onClick:()=>this.setProduct()},n("img",{class:"hemfixarna_logo",height:82,src:this.category.icon,alt:this.category.post_name}),n("div",null,n("p",null,this.category.post_title),n("p",{class:"price"},"Från ",y(this.category),"kr"))):n("li",{onClick:()=>x.selectedCustomerCategory=this.category},n("img",{class:"hemfixarna_logo",height:82,src:this.category.icon,alt:this.category.name}),n("div",null,n("p",null,this.category.name)))):n("li",{onClick:()=>this.setTaxonomy(this.post)},this.post.icon&&n("img",{class:"hemfixarna_logo",height:82,src:this.icon,alt:this.postTitle}),n("div",null,n("p",null,this.postTitle),x.step===3&&n("p",{class:"price"},"Från ",y(this.post),"kr")))}get el(){return r(this)}};const M=class{constructor(t){e(this,t);this.triggerScrollTotop=()=>{const t=this.el.nextSibling;v(t)};this.tree=undefined;this.closeModal=undefined;this.loadFromQuery=false;this.isDemo=false}getCartLength(){return x.cart.reduce(((t,i)=>t+i.amount),0)}handleCartClick(){var t;if((t=x.cart)===null||t===void 0?void 0:t.length){x.step=5;this.triggerScrollTotop()}}handleHomePageClick(){x.step=1;x.parentCategory=null;x.selectedCustomerCategory=null;this.triggerScrollTotop();setTimeout((()=>{x.selectedCategory=null;x.selectedProduct=null;x.selectedService=null}),200)}render(){const t=a(`./assets/hemfixarna.svg`);const i=a(`./assets/close.svg`);const e=a(`./assets/cart.svg`);const r=a(`./assets/back.svg`);return n("div",null,n("div",{class:"hemfixarna_crumbs"},n("div",{class:"hemfixarna_crumbs--links"},n("img",{onClick:()=>this.handleHomePageClick(),src:t,width:110}),!this.loadFromQuery||this.isDemo?n("img",{onClick:()=>this.closeModal(),class:"close",src:i,width:32}):null,n("div",null,n("button",{onClick:()=>this.handleHomePageClick()},"Alla tjänster"))),n("div",{onClick:()=>this.handleCartClick(),class:`cart ${this.getCartLength()>0?"cart_active":""}`},n("img",{src:e,width:24}),n("span",null,this.getCartLength()))),[3,4].includes(x.step)&&!x.customer&&n("button",{class:"hemfixarna_crumbs--back",onClick:()=>{x.step=x.step===4?3:2}},n("img",{width:24,src:r,alt:"back arrow"}),n("span",null,"Se allt ",x.step===4?x.selectedService.post_title:x.selectedCategory.name)),x.parentCategory&&x.step<5&&n("button",{class:"hemfixarna_crumbs--back",onClick:()=>{x.step=1;x.selectedCustomerCategory=x.parentCategory;x.selectedProduct=null}},n("img",{width:24,src:r,alt:"back arrow"}),n("span",null,"Se allt ",x.parentCategory.name)))}get el(){return r(this)}};var D;(function(t){t["kund"]="kund";t["byggmax"]="byggmax";t["skanska"]="skanska";t["string"]="string-furniture";t["hornbach"]="hornbach"})(D||(D={}));var N;(function(t){t["byggmax"]="category/bygg"})(N||(N={}));const P="";const F=class{constructor(t){e(this,t);this.tree=null;this.slug=undefined;this.id=undefined;this.forceOldTree=false;this.loadFromQuery=false}render(){return n("hemfixarna-component",{loadFromQuery:this.loadFromQuery,forceOldTree:this.forceOldTree,id:this.id,slug:this.slug,business:D.byggmax,topCategory:N.byggmax})}};F.style=P;const A=class{constructor(t){e(this,t);this.tree=undefined}render(){const t=a(`./assets/back.svg`);return n("div",{class:"hemfixarna_cart"},n("div",{class:"hemfixarna_cart--left"},n("h2",null,x.checkoutStep===2&&!x.checkoutEdit&&n("button",{onClick:()=>{x.checkoutStep=1}},n("img",{width:24,src:t,alt:"back arrow"})),"Din bokning"),n("hemfixarna-orderrows",{tree:this.tree})),n("div",{class:"hemfixarna_cart--right"},n("h2",null,x.checkoutStep===2&&!x.checkoutEdit&&n("button",{onClick:()=>{x.checkoutStep=1}},n("img",{width:24,src:t,alt:"back arrow"})),"Dina uppgifter"),n("hemfixarna-checkout",null),n("hemfixarna-info",null)))}};const R=class{constructor(t){e(this,t)}setSelectedService(t){x.selectedService=t;x.step=3}render(){return n("div",null,n("h2",null,x.selectedCategory.name),n("div",{class:"hemfixarna_categories--wrapper"},n("div",null,n("ul",{class:"hemfixarna_categories"},x.selectedCategory.services.sort(((t,i)=>t.post_title<i.post_title?-1:1)).map((t=>{var i;return n("hemfixarna-box",{post:t,icon:(i=t.icon.url)!==null&&i!==void 0?i:t.icon,postTitle:t.post_title})})))),n("hemfixarna-info",{list:x.options.trust})))}};const K=`${"https://hemfixarna.se"}/wp-json/headless`;const J=async t=>{if(!t){return}const i=t.split("/")[0];const e=t.split("/")[1];try{const t=await fetch(`${K}/${i}/${e}`);return await t.json()}catch(t){console.log(t)}};const H=async t=>{try{const i=await fetch(`${K}/customer/${t}`);return await i.json()}catch(t){console.log(t)}};const E=async()=>{try{const t=await fetch(`${K}/webcoptions`);return await t.json()}catch(t){console.log(t)}};const U=async()=>{try{const t=await fetch(`${K}/rut`);return await t.json()}catch(t){console.log(t)}};const W=async()=>{try{const t=await fetch(`${K}/rot`);return await t.json()}catch(t){console.log(t)}};const X=async t=>{try{const i=await fetch(`${K}/weborder`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}});return await i.json()}catch(t){console.log(t)}};const B=class{constructor(t){e(this,t);this.handleChangeDate=t=>{this.dateError=null;this.date=t.target.value};this.handleChangeTerms=()=>{this.generalError=null};this.sendOrder=async()=>{const t={name:x.user.firstName+" "+x.user.lastName,customer:x.business,phone:x.user.phone,social_security_number:x.user.ssn,email:x.user.email,address:`${x.user.street} | ${x.user.zip} | ${x.user.town}`,earliest_visit_date:this.date,order_items:JSON.stringify(x.cart.map((t=>`${t.amount}st ${t.name} ${y(t,t.price,t.amount)}kr ${t.parts.length?`| ${t.parts.map((i=>`${i.amount}st ${i.name} ${C(i,t,i.amount)}kr`)).join(" | ")} `:""} ${t.rot&&x.rot?"(med rot)":x.rut&&t.rut?"(med rut)":"(utan rut/rot)"}`))),start_fee:`${T().rut>0?`Rut: ${T().rut}kr`:"Rut: 0"} `+`${T().rot>0?`Rot: ${T().rot}kr`:"Rot: 0"}`,total:O()};try{const{data:i,status:e}=await X(t);if(i&&e&&e===200){x.step=6;const t=this.el.closest(".hemfixarna_content");v(t)}else{this.generalError="Något gick fel, försök igen senare"}}catch(t){this.generalError="Något gick fel, försök igen senare"}};this.handleSubmit=t=>{t.preventDefault();this.generalError=null;const i=this.date.length>0;if(!i){this.dateError="Ange ett giltigt datum"}const e=Array.from(this.el.querySelectorAll('input[type="checkbox"]'));const n=e.find((t=>!t.checked));if(n){this.generalError="Du måste godkänna villkoren"}if(i&&!n){this.sendOrder()}};this.render=()=>{const t=a(`./assets/date.svg`);const i=a(`./assets/down.svg`);if(x.checkoutEdit){return n("hemfixarna-address",null)}else if(x.checkoutStep===1){return n("hemfixarna-getuser",null)}else if(x.checkoutStep===2){return n("div",{class:"mb-2"},n("div",{class:"hemfixarna_addressinfo"},n("div",null,n("p",null,b(x.user.firstName)),n("p",null,b(x.user.lastName)),n("p",null,x.user.email),n("p",null,x.user.phone)),n("div",null,n("p",null,b(x.user.street)),n("p",null,b(x.user.zip)),n("p",null,b(x.user.town))),n("button",{onClick:()=>x.checkoutEdit=true},"Behöver du ändra adressen?")),n("form",{onSubmit:t=>this.handleSubmit(t)},n("div",null,n("img",{src:t,width:24}),n("input",{class:`${this.date.length?"input_active":""}`,min:(new Date).toISOString().split("T")[0],onChange:t=>this.handleChangeDate(t),type:"date",name:"date",value:this.date}),n("label",{htmlFor:"date"},"Tidigaste datum för hembesök"),n("img",{src:i,width:24})),this.dateError&&n("span",null,this.dateError),n("label",{class:"hemfixarna_checkbox"},n("input",{onChange:()=>this.handleChangeTerms(),type:"checkbox"}),n("span",{innerHTML:x.options.terms})),x.cart.filter((t=>t.terms_checkout&&t.terms_show_checkbox)).map((t=>n(s,null,n("label",{class:"hemfixarna_checkbox"},n("input",{onChange:()=>this.handleChangeTerms(),type:"checkbox"}),n("span",null,t.terms_checkout))))),this.generalError&&n("span",null,this.generalError),n("input",{type:"submit",value:"Slutför Bokning"})))}};this.date="";this.dateError=null;this.generalError=null}componentWillLoad(){if(Boolean(x.user&&x.user.street)){x.checkoutStep=2}}get el(){return r(this)}};const V='@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap"); *{box-sizing:border-box}:host{font-family:"Inter", sans-serif}:host .mb-2{margin-bottom:2rem}:host button{color:#474444}:host form{display:flex;flex-direction:column;gap:1rem}:host form img{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none}:host form img:first-of-type{left:1rem}:host form img:last-of-type{right:1rem}:host form span{margin-top:-0.5rem;color:#ec6632}:host form p{text-align:center}:host form p{margin:0}:host form div{position:relative}:host form div label{pointer-events:none;position:absolute;left:1rem;top:50%;transform:translateY(-50%);background:#fff;padding:0.25rem;transition:0.2s all cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host form div input{padding:1rem;width:100%;font-size:1rem;border:1px solid #fcd9c9}:host form div input:focus~label,:host form div .input_active~label{top:0;transform:translateY(-50%);background:linear-gradient(180deg, #fffaf2 50%, #fff 50%)}:host h1{font-size:24px;font-weight:400;line-height:32px;letter-spacing:-3%;text-align:left;margin:0 0 0.5rem}:host h2{margin:0 0 1.5rem;font-weight:700;font-size:20px;line-height:28px;letter-spacing:-3%}:host p{font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna{width:100%;}:host .hemfixarna_nav{position:absolute;top:0;width:100dvw;left:0;height:80px;z-index:9999}:host .hemfixarna_nav--links{display:none !important}@media (min-width: 769px){:host .hemfixarna_nav--links{display:flex !important}}:host .hemfixarna_nav--links a{color:#ec6632;text-decoration:none;border:1px solid rgba(255, 255, 255, 0.3);border-radius:3.5rem;padding:0.5rem 2rem}:host .hemfixarna_nav>div{position:relative;overflow:hidden;width:100%;height:100%;display:flex;justify-content:space-between;align-items:center;padding:0 1rem}@media (min-width: 769px){:host .hemfixarna_nav>div{padding:0 2rem}}:host .hemfixarna_nav>div>div{display:flex;gap:2rem;justify-content:space-between}:host .hemfixarna_nav>div>img{position:absolute;width:100%;height:100%;top:0;left:0;z-index:-1}:host .hemfixarna_nav p{color:#fff}:host .hemfixarna_standalone .hemfixarna_backdrop{background:#fffaf2;opacity:1}:host .hemfixarna_standalone .hemfixarna_modal{top:80px;transform:translateX(-50%);border:none;height:calc(100dvh - 80px);opacity:0}:host .hemfixarna_standalone .hemfixarna_modal--open{opacity:1}:host .hemfixarna .switch{position:relative;display:inline-block;width:40px;height:20px}:host .hemfixarna .switch input{opacity:0;width:0;height:0}:host .hemfixarna .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:0.4s;transition:0.4s;border-radius:34px}:host .hemfixarna .slider:before{position:absolute;content:"";height:18px;width:18px;left:2px;bottom:1px;background-color:white;-webkit-transition:0.4s;transition:0.4s;border-radius:50%}:host .hemfixarna input:checked+.slider{background-color:#fcd9c9}:host .hemfixarna input:focus+.slider{box-shadow:0 0 1px #fcd9c9}:host .hemfixarna input:checked+.slider:before{-webkit-transform:translateX(18px);-ms-transform:translateX(18px);transform:translateX(18px);background:#ec6632}:host .hemfixarna_checkbox{display:grid;grid-template-columns:2.5rem auto;font-size:16px;font-weight:400;line-height:24px;letter-spacing:-3%}:host .hemfixarna_checkbox>span{transform:translateY(6px)}:host .hemfixarna_checkbox span,:host .hemfixarna_checkbox span p{color:#474444;font-size:14px}:host .hemfixarna_checkbox p{text-align:left}:host .hemfixarna_info{display:flex;flex-direction:column;gap:1.5rem;padding:2rem;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);border-radius:0.25rem;border:1px solid #fcd9c9}:host .hemfixarna_info h2{margin:0}@media (min-width: 769px){:host .hemfixarna_info{position:sticky;top:0}}:host .hemfixarna_infomodal{position:absolute;top:40%;left:50%;transform:translate(-50%, -50%);width:100%;max-width:80%;background:#fffaf2;border:1px solid #fcd9c9;padding:2rem;z-index:99;border-radius:0.25rem;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;flex-direction:column;gap:1rem}:host .hemfixarna_infomodal p,:host .hemfixarna_infomodal h4{margin:0}:host .hemfixarna_infomodal button{background:#ec6632;color:#fff;border-radius:60px;font-size:16px;padding:0.5rem 1rem}:host .hemfixarna_addressinfo{padding:1rem 1rem 4rem;border:1px solid #fcd9c9;position:relative;margin-bottom:2rem;display:grid;grid-template-columns:1fr;gap:0.5rem}@media (min-width: 769px){:host .hemfixarna_addressinfo{grid-template-columns:1fr 1fr}}:host .hemfixarna_addressinfo button{position:absolute;bottom:1rem;right:1rem;font-weight:500;text-underline-offset:2px;text-decoration:underline}:host .hemfixarna_part{background:#fff;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:grid;padding:1rem;grid-template-columns:auto 75px}:host .hemfixarna_counter{display:flex;align-items:center}:host .hemfixarna_counter span{padding:0 0.5rem}:host .hemfixarna_counter img{cursor:pointer}:host .hemfixarna_counter img:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_description{display:grid;gap:1rem}:host .hemfixarna_description ul{list-style:disc;padding-right:0.75rem;transform:translateX(0.75rem)}:host .hemfixarna_description--hidden{max-height:140px;overflow:hidden;position:relative;cursor:pointer}:host .hemfixarna_description--hidden::after{content:"";position:absolute;bottom:0;left:0;right:0;height:8rem;background:linear-gradient(180deg, rgba(255, 253, 250, 0), rgba(255, 253, 250, 0.46) 50%, #fffaf2)}:host .hemfixarna_terms{font-size:14px}:host .hemfixarna_terms a{color:inherit}:host .hemfixarna_logo{height:4rem}:host .hemfixarna_box{padding:1rem;display:flex;align-items:center;justify-content:space-between;background:#fffaf2;border:1px solid #fcd9c9;width:100%;box-sizing:border-box;border-radius:0.25rem;gap:1rem 0.5rem}:host .hemfixarna_box>div{display:grid;gap:0.5rem}:host .hemfixarna_btn,:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{border:none;border-radius:60px;font-weight:600;letter-spacing:0.5px;line-height:20px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn:not(.disabled):hover,:host .hemfixarna_buy:not(.disabled):hover,:host .hemfixarna input[type=submit]:not(.disabled):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_btn{font-size:14px;background:#c84e18;color:#fff;padding:1rem 1.5rem;white-space:nowrap;position:relative}:host .hemfixarna_btn span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-0.5rem;right:-0.75rem}:host .hemfixarna_btn span{background:#25a710;color:#fff;right:0 !important}:host .hemfixarna_buy,:host .hemfixarna input[type=submit]{font-size:21px;background:#25a710;color:#fff;padding:1rem 1.5rem}:host .hemfixarna .disabled{opacity:0.5;cursor:default}:host .hemfixarna_modal{position:fixed;background:#fffaf2;border:1px solid #fcd9c9;border-radius:0.25rem;top:50%;left:50%;z-index:1000;transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);transform:translate(-50%, -50%) scale(0.7);opacity:0;height:92%;width:92%;max-width:920px;display:flex;flex-direction:column;gap:0.5rem}:host .hemfixarna_modal--open{opacity:1;transform:translate(-50%, -50%) scale(1)}:host .hemfixarna_backdrop{z-index:999;position:fixed;background:#474444;top:0;left:0;bottom:0;right:0;opacity:0;transition:transform 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946), opacity 0.1s cubic-bezier(0.465, 0.183, 0.153, 0.946)}:host .hemfixarna_backdrop--open{opacity:0.3}:host .hemfixarna_order{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;background-repeat:no-repeat !important;background-size:cover !important;background-position:center !important;display:grid;grid-template-columns:1fr 1fr;padding:3rem 2rem 4rem}@media (max-width: 768px){:host .hemfixarna_order{grid-template-columns:1fr;grid-template-rows:0 auto}}:host .hemfixarna_order>div:last-of-type{background:#fffaf2;padding:2rem;display:flex;flex-direction:column;max-height:100%;overflow:auto}:host .hemfixarna_order img{cursor:pointer}:host .hemfixarna_order button{margin:1rem 0;padding:0;text-decoration:underline;text-underline-offset:2px;font-size:14px;font-weight:600}:host .hemfixarna_cart{display:grid;grid-template-columns:1fr 1fr;gap:2rem}@media (max-width: 768px){:host .hemfixarna_cart{grid-template-columns:1fr;gap:0}}:host .hemfixarna_cart--right h2,:host .hemfixarna_cart--left h2{display:flex;align-items:center}:host .hemfixarna_cart--right h2 img,:host .hemfixarna_cart--left h2 img{margin-top:0.2rem}@media (min-width: 769px){:host .hemfixarna_cart--left h2 button{display:none}}@media (max-width: 768px){:host .hemfixarna_cart--right h2 button{display:none}}:host .hemfixarna_cart--startfee{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot{display:flex;justify-content:space-between}:host .hemfixarna_cart--rutrot div{display:flex;gap:1rem;align-items:center}:host .hemfixarna_cart--additional{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--additional p{font-size:14px}:host .hemfixarna_cart--additional strong{text-decoration:underline;text-underline-offset:2px;cursor:pointer;position:relative}:host .hemfixarna_cart--additional strong img{position:absolute;top:50%;transform:translateY(-50%);right:-1.5rem}:host .hemfixarna_cart--price{border-top:1px solid #fcd9c9;padding:1rem;display:flex;justify-content:space-between}:host .hemfixarna_cart--price h3{margin:0}:host .hemfixarna_cart--item{display:flex;flex-direction:column;gap:0.5rem;padding:1rem 0;border-top:1px solid #fcd9c9}:host .hemfixarna_cart--item>div{display:flex;justify-content:space-between}:host .hemfixarna_cart--item>div>div{display:flex;align-items:center;gap:1rem}:host .hemfixarna_cart--item>div button{color:#ec6632}:host .hemfixarna_categories{display:grid;gap:1.5rem}:host .hemfixarna_categories--wrapper{gap:2rem;display:grid;grid-template-columns:1fr 1fr}@media (max-width: 768px){:host .hemfixarna_categories--wrapper{grid-template-columns:1fr}}:host .hemfixarna_categories li{position:relative;background:#fff;border-radius:0.25rem;min-height:132px;padding:1.5rem;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863);display:flex;align-items:center;gap:1.5rem;cursor:pointer}:host .hemfixarna_categories li:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_categories li>button{height:100%;width:100%}:host .hemfixarna_categories li .price{font-weight:700}:host .hemfixarna_content{height:100%;overflow:auto;padding:0 2rem 4rem}:host .hemfixarna_content--5{padding-top:1rem}:host .hemfixarna_crumbs{position:relative;padding:1rem 1.5rem;border-bottom:1px solid #fcd9c9;display:flex;justify-content:space-between}:host .hemfixarna_crumbs--back{padding:1rem 1.5rem 0.5rem;display:flex;align-items:center;gap:0.5rem;box-shadow:none !important}:host .hemfixarna_crumbs--back:hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs img{cursor:pointer}:host .hemfixarna_crumbs .close{position:absolute;right:-1rem;top:-1rem;z-index:9}:host .hemfixarna_crumbs .cart{padding-left:1rem;position:relative}:host .hemfixarna_crumbs .cart img{cursor:inherit}:host .hemfixarna_crumbs .cart span{position:absolute;background:#fff;border-radius:100%;width:24px;height:24px;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:13px;line-height:11px;top:-0.5rem;right:-0.75rem}:host .hemfixarna_crumbs .cart_active{cursor:pointer}:host .hemfixarna_crumbs .cart_active span{background:#25a710;color:#fff}:host .hemfixarna_crumbs--links{display:flex;align-items:center;gap:1rem;overflow:auto}@media (min-width: 769px){:host .hemfixarna_crumbs--links{-ms-overflow-style:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar{display:none}:host .hemfixarna_crumbs--links::-webkit-scrollbar-button{display:none}}:host .hemfixarna_crumbs button{white-space:nowrap;background:#f1ded6;border-radius:4rem;padding:0.75rem 1rem;font-size:12px;font-weight:600;letter-spacing:0.3px;box-shadow:none !important}:host .hemfixarna_crumbs button:not(.active):hover{transition:0.1s all cubic-bezier(0.465, 0.183, 0.153, 0.946);filter:brightness(1.02);transform:scale(1.01);box-shadow:0px 8px 16px 2px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_crumbs .active{background:#fffaf2;cursor:default}:host .hemfixarna_features{gap:0.75rem !important}:host .hemfixarna_features li{display:flex;gap:1rem;align-items:center}:host .hemfixarna_address{margin-bottom:1rem}:host .hemfixarna_product{display:grid;gap:1rem}:host .hemfixarna_product--link{font-weight:700;color:#474444;text-underline-offset:0.25rem}:host .hemfixarna_product--left{gap:2rem}:host .hemfixarna_product--right{gap:2rem}:host .hemfixarna_product--price{margin-top:0.25rem;font-weight:700}:host .hemfixarna_product--total{text-align:center;margin:-1rem 0;font-size:21px;line-height:28px}:host .hemfixarna_product--item{background:#fff;padding:1rem;display:grid;grid-template-columns:auto 75px;box-shadow:0px 4px 8px 0px rgba(0, 0, 0, 0.0392156863)}:host .hemfixarna_product--grid{display:grid;grid-template-columns:1fr 1fr;gap:2rem}@media (max-width: 768px){:host .hemfixarna_product--grid{grid-template-columns:1fr}}:host .hemfixarna_product--grid>div{display:flex;flex-direction:column}:host .hemfixarna_product--grid ul{display:flex;flex-direction:column;gap:0.25rem}:host .hemfixarna_product p{margin:0}:host .hemfixarna_product--top{display:flex;gap:2rem}:host .hemfixarna_product--top>div{width:100%}:host .hemfixarna_product--top>div h1{max-width:80%}@media (max-width: 768px){:host .hemfixarna_product--top>div h1{max-width:100%}}:host .hemfixarna_product--top h4{margin-bottom:0.5rem}:host h5,:host p{margin:0}:host input[type=submit]{cursor:pointer}:host input[type=date]~label{left:3.5rem}:host input[type=date]{border:1px solid #fcd9c9;padding-left:4rem}:host input[type=checkbox]{height:1.125rem;width:1.125rem;border:1px solid #fcd9c9}:host input[type=checkbox]:checked{background:red}:host input[type=date]::-webkit-calendar-picker-indicator{background:transparent;bottom:0;color:transparent;cursor:pointer;height:auto;left:0;position:absolute;right:0;top:0;width:auto}:host button,:host a{cursor:pointer;background:none;border:none}:host ul{list-style:none;margin:0;padding:0}';const Q=class{constructor(t){e(this,t);this.slugIsOldFormat=t=>{if(!t)return false;return["product","service","category"].some((i=>t.includes(i)))};this.triggerScrollTotop=()=>{const t=this.el.shadowRoot.querySelector(".hemfixarna_content");v(t)};this.modal=false;this.showModal=false;this.tree=null;this.product=null;this.proppedProduct=null;this.slug=undefined;this.id=undefined;this.business=undefined;this.topCategory=undefined;this.forceOldTree=false;this.loadFromQuery=false;this.isDemo=false;this.nav=undefined}loadCategoryOrProduct(t){this.proppedProduct=null;if(t.startsWith("c-")){const i=[...x.customer.categories,...x.customer.categories.map((t=>{var i;return(i=t.sub_categories)!==null&&i!==void 0?i:[]}))].flat();const e=i.find((i=>i&&i.id===t.replace("c-","")));if(e){x.selectedCustomerCategory=e;x.step=2}}else{const i=x.customer.categories.map((t=>t.show_products?t.products:t.sub_categories?t.sub_categories.map((t=>t.products)):[])).flat().flat();const e=i.find((i=>i&&i.fields.ID===parseInt(t)));if(e){x.selectedProduct=e.fields;x.step=4;this.proppedProduct=e.fields}}}async watchSlugChange(t){if(this.slugIsOldFormat(t)){this.fetchNewTaxonomy(t)}else if(x.customer&&t){this.loadCategoryOrProduct(t)}}async watchIdChange(t){if(t&&x.customer){this.loadCategoryOrProduct(t)}}async fetchNewTaxonomy(t){x.selectedCategory=null;x.selectedProduct=null;x.selectedService=null;const i=await J(t);if((i===null||i===void 0?void 0:i.code)==="not_found"||(i===null||i===void 0?void 0:i.code)==="rest_no_route"){console.log("taxonomy not found")}else if(i){this.setTaxonomy(i);if((i===null||i===void 0?void 0:i.post_type)==="ikea_product"){this.product=i}}}async componentWillLoad(){x.business=this.business;const t=window.sessionStorage.getItem(`hemfixarna-${this.business}-cart`);if(t){x.cart=JSON.parse(t)}const i=window.sessionStorage.getItem(`hemfixarna-${this.business}-user`);if(i){x.user=JSON.parse(i)}const[e,n,r,s,a]=await Promise.all([this.topCategory?J(this.topCategory):null,this.slug?J(this.slug):Promise.resolve(null),E(),U(),W()]);if((!this.slug||!this.slugIsOldFormat(this.slug))&&!this.forceOldTree){try{const t=await H(this.business);if((t===null||t===void 0?void 0:t.code)==="not_found"){console.warn("customer not found")}else if(t){x.customer=t;if(this.id){this.loadCategoryOrProduct(this.id)}else if(this.slug&&!this.slugIsOldFormat(this.slug)){this.loadCategoryOrProduct(this.slug)}}}catch(t){console.warn("customer not found")}}if((e===null||e===void 0?void 0:e.code)==="not_found");else if(e){this.tree=e}if((n===null||n===void 0?void 0:n.code)==="not_found"){console.log("taxonomy not found")}else if(n){this.setTaxonomy(n);if((n===null||n===void 0?void 0:n.post_type)==="ikea_product"){this.product=n}}if(this.loadFromQuery){const t=new URL(document.location.toString()).searchParams;this.id=t.get("id");if(!this.isDemo){this.openModal()}}x.rotOptions=a;x.rutOptions=s;x.options=r}setTaxonomy(t){if(t){if((t===null||t===void 0?void 0:t.taxonomy)==="service_cat"){x.selectedCategory=t;x.step=2}else if((t===null||t===void 0?void 0:t.post_type)==="service"){x.selectedService=t;x.selectedCategory=this.tree.sub_cats.find((i=>i.services.find((i=>i.ID===t.ID))));x.step=3}else if((t===null||t===void 0?void 0:t.post_type)==="ikea_product"){x.selectedProduct=t;x.selectedService=this.tree.sub_cats.map((t=>t.services)).flat().find((t=>t.products.find((t=>t.ID===x.selectedProduct.ID))));x.selectedCategory=this.tree.sub_cats.find((t=>t.services.find((t=>t.ID===x.selectedService.ID))));x.step=4}this.triggerScrollTotop()}}openModal(){this.modal=true;setTimeout((()=>{this.showModal=true}),50)}closeModal(){this.showModal=false;setTimeout((()=>{this.modal=false}),200)}handleClick(t){if(this.loadFromQuery&&!this.isDemo)return;const i=this.el.shadowRoot.querySelector(".hemfixarna_modal");if(i){const e=i.contains(t.composedPath()[0]);if(!e){this.closeModal()}}const e=this.el.shadowRoot.querySelector(".hemfixarna_infomodal");if(e){const i=e.contains(t.composedPath()[0]);if(!i){x.modal=null}}}getCartLength(){return x.cart.reduce(((t,i)=>t+i.amount),0)}render(){var t,i,e,r,s;const o=a(`./assets/hemfixarna.svg`);const l=((t=this.nav)===null||t===void 0?void 0:t.background)?a(this.nav.background):"";const h=((i=this.nav)===null||i===void 0?void 0:i.logo)?a(this.nav.logo):"";return n("div",{class:`hemfixarna ${this.loadFromQuery?"hemfixarna_standalone":""}`},this.loadFromQuery&&!this.isDemo&&this.nav?n("nav",{class:"hemfixarna_nav"},n("div",null,n("div",{class:"hemfixarna_nav--logos"},n("a",{href:this.nav.url,target:"_blank"},n("img",{src:h,alt:`${this.business} logo`})),n("a",{href:"https://hemfixarna.se/",target:"_blank"},n("p",null,"I samarbete med:"),n("img",{src:o,alt:"hemfixarna_logo",width:104}))),n("div",{class:"hemfixarna_nav--links"},n("a",{href:this.nav.url,target:"_blank"},"Till ",this.business),n("a",{href:"https://www.hemfixarna.se/",target:"_blank"},"Till Hemfixarna")),n("img",{src:l,alt:"nav_background"}))):null,!this.loadFromQuery||this.isDemo?n("div",{class:"hemfixarna_box"},n("div",null,n("div",null,n("p",null,((e=this.product)===null||e===void 0?void 0:e.post_title)||((r=this.proppedProduct)===null||r===void 0?void 0:r.post_title)||n("span",null,"Montering",n("wbr",null),"/Installation på plats - ",n("strong",null,"se priser här")),this.product&&((s=this.slug)===null||s===void 0?void 0:s.includes("product"))||this.proppedProduct?n("span",null," från"," ",n("strong",null,$(this.proppedProduct||this.product),"kr")):null)),n("img",{src:o,width:104})),n("button",{onClick:()=>this.openModal(),class:"hemfixarna_btn"},"Till montering",this.getCartLength()>0&&n("span",null,this.getCartLength()))):null,this.modal&&n("div",null,n("div",{class:`hemfixarna_modal ${this.showModal?"hemfixarna_modal--open":""}`},x.modal&&n("div",{class:"hemfixarna_infomodal"},x.modal.title&&n("h2",null,x.modal.title),x.modal.text.map((t=>n("p",{innerHTML:t}))),n("div",null,n("button",{onClick:()=>x.modal=null},"Stäng"))),(this.tree||x.customer)&&n("hemfixarna-breadcrumbs",{isDemo:this.isDemo,loadFromQuery:this.loadFromQuery,closeModal:()=>this.closeModal(),tree:this.tree}),!x.customer||this.slugIsOldFormat(this.slug)?n("div",{class:`hemfixarna_content hemfixarna_content--${x.step}`},x.step===1&&this.tree&&n("hemfixarna-start",{tree:this.tree}),x.step===2&&x.selectedCategory&&n("hemfixarna-category",null),x.step===3&&x.selectedService&&n("hemfixarna-service",null),x.step===4&&x.selectedProduct&&n("hemfixarna-product",null),x.step===5&&n("hemfixarna-cart",{tree:this.tree}),x.step===6&&n("hemfixarna-order",{tree:this.tree})):n("div",{class:`hemfixarna_content hemfixarna_content--${x.step}`},x.step<4&&n("hemfixarna-start",null),x.step===4&&x.selectedProduct&&n("hemfixarna-product",null),x.step===5&&n("hemfixarna-cart",{tree:this.tree}),x.step===6&&n("hemfixarna-order",{tree:this.tree}))),!this.isDemo?n("div",{class:`hemfixarna_backdrop ${this.showModal?"hemfixarna_backdrop--open":""}`}):null))}static get assetsDirs(){return["assets"]}get el(){return r(this)}static get watchers(){return{slug:["watchSlugChange"],id:["watchIdChange"]}}};Q.style=V;const Y='@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap"); :host{font-family:"Inter", sans-serif}:host .hemfixarna_example{margin-bottom:1rem;background:#000;padding:1rem;color:#fff;display:flex;justify-content:space-between;cursor:pointer;max-width:500px;box-sizing:border-box;position:relative}:host .hemfixarna_example--tooltip{background:#000;top:-3rem;font-size:16px;left:40%;color:white;padding:0.5rem;position:absolute;opacity:0}:host .hemfixarna_example--tooltip::after{content:"";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}:host .hemfixarna_example:hover .hemfixarna_example--tooltip{opacity:1}:host .hemfixarna_example p{font-size:14px}:host .hemfixarna_example img{filter:invert(1)}:host .hemfixarna_install{display:grid;gap:0.5rem;margin-top:1rem}:host .hemfixarna_product--label{background:#e1e0f5}:host .hemfixarna_categories{max-height:100%;overflow:auto;position:relative}:host .hemfixarna_categories--label{display:flex;align-items:center;justify-content:space-between;padding:0.5rem}:host .hemfixarna_categories--label button{background:#3f3a92;border:none;font-weight:600;padding:0.2rem 0.6rem;border-radius:10px;margin-right:0.5rem;color:#ece8e8}:host .hemfixarna_categories--label button:active{transform:scale(0.95)}:host .hemfixarna_categories--label--big{font-weight:600;border-bottom:1px solid black}:host p{margin:0}:host span{color:darkolivegreen;font-size:10px}:host button{cursor:pointer}:host>div{display:grid;gap:2rem;width:100%;grid-template-columns:1fr 1fr;height:100vh;place-items:center;overflow:hidden;padding:1rem 2rem;box-sizing:border-box}:host>div>*{width:100%}:host>div>div{max-width:500px}:host>div ul{margin:0;padding:0;list-style:none}:host>div ul ul{gap:1px;display:grid}:host>div ul li{padding-left:1rem;background:#fff}';const q=class{constructor(t){e(this,t);this.cdnLink='<script type="module" src="https://cdn.jsdelivr.net/npm//hemfixarna-web-components@latest/dist/hemfixarna-components/hemfixarna-components.esm.js"><\/script>';this.selectedSlug=undefined;this.selectedID=undefined;this.tooltipText="Kopiera till urklipp";this.tree=null;this.customer=null}getTopLevelCategory(){switch("hornbach"){case D.byggmax:return N.byggmax;default:return""}}async componentWillLoad(){if(process.env.FORCE_OLD_TREE){const t=await J(this.getTopLevelCategory());if((t===null||t===void 0?void 0:t.code)==="not_found");else if(t){this.tree=t}}else{const t=await H("hornbach");if(t.code!=="not_found"&&t){this.customer=t}}}getExample(){return`<hemfixarna-${"hornbach"}${this.selectedSlug?` slug="${this.selectedSlug}" `:""}${this.selectedID?` id="${this.selectedID}" `:""}></hemfixarna-${"hornbach"}>`}copyExample(){navigator.clipboard.writeText(this.getExample());this.tooltipText="Snippet kopierad";setTimeout((()=>{this.tooltipText="Kopiera till urklipp"}),2e3)}copyCdn(){navigator.clipboard.writeText(this.cdnLink);this.tooltipText="Text kopierad";setTimeout((()=>{this.tooltipText="Kopiera till urklipp"}),2e3)}copyNpmInstall(){navigator.clipboard.writeText("npm i hemfixarna-web-components");this.tooltipText="Text kopierad";setTimeout((()=>{this.tooltipText="Kopiera till urklipp"}),2e3)}render(){const t=a(`./assets/copy.png`);return n("div",null,n("div",null,n("div",{onClick:()=>this.copyExample(),class:"hemfixarna_example"},n("p",null,this.getExample()),n("img",{src:t,height:20}),n("span",{class:"hemfixarna_example--tooltip"},this.tooltipText)),"hornbach"===D.byggmax&&n("hemfixarna-byggmax",{forceOldTree:Boolean(process.env.FORCE_OLD_TREE),slug:this.selectedSlug,id:this.selectedID}),"hornbach"===D.skanska&&n("hemfixarna-skanska",{id:this.selectedID}),"hornbach"===D.string&&n("hemfixarna-string-furniture",{id:this.selectedID}),"hornbach"===D.hornbach&&n("hemfixarna-hornbach",{isDemo:true,id:this.selectedID}),"hornbach"===D.kund&&n("hemfixarna-kund",{id:this.selectedID}),n("div",{class:"hemfixarna_install"},n("div",{onClick:()=>this.copyCdn(),class:"hemfixarna_example"},n("p",null,this.cdnLink),n("span",{class:"hemfixarna_example--tooltip"},this.tooltipText),n("img",{src:t,height:20})))),n("ul",{class:"hemfixarna_categories"},this.customer?n("div",null,this.customer.categories.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label hemfixarna_categories--label--big"},n("div",null,n("p",null,t.name),n("span",null,`c-${t.id}`)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(`c-${t.id}`)},"Kopiera ID"),n("button",{onClick:()=>this.selectedID=`c-${t.id}`},"Ladda kategori"))),t.show_products&&t.products?n("ul",null,t.products.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label hemfixarna_product--label"},n("div",null,n("p",null,t.fields.post_title),n("span",null,t.fields.ID)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(String(t.fields.ID))},"Kopiera ID"),n("button",{onClick:()=>this.selectedID=String(t.fields.ID)},"Ladda produkt"))))))):n("ul",null,t.sub_categories&&t.sub_categories.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label"},n("div",null,n("p",null,t.name),n("span",null,`c-${t.id}`)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(`c-${t.id}`)},"Kopiera ID"),n("button",{onClick:()=>this.selectedID=`c-${t.id}`},"Ladda kategori"))),n("ul",null,t.products.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label hemfixarna_product--label"},n("div",null,n("p",null,t.fields.post_title),n("span",null,t.fields.ID)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(String(t.fields.ID))},"Kopiera ID"),n("button",{onClick:()=>this.selectedID=String(t.fields.ID)},"Ladda produkt"))))))))))))))):n("div",null,this.tree.sub_cats.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label hemfixarna_categories--label--big"},n("div",null,n("p",null,t.name),n("span",null,`category/${t.slug}`)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(`category/${t.slug}`)},"Kopiera slug"),n("button",{onClick:()=>this.selectedSlug=`category/${t.slug}`},"Ladda kategori"))),n("ul",null,t.services.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label"},n("div",null,n("p",null,t.post_title),n("span",null,`service/${t.post_name}`)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(`service/${t.post_name}`)},"Kopiera slug"),n("button",{onClick:()=>this.selectedSlug=`service/${t.post_name}`},"Ladda kategori"))),n("ul",null,t.products.map((t=>n("li",null,n("div",{class:"hemfixarna_categories--label"},n("div",null,n("p",null,t.post_title),n("span",null,`product/${t.post_name}`)),n("div",null,n("button",{onClick:()=>navigator.clipboard.writeText(`product/${t.post_name}`)},"Kopiera slug"),n("button",{onClick:()=>this.selectedSlug=`product/${t.post_name}`},"Ladda kategori")))))))))))))))))}};q.style=Y;var G=class extends Error{constructor(){super("Invalid swedish personal identity number")}};var Z=(t,i)=>{const e=t.getTime()-i.getTime();return e<0?-1:e>0?1:e};var tt=(t,i)=>{const e=Z(t,i);const n=Math.abs(t.getFullYear()-i.getFullYear());t.setFullYear(t.getFullYear()-e*n);const r=Z(t,i)===-e;const s=e*(n-+r);return s===0?0:s};var it=t=>{let i=0;t+="";for(let e=0,n=t.length;e<n;e++){let n=parseInt(t[e]);n*=2-e%2;if(n>9){n-=9}i+=n}return Math.ceil(i/10)*10-i};var et=(t,i,e)=>{i-=1;const n=new Date(t,i,e);return!(n.getFullYear()!==t||n.getMonth()!==i||n.getDate()!==e)};var nt=class{constructor(t,i){this._century="";this._fullYear="";this._year="";this._month="";this._day="";this._sep="";this._num="";this._check="";this.parse(t,{allowCoordinationNumber:true,allowInterimNumber:false,...i})}get century(){return this._century}get fullYear(){return this._fullYear}get year(){return this._year}get month(){return this._month}get day(){return this._day}get sep(){return this._sep}get num(){return this._num}get check(){return this._check}static parse(t,i){return new nt(t,i)}static valid(t,i){try{nt.parse(t,i);return true}catch(t){return false}}parse(t,i){if(t.length<10||t.length>13){throw new G}const e=/^(\d{2}){0,1}(\d{2})(\d{2})(\d{2})([+-]?)((?!000)\d{3}|[TRSUWXJKLMN]\d{2})(\d)$/;const n=e.exec(t);if(!n){throw new G}const r=n[1];const s=n[2];const a=n[3];const o=n[4];const l=n[5];const h=n[6];const c=n[7];if(typeof r==="undefined"||!r.length){const t=new Date;let i=0;if(l==="+"){this._sep="+";i=t.getFullYear()-100}else{this._sep="-";i=t.getFullYear()}this._century=(""+(i-(i-parseInt(s))%100)).substr(0,2)}else{this._century=r;if((new Date).getFullYear()-parseInt(r+s,10)<100){this._sep="-"}else{this._sep="+"}}this._year=s;this._fullYear=this._century+s;this._month=a;this._day=o;this._num=h;this._check=c;if(!this.valid()){throw new G}if(!(i==null?void 0:i.allowCoordinationNumber)&&this.isCoordinationNumber()){throw new G}if(!(i==null?void 0:i.allowInterimNumber)&&this.isInterimNumber()){throw new G}}valid(){const t=it(this.year+this.month+this.day+this.num.replace(/[TRSUWXJKLMN]/,"1"))===+this.check&&!!this.check;if(t&&et(parseInt(this.century+this.year),+this.month,+this.day)){return t}return t&&et(parseInt(this.century+this.year),+this.month,+this.day-60)}format(t=false){if(t){return`${this.century}${this.year}${this.month}${this.day}${this.num}${this.check}`}return`${this.year}${this.month}${this.day}${this.sep}${this.num}${this.check}`}getAge(){const t=this.getDate();return tt(new Date(Date.now()),t)}getDate(){let t=+this.day;if(this.isCoordinationNumber()){t-=60}const i=this.century+this.year+"-"+this.month+"-"+(t<10?"0"+t:t);return new Date(i)}isInterimNumber(){return/[TRSUWXJKLMN]/.test(this.num[0])}isCoordinationNumber(){return et(parseInt(this.century+this.year),+this.month,+this.day-60)}isFemale(){return!this.isMale()}isMale(){const t=parseInt(this.num.substr(-1));return t%2===1}};var rt=nt;function st(t,i,e){return e={path:i,exports:{},require:function(t,i){return at()}},t(e,e.exports),e.exports}function at(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var ot=st((function(t,i){Object.defineProperty(i,"__esModule",{value:true});i.utf8=void 0;i.utf8={encode:e,decode:n};function e(t){t=t.replace(/\r\n/g,"\n");var i="";for(var e=0;e<t.length;e++){var n=t.charCodeAt(e);if(n<128){i+=String.fromCharCode(n)}else if(n>127&&n<2048){i+=String.fromCharCode(n>>6|192);i+=String.fromCharCode(n&63|128)}else{i+=String.fromCharCode(n>>12|224);i+=String.fromCharCode(n>>6&63|128);i+=String.fromCharCode(n&63|128)}}return i}function n(t){var i="";var e=0;var n=0;var r=0;var s=0;while(e<t.length){n=t.charCodeAt(e);if(n<128){i+=String.fromCharCode(n);e++}else if(n>191&&n<224){r=t.charCodeAt(e+1);i+=String.fromCharCode((n&31)<<6|r&63);e+=2}else{r=t.charCodeAt(e+1);s=t.charCodeAt(e+2);i+=String.fromCharCode((n&15)<<12|(r&63)<<6|s&63);e+=3}}return i}}));var lt=st((function(t,i){Object.defineProperty(i,"__esModule",{value:true});i.generate=void 0;function e(t){var i=[];var e;var n;var s;var a;var o;var l;var p;var x;var g;var b=7;var v=12;var _=17;var k=22;var w=5;var y=9;var $=14;var C=20;var T=4;var z=11;var S=16;var j=23;var O=6;var I=10;var L=15;var M=21;var D=ot.utf8.encode(t);i=f(D);l=1732584193;p=4023233417;x=2562383102;g=271733878;for(e=0;e<i.length;e+=16){n=l;s=p;a=x;o=g;l=h(l,p,x,g,i[e+0],b,3614090360);g=h(g,l,p,x,i[e+1],v,3905402710);x=h(x,g,l,p,i[e+2],_,606105819);p=h(p,x,g,l,i[e+3],k,3250441966);l=h(l,p,x,g,i[e+4],b,4118548399);g=h(g,l,p,x,i[e+5],v,1200080426);x=h(x,g,l,p,i[e+6],_,2821735955);p=h(p,x,g,l,i[e+7],k,4249261313);l=h(l,p,x,g,i[e+8],b,1770035416);g=h(g,l,p,x,i[e+9],v,2336552879);x=h(x,g,l,p,i[e+10],_,4294925233);p=h(p,x,g,l,i[e+11],k,2304563134);l=h(l,p,x,g,i[e+12],b,1804603682);g=h(g,l,p,x,i[e+13],v,4254626195);x=h(x,g,l,p,i[e+14],_,2792965006);p=h(p,x,g,l,i[e+15],k,1236535329);l=c(l,p,x,g,i[e+1],w,4129170786);g=c(g,l,p,x,i[e+6],y,3225465664);x=c(x,g,l,p,i[e+11],$,643717713);p=c(p,x,g,l,i[e+0],C,3921069994);l=c(l,p,x,g,i[e+5],w,3593408605);g=c(g,l,p,x,i[e+10],y,38016083);x=c(x,g,l,p,i[e+15],$,3634488961);p=c(p,x,g,l,i[e+4],C,3889429448);l=c(l,p,x,g,i[e+9],w,568446438);g=c(g,l,p,x,i[e+14],y,3275163606);x=c(x,g,l,p,i[e+3],$,4107603335);p=c(p,x,g,l,i[e+8],C,1163531501);l=c(l,p,x,g,i[e+13],w,2850285829);g=c(g,l,p,x,i[e+2],y,4243563512);x=c(x,g,l,p,i[e+7],$,1735328473);p=c(p,x,g,l,i[e+12],C,2368359562);l=u(l,p,x,g,i[e+5],T,4294588738);g=u(g,l,p,x,i[e+8],z,2272392833);x=u(x,g,l,p,i[e+11],S,1839030562);p=u(p,x,g,l,i[e+14],j,4259657740);l=u(l,p,x,g,i[e+1],T,2763975236);g=u(g,l,p,x,i[e+4],z,1272893353);x=u(x,g,l,p,i[e+7],S,4139469664);p=u(p,x,g,l,i[e+10],j,3200236656);l=u(l,p,x,g,i[e+13],T,681279174);g=u(g,l,p,x,i[e+0],z,3936430074);x=u(x,g,l,p,i[e+3],S,3572445317);p=u(p,x,g,l,i[e+6],j,76029189);l=u(l,p,x,g,i[e+9],T,3654602809);g=u(g,l,p,x,i[e+12],z,3873151461);x=u(x,g,l,p,i[e+15],S,530742520);p=u(p,x,g,l,i[e+2],j,3299628645);l=d(l,p,x,g,i[e+0],O,4096336452);g=d(g,l,p,x,i[e+7],I,1126891415);x=d(x,g,l,p,i[e+14],L,2878612391);p=d(p,x,g,l,i[e+5],M,4237533241);l=d(l,p,x,g,i[e+12],O,1700485571);g=d(g,l,p,x,i[e+3],I,2399980690);x=d(x,g,l,p,i[e+10],L,4293915773);p=d(p,x,g,l,i[e+1],M,2240044497);l=d(l,p,x,g,i[e+8],O,1873313359);g=d(g,l,p,x,i[e+15],I,4264355552);x=d(x,g,l,p,i[e+6],L,2734768916);p=d(p,x,g,l,i[e+13],M,1309151649);l=d(l,p,x,g,i[e+4],O,4149444226);g=d(g,l,p,x,i[e+11],I,3174756917);x=d(x,g,l,p,i[e+2],L,718787259);p=d(p,x,g,l,i[e+9],M,3951481745);l=r(l,n);p=r(p,s);x=r(x,a);g=r(g,o)}return m(l)+m(p)+m(x)+m(g)}i.generate=e;function n(t,i){return t<<i|t>>>32-i}function r(t,i){var e;var n;var r;var s;var a;r=t&2147483648;s=i&2147483648;e=t&1073741824;n=i&1073741824;a=(t&1073741823)+(i&1073741823);if(e&n){return a^2147483648^r^s}if(e|n){if(a&1073741824){return a^3221225472^r^s}else{return a^1073741824^r^s}}else{return a^r^s}}function s(t,i,e){return t&i|~t&e}function a(t,i,e){return t&e|i&~e}function o(t,i,e){return t^i^e}function l(t,i,e){return i^(t|~e)}function h(t,i,e,a,o,l,h){t=r(t,r(r(s(i,e,a),o),h));return r(n(t,l),i)}function c(t,i,e,s,o,l,h){t=r(t,r(r(a(i,e,s),o),h));return r(n(t,l),i)}function u(t,i,e,s,a,l,h){t=r(t,r(r(o(i,e,s),a),h));return r(n(t,l),i)}function d(t,i,e,s,a,o,h){t=r(t,r(r(l(i,e,s),a),h));return r(n(t,o),i)}function f(t){var i;var e=t.length;var n=e+8;var r=(n-n%64)/64;var s=(r+1)*16;var a=Array(s-1);var o=0;var l=0;while(l<e){i=(l-l%4)/4;o=l%4*8;a[i]=a[i]|t.charCodeAt(l)<<o;l++}i=(l-l%4)/4;o=l%4*8;a[i]=a[i]|128<<o;a[s-2]=e<<3;a[s-1]=e>>>29;return a}function m(t){var i="";var e="";var n;var r;for(r=0;r<=3;r++){n=t>>>r*8&255;e="0"+n.toString(16);i=i+e.substr(e.length-2,2)}return i}}));var ht=st((function(t,i){Object.defineProperty(i,"__esModule",{value:true});i.MD5=i.generate=void 0;var e=lt;Object.defineProperty(i,"generate",{enumerable:true,get:function(){return e.generate}});i.MD5={generate:lt.generate}}));const ct=async t=>{var i;const e=await fetch((i="https://hemfixare-lookup.vercel.app/api")!==null&&i!==void 0?i:"https://hemfixare-lookup.vercel.app/api",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:t,hash:ht.MD5.generate(String.fromCharCode(83,101,67,82,101,116)+t)})});const n=await e.json();return n};const ut=class{constructor(t){e(this,t);this.handleChangeEmail=t=>{this.emailError=null;this.email=t.target.value};this.handleChangePhone=t=>{this.phoneError=null;this.phone=t.target.value};this.handleChangessn=t=>{this.ssnError=null;this.ssn=t.target.value};this.handleSubmit=async t=>{t.preventDefault();const i=new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);const e=i.test(this.email);if(!e){this.emailError="Ange en giltig e-postadress"}const n=this.phone.length>6;if(!n){this.phoneError="Ange ett giltigt telefonnummer"}const r=rt.valid(this.ssn);if(!r){this.ssnError="Ange ett giltigt personnummer"}else if(r){const t=rt.parse(this.ssn).format(true);this.ssn=[t.slice(0,8),"-",t.slice(8)].join("")}if(e&&n&&r){try{const t=await ct(this.ssn);if(t){x.checkoutStep=2;x.user=Object.assign(Object.assign({},t),{email:this.email,phone:this.phone,ssn:this.ssn});const i=this.el.closest(".hemfixarna_content");v(i)}else{this.ssnError="Vi kunde tyvärr inte hitta en address med ditt angivna personnummer"}}catch(t){this.ssnError="Vi kunde tyvärr inte hitta en address med ditt angivna personnummer";console.log(t)}}};this.render=()=>n("form",{class:"mb-2",onSubmit:t=>this.handleSubmit(t)},n("div",null,n("input",{class:`${this.email.length?"input_active":""}`,onChange:t=>this.handleChangeEmail(t),type:"email",name:"email",value:this.email}),n("label",{htmlFor:"email"},"E-post ")),this.emailError&&n("span",null,this.emailError),n("div",null,n("input",{class:`${this.phone.length?"input_active":""}`,onChange:t=>this.handleChangePhone(t),type:"tel",name:"phone",value:this.phone}),n("label",{htmlFor:"phone"},"Mobiltelefon ")),this.phoneError&&n("span",null,this.phoneError),n("div",null,n("input",{class:`${this.ssn.length?"input_active":""}`,onChange:t=>this.handleChangessn(t),type:"tel",name:"ssn",value:this.ssn}),n("label",{htmlFor:"phone"},"Personnummer*")),this.ssnError&&n("span",null,this.ssnError),n("input",{type:"submit",value:"Fortsätt och Boka*"}),n("p",null,"*Vi hämtar din adress"));this.email="";this.emailError=null;this.phone="";this.phoneError=null;this.ssn="";this.ssnError=null}componentWillLoad(){if(x.user){this.email=x.user.email;this.phone=x.user.phone;this.ssn=x.user.ssn}}get el(){return r(this)}};const dt="";const ft=class{constructor(t){e(this,t);this.id=undefined;this.loadFromQuery=true;this.isDemo=false}render(){return n("hemfixarna-component",{nav:{url:"https://www.hornbach.se/",logo:"assets/hornbach/logo.svg",background:"./assets/hornbach/nav.jpg"},isDemo:this.isDemo,loadFromQuery:this.loadFromQuery,id:this.id,business:D.hornbach})}};ft.style=dt;const mt=class{constructor(t){e(this,t);this.logo=a(`./assets/hemfixarna.svg`);this.checkoutList=[{trust_badge:"Efter att du fyllt i formuläret blir du kontaktad av en Hemfixare för bokning av tid."},{trust_badge:"När jobbet är klart kommer du få en faktura med RUT/ROT-avdrag."}];this.list=null}getList(){return this.list?this.list:this.checkoutList}render(){const t=a(`./assets/checked.svg`);return n("div",{class:"hemfixarna_info"},x.step<5?n(s,null,n("h2",null,"Vilka är Hemfixarna?"),n("p",null,"Vi fixar allt från krångliga datorer till montering av möbler. Vi finns i hela Sverige och är alltid redo att rycka ut.")):n("h2",null,"Vad händer nu?"),n("ul",{class:"hemfixarna_features"},this.getList().map((i=>n("li",{key:i.trust_badge},n("img",{src:t,alt:"checked"}),n("p",null,i.trust_badge))))),n("img",{src:this.logo,width:200,alt:"hemfixarna"}),n("a",{class:"hemfixarna_product--link",target:"_blank",href:x.options.link.url},x.options.link.title))}};const pt=class{constructor(t){e(this,t);this.id=undefined;this.loadFromQuery=false}render(){return n("hemfixarna-component",{loadFromQuery:this.loadFromQuery,id:this.id,business:D.kund})}};const xt=class{constructor(t){e(this,t);this.render=()=>n("div",{style:{background:`url(${x.options.thank_you_image})`},class:"hemfixarna_order"},n("div",null),n("div",null,n("h2",null,"Tack för din bokning"),n("hemfixarna-orderrows",{tree:this.tree,cart:false}),n("span",{onClick:()=>this.resetShop()},n("button",null,"Gör en ny bokning")),n("hemfixarna-info",{list:[{trust_badge:"Du kommer bli kontaktad av en Hemfixare för bokning av tid."},{trust_badge:"När jobbet är klart kommer du få en faktura med RUT/ROT-avdrag."}]})));this.tree=undefined}resetShop(){x.step=1;x.cart=[];x.selectedCategory=null;x.selectedService=null;x.selectedProduct=null;x.checkoutStep=1}disconnectedCallback(){this.resetShop()}};const gt=class{constructor(t){e(this,t);this.cart=true;this.tree=undefined}goToProduct(t){if(x.customer){const i=x.customer.categories.map((t=>t.show_products?t.products:t.sub_categories?t.sub_categories.map((t=>t.products)):[])).flat().flat();const e=i.find((i=>i&&i.fields.ID===t));if(e){x.selectedProduct=e.fields;x.step=4}}else{const i=this.tree.sub_cats.map((t=>t.services)).flat();const e=i.map((t=>t.products)).flat();const n=e.find((i=>i.ID===t));const r=i.find((i=>i.products.find((i=>i.ID===t))));const s=this.tree.sub_cats.find((i=>i.services.find((i=>i.products.find((i=>i.ID===t))))));x.selectedCategory=s;x.selectedService=r;x.selectedProduct=n;x.step=4}}openRot(){x.modal={title:x.rotOptions.rot_start_fee_heading,text:[x.rotOptions.rot_start_fee_text,x.rotOptions.rot_start_fee_text_secondary]}}openRut(){x.modal={title:x.rutOptions.rut_start_fee_heading,text:[x.rutOptions.rut_start_fee_text,x.rutOptions.rut_start_fee_text_secondary]}}render(){const t=a(`./assets/info.svg`);return n(s,null,n("ul",{class:"hemfixarna_cart--items"},x.cart.map((t=>{var i;return n("li",{class:"hemfixarna_cart--item"},n("div",null,n("div",null,t.icon&&n("img",{width:30,src:(i=t.icon.url)!==null&&i!==void 0?i:t.icon,alt:t.name}),n("p",null,n("strong",null,t.amount,"x "),t.name)),this.cart&&n("button",{onClick:()=>this.goToProduct(t.id)},"Ändra")),n("p",null,n("strong",null,y(t,t.price,t.amount),"kr")),t.parts.length>0&&n("ul",null,t.parts.map((i=>n("li",null,n("p",null,n("strong",null,i.amount,"x "),i.name),n("p",null,n("strong",null,C(i,t,i.amount),"kr")))))))}))),n("div",{class:"hemfixarna_cart--additional"},T().rot>0&&n("div",{class:"hemfixarna_cart--startfee"},n("p",null,n("strong",{onClick:()=>this.openRot()},x.rotOptions.rot_start_fee_heading,n("img",{height:16,src:t,alt:"info monteringsavgift"}))),n("p",null,T().rot,"kr")),T().rut>0&&n("div",{class:"hemfixarna_cart--startfee"},n("p",null,n("strong",{onClick:()=>this.openRut()},x.rutOptions.rut_start_fee_heading,n("img",{height:16,src:t,alt:"info monteringsavgift"}))),n("p",null,T().rut,"kr")),x.cart.find((t=>t.rot))&&n("div",{class:"hemfixarna_cart--rutrot"},n("div",null,this.cart&&n("label",{class:"switch"},n("input",{checked:x.rot,onChange:()=>x.rot=!x.rot,type:"checkbox"}),n("span",{class:"slider"})),n("p",null,"ROT-avdrag")),n("p",null,"(-",x.rot?S():0,"kr)")),x.cart.find((t=>t.rut))&&n("div",{class:"hemfixarna_cart--rutrot"},n("div",null,n("label",{class:"switch"},n("input",{onChange:()=>x.rut=!x.rut,checked:x.rut,type:"checkbox"}),n("span",{class:"slider"})),n("p",null,"RUT-avdrag")),n("p",null,"(-",x.rut?j():0,"kr)"))),n("div",{class:"hemfixarna_cart--price"},n("h2",null,"Totalbelopp: "),n("h2",null,O(),"kr")))}};const bt=class{constructor(t){e(this,t);this.amount=0;this.hideDescription=true}addProduct(){const t=x.cart.find((t=>t.id===x.selectedProduct.ID));if(t){t.amount++;x.cart=[...x.cart]}else{x.cart=[...x.cart,{id:x.selectedProduct.ID,rut:x.selectedProduct.rut,rot:x.selectedProduct.rot,amount:1,parts:[],price:x.selectedProduct.price,name:x.selectedProduct.post_title,start_fee:!x.selectedProduct.hide_start_fee,terms_checkout:x.selectedProduct.terms_checkout,terms_show_checkbox:x.selectedProduct.terms_show_checkbox,icon:x.selectedProduct.icon}]}}removeProduct(){const t=x.cart.find((t=>t.id===x.selectedProduct.ID));if(t&&t.amount>1){t.amount--;x.cart=[...x.cart]}else{x.cart=x.cart.filter((t=>t.id!==x.selectedProduct.ID))}}addPart(t){const i=x.cart.find((t=>t.id===x.selectedProduct.ID));if(i){const e=i.parts.find((i=>i.id===t.ID));if(e){e.amount++;i.parts=[...i.parts]}else{i.parts=[...i.parts,{id:t.ID,amount:1,price:t.price,name:t.post_title}]}x.cart=[...x.cart.filter((t=>t.id!==i.id)),i]}}removePart(t){const i=x.cart.find((t=>t.id===x.selectedProduct.ID));if(i){const e=i.parts.find((i=>i.id===t.ID));if(e&&e.amount>1){e.amount--;i.parts=[...i.parts]}else{i.parts=i.parts.filter((i=>i.id!==t.ID))}x.cart=[...x.cart.filter((t=>t.id!==i.id)),i]}}goToCart(){const t=x.cart.find((t=>t.id===x.selectedProduct.ID));if(t){x.step=5;const t=this.el.closest(".hemfixarna_content");v(t)}}getAmount(){var t;return((t=x.cart.find((t=>t.id===x.selectedProduct.ID)))===null||t===void 0?void 0:t.amount)||0}getPartAmount(t){var i;const e=x.cart.find((t=>t.id===x.selectedProduct.ID));return((i=e===null||e===void 0?void 0:e.parts.find((i=>i.id===t)))===null||i===void 0?void 0:i.amount)||0}getTotalPrice(){let t=0;const i=x.cart.find((t=>t.id===x.selectedProduct.ID));if(i){const e=i.parts.reduce(((t,i)=>{const e=x.selectedProduct.parts.find((t=>t.ID===i.id));if(e){return t+e.price*i.amount}return t}),0);t=x.selectedProduct.price*i.amount+e}else{t=x.selectedProduct.price}return y(x.selectedProduct,t)}render(){var t,i,e;const r=a(`./assets/checked.svg`);const s=a(`./assets/plus.svg`);const o=a(`./assets/minus.svg`);return n("div",{class:"hemfixarna_product"},n("div",{class:"hemfixarna_product--top"},x.selectedProduct.icon&&n("img",{width:80,src:(t=x.selectedProduct.icon.url)!==null&&t!==void 0?t:x.selectedProduct.icon,alt:x.selectedProduct.post_title}),n("div",null,n("h1",null,x.selectedProduct.post_title),n("h2",null,"Från: ",y(x.selectedProduct)," kr"))),n("div",{class:"hemfixarna_product--grid"},n("div",{class:"hemfixarna_product--left"},((i=x.selectedProduct.list)===null||i===void 0?void 0:i.length)&&n("ul",{class:"hemfixarna_features"},x.selectedProduct.list.map((t=>n("li",{key:t.bullet},n("img",{src:r,alt:"checked"}),n("p",null,t.bullet))))),x.selectedProduct.description&&n("p",{onClick:()=>this.hideDescription=false,class:`hemfixarna_description ${this.hideDescription?"hemfixarna_description--hidden":""}`,innerHTML:x.selectedProduct.description})),n("div",{class:"hemfixarna_product--right"},n("ul",null,n("li",{class:"hemfixarna_product--item"},n("div",null,n("p",null,"Antal ",x.selectedProduct.post_title),n("p",{class:"hemfixarna_product--price"},y(x.selectedProduct),"kr/st")),n("div",{class:"hemfixarna_counter"},n("img",{class:`${this.getAmount()===0?"disabled":""}`,src:o,onClick:()=>this.removeProduct()}),n("span",null,this.getAmount()),n("img",{src:s,onClick:()=>this.addProduct()}))),((e=x.selectedProduct.parts)===null||e===void 0?void 0:e.length)&&x.selectedProduct.parts.map((t=>{var i;return n("li",{class:"hemfixarna_part"},n("div",null,n("p",null,(i=t.title)!==null&&i!==void 0?i:t.post_title),n("p",{class:"hemfixarna_product--price"},C(t,x.selectedProduct),"kr/st")),n("div",{class:"hemfixarna_counter"},n("img",{class:`${this.getPartAmount(t.ID)===0?"disabled":""}`,src:o,onClick:()=>this.removePart(t)}),n("span",null,this.getPartAmount(t.ID)),n("img",{class:`${this.getAmount()===0?"disabled":""}`,src:s,onClick:()=>this.addPart(t)})))}))),n("h4",{class:"hemfixarna_product--total"},"Totalt ",this.getTotalPrice()," kr"),n("button",{onClick:()=>this.goToCart(),class:`hemfixarna_buy ${this.getAmount()===0?"disabled":""}`},"Boka"),!x.selectedProduct.hide_start_fee&&(x.selectedProduct.rot||x.selectedProduct.rut)&&x.rutOptions&&x.rotOptions&&n("p",{class:"hemfixarna_terms"},n("strong",null,x.selectedProduct.rot?x.rotOptions.rot_start_fee_heading:x.rutOptions.rut_start_fee_heading),n("br",null),n("span",{innerHTML:x.selectedProduct.rot?x.rotOptions.rot_start_fee_text:x.rutOptions.rut_start_fee_text})),x.options&&n("hemfixarna-info",{list:x.options.trust}))))}get el(){return r(this)}};const vt=class{constructor(t){e(this,t)}render(){return n("div",null,n("h2",null,x.selectedService.post_title),n("div",{class:"hemfixarna_categories--wrapper"},n("div",null,n("ul",{class:"hemfixarna_categories"},x.selectedService.products.sort(((t,i)=>t.post_title<i.post_title?-1:1)).map((t=>{var i;return n("hemfixarna-box",{post:t,icon:(i=t.icon.url)!==null&&i!==void 0?i:t.icon,postTitle:t.post_title})})))),n("hemfixarna-info",{list:x.options.trust})))}};const _t="";const kt=class{constructor(t){e(this,t);this.id=undefined;this.customer=undefined;this.loadFromQuery=false}render(){return n("hemfixarna-component",{loadFromQuery:this.loadFromQuery,id:this.id,business:D.skanska})}};kt.style=_t;const wt=class{constructor(t){e(this,t);this.tree=undefined;this.slug=undefined}isMainCategory(t){return t.show_products!==undefined}render(){return x.customer?n("div",null,n("h2",null,x.selectedCustomerCategory?x.selectedCustomerCategory.name:"Alla tjänster"),n("div",{class:"hemfixarna_categories--wrapper"},n("ul",{class:"hemfixarna_categories"},x.selectedCustomerCategory?this.isMainCategory(x.selectedCustomerCategory)&&x.selectedCustomerCategory.sub_categories&&!x.selectedCustomerCategory.show_products?x.selectedCustomerCategory.sub_categories.map((t=>n("hemfixarna-box",{category:t}))):x.selectedCustomerCategory.products?x.selectedCustomerCategory.products.map((t=>n("hemfixarna-box",{category:t.fields}))):null:x.customer.categories.map((t=>n("hemfixarna-box",{category:t})))),n("hemfixarna-info",{list:x.options.trust}))):n("div",null,n("h2",null,"Alla tjänster"),n("div",{class:"hemfixarna_categories--wrapper"},n("ul",{class:"hemfixarna_categories"},this.tree.sub_cats.sort(((t,i)=>t.name<i.name?-1:1)).map((t=>{var i;return n("hemfixarna-box",{post:t,icon:(i=t.icon.url)!==null&&i!==void 0?i:t.icon,postTitle:t.name})}))),n("hemfixarna-info",{list:x.options.trust})))}};const yt="";const $t=class{constructor(t){e(this,t);this.id=undefined;this.loadFromQuery=false}render(){return n("hemfixarna-component",{loadFromQuery:this.loadFromQuery,id:this.id,business:D.string})}};$t.style=yt;export{_ as hemfixarna_address,L as hemfixarna_box,M as hemfixarna_breadcrumbs,F as hemfixarna_byggmax,A as hemfixarna_cart,R as hemfixarna_category,B as hemfixarna_checkout,Q as hemfixarna_component,q as hemfixarna_demo,ut as hemfixarna_getuser,ft as hemfixarna_hornbach,mt as hemfixarna_info,pt as hemfixarna_kund,xt as hemfixarna_order,gt as hemfixarna_orderrows,bt as hemfixarna_product,vt as hemfixarna_service,kt as hemfixarna_skanska,wt as hemfixarna_start,$t as hemfixarna_string_furniture};
2
- //# sourceMappingURL=p-1adf10af.entry.js.map