@phatvu/web-component-poc 1.0.7 → 1.0.8

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 (50) hide show
  1. package/dist/cjs/{fast-input_4.cjs.entry.js → fast-button_6.cjs.entry.js} +112 -33
  2. package/dist/cjs/fast-carousel.cjs.entry.js +1 -1
  3. package/dist/cjs/{index-BEvZs91D.js → index-227GpI8K.js} +64 -0
  4. package/dist/cjs/job-card.cjs.entry.js +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/web-component-poc.cjs.js +2 -2
  7. package/dist/collection/collection-manifest.json +1 -0
  8. package/dist/collection/components/button/button.css +14 -14
  9. package/dist/collection/components/button/button.js +12 -24
  10. package/dist/collection/components/fast-form/fast-form.css +5 -0
  11. package/dist/collection/components/fast-form/fast-form.js +99 -0
  12. package/dist/collection/components/fast-input/fast-input.css +3 -13
  13. package/dist/collection/components/fast-input/fast-input.js +57 -33
  14. package/dist/collection/components/jobs-list-only/jobs-list-only.js +1 -1
  15. package/dist/collection/components/jobs-list-reactive/jobs-list-reactive.js +1 -1
  16. package/dist/components/fast-button.js +1 -1
  17. package/dist/components/fast-carousel.js +1 -1
  18. package/dist/components/fast-form.d.ts +11 -0
  19. package/dist/components/fast-form.js +1 -0
  20. package/dist/components/fast-input.js +1 -1
  21. package/dist/components/index.js +1 -1
  22. package/dist/components/job-card.js +1 -1
  23. package/dist/components/jobs-item.js +1 -1
  24. package/dist/components/jobs-list-only.js +1 -1
  25. package/dist/components/jobs-list-reactive.js +1 -1
  26. package/dist/components/p-Bb27ylcX.js +1 -0
  27. package/dist/components/{p-DQiaLjLf.js → p-CzgtwPsc.js} +1 -1
  28. package/dist/esm/{fast-input_4.entry.js → fast-button_6.entry.js} +111 -34
  29. package/dist/esm/fast-carousel.entry.js +1 -1
  30. package/dist/esm/{index-C_ZLQIpp.js → index-BqjrT3zA.js} +64 -0
  31. package/dist/esm/job-card.entry.js +1 -1
  32. package/dist/esm/loader.js +3 -3
  33. package/dist/esm/web-component-poc.js +3 -3
  34. package/dist/types/components/button/button.d.ts +1 -13
  35. package/dist/types/components/fast-form/fast-form.d.ts +10 -0
  36. package/dist/types/components/fast-input/fast-input.d.ts +3 -5
  37. package/dist/types/components.d.ts +35 -13
  38. package/dist/web-component-poc/{p-bef7c8e2.entry.js → p-14247159.entry.js} +1 -1
  39. package/dist/web-component-poc/{p-7d45772f.entry.js → p-309a490b.entry.js} +1 -1
  40. package/dist/web-component-poc/p-7ea9a87f.entry.js +1 -0
  41. package/dist/web-component-poc/{p-C_ZLQIpp.js → p-BqjrT3zA.js} +2 -2
  42. package/dist/web-component-poc/web-component-poc.esm.js +1 -1
  43. package/hydrate/index.js +136 -54
  44. package/hydrate/index.mjs +136 -54
  45. package/package.json +3 -3
  46. package/dist/cjs/fast-button.cjs.entry.js +0 -46
  47. package/dist/components/p-BiaJAQXY.js +0 -1
  48. package/dist/esm/fast-button.entry.js +0 -44
  49. package/dist/web-component-poc/p-618fba28.entry.js +0 -1
  50. package/dist/web-component-poc/p-cfb9aed9.entry.js +0 -1
@@ -0,0 +1,99 @@
1
+ import { h } from "@stencil/core";
2
+ export class FastForm {
3
+ el;
4
+ searchExecuted;
5
+ handleInputSubmit() {
6
+ this.submit();
7
+ }
8
+ async submit() {
9
+ const inputs = this.el.querySelectorAll('fast-input');
10
+ const params = {};
11
+ for (const input of Array.from(inputs)) {
12
+ const paramName = await input.getParamName();
13
+ const value = await input.getValue();
14
+ if (value) {
15
+ params[paramName] = value;
16
+ }
17
+ }
18
+ this.updateUrlParams(params);
19
+ document.dispatchEvent(new CustomEvent('search-executed', {
20
+ detail: params,
21
+ bubbles: true,
22
+ composed: true,
23
+ }));
24
+ this.searchExecuted.emit(params);
25
+ }
26
+ updateUrlParams(params) {
27
+ const urlParams = new URLSearchParams(window.location.search);
28
+ // Get all param names from inputs and clear them first
29
+ const inputs = this.el.querySelectorAll('fast-input');
30
+ for (const input of Array.from(inputs)) {
31
+ const paramName = input.paramName;
32
+ if (paramName) {
33
+ urlParams.delete(paramName);
34
+ }
35
+ }
36
+ // Set new values
37
+ for (const [key, value] of Object.entries(params)) {
38
+ if (value) {
39
+ urlParams.set(key, value);
40
+ }
41
+ }
42
+ const qs = urlParams.toString();
43
+ const newUrl = qs
44
+ ? `${window.location.pathname}?${qs}`
45
+ : window.location.pathname;
46
+ history.pushState({}, '', newUrl);
47
+ }
48
+ handleFormSubmit = (e) => {
49
+ e.preventDefault();
50
+ this.submit();
51
+ };
52
+ render() {
53
+ return (h("form", { key: '50436bb904e8b175ae0c23158812a4e4756544c0', class: "fast-form", onSubmit: this.handleFormSubmit }, h("slot", { key: '2f76c4c42c15ebf389d6e0fdbcb9a2098bf1156a' })));
54
+ }
55
+ static get is() { return "fast-form"; }
56
+ static get originalStyleUrls() {
57
+ return {
58
+ "$": ["fast-form.css"]
59
+ };
60
+ }
61
+ static get styleUrls() {
62
+ return {
63
+ "$": ["fast-form.css"]
64
+ };
65
+ }
66
+ static get events() {
67
+ return [{
68
+ "method": "searchExecuted",
69
+ "name": "searchExecuted",
70
+ "bubbles": true,
71
+ "cancelable": true,
72
+ "composed": true,
73
+ "docs": {
74
+ "tags": [],
75
+ "text": ""
76
+ },
77
+ "complexType": {
78
+ "original": "Record<string, string>",
79
+ "resolved": "string",
80
+ "references": {
81
+ "Record": {
82
+ "location": "global",
83
+ "id": "global::Record"
84
+ }
85
+ }
86
+ }
87
+ }];
88
+ }
89
+ static get elementRef() { return "el"; }
90
+ static get listeners() {
91
+ return [{
92
+ "name": "inputSubmit",
93
+ "method": "handleInputSubmit",
94
+ "target": undefined,
95
+ "capture": false,
96
+ "passive": false
97
+ }];
98
+ }
99
+ }
@@ -1,25 +1,15 @@
1
1
  .fast-input {
2
2
  position: relative;
3
- display: inline-flex;
4
- gap: 0.5rem;
3
+ display: inline-block;
5
4
  }
6
5
 
7
6
  .fast-input__field {
8
- flex: 1;
9
7
  padding: 0.5rem 0.75rem;
10
8
  font-size: 1rem;
11
9
  border: 1px solid #ccc;
12
10
  border-radius: 4px;
13
- }
14
-
15
- .fast-input__button {
16
- padding: 0.5rem 1rem;
17
- font-size: 1rem;
18
- cursor: pointer;
19
- background: #0070f3;
20
- color: #fff;
21
- border: none;
22
- border-radius: 4px;
11
+ width: 100%;
12
+ box-sizing: border-box;
23
13
  }
24
14
 
25
15
  .fast-input__dropdown {
@@ -1,4 +1,4 @@
1
- import { h } from "@stencil/core";
1
+ import { h, } from "@stencil/core";
2
2
  export class FastInput {
3
3
  placeholder = 'Search...';
4
4
  value = '';
@@ -8,7 +8,7 @@ export class FastInput {
8
8
  targetPath;
9
9
  debounceMs = 300;
10
10
  minChars = 3;
11
- searchExecuted;
11
+ inputSubmit;
12
12
  inputChanged;
13
13
  inputValue = '';
14
14
  suggestions = [];
@@ -16,6 +16,12 @@ export class FastInput {
16
16
  autocompleteLoading = false;
17
17
  debounceTimer;
18
18
  popstateHandler;
19
+ async getValue() {
20
+ return this.inputValue;
21
+ }
22
+ async getParamName() {
23
+ return this.paramName;
24
+ }
19
25
  connectedCallback() {
20
26
  const urlValue = this.getUrlParam();
21
27
  this.inputValue = urlValue !== null ? urlValue : this.value;
@@ -32,30 +38,6 @@ export class FastInput {
32
38
  const params = new URLSearchParams(window.location.search);
33
39
  return params.get(this.paramName);
34
40
  }
35
- updateUrlParam(value) {
36
- const params = new URLSearchParams(window.location.search);
37
- if (value) {
38
- params.set(this.paramName, value);
39
- }
40
- else {
41
- params.delete(this.paramName);
42
- }
43
- const qs = params.toString();
44
- const newUrl = qs
45
- ? `${window.location.pathname}?${qs}`
46
- : window.location.pathname;
47
- history.pushState({}, '', newUrl);
48
- }
49
- submit() {
50
- this.updateUrlParam(this.inputValue);
51
- document.dispatchEvent(new CustomEvent('search-executed', {
52
- detail: { keyword: this.inputValue },
53
- bubbles: true,
54
- composed: true,
55
- }));
56
- this.searchExecuted.emit({ keyword: this.inputValue });
57
- this.showDropdown = false;
58
- }
59
41
  handleInput = (e) => {
60
42
  const value = e.target.value;
61
43
  this.inputValue = value;
@@ -66,7 +48,9 @@ export class FastInput {
66
48
  };
67
49
  handleKeydown = (e) => {
68
50
  if (e.key === 'Enter') {
69
- this.submit();
51
+ e.preventDefault();
52
+ this.showDropdown = false;
53
+ this.inputSubmit.emit();
70
54
  }
71
55
  else if (e.key === 'Escape') {
72
56
  this.showDropdown = false;
@@ -112,10 +96,12 @@ export class FastInput {
112
96
  selectSuggestion(title) {
113
97
  this.inputValue = title;
114
98
  this.showDropdown = false;
115
- this.submit();
99
+ this.inputSubmit.emit();
116
100
  }
117
101
  render() {
118
- return (h("div", { key: '3a9d31c7b109205600addc326d63979585f10bcd', class: "fast-input" }, h("input", { key: '8f238fe9e002f367d4939616be8c06d938d76045', type: "text", class: "fast-input__field", placeholder: this.placeholder, value: this.inputValue, onInput: this.handleInput, onKeyDown: this.handleKeydown, onBlur: this.handleBlur }), h("button", { key: '7b7404f13432750ece669da8ce68be15179921de', class: "fast-input__button", type: "button", onClick: () => this.submit() }, "Search"), this.enableAutocomplete && this.showDropdown && (h("ul", { key: '1438bacadc21c183842a8bdaa3f336bffb152e14', class: "fast-input__dropdown" }, this.autocompleteLoading ? (h("li", { class: "fast-input__dropdown-loading" }, "Loading...")) : (this.suggestions.map(s => (h("li", { class: "fast-input__dropdown-item", onMouseDown: e => { e.preventDefault(); }, onClick: () => this.selectSuggestion(s.title) }, s.title))))))));
102
+ return (h("div", { key: 'ea03f3dd68d0da4fc30cbc18a1ef66b5974a4f89', class: "fast-input" }, h("input", { key: '31d85c4c90dde0e10ea9424b960c5e4f4a3ca54a', type: "text", class: "fast-input__field", placeholder: this.placeholder, value: this.inputValue, onInput: this.handleInput, onKeyDown: this.handleKeydown, onBlur: this.handleBlur }), this.enableAutocomplete && this.showDropdown && (h("ul", { key: '0de6fd68709d906bafd2fec684f0a73045be3705', class: "fast-input__dropdown" }, this.autocompleteLoading ? (h("li", { class: "fast-input__dropdown-loading" }, "Loading...")) : (this.suggestions.map(s => (h("li", { class: "fast-input__dropdown-item", onMouseDown: e => {
103
+ e.preventDefault();
104
+ }, onClick: () => this.selectSuggestion(s.title) }, s.title))))))));
119
105
  }
120
106
  static get is() { return "fast-input"; }
121
107
  static get originalStyleUrls() {
@@ -301,8 +287,8 @@ export class FastInput {
301
287
  }
302
288
  static get events() {
303
289
  return [{
304
- "method": "searchExecuted",
305
- "name": "searchExecuted",
290
+ "method": "inputSubmit",
291
+ "name": "inputSubmit",
306
292
  "bubbles": true,
307
293
  "cancelable": true,
308
294
  "composed": true,
@@ -311,8 +297,8 @@ export class FastInput {
311
297
  "text": ""
312
298
  },
313
299
  "complexType": {
314
- "original": "{ keyword: string }",
315
- "resolved": "{ keyword: string; }",
300
+ "original": "void",
301
+ "resolved": "void",
316
302
  "references": {}
317
303
  }
318
304
  }, {
@@ -332,4 +318,42 @@ export class FastInput {
332
318
  }
333
319
  }];
334
320
  }
321
+ static get methods() {
322
+ return {
323
+ "getValue": {
324
+ "complexType": {
325
+ "signature": "() => Promise<string>",
326
+ "parameters": [],
327
+ "references": {
328
+ "Promise": {
329
+ "location": "global",
330
+ "id": "global::Promise"
331
+ }
332
+ },
333
+ "return": "Promise<string>"
334
+ },
335
+ "docs": {
336
+ "text": "",
337
+ "tags": []
338
+ }
339
+ },
340
+ "getParamName": {
341
+ "complexType": {
342
+ "signature": "() => Promise<string>",
343
+ "parameters": [],
344
+ "references": {
345
+ "Promise": {
346
+ "location": "global",
347
+ "id": "global::Promise"
348
+ }
349
+ },
350
+ "return": "Promise<string>"
351
+ },
352
+ "docs": {
353
+ "text": "",
354
+ "tags": []
355
+ }
356
+ }
357
+ };
358
+ }
335
359
  }
@@ -130,7 +130,7 @@ export class JobsListOnly {
130
130
  : (this.totalJob || jobsArray.length);
131
131
  const showNoResults = !loading && totalJob === 0 && !this.showSuggestions;
132
132
  const showSuggestionsBlock = !loading && totalJob === 0 && this.showSuggestions;
133
- return (h("div", { key: '1116855473d28d650641b9d962243bfcdcb434ec', class: `jobs-list-root ${this.rootClass}`.trim() }, h("div", { key: 'fcef04f1da9ad4e150af9f59921688f5781d9d43', class: "results-container" }, this.autoFetch && this.fetchLoading && (h("div", { key: '75b157c82c89691c7ce73d12ea0144b3b45485c3', class: "jobs-list-only__loading" }, "Loading...")), h("div", { key: 'b09f9879e10ee4a93e32177611912da5f19f3526', class: loading ? 'loader' : 'loader hide', "aria-hidden": !loading }), totalJob > 0 && this.showCountText && (h("p", { key: 'd10f800fb0a33d82531d5f1728bac4ceba2ed577', class: "jobs-list-only__count" }, this.renderCountText(jobsArray.length, totalJob))), totalJob > 0 && (h("div", { key: '18153ed1338bd48f7be4f043b11ce15e3271f27b', class: "card" }, h("ul", { key: '766e128b1fd5adb456530ae39e92ba8eb0b5d6cf', class: "results-list front" }, jobsArray.map((job, index) => this.renderJobItem(job, index))))), showNoResults && (h("div", { key: 'ed6f3d2bd2bbedabd6e69d508ea1425580e6941f', class: "share-jobs__no-results" }, h("h2", { key: '2302656e33340c69e84cb949afb7256b8f35f440' }, this.noResultsLine1), h("h3", { key: '1c7e6642441a96c04ee26883fdec4f81b0fe6cec' }, this.noResultsLine2))), showSuggestionsBlock && (h("div", { key: 'be7af85f64455918545e88952ca6ff00f0a970c5', class: "card primary-color" }, h("h4", { key: '2f63deb8131190eff882308544b15f767b6f3edc', class: "result-suggestions-title" }, this.clearResultSuggestionsTitleText, ":"), h("ul", { key: 'cb18daaa9e2c2c442c5b906ed370dcd653b5262d', class: "results-list front" }, h("li", { key: 'ff1d5c6518b75c0daa35b43df7162b0dfecde25e', class: "result-suggestions-line" }, this.clearResultSuggestionsLine1), h("li", { key: '4099fd7bf8dcf114eca28702a498ab0938f5de46', class: "result-suggestions-line" }, this.clearResultSuggestionsLine2), h("li", { key: 'fb65b54c3c0b14bc58112977eb4c7c56c1246a45', class: "result-suggestions-line" }, this.clearResultSuggestionsLine3), this.clearResultSuggestionsLine4 && (h("li", { key: '10f745e74cf68a2b1c42e6f49f810a8b59eb27b6', class: "result-suggestions-line" }, this.clearResultSuggestionsLine4))))))));
133
+ return (h("div", { key: '1974ecb7e1ded8237d851560fc4b20dd63b4e941', class: `jobs-list-root ${this.rootClass}`.trim() }, h("div", { key: '3d80283e8508cbe9ec4aa4516a6f832479374e08', class: "results-container" }, this.autoFetch && this.fetchLoading && (h("div", { key: 'c5d3c5362a10ce2442925093118d3436227e8058', class: "jobs-list-only__loading" }, "Loading...")), h("div", { key: 'c68e5aebee17cce16947029031b63364ab25ecda', class: loading ? 'loader' : 'loader hide', "aria-hidden": !loading }), totalJob > 0 && this.showCountText && (h("p", { key: 'e353fa146040fed1aed050ed3ed833903efcdf41', class: "jobs-list-only__count" }, this.renderCountText(jobsArray.length, totalJob))), totalJob > 0 && (h("div", { key: 'e38346f641a1e776a7e70525bf8f3a6a38b6eea5', class: "card" }, h("ul", { key: 'db82d99df76e33ad6041d4ec8dd7908cdf8b89d7', class: "results-list front" }, jobsArray.map((job, index) => this.renderJobItem(job, index))))), showNoResults && (h("div", { key: '8bd8f45ddb9fcd534c7f386919c1e6cd7a4fb6f3', class: "share-jobs__no-results" }, h("h2", { key: '228d32e9dd38f61bcec9f522d3bc4207e17b5365' }, this.noResultsLine1), h("h3", { key: '4289b10974936669a00afba6f1d55e33874198b1' }, this.noResultsLine2))), showSuggestionsBlock && (h("div", { key: '949e1fe01b2db39a69729a9fbc2eebaf2ea461ba', class: "card primary-color" }, h("h4", { key: 'af3361f98987a3a19d45afc1174a99fc4174a65a', class: "result-suggestions-title" }, this.clearResultSuggestionsTitleText, ":"), h("ul", { key: 'd7b9236dbbeb9f9596d642aa588d1c1305ed658b', class: "results-list front" }, h("li", { key: '0e65c9b985e5708096c8a4b0ea1455b6696db6dd', class: "result-suggestions-line" }, this.clearResultSuggestionsLine1), h("li", { key: 'a7fe8459960af60acc81822b48436a32c0e4ad0c', class: "result-suggestions-line" }, this.clearResultSuggestionsLine2), h("li", { key: '1e41d5730de755d6b2cb9e5fbda33704816f9096', class: "result-suggestions-line" }, this.clearResultSuggestionsLine3), this.clearResultSuggestionsLine4 && (h("li", { key: '9ab1bee87135bfda9996b2c99134597475bfaecb', class: "result-suggestions-line" }, this.clearResultSuggestionsLine4))))))));
134
134
  }
135
135
  static get is() { return "jobs-list-only"; }
136
136
  static get originalStyleUrls() {
@@ -92,7 +92,7 @@ export class JobsListReactive {
92
92
  });
93
93
  }
94
94
  render() {
95
- return h("slot", { key: '30a6fe9727eb877b6aafb99072c40811df121ba6' });
95
+ return h("slot", { key: '9f3ab802e19a298a790cfb5e86a4f4888e466804' });
96
96
  }
97
97
  static get is() { return "jobs-list-reactive"; }
98
98
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- import{t,p as o,H as e,c as n,h as s}from"./p-BiaJAQXY.js";const u=o(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.buttonClick=n(this,"buttonClick")}variant="primary";type="button";disabled=!1;buttonClick;handleClick=t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.buttonClick.emit(t)};render(){return s("button",{key:"3b74909afe4e305dfd38f0b07657202e3d5bfccd",type:this.type,class:{"custom-button":!0,["custom-button--"+this.variant]:!0,"custom-button--disabled":this.disabled},disabled:this.disabled,onClick:this.handleClick},s("slot",{key:"49845d350e4665c5c66e30bd9262f788eaaa1e20"}))}static get style(){return":host{display:inline-block}.custom-button{display:inline-flex;align-items:center;justify-content:center;padding:0.5rem 1rem;font-family:inherit;font-size:0.875rem;font-weight:500;line-height:1.25;border:none;border-radius:0.375rem;cursor:pointer;transition:background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease}.custom-button:focus{outline:2px solid var(--custom-button-focus-ring, #2563eb);outline-offset:2px}.custom-button:focus:not(:focus-visible){outline:none}.custom-button--primary{background-color:var(--custom-button-primary-bg, #2563eb);color:var(--custom-button-primary-color, #fff)}.custom-button--primary:hover:not(.custom-button--disabled){background-color:var(--custom-button-primary-hover-bg, #1d4ed8)}.custom-button--primary:active:not(.custom-button--disabled){background-color:var(--custom-button-primary-active-bg, #1e40af)}.custom-button--secondary{background-color:var(--custom-button-secondary-bg, #e5e7eb);color:var(--custom-button-secondary-color, #1f2937)}.custom-button--secondary:hover:not(.custom-button--disabled){background-color:var(--custom-button-secondary-hover-bg, #d1d5db)}.custom-button--secondary:active:not(.custom-button--disabled){background-color:var(--custom-button-secondary-active-bg, #9ca3af)}.custom-button--text{background-color:transparent;color:var(--custom-button-text-color, #2563eb)}.custom-button--text:hover:not(.custom-button--disabled){background-color:var(--custom-button-text-hover-bg, rgba(37, 99, 235, 0.08))}.custom-button--text:active:not(.custom-button--disabled){background-color:var(--custom-button-text-active-bg, rgba(37, 99, 235, 0.12))}.custom-button--disabled,.custom-button:disabled{opacity:0.6;cursor:not-allowed}"}},[772,"fast-button",{variant:[1],type:[1],disabled:[4]}]);function c(){"undefined"!=typeof customElements&&["fast-button"].forEach((o=>{"fast-button"===o&&(customElements.get(t(o))||customElements.define(t(o),u))}))}c();const r=u,a=c;export{r as FastButton,a as defineCustomElement}
1
+ import{t,p as o,H as a,c as s,h as n}from"./p-Bb27ylcX.js";const e=o(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.buttonClick=s(this,"buttonClick")}variant="primary";type="submit";disabled=!1;buttonClick;handleClick=t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.buttonClick.emit(t)};render(){return n("button",{key:"b8e811748ade97c941bdf197a311d69d2801a120",type:this.type,class:{"fast-button":!0,["fast-button--"+this.variant]:!0,"fast-button--disabled":this.disabled},disabled:this.disabled,onClick:this.handleClick},n("slot",{key:"a6b987059cc33799abd580ea11f0fe644a3973bf"}))}static get style(){return":host{display:inline-block}.fast-button{display:inline-flex;align-items:center;justify-content:center;padding:0.5rem 1rem;font-family:inherit;font-size:0.875rem;font-weight:500;line-height:1.25;border:none;border-radius:0.375rem;cursor:pointer;transition:background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease}.fast-button:focus{outline:2px solid var(--custom-button-focus-ring, #2563eb);outline-offset:2px}.fast-button:focus:not(:focus-visible){outline:none}.fast-button--primary{background-color:var(--custom-button-primary-bg, #2563eb);color:var(--custom-button-primary-color, #fff)}.fast-button--primary:hover:not(.fast-button--disabled){background-color:var(--custom-button-primary-hover-bg, #1d4ed8)}.fast-button--primary:active:not(.fast-button--disabled){background-color:var(--custom-button-primary-active-bg, #1e40af)}.fast-button--secondary{background-color:var(--custom-button-secondary-bg, #e5e7eb);color:var(--custom-button-secondary-color, #1f2937)}.fast-button--secondary:hover:not(.fast-button--disabled){background-color:var(--custom-button-secondary-hover-bg, #d1d5db)}.fast-button--secondary:active:not(.fast-button--disabled){background-color:var(--custom-button-secondary-active-bg, #9ca3af)}.fast-button--text{background-color:transparent;color:var(--custom-button-text-color, #2563eb)}.fast-button--text:hover:not(.fast-button--disabled){background-color:var(--custom-button-text-hover-bg, rgba(37, 99, 235, 0.08))}.fast-button--text:active:not(.fast-button--disabled){background-color:var(--custom-button-text-active-bg, rgba(37, 99, 235, 0.12))}.fast-button--disabled,.fast-button:disabled{opacity:0.6;cursor:not-allowed}"}},[772,"fast-button",{variant:[1],type:[1],disabled:[4]}]);function r(){"undefined"!=typeof customElements&&["fast-button"].forEach((o=>{"fast-button"===o&&(customElements.get(t(o))||customElements.define(t(o),e))}))}r();const b=e,u=r;export{b as FastButton,u as defineCustomElement}
@@ -1 +1 @@
1
- import{t as n,p as t,H as e,h as o}from"./p-BiaJAQXY.js";function r(n){return"number"==typeof n}function i(n){return"string"==typeof n}function s(n){return"boolean"==typeof n}function c(n){return"[object Object]"===Object.prototype.toString.call(n)}function u(n){return Math.abs(n)}function l(n){return Math.sign(n)}function a(n,t){return u(n-t)}function d(n){return m(n).map(Number)}function f(n){return n[h(n)]}function h(n){return Math.max(0,n.length-1)}function p(n,t){return t===h(n)}function g(n,t=0){return Array.from(Array(n),((n,e)=>t+e))}function m(n){return Object.keys(n)}function b(n,t){return[n,t].reduce(((n,t)=>(m(t).forEach((e=>{const o=n[e],r=t[e],i=c(o)&&c(r);n[e]=i?b(o,r):r})),n)),{})}function y(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function v(){let n=[];const t={add:function(e,o,r,i={passive:!0}){let s;if("addEventListener"in e)e.addEventListener(o,r,i),s=()=>e.removeEventListener(o,r,i);else{const n=e;n.addListener(r),s=()=>n.removeListener(r)}return n.push(s),t},clear:function(){n=n.filter((n=>n()))}};return t}function x(n=0,t=0){const e=u(n-t);function o(t){return t<n}function r(n){return n>t}function i(n){return o(n)||r(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?o(e)?n:t:e},reachedAny:i,reachedMax:r,reachedMin:o,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function _(n,t,e){const{constrain:o}=x(0,n),r=n+1;let i=s(t);function s(n){return e?u((r+n)%r):o(n)}function c(){return i}function l(){return _(n,c(),e)}const a={get:c,set:function(n){return i=s(n),a},add:function(n){return l().set(c()+n)},clone:l};return a}function k(n,t,e,o,r,i,c,d,f,h,p,g,m,b,_,k,w,S,C){const{cross:E,direction:L}=n,I=["INPUT","SELECT","TEXTAREA"],M={passive:!1},T=v(),A=v(),N=x(50,225).constrain(b.measure(20)),R={mouse:300,touch:400},z={mouse:500,touch:600},B=_?43:25;let O=!1,j=0,F=0,D=!1,P=!1,H=!1,G=!1;function V(n){if(!y(n,o)&&n.touches.length>=2)return W(n);const t=i.readPoint(n),e=i.readPoint(n,E),s=a(t,j),c=a(e,F);if(!P&&!G){if(!n.cancelable)return W(n);if(P=s>c,!P)return W(n)}const u=i.pointerMove(n);s>k&&(H=!0),h.useFriction(.3).useDuration(.75),d.start(),r.add(L(u)),n.preventDefault()}function W(n){const t=p.byDistance(0,!1).index!==g.get(),e=i.pointerUp(n)*(_?z:R)[G?"mouse":"touch"],o=function(n,t){const e=g.add(-1*l(n)),o=p.byDistance(n,!_).distance;return _||u(n)<N?o:w&&t?.5*o:p.byIndex(e.get(),0).distance}(L(e),t),r=function(n,t){if(0===n||0===t)return 0;if(u(n)<=u(t))return 0;const e=a(u(n),u(t));return u(e/n)}(e,o),s=B-10*r,c=S+r/50;P=!1,D=!1,A.clear(),h.useDuration(s).useFriction(c),f.distance(o,!_),G=!1,m.emit("pointerUp")}function Q(n){H&&(n.stopPropagation(),n.preventDefault(),H=!1)}return{init:function(n){if(!C)return;function u(u){(s(C)||C(n,u))&&function(n){const s=y(n,o);G=s,H=_&&s&&!n.buttons&&O,O=a(r.get(),c.get())>=2,s&&0!==n.button||function(n){return I.includes(n.nodeName||"")}(n.target)||(D=!0,i.pointerDown(n),h.useFriction(0).useDuration(0),r.set(c),function(){const n=G?e:t;A.add(n,"touchmove",V,M).add(n,"touchend",W).add(n,"mousemove",V,M).add(n,"mouseup",W)}(),j=i.readPoint(n),F=i.readPoint(n,E),m.emit("pointerDown"))}(u)}const l=t;T.add(l,"dragstart",(n=>n.preventDefault()),M).add(l,"touchmove",(()=>{}),M).add(l,"touchend",(()=>{})).add(l,"touchstart",u).add(l,"mousedown",u).add(l,"touchcancel",W).add(l,"contextmenu",W).add(l,"click",Q,!0)},destroy:function(){T.clear(),A.clear()},pointerDown:function(){return D}}}function w(n,t){let e,o;function r(n){return n.timeStamp}function i(e,o){const r="client"+("x"===(o||n.scroll)?"X":"Y");return(y(e,t)?e:e.touches[0])[r]}return{pointerDown:function(n){return e=n,o=n,i(n)},pointerMove:function(n){const t=i(n)-i(o),s=r(n)-r(e)>170;return o=n,s&&(e=n),t},pointerUp:function(n){if(!e||!o)return 0;const t=i(o)-i(e),s=r(n)-r(e),c=r(n)-r(o)>170,l=t/s;return s&&!c&&u(l)>.1?l:0},readPoint:i}}function S(n,t,e,o,r,i,c){const l=[n].concat(o);let a,d,f=[],h=!1;function p(n){return r.measureSize(c.measure(n))}return{init:function(r){i&&(d=p(n),f=o.map(p),a=new ResizeObserver((e=>{(s(i)||i(r,e))&&function(e){for(const i of e){if(h)return;const e=i.target===n,s=o.indexOf(i.target),c=e?d:f[s];if(u(p(e?n:o[s])-c)>=.5){r.reInit(),t.emit("resize");break}}}(e)})),e.requestAnimationFrame((()=>{l.forEach((n=>a.observe(n)))})))},destroy:function(){h=!0,a&&a.disconnect()}}}function C(n,t,e,o,r){const i=r.measure(10),s=r.measure(50),c=x(.1,.99);let l=!1;function a(){return!l&&!!n.reachedAny(e.get())&&!!n.reachedAny(t.get())}return{shouldConstrain:a,constrain:function(r){if(!a())return;const l=n.reachedMin(t.get())?"min":"max",d=u(n[l]-t.get()),f=e.get()-t.get(),h=c.constrain(d/s);e.subtract(f*h),!r&&u(f)<i&&(e.set(n.constrain(e.get())),o.useDuration(25).useBaseFriction())},toggleActive:function(n){l=!n}}}function E(n,t,e,o){const r=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:c}=x(r,i);return{loop:function(t){if(!function(n){return 1===n?c(e.get()):-1===n&&s(e.get())}(t))return;const r=n*(-1*t);o.forEach((n=>n.add(r)))}}}function L(n){let t=n;function e(n){return r(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function I(n,t){const e="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},o=t.style;let r=null,i=!1;return{clear:function(){i||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const s=function(n){return Math.round(100*n)/100}(n.direction(t));s!==r&&(o.transform=e(s),r=s)},toggleActive:function(n){i=!n}}}function M(n,t,e,o,r,i,s,c,u){const l=d(r),a=p(h(d(r).reverse(),s[0]),e,!1).concat(p(h(l,t-s[0]-1),-e,!0));function f(n,t){return n.reduce(((n,t)=>n-r[t]),t)}function h(n,t){return n.reduce(((n,e)=>f(n,t)>0?n.concat([e]):n),[])}function p(r,s,l){const a=function(n){return i.map(((e,r)=>({start:e-o[r]+.5+n,end:e+t-.5+n})))}(s);return r.map((t=>{const o=l?0:-e,r=l?e:0,i=a[t][l?"end":"start"];return{index:t,loopPoint:i,slideLocation:L(-1),translate:I(n,u[t]),target:()=>c.get()>i?o:r}}))}return{canLoop:function(){return a.every((({index:n})=>f(l.filter((t=>t!==n)),t)<=.1))},clear:function(){a.forEach((n=>n.translate.clear()))},loop:function(){a.forEach((n=>{const{target:t,translate:e,slideLocation:o}=n,r=t();r!==o.get()&&(e.to(r),o.set(r))}))},loopPoints:a}}function T(n,t,e){let o,r=!1;return{init:function(i){e&&(o=new MutationObserver((n=>{r||(s(e)||e(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)})),o.observe(n,{childList:!0}))},destroy:function(){o&&o.disconnect(),r=!0}}}function A(n,t,e,o,c,b,y){const{align:A,axis:N,direction:R,startIndex:z,loop:B,duration:O,dragFree:j,dragThreshold:F,inViewThreshold:D,slidesToScroll:P,skipSnaps:H,containScroll:G,watchResize:V,watchSlides:W,watchDrag:Q,watchFocus:U}=b,X={measure:function(n){const{offsetTop:t,offsetLeft:e,offsetWidth:o,offsetHeight:r}=n;return{top:t,right:e+o,bottom:t+r,left:e,width:o,height:r}}},q=X.measure(t),J=e.map(X.measure),Y=function(n,t){const e="rtl"===t,o="y"===n,r=!o&&e?-1:1;return{scroll:o?"y":"x",cross:o?"x":"y",startEdge:o?"top":e?"right":"left",endEdge:o?"bottom":e?"left":"right",measureSize:function(n){const{height:t,width:e}=n;return o?t:e},direction:function(n){return n*r}}}(N,R),$=Y.measureSize(q),K=function(n){return{measure:function(t){return n*(t/100)}}}($),Z=function(n,t){const e={start:function(){return 0},center:function(n){return o(n)/2},end:o};function o(n){return t-n}return{measure:function(o,r){return i(n)?e[n](o):n(t,o,r)}}}(A,$),nn=!B&&!!G,tn=B||!!G,{slideSizes:en,slideSizesWithGaps:on,startGap:rn,endGap:sn}=function(n,t,e,o,r,i){const{measureSize:s,startEdge:c,endEdge:l}=n,a=e[0]&&r,d=a?u(t[c]-e[0][c]):0,h=function(){if(!a)return 0;const n=i.getComputedStyle(f(o));return parseFloat(n.getPropertyValue("margin-"+l))}(),g=e.map(s),m=e.map(((n,t,e)=>{const o=!t,r=p(e,t);return o?g[t]+d:r?g[t]+h:e[t+1][c]-n[c]})).map(u);return{slideSizes:g,slideSizesWithGaps:m,startGap:d,endGap:h}}(Y,q,J,e,tn,c),cn=function(n,t,e,o,i,s,c,l,a){const{startEdge:p,endEdge:g,direction:m}=n,b=r(e);return{groupSlides:function(n){return b?function(n,t){return d(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,e):function(n){return n.length?d(n).reduce(((e,r,d)=>{const b=f(e)||0,y=0===b,v=r===h(n),x=i[p]-s[b][p],_=i[p]-s[r][g],k=!o&&y?m(c):0,w=u(_-(!o&&v?m(l):0)-(x+k));return d&&w>t+a&&e.push(r),v&&e.push(n.length),e}),[]).map(((t,e,o)=>n.slice(Math.max(o[e-1]||0),t))):[]}(n)}}}(Y,$,P,B,q,J,rn,sn,2),{snaps:un,snapsAligned:ln}=function(n,t,e,o,r){const{startEdge:i,endEdge:s}=n,{groupSlides:c}=r,l=c(o).map((n=>f(n)[s]-n[0][i])).map(u).map(t.measure),a=o.map((n=>e[i]-n[i])).map((n=>-u(n))),d=c(a).map((n=>n[0])).map(((n,t)=>n+l[t]));return{snaps:a,snapsAligned:d}}(Y,Z,q,J,cn),an=-f(un)+f(on),{snapsContained:dn,scrollContainLimit:fn}=function(n,t,e,o){const r=x(-t+n,0),i=e.map(((n,t)=>{const{min:o,max:i}=r,s=r.constrain(n),u=!t,l=p(e,t);return u?i:l||c(o,s)?o:c(i,s)?i:s})).map((n=>parseFloat(n.toFixed(3)))),s=function(){const n=i[0],t=f(i);return x(i.lastIndexOf(n),i.indexOf(t)+1)}();function c(n,t){return a(n,t)<=1}return{snapsContained:function(){if(t<=n+2)return[r.max];if("keepSnaps"===o)return i;const{min:e,max:c}=s;return i.slice(e,c)}(),scrollContainLimit:s}}($,an,ln,G),hn=nn?dn:ln,{limit:pn}=function(n,t,e){const o=t[0];return{limit:x(e?o-n:f(t),o)}}(an,hn,B),gn=_(h(hn),z,B),mn=gn.clone(),bn=d(e),yn=function(n,t,e,o){const r=v(),i=1e3/60;let s=null,c=0,u=0;function l(n){if(!u)return;s||(s=n,e(),e());const r=n-s;for(s=n,c+=r;c>=i;)e(),c-=i;o(c/i),u&&(u=t.requestAnimationFrame(l))}function a(){t.cancelAnimationFrame(u),s=null,c=0,u=0}return{init:function(){r.add(n,"visibilitychange",(()=>{n.hidden&&(s=null,c=0)}))},destroy:function(){a(),r.clear()},start:function(){u||(u=t.requestAnimationFrame(l))},stop:a,update:e,render:o}}(o,c,(()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:o}})=>{o||e.constrain(n.pointerDown()),t.seek()})(Nn)),(n=>(({scrollBody:n,translate:t,location:e,offsetLocation:o,previousLocation:r,scrollLooper:i,slideLooper:s,dragHandler:c,animation:u,eventHandler:l,scrollBounds:a,options:{loop:d}},f)=>{const h=n.settled(),p=!a.shouldConstrain(),g=d?h:h&&p,m=g&&!c.pointerDown();m&&u.stop();const b=e.get()*f+r.get()*(1-f);o.set(b),d&&(i.loop(n.direction()),s.loop()),t.to(o.get()),m&&l.emit("settle"),g||l.emit("scroll")})(Nn,n))),vn=hn[gn.get()],xn=L(vn),_n=L(vn),kn=L(vn),wn=L(vn),Sn=function(n,t,e,o,r){let i=0,s=0,c=r,a=.68,d=n.get(),f=0;function h(n){return c=n,g}function p(n){return a=n,g}const g={direction:function(){return s},duration:function(){return c},velocity:function(){return i},seek:function(){const t=o.get()-n.get();let r=0;return c?(e.set(n),i+=t/c,i*=a,d+=i,n.add(i),r=d-f):(i=0,e.set(o),n.set(o),r=t),s=l(r),f=d,g},settled:function(){return u(o.get()-t.get())<.001},useBaseFriction:function(){return p(.68)},useBaseDuration:function(){return h(r)},useFriction:p,useDuration:h};return g}(xn,kn,_n,wn,O),Cn=function(n,t,e,o,r){const{reachedAny:i,removeOffset:s,constrain:c}=o;function a(n){return n.concat().sort(((n,t)=>u(n)-u(t)))[0]}function d(t,o){const r=[t,t+e,t-e];if(!n)return t;if(!o)return a(r);const i=r.filter((n=>l(n)===o));return i.length?a(i):f(r)-e}return{byDistance:function(e,o){const l=r.get()+e,{index:a,distance:f}=function(e){const o=n?s(e):c(e),r=t.map(((n,t)=>({diff:d(n-o,0),index:t}))).sort(((n,t)=>u(n.diff)-u(t.diff))),{index:i}=r[0];return{index:i,distance:o}}(l),h=!n&&i(l);return!o||h?{index:a,distance:e}:{index:a,distance:e+d(t[a]-f,0)}},byIndex:function(n,e){return{index:n,distance:d(t[n]-r.get(),e)}},shortcut:d}}(B,hn,an,pn,wn),En=function(n,t,e,o,r,i,s){function c(r){const c=r.distance,u=r.index!==t.get();i.add(c),c&&(o.duration()?n.start():(n.update(),n.render(1),n.update())),u&&(e.set(t.get()),t.set(r.index),s.emit("select"))}return{distance:function(n,t){c(r.byDistance(n,t))},index:function(n,e){const o=t.clone().set(n);c(r.byIndex(o.get(),e))}}}(yn,gn,mn,Sn,Cn,wn,y),Ln=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(pn),In=v(),Mn=function(n,t,e,o){const r={};let i,s=null,c=null,u=!1;return{init:function(){i=new IntersectionObserver((n=>{u||(n.forEach((n=>{const e=t.indexOf(n.target);r[e]=n})),s=null,c=null,e.emit("slidesInView"))}),{root:n.parentElement,threshold:o}),t.forEach((n=>i.observe(n)))},destroy:function(){i&&i.disconnect(),u=!0},get:function(n=!0){if(n&&s)return s;if(!n&&c)return c;const t=function(n){return m(r).reduce(((t,e)=>{const o=parseInt(e),{isIntersecting:i}=r[o];return(n&&i||!n&&!i)&&t.push(o),t}),[])}(n);return n&&(s=t),n||(c=t),t}}}(t,e,y,D),{slideRegistry:Tn}=function(n,t,e,o,r,i){const{groupSlides:s}=r,{min:c,max:u}=o;return{slideRegistry:function(){const o=s(i);return 1===e.length?[i]:n&&"keepSnaps"!==t?o.slice(c,u).map(((n,t,e)=>{const o=!t,r=p(e,t);return o?g(f(e[0])+1):r?g(h(i)-f(e)[0]+1,f(e)[0]):n})):o}()}}(nn,G,hn,fn,cn,bn),An=function(n,t,e,o,i,c,u,l){const a={passive:!0,capture:!0};let d=0;function f(n){"Tab"===n.code&&(d=(new Date).getTime())}return{init:function(h){l&&(c.add(document,"keydown",f,!1),t.forEach(((t,f)=>{c.add(t,"focus",(t=>{(s(l)||l(h,t))&&function(t){if((new Date).getTime()-d>10)return;u.emit("slideFocusStart"),n.scrollLeft=0;const s=e.findIndex((n=>n.includes(t)));r(s)&&(i.useDuration(0),o.index(s,0),u.emit("slideFocus"))}(f)}),a)})))}}}(n,e,Tn,En,Sn,In,y,U),Nn={ownerDocument:o,ownerWindow:c,eventHandler:y,containerRect:q,slideRects:J,animation:yn,axis:Y,dragHandler:k(Y,n,o,c,wn,w(Y,c),xn,yn,En,Sn,Cn,gn,y,K,j,F,H,.68,Q),eventStore:In,percentOfView:K,index:gn,indexPrevious:mn,limit:pn,location:xn,offsetLocation:kn,previousLocation:_n,options:b,resizeHandler:S(t,y,c,e,Y,V,X),scrollBody:Sn,scrollBounds:C(pn,kn,wn,Sn,K),scrollLooper:E(an,pn,kn,[xn,kn,_n,wn]),scrollProgress:Ln,scrollSnapList:hn.map(Ln.get),scrollSnaps:hn,scrollTarget:Cn,scrollTo:En,slideLooper:M(Y,$,an,en,on,un,hn,kn,e),slideFocus:An,slidesHandler:T(t,y,W),slidesInView:Mn,slideIndexes:bn,slideRegistry:Tn,slidesToScroll:cn,target:wn,translate:I(Y,t)};return Nn}const N={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function R(n){function t(n,t){return b(n,t||{})}return{mergeOptions:t,optionsAtMedia:function(e){const o=e.breakpoints||{},r=m(o).filter((t=>n.matchMedia(t).matches)).map((n=>o[n])).reduce(((n,e)=>t(n,e)),{});return t(e,r)},optionsMediaQueries:function(t){return t.map((n=>m(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}}}function z(n,t,e){const o=n.ownerDocument,r=o.defaultView,s=R(r),c=function(n){let t=[];return{init:function(e,o){return t=o.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(e,n))),o.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(s),u=v(),l=function(){let n,t={};function e(n){return t[n]||[]}const o={init:function(t){n=t},emit:function(t){return e(t).forEach((e=>e(n,t))),o},off:function(n,r){return t[n]=e(n).filter((n=>n!==r)),o},on:function(n,r){return t[n]=e(n).concat([r]),o},clear:function(){t={}}};return o}(),{mergeOptions:a,optionsAtMedia:d,optionsMediaQueries:f}=s,{on:h,off:p,emit:g}=l,m=I;let b,y,x,_,k=!1,w=a(N,z.globalOptions),S=a(w),C=[];function E(t){const e=A(n,x,_,o,r,t,l);return t.loop&&!e.slideLooper.canLoop()?E(Object.assign({},t,{loop:!1})):e}function L(t,e){k||(w=a(w,t),S=d(w),C=e||C,function(){const{container:t,slides:e}=S,o=i(t)?n.querySelector(t):t;x=o||n.children[0];const r=i(e)?x.querySelectorAll(e):e;_=[].slice.call(r||x.children)}(),b=E(S),f([w,...C.map((({options:n})=>n))]).forEach((n=>u.add(n,"change",I))),S.active&&(b.translate.to(b.location.get()),b.animation.init(),b.slidesInView.init(),b.slideFocus.init(O),b.eventHandler.init(O),b.resizeHandler.init(O),b.slidesHandler.init(O),b.options.loop&&b.slideLooper.loop(),x.offsetParent&&_.length&&b.dragHandler.init(O),y=c.init(O,C)))}function I(n,t){const e=B();M(),L(a({startIndex:e},n),t),l.emit("reInit")}function M(){b.dragHandler.destroy(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),b.slidesInView.destroy(),b.animation.destroy(),c.destroy(),u.clear()}function T(n,t,e){S.active&&!k&&(b.scrollBody.useBaseFriction().useDuration(!0===t?0:S.duration),b.scrollTo.index(n,e||0))}function B(){return b.index.get()}const O={canScrollNext:function(){return b.index.add(1).get()!==B()},canScrollPrev:function(){return b.index.add(-1).get()!==B()},containerNode:function(){return x},internalEngine:function(){return b},destroy:function(){k||(k=!0,u.clear(),M(),l.emit("destroy"),l.clear())},off:p,on:h,emit:g,plugins:function(){return y},previousScrollSnap:function(){return b.indexPrevious.get()},reInit:m,rootNode:function(){return n},scrollNext:function(n){T(b.index.add(1).get(),n,-1)},scrollPrev:function(n){T(b.index.add(-1).get(),n,1)},scrollProgress:function(){return b.scrollProgress.get(b.offsetLocation.get())},scrollSnapList:function(){return b.scrollSnapList},scrollTo:T,selectedScrollSnap:B,slideNodes:function(){return _},slidesInView:function(){return b.slidesInView.get()},slidesNotInView:function(){return b.slidesInView.get(!1)}};return L(t,e),setTimeout((()=>l.emit("init")),0),O}z.globalOptions=void 0;const B=t(class extends e{constructor(n){super(),!1!==n&&this.__registerHost()}get el(){return this}items;loop=!0;class;controlClass;slideClass;itemClass;viewportRef;containerRef;slotRef;prevBtnRef;nextBtnRef;dotsRef;embla=null;movedNodes=[];prevClickHandler=null;nextClickHandler=null;dotClickHandlers=[];slotNodesMoved=!1;async scrollPrev(){this.embla?.scrollPrev()}async scrollNext(){this.embla?.scrollNext()}async goToSlide(n){this.embla?.scrollTo(n)}async getEmbla(){return this.embla}moveSlotNodesIntoContainer(){if(!this.slotRef||!this.containerRef||this.slotNodesMoved)return;const n=this.slotRef.assignedNodes().filter((n=>n.nodeType===Node.ELEMENT_NODE));0!==n.length&&(this.movedNodes=[],n.forEach((n=>{this.containerRef.appendChild(n),this.movedNodes.push(n)})),this.slotNodesMoved=!0,this.scheduleEmblaInit())}initScheduled=!1;scheduleEmblaInit(){this.initScheduled||(this.initScheduled=!0,requestAnimationFrame((()=>{this.initScheduled=!1,this.destroyEmbla(),this.initEmbla()})))}moveSlotNodesBack(){const n=this.el;this.movedNodes.forEach((t=>n.appendChild(t))),this.movedNodes=[]}initEmbla(){if(!this.viewportRef||!this.containerRef)return;const n=this.getItemsArray();if(!(void 0!==n?n.length>0:this.containerRef.children.length>0))return;this.embla=z(this.viewportRef,{loop:this.loop,align:"center",containScroll:"trimSnaps"});const t=this.prevBtnRef,e=this.nextBtnRef,o=this.dotsRef,r=()=>{t&&(this.embla?.canScrollPrev()?t.removeAttribute("disabled"):t.setAttribute("disabled","")),e&&(this.embla?.canScrollNext()?e.removeAttribute("disabled"):e.setAttribute("disabled",""))};if(this.embla.on("init",r),this.embla.on("reInit",r),this.embla.on("select",r),t&&e&&(this.prevClickHandler=()=>this.embla?.scrollPrev(),this.nextClickHandler=()=>this.embla?.scrollNext(),t.addEventListener("click",this.prevClickHandler),e.addEventListener("click",this.nextClickHandler)),o){const n=this.embla.scrollSnapList().length;o.innerHTML="";for(let t=0;t<n;t++){const n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Go to slide "+(t+1)),n.className="carousel__dot",0===t&&n.classList.add("current");const e=document.createElement("div");e.className="carousel__dot-inner",n.appendChild(e);const r=t,i=()=>this.embla?.scrollTo(r);this.dotClickHandlers.push(i),n.addEventListener("click",i),o.appendChild(n)}this.embla.on("select",(()=>{const n=this.embla?.selectedScrollSnap()??0;o.querySelectorAll("button").forEach(((t,e)=>{t.classList.toggle("current",e===n)}))}))}r()}destroyEmbla(){this.prevBtnRef&&this.prevClickHandler&&(this.prevBtnRef.removeEventListener("click",this.prevClickHandler),this.prevClickHandler=null),this.nextBtnRef&&this.nextClickHandler&&(this.nextBtnRef.removeEventListener("click",this.nextClickHandler),this.nextClickHandler=null),this.dotClickHandlers=[],this.dotsRef&&(this.dotsRef.innerHTML=""),this.embla?.destroy(),this.embla=null}onSlotChange=()=>{void 0===this.getItemsArray()&&this.moveSlotNodesIntoContainer()};componentDidRender(){void 0===this.getItemsArray()?(this.slotRef&&(this.slotRef.removeEventListener("slotchange",this.onSlotChange),this.slotRef.addEventListener("slotchange",this.onSlotChange)),requestAnimationFrame((()=>{this.moveSlotNodesIntoContainer(),this.slotNodesMoved||(this.destroyEmbla(),this.initEmbla())}))):(this.destroyEmbla(),this.initEmbla())}disconnectedCallback(){this.slotRef&&this.slotRef.removeEventListener("slotchange",this.onSlotChange),this.destroyEmbla(),void 0===this.getItemsArray()&&(this.moveSlotNodesBack(),this.slotNodesMoved=!1)}getItemsArray(){if(void 0!==this.items){if(Array.isArray(this.items))return this.items;if("string"==typeof this.items)try{const n=JSON.parse(this.items);return Array.isArray(n)?n:void 0}catch{return}}}render(){const n=this.getItemsArray(),t=void 0!==n&&n.length>0;return o("div",{key:"3a2ea6c339bf0fe656e5a333789df7a37156b5dc",class:("carousel "+(this.class||"")).trim()},o("div",{key:"0a73b925095ae3188e5e40b024bc250e4c183894",class:("carousel__viewport "+(this.slideClass||"")).trim(),ref:n=>this.viewportRef=n},o("div",{key:"7fc3b5a72e386f7fa21702aeb363e08da1b728cf",class:"carousel__container",ref:n=>this.containerRef=n},t&&n?n.map(((n,t)=>o("div",{key:t,class:("carousel__slide "+(this.itemClass||"")).trim()},"object"==typeof n&&null!==n&&"content"in n?n.content:n+""))):null)),!t&&o("div",{key:"dee2fc91470728c136c9853cd74ae350ad3c5676",style:{display:"none"},"aria-hidden":"true"},o("slot",{key:"35dd47c03a1b9b6b73d845252c3d0482590f7da2",ref:n=>this.slotRef=n})),o("div",{key:"df639ad86ae8533f1dc15eed30afb70d99e36e1a",class:("carousel__controls "+(this.controlClass||"")).trim()},o("button",{key:"c17c0ea9bf023b5d2621e558c957d92b13425584",type:"button","aria-label":"Previous",class:"carousel__prev",ref:n=>this.prevBtnRef=n},o("svg",{key:"5125abcae0b08ee72106d511b4c24c2d0f24187b",class:"carousel__icon","stroke-width":"1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},o("path",{key:"9b7f28be56f451ad14de226d7163a5587a1cd9e6","stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"}))),o("div",{key:"9939d3496092a3f319efac9132cec8097c83b497",class:"carousel__dots",ref:n=>this.dotsRef=n}),o("button",{key:"a0b1228f6df0065885f1d272386283926e78464b",type:"button","aria-label":"Next",class:"carousel__next",ref:n=>this.nextBtnRef=n},o("svg",{key:"e00c92cc0485f41a30e97d5d0466aaee48a64998",class:"carousel__icon","stroke-width":"1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},o("path",{key:"a35c46fdbd1cd333d3e6f76590f45dd837546165","stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})))))}static get style(){return":host{display:block}.carousel{display:flex;flex-direction:column;overflow:hidden}.carousel__viewport{overflow:hidden;touch-action:pan-y pinch-zoom}.carousel__container{display:flex;flex-direction:row;height:100%;margin-left:calc(-0.4rem)}.carousel__container ::slotted(*){flex:0 0 50%;width:50%;height:100%;padding-left:0.4rem;box-sizing:border-box}.carousel__slide{flex:0 0 50%;width:50%;height:100%;padding-left:0.4rem;box-sizing:border-box}.carousel__controls{display:flex;gap:0.25rem;margin-top:0.25rem;justify-content:center;align-items:center}.carousel__prev,.carousel__next{display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;color:currentColor}.carousel__prev:disabled,.carousel__next:disabled{opacity:0.4;cursor:not-allowed}.carousel__icon{width:2.4rem;height:2.4rem}.carousel__dots{display:flex;gap:0.25rem;align-items:center}.carousel__dot{padding:0;border:none;background:none;cursor:pointer;width:0.5rem;height:0.5rem;display:flex;align-items:center;justify-content:center}.carousel__dot-inner{width:100%;height:100%;border-radius:50%;background-color:var(--carousel-dot-bg, #cbd5e1);transition:background-color 0.2s ease}.carousel__dot.current .carousel__dot-inner{background-color:var(--carousel-dot-active-bg, #94a3b8)}"}},[772,"fast-carousel",{items:[1],loop:[4],class:[1],controlClass:[1,"control-class"],slideClass:[1,"slide-class"],itemClass:[1,"item-class"],scrollPrev:[64],scrollNext:[64],goToSlide:[64],getEmbla:[64]}]);function O(){"undefined"!=typeof customElements&&["fast-carousel"].forEach((t=>{"fast-carousel"===t&&(customElements.get(n(t))||customElements.define(n(t),B))}))}O();const j=B,F=O;export{j as FastCarousel,F as defineCustomElement}
1
+ import{t as n,p as t,H as e,h as o}from"./p-Bb27ylcX.js";function r(n){return"number"==typeof n}function i(n){return"string"==typeof n}function s(n){return"boolean"==typeof n}function c(n){return"[object Object]"===Object.prototype.toString.call(n)}function u(n){return Math.abs(n)}function l(n){return Math.sign(n)}function a(n,t){return u(n-t)}function d(n){return m(n).map(Number)}function f(n){return n[h(n)]}function h(n){return Math.max(0,n.length-1)}function p(n,t){return t===h(n)}function g(n,t=0){return Array.from(Array(n),((n,e)=>t+e))}function m(n){return Object.keys(n)}function b(n,t){return[n,t].reduce(((n,t)=>(m(t).forEach((e=>{const o=n[e],r=t[e],i=c(o)&&c(r);n[e]=i?b(o,r):r})),n)),{})}function y(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function v(){let n=[];const t={add:function(e,o,r,i={passive:!0}){let s;if("addEventListener"in e)e.addEventListener(o,r,i),s=()=>e.removeEventListener(o,r,i);else{const n=e;n.addListener(r),s=()=>n.removeListener(r)}return n.push(s),t},clear:function(){n=n.filter((n=>n()))}};return t}function x(n=0,t=0){const e=u(n-t);function o(t){return t<n}function r(n){return n>t}function i(n){return o(n)||r(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?o(e)?n:t:e},reachedAny:i,reachedMax:r,reachedMin:o,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function _(n,t,e){const{constrain:o}=x(0,n),r=n+1;let i=s(t);function s(n){return e?u((r+n)%r):o(n)}function c(){return i}function l(){return _(n,c(),e)}const a={get:c,set:function(n){return i=s(n),a},add:function(n){return l().set(c()+n)},clone:l};return a}function k(n,t,e,o,r,i,c,d,f,h,p,g,m,b,_,k,w,S,C){const{cross:E,direction:L}=n,I=["INPUT","SELECT","TEXTAREA"],M={passive:!1},T=v(),A=v(),N=x(50,225).constrain(b.measure(20)),R={mouse:300,touch:400},z={mouse:500,touch:600},B=_?43:25;let O=!1,j=0,F=0,D=!1,P=!1,H=!1,G=!1;function V(n){if(!y(n,o)&&n.touches.length>=2)return W(n);const t=i.readPoint(n),e=i.readPoint(n,E),s=a(t,j),c=a(e,F);if(!P&&!G){if(!n.cancelable)return W(n);if(P=s>c,!P)return W(n)}const u=i.pointerMove(n);s>k&&(H=!0),h.useFriction(.3).useDuration(.75),d.start(),r.add(L(u)),n.preventDefault()}function W(n){const t=p.byDistance(0,!1).index!==g.get(),e=i.pointerUp(n)*(_?z:R)[G?"mouse":"touch"],o=function(n,t){const e=g.add(-1*l(n)),o=p.byDistance(n,!_).distance;return _||u(n)<N?o:w&&t?.5*o:p.byIndex(e.get(),0).distance}(L(e),t),r=function(n,t){if(0===n||0===t)return 0;if(u(n)<=u(t))return 0;const e=a(u(n),u(t));return u(e/n)}(e,o),s=B-10*r,c=S+r/50;P=!1,D=!1,A.clear(),h.useDuration(s).useFriction(c),f.distance(o,!_),G=!1,m.emit("pointerUp")}function U(n){H&&(n.stopPropagation(),n.preventDefault(),H=!1)}return{init:function(n){if(!C)return;function u(u){(s(C)||C(n,u))&&function(n){const s=y(n,o);G=s,H=_&&s&&!n.buttons&&O,O=a(r.get(),c.get())>=2,s&&0!==n.button||function(n){return I.includes(n.nodeName||"")}(n.target)||(D=!0,i.pointerDown(n),h.useFriction(0).useDuration(0),r.set(c),function(){const n=G?e:t;A.add(n,"touchmove",V,M).add(n,"touchend",W).add(n,"mousemove",V,M).add(n,"mouseup",W)}(),j=i.readPoint(n),F=i.readPoint(n,E),m.emit("pointerDown"))}(u)}const l=t;T.add(l,"dragstart",(n=>n.preventDefault()),M).add(l,"touchmove",(()=>{}),M).add(l,"touchend",(()=>{})).add(l,"touchstart",u).add(l,"mousedown",u).add(l,"touchcancel",W).add(l,"contextmenu",W).add(l,"click",U,!0)},destroy:function(){T.clear(),A.clear()},pointerDown:function(){return D}}}function w(n,t){let e,o;function r(n){return n.timeStamp}function i(e,o){const r="client"+("x"===(o||n.scroll)?"X":"Y");return(y(e,t)?e:e.touches[0])[r]}return{pointerDown:function(n){return e=n,o=n,i(n)},pointerMove:function(n){const t=i(n)-i(o),s=r(n)-r(e)>170;return o=n,s&&(e=n),t},pointerUp:function(n){if(!e||!o)return 0;const t=i(o)-i(e),s=r(n)-r(e),c=r(n)-r(o)>170,l=t/s;return s&&!c&&u(l)>.1?l:0},readPoint:i}}function S(n,t,e,o,r,i,c){const l=[n].concat(o);let a,d,f=[],h=!1;function p(n){return r.measureSize(c.measure(n))}return{init:function(r){i&&(d=p(n),f=o.map(p),a=new ResizeObserver((e=>{(s(i)||i(r,e))&&function(e){for(const i of e){if(h)return;const e=i.target===n,s=o.indexOf(i.target),c=e?d:f[s];if(u(p(e?n:o[s])-c)>=.5){r.reInit(),t.emit("resize");break}}}(e)})),e.requestAnimationFrame((()=>{l.forEach((n=>a.observe(n)))})))},destroy:function(){h=!0,a&&a.disconnect()}}}function C(n,t,e,o,r){const i=r.measure(10),s=r.measure(50),c=x(.1,.99);let l=!1;function a(){return!l&&!!n.reachedAny(e.get())&&!!n.reachedAny(t.get())}return{shouldConstrain:a,constrain:function(r){if(!a())return;const l=n.reachedMin(t.get())?"min":"max",d=u(n[l]-t.get()),f=e.get()-t.get(),h=c.constrain(d/s);e.subtract(f*h),!r&&u(f)<i&&(e.set(n.constrain(e.get())),o.useDuration(25).useBaseFriction())},toggleActive:function(n){l=!n}}}function E(n,t,e,o){const r=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:c}=x(r,i);return{loop:function(t){if(!function(n){return 1===n?c(e.get()):-1===n&&s(e.get())}(t))return;const r=n*(-1*t);o.forEach((n=>n.add(r)))}}}function L(n){let t=n;function e(n){return r(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function I(n,t){const e="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},o=t.style;let r=null,i=!1;return{clear:function(){i||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const s=function(n){return Math.round(100*n)/100}(n.direction(t));s!==r&&(o.transform=e(s),r=s)},toggleActive:function(n){i=!n}}}function M(n,t,e,o,r,i,s,c,u){const l=d(r),a=p(h(d(r).reverse(),s[0]),e,!1).concat(p(h(l,t-s[0]-1),-e,!0));function f(n,t){return n.reduce(((n,t)=>n-r[t]),t)}function h(n,t){return n.reduce(((n,e)=>f(n,t)>0?n.concat([e]):n),[])}function p(r,s,l){const a=function(n){return i.map(((e,r)=>({start:e-o[r]+.5+n,end:e+t-.5+n})))}(s);return r.map((t=>{const o=l?0:-e,r=l?e:0,i=a[t][l?"end":"start"];return{index:t,loopPoint:i,slideLocation:L(-1),translate:I(n,u[t]),target:()=>c.get()>i?o:r}}))}return{canLoop:function(){return a.every((({index:n})=>f(l.filter((t=>t!==n)),t)<=.1))},clear:function(){a.forEach((n=>n.translate.clear()))},loop:function(){a.forEach((n=>{const{target:t,translate:e,slideLocation:o}=n,r=t();r!==o.get()&&(e.to(r),o.set(r))}))},loopPoints:a}}function T(n,t,e){let o,r=!1;return{init:function(i){e&&(o=new MutationObserver((n=>{r||(s(e)||e(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)})),o.observe(n,{childList:!0}))},destroy:function(){o&&o.disconnect(),r=!0}}}function A(n,t,e,o,c,b,y){const{align:A,axis:N,direction:R,startIndex:z,loop:B,duration:O,dragFree:j,dragThreshold:F,inViewThreshold:D,slidesToScroll:P,skipSnaps:H,containScroll:G,watchResize:V,watchSlides:W,watchDrag:U,watchFocus:X}=b,q={measure:function(n){const{offsetTop:t,offsetLeft:e,offsetWidth:o,offsetHeight:r}=n;return{top:t,right:e+o,bottom:t+r,left:e,width:o,height:r}}},Q=q.measure(t),$=e.map(q.measure),J=function(n,t){const e="rtl"===t,o="y"===n,r=!o&&e?-1:1;return{scroll:o?"y":"x",cross:o?"x":"y",startEdge:o?"top":e?"right":"left",endEdge:o?"bottom":e?"left":"right",measureSize:function(n){const{height:t,width:e}=n;return o?t:e},direction:function(n){return n*r}}}(N,R),Y=J.measureSize(Q),K=function(n){return{measure:function(t){return n*(t/100)}}}(Y),Z=function(n,t){const e={start:function(){return 0},center:function(n){return o(n)/2},end:o};function o(n){return t-n}return{measure:function(o,r){return i(n)?e[n](o):n(t,o,r)}}}(A,Y),nn=!B&&!!G,tn=B||!!G,{slideSizes:en,slideSizesWithGaps:on,startGap:rn,endGap:sn}=function(n,t,e,o,r,i){const{measureSize:s,startEdge:c,endEdge:l}=n,a=e[0]&&r,d=a?u(t[c]-e[0][c]):0,h=function(){if(!a)return 0;const n=i.getComputedStyle(f(o));return parseFloat(n.getPropertyValue("margin-"+l))}(),g=e.map(s),m=e.map(((n,t,e)=>{const o=!t,r=p(e,t);return o?g[t]+d:r?g[t]+h:e[t+1][c]-n[c]})).map(u);return{slideSizes:g,slideSizesWithGaps:m,startGap:d,endGap:h}}(J,Q,$,e,tn,c),cn=function(n,t,e,o,i,s,c,l,a){const{startEdge:p,endEdge:g,direction:m}=n,b=r(e);return{groupSlides:function(n){return b?function(n,t){return d(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,e):function(n){return n.length?d(n).reduce(((e,r,d)=>{const b=f(e)||0,y=0===b,v=r===h(n),x=i[p]-s[b][p],_=i[p]-s[r][g],k=!o&&y?m(c):0,w=u(_-(!o&&v?m(l):0)-(x+k));return d&&w>t+a&&e.push(r),v&&e.push(n.length),e}),[]).map(((t,e,o)=>n.slice(Math.max(o[e-1]||0),t))):[]}(n)}}}(J,Y,P,B,Q,$,rn,sn,2),{snaps:un,snapsAligned:ln}=function(n,t,e,o,r){const{startEdge:i,endEdge:s}=n,{groupSlides:c}=r,l=c(o).map((n=>f(n)[s]-n[0][i])).map(u).map(t.measure),a=o.map((n=>e[i]-n[i])).map((n=>-u(n))),d=c(a).map((n=>n[0])).map(((n,t)=>n+l[t]));return{snaps:a,snapsAligned:d}}(J,Z,Q,$,cn),an=-f(un)+f(on),{snapsContained:dn,scrollContainLimit:fn}=function(n,t,e,o){const r=x(-t+n,0),i=e.map(((n,t)=>{const{min:o,max:i}=r,s=r.constrain(n),u=!t,l=p(e,t);return u?i:l||c(o,s)?o:c(i,s)?i:s})).map((n=>parseFloat(n.toFixed(3)))),s=function(){const n=i[0],t=f(i);return x(i.lastIndexOf(n),i.indexOf(t)+1)}();function c(n,t){return a(n,t)<=1}return{snapsContained:function(){if(t<=n+2)return[r.max];if("keepSnaps"===o)return i;const{min:e,max:c}=s;return i.slice(e,c)}(),scrollContainLimit:s}}(Y,an,ln,G),hn=nn?dn:ln,{limit:pn}=function(n,t,e){const o=t[0];return{limit:x(e?o-n:f(t),o)}}(an,hn,B),gn=_(h(hn),z,B),mn=gn.clone(),bn=d(e),yn=function(n,t,e,o){const r=v(),i=1e3/60;let s=null,c=0,u=0;function l(n){if(!u)return;s||(s=n,e(),e());const r=n-s;for(s=n,c+=r;c>=i;)e(),c-=i;o(c/i),u&&(u=t.requestAnimationFrame(l))}function a(){t.cancelAnimationFrame(u),s=null,c=0,u=0}return{init:function(){r.add(n,"visibilitychange",(()=>{n.hidden&&(s=null,c=0)}))},destroy:function(){a(),r.clear()},start:function(){u||(u=t.requestAnimationFrame(l))},stop:a,update:e,render:o}}(o,c,(()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:o}})=>{o||e.constrain(n.pointerDown()),t.seek()})(Nn)),(n=>(({scrollBody:n,translate:t,location:e,offsetLocation:o,previousLocation:r,scrollLooper:i,slideLooper:s,dragHandler:c,animation:u,eventHandler:l,scrollBounds:a,options:{loop:d}},f)=>{const h=n.settled(),p=!a.shouldConstrain(),g=d?h:h&&p,m=g&&!c.pointerDown();m&&u.stop();const b=e.get()*f+r.get()*(1-f);o.set(b),d&&(i.loop(n.direction()),s.loop()),t.to(o.get()),m&&l.emit("settle"),g||l.emit("scroll")})(Nn,n))),vn=hn[gn.get()],xn=L(vn),_n=L(vn),kn=L(vn),wn=L(vn),Sn=function(n,t,e,o,r){let i=0,s=0,c=r,a=.68,d=n.get(),f=0;function h(n){return c=n,g}function p(n){return a=n,g}const g={direction:function(){return s},duration:function(){return c},velocity:function(){return i},seek:function(){const t=o.get()-n.get();let r=0;return c?(e.set(n),i+=t/c,i*=a,d+=i,n.add(i),r=d-f):(i=0,e.set(o),n.set(o),r=t),s=l(r),f=d,g},settled:function(){return u(o.get()-t.get())<.001},useBaseFriction:function(){return p(.68)},useBaseDuration:function(){return h(r)},useFriction:p,useDuration:h};return g}(xn,kn,_n,wn,O),Cn=function(n,t,e,o,r){const{reachedAny:i,removeOffset:s,constrain:c}=o;function a(n){return n.concat().sort(((n,t)=>u(n)-u(t)))[0]}function d(t,o){const r=[t,t+e,t-e];if(!n)return t;if(!o)return a(r);const i=r.filter((n=>l(n)===o));return i.length?a(i):f(r)-e}return{byDistance:function(e,o){const l=r.get()+e,{index:a,distance:f}=function(e){const o=n?s(e):c(e),r=t.map(((n,t)=>({diff:d(n-o,0),index:t}))).sort(((n,t)=>u(n.diff)-u(t.diff))),{index:i}=r[0];return{index:i,distance:o}}(l),h=!n&&i(l);return!o||h?{index:a,distance:e}:{index:a,distance:e+d(t[a]-f,0)}},byIndex:function(n,e){return{index:n,distance:d(t[n]-r.get(),e)}},shortcut:d}}(B,hn,an,pn,wn),En=function(n,t,e,o,r,i,s){function c(r){const c=r.distance,u=r.index!==t.get();i.add(c),c&&(o.duration()?n.start():(n.update(),n.render(1),n.update())),u&&(e.set(t.get()),t.set(r.index),s.emit("select"))}return{distance:function(n,t){c(r.byDistance(n,t))},index:function(n,e){const o=t.clone().set(n);c(r.byIndex(o.get(),e))}}}(yn,gn,mn,Sn,Cn,wn,y),Ln=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(pn),In=v(),Mn=function(n,t,e,o){const r={};let i,s=null,c=null,u=!1;return{init:function(){i=new IntersectionObserver((n=>{u||(n.forEach((n=>{const e=t.indexOf(n.target);r[e]=n})),s=null,c=null,e.emit("slidesInView"))}),{root:n.parentElement,threshold:o}),t.forEach((n=>i.observe(n)))},destroy:function(){i&&i.disconnect(),u=!0},get:function(n=!0){if(n&&s)return s;if(!n&&c)return c;const t=function(n){return m(r).reduce(((t,e)=>{const o=parseInt(e),{isIntersecting:i}=r[o];return(n&&i||!n&&!i)&&t.push(o),t}),[])}(n);return n&&(s=t),n||(c=t),t}}}(t,e,y,D),{slideRegistry:Tn}=function(n,t,e,o,r,i){const{groupSlides:s}=r,{min:c,max:u}=o;return{slideRegistry:function(){const o=s(i);return 1===e.length?[i]:n&&"keepSnaps"!==t?o.slice(c,u).map(((n,t,e)=>{const o=!t,r=p(e,t);return o?g(f(e[0])+1):r?g(h(i)-f(e)[0]+1,f(e)[0]):n})):o}()}}(nn,G,hn,fn,cn,bn),An=function(n,t,e,o,i,c,u,l){const a={passive:!0,capture:!0};let d=0;function f(n){"Tab"===n.code&&(d=(new Date).getTime())}return{init:function(h){l&&(c.add(document,"keydown",f,!1),t.forEach(((t,f)=>{c.add(t,"focus",(t=>{(s(l)||l(h,t))&&function(t){if((new Date).getTime()-d>10)return;u.emit("slideFocusStart"),n.scrollLeft=0;const s=e.findIndex((n=>n.includes(t)));r(s)&&(i.useDuration(0),o.index(s,0),u.emit("slideFocus"))}(f)}),a)})))}}}(n,e,Tn,En,Sn,In,y,X),Nn={ownerDocument:o,ownerWindow:c,eventHandler:y,containerRect:Q,slideRects:$,animation:yn,axis:J,dragHandler:k(J,n,o,c,wn,w(J,c),xn,yn,En,Sn,Cn,gn,y,K,j,F,H,.68,U),eventStore:In,percentOfView:K,index:gn,indexPrevious:mn,limit:pn,location:xn,offsetLocation:kn,previousLocation:_n,options:b,resizeHandler:S(t,y,c,e,J,V,q),scrollBody:Sn,scrollBounds:C(pn,kn,wn,Sn,K),scrollLooper:E(an,pn,kn,[xn,kn,_n,wn]),scrollProgress:Ln,scrollSnapList:hn.map(Ln.get),scrollSnaps:hn,scrollTarget:Cn,scrollTo:En,slideLooper:M(J,Y,an,en,on,un,hn,kn,e),slideFocus:An,slidesHandler:T(t,y,W),slidesInView:Mn,slideIndexes:bn,slideRegistry:Tn,slidesToScroll:cn,target:wn,translate:I(J,t)};return Nn}const N={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function R(n){function t(n,t){return b(n,t||{})}return{mergeOptions:t,optionsAtMedia:function(e){const o=e.breakpoints||{},r=m(o).filter((t=>n.matchMedia(t).matches)).map((n=>o[n])).reduce(((n,e)=>t(n,e)),{});return t(e,r)},optionsMediaQueries:function(t){return t.map((n=>m(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}}}function z(n,t,e){const o=n.ownerDocument,r=o.defaultView,s=R(r),c=function(n){let t=[];return{init:function(e,o){return t=o.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(e,n))),o.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(s),u=v(),l=function(){let n,t={};function e(n){return t[n]||[]}const o={init:function(t){n=t},emit:function(t){return e(t).forEach((e=>e(n,t))),o},off:function(n,r){return t[n]=e(n).filter((n=>n!==r)),o},on:function(n,r){return t[n]=e(n).concat([r]),o},clear:function(){t={}}};return o}(),{mergeOptions:a,optionsAtMedia:d,optionsMediaQueries:f}=s,{on:h,off:p,emit:g}=l,m=I;let b,y,x,_,k=!1,w=a(N,z.globalOptions),S=a(w),C=[];function E(t){const e=A(n,x,_,o,r,t,l);return t.loop&&!e.slideLooper.canLoop()?E(Object.assign({},t,{loop:!1})):e}function L(t,e){k||(w=a(w,t),S=d(w),C=e||C,function(){const{container:t,slides:e}=S,o=i(t)?n.querySelector(t):t;x=o||n.children[0];const r=i(e)?x.querySelectorAll(e):e;_=[].slice.call(r||x.children)}(),b=E(S),f([w,...C.map((({options:n})=>n))]).forEach((n=>u.add(n,"change",I))),S.active&&(b.translate.to(b.location.get()),b.animation.init(),b.slidesInView.init(),b.slideFocus.init(O),b.eventHandler.init(O),b.resizeHandler.init(O),b.slidesHandler.init(O),b.options.loop&&b.slideLooper.loop(),x.offsetParent&&_.length&&b.dragHandler.init(O),y=c.init(O,C)))}function I(n,t){const e=B();M(),L(a({startIndex:e},n),t),l.emit("reInit")}function M(){b.dragHandler.destroy(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),b.slidesInView.destroy(),b.animation.destroy(),c.destroy(),u.clear()}function T(n,t,e){S.active&&!k&&(b.scrollBody.useBaseFriction().useDuration(!0===t?0:S.duration),b.scrollTo.index(n,e||0))}function B(){return b.index.get()}const O={canScrollNext:function(){return b.index.add(1).get()!==B()},canScrollPrev:function(){return b.index.add(-1).get()!==B()},containerNode:function(){return x},internalEngine:function(){return b},destroy:function(){k||(k=!0,u.clear(),M(),l.emit("destroy"),l.clear())},off:p,on:h,emit:g,plugins:function(){return y},previousScrollSnap:function(){return b.indexPrevious.get()},reInit:m,rootNode:function(){return n},scrollNext:function(n){T(b.index.add(1).get(),n,-1)},scrollPrev:function(n){T(b.index.add(-1).get(),n,1)},scrollProgress:function(){return b.scrollProgress.get(b.offsetLocation.get())},scrollSnapList:function(){return b.scrollSnapList},scrollTo:T,selectedScrollSnap:B,slideNodes:function(){return _},slidesInView:function(){return b.slidesInView.get()},slidesNotInView:function(){return b.slidesInView.get(!1)}};return L(t,e),setTimeout((()=>l.emit("init")),0),O}z.globalOptions=void 0;const B=t(class extends e{constructor(n){super(),!1!==n&&this.__registerHost()}get el(){return this}items;loop=!0;class;controlClass;slideClass;itemClass;viewportRef;containerRef;slotRef;prevBtnRef;nextBtnRef;dotsRef;embla=null;movedNodes=[];prevClickHandler=null;nextClickHandler=null;dotClickHandlers=[];slotNodesMoved=!1;async scrollPrev(){this.embla?.scrollPrev()}async scrollNext(){this.embla?.scrollNext()}async goToSlide(n){this.embla?.scrollTo(n)}async getEmbla(){return this.embla}moveSlotNodesIntoContainer(){if(!this.slotRef||!this.containerRef||this.slotNodesMoved)return;const n=this.slotRef.assignedNodes().filter((n=>n.nodeType===Node.ELEMENT_NODE));0!==n.length&&(this.movedNodes=[],n.forEach((n=>{this.containerRef.appendChild(n),this.movedNodes.push(n)})),this.slotNodesMoved=!0,this.scheduleEmblaInit())}initScheduled=!1;scheduleEmblaInit(){this.initScheduled||(this.initScheduled=!0,requestAnimationFrame((()=>{this.initScheduled=!1,this.destroyEmbla(),this.initEmbla()})))}moveSlotNodesBack(){const n=this.el;this.movedNodes.forEach((t=>n.appendChild(t))),this.movedNodes=[]}initEmbla(){if(!this.viewportRef||!this.containerRef)return;const n=this.getItemsArray();if(!(void 0!==n?n.length>0:this.containerRef.children.length>0))return;this.embla=z(this.viewportRef,{loop:this.loop,align:"center",containScroll:"trimSnaps"});const t=this.prevBtnRef,e=this.nextBtnRef,o=this.dotsRef,r=()=>{t&&(this.embla?.canScrollPrev()?t.removeAttribute("disabled"):t.setAttribute("disabled","")),e&&(this.embla?.canScrollNext()?e.removeAttribute("disabled"):e.setAttribute("disabled",""))};if(this.embla.on("init",r),this.embla.on("reInit",r),this.embla.on("select",r),t&&e&&(this.prevClickHandler=()=>this.embla?.scrollPrev(),this.nextClickHandler=()=>this.embla?.scrollNext(),t.addEventListener("click",this.prevClickHandler),e.addEventListener("click",this.nextClickHandler)),o){const n=this.embla.scrollSnapList().length;o.innerHTML="";for(let t=0;t<n;t++){const n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Go to slide "+(t+1)),n.className="carousel__dot",0===t&&n.classList.add("current");const e=document.createElement("div");e.className="carousel__dot-inner",n.appendChild(e);const r=t,i=()=>this.embla?.scrollTo(r);this.dotClickHandlers.push(i),n.addEventListener("click",i),o.appendChild(n)}this.embla.on("select",(()=>{const n=this.embla?.selectedScrollSnap()??0;o.querySelectorAll("button").forEach(((t,e)=>{t.classList.toggle("current",e===n)}))}))}r()}destroyEmbla(){this.prevBtnRef&&this.prevClickHandler&&(this.prevBtnRef.removeEventListener("click",this.prevClickHandler),this.prevClickHandler=null),this.nextBtnRef&&this.nextClickHandler&&(this.nextBtnRef.removeEventListener("click",this.nextClickHandler),this.nextClickHandler=null),this.dotClickHandlers=[],this.dotsRef&&(this.dotsRef.innerHTML=""),this.embla?.destroy(),this.embla=null}onSlotChange=()=>{void 0===this.getItemsArray()&&this.moveSlotNodesIntoContainer()};componentDidRender(){void 0===this.getItemsArray()?(this.slotRef&&(this.slotRef.removeEventListener("slotchange",this.onSlotChange),this.slotRef.addEventListener("slotchange",this.onSlotChange)),requestAnimationFrame((()=>{this.moveSlotNodesIntoContainer(),this.slotNodesMoved||(this.destroyEmbla(),this.initEmbla())}))):(this.destroyEmbla(),this.initEmbla())}disconnectedCallback(){this.slotRef&&this.slotRef.removeEventListener("slotchange",this.onSlotChange),this.destroyEmbla(),void 0===this.getItemsArray()&&(this.moveSlotNodesBack(),this.slotNodesMoved=!1)}getItemsArray(){if(void 0!==this.items){if(Array.isArray(this.items))return this.items;if("string"==typeof this.items)try{const n=JSON.parse(this.items);return Array.isArray(n)?n:void 0}catch{return}}}render(){const n=this.getItemsArray(),t=void 0!==n&&n.length>0;return o("div",{key:"3a2ea6c339bf0fe656e5a333789df7a37156b5dc",class:("carousel "+(this.class||"")).trim()},o("div",{key:"0a73b925095ae3188e5e40b024bc250e4c183894",class:("carousel__viewport "+(this.slideClass||"")).trim(),ref:n=>this.viewportRef=n},o("div",{key:"7fc3b5a72e386f7fa21702aeb363e08da1b728cf",class:"carousel__container",ref:n=>this.containerRef=n},t&&n?n.map(((n,t)=>o("div",{key:t,class:("carousel__slide "+(this.itemClass||"")).trim()},"object"==typeof n&&null!==n&&"content"in n?n.content:n+""))):null)),!t&&o("div",{key:"dee2fc91470728c136c9853cd74ae350ad3c5676",style:{display:"none"},"aria-hidden":"true"},o("slot",{key:"35dd47c03a1b9b6b73d845252c3d0482590f7da2",ref:n=>this.slotRef=n})),o("div",{key:"df639ad86ae8533f1dc15eed30afb70d99e36e1a",class:("carousel__controls "+(this.controlClass||"")).trim()},o("button",{key:"c17c0ea9bf023b5d2621e558c957d92b13425584",type:"button","aria-label":"Previous",class:"carousel__prev",ref:n=>this.prevBtnRef=n},o("svg",{key:"5125abcae0b08ee72106d511b4c24c2d0f24187b",class:"carousel__icon","stroke-width":"1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},o("path",{key:"9b7f28be56f451ad14de226d7163a5587a1cd9e6","stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"}))),o("div",{key:"9939d3496092a3f319efac9132cec8097c83b497",class:"carousel__dots",ref:n=>this.dotsRef=n}),o("button",{key:"a0b1228f6df0065885f1d272386283926e78464b",type:"button","aria-label":"Next",class:"carousel__next",ref:n=>this.nextBtnRef=n},o("svg",{key:"e00c92cc0485f41a30e97d5d0466aaee48a64998",class:"carousel__icon","stroke-width":"1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},o("path",{key:"a35c46fdbd1cd333d3e6f76590f45dd837546165","stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})))))}static get style(){return":host{display:block}.carousel{display:flex;flex-direction:column;overflow:hidden}.carousel__viewport{overflow:hidden;touch-action:pan-y pinch-zoom}.carousel__container{display:flex;flex-direction:row;height:100%;margin-left:calc(-0.4rem)}.carousel__container ::slotted(*){flex:0 0 50%;width:50%;height:100%;padding-left:0.4rem;box-sizing:border-box}.carousel__slide{flex:0 0 50%;width:50%;height:100%;padding-left:0.4rem;box-sizing:border-box}.carousel__controls{display:flex;gap:0.25rem;margin-top:0.25rem;justify-content:center;align-items:center}.carousel__prev,.carousel__next{display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;color:currentColor}.carousel__prev:disabled,.carousel__next:disabled{opacity:0.4;cursor:not-allowed}.carousel__icon{width:2.4rem;height:2.4rem}.carousel__dots{display:flex;gap:0.25rem;align-items:center}.carousel__dot{padding:0;border:none;background:none;cursor:pointer;width:0.5rem;height:0.5rem;display:flex;align-items:center;justify-content:center}.carousel__dot-inner{width:100%;height:100%;border-radius:50%;background-color:var(--carousel-dot-bg, #cbd5e1);transition:background-color 0.2s ease}.carousel__dot.current .carousel__dot-inner{background-color:var(--carousel-dot-active-bg, #94a3b8)}"}},[772,"fast-carousel",{items:[1],loop:[4],class:[1],controlClass:[1,"control-class"],slideClass:[1,"slide-class"],itemClass:[1,"item-class"],scrollPrev:[64],scrollNext:[64],goToSlide:[64],getEmbla:[64]}]);function O(){"undefined"!=typeof customElements&&["fast-carousel"].forEach((t=>{"fast-carousel"===t&&(customElements.get(n(t))||customElements.define(n(t),B))}))}O();const j=B,F=O;export{j as FastCarousel,F as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface FastForm extends Components.FastForm, HTMLElement {}
4
+ export const FastForm: {
5
+ prototype: FastForm;
6
+ new (): FastForm;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t,p as s,H as e,c as o,h as a}from"./p-Bb27ylcX.js";const n=s(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.searchExecuted=o(this,"searchExecuted")}get el(){return this}searchExecuted;handleInputSubmit(){this.submit()}async submit(){const t=this.el.querySelectorAll("fast-input"),s={};for(const e of Array.from(t)){const t=await e.getParamName(),o=await e.getValue();o&&(s[t]=o)}this.updateUrlParams(s),document.dispatchEvent(new CustomEvent("search-executed",{detail:s,bubbles:!0,composed:!0})),this.searchExecuted.emit(s)}updateUrlParams(t){const s=new URLSearchParams(window.location.search),e=this.el.querySelectorAll("fast-input");for(const t of Array.from(e)){const e=t.paramName;e&&s.delete(e)}for(const[e,o]of Object.entries(t))o&&s.set(e,o);const o=""+s,a=o?`${window.location.pathname}?${o}`:window.location.pathname;history.pushState({},"",a)}handleFormSubmit=t=>{t.preventDefault(),this.submit()};render(){return a("form",{key:"50436bb904e8b175ae0c23158812a4e4756544c0",class:"fast-form",onSubmit:this.handleFormSubmit},a("slot",{key:"2f76c4c42c15ebf389d6e0fdbcb9a2098bf1156a"}))}static get style(){return".fast-form{display:flex;gap:0.5rem;align-items:flex-start}"}},[260,"fast-form",void 0,[[0,"inputSubmit","handleInputSubmit"]]]);function c(){"undefined"!=typeof customElements&&["fast-form"].forEach((s=>{"fast-form"===s&&(customElements.get(t(s))||customElements.define(t(s),n))}))}c();const r=n,i=c;export{r as FastForm,i as defineCustomElement}
@@ -1 +1 @@
1
- import{t,p as e,H as s,c as o,h as i}from"./p-BiaJAQXY.js";const a=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.searchExecuted=o(this,"searchExecuted"),this.inputChanged=o(this,"inputChanged")}placeholder="Search...";value="";paramName="keyword";enableAutocomplete=!1;autocompleteUrl="/api/jobs/autocomplete";targetPath;debounceMs=300;minChars=3;searchExecuted;inputChanged;inputValue="";suggestions=[];showDropdown=!1;autocompleteLoading=!1;debounceTimer;popstateHandler;connectedCallback(){const t=this.getUrlParam();this.inputValue=null!==t?t:this.value,this.popstateHandler=()=>{this.inputValue=this.getUrlParam()??""},window.addEventListener("popstate",this.popstateHandler)}disconnectedCallback(){window.removeEventListener("popstate",this.popstateHandler),clearTimeout(this.debounceTimer)}getUrlParam(){return new URLSearchParams(window.location.search).get(this.paramName)}updateUrlParam(t){const e=new URLSearchParams(window.location.search);t?e.set(this.paramName,t):e.delete(this.paramName);const s=""+e,o=s?`${window.location.pathname}?${s}`:window.location.pathname;history.pushState({},"",o)}submit(){this.updateUrlParam(this.inputValue),document.dispatchEvent(new CustomEvent("search-executed",{detail:{keyword:this.inputValue},bubbles:!0,composed:!0})),this.searchExecuted.emit({keyword:this.inputValue}),this.showDropdown=!1}handleInput=t=>{const e=t.target.value;this.inputValue=e,this.inputChanged.emit({value:e}),this.enableAutocomplete&&this.scheduleAutocomplete(e)};handleKeydown=t=>{"Enter"===t.key?this.submit():"Escape"===t.key&&(this.showDropdown=!1)};handleBlur=()=>{this.showDropdown=!1};scheduleAutocomplete(t){clearTimeout(this.debounceTimer),t.length<this.minChars?this.showDropdown=!1:this.debounceTimer=setTimeout((()=>this.fetchSuggestions(t)),this.debounceMs)}async fetchSuggestions(t){if(this.targetPath){this.autocompleteLoading=!0,this.showDropdown=!0;try{const e=await fetch(this.autocompleteUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keyword:t,target_path:this.targetPath})});if(!e.ok)throw Error("autocomplete request failed");const s=await e.json();this.suggestions=s}catch{this.showDropdown=!1,this.suggestions=[]}finally{this.autocompleteLoading=!1}}else console.warn("[fast-input] target-path is required for autocomplete")}selectSuggestion(t){this.inputValue=t,this.showDropdown=!1,this.submit()}render(){return i("div",{key:"3a9d31c7b109205600addc326d63979585f10bcd",class:"fast-input"},i("input",{key:"8f238fe9e002f367d4939616be8c06d938d76045",type:"text",class:"fast-input__field",placeholder:this.placeholder,value:this.inputValue,onInput:this.handleInput,onKeyDown:this.handleKeydown,onBlur:this.handleBlur}),i("button",{key:"7b7404f13432750ece669da8ce68be15179921de",class:"fast-input__button",type:"button",onClick:()=>this.submit()},"Search"),this.enableAutocomplete&&this.showDropdown&&i("ul",{key:"1438bacadc21c183842a8bdaa3f336bffb152e14",class:"fast-input__dropdown"},this.autocompleteLoading?i("li",{class:"fast-input__dropdown-loading"},"Loading..."):this.suggestions.map((t=>i("li",{class:"fast-input__dropdown-item",onMouseDown:t=>{t.preventDefault()},onClick:()=>this.selectSuggestion(t.title)},t.title)))))}static get style(){return".fast-input{position:relative;display:inline-flex;gap:0.5rem}.fast-input__field{flex:1;padding:0.5rem 0.75rem;font-size:1rem;border:1px solid #ccc;border-radius:4px}.fast-input__button{padding:0.5rem 1rem;font-size:1rem;cursor:pointer;background:#0070f3;color:#fff;border:none;border-radius:4px}.fast-input__dropdown{position:absolute;top:100%;left:0;right:0;margin:0;padding:0;list-style:none;background:#fff;border:1px solid #ccc;border-top:none;border-radius:0 0 4px 4px;z-index:100;max-height:200px;overflow-y:auto}.fast-input__dropdown-item{padding:0.5rem 0.75rem;cursor:pointer}.fast-input__dropdown-item:hover{background:#f0f0f0}.fast-input__dropdown-loading{padding:0.5rem 0.75rem;color:#999;font-style:italic}"}},[512,"fast-input",{placeholder:[1],value:[1],paramName:[1,"param-name"],enableAutocomplete:[4,"enable-autocomplete"],autocompleteUrl:[1,"autocomplete-url"],targetPath:[1,"target-path"],debounceMs:[2,"debounce-ms"],minChars:[2,"min-chars"],inputValue:[32],suggestions:[32],showDropdown:[32],autocompleteLoading:[32]}]);function n(){"undefined"!=typeof customElements&&["fast-input"].forEach((e=>{"fast-input"===e&&(customElements.get(t(e))||customElements.define(t(e),a))}))}n();const r=a,d=n;export{r as FastInput,d as defineCustomElement}
1
+ import{t,p as e,H as s,c as i,h as a}from"./p-Bb27ylcX.js";const o=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.inputSubmit=i(this,"inputSubmit"),this.inputChanged=i(this,"inputChanged")}placeholder="Search...";value="";paramName="keyword";enableAutocomplete=!1;autocompleteUrl="/api/jobs/autocomplete";targetPath;debounceMs=300;minChars=3;inputSubmit;inputChanged;inputValue="";suggestions=[];showDropdown=!1;autocompleteLoading=!1;debounceTimer;popstateHandler;async getValue(){return this.inputValue}async getParamName(){return this.paramName}connectedCallback(){const t=this.getUrlParam();this.inputValue=null!==t?t:this.value,this.popstateHandler=()=>{this.inputValue=this.getUrlParam()??""},window.addEventListener("popstate",this.popstateHandler)}disconnectedCallback(){window.removeEventListener("popstate",this.popstateHandler),clearTimeout(this.debounceTimer)}getUrlParam(){return new URLSearchParams(window.location.search).get(this.paramName)}handleInput=t=>{const e=t.target.value;this.inputValue=e,this.inputChanged.emit({value:e}),this.enableAutocomplete&&this.scheduleAutocomplete(e)};handleKeydown=t=>{"Enter"===t.key?(t.preventDefault(),this.showDropdown=!1,this.inputSubmit.emit()):"Escape"===t.key&&(this.showDropdown=!1)};handleBlur=()=>{this.showDropdown=!1};scheduleAutocomplete(t){clearTimeout(this.debounceTimer),t.length<this.minChars?this.showDropdown=!1:this.debounceTimer=setTimeout((()=>this.fetchSuggestions(t)),this.debounceMs)}async fetchSuggestions(t){if(this.targetPath){this.autocompleteLoading=!0,this.showDropdown=!0;try{const e=await fetch(this.autocompleteUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keyword:t,target_path:this.targetPath})});if(!e.ok)throw Error("autocomplete request failed");const s=await e.json();this.suggestions=s}catch{this.showDropdown=!1,this.suggestions=[]}finally{this.autocompleteLoading=!1}}else console.warn("[fast-input] target-path is required for autocomplete")}selectSuggestion(t){this.inputValue=t,this.showDropdown=!1,this.inputSubmit.emit()}render(){return a("div",{key:"ea03f3dd68d0da4fc30cbc18a1ef66b5974a4f89",class:"fast-input"},a("input",{key:"31d85c4c90dde0e10ea9424b960c5e4f4a3ca54a",type:"text",class:"fast-input__field",placeholder:this.placeholder,value:this.inputValue,onInput:this.handleInput,onKeyDown:this.handleKeydown,onBlur:this.handleBlur}),this.enableAutocomplete&&this.showDropdown&&a("ul",{key:"0de6fd68709d906bafd2fec684f0a73045be3705",class:"fast-input__dropdown"},this.autocompleteLoading?a("li",{class:"fast-input__dropdown-loading"},"Loading..."):this.suggestions.map((t=>a("li",{class:"fast-input__dropdown-item",onMouseDown:t=>{t.preventDefault()},onClick:()=>this.selectSuggestion(t.title)},t.title)))))}static get style(){return".fast-input{position:relative;display:inline-block}.fast-input__field{padding:0.5rem 0.75rem;font-size:1rem;border:1px solid #ccc;border-radius:4px;width:100%;box-sizing:border-box}.fast-input__dropdown{position:absolute;top:100%;left:0;right:0;margin:0;padding:0;list-style:none;background:#fff;border:1px solid #ccc;border-top:none;border-radius:0 0 4px 4px;z-index:100;max-height:200px;overflow-y:auto}.fast-input__dropdown-item{padding:0.5rem 0.75rem;cursor:pointer}.fast-input__dropdown-item:hover{background:#f0f0f0}.fast-input__dropdown-loading{padding:0.5rem 0.75rem;color:#999;font-style:italic}"}},[512,"fast-input",{placeholder:[1],value:[1],paramName:[1,"param-name"],enableAutocomplete:[4,"enable-autocomplete"],autocompleteUrl:[1,"autocomplete-url"],targetPath:[1,"target-path"],debounceMs:[2,"debounce-ms"],minChars:[2,"min-chars"],inputValue:[32],suggestions:[32],showDropdown:[32],autocompleteLoading:[32],getValue:[64],getParamName:[64]}]);function n(){"undefined"!=typeof customElements&&["fast-input"].forEach((e=>{"fast-input"===e&&(customElements.get(t(e))||customElements.define(t(e),o))}))}n();const r=o,d=n;export{r as FastInput,d as defineCustomElement}
@@ -1 +1 @@
1
- export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-BiaJAQXY.js";function t(s,t,e){return(s||"")+(t?" "+t:"")+(e?" "+e:"")}export{t as format}
1
+ export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-Bb27ylcX.js";function t(s,t,e){return(s||"")+(t?" "+t:"")+(e?" "+e:"")}export{t as format}
@@ -1 +1 @@
1
- import{t as e,p as o,H as t,h as r}from"./p-BiaJAQXY.js";const a=o(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}job;index=0;applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;showCommuteTime=!1;streetFormat="{street}, {city_state_abbr}";rootClass="";extraFieldsConfig=[];formatDistance(e){const o=this.enableKilometers?"Km":"Miles";return`${(this.enableKilometers?1.60934*e:e).toFixed(1)} ${o}`.replace(".0","")}isEmpty(e){return null==e||""===e||!(!Array.isArray(e)||0!==e.length)}getJobData(){if(!this.job)return null;if("string"==typeof this.job)try{return JSON.parse(this.job)}catch{return console.warn("job-card: Failed to parse job JSON string"),null}return this.job}render(){const e=this.getJobData();if(!e)return null;const o=function(e){const o=e.locations;if(o?.length)return o[0]}(e),t=o?function(e){return e.cityStateAbbr?e.cityStateAbbr:[e.streetAddress,e.city,e.stateAbbr||e.state,e.countryAbbr||e.country].filter(Boolean).join(", ")||e.locationText||""}(o):"",a=o?.distance??0,n=a>0?this.formatDistance(a):"",s=e.applyURL||(e.originalURL?`${"undefined"!=typeof window?window.location.origin:""}${e.originalURL}`:"#"),i=`${this.applyButtonText}, ${e.title||""}`,c=e.locations??[],l=c.length>1;return r("div",{class:("job-card "+this.rootClass).trim()},r("div",{class:"job-card__header"},r("h3",{class:"job-card__title"},r("a",{class:"job-card__title--link",href:s,target:"_blank",rel:"noopener noreferrer"},e.title||""),this.showReference&&r("span",{class:"job-card__reference "+(e.reference?"":"job-card__reference--empty")},e.reference||""),e.isRemote&&r("span",{class:this.remoteLocationText?"job-card__remote":"job-card__remote job-card__remote--empty"},this.remoteLocationText)),n&&r("div",{class:"job-card__distance"},r("span",{class:"job-card__distance--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z"}),r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8v4l2 2"}))),r("span",{class:"job-card__distance--label"},n))),r("div",{class:"job-card__content"},r("div",{class:"job-card__info"},r("div",{class:c.length?"job-card__street":"job-card__street job-card__street--empty"},r("div",{class:"job-card__street--label__wrapper"},r("span",{class:"job-card__street--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"}),r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0z"}))),r("span",{class:"job-card__street--label"},t||"—")),l&&r("div",{class:"job-card__street--more-locations__wrapper"},r("span",{class:"job-card__street--amount"},"+",c.length-1),r("span",{class:"job-card__street--more-locations"},this.multiLocationText))),this.showBrand&&r("div",{class:e.brandName?"job-card__brand":"job-card__brand job-card__brand--empty"},r("span",{class:"job-card__brand--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008z"}))),r("span",{class:"job-card__brand--label"},e.brandName||"—")),this.showEmploymentType&&r("div",{class:e.employmentType?.length?"job-card__employment-type":"job-card__employment-type job-card__employment-type--empty"},r("span",{class:"job-card__employment-type--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"}))),e.employmentType?.length?e.employmentType?.map((e=>r("span",{key:e,class:"job-card__employment-type--label"},e))):r("span",{class:"job-card__employment-type--label"},"—")),(e.jobCardExtraFields??[]).length>0&&e.jobCardExtraFields?.map(((e,o)=>r("div",{key:o,class:this.isEmpty(e.value)?e.classname+"--empty":""+e.classname},Array.isArray(e.value)?e.value.map(((o,t)=>r("span",{key:t,class:e.classname+"--label"},o))):r("span",{class:e.classname+"--label"},e.value))))),r("a",{class:"job-card__apply",href:s,target:"_blank",rel:"noopener noreferrer","aria-label":i},r("span",{class:"job-card__apply--label"},this.applyButtonText),r("span",{class:"job-card__apply--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))))))}static get style(){return".job-card{display:block;padding:16px;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);transition:box-shadow 0.2s ease, border-color 0.2s ease}.job-card:hover{box-shadow:0 4px 8px rgba(0, 0, 0, 0.12);border-color:#d0d0d0}.job-card__header{margin-bottom:12px}.job-card__title{margin:0;font-size:18px;font-weight:700;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.job-card__title--link{text-decoration:none;color:#1f9755;transition:color 0.2s ease}.job-card__title--link:hover{text-decoration:underline;color:#1a7a43}.job-card__reference{font-size:0.875em;color:#666;background-color:#f5f5f5;padding:2px 6px;border-radius:3px}.job-card__reference--empty{display:none}.job-card__remote{background:#e8f5e9;color:#2e7d32;border-radius:100px;padding:4px 12px;text-transform:uppercase;font-size:11px;font-weight:700;line-height:1.5;white-space:nowrap}.job-card__remote--empty{display:none}.job-card__distance{display:inline-flex;align-items:center;gap:4px;margin-top:6px;font-size:13px;font-weight:500;color:#555}.job-card__distance--icon{display:inline-flex;align-items:center}.job-card__distance--icon svg{width:16px;height:16px;color:#1f9755}.job-card__content{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.job-card__info{flex:1;display:flex;flex-direction:column;gap:8px}.job-card__street,.job-card__brand,.job-card__employment-type{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;font-size:14px}.job-card__street--empty,.job-card__brand--empty,.job-card__employment-type--empty{color:#999}.job-card__street--icon,.job-card__brand--icon,.job-card__employment-type--icon{display:inline-flex;align-items:center;flex-shrink:0}.job-card__street--icon svg,.job-card__brand--icon svg,.job-card__employment-type--icon svg{width:16px;height:16px;color:#666}.job-card__street--label,.job-card__brand--label,.job-card__employment-type--label{color:#333}.job-card__street--label__wrapper{display:flex;align-items:center;gap:6px}.job-card__street--more-locations__wrapper{display:flex;align-items:center;gap:2px;font-size:12px;margin-left:2px}.job-card__street--amount{font-weight:600;color:#1f9755}.job-card__street--more-locations{color:#999}.job-card__apply{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;background-color:#198754;color:#fff;border-radius:4px;text-decoration:none;font-weight:600;font-size:14px;transition:background-color 0.2s ease, transform 0.1s ease;white-space:nowrap;flex-shrink:0}.job-card__apply:hover{background-color:#1a6f47;transform:translateY(-1px)}.job-card__apply:active{transform:translateY(0)}.job-card__apply--icon{display:inline-flex;align-items:center}.job-card__apply--icon svg{width:14px;height:14px}@media (max-width: 768px){.job-card{padding:12px}.job-card__content{flex-direction:column;gap:10px}.job-card__apply{width:100%;justify-content:center}.job-card__title{font-size:16px}}@media (max-width: 480px){.job-card{padding:10px}.job-card__title{font-size:15px}.job-card__distance{font-size:12px}.job-card__street,.job-card__brand,.job-card__employment-type{font-size:13px}}"}},[512,"job-card",{job:[1],index:[2],applyButtonText:[1,"apply-button-text"],showBrand:[4,"show-brand"],showReference:[4,"show-reference"],showEmploymentType:[4,"show-employment-type"],multiLocationText:[1,"multi-location-text"],remoteLocationText:[1,"remote-location-text"],enableKilometers:[4,"enable-kilometers"],showCommuteTime:[4,"show-commute-time"],streetFormat:[1,"street-format"],rootClass:[1,"root-class"],extraFieldsConfig:[16]}]);function n(){"undefined"!=typeof customElements&&["job-card"].forEach((o=>{"job-card"===o&&(customElements.get(e(o))||customElements.define(e(o),a))}))}n();const s=a,i=n;export{s as JobCard,i as defineCustomElement}
1
+ import{t as e,p as o,H as t,h as r}from"./p-Bb27ylcX.js";const a=o(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}job;index=0;applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;showCommuteTime=!1;streetFormat="{street}, {city_state_abbr}";rootClass="";extraFieldsConfig=[];formatDistance(e){const o=this.enableKilometers?"Km":"Miles";return`${(this.enableKilometers?1.60934*e:e).toFixed(1)} ${o}`.replace(".0","")}isEmpty(e){return null==e||""===e||!(!Array.isArray(e)||0!==e.length)}getJobData(){if(!this.job)return null;if("string"==typeof this.job)try{return JSON.parse(this.job)}catch{return console.warn("job-card: Failed to parse job JSON string"),null}return this.job}render(){const e=this.getJobData();if(!e)return null;const o=function(e){const o=e.locations;if(o?.length)return o[0]}(e),t=o?function(e){return e.cityStateAbbr?e.cityStateAbbr:[e.streetAddress,e.city,e.stateAbbr||e.state,e.countryAbbr||e.country].filter(Boolean).join(", ")||e.locationText||""}(o):"",a=o?.distance??0,n=a>0?this.formatDistance(a):"",s=e.applyURL||(e.originalURL?`${"undefined"!=typeof window?window.location.origin:""}${e.originalURL}`:"#"),i=`${this.applyButtonText}, ${e.title||""}`,c=e.locations??[],l=c.length>1;return r("div",{class:("job-card "+this.rootClass).trim()},r("div",{class:"job-card__header"},r("h3",{class:"job-card__title"},r("a",{class:"job-card__title--link",href:s,target:"_blank",rel:"noopener noreferrer"},e.title||""),this.showReference&&r("span",{class:"job-card__reference "+(e.reference?"":"job-card__reference--empty")},e.reference||""),e.isRemote&&r("span",{class:this.remoteLocationText?"job-card__remote":"job-card__remote job-card__remote--empty"},this.remoteLocationText)),n&&r("div",{class:"job-card__distance"},r("span",{class:"job-card__distance--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z"}),r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8v4l2 2"}))),r("span",{class:"job-card__distance--label"},n))),r("div",{class:"job-card__content"},r("div",{class:"job-card__info"},r("div",{class:c.length?"job-card__street":"job-card__street job-card__street--empty"},r("div",{class:"job-card__street--label__wrapper"},r("span",{class:"job-card__street--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"}),r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0z"}))),r("span",{class:"job-card__street--label"},t||"—")),l&&r("div",{class:"job-card__street--more-locations__wrapper"},r("span",{class:"job-card__street--amount"},"+",c.length-1),r("span",{class:"job-card__street--more-locations"},this.multiLocationText))),this.showBrand&&r("div",{class:e.brandName?"job-card__brand":"job-card__brand job-card__brand--empty"},r("span",{class:"job-card__brand--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008z"}))),r("span",{class:"job-card__brand--label"},e.brandName||"—")),this.showEmploymentType&&r("div",{class:e.employmentType?.length?"job-card__employment-type":"job-card__employment-type job-card__employment-type--empty"},r("span",{class:"job-card__employment-type--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"}))),e.employmentType?.length?e.employmentType?.map((e=>r("span",{key:e,class:"job-card__employment-type--label"},e))):r("span",{class:"job-card__employment-type--label"},"—")),(e.jobCardExtraFields??[]).length>0&&e.jobCardExtraFields?.map(((e,o)=>r("div",{key:o,class:this.isEmpty(e.value)?e.classname+"--empty":""+e.classname},Array.isArray(e.value)?e.value.map(((o,t)=>r("span",{key:t,class:e.classname+"--label"},o))):r("span",{class:e.classname+"--label"},e.value))))),r("a",{class:"job-card__apply",href:s,target:"_blank",rel:"noopener noreferrer","aria-label":i},r("span",{class:"job-card__apply--label"},this.applyButtonText),r("span",{class:"job-card__apply--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))))))}static get style(){return".job-card{display:block;padding:16px;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);transition:box-shadow 0.2s ease, border-color 0.2s ease}.job-card:hover{box-shadow:0 4px 8px rgba(0, 0, 0, 0.12);border-color:#d0d0d0}.job-card__header{margin-bottom:12px}.job-card__title{margin:0;font-size:18px;font-weight:700;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.job-card__title--link{text-decoration:none;color:#1f9755;transition:color 0.2s ease}.job-card__title--link:hover{text-decoration:underline;color:#1a7a43}.job-card__reference{font-size:0.875em;color:#666;background-color:#f5f5f5;padding:2px 6px;border-radius:3px}.job-card__reference--empty{display:none}.job-card__remote{background:#e8f5e9;color:#2e7d32;border-radius:100px;padding:4px 12px;text-transform:uppercase;font-size:11px;font-weight:700;line-height:1.5;white-space:nowrap}.job-card__remote--empty{display:none}.job-card__distance{display:inline-flex;align-items:center;gap:4px;margin-top:6px;font-size:13px;font-weight:500;color:#555}.job-card__distance--icon{display:inline-flex;align-items:center}.job-card__distance--icon svg{width:16px;height:16px;color:#1f9755}.job-card__content{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.job-card__info{flex:1;display:flex;flex-direction:column;gap:8px}.job-card__street,.job-card__brand,.job-card__employment-type{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;font-size:14px}.job-card__street--empty,.job-card__brand--empty,.job-card__employment-type--empty{color:#999}.job-card__street--icon,.job-card__brand--icon,.job-card__employment-type--icon{display:inline-flex;align-items:center;flex-shrink:0}.job-card__street--icon svg,.job-card__brand--icon svg,.job-card__employment-type--icon svg{width:16px;height:16px;color:#666}.job-card__street--label,.job-card__brand--label,.job-card__employment-type--label{color:#333}.job-card__street--label__wrapper{display:flex;align-items:center;gap:6px}.job-card__street--more-locations__wrapper{display:flex;align-items:center;gap:2px;font-size:12px;margin-left:2px}.job-card__street--amount{font-weight:600;color:#1f9755}.job-card__street--more-locations{color:#999}.job-card__apply{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;background-color:#198754;color:#fff;border-radius:4px;text-decoration:none;font-weight:600;font-size:14px;transition:background-color 0.2s ease, transform 0.1s ease;white-space:nowrap;flex-shrink:0}.job-card__apply:hover{background-color:#1a6f47;transform:translateY(-1px)}.job-card__apply:active{transform:translateY(0)}.job-card__apply--icon{display:inline-flex;align-items:center}.job-card__apply--icon svg{width:14px;height:14px}@media (max-width: 768px){.job-card{padding:12px}.job-card__content{flex-direction:column;gap:10px}.job-card__apply{width:100%;justify-content:center}.job-card__title{font-size:16px}}@media (max-width: 480px){.job-card{padding:10px}.job-card__title{font-size:15px}.job-card__distance{font-size:12px}.job-card__street,.job-card__brand,.job-card__employment-type{font-size:13px}}"}},[512,"job-card",{job:[1],index:[2],applyButtonText:[1,"apply-button-text"],showBrand:[4,"show-brand"],showReference:[4,"show-reference"],showEmploymentType:[4,"show-employment-type"],multiLocationText:[1,"multi-location-text"],remoteLocationText:[1,"remote-location-text"],enableKilometers:[4,"enable-kilometers"],showCommuteTime:[4,"show-commute-time"],streetFormat:[1,"street-format"],rootClass:[1,"root-class"],extraFieldsConfig:[16]}]);function n(){"undefined"!=typeof customElements&&["job-card"].forEach((o=>{"job-card"===o&&(customElements.get(e(o))||customElements.define(e(o),a))}))}n();const s=a,i=n;export{s as JobCard,i as defineCustomElement}
@@ -1 +1 @@
1
- import{J as o,d as s}from"./p-DQiaLjLf.js";const a=o,p=s;export{a as JobsItem,p as defineCustomElement}
1
+ import{J as s,d as o}from"./p-CzgtwPsc.js";const t=s,p=o;export{t as JobsItem,p as defineCustomElement}
@@ -1 +1 @@
1
- import{t as e,p as t,H as s,c as o,h as i}from"./p-BiaJAQXY.js";import{d as a}from"./p-DQiaLjLf.js";const r=[{title:"Senior Software Engineer",reference:"REF-001",originalURL:"/jobs/senior-software-engineer",applyURL:"https://apply.example.com/1",brandName:"Engineering",isRemote:!1,locations:[{city:"San Francisco",stateAbbr:"CA",countryAbbr:"US",distance:5.2,streetAddress:"123 Market St",cityStateAbbr:"San Francisco, CA"}],employmentType:["Full-time","Permanent"]},{title:"Product Manager",reference:"",originalURL:"/jobs/product-manager",brandName:"Product",isRemote:!0,locations:[],employmentType:["Full-time"]},{title:"UX Designer",reference:"REF-003",originalURL:"/jobs/ux-designer",brandName:"Design",isRemote:!1,locations:[{city:"New York",stateAbbr:"NY",countryAbbr:"US",distance:0,cityStateAbbr:"New York, NY"},{city:"Boston",stateAbbr:"MA",countryAbbr:"US",cityStateAbbr:"Boston, MA"}],employmentType:["Full-time","Contract"]}],n=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.fetchComplete=o(this,"fetchComplete")}mockData=!1;jobs=[];loading=!1;totalJob=0;noResultsLine1="Sorry, we're not able to load results for your search.";noResultsLine2="Please refine your keywords in the search bar above and try again.";applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;streetFormat="{street}, {city_state_abbr}";multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;rootClass="";showCountText="";showSuggestions=!1;clearResultSuggestionsTitleText="Suggestions";clearResultSuggestionsLine1="Try different keywords";clearResultSuggestionsLine2="Make sure everything is spelled correctly";clearResultSuggestionsLine3="Try other locations";clearResultSuggestionsLine4="";autoFetch=!1;apiUrl="/api/get-jobs";watchParams="keyword";fetchedJobs=[];fetchedTotal=0;fetchLoading=!1;fetchComplete;searchExecutedHandler;popstateHandler;connectedCallback(){this.autoFetch&&(this.fetchJobs(),this.searchExecutedHandler=()=>this.fetchJobs(),this.popstateHandler=()=>this.fetchJobs(),document.addEventListener("search-executed",this.searchExecutedHandler),window.addEventListener("popstate",this.popstateHandler))}disconnectedCallback(){this.autoFetch&&(document.removeEventListener("search-executed",this.searchExecutedHandler),window.removeEventListener("popstate",this.popstateHandler))}async fetchJobs(){this.fetchLoading=!0;const e=new URLSearchParams(window.location.search),t=this.watchParams.split(",").map((e=>e.trim())).filter(Boolean),s=new URLSearchParams;for(const o of t){const t=e.get(o);null!==t&&s.set(o,t)}const o=`${this.apiUrl}?${""+s}`;try{const e=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({disable_switch_search_mode:!1})});if(!e.ok)throw Error("fetch failed");const t=await e.json();this.fetchedJobs=t.jobs,this.fetchedTotal=t.totalJob,this.fetchComplete.emit({jobs:t.jobs,totalJob:t.totalJob})}catch{}finally{this.fetchLoading=!1}}renderCountText(e,t){return this.showCountText.replace("{count}",e+"").replace("{total}",t+"")}getJobsArray(){if(this.mockData)return r;if(this.autoFetch)return this.fetchedJobs;const e=this.jobs;if(Array.isArray(e))return e;if("string"==typeof e)try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}return[]}renderJobItem(e,t){return i("jobs-item",{job:e,index:t,applyButtonText:this.applyButtonText,showBrand:this.showBrand,showReference:this.showReference,showEmploymentType:this.showEmploymentType,multiLocationText:this.multiLocationText,remoteLocationText:this.remoteLocationText,enableKilometers:this.enableKilometers})}render(){const e=this.getJobsArray(),t=!this.mockData&&(this.autoFetch?this.fetchLoading:this.loading),s=this.mockData?e.length:this.autoFetch?this.fetchedTotal:this.totalJob||e.length,o=!t&&0===s&&!this.showSuggestions,a=!t&&0===s&&this.showSuggestions;return i("div",{key:"1116855473d28d650641b9d962243bfcdcb434ec",class:("jobs-list-root "+this.rootClass).trim()},i("div",{key:"fcef04f1da9ad4e150af9f59921688f5781d9d43",class:"results-container"},this.autoFetch&&this.fetchLoading&&i("div",{key:"75b157c82c89691c7ce73d12ea0144b3b45485c3",class:"jobs-list-only__loading"},"Loading..."),i("div",{key:"b09f9879e10ee4a93e32177611912da5f19f3526",class:t?"loader":"loader hide","aria-hidden":!t}),s>0&&this.showCountText&&i("p",{key:"d10f800fb0a33d82531d5f1728bac4ceba2ed577",class:"jobs-list-only__count"},this.renderCountText(e.length,s)),s>0&&i("div",{key:"18153ed1338bd48f7be4f043b11ce15e3271f27b",class:"card"},i("ul",{key:"766e128b1fd5adb456530ae39e92ba8eb0b5d6cf",class:"results-list front"},e.map(((e,t)=>this.renderJobItem(e,t))))),o&&i("div",{key:"ed6f3d2bd2bbedabd6e69d508ea1425580e6941f",class:"share-jobs__no-results"},i("h2",{key:"2302656e33340c69e84cb949afb7256b8f35f440"},this.noResultsLine1),i("h3",{key:"1c7e6642441a96c04ee26883fdec4f81b0fe6cec"},this.noResultsLine2)),a&&i("div",{key:"be7af85f64455918545e88952ca6ff00f0a970c5",class:"card primary-color"},i("h4",{key:"2f63deb8131190eff882308544b15f767b6f3edc",class:"result-suggestions-title"},this.clearResultSuggestionsTitleText,":"),i("ul",{key:"cb18daaa9e2c2c442c5b906ed370dcd653b5262d",class:"results-list front"},i("li",{key:"ff1d5c6518b75c0daa35b43df7162b0dfecde25e",class:"result-suggestions-line"},this.clearResultSuggestionsLine1),i("li",{key:"4099fd7bf8dcf114eca28702a498ab0938f5de46",class:"result-suggestions-line"},this.clearResultSuggestionsLine2),i("li",{key:"fb65b54c3c0b14bc58112977eb4c7c56c1246a45",class:"result-suggestions-line"},this.clearResultSuggestionsLine3),this.clearResultSuggestionsLine4&&i("li",{key:"10f745e74cf68a2b1c42e6f49f810a8b59eb27b6",class:"result-suggestions-line"},this.clearResultSuggestionsLine4)))))}static get style(){return":host{display:block}.jobs-list-root{list-style:none}.results-container{position:relative}.loader{display:inline-block;width:24px;height:24px;border:2px solid #ddd;border-top-color:#1f9755;border-radius:50%;animation:jobs-list-spin 0.8s linear infinite}.loader.hide{display:none}@keyframes jobs-list-spin{to{transform:rotate(360deg)}}.card{border:0}.results-list{list-style:none;margin:0;padding:0;display:block}.results-list.front{margin:3px 0}.share-jobs__no-results{padding:24px;text-align:center}.share-jobs__no-results h2,.share-jobs__no-results h3{margin:8px 0;font-weight:600}.card.primary-color{padding:16px;border-radius:4px;background:#f8f9fa}.result-suggestions-title{margin:0 0 12px 0;font-size:16px}.results-list .result-suggestions-line{list-style:none;margin:4px 0}"}},[512,"jobs-list-only",{mockData:[4,"mock-data"],jobs:[1],loading:[4],totalJob:[2,"total-job"],noResultsLine1:[1,"no-results-line-1"],noResultsLine2:[1,"no-results-line-2"],applyButtonText:[1,"apply-button-text"],showBrand:[4,"show-brand"],showReference:[4,"show-reference"],showEmploymentType:[4,"show-employment-type"],streetFormat:[1,"street-format"],multiLocationText:[1,"multi-location-text"],remoteLocationText:[1,"remote-location-text"],enableKilometers:[4,"enable-kilometers"],rootClass:[1,"root-class"],showCountText:[1,"show-count-text"],showSuggestions:[4,"show-suggestions"],clearResultSuggestionsTitleText:[1,"clear-result-suggestions-title-text"],clearResultSuggestionsLine1:[1,"clear-result-suggestions-line-1"],clearResultSuggestionsLine2:[1,"clear-result-suggestions-line-2"],clearResultSuggestionsLine3:[1,"clear-result-suggestions-line-3"],clearResultSuggestionsLine4:[1,"clear-result-suggestions-line-4"],autoFetch:[4,"auto-fetch"],apiUrl:[1,"api-url"],watchParams:[1,"watch-params"],fetchedJobs:[32],fetchedTotal:[32],fetchLoading:[32]}]);function l(){"undefined"!=typeof customElements&&["jobs-list-only","jobs-item"].forEach((t=>{switch(t){case"jobs-list-only":customElements.get(e(t))||customElements.define(e(t),n);break;case"jobs-item":customElements.get(e(t))||a()}}))}l();const c=n,d=l;export{c as JobsListOnly,d as defineCustomElement}
1
+ import{t as e,p as t,H as s,c as o,h as i}from"./p-Bb27ylcX.js";import{d as a}from"./p-CzgtwPsc.js";const r=[{title:"Senior Software Engineer",reference:"REF-001",originalURL:"/jobs/senior-software-engineer",applyURL:"https://apply.example.com/1",brandName:"Engineering",isRemote:!1,locations:[{city:"San Francisco",stateAbbr:"CA",countryAbbr:"US",distance:5.2,streetAddress:"123 Market St",cityStateAbbr:"San Francisco, CA"}],employmentType:["Full-time","Permanent"]},{title:"Product Manager",reference:"",originalURL:"/jobs/product-manager",brandName:"Product",isRemote:!0,locations:[],employmentType:["Full-time"]},{title:"UX Designer",reference:"REF-003",originalURL:"/jobs/ux-designer",brandName:"Design",isRemote:!1,locations:[{city:"New York",stateAbbr:"NY",countryAbbr:"US",distance:0,cityStateAbbr:"New York, NY"},{city:"Boston",stateAbbr:"MA",countryAbbr:"US",cityStateAbbr:"Boston, MA"}],employmentType:["Full-time","Contract"]}],n=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.fetchComplete=o(this,"fetchComplete")}mockData=!1;jobs=[];loading=!1;totalJob=0;noResultsLine1="Sorry, we're not able to load results for your search.";noResultsLine2="Please refine your keywords in the search bar above and try again.";applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;streetFormat="{street}, {city_state_abbr}";multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;rootClass="";showCountText="";showSuggestions=!1;clearResultSuggestionsTitleText="Suggestions";clearResultSuggestionsLine1="Try different keywords";clearResultSuggestionsLine2="Make sure everything is spelled correctly";clearResultSuggestionsLine3="Try other locations";clearResultSuggestionsLine4="";autoFetch=!1;apiUrl="/api/get-jobs";watchParams="keyword";fetchedJobs=[];fetchedTotal=0;fetchLoading=!1;fetchComplete;searchExecutedHandler;popstateHandler;connectedCallback(){this.autoFetch&&(this.fetchJobs(),this.searchExecutedHandler=()=>this.fetchJobs(),this.popstateHandler=()=>this.fetchJobs(),document.addEventListener("search-executed",this.searchExecutedHandler),window.addEventListener("popstate",this.popstateHandler))}disconnectedCallback(){this.autoFetch&&(document.removeEventListener("search-executed",this.searchExecutedHandler),window.removeEventListener("popstate",this.popstateHandler))}async fetchJobs(){this.fetchLoading=!0;const e=new URLSearchParams(window.location.search),t=this.watchParams.split(",").map((e=>e.trim())).filter(Boolean),s=new URLSearchParams;for(const o of t){const t=e.get(o);null!==t&&s.set(o,t)}const o=`${this.apiUrl}?${""+s}`;try{const e=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({disable_switch_search_mode:!1})});if(!e.ok)throw Error("fetch failed");const t=await e.json();this.fetchedJobs=t.jobs,this.fetchedTotal=t.totalJob,this.fetchComplete.emit({jobs:t.jobs,totalJob:t.totalJob})}catch{}finally{this.fetchLoading=!1}}renderCountText(e,t){return this.showCountText.replace("{count}",e+"").replace("{total}",t+"")}getJobsArray(){if(this.mockData)return r;if(this.autoFetch)return this.fetchedJobs;const e=this.jobs;if(Array.isArray(e))return e;if("string"==typeof e)try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}return[]}renderJobItem(e,t){return i("jobs-item",{job:e,index:t,applyButtonText:this.applyButtonText,showBrand:this.showBrand,showReference:this.showReference,showEmploymentType:this.showEmploymentType,multiLocationText:this.multiLocationText,remoteLocationText:this.remoteLocationText,enableKilometers:this.enableKilometers})}render(){const e=this.getJobsArray(),t=!this.mockData&&(this.autoFetch?this.fetchLoading:this.loading),s=this.mockData?e.length:this.autoFetch?this.fetchedTotal:this.totalJob||e.length,o=!t&&0===s&&!this.showSuggestions,a=!t&&0===s&&this.showSuggestions;return i("div",{key:"1974ecb7e1ded8237d851560fc4b20dd63b4e941",class:("jobs-list-root "+this.rootClass).trim()},i("div",{key:"3d80283e8508cbe9ec4aa4516a6f832479374e08",class:"results-container"},this.autoFetch&&this.fetchLoading&&i("div",{key:"c5d3c5362a10ce2442925093118d3436227e8058",class:"jobs-list-only__loading"},"Loading..."),i("div",{key:"c68e5aebee17cce16947029031b63364ab25ecda",class:t?"loader":"loader hide","aria-hidden":!t}),s>0&&this.showCountText&&i("p",{key:"e353fa146040fed1aed050ed3ed833903efcdf41",class:"jobs-list-only__count"},this.renderCountText(e.length,s)),s>0&&i("div",{key:"e38346f641a1e776a7e70525bf8f3a6a38b6eea5",class:"card"},i("ul",{key:"db82d99df76e33ad6041d4ec8dd7908cdf8b89d7",class:"results-list front"},e.map(((e,t)=>this.renderJobItem(e,t))))),o&&i("div",{key:"8bd8f45ddb9fcd534c7f386919c1e6cd7a4fb6f3",class:"share-jobs__no-results"},i("h2",{key:"228d32e9dd38f61bcec9f522d3bc4207e17b5365"},this.noResultsLine1),i("h3",{key:"4289b10974936669a00afba6f1d55e33874198b1"},this.noResultsLine2)),a&&i("div",{key:"949e1fe01b2db39a69729a9fbc2eebaf2ea461ba",class:"card primary-color"},i("h4",{key:"af3361f98987a3a19d45afc1174a99fc4174a65a",class:"result-suggestions-title"},this.clearResultSuggestionsTitleText,":"),i("ul",{key:"d7b9236dbbeb9f9596d642aa588d1c1305ed658b",class:"results-list front"},i("li",{key:"0e65c9b985e5708096c8a4b0ea1455b6696db6dd",class:"result-suggestions-line"},this.clearResultSuggestionsLine1),i("li",{key:"a7fe8459960af60acc81822b48436a32c0e4ad0c",class:"result-suggestions-line"},this.clearResultSuggestionsLine2),i("li",{key:"1e41d5730de755d6b2cb9e5fbda33704816f9096",class:"result-suggestions-line"},this.clearResultSuggestionsLine3),this.clearResultSuggestionsLine4&&i("li",{key:"9ab1bee87135bfda9996b2c99134597475bfaecb",class:"result-suggestions-line"},this.clearResultSuggestionsLine4)))))}static get style(){return":host{display:block}.jobs-list-root{list-style:none}.results-container{position:relative}.loader{display:inline-block;width:24px;height:24px;border:2px solid #ddd;border-top-color:#1f9755;border-radius:50%;animation:jobs-list-spin 0.8s linear infinite}.loader.hide{display:none}@keyframes jobs-list-spin{to{transform:rotate(360deg)}}.card{border:0}.results-list{list-style:none;margin:0;padding:0;display:block}.results-list.front{margin:3px 0}.share-jobs__no-results{padding:24px;text-align:center}.share-jobs__no-results h2,.share-jobs__no-results h3{margin:8px 0;font-weight:600}.card.primary-color{padding:16px;border-radius:4px;background:#f8f9fa}.result-suggestions-title{margin:0 0 12px 0;font-size:16px}.results-list .result-suggestions-line{list-style:none;margin:4px 0}"}},[512,"jobs-list-only",{mockData:[4,"mock-data"],jobs:[1],loading:[4],totalJob:[2,"total-job"],noResultsLine1:[1,"no-results-line-1"],noResultsLine2:[1,"no-results-line-2"],applyButtonText:[1,"apply-button-text"],showBrand:[4,"show-brand"],showReference:[4,"show-reference"],showEmploymentType:[4,"show-employment-type"],streetFormat:[1,"street-format"],multiLocationText:[1,"multi-location-text"],remoteLocationText:[1,"remote-location-text"],enableKilometers:[4,"enable-kilometers"],rootClass:[1,"root-class"],showCountText:[1,"show-count-text"],showSuggestions:[4,"show-suggestions"],clearResultSuggestionsTitleText:[1,"clear-result-suggestions-title-text"],clearResultSuggestionsLine1:[1,"clear-result-suggestions-line-1"],clearResultSuggestionsLine2:[1,"clear-result-suggestions-line-2"],clearResultSuggestionsLine3:[1,"clear-result-suggestions-line-3"],clearResultSuggestionsLine4:[1,"clear-result-suggestions-line-4"],autoFetch:[4,"auto-fetch"],apiUrl:[1,"api-url"],watchParams:[1,"watch-params"],fetchedJobs:[32],fetchedTotal:[32],fetchLoading:[32]}]);function l(){"undefined"!=typeof customElements&&["jobs-list-only","jobs-item"].forEach((t=>{switch(t){case"jobs-list-only":customElements.get(e(t))||customElements.define(e(t),n);break;case"jobs-item":customElements.get(e(t))||a()}}))}l();const c=n,d=l;export{c as JobsListOnly,d as defineCustomElement}