@widelab-nc/widelab 1.0.1
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.
- package/README.md +222 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +7 -0
- package/dist/style.css +0 -0
- package/dist/style.css.map +7 -0
- package/package.json +55 -0
- package/src/index.js +22 -0
package/README.md
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# Widelab Starter Pack
|
|
2
|
+
|
|
3
|
+
It's a starter template created as a copy of the Finsweet template.
|
|
4
|
+
|
|
5
|
+
Before starting to work with this template, please take some time to read through the documentation.
|
|
6
|
+
|
|
7
|
+
## Reference
|
|
8
|
+
|
|
9
|
+
- [Included tools](#included-tools)
|
|
10
|
+
- [Requirements](#requirements)
|
|
11
|
+
- [Getting started](#getting-started)
|
|
12
|
+
- [Installing](#installing)
|
|
13
|
+
- [Building](#building)
|
|
14
|
+
- [Serving files on development mode](#serving-files-on-development-mode)
|
|
15
|
+
- [Building multiple files](#building-multiple-files)
|
|
16
|
+
- [Setting up a path alias](#setting-up-a-path-alias)
|
|
17
|
+
- [Contributing guide](#contributing-guide)
|
|
18
|
+
- [Pre-defined scripts](#pre-defined-scripts)
|
|
19
|
+
- [CI/CD](#cicd)
|
|
20
|
+
- [Continuous Integration](#continuous-integration)
|
|
21
|
+
- [Continuous Deployment](#continuous-deployment)
|
|
22
|
+
- [How to automatically deploy updates to npm](#how-to-automatically-deploy-updates-to-npm)
|
|
23
|
+
|
|
24
|
+
## Included tools
|
|
25
|
+
|
|
26
|
+
This template contains some preconfigured development tools:
|
|
27
|
+
|
|
28
|
+
- [Typescript](https://www.typescriptlang.org/): A superset of Javascript that adds an additional layer of Typings, bringing more security and efficiency to the written code.
|
|
29
|
+
- [Prettier](https://prettier.io/): Code formatting that assures consistency across all Finsweet's projects.
|
|
30
|
+
- [ESLint](https://eslint.org/): Code linting that enforces industries' best practices. It uses [our own custom configuration](https://github.com/finsweet/eslint-config) to maintain consistency across all Finsweet's projects.
|
|
31
|
+
- [Playwright](https://playwright.dev/): Fast and reliable end-to-end testing.
|
|
32
|
+
- [esbuild](https://esbuild.github.io/): Javascript bundler that compiles, bundles and minifies the original Typescript files.
|
|
33
|
+
- [Changesets](https://github.com/changesets/changesets): A way to manage your versioning and changelogs.
|
|
34
|
+
- [Finsweet's TypeScript Utils](https://github.com/finsweet/ts-utils): Some utilities to help you in your Webflow development.
|
|
35
|
+
|
|
36
|
+
## Requirements
|
|
37
|
+
|
|
38
|
+
This template requires the use of [pnpm](https://pnpm.js.org/en/). You can [install pnpm](https://pnpm.io/installation) with:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm i -g pnpm
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
To enable automatic deployments to npm, please read the [Continuous Deployment](#continuous-deployment) section.
|
|
45
|
+
|
|
46
|
+
## Getting started
|
|
47
|
+
|
|
48
|
+
The quickest way to start developing a new project is by [creating a new repository from this template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template).
|
|
49
|
+
|
|
50
|
+
Once the new repository has been created, update the `package.json` file with the correct information, specially the name of the package which has to be unique.
|
|
51
|
+
|
|
52
|
+
### Installing
|
|
53
|
+
|
|
54
|
+
After creating the new repository, open it in your terminal and install the packages by running:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pnpm install
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
If this is the first time using Playwright and you want to use it in this project, you'll also have to install the browsers by running:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pnpm playwright install
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
You can read more about the use of Playwright in the [Testing](#testing) section.
|
|
67
|
+
|
|
68
|
+
It is also recommended that you install the following extensions in your VSCode editor:
|
|
69
|
+
|
|
70
|
+
- [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
|
|
71
|
+
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
|
|
72
|
+
|
|
73
|
+
### Building
|
|
74
|
+
|
|
75
|
+
To build the files, you have two defined scripts:
|
|
76
|
+
|
|
77
|
+
- `pnpm dev`: Builds and creates a local server that serves all files (check [Serving files on development mode](#serving-files-on-development-mode) for more info).
|
|
78
|
+
- `pnpm build`: Builds to the production directory (`dist`).
|
|
79
|
+
|
|
80
|
+
### Serving files on development mode
|
|
81
|
+
|
|
82
|
+
When you run `pnpm dev`, two things happen:
|
|
83
|
+
|
|
84
|
+
- esbuild is set to `watch` mode. Every time that you save your files, the project will be rebuilt.
|
|
85
|
+
- A local server is created under `http://localhost:3000` that serves all your project files. You can import them in your Webflow projects like:
|
|
86
|
+
|
|
87
|
+
```html
|
|
88
|
+
<script defer src="http://localhost:3000/{FILE_PATH}.js"></script>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
- Live Reloading is enabled by default, meaning that every time you save a change in your files, the website you're working on will reload automatically. You can disable it in `/bin/build.js`.
|
|
92
|
+
|
|
93
|
+
### Building multiple files
|
|
94
|
+
|
|
95
|
+
If you need to build multiple files into different outputs, you can do it by updating the build settings.
|
|
96
|
+
|
|
97
|
+
In `bin/build.js`, update the `ENTRY_POINTS` array with any files you'd like to build:
|
|
98
|
+
|
|
99
|
+
```javascript
|
|
100
|
+
const entryPoints = [
|
|
101
|
+
'src/home/index.ts',
|
|
102
|
+
'src/contact/whatever.ts',
|
|
103
|
+
'src/hooyah.ts',
|
|
104
|
+
'src/home/other.ts',
|
|
105
|
+
];
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
This will tell `esbuild` to build all those files and output them in the `dist` folder for production and in `http://localhost:3000` for development.
|
|
109
|
+
|
|
110
|
+
### Setting up a path alias
|
|
111
|
+
|
|
112
|
+
Path aliases are very helpful to avoid code like:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import example from '../../../../utils/example';
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Instead, we can create path aliases that map to a specific folder, so the code becomes cleaner like:
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
import example from '$utils/example';
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
You can set up path aliases using the `paths` setting in `tsconfig.json`. This template has an already predefined path as an example:
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"paths": {
|
|
129
|
+
"$utils/*": ["src/utils/*"]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
To avoid any surprises, take some time to familiarize yourself with the [tsconfig](/tsconfig.json) enabled flags.
|
|
135
|
+
|
|
136
|
+
## Testing
|
|
137
|
+
|
|
138
|
+
As previously mentioned, this library has [Playwright](https://playwright.dev/) included as an automated testing tool.
|
|
139
|
+
|
|
140
|
+
All tests are located under the `/tests` folder. This template includes a test spec example that will help you catch up with Playwright.
|
|
141
|
+
|
|
142
|
+
After [installing the dependencies](#installing), you can try it out by running `pnpm test`.
|
|
143
|
+
Make sure you replace it with your own tests! Writing proper tests will help improve the maintainability and scalability of your project in the long term.
|
|
144
|
+
|
|
145
|
+
By default, Playwright will also run `pnpm dev` in the background while the tests are running, so [your files served](#serving-files-on-development-mode) under `localhost:3000` will run as usual.
|
|
146
|
+
You can disable this behavior in the `playwright.config.ts` file.
|
|
147
|
+
|
|
148
|
+
If you project doesn't require any testing, you should disable the Tests job in the [CI workflow](#continuous-integration) by commenting it out in the `.github/workflows/ci.yml` file.
|
|
149
|
+
This will prevent the tests from running when you open a Pull Request.
|
|
150
|
+
|
|
151
|
+
## Contributing guide
|
|
152
|
+
|
|
153
|
+
In general, your development workflow should look like this:
|
|
154
|
+
|
|
155
|
+
1. Create a new branch where to develop a new feature or bug fix.
|
|
156
|
+
2. Once you've finished the implementation, [create a Changeset](#continuous-deployment) (or multiple) explaining the changes that you've made in the codebase.
|
|
157
|
+
3. Open a Pull Request and wait until the [CI workflows](#continuous-integration) finish. If something fails, please try to fix it before merging the PR.
|
|
158
|
+
If you don't want to wait for the CI workflows to run on GitHub to know if something fails, it will be always faster to run them in your machine before opening a PR.
|
|
159
|
+
4. Merge the Pull Request. The Changesets bot will automatically open a new PR with updates to the `CHANGELOG.md`, you should also merge that one. If you have [automatic npm deployments](#how-to-automatically-deploy-updates-to-npm) enabled, Changesets will also publish this new version on npm.
|
|
160
|
+
|
|
161
|
+
If you need to work on several features before publishing a new version on npm, it is a good practise to create a `development` branch where to merge all the PR's before pushing your code to master.
|
|
162
|
+
|
|
163
|
+
## Pre-defined scripts
|
|
164
|
+
|
|
165
|
+
This template contains a set of predefined scripts in the `package.json` file:
|
|
166
|
+
|
|
167
|
+
- `pnpm dev`: Builds and creates a local server that serves all files (check [Serving files on development mode](#serving-files-on-development-mode) for more info).
|
|
168
|
+
- `pnpm build`: Builds to the production directory (`dist`).
|
|
169
|
+
- `pnpm lint`: Scans the codebase with ESLint and Prettier to see if there are any errors.
|
|
170
|
+
- `pnpm lint:fix`: Fixes all auto-fixable issues in ESLint.
|
|
171
|
+
- `pnpm check`: Checks for TypeScript errors in the codebase.
|
|
172
|
+
- `pnpm format`: Formats all the files in the codebase using Prettier. You probably won't need this script if you have automatic [formatting on save](https://www.digitalocean.com/community/tutorials/code-formatting-with-prettier-in-visual-studio-code#automatically-format-on-save) active in your editor.
|
|
173
|
+
- `pnpm test`: Will run all the tests that are located in the `/tests` folder.
|
|
174
|
+
- `pnpm test:headed`: Will run all the tests that are located in the `/tests` folder visually in headed browsers.
|
|
175
|
+
- `pnpm release`: This command is defined for [Changesets](https://github.com/changesets/changesets). You don't have to interact with it.
|
|
176
|
+
- `pnpm run update`: Scans the dependencies of the project and provides an interactive UI to select the ones that you want to update.
|
|
177
|
+
|
|
178
|
+
## CI/CD
|
|
179
|
+
|
|
180
|
+
This template contains a set of helpers with proper CI/CD workflows.
|
|
181
|
+
|
|
182
|
+
### Continuous Integration
|
|
183
|
+
|
|
184
|
+
When you open a Pull Request, a Continuous Integration workflow will run to:
|
|
185
|
+
|
|
186
|
+
- Lint & check your code. It uses the `pnpm lint` and `pnpm check` commands under the hood.
|
|
187
|
+
- Run the automated tests. It uses the `pnpm test` command under the hood.
|
|
188
|
+
|
|
189
|
+
If any of these jobs fail, you will get a warning in your Pull Request and should try to fix your code accordingly.
|
|
190
|
+
|
|
191
|
+
**Note:** If your project doesn't contain any defined tests in the `/tests` folder, you can skip the Tests workflow job by commenting it out in the `.github/workflows/ci.yml` file. This will significantly improve the workflow running times.
|
|
192
|
+
|
|
193
|
+
### Continuous Deployment
|
|
194
|
+
|
|
195
|
+
[Changesets](https://github.com/changesets/changesets) allows us to generate automatic changelog updates when merging a Pull Request to the `master` branch.
|
|
196
|
+
|
|
197
|
+
To generate a new changelog, run:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
pnpm changeset
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
You'll be prompted with a few questions to complete the changelog.
|
|
204
|
+
|
|
205
|
+
Once the Pull Request is merged into `master`, a new Pull Request will automatically be opened by a changesets bot that bumps the package version and updates the `CHANGELOG.md` file.
|
|
206
|
+
You'll have to manually merge this new PR to complete the workflow.
|
|
207
|
+
|
|
208
|
+
If an `NPM_TOKEN` secret is included in the repository secrets, Changesets will automatically deploy the new package version to npm.
|
|
209
|
+
Keep reading for more info about this.
|
|
210
|
+
|
|
211
|
+
#### How to automatically deploy updates to npm
|
|
212
|
+
|
|
213
|
+
As mentioned before, Changesets will automatically deploy the new package version to npm if an `NPM_TOKEN` secret is provided.
|
|
214
|
+
|
|
215
|
+
This npm token should be:
|
|
216
|
+
|
|
217
|
+
- From Widelab npm organization if this repository is meant for internal/product development.
|
|
218
|
+
- From a client's npm organization if this repository is meant for client development. In this case, you should ask the client to [create an npm account](https://www.npmjs.com/signup) and provide you the credentials (or the npm token, if they know how to get it).
|
|
219
|
+
|
|
220
|
+
Once you're logged into the npm account, you can get an access token by following [this guide](https://docs.npmjs.com/creating-and-viewing-access-tokens).
|
|
221
|
+
|
|
222
|
+
The access token must be then placed in a [repository secret](https://docs.github.com/en/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces#adding-secrets-for-a-repository) named `NPM_TOKEN`.
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
(()=>{var Oe=!1,Ce=!1,N=[],Me=-1;function zn(e){Wn(e)}function Wn(e){N.includes(e)||N.push(e),Hn()}function Ct(e){let t=N.indexOf(e);t!==-1&&t>Me&&N.splice(t,1)}function Hn(){!Ce&&!Oe&&(Oe=!0,queueMicrotask(qn))}function qn(){Oe=!1,Ce=!0;for(let e=0;e<N.length;e++)N[e](),Me=e;N.length=0,Me=-1,Ce=!1}var z,W,Q,Mt,Te=!0;function Un(e){Te=!1,e(),Te=!0}function Vn(e){z=e.reactive,Q=e.release,W=t=>e.effect(t,{scheduler:n=>{Te?zn(n):n()}}),Mt=e.raw}function _t(e){W=e}function Jn(e){let t=()=>{};return[r=>{let o=W(r);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(i=>i())}),e._x_effects.add(o),t=()=>{o!==void 0&&(e._x_effects.delete(o),Q(o))},o},()=>{t()}]}function Y(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function T(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(o=>T(o,t));return}let n=!1;if(t(e,()=>n=!0),n)return;let r=e.firstElementChild;for(;r;)T(r,t,!1),r=r.nextElementSibling}function I(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var ht=!1;function Yn(){ht&&I("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),ht=!0,document.body||I("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),Y(document,"alpine:init"),Y(document,"alpine:initializing"),Ye(),Zn(t=>O(t,T)),Ue(t=>qe(t)),Bt((t,n)=>{Qe(t,n).forEach(r=>r())});let e=t=>!pe(t.parentElement,!0);Array.from(document.querySelectorAll(Pt())).filter(e).forEach(t=>{O(t)}),Y(document,"alpine:initialized")}var He=[],Tt=[];function It(){return He.map(e=>e())}function Pt(){return He.concat(Tt).map(e=>e())}function $t(e){He.push(e)}function Rt(e){Tt.push(e)}function pe(e,t=!1){return _e(e,n=>{if((t?Pt():It()).some(o=>n.matches(o)))return!0})}function _e(e,t){if(e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),!!e.parentElement)return _e(e.parentElement,t)}}function Gn(e){return It().some(t=>e.matches(t))}var jt=[];function Xn(e){jt.push(e)}function O(e,t=T,n=()=>{}){fr(()=>{t(e,(r,o)=>{n(r,o),jt.forEach(i=>i(r,o)),Qe(r,r.attributes).forEach(i=>i()),r._x_ignore&&o()})})}function qe(e){T(e,t=>{Dt(t),Qn(t)})}var Nt=[],Lt=[],Ft=[];function Zn(e){Ft.push(e)}function Ue(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,Lt.push(t))}function Bt(e){Nt.push(e)}function Kt(e,t,n){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(n)}function Dt(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach(([n,r])=>{(t===void 0||t.includes(n))&&(r.forEach(o=>o()),delete e._x_attributeCleanups[n])})}function Qn(e){if(e._x_cleanups)for(;e._x_cleanups.length;)e._x_cleanups.pop()()}var Ve=new MutationObserver(Xe),Je=!1;function Ye(){Ve.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Je=!0}function kt(){er(),Ve.disconnect(),Je=!1}var G=[],we=!1;function er(){G=G.concat(Ve.takeRecords()),G.length&&!we&&(we=!0,queueMicrotask(()=>{tr(),we=!1}))}function tr(){Xe(G),G.length=0}function y(e){if(!Je)return e();kt();let t=e();return Ye(),t}var Ge=!1,le=[];function nr(){Ge=!0}function rr(){Ge=!1,Xe(le),le=[]}function Xe(e){if(Ge){le=le.concat(e);return}let t=[],n=[],r=new Map,o=new Map;for(let i=0;i<e.length;i++)if(!e[i].target._x_ignoreMutationObserver&&(e[i].type==="childList"&&(e[i].addedNodes.forEach(s=>s.nodeType===1&&t.push(s)),e[i].removedNodes.forEach(s=>s.nodeType===1&&n.push(s))),e[i].type==="attributes")){let s=e[i].target,a=e[i].attributeName,u=e[i].oldValue,c=()=>{r.has(s)||r.set(s,[]),r.get(s).push({name:a,value:s.getAttribute(a)})},l=()=>{o.has(s)||o.set(s,[]),o.get(s).push(a)};s.hasAttribute(a)&&u===null?c():s.hasAttribute(a)?(l(),c()):l()}o.forEach((i,s)=>{Dt(s,i)}),r.forEach((i,s)=>{Nt.forEach(a=>a(s,i))});for(let i of n)t.includes(i)||(Lt.forEach(s=>s(i)),qe(i));t.forEach(i=>{i._x_ignoreSelf=!0,i._x_ignore=!0});for(let i of t)n.includes(i)||i.isConnected&&(delete i._x_ignoreSelf,delete i._x_ignore,Ft.forEach(s=>s(i)),i._x_ignore=!0,i._x_ignoreSelf=!0);t.forEach(i=>{delete i._x_ignoreSelf,delete i._x_ignore}),t=null,n=null,r=null,o=null}function zt(e){return te(D(e))}function ee(e,t,n){return e._x_dataStack=[t,...D(n||e)],()=>{e._x_dataStack=e._x_dataStack.filter(r=>r!==t)}}function D(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?D(e.host):e.parentNode?D(e.parentNode):[]}function te(e){let t=new Proxy({},{ownKeys:()=>Array.from(new Set(e.flatMap(n=>Object.keys(n)))),has:(n,r)=>e.some(o=>o.hasOwnProperty(r)),get:(n,r)=>(e.find(o=>{if(o.hasOwnProperty(r)){let i=Object.getOwnPropertyDescriptor(o,r);if(i.get&&i.get._x_alreadyBound||i.set&&i.set._x_alreadyBound)return!0;if((i.get||i.set)&&i.enumerable){let s=i.get,a=i.set,u=i;s=s&&s.bind(t),a=a&&a.bind(t),s&&(s._x_alreadyBound=!0),a&&(a._x_alreadyBound=!0),Object.defineProperty(o,r,{...u,get:s,set:a})}return!0}return!1})||{})[r],set:(n,r,o)=>{let i=e.find(s=>s.hasOwnProperty(r));return i?i[r]=o:e[e.length-1][r]=o,!0}});return t}function Wt(e){let t=r=>typeof r=="object"&&!Array.isArray(r)&&r!==null,n=(r,o="")=>{Object.entries(Object.getOwnPropertyDescriptors(r)).forEach(([i,{value:s,enumerable:a}])=>{if(a===!1||s===void 0)return;let u=o===""?i:`${o}.${i}`;typeof s=="object"&&s!==null&&s._x_interceptor?r[i]=s.initialize(e,u,i):t(s)&&s!==r&&!(s instanceof Element)&&n(s,u)})};return n(e)}function Ht(e,t=()=>{}){let n={initialValue:void 0,_x_interceptor:!0,initialize(r,o,i){return e(this.initialValue,()=>ir(r,o),s=>Ie(r,o,s),o,i)}};return t(n),r=>{if(typeof r=="object"&&r!==null&&r._x_interceptor){let o=n.initialize.bind(n);n.initialize=(i,s,a)=>{let u=r.initialize(i,s,a);return n.initialValue=u,o(i,s,a)}}else n.initialValue=r;return n}}function ir(e,t){return t.split(".").reduce((n,r)=>n[r],e)}function Ie(e,t,n){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=n;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),Ie(e[t[0]],t.slice(1),n)}}var qt={};function A(e,t){qt[e]=t}function Pe(e,t){return Object.entries(qt).forEach(([n,r])=>{let o=null;function i(){if(o)return o;{let[s,a]=Xt(t);return o={interceptor:Ht,...s},Ue(t,a),o}}Object.defineProperty(e,`$${n}`,{get(){return r(t,i())},enumerable:!1})}),e}function or(e,t,n,...r){try{return n(...r)}catch(o){Z(o,e,t)}}function Z(e,t,n=void 0){Object.assign(e,{el:t,expression:n}),console.warn(`Alpine Expression Error: ${e.message}
|
|
2
|
+
|
|
3
|
+
${n?'Expression: "'+n+`"
|
|
4
|
+
|
|
5
|
+
`:""}`,t),setTimeout(()=>{throw e},0)}var ce=!0;function Ut(e){let t=ce;ce=!1;let n=e();return ce=t,n}function L(e,t,n={}){let r;return m(e,t)(o=>r=o,n),r}function m(...e){return Vt(...e)}var Vt=Jt;function sr(e){Vt=e}function Jt(e,t){let n={};Pe(n,e);let r=[n,...D(e)],o=typeof t=="function"?ar(r,t):cr(r,t,e);return or.bind(null,e,t,o)}function ar(e,t){return(n=()=>{},{scope:r={},params:o=[]}={})=>{let i=t.apply(te([r,...e]),o);fe(n,i)}}var Ee={};function ur(e,t){if(Ee[e])return Ee[e];let n=Object.getPrototypeOf(async function(){}).constructor,r=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e,i=(()=>{try{return new n(["__self","scope"],`with (scope) { __self.result = ${r} }; __self.finished = true; return __self.result;`)}catch(s){return Z(s,t,e),Promise.resolve()}})();return Ee[e]=i,i}function cr(e,t,n){let r=ur(t,n);return(o=()=>{},{scope:i={},params:s=[]}={})=>{r.result=void 0,r.finished=!1;let a=te([i,...e]);if(typeof r=="function"){let u=r(r,a).catch(c=>Z(c,n,t));r.finished?(fe(o,r.result,a,s,n),r.result=void 0):u.then(c=>{fe(o,c,a,s,n)}).catch(c=>Z(c,n,t)).finally(()=>r.result=void 0)}}}function fe(e,t,n,r,o){if(ce&&typeof t=="function"){let i=t.apply(n,r);i instanceof Promise?i.then(s=>fe(e,s,n,r)).catch(s=>Z(s,o,t)):e(i)}else typeof t=="object"&&t instanceof Promise?t.then(i=>e(i)):e(t)}var Ze="x-";function H(e=""){return Ze+e}function lr(e){Ze=e}var $e={};function g(e,t){return $e[e]=t,{before(n){if(!$e[n]){console.warn("Cannot find directive `${directive}`. `${name}` will use the default order of execution");return}let r=j.indexOf(n);j.splice(r>=0?r:j.indexOf("DEFAULT"),0,e)}}}function Qe(e,t,n){if(t=Array.from(t),e._x_virtualDirectives){let i=Object.entries(e._x_virtualDirectives).map(([a,u])=>({name:a,value:u})),s=Yt(i);i=i.map(a=>s.find(u=>u.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),t=t.concat(i)}let r={};return t.map(en((i,s)=>r[i]=s)).filter(nn).map(pr(r,n)).sort(_r).map(i=>dr(e,i))}function Yt(e){return Array.from(e).map(en()).filter(t=>!nn(t))}var Re=!1,J=new Map,Gt=Symbol();function fr(e){Re=!0;let t=Symbol();Gt=t,J.set(t,[]);let n=()=>{for(;J.get(t).length;)J.get(t).shift()();J.delete(t)},r=()=>{Re=!1,n()};e(n),r()}function Xt(e){let t=[],n=a=>t.push(a),[r,o]=Jn(e);return t.push(o),[{Alpine:ne,effect:r,cleanup:n,evaluateLater:m.bind(m,e),evaluate:L.bind(L,e)},()=>t.forEach(a=>a())]}function dr(e,t){let n=()=>{},r=$e[t.type]||n,[o,i]=Xt(e);Kt(e,t.original,i);let s=()=>{e._x_ignore||e._x_ignoreSelf||(r.inline&&r.inline(e,t,o),r=r.bind(r,e,t,o),Re?J.get(Gt).push(r):r())};return s.runCleanups=i,s}var Zt=(e,t)=>({name:n,value:r})=>(n.startsWith(e)&&(n=n.replace(e,t)),{name:n,value:r}),Qt=e=>e;function en(e=()=>{}){return({name:t,value:n})=>{let{name:r,value:o}=tn.reduce((i,s)=>s(i),{name:t,value:n});return r!==t&&e(r,t),{name:r,value:o}}}var tn=[];function et(e){tn.push(e)}function nn({name:e}){return rn().test(e)}var rn=()=>new RegExp(`^${Ze}([^:^.]+)\\b`);function pr(e,t){return({name:n,value:r})=>{let o=n.match(rn()),i=n.match(/:([a-zA-Z0-9\-:]+)/),s=n.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[n]||n;return{type:o?o[1]:null,value:i?i[1]:null,modifiers:s.map(u=>u.replace(".","")),expression:r,original:a}}}var je="DEFAULT",j=["ignore","ref","data","id","bind","init","for","model","modelable","transition","show","if",je,"teleport"];function _r(e,t){let n=j.indexOf(e.type)===-1?je:e.type,r=j.indexOf(t.type)===-1?je:t.type;return j.indexOf(n)-j.indexOf(r)}var Ne=[],tt=!1;function nt(e=()=>{}){return queueMicrotask(()=>{tt||setTimeout(()=>{Le()})}),new Promise(t=>{Ne.push(()=>{e(),t()})})}function Le(){for(tt=!1;Ne.length;)Ne.shift()()}function hr(){tt=!0}function rt(e,t){return Array.isArray(t)?gt(e,t.join(" ")):typeof t=="object"&&t!==null?gr(e,t):typeof t=="function"?rt(e,t()):gt(e,t)}function gt(e,t){let n=i=>i.split(" ").filter(Boolean),r=i=>i.split(" ").filter(s=>!e.classList.contains(s)).filter(Boolean),o=i=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",o(r(t))}function gr(e,t){let n=a=>a.split(" ").filter(Boolean),r=Object.entries(t).flatMap(([a,u])=>u?n(a):!1).filter(Boolean),o=Object.entries(t).flatMap(([a,u])=>u?!1:n(a)).filter(Boolean),i=[],s=[];return o.forEach(a=>{e.classList.contains(a)&&(e.classList.remove(a),s.push(a))}),r.forEach(a=>{e.classList.contains(a)||(e.classList.add(a),i.push(a))}),()=>{s.forEach(a=>e.classList.add(a)),i.forEach(a=>e.classList.remove(a))}}function he(e,t){return typeof t=="object"&&t!==null?xr(e,t):vr(e,t)}function xr(e,t){let n={};return Object.entries(t).forEach(([r,o])=>{n[r]=e.style[r],r.startsWith("--")||(r=yr(r)),e.style.setProperty(r,o)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{he(e,n)}}function vr(e,t){let n=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",n||"")}}function yr(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Fe(e,t=()=>{}){let n=!1;return function(){n?t.apply(this,arguments):(n=!0,e.apply(this,arguments))}}g("transition",(e,{value:t,modifiers:n,expression:r},{evaluate:o})=>{typeof r=="function"&&(r=o(r)),r!==!1&&(!r||typeof r=="boolean"?mr(e,n,t):br(e,r,t))});function br(e,t,n){on(e,rt,""),{enter:o=>{e._x_transition.enter.during=o},"enter-start":o=>{e._x_transition.enter.start=o},"enter-end":o=>{e._x_transition.enter.end=o},leave:o=>{e._x_transition.leave.during=o},"leave-start":o=>{e._x_transition.leave.start=o},"leave-end":o=>{e._x_transition.leave.end=o}}[n](t)}function mr(e,t,n){on(e,he);let r=!t.includes("in")&&!t.includes("out")&&!n,o=r||t.includes("in")||["enter"].includes(n),i=r||t.includes("out")||["leave"].includes(n);t.includes("in")&&!r&&(t=t.filter((_,x)=>x<t.indexOf("out"))),t.includes("out")&&!r&&(t=t.filter((_,x)=>x>t.indexOf("out")));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),u=s||t.includes("scale"),c=a?0:1,l=u?U(t,"scale",95)/100:1,d=U(t,"delay",0)/1e3,p=U(t,"origin","center"),v="opacity, transform",C=U(t,"duration",150)/1e3,re=U(t,"duration",75)/1e3,f="cubic-bezier(0.4, 0.0, 0.2, 1)";o&&(e._x_transition.enter.during={transformOrigin:p,transitionDelay:`${d}s`,transitionProperty:v,transitionDuration:`${C}s`,transitionTimingFunction:f},e._x_transition.enter.start={opacity:c,transform:`scale(${l})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),i&&(e._x_transition.leave.during={transformOrigin:p,transitionDelay:`${d}s`,transitionProperty:v,transitionDuration:`${re}s`,transitionTimingFunction:f},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${l})`})}function on(e,t,n={}){e._x_transition||(e._x_transition={enter:{during:n,start:n,end:n},leave:{during:n,start:n,end:n},in(r=()=>{},o=()=>{}){Be(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},r,o)},out(r=()=>{},o=()=>{}){Be(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},r,o)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,n,r){let o=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,i=()=>o(n);if(t){e._x_transition&&(e._x_transition.enter||e._x_transition.leave)?e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(n):i():e._x_transition?e._x_transition.in(n):i();return}e._x_hidePromise=e._x_transition?new Promise((s,a)=>{e._x_transition.out(()=>{},()=>s(r)),e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(r),queueMicrotask(()=>{let s=sn(e);s?(s._x_hideChildren||(s._x_hideChildren=[]),s._x_hideChildren.push(e)):o(()=>{let a=u=>{let c=Promise.all([u._x_hidePromise,...(u._x_hideChildren||[]).map(a)]).then(([l])=>l());return delete u._x_hidePromise,delete u._x_hideChildren,c};a(e).catch(u=>{if(!u.isFromCancelledTransition)throw u})})})};function sn(e){let t=e.parentNode;if(t)return t._x_hidePromise?t:sn(t)}function Be(e,t,{during:n,start:r,end:o}={},i=()=>{},s=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),Object.keys(n).length===0&&Object.keys(r).length===0&&Object.keys(o).length===0){i(),s();return}let a,u,c;wr(e,{start(){a=t(e,r)},during(){u=t(e,n)},before:i,end(){a(),c=t(e,o)},after:s,cleanup(){u(),c()}})}function wr(e,t){let n,r,o,i=Fe(()=>{y(()=>{n=!0,r||t.before(),o||(t.end(),Le()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Fe(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();i()}),finish:i},y(()=>{t.start(),t.during()}),hr(),requestAnimationFrame(()=>{if(n)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;s===0&&(s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3),y(()=>{t.before()}),r=!0,requestAnimationFrame(()=>{n||(y(()=>{t.end()}),Le(),setTimeout(e._x_transitioning.finish,s+a),o=!0)})})}function U(e,t,n){if(e.indexOf(t)===-1)return n;let r=e[e.indexOf(t)+1];if(!r||t==="scale"&&isNaN(r))return n;if(t==="duration"||t==="delay"){let o=r.match(/([0-9]+)ms/);if(o)return o[1]}return t==="origin"&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[r,e[e.indexOf(t)+2]].join(" "):r}var P=!1;function ge(e,t=()=>{}){return(...n)=>P?t(...n):e(...n)}function Er(e){return(...t)=>P&&e(...t)}function Ar(e,t){e._x_dataStack&&(t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)),P=!0,an(()=>{O(t,(n,r)=>{r(n,()=>{})})}),P=!1}var Ke=!1;function Sr(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),P=!0,Ke=!0,an(()=>{Or(t)}),P=!1,Ke=!1}function Or(e){let t=!1;O(e,(r,o)=>{T(r,(i,s)=>{if(t&&Gn(i))return s();t=!0,o(i,s)})})}function an(e){let t=W;_t((n,r)=>{let o=t(n);return Q(o),()=>{}}),e(),_t(t)}function Cr(e){return P?Ke?!0:e.hasAttribute("data-has-alpine-state"):!1}function un(e,t,n,r=[]){switch(e._x_bindings||(e._x_bindings=z({})),e._x_bindings[t]=n,t=r.includes("camel")?Nr(t):t,t){case"value":Mr(e,n);break;case"style":Ir(e,n);break;case"class":Tr(e,n);break;case"selected":case"checked":Pr(e,t,n);break;default:cn(e,t,n);break}}function Mr(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=xt(e.value,t));else if(e.type==="checkbox")Number.isInteger(t)?e.value=t:!Array.isArray(t)&&typeof t!="boolean"&&![null,void 0].includes(t)?e.value=String(t):Array.isArray(t)?e.checked=t.some(n=>xt(n,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")jr(e,t);else{if(e.value===t)return;e.value=t===void 0?"":t}}function Tr(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=rt(e,t)}function Ir(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=he(e,t)}function Pr(e,t,n){cn(e,t,n),Rr(e,t,n)}function cn(e,t,n){[null,void 0,!1].includes(n)&&Lr(t)?e.removeAttribute(t):(ln(t)&&(n=t),$r(e,t,n))}function $r(e,t,n){e.getAttribute(t)!=n&&e.setAttribute(t,n)}function Rr(e,t,n){e[t]!==n&&(e[t]=n)}function jr(e,t){let n=[].concat(t).map(r=>r+"");Array.from(e.options).forEach(r=>{r.selected=n.includes(r.value)})}function Nr(e){return e.toLowerCase().replace(/-(\w)/g,(t,n)=>n.toUpperCase())}function xt(e,t){return e==t}function ln(e){return["disabled","checked","required","readonly","hidden","open","selected","autofocus","itemscope","multiple","novalidate","allowfullscreen","allowpaymentrequest","formnovalidate","autoplay","controls","loop","muted","playsinline","default","ismap","reversed","async","defer","nomodule"].includes(e)}function Lr(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Fr(e,t,n){return e._x_bindings&&e._x_bindings[t]!==void 0?e._x_bindings[t]:fn(e,t,n)}function Br(e,t,n,r=!0){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let o=e._x_inlineBindings[t];return o.extract=r,Ut(()=>L(e,o.expression))}return fn(e,t,n)}function fn(e,t,n){let r=e.getAttribute(t);return r===null?typeof n=="function"?n():n:r===""?!0:ln(t)?!![t,"true"].includes(r):r}function dn(e,t){var n;return function(){var r=this,o=arguments,i=function(){n=null,e.apply(r,o)};clearTimeout(n),n=setTimeout(i,t)}}function pn(e,t){let n;return function(){let r=this,o=arguments;n||(e.apply(r,o),n=!0,setTimeout(()=>n=!1,t))}}function _n({get:e,set:t},{get:n,set:r}){let o=!0,i,s,a,u,c=W(()=>{let l,d;o?(l=e(),r(JSON.parse(JSON.stringify(l))),d=n(),o=!1):(l=e(),d=n(),a=JSON.stringify(l),u=JSON.stringify(d),a!==i?(d=n(),r(l),d=l):(t(JSON.parse(u!=null?u:null)),l=d)),i=JSON.stringify(l),s=JSON.stringify(d)});return()=>{Q(c)}}function Kr(e){(Array.isArray(e)?e:[e]).forEach(n=>n(ne))}var R={},vt=!1;function Dr(e,t){if(vt||(R=z(R),vt=!0),t===void 0)return R[e];R[e]=t,typeof t=="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init=="function"&&R[e].init(),Wt(R[e])}function kr(){return R}var hn={};function zr(e,t){let n=typeof t!="function"?()=>t:t;return e instanceof Element?gn(e,n()):(hn[e]=n,()=>{})}function Wr(e){return Object.entries(hn).forEach(([t,n])=>{Object.defineProperty(e,t,{get(){return(...r)=>n(...r)}})}),e}function gn(e,t,n){let r=[];for(;r.length;)r.pop()();let o=Object.entries(t).map(([s,a])=>({name:s,value:a})),i=Yt(o);return o=o.map(s=>i.find(a=>a.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),Qe(e,o,n).map(s=>{r.push(s.runCleanups),s()}),()=>{for(;r.length;)r.pop()()}}var xn={};function Hr(e,t){xn[e]=t}function qr(e,t){return Object.entries(xn).forEach(([n,r])=>{Object.defineProperty(e,n,{get(){return(...o)=>r.bind(t)(...o)},enumerable:!1})}),e}var Ur={get reactive(){return z},get release(){return Q},get effect(){return W},get raw(){return Mt},version:"3.13.0",flushAndStopDeferringMutations:rr,dontAutoEvaluateFunctions:Ut,disableEffectScheduling:Un,startObservingMutations:Ye,stopObservingMutations:kt,setReactivityEngine:Vn,onAttributeRemoved:Kt,onAttributesAdded:Bt,closestDataStack:D,skipDuringClone:ge,onlyDuringClone:Er,addRootSelector:$t,addInitSelector:Rt,addScopeToNode:ee,deferMutations:nr,mapAttributes:et,evaluateLater:m,interceptInit:Xn,setEvaluator:sr,mergeProxies:te,extractProp:Br,findClosest:_e,onElRemoved:Ue,closestRoot:pe,destroyTree:qe,interceptor:Ht,transition:Be,setStyles:he,mutateDom:y,directive:g,entangle:_n,throttle:pn,debounce:dn,evaluate:L,initTree:O,nextTick:nt,prefixed:H,prefix:lr,plugin:Kr,magic:A,store:Dr,start:Yn,clone:Sr,cloneNode:Ar,bound:Fr,$data:zt,walk:T,data:Hr,bind:zr},ne=Ur;function vn(e,t){let n=Object.create(null),r=e.split(",");for(let o=0;o<r.length;o++)n[r[o]]=!0;return t?o=>!!n[o.toLowerCase()]:o=>!!n[o]}var Vr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Gi=vn(Vr+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),Jr=Object.freeze({}),Xi=Object.freeze([]),Yr=Object.prototype.hasOwnProperty,xe=(e,t)=>Yr.call(e,t),F=Array.isArray,X=e=>yn(e)==="[object Map]",Gr=e=>typeof e=="string",it=e=>typeof e=="symbol",ve=e=>e!==null&&typeof e=="object",Xr=Object.prototype.toString,yn=e=>Xr.call(e),bn=e=>yn(e).slice(8,-1),ot=e=>Gr(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ye=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Zr=/-(\w)/g,Zi=ye(e=>e.replace(Zr,(t,n)=>n?n.toUpperCase():"")),Qr=/\B([A-Z])/g,Qi=ye(e=>e.replace(Qr,"-$1").toLowerCase()),mn=ye(e=>e.charAt(0).toUpperCase()+e.slice(1)),eo=ye(e=>e?`on${mn(e)}`:""),wn=(e,t)=>e!==t&&(e===e||t===t),De=new WeakMap,V=[],S,B=Symbol("iterate"),ke=Symbol("Map key iterate");function ei(e){return e&&e._isEffect===!0}function ti(e,t=Jr){ei(e)&&(e=e.raw);let n=ii(e,t);return t.lazy||n(),n}function ni(e){e.active&&(En(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var ri=0;function ii(e,t){let n=function(){if(!n.active)return e();if(!V.includes(n)){En(n);try{return si(),V.push(n),S=n,e()}finally{V.pop(),An(),S=V[V.length-1]}}};return n.id=ri++,n.allowRecurse=!!t.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}function En(e){let{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}var k=!0,st=[];function oi(){st.push(k),k=!1}function si(){st.push(k),k=!0}function An(){let e=st.pop();k=e===void 0?!0:e}function E(e,t,n){if(!k||S===void 0)return;let r=De.get(e);r||De.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=new Set),o.has(S)||(o.add(S),S.deps.push(o),S.options.onTrack&&S.options.onTrack({effect:S,target:e,type:t,key:n}))}function $(e,t,n,r,o,i){let s=De.get(e);if(!s)return;let a=new Set,u=l=>{l&&l.forEach(d=>{(d!==S||d.allowRecurse)&&a.add(d)})};if(t==="clear")s.forEach(u);else if(n==="length"&&F(e))s.forEach((l,d)=>{(d==="length"||d>=r)&&u(l)});else switch(n!==void 0&&u(s.get(n)),t){case"add":F(e)?ot(n)&&u(s.get("length")):(u(s.get(B)),X(e)&&u(s.get(ke)));break;case"delete":F(e)||(u(s.get(B)),X(e)&&u(s.get(ke)));break;case"set":X(e)&&u(s.get(B));break}let c=l=>{l.options.onTrigger&&l.options.onTrigger({effect:l,target:e,key:n,type:t,newValue:r,oldValue:o,oldTarget:i}),l.options.scheduler?l.options.scheduler(l):l()};a.forEach(c)}var ai=vn("__proto__,__v_isRef,__isVue"),Sn=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(it)),ui=On(),ci=On(!0),yt=li();function li(){let e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){let r=h(this);for(let i=0,s=this.length;i<s;i++)E(r,"get",i+"");let o=r[t](...n);return o===-1||o===!1?r[t](...n.map(h)):o}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){oi();let r=h(this)[t].apply(this,n);return An(),r}}),e}function On(e=!1,t=!1){return function(r,o,i){if(o==="__v_isReactive")return!e;if(o==="__v_isReadonly")return e;if(o==="__v_raw"&&i===(e?t?Oi:In:t?Si:Tn).get(r))return r;let s=F(r);if(!e&&s&&xe(yt,o))return Reflect.get(yt,o,i);let a=Reflect.get(r,o,i);return(it(o)?Sn.has(o):ai(o))||(e||E(r,"get",o),t)?a:ze(a)?!s||!ot(o)?a.value:a:ve(a)?e?Pn(a):lt(a):a}}var fi=di();function di(e=!1){return function(n,r,o,i){let s=n[r];if(!e&&(o=h(o),s=h(s),!F(n)&&ze(s)&&!ze(o)))return s.value=o,!0;let a=F(n)&&ot(r)?Number(r)<n.length:xe(n,r),u=Reflect.set(n,r,o,i);return n===h(i)&&(a?wn(o,s)&&$(n,"set",r,o,s):$(n,"add",r,o)),u}}function pi(e,t){let n=xe(e,t),r=e[t],o=Reflect.deleteProperty(e,t);return o&&n&&$(e,"delete",t,void 0,r),o}function _i(e,t){let n=Reflect.has(e,t);return(!it(t)||!Sn.has(t))&&E(e,"has",t),n}function hi(e){return E(e,"iterate",F(e)?"length":B),Reflect.ownKeys(e)}var gi={get:ui,set:fi,deleteProperty:pi,has:_i,ownKeys:hi},xi={get:ci,set(e,t){return console.warn(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return console.warn(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},at=e=>ve(e)?lt(e):e,ut=e=>ve(e)?Pn(e):e,ct=e=>e,be=e=>Reflect.getPrototypeOf(e);function ie(e,t,n=!1,r=!1){e=e.__v_raw;let o=h(e),i=h(t);t!==i&&!n&&E(o,"get",t),!n&&E(o,"get",i);let{has:s}=be(o),a=r?ct:n?ut:at;if(s.call(o,t))return a(e.get(t));if(s.call(o,i))return a(e.get(i));e!==o&&e.get(t)}function oe(e,t=!1){let n=this.__v_raw,r=h(n),o=h(e);return e!==o&&!t&&E(r,"has",e),!t&&E(r,"has",o),e===o?n.has(e):n.has(e)||n.has(o)}function se(e,t=!1){return e=e.__v_raw,!t&&E(h(e),"iterate",B),Reflect.get(e,"size",e)}function bt(e){e=h(e);let t=h(this);return be(t).has.call(t,e)||(t.add(e),$(t,"add",e,e)),this}function mt(e,t){t=h(t);let n=h(this),{has:r,get:o}=be(n),i=r.call(n,e);i?Mn(n,r,e):(e=h(e),i=r.call(n,e));let s=o.call(n,e);return n.set(e,t),i?wn(t,s)&&$(n,"set",e,t,s):$(n,"add",e,t),this}function wt(e){let t=h(this),{has:n,get:r}=be(t),o=n.call(t,e);o?Mn(t,n,e):(e=h(e),o=n.call(t,e));let i=r?r.call(t,e):void 0,s=t.delete(e);return o&&$(t,"delete",e,void 0,i),s}function Et(){let e=h(this),t=e.size!==0,n=X(e)?new Map(e):new Set(e),r=e.clear();return t&&$(e,"clear",void 0,void 0,n),r}function ae(e,t){return function(r,o){let i=this,s=i.__v_raw,a=h(s),u=t?ct:e?ut:at;return!e&&E(a,"iterate",B),s.forEach((c,l)=>r.call(o,u(c),u(l),i))}}function ue(e,t,n){return function(...r){let o=this.__v_raw,i=h(o),s=X(i),a=e==="entries"||e===Symbol.iterator&&s,u=e==="keys"&&s,c=o[e](...r),l=n?ct:t?ut:at;return!t&&E(i,"iterate",u?ke:B),{next(){let{value:d,done:p}=c.next();return p?{value:d,done:p}:{value:a?[l(d[0]),l(d[1])]:l(d),done:p}},[Symbol.iterator](){return this}}}}function M(e){return function(...t){{let n=t[0]?`on key "${t[0]}" `:"";console.warn(`${mn(e)} operation ${n}failed: target is readonly.`,h(this))}return e==="delete"?!1:this}}function vi(){let e={get(i){return ie(this,i)},get size(){return se(this)},has:oe,add:bt,set:mt,delete:wt,clear:Et,forEach:ae(!1,!1)},t={get(i){return ie(this,i,!1,!0)},get size(){return se(this)},has:oe,add:bt,set:mt,delete:wt,clear:Et,forEach:ae(!1,!0)},n={get(i){return ie(this,i,!0)},get size(){return se(this,!0)},has(i){return oe.call(this,i,!0)},add:M("add"),set:M("set"),delete:M("delete"),clear:M("clear"),forEach:ae(!0,!1)},r={get(i){return ie(this,i,!0,!0)},get size(){return se(this,!0)},has(i){return oe.call(this,i,!0)},add:M("add"),set:M("set"),delete:M("delete"),clear:M("clear"),forEach:ae(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=ue(i,!1,!1),n[i]=ue(i,!0,!1),t[i]=ue(i,!1,!0),r[i]=ue(i,!0,!0)}),[e,n,t,r]}var[yi,bi,mi,wi]=vi();function Cn(e,t){let n=t?e?wi:mi:e?bi:yi;return(r,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(xe(n,o)&&o in r?n:r,o,i)}var Ei={get:Cn(!1,!1)},Ai={get:Cn(!0,!1)};function Mn(e,t,n){let r=h(n);if(r!==n&&t.call(e,r)){let o=bn(e);console.warn(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var Tn=new WeakMap,Si=new WeakMap,In=new WeakMap,Oi=new WeakMap;function Ci(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mi(e){return e.__v_skip||!Object.isExtensible(e)?0:Ci(bn(e))}function lt(e){return e&&e.__v_isReadonly?e:$n(e,!1,gi,Ei,Tn)}function Pn(e){return $n(e,!0,xi,Ai,In)}function $n(e,t,n,r,o){if(!ve(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;let i=o.get(e);if(i)return i;let s=Mi(e);if(s===0)return e;let a=new Proxy(e,s===2?r:n);return o.set(e,a),a}function h(e){return e&&h(e.__v_raw)||e}function ze(e){return!!(e&&e.__v_isRef===!0)}A("nextTick",()=>nt);A("dispatch",e=>Y.bind(Y,e));A("watch",(e,{evaluateLater:t,effect:n})=>(r,o)=>{let i=t(r),s=!0,a,u=n(()=>i(c=>{JSON.stringify(c),s?a=c:queueMicrotask(()=>{o(c,a),a=c}),s=!1}));e._x_effects.delete(u)});A("store",kr);A("data",e=>zt(e));A("root",e=>pe(e));A("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=te(Ti(e))),e._x_refs_proxy));function Ti(e){let t=[],n=e;for(;n;)n._x_refs&&t.push(n._x_refs),n=n.parentNode;return t}var Ae={};function Rn(e){return Ae[e]||(Ae[e]=0),++Ae[e]}function Ii(e,t){return _e(e,n=>{if(n._x_ids&&n._x_ids[t])return!0})}function Pi(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=Rn(t))}A("id",e=>(t,n=null)=>{let r=Ii(e,t),o=r?r._x_ids[t]:Rn(t);return n?`${t}-${o}-${n}`:`${t}-${o}`});A("el",e=>e);jn("Focus","focus","focus");jn("Persist","persist","persist");function jn(e,t,n){A(t,r=>I(`You can't use [$${directiveName}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${n}`,r))}g("modelable",(e,{expression:t},{effect:n,evaluateLater:r,cleanup:o})=>{let i=r(t),s=()=>{let l;return i(d=>l=d),l},a=r(`${t} = __placeholder`),u=l=>a(()=>{},{scope:{__placeholder:l}}),c=s();u(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let l=e._x_model.get,d=e._x_model.set,p=_n({get(){return l()},set(v){d(v)}},{get(){return s()},set(v){u(v)}});o(p)})});var $i=document.createElement("div");g("teleport",(e,{modifiers:t,expression:n},{cleanup:r})=>{e.tagName.toLowerCase()!=="template"&&I("x-teleport can only be used on a <template> tag",e);let o=ge(()=>document.querySelector(n),()=>$i)();o||I(`Cannot find x-teleport element for selector: "${n}"`);let i=e.content.cloneNode(!0).firstElementChild;e._x_teleport=i,i._x_teleportBack=e,e._x_forwardEvents&&e._x_forwardEvents.forEach(s=>{i.addEventListener(s,a=>{a.stopPropagation(),e.dispatchEvent(new a.constructor(a.type,a))})}),ee(i,{},e),y(()=>{t.includes("prepend")?o.parentNode.insertBefore(i,o):t.includes("append")?o.parentNode.insertBefore(i,o.nextSibling):o.appendChild(i),O(i),i._x_ignore=!0}),r(()=>i.remove())});var Nn=()=>{};Nn.inline=(e,{modifiers:t},{cleanup:n})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,n(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};g("ignore",Nn);g("effect",(e,{expression:t},{effect:n})=>n(m(e,t)));function We(e,t,n,r){let o=e,i=u=>r(u),s={},a=(u,c)=>l=>c(u,l);if(n.includes("dot")&&(t=Ri(t)),n.includes("camel")&&(t=ji(t)),n.includes("passive")&&(s.passive=!0),n.includes("capture")&&(s.capture=!0),n.includes("window")&&(o=window),n.includes("document")&&(o=document),n.includes("debounce")){let u=n[n.indexOf("debounce")+1]||"invalid-wait",c=de(u.split("ms")[0])?Number(u.split("ms")[0]):250;i=dn(i,c)}if(n.includes("throttle")){let u=n[n.indexOf("throttle")+1]||"invalid-wait",c=de(u.split("ms")[0])?Number(u.split("ms")[0]):250;i=pn(i,c)}return n.includes("prevent")&&(i=a(i,(u,c)=>{c.preventDefault(),u(c)})),n.includes("stop")&&(i=a(i,(u,c)=>{c.stopPropagation(),u(c)})),n.includes("self")&&(i=a(i,(u,c)=>{c.target===e&&u(c)})),(n.includes("away")||n.includes("outside"))&&(o=document,i=a(i,(u,c)=>{e.contains(c.target)||c.target.isConnected!==!1&&(e.offsetWidth<1&&e.offsetHeight<1||e._x_isShown!==!1&&u(c))})),n.includes("once")&&(i=a(i,(u,c)=>{u(c),o.removeEventListener(t,i,s)})),i=a(i,(u,c)=>{Li(t)&&Fi(c,n)||u(c)}),o.addEventListener(t,i,s),()=>{o.removeEventListener(t,i,s)}}function Ri(e){return e.replace(/-/g,".")}function ji(e){return e.toLowerCase().replace(/-(\w)/g,(t,n)=>n.toUpperCase())}function de(e){return!Array.isArray(e)&&!isNaN(e)}function Ni(e){return[" ","_"].includes(e)?e:e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Li(e){return["keydown","keyup"].includes(e)}function Fi(e,t){let n=t.filter(i=>!["window","document","prevent","stop","once","capture"].includes(i));if(n.includes("debounce")){let i=n.indexOf("debounce");n.splice(i,de((n[i+1]||"invalid-wait").split("ms")[0])?2:1)}if(n.includes("throttle")){let i=n.indexOf("throttle");n.splice(i,de((n[i+1]||"invalid-wait").split("ms")[0])?2:1)}if(n.length===0||n.length===1&&At(e.key).includes(n[0]))return!1;let o=["ctrl","shift","alt","meta","cmd","super"].filter(i=>n.includes(i));return n=n.filter(i=>!o.includes(i)),!(o.length>0&&o.filter(s=>((s==="cmd"||s==="super")&&(s="meta"),e[`${s}Key`])).length===o.length&&At(e.key).includes(n[0]))}function At(e){if(!e)return[];e=Ni(e);let t={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",equal:"=",minus:"-",underscore:"_"};return t[e]=e,Object.keys(t).map(n=>{if(t[n]===e)return n}).filter(n=>n)}g("model",(e,{modifiers:t,expression:n},{effect:r,cleanup:o})=>{let i=e;t.includes("parent")&&(i=e.parentNode);let s=m(i,n),a;typeof n=="string"?a=m(i,`${n} = __placeholder`):typeof n=="function"&&typeof n()=="string"?a=m(i,`${n()} = __placeholder`):a=()=>{};let u=()=>{let p;return s(v=>p=v),St(p)?p.get():p},c=p=>{let v;s(C=>v=C),St(v)?v.set(p):a(()=>{},{scope:{__placeholder:p}})};typeof n=="string"&&e.type==="radio"&&y(()=>{e.hasAttribute("name")||e.setAttribute("name",n)});var l=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let d=P?()=>{}:We(e,l,t,p=>{c(Bi(e,t,p,u()))});if(t.includes("fill")&&([null,""].includes(u())||e.type==="checkbox"&&Array.isArray(u()))&&e.dispatchEvent(new Event(l,{})),e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=d,o(()=>e._x_removeModelListeners.default()),e.form){let p=We(e.form,"reset",[],v=>{nt(()=>e._x_model&&e._x_model.set(e.value))});o(()=>p())}e._x_model={get(){return u()},set(p){c(p)}},e._x_forceModelUpdate=p=>{p===void 0&&typeof n=="string"&&n.match(/\./)&&(p=""),window.fromModel=!0,y(()=>un(e,"value",p)),delete window.fromModel},r(()=>{let p=u();t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate(p)})});function Bi(e,t,n,r){return y(()=>{var o;if(n instanceof CustomEvent&&n.detail!==void 0)return(o=n.detail)!=null?o:n.target.value;if(e.type==="checkbox")if(Array.isArray(r)){let i=t.includes("number")?Se(n.target.value):n.target.value;return n.target.checked?r.concat([i]):r.filter(s=>!Ki(s,i))}else return n.target.checked;else{if(e.tagName.toLowerCase()==="select"&&e.multiple)return t.includes("number")?Array.from(n.target.selectedOptions).map(i=>{let s=i.value||i.text;return Se(s)}):Array.from(n.target.selectedOptions).map(i=>i.value||i.text);{let i=n.target.value;return t.includes("number")?Se(i):t.includes("trim")?i.trim():i}}})}function Se(e){let t=e?parseFloat(e):null;return Di(t)?t:e}function Ki(e,t){return e==t}function Di(e){return!Array.isArray(e)&&!isNaN(e)}function St(e){return e!==null&&typeof e=="object"&&typeof e.get=="function"&&typeof e.set=="function"}g("cloak",e=>queueMicrotask(()=>y(()=>e.removeAttribute(H("cloak")))));Rt(()=>`[${H("init")}]`);g("init",ge((e,{expression:t},{evaluate:n})=>typeof t=="string"?!!t.trim()&&n(t,{},!1):n(t,{},!1)));g("text",(e,{expression:t},{effect:n,evaluateLater:r})=>{let o=r(t);n(()=>{o(i=>{y(()=>{e.textContent=i})})})});g("html",(e,{expression:t},{effect:n,evaluateLater:r})=>{let o=r(t);n(()=>{o(i=>{y(()=>{e.innerHTML=i,e._x_ignoreSelf=!0,O(e),delete e._x_ignoreSelf})})})});et(Zt(":",Qt(H("bind:"))));var Ln=(e,{value:t,modifiers:n,expression:r,original:o},{effect:i})=>{if(!t){let a={};Wr(a),m(e,r)(c=>{gn(e,c,o)},{scope:a});return}if(t==="key")return ki(e,r);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let s=m(e,r);i(()=>s(a=>{a===void 0&&typeof r=="string"&&r.match(/\./)&&(a=""),y(()=>un(e,t,a,n))}))};Ln.inline=(e,{value:t,modifiers:n,expression:r})=>{t&&(e._x_inlineBindings||(e._x_inlineBindings={}),e._x_inlineBindings[t]={expression:r,extract:!1})};g("bind",Ln);function ki(e,t){e._x_keyExpression=t}$t(()=>`[${H("data")}]`);g("data",(e,{expression:t},{cleanup:n})=>{if(Cr(e))return;t=t===""?"{}":t;let r={};Pe(r,e);let o={};qr(o,r);let i=L(e,t,{scope:o});(i===void 0||i===!0)&&(i={}),Pe(i,e);let s=z(i);Wt(s);let a=ee(e,s);s.init&&L(e,s.init),n(()=>{s.destroy&&L(e,s.destroy),a()})});g("show",(e,{modifiers:t,expression:n},{effect:r})=>{let o=m(e,n);e._x_doHide||(e._x_doHide=()=>{y(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})}),e._x_doShow||(e._x_doShow=()=>{y(()=>{e.style.length===1&&e.style.display==="none"?e.removeAttribute("style"):e.style.removeProperty("display")})});let i=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(s),u=Fe(d=>d?s():i(),d=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,d,s,i):d?a():i()}),c,l=!0;r(()=>o(d=>{!l&&d===c||(t.includes("immediate")&&(d?a():i()),u(d),c=d,l=!1)}))});g("for",(e,{expression:t},{effect:n,cleanup:r})=>{let o=Wi(t),i=m(e,o.items),s=m(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},n(()=>zi(e,o,i,s)),r(()=>{Object.values(e._x_lookup).forEach(a=>a.remove()),delete e._x_prevKeys,delete e._x_lookup})});function zi(e,t,n,r){let o=s=>typeof s=="object"&&!Array.isArray(s),i=e;n(s=>{Hi(s)&&s>=0&&(s=Array.from(Array(s).keys(),f=>f+1)),s===void 0&&(s=[]);let a=e._x_lookup,u=e._x_prevKeys,c=[],l=[];if(o(s))s=Object.entries(s).map(([f,_])=>{let x=Ot(t,_,f,s);r(b=>l.push(b),{scope:{index:f,...x}}),c.push(x)});else for(let f=0;f<s.length;f++){let _=Ot(t,s[f],f,s);r(x=>l.push(x),{scope:{index:f,..._}}),c.push(_)}let d=[],p=[],v=[],C=[];for(let f=0;f<u.length;f++){let _=u[f];l.indexOf(_)===-1&&v.push(_)}u=u.filter(f=>!v.includes(f));let re="template";for(let f=0;f<l.length;f++){let _=l[f],x=u.indexOf(_);if(x===-1)u.splice(f,0,_),d.push([re,f]);else if(x!==f){let b=u.splice(f,1)[0],w=u.splice(x-1,1)[0];u.splice(f,0,w),u.splice(x,0,b),p.push([b,w])}else C.push(_);re=_}for(let f=0;f<v.length;f++){let _=v[f];a[_]._x_effects&&a[_]._x_effects.forEach(Ct),a[_].remove(),a[_]=null,delete a[_]}for(let f=0;f<p.length;f++){let[_,x]=p[f],b=a[_],w=a[x],K=document.createElement("div");y(()=>{w||I('x-for ":key" is undefined or invalid',i),w.after(K),b.after(w),w._x_currentIfEl&&w.after(w._x_currentIfEl),K.before(b),b._x_currentIfEl&&b.after(b._x_currentIfEl),K.remove()}),w._x_refreshXForScope(c[l.indexOf(x)])}for(let f=0;f<d.length;f++){let[_,x]=d[f],b=_==="template"?i:a[_];b._x_currentIfEl&&(b=b._x_currentIfEl);let w=c[x],K=l[x],q=document.importNode(i.content,!0).firstElementChild,pt=z(w);ee(q,pt,i),q._x_refreshXForScope=Kn=>{Object.entries(Kn).forEach(([Dn,kn])=>{pt[Dn]=kn})},y(()=>{b.after(q),O(q)}),typeof K=="object"&&I("x-for key cannot be an object, it must be a string or an integer",i),a[K]=q}for(let f=0;f<C.length;f++)a[C[f]]._x_refreshXForScope(c[l.indexOf(C[f])]);i._x_prevKeys=l})}function Wi(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,n=/^\s*\(|\)\s*$/g,r=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,o=e.match(r);if(!o)return;let i={};i.items=o[2].trim();let s=o[1].replace(n,"").trim(),a=s.match(t);return a?(i.item=s.replace(t,"").trim(),i.index=a[1].trim(),a[2]&&(i.collection=a[2].trim())):i.item=s,i}function Ot(e,t,n,r){let o={};return/^\[.*\]$/.test(e.item)&&Array.isArray(t)?e.item.replace("[","").replace("]","").split(",").map(s=>s.trim()).forEach((s,a)=>{o[s]=t[a]}):/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t=="object"?e.item.replace("{","").replace("}","").split(",").map(s=>s.trim()).forEach(s=>{o[s]=t[s]}):o[e.item]=t,e.index&&(o[e.index]=n),e.collection&&(o[e.collection]=r),o}function Hi(e){return!Array.isArray(e)&&!isNaN(e)}function Fn(){}Fn.inline=(e,{expression:t},{cleanup:n})=>{let r=pe(e);r._x_refs||(r._x_refs={}),r._x_refs[t]=e,n(()=>delete r._x_refs[t])};g("ref",Fn);g("if",(e,{expression:t},{effect:n,cleanup:r})=>{let o=m(e,t),i=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return ee(a,{},e),y(()=>{e.after(a),O(a)}),e._x_currentIfEl=a,e._x_undoIf=()=>{T(a,u=>{u._x_effects&&u._x_effects.forEach(Ct)}),a.remove(),delete e._x_currentIfEl},a},s=()=>{e._x_undoIf&&(e._x_undoIf(),delete e._x_undoIf)};n(()=>o(a=>{a?i():s()})),r(()=>e._x_undoIf&&e._x_undoIf())});g("id",(e,{expression:t},{evaluate:n})=>{n(t).forEach(o=>Pi(e,o))});et(Zt("@",Qt(H("on:"))));g("on",ge((e,{value:t,modifiers:n,expression:r},{cleanup:o})=>{let i=r?m(e,r):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let s=We(e,t,n,a=>{i(()=>{},{scope:{$event:a},params:[a]})});o(()=>s())}));me("Collapse","collapse","collapse");me("Intersect","intersect","intersect");me("Focus","trap","focus");me("Mask","mask","mask");function me(e,t,n){g(t,r=>I(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${n}`,r))}ne.setEvaluator(Jt);ne.setReactivityEngine({reactive:lt,effect:ti,release:ni,raw:h});var qi=ne,ft=qi;function dt(e){let t=[];for(let n=0;n<e.attributes.length;++n){let r=e.attributes[n];r.name.startsWith("x-")&&t.push(r)}return t}function Ui(e){let t=document.createElement("template");dt(e).forEach(r=>{t.setAttribute(r.name,r.value),e.removeAttribute(r.name)}),e.parentNode.insertBefore(t,e),t.content.appendChild(e)}function Vi(e){dt(e).forEach(n=>{let r=n.name.match(/^(x-[^:]+)(:.+)$/);if(r){let o=null;if(["x-bind","x-on"].includes(r[1])){let i=r[1],s=r[2].substring(1);i==="x-on"&&s.startsWith("update:")&&(i+=":update",s=s.substring(7)),s.includes(":")&&(o=i+":"+s.replace(/:/g,"."))}else o=r[1]+r[2].replace(/:/g,".");o&&(e.setAttribute(o,n.value),e.removeAttribute(n.name))}})}function Ji(e){dt(e).forEach(n=>{n.name.match(/^x-transition.*(?!(enter|leave))/)&&e.setAttribute(n.name,"")})}function Yi(){document.querySelectorAll("[x-data],[x-data] *").forEach(e=>{Vi(e),Ji(e)}),document.querySelectorAll("[x-data] [x-for], [x-data] [x-if]").forEach(Ui)}function Bn(){window.Alpine=ft,window.Webflow||(window.Webflow=[]),window.Webflow.push(()=>{Yi(),ft.start()})}window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{Bn()});})();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.js"],
|
|
4
|
+
"sourcesContent": ["// Before you start:\n// 1. Add NPM_TOKEN from npn to the repo -> Settings / Secrets and variables / Actions\n// 2. Change name and URL in package ge.json file\n// 3. Remove these comments\nwindow.Webflow ||= [];\nwindow.Webflow.push(() => {\n // Write your code here\n});\n"],
|
|
5
|
+
"mappings": "MAIA,OAAO,UAAY,CAAC,EACpB,OAAO,QAAQ,KAAK,IAAM,CAE1B,CAAC",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/style.css
ADDED
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@widelab-nc/widelab",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Widelab starter template based on Finsweet template + add-ons.",
|
|
5
|
+
"homepage": "https://widelab.co",
|
|
6
|
+
"license": "ISC",
|
|
7
|
+
"keywords": [],
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Widelab",
|
|
10
|
+
"url": "https://widelab.co/"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/widelab-nc/widelab.git"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"main": "src/index.js",
|
|
18
|
+
"module": "src/index.js",
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@changesets/changelog-git": "^0.1.14",
|
|
24
|
+
"@changesets/cli": "^2.26.0",
|
|
25
|
+
"@playwright/test": "^1.30.0",
|
|
26
|
+
"@types/alpinejs": "^3.7.2",
|
|
27
|
+
"@typescript-eslint/eslint-plugin": "^5.51.0",
|
|
28
|
+
"@typescript-eslint/parser": "^5.51.0",
|
|
29
|
+
"alpinejs": "^3.13.0",
|
|
30
|
+
"cross-env": "^7.0.3",
|
|
31
|
+
"esbuild": "^0.19.1",
|
|
32
|
+
"esbuild-sass-plugin": "^2.12.0",
|
|
33
|
+
"eslint": "^8.33.0",
|
|
34
|
+
"eslint-config-prettier": "^8.6.0",
|
|
35
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
36
|
+
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
37
|
+
"prettier": "^2.8.4",
|
|
38
|
+
"typescript": "^4.9.5"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"alpinejs": "^3.13.0"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"dev": "cross-env NODE_ENV=development node ./bin/build.js",
|
|
45
|
+
"build": "cross-env NODE_ENV=production node ./bin/build.js",
|
|
46
|
+
"lint": "eslint --ignore-path .gitignore ./src && prettier --check ./src",
|
|
47
|
+
"lint:fix": "eslint --ignore-path .gitignore ./src --fix",
|
|
48
|
+
"check": "tsc --noEmit",
|
|
49
|
+
"format": "prettier --write ./src",
|
|
50
|
+
"test": "pnpm playwright test",
|
|
51
|
+
"test:headed": "pnpm playwright test --headed",
|
|
52
|
+
"release": "changeset publish",
|
|
53
|
+
"update": "pnpm update -i -L -r"
|
|
54
|
+
}
|
|
55
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {initAlpine} from "./init";
|
|
2
|
+
|
|
3
|
+
// Before you start:
|
|
4
|
+
// 1. Change name and URL in package.json file
|
|
5
|
+
// 2. Build and release to npm
|
|
6
|
+
// 3. Replace the npm path in Webflow site custom footer code
|
|
7
|
+
// 4. Remove these comments
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
// -----> Write your functions here
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
// !!!!!!!!! Keep this Alpine init at the end !!!!!!!!!
|
|
19
|
+
window.Webflow ||= [];
|
|
20
|
+
window.Webflow.push(() => {
|
|
21
|
+
initAlpine();
|
|
22
|
+
});
|