@salla.sa/twilight-components 1.0.0 → 1.0.2

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.
@@ -1,194 +0,0 @@
1
- import { Component, Host, Prop, State, Event, Element, h } from '@stencil/core';
2
- export class Alert {
3
- constructor() {
4
- /**
5
- * If `true` alert will close automatically.
6
- */
7
- this.autoClose = true;
8
- /**
9
- * Number of seconds to close alert automatically if autoClose `true`.
10
- */
11
- this.closeSecs = 3;
12
- /**
13
- * If closable or not.
14
- */
15
- this.closeable = true;
16
- /**
17
- * Customized close button text.
18
- */
19
- this.closeText = '\u2573';
20
- /**
21
- * If `true`, make the alert rounded.
22
- */
23
- this.rounded = false;
24
- this.countDownTimerId = null;
25
- this.close = () => {
26
- this.closed.emit(true);
27
- this.el.remove();
28
- };
29
- this.renderCloseText = () => {
30
- if (this.closeable) {
31
- return (h("span", { class: "alert__close-text", onClick: this.close }, this.closeText));
32
- }
33
- return null;
34
- };
35
- }
36
- componentWillLoad() {
37
- if (this.el.attributes['auto-close']) {
38
- this.countDownTimerId = window.setTimeout(() => {
39
- this.close();
40
- }, this.closeSecs * 1000);
41
- }
42
- }
43
- disconnectedCallback() {
44
- if (this.autoClose) {
45
- window.clearInterval(this.countDownTimerId);
46
- }
47
- }
48
- render() {
49
- return (h(Host, { class: {
50
- [this.color]: true,
51
- rounded: this.rounded,
52
- } },
53
- h("div", { class: "alert__content" },
54
- h("slot", null)),
55
- this.renderCloseText()));
56
- }
57
- static get is() { return "salla-alert"; }
58
- static get encapsulation() { return "scoped"; }
59
- static get originalStyleUrls() { return {
60
- "$": ["alert.scss"]
61
- }; }
62
- static get styleUrls() { return {
63
- "$": ["alert.css"]
64
- }; }
65
- static get properties() { return {
66
- "color": {
67
- "type": "string",
68
- "mutable": false,
69
- "complexType": {
70
- "original": "string",
71
- "resolved": "string",
72
- "references": {}
73
- },
74
- "required": false,
75
- "optional": true,
76
- "docs": {
77
- "tags": [],
78
- "text": "The color options are: `\"primary\"`, `\"secondary\"`, `\"success\"`, `\"warning\"`, `\"error\"`, `\"light\"`, `\"info\"`, `\"white\"`, `\"black\"`, and `\"dark\"`."
79
- },
80
- "attribute": "color",
81
- "reflect": false
82
- },
83
- "autoClose": {
84
- "type": "boolean",
85
- "mutable": false,
86
- "complexType": {
87
- "original": "boolean",
88
- "resolved": "boolean",
89
- "references": {}
90
- },
91
- "required": false,
92
- "optional": false,
93
- "docs": {
94
- "tags": [],
95
- "text": "If `true` alert will close automatically."
96
- },
97
- "attribute": "auto-close",
98
- "reflect": false,
99
- "defaultValue": "true"
100
- },
101
- "closeSecs": {
102
- "type": "number",
103
- "mutable": false,
104
- "complexType": {
105
- "original": "number",
106
- "resolved": "number",
107
- "references": {}
108
- },
109
- "required": false,
110
- "optional": false,
111
- "docs": {
112
- "tags": [],
113
- "text": "Number of seconds to close alert automatically if autoClose `true`."
114
- },
115
- "attribute": "close-secs",
116
- "reflect": false,
117
- "defaultValue": "3"
118
- },
119
- "closeable": {
120
- "type": "boolean",
121
- "mutable": false,
122
- "complexType": {
123
- "original": "boolean",
124
- "resolved": "boolean",
125
- "references": {}
126
- },
127
- "required": false,
128
- "optional": false,
129
- "docs": {
130
- "tags": [],
131
- "text": "If closable or not."
132
- },
133
- "attribute": "closeable",
134
- "reflect": false,
135
- "defaultValue": "true"
136
- },
137
- "closeText": {
138
- "type": "string",
139
- "mutable": false,
140
- "complexType": {
141
- "original": "string",
142
- "resolved": "string",
143
- "references": {}
144
- },
145
- "required": false,
146
- "optional": true,
147
- "docs": {
148
- "tags": [],
149
- "text": "Customized close button text."
150
- },
151
- "attribute": "close-text",
152
- "reflect": false,
153
- "defaultValue": "'\\u2573'"
154
- },
155
- "rounded": {
156
- "type": "boolean",
157
- "mutable": false,
158
- "complexType": {
159
- "original": "boolean",
160
- "resolved": "boolean",
161
- "references": {}
162
- },
163
- "required": false,
164
- "optional": true,
165
- "docs": {
166
- "tags": [],
167
- "text": "If `true`, make the alert rounded."
168
- },
169
- "attribute": "rounded",
170
- "reflect": false,
171
- "defaultValue": "false"
172
- }
173
- }; }
174
- static get states() { return {
175
- "countDownTimerId": {}
176
- }; }
177
- static get events() { return [{
178
- "method": "closed",
179
- "name": "closed",
180
- "bubbles": true,
181
- "cancelable": true,
182
- "composed": true,
183
- "docs": {
184
- "tags": [],
185
- "text": "Emitted when the alert is closed."
186
- },
187
- "complexType": {
188
- "original": "any",
189
- "resolved": "any",
190
- "references": {}
191
- }
192
- }]; }
193
- static get elementRef() { return "el"; }
194
- }
@@ -1,158 +0,0 @@
1
- /**
2
- * Initial Variables
3
- */
4
- /**
5
- * Functions
6
- */
7
- /**
8
- * Delivered variables
9
- */
10
- .wrapper {
11
- opacity: 0;
12
- visibility: hidden;
13
- position: fixed;
14
- width: 100%;
15
- height: 100%;
16
- top: 0;
17
- left: 0;
18
- background: rgba(0, 0, 0, 0.42);
19
- -webkit-transition: opacity 0.5s, visibility 0s 0.5s;
20
- transition: opacity 0.5s, visibility 0s 0.5s;
21
- display: flex;
22
- align-items: center;
23
- justify-content: center;
24
- z-index: 1050;
25
- }
26
- .wrapper .modal {
27
- font-family: Helvetica, sans-serif;
28
- font-size: 14px;
29
- background-color: #fff;
30
- position: absolute;
31
- top: 50%;
32
- left: 50%;
33
- transform: translate(-50%, -50%);
34
- width: 90%;
35
- border: 1px solid rgba(0, 0, 0, 0.2);
36
- border-radius: 0.3rem;
37
- }
38
- @media (min-width: 576px) {
39
- .wrapper .modal {
40
- max-width: 500px;
41
- }
42
- }
43
- .wrapper .modal .modal-header {
44
- display: none;
45
- -ms-flex-align: start;
46
- align-items: flex-start;
47
- -ms-flex-pack: justify;
48
- justify-content: space-between;
49
- padding: 1rem 1rem;
50
- border-bottom: 1px solid #dee2e6;
51
- border-top-left-radius: 0.3rem;
52
- border-top-right-radius: 0.3rem;
53
- }
54
- .wrapper .modal .modal-header h5 {
55
- margin: 0;
56
- font-weight: normal;
57
- }
58
- .wrapper .modal .modal-header .title {
59
- font-size: 1.25rem;
60
- }
61
- .wrapper .modal .modal-header button.close {
62
- padding: 0;
63
- background-color: transparent;
64
- border: 0;
65
- -webkit-appearance: none;
66
- -moz-appearance: none;
67
- appearance: none;
68
- color: grey;
69
- outline: 0;
70
- float: right;
71
- font-size: 1.5rem;
72
- font-weight: 700;
73
- line-height: 1;
74
- text-shadow: 0 1px 0 #fff;
75
- opacity: 0.5;
76
- }
77
- .wrapper .modal .modal-header button.close :hover {
78
- color: black;
79
- cursor: pointer;
80
- }
81
- .wrapper .modal .displayed {
82
- display: flex;
83
- }
84
- .wrapper .modal .modal-body {
85
- position: relative;
86
- -ms-flex: 1 1 auto;
87
- flex: 1 1 auto;
88
- padding: 1rem;
89
- }
90
- .wrapper .modal .modal-footer {
91
- display: -ms-flexbox;
92
- display: flex;
93
- -ms-flex-align: center;
94
- align-items: center;
95
- -ms-flex-pack: end;
96
- justify-content: flex-end;
97
- padding: 1rem;
98
- border-top: 1px solid #dee2e6;
99
- border-bottom-right-radius: 0.3rem;
100
- border-bottom-left-radius: 0.3rem;
101
- }
102
- .wrapper .modal .modal-footer .btn-primary {
103
- color: #fff;
104
- background-color: #007bff;
105
- border-color: #007bff;
106
- outline: none;
107
- }
108
- .wrapper .modal .modal-footer .btn-primary:hover {
109
- background-color: #0069d9;
110
- border-color: #0062cc;
111
- cursor: pointer;
112
- }
113
- .wrapper .modal .modal-footer .btn-secondary {
114
- color: #fff;
115
- background-color: #6c757d;
116
- border-color: #6c757d;
117
- outline: none;
118
- }
119
- .wrapper .modal .modal-footer .btn-secondary:hover {
120
- background-color: #5a6269;
121
- border-color: #5a6269;
122
- cursor: pointer;
123
- }
124
- .wrapper .modal .modal-footer > :not(:last-child) {
125
- margin-right: 0.25rem;
126
- }
127
- .wrapper .modal .button-container {
128
- text-align: right;
129
- }
130
- .wrapper .modal button {
131
- display: inline-block;
132
- font-weight: 400;
133
- color: #212529;
134
- text-align: center;
135
- vertical-align: middle;
136
- -webkit-user-select: none;
137
- -moz-user-select: none;
138
- -ms-user-select: none;
139
- user-select: none;
140
- background-color: transparent;
141
- border: 1px solid transparent;
142
- padding: 0.375rem 0.75rem;
143
- font-size: 1rem;
144
- line-height: 1.5;
145
- border-radius: 0.25rem;
146
- transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
147
- }
148
- .wrapper .modal button:hover {
149
- background-color: #6c757d;
150
- border-color: #6c757d;
151
- }
152
-
153
- .visible {
154
- opacity: 1;
155
- visibility: visible;
156
- transform: scale(1);
157
- transition: visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s;
158
- }
@@ -1,180 +0,0 @@
1
- import { Component, Event, h, Prop } from '@stencil/core';
2
- export class Modal {
3
- constructor() {
4
- /**
5
- * The title to display in the modal.
6
- */
7
- this.modalTitle = 'Modal Title';
8
- /**
9
- * The text to display in the cancel button.
10
- */
11
- this.cancelText = 'Cancel';
12
- /**
13
- * The text to display in the save button.
14
- */
15
- this.saveText = 'Save';
16
- /**
17
- * If 'true' will make the modal visible.
18
- */
19
- this.visible = false;
20
- /**
21
- * If 'true' will show the modal header.
22
- */
23
- this.modalHeader = false;
24
- this.handleCancelClick = () => {
25
- this.visible = false;
26
- this.cancel.emit();
27
- };
28
- this.handleOkClick = () => {
29
- this.visible = false;
30
- this.ok.emit();
31
- };
32
- this.handleClose = () => {
33
- this.visible = false;
34
- };
35
- }
36
- render() {
37
- return (h("div", { class: this.visible ? 'wrapper visible' : 'wrapper' },
38
- h("div", { class: "modal" },
39
- h("div", { class: this.modalHeader ? 'modal-header displayed' : 'modal-header' },
40
- h("h5", { class: "title" }, this.modalTitle),
41
- h("button", { type: "button", class: "close", "data-dismiss": "modal", "aria-label": "Close", onClick: this.handleClose },
42
- h("span", { "aria-hidden": "true" }, "\u00D7"))),
43
- h("div", { class: "modal-body" },
44
- h("slot", null)),
45
- h("div", { class: "modal-footer" },
46
- h("button", { type: "button", class: "btn-secondary", onClick: this.handleCancelClick }, this.cancelText),
47
- h("button", { type: "button", class: "btn-primary", onClick: this.handleOkClick }, this.saveText)))));
48
- }
49
- static get is() { return "salla-modal"; }
50
- static get encapsulation() { return "scoped"; }
51
- static get originalStyleUrls() { return {
52
- "$": ["modal.scss"]
53
- }; }
54
- static get styleUrls() { return {
55
- "$": ["modal.css"]
56
- }; }
57
- static get properties() { return {
58
- "modalTitle": {
59
- "type": "string",
60
- "mutable": false,
61
- "complexType": {
62
- "original": "string",
63
- "resolved": "string",
64
- "references": {}
65
- },
66
- "required": false,
67
- "optional": false,
68
- "docs": {
69
- "tags": [],
70
- "text": "The title to display in the modal."
71
- },
72
- "attribute": "modal-title",
73
- "reflect": false,
74
- "defaultValue": "'Modal Title'"
75
- },
76
- "cancelText": {
77
- "type": "string",
78
- "mutable": false,
79
- "complexType": {
80
- "original": "string",
81
- "resolved": "string",
82
- "references": {}
83
- },
84
- "required": false,
85
- "optional": false,
86
- "docs": {
87
- "tags": [],
88
- "text": "The text to display in the cancel button."
89
- },
90
- "attribute": "cancel-text",
91
- "reflect": false,
92
- "defaultValue": "'Cancel'"
93
- },
94
- "saveText": {
95
- "type": "string",
96
- "mutable": false,
97
- "complexType": {
98
- "original": "string",
99
- "resolved": "string",
100
- "references": {}
101
- },
102
- "required": false,
103
- "optional": false,
104
- "docs": {
105
- "tags": [],
106
- "text": "The text to display in the save button."
107
- },
108
- "attribute": "save-text",
109
- "reflect": false,
110
- "defaultValue": "'Save'"
111
- },
112
- "visible": {
113
- "type": "boolean",
114
- "mutable": true,
115
- "complexType": {
116
- "original": "boolean",
117
- "resolved": "boolean",
118
- "references": {}
119
- },
120
- "required": false,
121
- "optional": false,
122
- "docs": {
123
- "tags": [],
124
- "text": "If 'true' will make the modal visible."
125
- },
126
- "attribute": "visible",
127
- "reflect": true,
128
- "defaultValue": "false"
129
- },
130
- "modalHeader": {
131
- "type": "boolean",
132
- "mutable": false,
133
- "complexType": {
134
- "original": "boolean",
135
- "resolved": "boolean",
136
- "references": {}
137
- },
138
- "required": false,
139
- "optional": false,
140
- "docs": {
141
- "tags": [],
142
- "text": "If 'true' will show the modal header."
143
- },
144
- "attribute": "modal-header",
145
- "reflect": true,
146
- "defaultValue": "false"
147
- }
148
- }; }
149
- static get events() { return [{
150
- "method": "ok",
151
- "name": "ok",
152
- "bubbles": true,
153
- "cancelable": true,
154
- "composed": true,
155
- "docs": {
156
- "tags": [],
157
- "text": ""
158
- },
159
- "complexType": {
160
- "original": "any",
161
- "resolved": "any",
162
- "references": {}
163
- }
164
- }, {
165
- "method": "cancel",
166
- "name": "cancel",
167
- "bubbles": true,
168
- "cancelable": true,
169
- "composed": true,
170
- "docs": {
171
- "tags": [],
172
- "text": ""
173
- },
174
- "complexType": {
175
- "original": "any",
176
- "resolved": "any",
177
- "references": {}
178
- }
179
- }]; }
180
- }
@@ -1,48 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-3c2b0663.js';
2
-
3
- const modalCss = ".wrapper.sc-salla-modal{opacity:0;visibility:hidden;position:fixed;width:100%;height:100%;top:0;left:0;background:rgba(0, 0, 0, 0.42);-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;display:flex;align-items:center;justify-content:center;z-index:1050}.wrapper.sc-salla-modal .modal.sc-salla-modal{font-family:Helvetica, sans-serif;font-size:14px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:90%;border:1px solid rgba(0, 0, 0, 0.2);border-radius:0.3rem}@media (min-width: 576px){.wrapper.sc-salla-modal .modal.sc-salla-modal{max-width:500px}}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal{display:none;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:justify;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:0.3rem;border-top-right-radius:0.3rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal h5.sc-salla-modal{margin:0;font-weight:normal}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal .title.sc-salla-modal{font-size:1.25rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal button.close.sc-salla-modal{padding:0;background-color:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:grey;outline:0;float:right;font-size:1.5rem;font-weight:700;line-height:1;text-shadow:0 1px 0 #fff;opacity:0.5}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal button.close.sc-salla-modal .sc-salla-modal:hover{color:black;cursor:pointer}.wrapper.sc-salla-modal .modal.sc-salla-modal .displayed.sc-salla-modal{display:flex}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-body.sc-salla-modal{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:1rem;border-top:1px solid #dee2e6;border-bottom-right-radius:0.3rem;border-bottom-left-radius:0.3rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-primary.sc-salla-modal{color:#fff;background-color:#007bff;border-color:#007bff;outline:none}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-primary.sc-salla-modal:hover{background-color:#0069d9;border-color:#0062cc;cursor:pointer}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-secondary.sc-salla-modal{color:#fff;background-color:#6c757d;border-color:#6c757d;outline:none}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-secondary.sc-salla-modal:hover{background-color:#5a6269;border-color:#5a6269;cursor:pointer}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal>.sc-salla-modal:not(:last-child){margin-right:0.25rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .button-container.sc-salla-modal{text-align:right}.wrapper.sc-salla-modal .modal.sc-salla-modal button.sc-salla-modal{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:0.375rem 0.75rem;font-size:1rem;line-height:1.5;border-radius:0.25rem;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}.wrapper.sc-salla-modal .modal.sc-salla-modal button.sc-salla-modal:hover{background-color:#6c757d;border-color:#6c757d}.visible.sc-salla-modal{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}";
4
-
5
- const Modal = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.ok = createEvent(this, "ok", 7);
9
- this.cancel = createEvent(this, "cancel", 7);
10
- /**
11
- * The title to display in the modal.
12
- */
13
- this.modalTitle = 'Modal Title';
14
- /**
15
- * The text to display in the cancel button.
16
- */
17
- this.cancelText = 'Cancel';
18
- /**
19
- * The text to display in the save button.
20
- */
21
- this.saveText = 'Save';
22
- /**
23
- * If 'true' will make the modal visible.
24
- */
25
- this.visible = false;
26
- /**
27
- * If 'true' will show the modal header.
28
- */
29
- this.modalHeader = false;
30
- this.handleCancelClick = () => {
31
- this.visible = false;
32
- this.cancel.emit();
33
- };
34
- this.handleOkClick = () => {
35
- this.visible = false;
36
- this.ok.emit();
37
- };
38
- this.handleClose = () => {
39
- this.visible = false;
40
- };
41
- }
42
- render() {
43
- return (h("div", { class: this.visible ? 'wrapper visible' : 'wrapper' }, h("div", { class: "modal" }, h("div", { class: this.modalHeader ? 'modal-header displayed' : 'modal-header' }, h("h5", { class: "title" }, this.modalTitle), h("button", { type: "button", class: "close", "data-dismiss": "modal", "aria-label": "Close", onClick: this.handleClose }, h("span", { "aria-hidden": "true" }, "\u00D7"))), h("div", { class: "modal-body" }, h("slot", null)), h("div", { class: "modal-footer" }, h("button", { type: "button", class: "btn-secondary", onClick: this.handleCancelClick }, this.cancelText), h("button", { type: "button", class: "btn-primary", onClick: this.handleOkClick }, this.saveText)))));
44
- }
45
- };
46
- Modal.style = modalCss;
47
-
48
- export { Modal as salla_modal };
@@ -1 +0,0 @@
1
- import{r as s,c as t,h as a,H as e,g as i}from"./p-e1773073.js";const l=class{constructor(e){s(this,e),this.closed=t(this,"closed",7),this.autoClose=!0,this.closeSecs=3,this.closeable=!0,this.closeText="╳",this.rounded=!1,this.countDownTimerId=null,this.close=()=>{this.closed.emit(!0),this.el.remove()},this.renderCloseText=()=>this.closeable?a("span",{class:"alert__close-text",onClick:this.close},this.closeText):null}componentWillLoad(){this.el.attributes["auto-close"]&&(this.countDownTimerId=window.setTimeout((()=>{this.close()}),1e3*this.closeSecs))}disconnectedCallback(){this.autoClose&&window.clearInterval(this.countDownTimerId)}render(){return a(e,{class:{[this.color]:!0,rounded:this.rounded}},a("div",{class:"alert__content"},a("slot",null)),this.renderCloseText())}get el(){return i(this)}};l.style='.sc-salla-alert-h{-webkit-font-smoothing:antialiased;padding:var(--padding-top, 8px) var(--padding-right, 16px) var(--padding-bottom, 8px) var(--padding-left, 16px);min-height:var(--height, 24px);color:var(--color, #fff);background-color:var(--background-color, #327bb7);border-color:transparent;font-family:var(--font-family, "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:var(--font-size, 13px);font-weight:var(--font-weight, normal);line-height:1;position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center}.sc-salla-alert-h .alert__content.sc-salla-alert{display:block;height:100%;width:100%}.sc-salla-alert-h .alert__close-text.sc-salla-alert{cursor:pointer;opacity:0.7;position:absolute;top:14px;right:16px;font-size:0.8em}.sc-salla-alert-h .alert__close-text.sc-salla-alert:hover{opacity:0.85}.primary.sc-salla-alert-h{color:white;background-color:#5cd5c4}.secondary.sc-salla-alert-h{color:white;background-color:#ff7d09}.success.sc-salla-alert-h{color:white;background-color:#00c092}.warning.sc-salla-alert-h{color:white;background-color:#e8d700}.error.sc-salla-alert-h{color:white;background-color:#d0021b}.light.sc-salla-alert-h{color:black;background-color:#e5e5e5}.info.sc-salla-alert-h{color:black;background-color:#53ff5c}.dark.sc-salla-alert-h{color:white;background-color:#5d5d5d}.white.sc-salla-alert-h{color:black;background-color:white}.black.sc-salla-alert-h{color:white;background-color:black}.rounded.sc-salla-alert-h{border-radius:var(--border-radius, 4px)}';const r=class{constructor(t){s(this,t),this.fetchStatus="",this.searchIcon="Search_Icon.svg",this.visible=!1,this.handleClose=()=>{this.visible=!1}}handleClick(s){s.path.some((s=>s.className&&s.className.includes("modal-body")))||"salla-search-modal"!==s.target.localName||(this.visible=!1)}render(){return a("div",{class:this.visible?"wrapper visible":"wrapper"},a("div",{class:"modal"},a("div",{class:"modal-header"},a("h5",{class:"title"},"سجل دخول إلي الموقع"),a("button",{type:"button",class:"close","data-dismiss":"modal","aria-label":"Close",onClick:this.handleClose},a("span",{"aria-hidden":"true"},"×"))),a("div",{class:"modal-body"},a("div",{id:"showLoginMethods"},a("p",{class:"text-sm text-gray-text mb-5"},"اختر الوسيلة المناسبة"),a("div",{id:"openEmailLogin",class:"mb-2.5 box-content relative rounded-md border border-border-color bg-white py-5 pe-4 ps-5 flex items-center space-s-3 hover:border-gray-200"},a("div",{class:"flex-shrink-0"},a("div",{class:"bg-primary w-12 h-12 text-lg text-white rounded-icon"},a("i",{class:"sicon-mail"}))),a("div",{class:"flex-1 min-w-0"},a("a",{href:"#",class:"focus:outline-none flex justify-between items-center"},a("div",{class:"flex-1"},a("span",{class:"absolute inset-0","aria-hidden":"true"}),a("p",{class:"text-sm text-gray-text"},"سجل دخول"),a("h6",{class:"font-boldf"},"البريد الإلكتروني")),a("i",{class:"sicon-keyboard_arrow_left text-primary text-xl"})))),a("div",{class:"box-content relative rounded-md border border-border-color bg-white py-5 pe-4 ps-5 flex items-center space-s-3 hover:border-gray-200"},a("div",{class:"flex-shrink-0"},a("div",{class:"bg-primary w-12 h-12 text-lg text-white rounded-icon"},a("i",{class:"sicon-phone"}))),a("div",{class:"flex-1 min-w-0"},a("a",{href:"#",class:"focus:outline-none flex justify-between items-center"},a("div",{class:"flex-1"},a("span",{class:"absolute inset-0","aria-hidden":"true"}),a("p",{class:"text-sm text-gray-text"},"سجل دخول"),a("h6",{class:"font-boldf"},"الهاتف")),a("i",{class:"sicon-keyboard_arrow_left text-primary text-xl"}))))))))}static get assetsDirs(){return["assets"]}};r.style=".wrapper{opacity:0;visibility:hidden;position:fixed;width:100%;height:100%;top:0;left:0;background:#fcfcfc;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;display:flex;align-items:center;justify-content:center;z-index:1050}.wrapper .modal{font-family:Helvetica, sans-serif;font-size:14px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:90%;border:1px solid rgba(0, 0, 0, 0.2);border-radius:0.3rem}@media (min-width: 576px){.wrapper .modal{max-width:500px}}.wrapper .modal .displayed{display:flex}.wrapper .modal .modal-body{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.visible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.hide{display:none !important}.show{display:block !important}.search-box{display:flex}.search-box input{width:100%;padding:10px;padding-inline-start:32px}.search-box button{background-color:transparent;border:0;position:absolute;padding:12px;left:12px}.results{list-style:none;padding:0;margin:0;max-height:300px;overflow-y:scroll}.results .product-img{width:50px;margin-inline-end:10px}.results a:first-child{margin-top:20px}.results a{display:flex;border-bottom:1px solid #ddd}.results a h5{margin-top:5px}";const o=class{constructor(t){s(this,t),this.fetchStatus="",this.showModal=!1,this.searchPlaceholder="Search here ...",this.handleChange=s=>{this.searchTerm=s.target.value,console.log("this.value",this.searchTerm),this.fetchStatus="loading",this.showResult=!1,this.results=[],this.searchTerm.length>2&&window.salla.search.api.search(this.searchTerm).then((s=>s)).then((s=>{console.log("response",s),this.fetchStatus="idle",this.results=s.results,this.showResult=!0,this.results.length<1&&(this.fetchStatus="error")})).catch((s=>{this.showResult=!0,this.fetchStatus="error",console.log(s)}))},this.openSearch=()=>{console.log("openSearchModal"),this.searchTerm="",this.fetchStatus="",this.results=[],this.showModal=!0,window.scrollTo(0,0),document.getElementsByTagName("html")[0].style.position="fixed",document.getElementsByTagName("html")[0].style.overflowY="scroll"},this.closeSearch=()=>{console.log("closeSearchModal"),this.searchTerm="",this.fetchStatus="",this.results=[],document.getElementsByTagName("html")[0].style.position="static",document.getElementsByTagName("html")[0].style.overflowY="auto",this.showModal=!1}}getProduct(s){var t;return a("div",{key:s.id,class:"s-search-modal-results-item"},a("div",{class:"s-search-modal-product"},a("a",{target:"_blank",href:s.url,class:"s-search-modal-product-image-container"},a("img",{class:"s-search-modal-product-image",src:s.thumb})),a("div",{class:"s-search-modal-product-details"},a("div",{class:"s-search-modal-product-title"},a("h3",{class:"s-search-modal-product-title-h3"},s.title)),a("div",{class:"s-search-modal-product-price"},a("h4",{class:"s-search-modal-product-price-h4"},null===(t=s.price)||void 0===t?void 0:t.after)))))}render(){return a(e,{class:"s-search-modal"},a("button",{type:"button",onClick:this.openSearch,class:"s-search-modal-search-button-icon"},a("i",{class:"sicon-search font-bold"})),this.showModal&&a("div",{class:"s-search-modal-container",style:{backgroundColor:"rgba(0,0,0,0.5)"}},a("div",{class:"s-search-modal-wrapper",onClick:this.closeSearch},a("div",{class:"s-search-modal-inner"},a("div",{class:"s-search-modal-search-box-container"},a("div",{class:this.showResult?"s-search-modal-search-box-inner-open":"s-search-modal-search-box-inner"},a("input",{onClick:s=>{s.stopPropagation()},class:"s-search-modal-input",type:"text",placeholder:this.searchPlaceholder,value:this.searchTerm,onInput:s=>this.handleChange(s)}),"loading"!=this.fetchStatus?a("button",{class:"s-search-modal-search-icon"},a("i",{class:"sicon-search"})):a("span",{class:"s-search-modal-spinner"},a("span",{class:"s-search-modal-spinner-loader"})))),a("div",{class:"s-search-modal-search-results"},"error"===this.fetchStatus&&a("p",{class:"s-search-modal-no-results error p-4 text-sm text-gray-text"},"لا يوجد نتائج"),this.results&&this.results.map((s=>this.getProduct(s))))))))}static get assetsDirs(){return["assets"]}};o.style="";export{l as salla_alert,r as salla_login,o as salla_search_modal}
@@ -1 +0,0 @@
1
- import{r as a,c as l,h as o}from"./p-e1773073.js";const s=class{constructor(o){a(this,o),this.ok=l(this,"ok",7),this.cancel=l(this,"cancel",7),this.modalTitle="Modal Title",this.cancelText="Cancel",this.saveText="Save",this.visible=!1,this.modalHeader=!1,this.handleCancelClick=()=>{this.visible=!1,this.cancel.emit()},this.handleOkClick=()=>{this.visible=!1,this.ok.emit()},this.handleClose=()=>{this.visible=!1}}render(){return o("div",{class:this.visible?"wrapper visible":"wrapper"},o("div",{class:"modal"},o("div",{class:this.modalHeader?"modal-header displayed":"modal-header"},o("h5",{class:"title"},this.modalTitle),o("button",{type:"button",class:"close","data-dismiss":"modal","aria-label":"Close",onClick:this.handleClose},o("span",{"aria-hidden":"true"},"×"))),o("div",{class:"modal-body"},o("slot",null)),o("div",{class:"modal-footer"},o("button",{type:"button",class:"btn-secondary",onClick:this.handleCancelClick},this.cancelText),o("button",{type:"button",class:"btn-primary",onClick:this.handleOkClick},this.saveText))))}};s.style=".wrapper.sc-salla-modal{opacity:0;visibility:hidden;position:fixed;width:100%;height:100%;top:0;left:0;background:rgba(0, 0, 0, 0.42);-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;display:flex;align-items:center;justify-content:center;z-index:1050}.wrapper.sc-salla-modal .modal.sc-salla-modal{font-family:Helvetica, sans-serif;font-size:14px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:90%;border:1px solid rgba(0, 0, 0, 0.2);border-radius:0.3rem}@media (min-width: 576px){.wrapper.sc-salla-modal .modal.sc-salla-modal{max-width:500px}}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal{display:none;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:justify;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:0.3rem;border-top-right-radius:0.3rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal h5.sc-salla-modal{margin:0;font-weight:normal}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal .title.sc-salla-modal{font-size:1.25rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal button.close.sc-salla-modal{padding:0;background-color:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:grey;outline:0;float:right;font-size:1.5rem;font-weight:700;line-height:1;text-shadow:0 1px 0 #fff;opacity:0.5}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal button.close.sc-salla-modal .sc-salla-modal:hover{color:black;cursor:pointer}.wrapper.sc-salla-modal .modal.sc-salla-modal .displayed.sc-salla-modal{display:flex}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-body.sc-salla-modal{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:1rem;border-top:1px solid #dee2e6;border-bottom-right-radius:0.3rem;border-bottom-left-radius:0.3rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-primary.sc-salla-modal{color:#fff;background-color:#007bff;border-color:#007bff;outline:none}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-primary.sc-salla-modal:hover{background-color:#0069d9;border-color:#0062cc;cursor:pointer}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-secondary.sc-salla-modal{color:#fff;background-color:#6c757d;border-color:#6c757d;outline:none}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-secondary.sc-salla-modal:hover{background-color:#5a6269;border-color:#5a6269;cursor:pointer}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal>.sc-salla-modal:not(:last-child){margin-right:0.25rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .button-container.sc-salla-modal{text-align:right}.wrapper.sc-salla-modal .modal.sc-salla-modal button.sc-salla-modal{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:0.375rem 0.75rem;font-size:1rem;line-height:1.5;border-radius:0.25rem;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}.wrapper.sc-salla-modal .modal.sc-salla-modal button.sc-salla-modal:hover{background-color:#6c757d;border-color:#6c757d}.visible.sc-salla-modal{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}";export{s as salla_modal}
@@ -1 +0,0 @@
1
- let e,t,l,n=!1,s=!1,o=!1,i=!1;const c="undefined"!=typeof window?window:{},r=c.document||{head:{}},f={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)},a=e=>Promise.resolve(e),u=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),$=(e,t,l)=>{l&&l.map((([l,n,s])=>{const o=y(e,l),i=d(t,s),c=h(l);f.ael(o,n,i,c),(t.o=t.o||[]).push((()=>f.rel(o,n,i,c)))}))},d=(e,t)=>l=>{try{256&e.t?e.i[t](l):(e.u=e.u||[]).push([t,l])}catch(e){oe(e)}},y=(e,t)=>8&t?c:e,h=e=>0!=(2&e),p=new WeakMap,m=e=>"sc-"+e.$,b={},w=e=>"object"==(e=typeof e)||"function"===e,k=(e,t,...l)=>{let n=null,s=null,o=null,i=!1,c=!1,r=[];const 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&&!w(n))&&(n+=""),i&&c?r[r.length-1].h+=n:r.push(i?S(null,n):n),c=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.p=t,r.length>0&&(a.m=r),a.k=s,a.S=o,a},S=(e,t)=>({t:0,g:e,h:t,v:null,m:null,p:null,k:null,S:null}),g={},v=(e,t,l,n,s,o)=>{if(l!==n){let i=se(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,s=M(l),o=M(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(i||"o"!==t[0]||"n"!==t[1]){const c=w(n);if((i||c&&null!==n)&&!s)try{if(e.tagName.includes("-"))e[t]=n;else{let s=null==n?"":n;"list"===t?i=!1:null!=l&&e[t]==s||(e[t]=s)}}catch(e){}null==n||!1===n?!1===n&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&o||s)&&!c&&e.setAttribute(t,n=!0===n?"":n)}else t="-"===t[2]?t.slice(3):se(c,r)?r.slice(2):r[2]+t.slice(3),l&&f.rel(e,t,l,!1),n&&f.ael(e,t,n,!1)}},j=/\s/,M=e=>e?e.split(j):[],C=(e,t,l,n)=>{const s=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.p||b,i=t.p||b;for(n in o)n in i||v(s,n,o[n],void 0,l,t.t);for(n in i)v(s,n,o[n],i[n],l,t.t)},O=(s,i,c,f)=>{let a,u,$,d=i.m[c],y=0;if(n||(o=!0,"slot"===d.g&&(e&&f.classList.add(e+"-s"),d.t|=d.m?2:1)),null!==d.h)a=d.v=r.createTextNode(d.h);else if(1&d.t)a=d.v=r.createTextNode("");else if(a=d.v=r.createElement(2&d.t?"slot-fb":d.g),C(null,d,!1),null!=e&&a["s-si"]!==e&&a.classList.add(a["s-si"]=e),d.m)for(y=0;y<d.m.length;++y)u=O(s,d,y,a),u&&a.appendChild(u);return a["s-hn"]=l,3&d.t&&(a["s-sr"]=!0,a["s-cr"]=t,a["s-sn"]=d.S||"",$=s&&s.m&&s.m[c],$&&$.g===d.g&&s.v&&R(s.v,!1)),a},R=(e,t)=>{f.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"]&&(L(s).insertBefore(s,E(s)),s["s-ol"].remove(),s["s-ol"]=void 0,o=!0),t&&R(s,t)}f.t&=-2},T=(e,t,n,s,o,i)=>{let c,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===l&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=O(null,n,o,e),c&&(s[o].v=c,r.insertBefore(c,E(t))))},P=(e,t,l,n,o)=>{for(;t<=l;++t)(n=e[t])&&(s=!0,(o=n.v)["s-ol"]?o["s-ol"].remove():R(o,!0),o.remove())},x=(e,t)=>e.g===t.g&&("slot"===e.g?e.S===t.S:e.k===t.k),E=e=>e&&e["s-ol"]||e,L=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,W=(e,t)=>{const l=t.v=e.v,n=e.m,s=t.m,o=t.h;let i;null===o?("slot"===t.g||C(e,t,!1),null!==n&&null!==s?((e,t,l,n)=>{let s,o,i=0,c=0,r=0,f=0,a=t.length-1,u=t[0],$=t[a],d=n.length-1,y=n[0],h=n[d];for(;i<=a&&c<=d;)if(null==u)u=t[++i];else if(null==$)$=t[--a];else if(null==y)y=n[++c];else if(null==h)h=n[--d];else if(x(u,y))W(u,y),u=t[++i],y=n[++c];else if(x($,h))W($,h),$=t[--a],h=n[--d];else if(x(u,h))"slot"!==u.g&&"slot"!==h.g||R(u.v.parentNode,!1),W(u,h),e.insertBefore(u.v,$.v.nextSibling),u=t[++i],h=n[--d];else if(x($,y))"slot"!==u.g&&"slot"!==h.g||R($.v.parentNode,!1),W($,y),e.insertBefore($.v,u.v),$=t[--a],y=n[++c];else{for(r=-1,f=i;f<=a;++f)if(t[f]&&null!==t[f].k&&t[f].k===y.k){r=f;break}r>=0?(o=t[r],o.g!==y.g?s=O(t&&t[c],l,r,e):(W(o,y),t[r]=void 0,s=o.v),y=n[++c]):(s=O(t&&t[c],l,c,e),y=n[++c]),s&&L(u.v).insertBefore(s,E(u.v))}i>a?T(e,null==n[d+1]?null:n[d+1].v,l,n,c,d):c>d&&P(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&&P(n,0,n.length-1)):(i=l["s-cr"])?i.parentNode.textContent=o:e.h!==o&&(l.data=o)},A=e=>{let t,l,n,s,o,i,c=e.childNodes;for(l=0,n=c.length;l<n;l++)if(t=c[l],1===t.nodeType){if(t["s-sr"])for(o=t["s-sn"],t.hidden=!1,s=0;s<n;s++)if(i=c[s].nodeType,c[s]["s-hn"]!==t["s-hn"]||""!==o){if(1===i&&o===c[s].getAttribute("slot")){t.hidden=!0;break}}else if(1===i||3===i&&""!==c[s].textContent.trim()){t.hidden=!0;break}A(t)}},F=[],H=e=>{let t,l,n,o,i,c,r=0,f=e.childNodes,a=f.length;for(;r<a;r++){if(t=f[r],t["s-sr"]&&(l=t["s-cr"])&&l.parentNode)for(n=l.parentNode.childNodes,o=t["s-sn"],c=n.length-1;c>=0;c--)l=n[c],l["s-cn"]||l["s-nr"]||l["s-hn"]===t["s-hn"]||(N(l,o)?(i=F.find((e=>e.j===l)),s=!0,l["s-sn"]=l["s-sn"]||o,i?i.M=t:F.push({M:t,j:l}),l["s-sr"]&&F.map((e=>{N(e.j,l["s-sn"])&&(i=F.find((e=>e.j===l)),i&&!e.M&&(e.M=i.M))}))):F.some((e=>e.j===l))||F.push({j:l}));1===t.nodeType&&H(t)}},N=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,U=e=>te(e).C,q=(e,t,l)=>{const n=U(e);return{emit:e=>V(n,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},V=(e,t,l)=>{const n=f.ce(t,l);return e.dispatchEvent(n),n},_=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},z=(e,t)=>{if(e.t|=16,!(4&e.t))return _(e,e.R),he((()=>B(e,t)));e.t|=512},B=(e,t)=>{const l=e.i;let n;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>K(l,e,t))),e.u=null),n=K(l,"componentWillLoad")),Q(n,(()=>D(e,l,t)))},D=async(e,t,l)=>{const n=e.C,s=n["s-rc"];l&&(e=>{const t=e.T,l=e.C,n=t.t,s=((e,t)=>{let l=m(t),n=re.get(l);if(e=11===e.nodeType?e:r,n)if("string"==typeof n){let t,s=p.get(e=e.head||e);s||p.set(e,s=new Set),s.has(l)||(t=r.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]);return l})(l.shadowRoot?l.shadowRoot:l.getRootNode(),t);10&n&&(l["s-sc"]=s,l.classList.add(s+"-h"),2&n&&l.classList.add(s+"-s"))})(e);G(e,t),s&&(s.map((e=>e())),n["s-rc"]=void 0);{const t=n["s-p"],l=()=>I(e);0===t.length?l():(Promise.all(t).then(l),e.t|=4,t.length=0)}},G=(i,c)=>{try{c=c.render(),i.t&=-17,i.t|=2,((i,c)=>{const a=i.C,u=i.T,$=i.P||S(null,null),d=(e=>e&&e.g===g)(c)?c:k(null,null,c);if(l=a.tagName,u.L&&(d.p=d.p||{},u.L.map((([e,t])=>d.p[t]=a[e]))),d.g=null,d.t|=4,i.P=d,d.v=$.v=a.shadowRoot||a,e=a["s-sc"],t=a["s-cr"],n=0!=(1&u.t),s=!1,W($,d),f.t|=1,o){let e,t,l,n,s,o;H(d.v);let i=0;for(;i<F.length;i++)e=F[i],t=e.j,t["s-ol"]||(l=r.createTextNode(""),l["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=l,t));for(i=0;i<F.length;i++)if(e=F[i],t=e.j,e.M){for(n=e.M.parentNode,s=e.M.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(d.v),f.t&=-2,F.length=0})(i,c)}catch(e){oe(e,i.C)}return null},I=e=>{const t=e.C,l=e.R;64&e.t||(e.t|=64,X(t),e.W(t),l||J()),e.O&&(e.O(),e.O=void 0),512&e.t&&ye((()=>z(e,!1))),e.t&=-517},J=()=>{X(r.documentElement),ye((()=>V(c,"appload",{detail:{namespace:"twilight-components"}})))},K=(e,t,l)=>{if(e&&e[t])try{return e[t](l)}catch(e){oe(e)}},Q=(e,t)=>e&&e.then?e.then(t):t(),X=e=>e.classList.add("hydrated"),Y=(e,t,l)=>{if(t.A){const n=Object.entries(t.A),s=e.prototype;if(n.map((([e,[n]])=>{(31&n||2&l&&32&n)&&Object.defineProperty(s,e,{get(){return((e,t)=>te(this).F.get(t))(0,e)},set(l){((e,t,l,n)=>{const s=te(e),o=s.F.get(t),i=s.t,c=s.i;l=((e,t)=>null==e||w(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,n.A[t][0]),8&i&&void 0!==o||l===o||(s.F.set(t,l),c&&2==(18&i)&&z(s,!1))})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;s.attributeChangedCallback=function(e,t,n){f.jmp((()=>{const t=l.get(e);this.hasOwnProperty(t)&&(n=this[t],delete this[t]),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.L.push([e,s]),s}))}}return e},Z=(e,t={})=>{const l=[],n=t.exclude||[],s=c.customElements,o=r.head,i=o.querySelector("meta[charset]"),a=r.createElement("style"),d=[];let y,h=!0;Object.assign(f,t),f.l=new URL(t.resourcesUrl||"./",r.baseURI).href,e.map((e=>e[1].map((t=>{const o={t:t[0],$:t[1],A:t[2],H:t[3]};o.A=t[2],o.H=t[3],o.L=[];const i=o.$,c=class extends HTMLElement{constructor(e){super(e),ne(e=this,o),1&o.t&&e.attachShadow({mode:"open"})}connectedCallback(){y&&(clearTimeout(y),y=null),h?d.push(this):f.jmp((()=>(e=>{if(0==(1&f.t)){const t=te(e),l=t.T,n=()=>{};if(1&t.t)$(e,t,l.H);else{t.t|=1,12&l.t&&(e=>{const t=e["s-cr"]=r.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let l=e;for(;l=l.parentNode||l.host;)if(l["s-p"]){_(t,t.R=l);break}}l.A&&Object.entries(l.A).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=ce(l)).then){const e=()=>{};s=await s,e()}s.isProxied||(Y(s,l,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){oe(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=m(l);if(!re.has(t)){const n=()=>{};((e,t,l)=>{let n=re.get(e);u&&l?(n=n||new CSSStyleSheet,n.replace(t)):n=t,re.set(e,n)})(t,e,!!(1&l.t)),n()}}}const o=t.R,i=()=>z(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,l)}n()}})(this)))}disconnectedCallback(){f.jmp((()=>(()=>{if(0==(1&f.t)){const e=te(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),K(t,"disconnectedCallback")}})()))}componentOnReady(){return te(this).N}};o.U=e[0],n.includes(i)||s.get(i)||(l.push(i),s.define(i,Y(c,o,1)))})))),a.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",a.setAttribute("data-styles",""),o.insertBefore(a,i?i.nextSibling:o.firstChild),h=!1,d.length?d.map((e=>e.connectedCallback())):f.jmp((()=>y=setTimeout(J,30)))},ee=new WeakMap,te=e=>ee.get(e),le=(e,t)=>ee.set(t.i=e,t),ne=(e,t)=>{const l={t:0,C:e,T:t,F:new Map};return l.N=new Promise((e=>l.W=e)),e["s-p"]=[],e["s-rc"]=[],$(e,l,t.H),ee.set(e,l)},se=(e,t)=>t in e,oe=(e,t)=>(0,console.error)(e,t),ie=new Map,ce=e=>{const t=e.$.replace(/-/g,"_"),l=e.U,n=ie.get(l);return n?n[t]:import(`./${l}.entry.js`).then((e=>(ie.set(l,e),e[t])),oe)},re=new Map,fe=[],ae=[],ue=(e,t)=>l=>{e.push(l),i||(i=!0,t&&4&f.t?ye(de):f.raf(de))},$e=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){oe(e)}e.length=0},de=()=>{$e(fe),$e(ae),(i=fe.length>0)&&f.raf(de)},ye=e=>a().then(e),he=ue(ae,!0);export{g as H,Z as b,q as c,U as g,k as h,a as p,le as r}