@salla.sa/twilight-components 2.9.32 → 2.9.33

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.
Files changed (79) hide show
  1. package/dist/cjs/{index-cac2fd59.js → index-1d2b3370.js} +7 -2
  2. package/dist/cjs/{index-377e4d52.js → index-fcc9f90f.js} +1 -1
  3. package/dist/cjs/loader.cjs.js +3 -3
  4. package/dist/cjs/salla-add-product-button.cjs.entry.js +1 -1
  5. package/dist/cjs/{salla-button_30.cjs.entry.js → salla-button_32.cjs.entry.js} +221 -8
  6. package/dist/cjs/salla-conditional-fields.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  9. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  10. package/dist/cjs/salla-select.cjs.entry.js +1 -1
  11. package/dist/cjs/twilight.cjs.js +3 -3
  12. package/dist/collection/collection-manifest.json +2 -0
  13. package/dist/collection/components/salla-sheet/salla-sheet.css +24 -0
  14. package/dist/collection/components/salla-sheet/salla-sheet.js +210 -0
  15. package/dist/collection/components/salla-user-menu/interfaces.js +4 -0
  16. package/dist/collection/components/salla-user-menu/salla-user-menu.css +0 -0
  17. package/dist/collection/components/salla-user-menu/salla-user-menu.js +236 -0
  18. package/dist/collection/global/app-dev.js +31 -28
  19. package/dist/components/bell-ring.js +11 -0
  20. package/dist/components/cart.js +11 -0
  21. package/dist/components/index.d.ts +2 -0
  22. package/dist/components/index.js +3 -1
  23. package/dist/components/salla-cart-summary.js +2 -8
  24. package/dist/components/salla-product-availability2.js +3 -9
  25. package/dist/components/salla-rating-modal.js +2 -8
  26. package/dist/components/salla-sheet.d.ts +11 -0
  27. package/dist/components/salla-sheet.js +111 -0
  28. package/dist/components/salla-user-menu.d.ts +11 -0
  29. package/dist/components/salla-user-menu.js +186 -0
  30. package/dist/components/star.js +11 -0
  31. package/dist/esm/{index-a277bafe.js → index-9c5cff9d.js} +1 -1
  32. package/dist/esm/{index-0ce70ad2.js → index-f1d446ac.js} +7 -2
  33. package/dist/esm/loader.js +3 -3
  34. package/dist/esm/salla-add-product-button.entry.js +1 -1
  35. package/dist/esm/{salla-button_30.entry.js → salla-button_32.entry.js} +220 -9
  36. package/dist/esm/salla-conditional-fields.entry.js +1 -1
  37. package/dist/esm/salla-installment.entry.js +1 -1
  38. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  39. package/dist/esm/salla-scopes.entry.js +1 -1
  40. package/dist/esm/salla-select.entry.js +1 -1
  41. package/dist/esm/twilight.js +3 -3
  42. package/dist/esm-es5/{index-a277bafe.js → index-9c5cff9d.js} +1 -1
  43. package/dist/esm-es5/{index-0ce70ad2.js → index-f1d446ac.js} +1 -1
  44. package/dist/esm-es5/loader.js +1 -1
  45. package/dist/esm-es5/salla-add-product-button.entry.js +1 -1
  46. package/dist/esm-es5/{salla-button_30.entry.js → salla-button_32.entry.js} +4 -4
  47. package/dist/esm-es5/salla-conditional-fields.entry.js +1 -1
  48. package/dist/esm-es5/salla-installment.entry.js +1 -1
  49. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  50. package/dist/esm-es5/salla-scopes.entry.js +1 -1
  51. package/dist/esm-es5/salla-select.entry.js +1 -1
  52. package/dist/esm-es5/twilight.js +1 -1
  53. package/dist/twilight/{p-10ac9c79.entry.js → p-03695034.entry.js} +1 -1
  54. package/dist/twilight/{p-521b6fde.entry.js → p-0bb00f36.entry.js} +1 -1
  55. package/dist/twilight/{p-0df01b70.system.entry.js → p-1b53ebda.system.entry.js} +1 -1
  56. package/dist/twilight/{p-26a23097.system.entry.js → p-217e1d1c.system.entry.js} +1 -1
  57. package/dist/twilight/{p-767eb598.system.entry.js → p-21aa165d.system.entry.js} +1 -1
  58. package/dist/twilight/{p-6224b033.entry.js → p-3a9f8d7b.entry.js} +4 -4
  59. package/dist/twilight/{p-91d5fcc1.system.entry.js → p-486ce499.system.entry.js} +1 -1
  60. package/dist/twilight/{p-93a1a61e.entry.js → p-6d34d337.entry.js} +1 -1
  61. package/dist/twilight/{p-13e697f7.entry.js → p-6f41faf8.entry.js} +1 -1
  62. package/dist/twilight/{p-ca68752d.js → p-7dc66c07.js} +1 -1
  63. package/dist/twilight/{p-85816035.system.entry.js → p-80fd7408.system.entry.js} +2 -2
  64. package/dist/twilight/{p-27e01463.entry.js → p-82931e46.entry.js} +1 -1
  65. package/dist/twilight/{p-9e4d198f.system.entry.js → p-9c0c939c.system.entry.js} +1 -1
  66. package/dist/twilight/{p-34e3a9bf.system.js → p-a761441b.system.js} +1 -1
  67. package/dist/twilight/{p-af4aa9f9.entry.js → p-a7bd281c.entry.js} +1 -1
  68. package/dist/twilight/p-b8f9d154.system.js +4 -0
  69. package/dist/twilight/{p-db0ba553.system.js → p-d9130020.system.js} +2 -2
  70. package/dist/twilight/{p-cfdc464c.js → p-da7b5ff6.js} +2 -2
  71. package/dist/twilight/{p-dd9b3c90.system.entry.js → p-fbaa17e1.system.entry.js} +1 -1
  72. package/dist/twilight/twilight.esm.js +1 -1
  73. package/dist/twilight/twilight.js +1 -1
  74. package/dist/types/components/salla-sheet/salla-sheet.d.ts +35 -0
  75. package/dist/types/components/salla-user-menu/interfaces.d.ts +27 -0
  76. package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +46 -0
  77. package/dist/types/components.d.ts +76 -0
  78. package/package.json +4 -4
  79. package/dist/twilight/p-59dd7db3.system.js +0 -4
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-db0ba553.system.js"],(function(t){"use strict";var e,s,i,n,a;return{setters:[function(t){e=t.r;s=t.c;i=t.h;n=t.H;a=t.g}],execute:function(){var o=":host{display:block}salla-add-product-button[width=wide]{width:100%}";var r=t("salla_add_product_button",function(){function t(t){e(this,t);this.success=s(this,"success",7);this.failed=s(this,"failed",7);this.hostAttributes={};this.hasLabel=false;this.channels=null;this.quantity=0;this.donatingAmount=0;this.productStatus="sale";this.productType="product"}t.prototype.getLabel=function(){if(this.productStatus==="sale"){return salla.lang.get("pages.cart.add_to_cart")}if(this.productType!=="donating"){return salla.lang.get("pages.products.out_of_stock")}return salla.lang.get("pages.products.donation_exceed")};t.prototype.addProductToCart=function(t){var e=this;if(this.productType==="booking"){t.preventDefault();return this.addBookingProduct()}if(this.hostAttributes.type==="submit"){return false}t.preventDefault();var s=Object.entries({id:this.productId,donating_amount:this.donatingAmount,quantity:this.quantity,endpoint:"quickAdd"}).reduce((function(t,e){var s=e[0],i=e[1];return i?(t[s]=i,t):t}),{});return salla.cart.addItem(s).then((function(t){return e.success.emit(t)})).catch((function(t){return e.failed.emit(t)}))};t.prototype.addBookingProduct=function(){var t=this;if(salla.config.isGuest()){salla.auth.api.setAfterLoginEvent("booking::add",this.productId);salla.event.dispatch("login::open");return}return salla.booking.add(this.productId).then((function(e){return t.success.emit(e)})).catch((function(e){return t.failed.emit(e)}))};t.prototype.getBtnAttributes=function(){for(var t=0;t<this.host.attributes.length;t++){if(!["id","class"].includes(this.host.attributes[t].name)){this.hostAttributes[this.host.attributes[t].name]=this.host.attributes[t].value}}return this.hostAttributes};t.prototype.componentWillLoad=function(){this.hasLabel=!!this.host.innerHTML.replace("\x3c!----\x3e","").trim()};t.prototype.render=function(){var t=this;return i(n,null,this.productStatus==="out-and-notify"&&this.channels?i("salla-product-availability",Object.assign({},this.getBtnAttributes()),i("slot",null)):i("salla-button",Object.assign({ref:function(e){return t.btn=e},onClick:function(e){return t.addProductToCart(e)},type:"button",fill:this.productStatus==="sale"?"solid":"outline",color:this.productStatus==="sale"?"primary":"light","loader-position":"center"},this.getBtnAttributes(),{disabled:this.productStatus!=="sale"}),i("slot",null)))};t.prototype.componentDidRender=function(){var t=this;if(this.hasLabel){return}this.btn.setText(this.getLabel()||"اضافة للسلة");salla.lang.onLoaded((function(){t.btn.setText(t.getLabel()||"اضافة للسلة")}))};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());r.style=o}}}));
4
+ System.register(["./p-d9130020.system.js"],(function(t){"use strict";var e,s,i,n,o;return{setters:[function(t){e=t.r;s=t.c;i=t.h;n=t.H;o=t.g}],execute:function(){var a=":host{display:block}salla-add-product-button[width=wide]{width:100%}";var r=t("salla_add_product_button",function(){function t(t){e(this,t);this.success=s(this,"success",7);this.failed=s(this,"failed",7);this.hostAttributes={};this.hasLabel=false;this.channels=null;this.quantity=0;this.donatingAmount=0;this.productStatus="sale";this.productType="product"}t.prototype.getLabel=function(){if(this.productStatus==="sale"){return salla.lang.get("pages.cart.add_to_cart")}if(this.productType!=="donating"){return salla.lang.get("pages.products.out_of_stock")}return salla.lang.get("pages.products.donation_exceed")};t.prototype.addProductToCart=function(t){var e=this;if(this.productType==="booking"){t.preventDefault();return this.addBookingProduct()}if(this.hostAttributes.type==="submit"){return false}t.preventDefault();var s=Object.entries({id:this.productId,donating_amount:this.donatingAmount,quantity:this.quantity,endpoint:"quickAdd"}).reduce((function(t,e){var s=e[0],i=e[1];return i?(t[s]=i,t):t}),{});return salla.cart.addItem(s).then((function(t){return e.success.emit(t)})).catch((function(t){return e.failed.emit(t)}))};t.prototype.addBookingProduct=function(){var t=this;if(salla.config.isGuest()){salla.auth.api.setAfterLoginEvent("booking::add",this.productId);salla.event.dispatch("login::open");return}return salla.booking.add(this.productId).then((function(e){return t.success.emit(e)})).catch((function(e){return t.failed.emit(e)}))};t.prototype.getBtnAttributes=function(){for(var t=0;t<this.host.attributes.length;t++){if(!["id","class"].includes(this.host.attributes[t].name)){this.hostAttributes[this.host.attributes[t].name]=this.host.attributes[t].value}}return this.hostAttributes};t.prototype.componentWillLoad=function(){this.hasLabel=!!this.host.innerHTML.replace("\x3c!----\x3e","").trim()};t.prototype.render=function(){var t=this;return i(n,null,this.productStatus==="out-and-notify"&&this.channels?i("salla-product-availability",Object.assign({},this.getBtnAttributes()),i("slot",null)):i("salla-button",Object.assign({ref:function(e){return t.btn=e},onClick:function(e){return t.addProductToCart(e)},type:"button",fill:this.productStatus==="sale"?"solid":"outline",color:this.productStatus==="sale"?"primary":"light","loader-position":"center"},this.getBtnAttributes(),{disabled:this.productStatus!=="sale"}),i("slot",null)))};t.prototype.componentDidRender=function(){var t=this;if(this.hasLabel){return}this.btn.setText(this.getLabel()||"اضافة للسلة");salla.lang.onLoaded((function(){t.btn.setText(t.getLabel()||"اضافة للسلة")}))};Object.defineProperty(t.prototype,"host",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());r.style=a}}}));
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as e,H as l}from"./p-ca68752d.js";import{S as t}from"./p-475ef754.js";var i;!function(s){s.DEFAULT="default",s.AVAILABILITY="availability"}(i||(i={}));const a=class{constructor(e){s(this,e),this.translationLoaded=!1,this.mode=i.DEFAULT,this.scopes=[],this.originalScopesList=[],this.isOpenedBefore=salla.storage.get("branch-choosed-before"),this.hasError=!1,this.selection="optional",this.searchDisplayLimit=6,this.getFormTitle=()=>{var s;return(null===(s=this.originalScopesList)||void 0===s?void 0:s.length)<2?"":this.mode===i.DEFAULT?salla.lang.get("blocks.scope.shopping_from_another_branch"):salla.lang.get("blocks.scope.search_for_availability_in_other_branches")},salla.event.on("scopes::open",(({mode:s=null,product_id:e=null})=>{this.open(s,e)})),salla.lang.onLoaded((()=>{this.translationLoaded=!0}))}async close(){var s;return await(null===(s=this.modal)||void 0===s?void 0:s.close())}async open(s=i.DEFAULT,e=null){return this.setScopeValues([]),this.mode=void 0!==s&&[i.AVAILABILITY,i.DEFAULT].includes(s)?s:i.DEFAULT,salla.log("SallaScope:: opened"),this.modal.open(),await salla.api.withoutNotifier((()=>s==i.AVAILABILITY?salla.scope.getProductAvailability(e):salla.scope.get())).then((e=>{if(s==i.AVAILABILITY)return this.setScopeValues(e.data);this.setScopeValues(e.data.scopes)})).catch((s=>{console.log(s),this.hasError=!0})).finally((()=>this.modal.stopLoading()))}async handleSubmit(){let s={id:this.current_scope.id};return this.changeBtn.load(),await salla.scope.change(s).then((()=>{salla.storage.set("branch-choosed-before",!0),salla.storage.set("scope",{type:this.current_scope.type,id:this.current_scope.id});var s=new URL(window.location.href);s.searchParams.set("scope",this.current_scope.id),window.location.href=s.toString(),window.location.replace(s.toString())})).catch((s=>console.log(s))).finally((()=>{this.changeBtn.stop()}))}setScopeValues(s){this.scopes=s,this.originalScopesList=s,1==s.length?(this.current_scope=s[0],this.selected_scope=s[0]):(this.current_scope=s.find((s=>s.selected)),this.selected_scope=s.find((s=>s.selected)))}handleSearchFieldTyping(s){let e=s.target.value.toLocaleLowerCase();this.scopes=e?this.originalScopesList.filter((s=>s.name.toLowerCase().includes(e))):this.originalScopesList}handleScopeSelection(s){this.current_scope=this.scopes.find((e=>e.id==s.target.value))}placeholderContent(){return e("salla-placeholder",{alignment:"center",class:"s-scopes-placeholder"},e("span",{slot:"title"},salla.lang.get("blocks.scope.branch_looking_for_not_found")),e("span",{slot:"description"},salla.lang.get("blocks.scope.our_services_not_available_in_this_branch")))}defaultContent(){return[e("div",{class:"s-scopes-container s-scrollbar"},this.scopes.map((s=>e("div",{class:"s-scopes-input-wrap","data-selection":this.selection},e("input",{id:`${this.selection} + '_scope_' + ${s.id}`,name:"lang",type:"radio",value:s.id,onChange:s=>this.handleScopeSelection(s),class:"s-scopes-input",checked:!!this.current_scope&&this.current_scope.id==s.id}),e("label",{htmlFor:`${this.selection} + '_scope_' + ${s.id}`,class:"s-scopes-label s-scopes-clickable"},e("span",null,s.name)))))),this.footerContent()]}availabilityContent(){return e("div",{class:"s-scopes-container"},this.scopes.map((s=>{var l,t,a,o,h,c;return e("div",{class:"s-scopes-input-wrap","data-selection":this.selection},e("h2",{class:{"s-scopes-label":!0,"s-scopes-clickable":this.mode===i.DEFAULT}},e("span",null,s.name)),e("h2",{style:{color:null===(t=null===(l=s)||void 0===l?void 0:l.availability)||void 0===t?void 0:t.color},class:`s-scopes-${null===(o=null===(a=s)||void 0===a?void 0:a.availability)||void 0===o?void 0:o.key}`},null===(c=null===(h=s)||void 0===h?void 0:h.availability)||void 0===c?void 0:c.label))})))}footerContent(){return e("div",{class:"s-scopes-footer"},e("slot",{name:"footer"},e("salla-button",{ref:s=>this.changeBtn=s,disabled:!this.current_scope,onClick:()=>this.handleSubmit(),class:"s-scopes-submit","loader-position":"center",width:"wide"},salla.lang.get("common.elements.confirm"))))}render(){return e(l,null,e("salla-modal",{ref:s=>this.modal=s,isClosable:!(!this.isOpenedBefore&&"optional"!=this.selection),class:"s-scopes-modal",isLoading:!0,"has-skeleton":!0},e("div",{slot:"loading"},e("div",{class:"s-scopes-skeleton"},e("salla-list-tile",{class:"s-scopes-header"},e("div",{slot:"icon",class:"s-scopes-header-icon"},e("salla-skeleton",{type:"circle"})),e("div",{slot:"title",class:"s-scopes-header-title mb-5"},e("salla-skeleton",{height:"15px",width:"50%"})),e("div",{slot:"subtitle",class:"s-scopes-header-subtitle"},e("salla-skeleton",{height:"10px"}),e("salla-skeleton",{height:"10px",width:"75%"}))),e("div",{class:"s-scopes-skeleton-search"},e("salla-skeleton",{height:"10px",width:"50%"}),e("salla-skeleton",{height:"30px",width:"100%"})),e("div",{class:"s-scopes-skeleton-scopes"},e("salla-skeleton",{height:"10px",width:"30%"}),e("salla-skeleton",{height:"10px",width:"25%"}),e("salla-skeleton",{height:"10px",width:"30%"}),e("salla-skeleton",{height:"10px",width:"25%"}),e("salla-skeleton",{height:"10px",width:"30%"}),e("salla-skeleton",{height:"10px",width:"25%"}),e("salla-skeleton",{height:"10px",width:"30%"}),e("salla-skeleton",{height:"10px",width:"25%"})),e("div",{class:"s-scopes-skeleton-btn"},e("salla-skeleton",{height:"40px",width:"100%"})))),e("salla-list-tile",{class:this.originalScopesList.length?"s-scopes-header block":"s-hidden"},e("div",{slot:"icon",class:"s-scopes-header-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>store-alt</title>\n<path d="M6.667 24h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333zM31.86 10.071l-4-8c-0.227-0.452-0.688-0.737-1.193-0.737h-21.333c-0.505 0-0.967 0.285-1.193 0.737l-4 8c-0.092 0.184-0.14 0.389-0.14 0.596v18.667c0 0.737 0.597 1.333 1.333 1.333h29.333c0.736 0 1.333-0.596 1.333-1.333v-18.667c0-0.207-0.048-0.412-0.14-0.596zM6.157 4h19.685l3.333 6.667h-26.352zM24 28h-5.333v-9.333h5.333zM29.333 28h-2.667v-10.667c0-0.737-0.597-1.333-1.333-1.333h-8c-0.736 0-1.333 0.596-1.333 1.333v10.667h-13.333v-14.667h26.667zM6.667 18.667h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n'}),e("div",{slot:"title",class:"s-scopes-header-title"},salla.lang.get("blocks.scope.you_are_browse_store_from")),e("div",{slot:"subtitle",class:"s-scopes-header-subtitle"},this.selected_scope?this.selected_scope.name:"")),e("div",{class:"s-scopes-wrap"},!!this.originalScopesList.length&&e("h4",{class:"s-scopes-title"},this.getFormTitle()),this.originalScopesList.length>this.searchDisplayLimit?e("div",{class:"s-scopes-search-wrapper"},e("div",{class:"s-scopes-search-icon",innerHTML:t}),e("input",{type:"text",class:"s-scopes-search-input",onInput:s=>this.handleSearchFieldTyping(s),enterkeyhint:"search",placeholder:salla.lang.get("blocks.scope.searching_for_a_branch")})):"",this.hasError||this.scopes.length<2?this.placeholderContent():this.mode===i.DEFAULT?this.defaultContent():this.availabilityContent())))}componentDidLoad(){this.isOpenedBefore||"mandatory"!=this.selection||this.open()}};a.style=".s-scopes-availability-content{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.s-scopes-placeholder{-ms-flex:0 0 85%;flex:0 0 85%}";export{a as salla_scopes}
4
+ import{r as s,h as e,H as l}from"./p-7dc66c07.js";import{S as t}from"./p-475ef754.js";var i;!function(s){s.DEFAULT="default",s.AVAILABILITY="availability"}(i||(i={}));const a=class{constructor(e){s(this,e),this.translationLoaded=!1,this.mode=i.DEFAULT,this.scopes=[],this.originalScopesList=[],this.isOpenedBefore=salla.storage.get("branch-choosed-before"),this.hasError=!1,this.selection="optional",this.searchDisplayLimit=6,this.getFormTitle=()=>{var s;return(null===(s=this.originalScopesList)||void 0===s?void 0:s.length)<2?"":this.mode===i.DEFAULT?salla.lang.get("blocks.scope.shopping_from_another_branch"):salla.lang.get("blocks.scope.search_for_availability_in_other_branches")},salla.event.on("scopes::open",(({mode:s=null,product_id:e=null})=>{this.open(s,e)})),salla.lang.onLoaded((()=>{this.translationLoaded=!0}))}async close(){var s;return await(null===(s=this.modal)||void 0===s?void 0:s.close())}async open(s=i.DEFAULT,e=null){return this.setScopeValues([]),this.mode=void 0!==s&&[i.AVAILABILITY,i.DEFAULT].includes(s)?s:i.DEFAULT,salla.log("SallaScope:: opened"),this.modal.open(),await salla.api.withoutNotifier((()=>s==i.AVAILABILITY?salla.scope.getProductAvailability(e):salla.scope.get())).then((e=>{if(s==i.AVAILABILITY)return this.setScopeValues(e.data);this.setScopeValues(e.data.scopes)})).catch((s=>{console.log(s),this.hasError=!0})).finally((()=>this.modal.stopLoading()))}async handleSubmit(){let s={id:this.current_scope.id};return this.changeBtn.load(),await salla.scope.change(s).then((()=>{salla.storage.set("branch-choosed-before",!0),salla.storage.set("scope",{type:this.current_scope.type,id:this.current_scope.id});var s=new URL(window.location.href);s.searchParams.set("scope",this.current_scope.id),window.location.href=s.toString(),window.location.replace(s.toString())})).catch((s=>console.log(s))).finally((()=>{this.changeBtn.stop()}))}setScopeValues(s){this.scopes=s,this.originalScopesList=s,1==s.length?(this.current_scope=s[0],this.selected_scope=s[0]):(this.current_scope=s.find((s=>s.selected)),this.selected_scope=s.find((s=>s.selected)))}handleSearchFieldTyping(s){let e=s.target.value.toLocaleLowerCase();this.scopes=e?this.originalScopesList.filter((s=>s.name.toLowerCase().includes(e))):this.originalScopesList}handleScopeSelection(s){this.current_scope=this.scopes.find((e=>e.id==s.target.value))}placeholderContent(){return e("salla-placeholder",{alignment:"center",class:"s-scopes-placeholder"},e("span",{slot:"title"},salla.lang.get("blocks.scope.branch_looking_for_not_found")),e("span",{slot:"description"},salla.lang.get("blocks.scope.our_services_not_available_in_this_branch")))}defaultContent(){return[e("div",{class:"s-scopes-container s-scrollbar"},this.scopes.map((s=>e("div",{class:"s-scopes-input-wrap","data-selection":this.selection},e("input",{id:`${this.selection} + '_scope_' + ${s.id}`,name:"lang",type:"radio",value:s.id,onChange:s=>this.handleScopeSelection(s),class:"s-scopes-input",checked:!!this.current_scope&&this.current_scope.id==s.id}),e("label",{htmlFor:`${this.selection} + '_scope_' + ${s.id}`,class:"s-scopes-label s-scopes-clickable"},e("span",null,s.name)))))),this.footerContent()]}availabilityContent(){return e("div",{class:"s-scopes-container"},this.scopes.map((s=>{var l,t,a,o,h,c;return e("div",{class:"s-scopes-input-wrap","data-selection":this.selection},e("h2",{class:{"s-scopes-label":!0,"s-scopes-clickable":this.mode===i.DEFAULT}},e("span",null,s.name)),e("h2",{style:{color:null===(t=null===(l=s)||void 0===l?void 0:l.availability)||void 0===t?void 0:t.color},class:`s-scopes-${null===(o=null===(a=s)||void 0===a?void 0:a.availability)||void 0===o?void 0:o.key}`},null===(c=null===(h=s)||void 0===h?void 0:h.availability)||void 0===c?void 0:c.label))})))}footerContent(){return e("div",{class:"s-scopes-footer"},e("slot",{name:"footer"},e("salla-button",{ref:s=>this.changeBtn=s,disabled:!this.current_scope,onClick:()=>this.handleSubmit(),class:"s-scopes-submit","loader-position":"center",width:"wide"},salla.lang.get("common.elements.confirm"))))}render(){return e(l,null,e("salla-modal",{ref:s=>this.modal=s,isClosable:!(!this.isOpenedBefore&&"optional"!=this.selection),class:"s-scopes-modal",isLoading:!0,"has-skeleton":!0},e("div",{slot:"loading"},e("div",{class:"s-scopes-skeleton"},e("salla-list-tile",{class:"s-scopes-header"},e("div",{slot:"icon",class:"s-scopes-header-icon"},e("salla-skeleton",{type:"circle"})),e("div",{slot:"title",class:"s-scopes-header-title mb-5"},e("salla-skeleton",{height:"15px",width:"50%"})),e("div",{slot:"subtitle",class:"s-scopes-header-subtitle"},e("salla-skeleton",{height:"10px"}),e("salla-skeleton",{height:"10px",width:"75%"}))),e("div",{class:"s-scopes-skeleton-search"},e("salla-skeleton",{height:"10px",width:"50%"}),e("salla-skeleton",{height:"30px",width:"100%"})),e("div",{class:"s-scopes-skeleton-scopes"},e("salla-skeleton",{height:"10px",width:"30%"}),e("salla-skeleton",{height:"10px",width:"25%"}),e("salla-skeleton",{height:"10px",width:"30%"}),e("salla-skeleton",{height:"10px",width:"25%"}),e("salla-skeleton",{height:"10px",width:"30%"}),e("salla-skeleton",{height:"10px",width:"25%"}),e("salla-skeleton",{height:"10px",width:"30%"}),e("salla-skeleton",{height:"10px",width:"25%"})),e("div",{class:"s-scopes-skeleton-btn"},e("salla-skeleton",{height:"40px",width:"100%"})))),e("salla-list-tile",{class:this.originalScopesList.length?"s-scopes-header block":"s-hidden"},e("div",{slot:"icon",class:"s-scopes-header-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>store-alt</title>\n<path d="M6.667 24h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333zM31.86 10.071l-4-8c-0.227-0.452-0.688-0.737-1.193-0.737h-21.333c-0.505 0-0.967 0.285-1.193 0.737l-4 8c-0.092 0.184-0.14 0.389-0.14 0.596v18.667c0 0.737 0.597 1.333 1.333 1.333h29.333c0.736 0 1.333-0.596 1.333-1.333v-18.667c0-0.207-0.048-0.412-0.14-0.596zM6.157 4h19.685l3.333 6.667h-26.352zM24 28h-5.333v-9.333h5.333zM29.333 28h-2.667v-10.667c0-0.737-0.597-1.333-1.333-1.333h-8c-0.736 0-1.333 0.596-1.333 1.333v10.667h-13.333v-14.667h26.667zM6.667 18.667h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n'}),e("div",{slot:"title",class:"s-scopes-header-title"},salla.lang.get("blocks.scope.you_are_browse_store_from")),e("div",{slot:"subtitle",class:"s-scopes-header-subtitle"},this.selected_scope?this.selected_scope.name:"")),e("div",{class:"s-scopes-wrap"},!!this.originalScopesList.length&&e("h4",{class:"s-scopes-title"},this.getFormTitle()),this.originalScopesList.length>this.searchDisplayLimit?e("div",{class:"s-scopes-search-wrapper"},e("div",{class:"s-scopes-search-icon",innerHTML:t}),e("input",{type:"text",class:"s-scopes-search-input",onInput:s=>this.handleSearchFieldTyping(s),enterkeyhint:"search",placeholder:salla.lang.get("blocks.scope.searching_for_a_branch")})):"",this.hasError||this.scopes.length<2?this.placeholderContent():this.mode===i.DEFAULT?this.defaultContent():this.availabilityContent())))}componentDidLoad(){this.isOpenedBefore||"mandatory"!=this.selection||this.open()}};a.style=".s-scopes-availability-content{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.s-scopes-placeholder{-ms-flex:0 0 85%;flex:0 0 85%}";export{a as salla_scopes}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,c as s,h as i,H as a,g as l}from"./p-ca68752d.js";const o=class{constructor(i){t(this,i),this.success=s(this,"success",7),this.failed=s(this,"failed",7),this.hostAttributes={},this.hasLabel=!1,this.channels=null,this.quantity=0,this.donatingAmount=0,this.productStatus="sale",this.productType="product"}getLabel(){return"sale"===this.productStatus?salla.lang.get("pages.cart.add_to_cart"):"donating"!==this.productType?salla.lang.get("pages.products.out_of_stock"):salla.lang.get("pages.products.donation_exceed")}addProductToCart(t){if("booking"===this.productType)return t.preventDefault(),this.addBookingProduct();if("submit"===this.hostAttributes.type)return!1;t.preventDefault();const s=Object.entries({id:this.productId,donating_amount:this.donatingAmount,quantity:this.quantity,endpoint:"quickAdd"}).reduce(((t,[s,i])=>i?(t[s]=i,t):t),{});return salla.cart.addItem(s).then((t=>this.success.emit(t))).catch((t=>this.failed.emit(t)))}addBookingProduct(){return salla.config.isGuest()?(salla.auth.api.setAfterLoginEvent("booking::add",this.productId),void salla.event.dispatch("login::open")):salla.booking.add(this.productId).then((t=>this.success.emit(t))).catch((t=>this.failed.emit(t)))}getBtnAttributes(){for(let t=0;t<this.host.attributes.length;t++)["id","class"].includes(this.host.attributes[t].name)||(this.hostAttributes[this.host.attributes[t].name]=this.host.attributes[t].value);return this.hostAttributes}componentWillLoad(){this.hasLabel=!!this.host.innerHTML.replace("\x3c!----\x3e","").trim()}render(){return i(a,null,"out-and-notify"===this.productStatus&&this.channels?i("salla-product-availability",Object.assign({},this.getBtnAttributes()),i("slot",null)):i("salla-button",Object.assign({ref:t=>this.btn=t,onClick:t=>this.addProductToCart(t),type:"button",fill:"sale"===this.productStatus?"solid":"outline",color:"sale"===this.productStatus?"primary":"light","loader-position":"center"},this.getBtnAttributes(),{disabled:"sale"!==this.productStatus}),i("slot",null)))}componentDidRender(){this.hasLabel||(this.btn.setText(this.getLabel()||"اضافة للسلة"),salla.lang.onLoaded((()=>{this.btn.setText(this.getLabel()||"اضافة للسلة")})))}get host(){return l(this)}};o.style=":host{display:block}salla-add-product-button[width=wide]{width:100%}";export{o as salla_add_product_button}
4
+ import{r as t,c as s,h as i,H as a,g as l}from"./p-7dc66c07.js";const o=class{constructor(i){t(this,i),this.success=s(this,"success",7),this.failed=s(this,"failed",7),this.hostAttributes={},this.hasLabel=!1,this.channels=null,this.quantity=0,this.donatingAmount=0,this.productStatus="sale",this.productType="product"}getLabel(){return"sale"===this.productStatus?salla.lang.get("pages.cart.add_to_cart"):"donating"!==this.productType?salla.lang.get("pages.products.out_of_stock"):salla.lang.get("pages.products.donation_exceed")}addProductToCart(t){if("booking"===this.productType)return t.preventDefault(),this.addBookingProduct();if("submit"===this.hostAttributes.type)return!1;t.preventDefault();const s=Object.entries({id:this.productId,donating_amount:this.donatingAmount,quantity:this.quantity,endpoint:"quickAdd"}).reduce(((t,[s,i])=>i?(t[s]=i,t):t),{});return salla.cart.addItem(s).then((t=>this.success.emit(t))).catch((t=>this.failed.emit(t)))}addBookingProduct(){return salla.config.isGuest()?(salla.auth.api.setAfterLoginEvent("booking::add",this.productId),void salla.event.dispatch("login::open")):salla.booking.add(this.productId).then((t=>this.success.emit(t))).catch((t=>this.failed.emit(t)))}getBtnAttributes(){for(let t=0;t<this.host.attributes.length;t++)["id","class"].includes(this.host.attributes[t].name)||(this.hostAttributes[this.host.attributes[t].name]=this.host.attributes[t].value);return this.hostAttributes}componentWillLoad(){this.hasLabel=!!this.host.innerHTML.replace("\x3c!----\x3e","").trim()}render(){return i(a,null,"out-and-notify"===this.productStatus&&this.channels?i("salla-product-availability",Object.assign({},this.getBtnAttributes()),i("slot",null)):i("salla-button",Object.assign({ref:t=>this.btn=t,onClick:t=>this.addProductToCart(t),type:"button",fill:"sale"===this.productStatus?"solid":"outline",color:"sale"===this.productStatus?"primary":"light","loader-position":"center"},this.getBtnAttributes(),{disabled:"sale"!==this.productStatus}),i("slot",null)))}componentDidRender(){this.hasLabel||(this.btn.setText(this.getLabel()||"اضافة للسلة"),salla.lang.onLoaded((()=>{this.btn.setText(this.getLabel()||"اضافة للسلة")})))}get host(){return l(this)}};o.style=":host{display:block}salla-add-product-button[width=wide]{width:100%}";export{o as salla_add_product_button}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- const e="twilight";let t,l,n=!1,s=!1,o=!1,i=!1,r=!1;const c="undefined"!=typeof window?window:{},f=c.CSS,a=c.document||{head:{}},u={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,l,n)=>e.addEventListener(t,l,n),rel:(e,t,l,n)=>e.removeEventListener(t,l,n),ce:(e,t)=>new CustomEvent(e,t)},$=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),h=(e,t,l)=>{l&&l.map((([l,n,s])=>{const o=m(e,l),i=y(t,s),r=p(l);u.ael(o,n,i,r),(t.o=t.o||[]).push((()=>u.rel(o,n,i,r)))}))},y=(e,t)=>l=>{try{256&e.t?e.i[t](l):(e.u=e.u||[]).push([t,l])}catch(e){de(e)}},m=(e,t)=>8&t?c:e,p=e=>0!=(2&e),w="http://www.w3.org/1999/xlink",b=new WeakMap,g=e=>"sc-"+e.$,k={},v=e=>"object"==(e=typeof e)||"function"===e,j=(e,t,...l)=>{let n=null,s=null,o=null,i=!1,r=!1;const c=[],f=t=>{for(let l=0;l<t.length;l++)n=t[l],Array.isArray(n)?f(n):null!=n&&"boolean"!=typeof n&&((i="function"!=typeof e&&!v(n))&&(n+=""),i&&r?c[c.length-1].h+=n:c.push(i?S(null,n):n),r=i)};if(f(l),t){t.key&&(s=t.key),t.name&&(o=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const a=S(e,null);return a.m=t,c.length>0&&(a.p=c),a.g=s,a.k=o,a},S=(e,t)=>({t:0,v:e,h:t,j:null,p:null,m:null,g:null,k:null}),x={},O=(e,t,l,n,s,o)=>{if(l!==n){let i=$e(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,s=C(l),o=C(n);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in l)n&&null!=n[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in n)l&&n[t]===l[t]||(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("key"===t);else if("ref"===t)n&&n(e);else if(i||"o"!==t[0]||"n"!==t[1]){const c=v(n);if((i||c&&null!==n)&&!s)try{if(e.tagName.includes("-"))e[t]=n;else{const s=null==n?"":n;"list"===t?i=!1:null!=l&&e[t]==s||(e[t]=s)}}catch(e){}let f=!1;r!==(r=r.replace(/^xlink\:?/,""))&&(t=r,f=!0),null==n||!1===n?!1===n&&""!==e.getAttribute(t)||(f?e.removeAttributeNS(w,t):e.removeAttribute(t)):(!i||4&o||s)&&!c&&(n=!0===n?"":n,f?e.setAttributeNS(w,t,n):e.setAttribute(t,n))}else t="-"===t[2]?t.slice(3):$e(c,r)?r.slice(2):r[2]+t.slice(3),l&&u.rel(e,t,l,!1),n&&u.ael(e,t,n,!1)}},M=/\s/,C=e=>e?e.split(M):[],R=(e,t,l,n)=>{const s=11===t.j.nodeType&&t.j.host?t.j.host:t.j,o=e&&e.m||k,i=t.m||k;for(n in o)n in i||O(s,n,o[n],void 0,l,t.t);for(n in i)O(s,n,o[n],i[n],l,t.t)},N=(e,s,r)=>{const c=s.p[r];let f,u,$,d=0;if(n||(o=!0,"slot"===c.v&&(c.t|=c.p?2:1)),null!==c.h)f=c.j=a.createTextNode(c.h);else if(1&c.t)f=c.j=a.createTextNode("");else{if(i||(i="svg"===c.v),f=c.j=a.createElementNS(i?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&c.t?"slot-fb":c.v),i&&"foreignObject"===c.v&&(i=!1),R(null,c,i),c.p)for(d=0;d<c.p.length;++d)u=N(e,c,d),u&&f.appendChild(u);"svg"===c.v?i=!1:"foreignObject"===f.tagName&&(i=!0)}return f["s-hn"]=l,3&c.t&&(f["s-sr"]=!0,f["s-cr"]=t,f["s-sn"]=c.k||"",$=e&&e.p&&e.p[r],$&&$.v===c.v&&e.j&&P(e.j,!1)),f},P=(e,t)=>{u.t|=1;const n=e.childNodes;for(let e=n.length-1;e>=0;e--){const s=n[e];s["s-hn"]!==l&&s["s-ol"]&&(E(s).insertBefore(s,L(s)),s["s-ol"].remove(),s["s-ol"]=void 0,o=!0),t&&P(s,t)}u.t&=-2},T=(e,t,l,n,s,o)=>{let i,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(;s<=o;++s)n[s]&&(i=N(null,l,s),i&&(n[s].j=i,r.insertBefore(i,L(t))))},_=(e,t,l,n,o)=>{for(;t<=l;++t)(n=e[t])&&(o=n.j,U(n),s=!0,o["s-ol"]?o["s-ol"].remove():P(o,!0),o.remove())},I=(e,t)=>e.v===t.v&&("slot"===e.v?e.k===t.k:e.g===t.g),L=e=>e&&e["s-ol"]||e,E=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,W=(e,t)=>{const l=t.j=e.j,n=e.p,s=t.p,o=t.v,r=t.h;let c;null===r?(i="svg"===o||"foreignObject"!==o&&i,"slot"===o||R(e,t,i),null!==n&&null!==s?((e,t,l,n)=>{let s,o,i=0,r=0,c=0,f=0,a=t.length-1,u=t[0],$=t[a],d=n.length-1,h=n[0],y=n[d];for(;i<=a&&r<=d;)if(null==u)u=t[++i];else if(null==$)$=t[--a];else if(null==h)h=n[++r];else if(null==y)y=n[--d];else if(I(u,h))W(u,h),u=t[++i],h=n[++r];else if(I($,y))W($,y),$=t[--a],y=n[--d];else if(I(u,y))"slot"!==u.v&&"slot"!==y.v||P(u.j.parentNode,!1),W(u,y),e.insertBefore(u.j,$.j.nextSibling),u=t[++i],y=n[--d];else if(I($,h))"slot"!==u.v&&"slot"!==y.v||P($.j.parentNode,!1),W($,h),e.insertBefore($.j,u.j),$=t[--a],h=n[++r];else{for(c=-1,f=i;f<=a;++f)if(t[f]&&null!==t[f].g&&t[f].g===h.g){c=f;break}c>=0?(o=t[c],o.v!==h.v?s=N(t&&t[r],l,c):(W(o,h),t[c]=void 0,s=o.j),h=n[++r]):(s=N(t&&t[r],l,r),h=n[++r]),s&&E(u.j).insertBefore(s,L(u.j))}i>a?T(e,null==n[d+1]?null:n[d+1].j,l,n,r,d):r>d&&_(t,i,a)})(l,n,t,s):null!==s?(null!==e.h&&(l.textContent=""),T(l,null,t,s,0,s.length-1)):null!==n&&_(n,0,n.length-1),i&&"svg"===o&&(i=!1)):(c=l["s-cr"])?c.parentNode.textContent=r:e.h!==r&&(l.data=r)},A=e=>{const t=e.childNodes;let l,n,s,o,i,r;for(n=0,s=t.length;n<s;n++)if(l=t[n],1===l.nodeType){if(l["s-sr"])for(i=l["s-sn"],l.hidden=!1,o=0;o<s;o++)if(r=t[o].nodeType,t[o]["s-hn"]!==l["s-hn"]||""!==i){if(1===r&&i===t[o].getAttribute("slot")){l.hidden=!0;break}}else if(1===r||3===r&&""!==t[o].textContent.trim()){l.hidden=!0;break}A(l)}},D=[],F=e=>{let t,l,n,o,i,r,c=0;const f=e.childNodes,a=f.length;for(;c<a;c++){if(t=f[c],t["s-sr"]&&(l=t["s-cr"])&&l.parentNode)for(n=l.parentNode.childNodes,o=t["s-sn"],r=n.length-1;r>=0;r--)l=n[r],l["s-cn"]||l["s-nr"]||l["s-hn"]===t["s-hn"]||(H(l,o)?(i=D.find((e=>e.S===l)),s=!0,l["s-sn"]=l["s-sn"]||o,i?i.O=t:D.push({O:t,S:l}),l["s-sr"]&&D.map((e=>{H(e.S,l["s-sn"])&&(i=D.find((e=>e.S===l)),i&&!e.O&&(e.O=i.O))}))):D.some((e=>e.S===l))||D.push({S:l}));1===t.nodeType&&F(t)}},H=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,U=e=>{e.m&&e.m.ref&&e.m.ref(null),e.p&&e.p.map(U)},q=e=>fe(e).M,V=(e,t,l)=>{const n=q(e);return{emit:e=>z(n,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},z=(e,t,l)=>{const n=u.ce(t,l);return e.dispatchEvent(n),n},B=(e,t)=>{t&&!e.C&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.C=t)))},G=(e,t)=>{if(e.t|=16,!(4&e.t))return B(e,e.R),je((()=>J(e,t)));e.t|=512},J=(e,t)=>{const l=e.i;let n;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>Z(l,e,t))),e.u=null),n=Z(l,"componentWillLoad")),ee(n,(()=>K(e,l,t)))},K=async(e,t,l)=>{const n=e.M,s=n["s-rc"];l&&(e=>{const t=e.N;((e,t)=>{let l=g(t);const n=me.get(l);if(e=11===e.nodeType?e:a,n)if("string"==typeof n){let t,s=b.get(e=e.head||e);s||b.set(e,s=new Set),s.has(l)||(e.host&&(t=e.querySelector(`[sty-id="${l}"]`))?t.innerHTML=n:(t=a.createElement("style"),t.innerHTML=n,e.insertBefore(t,e.querySelector("link"))),s&&s.add(l))}else e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n])})(e.M.getRootNode(),t)})(e);Q(e,t),s&&(s.map((e=>e())),n["s-rc"]=void 0);{const t=n["s-p"],l=()=>X(e);0===t.length?l():(Promise.all(t).then(l),e.t|=4,t.length=0)}},Q=(e,i)=>{try{i=i.render(),e.t&=-17,e.t|=2,((e,i)=>{const r=e.M,c=e.N,f=e.P||S(null,null),$=(e=>e&&e.v===x)(i)?i:j(null,null,i);if(l=r.tagName,c.T&&($.m=$.m||{},c.T.map((([e,t])=>$.m[t]=r[e]))),$.v=null,$.t|=4,e.P=$,$.j=f.j=r,t=r["s-cr"],n=0!=(1&c.t),s=!1,W(f,$),u.t|=1,o){let e,t,l,n,s,o;F($.j);let i=0;for(;i<D.length;i++)e=D[i],t=e.S,t["s-ol"]||(l=a.createTextNode(""),l["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=l,t));for(i=0;i<D.length;i++)if(e=D[i],t=e.S,e.O){for(n=e.O.parentNode,s=e.O.nextSibling,l=t["s-ol"];l=l.previousSibling;)if(o=l["s-nr"],o&&o["s-sn"]===t["s-sn"]&&n===o.parentNode&&(o=o.nextSibling,!o||!o["s-nr"])){s=o;break}(!s&&n!==t.parentNode||t.nextSibling!==s)&&t!==s&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),n.insertBefore(t,s))}else 1===t.nodeType&&(t.hidden=!0)}s&&A($.j),u.t&=-2,D.length=0})(e,i)}catch(t){de(t,e.M)}return null},X=e=>{const t=e.M,l=e.i,n=e.R;Z(l,"componentDidRender"),64&e.t||(e.t|=64,te(t),Z(l,"componentDidLoad"),e._(t),n||Y()),e.I(t),e.C&&(e.C(),e.C=void 0),512&e.t&&ve((()=>G(e,!1))),e.t&=-517},Y=()=>{te(a.documentElement),ve((()=>z(c,"appload",{detail:{namespace:"twilight"}})))},Z=(e,t,l)=>{if(e&&e[t])try{return e[t](l)}catch(e){de(e)}},ee=(e,t)=>e&&e.then?e.then(t):t(),te=e=>e.classList.add("hydrated"),le=(e,t,l,n,s,o,i)=>{let r,c,f,a;if(1===o.nodeType){for(r=o.getAttribute("c-id"),r&&(c=r.split("."),c[0]!==i&&"0"!==c[0]||(f={t:0,L:c[0],W:c[1],A:c[2],D:c[3],v:o.tagName.toLowerCase(),j:o,m:null,p:null,g:null,k:null,h:null},t.push(f),o.removeAttribute("c-id"),e.p||(e.p=[]),e.p[f.D]=f,e=f,n&&"0"===f.A&&(n[f.D]=f.j))),a=o.childNodes.length-1;a>=0;a--)le(e,t,l,n,s,o.childNodes[a],i);if(o.shadowRoot)for(a=o.shadowRoot.childNodes.length-1;a>=0;a--)le(e,t,l,n,s,o.shadowRoot.childNodes[a],i)}else if(8===o.nodeType)c=o.nodeValue.split("."),c[1]!==i&&"0"!==c[1]||(r=c[0],f={t:0,L:c[1],W:c[2],A:c[3],D:c[4],j:o,m:null,p:null,g:null,k:null,v:null,h:null},"t"===r?(f.j=o.nextSibling,f.j&&3===f.j.nodeType&&(f.h=f.j.textContent,t.push(f),o.remove(),e.p||(e.p=[]),e.p[f.D]=f,n&&"0"===f.A&&(n[f.D]=f.j))):f.L===i&&("s"===r?(f.v="slot",o["s-sn"]=c[5]?f.k=c[5]:"",o["s-sr"]=!0,l.push(f),e.p||(e.p=[]),e.p[f.D]=f):"r"===r&&(s["s-cr"]=o,o["s-cn"]=!0)));else if(e&&"style"===e.v){const t=S(null,o.textContent);t.j=o,t.D="0",e.p=[t]}},ne=(e,t)=>{if(1===e.nodeType){let l=0;for(;l<e.childNodes.length;l++)ne(e.childNodes[l],t);if(e.shadowRoot)for(l=0;l<e.shadowRoot.childNodes.length;l++)ne(e.shadowRoot.childNodes[l],t)}else if(8===e.nodeType){const l=e.nodeValue.split(".");"o"===l[0]&&(t.set(l[1]+"."+l[2],e),e.nodeValue="",e["s-en"]=l[3])}},se=(e,t,l)=>{if(t.F){e.watchers&&(t.H=e.watchers);const n=Object.entries(t.F),s=e.prototype;if(n.map((([e,[n]])=>{31&n||2&l&&32&n?Object.defineProperty(s,e,{get(){return((e,t)=>fe(this).U.get(t))(0,e)},set(l){((e,t,l,n)=>{const s=fe(e),o=s.M,i=s.U.get(t),r=s.t,c=s.i;if(l=((e,t)=>null==e||v(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,n.F[t][0]),(!(8&r)||void 0===i)&&l!==i&&(!Number.isNaN(i)||!Number.isNaN(l))&&(s.U.set(t,l),c)){if(n.H&&128&r){const e=n.H[t];e&&e.map((e=>{try{c[e](l,i,t)}catch(e){de(e,o)}}))}2==(18&r)&&G(s,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0}):1&l&&64&n&&Object.defineProperty(s,e,{value(...t){const l=fe(this);return l.q.then((()=>l.i[e](...t)))}})})),1&l){const l=new Map;s.attributeChangedCallback=function(e,t,n){u.jmp((()=>{const t=l.get(e);if(this.hasOwnProperty(t))n=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==n)return;this[t]=(null!==n||"boolean"!=typeof this[t])&&n}))},e.observedAttributes=n.filter((([e,t])=>15&t[0])).map((([e,n])=>{const s=n[1]||e;return l.set(s,e),512&n[0]&&t.T.push([e,s]),s}))}}return e},oe=e=>{if(0==(1&u.t)){const t=fe(e),l=t.N,n=()=>{};if(1&t.t)h(e,t,l.V);else{let n;t.t|=1,n=e.getAttribute("s-id"),n&&((e,t,l,n)=>{const s=e.shadowRoot,o=[],i=n.P=S(t,null);u.B||ne(a.body,u.B=new Map),e["s-id"]=l,e.removeAttribute("s-id"),le(i,o,[],null,e,e,l),o.map((e=>{const l=e.L+"."+e.W,n=u.B.get(l),o=e.j;n&&""===n["s-en"]&&n.parentNode.insertBefore(o,n.nextSibling),s||(o["s-hn"]=t,n&&(o["s-ol"]=n,o["s-ol"]["s-nr"]=o)),u.B.delete(l)}))})(e,l.$,n,t),n||12&l.t&&ie(e);{let l=e;for(;l=l.parentNode||l.host;)if(1===l.nodeType&&l.hasAttribute("s-id")&&l["s-p"]||l["s-p"]){B(t,t.R=l);break}}l.F&&Object.entries(l.F).map((([t,[l]])=>{if(31&l&&e.hasOwnProperty(t)){const l=e[t];delete e[t],e[t]=l}})),(async(e,t,l,n,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=ye(l)).then){const e=()=>{};s=await s,e()}s.isProxied||(l.H=s.watchers,se(s,l,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){de(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=g(l);if(!me.has(t)){const n=()=>{};((e,t,l)=>{let n=me.get(e);d&&l?(n=n||new CSSStyleSheet,"string"==typeof n?n=t:n.replaceSync(t)):n=t,me.set(e,n)})(t,e,!!(1&l.t)),n()}}}const o=t.R,i=()=>G(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,l)}n()}},ie=e=>{const t=e["s-cr"]=a.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},re=(e,t={})=>{const l=[],n=t.exclude||[],s=c.customElements,o=a.head,i=o.querySelector("meta[charset]"),r=a.createElement("style"),f=[];let $,d=!0;Object.assign(u,t),u.l=new URL(t.resourcesUrl||"./",a.baseURI).href,u.t|=2,e.map((e=>{e[1].map((t=>{const o={t:t[0],$:t[1],F:t[2],V:t[3]};o.F=t[2],o.V=t[3],o.T=[],o.H={};const i=o.$,r=class extends HTMLElement{constructor(e){super(e),ue(e=this,o)}connectedCallback(){$&&(clearTimeout($),$=null),d?f.push(this):u.jmp((()=>oe(this)))}disconnectedCallback(){u.jmp((()=>(()=>{if(0==(1&u.t)){const e=fe(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return fe(this).G}};o.J=e[0],n.includes(i)||s.get(i)||(l.push(i),s.define(i,se(r,o,1)))}))})),r.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles",""),o.insertBefore(r,i?i.nextSibling:o.firstChild),d=!1,f.length?f.map((e=>e.connectedCallback())):u.jmp((()=>$=setTimeout(Y,30)))},ce=new WeakMap,fe=e=>ce.get(e),ae=(e,t)=>ce.set(t.i=e,t),ue=(e,t)=>{const l={t:0,M:e,N:t,U:new Map};return l.q=new Promise((e=>l.I=e)),l.G=new Promise((e=>l._=e)),e["s-p"]=[],e["s-rc"]=[],h(e,l,t.V),ce.set(e,l)},$e=(e,t)=>t in e,de=(e,t)=>(0,console.error)(e,t),he=new Map,ye=e=>{const t=e.$.replace(/-/g,"_"),l=e.J,n=he.get(l);return n?n[t]:__sc_import_twilight(`./${l}.entry.js`).then((e=>(he.set(l,e),e[t])),de)
4
+ const e="twilight";let t,l,n=!1,s=!1,o=!1,i=!1,r=!1;const c="undefined"!=typeof window?window:{},f=c.CSS,a=c.document||{head:{}},u={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,l,n)=>e.addEventListener(t,l,n),rel:(e,t,l,n)=>e.removeEventListener(t,l,n),ce:(e,t)=>new CustomEvent(e,t)},$=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),h=(e,t,l)=>{l&&l.map((([l,n,s])=>{const o=m(e,l),i=y(t,s),r=p(l);u.ael(o,n,i,r),(t.o=t.o||[]).push((()=>u.rel(o,n,i,r)))}))},y=(e,t)=>l=>{try{256&e.t?e.i[t](l):(e.u=e.u||[]).push([t,l])}catch(e){de(e)}},m=(e,t)=>8&t?c:e,p=e=>0!=(2&e),w="http://www.w3.org/1999/xlink",b=new WeakMap,g=e=>"sc-"+e.$,k={},v=e=>"object"==(e=typeof e)||"function"===e,j=(e,t,...l)=>{let n=null,s=null,o=null,i=!1,r=!1;const c=[],f=t=>{for(let l=0;l<t.length;l++)n=t[l],Array.isArray(n)?f(n):null!=n&&"boolean"!=typeof n&&((i="function"!=typeof e&&!v(n))&&(n+=""),i&&r?c[c.length-1].h+=n:c.push(i?S(null,n):n),r=i)};if(f(l),t){t.key&&(s=t.key),t.name&&(o=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const a=S(e,null);return a.m=t,c.length>0&&(a.p=c),a.g=s,a.k=o,a},S=(e,t)=>({t:0,v:e,h:t,j:null,p:null,m:null,g:null,k:null}),x={},O=(e,t,l,n,s,o)=>{if(l!==n){let i=$e(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,s=C(l),o=C(n);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in l)n&&null!=n[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in n)l&&n[t]===l[t]||(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("key"===t);else if("ref"===t)n&&n(e);else if(i||"o"!==t[0]||"n"!==t[1]){const c=v(n);if((i||c&&null!==n)&&!s)try{if(e.tagName.includes("-"))e[t]=n;else{const s=null==n?"":n;"list"===t?i=!1:null!=l&&e[t]==s||(e[t]=s)}}catch(e){}let f=!1;r!==(r=r.replace(/^xlink\:?/,""))&&(t=r,f=!0),null==n||!1===n?!1===n&&""!==e.getAttribute(t)||(f?e.removeAttributeNS(w,t):e.removeAttribute(t)):(!i||4&o||s)&&!c&&(n=!0===n?"":n,f?e.setAttributeNS(w,t,n):e.setAttribute(t,n))}else t="-"===t[2]?t.slice(3):$e(c,r)?r.slice(2):r[2]+t.slice(3),l&&u.rel(e,t,l,!1),n&&u.ael(e,t,n,!1)}},M=/\s/,C=e=>e?e.split(M):[],R=(e,t,l,n)=>{const s=11===t.j.nodeType&&t.j.host?t.j.host:t.j,o=e&&e.m||k,i=t.m||k;for(n in o)n in i||O(s,n,o[n],void 0,l,t.t);for(n in i)O(s,n,o[n],i[n],l,t.t)},N=(e,s,r)=>{const c=s.p[r];let f,u,$,d=0;if(n||(o=!0,"slot"===c.v&&(c.t|=c.p?2:1)),null!==c.h)f=c.j=a.createTextNode(c.h);else if(1&c.t)f=c.j=a.createTextNode("");else{if(i||(i="svg"===c.v),f=c.j=a.createElementNS(i?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&c.t?"slot-fb":c.v),i&&"foreignObject"===c.v&&(i=!1),R(null,c,i),c.p)for(d=0;d<c.p.length;++d)u=N(e,c,d),u&&f.appendChild(u);"svg"===c.v?i=!1:"foreignObject"===f.tagName&&(i=!0)}return f["s-hn"]=l,3&c.t&&(f["s-sr"]=!0,f["s-cr"]=t,f["s-sn"]=c.k||"",$=e&&e.p&&e.p[r],$&&$.v===c.v&&e.j&&P(e.j,!1)),f},P=(e,t)=>{u.t|=1;const n=e.childNodes;for(let e=n.length-1;e>=0;e--){const s=n[e];s["s-hn"]!==l&&s["s-ol"]&&(E(s).insertBefore(s,L(s)),s["s-ol"].remove(),s["s-ol"]=void 0,o=!0),t&&P(s,t)}u.t&=-2},T=(e,t,l,n,s,o)=>{let i,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(;s<=o;++s)n[s]&&(i=N(null,l,s),i&&(n[s].j=i,r.insertBefore(i,L(t))))},_=(e,t,l,n,o)=>{for(;t<=l;++t)(n=e[t])&&(o=n.j,U(n),s=!0,o["s-ol"]?o["s-ol"].remove():P(o,!0),o.remove())},I=(e,t)=>e.v===t.v&&("slot"===e.v?e.k===t.k:e.g===t.g),L=e=>e&&e["s-ol"]||e,E=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,W=(e,t)=>{const l=t.j=e.j,n=e.p,s=t.p,o=t.v,r=t.h;let c;null===r?(i="svg"===o||"foreignObject"!==o&&i,"slot"===o||R(e,t,i),null!==n&&null!==s?((e,t,l,n)=>{let s,o,i=0,r=0,c=0,f=0,a=t.length-1,u=t[0],$=t[a],d=n.length-1,h=n[0],y=n[d];for(;i<=a&&r<=d;)if(null==u)u=t[++i];else if(null==$)$=t[--a];else if(null==h)h=n[++r];else if(null==y)y=n[--d];else if(I(u,h))W(u,h),u=t[++i],h=n[++r];else if(I($,y))W($,y),$=t[--a],y=n[--d];else if(I(u,y))"slot"!==u.v&&"slot"!==y.v||P(u.j.parentNode,!1),W(u,y),e.insertBefore(u.j,$.j.nextSibling),u=t[++i],y=n[--d];else if(I($,h))"slot"!==u.v&&"slot"!==y.v||P($.j.parentNode,!1),W($,h),e.insertBefore($.j,u.j),$=t[--a],h=n[++r];else{for(c=-1,f=i;f<=a;++f)if(t[f]&&null!==t[f].g&&t[f].g===h.g){c=f;break}c>=0?(o=t[c],o.v!==h.v?s=N(t&&t[r],l,c):(W(o,h),t[c]=void 0,s=o.j),h=n[++r]):(s=N(t&&t[r],l,r),h=n[++r]),s&&E(u.j).insertBefore(s,L(u.j))}i>a?T(e,null==n[d+1]?null:n[d+1].j,l,n,r,d):r>d&&_(t,i,a)})(l,n,t,s):null!==s?(null!==e.h&&(l.textContent=""),T(l,null,t,s,0,s.length-1)):null!==n&&_(n,0,n.length-1),i&&"svg"===o&&(i=!1)):(c=l["s-cr"])?c.parentNode.textContent=r:e.h!==r&&(l.data=r)},A=e=>{const t=e.childNodes;let l,n,s,o,i,r;for(n=0,s=t.length;n<s;n++)if(l=t[n],1===l.nodeType){if(l["s-sr"])for(i=l["s-sn"],l.hidden=!1,o=0;o<s;o++)if(r=t[o].nodeType,t[o]["s-hn"]!==l["s-hn"]||""!==i){if(1===r&&i===t[o].getAttribute("slot")){l.hidden=!0;break}}else if(1===r||3===r&&""!==t[o].textContent.trim()){l.hidden=!0;break}A(l)}},D=[],F=e=>{let t,l,n,o,i,r,c=0;const f=e.childNodes,a=f.length;for(;c<a;c++){if(t=f[c],t["s-sr"]&&(l=t["s-cr"])&&l.parentNode)for(n=l.parentNode.childNodes,o=t["s-sn"],r=n.length-1;r>=0;r--)l=n[r],l["s-cn"]||l["s-nr"]||l["s-hn"]===t["s-hn"]||(H(l,o)?(i=D.find((e=>e.S===l)),s=!0,l["s-sn"]=l["s-sn"]||o,i?i.O=t:D.push({O:t,S:l}),l["s-sr"]&&D.map((e=>{H(e.S,l["s-sn"])&&(i=D.find((e=>e.S===l)),i&&!e.O&&(e.O=i.O))}))):D.some((e=>e.S===l))||D.push({S:l}));1===t.nodeType&&F(t)}},H=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,U=e=>{e.m&&e.m.ref&&e.m.ref(null),e.p&&e.p.map(U)},q=e=>fe(e).M,V=(e,t,l)=>{const n=q(e);return{emit:e=>z(n,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},z=(e,t,l)=>{const n=u.ce(t,l);return e.dispatchEvent(n),n},B=(e,t)=>{t&&!e.C&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.C=t)))},G=(e,t)=>{if(e.t|=16,!(4&e.t))return B(e,e.R),je((()=>J(e,t)));e.t|=512},J=(e,t)=>{const l=e.i;let n;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>Z(l,e,t))),e.u=null),n=Z(l,"componentWillLoad")),ee(n,(()=>K(e,l,t)))},K=async(e,t,l)=>{const n=e.M,s=n["s-rc"];l&&(e=>{const t=e.N;((e,t)=>{let l=g(t);const n=me.get(l);if(e=11===e.nodeType?e:a,n)if("string"==typeof n){let t,s=b.get(e=e.head||e);s||b.set(e,s=new Set),s.has(l)||(e.host&&(t=e.querySelector(`[sty-id="${l}"]`))?t.innerHTML=n:(t=a.createElement("style"),t.innerHTML=n,e.insertBefore(t,e.querySelector("link"))),s&&s.add(l))}else e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n])})(e.M.getRootNode(),t)})(e);Q(e,t),s&&(s.map((e=>e())),n["s-rc"]=void 0);{const t=n["s-p"],l=()=>X(e);0===t.length?l():(Promise.all(t).then(l),e.t|=4,t.length=0)}},Q=(e,i)=>{try{i=i.render(),e.t&=-17,e.t|=2,((e,i)=>{const r=e.M,c=e.N,f=e.P||S(null,null),$=(e=>e&&e.v===x)(i)?i:j(null,null,i);if(l=r.tagName,c.T&&($.m=$.m||{},c.T.map((([e,t])=>$.m[t]=r[e]))),$.v=null,$.t|=4,e.P=$,$.j=f.j=r,t=r["s-cr"],n=0!=(1&c.t),s=!1,W(f,$),u.t|=1,o){let e,t,l,n,s,o;F($.j);let i=0;for(;i<D.length;i++)e=D[i],t=e.S,t["s-ol"]||(l=a.createTextNode(""),l["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=l,t));for(i=0;i<D.length;i++)if(e=D[i],t=e.S,e.O){for(n=e.O.parentNode,s=e.O.nextSibling,l=t["s-ol"];l=l.previousSibling;)if(o=l["s-nr"],o&&o["s-sn"]===t["s-sn"]&&n===o.parentNode&&(o=o.nextSibling,!o||!o["s-nr"])){s=o;break}(!s&&n!==t.parentNode||t.nextSibling!==s)&&t!==s&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),n.insertBefore(t,s))}else 1===t.nodeType&&(t.hidden=!0)}s&&A($.j),u.t&=-2,D.length=0})(e,i)}catch(t){de(t,e.M)}return null},X=e=>{const t=e.M,l=e.i,n=e.R;Z(l,"componentDidRender"),64&e.t||(e.t|=64,te(t),Z(l,"componentDidLoad"),e._(t),n||Y()),e.I(t),e.C&&(e.C(),e.C=void 0),512&e.t&&ve((()=>G(e,!1))),e.t&=-517},Y=()=>{te(a.documentElement),ve((()=>z(c,"appload",{detail:{namespace:"twilight"}})))},Z=(e,t,l)=>{if(e&&e[t])try{return e[t](l)}catch(e){de(e)}},ee=(e,t)=>e&&e.then?e.then(t):t(),te=e=>e.classList.add("hydrated"),le=(e,t,l,n,s,o,i)=>{let r,c,f,a;if(1===o.nodeType){for(r=o.getAttribute("c-id"),r&&(c=r.split("."),c[0]!==i&&"0"!==c[0]||(f={t:0,L:c[0],W:c[1],A:c[2],D:c[3],v:o.tagName.toLowerCase(),j:o,m:null,p:null,g:null,k:null,h:null},t.push(f),o.removeAttribute("c-id"),e.p||(e.p=[]),e.p[f.D]=f,e=f,n&&"0"===f.A&&(n[f.D]=f.j))),a=o.childNodes.length-1;a>=0;a--)le(e,t,l,n,s,o.childNodes[a],i);if(o.shadowRoot)for(a=o.shadowRoot.childNodes.length-1;a>=0;a--)le(e,t,l,n,s,o.shadowRoot.childNodes[a],i)}else if(8===o.nodeType)c=o.nodeValue.split("."),c[1]!==i&&"0"!==c[1]||(r=c[0],f={t:0,L:c[1],W:c[2],A:c[3],D:c[4],j:o,m:null,p:null,g:null,k:null,v:null,h:null},"t"===r?(f.j=o.nextSibling,f.j&&3===f.j.nodeType&&(f.h=f.j.textContent,t.push(f),o.remove(),e.p||(e.p=[]),e.p[f.D]=f,n&&"0"===f.A&&(n[f.D]=f.j))):f.L===i&&("s"===r?(f.v="slot",o["s-sn"]=c[5]?f.k=c[5]:"",o["s-sr"]=!0,l.push(f),e.p||(e.p=[]),e.p[f.D]=f):"r"===r&&(s["s-cr"]=o,o["s-cn"]=!0)));else if(e&&"style"===e.v){const t=S(null,o.textContent);t.j=o,t.D="0",e.p=[t]}},ne=(e,t)=>{if(1===e.nodeType){let l=0;for(;l<e.childNodes.length;l++)ne(e.childNodes[l],t);if(e.shadowRoot)for(l=0;l<e.shadowRoot.childNodes.length;l++)ne(e.shadowRoot.childNodes[l],t)}else if(8===e.nodeType){const l=e.nodeValue.split(".");"o"===l[0]&&(t.set(l[1]+"."+l[2],e),e.nodeValue="",e["s-en"]=l[3])}},se=(e,t,l)=>{if(t.F){e.watchers&&(t.H=e.watchers);const n=Object.entries(t.F),s=e.prototype;if(n.map((([e,[n]])=>{31&n||2&l&&32&n?Object.defineProperty(s,e,{get(){return((e,t)=>fe(this).U.get(t))(0,e)},set(l){((e,t,l,n)=>{const s=fe(e),o=s.M,i=s.U.get(t),r=s.t,c=s.i;if(l=((e,t)=>null==e||v(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,n.F[t][0]),(!(8&r)||void 0===i)&&l!==i&&(!Number.isNaN(i)||!Number.isNaN(l))&&(s.U.set(t,l),c)){if(n.H&&128&r){const e=n.H[t];e&&e.map((e=>{try{c[e](l,i,t)}catch(e){de(e,o)}}))}if(2==(18&r)){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(l,i,t))return;G(s,!1)}}})(this,e,l,t)},configurable:!0,enumerable:!0}):1&l&&64&n&&Object.defineProperty(s,e,{value(...t){const l=fe(this);return l.q.then((()=>l.i[e](...t)))}})})),1&l){const l=new Map;s.attributeChangedCallback=function(e,t,n){u.jmp((()=>{const t=l.get(e);if(this.hasOwnProperty(t))n=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==n)return;this[t]=(null!==n||"boolean"!=typeof this[t])&&n}))},e.observedAttributes=n.filter((([e,t])=>15&t[0])).map((([e,n])=>{const s=n[1]||e;return l.set(s,e),512&n[0]&&t.T.push([e,s]),s}))}}return e},oe=e=>{if(0==(1&u.t)){const t=fe(e),l=t.N,n=()=>{};if(1&t.t)h(e,t,l.V);else{let n;t.t|=1,n=e.getAttribute("s-id"),n&&((e,t,l,n)=>{const s=e.shadowRoot,o=[],i=n.P=S(t,null);u.B||ne(a.body,u.B=new Map),e["s-id"]=l,e.removeAttribute("s-id"),le(i,o,[],null,e,e,l),o.map((e=>{const l=e.L+"."+e.W,n=u.B.get(l),o=e.j;n&&""===n["s-en"]&&n.parentNode.insertBefore(o,n.nextSibling),s||(o["s-hn"]=t,n&&(o["s-ol"]=n,o["s-ol"]["s-nr"]=o)),u.B.delete(l)}))})(e,l.$,n,t),n||12&l.t&&ie(e);{let l=e;for(;l=l.parentNode||l.host;)if(1===l.nodeType&&l.hasAttribute("s-id")&&l["s-p"]||l["s-p"]){B(t,t.R=l);break}}l.F&&Object.entries(l.F).map((([t,[l]])=>{if(31&l&&e.hasOwnProperty(t)){const l=e[t];delete e[t],e[t]=l}})),(async(e,t,l,n,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=ye(l)).then){const e=()=>{};s=await s,e()}s.isProxied||(l.H=s.watchers,se(s,l,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){de(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=g(l);if(!me.has(t)){const n=()=>{};((e,t,l)=>{let n=me.get(e);d&&l?(n=n||new CSSStyleSheet,"string"==typeof n?n=t:n.replaceSync(t)):n=t,me.set(e,n)})(t,e,!!(1&l.t)),n()}}}const o=t.R,i=()=>G(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,l)}n()}},ie=e=>{const t=e["s-cr"]=a.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},re=(e,t={})=>{const l=[],n=t.exclude||[],s=c.customElements,o=a.head,i=o.querySelector("meta[charset]"),r=a.createElement("style"),f=[];let $,d=!0;Object.assign(u,t),u.l=new URL(t.resourcesUrl||"./",a.baseURI).href,u.t|=2,e.map((e=>{e[1].map((t=>{const o={t:t[0],$:t[1],F:t[2],V:t[3]};o.F=t[2],o.V=t[3],o.T=[],o.H={};const i=o.$,r=class extends HTMLElement{constructor(e){super(e),ue(e=this,o)}connectedCallback(){$&&(clearTimeout($),$=null),d?f.push(this):u.jmp((()=>oe(this)))}disconnectedCallback(){u.jmp((()=>(()=>{if(0==(1&u.t)){const e=fe(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return fe(this).G}};o.J=e[0],n.includes(i)||s.get(i)||(l.push(i),s.define(i,se(r,o,1)))}))})),r.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles",""),o.insertBefore(r,i?i.nextSibling:o.firstChild),d=!1,f.length?f.map((e=>e.connectedCallback())):u.jmp((()=>$=setTimeout(Y,30)))},ce=new WeakMap,fe=e=>ce.get(e),ae=(e,t)=>ce.set(t.i=e,t),ue=(e,t)=>{const l={t:0,M:e,N:t,U:new Map};return l.q=new Promise((e=>l.I=e)),l.G=new Promise((e=>l._=e)),e["s-p"]=[],e["s-rc"]=[],h(e,l,t.V),ce.set(e,l)},$e=(e,t)=>t in e,de=(e,t)=>(0,console.error)(e,t),he=new Map,ye=e=>{const t=e.$.replace(/-/g,"_"),l=e.J,n=he.get(l);return n?n[t]:__sc_import_twilight(`./${l}.entry.js`).then((e=>(he.set(l,e),e[t])),de)
5
5
  /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},me=new Map,pe=[],we=[],be=(e,t)=>l=>{e.push(l),r||(r=!0,t&&4&u.t?ve(ke):u.raf(ke))},ge=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){de(e)}e.length=0},ke=()=>{ge(pe),ge(we),(r=pe.length>0)&&u.raf(ke)},ve=e=>$().then(e),je=be(we,!0);export{f as C,x as H,e as N,$ as a,re as b,V as c,a as d,q as g,j as h,u as p,ae as r,c as w}