diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..892ba05 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: [3x1io] diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..fefc292 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,88 @@ +name: TomatoPHP CI/CD +on: + pull_request: + branches: + - master + - develop + push: + branches: + - master + - develop +jobs: + laravel: + name: Laravel (PHP ${{ matrix.php-versions }}) + runs-on: ubuntu-latest + env: + DB_DATABASE: laravel + DB_USERNAME: root + DB_PASSWORD: password + services: + mysql: + image: mysql:latest + env: + MYSQL_ALLOW_EMPTY_PASSWORD: false + MYSQL_ROOT_PASSWORD: password + MYSQL_DATABASE: laravel + ports: + - 3306/tcp + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + + redis: + image: redis + ports: + - 6379/tcp + options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 + strategy: + fail-fast: false + matrix: + php-versions: ['8.2'] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: sqlite, pdo_sqlite, pcntl, zip, intl, exif, mbstring, dom, fileinfo, mysql + coverage: xdebug + + - name: Copy .env Before Install Composer + run: php -r "file_exists('.env') || copy('.env.example', '.env'); echo file_get_contents('.env');" + + - name: Start MySQL Service + run: sudo /etc/init.d/mysql start + + - name: Get composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache composer dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + # Use composer.json for key, if composer.lock is not committed. + # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install Composer dependencies + run: composer install --no-progress --prefer-dist --optimize-autoloader + + - name: Generate Applications Key + run: php artisan key:generate + + - name: Clear Config + run: php artisan config:clear + + - name: Run Migration + run: php artisan migrate -v + env: + DB_PORT: ${{ job.services.mysql.ports['3306'] }} + REDIS_PORT: ${{ job.services.redis.ports['6379'] }} + + - name: Run NPM Install + run: npm install + + - name: Run NPM Run Build + run: npm run build diff --git a/.scripts/deploy.sh b/.scripts/deploy.sh new file mode 100755 index 0000000..03ca9d7 --- /dev/null +++ b/.scripts/deploy.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -e + +echo "Deployment started ..." + +# Pull the latest version of the app +git reset --hard +git pull origin master + +# Install composer dependencies +composer install + +# Clear the old cache +php8.2 artisan clear-compiled + +# Recreate cache +php8.2 artisan optimize + + +# Run database migrations +php8.2 artisan migrate --force + + +echo "Deployment finished!" diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..a77082f --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Fady Mondy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Modules/.gitkeep b/Modules/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md index 1a4c26b..f00e2f3 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,31 @@ -

Laravel Logo

+![Screenshot](https://github.com/tomatophp/tomato/blob/master/art/screenshot.png) -

-Build Status -Total Downloads -Latest Stable Version -License -

+# Tomato Framework -## About Laravel +🍅 TomatoPHP is built to make it easy to develop web apps and API by generating files of CRUD operations and support helpers of tonnes of functions to make it easy to manage and use framework services. -Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: +## Installation -- [Simple, fast routing engine](https://laravel.com/docs/routing). -- [Powerful dependency injection container](https://laravel.com/docs/container). -- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. -- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). -- Database agnostic [schema migrations](https://laravel.com/docs/migrations). -- [Robust background job processing](https://laravel.com/docs/queues). -- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). +```bash +composer create-project tomatophp/tomato +``` -Laravel is accessible, powerful, and provides tools required for large, robust applications. +## Support -## Learning Laravel +you can join our discord server to get support [TomatoPHP](https://discord.gg/Xqmt35Uh) -Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. +## Docs -You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch. +you can check docs of this package on [Docs](https://docs.tomatophp.com) -If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. +## Changelog -## Laravel Sponsors +Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. -We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com). +## Credits -### Premium Partners - -- **[Vehikl](https://vehikl.com/)** -- **[Tighten Co.](https://tighten.co)** -- **[WebReinvent](https://webreinvent.com/)** -- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** -- **[64 Robots](https://64robots.com)** -- **[Curotec](https://www.curotec.com/services/technologies/laravel/)** -- **[Cyber-Duck](https://cyber-duck.co.uk)** -- **[DevSquad](https://devsquad.com/hire-laravel-developers)** -- **[Jump24](https://jump24.co.uk)** -- **[Redberry](https://redberry.international/laravel/)** -- **[Active Logic](https://activelogic.com)** -- **[byte5](https://byte5.de)** -- **[OP.GG](https://op.gg)** - -## Contributing - -Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). - -## Code of Conduct - -In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). - -## Security Vulnerabilities - -If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. +- [Fady Mondy](https://github.com/3x1io) ## License -The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). +The MIT License (MIT). Please see [License File](LICENSE.md) for more information. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..e69de29 diff --git a/app/Models/User.php b/app/Models/User.php index def621f..b5b3311 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,14 +2,21 @@ namespace App\Models; -// use Illuminate\Contracts\Auth\MustVerifyEmail; +use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; +use Laravel\Fortify\TwoFactorAuthenticatable; +use Laravel\Jetstream\HasProfilePhoto; +use Laravel\Jetstream\HasTeams; +use Laravel\Sanctum\HasApiTokens; -class User extends Authenticatable + class User extends Authenticatable { - use HasFactory, Notifiable; + use HasApiTokens, HasFactory, Notifiable; + use HasTeams; + use HasProfilePhoto; + use TwoFactorAuthenticatable; /** * The attributes that are mass assignable. @@ -33,15 +40,12 @@ class User extends Authenticatable ]; /** - * Get the attributes that should be cast. + * The attributes that should be cast. * - * @return array + * @var array */ - protected function casts(): array - { - return [ - 'email_verified_at' => 'datetime', - 'password' => 'hashed', - ]; - } + protected $casts = [ + 'email_verified_at' => 'datetime', + 'password' => 'hashed', + ]; } diff --git a/art/cover.png b/art/cover.png new file mode 100644 index 0000000..91ae706 Binary files /dev/null and b/art/cover.png differ diff --git a/art/dashboard-dark-rtl.png b/art/dashboard-dark-rtl.png new file mode 100644 index 0000000..d9cffd1 Binary files /dev/null and b/art/dashboard-dark-rtl.png differ diff --git a/art/dashboard-dark.png b/art/dashboard-dark.png new file mode 100644 index 0000000..0177843 Binary files /dev/null and b/art/dashboard-dark.png differ diff --git a/art/dashboard-light.png b/art/dashboard-light.png new file mode 100644 index 0000000..e771b4a Binary files /dev/null and b/art/dashboard-light.png differ diff --git a/art/login-dark.png b/art/login-dark.png new file mode 100644 index 0000000..2cf36d4 Binary files /dev/null and b/art/login-dark.png differ diff --git a/art/profile.png b/art/profile.png new file mode 100644 index 0000000..25d9004 Binary files /dev/null and b/art/profile.png differ diff --git a/art/roles.png b/art/roles.png new file mode 100644 index 0000000..7b94a6b Binary files /dev/null and b/art/roles.png differ diff --git a/art/screenshot.png b/art/screenshot.png new file mode 100644 index 0000000..6af5a84 Binary files /dev/null and b/art/screenshot.png differ diff --git a/art/settings.png b/art/settings.png new file mode 100644 index 0000000..e47174d Binary files /dev/null and b/art/settings.png differ diff --git a/art/slideover-light.png b/art/slideover-light.png new file mode 100644 index 0000000..9823029 Binary files /dev/null and b/art/slideover-light.png differ diff --git a/art/table-dark.png b/art/table-dark.png new file mode 100644 index 0000000..25390e2 Binary files /dev/null and b/art/table-dark.png differ diff --git a/art/table-light.png b/art/table-light.png new file mode 100644 index 0000000..1da540e Binary files /dev/null and b/art/table-light.png differ diff --git a/art/v1.2 CRUD.png b/art/v1.2 CRUD.png new file mode 100644 index 0000000..f68d3bd Binary files /dev/null and b/art/v1.2 CRUD.png differ diff --git a/art/v1.2 dark.png b/art/v1.2 dark.png new file mode 100644 index 0000000..3a3b8aa Binary files /dev/null and b/art/v1.2 dark.png differ diff --git a/art/v1.2 dashboard dark.png b/art/v1.2 dashboard dark.png new file mode 100644 index 0000000..9df5071 Binary files /dev/null and b/art/v1.2 dashboard dark.png differ diff --git a/art/v1.2 dashboard.png b/art/v1.2 dashboard.png new file mode 100644 index 0000000..12e650d Binary files /dev/null and b/art/v1.2 dashboard.png differ diff --git a/art/v1.2 home.png b/art/v1.2 home.png new file mode 100644 index 0000000..2324913 Binary files /dev/null and b/art/v1.2 home.png differ diff --git a/art/v1.2 login.png b/art/v1.2 login.png new file mode 100644 index 0000000..6eee432 Binary files /dev/null and b/art/v1.2 login.png differ diff --git a/art/v1.2 profile.png b/art/v1.2 profile.png new file mode 100644 index 0000000..e9ae93d Binary files /dev/null and b/art/v1.2 profile.png differ diff --git a/bin/serve b/bin/serve new file mode 100755 index 0000000..fb70637 --- /dev/null +++ b/bin/serve @@ -0,0 +1,116 @@ +#!/bin/bash + +# Fail the whole script if any command fails +set -euo pipefail +trap "echo \"[INFO] To stop the docker container you need to run: bin/stop\"" EXIT + +FRESH=false + +# Delete old environment for new setup +if [ $# -eq 1 ] && [ $1 == '--fresh' ] +then + rm -rf node_modules + rm -rf vendor + rm -f storage/sail/composer.lock + rm -f storage/sail/package-lock.json + rm -f storage/sail/yarn.lock + rm -f storage/sail/docker-compose.yml + rm -f .env +fi + +# Create environment file if it doesn't exist yet +if [ ! -f .env ] +then + sed 's/APP_URL=.*/APP_URL=http:\/\/localhost/g;s/DB_HOST=.*/DB_HOST=mysql/g;s/REDIS_HOST=.*/REDIS_HOST=redis/g;s/MAIL_HOST=.*/MAIL_HOST=mailpit/g' < .env.example > .env + FRESH=true +fi + +# Install needed composer dependencies for Laravel Sail +if [ ! -f vendor/bin/sail ] +then + docker run --rm \ + -u "$(id -u):$(id -g)" \ + -v $(pwd):/var/www/html \ + -w /var/www/html \ + laravelsail/php82-composer:latest \ + composer install --ignore-platform-reqs +fi + +# Create/Sync Docker-Containers based on Docker Compose File +if [ ! -f storage/sail/docker-compose.yml ] || ! cmp --silent -- "docker-compose.yml" "storage/sail/docker-compose.yml" +then + FRESH=true + + vendor/bin/sail stop + vendor/bin/sail build --no-cache --pull + + cp docker-compose.yml storage/sail/docker-compose.yml +fi + +# Get Laravel Sail up and running in the background +vendor/bin/sail up -d --wait + +# Install node dependencies if not installed yet +if [ ! -d node_modules ] +then + + if [ ! -f yarn.lock ] + then + vendor/bin/sail npm install + + # Save currently installed dependencies + cp package-lock.json storage/sail/package-lock.json + else + vendor/bin/sail yarn install + + # Save currently installed dependencies + cp yarn.lock storage/sail/yarn.lock + fi + +fi + +# Install latest composer dependencies, if out of sync +if ! cmp --silent -- "composer.lock" "storage/sail/composer.lock" +then + vendor/bin/sail composer install + + # Save currently installed dependencies + cp composer.lock storage/sail/composer.lock +fi + +# Install latest npm dependencies, if out of sync +if ! cmp --silent -- "package-lock.json" "storage/sail/package-lock.json" +then + + if [ ! -f yarn.lock ] + then + vendor/bin/sail npm install + + # Save currently installed dependencies + cp package-lock.json storage/sail/package-lock.json + else + vendor/bin/sail yarn install + + # Save currently installed dependencies + cp yarn.lock storage/sail/yarn.lock + fi + +fi + +# Migrate Database to the newest version +if $FRESH +then + vendor/bin/sail artisan migrate:fresh --seed --force +else + vendor/bin/sail artisan migrate --force +fi + + +# Start the Development Server + +if [ ! -f yarn.lock ] +then + vendor/bin/sail npm run dev +else + vendor/bin/sail yarn run dev +fi diff --git a/bin/stop b/bin/stop new file mode 100755 index 0000000..c6dba39 --- /dev/null +++ b/bin/stop @@ -0,0 +1,7 @@ +#!/bin/bash + +# Fail the whole script if any command fails +set -euo pipefail + +# Stop Laravel Sail and the docker containers +vendor/bin/sail stop diff --git a/bin/test b/bin/test new file mode 100755 index 0000000..64b72ed --- /dev/null +++ b/bin/test @@ -0,0 +1,31 @@ +#!/bin/bash + +# Display Help Text +if [ $# -eq 1 ] && [ $1 == '--help' ] +then + echo "Usage: bin/test [--tests|--dusk]" + echo "--tests : Only run unit and feature tests" + echo "--dusk : Only run dusk tests" + exit 0 +fi + +# Fail the whole script if any command fails +set -euo pipefail +trap "echo \"[INFO] To stop the docker container you need to run: bin/stop\"" EXIT + +# Get Laravel Sail up and running in the background +vendor/bin/sail up -d --wait + +# Run unit and feature tests +if [[ $# -eq 0 ]] || [[ $1 == '--tests' ]] +then + vendor/bin/sail test --stop-on-failure +fi + +# Run dusk tests +if [[ $# -eq 0 ]] || [[ $1 == '--dusk' ]] +then + vendor/bin/sail artisan migrate:fresh --env=dusk --force --quiet + vendor/bin/sail dusk --env=dusk --stop-on-failure +fi + diff --git a/bin/update b/bin/update new file mode 100755 index 0000000..e8ba4d7 --- /dev/null +++ b/bin/update @@ -0,0 +1,24 @@ +#!/bin/bash + +# Fail the whole script if any command fails +set -euo pipefail +trap "echo \"[INFO] To stop the docker container you need to run: bin/stop\"" EXIT + +# Get Laravel Sail up and running in the background +vendor/bin/sail up -d --wait + +# Update composer dependencies +vendor/bin/sail composer update +cp composer.lock storage/sail/composer.lock + +# Update dependencies +if [ ! -f yarn.lock ] +then + vendor/bin/sail npm update + vendor/bin/sail npm run build + cp package-lock.json storage/sail/package-lock.json +else + vendor/bin/sail yarn upgrade + vendor/bin/sail yarn run build + cp yarn.lock storage/sail/yarn.lock +fi diff --git a/bootstrap/app.php b/bootstrap/app.php index 7b162da..cff307e 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -11,8 +11,10 @@ health: '/up', ) ->withMiddleware(function (Middleware $middleware) { - // + $middleware->group('splade', [ + \ProtoneMedia\Splade\Http\SpladeMiddleware::class + ]); }) ->withExceptions(function (Exceptions $exceptions) { - // + $exceptions->renderable(\ProtoneMedia\Splade\SpladeCore::exceptionHandler($exceptions->handler)); })->create(); diff --git a/bootstrap/ssr/assets/CompilerErrorMessages-6b34f14b-6b34f14b.mjs b/bootstrap/ssr/assets/CompilerErrorMessages-6b34f14b-6b34f14b.mjs new file mode 100644 index 0000000..d201653 --- /dev/null +++ b/bootstrap/ssr/assets/CompilerErrorMessages-6b34f14b-6b34f14b.mjs @@ -0,0 +1,60 @@ +const e = { + 0: "Illegal comment.", + 1: "CDATA section is allowed only in XML context.", + 2: "Duplicate attribute.", + 3: "End tag cannot have attributes.", + 4: "Illegal '/' in tags.", + 5: "Unexpected EOF in tag.", + 6: "Unexpected EOF in CDATA section.", + 7: "Unexpected EOF in comment.", + 8: "Unexpected EOF in script.", + 9: "Unexpected EOF in tag.", + 10: "Incorrectly closed comment.", + 11: "Incorrectly opened comment.", + 12: "Illegal tag name. Use '<' to print '<'.", + 13: "Attribute value was expected.", + 14: "End tag name was expected.", + 15: "Whitespace was expected.", + 16: "Unexpected '`; + }), (!l || !o) && (s += ``)) : (l && Mt.value++, (!l || !o) && (ie.value++, tt[ie.value] = tt[ie.value] || new yi(ie.value))); + let u = e.data.splade.persistentLayout && i === e.data.splade.persistentLayout, c = 0; + !$e && e.data.splade.preserveScroll && (c = window.scrollY), Ur( + u ? R.value.html : s, + c, + !t && !e.data.splade.preventViewTransition + ); + const v = Dr( + n, + e.data.splade.head, + u ? R.value.html : s, + a, + R.value.rememberedState ? { ...R.value.rememberedState } : {}, + ie.value, + Mt.value, + e.data.splade.persistentLayout + ); + t ? bi(v) : ho(v); +} +function yo() { + ae.value--, Gt(wo(ae.value)); +} +const wi = vueExports.ref({}), Si = (e) => wi.value[e], bo = (e) => Object.keys(Si.value[e]).length > 0, Oi = vueExports.ref({}), wo = (e) => Oi.value[e], $i = vueExports.ref({}), So = (e) => $i.value[e], rt = vueExports.ref([]); +function Oo(e) { + rt.value.push(e); +} +const $o = vueExports.computed(() => co(rt.value)); +function Eo(e) { + rt.value[e].dismissed = true, rt.value[e].html = null; +} +const Vr = vueExports.ref(null); +function To(e, t, r, n, i, s, a) { + let o, l; + typeof i > "u" && (i = false), typeof s > "u" && (s = false), typeof a > "u" && (a = false); + const u = new Promise((c, v) => { + o = c, l = v; + }); + return Vr.value = { + title: e, + text: t, + confirmButton: r, + cancelButton: n, + resolvePromise: o, + rejectPromise: l, + confirmPassword: i, + confirmPasswordOnce: s, + confirmDanger: a + }, u; +} +function xo() { + Vr.value = null; +} +const Ei = vueExports.ref({}); +function Hr(e) { + Nr.value = e.persistentLayout, Ei.value = e.shared ? e.shared : {}, $i.value[ae.value] = e.flash ? e.flash : {}, Oi.value[ae.value] = e.head ? e.head : {}, oo(e.toasts ? e.toasts : [], (t) => { + rt.value.push(t); + }), wi.value[ae.value] = e.errors ? e.errors : {}; +} +const Ti = vueExports.ref(() => { +}), xi = vueExports.ref(() => { +}), _i = vueExports.ref(() => { +}), Ii = vueExports.ref(() => { +}); +function Gt(e) { + Ti.value(e); +} +function Ur(e, t, r) { + xi.value(e, t, r === true); +} +function Ai(e, t) { + zt.value[ae.value] = true, _i.value(e, t); +} +function _o(e) { + return zt.value[e]; +} +function Pi(e) { + Ii.value(e); +} +const Wr = vueExports.ref({}); +function qi(e, t, r) { + Wr.value[e] = t, r && Io(e, t); +} +function zr() { + return JSON.parse(localStorage.getItem("splade") || "{}") || {}; +} +function Io(e, t) { + let r = zr(); + r[e] = t, localStorage.setItem("splade", JSON.stringify(r)); +} +function Ao(e, t) { + return t ? zr()[e] : Wr.value[e]; +} +function Po(e, t) { + if (t) { + let r = zr(); + delete r[e], localStorage.setItem("splade", JSON.stringify(r)); + } + delete Wr.value[e]; +} +function Ke(e, t, r, n, i, s) { + if ($e || qi("scrollY", window.scrollY), t.toUpperCase() === "GET") { + const o = new URLSearchParams(r).toString(); + o != "" && (e = `${e.split("?")[0]}?${o}`), r = {}; + } + ye("internal:request", { url: e, method: t, data: r, headers: n, replace: i }); + const a = ne({ + method: t, + url: e, + data: r, + headers: { + "X-Splade": true, + "X-Requested-With": "XMLHttpRequest", + Accept: "text/html, application/xhtml+xml", + ...n + }, + responseType: s ? "blob" : "json", + onUploadProgress: (o) => { + r instanceof FormData && (o.percentage = Math.round(o.loaded / o.total * 100), ye("internal:request-progress", { url: e, method: t, data: r, headers: n, replace: i, progress: o })); + } + }); + return a.then((o) => { + const l = e.split("#")[1] || ""; + go(o, i, l), ye("internal:request-response", { url: e, method: t, data: r, headers: n, replace: i, response: o }); + }).catch(async (o) => { + if (ye("internal:request-error", { url: e, method: t, data: r, headers: n, replace: i, error: o }), !o.response) + return; + const l = o.response; + if (l.status == 409 && l.headers["x-splade-redirect-away"]) + return window.location = l.headers["x-splade-redirect-away"]; + let u = {}; + if (l.data instanceof Blob) { + const c = await l.data.text(); + l.data.type === "application/json" && typeof c == "string" ? u = JSON.parse(c) || {} : l.data.html = c; + } else + u = l.data.splade; + u && !u.lazy && !u.rehydrate && Hr(u), l.status != 422 && Pi( + l.data.html ? l.data.html : l.data + ); + }), a; +} +function Ci(e, t) { + return typeof t > "u" && (t = {}), Ke(e, "GET", {}, t, true); +} +function qo(e, t) { + return typeof t > "u" && (t = {}), Ke(e, "GET", {}, t, false); +} +function Co(e) { + return Ke(e, "GET", {}, { "X-Splade-Modal": "modal" }, false); +} +const Gr = vueExports.ref({}); +function Fo(e) { + const t = Gr.value[e]; + return t ? (ae.value++, Ai(t.html, t.type), true) : false; +} +function ko(e, t, r) { + Gr.value[e] = { html: t, type: r }; +} +function Lo(e) { + return Ke(e, "GET", {}, { "X-Splade-Modal": "slideover" }, false); +} +function Ro(e, t) { + return Ke(e, "GET", {}, { "X-Splade-Lazy": t }, false); +} +function Bo(e, t) { + return Ke(e, "GET", {}, { "X-Splade-Rehydrate": t }, false); +} +function jo(e) { + typeof e > "u" && (e = false); + const t = { + "X-Splade-Refresh": true + }; + return e && (t["X-Splade-Preserve-Scroll"] = true), Ci(R.value.url, t); +} +function Mo(e, t) { + tt[ie.value].on(e, t); +} +function Do(e, t) { + tt[ie.value].off(e, t); +} +function ye(e, t) { + typeof t > "u" && (t = {}), tt[ie.value].emit(e, t), $e || document.dispatchEvent(new CustomEvent(`splade:${e}`, { detail: t })); +} +const p = { + init: fo, + replace: Ci, + visit: qo, + modal: Co, + slideover: Lo, + refresh: jo, + request: Ke, + lazy: Ro, + rehydrate: Bo, + replaceUrlOfCurrentPage: mo, + htmlForDynamicComponent(e) { + return R.value.dynamics[e]; + }, + setOnHead(e) { + Ti.value = e; + }, + setOnHtml(e) { + xi.value = e; + }, + setOnModal(e) { + _i.value = e; + }, + setOnServerError(e) { + Ii.value = e; + }, + onServerError: Pi, + hasValidationErrors: bo, + validationErrors: Si, + sharedData: Ei, + // ref + flashData: So, + toasts: rt, + // ref + toastsReversed: $o, + // ref + confirmModal: Vr, + // ref + confirm: To, + clearConfirmModal: xo, + pushToast: Oo, + dismissToast: Eo, + restore: Ao, + remember: qi, + forget: Po, + popStack: yo, + currentStack: ae, + // ref + stackType: _o, + pageVisitId: vueExports.computed(() => R.value.pageVisitId), + // ref + dynamicVisitId: vueExports.computed(() => R.value.dynamicVisitId), + // ref + isSsr: $e, + openPreloadedModal: Fo, + registerPreloadedModal: ko, + on: Mo, + off: Do, + emit: ye +}; +var No = "[object String]"; +function se(e) { + return typeof e == "string" || !M(e) && Le(e) && Be(e) == No; +} +const ue = { + __name: "Render", + props: { + html: { + type: String, + required: false, + default: "" + }, + passthrough: { + type: Object, + required: false, + default() { + return {}; + } + } + }, + setup(e) { + const t = e, r = vueExports.ref(null); + function n() { + r.value = vueExports.h({ + template: t.html, + data() { + return { ...t.passthrough }; + } + }), vueExports.nextTick(() => { + p.emit("rendered"); + }); + } + return vueExports.watch(() => t.html, n, { immediate: true }), (i, s) => e.html ? (vueExports.openBlock(), vueExports.createBlock(vueExports.unref(r), { key: 0 })) : vueExports.createCommentVNode("", true); + } +}, Vo = { + __name: "ServerError", + props: { + html: { + type: String, + required: true + } + }, + emits: ["close"], + setup(e, { emit: t }) { + const r = e, n = t, i = vueExports.ref(null); + function s() { + const l = document.createElement("html"); + l.innerHTML = r.html, l.querySelectorAll("a").forEach((c) => c.setAttribute("target", "_top")), document.body.style.overflow = "hidden"; + const u = i.value; + if (!u.contentWindow) + throw new Error("iframe not yet ready."); + u.contentWindow.document.open(), u.contentWindow.document.write(l.outerHTML), u.contentWindow.document.close(), document.addEventListener("keydown", a); + } + function a(l) { + l.keyCode === 27 && o(); + } + function o() { + document.body.style.overflow = "visible", document.removeEventListener("keydown", a), n("close"); + } + return vueExports.onMounted(() => s()), (l, u) => (vueExports.openBlock(), vueExports.createElementBlock("div", { + style: { position: "fixed", top: "0px", right: "0px", bottom: "0px", left: "0px", "z-index": "200000", "box-sizing": "border-box", height: "100vh", width: "100vw", "background-color": "rgb(0 0 0 / 0.75)", padding: "2rem" }, + onClick: o + }, [ + vueExports.createElementVNode("iframe", { + ref_key: "iframeElement", + ref: i, + class: "bg-white w-full h-full" + }, null, 512) + ])); + } +}, Ho = { + __name: "SpladeApp", + props: { + el: { + type: [String, Object], + required: false, + default: "" + }, + components: { + type: String, + required: false, + default: (e) => { + if (!p.isSsr) { + const t = se(e.el) ? document.getElementById(e.el) : e.el; + return JSON.parse(t.dataset.components) || ""; + } + } + }, + initialHtml: { + type: String, + required: false, + default: (e) => { + if (!p.isSsr) { + const t = se(e.el) ? document.getElementById(e.el) : e.el; + return JSON.parse(t.dataset.html) || ""; + } + } + }, + initialDynamics: { + type: Object, + required: false, + default: (e) => { + if (!p.isSsr) { + const t = se(e.el) ? document.getElementById(e.el) : e.el; + return JSON.parse(t.dataset.dynamics) || {}; + } + } + }, + initialSpladeData: { + type: Object, + required: false, + default: (e) => { + if (!p.isSsr) { + const t = se(e.el) ? document.getElementById(e.el) : e.el; + return JSON.parse(t.dataset.splade) || {}; + } + } + } + }, + setup(e) { + const t = e; + vueExports.provide("stack", 0); + const r = vueExports.ref(), n = vueExports.ref([]), i = vueExports.ref(null), s = vueExports.ref(null), a = vueExports.ref(true), o = vueExports.inject("$spladeOptions") || {}, l = vueExports.computed(() => p.currentStack.value < 1 ? [] : { + filter: "blur(4px)", + "transition-property": "filter", + "transition-duration": "150ms", + "transition-timing-function": "cubic-bezier(0.4, 0, 0.2, 1)" + }); + function u() { + i.value = null; + } + function c(h) { + n.value[h] = null, p.popStack(); + } + function v(h) { + const m = document.createElement("meta"); + te(h, (d, b) => { + m[b] = d; + }), document.getElementsByTagName("head")[0].appendChild(m); + } + function g(h) { + var d; + let m = "meta"; + te(h, (b, O) => { + m = `${m}[${O}="${b}"]`; + }); + try { + (d = document.querySelector(m)) == null || d.remove(); + } catch { + } + } + p.setOnHead((h) => { + var m; + if (!p.isSsr) { + if (s.value === null) { + s.value = h.meta; + return; + } + if (s.value.forEach((d) => { + g(d); + }), s.value = h.meta, document.title = h.title, h.meta.forEach((d) => { + v(d); + }), (m = document.querySelector('link[rel="canonical"]')) == null || m.remove(), h.canonical) { + const d = document.createElement("link"); + d.rel = "canonical", d.href = h.canonical, document.getElementsByTagName("head")[0].appendChild(d); + } + } + }); + const f = (h, m) => { + n.value = [], r.value = h, vueExports.nextTick(() => { + if (!p.isSsr) { + const d = window.location.hash; + d && document.getElementById(d.substring(1)) ? window.location.hash = d : window.scrollTo(0, m); + } + o.transform_anchors && [...document.querySelectorAll("a")].forEach((d) => { + d.href == "" || d.href.charAt(0) == "#" || d.__vnode.dynamicProps === null && (d.hasAttribute("download") || (d.onclick = function(b) { + b.preventDefault(), p.visit(d.href); + })); + }); + }); + }; + return p.setOnHtml((h, m, d) => { + if (!p.isSsr && document.startViewTransition && o.view_transitions && d) + return document.startViewTransition(() => f(h, m)); + f(h, m); + }), p.setOnModal(function(h, m) { + n.value[p.currentStack.value] && (a.value = false), n.value[p.currentStack.value] = { html: h, type: m }, vueExports.nextTick(() => { + a.value = true; + }); + }), p.setOnServerError(function(h) { + i.value = h; + }), p.init(t.initialHtml, t.initialDynamics, t.initialSpladeData), vueExports.onMounted(() => { + if (p.isSsr) + return; + const h = se(t.el) ? document.getElementById(t.el) : t.el; + ["components", "html", "dynamics", "splade"].forEach((m) => { + delete h.dataset[m]; + }); + }), (h, m) => (vueExports.openBlock(), vueExports.createElementBlock("div", null, [ + vueExports.unref(p).isSsr ? (vueExports.openBlock(), vueExports.createBlock(ue, { + key: `visit.${vueExports.unref(p).pageVisitId.value}`, + style: vueExports.normalizeStyle(l.value), + html: r.value + }, null, 8, ["style", "html"])) : (vueExports.openBlock(), vueExports.createBlock(vueExports.KeepAlive, { + key: 0, + max: vueExports.unref(o).max_keep_alive + }, [ + (vueExports.openBlock(), vueExports.createBlock(ue, { + key: `visit.${vueExports.unref(p).pageVisitId.value}`, + style: vueExports.normalizeStyle(l.value), + html: r.value + }, null, 8, ["style", "html"])) + ], 1032, ["max"])), + vueExports.createVNode(ue, { html: e.components }, null, 8, ["html"]), + (vueExports.openBlock(true), vueExports.createElementBlock(vueExports.Fragment, null, vueExports.renderList(vueExports.unref(p).currentStack.value, (d) => (vueExports.openBlock(), vueExports.createBlock(ue, { + key: `modal.${d}`, + type: n.value[d].type, + html: n.value[d].html, + stack: d, + "on-top-of-stack": vueExports.unref(p).currentStack.value === d, + animate: a.value, + onClose: (b) => c(d) + }, null, 8, ["type", "html", "stack", "on-top-of-stack", "animate", "onClose"]))), 128)), + i.value ? (vueExports.openBlock(), vueExports.createBlock(Vo, { + key: 2, + html: i.value, + onClose: u + }, null, 8, ["html"])) : vueExports.createCommentVNode("", true) + ])); + } +}; +function Cp(e) { + return () => vueExports.h(Ho, e); +} +var Uo = Object.prototype, Wo = Uo.hasOwnProperty; +function zo(e, t) { + return e != null && Wo.call(e, t); +} +var Go = "[object Symbol]"; +function Xt(e) { + return typeof e == "symbol" || Le(e) && Be(e) == Go; +} +var Xo = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Ko = /^\w*$/; +function Xr(e, t) { + if (M(e)) + return false; + var r = typeof e; + return r == "number" || r == "symbol" || r == "boolean" || e == null || Xt(e) ? true : Ko.test(e) || !Xo.test(e) || t != null && e in Object(t); +} +var Jo = ve["__core-js_shared__"]; +const cr = Jo; +var An = function() { + var e = /[^.]+$/.exec(cr && cr.keys && cr.keys.IE_PROTO || ""); + return e ? "Symbol(src)_1." + e : ""; +}(); +function Qo(e) { + return !!An && An in e; +} +var Yo = Function.prototype, Zo = Yo.toString; +function Je(e) { + if (e != null) { + try { + return Zo.call(e); + } catch { + } + try { + return e + ""; + } catch { + } + } + return ""; +} +var el = /[\\^$.*+?()[\]{}|]/g, tl = /^\[object .+?Constructor\]$/, rl = Function.prototype, nl = Object.prototype, il = rl.toString, sl = nl.hasOwnProperty, al = RegExp( + "^" + il.call(sl).replace(el, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" +); +function ol(e) { + if (!J(e) || Qo(e)) + return false; + var t = mi(e) ? al : tl; + return t.test(Je(e)); +} +function ll(e, t) { + return e == null ? void 0 : e[t]; +} +function Qe(e, t) { + var r = ll(e, t); + return ol(r) ? r : void 0; +} +var ul = Qe(Object, "create"); +const bt = ul; +function cl() { + this.__data__ = bt ? bt(null) : {}, this.size = 0; +} +function dl(e) { + var t = this.has(e) && delete this.__data__[e]; + return this.size -= t ? 1 : 0, t; +} +var fl = "__lodash_hash_undefined__", pl = Object.prototype, hl = pl.hasOwnProperty; +function ml(e) { + var t = this.__data__; + if (bt) { + var r = t[e]; + return r === fl ? void 0 : r; + } + return hl.call(t, e) ? t[e] : void 0; +} +var vl = Object.prototype, gl = vl.hasOwnProperty; +function yl(e) { + var t = this.__data__; + return bt ? t[e] !== void 0 : gl.call(t, e); +} +var bl = "__lodash_hash_undefined__"; +function wl(e, t) { + var r = this.__data__; + return this.size += this.has(e) ? 0 : 1, r[e] = bt && t === void 0 ? bl : t, this; +} +function Ge(e) { + var t = -1, r = e == null ? 0 : e.length; + for (this.clear(); ++t < r; ) { + var n = e[t]; + this.set(n[0], n[1]); + } +} +Ge.prototype.clear = cl; +Ge.prototype.delete = dl; +Ge.prototype.get = ml; +Ge.prototype.has = yl; +Ge.prototype.set = wl; +function Sl() { + this.__data__ = [], this.size = 0; +} +function Kr(e, t) { + return e === t || e !== e && t !== t; +} +function Kt(e, t) { + for (var r = e.length; r--; ) + if (Kr(e[r][0], t)) + return r; + return -1; +} +var Ol = Array.prototype, $l = Ol.splice; +function El(e) { + var t = this.__data__, r = Kt(t, e); + if (r < 0) + return false; + var n = t.length - 1; + return r == n ? t.pop() : $l.call(t, r, 1), --this.size, true; +} +function Tl(e) { + var t = this.__data__, r = Kt(t, e); + return r < 0 ? void 0 : t[r][1]; +} +function xl(e) { + return Kt(this.__data__, e) > -1; +} +function _l(e, t) { + var r = this.__data__, n = Kt(r, e); + return n < 0 ? (++this.size, r.push([e, t])) : r[n][1] = t, this; +} +function Te(e) { + var t = -1, r = e == null ? 0 : e.length; + for (this.clear(); ++t < r; ) { + var n = e[t]; + this.set(n[0], n[1]); + } +} +Te.prototype.clear = Sl; +Te.prototype.delete = El; +Te.prototype.get = Tl; +Te.prototype.has = xl; +Te.prototype.set = _l; +var Il = Qe(ve, "Map"); +const wt = Il; +function Al() { + this.size = 0, this.__data__ = { + hash: new Ge(), + map: new (wt || Te)(), + string: new Ge() + }; +} +function Pl(e) { + var t = typeof e; + return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; +} +function Jt(e, t) { + var r = e.__data__; + return Pl(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map; +} +function ql(e) { + var t = Jt(this, e).delete(e); + return this.size -= t ? 1 : 0, t; +} +function Cl(e) { + return Jt(this, e).get(e); +} +function Fl(e) { + return Jt(this, e).has(e); +} +function kl(e, t) { + var r = Jt(this, e), n = r.size; + return r.set(e, t), this.size += r.size == n ? 0 : 1, this; +} +function xe(e) { + var t = -1, r = e == null ? 0 : e.length; + for (this.clear(); ++t < r; ) { + var n = e[t]; + this.set(n[0], n[1]); + } +} +xe.prototype.clear = Al; +xe.prototype.delete = ql; +xe.prototype.get = Cl; +xe.prototype.has = Fl; +xe.prototype.set = kl; +var Ll = "Expected a function"; +function Jr(e, t) { + if (typeof e != "function" || t != null && typeof t != "function") + throw new TypeError(Ll); + var r = function() { + var n = arguments, i = t ? t.apply(this, n) : n[0], s = r.cache; + if (s.has(i)) + return s.get(i); + var a = e.apply(this, n); + return r.cache = s.set(i, a) || s, a; + }; + return r.cache = new (Jr.Cache || xe)(), r; +} +Jr.Cache = xe; +var Rl = 500; +function Bl(e) { + var t = Jr(e, function(n) { + return r.size === Rl && r.clear(), n; + }), r = t.cache; + return t; +} +var jl = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Ml = /\\(\\)?/g, Dl = Bl(function(e) { + var t = []; + return e.charCodeAt(0) === 46 && t.push(""), e.replace(jl, function(r, n, i, s) { + t.push(i ? s.replace(Ml, "$1") : n || r); + }), t; +}); +const Nl = Dl; +function Fi(e, t) { + for (var r = -1, n = e == null ? 0 : e.length, i = Array(n); ++r < n; ) + i[r] = t(e[r], r, e); + return i; +} +var Vl = 1 / 0, Pn = ke ? ke.prototype : void 0, qn = Pn ? Pn.toString : void 0; +function Qt(e) { + if (typeof e == "string") + return e; + if (M(e)) + return Fi(e, Qt) + ""; + if (Xt(e)) + return qn ? qn.call(e) : ""; + var t = e + ""; + return t == "0" && 1 / e == -Vl ? "-0" : t; +} +function Qr(e) { + return e == null ? "" : Qt(e); +} +function Yr(e, t) { + return M(e) ? e : Xr(e, t) ? [e] : Nl(Qr(e)); +} +var Hl = 1 / 0; +function $t(e) { + if (typeof e == "string" || Xt(e)) + return e; + var t = e + ""; + return t == "0" && 1 / e == -Hl ? "-0" : t; +} +function ki(e, t, r) { + t = Yr(t, e); + for (var n = -1, i = t.length, s = false; ++n < i; ) { + var a = $t(t[n]); + if (!(s = e != null && r(e, a))) + break; + e = e[a]; + } + return s || ++n != i ? s : (i = e == null ? 0 : e.length, !!i && Br(i) && Rr(a, i) && (M(e) || di(e))); +} +function W(e, t) { + return e != null && ki(e, t, zo); +} +const Ul = { + props: { + spinner: { + type: Boolean, + required: false, + default: false + } + }, + render() { + return this.$slots.default({ + spinner: this.spinner + }); + } +}; +function fe(e, t, ...r) { + if (e in t) { + let i = t[e]; + return typeof i == "function" ? i(...r) : i; + } + let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((i) => `"${i}"`).join(", ")}.`); + throw Error.captureStackTrace && Error.captureStackTrace(n, fe), n; +} +var Dt = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Dt || {}), Ce = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Ce || {}); +function Z({ visible: e = true, features: t = 0, ourProps: r, theirProps: n, ...i }) { + var s; + let a = Ri(n, r), o = Object.assign(i, { props: a }); + if (e || t & 2 && a.static) + return dr(o); + if (t & 1) { + let l = (s = a.unmount) == null || s ? 0 : 1; + return fe(l, { 0() { + return null; + }, 1() { + return dr({ ...i, props: { ...a, hidden: true, style: { display: "none" } } }); + } }); + } + return dr(o); +} +function dr({ props: e, attrs: t, slots: r, slot: n, name: i }) { + var s, a; + let { as: o, ...l } = Bi(e, ["unmount", "static"]), u = (s = r.default) == null ? void 0 : s.call(r, n), c = {}; + if (n) { + let v = false, g = []; + for (let [f, h] of Object.entries(n)) + typeof h == "boolean" && (v = true), h === true && g.push(f); + v && (c["data-headlessui-state"] = g.join(" ")); + } + if (o === "template") { + if (u = Li(u ?? []), Object.keys(l).length > 0 || Object.keys(t).length > 0) { + let [v, ...g] = u ?? []; + if (!Wl(v) || g.length > 0) + throw new Error(['Passing props on "template"!', "", `The current component <${i} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(l).concat(Object.keys(t)).map((m) => m.trim()).filter((m, d, b) => b.indexOf(m) === d).sort((m, d) => m.localeCompare(d)).map((m) => ` - ${m}`).join(` +`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((m) => ` - ${m}`).join(` +`)].join(` +`)); + let f = Ri((a = v.props) != null ? a : {}, l), h = vueExports.cloneVNode(v, f); + for (let m in f) + m.startsWith("on") && (h.props || (h.props = {}), h.props[m] = f[m]); + return h; + } + return Array.isArray(u) && u.length === 1 ? u[0] : u; + } + return vueExports.h(o, Object.assign({}, l, c), { default: () => u }); +} +function Li(e) { + return e.flatMap((t) => t.type === vueExports.Fragment ? Li(t.children) : [t]); +} +function Ri(...e) { + if (e.length === 0) + return {}; + if (e.length === 1) + return e[0]; + let t = {}, r = {}; + for (let n of e) + for (let i in n) + i.startsWith("on") && typeof n[i] == "function" ? (r[i] != null || (r[i] = []), r[i].push(n[i])) : t[i] = n[i]; + if (t.disabled || t["aria-disabled"]) + return Object.assign(t, Object.fromEntries(Object.keys(r).map((n) => [n, void 0]))); + for (let n in r) + Object.assign(t, { [n](i, ...s) { + let a = r[n]; + for (let o of a) { + if (i instanceof Event && i.defaultPrevented) + return; + o(i, ...s); + } + } }); + return t; +} +function Bi(e, t = []) { + let r = Object.assign({}, e); + for (let n of t) + n in r && delete r[n]; + return r; +} +function Wl(e) { + return e == null ? false : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function"; +} +let zl = 0; +function Gl() { + return ++zl; +} +function Ye() { + return Gl(); +} +var ji = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(ji || {}); +function D(e) { + var t; + return e == null || e.value == null ? null : (t = e.value.$el) != null ? t : e.value; +} +let Mi = Symbol("Context"); +var G = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(G || {}); +function Xl() { + return Zr() !== null; +} +function Zr() { + return vueExports.inject(Mi, null); +} +function Kl(e) { + vueExports.provide(Mi, e); +} +var Jl = Object.defineProperty, Ql = (e, t, r) => t in e ? Jl(e, t, { enumerable: true, configurable: true, writable: true, value: r }) : e[t] = r, Cn = (e, t, r) => (Ql(e, typeof t != "symbol" ? t + "" : t, r), r); +class Yl { + constructor() { + Cn(this, "current", this.detect()), Cn(this, "currentId", 0); + } + set(t) { + this.current !== t && (this.currentId = 0, this.current = t); + } + reset() { + this.set(this.detect()); + } + nextId() { + return ++this.currentId; + } + get isServer() { + return this.current === "server"; + } + get isClient() { + return this.current === "client"; + } + detect() { + return typeof window > "u" || typeof document > "u" ? "server" : "client"; + } +} +let Et = new Yl(); +function Tt(e) { + if (Et.isServer) + return null; + if (e instanceof Node) + return e.ownerDocument; + if (e != null && e.hasOwnProperty("value")) { + let t = D(e); + if (t) + return t.ownerDocument; + } + return document; +} +let br = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(","); +var qe = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(qe || {}), Di = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Di || {}), Zl = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Zl || {}); +function eu(e = document.body) { + return e == null ? [] : Array.from(e.querySelectorAll(br)).sort((t, r) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (r.tabIndex || Number.MAX_SAFE_INTEGER))); +} +var Ni = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Ni || {}); +function tu(e, t = 0) { + var r; + return e === ((r = Tt(e)) == null ? void 0 : r.body) ? false : fe(t, { 0() { + return e.matches(br); + }, 1() { + let n = e; + for (; n !== null; ) { + if (n.matches(br)) + return true; + n = n.parentElement; + } + return false; + } }); +} +var ru = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(ru || {}); +typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => { + e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = ""); +}, true), document.addEventListener("click", (e) => { + e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = ""); +}, true)); +function We(e) { + e == null || e.focus({ preventScroll: true }); +} +let nu = ["textarea", "input"].join(","); +function iu(e) { + var t, r; + return (r = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, nu)) != null ? r : false; +} +function su(e, t = (r) => r) { + return e.slice().sort((r, n) => { + let i = t(r), s = t(n); + if (i === null || s === null) + return 0; + let a = i.compareDocumentPosition(s); + return a & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : a & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0; + }); +} +function Lt(e, t, { sorted: r = true, relativeTo: n = null, skipElements: i = [] } = {}) { + var s; + let a = (s = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? s : document, o = Array.isArray(e) ? r ? su(e) : e : eu(e); + i.length > 0 && o.length > 1 && (o = o.filter((h) => !i.includes(h))), n = n ?? a.activeElement; + let l = (() => { + if (t & 5) + return 1; + if (t & 10) + return -1; + throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last"); + })(), u = (() => { + if (t & 1) + return 0; + if (t & 2) + return Math.max(0, o.indexOf(n)) - 1; + if (t & 4) + return Math.max(0, o.indexOf(n)) + 1; + if (t & 8) + return o.length - 1; + throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last"); + })(), c = t & 32 ? { preventScroll: true } : {}, v = 0, g = o.length, f; + do { + if (v >= g || v + g <= 0) + return 0; + let h = u + v; + if (t & 16) + h = (h + g) % g; + else { + if (h < 0) + return 3; + if (h >= g) + return 1; + } + f = o[h], f == null || f.focus(c), v += l; + } while (f !== a.activeElement); + return t & 6 && iu(f) && f.select(), 2; +} +function fr(e, t, r) { + Et.isServer || vueExports.watchEffect((n) => { + document.addEventListener(e, t, r), n(() => document.removeEventListener(e, t, r)); + }); +} +function au(e, t, r = vueExports.computed(() => true)) { + function n(s, a) { + if (!r.value || s.defaultPrevented) + return; + let o = a(s); + if (o === null || !o.getRootNode().contains(o)) + return; + let l = function u(c) { + return typeof c == "function" ? u(c()) : Array.isArray(c) || c instanceof Set ? c : [c]; + }(e); + for (let u of l) { + if (u === null) + continue; + let c = u instanceof HTMLElement ? u : D(u); + if (c != null && c.contains(o) || s.composed && s.composedPath().includes(c)) + return; + } + return !tu(o, Ni.Loose) && o.tabIndex !== -1 && s.preventDefault(), t(s, o); + } + let i = vueExports.ref(null); + fr("mousedown", (s) => { + var a, o; + r.value && (i.value = ((o = (a = s.composedPath) == null ? void 0 : a.call(s)) == null ? void 0 : o[0]) || s.target); + }, true), fr("click", (s) => { + i.value && (n(s, () => i.value), i.value = null); + }, true), fr("blur", (s) => n(s, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), true); +} +var Nt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Nt || {}); +let wr = vueExports.defineComponent({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: t, attrs: r }) { + return () => { + let { features: n, ...i } = e, s = { "aria-hidden": (n & 2) === 2 ? true : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(n & 4) === 4 && (n & 2) !== 2 && { display: "none" } } }; + return Z({ ourProps: s, theirProps: i, slot: {}, attrs: r, slots: t, name: "Hidden" }); + }; +} }); +function ou() { + return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0; +} +function lu(e, t, r) { + Et.isServer || vueExports.watchEffect((n) => { + window.addEventListener(e, t, r), n(() => window.removeEventListener(e, t, r)); + }); +} +var vt = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(vt || {}); +function uu() { + let e = vueExports.ref(0); + return lu("keydown", (t) => { + t.key === "Tab" && (e.value = t.shiftKey ? 1 : 0); + }), e; +} +function Vi(e, t, r, n) { + Et.isServer || vueExports.watchEffect((i) => { + e = e ?? window, e.addEventListener(t, r, n), i(() => e.removeEventListener(t, r, n)); + }); +} +function Hi(e) { + typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => { + throw t; + })); +} +function cu(e) { + function t() { + document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t)); + } + typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t()); +} +function Ui(e) { + if (!e) + return /* @__PURE__ */ new Set(); + if (typeof e == "function") + return new Set(e()); + let t = /* @__PURE__ */ new Set(); + for (let r of e.value) { + let n = D(r); + n instanceof HTMLElement && t.add(n); + } + return t; +} +var Wi = ((e) => (e[e.None = 1] = "None", e[e.InitialFocus = 2] = "InitialFocus", e[e.TabLock = 4] = "TabLock", e[e.FocusLock = 8] = "FocusLock", e[e.RestoreFocus = 16] = "RestoreFocus", e[e.All = 30] = "All", e))(Wi || {}); +let pt = Object.assign(vueExports.defineComponent({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: [Object, Function], default: vueExports.ref(/* @__PURE__ */ new Set()) } }, inheritAttrs: false, setup(e, { attrs: t, slots: r, expose: n }) { + let i = vueExports.ref(null); + n({ el: i, $el: i }); + let s = vueExports.computed(() => Tt(i)), a = vueExports.ref(false); + vueExports.onMounted(() => a.value = true), vueExports.onUnmounted(() => a.value = false), fu({ ownerDocument: s }, vueExports.computed(() => a.value && !!(e.features & 16))); + let o = pu({ ownerDocument: s, container: i, initialFocus: vueExports.computed(() => e.initialFocus) }, vueExports.computed(() => a.value && !!(e.features & 2))); + hu({ ownerDocument: s, container: i, containers: e.containers, previousActiveElement: o }, vueExports.computed(() => a.value && !!(e.features & 8))); + let l = uu(); + function u(f) { + let h = D(i); + h && ((m) => m())(() => { + fe(l.value, { [vt.Forwards]: () => { + Lt(h, qe.First, { skipElements: [f.relatedTarget] }); + }, [vt.Backwards]: () => { + Lt(h, qe.Last, { skipElements: [f.relatedTarget] }); + } }); + }); + } + let c = vueExports.ref(false); + function v(f) { + f.key === "Tab" && (c.value = true, requestAnimationFrame(() => { + c.value = false; + })); + } + function g(f) { + if (!a.value) + return; + let h = Ui(e.containers); + D(i) instanceof HTMLElement && h.add(D(i)); + let m = f.relatedTarget; + m instanceof HTMLElement && m.dataset.headlessuiFocusGuard !== "true" && (zi(h, m) || (c.value ? Lt(D(i), fe(l.value, { [vt.Forwards]: () => qe.Next, [vt.Backwards]: () => qe.Previous }) | qe.WrapAround, { relativeTo: f.target }) : f.target instanceof HTMLElement && We(f.target))); + } + return () => { + let f = {}, h = { ref: i, onKeydown: v, onFocusout: g }, { features: m, initialFocus: d, containers: b, ...O } = e; + return vueExports.h(vueExports.Fragment, [!!(m & 4) && vueExports.h(wr, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: u, features: Nt.Focusable }), Z({ ourProps: h, theirProps: { ...t, ...O }, slot: f, attrs: t, slots: r, name: "FocusTrap" }), !!(m & 4) && vueExports.h(wr, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: u, features: Nt.Focusable })]); + }; +} }), { features: Wi }), He = []; +cu(() => { + function e(t) { + t.target instanceof HTMLElement && t.target !== document.body && He[0] !== t.target && (He.unshift(t.target), He = He.filter((r) => r != null && r.isConnected), He.splice(10)); + } + window.addEventListener("click", e, { capture: true }), window.addEventListener("mousedown", e, { capture: true }), window.addEventListener("focus", e, { capture: true }), document.body.addEventListener("click", e, { capture: true }), document.body.addEventListener("mousedown", e, { capture: true }), document.body.addEventListener("focus", e, { capture: true }); +}); +function du(e) { + let t = vueExports.ref(He.slice()); + return vueExports.watch([e], ([r], [n]) => { + n === true && r === false ? Hi(() => { + t.value.splice(0); + }) : n === false && r === true && (t.value = He.slice()); + }, { flush: "post" }), () => { + var r; + return (r = t.value.find((n) => n != null && n.isConnected)) != null ? r : null; + }; +} +function fu({ ownerDocument: e }, t) { + let r = du(t); + vueExports.onMounted(() => { + vueExports.watchEffect(() => { + var n, i; + t.value || ((n = e.value) == null ? void 0 : n.activeElement) === ((i = e.value) == null ? void 0 : i.body) && We(r()); + }, { flush: "post" }); + }), vueExports.onUnmounted(() => { + We(r()); + }); +} +function pu({ ownerDocument: e, container: t, initialFocus: r }, n) { + let i = vueExports.ref(null), s = vueExports.ref(false); + return vueExports.onMounted(() => s.value = true), vueExports.onUnmounted(() => s.value = false), vueExports.onMounted(() => { + vueExports.watch([t, r, n], (a, o) => { + if (a.every((u, c) => (o == null ? void 0 : o[c]) === u) || !n.value) + return; + let l = D(t); + l && Hi(() => { + var u, c; + if (!s.value) + return; + let v = D(r), g = (u = e.value) == null ? void 0 : u.activeElement; + if (v) { + if (v === g) { + i.value = g; + return; + } + } else if (l.contains(g)) { + i.value = g; + return; + } + v ? We(v) : Lt(l, qe.First | qe.NoScroll) === Di.Error && console.warn("There are no focusable elements inside the "), i.value = (c = e.value) == null ? void 0 : c.activeElement; + }); + }, { immediate: true, flush: "post" }); + }), i; +} +function hu({ ownerDocument: e, container: t, containers: r, previousActiveElement: n }, i) { + var s; + Vi((s = e.value) == null ? void 0 : s.defaultView, "focus", (a) => { + if (!i.value) + return; + let o = Ui(r); + D(t) instanceof HTMLElement && o.add(D(t)); + let l = n.value; + if (!l) + return; + let u = a.target; + u && u instanceof HTMLElement ? zi(o, u) ? (n.value = u, We(u)) : (a.preventDefault(), a.stopPropagation(), We(l)) : We(n.value); + }, true); +} +function zi(e, t) { + for (let r of e) + if (r.contains(t)) + return true; + return false; +} +let pr = /* @__PURE__ */ new Map(), ht = /* @__PURE__ */ new Map(); +function Fn(e, t = vueExports.ref(true)) { + vueExports.watchEffect((r) => { + var n; + if (!t.value) + return; + let i = D(e); + if (!i) + return; + r(function() { + var a; + if (!i) + return; + let o = (a = ht.get(i)) != null ? a : 1; + if (o === 1 ? ht.delete(i) : ht.set(i, o - 1), o !== 1) + return; + let l = pr.get(i); + l && (l["aria-hidden"] === null ? i.removeAttribute("aria-hidden") : i.setAttribute("aria-hidden", l["aria-hidden"]), i.inert = l.inert, pr.delete(i)); + }); + let s = (n = ht.get(i)) != null ? n : 0; + ht.set(i, s + 1), s === 0 && (pr.set(i, { "aria-hidden": i.getAttribute("aria-hidden"), inert: i.inert }), i.setAttribute("aria-hidden", "true"), i.inert = true); + }); +} +let Gi = Symbol("ForcePortalRootContext"); +function mu() { + return vueExports.inject(Gi, false); +} +let Sr = vueExports.defineComponent({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: false } }, setup(e, { slots: t, attrs: r }) { + return vueExports.provide(Gi, e.force), () => { + let { force: n, ...i } = e; + return Z({ theirProps: i, ourProps: {}, slot: {}, slots: t, attrs: r, name: "ForcePortalRoot" }); + }; +} }); +function vu(e) { + let t = Tt(e); + if (!t) { + if (e === null) + return null; + throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`); + } + let r = t.getElementById("headlessui-portal-root"); + if (r) + return r; + let n = t.createElement("div"); + return n.setAttribute("id", "headlessui-portal-root"), t.body.appendChild(n); +} +let Xi = vueExports.defineComponent({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e, { slots: t, attrs: r }) { + let n = vueExports.ref(null), i = vueExports.computed(() => Tt(n)), s = mu(), a = vueExports.inject(Ki, null), o = vueExports.ref(s === true || a == null ? vu(n.value) : a.resolveTarget()); + return vueExports.watchEffect(() => { + s || a != null && (o.value = a.resolveTarget()); + }), vueExports.onUnmounted(() => { + var l, u; + let c = (l = i.value) == null ? void 0 : l.getElementById("headlessui-portal-root"); + c && o.value === c && o.value.children.length <= 0 && ((u = o.value.parentElement) == null || u.removeChild(o.value)); + }), () => { + if (o.value === null) + return null; + let l = { ref: n, "data-headlessui-portal": "" }; + return vueExports.h(vueExports.Teleport, { to: o.value }, Z({ ourProps: l, theirProps: e, slot: {}, attrs: r, slots: t, name: "Portal" })); + }; +} }), Ki = Symbol("PortalGroupContext"), gu = vueExports.defineComponent({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e, { attrs: t, slots: r }) { + let n = vueExports.reactive({ resolveTarget() { + return e.target; + } }); + return vueExports.provide(Ki, n), () => { + let { target: i, ...s } = e; + return Z({ theirProps: s, ourProps: {}, slot: {}, attrs: t, slots: r, name: "PortalGroup" }); + }; +} }), Ji = Symbol("StackContext"); +var Or = ((e) => (e[e.Add = 0] = "Add", e[e.Remove = 1] = "Remove", e))(Or || {}); +function yu() { + return vueExports.inject(Ji, () => { + }); +} +function bu({ type: e, enabled: t, element: r, onUpdate: n }) { + let i = yu(); + function s(...a) { + n == null || n(...a), i(...a); + } + vueExports.onMounted(() => { + vueExports.watch(t, (a, o) => { + a ? s(0, e, r) : o === true && s(1, e, r); + }, { immediate: true, flush: "sync" }); + }), vueExports.onUnmounted(() => { + t.value && s(1, e, r); + }), vueExports.provide(Ji, s); +} +let Qi = Symbol("DescriptionContext"); +function wu() { + let e = vueExports.inject(Qi, null); + if (e === null) + throw new Error("Missing parent"); + return e; +} +function Su({ slot: e = vueExports.ref({}), name: t = "Description", props: r = {} } = {}) { + let n = vueExports.ref([]); + function i(s) { + return n.value.push(s), () => { + let a = n.value.indexOf(s); + a !== -1 && n.value.splice(a, 1); + }; + } + return vueExports.provide(Qi, { register: i, slot: e, name: t, props: r }), vueExports.computed(() => n.value.length > 0 ? n.value.join(" ") : void 0); +} +vueExports.defineComponent({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${Ye()}` } }, setup(e, { attrs: t, slots: r }) { + let n = wu(); + return vueExports.onMounted(() => vueExports.onUnmounted(n.register(e.id))), () => { + let { name: i = "Description", slot: s = vueExports.ref({}), props: a = {} } = n, { id: o, ...l } = e, u = { ...Object.entries(a).reduce((c, [v, g]) => Object.assign(c, { [v]: vueExports.unref(g) }), {}), id: o }; + return Z({ ourProps: u, theirProps: l, slot: s.value, attrs: t, slots: r, name: i }); + }; +} }); +function Ou(e) { + let t = vueExports.shallowRef(e.getSnapshot()); + return vueExports.onUnmounted(e.subscribe(() => { + t.value = e.getSnapshot(); + })), t; +} +function Yt() { + let e = [], t = { addEventListener(r, n, i, s) { + return r.addEventListener(n, i, s), t.add(() => r.removeEventListener(n, i, s)); + }, requestAnimationFrame(...r) { + let n = requestAnimationFrame(...r); + t.add(() => cancelAnimationFrame(n)); + }, nextFrame(...r) { + t.requestAnimationFrame(() => { + t.requestAnimationFrame(...r); + }); + }, setTimeout(...r) { + let n = setTimeout(...r); + t.add(() => clearTimeout(n)); + }, style(r, n, i) { + let s = r.style.getPropertyValue(n); + return Object.assign(r.style, { [n]: i }), this.add(() => { + Object.assign(r.style, { [n]: s }); + }); + }, group(r) { + let n = Yt(); + return r(n), this.add(() => n.dispose()); + }, add(r) { + return e.push(r), () => { + let n = e.indexOf(r); + if (n >= 0) + for (let i of e.splice(n, 1)) + i(); + }; + }, dispose() { + for (let r of e.splice(0)) + r(); + } }; + return t; +} +function $u(e, t) { + let r = e(), n = /* @__PURE__ */ new Set(); + return { getSnapshot() { + return r; + }, subscribe(i) { + return n.add(i), () => n.delete(i); + }, dispatch(i, ...s) { + let a = t[i].call(r, ...s); + a && (r = a, n.forEach((o) => o())); + } }; +} +function Eu() { + let e; + return { before({ doc: t }) { + var r; + let n = t.documentElement; + e = ((r = t.defaultView) != null ? r : window).innerWidth - n.clientWidth; + }, after({ doc: t, d: r }) { + let n = t.documentElement, i = n.clientWidth - n.offsetWidth, s = e - i; + r.style(n, "paddingRight", `${s}px`); + } }; +} +function Tu() { + if (!ou()) + return {}; + let e; + return { before() { + e = window.pageYOffset; + }, after({ doc: t, d: r, meta: n }) { + function i(a) { + return n.containers.flatMap((o) => o()).some((o) => o.contains(a)); + } + r.style(t.body, "marginTop", `-${e}px`), window.scrollTo(0, 0); + let s = null; + r.addEventListener(t, "click", (a) => { + if (a.target instanceof HTMLElement) + try { + let o = a.target.closest("a"); + if (!o) + return; + let { hash: l } = new URL(o.href), u = t.querySelector(l); + u && !i(u) && (s = u); + } catch { + } + }, true), r.addEventListener(t, "touchmove", (a) => { + a.target instanceof HTMLElement && !i(a.target) && a.preventDefault(); + }, { passive: false }), r.add(() => { + window.scrollTo(0, window.pageYOffset + e), s && s.isConnected && (s.scrollIntoView({ block: "nearest" }), s = null); + }); + } }; +} +function xu() { + return { before({ doc: e, d: t }) { + t.style(e.documentElement, "overflow", "hidden"); + } }; +} +function _u(e) { + let t = {}; + for (let r of e) + Object.assign(t, r(t)); + return t; +} +let Ue = $u(() => /* @__PURE__ */ new Map(), { PUSH(e, t) { + var r; + let n = (r = this.get(e)) != null ? r : { doc: e, count: 0, d: Yt(), meta: /* @__PURE__ */ new Set() }; + return n.count++, n.meta.add(t), this.set(e, n), this; +}, POP(e, t) { + let r = this.get(e); + return r && (r.count--, r.meta.delete(t)), this; +}, SCROLL_PREVENT({ doc: e, d: t, meta: r }) { + let n = { doc: e, d: t, meta: _u(r) }, i = [Tu(), Eu(), xu()]; + i.forEach(({ before: s }) => s == null ? void 0 : s(n)), i.forEach(({ after: s }) => s == null ? void 0 : s(n)); +}, SCROLL_ALLOW({ d: e }) { + e.dispose(); +}, TEARDOWN({ doc: e }) { + this.delete(e); +} }); +Ue.subscribe(() => { + let e = Ue.getSnapshot(), t = /* @__PURE__ */ new Map(); + for (let [r] of e) + t.set(r, r.documentElement.style.overflow); + for (let r of e.values()) { + let n = t.get(r.doc) === "hidden", i = r.count !== 0; + (i && !n || !i && n) && Ue.dispatch(r.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", r), r.count === 0 && Ue.dispatch("TEARDOWN", r); + } +}); +function Iu(e, t, r) { + let n = Ou(Ue), i = vueExports.computed(() => { + let s = e.value ? n.value.get(e.value) : void 0; + return s ? s.count > 0 : false; + }); + return vueExports.watch([e, t], ([s, a], [o], l) => { + if (!s || !a) + return; + Ue.dispatch("PUSH", s, r); + let u = false; + l(() => { + u || (Ue.dispatch("POP", o ?? s, r), u = true); + }); + }, { immediate: true }), i; +} +var Au = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Au || {}); +let $r = Symbol("DialogContext"); +function xt(e) { + let t = vueExports.inject($r, null); + if (t === null) { + let r = new Error(`<${e} /> is missing a parent component.`); + throw Error.captureStackTrace && Error.captureStackTrace(r, xt), r; + } + return t; +} +let qt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", en = vueExports.defineComponent({ name: "Dialog", inheritAttrs: false, props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, open: { type: [Boolean, String], default: qt }, initialFocus: { type: Object, default: null }, id: { type: String, default: () => `headlessui-dialog-${Ye()}` } }, emits: { close: (e) => true }, setup(e, { emit: t, attrs: r, slots: n, expose: i }) { + var s; + let a = vueExports.ref(false); + vueExports.onMounted(() => { + a.value = true; + }); + let o = vueExports.ref(0), l = Zr(), u = vueExports.computed(() => e.open === qt && l !== null ? (l.value & G.Open) === G.Open : e.open), c = vueExports.ref(null), v = vueExports.ref(null), g = vueExports.computed(() => Tt(c)); + if (i({ el: c, $el: c }), !(e.open !== qt || l !== null)) + throw new Error("You forgot to provide an `open` prop to the `Dialog`."); + if (typeof u.value != "boolean") + throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u.value === qt ? void 0 : e.open}`); + let f = vueExports.computed(() => a.value && u.value ? 0 : 1), h = vueExports.computed(() => f.value === 0), m = vueExports.computed(() => o.value > 1), d = vueExports.inject($r, null) !== null, b = vueExports.computed(() => m.value ? "parent" : "leaf"), O = vueExports.computed(() => l !== null ? (l.value & G.Closing) === G.Closing : false), A = vueExports.computed(() => d || O.value ? false : h.value), S = vueExports.computed(() => { + var E, T, I; + return (I = Array.from((T = (E = g.value) == null ? void 0 : E.querySelectorAll("body > *")) != null ? T : []).find((C) => C.id === "headlessui-portal-root" ? false : C.contains(D(v)) && C instanceof HTMLElement)) != null ? I : null; + }); + Fn(S, A); + let $ = vueExports.computed(() => m.value ? true : h.value), w = vueExports.computed(() => { + var E, T, I; + return (I = Array.from((T = (E = g.value) == null ? void 0 : E.querySelectorAll("[data-headlessui-portal]")) != null ? T : []).find((C) => C.contains(D(v)) && C instanceof HTMLElement)) != null ? I : null; + }); + Fn(w, $), bu({ type: "Dialog", enabled: vueExports.computed(() => f.value === 0), element: c, onUpdate: (E, T) => { + if (T === "Dialog") + return fe(E, { [Or.Add]: () => o.value += 1, [Or.Remove]: () => o.value -= 1 }); + } }); + let _ = Su({ name: "DialogDescription", slot: vueExports.computed(() => ({ open: u.value })) }), q = vueExports.ref(null), P = { titleId: q, panelRef: vueExports.ref(null), dialogState: f, setTitleId(E) { + q.value !== E && (q.value = E); + }, close() { + t("close", false); + } }; + vueExports.provide($r, P); + function k() { + var E, T, I; + return [...Array.from((T = (E = g.value) == null ? void 0 : E.querySelectorAll("html > *, body > *, [data-headlessui-portal]")) != null ? T : []).filter((C) => !(C === document.body || C === document.head || !(C instanceof HTMLElement) || C.contains(D(v)) || P.panelRef.value && C.contains(P.panelRef.value))), (I = P.panelRef.value) != null ? I : c.value]; + } + let j = vueExports.computed(() => !(!h.value || m.value)); + au(() => k(), (E, T) => { + P.close(), vueExports.nextTick(() => T == null ? void 0 : T.focus()); + }, j); + let H = vueExports.computed(() => !(m.value || f.value !== 0)); + Vi((s = g.value) == null ? void 0 : s.defaultView, "keydown", (E) => { + H.value && (E.defaultPrevented || E.key === ji.Escape && (E.preventDefault(), E.stopPropagation(), P.close())); + }); + let F = vueExports.computed(() => !(O.value || f.value !== 0 || d)); + return Iu(g, F, (E) => { + var T; + return { containers: [...(T = E.containers) != null ? T : [], k] }; + }), vueExports.watchEffect((E) => { + if (f.value !== 0) + return; + let T = D(c); + if (!T) + return; + let I = new ResizeObserver((C) => { + for (let ge of C) { + let U = ge.target.getBoundingClientRect(); + U.x === 0 && U.y === 0 && U.width === 0 && U.height === 0 && P.close(); + } + }); + I.observe(T), E(() => I.disconnect()); + }), () => { + let { id: E, open: T, initialFocus: I, ...C } = e, ge = { ...r, ref: c, id: E, role: "dialog", "aria-modal": f.value === 0 ? true : void 0, "aria-labelledby": q.value, "aria-describedby": _.value }, U = { open: f.value === 0 }; + return vueExports.h(Sr, { force: true }, () => [vueExports.h(Xi, () => vueExports.h(gu, { target: c.value }, () => vueExports.h(Sr, { force: false }, () => vueExports.h(pt, { initialFocus: I, containers: k, features: h.value ? fe(b.value, { parent: pt.features.RestoreFocus, leaf: pt.features.All & ~pt.features.FocusLock }) : pt.features.None }, () => Z({ ourProps: ge, theirProps: C, slot: U, attrs: r, slots: n, visible: f.value === 0, features: Dt.RenderStrategy | Dt.Static, name: "Dialog" }))))), vueExports.h(wr, { features: Nt.Hidden, ref: v })]); + }; +} }); +vueExports.defineComponent({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-overlay-${Ye()}` } }, setup(e, { attrs: t, slots: r }) { + let n = xt("DialogOverlay"); + function i(s) { + s.target === s.currentTarget && (s.preventDefault(), s.stopPropagation(), n.close()); + } + return () => { + let { id: s, ...a } = e; + return Z({ ourProps: { id: s, "aria-hidden": true, onClick: i }, theirProps: a, slot: { open: n.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogOverlay" }); + }; +} }); +vueExports.defineComponent({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-backdrop-${Ye()}` } }, inheritAttrs: false, setup(e, { attrs: t, slots: r, expose: n }) { + let i = xt("DialogBackdrop"), s = vueExports.ref(null); + return n({ el: s, $el: s }), vueExports.onMounted(() => { + if (i.panelRef.value === null) + throw new Error("A component is being used, but a component is missing."); + }), () => { + let { id: a, ...o } = e, l = { id: a, ref: s, "aria-hidden": true }; + return vueExports.h(Sr, { force: true }, () => vueExports.h(Xi, () => Z({ ourProps: l, theirProps: { ...t, ...o }, slot: { open: i.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogBackdrop" }))); + }; +} }); +let tn = vueExports.defineComponent({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-panel-${Ye()}` } }, setup(e, { attrs: t, slots: r, expose: n }) { + let i = xt("DialogPanel"); + n({ el: i.panelRef, $el: i.panelRef }); + function s(a) { + a.stopPropagation(); + } + return () => { + let { id: a, ...o } = e, l = { id: a, ref: i.panelRef, onClick: s }; + return Z({ ourProps: l, theirProps: o, slot: { open: i.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogPanel" }); + }; +} }); +vueExports.defineComponent({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" }, id: { type: String, default: () => `headlessui-dialog-title-${Ye()}` } }, setup(e, { attrs: t, slots: r }) { + let n = xt("DialogTitle"); + return vueExports.onMounted(() => { + n.setTitleId(e.id), vueExports.onUnmounted(() => n.setTitleId(null)); + }), () => { + let { id: i, ...s } = e; + return Z({ ourProps: { id: i }, theirProps: s, slot: { open: n.dialogState.value === 0 }, attrs: t, slots: r, name: "DialogTitle" }); + }; +} }); +function Pu(e) { + let t = { called: false }; + return (...r) => { + if (!t.called) + return t.called = true, e(...r); + }; +} +function hr(e, ...t) { + e && t.length > 0 && e.classList.add(...t); +} +function Ct(e, ...t) { + e && t.length > 0 && e.classList.remove(...t); +} +var Er = ((e) => (e.Finished = "finished", e.Cancelled = "cancelled", e))(Er || {}); +function qu(e, t) { + let r = Yt(); + if (!e) + return r.dispose; + let { transitionDuration: n, transitionDelay: i } = getComputedStyle(e), [s, a] = [n, i].map((o) => { + let [l = 0] = o.split(",").filter(Boolean).map((u) => u.includes("ms") ? parseFloat(u) : parseFloat(u) * 1e3).sort((u, c) => c - u); + return l; + }); + return s !== 0 ? r.setTimeout(() => t("finished"), s + a) : t("finished"), r.add(() => t("cancelled")), r.dispose; +} +function kn(e, t, r, n, i, s) { + let a = Yt(), o = s !== void 0 ? Pu(s) : () => { + }; + return Ct(e, ...i), hr(e, ...t, ...r), a.nextFrame(() => { + Ct(e, ...r), hr(e, ...n), a.add(qu(e, (l) => (Ct(e, ...n, ...t), hr(e, ...i), o(l)))); + }), a.add(() => Ct(e, ...t, ...r, ...n, ...i)), a.add(() => o("cancelled")), a.dispose; +} +function Ne(e = "") { + return e.split(" ").filter((t) => t.trim().length > 1); +} +let rn = Symbol("TransitionContext"); +var Cu = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(Cu || {}); +function Fu() { + return vueExports.inject(rn, null) !== null; +} +function ku() { + let e = vueExports.inject(rn, null); + if (e === null) + throw new Error("A is used but it is missing a parent ."); + return e; +} +function Lu() { + let e = vueExports.inject(nn, null); + if (e === null) + throw new Error("A is used but it is missing a parent ."); + return e; +} +let nn = Symbol("NestingContext"); +function Zt(e) { + return "children" in e ? Zt(e.children) : e.value.filter(({ state: t }) => t === "visible").length > 0; +} +function Yi(e) { + let t = vueExports.ref([]), r = vueExports.ref(false); + vueExports.onMounted(() => r.value = true), vueExports.onUnmounted(() => r.value = false); + function n(s, a = Ce.Hidden) { + let o = t.value.findIndex(({ id: l }) => l === s); + o !== -1 && (fe(a, { [Ce.Unmount]() { + t.value.splice(o, 1); + }, [Ce.Hidden]() { + t.value[o].state = "hidden"; + } }), !Zt(t) && r.value && (e == null || e())); + } + function i(s) { + let a = t.value.find(({ id: o }) => o === s); + return a ? a.state !== "visible" && (a.state = "visible") : t.value.push({ id: s, state: "visible" }), () => n(s, Ce.Unmount); + } + return { children: t, register: i, unregister: n }; +} +let Zi = Dt.RenderStrategy, lt = vueExports.defineComponent({ props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: true }, appear: { type: [Boolean], default: false }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => true, afterEnter: () => true, beforeLeave: () => true, afterLeave: () => true }, setup(e, { emit: t, attrs: r, slots: n, expose: i }) { + let s = vueExports.ref(0); + function a() { + s.value |= G.Opening, t("beforeEnter"); + } + function o() { + s.value &= ~G.Opening, t("afterEnter"); + } + function l() { + s.value |= G.Closing, t("beforeLeave"); + } + function u() { + s.value &= ~G.Closing, t("afterLeave"); + } + if (!Fu() && Xl()) + return () => vueExports.h(ut, { ...e, onBeforeEnter: a, onAfterEnter: o, onBeforeLeave: l, onAfterLeave: u }, n); + let c = vueExports.ref(null), v = vueExports.computed(() => e.unmount ? Ce.Unmount : Ce.Hidden); + i({ el: c, $el: c }); + let { show: g, appear: f } = ku(), { register: h, unregister: m } = Lu(), d = vueExports.ref(g.value ? "visible" : "hidden"), b = { value: true }, O = Ye(), A = { value: false }, S = Yi(() => { + !A.value && d.value !== "hidden" && (d.value = "hidden", m(O), u()); + }); + vueExports.onMounted(() => { + let F = h(O); + vueExports.onUnmounted(F); + }), vueExports.watchEffect(() => { + if (v.value === Ce.Hidden && O) { + if (g.value && d.value !== "visible") { + d.value = "visible"; + return; + } + fe(d.value, { hidden: () => m(O), visible: () => h(O) }); + } + }); + let $ = Ne(e.enter), w = Ne(e.enterFrom), _ = Ne(e.enterTo), q = Ne(e.entered), P = Ne(e.leave), k = Ne(e.leaveFrom), j = Ne(e.leaveTo); + vueExports.onMounted(() => { + vueExports.watchEffect(() => { + if (d.value === "visible") { + let F = D(c); + if (F instanceof Comment && F.data === "") + throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?"); + } + }); + }); + function H(F) { + let E = b.value && !f.value, T = D(c); + !T || !(T instanceof HTMLElement) || E || (A.value = true, g.value && a(), g.value || l(), F(g.value ? kn(T, $, w, _, q, (I) => { + A.value = false, I === Er.Finished && o(); + }) : kn(T, P, k, j, q, (I) => { + A.value = false, I === Er.Finished && (Zt(S) || (d.value = "hidden", m(O), u())); + }))); + } + return vueExports.onMounted(() => { + vueExports.watch([g], (F, E, T) => { + H(T), b.value = false; + }, { immediate: true }); + }), vueExports.provide(nn, S), Kl(vueExports.computed(() => fe(d.value, { visible: G.Open, hidden: G.Closed }) | s.value)), () => { + let { appear: F, show: E, enter: T, enterFrom: I, enterTo: C, entered: ge, leave: U, leaveFrom: ct, leaveTo: It, ...Ie } = e, Ze = { ref: c }, Ae = { ...Ie, ...f.value && g.value && Et.isServer ? { class: vueExports.normalizeClass([r.class, Ie.class, ...$, ...w]) } : {} }; + return Z({ theirProps: Ae, ourProps: Ze, slot: {}, slots: n, attrs: r, features: Zi, visible: d.value === "visible", name: "TransitionChild" }); + }; +} }), Ru = lt, ut = vueExports.defineComponent({ inheritAttrs: false, props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: true }, appear: { type: [Boolean], default: false }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => true, afterEnter: () => true, beforeLeave: () => true, afterLeave: () => true }, setup(e, { emit: t, attrs: r, slots: n }) { + let i = Zr(), s = vueExports.computed(() => e.show === null && i !== null ? (i.value & G.Open) === G.Open : e.show); + vueExports.watchEffect(() => { + if (![true, false].includes(s.value)) + throw new Error('A is used but it is missing a `:show="true | false"` prop.'); + }); + let a = vueExports.ref(s.value ? "visible" : "hidden"), o = Yi(() => { + a.value = "hidden"; + }), l = vueExports.ref(true), u = { show: s, appear: vueExports.computed(() => e.appear || !l.value) }; + return vueExports.onMounted(() => { + vueExports.watchEffect(() => { + l.value = false, s.value ? a.value = "visible" : Zt(o) || (a.value = "hidden"); + }); + }), vueExports.provide(nn, o), vueExports.provide(rn, u), () => { + let c = Bi(e, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), v = { unmount: e.unmount }; + return Z({ ourProps: { ...v, as: "template" }, theirProps: {}, slot: {}, slots: { ...n, default: () => [vueExports.h(Ru, { onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave"), ...r, ...v, ...c }, n.default)] }, attrs: {}, features: Zi, visible: a.value === "visible", name: "Transition" }); + }; +} }); +const Bu = { + props: { + defaultTitle: { + type: String, + required: false, + default: "" + }, + defaultText: { + type: String, + required: false, + default: "" + }, + defaultPasswordText: { + type: String, + required: false, + default: "" + }, + defaultConfirmButton: { + type: String, + required: false, + default: "" + }, + defaultCancelButton: { + type: String, + required: false, + default: "" + }, + confirmPasswordRoute: { + type: String, + required: false, + default: "" + }, + confirmedPasswordStatusRoute: { + type: String, + required: false, + default: "" + } + }, + data() { + return { + isOpen: false, + password: "", + passwordError: "", + submitting: false + }; + }, + computed: { + hasConfirmModal: () => !!p.confirmModal.value, + title: function() { + var e; + return (e = p.confirmModal.value) != null && e.title ? p.confirmModal.value.title : this.defaultTitle; + }, + text: function() { + var e; + return (e = p.confirmModal.value) != null && e.text ? p.confirmModal.value.text : this.confirmPassword ? this.defaultPasswordText : this.defaultText; + }, + confirmButton: function() { + var e; + return (e = p.confirmModal.value) != null && e.confirmButton ? p.confirmModal.value.confirmButton : this.defaultConfirmButton; + }, + cancelButton: function() { + var e; + return (e = p.confirmModal.value) != null && e.cancelButton ? p.confirmModal.value.cancelButton : this.defaultCancelButton; + }, + confirmPassword: function() { + var e; + return (e = p.confirmModal.value) != null && e.confirmPassword ? p.confirmModal.value.confirmPassword : false; + }, + confirmPasswordOnce: function() { + var e; + return (e = p.confirmModal.value) != null && e.confirmPasswordOnce ? p.confirmModal.value.confirmPasswordOnce : false; + }, + confirmDanger: function() { + var e; + return (e = p.confirmModal.value) != null && e.confirmDanger ? p.confirmModal.value.confirmDanger : false; + } + }, + watch: { + hasConfirmModal(e) { + e && (this.setIsOpen(true), this.resetPassword()); + } + }, + methods: { + cancel() { + p.confirmModal.value.rejectPromise(), this.setIsOpen(false), this.resetPassword(); + }, + resetPassword() { + this.password = "", this.passwordError = ""; + }, + confirm() { + if (!this.confirmPassword) + return this.handleSuccess(null); + this.submitting = true; + let e = this.password; + this.passwordError = "", ne.post(this.confirmPasswordRoute, { password: e }, { headers: { + Accept: "application/json", + "X-Requested-With": "XMLHttpRequest" + } }).then(() => { + this.handleSuccess(e); + }).catch((t) => { + t.response.status === 422 ? this.passwordError = t.response.data.errors.password[0] : this.passwordError = "An error occurred. Please try again."; + }).finally(() => { + this.submitting = false; + }); + }, + handleSuccess(e) { + p.confirmModal.value.resolvePromise(e), this.setIsOpen(false), this.resetPassword(); + }, + async setIsOpen(e) { + if (e && this.confirmPassword && this.confirmPasswordOnce) + try { + if ((await ne.get(this.confirmedPasswordStatusRoute)).status === 200) { + this.handleSuccess(null), p.clearConfirmModal(); + return; + } + } catch { + } + this.isOpen = e; + }, + emitClose() { + this.resetPassword(), p.clearConfirmModal(); + }, + setPassword(e) { + this.password = e; + } + }, + render() { + return this.$slots.default({ + title: this.title, + text: this.text, + confirmButton: this.confirmButton, + cancelButton: this.cancelButton, + confirmPassword: this.confirmPassword, + confirmDanger: this.confirmDanger, + isOpen: this.isOpen, + setIsOpen: this.setIsOpen, + cancel: this.cancel, + confirm: this.confirm, + emitClose: this.emitClose, + setPassword: this.setPassword, + passwordError: this.passwordError, + submitting: this.submitting, + // These HeadlessUI exports will be removed in v1.0 + Dialog: en, + DialogPanel: tn, + TransitionRoot: ut, + TransitionChild: lt + }); + } +}; +function es(e, t) { + t = Yr(t, e); + for (var r = 0, n = t.length; e != null && r < n; ) + e = e[$t(t[r++])]; + return r && r == n ? e : void 0; +} +function be(e, t, r) { + var n = e == null ? void 0 : es(e, t); + return n === void 0 ? r : n; +} +var ju = function() { + try { + var e = Qe(Object, "defineProperty"); + return e({}, "", {}), e; + } catch { + } +}(); +const Ln = ju; +function ts(e, t, r) { + t == "__proto__" && Ln ? Ln(e, t, { + configurable: true, + enumerable: true, + value: r, + writable: true + }) : e[t] = r; +} +var Mu = Object.prototype, Du = Mu.hasOwnProperty; +function Nu(e, t, r) { + var n = e[t]; + (!(Du.call(e, t) && Kr(n, r)) || r === void 0 && !(t in e)) && ts(e, t, r); +} +function Vu(e, t, r, n) { + if (!J(e)) + return e; + t = Yr(t, e); + for (var i = -1, s = t.length, a = s - 1, o = e; o != null && ++i < s; ) { + var l = $t(t[i]), u = r; + if (l === "__proto__" || l === "constructor" || l === "prototype") + return e; + if (i != a) { + var c = o[l]; + u = n ? n(c, l, o) : void 0, u === void 0 && (u = J(c) ? c : Rr(t[i + 1]) ? [] : {}); + } + Nu(o, l, u), o = o[l]; + } + return e; +} +function St(e, t, r) { + return e == null ? e : Vu(e, t, r); +} +const Hu = { + props: { + default: { + type: Object, + default: () => ({}), + required: false + }, + remember: { + type: [Boolean, String], + default: false, + required: false + }, + localStorage: { + type: Boolean, + default: false, + required: false + } + }, + data() { + return { + values: Object.assign({}, { ...this.default }) + }; + }, + beforeMount() { + if (this.remember) { + let e = p.restore(this.remember, this.localStorage); + e || (e = {}), this.values = Object.assign({}, { ...this.default, ...e }); + } + }, + updated() { + this.remember && p.remember(this.remember, { ...this.values }, this.localStorage); + }, + render() { + const e = this; + return this.$slots.default ? this.$slots.default( + new Proxy(this.values, { + ownKeys() { + return Object.keys(e.values); + }, + get(t, r) { + return be(e.values, r); + }, + set(t, r, n) { + St(e.values, r, n); + } + }) + ) : null; + } +}, Uu = { + props: { + parsed: { + type: Object, + required: true + }, + raw: { + type: Object, + required: true + }, + remember: { + type: Array, + required: true + }, + localStorage: { + type: Array, + required: true + } + }, + data() { + return { + stores: Object.assign({}, { ...this.parsed, ...this.raw }) + }; + }, + beforeMount() { + this.remember.forEach((e) => { + let t = p.restore(e, this.localStorage.includes(e)); + this.stores[e] = { ...this.stores[e], ...t }; + }); + }, + updated() { + this.remember.forEach((e) => { + p.remember(e, { ...this.stores[e] }, this.localStorage.includes(e)); + }); + }, + render() { + const e = this; + return this.$slots.default ? this.$slots.default( + new Proxy(this.stores, { + ownKeys() { + return Object.keys(e.stores); + }, + get(t, r) { + return be(e.stores, r); + }, + set(t, r, n) { + St(e.stores, r, n); + } + }) + ) : null; + } +}; +var Wu = function() { + return ve.Date.now(); +}; +const mr = Wu; +var zu = /\s/; +function Gu(e) { + for (var t = e.length; t-- && zu.test(e.charAt(t)); ) + ; + return t; +} +var Xu = /^\s+/; +function Ku(e) { + return e && e.slice(0, Gu(e) + 1).replace(Xu, ""); +} +var Rn = 0 / 0, Ju = /^[-+]0x[0-9a-f]+$/i, Qu = /^0b[01]+$/i, Yu = /^0o[0-7]+$/i, Zu = parseInt; +function Tr(e) { + if (typeof e == "number") + return e; + if (Xt(e)) + return Rn; + if (J(e)) { + var t = typeof e.valueOf == "function" ? e.valueOf() : e; + e = J(t) ? t + "" : t; + } + if (typeof e != "string") + return e === 0 ? e : +e; + e = Ku(e); + var r = Qu.test(e); + return r || Yu.test(e) ? Zu(e.slice(2), r ? 2 : 8) : Ju.test(e) ? Rn : +e; +} +var ec = "Expected a function", tc = Math.max, rc = Math.min; +function er(e, t, r) { + var n, i, s, a, o, l, u = 0, c = false, v = false, g = true; + if (typeof e != "function") + throw new TypeError(ec); + t = Tr(t) || 0, J(r) && (c = !!r.leading, v = "maxWait" in r, s = v ? tc(Tr(r.maxWait) || 0, t) : s, g = "trailing" in r ? !!r.trailing : g); + function f(w) { + var _ = n, q = i; + return n = i = void 0, u = w, a = e.apply(q, _), a; + } + function h(w) { + return u = w, o = setTimeout(b, t), c ? f(w) : a; + } + function m(w) { + var _ = w - l, q = w - u, P = t - _; + return v ? rc(P, s - q) : P; + } + function d(w) { + var _ = w - l, q = w - u; + return l === void 0 || _ >= t || _ < 0 || v && q >= s; + } + function b() { + var w = mr(); + if (d(w)) + return O(w); + o = setTimeout(b, m(w)); + } + function O(w) { + return o = void 0, g && n ? f(w) : (n = i = void 0, a); + } + function A() { + o !== void 0 && clearTimeout(o), u = 0, n = l = i = o = void 0; + } + function S() { + return o === void 0 ? a : O(mr()); + } + function $() { + var w = mr(), _ = d(w); + if (n = arguments, i = this, l = w, _) { + if (o === void 0) + return h(l); + if (v) + return clearTimeout(o), o = setTimeout(b, t), f(l); + } + return o === void 0 && (o = setTimeout(b, t)), a; + } + return $.cancel = A, $.flush = S, $; +} +const nc = { + props: { + url: { + type: String, + required: true + }, + method: { + type: String, + required: false, + default: "GET" + }, + acceptHeader: { + type: String, + required: false, + default: "application/json" + }, + headers: { + type: Object, + required: false, + default: () => ({}) + }, + poll: { + type: Number, + required: false, + default: null + }, + default: { + type: Object, + required: false, + default: () => ({}) + }, + request: { + type: Object, + required: false, + default: () => ({}) + }, + manual: { + type: Boolean, + required: false, + default: false + }, + watchDebounce: { + type: Number, + required: false, + default: 0 + }, + watchValue: { + validator() { + return true; + }, + required: false, + default: null + } + }, + emits: ["success", "error"], + data() { + return { + response: Object.assign({}, { ...this.default }), + processing: false, + debounceFunction: null + }; + }, + watch: { + watchValue: { + deep: true, + handler() { + this.processing = true, this.watchDebounce ? this.debounceFunction() : this.performRequest(); + } + } + }, + mounted() { + this.manual || this.$nextTick(this.performRequest); + }, + created() { + this.debounceFunction = er(() => { + this.performRequest(); + }, this.watchDebounce); + }, + methods: { + performRequest() { + this.processing = true; + const e = {}; + this.acceptHeader && (e.Accept = this.acceptHeader); + const t = { + url: this.url, + method: this.method, + headers: { ...e, ...this.headers } + }; + Object.keys(this.request).length > 0 && (t.data = this.request), ne(t).then((r) => { + this.response = r.data, this.processing = false, this.$emit("success", r.data); + }).catch(() => { + this.processing = false, this.$emit("error"); + }), this.poll && setTimeout(() => { + this.performRequest(); + }, this.poll); + } + }, + render() { + return this.$slots.default({ + processing: this.processing, + response: this.response, + reload: this.performRequest + }); + } +}, ic = { + data() { + return { + isActivated: true + }; + }, + deactivated() { + this.isActivated = false; + }, + activated() { + this.isActivated = true; + }, + render() { + return this.$slots.default({ + Dialog: en, + DialogPanel: tn, + isActivated: this.isActivated + }); + } +}, rs = { + __name: "OnClickOutside", + props: { + do: { + type: Function, + required: true + }, + opened: { + type: Boolean, + required: true + }, + closeOnEscape: { + type: Boolean, + required: false, + default: true + }, + ignoreInnerTargets: { + type: Boolean, + required: false, + default: false + } + }, + setup(e) { + const t = e, r = vueExports.ref(null), n = vueExports.ref(null), i = vueExports.ref(null); + return vueExports.onMounted(() => { + r.value = (s) => { + n.value.children[0].contains(s.target) || t.ignoreInnerTargets && n.value.contains(s.target) || t.do(); + }, document.addEventListener("click", r.value), document.addEventListener("touchstart", r.value), t.closeOnEscape && (i.value = (s) => { + t.opened && s.key === "Escape" && t.do(); + }, document.addEventListener("keydown", i.value)); + }), vueExports.onBeforeUnmount(() => { + document.removeEventListener("click", r.value), document.removeEventListener("touchstart", r.value), t.closeOnEscape && document.removeEventListener("keydown", i.value); + }), (s, a) => (vueExports.openBlock(), vueExports.createElementBlock("div", { + ref_key: "root", + ref: n + }, [ + vueExports.renderSlot(s.$slots, "default") + ], 512)); + } +}; +function Q(e) { + if (e == null) + return window; + if (e.toString() !== "[object Window]") { + var t = e.ownerDocument; + return t && t.defaultView || window; + } + return e; +} +function Xe(e) { + var t = Q(e).Element; + return e instanceof t || e instanceof Element; +} +function re(e) { + var t = Q(e).HTMLElement; + return e instanceof t || e instanceof HTMLElement; +} +function sn(e) { + if (typeof ShadowRoot > "u") + return false; + var t = Q(e).ShadowRoot; + return e instanceof t || e instanceof ShadowRoot; +} +var ze = Math.max, Vt = Math.min, nt = Math.round; +function xr() { + var e = navigator.userAgentData; + return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) { + return t.brand + "/" + t.version; + }).join(" ") : navigator.userAgent; +} +function ns() { + return !/^((?!chrome|android).)*safari/i.test(xr()); +} +function it(e, t, r) { + t === void 0 && (t = false), r === void 0 && (r = false); + var n = e.getBoundingClientRect(), i = 1, s = 1; + t && re(e) && (i = e.offsetWidth > 0 && nt(n.width) / e.offsetWidth || 1, s = e.offsetHeight > 0 && nt(n.height) / e.offsetHeight || 1); + var a = Xe(e) ? Q(e) : window, o = a.visualViewport, l = !ns() && r, u = (n.left + (l && o ? o.offsetLeft : 0)) / i, c = (n.top + (l && o ? o.offsetTop : 0)) / s, v = n.width / i, g = n.height / s; + return { + width: v, + height: g, + top: c, + right: u + v, + bottom: c + g, + left: u, + x: u, + y: c + }; +} +function an(e) { + var t = Q(e), r = t.pageXOffset, n = t.pageYOffset; + return { + scrollLeft: r, + scrollTop: n + }; +} +function sc(e) { + return { + scrollLeft: e.scrollLeft, + scrollTop: e.scrollTop + }; +} +function ac(e) { + return e === Q(e) || !re(e) ? an(e) : sc(e); +} +function pe(e) { + return e ? (e.nodeName || "").toLowerCase() : null; +} +function je(e) { + return ((Xe(e) ? e.ownerDocument : ( + // $FlowFixMe[prop-missing] + e.document + )) || window.document).documentElement; +} +function on(e) { + return it(je(e)).left + an(e).scrollLeft; +} +function Ee(e) { + return Q(e).getComputedStyle(e); +} +function ln(e) { + var t = Ee(e), r = t.overflow, n = t.overflowX, i = t.overflowY; + return /auto|scroll|overlay|hidden/.test(r + i + n); +} +function oc(e) { + var t = e.getBoundingClientRect(), r = nt(t.width) / e.offsetWidth || 1, n = nt(t.height) / e.offsetHeight || 1; + return r !== 1 || n !== 1; +} +function lc(e, t, r) { + r === void 0 && (r = false); + var n = re(t), i = re(t) && oc(t), s = je(t), a = it(e, i, r), o = { + scrollLeft: 0, + scrollTop: 0 + }, l = { + x: 0, + y: 0 + }; + return (n || !n && !r) && ((pe(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 + ln(s)) && (o = ac(t)), re(t) ? (l = it(t, true), l.x += t.clientLeft, l.y += t.clientTop) : s && (l.x = on(s))), { + x: a.left + o.scrollLeft - l.x, + y: a.top + o.scrollTop - l.y, + width: a.width, + height: a.height + }; +} +function is(e) { + var t = it(e), r = e.offsetWidth, n = e.offsetHeight; + return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), { + x: e.offsetLeft, + y: e.offsetTop, + width: r, + height: n + }; +} +function tr(e) { + return pe(e) === "html" ? e : ( + // this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + e.assignedSlot || // step into the shadow DOM of the parent of a slotted node + e.parentNode || // DOM Element detected + (sn(e) ? e.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + je(e) + ); +} +function ss(e) { + return ["html", "body", "#document"].indexOf(pe(e)) >= 0 ? e.ownerDocument.body : re(e) && ln(e) ? e : ss(tr(e)); +} +function yt(e, t) { + var r; + t === void 0 && (t = []); + var n = ss(e), i = n === ((r = e.ownerDocument) == null ? void 0 : r.body), s = Q(n), a = i ? [s].concat(s.visualViewport || [], ln(n) ? n : []) : n, o = t.concat(a); + return i ? o : ( + // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + o.concat(yt(tr(a))) + ); +} +function uc(e) { + return ["table", "td", "th"].indexOf(pe(e)) >= 0; +} +function Bn(e) { + return !re(e) || // https://github.com/popperjs/popper-core/issues/837 + Ee(e).position === "fixed" ? null : e.offsetParent; +} +function cc(e) { + var t = /firefox/i.test(xr()), r = /Trident/i.test(xr()); + if (r && re(e)) { + var n = Ee(e); + if (n.position === "fixed") + return null; + } + var i = tr(e); + for (sn(i) && (i = i.host); re(i) && ["html", "body"].indexOf(pe(i)) < 0; ) { + var s = Ee(i); + if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || t && s.willChange === "filter" || t && s.filter && s.filter !== "none") + return i; + i = i.parentNode; + } + return null; +} +function rr(e) { + for (var t = Q(e), r = Bn(e); r && uc(r) && Ee(r).position === "static"; ) + r = Bn(r); + return r && (pe(r) === "html" || pe(r) === "body" && Ee(r).position === "static") ? t : r || cc(e) || t; +} +var oe = "top", he = "bottom", Re = "right", we = "left", un = "auto", nr = [oe, he, Re, we], st = "start", Ot = "end", dc = "clippingParents", as = "viewport", mt = "popper", fc = "reference", jn = /* @__PURE__ */ nr.reduce(function(e, t) { + return e.concat([t + "-" + st, t + "-" + Ot]); +}, []), pc = /* @__PURE__ */ [].concat(nr, [un]).reduce(function(e, t) { + return e.concat([t, t + "-" + st, t + "-" + Ot]); +}, []), hc = "beforeRead", mc = "read", vc = "afterRead", gc = "beforeMain", yc = "main", bc = "afterMain", wc = "beforeWrite", Sc = "write", Oc = "afterWrite", $c = [hc, mc, vc, gc, yc, bc, wc, Sc, Oc]; +function Ec(e) { + var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = []; + e.forEach(function(s) { + t.set(s.name, s); + }); + function i(s) { + r.add(s.name); + var a = [].concat(s.requires || [], s.requiresIfExists || []); + a.forEach(function(o) { + if (!r.has(o)) { + var l = t.get(o); + l && i(l); + } + }), n.push(s); + } + return e.forEach(function(s) { + r.has(s.name) || i(s); + }), n; +} +function Tc(e) { + var t = Ec(e); + return $c.reduce(function(r, n) { + return r.concat(t.filter(function(i) { + return i.phase === n; + })); + }, []); +} +function xc(e) { + var t; + return function() { + return t || (t = new Promise(function(r) { + Promise.resolve().then(function() { + t = void 0, r(e()); + }); + })), t; + }; +} +function _c(e) { + var t = e.reduce(function(r, n) { + var i = r[n.name]; + return r[n.name] = i ? Object.assign({}, i, n, { + options: Object.assign({}, i.options, n.options), + data: Object.assign({}, i.data, n.data) + }) : n, r; + }, {}); + return Object.keys(t).map(function(r) { + return t[r]; + }); +} +function Ic(e, t) { + var r = Q(e), n = je(e), i = r.visualViewport, s = n.clientWidth, a = n.clientHeight, o = 0, l = 0; + if (i) { + s = i.width, a = i.height; + var u = ns(); + (u || !u && t === "fixed") && (o = i.offsetLeft, l = i.offsetTop); + } + return { + width: s, + height: a, + x: o + on(e), + y: l + }; +} +function Ac(e) { + var t, r = je(e), n = an(e), i = (t = e.ownerDocument) == null ? void 0 : t.body, s = ze(r.scrollWidth, r.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), a = ze(r.scrollHeight, r.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), o = -n.scrollLeft + on(e), l = -n.scrollTop; + return Ee(i || r).direction === "rtl" && (o += ze(r.clientWidth, i ? i.clientWidth : 0) - s), { + width: s, + height: a, + x: o, + y: l + }; +} +function Pc(e, t) { + var r = t.getRootNode && t.getRootNode(); + if (e.contains(t)) + return true; + if (r && sn(r)) { + var n = t; + do { + if (n && e.isSameNode(n)) + return true; + n = n.parentNode || n.host; + } while (n); + } + return false; +} +function _r(e) { + return Object.assign({}, e, { + left: e.x, + top: e.y, + right: e.x + e.width, + bottom: e.y + e.height + }); +} +function qc(e, t) { + var r = it(e, false, t === "fixed"); + return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r; +} +function Mn(e, t, r) { + return t === as ? _r(Ic(e, r)) : Xe(t) ? qc(t, r) : _r(Ac(je(e))); +} +function Cc(e) { + var t = yt(tr(e)), r = ["absolute", "fixed"].indexOf(Ee(e).position) >= 0, n = r && re(e) ? rr(e) : e; + return Xe(n) ? t.filter(function(i) { + return Xe(i) && Pc(i, n) && pe(i) !== "body"; + }) : []; +} +function Fc(e, t, r, n) { + var i = t === "clippingParents" ? Cc(e) : [].concat(t), s = [].concat(i, [r]), a = s[0], o = s.reduce(function(l, u) { + var c = Mn(e, u, n); + return l.top = ze(c.top, l.top), l.right = Vt(c.right, l.right), l.bottom = Vt(c.bottom, l.bottom), l.left = ze(c.left, l.left), l; + }, Mn(e, a, n)); + return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o; +} +function Fe(e) { + return e.split("-")[0]; +} +function at(e) { + return e.split("-")[1]; +} +function os(e) { + return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; +} +function ls(e) { + var t = e.reference, r = e.element, n = e.placement, i = n ? Fe(n) : null, s = n ? at(n) : null, a = t.x + t.width / 2 - r.width / 2, o = t.y + t.height / 2 - r.height / 2, l; + switch (i) { + case oe: + l = { + x: a, + y: t.y - r.height + }; + break; + case he: + l = { + x: a, + y: t.y + t.height + }; + break; + case Re: + l = { + x: t.x + t.width, + y: o + }; + break; + case we: + l = { + x: t.x - r.width, + y: o + }; + break; + default: + l = { + x: t.x, + y: t.y + }; + } + var u = i ? os(i) : null; + if (u != null) { + var c = u === "y" ? "height" : "width"; + switch (s) { + case st: + l[u] = l[u] - (t[c] / 2 - r[c] / 2); + break; + case Ot: + l[u] = l[u] + (t[c] / 2 - r[c] / 2); + break; + } + } + return l; +} +function us() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; +} +function kc(e) { + return Object.assign({}, us(), e); +} +function Lc(e, t) { + return t.reduce(function(r, n) { + return r[n] = e, r; + }, {}); +} +function cn(e, t) { + t === void 0 && (t = {}); + var r = t, n = r.placement, i = n === void 0 ? e.placement : n, s = r.strategy, a = s === void 0 ? e.strategy : s, o = r.boundary, l = o === void 0 ? dc : o, u = r.rootBoundary, c = u === void 0 ? as : u, v = r.elementContext, g = v === void 0 ? mt : v, f = r.altBoundary, h = f === void 0 ? false : f, m = r.padding, d = m === void 0 ? 0 : m, b = kc(typeof d != "number" ? d : Lc(d, nr)), O = g === mt ? fc : mt, A = e.rects.popper, S = e.elements[h ? O : g], $ = Fc(Xe(S) ? S : S.contextElement || je(e.elements.popper), l, c, a), w = it(e.elements.reference), _ = ls({ + reference: w, + element: A, + strategy: "absolute", + placement: i + }), q = _r(Object.assign({}, A, _)), P = g === mt ? q : w, k = { + top: $.top - P.top + b.top, + bottom: P.bottom - $.bottom + b.bottom, + left: $.left - P.left + b.left, + right: P.right - $.right + b.right + }, j = e.modifiersData.offset; + if (g === mt && j) { + var H = j[i]; + Object.keys(k).forEach(function(F) { + var E = [Re, he].indexOf(F) >= 0 ? 1 : -1, T = [oe, he].indexOf(F) >= 0 ? "y" : "x"; + k[F] += H[T] * E; + }); + } + return k; +} +var Dn = { + placement: "bottom", + modifiers: [], + strategy: "absolute" +}; +function Nn() { + for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) + t[r] = arguments[r]; + return !t.some(function(n) { + return !(n && typeof n.getBoundingClientRect == "function"); + }); +} +function Rc(e) { + e === void 0 && (e = {}); + var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, i = t.defaultOptions, s = i === void 0 ? Dn : i; + return function(o, l, u) { + u === void 0 && (u = s); + var c = { + placement: "bottom", + orderedModifiers: [], + options: Object.assign({}, Dn, s), + modifiersData: {}, + elements: { + reference: o, + popper: l + }, + attributes: {}, + styles: {} + }, v = [], g = false, f = { + state: c, + setOptions: function(b) { + var O = typeof b == "function" ? b(c.options) : b; + m(), c.options = Object.assign({}, s, c.options, O), c.scrollParents = { + reference: Xe(o) ? yt(o) : o.contextElement ? yt(o.contextElement) : [], + popper: yt(l) + }; + var A = Tc(_c([].concat(n, c.options.modifiers))); + return c.orderedModifiers = A.filter(function(S) { + return S.enabled; + }), h(), f.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function() { + if (!g) { + var b = c.elements, O = b.reference, A = b.popper; + if (Nn(O, A)) { + c.rects = { + reference: lc(O, rr(A), c.options.strategy === "fixed"), + popper: is(A) + }, c.reset = false, c.placement = c.options.placement, c.orderedModifiers.forEach(function(k) { + return c.modifiersData[k.name] = Object.assign({}, k.data); + }); + for (var S = 0; S < c.orderedModifiers.length; S++) { + if (c.reset === true) { + c.reset = false, S = -1; + continue; + } + var $ = c.orderedModifiers[S], w = $.fn, _ = $.options, q = _ === void 0 ? {} : _, P = $.name; + typeof w == "function" && (c = w({ + state: c, + options: q, + name: P, + instance: f + }) || c); + } + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: xc(function() { + return new Promise(function(d) { + f.forceUpdate(), d(c); + }); + }), + destroy: function() { + m(), g = true; + } + }; + if (!Nn(o, l)) + return f; + f.setOptions(u).then(function(d) { + !g && u.onFirstUpdate && u.onFirstUpdate(d); + }); + function h() { + c.orderedModifiers.forEach(function(d) { + var b = d.name, O = d.options, A = O === void 0 ? {} : O, S = d.effect; + if (typeof S == "function") { + var $ = S({ + state: c, + name: b, + instance: f, + options: A + }), w = function() { + }; + v.push($ || w); + } + }); + } + function m() { + v.forEach(function(d) { + return d(); + }), v = []; + } + return f; + }; +} +var Ft = { + passive: true +}; +function Bc(e) { + var t = e.state, r = e.instance, n = e.options, i = n.scroll, s = i === void 0 ? true : i, a = n.resize, o = a === void 0 ? true : a, l = Q(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper); + return s && u.forEach(function(c) { + c.addEventListener("scroll", r.update, Ft); + }), o && l.addEventListener("resize", r.update, Ft), function() { + s && u.forEach(function(c) { + c.removeEventListener("scroll", r.update, Ft); + }), o && l.removeEventListener("resize", r.update, Ft); + }; +} +const jc = { + name: "eventListeners", + enabled: true, + phase: "write", + fn: function() { + }, + effect: Bc, + data: {} +}; +function Mc(e) { + var t = e.state, r = e.name; + t.modifiersData[r] = ls({ + reference: t.rects.reference, + element: t.rects.popper, + strategy: "absolute", + placement: t.placement + }); +} +const Dc = { + name: "popperOffsets", + enabled: true, + phase: "read", + fn: Mc, + data: {} +}; +var Nc = { + top: "auto", + right: "auto", + bottom: "auto", + left: "auto" +}; +function Vc(e, t) { + var r = e.x, n = e.y, i = t.devicePixelRatio || 1; + return { + x: nt(r * i) / i || 0, + y: nt(n * i) / i || 0 + }; +} +function Vn(e) { + var t, r = e.popper, n = e.popperRect, i = e.placement, s = e.variation, a = e.offsets, o = e.position, l = e.gpuAcceleration, u = e.adaptive, c = e.roundOffsets, v = e.isFixed, g = a.x, f = g === void 0 ? 0 : g, h = a.y, m = h === void 0 ? 0 : h, d = typeof c == "function" ? c({ + x: f, + y: m + }) : { + x: f, + y: m + }; + f = d.x, m = d.y; + var b = a.hasOwnProperty("x"), O = a.hasOwnProperty("y"), A = we, S = oe, $ = window; + if (u) { + var w = rr(r), _ = "clientHeight", q = "clientWidth"; + if (w === Q(r) && (w = je(r), Ee(w).position !== "static" && o === "absolute" && (_ = "scrollHeight", q = "scrollWidth")), w = w, i === oe || (i === we || i === Re) && s === Ot) { + S = he; + var P = v && w === $ && $.visualViewport ? $.visualViewport.height : ( + // $FlowFixMe[prop-missing] + w[_] + ); + m -= P - n.height, m *= l ? 1 : -1; + } + if (i === we || (i === oe || i === he) && s === Ot) { + A = Re; + var k = v && w === $ && $.visualViewport ? $.visualViewport.width : ( + // $FlowFixMe[prop-missing] + w[q] + ); + f -= k - n.width, f *= l ? 1 : -1; + } + } + var j = Object.assign({ + position: o + }, u && Nc), H = c === true ? Vc({ + x: f, + y: m + }, Q(r)) : { + x: f, + y: m + }; + if (f = H.x, m = H.y, l) { + var F; + return Object.assign({}, j, (F = {}, F[S] = O ? "0" : "", F[A] = b ? "0" : "", F.transform = ($.devicePixelRatio || 1) <= 1 ? "translate(" + f + "px, " + m + "px)" : "translate3d(" + f + "px, " + m + "px, 0)", F)); + } + return Object.assign({}, j, (t = {}, t[S] = O ? m + "px" : "", t[A] = b ? f + "px" : "", t.transform = "", t)); +} +function Hc(e) { + var t = e.state, r = e.options, n = r.gpuAcceleration, i = n === void 0 ? true : n, s = r.adaptive, a = s === void 0 ? true : s, o = r.roundOffsets, l = o === void 0 ? true : o, u = { + placement: Fe(t.placement), + variation: at(t.placement), + popper: t.elements.popper, + popperRect: t.rects.popper, + gpuAcceleration: i, + isFixed: t.options.strategy === "fixed" + }; + t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Vn(Object.assign({}, u, { + offsets: t.modifiersData.popperOffsets, + position: t.options.strategy, + adaptive: a, + roundOffsets: l + })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Vn(Object.assign({}, u, { + offsets: t.modifiersData.arrow, + position: "absolute", + adaptive: false, + roundOffsets: l + })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { + "data-popper-placement": t.placement + }); +} +const Uc = { + name: "computeStyles", + enabled: true, + phase: "beforeWrite", + fn: Hc, + data: {} +}; +function Wc(e) { + var t = e.state; + Object.keys(t.elements).forEach(function(r) { + var n = t.styles[r] || {}, i = t.attributes[r] || {}, s = t.elements[r]; + !re(s) || !pe(s) || (Object.assign(s.style, n), Object.keys(i).forEach(function(a) { + var o = i[a]; + o === false ? s.removeAttribute(a) : s.setAttribute(a, o === true ? "" : o); + })); + }); +} +function zc(e) { + var t = e.state, r = { + popper: { + position: t.options.strategy, + left: "0", + top: "0", + margin: "0" + }, + arrow: { + position: "absolute" + }, + reference: {} + }; + return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() { + Object.keys(t.elements).forEach(function(n) { + var i = t.elements[n], s = t.attributes[n] || {}, a = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), o = a.reduce(function(l, u) { + return l[u] = "", l; + }, {}); + !re(i) || !pe(i) || (Object.assign(i.style, o), Object.keys(s).forEach(function(l) { + i.removeAttribute(l); + })); + }); + }; +} +const Gc = { + name: "applyStyles", + enabled: true, + phase: "write", + fn: Wc, + effect: zc, + requires: ["computeStyles"] +}; +var Xc = [jc, Dc, Uc, Gc], Kc = /* @__PURE__ */ Rc({ + defaultModifiers: Xc +}); +function Jc(e) { + return e === "x" ? "y" : "x"; +} +function Rt(e, t, r) { + return ze(e, Vt(t, r)); +} +function Qc(e, t, r) { + var n = Rt(e, t, r); + return n > r ? r : n; +} +function Yc(e) { + var t = e.state, r = e.options, n = e.name, i = r.mainAxis, s = i === void 0 ? true : i, a = r.altAxis, o = a === void 0 ? false : a, l = r.boundary, u = r.rootBoundary, c = r.altBoundary, v = r.padding, g = r.tether, f = g === void 0 ? true : g, h = r.tetherOffset, m = h === void 0 ? 0 : h, d = cn(t, { + boundary: l, + rootBoundary: u, + padding: v, + altBoundary: c + }), b = Fe(t.placement), O = at(t.placement), A = !O, S = os(b), $ = Jc(S), w = t.modifiersData.popperOffsets, _ = t.rects.reference, q = t.rects.popper, P = typeof m == "function" ? m(Object.assign({}, t.rects, { + placement: t.placement + })) : m, k = typeof P == "number" ? { + mainAxis: P, + altAxis: P + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, P), j = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, H = { + x: 0, + y: 0 + }; + if (w) { + if (s) { + var F, E = S === "y" ? oe : we, T = S === "y" ? he : Re, I = S === "y" ? "height" : "width", C = w[S], ge = C + d[E], U = C - d[T], ct = f ? -q[I] / 2 : 0, It = O === st ? _[I] : q[I], Ie = O === st ? -q[I] : -_[I], Ze = t.elements.arrow, Ae = f && Ze ? is(Ze) : { + width: 0, + height: 0 + }, Pe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : us(), dt = Pe[E], At = Pe[T], Me = Rt(0, _[I], Ae[I]), sr = A ? _[I] / 2 - ct - Me - dt - k.mainAxis : It - Me - dt - k.mainAxis, Ss = A ? -_[I] / 2 + ct + Me + At + k.mainAxis : Ie + Me + At + k.mainAxis, ar = t.elements.arrow && rr(t.elements.arrow), Os = ar ? S === "y" ? ar.clientTop || 0 : ar.clientLeft || 0 : 0, hn = (F = j == null ? void 0 : j[S]) != null ? F : 0, $s = C + sr - hn - Os, Es = C + Ss - hn, mn = Rt(f ? Vt(ge, $s) : ge, C, f ? ze(U, Es) : U); + w[S] = mn, H[S] = mn - C; + } + if (o) { + var vn, Ts = S === "x" ? oe : we, xs = S === "x" ? he : Re, De = w[$], Pt = $ === "y" ? "height" : "width", gn = De + d[Ts], yn = De - d[xs], or = [oe, we].indexOf(b) !== -1, bn = (vn = j == null ? void 0 : j[$]) != null ? vn : 0, wn = or ? gn : De - _[Pt] - q[Pt] - bn + k.altAxis, Sn = or ? De + _[Pt] + q[Pt] - bn - k.altAxis : yn, On = f && or ? Qc(wn, De, Sn) : Rt(f ? wn : gn, De, f ? Sn : yn); + w[$] = On, H[$] = On - De; + } + t.modifiersData[n] = H; + } +} +const Zc = { + name: "preventOverflow", + enabled: true, + phase: "main", + fn: Yc, + requiresIfExists: ["offset"] +}; +var ed = { + left: "right", + right: "left", + bottom: "top", + top: "bottom" +}; +function Bt(e) { + return e.replace(/left|right|bottom|top/g, function(t) { + return ed[t]; + }); +} +var td = { + start: "end", + end: "start" +}; +function Hn(e) { + return e.replace(/start|end/g, function(t) { + return td[t]; + }); +} +function rd(e, t) { + t === void 0 && (t = {}); + var r = t, n = r.placement, i = r.boundary, s = r.rootBoundary, a = r.padding, o = r.flipVariations, l = r.allowedAutoPlacements, u = l === void 0 ? pc : l, c = at(n), v = c ? o ? jn : jn.filter(function(h) { + return at(h) === c; + }) : nr, g = v.filter(function(h) { + return u.indexOf(h) >= 0; + }); + g.length === 0 && (g = v); + var f = g.reduce(function(h, m) { + return h[m] = cn(e, { + placement: m, + boundary: i, + rootBoundary: s, + padding: a + })[Fe(m)], h; + }, {}); + return Object.keys(f).sort(function(h, m) { + return f[h] - f[m]; + }); +} +function nd(e) { + if (Fe(e) === un) + return []; + var t = Bt(e); + return [Hn(e), t, Hn(t)]; +} +function id(e) { + var t = e.state, r = e.options, n = e.name; + if (!t.modifiersData[n]._skip) { + for (var i = r.mainAxis, s = i === void 0 ? true : i, a = r.altAxis, o = a === void 0 ? true : a, l = r.fallbackPlacements, u = r.padding, c = r.boundary, v = r.rootBoundary, g = r.altBoundary, f = r.flipVariations, h = f === void 0 ? true : f, m = r.allowedAutoPlacements, d = t.options.placement, b = Fe(d), O = b === d, A = l || (O || !h ? [Bt(d)] : nd(d)), S = [d].concat(A).reduce(function(Ae, Pe) { + return Ae.concat(Fe(Pe) === un ? rd(t, { + placement: Pe, + boundary: c, + rootBoundary: v, + padding: u, + flipVariations: h, + allowedAutoPlacements: m + }) : Pe); + }, []), $ = t.rects.reference, w = t.rects.popper, _ = /* @__PURE__ */ new Map(), q = true, P = S[0], k = 0; k < S.length; k++) { + var j = S[k], H = Fe(j), F = at(j) === st, E = [oe, he].indexOf(H) >= 0, T = E ? "width" : "height", I = cn(t, { + placement: j, + boundary: c, + rootBoundary: v, + altBoundary: g, + padding: u + }), C = E ? F ? Re : we : F ? he : oe; + $[T] > w[T] && (C = Bt(C)); + var ge = Bt(C), U = []; + if (s && U.push(I[H] <= 0), o && U.push(I[C] <= 0, I[ge] <= 0), U.every(function(Ae) { + return Ae; + })) { + P = j, q = false; + break; + } + _.set(j, U); + } + if (q) + for (var ct = h ? 3 : 1, It = function(Pe) { + var dt = S.find(function(At) { + var Me = _.get(At); + if (Me) + return Me.slice(0, Pe).every(function(sr) { + return sr; + }); + }); + if (dt) + return P = dt, "break"; + }, Ie = ct; Ie > 0; Ie--) { + var Ze = It(Ie); + if (Ze === "break") + break; + } + t.placement !== P && (t.modifiersData[n]._skip = true, t.placement = P, t.reset = true); + } +} +const sd = { + name: "flip", + enabled: true, + phase: "main", + fn: id, + requiresIfExists: ["offset"], + data: { + _skip: false + } +}, _e = (e, t) => { + const r = e.__vccOpts || e; + for (const [n, i] of t) + r[n] = i; + return r; +}, ad = { + components: { + OnClickOutside: rs + }, + props: { + spladeId: { + type: String, + required: true + }, + placement: { + type: String, + default: "bottom-start", + required: false + }, + strategy: { + type: String, + default: "absolute", + required: false + }, + inline: { + type: Boolean, + default: false, + required: false + }, + disabled: { + type: Boolean, + default: false, + required: false + }, + teleport: { + type: Boolean, + default: false, + required: false + }, + closeOnClick: { + type: Boolean, + default: false, + required: false + } + }, + data() { + return { + opened: false, + popper: null + }; + }, + computed: { + buttonStyle() { + return this.inline ? { display: "inline" } : {}; + }, + wrapperStyle() { + const e = { position: "relative" }; + return this.inline && (e.display = "inline"), e; + } + }, + watch: { + opened() { + this.popper.update(); + } + }, + mounted: async function() { + this.teleport && await vueExports.nextTick(); + const e = this.teleport ? document.querySelector(`div[data-splade-dropdown-id="${this.spladeId}"]`) : this.$refs.tooltip.children[0]; + this.popper = Kc(this.$refs.button, e, { + placement: this.placement, + modifiers: [sd, Zc], + strategy: this.strategy + }); + }, + methods: { + toggle() { + this.opened = !this.opened; + }, + hide() { + this.opened = false; + } + } +}, od = { ref: "tooltip" }; +function ld(e, t, r, n, i, s) { + const a = vueExports.resolveComponent("OnClickOutside"); + return vueExports.openBlock(), vueExports.createBlock(a, { + style: vueExports.normalizeStyle(s.wrapperStyle), + do: s.hide, + opened: i.opened, + "ignore-inner-targets": !r.closeOnClick + }, { + default: vueExports.withCtx(() => [ + vueExports.createElementVNode("div", { + ref: "button", + style: vueExports.normalizeStyle(s.buttonStyle) + }, [ + vueExports.renderSlot(e.$slots, "button", { + toggle: s.toggle, + disabled: r.disabled + }) + ], 4), + vueExports.createElementVNode("div", od, [ + vueExports.renderSlot(e.$slots, "default", { + hide: s.hide, + opened: i.opened + }) + ], 512) + ]), + _: 3 + }, 8, ["style", "do", "opened", "ignore-inner-targets"]); +} +const ud = /* @__PURE__ */ _e(ad, [["render", ld]]), cd = { + __name: "DynamicHtml", + props: { + keepAliveKey: { + type: String, + required: true + }, + name: { + type: String, + required: true + }, + passthrough: { + type: Object, + required: false, + default() { + return {}; + } + } + }, + setup(e) { + const t = vueExports.inject("$splade") || {}, r = vueExports.inject("$spladeOptions") || {}; + return (n, i) => vueExports.unref(t).isSsr ? (vueExports.openBlock(), vueExports.createBlock(ue, { + key: e.keepAliveKey, + html: vueExports.unref(t).htmlForDynamicComponent(e.name), + passthrough: e.passthrough + }, null, 8, ["html", "passthrough"])) : (vueExports.openBlock(), vueExports.createBlock(vueExports.KeepAlive, { + key: 0, + max: vueExports.unref(r).max_keep_alive + }, [ + (vueExports.openBlock(), vueExports.createBlock(ue, { + key: e.keepAliveKey, + html: vueExports.unref(t).htmlForDynamicComponent(e.name), + passthrough: e.passthrough + }, null, 8, ["html", "passthrough"])) + ], 1032, ["max"])); + } +}; +function cs(e) { + return e && e.length ? e[0] : void 0; +} +const dd = { + inject: ["stack"], + computed: { + values() { + return p.validationErrors(this.stack); + } + }, + render() { + const e = this; + return this.$slots.default({ + has(t) { + return W(e.values, t); + }, + first(t) { + return cs(e.values[t] || []); + }, + all: { ...this.values }, + ...this.values + }); + } +}, fd = { + inject: ["stack"], + props: { + private: { + type: Boolean, + required: false, + default: false + }, + channel: { + type: String, + required: true + }, + listeners: { + type: Array, + required: true + }, + preserveScroll: { + type: Boolean, + required: false, + default: false + } + }, + emits: ["subscribed", "event"], + data() { + return { + subscribed: false, + subscription: null, + subscriptions: [], + events: [], + pendingVisit: null, + pendingRefresh: false + }; + }, + computed: { + currentStack() { + return p.currentStack.value; + } + }, + watch: { + currentStack() { + this.handlePendingVisit(), this.handlePendingRefresh(); + }, + pendingVisit() { + this.handlePendingVisit(); + }, + pendingRefresh() { + this.handlePendingRefresh(); + } + }, + beforeUnmount() { + this.subscription && (window.Echo.leave(this.subscription.subscription.name), this.subscription = null, this.subscriptions = []); + }, + mounted() { + this.subscription = this.private ? window.Echo.private(this.channel) : window.Echo.channel(this.channel), this.subscription ? this.bindListeners() : console.error("[Splade Event component] Unable to subscribe to channel: " + this.channel); + }, + methods: { + handlePendingVisit() { + this.pendingVisit && p.currentStack.value === this.stack && (p.visit(this.pendingVisit), this.pendingVisit = null); + }, + handlePendingRefresh() { + this.pendingRefresh && p.currentStack.value === this.stack && (p.refresh(this.pendingRefresh.preserveScroll || this.preserveScroll), this.pendingRefresh = false); + }, + bindListeners() { + this.subscription.on("pusher:subscription_succeeded", () => { + this.subscribed = true, this.$emit("subscribed"); + }), this.listeners.forEach((e) => { + const t = this.subscription.listen(e, (r) => { + this.$emit("event", { name: e, data: r }); + const n = "splade.preserveScroll", i = "splade.redirect", s = "splade.refresh", a = "splade.toast"; + let o = null, l = false, u = false, c = []; + te(r, (v) => { + J(v) && (i in v && (o = v[i]), n in v && (l = v[n]), s in v && (u = v[s]), a in v && c.push(v)); + }), o ? this.pendingVisit = o : u ? this.pendingRefresh = { preserveScroll: l } : this.events.push({ name: e, data: r }), c.length > 0 && c.forEach((v) => { + p.pushToast(v); + }), this.$root.$emit(`event.${e}`, r); + }); + this.subscriptions.push(t); + }); + }, + unsubscribe() { + this.subscription && (window.Echo.leave(this.subscription.subscription.name), this.subscription = null, this.subscriptions = []); + } + }, + render() { + return this.$slots.default({ + subscribed: this.subscribed, + events: this.events + }); + } +}; +function pd() { + this.__data__ = new Te(), this.size = 0; +} +function hd(e) { + var t = this.__data__, r = t.delete(e); + return this.size = t.size, r; +} +function md(e) { + return this.__data__.get(e); +} +function vd(e) { + return this.__data__.has(e); +} +var gd = 200; +function yd(e, t) { + var r = this.__data__; + if (r instanceof Te) { + var n = r.__data__; + if (!wt || n.length < gd - 1) + return n.push([e, t]), this.size = ++r.size, this; + r = this.__data__ = new xe(n); + } + return r.set(e, t), this.size = r.size, this; +} +function Se(e) { + var t = this.__data__ = new Te(e); + this.size = t.size; +} +Se.prototype.clear = pd; +Se.prototype.delete = hd; +Se.prototype.get = md; +Se.prototype.has = vd; +Se.prototype.set = yd; +var bd = "__lodash_hash_undefined__"; +function wd(e) { + return this.__data__.set(e, bd), this; +} +function Sd(e) { + return this.__data__.has(e); +} +function Ht(e) { + var t = -1, r = e == null ? 0 : e.length; + for (this.__data__ = new xe(); ++t < r; ) + this.add(e[t]); +} +Ht.prototype.add = Ht.prototype.push = wd; +Ht.prototype.has = Sd; +function Od(e, t) { + for (var r = -1, n = e == null ? 0 : e.length; ++r < n; ) + if (t(e[r], r, e)) + return true; + return false; +} +function $d(e, t) { + return e.has(t); +} +var Ed = 1, Td = 2; +function ds(e, t, r, n, i, s) { + var a = r & Ed, o = e.length, l = t.length; + if (o != l && !(a && l > o)) + return false; + var u = s.get(e), c = s.get(t); + if (u && c) + return u == t && c == e; + var v = -1, g = true, f = r & Td ? new Ht() : void 0; + for (s.set(e, t), s.set(t, e); ++v < o; ) { + var h = e[v], m = t[v]; + if (n) + var d = a ? n(m, h, v, t, e, s) : n(h, m, v, e, t, s); + if (d !== void 0) { + if (d) + continue; + g = false; + break; + } + if (f) { + if (!Od(t, function(b, O) { + if (!$d(f, O) && (h === b || i(h, b, r, n, s))) + return f.push(O); + })) { + g = false; + break; + } + } else if (!(h === m || i(h, m, r, n, s))) { + g = false; + break; + } + } + return s.delete(e), s.delete(t), g; +} +var xd = ve.Uint8Array; +const Un = xd; +function _d(e) { + var t = -1, r = Array(e.size); + return e.forEach(function(n, i) { + r[++t] = [i, n]; + }), r; +} +function Id(e) { + var t = -1, r = Array(e.size); + return e.forEach(function(n) { + r[++t] = n; + }), r; +} +var Ad = 1, Pd = 2, qd = "[object Boolean]", Cd = "[object Date]", Fd = "[object Error]", kd = "[object Map]", Ld = "[object Number]", Rd = "[object RegExp]", Bd = "[object Set]", jd = "[object String]", Md = "[object Symbol]", Dd = "[object ArrayBuffer]", Nd = "[object DataView]", Wn = ke ? ke.prototype : void 0, vr = Wn ? Wn.valueOf : void 0; +function Vd(e, t, r, n, i, s, a) { + switch (r) { + case Nd: + if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) + return false; + e = e.buffer, t = t.buffer; + case Dd: + return !(e.byteLength != t.byteLength || !s(new Un(e), new Un(t))); + case qd: + case Cd: + case Ld: + return Kr(+e, +t); + case Fd: + return e.name == t.name && e.message == t.message; + case Rd: + case jd: + return e == t + ""; + case kd: + var o = _d; + case Bd: + var l = n & Ad; + if (o || (o = Id), e.size != t.size && !l) + return false; + var u = a.get(e); + if (u) + return u == t; + n |= Pd, a.set(e, t); + var c = ds(o(e), o(t), n, i, s, a); + return a.delete(e), c; + case Md: + if (vr) + return vr.call(e) == vr.call(t); + } + return false; +} +function Hd(e, t) { + for (var r = -1, n = t.length, i = e.length; ++r < n; ) + e[i + r] = t[r]; + return e; +} +function Ud(e, t, r) { + var n = t(e); + return M(e) ? n : Hd(n, r(e)); +} +function fs(e, t) { + for (var r = -1, n = e == null ? 0 : e.length, i = 0, s = []; ++r < n; ) { + var a = e[r]; + t(a, r, e) && (s[i++] = a); + } + return s; +} +function Wd() { + return []; +} +var zd = Object.prototype, Gd = zd.propertyIsEnumerable, zn = Object.getOwnPropertySymbols, Xd = zn ? function(e) { + return e == null ? [] : (e = Object(e), fs(zn(e), function(t) { + return Gd.call(e, t); + })); +} : Wd; +const Kd = Xd; +function Gn(e) { + return Ud(e, Wt, Kd); +} +var Jd = 1, Qd = Object.prototype, Yd = Qd.hasOwnProperty; +function Zd(e, t, r, n, i, s) { + var a = r & Jd, o = Gn(e), l = o.length, u = Gn(t), c = u.length; + if (l != c && !a) + return false; + for (var v = l; v--; ) { + var g = o[v]; + if (!(a ? g in t : Yd.call(t, g))) + return false; + } + var f = s.get(e), h = s.get(t); + if (f && h) + return f == t && h == e; + var m = true; + s.set(e, t), s.set(t, e); + for (var d = a; ++v < l; ) { + g = o[v]; + var b = e[g], O = t[g]; + if (n) + var A = a ? n(O, b, g, t, e, s) : n(b, O, g, e, t, s); + if (!(A === void 0 ? b === O || i(b, O, r, n, s) : A)) { + m = false; + break; + } + d || (d = g == "constructor"); + } + if (m && !d) { + var S = e.constructor, $ = t.constructor; + S != $ && "constructor" in e && "constructor" in t && !(typeof S == "function" && S instanceof S && typeof $ == "function" && $ instanceof $) && (m = false); + } + return s.delete(e), s.delete(t), m; +} +var ef = Qe(ve, "DataView"); +const Ir = ef; +var tf = Qe(ve, "Promise"); +const Ar = tf; +var rf = Qe(ve, "Set"); +const Pr = rf; +var nf = Qe(ve, "WeakMap"); +const qr = nf; +var Xn = "[object Map]", sf = "[object Object]", Kn = "[object Promise]", Jn = "[object Set]", Qn = "[object WeakMap]", Yn = "[object DataView]", af = Je(Ir), of = Je(wt), lf = Je(Ar), uf = Je(Pr), cf = Je(qr), Ve = Be; +(Ir && Ve(new Ir(new ArrayBuffer(1))) != Yn || wt && Ve(new wt()) != Xn || Ar && Ve(Ar.resolve()) != Kn || Pr && Ve(new Pr()) != Jn || qr && Ve(new qr()) != Qn) && (Ve = function(e) { + var t = Be(e), r = t == sf ? e.constructor : void 0, n = r ? Je(r) : ""; + if (n) + switch (n) { + case af: + return Yn; + case of: + return Xn; + case lf: + return Kn; + case uf: + return Jn; + case cf: + return Qn; + } + return t; +}); +const Zn = Ve; +var df = 1, ei = "[object Arguments]", ti = "[object Array]", kt = "[object Object]", ff = Object.prototype, ri = ff.hasOwnProperty; +function pf(e, t, r, n, i, s) { + var a = M(e), o = M(t), l = a ? ti : Zn(e), u = o ? ti : Zn(t); + l = l == ei ? kt : l, u = u == ei ? kt : u; + var c = l == kt, v = u == kt, g = l == u; + if (g && yr(e)) { + if (!yr(t)) + return false; + a = true, c = false; + } + if (g && !c) + return s || (s = new Se()), a || hi(e) ? ds(e, t, r, n, i, s) : Vd(e, t, l, r, n, i, s); + if (!(r & df)) { + var f = c && ri.call(e, "__wrapped__"), h = v && ri.call(t, "__wrapped__"); + if (f || h) { + var m = f ? e.value() : e, d = h ? t.value() : t; + return s || (s = new Se()), i(m, d, r, n, s); + } + } + return g ? (s || (s = new Se()), Zd(e, t, r, n, i, s)) : false; +} +function ir(e, t, r, n, i) { + return e === t ? true : e == null || t == null || !Le(e) && !Le(t) ? e !== e && t !== t : pf(e, t, r, n, ir, i); +} +var hf = 1, mf = 2; +function vf(e, t, r, n) { + var i = r.length, s = i, a = !n; + if (e == null) + return !s; + for (e = Object(e); i--; ) { + var o = r[i]; + if (a && o[2] ? o[1] !== e[o[0]] : !(o[0] in e)) + return false; + } + for (; ++i < s; ) { + o = r[i]; + var l = o[0], u = e[l], c = o[1]; + if (a && o[2]) { + if (u === void 0 && !(l in e)) + return false; + } else { + var v = new Se(); + if (n) + var g = n(u, c, l, e, t, v); + if (!(g === void 0 ? ir(c, u, hf | mf, n, v) : g)) + return false; + } + } + return true; +} +function ps(e) { + return e === e && !J(e); +} +function gf(e) { + for (var t = Wt(e), r = t.length; r--; ) { + var n = t[r], i = e[n]; + t[r] = [n, i, ps(i)]; + } + return t; +} +function hs(e, t) { + return function(r) { + return r == null ? false : r[e] === t && (t !== void 0 || e in Object(r)); + }; +} +function yf(e) { + var t = gf(e); + return t.length == 1 && t[0][2] ? hs(t[0][0], t[0][1]) : function(r) { + return r === e || vf(r, e, t); + }; +} +function bf(e, t) { + return e != null && t in Object(e); +} +function wf(e, t) { + return e != null && ki(e, t, bf); +} +var Sf = 1, Of = 2; +function $f(e, t) { + return Xr(e) && ps(t) ? hs($t(e), t) : function(r) { + var n = be(r, e); + return n === void 0 && n === t ? wf(r, e) : ir(t, n, Sf | Of); + }; +} +function Ef(e) { + return function(t) { + return t == null ? void 0 : t[e]; + }; +} +function Tf(e) { + return function(t) { + return es(t, e); + }; +} +function xf(e) { + return Xr(e) ? Ef($t(e)) : Tf(e); +} +function _t(e) { + return typeof e == "function" ? e : e == null ? vi : typeof e == "object" ? M(e) ? $f(e[0], e[1]) : yf(e) : xf(e); +} +function _f(e) { + return function(t, r, n) { + var i = Object(t); + if (!Ut(t)) { + var s = _t(r); + t = Wt(t), r = function(o) { + return s(i[o], o, i); + }; + } + var a = e(t, r, n); + return a > -1 ? i[s ? t[a] : a] : void 0; + }; +} +function If(e, t, r, n) { + for (var i = e.length, s = r + (n ? 1 : -1); n ? s-- : ++s < i; ) + if (t(e[s], s, e)) + return s; + return -1; +} +var ni = 1 / 0, Af = 17976931348623157e292; +function Pf(e) { + if (!e) + return e === 0 ? e : 0; + if (e = Tr(e), e === ni || e === -ni) { + var t = e < 0 ? -1 : 1; + return t * Af; + } + return e === e ? e : 0; +} +function dn(e) { + var t = Pf(e), r = t % 1; + return t === t ? r ? t - r : t : 0; +} +var qf = Math.max; +function Cf(e, t, r) { + var n = e == null ? 0 : e.length; + if (!n) + return -1; + var i = r == null ? 0 : dn(r); + return i < 0 && (i = qf(n + i, 0)), If(e, _t(t), i); +} +var Ff = _f(Cf); +const fn = Ff, kf = { + props: { + form: { + type: Object, + required: true + }, + field: { + type: String, + required: true + }, + multiple: { + type: Boolean, + required: true + }, + filepond: { + type: [Boolean, Object], + required: false, + default: true + }, + jsFilepondOptions: { + type: Object, + required: false, + default: () => ({}) + }, + placeholder: { + type: String, + required: false, + default: "" + }, + preview: { + type: Boolean, + required: false, + default: false + }, + server: { + type: [Boolean, String], + required: false, + default: false + }, + accept: { + type: Array, + required: false, + default: () => [] + }, + minFileSize: { + type: [Boolean, Number, String], + required: false, + default: false + }, + maxFileSize: { + type: [Boolean, Number, String], + required: false, + default: false + }, + minImageWidth: { + type: [Boolean, Number], + required: false, + default: false + }, + maxImageWidth: { + type: [Boolean, Number], + required: false, + default: false + }, + minImageHeight: { + type: [Boolean, Number], + required: false, + default: false + }, + maxImageHeight: { + type: [Boolean, Number], + required: false, + default: false + }, + minImageResolution: { + type: [Boolean, Number], + required: false, + default: false + }, + maxImageResolution: { + type: [Boolean, Number], + required: false, + default: false + }, + existingSuffix: { + type: String, + required: false, + default: "_existing" + }, + orderSuffix: { + type: String, + required: false, + default: "_order" + }, + dusk: { + type: String, + required: false, + default: null + } + }, + emits: ["start-uploading", "stop-uploading"], + data() { + return { + inputElement: null, + filepondInstance: null, + filenames: [], + uploadedFiles: [], + hadExistingFiles: false + }; + }, + computed: { + existingField() { + return this.field + this.existingSuffix; + }, + orderField() { + return this.field + this.orderSuffix; + }, + handlesExistingFiles() { + return this.existingSuffix && this.hadExistingFiles; + } + }, + mounted() { + this.inputElement = this.$refs.file.querySelector('input[type="file"]'); + const e = this.form[this.field]; + this.hadExistingFiles = this.multiple && e.length > 0 || !this.multiple && e, this.form.$put(this.field, this.multiple ? [] : null), this.filepond && (this.setExisting(e), this.initFilepond(e || []).then(() => { + this.form.$registerFilepond(this.field, this.addFileToFilepond, this.addFilesToFilepond); + })); + }, + methods: { + /* + * This extracts the encrypted string from the backend data. + */ + extractMetadataFromExistingFile(e) { + return e ? se(e) ? e : M(e) ? e.map(this.extractMetadataFromExistingFile) : J(e) ? e.options.metadata.metadata : null : null; + }, + /** + * This sets the existing files on the form. + */ + setExisting(e) { + this.handlesExistingFiles && (this.form.$put(this.existingField, this.extractMetadataFromExistingFile(e)), this.setOrder()); + }, + /** + * This determines the order of all files, existing and new, and sets it on the form. + */ + setOrder() { + if (!this.multiple || !this.filepondInstance) + return; + const t = this.filepondInstance.getFiles().filter((n) => !n.getMetadata("identifier")), r = this.filepondInstance.getFiles().map((n) => { + const i = n.getMetadata("identifier"); + return i ? "existing-file-" + i : "new-file-" + t.indexOf(n); + }); + this.form.$put(this.orderField, r); + }, + /** + * This is meant for external URLs. + */ + addFileToFilepond(e) { + e && this.filepondInstance.addFile(e); + }, + addFilesToFilepond(e) { + e.forEach((t) => this.addFileToFilepond(t)); + }, + loadFilepondPlugins() { + const e = []; + return this.preview && (e.push(import("filepond-plugin-image-exif-orientation")), e.push(import("filepond-plugin-image-preview"))), this.accept.length > 0 && e.push(import("filepond-plugin-file-validate-type")), (this.minFileSize || this.maxFileSize) && e.push(import("filepond-plugin-file-validate-size")), (this.minImageWidth || this.maxImageWidth || this.minImageHeight || this.maxImageHeight || this.minImageResolution || this.maxImageResolution) && e.push(import("filepond-plugin-image-validate-size")), Promise.all(e); + }, + initFilepond(e) { + const t = this.inputElement.getAttribute("name"), r = this; + return new Promise((n) => { + import("filepond").then((i) => { + const s = Object.assign({}, r.filepond, r.jsFilepondOptions, { + oninit() { + const a = setInterval(() => { + if (r.filepondInstance.status <= 2) + clearInterval(a); + else + return; + r.setOrder(); + const o = r.filepondInstance.element.querySelector('input[type="file"]'); + o.hasAttribute("name") || o.setAttribute("name", t), r.dusk && r.filepondInstance.element.setAttribute("dusk", r.dusk), o.setAttribute("data-server", !!r.server), r.multiple && r.filepondInstance.element.addEventListener("moveFile", function(l) { + r.filepondInstance.moveFile(l.detail[0], l.detail[1]), r.setOrder(); + }), n(); + }, 15); + }, + onaddfile(a, o) { + a || o.origin !== i.FileOrigin.LOCAL && (r.server ? r.$emit("start-uploading", [o.id]) : r.addFiles([o.file]), r.setOrder()); + }, + onremovefile(a, o) { + a || (r.handlesExistingFiles && (r.multiple ? r.setExisting(r.form[r.existingField].filter((l) => o.getMetadata("metadata") !== l)) : r.setExisting(null)), r.removeFile(o.file)); + }, + onprocessfile(a, o) { + a || (r.uploadedFiles.push({ + file: o.file, + id: o.serverId + }), r.addFiles([o.serverId]), r.$emit("stop-uploading", [o.id])); + }, + onreorderfiles() { + r.setOrder(); + } + }); + this.hadExistingFiles && (s.files = this.multiple ? e : [e]), this.accept.length > 0 && (s.acceptedFileTypes = this.accept), this.minFileSize && (s.minFileSize = this.minFileSize), this.maxFileSize && (s.maxFileSize = this.maxFileSize), this.minImageWidth && (s.imageValidateSizeMinWidth = this.minImageWidth), this.maxImageWidth && (s.imageValidateSizeMaxWidth = this.maxImageWidth), this.minImageHeight && (s.imageValidateSizeMinHeight = this.minImageHeight), this.maxImageHeight && (s.imageValidateSizeMaxHeight = this.maxImageHeight), this.minImageResolution && (s.imageValidateSizeMinResolution = this.minImageResolution), this.maxImageResolution && (s.imageValidateSizeMaxResolution = this.maxImageResolution), s.server = { + // This handles to loading of the file preview of existing files. + load: (a, o, l, u, c) => { + const g = ne.CancelToken.source(); + return ne({ + url: a.preview_url, + method: "GET", + cancelToken: g.token, + responseType: "blob" + }).then((f) => { + const h = new File([f.data], a.name, { type: a.type }); + o(h); + }).catch(function(f) { + axios.isCancel(f) || l(f); + }), { + abort: () => { + g.cancel(), c(); + } + }; + } + }, this.server && (s.server.process = (a, o, l, u, c, v, g) => { + const f = new FormData(); + f.append("file", o, o.name); + const m = ne.CancelToken.source(); + ne({ + url: r.server, + method: "POST", + data: f, + cancelToken: m.token, + onUploadProgress: (d) => { + v(d.lengthComputable, d.loaded, d.total); + } + }).then((d) => { + d.status >= 200 && d.status < 300 ? u(d.data) : c(d.statusText); + }).catch(function(d) { + var b; + axios.isCancel(d) ? g() : c((b = d.response) == null ? void 0 : b.statusText); + }); + }, s.server.revert = (a, o, l) => { + ne({ + url: r.server, + method: "POST", + data: { _method: "DELETE", file: a } + }).then(() => { + o(); + }).catch(function(u) { + var c; + l((c = u.response) == null ? void 0 : c.statusText); + }); + }), (s.itemInsertLocation === "before" || s.itemInsertLocation === "after") && (s.itemInsertLocationFreedom = false), this.loadFilepondPlugins(i).then((a) => { + a.length > 0 && i.registerPlugin(...a.map((o) => o.default)), this.filepondInstance = i.create(this.inputElement, s); + }); + }); + }); + }, + removeFile(e) { + this.server && (e = fn(this.uploadedFiles, (t) => t.file === e).serverId), this.form.$put(this.field, this.multiple ? this.form[this.field].filter((t) => t !== e) : null); + }, + addFiles(e) { + if (this.multiple) { + const t = this.form[this.field]; + e.forEach((r) => { + t.push(r); + }), this.form.$put(this.field, t); + } else + this.form.$put(this.field, e[0]), this.setExisting(null); + this.filepond || this.updateFilenames(); + }, + updateFilenames() { + this.filenames = []; + const e = this.form[this.field]; + this.multiple ? e.forEach((t) => { + this.filenames.push(t.name); + }) : e && this.filenames.push(e.name); + }, + handleFileInput(e) { + this.form.$put(this.field, this.multiple ? [] : null); + const t = Object.values(e.target.files); + this.addFiles(t); + } + } +}, Lf = { ref: "file" }; +function Rf(e, t, r, n, i, s) { + return vueExports.openBlock(), vueExports.createElementBlock("div", Lf, [ + vueExports.renderSlot(e.$slots, "default", { + handleFileInput: s.handleFileInput, + filenames: i.filenames + }) + ], 512); +} +const Bf = /* @__PURE__ */ _e(kf, [["render", Rf]]), jf = { + inject: ["stack"], + computed: { + values() { + return p.flashData(this.stack); + } + }, + render() { + const e = this; + return this.$slots.default({ + has(t) { + return W(e.values, t); + }, + ...this.values + }); + } +}; +function pn(e, t, r) { + e = e || {}, t = t || new FormData(), r = r || null; + for (const n in e) + Object.prototype.hasOwnProperty.call(e, n) && vs(t, ms(r, n), e[n]); + return t; +} +function ms(e, t) { + return e ? e + "[" + t + "]" : t; +} +function vs(e, t, r) { + if (Array.isArray(r)) + return Array.from(r.keys()).forEach((n) => vs(e, ms(t, n.toString()), r[n])); + if (r instanceof Date) + return e.append(t, r.toISOString()); + if (r instanceof File) + return e.append(t, r, r.name); + if (r instanceof Blob) + return e.append(t, r); + if (typeof r == "boolean") + return e.append(t, r ? "1" : "0"); + if (typeof r == "string") + return e.append(t, r); + if (typeof r == "number") + return e.append(t, `${r}`); + if (r == null) + return e.append(t, ""); + pn(r, e, t); +} +var Mf = "[object Boolean]"; +function gs(e) { + return e === true || e === false || Le(e) && Be(e) == Mf; +} +function ys(e, t) { + var r = {}; + return t = _t(t), jr(e, function(n, i, s) { + ts(r, i, t(n, i, s)); + }), r; +} +function bs(e, t, r) { + return e === e && (r !== void 0 && (e = e <= r ? e : r), t !== void 0 && (e = e >= t ? e : t)), e; +} +function et(e, t, r) { + return e = Qr(e), r = r == null ? 0 : bs(dn(r), 0, e.length), t = Qt(t), e.slice(r, r + t.length) == t; +} +const Df = { + inject: ["stack"], + props: { + spladeId: { + type: String, + required: true, + default: "" + }, + action: { + type: String, + required: false, + default() { + return p.isSsr ? "" : location.href; + } + }, + method: { + type: String, + required: false, + default: "POST" + }, + default: { + type: Object, + required: false, + default: () => ({}) + }, + confirmDanger: { + type: [Boolean, String], + required: false, + default: false + }, + confirm: { + type: [Boolean, String], + required: false, + default: (e) => e.confirmDanger + }, + confirmText: { + type: String, + required: false, + default: "" + }, + confirmButton: { + type: String, + required: false, + default: "" + }, + cancelButton: { + type: String, + required: false, + default: "" + }, + requirePasswordOnce: { + type: Boolean, + required: false, + default: false + }, + requirePassword: { + type: [Boolean, String], + required: false, + default: (e) => e.requirePasswordOnce + }, + background: { + type: Boolean, + required: false, + default: false + }, + stay: { + type: Boolean, + require: false, + default: false + }, + restoreOnSuccess: { + type: Boolean, + required: false, + default: false + }, + resetOnSuccess: { + type: Boolean, + required: false, + default: false + }, + scrollOnError: { + type: Boolean, + required: false, + default: true + }, + submitOnChange: { + type: [Boolean, Array], + required: false, + default: false + }, + escapeValidationMessages: { + type: Boolean, + required: false, + default: true + }, + keepModal: { + type: Boolean, + required: false, + default: false + }, + preserveScroll: { + type: Boolean, + required: false, + default: false + }, + debounce: { + type: Number, + required: false, + default: 0 + }, + acceptHeader: { + type: String, + required: false, + default: "application/json" + }, + headers: { + type: Object, + required: false, + default: () => ({}) + }, + blob: { + type: Boolean, + required: false, + default: false + } + }, + emits: ["success", "error", "reset", "restored"], + data() { + return { + isMounted: false, + missingAttributes: [], + values: Object.assign({}, { ...this.default }), + processing: false, + processingInBackground: false, + wasSuccessful: false, + recentlySuccessful: false, + recentlySuccessfulTimeoutId: null, + wasUnsuccessful: false, + recentlyUnsuccessful: false, + recentlyUnsuccessfulTimeoutId: null, + formElement: null, + elementsUploading: [], + fileponds: {}, + debounceFunction: null, + response: null + }; + }, + computed: { + $all() { + return this.values; + }, + $uploading() { + return this.elementsUploading.length > 0; + }, + /* + * Fetches the raw validation errors from the Splade + * instances based on the current stack. + */ + rawErrors() { + return p.validationErrors(this.stack); + }, + /* + * Flattens the raw errors. + */ + errors() { + return ys(this.rawErrors, (e) => e.join(` +`)); + } + }, + created() { + this.debounceFunction = er(() => { + this.request(this.background); + }, this.debounce); + }, + /* + * It loops through all missing attributes and tries to + * find a sensible default for that attribute. + */ + mounted() { + let e = document.querySelector(`form[data-splade-id="${this.spladeId}"]`); + e || (e = document), this.formElement = e, this.missingAttributes.forEach((r) => { + let n = ""; + const i = e.querySelector(`[name="${r}"]`); + i ? n = i.type === "checkbox" ? false : "" : e.querySelector(`[name="${r}[]"]`) ? n = [] : (e.querySelector(`[name^="${r}."]`) || e.querySelector(`[name^="${r}["]`)) && (n = {}), this.$put(r, n); + }), this.missingAttributes = [], this.submitOnChange === true ? this.$watch("values", () => { + this.background && (this.processingInBackground = true), this.$nextTick(() => this.debounce ? this.debounceFunction() : this.request(this.background)); + }, { deep: true }) : M(this.submitOnChange) && this.submitOnChange.forEach((r) => { + this.$watch(`values.${r}`, () => { + this.background && (this.processingInBackground = true), this.$nextTick(() => this.debounce ? this.debounceFunction() : this.request(this.background)); + }, { deep: true }); + }), this.isMounted = true; + const t = this.formElement.querySelector("[autofocus]"); + t && this.focusAndScrollToElement(t); + }, + methods: { + $startUploading(e) { + this.elementsUploading.push(e[0]); + }, + $stopUploading(e) { + this.elementsUploading = this.elementsUploading.filter((t) => t != e[0]); + }, + hasError(e) { + return e in this.errors; + }, + $registerFilepond(e, t, r) { + this.fileponds[e] = { + addFile: t, + addFiles: r + }; + }, + $addFile(e, t) { + if (!this.fileponds[e]) + return console.log("Filepond instance not found"); + this.fileponds[e].addFile(t); + }, + $addFiles(e, t) { + if (!this.fileponds[e]) + return console.log("Filepond instance not found"); + this.fileponds[e].addFiles(t); + }, + $fileAsUrl(e) { + const t = this.values[e]; + if (!t) + return ""; + var r = URL.createObjectURL(t), n = new XMLHttpRequest(); + n.open("GET", r, false), n.overrideMimeType("text/plain; charset=x-user-defined"), n.send(), URL.revokeObjectURL(r); + for (var i = "", s = 0; s < n.responseText.length; s++) + i += String.fromCharCode(n.responseText.charCodeAt(s) & 255); + return "data:" + t.type + ";base64," + btoa(i); + }, + $errorAttributes(e) { + return { + [this.escapeValidationMessages ? "textContent" : "innerHTML"]: this.errors[e] + }; + }, + reset() { + this.values = {}, this.$emit("reset"); + }, + restore() { + this.values = Object.assign({}, { ...this.default }), this.$emit("restored"); + }, + $put(e, t) { + return St(this.values, e, t); + }, + focusAndScrollToElement(e) { + let t = true; + if (e._flatpickr && (t = false), e.tagName === "SELECT" && e.getAttribute("data-choice") && (t = false), t) { + const r = new IntersectionObserver((n) => { + let [i] = n; + i.isIntersecting && (setTimeout(() => i.target.focus(), 150), r.disconnect()); + }); + r.observe(e); + } + e.scrollIntoView({ + behavior: "smooth", + block: "end", + inline: "nearest" + }); + }, + /* + * If a confirmation is needed, it first shows the + * confirmation dialog and waits for the promise + * before it performs the request. + */ + submit(e) { + if (this.$uploading) { + console.log("Not submitting because there are still files uploading"); + return; + } + if (e) { + const t = e.submitter; + t && t.name && this.$put(t.name, t.value); + } + if (!this.confirm) + return this.request(); + p.confirm( + gs(this.confirm) ? "" : this.confirm, + this.confirmText, + this.confirmButton, + this.cancelButton, + !!this.requirePassword, + this.requirePasswordOnce, + !!this.confirmDanger + ).then((t) => { + if (!this.requirePassword) { + this.request(); + return; + } + this.method.toUpperCase() !== "GET" && t && this.$put( + se(this.requirePassword) && this.requirePassword ? this.requirePassword : "password", + t + ), this.request(); + }).catch(() => { + }); + }, + /* + * Maps the values into a FormData instance and then + * performs an async request. + */ + async request(e) { + if (typeof e > "u" && (e = false), this.$uploading) { + console.log("Not submitting because there are still files uploading"); + return; + } + await this.$nextTick(), this.background ? this.processingInBackground = true : this.processing = true, this.response = null, this.wasSuccessful = false, this.recentlySuccessful = false, clearTimeout(this.recentlySuccessfulTimeoutId), this.wasUnsuccessful = false, this.recentlyUnsuccessful = false, clearTimeout(this.recentlyUnsuccessfulTimeoutId); + const t = this.values instanceof FormData ? this.values : pn(this.values), r = {}; + this.acceptHeader && (r.Accept = this.acceptHeader), (this.stay || e) && (r["X-Splade-Prevent-Refresh"] = true), this.preserveScroll && (r["X-Splade-Preserve-Scroll"] = true), this.stack > 0 && this.keepModal && (r["X-Splade-Modal"] = p.stackType(this.stack), r["X-Splade-Modal-Target"] = this.stack); + let n = this.method.toUpperCase(); + n !== "GET" && n !== "POST" && (t.append("_method", n), n = "POST"); + const i = (s) => { + this.$emit("success", s), this.restoreOnSuccess && this.restore(), this.resetOnSuccess && this.reset(), this.processing = false, this.processingInBackground = false, this.wasSuccessful = true, this.recentlySuccessful = true, this.recentlySuccessfulTimeoutId = setTimeout(() => this.recentlySuccessful = false, 2e3), this.response = s.data; + }; + if (this.action === "#") + return i(Object.fromEntries(t)); + p.request(this.action, n, t, { ...r, ...this.headers }, false, this.blob).then(i).catch(async (s) => { + if (this.processing = false, this.processingInBackground = false, this.wasUnsuccessful = true, this.recentlyUnsuccessful = true, this.recentlyUnsuccessfulTimeoutId = setTimeout(() => this.recentlyUnsuccessful = false, 2e3), this.$emit("error", s), !this.scrollOnError) + return; + await this.$nextTick(); + const a = fn(Object.keys(this.errors), (o) => this.formElement.querySelector(`[data-validation-key="${o}"]`)); + a && this.focusAndScrollToElement( + this.formElement.querySelector(`[data-validation-key="${a}"]`) + ); + }); + } + }, + render() { + const e = this; + return this.$slots.default( + new Proxy( + {}, + { + ownKeys() { + return Object.keys(e.values); + }, + get(t, r) { + const n = [ + "$all", + "$attrs", + "$put", + "$startUploading", + "$stopUploading", + "$uploading", + "$errorAttributes", + "$registerFilepond", + "$addFile", + "$addFiles", + "$fileAsUrl", + "$response", + "errors", + "restore", + "reset", + "hasError", + "processing", + "processingInBackground", + "rawErrors", + "submit", + "wasSuccessful", + "recentlySuccessful", + "wasUnsuccessful", + "recentlyUnsuccessful" + ]; + return r === "$response" ? e.response : n.includes(r) || et(r, "__v_") ? e[r] : (!e.isMounted && !W(e.values, r) && (e.missingAttributes.push(r), e.$put(r, "")), be(e.values, r)); + }, + set(t, r, n) { + return e.$put(r, n); + } + } + ) + ); + } +}, Nf = { + props: { + flatpickr: { + type: [Boolean, Object], + required: false, + default: false + }, + jsFlatpickrOptions: { + type: Object, + required: false, + default: () => ({}) + }, + modelValue: { + type: [String, Number], + required: false + } + }, + emits: ["update:modelValue"], + data() { + return { + disabled: false, + element: null, + flatpickrInstance: null, + observer: null + }; + }, + watch: { + modelValue(e) { + this.flatpickrInstance && this.flatpickrInstance.setDate(e); + } + }, + mounted() { + this.element = this.$refs.input.querySelector("input"), this.flatpickr && this.initFlatpickr(this.element), this.disabled = this.element.disabled; + const e = this; + this.observer = new MutationObserver(function(t) { + t.forEach(function(r) { + r.attributeName === "disabled" && (e.disabled = r.target.disabled); + }); + }), this.observer.observe(this.element, { attributes: true }); + }, + /* + * Destroy the observer and Flatpickr instance to prevent memory leaks. + */ + beforeUnmount() { + this.observer.disconnect(), this.flatpickrInstance && this.flatpickrInstance.destroy(); + }, + methods: { + initFlatpickr(e) { + import("flatpickr").then((t) => { + this.flatpickrInstance = t.default( + e, + Object.assign({}, this.flatpickr, this.jsFlatpickrOptions, { + onChange: (r, n) => { + this.flatpickrInstance.config.mode === "range" && this.flatpickrInstance.selectedDates.length < 2 || n != this.modelValue && this.$emit("update:modelValue", n); + } + }) + ), this.modelValue && this.flatpickrInstance.setDate(this.modelValue); + }); + } + } +}, Vf = { ref: "input" }; +function Hf(e, t, r, n, i, s) { + return vueExports.openBlock(), vueExports.createElementBlock("div", Vf, [ + vueExports.renderSlot(e.$slots, "default", { disabled: i.disabled }) + ], 512); +} +const Uf = /* @__PURE__ */ _e(Nf, [["render", Hf]]), Wf = { + props: { + options: { + type: Object, + required: false, + default() { + return {}; + } + }, + jsOptions: { + type: Object, + required: false, + default: () => ({}) + }, + modelValue: { + type: [String, Number], + required: false + }, + dusk: { + type: String, + required: false, + default: null + } + }, + emits: ["update:modelValue"], + data() { + return { + instance: null + }; + }, + mounted() { + const e = this.$refs.jodit.querySelector("textarea"); + import("jodit").then((t) => { + const r = Object.assign({ defaultMode: t.default.Jodit.MODE_WYSIWYG }, this.options, this.jsOptions); + this.instance = t.default.Jodit.make(e, r), this.instance.value = this.modelValue, this.instance.events.on("change", (n) => this.$emit("update:modelValue", n)), this.dusk && this.instance.editor.setAttribute("dusk", this.dusk); + }); + }, + beforeUnmount() { + this.instance.destruct(); + } +}, zf = { ref: "jodit" }; +function Gf(e, t, r, n, i, s) { + return vueExports.openBlock(), vueExports.createElementBlock("div", zf, [ + vueExports.renderSlot(e.$slots, "default") + ], 512); +} +const Xf = /* @__PURE__ */ _e(Wf, [["render", Gf]]), Kf = { + components: { Render: ue }, + props: { + name: { + type: String, + required: true + }, + url: { + type: String, + required: false, + default() { + return p.isSsr ? "" : window.location.href; + } + }, + show: { + type: Boolean, + required: false, + default: true + }, + passthrough: { + type: Object, + required: false, + default() { + return {}; + } + } + }, + emits: ["loaded"], + data() { + return { + html: null + }; + }, + watch: { + show(e) { + e ? this.request() : this.html = null; + } + }, + mounted() { + this.show && this.request(); + }, + methods: { + async request() { + this.html = null, p.lazy(this.url, this.name).then((e) => { + this.html = e.data.html, this.$emit("loaded"); + }); + } + } +}; +function Jf(e, t, r, n, i, s) { + const a = vueExports.resolveComponent("Render"); + return i.html ? (vueExports.openBlock(), vueExports.createBlock(a, { + key: 0, + html: i.html, + passthrough: r.passthrough + }, null, 8, ["html", "passthrough"])) : r.show ? vueExports.renderSlot(e.$slots, "default", { key: 1 }) : vueExports.createCommentVNode("", true); +} +const Qf = /* @__PURE__ */ _e(Kf, [["render", Jf]]), Yf = ["href"], Zf = { + __name: "Link", + props: { + href: { + type: String, + required: false, + default: "#" + }, + method: { + type: String, + required: false, + default: "GET" + }, + data: { + type: Object, + required: false, + default: () => ({}) + }, + headers: { + type: Object, + required: false, + default: () => ({}) + }, + replace: { + type: Boolean, + required: false, + default: false + }, + confirmDanger: { + type: [Boolean, String], + required: false, + default: false + }, + confirm: { + type: [Boolean, String], + required: false, + default: (e) => e.confirmDanger + }, + confirmText: { + type: String, + required: false, + default: "" + }, + confirmButton: { + type: String, + required: false, + default: "" + }, + cancelButton: { + type: String, + required: false, + default: "" + }, + requirePasswordOnce: { + type: Boolean, + required: false, + default: false + }, + requirePassword: { + type: [Boolean, String], + required: false, + default: (e) => e.requirePasswordOnce + }, + modal: { + type: Boolean, + required: false, + default: false + }, + slideover: { + type: Boolean, + required: false, + default: false + }, + away: { + type: Boolean, + required: false, + default: false + }, + keepModal: { + type: Boolean, + required: false, + default: false + }, + preserveScroll: { + type: Boolean, + required: false, + default: false + } + }, + setup(e) { + const t = vueExports.inject("stack"), r = vueExports.ref(null), n = e; + function i() { + if (r.value = null, !n.confirm) + return s(); + p.confirm( + gs(n.confirm) ? "" : n.confirm, + n.confirmText, + n.confirmButton, + n.cancelButton, + !!n.requirePassword, + n.requirePasswordOnce, + !!n.confirmDanger + ).then((a) => { + if (!n.requirePassword) { + s(); + return; + } + a && (r.value = a), s(); + }).catch(() => { + }); + } + function s() { + if (n.away) + return window.location = n.href; + const o = t > 0 && n.keepModal; + if (n.modal && !o) + return p.modal(n.href); + if (n.slideover && !o) + return p.slideover(n.href); + if (et(n.href, "#")) { + if (p.openPreloadedModal(n.href.substring(1))) + return; + console.log("No preloaded modal found for " + n.href); + } + let l = n.method.trim().toUpperCase(); + const u = { + ...n.headers + }; + if (o && (u["X-Splade-Modal"] = p.stackType(t), u["X-Splade-Modal-Target"] = t), n.preserveScroll && (u["X-Splade-Preserve-Scroll"] = true), l === "GET") + return n.replace ? p.replace(n.href, u) : p.visit(n.href, u); + const c = n.data instanceof FormData ? n.data : pn(n.data); + l !== "POST" && (c.append("_method", l), l = "POST"), r.value && (c.append(se(n.requirePassword) && n.requirePassword ? n.requirePassword : "password", r.value), r.value = null), p.request(n.href, l, c, u, n.replace); + } + return (a, o) => (vueExports.openBlock(), vueExports.createElementBlock("a", { + href: e.href, + onClick: vueExports.withModifiers(i, ["exact", "prevent"]) + }, [ + vueExports.renderSlot(a.$slots, "default") + ], 8, Yf)); + } +}, ep = { + provide() { + return { + stack: this.stack + }; + }, + props: { + closeButton: { + type: Boolean, + required: false, + default: true + }, + type: { + type: String, + required: true + }, + stack: { + type: Number, + required: true + }, + onTopOfStack: { + type: Boolean, + required: false, + default: false + }, + maxWidth: { + type: String, + required: false, + default: (e) => e.type === "modal" ? "2xl" : "md" + }, + position: { + type: String, + required: false, + default: (e) => e.type === "modal" ? "center" : "right" + }, + name: { + type: String, + required: false, + default: null + }, + animate: { + type: Boolean, + required: false, + default: true + } + }, + emits: ["close"], + data() { + return { + staticAnimate: true, + isOpen: false + }; + }, + mounted() { + this.staticAnimate = this.animate, this.setIsOpen(true); + }, + methods: { + emitClose() { + this.$emit("close"); + }, + close() { + this.setIsOpen(false); + }, + setIsOpen(e) { + e || (this.staticAnimate = true), this.isOpen = e; + } + }, + render() { + return this.$slots.default({ + type: this.type, + isOpen: this.isOpen, + setIsOpen: this.setIsOpen, + close: this.close, + stack: this.stack, + onTopOfStack: this.onTopOfStack, + maxWidth: this.maxWidth, + emitClose: this.emitClose, + closeButton: this.closeButton, + animate: this.staticAnimate, + position: this.position, + // These HeadlessUI exports will be removed in v1.0 + Dialog: en, + DialogPanel: tn, + TransitionRoot: ut, + TransitionChild: lt + }); + } +}, tp = { + __name: "PreloadedModal", + props: { + name: { + type: String, + required: true + }, + html: { + type: String, + required: true + }, + type: { + type: String, + required: false, + default: "modal" + }, + opened: { + type: Boolean, + required: false, + default: false + } + }, + setup(e) { + const t = e; + return p.registerPreloadedModal(t.name, t.html, t.type), t.opened && p.openPreloadedModal(t.name), () => { + }; + } +}, rp = { + components: { Render: ue }, + props: { + name: { + type: String, + required: true + }, + on: { + type: Array, + required: true + }, + url: { + type: String, + required: false, + default() { + return p.isSsr ? "" : window.location.href; + } + }, + poll: { + type: Number, + required: false, + default: null + }, + passthrough: { + type: Object, + required: false, + default() { + return {}; + } + } + }, + emits: ["loaded"], + data() { + return { + html: null, + loading: false + }; + }, + mounted() { + this.on.forEach((e) => { + this.$splade.on(e, this.request); + }), this.poll && setTimeout(() => { + this.request(); + }, this.poll); + }, + methods: { + async request() { + this.loading = true, p.rehydrate(this.url, this.name).then((e) => { + this.html = e.data.html, this.loading = false, this.$emit("loaded"), this.poll && setTimeout(() => { + this.request(); + }, this.poll); + }); + } + } +}; +function np(e, t, r, n, i, s) { + const a = vueExports.resolveComponent("Render"); + return i.html ? (vueExports.openBlock(), vueExports.createBlock(a, { + key: 0, + html: i.html, + passthrough: r.passthrough + }, null, 8, ["html", "passthrough"])) : i.loading ? vueExports.renderSlot(e.$slots, "placeholder", { key: 1 }) : vueExports.renderSlot(e.$slots, "default", { key: 2 }); +} +const ip = /* @__PURE__ */ _e(rp, [["render", np]]), sp = { + props: { + script: { + type: String, + required: true + } + }, + mounted() { + var e = new Function("obj", "with (obj) { " + this.script + "}"); + e = e.bind(this, this), e(this.script); + }, + render() { + return ""; + } +}; +function ap(e, t) { + var r = -1, n = Ut(e) ? Array(e.length) : []; + return Mr(e, function(i, s, a) { + n[++r] = t(i, s, a); + }), n; +} +function ws(e, t) { + var r = M(e) ? Fi : ap; + return r(e, _t(t)); +} +const op = { + inject: ["stack"], + props: { + choices: { + type: [Boolean, Object], + required: false, + default: false + }, + jsChoicesOptions: { + type: Object, + required: false, + default: () => ({}) + }, + multiple: { + type: Boolean, + required: false, + default: false + }, + modelValue: { + type: [String, Number, Array], + required: false + }, + placeholder: { + type: [Boolean, Object], + required: false, + default: false + }, + dusk: { + type: String, + required: false, + default: null + }, + remoteUrl: { + type: String, + required: false, + default: null + }, + optionValue: { + type: String, + required: false, + default: null + }, + optionLabel: { + type: String, + required: false, + default: null + }, + remoteRoot: { + type: String, + required: false, + default: null + }, + selectFirstRemoteOption: { + type: Boolean, + required: false, + default: false + }, + resetOnNewRemoteUrl: { + type: Boolean, + required: false, + default: false + } + }, + emits: ["update:modelValue"], + data() { + return { + choicesInstance: null, + element: null, + placeholderText: null, + headlessListener: null, + selectChangeListener: null, + selectShowDropdownListener: null, + loading: false + }; + }, + computed: { + /* + * Returns a boolean whether a selection has been made. + */ + hasSelection() { + return this.multiple ? Array.isArray(this.modelValue) ? this.modelValue.length > 0 : false : !(this.modelValue === null || this.modelValue === "" || this.modelValue === void 0); + } + }, + watch: { + /* + * When the model value changes, and it's a new + * section, apply it to the Choices instance. + */ + modelValue(e, t) { + if (!this.choicesInstance && this.multiple && M(e)) { + const r = e.filter((n) => n !== "" && n !== null && n !== void 0); + if (JSON.stringify(r) != JSON.stringify(e)) { + this.$emit("update:modelValue", r); + return; + } + } + if (this.choicesInstance) { + if (JSON.stringify(e) == JSON.stringify(t)) + return; + this.setValueOnChoices(e); + } + }, + remoteUrl: { + handler() { + this.loadRemoteOptions(); + } + } + }, + mounted() { + if (this.element = this.$refs.select.querySelector("select"), this.choices) + return this.initChoices(this.element).then(() => { + this.loadRemoteOptions(); + }); + this.stack > 0 && this.element.addEventListener("change", () => { + this.element.blur(); + }), this.loadRemoteOptions(); + }, + /* + * Destroy the Choices.js instance to prevent memory leaks. + */ + beforeUnmount() { + this.destroyChoicesInstance(); + }, + methods: { + async setOptionsFromRemote(e) { + this.destroyChoicesInstance(); + let t = []; + this.placeholder && t.push(this.placeholder), t = this.normalizeOptions(e, t); + var r, n = this.element.options.length - 1; + for (r = n; r >= 0; r--) + this.element.remove(r); + let i = false; + if (te(t, (s) => { + var a = document.createElement("option"); + a.value = s.value, a.text = s.label, s.value === `${this.modelValue}` && s.value !== "" && (i = true), s.disabled && (a.disabled = s.disabled), s.placeholder && (a.placeholder = s.placeholder), this.element.appendChild(a); + }), this.resetOnNewRemoteUrl && (i = false), !i && this.selectFirstRemoteOption) { + const s = this.placeholder ? t[1] : t[0]; + s && (this.$emit("update:modelValue", this.multiple ? [s.value] : s.value), await this.$nextTick(), i = true); + } + if (i || this.$emit("update:modelValue", this.multiple ? [] : ""), this.choices) + return this.initChoices(this.element).then(() => { + this.loading = false; + }); + i ? this.element.value = this.modelValue : this.$nextTick(() => { + this.element.selectedIndex = 0; + }); + }, + /* + * Loads the options from a remote URL. It removes all current options from the select + * element, and then adds the new options. If the components uses Choices.js, + * it will first destroy the instance and then re-initialize it. + */ + loadRemoteOptions() { + this.remoteUrl && (this.loading = true, ne({ + url: this.remoteUrl, + method: "GET", + headers: { + Accept: "application/json" + } + }).then((e) => { + this.setOptionsFromRemote(this.remoteRoot ? be(e.data, this.remoteRoot) : e.data); + }).catch(() => { + this.setOptionsFromRemote([]); + }).finally(() => { + this.loading = false; + })); + }, + /** + * Removes the event listeners and then destroys the Choices.js instance. + */ + destroyChoicesInstance() { + var e; + this.choices && this.choicesInstance && (this.headlessListener && ((e = document.querySelector("#headlessui-portal-root")) == null || e.removeEventListener("click", this.headlessListener, { capture: true }), this.headlessListener = null), this.selectChangeListener && this.element.removeEventListener("change", this.selectChangeListener), this.selectShowDropdownListener && this.element.removeEventListener("showDropdown", this.selectShowDropdownListener), this.choicesInstance.destroy(), this.choicesInstance = null); + }, + /** + * Transforms the options from the remote URL into an array of objects. + */ + normalizeOptions(e, t) { + const r = M(e); + if (!r && J(e)) + if (this.optionValue && this.optionLabel) { + let n = be(e, this.optionValue); + se(n) || (n = `${n}`), t.push({ + value: n, + label: be(e, this.optionLabel) + }); + } else + te(e, (n, i) => { + se(i) || (i = `${i}`), t.push({ label: n, value: i }); + }); + else + r && e.forEach((n) => { + this.normalizeOptions(n, t); + }); + return t; + }, + /* + * Set the given value on the Choices.js instance. + */ + setValueOnChoices(e) { + Array.isArray(e) && (e = ws(e, (t) => `${t}`), this.choicesInstance.removeActiveItems()), e == null ? e = "" : Array.isArray(e) || (e = `${e}`), this.choicesInstance.setChoiceByValue(e), this.updateHasSelectionAttribute(), this.handlePlaceholderVisibility(); + }, + /* + * Returns the internal Choices.js item that is currently selected. + */ + getItemOfCurrentModel() { + const e = this.modelValue; + return fn(this.choicesInstance._store.choices, (t) => t.value == e); + }, + /* + * This method handles the visibility of the placeholder + * and applies some additional minor styling. + */ + handlePlaceholderVisibility() { + if (!this.multiple) + return; + const e = this.choicesInstance.containerInner.element.querySelector( + "input.choices__input" + ); + this.placeholderText = e.placeholder ? e.placeholder : this.placeholderText; + const t = this.choicesInstance.getValue().length; + e.placeholder = t ? "" : this.placeholderText ? this.placeholderText : "", e.style.minWidth = "0", e.style.width = t ? "1px" : "auto", e.style.paddingTop = t ? "0px" : "1px", e.style.paddingBottom = t ? "0px" : "1px"; + }, + /* + * Instantiate Choices.js with the combined PHP and JS options. + */ + initChoices(e) { + return new Promise((t) => { + const r = Array.from( + e.querySelectorAll("option:not([placeholder])") + ).length, n = this; + import("choices.js").then((i) => { + const s = Object.assign({}, this.choices, this.jsChoicesOptions, { + callbackOnInit: function() { + const a = this; + n.stack > 0 && (n.headlessListener = function(o) { + if (!n.choicesInstance) + return; + const l = n.choicesInstance.dropdown.isActive, u = n.choicesInstance.containerOuter.element.contains(o.target); + !l && u ? n.choicesInstance.showDropdown() : l && !u && n.choicesInstance.hideDropdown(); + }, document.querySelector("#headlessui-portal-root").addEventListener("click", n.headlessListener, { capture: true })), a.containerInner.element.setAttribute( + "data-select-name", + e.name + ), e.hasAttribute("dusk") && e.removeAttribute("dusk"), n.dusk && (a.containerInner.element.setAttribute("dusk", n.dusk), a.choiceList.element.setAttribute("dusk", `${n.dusk}-listbox`)), n.selectChangeListener = function() { + let o = a.getValue(true); + if (o == null && (o = ""), n.$emit("update:modelValue", o), !n.multiple || r < 1) + return; + a.getValue().length >= r && a.hideDropdown(); + }, e.addEventListener("change", n.selectChangeListener), a.containerInner.element.addEventListener("hideDropdownFromDusk", function() { + a.hideDropdown(); + }), n.selectShowDropdownListener = function() { + if (n.multiple || !n.modelValue) + return; + const o = n.getItemOfCurrentModel(), l = a.dropdown.element.querySelector( + `.choices__item[data-id="${o.id}"]` + ); + a.choiceList.scrollToChildElement(l, 1), a._highlightChoice(l); + }, e.addEventListener("showDropdown", n.selectShowDropdownListener), n.choicesInstance = a, n.setValueOnChoices(n.modelValue), t(); + } + }); + new i.default(e, s); + }); + }); + }, + /* + * Update the 'data-has-selection' attribute based on the current selection. + */ + updateHasSelectionAttribute() { + this.choicesInstance.containerInner.element.setAttribute( + "data-has-selection", + this.hasSelection + ); + } + } +}, lp = { ref: "select" }; +function up(e, t, r, n, i, s) { + return vueExports.openBlock(), vueExports.createElementBlock("div", lp, [ + vueExports.renderSlot(e.$slots, "default", { loading: i.loading }) + ], 512); +} +const cp = /* @__PURE__ */ _e(op, [["render", up]]), dp = { + inject: ["stack"], + render() { + const e = p.validationErrors(this.stack), t = p.flashData(this.stack), r = p.sharedData.value, n = ys(e, (i) => i.join(` +`)); + return this.$slots.default({ + flash: t, + errors: n, + rawErrors: e, + shared: r, + hasError(i) { + return i in e; + }, + hasFlash(i) { + return W(t, i); + }, + hasShared(i) { + return W(r, i); + }, + hasErrors: Object.keys(e).length > 0 + }); + } +}; +function fp(e, t, r) { + e = Qr(e), t = Qt(t); + var n = e.length; + r = r === void 0 ? n : bs(dn(r), 0, n); + var i = r; + return r -= t.length, r >= 0 && e.slice(r, i) == t; +} +function pp(e, t) { + var r = []; + return Mr(e, function(n, i, s) { + t(n, i, s) && r.push(n); + }), r; +} +function hp(e, t) { + var r = M(e) ? fs : pp; + return r(e, _t(t)); +} +function ii(e, t) { + return ir(e, t); +} +const mp = { + inject: ["stack"], + props: { + spladeId: { + type: String, + required: true + }, + baseUrl: { + type: String, + required: false, + default() { + return window.location.pathname; + } + }, + striped: { + type: Boolean, + required: false, + default: false + }, + columns: { + type: Object, + required: true + }, + defaultVisibleToggleableColumns: { + type: Array, + required: true + }, + searchDebounce: { + type: Number, + required: false, + default: 350 + }, + itemsOnThisPage: { + type: Number, + required: false, + default: 0 + }, + itemsOnAllPages: { + type: Number, + required: false, + default: 0 + }, + paginationScroll: { + type: String, + required: false, + default: "top" + } + }, + data() { + return { + selectedItems: [], + visibleColumns: [], + forcedVisibleSearchInputs: [], + debounceUpdateQuery: null, + isLoading: false, + processingAction: false + }; + }, + computed: { + /** + * Returns a boolean whether the currently toggled columns + * differ from the default set of visible columns. + */ + columnsAreToggled() { + return !ii(this.visibleColumns, this.defaultVisibleToggleableColumns); + }, + /* + * Returns a boolean whether there are Search Inputs visible + * that are not (yet) in the query string. + */ + hasForcedVisibleSearchInputs() { + return this.forcedVisibleSearchInputs.length > 0; + }, + allItemsFromAllPagesAreSelected() { + return this.selectedItems.length === 1 && this.selectedItems[0] === "*"; + }, + allVisibleItemsAreSelected() { + const e = this.selectedItems.length; + return e === 1 && this.selectedItems[0] === "*" || e > 0 && e === this.itemsOnThisPage; + }, + hasSelectedItems() { + return this.selectedItems.length > 0; + }, + totalSelectedItems() { + const e = this.selectedItems.length; + return e === 1 && this.selectedItems[0] === "*" ? this.itemsOnAllPages : e; + }, + scrollToHeadRememberKey() { + return `spladeTableScrollToHead-${this.spladeId}`; + } + }, + created() { + this.debounceUpdateQuery = er(function(e, t, r) { + this.updateQuery(e, t, r); + }, this.searchDebounce); + }, + mounted() { + const e = this.getCurrentQuery(), t = e.columns || []; + te(e, (r, n) => { + if (et(n, "filter[") && !r) { + const i = n.split("["), s = i[1].substring(0, i[1].length - 1); + this.forcedVisibleSearchInputs = [...this.forcedVisibleSearchInputs, s]; + } + }), t.length === 0 ? this.visibleColumns = this.defaultVisibleToggleableColumns : this.visibleColumns = t, p.restore(this.scrollToHeadRememberKey) && this.$nextTick(() => { + document.querySelector(`div[data-splade-id="${this.spladeId}"]`).scrollIntoView({ + behavior: "smooth", + block: "start", + inline: "nearest" + }); + }), p.forget(this.scrollToHeadRememberKey); + }, + methods: { + navigate(e, t) { + const r = { + "X-Splade-Modal": p.stackType(this.stack), + "X-Splade-Modal-Target": this.stack, + "X-Splade-Prevent-View-Transition": true + }; + (this.paginationScroll !== "top" || !t) && (r["X-Splade-Preserve-Scroll"] = true), p.request(e, "GET", {}, r, false).then(() => { + !p.isSsr && this.paginationScroll === "head" && t && p.remember(this.scrollToHeadRememberKey, true); + }); + }, + visitLink(e, t, r) { + var n, i; + if (!(((n = r == null ? void 0 : r.target) == null ? void 0 : n.tagName) === "A" || ((i = r == null ? void 0 : r.target) == null ? void 0 : i.tagName) === "BUTTON")) + return t === "modal" ? p.modal(e) : t === "slideover" ? p.slideover(e) : p.visit(e); + }, + /** + * Resets the table to its initial state. + */ + reset() { + this.forcedVisibleSearchInputs = [], this.visibleColumns = this.defaultVisibleToggleableColumns; + let e = this.getCurrentQuery(); + e.columns = [], e.page = null, e.perPage = null, e.sort = null, te(e, (t, r) => { + et(r, "filter[") && (e[r] = null); + }), this.visitWithQueryObject(e, null, true); + }, + /* + * Returns a boolean whether the given key is visible. + */ + columnIsVisible(e) { + return this.visibleColumns.includes(e); + }, + /* + * Toggles the column key. + */ + toggleColumn(e) { + const t = !this.columnIsVisible(e), r = hp(this.columns, (i) => i.can_be_hidden ? i.key === e ? t : this.visibleColumns.includes(i.key) : true); + let n = ws(r, (i) => i.key).sort(); + ii(n, this.defaultVisibleToggleableColumns) && (n = []), this.visibleColumns = n.length === 0 ? this.defaultVisibleToggleableColumns : n, this.updateQuery("columns", n, null, false); + }, + /** + * Removes the key from being forcefully visible, and sets the value to null. + */ + disableSearchInput(e) { + this.forcedVisibleSearchInputs = this.forcedVisibleSearchInputs.filter((t) => t != e), this.updateQuery(`filter[${e}]`, null); + }, + /* + * Forces the given Search Input key to be visible, and focuses the input element. + */ + showSearchInput(e) { + this.forcedVisibleSearchInputs = [...this.forcedVisibleSearchInputs, e], vueExports.nextTick(() => { + document.querySelector(`[name="searchInput-${e}"]`).focus(); + }); + }, + /* + * Returns a boolean whether the key should be visible. + */ + isForcedVisible(e) { + return this.forcedVisibleSearchInputs.includes(e); + }, + /* + * Parses the window's current query as an object. + */ + getCurrentQuery() { + const e = window.location.search; + if (!e) + return {}; + let t = {}; + return e.substring(1).split("&").forEach((r) => { + const n = decodeURIComponent(r).split("="); + let i = n[0]; + if (!fp(i, "]")) { + t[i] = n[1]; + return; + } + const s = i.split("["), a = s[1].substring(0, s[1].length - 1); + parseInt(a) == a ? (i = s[0], M(t[i]) || (t[i] = []), t[i].push(n[1])) : t[i] = n[1]; + }), t; + }, + /* + * Update the current query + */ + updateQuery(e, t, r, n) { + typeof n > "u" && (n = true); + let i = this.getCurrentQuery(); + i[e] = t, (et(e, "perPage") || et(e, "filter[")) && delete i.page, this.visitWithQueryObject(i, r, n); + }, + visitWithQueryObject(e, t, r) { + var l; + typeof r > "u" && (r = true); + let n = {}; + te(e, (u, c) => { + if (!M(u)) { + n[c] = u; + return; + } + u.length !== 0 && u.forEach((v, g) => { + n[`${c}[${g}]`] = v; + }); + }); + let i = ""; + te(n, (u, c) => { + u === null || u === [] || (i && (i += "&"), i += `${c}=${u}`); + }), i && (i = "?" + i); + const s = this.baseUrl + i; + if (!r) + return this.stack > 0 ? void 0 : p.replaceUrlOfCurrentPage(s); + this.isLoading = true; + let a = null; + typeof t < "u" && t && (a = (l = document.querySelector(`[name="${t.name}"]`)) == null ? void 0 : l.value); + const o = this.stack > 0 ? { + "X-Splade-Modal": p.stackType(this.stack), + "X-Splade-Modal-Target": this.stack + } : {}; + p.replace(s, o).then(() => { + this.isLoading = false, typeof t < "u" && t && vueExports.nextTick(() => { + const u = document.querySelector(`[name="${t.name}"]`); + u.focus(), a && (u.value = a); + }); + }); + }, + async performBulkAction(e, t, r, n, i, s) { + typeof s > "u" && (s = false); + let a = null; + if (t) + try { + a = await p.confirm(t === true ? "" : t, r, n, i, !!s); + } catch { + return false; + } + this.isLoading = true; + const o = { ids: this.selectedItems }; + if (s) { + const l = se(s) && s ? s : "password"; + o[l] = a; + } + p.request(e, "POST", o, {}, false).then((l) => { + l.data; + }).catch(() => { + this.isLoading = false; + }); + }, + setSelectedItems(e) { + this.selectedItems = M(e) ? e : []; + }, + itemIsSelected(e) { + return this.selectedItems.length == 1 && this.selectedItems[0] == "*" ? true : this.selectedItems.includes(e); + }, + setSelectedItem(e, t) { + t ? this.selectedItems.push(e) : this.selectedItems = this.selectedItems.filter((r) => r !== e); + } + }, + render() { + return this.$slots.default({ + columnIsVisible: this.columnIsVisible, + columnsAreToggled: this.columnsAreToggled, + debounceUpdateQuery: this.debounceUpdateQuery, + disableSearchInput: this.disableSearchInput, + hasForcedVisibleSearchInputs: this.hasForcedVisibleSearchInputs, + isForcedVisible: this.isForcedVisible, + reset: this.reset, + showSearchInput: this.showSearchInput, + striped: this.striped, + toggleColumn: this.toggleColumn, + updateQuery: this.updateQuery, + navigate: this.navigate, + visit: this.visitLink, + totalSelectedItems: this.totalSelectedItems, + allItemsFromAllPagesAreSelected: this.allItemsFromAllPagesAreSelected, + allVisibleItemsAreSelected: this.allVisibleItemsAreSelected, + hasSelectedItems: this.hasSelectedItems, + setSelectedItems: this.setSelectedItems, + itemIsSelected: this.itemIsSelected, + setSelectedItem: this.setSelectedItem, + performBulkAction: this.performBulkAction, + processingAction: this.processingAction, + isLoading: this.isLoading + }); + } +}, vp = { + inheritAttrs: false, + data() { + return { + isMounted: false, + Teleport: vueExports.Teleport + }; + }, + /* + * Only render the Teleport component after this component is mounted. + * Otherwise, the target won't be available in the DOM yet. + */ + mounted() { + this.isMounted = true; + } +}; +function gp(e, t, r, n, i, s) { + return vueExports.withDirectives((vueExports.openBlock(), vueExports.createBlock(vueExports.resolveDynamicComponent(i.isMounted ? i.Teleport : "div"), vueExports.normalizeProps(vueExports.guardReactiveProps(e.$attrs)), { + default: vueExports.withCtx(() => [ + vueExports.renderSlot(e.$slots, "default") + ]), + _: 3 + }, 16)), [ + [vueExports.vShow, i.isMounted] + ]); +} +const yp = /* @__PURE__ */ _e(vp, [["render", gp]]), bp = { + props: { + autosize: { + type: Boolean, + required: false, + default: false + }, + modelValue: { + type: [String, Number], + required: false + } + }, + data() { + return { + autosizeInstance: null, + element: null + }; + }, + watch: { + modelValue() { + !this.autosize || !this.autosizeInstance || import("autosize").then((e) => { + vueExports.nextTick(() => e.default.update(this.element)); + }); + } + }, + mounted() { + this.element = this.$refs.textarea.querySelector("textarea"), this.autosize && import("autosize").then((e) => { + this.autosizeInstance = e.default(this.element); + }); + }, + /* + * Destroy the Autsize instance to prevent memory leaks. + */ + beforeUnmount() { + this.autosize && this.autosizeInstance && import("autosize").then((e) => { + e.default.destroy(this.element); + }); + } +}, wp = { ref: "textarea" }; +function Sp(e, t, r, n, i, s) { + return vueExports.openBlock(), vueExports.createElementBlock("div", wp, [ + vueExports.renderSlot(e.$slots, "default") + ], 512); +} +const Op = /* @__PURE__ */ _e(bp, [["render", Sp]]), $p = { + props: { + toastKey: { + type: Number, + required: true + }, + autoDismiss: { + type: Number, + required: false, + default: 0 + } + }, + emits: ["dismiss"], + data() { + return { + show: true + }; + }, + mounted() { + this.autoDismiss && setTimeout(() => { + this.setShow(false); + }, this.autoDismiss * 1e3); + }, + methods: { + setShow(e) { + this.show = e; + }, + emitDismiss() { + this.$emit("dismiss"); + } + }, + render() { + return this.$slots.default({ + key: this.toastKey, + show: this.show, + setShow: this.setShow, + emitDismiss: this.emitDismiss, + // These HeadlessUI exports will be removed in v1.0 + TransitionRoot: ut, + TransitionChild: lt + }); + } +}, Ep = [ + "left-top", + "center-top", + "right-top", + "left-center", + "center-center", + "right-center", + "left-bottom", + "center-bottom", + "right-bottom" +], Tp = { + computed: { + /* + * Retrieves the toasts from the Splade instance. + */ + toasts: function() { + return p.toastsReversed.value; + }, + /* + * Determine whether a backdrop should be shown. + */ + hasBackdrop: function() { + return p.toasts.value.filter((e) => !e.dismissed && e.backdrop && e.html).length > 0; + } + }, + methods: { + dismissToast(e) { + p.dismissToast(e); + } + }, + render() { + return this.$slots.default({ + positions: Ep, + toasts: this.toasts, + dismissToast: this.dismissToast, + hasBackdrop: this.hasBackdrop, + Render: ue, + // These HeadlessUI exports will be removed in v1.0 + TransitionRoot: ut, + TransitionChild: lt + }); + } +}, xp = { + props: { + default: { + type: Object, + required: true + } + }, + data() { + return { + toggles: { ...this.default } + }; + }, + methods: { + toggled(e) { + return this.toggles[e] ?? false; + }, + toggle(e) { + this.setToggle(e, !this.toggled(e)); + }, + setToggle(e, t) { + this.toggles[e] = t; + } + }, + render() { + const e = this; + return this.$slots.default( + new Proxy( + {}, + { + ownKeys() { + return Object.keys(e.toggles); + }, + get(t, r) { + const n = Object.keys(e.toggles); + if (n.length === 1 && cs(n) === "default") { + if (r === "toggled") + return e.toggled("default"); + if (r === "setToggle") + return (i) => { + e.setToggle("default", i); + }; + if (r === "toggle") + return () => { + e.toggle("default"); + }; + } + return r === "setToggle" ? (i, s) => { + e.setToggle(i, s); + } : r === "toggle" ? (i) => { + e.toggle(i); + } : e.toggled(r); + } + } + ) + ); + } +}, _p = { + render() { + return this.$slots.default({ + TransitionRoot: ut, + TransitionChild: lt + }); + } +}, Ip = { + props: { + backendRoute: { + type: String, + required: true + }, + default: { + type: Object, + required: false, + default: () => ({}) + }, + initialInstance: { + type: String, + required: true + }, + initialSignature: { + type: String, + required: true + }, + methods: { + type: Array, + required: true + }, + originalUrl: { + type: String, + required: true + }, + verb: { + type: String, + required: true + } + }, + emits: ["success", "error"], + data() { + return { + instance: this.initialInstance, + signature: this.initialSignature, + values: Object.assign({}, this.default) + }; + }, + render() { + const e = this, t = { + props: new Proxy(this.values, { + ownKeys: function() { + return Object.keys(e.values); + }, + get: (r, n) => be(e.values, n), + set: (r, n, i) => { + St(e.values, n, i); + } + }) + }; + return this.methods.forEach((r) => { + t[r] = async (...n) => { + n.length === 1 && be(n, "0._vts") && (n = []); + let i = null; + try { + i = await ne.post(this.backendRoute, { + instance: this.instance, + signature: this.signature, + url: this.originalUrl, + verb: this.verb, + props: this.values, + method: r, + data: n + }, { headers: { + "X-Requested-With": "XMLHttpRequest", + Accept: "text/html, application/xhtml+xml" + } }), this.$emit("success", i.data); + } catch (s) { + this.$emit("error", s.response.data), p.onServerError(s.response.data); + return; + } + return this.instance = i.data.instance, this.signature = i.data.signature, te(i.data.data, (s, a) => { + St(this.values, a, s); + }), i.data.redirect ? p.visit(i.data.redirect) : (i.data.toasts.forEach((s) => { + p.pushToast(s); + }), i.data.result); + }; + }), this.$slots.default(t); + } +}, Ap = { + created: (e, t) => { + if (p.isSsr) + return; + const r = `preserveScroll-${t.arg}`, n = p.restore(r); + n && vueExports.nextTick(() => { + typeof e.scrollTo == "function" ? e.scrollTo(n.left, n.top) : (e.scrollTop = n.top, e.scrollLeft = n.left); + }); + const i = function() { + p.remember(r, { + top: e.scrollTop, + left: e.scrollLeft + }); + }; + e.addEventListener("scroll", er(i, 100)), i(); + } +}, Cr = { + /** + * Inject the default Progress Bar CSS into the HTML Head. + */ + injectCSS(e) { + const t = document.createElement("style"); + t.type = "text/css", t.textContent = ` + #nprogress { + pointer-events: none; + } + #nprogress .bar { + background: ${e}; + position: fixed; + z-index: 1031; + top: 0; + left: 0; + width: 100%; + height: 2px; + } + #nprogress .peg { + display: block; + position: absolute; + right: 0px; + width: 100px; + height: 100%; + box-shadow: 0 0 10px ${e}, 0 0 5px ${e}; + opacity: 1.0; + -webkit-transform: rotate(3deg) translate(0px, -4px); + -ms-transform: rotate(3deg) translate(0px, -4px); + transform: rotate(3deg) translate(0px, -4px); + } + #nprogress .spinner { + display: block; + position: fixed; + z-index: 1031; + top: 15px; + right: 15px; + } + #nprogress .spinner-icon { + width: 18px; + height: 18px; + box-sizing: border-box; + border: solid 2px transparent; + border-top-color: ${e}; + border-left-color: ${e}; + border-radius: 50%; + -webkit-animation: nprogress-spinner 400ms linear infinite; + animation: nprogress-spinner 400ms linear infinite; + } + .nprogress-custom-parent { + overflow: hidden; + position: relative; + } + .nprogress-custom-parent #nprogress .spinner, + .nprogress-custom-parent #nprogress .bar { + position: absolute; + } + @-webkit-keyframes nprogress-spinner { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); } + } + @keyframes nprogress-spinner { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } + } + `, document.head.appendChild(t); + }, + timeout: null, + /** + * Starts the progress bar with the configured timeout. + */ + start(e, t, r) { + Cr.timeout = setTimeout(() => r.start(), t); + }, + /** + * Updates the progress bar to the percentage from the event. + */ + progress(e, t) { + t.isStarted() && e.detail.progress.percentage && t.set(Math.max(t.status, e.detail.progress.percentage / 100 * 0.9)); + }, + /** + * Clears the timeout and hides the bar. + */ + stop(e, t) { + clearTimeout(Cr.timeout), t.done(), t.remove(); + }, + /** + * Initializes the progress bar and registers event listeners for Splade request events. + */ + init(e) { + const t = this; + import("nprogress").then((r) => { + let n = 0; + document.addEventListener("splade:internal:request", (s) => { + n++, n === 1 && t.start(s, e.delay, r.default); + }); + const i = (s) => { + n--, n === 0 ? t.stop(s, r.default) : n < 0 && (n = 0); + }; + document.addEventListener("splade:internal:request-progress", (s) => t.progress(s, r.default)), document.addEventListener("splade:internal:request-response", (s) => i(s)), document.addEventListener("splade:internal:request-error", (s) => i(s)), r.default.configure({ showSpinner: e.spinner }), e.css && this.injectCSS(e.color); + }); + } +}, Fp = { + /** + * Registers all Splade components and makes the configured + * options and the Splade core globally available. + */ + install: (e, t) => { + t = t || {}, t.max_keep_alive = W(t, "max_keep_alive") ? t.max_keep_alive : 10, t.prefix = W(t, "prefix") ? t.prefix : "Splade", t.transform_anchors = W(t, "transform_anchors") ? t.transform_anchors : false, t.link_component = W(t, "link_component") ? t.link_component : "Link", t.progress_bar = W(t, "progress_bar") ? t.progress_bar : false, t.components = W(t, "components") ? t.components : {}, t.view_transitions = W(t, "view_transitions") ? t.view_transitions : false, t.suppress_compile_errors = W(t, "suppress_compile_errors") ? t.suppress_compile_errors : false; + const r = t.prefix; + if (e.component(`${r}Button`, Ul).component(`${r}Confirm`, Bu).component(`${r}DataStores`, Uu).component(`${r}Data`, Hu).component(`${r}Defer`, nc).component(`${r}Dialog`, ic).component(`${r}Dropdown`, ud).component(`${r}DynamicHtml`, cd).component(`${r}Errors`, dd).component(`${r}Event`, fd).component(`${r}File`, Bf).component(`${r}Flash`, jf).component(`${r}Form`, Df).component(`${r}Input`, Uf).component(`${r}JoditEditor`, Xf).component(`${r}VueBridge`, Ip).component(`${r}Lazy`, Qf).component(`${r}Modal`, ep).component(`${r}OnClickOutside`, rs).component(`${r}PreloadedModal`, tp).component(`${r}Rehydrate`, ip).component(`${r}Render`, ue).component(`${r}Script`, sp).component(`${r}Select`, cp).component(`${r}State`, dp).component(`${r}Table`, mp).component(`${r}Teleport`, yp).component(`${r}Textarea`, Op).component(`${r}Toast`, $p).component(`${r}Toasts`, Tp).component(`${r}Toggle`, xp).component(`${r}Transition`, _p).component(t.link_component, Zf).directive(`${r}PreserveScroll`, Ap), Object.defineProperty(e.config.globalProperties, "$splade", { get: () => p }), Object.defineProperty(e.config.globalProperties, "$spladeOptions", { get: () => Object.assign({}, { ...t }) }), e.provide("$splade", e.config.globalProperties.$splade), e.provide("$spladeOptions", e.config.globalProperties.$spladeOptions), t.progress_bar) { + const n = { + delay: 250, + color: "#4B5563", + css: true, + spinner: false + }; + J(t.progress_bar) || (t.progress_bar = {}), ["delay", "color", "css", "spinner"].forEach((i) => { + W(t.progress_bar, i) || (t.progress_bar[i] = n[i]); + }), Cr.init(t.progress_bar); + } + t.suppress_compile_errors && (e.config.compilerOptions.onError = (n) => { + import("./assets/CompilerErrorMessages-6b34f14b-6b34f14b.mjs").then((i) => { + console.error({ + message: i.default[n.code] || "Unknown compiler error", + lineNumber: n.lineNumber, + compileError: n + }); + }); + }), te(t.components, (n, i) => { + e.component(i, n); + }); + } +}; +function kp(e, t, r) { + const n = {}; + process.argv.slice(2).forEach((s) => { + const a = s.replace(/^-+/, "").split("="); + n[a[0]] = a.length === 2 ? a[1] : true; + }); + const i = n.port || 9e3; + e(async (s, a) => { + if (s.method == "POST") { + let o = ""; + s.on("data", (l) => o += l), s.on("end", async () => { + const l = JSON.parse(o), u = r({ + components: l.components, + initialDynamics: l.dynamics, + initialHtml: l.html, + initialSpladeData: l.splade + }), c = await t(u); + a.writeHead(200, { "Content-Type": "application/json", Server: "Splade SSR" }), a.write(JSON.stringify({ body: c })), a.end(); + }); + } + }).listen(i, () => console.log(`Splade SSR server started on port ${i}.`)); +} +kp(createServer, renderToString, (props) => { + return vueExports.createSSRApp({ + render: Cp(props) + }).use(Fp); +}); diff --git a/composer.json b/composer.json index 8851edc..6234683 100644 --- a/composer.json +++ b/composer.json @@ -1,13 +1,24 @@ { - "name": "laravel/laravel", + "name": "tomatophp/tomato", "type": "project", - "description": "The skeleton application for the Laravel framework.", - "keywords": ["laravel", "framework"], + "description": "TomatoPHP is built to make it easy to develop web apps and API by generating files of CRUD operations and support helpers of tonnes of functions to make it easy to manage and use framework services.", + "keywords": [ + "framework", + "laravel", + "splade", + "tomato", + "blade", + "vuejs" + ], "license": "MIT", "require": { "php": "^8.2", + "ext-bcmath": "*", + "ext-sqlite3": "*", "laravel/framework": "^11.0", - "laravel/tinker": "^2.9" + "laravel/tinker": "^2.9", + "tomatophp/tomato-admin": "^1.2", + "tomatophp/tomato-translations": "^1.2" }, "require-dev": { "fakerphp/faker": "^1.23", @@ -28,7 +39,8 @@ }, "autoload-dev": { "psr-4": { - "Tests\\": "tests/" + "Tests\\": "tests/", + "Modules\\" : "Modules/" } }, "scripts": { diff --git a/composer.lock b/composer.lock index 735ee6d..61e13c3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,212 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fc988501b10afbbcc9a565db47aa7499", + "content-hash": "2c884d420ba8183c7d533bff9d293e26", "packages": [ + { + "name": "bacon/bacon-qr-code", + "version": "2.0.8", + "source": { + "type": "git", + "url": "https://github.com/Bacon/BaconQrCode.git", + "reference": "8674e51bb65af933a5ffaf1c308a660387c35c22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/8674e51bb65af933a5ffaf1c308a660387c35c22", + "reference": "8674e51bb65af933a5ffaf1c308a660387c35c22", + "shasum": "" + }, + "require": { + "dasprid/enum": "^1.0.3", + "ext-iconv": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phly/keep-a-changelog": "^2.1", + "phpunit/phpunit": "^7 | ^8 | ^9", + "spatie/phpunit-snapshot-assertions": "^4.2.9", + "squizlabs/php_codesniffer": "^3.4" + }, + "suggest": { + "ext-imagick": "to generate QR code images" + }, + "type": "library", + "autoload": { + "psr-4": { + "BaconQrCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/", + "role": "Developer" + } + ], + "description": "BaconQrCode is a QR code generator for PHP.", + "homepage": "https://github.com/Bacon/BaconQrCode", + "support": { + "issues": "https://github.com/Bacon/BaconQrCode/issues", + "source": "https://github.com/Bacon/BaconQrCode/tree/2.0.8" + }, + "time": "2022-12-07T17:46:57+00:00" + }, + { + "name": "blade-ui-kit/blade-heroicons", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/blade-ui-kit/blade-heroicons.git", + "reference": "a265dbcf2a098121aad05752d0bba9f59022e4ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/blade-ui-kit/blade-heroicons/zipball/a265dbcf2a098121aad05752d0bba9f59022e4ba", + "reference": "a265dbcf2a098121aad05752d0bba9f59022e4ba", + "shasum": "" + }, + "require": { + "blade-ui-kit/blade-icons": "^1.6", + "illuminate/support": "^9.0|^10.0|^11.0", + "php": "^8.0" + }, + "require-dev": { + "orchestra/testbench": "^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.0|^10.5|^11.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "BladeUI\\Heroicons\\BladeHeroiconsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "BladeUI\\Heroicons\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dries Vints", + "homepage": "https://driesvints.com" + } + ], + "description": "A package to easily make use of Heroicons in your Laravel Blade views.", + "homepage": "https://github.com/blade-ui-kit/blade-heroicons", + "keywords": [ + "Heroicons", + "blade", + "laravel" + ], + "support": { + "issues": "https://github.com/blade-ui-kit/blade-heroicons/issues", + "source": "https://github.com/blade-ui-kit/blade-heroicons/tree/2.3.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/driesvints", + "type": "github" + }, + { + "url": "https://www.paypal.com/paypalme/driesvints", + "type": "paypal" + } + ], + "time": "2024-02-07T16:33:46+00:00" + }, + { + "name": "blade-ui-kit/blade-icons", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/blade-ui-kit/blade-icons.git", + "reference": "89660d93f9897d231e9113ba203cd17f4c5efade" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/blade-ui-kit/blade-icons/zipball/89660d93f9897d231e9113ba203cd17f4c5efade", + "reference": "89660d93f9897d231e9113ba203cd17f4c5efade", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0|^9.0|^10.0|^11.0", + "illuminate/filesystem": "^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0", + "illuminate/view": "^8.0|^9.0|^10.0|^11.0", + "php": "^7.4|^8.0", + "symfony/console": "^5.3|^6.0|^7.0", + "symfony/finder": "^5.3|^6.0|^7.0" + }, + "require-dev": { + "mockery/mockery": "^1.5.1", + "orchestra/testbench": "^6.0|^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.0|^10.5|^11.0" + }, + "bin": [ + "bin/blade-icons-generate" + ], + "type": "library", + "extra": { + "laravel": { + "providers": [ + "BladeUI\\Icons\\BladeIconsServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "BladeUI\\Icons\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dries Vints", + "homepage": "https://driesvints.com" + } + ], + "description": "A package to easily make use of icons in your Laravel Blade views.", + "homepage": "https://github.com/blade-ui-kit/blade-icons", + "keywords": [ + "blade", + "icons", + "laravel", + "svg" + ], + "support": { + "issues": "https://github.com/blade-ui-kit/blade-icons/issues", + "source": "https://github.com/blade-ui-kit/blade-icons" + }, + "funding": [ + { + "url": "https://github.com/sponsors/driesvints", + "type": "github" + }, + { + "url": "https://www.paypal.com/paypalme/driesvints", + "type": "paypal" + } + ], + "time": "2024-02-07T16:09:20+00:00" + }, { "name": "brick/math", "version": "0.11.0", @@ -61,6 +265,59 @@ ], "time": "2023-01-15T23:15:59+00:00" }, + { + "name": "calebporzio/sushi", + "version": "v2.5.1", + "source": { + "type": "git", + "url": "https://github.com/calebporzio/sushi.git", + "reference": "20aad4e9d9ea74df64a86f6d327e55bdfc92d204" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/calebporzio/sushi/zipball/20aad4e9d9ea74df64a86f6d327e55bdfc92d204", + "reference": "20aad4e9d9ea74df64a86f6d327e55bdfc92d204", + "shasum": "" + }, + "require": { + "ext-sqlite3": "*", + "illuminate/database": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0", + "illuminate/support": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0", + "php": "^7.1.3|^8.0" + }, + "require-dev": { + "doctrine/dbal": "^2.9 || ^3.1.4", + "orchestra/testbench": "3.8.* || 3.9.* || ^4.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0", + "phpunit/phpunit": "^7.5 || ^8.4 || ^9.0 || ^10.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sushi\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Caleb Porzio", + "email": "calebporzio@gmail.com" + } + ], + "description": "Eloquent's missing \"array\" driver.", + "support": { + "source": "https://github.com/calebporzio/sushi/tree/v2.5.1" + }, + "funding": [ + { + "url": "https://github.com/calebporzio", + "type": "github" + } + ], + "time": "2024-02-05T14:40:50+00:00" + }, { "name": "carbonphp/carbon-doctrine-types", "version": "3.2.0", @@ -130,6 +387,137 @@ ], "time": "2024-02-09T16:56:22+00:00" }, + { + "name": "composer/semver", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-08-31T09:50:34+00:00" + }, + { + "name": "dasprid/enum", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/DASPRiD/Enum.git", + "reference": "6faf451159fb8ba4126b925ed2d78acfce0dc016" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/6faf451159fb8ba4126b925ed2d78acfce0dc016", + "reference": "6faf451159fb8ba4126b925ed2d78acfce0dc016", + "shasum": "" + }, + "require": { + "php": ">=7.1 <9.0" + }, + "require-dev": { + "phpunit/phpunit": "^7 | ^8 | ^9", + "squizlabs/php_codesniffer": "*" + }, + "type": "library", + "autoload": { + "psr-4": { + "DASPRiD\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/", + "role": "Developer" + } + ], + "description": "PHP 7.1 enum implementation", + "keywords": [ + "enum", + "map" + ], + "support": { + "issues": "https://github.com/DASPRiD/Enum/issues", + "source": "https://github.com/DASPRiD/Enum/tree/1.0.5" + }, + "time": "2023-08-25T16:18:39+00:00" + }, { "name": "dflydev/dot-access-data", "version": "v3.0.2", @@ -502,22 +890,146 @@ "time": "2023-10-06T06:47:41+00:00" }, { - "name": "fruitcake/php-cors", - "version": "v1.3.0", + "name": "ezyang/htmlpurifier", + "version": "v4.17.0", "source": { "type": "git", - "url": "https://github.com/fruitcake/php-cors.git", - "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b" + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/3d158f36e7875e2f040f37bc0573956240a5a38b", - "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/bbc513d79acf6691fa9cf10f192c90dd2957f18c", + "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c", "shasum": "" }, "require": { - "php": "^7.4|^8.0", - "symfony/http-foundation": "^4.4|^5.4|^6|^7" + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + }, + "require-dev": { + "cerdic/css-tidy": "^1.7 || ^2.0", + "simpletest/simpletest": "dev-master" + }, + "suggest": { + "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", + "ext-bcmath": "Used for unit conversion and imagecrash protection", + "ext-iconv": "Converts text to and from non-UTF-8 encodings", + "ext-tidy": "Used for pretty-printing HTML" + }, + "type": "library", + "autoload": { + "files": [ + "library/HTMLPurifier.composer.php" + ], + "psr-0": { + "HTMLPurifier": "library/" + }, + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "support": { + "issues": "https://github.com/ezyang/htmlpurifier/issues", + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.17.0" + }, + "time": "2023-11-17T15:01:25+00:00" + }, + { + "name": "firebase/php-jwt", + "version": "v6.10.0", + "source": { + "type": "git", + "url": "https://github.com/firebase/php-jwt.git", + "reference": "a49db6f0a5033aef5143295342f1c95521b075ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/a49db6f0a5033aef5143295342f1c95521b075ff", + "reference": "a49db6f0a5033aef5143295342f1c95521b075ff", + "shasum": "" + }, + "require": { + "php": "^7.4||^8.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^6.5||^7.4", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "psr/cache": "^1.0||^2.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-sodium": "Support EdDSA (Ed25519) signatures", + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, + "type": "library", + "autoload": { + "psr-4": { + "Firebase\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Neuman Vong", + "email": "neuman+pear@twilio.com", + "role": "Developer" + }, + { + "name": "Anant Narayanan", + "email": "anant@php.net", + "role": "Developer" + } + ], + "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", + "homepage": "https://github.com/firebase/php-jwt", + "keywords": [ + "jwt", + "php" + ], + "support": { + "issues": "https://github.com/firebase/php-jwt/issues", + "source": "https://github.com/firebase/php-jwt/tree/v6.10.0" + }, + "time": "2023-12-01T16:26:39+00:00" + }, + { + "name": "fruitcake/php-cors", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/fruitcake/php-cors.git", + "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/3d158f36e7875e2f040f37bc0573956240a5a38b", + "reference": "3d158f36e7875e2f040f37bc0573956240a5a38b", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0", + "symfony/http-foundation": "^4.4|^5.4|^6|^7" }, "require-dev": { "phpstan/phpstan": "^1.4", @@ -573,425 +1085,451 @@ "time": "2023-10-12T05:21:21+00:00" }, { - "name": "graham-campbell/result-type", - "version": "v1.1.2", + "name": "google/auth", + "version": "v1.37.1", "source": { "type": "git", - "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" + "url": "https://github.com/googleapis/google-auth-library-php.git", + "reference": "1a7de77b72e6ac60dccf0e6478c4c1005bb0ff46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", + "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/1a7de77b72e6ac60dccf0e6478c4c1005bb0ff46", + "reference": "1a7de77b72e6ac60dccf0e6478c4c1005bb0ff46", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.2" + "firebase/php-jwt": "^6.0", + "guzzlehttp/guzzle": "^6.5.8||^7.4.5", + "guzzlehttp/psr7": "^2.4.5", + "php": "^7.4||^8.0", + "psr/cache": "^1.0||^2.0||^3.0", + "psr/http-message": "^1.1||^2.0" }, "require-dev": { - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "guzzlehttp/promises": "^2.0", + "kelvinmo/simplejwt": "0.7.1", + "phpseclib/phpseclib": "^3.0", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.0.0", + "sebastian/comparator": ">=1.2.3", + "squizlabs/php_codesniffer": "^3.5" + }, + "suggest": { + "phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2." }, "type": "library", "autoload": { "psr-4": { - "GrahamCampbell\\ResultType\\": "src/" + "Google\\Auth\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - } + "Apache-2.0" ], - "description": "An Implementation Of The Result Type", + "description": "Google Auth Library for PHP", + "homepage": "http://github.com/google/google-auth-library-php", "keywords": [ - "Graham Campbell", - "GrahamCampbell", - "Result Type", - "Result-Type", - "result" + "Authentication", + "google", + "oauth2" ], "support": { - "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" + "docs": "https://googleapis.github.io/google-auth-library-php/main/", + "issues": "https://github.com/googleapis/google-auth-library-php/issues", + "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.37.1" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", - "type": "tidelift" - } - ], - "time": "2023-11-12T22:16:48+00:00" + "time": "2024-04-03T18:41:12+00:00" }, { - "name": "guzzlehttp/guzzle", - "version": "7.8.1", + "name": "google/cloud-core", + "version": "v1.58.0", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" + "url": "https://github.com/googleapis/google-cloud-php-core.git", + "reference": "2ea91dab93f9281c97e28691c0d9d806c5b61359" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", + "url": "https://api.github.com/repos/googleapis/google-cloud-php-core/zipball/2ea91dab93f9281c97e28691c0d9d806c5b61359", + "reference": "2ea91dab93f9281c97e28691c0d9d806c5b61359", "shasum": "" }, "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.1", - "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" + "google/auth": "^1.34", + "google/gax": "^1.30", + "guzzlehttp/guzzle": "^6.5.8|^7.4.4", + "guzzlehttp/promises": "^1.4||^2.0", + "guzzlehttp/psr7": "^2.6", + "monolog/monolog": "^2.9|^3.0", + "php": "^8.0", + "psr/http-message": "^1.0|^2.0", + "rize/uri-template": "~0.3" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", - "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.36 || ^9.6.15", - "psr/log": "^1.1 || ^2.0 || ^3.0" + "erusev/parsedown": "^1.6", + "google/cloud-common-protos": "~0.5", + "opis/closure": "^3", + "phpdocumentor/reflection": "^5.3.3", + "phpdocumentor/reflection-docblock": "^5.3", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.0", + "squizlabs/php_codesniffer": "2.*" }, "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" + "opis/closure": "May be used to serialize closures to process jobs in the batch daemon. Please require version ^3.", + "symfony/lock": "Required for the Spanner cached based session pool. Please require the following commit: 3.3.x-dev#1ba6ac9" }, + "bin": [ + "bin/google-cloud-batch" + ], "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false + "component": { + "id": "cloud-core", + "target": "googleapis/google-cloud-php-core.git", + "path": "Core", + "entry": "src/ServiceBuilder.php" } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { - "GuzzleHttp\\": "src/" + "Google\\Cloud\\Core\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "psr-18", - "psr-7", - "rest", - "web service" + "Apache-2.0" ], + "description": "Google Cloud PHP shared dependency, providing functionality useful to all components.", "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.1" + "source": "https://github.com/googleapis/google-cloud-php-core/tree/v1.58.0" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", - "type": "tidelift" - } - ], - "time": "2023-12-03T20:35:24+00:00" + "time": "2024-04-19T22:39:11+00:00" }, { - "name": "guzzlehttp/promises", - "version": "2.0.2", + "name": "google/cloud-translate", + "version": "v1.17.5", "source": { "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" + "url": "https://github.com/googleapis/google-cloud-php-translate.git", + "reference": "64a61041a5fed98a36c1b3ddd2b32ed554992776" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", + "url": "https://api.github.com/repos/googleapis/google-cloud-php-translate/zipball/64a61041a5fed98a36c1b3ddd2b32ed554992776", + "reference": "64a61041a5fed98a36c1b3ddd2b32ed554992776", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0" + "google/cloud-core": "^1.52.7", + "google/gax": "^1.30", + "php": "^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "erusev/parsedown": "^1.6", + "phpdocumentor/reflection": "^5.3.3", + "phpdocumentor/reflection-docblock": "^5.3", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.0", + "squizlabs/php_codesniffer": "2.*" + }, + "suggest": { + "ext-grpc": "The gRPC extension enables use of the performant gRPC transport", + "ext-protobuf": "Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions." }, "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false + "component": { + "id": "cloud-translate", + "target": "googleapis/google-cloud-php-translate.git", + "path": "Translate", + "entry": "src/TranslateClient.php" } }, "autoload": { "psr-4": { - "GuzzleHttp\\Promise\\": "src/" + "Google\\Cloud\\Translate\\": "src", + "GPBMetadata\\Google\\Cloud\\Translate\\": "metadata" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache-2.0" ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" + "description": "Cloud Translation Client for PHP", + "support": { + "source": "https://github.com/googleapis/google-cloud-php-translate/tree/v1.17.5" + }, + "time": "2024-04-19T22:39:11+00:00" + }, + { + "name": "google/common-protos", + "version": "v4.6.0", + "source": { + "type": "git", + "url": "https://github.com/googleapis/common-protos-php.git", + "reference": "f8588298a0a204aef2db15ce501530e476ec883f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/common-protos-php/zipball/f8588298a0a204aef2db15ce501530e476ec883f", + "reference": "f8588298a0a204aef2db15ce501530e476ec883f", + "shasum": "" + }, + "require": { + "google/protobuf": "^v3.25.3||^4.26.1", + "php": "^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Google\\Api\\": "src/Api", + "Google\\Iam\\": "src/Iam", + "Google\\Rpc\\": "src/Rpc", + "Google\\Type\\": "src/Type", + "Google\\Cloud\\": "src/Cloud", + "GPBMetadata\\Google\\Api\\": "metadata/Api", + "GPBMetadata\\Google\\Iam\\": "metadata/Iam", + "GPBMetadata\\Google\\Rpc\\": "metadata/Rpc", + "GPBMetadata\\Google\\Type\\": "metadata/Type", + "GPBMetadata\\Google\\Cloud\\": "metadata/Cloud", + "GPBMetadata\\Google\\Logging\\": "metadata/Logging" } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" ], - "description": "Guzzle promises library", + "description": "Google API Common Protos for PHP", + "homepage": "https://github.com/googleapis/common-protos-php", "keywords": [ - "promise" + "google" ], "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.2" + "issues": "https://github.com/googleapis/common-protos-php/issues", + "source": "https://github.com/googleapis/common-protos-php/tree/v4.6.0" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", - "type": "tidelift" + "time": "2024-04-03T19:11:54+00:00" + }, + { + "name": "google/gax", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/googleapis/gax-php.git", + "reference": "35cc3d3633b4ba6099543aa79d87945e14218cdf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/gax-php/zipball/35cc3d3633b4ba6099543aa79d87945e14218cdf", + "reference": "35cc3d3633b4ba6099543aa79d87945e14218cdf", + "shasum": "" + }, + "require": { + "google/auth": "^1.34.0", + "google/common-protos": "^4.4", + "google/grpc-gcp": "^0.4", + "google/longrunning": "~0.2", + "google/protobuf": "^v3.25.3||^4.26.1", + "grpc/grpc": "^1.13", + "guzzlehttp/promises": "^2.0", + "guzzlehttp/psr7": "^2.0", + "php": "^8.0", + "ramsey/uuid": "^4.0" + }, + "conflict": { + "ext-protobuf": "<3.7.0" + }, + "require-dev": { + "phpspec/prophecy-phpunit": "^2.1", + "phpunit/phpunit": "^9.6", + "squizlabs/php_codesniffer": "3.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "Google\\ApiCore\\": "src", + "GPBMetadata\\ApiCore\\": "metadata/ApiCore" } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" ], - "time": "2023-12-03T20:19:20+00:00" + "description": "Google API Core for PHP", + "homepage": "https://github.com/googleapis/gax-php", + "keywords": [ + "google" + ], + "support": { + "issues": "https://github.com/googleapis/gax-php/issues", + "source": "https://github.com/googleapis/gax-php/tree/v1.31.0" + }, + "time": "2024-04-22T14:29:53+00:00" }, { - "name": "guzzlehttp/psr7", - "version": "2.6.2", + "name": "google/grpc-gcp", + "version": "v0.4.0", "source": { "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "url": "https://github.com/GoogleCloudPlatform/grpc-gcp-php.git", + "reference": "2a80dbf690922aa52bb6bb79b9a32a9637a5c2d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", + "url": "https://api.github.com/repos/GoogleCloudPlatform/grpc-gcp-php/zipball/2a80dbf690922aa52bb6bb79b9a32a9637a5c2d9", + "reference": "2a80dbf690922aa52bb6bb79b9a32a9637a5c2d9", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "ralouphie/getallheaders": "^3.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" + "google/auth": "^1.3", + "google/protobuf": "^v3.25.3||^4.26.1", + "grpc/grpc": "^v1.13.0", + "php": "^8.0", + "psr/cache": "^1.0.1||^2.0.0||^3.0.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "google/cloud-spanner": "^1.7", + "phpunit/phpunit": "^9.0" }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + "type": "library", + "autoload": { + "psr-4": { + "Grpc\\Gcp\\": "src/" + }, + "classmap": [ + "src/generated/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "gRPC GCP library for channel management", + "support": { + "issues": "https://github.com/GoogleCloudPlatform/grpc-gcp-php/issues", + "source": "https://github.com/GoogleCloudPlatform/grpc-gcp-php/tree/v0.4.0" + }, + "time": "2024-04-03T16:37:55+00:00" + }, + { + "name": "google/longrunning", + "version": "0.4.1", + "source": { + "type": "git", + "url": "https://github.com/googleapis/php-longrunning.git", + "reference": "67b80d36df06eaf5000fea010c77307e72fa0985" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/php-longrunning/zipball/67b80d36df06eaf5000fea010c77307e72fa0985", + "reference": "67b80d36df06eaf5000fea010c77307e72fa0985", + "shasum": "" + }, + "require-dev": { + "google/gax": "^1.30", + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false + "component": { + "id": "longrunning", + "path": "LongRunning", + "entry": null, + "target": "googleapis/php-longrunning" } }, "autoload": { "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" + "Google\\LongRunning\\": "src/LongRunning", + "Google\\ApiCore\\LongRunning\\": "src/ApiCore/LongRunning", + "GPBMetadata\\Google\\Longrunning\\": "metadata/Longrunning" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache-2.0" ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" + "description": "Google LongRunning Client for PHP", + "support": { + "source": "https://github.com/googleapis/php-longrunning/tree/v0.4.1" + }, + "time": "2024-04-19T22:39:11+00:00" + }, + { + "name": "google/protobuf", + "version": "v4.26.1", + "source": { + "type": "git", + "url": "https://github.com/protocolbuffers/protobuf-php.git", + "reference": "5c46b0eb09e7ad3e6efef3c5a85e2a34108c52ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/5c46b0eb09e7ad3e6efef3c5a85e2a34108c52ae", + "reference": "5c46b0eb09e7ad3e6efef3c5a85e2a34108c52ae", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": ">=5.0.0" + }, + "suggest": { + "ext-bcmath": "Need to support JSON deserialization" + }, + "type": "library", + "autoload": { + "psr-4": { + "Google\\Protobuf\\": "src/Google/Protobuf", + "GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf" } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" ], - "description": "PSR-7 message implementation that also provides common utility methods", + "description": "proto library for PHP", + "homepage": "https://developers.google.com/protocol-buffers/", "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" + "proto" ], "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.2" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.26.1" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", - "type": "tidelift" - } - ], - "time": "2023-12-03T20:05:35+00:00" + "time": "2024-03-27T19:56:50+00:00" }, { - "name": "guzzlehttp/uri-template", - "version": "v1.0.3", + "name": "graham-campbell/result-type", + "version": "v1.1.2", "source": { "type": "git", - "url": "https://github.com/guzzle/uri-template.git", - "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c" + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/uri-template/zipball/ecea8feef63bd4fef1f037ecb288386999ecc11c", - "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "symfony/polyfill-php80": "^1.24" + "phpoption/phpoption": "^1.9.2" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.36 || ^9.6.15", - "uri-template/tests": "1.0.0" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, "autoload": { "psr-4": { - "GuzzleHttp\\UriTemplate\\": "src" + "GrahamCampbell\\ResultType\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1003,31 +1541,185 @@ "name": "Graham Campbell", "email": "hello@gjcampbell.co.uk", "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" } ], - "description": "A polyfill class for uri_template of PHP", + "description": "An Implementation Of The Result Type", "keywords": [ - "guzzlehttp", - "uri-template" + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" ], "support": { - "issues": "https://github.com/guzzle/uri-template/issues", - "source": "https://github.com/guzzle/uri-template/tree/v1.0.3" + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2023-11-12T22:16:48+00:00" + }, + { + "name": "grpc/grpc", + "version": "1.57.0", + "source": { + "type": "git", + "url": "https://github.com/grpc/grpc-php.git", + "reference": "b610c42022ed3a22f831439cb93802f2a4502fdf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/grpc/grpc-php/zipball/b610c42022ed3a22f831439cb93802f2a4502fdf", + "reference": "b610c42022ed3a22f831439cb93802f2a4502fdf", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "google/auth": "^v1.3.0" + }, + "suggest": { + "ext-protobuf": "For better performance, install the protobuf C extension.", + "google/protobuf": "To get started using grpc quickly, install the native protobuf library." + }, + "type": "library", + "autoload": { + "psr-4": { + "Grpc\\": "src/lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "gRPC library for PHP", + "homepage": "https://grpc.io", + "keywords": [ + "rpc" + ], + "support": { + "source": "https://github.com/grpc/grpc-php/tree/v1.57.0" + }, + "time": "2023-08-14T23:57:54+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.8.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.1", + "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.8.1" }, "funding": [ { @@ -1039,97 +1731,509 @@ "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/uri-template", + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", "type": "tidelift" } ], - "time": "2023-12-03T19:50:20+00:00" + "time": "2023-12-03T20:35:24+00:00" }, { - "name": "laravel/framework", - "version": "v11.5.0", + "name": "guzzlehttp/promises", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/laravel/framework.git", - "reference": "e3c24268f1404805e15099b9f035fe310cb30753" + "url": "https://github.com/guzzle/promises.git", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/e3c24268f1404805e15099b9f035fe310cb30753", - "reference": "e3c24268f1404805e15099b9f035fe310cb30753", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", "shasum": "" }, "require": { - "brick/math": "^0.9.3|^0.10.2|^0.11|^0.12", - "composer-runtime-api": "^2.2", - "doctrine/inflector": "^2.0.5", - "dragonmantank/cron-expression": "^3.3.2", - "egulias/email-validator": "^3.2.1|^4.0", - "ext-ctype": "*", - "ext-filter": "*", - "ext-hash": "*", - "ext-mbstring": "*", - "ext-openssl": "*", - "ext-session": "*", - "ext-tokenizer": "*", - "fruitcake/php-cors": "^1.3", - "guzzlehttp/guzzle": "^7.8", - "guzzlehttp/uri-template": "^1.0", - "laravel/prompts": "^0.1.18", - "laravel/serializable-closure": "^1.3", - "league/commonmark": "^2.2.1", - "league/flysystem": "^3.8.0", - "monolog/monolog": "^3.0", - "nesbot/carbon": "^2.72.2|^3.0", - "nunomaduro/termwind": "^2.0", - "php": "^8.2", - "psr/container": "^1.1.1|^2.0.1", - "psr/log": "^1.0|^2.0|^3.0", - "psr/simple-cache": "^1.0|^2.0|^3.0", - "ramsey/uuid": "^4.7", - "symfony/console": "^7.0", - "symfony/error-handler": "^7.0", - "symfony/finder": "^7.0", - "symfony/http-foundation": "^7.0", - "symfony/http-kernel": "^7.0", - "symfony/mailer": "^7.0", - "symfony/mime": "^7.0", - "symfony/polyfill-php83": "^1.28", - "symfony/process": "^7.0", - "symfony/routing": "^7.0", - "symfony/uid": "^7.0", - "symfony/var-dumper": "^7.0", - "tijsverkoyen/css-to-inline-styles": "^2.2.5", - "vlucas/phpdotenv": "^5.4.1", - "voku/portable-ascii": "^2.0" + "php": "^7.2.5 || ^8.0" }, - "conflict": { - "mockery/mockery": "1.6.8", - "tightenco/collect": "<5.5.33" + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, - "provide": { - "psr/container-implementation": "1.1|2.0", - "psr/simple-cache-implementation": "1.0|2.0|3.0" + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } }, - "replace": { - "illuminate/auth": "self.version", - "illuminate/broadcasting": "self.version", - "illuminate/bus": "self.version", - "illuminate/cache": "self.version", - "illuminate/collections": "self.version", - "illuminate/conditionable": "self.version", - "illuminate/config": "self.version", - "illuminate/console": "self.version", - "illuminate/container": "self.version", - "illuminate/contracts": "self.version", - "illuminate/cookie": "self.version", - "illuminate/database": "self.version", - "illuminate/encryption": "self.version", - "illuminate/events": "self.version", - "illuminate/filesystem": "self.version", - "illuminate/hashing": "self.version", - "illuminate/http": "self.version", - "illuminate/log": "self.version", + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2023-12-03T20:19:20+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.6.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.6.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2023-12-03T20:05:35+00:00" + }, + { + "name": "guzzlehttp/uri-template", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/uri-template.git", + "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/uri-template/zipball/ecea8feef63bd4fef1f037ecb288386999ecc11c", + "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/polyfill-php80": "^1.24" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "uri-template/tests": "1.0.0" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\UriTemplate\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + } + ], + "description": "A polyfill class for uri_template of PHP", + "keywords": [ + "guzzlehttp", + "uri-template" + ], + "support": { + "issues": "https://github.com/guzzle/uri-template/issues", + "source": "https://github.com/guzzle/uri-template/tree/v1.0.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/uri-template", + "type": "tidelift" + } + ], + "time": "2023-12-03T19:50:20+00:00" + }, + { + "name": "kirschbaum-development/eloquent-power-joins", + "version": "3.5.6", + "source": { + "type": "git", + "url": "https://github.com/kirschbaum-development/eloquent-power-joins.git", + "reference": "6de51d9ec43af34e77bd1d9908173de1416a0aed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kirschbaum-development/eloquent-power-joins/zipball/6de51d9ec43af34e77bd1d9908173de1416a0aed", + "reference": "6de51d9ec43af34e77bd1d9908173de1416a0aed", + "shasum": "" + }, + "require": { + "illuminate/database": "^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0", + "php": "^8.0" + }, + "require-dev": { + "laravel/legacy-factories": "^1.0@dev", + "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0", + "phpunit/phpunit": "^8.0|^9.0|^10.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Kirschbaum\\PowerJoins\\PowerJoinsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Kirschbaum\\PowerJoins\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Luis Dalmolin", + "email": "luis.nh@gmail.com", + "role": "Developer" + } + ], + "description": "The Laravel magic applied to joins.", + "homepage": "https://github.com/kirschbaum-development/eloquent-power-joins", + "keywords": [ + "eloquent", + "join", + "laravel", + "mysql" + ], + "support": { + "issues": "https://github.com/kirschbaum-development/eloquent-power-joins/issues", + "source": "https://github.com/kirschbaum-development/eloquent-power-joins/tree/3.5.6" + }, + "time": "2024-04-09T00:35:30+00:00" + }, + { + "name": "laravel/fortify", + "version": "v1.21.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/fortify.git", + "reference": "405388fd399264715573e23ed2f368fbce426da3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/fortify/zipball/405388fd399264715573e23ed2f368fbce426da3", + "reference": "405388fd399264715573e23ed2f368fbce426da3", + "shasum": "" + }, + "require": { + "bacon/bacon-qr-code": "^2.0", + "ext-json": "*", + "illuminate/support": "^10.0|^11.0", + "php": "^8.1", + "pragmarx/google2fa": "^8.0", + "symfony/console": "^6.0|^7.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "orchestra/testbench": "^8.16|^9.0", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Fortify\\FortifyServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Fortify\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Backend controllers and scaffolding for Laravel authentication.", + "keywords": [ + "auth", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/fortify/issues", + "source": "https://github.com/laravel/fortify" + }, + "time": "2024-03-19T20:08:25+00:00" + }, + { + "name": "laravel/framework", + "version": "v11.5.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "e3c24268f1404805e15099b9f035fe310cb30753" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/e3c24268f1404805e15099b9f035fe310cb30753", + "reference": "e3c24268f1404805e15099b9f035fe310cb30753", + "shasum": "" + }, + "require": { + "brick/math": "^0.9.3|^0.10.2|^0.11|^0.12", + "composer-runtime-api": "^2.2", + "doctrine/inflector": "^2.0.5", + "dragonmantank/cron-expression": "^3.3.2", + "egulias/email-validator": "^3.2.1|^4.0", + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-session": "*", + "ext-tokenizer": "*", + "fruitcake/php-cors": "^1.3", + "guzzlehttp/guzzle": "^7.8", + "guzzlehttp/uri-template": "^1.0", + "laravel/prompts": "^0.1.18", + "laravel/serializable-closure": "^1.3", + "league/commonmark": "^2.2.1", + "league/flysystem": "^3.8.0", + "monolog/monolog": "^3.0", + "nesbot/carbon": "^2.72.2|^3.0", + "nunomaduro/termwind": "^2.0", + "php": "^8.2", + "psr/container": "^1.1.1|^2.0.1", + "psr/log": "^1.0|^2.0|^3.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "ramsey/uuid": "^4.7", + "symfony/console": "^7.0", + "symfony/error-handler": "^7.0", + "symfony/finder": "^7.0", + "symfony/http-foundation": "^7.0", + "symfony/http-kernel": "^7.0", + "symfony/mailer": "^7.0", + "symfony/mime": "^7.0", + "symfony/polyfill-php83": "^1.28", + "symfony/process": "^7.0", + "symfony/routing": "^7.0", + "symfony/uid": "^7.0", + "symfony/var-dumper": "^7.0", + "tijsverkoyen/css-to-inline-styles": "^2.2.5", + "vlucas/phpdotenv": "^5.4.1", + "voku/portable-ascii": "^2.0" + }, + "conflict": { + "mockery/mockery": "1.6.8", + "tightenco/collect": "<5.5.33" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/collections": "self.version", + "illuminate/conditionable": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", "illuminate/macroable": "self.version", "illuminate/mail": "self.version", "illuminate/notifications": "self.version", @@ -1148,197 +2252,1608 @@ "spatie/once": "*" }, "require-dev": { - "ably/ably-php": "^1.0", - "aws/aws-sdk-php": "^3.235.5", - "ext-gmp": "*", - "fakerphp/faker": "^1.23", - "league/flysystem-aws-s3-v3": "^3.0", - "league/flysystem-ftp": "^3.0", - "league/flysystem-path-prefixing": "^3.3", - "league/flysystem-read-only": "^3.3", - "league/flysystem-sftp-v3": "^3.0", - "mockery/mockery": "^1.6", - "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^9.0.6", - "pda/pheanstalk": "^5.0", - "phpstan/phpstan": "^1.4.7", - "phpunit/phpunit": "^10.5|^11.0", - "predis/predis": "^2.0.2", - "resend/resend-php": "^0.10.0", - "symfony/cache": "^7.0", - "symfony/http-client": "^7.0", - "symfony/psr-http-message-bridge": "^7.0" + "ably/ably-php": "^1.0", + "aws/aws-sdk-php": "^3.235.5", + "ext-gmp": "*", + "fakerphp/faker": "^1.23", + "league/flysystem-aws-s3-v3": "^3.0", + "league/flysystem-ftp": "^3.0", + "league/flysystem-path-prefixing": "^3.3", + "league/flysystem-read-only": "^3.3", + "league/flysystem-sftp-v3": "^3.0", + "mockery/mockery": "^1.6", + "nyholm/psr7": "^1.2", + "orchestra/testbench-core": "^9.0.6", + "pda/pheanstalk": "^5.0", + "phpstan/phpstan": "^1.4.7", + "phpunit/phpunit": "^10.5|^11.0", + "predis/predis": "^2.0.2", + "resend/resend-php": "^0.10.0", + "symfony/cache": "^7.0", + "symfony/http-client": "^7.0", + "symfony/psr-http-message-bridge": "^7.0" + }, + "suggest": { + "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.235.5).", + "brianium/paratest": "Required to run tests in parallel (^7.0|^8.0).", + "ext-apcu": "Required to use the APC cache driver.", + "ext-fileinfo": "Required to use the Filesystem class.", + "ext-ftp": "Required to use the Flysystem FTP driver.", + "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", + "ext-memcached": "Required to use the memcache cache driver.", + "ext-pcntl": "Required to use all features of the queue worker and console signal trapping.", + "ext-pdo": "Required to use all database features.", + "ext-posix": "Required to use all features of the queue worker.", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", + "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", + "filp/whoops": "Required for friendly error pages in development (^2.14.3).", + "laravel/tinker": "Required to use the tinker console command (^2.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", + "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.3).", + "league/flysystem-read-only": "Required to use read-only disks (^3.3)", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", + "mockery/mockery": "Required to use mocking (^1.6).", + "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).", + "phpunit/phpunit": "Required to use assertions and run tests (^10.5|^11.0).", + "predis/predis": "Required to use the predis connector (^2.0.2).", + "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", + "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^7.0).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^7.0).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^7.0).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^7.0).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^7.0).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^7.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "11.x-dev" + } + }, + "autoload": { + "files": [ + "src/Illuminate/Collections/helpers.php", + "src/Illuminate/Events/functions.php", + "src/Illuminate/Filesystem/functions.php", + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/", + "Illuminate\\Support\\": [ + "src/Illuminate/Macroable/", + "src/Illuminate/Collections/", + "src/Illuminate/Conditionable/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "https://laravel.com", + "keywords": [ + "framework", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2024-04-23T15:11:31+00:00" + }, + { + "name": "laravel/jetstream", + "version": "v5.0.4", + "source": { + "type": "git", + "url": "https://github.com/laravel/jetstream.git", + "reference": "dea945f708b42ecd3548b8c0ff2a914d271a26c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/jetstream/zipball/dea945f708b42ecd3548b8c0ff2a914d271a26c0", + "reference": "dea945f708b42ecd3548b8c0ff2a914d271a26c0", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/console": "^11.0", + "illuminate/support": "^11.0", + "laravel/fortify": "^1.20", + "mobiledetect/mobiledetectlib": "^4.8", + "php": "^8.2.0", + "symfony/console": "^7.0" + }, + "require-dev": { + "inertiajs/inertia-laravel": "^1.0", + "laravel/sanctum": "^4.0", + "livewire/livewire": "^3.3", + "mockery/mockery": "^1.0", + "orchestra/testbench": "^9.0", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.4" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Jetstream\\JetstreamServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Jetstream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Tailwind scaffolding for the Laravel framework.", + "keywords": [ + "auth", + "laravel", + "tailwind" + ], + "support": { + "issues": "https://github.com/laravel/jetstream/issues", + "source": "https://github.com/laravel/jetstream" + }, + "time": "2024-04-10T19:17:56+00:00" + }, + { + "name": "laravel/prompts", + "version": "v0.1.20", + "source": { + "type": "git", + "url": "https://github.com/laravel/prompts.git", + "reference": "bf9a360c484976692de0f3792f30066f4f4b34a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/prompts/zipball/bf9a360c484976692de0f3792f30066f4f4b34a2", + "reference": "bf9a360c484976692de0f3792f30066f4f4b34a2", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "illuminate/collections": "^10.0|^11.0", + "php": "^8.1", + "symfony/console": "^6.2|^7.0" + }, + "conflict": { + "illuminate/console": ">=10.17.0 <10.25.0", + "laravel/framework": ">=10.17.0 <10.25.0" + }, + "require-dev": { + "mockery/mockery": "^1.5", + "pestphp/pest": "^2.3", + "phpstan/phpstan": "^1.11", + "phpstan/phpstan-mockery": "^1.1" + }, + "suggest": { + "ext-pcntl": "Required for the spinner to be animated." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Laravel\\Prompts\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "support": { + "issues": "https://github.com/laravel/prompts/issues", + "source": "https://github.com/laravel/prompts/tree/v0.1.20" + }, + "time": "2024-04-18T00:45:25+00:00" + }, + { + "name": "laravel/sanctum", + "version": "v4.0.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/sanctum.git", + "reference": "9cfc0ce80cabad5334efff73ec856339e8ec1ac1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/9cfc0ce80cabad5334efff73ec856339e8ec1ac1", + "reference": "9cfc0ce80cabad5334efff73ec856339e8ec1ac1", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/console": "^11.0", + "illuminate/contracts": "^11.0", + "illuminate/database": "^11.0", + "illuminate/support": "^11.0", + "php": "^8.2", + "symfony/console": "^7.0" + }, + "require-dev": { + "mockery/mockery": "^1.6", + "orchestra/testbench": "^9.0", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Sanctum\\SanctumServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sanctum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.", + "keywords": [ + "auth", + "laravel", + "sanctum" + ], + "support": { + "issues": "https://github.com/laravel/sanctum/issues", + "source": "https://github.com/laravel/sanctum" + }, + "time": "2024-04-10T19:39:58+00:00" + }, + { + "name": "laravel/serializable-closure", + "version": "v1.3.3", + "source": { + "type": "git", + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "3dbf8a8e914634c48d389c1234552666b3d43754" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754", + "reference": "3dbf8a8e914634c48d389c1234552666b3d43754", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "nesbot/carbon": "^2.61", + "pestphp/pest": "^1.21.3", + "phpstan/phpstan": "^1.8.2", + "symfony/var-dumper": "^5.4.11" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" + }, + "time": "2023-11-08T14:08:06+00:00" + }, + { + "name": "laravel/tinker", + "version": "v2.9.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/tinker.git", + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/tinker/zipball/502e0fe3f0415d06d5db1f83a472f0f3b754bafe", + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe", + "shasum": "" + }, + "require": { + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "php": "^7.2.5|^8.0", + "psy/psysh": "^0.11.1|^0.12.0", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0" + }, + "require-dev": { + "mockery/mockery": "~1.3.3|^1.4.2", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8.5.8|^9.3.3" + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0)." + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Tinker\\TinkerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Tinker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Powerful REPL for the Laravel framework.", + "keywords": [ + "REPL", + "Tinker", + "laravel", + "psysh" + ], + "support": { + "issues": "https://github.com/laravel/tinker/issues", + "source": "https://github.com/laravel/tinker/tree/v2.9.0" + }, + "time": "2024-01-04T16:10:04+00:00" + }, + { + "name": "league/commonmark", + "version": "2.4.2", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/91c24291965bd6d7c46c46a12ba7492f83b1cadf", + "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "league/config": "^1.1.1", + "php": "^7.4 || ^8.0", + "psr/event-dispatcher": "^1.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/polyfill-php80": "^1.16" + }, + "require-dev": { + "cebe/markdown": "^1.0", + "commonmark/cmark": "0.30.3", + "commonmark/commonmark.js": "0.30.0", + "composer/package-versions-deprecated": "^1.8", + "embed/embed": "^4.4", + "erusev/parsedown": "^1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "^1.4 || ^2.0", + "nyholm/psr7": "^1.5", + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0", + "scrutinizer/ocular": "^1.8.1", + "symfony/finder": "^5.3 | ^6.0 || ^7.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 || ^7.0", + "unleashedtech/php-coding-standard": "^3.1.1", + "vimeo/psalm": "^4.24.0 || ^5.0.0" + }, + "suggest": { + "symfony/yaml": "v2.3+ required if using the Front Matter extension" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + } + }, + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "support": { + "docs": "https://commonmark.thephpleague.com/", + "forum": "https://github.com/thephpleague/commonmark/discussions", + "issues": "https://github.com/thephpleague/commonmark/issues", + "rss": "https://github.com/thephpleague/commonmark/releases.atom", + "source": "https://github.com/thephpleague/commonmark" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/commonmark", + "type": "tidelift" + } + ], + "time": "2024-02-02T11:59:32+00:00" + }, + { + "name": "league/config", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/config.git", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^3.0.1", + "nette/schema": "^1.2", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Config\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Define configuration arrays with strict schemas and access values with dot notation", + "homepage": "https://config.thephpleague.com", + "keywords": [ + "array", + "config", + "configuration", + "dot", + "dot-access", + "nested", + "schema" + ], + "support": { + "docs": "https://config.thephpleague.com/", + "issues": "https://github.com/thephpleague/config/issues", + "rss": "https://github.com/thephpleague/config/releases.atom", + "source": "https://github.com/thephpleague/config" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + } + ], + "time": "2022-12-11T20:36:23+00:00" + }, + { + "name": "league/flysystem", + "version": "3.27.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "4729745b1ab737908c7d055148c9a6b3e959832f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4729745b1ab737908c7d055148c9a6b3e959832f", + "reference": "4729745b1ab737908c7d055148c9a6b3e959832f", + "shasum": "" + }, + "require": { + "league/flysystem-local": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "conflict": { + "async-aws/core": "<1.19.0", + "async-aws/s3": "<1.14.0", + "aws/aws-sdk-php": "3.209.31 || 3.210.0", + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1", + "phpseclib/phpseclib": "3.0.15", + "symfony/http-client": "<5.2" + }, + "require-dev": { + "async-aws/s3": "^1.5 || ^2.0", + "async-aws/simple-s3": "^1.1 || ^2.0", + "aws/aws-sdk-php": "^3.295.10", + "composer/semver": "^3.0", + "ext-fileinfo": "*", + "ext-ftp": "*", + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.5", + "google/cloud-storage": "^1.23", + "microsoft/azure-storage-blob": "^1.1", + "phpseclib/phpseclib": "^3.0.36", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.5.11|^10.0", + "sabre/dav": "^4.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "File storage abstraction for PHP", + "keywords": [ + "WebDAV", + "aws", + "cloud", + "file", + "files", + "filesystem", + "filesystems", + "ftp", + "s3", + "sftp", + "storage" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/3.27.0" + }, + "funding": [ + { + "url": "https://ecologi.com/frankdejonge", + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + } + ], + "time": "2024-04-07T19:17:50+00:00" + }, + { + "name": "league/flysystem-local", + "version": "3.25.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-local.git", + "reference": "61a6a90d6e999e4ddd9ce5adb356de0939060b92" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/61a6a90d6e999e4ddd9ce5adb356de0939060b92", + "reference": "61a6a90d6e999e4ddd9ce5adb356de0939060b92", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/flysystem": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\Local\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Local filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "file", + "files", + "filesystem", + "local" + ], + "support": { + "source": "https://github.com/thephpleague/flysystem-local/tree/3.25.1" + }, + "funding": [ + { + "url": "https://ecologi.com/frankdejonge", + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + } + ], + "time": "2024-03-15T19:58:44+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.15.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.15.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2024-01-28T23:22:08+00:00" + }, + { + "name": "maatwebsite/excel", + "version": "3.1.55", + "source": { + "type": "git", + "url": "https://github.com/SpartnerNL/Laravel-Excel.git", + "reference": "6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260", + "reference": "6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260", + "shasum": "" + }, + "require": { + "composer/semver": "^3.3", + "ext-json": "*", + "illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0", + "php": "^7.0||^8.0", + "phpoffice/phpspreadsheet": "^1.18", + "psr/simple-cache": "^1.0||^2.0||^3.0" + }, + "require-dev": { + "laravel/scout": "^7.0||^8.0||^9.0||^10.0", + "orchestra/testbench": "^6.0||^7.0||^8.0||^9.0", + "predis/predis": "^1.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Maatwebsite\\Excel\\ExcelServiceProvider" + ], + "aliases": { + "Excel": "Maatwebsite\\Excel\\Facades\\Excel" + } + } + }, + "autoload": { + "psr-4": { + "Maatwebsite\\Excel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Patrick Brouwers", + "email": "patrick@spartner.nl" + } + ], + "description": "Supercharged Excel exports and imports in Laravel", + "keywords": [ + "PHPExcel", + "batch", + "csv", + "excel", + "export", + "import", + "laravel", + "php", + "phpspreadsheet" + ], + "support": { + "issues": "https://github.com/SpartnerNL/Laravel-Excel/issues", + "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.55" + }, + "funding": [ + { + "url": "https://laravel-excel.com/commercial-support", + "type": "custom" + }, + { + "url": "https://github.com/patrickbrouwers", + "type": "github" + } + ], + "time": "2024-02-20T08:27:10+00:00" + }, + { + "name": "maennchen/zipstream-php", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/b8174494eda667f7d13876b4a7bfef0f62a7c0d1", + "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-zlib": "*", + "php-64bit": "^8.1" + }, + "require-dev": { + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.16", + "guzzlehttp/guzzle": "^7.5", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.5", + "phpunit/phpunit": "^10.0", + "vimeo/psalm": "^5.0" + }, + "suggest": { + "guzzlehttp/psr7": "^2.4", + "psr/http-message": "^2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" + } + ], + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": [ + "stream", + "zip" + ], + "support": { + "issues": "https://github.com/maennchen/ZipStream-PHP/issues", + "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.0" + }, + "funding": [ + { + "url": "https://github.com/maennchen", + "type": "github" + }, + { + "url": "https://opencollective.com/zipstream", + "type": "open_collective" + } + ], + "time": "2023-06-21T14:59:35+00:00" + }, + { + "name": "markbaker/complex", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPComplex/issues", + "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2" + }, + "time": "2022-12-06T16:21:08+00:00" + }, + { + "name": "markbaker/matrix", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@demon-angel.eu" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPMatrix/issues", + "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1" + }, + "time": "2022-12-02T22:17:43+00:00" + }, + { + "name": "mobiledetect/mobiledetectlib", + "version": "4.8.06", + "source": { + "type": "git", + "url": "https://github.com/serbanghita/Mobile-Detect.git", + "reference": "af088b54cecc13b3264edca7da93a89ba7aa2d9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/af088b54cecc13b3264edca7da93a89ba7aa2d9e", + "reference": "af088b54cecc13b3264edca7da93a89ba7aa2d9e", + "shasum": "" + }, + "require": { + "php": ">=8.0", + "psr/simple-cache": "^2 || ^3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v3.35.1", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.6", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Detection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Serban Ghita", + "email": "serbanghita@gmail.com", + "homepage": "http://mobiledetect.net", + "role": "Developer" + } + ], + "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", + "homepage": "https://github.com/serbanghita/Mobile-Detect", + "keywords": [ + "detect mobile devices", + "mobile", + "mobile detect", + "mobile detector", + "php mobile detect" + ], + "support": { + "issues": "https://github.com/serbanghita/Mobile-Detect/issues", + "source": "https://github.com/serbanghita/Mobile-Detect/tree/4.8.06" + }, + "funding": [ + { + "url": "https://github.com/serbanghita", + "type": "github" + } + ], + "time": "2024-03-01T22:28:42+00:00" + }, + { + "name": "monolog/monolog", + "version": "3.6.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", + "reference": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^2.0 || ^3.0" + }, + "provide": { + "psr/log-implementation": "3.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2 || ^2.0", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.2", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4 || ^3", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-strict-rules": "^1.4", + "phpunit/phpunit": "^10.5.17", + "predis/predis": "^1.1 || ^2", + "ruflin/elastica": "^7", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/3.6.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2024-04-12T21:02:21+00:00" + }, + { + "name": "nesbot/carbon", + "version": "3.3.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "7219739c4e01d4680c980545821733b6ed8ee880" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7219739c4e01d4680c980545821733b6ed8ee880", + "reference": "7219739c4e01d4680c980545821733b6ed8ee880", + "shasum": "" + }, + "require": { + "carbonphp/carbon-doctrine-types": "*", + "ext-json": "*", + "php": "^8.1", + "psr/clock": "^1.0", + "symfony/clock": "^6.3 || ^7.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/translation": "^4.4.18 || ^5.2.1|| ^6.0 || ^7.0" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "require-dev": { + "doctrine/dbal": "^3.6.3 || ^4.0", + "doctrine/orm": "^2.15.2 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.52.1", + "kylekatarnls/multi-tester": "^2.5.3", + "ondrejmirtes/better-reflection": "^6.25.0.4", + "phpmd/phpmd": "^2.15.0", + "phpstan/extension-installer": "^1.3.1", + "phpstan/phpstan": "^1.10.65", + "phpunit/phpunit": "^10.5.15", + "squizlabs/php_codesniffer": "^3.9.0" + }, + "bin": [ + "bin/carbon" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev", + "dev-2.x": "2.x-dev" + }, + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "https://markido.com" + }, + { + "name": "kylekatarnls", + "homepage": "https://github.com/kylekatarnls" + } + ], + "description": "An API extension for DateTime that supports 281 different languages.", + "homepage": "https://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "support": { + "docs": "https://carbon.nesbot.com/docs", + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "funding": [ + { + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", + "type": "tidelift" + } + ], + "time": "2024-04-18T16:35:06+00:00" + }, + { + "name": "nette/schema", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/nette/schema.git", + "reference": "a6d3a6d1f545f01ef38e60f375d1cf1f4de98188" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/schema/zipball/a6d3a6d1f545f01ef38e60f375d1cf1f4de98188", + "reference": "a6d3a6d1f545f01ef38e60f375d1cf1f4de98188", + "shasum": "" + }, + "require": { + "nette/utils": "^4.0", + "php": "8.1 - 8.3" + }, + "require-dev": { + "nette/tester": "^2.4", + "phpstan/phpstan-nette": "^1.0", + "tracy/tracy": "^2.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "📐 Nette Schema: validating data structures against a given Schema.", + "homepage": "https://nette.org", + "keywords": [ + "config", + "nette" + ], + "support": { + "issues": "https://github.com/nette/schema/issues", + "source": "https://github.com/nette/schema/tree/v1.3.0" + }, + "time": "2023-12-11T11:54:22+00:00" + }, + { + "name": "nette/utils", + "version": "v4.0.4", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/d3ad0aa3b9f934602cb3e3902ebccf10be34d218", + "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218", + "shasum": "" + }, + "require": { + "php": ">=8.0 <8.4" + }, + "conflict": { + "nette/finder": "<3", + "nette/schema": "<1.2.2" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "dev-master", + "nette/tester": "^2.5", + "phpstan/phpstan": "^1.0", + "tracy/tracy": "^2.9" }, "suggest": { - "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.235.5).", - "brianium/paratest": "Required to run tests in parallel (^7.0|^8.0).", - "ext-apcu": "Required to use the APC cache driver.", - "ext-fileinfo": "Required to use the Filesystem class.", - "ext-ftp": "Required to use the Flysystem FTP driver.", - "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", - "ext-memcached": "Required to use the memcache cache driver.", - "ext-pcntl": "Required to use all features of the queue worker and console signal trapping.", - "ext-pdo": "Required to use all database features.", - "ext-posix": "Required to use all features of the queue worker.", - "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", - "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", - "filp/whoops": "Required for friendly error pages in development (^2.14.3).", - "laravel/tinker": "Required to use the tinker console command (^2.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", - "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", - "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.3).", - "league/flysystem-read-only": "Required to use read-only disks (^3.3)", - "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", - "mockery/mockery": "Required to use mocking (^1.6).", - "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", - "pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^10.5|^11.0).", - "predis/predis": "Required to use the predis connector (^2.0.2).", - "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", - "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^7.0).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^7.0).", - "symfony/http-client": "Required to enable support for the Symfony API mail transports (^7.0).", - "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^7.0).", - "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^7.0).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^7.0)." + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "11.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { - "files": [ - "src/Illuminate/Collections/helpers.php", - "src/Illuminate/Events/functions.php", - "src/Illuminate/Filesystem/functions.php", - "src/Illuminate/Foundation/helpers.php", - "src/Illuminate/Support/helpers.php" - ], - "psr-4": { - "Illuminate\\": "src/Illuminate/", - "Illuminate\\Support\\": [ - "src/Illuminate/Macroable/", - "src/Illuminate/Collections/", - "src/Illuminate/Conditionable/" - ] - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" } ], - "description": "The Laravel Framework.", - "homepage": "https://laravel.com", + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", "keywords": [ - "framework", - "laravel" + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" ], "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v4.0.4" }, - "time": "2024-04-23T15:11:31+00:00" + "time": "2024-01-17T16:50:36+00:00" }, { - "name": "laravel/prompts", - "version": "v0.1.20", + "name": "nikic/php-parser", + "version": "v5.0.2", "source": { "type": "git", - "url": "https://github.com/laravel/prompts.git", - "reference": "bf9a360c484976692de0f3792f30066f4f4b34a2" + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/bf9a360c484976692de0f3792f30066f4f4b34a2", - "reference": "bf9a360c484976692de0f3792f30066f4f4b34a2", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", "shasum": "" }, "require": { - "ext-mbstring": "*", - "illuminate/collections": "^10.0|^11.0", - "php": "^8.1", - "symfony/console": "^6.2|^7.0" - }, - "conflict": { - "illuminate/console": ">=10.17.0 <10.25.0", - "laravel/framework": ">=10.17.0 <10.25.0" + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" }, "require-dev": { - "mockery/mockery": "^1.5", - "pestphp/pest": "^2.3", - "phpstan/phpstan": "^1.11", - "phpstan/phpstan-mockery": "^1.1" - }, - "suggest": { - "ext-pcntl": "Required for the spinner to be animated." + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, + "bin": [ + "bin/php-parse" + ], "type": "library", "extra": { "branch-alias": { - "dev-main": "0.1.x-dev" + "dev-master": "5.0-dev" } }, "autoload": { - "files": [ - "src/helpers.php" - ], "psr-4": { - "Laravel\\Prompts\\": "src/" + "PhpParser\\": "lib/PhpParser" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" ], "support": { - "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.20" + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" }, - "time": "2024-04-18T00:45:25+00:00" + "time": "2024-03-05T20:51:40+00:00" }, { - "name": "laravel/serializable-closure", - "version": "v1.3.3", + "name": "nunomaduro/termwind", + "version": "v2.0.1", "source": { "type": "git", - "url": "https://github.com/laravel/serializable-closure.git", - "reference": "3dbf8a8e914634c48d389c1234552666b3d43754" + "url": "https://github.com/nunomaduro/termwind.git", + "reference": "58c4c58cf23df7f498daeb97092e34f5259feb6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754", - "reference": "3dbf8a8e914634c48d389c1234552666b3d43754", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/58c4c58cf23df7f498daeb97092e34f5259feb6a", + "reference": "58c4c58cf23df7f498daeb97092e34f5259feb6a", "shasum": "" }, "require": { - "php": "^7.3|^8.0" + "ext-mbstring": "*", + "php": "^8.2", + "symfony/console": "^7.0.4" }, "require-dev": { - "nesbot/carbon": "^2.61", - "pestphp/pest": "^1.21.3", - "phpstan/phpstan": "^1.8.2", - "symfony/var-dumper": "^5.4.11" + "ergebnis/phpstan-rules": "^2.2.0", + "illuminate/console": "^11.0.0", + "laravel/pint": "^1.14.0", + "mockery/mockery": "^1.6.7", + "pestphp/pest": "^2.34.1", + "phpstan/phpstan": "^1.10.59", + "phpstan/phpstan-strict-rules": "^1.5.2", + "symfony/var-dumper": "^7.0.4", + "thecodingmachine/phpstan-strict-rules": "^1.0.0" }, "type": "library", "extra": { + "laravel": { + "providers": [ + "Termwind\\Laravel\\TermwindServiceProvider" + ] + }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { + "files": [ + "src/Functions.php" + ], "psr-4": { - "Laravel\\SerializableClosure\\": "src/" + "Termwind\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1346,68 +3861,87 @@ "MIT" ], "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - }, { "name": "Nuno Maduro", - "email": "nuno@laravel.com" + "email": "enunomaduro@gmail.com" } ], - "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "description": "Its like Tailwind CSS, but for the console.", "keywords": [ - "closure", - "laravel", - "serializable" + "cli", + "console", + "css", + "package", + "php", + "style" ], "support": { - "issues": "https://github.com/laravel/serializable-closure/issues", - "source": "https://github.com/laravel/serializable-closure" + "issues": "https://github.com/nunomaduro/termwind/issues", + "source": "https://github.com/nunomaduro/termwind/tree/v2.0.1" }, - "time": "2023-11-08T14:08:06+00:00" + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://github.com/xiCO2k", + "type": "github" + } + ], + "time": "2024-03-06T16:17:14+00:00" }, { - "name": "laravel/tinker", - "version": "v2.9.0", + "name": "nwidart/laravel-modules", + "version": "10.0.6", "source": { "type": "git", - "url": "https://github.com/laravel/tinker.git", - "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe" + "url": "https://github.com/nWidart/laravel-modules.git", + "reference": "a6f2c8b53ae7945ef41d296735e963cee885ebde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/502e0fe3f0415d06d5db1f83a472f0f3b754bafe", - "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe", + "url": "https://api.github.com/repos/nWidart/laravel-modules/zipball/a6f2c8b53ae7945ef41d296735e963cee885ebde", + "reference": "a6f2c8b53ae7945ef41d296735e963cee885ebde", "shasum": "" }, "require": { - "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", - "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", - "php": "^7.2.5|^8.0", - "psy/psysh": "^0.11.1|^0.12.0", - "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0" + "ext-json": "*", + "php": ">=8.1" }, "require-dev": { - "mockery/mockery": "~1.3.3|^1.4.2", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^8.5.8|^9.3.3" - }, - "suggest": { - "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0)." + "friendsofphp/php-cs-fixer": "^3.6", + "laravel/framework": "^10.41", + "mockery/mockery": "^1.5", + "orchestra/testbench": "^8.0", + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^10.0", + "spatie/phpunit-snapshot-assertions": "^5.0" }, "type": "library", "extra": { "laravel": { "providers": [ - "Laravel\\Tinker\\TinkerServiceProvider" - ] + "Nwidart\\Modules\\LaravelModulesServiceProvider" + ], + "aliases": { + "Module": "Nwidart\\Modules\\Facades\\Module" + } + }, + "branch-alias": { + "dev-master": "10.0-dev" } }, "autoload": { + "files": [ + "src/helpers.php" + ], "psr-4": { - "Laravel\\Tinker\\": "src/" + "Nwidart\\Modules\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1416,325 +3950,309 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "Nicolas Widart", + "email": "n.widart@gmail.com", + "homepage": "https://nicolaswidart.com", + "role": "Developer" } ], - "description": "Powerful REPL for the Laravel framework.", + "description": "Laravel Module management", "keywords": [ - "REPL", - "Tinker", "laravel", - "psysh" + "module", + "modules", + "nwidart", + "rad" ], "support": { - "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/v2.9.0" + "issues": "https://github.com/nWidart/laravel-modules/issues", + "source": "https://github.com/nWidart/laravel-modules/tree/10.0.6" }, - "time": "2024-01-04T16:10:04+00:00" + "funding": [ + { + "url": "https://github.com/dcblogdev", + "type": "github" + }, + { + "url": "https://github.com/nwidart", + "type": "github" + } + ], + "time": "2024-01-28T10:04:15+00:00" }, { - "name": "league/commonmark", - "version": "2.4.2", + "name": "paragonie/constant_time_encoding", + "version": "v2.6.3", "source": { "type": "git", - "url": "https://github.com/thephpleague/commonmark.git", - "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf" + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "58c3f47f650c94ec05a151692652a868995d2938" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/91c24291965bd6d7c46c46a12ba7492f83b1cadf", - "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", + "reference": "58c3f47f650c94ec05a151692652a868995d2938", "shasum": "" }, "require": { - "ext-mbstring": "*", - "league/config": "^1.1.1", - "php": "^7.4 || ^8.0", - "psr/event-dispatcher": "^1.0", - "symfony/deprecation-contracts": "^2.1 || ^3.0", - "symfony/polyfill-php80": "^1.16" + "php": "^7|^8" }, "require-dev": { - "cebe/markdown": "^1.0", - "commonmark/cmark": "0.30.3", - "commonmark/commonmark.js": "0.30.0", - "composer/package-versions-deprecated": "^1.8", - "embed/embed": "^4.4", - "erusev/parsedown": "^1.0", - "ext-json": "*", - "github/gfm": "0.29.0", - "michelf/php-markdown": "^1.4 || ^2.0", - "nyholm/psr7": "^1.5", - "phpstan/phpstan": "^1.8.2", - "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0", - "scrutinizer/ocular": "^1.8.1", - "symfony/finder": "^5.3 | ^6.0 || ^7.0", - "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 || ^7.0", - "unleashedtech/php-coding-standard": "^3.1.1", - "vimeo/psalm": "^4.24.0 || ^5.0.0" - }, - "suggest": { - "symfony/yaml": "v2.3+ required if using the Front Matter extension" + "phpunit/phpunit": "^6|^7|^8|^9", + "vimeo/psalm": "^1|^2|^3|^4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - } - }, "autoload": { "psr-4": { - "League\\CommonMark\\": "src" + "ParagonIE\\ConstantTime\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Colin O'Dell", - "email": "colinodell@gmail.com", - "homepage": "https://www.colinodell.com", - "role": "Lead Developer" + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" } ], - "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)", - "homepage": "https://commonmark.thephpleague.com", + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", "keywords": [ - "commonmark", - "flavored", - "gfm", - "github", - "github-flavored", - "markdown", - "md", - "parser" + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" ], "support": { - "docs": "https://commonmark.thephpleague.com/", - "forum": "https://github.com/thephpleague/commonmark/discussions", - "issues": "https://github.com/thephpleague/commonmark/issues", - "rss": "https://github.com/thephpleague/commonmark/releases.atom", - "source": "https://github.com/thephpleague/commonmark" + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" }, - "funding": [ - { - "url": "https://www.colinodell.com/sponsor", - "type": "custom" - }, - { - "url": "https://www.paypal.me/colinpodell/10.00", - "type": "custom" - }, - { - "url": "https://github.com/colinodell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/commonmark", - "type": "tidelift" - } - ], - "time": "2024-02-02T11:59:32+00:00" + "time": "2022-06-14T06:56:20+00:00" }, { - "name": "league/config", - "version": "v1.2.0", + "name": "phpoffice/phpspreadsheet", + "version": "1.29.0", "source": { "type": "git", - "url": "https://github.com/thephpleague/config.git", - "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3" + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", - "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0", "shasum": "" }, "require": { - "dflydev/dot-access-data": "^3.0.1", - "nette/schema": "^1.2", - "php": "^7.4 || ^8.0" + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "ezyang/htmlpurifier": "^4.15", + "maennchen/zipstream-php": "^2.1 || ^3.0", + "markbaker/complex": "^3.0", + "markbaker/matrix": "^3.0", + "php": "^7.4 || ^8.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { - "phpstan/phpstan": "^1.8.2", - "phpunit/phpunit": "^9.5.5", - "scrutinizer/ocular": "^1.8.1", - "unleashedtech/php-coding-standard": "^3.1", - "vimeo/psalm": "^4.7.3" + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", + "dompdf/dompdf": "^1.0 || ^2.0", + "friendsofphp/php-cs-fixer": "^3.2", + "mitoteam/jpgraph": "^10.3", + "mpdf/mpdf": "^8.1.1", + "phpcompatibility/php-compatibility": "^9.3", + "phpstan/phpstan": "^1.1", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0", + "squizlabs/php_codesniffer": "^3.7", + "tecnickcom/tcpdf": "^6.5" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.2-dev" - } + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "ext-intl": "PHP Internationalization Functions", + "mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" }, + "type": "library", "autoload": { "psr-4": { - "League\\Config\\": "src" + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Colin O'Dell", - "email": "colinodell@gmail.com", - "homepage": "https://www.colinodell.com", - "role": "Lead Developer" - } - ], - "description": "Define configuration arrays with strict schemas and access values with dot notation", - "homepage": "https://config.thephpleague.com", - "keywords": [ - "array", - "config", - "configuration", - "dot", - "dot-access", - "nested", - "schema" - ], - "support": { - "docs": "https://config.thephpleague.com/", - "issues": "https://github.com/thephpleague/config/issues", - "rss": "https://github.com/thephpleague/config/releases.atom", - "source": "https://github.com/thephpleague/config" - }, - "funding": [ + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, { - "url": "https://www.colinodell.com/sponsor", - "type": "custom" + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" }, { - "url": "https://www.paypal.me/colinpodell/10.00", - "type": "custom" + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" }, { - "url": "https://github.com/colinodell", - "type": "github" + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" } ], - "time": "2022-12-11T20:36:23+00:00" + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "support": { + "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0" + }, + "time": "2023-06-14T22:48:31+00:00" }, { - "name": "league/flysystem", - "version": "3.27.0", + "name": "phpoption/phpoption", + "version": "1.9.2", "source": { "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "4729745b1ab737908c7d055148c9a6b3e959832f" + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/4729745b1ab737908c7d055148c9a6b3e959832f", - "reference": "4729745b1ab737908c7d055148c9a6b3e959832f", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", "shasum": "" }, "require": { - "league/flysystem-local": "^3.0.0", - "league/mime-type-detection": "^1.0.0", - "php": "^8.0.2" - }, - "conflict": { - "async-aws/core": "<1.19.0", - "async-aws/s3": "<1.14.0", - "aws/aws-sdk-php": "3.209.31 || 3.210.0", - "guzzlehttp/guzzle": "<7.0", - "guzzlehttp/ringphp": "<1.1.1", - "phpseclib/phpseclib": "3.0.15", - "symfony/http-client": "<5.2" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "async-aws/s3": "^1.5 || ^2.0", - "async-aws/simple-s3": "^1.1 || ^2.0", - "aws/aws-sdk-php": "^3.295.10", - "composer/semver": "^3.0", - "ext-fileinfo": "*", - "ext-ftp": "*", - "ext-zip": "*", - "friendsofphp/php-cs-fixer": "^3.5", - "google/cloud-storage": "^1.23", - "microsoft/azure-storage-blob": "^1.1", - "phpseclib/phpseclib": "^3.0.36", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.5.11|^10.0", - "sabre/dav": "^4.6.0" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, + "branch-alias": { + "dev-master": "1.9-dev" + } }, - "type": "library", "autoload": { "psr-4": { - "League\\Flysystem\\": "src" + "PhpOption\\": "src/PhpOption/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache-2.0" ], "authors": [ { - "name": "Frank de Jonge", - "email": "info@frankdejonge.nl" + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], - "description": "File storage abstraction for PHP", + "description": "Option Type for PHP", "keywords": [ - "WebDAV", - "aws", - "cloud", - "file", - "files", - "filesystem", - "filesystems", - "ftp", - "s3", - "sftp", - "storage" + "language", + "option", + "php", + "type" ], "support": { - "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.27.0" + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" }, "funding": [ { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" + "url": "https://github.com/GrahamCampbell", + "type": "github" }, { - "url": "https://github.com/frankdejonge", - "type": "github" + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" } ], - "time": "2024-04-07T19:17:50+00:00" + "time": "2023-11-12T21:59:55+00:00" }, { - "name": "league/flysystem-local", - "version": "3.25.1", + "name": "pragmarx/google2fa", + "version": "v8.0.1", "source": { "type": "git", - "url": "https://github.com/thephpleague/flysystem-local.git", - "reference": "61a6a90d6e999e4ddd9ce5adb356de0939060b92" + "url": "https://github.com/antonioribeiro/google2fa.git", + "reference": "80c3d801b31fe165f8fe99ea085e0a37834e1be3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/61a6a90d6e999e4ddd9ce5adb356de0939060b92", - "reference": "61a6a90d6e999e4ddd9ce5adb356de0939060b92", + "url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/80c3d801b31fe165f8fe99ea085e0a37834e1be3", + "reference": "80c3d801b31fe165f8fe99ea085e0a37834e1be3", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "league/flysystem": "^3.0.0", - "league/mime-type-detection": "^1.0.0", - "php": "^8.0.2" + "paragonie/constant_time_encoding": "^1.0|^2.0", + "php": "^7.1|^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.18", + "phpunit/phpunit": "^7.5.15|^8.5|^9.0" }, "type": "library", "autoload": { "psr-4": { - "League\\Flysystem\\Local\\": "" + "PragmaRX\\Google2FA\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1743,60 +4261,50 @@ ], "authors": [ { - "name": "Frank de Jonge", - "email": "info@frankdejonge.nl" + "name": "Antonio Carlos Ribeiro", + "email": "acr@antoniocarlosribeiro.com", + "role": "Creator & Designer" } ], - "description": "Local filesystem adapter for Flysystem.", + "description": "A One Time Password Authentication package, compatible with Google Authenticator.", "keywords": [ - "Flysystem", - "file", - "files", - "filesystem", - "local" + "2fa", + "Authentication", + "Two Factor Authentication", + "google2fa" ], "support": { - "source": "https://github.com/thephpleague/flysystem-local/tree/3.25.1" + "issues": "https://github.com/antonioribeiro/google2fa/issues", + "source": "https://github.com/antonioribeiro/google2fa/tree/v8.0.1" }, - "funding": [ - { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", - "type": "github" - } - ], - "time": "2024-03-15T19:58:44+00:00" + "time": "2022-06-13T21:57:56+00:00" }, { - "name": "league/mime-type-detection", - "version": "1.15.0", + "name": "psr/cache", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301" + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", - "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.2", - "phpstan/phpstan": "^0.12.68", - "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" + "php": ">=8.0.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { "psr-4": { - "League\\MimeTypeDetection\\": "src" + "Psr\\Cache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1805,92 +4313,42 @@ ], "authors": [ { - "name": "Frank de Jonge", - "email": "info@frankdejonge.nl" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Mime-type detection for Flysystem", + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], "support": { - "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.15.0" + "source": "https://github.com/php-fig/cache/tree/3.0.0" }, - "funding": [ - { - "url": "https://github.com/frankdejonge", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/flysystem", - "type": "tidelift" - } - ], - "time": "2024-01-28T23:22:08+00:00" + "time": "2021-02-03T23:26:27+00:00" }, { - "name": "monolog/monolog", - "version": "3.6.0", + "name": "psr/clock", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654" + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", - "reference": "4b18b21a5527a3d5ffdac2fd35d3ab25a9597654", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", "shasum": "" }, "require": { - "php": ">=8.1", - "psr/log": "^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "3.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2.0", - "guzzlehttp/guzzle": "^7.4.5", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^10.5.17", - "predis/predis": "^1.1 || ^2", - "ruflin/elastica": "^7", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "ext-openssl": "Required to send log messages using SSL", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + "php": "^7.0 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, "autoload": { "psr-4": { - "Monolog\\": "src/Monolog" + "Psr\\Clock\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1899,95 +4357,51 @@ ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "https://github.com/Seldaek/monolog", + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", "keywords": [ - "log", - "logging", - "psr-3" + "clock", + "now", + "psr", + "psr-20", + "time" ], "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.6.0" + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2024-04-12T21:02:21+00:00" + "time": "2022-11-25T14:36:26+00:00" }, { - "name": "nesbot/carbon", - "version": "3.3.0", + "name": "psr/container", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "7219739c4e01d4680c980545821733b6ed8ee880" + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7219739c4e01d4680c980545821733b6ed8ee880", - "reference": "7219739c4e01d4680c980545821733b6ed8ee880", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "carbonphp/carbon-doctrine-types": "*", - "ext-json": "*", - "php": "^8.1", - "psr/clock": "^1.0", - "symfony/clock": "^6.3 || ^7.0", - "symfony/polyfill-mbstring": "^1.0", - "symfony/translation": "^4.4.18 || ^5.2.1|| ^6.0 || ^7.0" - }, - "provide": { - "psr/clock-implementation": "1.0" - }, - "require-dev": { - "doctrine/dbal": "^3.6.3 || ^4.0", - "doctrine/orm": "^2.15.2 || ^3.0", - "friendsofphp/php-cs-fixer": "^3.52.1", - "kylekatarnls/multi-tester": "^2.5.3", - "ondrejmirtes/better-reflection": "^6.25.0.4", - "phpmd/phpmd": "^2.15.0", - "phpstan/extension-installer": "^1.3.1", - "phpstan/phpstan": "^1.10.65", - "phpunit/phpunit": "^10.5.15", - "squizlabs/php_codesniffer": "^3.9.0" + "php": ">=7.4.0" }, - "bin": [ - "bin/carbon" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev", - "dev-2.x": "2.x-dev" - }, - "laravel": { - "providers": [ - "Carbon\\Laravel\\ServiceProvider" - ] - }, - "phpstan": { - "includes": [ - "extension.neon" - ] + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Carbon\\": "src/Carbon/" + "Psr\\Container\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1996,296 +4410,208 @@ ], "authors": [ { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "https://markido.com" - }, - { - "name": "kylekatarnls", - "homepage": "https://github.com/kylekatarnls" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "https://carbon.nesbot.com", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "date", - "datetime", - "time" + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], "support": { - "docs": "https://carbon.nesbot.com/docs", - "issues": "https://github.com/briannesbitt/Carbon/issues", - "source": "https://github.com/briannesbitt/Carbon" + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "funding": [ - { - "url": "https://github.com/sponsors/kylekatarnls", - "type": "github" - }, - { - "url": "https://opencollective.com/Carbon#sponsor", - "type": "opencollective" - }, - { - "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", - "type": "tidelift" - } - ], - "time": "2024-04-18T16:35:06+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { - "name": "nette/schema", - "version": "v1.3.0", + "name": "psr/event-dispatcher", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/nette/schema.git", - "reference": "a6d3a6d1f545f01ef38e60f375d1cf1f4de98188" + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/a6d3a6d1f545f01ef38e60f375d1cf1f4de98188", - "reference": "a6d3a6d1f545f01ef38e60f375d1cf1f4de98188", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", "shasum": "" }, "require": { - "nette/utils": "^4.0", - "php": "8.1 - 8.3" - }, - "require-dev": { - "nette/tester": "^2.4", - "phpstan/phpstan-nette": "^1.0", - "tracy/tracy": "^2.8" + "php": ">=7.2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause", - "GPL-2.0-only", - "GPL-3.0-only" + "MIT" ], "authors": [ { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - }, - { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "📐 Nette Schema: validating data structures against a given Schema.", - "homepage": "https://nette.org", + "description": "Standard interfaces for event handling.", "keywords": [ - "config", - "nette" + "events", + "psr", + "psr-14" ], "support": { - "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.3.0" + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" }, - "time": "2023-12-11T11:54:22+00:00" + "time": "2019-01-08T18:20:26+00:00" }, { - "name": "nette/utils", - "version": "v4.0.4", + "name": "psr/http-client", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/nette/utils.git", - "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218" + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/d3ad0aa3b9f934602cb3e3902ebccf10be34d218", - "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { - "php": ">=8.0 <8.4" - }, - "conflict": { - "nette/finder": "<3", - "nette/schema": "<1.2.2" - }, - "require-dev": { - "jetbrains/phpstorm-attributes": "dev-master", - "nette/tester": "^2.5", - "phpstan/phpstan": "^1.0", - "tracy/tracy": "^2.9" - }, - "suggest": { - "ext-gd": "to use Image", - "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", - "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", - "ext-json": "to use Nette\\Utils\\Json", - "ext-mbstring": "to use Strings::lower() etc...", - "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()" + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause", - "GPL-2.0-only", - "GPL-3.0-only" + "MIT" ], "authors": [ { - "name": "David Grudl", - "homepage": "https://davidgrudl.com" - }, - { - "name": "Nette Community", - "homepage": "https://nette.org/contributors" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", - "homepage": "https://nette.org", + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", "keywords": [ - "array", - "core", - "datetime", - "images", - "json", - "nette", - "paginator", - "password", - "slugify", - "string", - "unicode", - "utf-8", - "utility", - "validation" + "http", + "http-client", + "psr", + "psr-18" ], "support": { - "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.4" + "source": "https://github.com/php-fig/http-client" }, - "time": "2024-01-17T16:50:36+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { - "name": "nikic/php-parser", - "version": "v5.0.2", + "name": "psr/http-factory", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" + "url": "https://github.com/php-fig/http-factory.git", + "reference": "e616d01114759c4c489f93b099585439f795fe35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", - "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", "shasum": "" }, "require": { - "ext-ctype": "*", - "ext-json": "*", - "ext-tokenizer": "*", - "php": ">=7.4" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "php": ">=7.0.0", + "psr/http-message": "^1.0 || ^2.0" }, - "bin": [ - "bin/php-parse" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "PhpParser\\": "lib/PhpParser" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Nikita Popov" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "A PHP parser written in PHP", + "description": "Common interfaces for PSR-7 HTTP message factories", "keywords": [ - "parser", - "php" + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" ], "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" }, - "time": "2024-03-05T20:51:40+00:00" + "time": "2023-04-10T20:10:41+00:00" }, { - "name": "nunomaduro/termwind", - "version": "v2.0.1", + "name": "psr/http-message", + "version": "2.0", "source": { "type": "git", - "url": "https://github.com/nunomaduro/termwind.git", - "reference": "58c4c58cf23df7f498daeb97092e34f5259feb6a" + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/58c4c58cf23df7f498daeb97092e34f5259feb6a", - "reference": "58c4c58cf23df7f498daeb97092e34f5259feb6a", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { - "ext-mbstring": "*", - "php": "^8.2", - "symfony/console": "^7.0.4" - }, - "require-dev": { - "ergebnis/phpstan-rules": "^2.2.0", - "illuminate/console": "^11.0.0", - "laravel/pint": "^1.14.0", - "mockery/mockery": "^1.6.7", - "pestphp/pest": "^2.34.1", - "phpstan/phpstan": "^1.10.59", - "phpstan/phpstan-strict-rules": "^1.5.2", - "symfony/var-dumper": "^7.0.4", - "thecodingmachine/phpstan-strict-rules": "^1.0.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { - "laravel": { - "providers": [ - "Termwind\\Laravel\\TermwindServiceProvider" - ] - }, "branch-alias": { - "dev-2.x": "2.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "files": [ - "src/Functions.php" - ], "psr-4": { - "Termwind\\": "src/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2294,135 +4620,101 @@ ], "authors": [ { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Its like Tailwind CSS, but for the console.", + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ - "cli", - "console", - "css", - "package", - "php", - "style" + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" ], "support": { - "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v2.0.1" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "funding": [ - { - "url": "https://www.paypal.com/paypalme/enunomaduro", - "type": "custom" - }, - { - "url": "https://github.com/nunomaduro", - "type": "github" - }, - { - "url": "https://github.com/xiCO2k", - "type": "github" - } - ], - "time": "2024-03-06T16:17:14+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { - "name": "phpoption/phpoption", - "version": "1.9.2", + "name": "psr/log", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "php": ">=8.0.0" }, "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": true - }, "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "PhpOption\\": "src/PhpOption/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh" - }, - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Option Type for PHP", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ - "language", - "option", - "php", - "type" + "log", + "psr", + "psr-3" ], "support": { - "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", - "type": "tidelift" - } - ], - "time": "2023-11-12T21:59:55+00:00" + "time": "2021-07-14T16:46:02+00:00" }, { - "name": "psr/clock", - "version": "1.0.0", + "name": "psr/simple-cache", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/clock.git", - "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", - "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0" + "php": ">=8.0.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, "autoload": { "psr-4": { - "Psr\\Clock\\": "src/" + "Psr\\SimpleCache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2435,47 +4727,71 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interface for reading the clock.", - "homepage": "https://github.com/php-fig/clock", + "description": "Common interfaces for simple caching", "keywords": [ - "clock", - "now", + "cache", + "caching", "psr", - "psr-20", - "time" + "psr-16", + "simple-cache" ], "support": { - "issues": "https://github.com/php-fig/clock/issues", - "source": "https://github.com/php-fig/clock/tree/1.0.0" + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" }, - "time": "2022-11-25T14:36:26+00:00" + "time": "2021-10-29T13:26:27+00:00" }, { - "name": "psr/container", - "version": "2.0.2", + "name": "psy/psysh", + "version": "v0.12.3", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + "url": "https://github.com/bobthecow/psysh.git", + "reference": "b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73", + "reference": "b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73", "shasum": "" }, "require": { - "php": ">=7.4.0" + "ext-json": "*", + "ext-tokenizer": "*", + "nikic/php-parser": "^5.0 || ^4.0", + "php": "^8.0 || ^7.4", + "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" + }, + "conflict": { + "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." }, + "bin": [ + "bin/psysh" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-main": "0.12.x-dev" + }, + "bamarni-bin": { + "bin-links": false, + "forward-command": false } }, "autoload": { + "files": [ + "src/functions.php" + ], "psr-4": { - "Psr\\Container\\": "src/" + "Psy\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2484,52 +4800,51 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "REPL", + "console", + "interactive", + "shell" ], "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" + "issues": "https://github.com/bobthecow/psysh/issues", + "source": "https://github.com/bobthecow/psysh/tree/v0.12.3" }, - "time": "2021-11-05T16:47:00+00:00" + "time": "2024-04-02T15:57:53+00:00" }, { - "name": "psr/event-dispatcher", - "version": "1.0.0", + "name": "ralouphie/getallheaders", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=5.6" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" }, + "type": "library", "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } + "files": [ + "src/getallheaders.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2537,49 +4852,68 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" } ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], + "description": "A polyfill for getallheaders.", "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" }, - "time": "2019-01-08T18:20:26+00:00" + "time": "2019-03-08T08:55:37+00:00" }, { - "name": "psr/http-client", - "version": "1.0.3", + "name": "ramsey/collection", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + "url": "https://github.com/ramsey/collection.git", + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" + "php": "^8.1" + }, + "require-dev": { + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.28.3", + "fakerphp/faker": "^1.21", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^1.0", + "mockery/mockery": "^1.5", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpcsstandards/phpcsutils": "^1.0.0-rc1", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18.4", + "ramsey/coding-standard": "^2.0.3", + "ramsey/conventional-commits": "^1.3", + "vimeo/psalm": "^5.4" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" } }, "autoload": { "psr-4": { - "Psr\\Http\\Client\\": "src/" + "Ramsey\\Collection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2588,104 +4922,152 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" } ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", + "description": "A PHP library for representing and manipulating collections.", "keywords": [ - "http", - "http-client", - "psr", - "psr-18" + "array", + "collection", + "hash", + "map", + "queue", + "set" ], "support": { - "source": "https://github.com/php-fig/http-client" + "issues": "https://github.com/ramsey/collection/issues", + "source": "https://github.com/ramsey/collection/tree/2.0.0" }, - "time": "2023-09-23T14:17:50+00:00" + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", + "type": "tidelift" + } + ], + "time": "2022-12-31T21:50:55+00:00" }, { - "name": "psr/http-factory", - "version": "1.0.2", + "name": "ramsey/uuid", + "version": "4.7.5", "source": { "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "url": "https://github.com/ramsey/uuid.git", + "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", "shasum": "" }, "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0 || ^2.0" + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11", + "ext-json": "*", + "php": "^8.0", + "ramsey/collection": "^1.2 || ^2.0" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "captainhook/captainhook": "^5.10", + "captainhook/plugin-composer": "^5.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.8", + "ergebnis/composer-normalize": "^2.15", + "mockery/mockery": "^1.3", + "paragonie/random-lib": "^2", + "php-mock/php-mock": "^2.2", + "php-mock/php-mock-mockery": "^1.3", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpbench/phpbench": "^1.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^8.5 || ^9", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.9" + }, + "suggest": { + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" + "captainhook": { + "force-install": true } }, "autoload": { + "files": [ + "src/functions.php" + ], "psr-4": { - "Psr\\Http\\Message\\": "src/" + "Ramsey\\Uuid\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" + "guid", + "identifier", + "uuid" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "issues": "https://github.com/ramsey/uuid/issues", + "source": "https://github.com/ramsey/uuid/tree/4.7.5" }, - "time": "2023-04-10T20:10:41+00:00" + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", + "type": "tidelift" + } + ], + "time": "2023-11-08T05:53:05+00:00" }, { - "name": "psr/http-message", - "version": "2.0", + "name": "rize/uri-template", + "version": "0.3.6", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + "url": "https://github.com/rize/UriTemplate.git", + "reference": "34efe65c79710eed0883884f2285ae6d4a0aad19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "url": "https://api.github.com/repos/rize/UriTemplate/zipball/34efe65c79710eed0883884f2285ae6d4a0aad19", + "reference": "34efe65c79710eed0883884f2285ae6d4a0aad19", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": ">=5.3.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } + "require-dev": { + "phpunit/phpunit": "~4.8.36" }, + "type": "library", "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" + "Rize\\": "src/Rize" } }, "notification-url": "https://packagist.org/downloads/", @@ -2694,51 +5076,73 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Marut K", + "homepage": "http://twitter.com/rezigned" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", + "description": "PHP URI Template (RFC 6570) supports both expansion & extraction", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" + "RFC 6570", + "template", + "uri" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" + "issues": "https://github.com/rize/UriTemplate/issues", + "source": "https://github.com/rize/UriTemplate/tree/0.3.6" }, - "time": "2023-04-04T09:54:51+00:00" + "funding": [ + { + "url": "https://www.paypal.me/rezigned", + "type": "custom" + }, + { + "url": "https://github.com/rezigned", + "type": "github" + }, + { + "url": "https://opencollective.com/rize-uri-template", + "type": "open_collective" + } + ], + "time": "2024-03-10T08:07:49+00:00" }, { - "name": "psr/log", - "version": "3.0.0", + "name": "spatie/image", + "version": "3.5.0", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "url": "https://github.com/spatie/image.git", + "reference": "05166a6fae90b4c2ab57ff2d25d7f97a5e29f47b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/spatie/image/zipball/05166a6fae90b4c2ab57ff2d25d7f97a5e29f47b", + "reference": "05166a6fae90b4c2ab57ff2d25d7f97a5e29f47b", "shasum": "" }, "require": { - "php": ">=8.0.0" + "ext-exif": "*", + "ext-json": "*", + "ext-mbstring": "*", + "php": "^8.2", + "spatie/image-optimizer": "^1.7.2", + "spatie/temporary-directory": "^2.2", + "symfony/process": "^6.4|^7.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } + "require-dev": { + "ext-gd": "*", + "ext-imagick": "*", + "pestphp/pest": "^2.28", + "phpstan/phpstan": "^1.10.50", + "spatie/pest-plugin-snapshots": "^2.1", + "spatie/pixelmatch-php": "^1.0", + "spatie/ray": "^1.40.1", + "symfony/var-dumper": "^6.4|7.0" }, + "type": "library", "autoload": { "psr-4": { - "Psr\\Log\\": "src" + "Spatie\\Image\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2747,48 +5151,62 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "Manipulate images with an expressive API", + "homepage": "https://github.com/spatie/image", "keywords": [ - "log", - "psr", - "psr-3" + "image", + "spatie" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" + "source": "https://github.com/spatie/image/tree/3.5.0" }, - "time": "2021-07-14T16:46:02+00:00" + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2024-04-17T13:16:06+00:00" }, { - "name": "psr/simple-cache", - "version": "3.0.0", + "name": "spatie/image-optimizer", + "version": "1.7.2", "source": { "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" + "url": "https://github.com/spatie/image-optimizer.git", + "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", + "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/62f7463483d1bd975f6f06025d89d42a29608fe1", + "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1", "shasum": "" }, "require": { - "php": ">=8.0.0" + "ext-fileinfo": "*", + "php": "^7.3|^8.0", + "psr/log": "^1.0 | ^2.0 | ^3.0", + "symfony/process": "^4.2|^5.0|^6.0|^7.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } + "require-dev": { + "pestphp/pest": "^1.21", + "phpunit/phpunit": "^8.5.21|^9.4.4", + "symfony/var-dumper": "^4.2|^5.0|^6.0|^7.0" }, + "type": "library", "autoload": { "psr-4": { - "Psr\\SimpleCache\\": "src/" + "Spatie\\ImageOptimizer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2797,75 +5215,90 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" } ], - "description": "Common interfaces for simple caching", + "description": "Easily optimize images using PHP", + "homepage": "https://github.com/spatie/image-optimizer", "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" + "image-optimizer", + "spatie" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" + "issues": "https://github.com/spatie/image-optimizer/issues", + "source": "https://github.com/spatie/image-optimizer/tree/1.7.2" }, - "time": "2021-10-29T13:26:27+00:00" + "time": "2023-11-03T10:08:02+00:00" }, { - "name": "psy/psysh", - "version": "v0.12.3", + "name": "spatie/laravel-medialibrary", + "version": "11.4.7", "source": { "type": "git", - "url": "https://github.com/bobthecow/psysh.git", - "reference": "b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73" + "url": "https://github.com/spatie/laravel-medialibrary.git", + "reference": "85f5f8284f827b8f2b426943e357e3df117ad1f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73", - "reference": "b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73", + "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/85f5f8284f827b8f2b426943e357e3df117ad1f5", + "reference": "85f5f8284f827b8f2b426943e357e3df117ad1f5", "shasum": "" }, "require": { + "ext-exif": "*", + "ext-fileinfo": "*", "ext-json": "*", - "ext-tokenizer": "*", - "nikic/php-parser": "^5.0 || ^4.0", - "php": "^8.0 || ^7.4", - "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", - "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" + "illuminate/bus": "^10.0|^11.0", + "illuminate/conditionable": "^10.0|^11.0", + "illuminate/console": "^10.0|^11.0", + "illuminate/database": "^10.0|^11.0", + "illuminate/pipeline": "^10.0|^11.0", + "illuminate/support": "^10.0|^11.0", + "maennchen/zipstream-php": "^3.1", + "php": "^8.2", + "spatie/image": "^3.3.2", + "spatie/laravel-package-tools": "^1.16.1", + "spatie/temporary-directory": "^2.2", + "symfony/console": "^6.4.1|^7.0" }, "conflict": { - "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" + "php-ffmpeg/php-ffmpeg": "<0.6.1" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2" + "aws/aws-sdk-php": "^3.293.10", + "ext-imagick": "*", + "ext-pdo_sqlite": "*", + "ext-zip": "*", + "guzzlehttp/guzzle": "^7.8.1", + "larastan/larastan": "^2.7", + "league/flysystem-aws-s3-v3": "^3.22", + "mockery/mockery": "^1.6.7", + "orchestra/testbench": "^7.0|^8.17|^9.0", + "pestphp/pest": "^2.28", + "phpstan/extension-installer": "^1.3.1", + "spatie/laravel-ray": "^1.33", + "spatie/pdf-to-image": "^2.2", + "spatie/pest-plugin-snapshots": "^2.1" }, "suggest": { - "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", - "ext-pdo-sqlite": "The doc command requires SQLite to work.", - "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." + "league/flysystem-aws-s3-v3": "Required to use AWS S3 file storage", + "php-ffmpeg/php-ffmpeg": "Required for generating video thumbnails", + "spatie/pdf-to-image": "Required for generating thumbnails of PDFs and SVGs" }, - "bin": [ - "bin/psysh" - ], "type": "library", "extra": { - "branch-alias": { - "dev-main": "0.12.x-dev" - }, - "bamarni-bin": { - "bin-links": false, - "forward-command": false + "laravel": { + "providers": [ + "Spatie\\MediaLibrary\\MediaLibraryServiceProvider" + ] } }, "autoload": { - "files": [ - "src/functions.php" - ], "psr-4": { - "Psy\\": "src/" + "Spatie\\MediaLibrary\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2874,51 +5307,70 @@ ], "authors": [ { - "name": "Justin Hileman", - "email": "justin@justinhileman.info", - "homepage": "http://justinhileman.com" + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" } ], - "description": "An interactive shell for modern PHP.", - "homepage": "http://psysh.org", + "description": "Associate files with Eloquent models", + "homepage": "https://github.com/spatie/laravel-medialibrary", "keywords": [ - "REPL", - "console", - "interactive", - "shell" + "cms", + "conversion", + "downloads", + "images", + "laravel", + "laravel-medialibrary", + "media", + "spatie" ], "support": { - "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.12.3" + "issues": "https://github.com/spatie/laravel-medialibrary/issues", + "source": "https://github.com/spatie/laravel-medialibrary/tree/11.4.7" }, - "time": "2024-04-02T15:57:53+00:00" + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2024-04-24T13:42:14+00:00" }, { - "name": "ralouphie/getallheaders", - "version": "3.0.3", + "name": "spatie/laravel-package-tools", + "version": "1.16.4", "source": { "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" + "url": "https://github.com/spatie/laravel-package-tools.git", + "reference": "ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53", + "reference": "ddf678e78d7f8b17e5cdd99c0c3413a4a6592e53", "shasum": "" }, "require": { - "php": ">=5.6" + "illuminate/contracts": "^9.28|^10.0|^11.0", + "php": "^8.0" }, "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" + "mockery/mockery": "^1.5", + "orchestra/testbench": "^7.7|^8.0", + "pestphp/pest": "^1.22", + "phpunit/phpunit": "^9.5.24", + "spatie/pest-plugin-test-time": "^1.1" }, "type": "library", "autoload": { - "files": [ - "src/getallheaders.php" - ] + "psr-4": { + "Spatie\\LaravelPackageTools\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2926,68 +5378,68 @@ ], "authors": [ { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" } ], - "description": "A polyfill for getallheaders.", + "description": "Tools for creating Laravel packages", + "homepage": "https://github.com/spatie/laravel-package-tools", + "keywords": [ + "laravel-package-tools", + "spatie" + ], "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" + "issues": "https://github.com/spatie/laravel-package-tools/issues", + "source": "https://github.com/spatie/laravel-package-tools/tree/1.16.4" }, - "time": "2019-03-08T08:55:37+00:00" + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2024-03-20T07:29:11+00:00" }, { - "name": "ramsey/collection", - "version": "2.0.0", + "name": "spatie/laravel-translatable", + "version": "6.6.2", "source": { "type": "git", - "url": "https://github.com/ramsey/collection.git", - "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" + "url": "https://github.com/spatie/laravel-translatable.git", + "reference": "529b4e89ad0b0982d9c635696260661d1cf2612c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", - "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "url": "https://api.github.com/repos/spatie/laravel-translatable/zipball/529b4e89ad0b0982d9c635696260661d1cf2612c", + "reference": "529b4e89ad0b0982d9c635696260661d1cf2612c", "shasum": "" }, "require": { - "php": "^8.1" + "illuminate/database": "^9.0|^10.0|^11.0", + "illuminate/support": "^9.0|^10.0|^11.0", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.11" }, "require-dev": { - "captainhook/plugin-composer": "^5.3", - "ergebnis/composer-normalize": "^2.28.3", - "fakerphp/faker": "^1.21", - "hamcrest/hamcrest-php": "^2.0", - "jangregor/phpstan-prophecy": "^1.0", - "mockery/mockery": "^1.5", - "php-parallel-lint/php-console-highlighter": "^1.0", - "php-parallel-lint/php-parallel-lint": "^1.3", - "phpcsstandards/phpcsutils": "^1.0.0-rc1", - "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-mockery": "^1.1", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5", - "psalm/plugin-mockery": "^1.1", - "psalm/plugin-phpunit": "^0.18.4", - "ramsey/coding-standard": "^2.0.3", - "ramsey/conventional-commits": "^1.3", - "vimeo/psalm": "^5.4" + "mockery/mockery": "^1.4", + "orchestra/testbench": "^7.0|^8.0|^9.0", + "pestphp/pest": "^1.20|^2.0" }, "type": "library", "extra": { - "captainhook": { - "force-install": true + "laravel": { + "providers": [ + "Spatie\\Translatable\\TranslatableServiceProvider" + ] }, - "ramsey/conventional-commits": { - "configFile": "conventional-commits.json" + "aliases": { + "Translatable": "Spatie\\Translatable\\Facades\\Translatable" } }, "autoload": { "psr-4": { - "Ramsey\\Collection\\": "src/" + "Spatie\\Translatable\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2996,127 +5448,101 @@ ], "authors": [ { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + }, + { + "name": "Sebastian De Deyne", + "email": "sebastian@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" } ], - "description": "A PHP library for representing and manipulating collections.", + "description": "A trait to make an Eloquent model hold translations", + "homepage": "https://github.com/spatie/laravel-translatable", "keywords": [ - "array", - "collection", - "hash", - "map", - "queue", - "set" + "eloquent", + "i8n", + "laravel-translatable", + "model", + "multilingual", + "spatie", + "translate" ], "support": { - "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/2.0.0" + "issues": "https://github.com/spatie/laravel-translatable/issues", + "source": "https://github.com/spatie/laravel-translatable/tree/6.6.2" }, "funding": [ { - "url": "https://github.com/ramsey", + "url": "https://github.com/spatie", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", - "type": "tidelift" } ], - "time": "2022-12-31T21:50:55+00:00" + "time": "2024-03-01T10:24:53+00:00" }, { - "name": "ramsey/uuid", - "version": "4.7.5", + "name": "spatie/temporary-directory", + "version": "2.2.1", "source": { "type": "git", - "url": "https://github.com/ramsey/uuid.git", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" + "url": "https://github.com/spatie/temporary-directory.git", + "reference": "76949fa18f8e1a7f663fd2eaa1d00e0bcea0752a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "url": "https://api.github.com/repos/spatie/temporary-directory/zipball/76949fa18f8e1a7f663fd2eaa1d00e0bcea0752a", + "reference": "76949fa18f8e1a7f663fd2eaa1d00e0bcea0752a", "shasum": "" }, - "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11", - "ext-json": "*", - "php": "^8.0", - "ramsey/collection": "^1.2 || ^2.0" - }, - "replace": { - "rhumsaa/uuid": "self.version" - }, - "require-dev": { - "captainhook/captainhook": "^5.10", - "captainhook/plugin-composer": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "doctrine/annotations": "^1.8", - "ergebnis/composer-normalize": "^2.15", - "mockery/mockery": "^1.3", - "paragonie/random-lib": "^2", - "php-mock/php-mock": "^2.2", - "php-mock/php-mock-mockery": "^1.3", - "php-parallel-lint/php-parallel-lint": "^1.1", - "phpbench/phpbench": "^1.0", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-mockery": "^1.1", - "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^8.5 || ^9", - "ramsey/composer-repl": "^1.4", - "slevomat/coding-standard": "^8.4", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.9" - }, - "suggest": { - "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", - "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", - "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", - "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." - }, - "type": "library", - "extra": { - "captainhook": { - "force-install": true - } + "require": { + "php": "^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" }, + "type": "library", "autoload": { - "files": [ - "src/functions.php" - ], "psr-4": { - "Ramsey\\Uuid\\": "src/" + "Spatie\\TemporaryDirectory\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", + "authors": [ + { + "name": "Alex Vanderbist", + "email": "alex@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Easily create, use and destroy temporary directories", + "homepage": "https://github.com/spatie/temporary-directory", "keywords": [ - "guid", - "identifier", - "uuid" + "php", + "spatie", + "temporary-directory" ], "support": { - "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.5" + "issues": "https://github.com/spatie/temporary-directory/issues", + "source": "https://github.com/spatie/temporary-directory/tree/2.2.1" }, "funding": [ { - "url": "https://github.com/ramsey", - "type": "github" + "url": "https://spatie.be/open-source/support-us", + "type": "custom" }, { - "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", - "type": "tidelift" + "url": "https://github.com/spatie", + "type": "github" } ], - "time": "2023-11-08T05:53:05+00:00" + "time": "2023-12-25T11:46:58+00:00" }, { "name": "symfony/clock", @@ -5468,6 +7894,365 @@ }, "time": "2023-12-08T13:03:43+00:00" }, + { + "name": "tomatophp/console-helpers", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/tomatophp/console-helpers.git", + "reference": "69dd818a2bfa7d038467fb526be6c9b573d36a34" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tomatophp/console-helpers/zipball/69dd818a2bfa7d038467fb526be6c9b573d36a34", + "reference": "69dd818a2bfa7d038467fb526be6c9b573d36a34", + "shasum": "" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "TomatoPHP\\ConsoleHelpers\\ConsoleHelpersServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "TomatoPHP\\ConsoleHelpers\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fady Mondy", + "email": "EngFadyMondy@gmail.com" + } + ], + "description": "tons of helper you need for you artisan command line application", + "keywords": [ + "application", + "artisan", + "command", + "console", + "helpers", + "line" + ], + "support": { + "issues": "https://github.com/tomatophp/console-helpers/issues", + "source": "https://github.com/tomatophp/console-helpers/tree/v1.1.0" + }, + "funding": [ + { + "url": "https://github.com/3x1io", + "type": "github" + } + ], + "time": "2023-02-12T12:00:38+00:00" + }, + { + "name": "tomatophp/tomato-admin", + "version": "v1.2.20", + "source": { + "type": "git", + "url": "https://github.com/tomatophp/tomato-admin.git", + "reference": "ac768e7cb1494d86e556fc13b5db66ca821533f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tomatophp/tomato-admin/zipball/ac768e7cb1494d86e556fc13b5db66ca821533f1", + "reference": "ac768e7cb1494d86e556fc13b5db66ca821533f1", + "shasum": "" + }, + "require": { + "blade-ui-kit/blade-heroicons": "^2.3", + "kirschbaum-development/eloquent-power-joins": "^3.5", + "laravel/fortify": "^1.21", + "laravel/framework": "^11.0", + "laravel/jetstream": "^5.0", + "laravel/sanctum": "^4.0", + "maatwebsite/excel": "^3.1", + "spatie/laravel-medialibrary": "^11.4", + "tomatophp/console-helpers": "^1.1", + "tomatophp/tomato-plugins": "^1.2", + "tomatophp/tomato-splade": "^1.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "TomatoPHP\\TomatoAdmin\\TomatoAdminServiceProvider" + ], + "aliases": { + "Tomato": "TomatoPHP\\TomatoAdmin\\Facades\\Tomato", + "TomatoMenu": "TomatoPHP\\TomatoAdmin\\Facades\\TomatoMenu", + "TomatoWidget": "TomatoPHP\\TomatoAdmin\\Facades\\TomatoWidget", + "TomatoSlot": "TomatoPHP\\TomatoAdmin\\Facades\\TomatoSlot" + } + } + }, + "autoload": { + "psr-4": { + "TomatoPHP\\TomatoAdmin\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fady Mondy", + "email": "EngFadyMondy@gmail.com" + } + ], + "description": "Tomato Admin Dashboard Build With FilamentPHP Theme for Laravel Splade", + "keywords": [ + "blade", + "breeze", + "filamentphp", + "generator", + "inertiajs", + "laravel", + "php8", + "plugin", + "splade", + "tomatophp", + "vuejs" + ], + "support": { + "issues": "https://github.com/tomatophp/tomato-admin/issues", + "source": "https://github.com/tomatophp/tomato-admin/tree/v1.2.20" + }, + "funding": [ + { + "url": "https://github.com/3x1io", + "type": "github" + } + ], + "time": "2024-04-24T13:38:42+00:00" + }, + { + "name": "tomatophp/tomato-plugins", + "version": "v1.2.4", + "source": { + "type": "git", + "url": "https://github.com/tomatophp/tomato-plugins.git", + "reference": "d537586476a0b60b98bb3d01a293b0dfc0e5720b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tomatophp/tomato-plugins/zipball/d537586476a0b60b98bb3d01a293b0dfc0e5720b", + "reference": "d537586476a0b60b98bb3d01a293b0dfc0e5720b", + "shasum": "" + }, + "require": { + "calebporzio/sushi": "^2.4", + "nwidart/laravel-modules": "^10.0", + "php": "^8.1|^8.2", + "tomatophp/console-helpers": "^1.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "TomatoPHP\\TomatoPlugins\\TomatoPluginsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "TomatoPHP\\TomatoPlugins\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fady Mondy", + "email": "info@3x1.io" + } + ], + "description": "Plugins installer for Tomato PHP framework", + "keywords": [ + "laravel", + "php", + "plugins", + "splade", + "tomatophp" + ], + "support": { + "issues": "https://github.com/tomatophp/tomato-plugins/issues", + "source": "https://github.com/tomatophp/tomato-plugins/tree/v1.2.4" + }, + "funding": [ + { + "url": "https://github.com/3x1io", + "type": "github" + } + ], + "time": "2024-03-28T16:16:41+00:00" + }, + { + "name": "tomatophp/tomato-splade", + "version": "v1.1.19", + "source": { + "type": "git", + "url": "https://github.com/tomatophp/tomato-splade.git", + "reference": "ab60204c3a2f4907722fe86250b1af6977c50c85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tomatophp/tomato-splade/zipball/ab60204c3a2f4907722fe86250b1af6977c50c85", + "reference": "ab60204c3a2f4907722fe86250b1af6977c50c85", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^9.41|^10.0|^11.0", + "php": "^8.0 || ^8.1 || ^8.2" + }, + "conflict": { + "laravel/framework": "9.36.0|9.36.1|9.36.2" + }, + "require-dev": { + "laravel/pint": "^1.0", + "nunomaduro/collision": "^6.0", + "nunomaduro/larastan": "^2.0.1", + "orchestra/testbench": "^7.7|^8.0", + "phpunit/phpunit": "^9.5" + }, + "suggest": { + "kirschbaum-development/eloquent-power-joins": "Required to enable support sorting by (nested) relationships in Splade Tables (^2.6)", + "maatwebsite/excel": "Required to enable support exports in Splade Tables (^3.1)", + "spatie/fractalistic": "Required to enable support for Fractal transformers (^2.9)" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "ProtoneMedia\\Splade\\ServiceProvider" + ], + "aliases": { + "Animation": "ProtoneMedia\\Splade\\Facades\\Animation", + "SEO": "ProtoneMedia\\Splade\\Facades\\SEO", + "Splade": "ProtoneMedia\\Splade\\Facades\\Splade", + "Toast": "ProtoneMedia\\Splade\\Facades\\Toast" + } + } + }, + "autoload": { + "psr-4": { + "ProtoneMedia\\Splade\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Pascal Baljet", + "email": "pascal@protone.media", + "role": "Developer" + }, + { + "name": "Fady Mondy", + "email": "info@3x1.io", + "role": "Developer" + } + ], + "description": "Laravel Splade With my selected updates and components for Tomato PHP.", + "homepage": "https://github.com/tomatophp/tomato-splade", + "keywords": [ + "laravel", + "laravel-splade", + "protonemedia" + ], + "support": { + "issues": "https://github.com/tomatophp/tomato-splade/issues", + "source": "https://github.com/tomatophp/tomato-splade/tree/v1.1.19" + }, + "funding": [ + { + "url": "https://github.com/3x1io", + "type": "github" + }, + { + "url": "https://github.com/pascalbaljet", + "type": "github" + } + ], + "time": "2024-04-24T13:38:14+00:00" + }, + { + "name": "tomatophp/tomato-translations", + "version": "v1.2.4", + "source": { + "type": "git", + "url": "https://github.com/tomatophp/tomato-translations.git", + "reference": "a273f8d6687de1783aff4cae6e242b4320ab1051" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tomatophp/tomato-translations/zipball/a273f8d6687de1783aff4cae6e242b4320ab1051", + "reference": "a273f8d6687de1783aff4cae6e242b4320ab1051", + "shasum": "" + }, + "require": { + "calebporzio/sushi": "^2.4", + "google/cloud-translate": "^1.12", + "php": "^8.0|^8.1", + "spatie/laravel-translatable": "^6.5", + "tomatophp/console-helpers": "^1.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "TomatoPHP\\TomatoTranslations\\TomatoTranslationsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "TomatoPHP\\TomatoTranslations\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fady Mondy", + "email": "info@3x1.io" + } + ], + "description": "Database Base Translations Keys with Google Translations API Integration", + "keywords": [ + "laravel", + "php", + "trans", + "translation gui", + "translation loader", + "translations" + ], + "support": { + "issues": "https://github.com/tomatophp/tomato-translations/issues", + "source": "https://github.com/tomatophp/tomato-translations/tree/v1.2.4" + }, + "funding": [ + { + "url": "https://github.com/3x1io", + "type": "github" + } + ], + "time": "2024-04-24T13:38:29+00:00" + }, { "name": "vlucas/phpdotenv", "version": "v5.6.0", @@ -8503,16 +11288,16 @@ }, { "name": "spatie/backtrace", - "version": "1.5.3", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/spatie/backtrace.git", - "reference": "483f76a82964a0431aa836b6ed0edde0c248e3ab" + "reference": "8373b9d51638292e3bfd736a9c19a654111b4a23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/backtrace/zipball/483f76a82964a0431aa836b6ed0edde0c248e3ab", - "reference": "483f76a82964a0431aa836b6ed0edde0c248e3ab", + "url": "https://api.github.com/repos/spatie/backtrace/zipball/8373b9d51638292e3bfd736a9c19a654111b4a23", + "reference": "8373b9d51638292e3bfd736a9c19a654111b4a23", "shasum": "" }, "require": { @@ -8520,6 +11305,7 @@ }, "require-dev": { "ext-json": "*", + "laravel/serializable-closure": "^1.3", "phpunit/phpunit": "^9.3", "spatie/phpunit-snapshot-assertions": "^4.2", "symfony/var-dumper": "^5.1" @@ -8549,7 +11335,7 @@ "spatie" ], "support": { - "source": "https://github.com/spatie/backtrace/tree/1.5.3" + "source": "https://github.com/spatie/backtrace/tree/1.6.1" }, "funding": [ { @@ -8561,7 +11347,7 @@ "type": "other" } ], - "time": "2023-06-28T12:59:17+00:00" + "time": "2024-04-24T13:22:11+00:00" }, { "name": "spatie/flare-client-php", @@ -8994,7 +11780,9 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.2" + "php": "^8.2", + "ext-bcmath": "*", + "ext-sqlite3": "*" }, "platform-dev": [], "plugin-api-version": "2.6.0" diff --git a/config/fortify.php b/config/fortify.php new file mode 100644 index 0000000..558fe94 --- /dev/null +++ b/config/fortify.php @@ -0,0 +1,159 @@ + 'web', + + /* + |-------------------------------------------------------------------------- + | Fortify Password Broker + |-------------------------------------------------------------------------- + | + | Here you may specify which password broker Fortify can use when a user + | is resetting their password. This configured value should match one + | of your password brokers setup in your "auth" configuration file. + | + */ + + 'passwords' => 'users', + + /* + |-------------------------------------------------------------------------- + | Username / Email + |-------------------------------------------------------------------------- + | + | This value defines which model attribute should be considered as your + | application's "username" field. Typically, this might be the email + | address of the users but you are free to change this value here. + | + | Out of the box, Fortify expects forgot password and reset password + | requests to have a field named 'email'. If the application uses + | another name for the field you may define it below as needed. + | + */ + + 'username' => 'email', + + 'email' => 'email', + + /* + |-------------------------------------------------------------------------- + | Lowercase Usernames + |-------------------------------------------------------------------------- + | + | This value defines whether usernames should be lowercased before saving + | them in the database, as some database system string fields are case + | sensitive. You may disable this for your application if necessary. + | + */ + + 'lowercase_usernames' => true, + + /* + |-------------------------------------------------------------------------- + | Home Path + |-------------------------------------------------------------------------- + | + | Here you may configure the path where users will get redirected during + | authentication or password reset when the operations are successful + | and the user is authenticated. You are free to change this value. + | + */ + + 'home' => '/admin', + + /* + |-------------------------------------------------------------------------- + | Fortify Routes Prefix / Subdomain + |-------------------------------------------------------------------------- + | + | Here you may specify which prefix Fortify will assign to all the routes + | that it registers with the application. If necessary, you may change + | subdomain under which all of the Fortify routes will be available. + | + */ + + 'prefix' => '', + + 'domain' => null, + + /* + |-------------------------------------------------------------------------- + | Fortify Routes Middleware + |-------------------------------------------------------------------------- + | + | Here you may specify which middleware Fortify will assign to the routes + | that it registers with the application. If necessary, you may change + | these middleware but typically this provided default is preferred. + | + */ + + 'middleware' => ['web'], + + /* + |-------------------------------------------------------------------------- + | Rate Limiting + |-------------------------------------------------------------------------- + | + | By default, Fortify will throttle logins to five requests per minute for + | every email and IP address combination. However, if you would like to + | specify a custom rate limiter to call then you may specify it here. + | + */ + + 'limiters' => [ + 'login' => 'login', + 'two-factor' => 'two-factor', + ], + + /* + |-------------------------------------------------------------------------- + | Register View Routes + |-------------------------------------------------------------------------- + | + | Here you may specify if the routes returning views should be disabled as + | you may not need them when building your own application. This may be + | especially true if you're writing a custom single-page application. + | + */ + + 'views' => true, + + /* + |-------------------------------------------------------------------------- + | Features + |-------------------------------------------------------------------------- + | + | Some of the Fortify features are optional. You may disable the features + | by removing them from this array. You're free to only remove some of + | these features or you can even remove all of these if you need to. + | + */ + + 'features' => [ + Features::registration(), + Features::resetPasswords(), + Features::emailVerification(), + Features::updateProfileInformation(), + Features::updatePasswords(), + Features::twoFactorAuthentication([ + 'confirm' => true, + 'confirmPassword' => true, + // 'window' => 0, + ]), + ], + +]; diff --git a/config/jetstream.php b/config/jetstream.php new file mode 100644 index 0000000..7a4ba3d --- /dev/null +++ b/config/jetstream.php @@ -0,0 +1,81 @@ + 'inertia', + + /* + |-------------------------------------------------------------------------- + | Jetstream Route Middleware + |-------------------------------------------------------------------------- + | + | Here you may specify which middleware Jetstream will assign to the routes + | that it registers with the application. When necessary, you may modify + | these middleware; however, this default value is usually sufficient. + | + */ + + 'middleware' => ['web'], + + 'auth_session' => AuthenticateSession::class, + + /* + |-------------------------------------------------------------------------- + | Jetstream Guard + |-------------------------------------------------------------------------- + | + | Here you may specify the authentication guard Jetstream will use while + | authenticating users. This value should correspond with one of your + | guards that is already present in your "auth" configuration file. + | + */ + + 'guard' => 'sanctum', + + /* + |-------------------------------------------------------------------------- + | Features + |-------------------------------------------------------------------------- + | + | Some of Jetstream's features are optional. You may disable the features + | by removing them from this array. You're free to only remove some of + | these features or you can even remove all of these if you need to. + | + */ + + 'features' => [ + Features::termsAndPrivacyPolicy(), + Features::profilePhotos(), + Features::api(), + Features::teams(['invitations' => true]), + Features::accountDeletion(), + ], + + /* + |-------------------------------------------------------------------------- + | Profile Photo Disk + |-------------------------------------------------------------------------- + | + | This configuration value determines the default disk that will be used + | when storing profile photos for your application's users. Typically + | this will be the "public" disk but you may adjust this if needed. + | + */ + + 'profile_photo_disk' => 'public', + +]; diff --git a/config/media-library.php b/config/media-library.php new file mode 100644 index 0000000..bace6c8 --- /dev/null +++ b/config/media-library.php @@ -0,0 +1,262 @@ + env('MEDIA_DISK', 'public'), + + /* + * The maximum file size of an item in bytes. + * Adding a larger file will result in an exception. + */ + 'max_file_size' => 1024 * 1024 * 10, // 10MB + + /* + * This queue connection will be used to generate derived and responsive images. + * Leave empty to use the default queue connection. + */ + 'queue_connection_name' => env('QUEUE_CONNECTION', 'sync'), + + /* + * This queue will be used to generate derived and responsive images. + * Leave empty to use the default queue. + */ + 'queue_name' => '', + + /* + * By default all conversions will be performed on a queue. + */ + 'queue_conversions_by_default' => env('QUEUE_CONVERSIONS_BY_DEFAULT', true), + + /* + * The fully qualified class name of the media model. + */ + 'media_model' => Spatie\MediaLibrary\MediaCollections\Models\Media::class, + + /* + * When enabled, media collections will be serialised using the default + * laravel model serialization behaviour. + * + * Keep this option disabled if using Media Library Pro components (https://medialibrary.pro) + */ + 'use_default_collection_serialization' => false, + + /* + * The fully qualified class name of the model used for temporary uploads. + * + * This model is only used in Media Library Pro (https://medialibrary.pro) + */ + 'temporary_upload_model' => Spatie\MediaLibraryPro\Models\TemporaryUpload::class, + + /* + * When enabled, Media Library Pro will only process temporary uploads that were uploaded + * in the same session. You can opt to disable this for stateless usage of + * the pro components. + */ + 'enable_temporary_uploads_session_affinity' => true, + + /* + * When enabled, Media Library pro will generate thumbnails for uploaded file. + */ + 'generate_thumbnails_for_temporary_uploads' => true, + + /* + * This is the class that is responsible for naming generated files. + */ + 'file_namer' => Spatie\MediaLibrary\Support\FileNamer\DefaultFileNamer::class, + + /* + * The class that contains the strategy for determining a media file's path. + */ + 'path_generator' => Spatie\MediaLibrary\Support\PathGenerator\DefaultPathGenerator::class, + + /* + * The class that contains the strategy for determining how to remove files. + */ + 'file_remover_class' => Spatie\MediaLibrary\Support\FileRemover\DefaultFileRemover::class, + + /* + * Here you can specify which path generator should be used for the given class. + */ + 'custom_path_generators' => [ + // Model::class => PathGenerator::class + // or + // 'model_morph_alias' => PathGenerator::class + ], + + /* + * When urls to files get generated, this class will be called. Use the default + * if your files are stored locally above the site root or on s3. + */ + 'url_generator' => Spatie\MediaLibrary\Support\UrlGenerator\DefaultUrlGenerator::class, + + /* + * Moves media on updating to keep path consistent. Enable it only with a custom + * PathGenerator that uses, for example, the media UUID. + */ + 'moves_media_on_update' => false, + + /* + * Whether to activate versioning when urls to files get generated. + * When activated, this attaches a ?v=xx query string to the URL. + */ + 'version_urls' => false, + + /* + * The media library will try to optimize all converted images by removing + * metadata and applying a little bit of compression. These are + * the optimizers that will be used by default. + */ + 'image_optimizers' => [ + Spatie\ImageOptimizer\Optimizers\Jpegoptim::class => [ + '-m85', // set maximum quality to 85% + '--force', // ensure that progressive generation is always done also if a little bigger + '--strip-all', // this strips out all text information such as comments and EXIF data + '--all-progressive', // this will make sure the resulting image is a progressive one + ], + Spatie\ImageOptimizer\Optimizers\Pngquant::class => [ + '--force', // required parameter for this package + ], + Spatie\ImageOptimizer\Optimizers\Optipng::class => [ + '-i0', // this will result in a non-interlaced, progressive scanned image + '-o2', // this set the optimization level to two (multiple IDAT compression trials) + '-quiet', // required parameter for this package + ], + Spatie\ImageOptimizer\Optimizers\Svgo::class => [ + '--disable=cleanupIDs', // disabling because it is known to cause troubles + ], + Spatie\ImageOptimizer\Optimizers\Gifsicle::class => [ + '-b', // required parameter for this package + '-O3', // this produces the slowest but best results + ], + Spatie\ImageOptimizer\Optimizers\Cwebp::class => [ + '-m 6', // for the slowest compression method in order to get the best compression. + '-pass 10', // for maximizing the amount of analysis pass. + '-mt', // multithreading for some speed improvements. + '-q 90', //quality factor that brings the least noticeable changes. + ], + Spatie\ImageOptimizer\Optimizers\Avifenc::class => [ + '-a cq-level=23', // constant quality level, lower values mean better quality and greater file size (0-63). + '-j all', // number of jobs (worker threads, "all" uses all available cores). + '--min 0', // min quantizer for color (0-63). + '--max 63', // max quantizer for color (0-63). + '--minalpha 0', // min quantizer for alpha (0-63). + '--maxalpha 63', // max quantizer for alpha (0-63). + '-a end-usage=q', // rate control mode set to Constant Quality mode. + '-a tune=ssim', // SSIM as tune the encoder for distortion metric. + ], + ], + + /* + * These generators will be used to create an image of media files. + */ + 'image_generators' => [ + Spatie\MediaLibrary\Conversions\ImageGenerators\Image::class, + Spatie\MediaLibrary\Conversions\ImageGenerators\Webp::class, + Spatie\MediaLibrary\Conversions\ImageGenerators\Avif::class, + Spatie\MediaLibrary\Conversions\ImageGenerators\Pdf::class, + Spatie\MediaLibrary\Conversions\ImageGenerators\Svg::class, + Spatie\MediaLibrary\Conversions\ImageGenerators\Video::class, + ], + + /* + * The path where to store temporary files while performing image conversions. + * If set to null, storage_path('media-library/temp') will be used. + */ + 'temporary_directory_path' => null, + + /* + * The engine that should perform the image conversions. + * Should be either `gd` or `imagick`. + */ + 'image_driver' => env('IMAGE_DRIVER', 'gd'), + + /* + * FFMPEG & FFProbe binaries paths, only used if you try to generate video + * thumbnails and have installed the php-ffmpeg/php-ffmpeg composer + * dependency. + */ + 'ffmpeg_path' => env('FFMPEG_PATH', '/usr/bin/ffmpeg'), + 'ffprobe_path' => env('FFPROBE_PATH', '/usr/bin/ffprobe'), + + /* + * Here you can override the class names of the jobs used by this package. Make sure + * your custom jobs extend the ones provided by the package. + */ + 'jobs' => [ + 'perform_conversions' => Spatie\MediaLibrary\Conversions\Jobs\PerformConversionsJob::class, + 'generate_responsive_images' => Spatie\MediaLibrary\ResponsiveImages\Jobs\GenerateResponsiveImagesJob::class, + ], + + /* + * When using the addMediaFromUrl method you may want to replace the default downloader. + * This is particularly useful when the url of the image is behind a firewall and + * need to add additional flags, possibly using curl. + */ + 'media_downloader' => Spatie\MediaLibrary\Downloaders\DefaultDownloader::class, + + 'remote' => [ + /* + * Any extra headers that should be included when uploading media to + * a remote disk. Even though supported headers may vary between + * different drivers, a sensible default has been provided. + * + * Supported by S3: CacheControl, Expires, StorageClass, + * ServerSideEncryption, Metadata, ACL, ContentEncoding + */ + 'extra_headers' => [ + 'CacheControl' => 'max-age=604800', + ], + ], + + 'responsive_images' => [ + /* + * This class is responsible for calculating the target widths of the responsive + * images. By default we optimize for filesize and create variations that each are 30% + * smaller than the previous one. More info in the documentation. + * + * https://docs.spatie.be/laravel-medialibrary/v9/advanced-usage/generating-responsive-images + */ + 'width_calculator' => Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class, + + /* + * By default rendering media to a responsive image will add some javascript and a tiny placeholder. + * This ensures that the browser can already determine the correct layout. + * When disabled, no tiny placeholder is generated. + */ + 'use_tiny_placeholders' => true, + + /* + * This class will generate the tiny placeholder used for progressive image loading. By default + * the media library will use a tiny blurred jpg image. + */ + 'tiny_placeholder_generator' => Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class, + ], + + /* + * When enabling this option, a route will be registered that will enable + * the Media Library Pro Vue and React components to move uploaded files + * in a S3 bucket to their right place. + */ + 'enable_vapor_uploads' => env('ENABLE_MEDIA_LIBRARY_VAPOR_UPLOADS', false), + + /* + * When converting Media instances to response the media library will add + * a `loading` attribute to the `img` tag. Here you can set the default + * value of that attribute. + * + * Possible values: 'lazy', 'eager', 'auto' or null if you don't want to set any loading instruction. + * + * More info: https://css-tricks.com/native-lazy-loading/ + */ + 'default_loading_attribute_value' => null, + + /* + * You can specify a prefix for that is used for storing all media. + * If you set this to `/my-subdir`, all your media will be stored in a `/my-subdir` directory. + */ + 'prefix' => env('MEDIA_PREFIX', ''), +]; diff --git a/config/permission.php b/config/permission.php new file mode 100644 index 0000000..5b6e184 --- /dev/null +++ b/config/permission.php @@ -0,0 +1,161 @@ + [ + + /* + * When using the "HasPermissions" trait from this package, we need to know which + * Eloquent model should be used to retrieve your permissions. Of course, it + * is often just the "Permission" model but you may use whatever you like. + * + * The model you want to use as a Permission model needs to implement the + * `Spatie\Permission\Contracts\Permission` contract. + */ + + 'permission' => Spatie\Permission\Models\Permission::class, + + /* + * When using the "HasRoles" trait from this package, we need to know which + * Eloquent model should be used to retrieve your roles. Of course, it + * is often just the "Role" model but you may use whatever you like. + * + * The model you want to use as a Role model needs to implement the + * `Spatie\Permission\Contracts\Role` contract. + */ + + 'role' => Spatie\Permission\Models\Role::class, + + ], + + 'table_names' => [ + + /* + * When using the "HasRoles" trait from this package, we need to know which + * table should be used to retrieve your roles. We have chosen a basic + * default value but you may easily change it to any table you like. + */ + + 'roles' => 'roles', + + /* + * When using the "HasPermissions" trait from this package, we need to know which + * table should be used to retrieve your permissions. We have chosen a basic + * default value but you may easily change it to any table you like. + */ + + 'permissions' => 'permissions', + + /* + * When using the "HasPermissions" trait from this package, we need to know which + * table should be used to retrieve your models permissions. We have chosen a + * basic default value but you may easily change it to any table you like. + */ + + 'model_has_permissions' => 'model_has_permissions', + + /* + * When using the "HasRoles" trait from this package, we need to know which + * table should be used to retrieve your models roles. We have chosen a + * basic default value but you may easily change it to any table you like. + */ + + 'model_has_roles' => 'model_has_roles', + + /* + * When using the "HasRoles" trait from this package, we need to know which + * table should be used to retrieve your roles permissions. We have chosen a + * basic default value but you may easily change it to any table you like. + */ + + 'role_has_permissions' => 'role_has_permissions', + ], + + 'column_names' => [ + /* + * Change this if you want to name the related pivots other than defaults + */ + 'role_pivot_key' => null, //default 'role_id', + 'permission_pivot_key' => null, //default 'permission_id', + + /* + * Change this if you want to name the related model primary key other than + * `model_id`. + * + * For example, this would be nice if your primary keys are all UUIDs. In + * that case, name this `model_uuid`. + */ + + 'model_morph_key' => 'model_id', + + /* + * Change this if you want to use the teams feature and your related model's + * foreign key is other than `team_id`. + */ + + 'team_foreign_key' => 'team_id', + ], + + /* + * When set to true, the method for checking permissions will be registered on the gate. + * Set this to false, if you want to implement custom logic for checking permissions. + */ + + 'register_permission_check_method' => true, + + /* + * When set to true the package implements teams using the 'team_foreign_key'. If you want + * the migrations to register the 'team_foreign_key', you must set this to true + * before doing the migration. If you already did the migration then you must make a new + * migration to also add 'team_foreign_key' to 'roles', 'model_has_roles', and + * 'model_has_permissions'(view the latest version of package's migration file) + */ + + 'teams' => false, + + /* + * When set to true, the required permission names are added to the exception + * message. This could be considered an information leak in some contexts, so + * the default setting is false here for optimum safety. + */ + + 'display_permission_in_exception' => false, + + /* + * When set to true, the required role names are added to the exception + * message. This could be considered an information leak in some contexts, so + * the default setting is false here for optimum safety. + */ + + 'display_role_in_exception' => false, + + /* + * By default wildcard permission lookups are disabled. + */ + + 'enable_wildcard_permission' => false, + + 'cache' => [ + + /* + * By default all permissions are cached for 24 hours to speed up performance. + * When permissions or roles are updated the cache is flushed automatically. + */ + + 'expiration_time' => \DateInterval::createFromDateString('24 hours'), + + /* + * The cache key used to store all permissions. + */ + + 'key' => 'spatie.permission.cache', + + /* + * You may optionally indicate a specific cache driver to use for permission and + * role caching using any of the `store` drivers listed in the cache.php config + * file. Using 'default' here means to use the `default` set in cache.php. + */ + + 'store' => 'default', + ], +]; diff --git a/database/migrations/2024_04_24_134733_create_media_table.php b/database/migrations/2024_04_24_134733_create_media_table.php new file mode 100644 index 0000000..47a4be9 --- /dev/null +++ b/database/migrations/2024_04_24_134733_create_media_table.php @@ -0,0 +1,32 @@ +id(); + + $table->morphs('model'); + $table->uuid()->nullable()->unique(); + $table->string('collection_name'); + $table->string('name'); + $table->string('file_name'); + $table->string('mime_type')->nullable(); + $table->string('disk'); + $table->string('conversions_disk')->nullable(); + $table->unsignedBigInteger('size'); + $table->json('manipulations'); + $table->json('custom_properties'); + $table->json('generated_conversions'); + $table->json('responsive_images'); + $table->unsignedInteger('order_column')->nullable()->index(); + + $table->nullableTimestamps(); + }); + } +}; diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..591db16 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,74 @@ +# For more information: https://laravel.com/docs/sail +version: '3' +services: + laravel.test: + build: + context: ./vendor/laravel/sail/runtimes/8.2 + dockerfile: Dockerfile + args: + WWWGROUP: '${WWWGROUP}' + image: sail-8.2/tomato + extra_hosts: + - 'host.docker.internal:host-gateway' + ports: + - '${APP_PORT:-80}:80' + - '${VITE_PORT:-5173}:${VITE_PORT:-5173}' + environment: + WWWUSER: '${WWWUSER}' + LARAVEL_SAIL: 1 + XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}' + XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}' + volumes: + - '.:/var/www/html' + networks: + - sail + depends_on: + - mysql + - redis + mysql: + image: 'mysql/mysql-server:8.0' + ports: + - '${FORWARD_DB_PORT:-3306}:3306' + environment: + MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}' + MYSQL_ROOT_HOST: "%" + MYSQL_DATABASE: '${DB_DATABASE}' + MYSQL_USER: '${DB_USERNAME}' + MYSQL_PASSWORD: '${DB_PASSWORD}' + MYSQL_ALLOW_EMPTY_PASSWORD: 1 + volumes: + - 'sail-mysql:/var/lib/mysql' + - './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh' + networks: + - sail + healthcheck: + test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"] + retries: 3 + timeout: 5s + redis: + image: 'redis:alpine' + ports: + - '${FORWARD_REDIS_PORT:-6379}:6379' + volumes: + - 'sail-redis:/data' + networks: + - sail + healthcheck: + test: ["CMD", "redis-cli", "ping"] + retries: 3 + timeout: 5s + mailpit: + image: 'axllent/mailpit:latest' + ports: + - '${FORWARD_MAILPIT_PORT:-1025}:1025' + - '${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025' + networks: + - sail +networks: + sail: + driver: bridge +volumes: + sail-mysql: + driver: local + sail-redis: + driver: local diff --git a/lang/ar.json b/lang/ar.json new file mode 100644 index 0000000..c10faeb --- /dev/null +++ b/lang/ar.json @@ -0,0 +1,247 @@ +{ + "Current Team": "الفريق الحالي", + "Manage Team": "إدارة الفريق", + "Team Settings": "إعدادات الفريق", + "Create New Team": "أضافة فريق", + "Switch Teams": "تغيير الفريق الحالي", + "Team Name": "اسم الفريق", + "The team's name and owner information.": "اسم الفريق ومعلومات المالك.", + "Team Owner": "مالك الفريق", + "Add Team Member": "أضافة عضو", + "Please provide the email address of the person you would like to add to this team.": "يرجى تقديم عنوان البريد الإلكتروني للشخص الذي ترغب في إضافته إلى هذا الفريق.", + "Email": "البريد الإلكتروني", + "Role": "الدور", + "Administrator": "مدير", + "Administrator users can perform any action.": "يمكن لمستخدمي المسؤولين القيام بأي إجراء.", + "Editor": "محرر", + "Editor users have the ability to read, create, and update.": "يمكن لمستخدمي المحررين قراءة وإنشاء وتحديث.", + "Pending Team Invitations": "دعوات الفريق المعلقة", + "These people have been invited to your team and have been sent an invitation email. They may join the team by accepting the email invitation.": "تمت دعوة هؤلاء الأشخاص إلى فريقك وتم إرسال رسالة دعوة إلكترونية لهم. يمكنهم الانضمام إلى الفريق عن طريق قبول دعوة البريد الإلكتروني.", + "Delete Team": "حذف الفريق", + "Permanently delete this team.": "حذف هذا الفريق بشكل دائم.", + "Once a team is deleted, all of its resources and data will be permanently deleted. Before deleting this team, please download any data or information regarding this team that you wish to retain.": "بمجرد حذف الفريق، سيتم حذف جميع الموارد والبيانات الخاصة به بشكل دائم. قبل حذف هذا الفريق، يرجى تنزيل أي بيانات أو معلومات تتعلق بهذا الفريق التي ترغب في الاحتفاظ بها.", + "Are you sure you want to delete this team? Once a team is deleted, all of its resources and data will be permanently deleted.": "هل أنت متأكد أنك تريد حذف هذا الفريق؟ بمجرد حذف الفريق، سيتم حذف جميع الموارد والبيانات الخاصة به بشكل دائم.", + "Manage Account": "إدارة الحساب", + "API Tokens": "رموز API", + "Profile Information": "معلومات الملف الشخصي", + "Update your account's profile information and email address.": "تحديث معلومات ملف تعريف حسابك وعنوان بريدك الإلكتروني.", + "Photo": "صورة", + "Select A New Photo": "اختر صورة جديدة", + "Remove Photo": "إزالة الصورة", + "Name": "الاسم", + "Your email address is unverified.": "عنوان بريدك الإلكتروني غير مؤكد.", + "Click here to re-send the verification email.": "انقر هنا لإعادة إرسال رسالة التحقق.", + "Save": "حفظ", + "Two Factor Authentication": "المصادقة الثنائية", + "Add additional security to your account using two factor authentication.": "أضف أمانًا إضافيًا لحسابك باستخدام المصادقة الثنائية.", + "You have not enabled two factor authentication.": "لم تقم بتمكين المصادقة الثنائية.", + "When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone's Google Authenticator application.": "عند تمكين المصادقة الثنائية، سيتم طلب رمز مؤمن وعشوائي أثناء المصادقة. يمكنك استرداد هذا الرمز من تطبيق Google Authenticator على هاتفك.", + "Enable": "تمكين", + "Please confirm your password before continuing": "يرجى تأكيد كلمة المرور الخاصة بك قبل المتابعة", + "Finish enabling two factor authentication.": "إنهاء تمكين المصادقة الثنائية.", + "To finish enabling two factor authentication, scan the following QR code using your phone's authenticator application or enter the setup key and provide the generated OTP code.": "لإنهاء تمكين المصادقة الثنائية، قم بمسح الرمز الشريطي التالي باستخدام تطبيق المصادقة الخاص بهاتفك أو أدخل مفتاح الإعداد وقدم رمز OTP المولد.", + "Setup Key": "مفتاح الإعداد", + "Code": "الرمز", + "Browser Sessions": "جلسات المتصفح", + "Manage and log out your active sessions on other browsers and devices.": "إدارة وتسجيل الخروج من جلساتك النشطة على متصفحات وأجهزة أخرى.", + "If necessary, you may log out of all of your other browser sessions across all of your devices. Some of your recent sessions are listed below; however, this list may not be exhaustive. If you feel your account has been compromised, you should also update your password.": "إذا لزم الأمر، يمكنك تسجيل الخروج من جميع جلسات المتصفح الأخرى عبر جميع أجهزتك. يتم سرد بعض جلساتك الأخيرة أدناه؛ ومع ذلك، قد لا تكون هذه القائمة شاملة. إذا شعرت أن حسابك قد تم تعريضه للخطر، يجب عليك أيضًا تحديث كلمة المرور الخاصة بك.", + "This device": "هذا الجهاز", + "Log Out Other Browser Sessions": "تسجيل الخروج من جلسات المتصفح الأخرى", + "Password": "كلمة المرور", + "Remember me": "تذكرني", + "Forgot your password?": "نسيت كلمة المرور؟", + "Log in": "تسجيل الدخول", + "Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.": "نسيت كلمة المرور؟ لا مشكلة. فقط أخبرنا بعنوان بريدك الإلكتروني وسنرسل لك رابط إعادة تعيين كلمة المرور الذي سيتيح لك اختيار واحدة جديدة.", + "Email Password Reset Link": "إرسال رابط إعادة تعيين كلمة المرور", + "Create API Token": "إنشاء رمز API", + "API tokens allow third-party services to authenticate with our application on your behalf.": "تسمح رموز API للخدمات الطرفية بالمصادقة على تطبيقنا نيابة عنك.", + "Permissions": "الأذونات", + "Create": "إنشاء", + "Edit": "تحرير", + "Delete": "حذف", + "Please copy your new API token. For your security, it won't be shown again.": "يرجى نسخ رمز API الجديد الخاص بك. لأمانك، لن يتم عرضه مرة أخرى.", + "Manage API Tokens": "إدارة رموز API", + "You may delete any of your existing tokens if they are no longer needed.": "يمكنك حذف أي من الرموز الحالية إذا لم تعد مطلوبة.", + "API Token Permissions": "أذونات رمز API", + "A new verification link has been sent to your email address.": "تم إرسال رابط التحقق الجديد إلى عنوان بريدك الإلكتروني.", + "Are you sure you want to continue?": "هل أنت متأكد من المواصلة؟", + "Browse": "تصفح", + "Cancel": "إلغاء", + "Clear selection": "حذف العناصر المحددة", + "Confirm": "تأكيد", + "Drag and drop your files or Browse": "اسحب الملفات وأسقطها أو تصفح", + "Excel Export": "تصدير إكسيل", + "Export results": "تصدير النتائج", + "Go to page :page": "اذهب إلى الصفحة :page", + "Item selected": "العنصر المحدد", + "Items selected": "العناصر المحددة", + "Pagination Navigation": "التنقل بين الصفحات", + "Search": "بحث", + "Select all on this page": "تحديد الكل في هاته الصفحة", + "Select all results": "تحديد كل النتائج", + "of": "من", + "per page": "لكل صفحة", + "results": "النتائج", + "to": "إلى", + "If you do not have an account, you may create one by clicking the button below. After creating an account, you may click the invitation acceptance button in this email to accept the team invitation:": "If you do not have an account, you may create one by clicking the button below. After creating an account, you may click the invitation acceptance button in this email to accept the team invitation:", + "Create Account": "Create Account", + "If you already have an account, you may accept this invitation by clicking the button below:": "If you already have an account, you may accept this invitation by clicking the button below:", + "You may accept this invitation by clicking the button below:": "You may accept this invitation by clicking the button below:", + "Accept Invitation": "Accept Invitation", + "If you did not expect to receive an invitation to this team, you may discard this email.": "If you did not expect to receive an invitation to this team, you may discard this email.", + "Last used": "Last used", + "Delete API Token": "Delete API Token", + "Are you sure you would like to delete this API token?": "Are you sure you would like to delete this API token?", + "API Token": "API Token", + "This is a secure area of the application. Please confirm your password before continuing.": "This is a secure area of the application. Please confirm your password before continuing.", + "Login": "Login", + "Terms of Service": "Terms of Service", + "Privacy Policy": "Privacy Policy", + "Confirm Password": "Confirm Password", + "Reset Password": "Reset Password", + "Two-factor Confirmation": "Two-factor Confirmation", + "Please confirm access to your account by entering the authentication code provided by your authenticator application.": "Please confirm access to your account by entering the authentication code provided by your authenticator application.", + "Please confirm access to your account by entering one of your emergency recovery codes.": "Please confirm access to your account by entering one of your emergency recovery codes.", + "Recovery Code": "Recovery Code", + "Use a recovery code": "Use a recovery code", + "Use an authentication code": "Use an authentication code", + "A new verification link has been sent to the email address you provided during registration.": "A new verification link has been sent to the email address you provided during registration.", + "Resend Verification Email": "Resend Verification Email", + "Log Out": "Log Out", + "pagination.previous": "pagination.previous", + "pagination.next": "pagination.next", + "Showing": "Showing", + "Copy": "Copy", + "Download File": "Download File", + "Empty Transactions": "Empty Transactions", + "No Team": "No Team", + "Lang": "Lang", + "Please enter your password to confirm you would like to log out of your other browser sessions across all of your devices.": "Please enter your password to confirm you would like to log out of your other browser sessions across all of your devices.", + "Last active": "Last active", + "Done.": "Done.", + "You have enabled two factor authentication.": "You have enabled two factor authentication.", + "Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost.": "Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost.", + "Show Recovery Codes": "Show Recovery Codes", + "Regenerate Recovery Codes": "Regenerate Recovery Codes", + "Disable": "Disable", + "Create Team": "Create Team", + "Team Details": "Team Details", + "Create a new team to collaborate with others on projects.": "Create a new team to collaborate with others on projects.", + "Team Members": "Team Members", + "All of the people that are part of this team.": "All of the people that are part of this team.", + "Leave Team": "Leave Team", + "Are you sure you would like to leave this team?": "Are you sure you would like to leave this team?", + "Leave": "Leave", + "Remove Team Member": "Remove Team Member", + "Are you sure you would like to remove this person from the team?": "Are you sure you would like to remove this person from the team?", + "Remove": "Remove", + "Manage Role": "Manage Role", + "The provided password does not match your current password.": "The provided password does not match your current password.", + "We were unable to find a registered user with this email address.": "We were unable to find a registered user with this email address.", + "This user already belongs to the team.": "This user already belongs to the team.", + "This user has already been invited to the team.": "This user has already been invited to the team.", + "You may not leave a team that you created.": "You may not leave a team that you created.", + "Data Retrieved Successfully": "Data Retrieved Successfully", + "Done !": "Done !", + "auth.password": "auth.password", + "The password is incorrect.": "The password is incorrect.", + "The provided password was incorrect.": "The provided password was incorrect.", + "Load More": "Load More", + "Create Plugin": "Create Plugin", + "Description": "Description", + "Icon": "Icon", + "Color": "Color", + "Upload Plugin": "Upload Plugin", + "Tables": "Tables", + "Enable Plugin": "Enable Plugin", + "Disable Plugin": "Disable Plugin", + "Delete Plugin": "Delete Plugin", + "Github": "Github", + "Docs": "Docs", + "Add New Plugin": "Add New Plugin", + "GitHub": "GitHub", + "Start Install The Package": "Start Install The Package", + "Authors": "Authors", + "Licenses": "Licenses", + "Upload New Plugin File": "Upload New Plugin File", + "Table": "Table", + "Table Name": "Table Name", + "Columns": "Columns", + "Column Name": "Column Name", + "Column Type": "Column Type", + "Default": "Default", + "Length": "Length", + "Nullable": "Nullable", + "Index": "Index", + "Auto Increment": "Auto Increment", + "Primary": "Primary", + "Unique": "Unique", + "Unsigned": "Unsigned", + "Foreign Key": "Foreign Key", + "Foreign Table": "Foreign Table", + "Foreign Column": "Foreign Column", + "On Delete Cascade": "On Delete Cascade", + "Timestamps": "Timestamps", + "Soft Deletes": "Soft Deletes", + "Table Generator": "Table Generator", + "Generate Migration": "Generate Migration", + "Run Migrate": "Run Migrate", + "Generate CRUD": "Generate CRUD", + "Generate Models": "Generate Models", + "Generate Controllers": "Generate Controllers", + "Generate Form Request": "Generate Form Request", + "Generate JSON Resource": "Generate JSON Resource", + "Generate Views": "Generate Views", + "Generate Tables": "Generate Tables", + "Generate Routes": "Generate Routes", + "Generate API Routes": "Generate API Routes", + "Generate Menu": "Generate Menu", + "Generate Flutter App": "Generate Flutter App", + "Generate Flutter Module": "Generate Flutter Module", + "Generate Flutter CRUD": "Generate Flutter CRUD", + "Back": "Back", + "Generate": "Generate", + "Module": "Module", + "Comment": "Comment", + "Soft deletes": "Soft deletes", + "Migrated": "Migrated", + "Generated": "Generated", + "Module Not Found": "Module Not Found", + "Migration Created Successfully": "Migration Created Successfully", + "Plugin Already Exists": "Plugin Already Exists", + "Plugin Created Successfully": "Plugin Created Successfully", + "Plugins Has Been Reloaded": "Plugins Has Been Reloaded", + "Plugin Status Changed Successfully": "Plugin Status Changed Successfully", + "Plugin Deleted Successfully": "Plugin Deleted Successfully", + "Plugin Install Start In Background": "Plugin Install Start In Background", + "Your Module Has Been Added Success": "Your Module Has Been Added Success", + "Sorry Your File Uploaded Is Not Correct": "Sorry Your File Uploaded Is Not Correct", + "Table Not Found": "Table Not Found", + "Table Already Exists": "Table Already Exists", + "Table Migrated Successfully": "Table Migrated Successfully", + "Table Generated Successfully": "Table Generated Successfully", + "Table updated successfully": "Table updated successfully", + "Table deleted successfully": "Table deleted successfully", + "Plugin Has Been Deleted": "Plugin Has Been Deleted", + "Id": "Id", + "Table Has Been Deleted": "Table Has Been Deleted", + "Settings": "Settings", + "Plugins": "Plugins", + "There are no items to show.": "There are no items to show.", + "Actions": "Actions", + "Reset": "Reset", + "Date Range": "Date Range", + "Remove search": "Remove search", + "...": "...", + "The password confirmation has expired.": "The password confirmation has expired.", + "No user is logged in": "No user is logged in", + "Date": "Date", + "Home": "Home", + "Documentation": "Documentation", + "Change Language": "Change Language", + "Current Language": "Current Language", + "Import Translations": "Import Translations", + "Upload Or Drop your excel file here": "Upload Or Drop your excel file here", + "Import": "Import", + "Tools": "Tools" +} \ No newline at end of file diff --git a/lang/de.json b/lang/de.json new file mode 100644 index 0000000..ddb7516 --- /dev/null +++ b/lang/de.json @@ -0,0 +1,238 @@ +{ + "Are you sure you want to continue?": "Bist du sicher, dass du fortfahren willst?", + "Browse": "Durchsuchen", + "Cancel": "Abbrechen", + "Clear selection": "Auswahl aufheben", + "Confirm": "Bestätigen", + "Drag and drop your files or Browse": "Dateien per Drag and Drop oder durchsuchen", + "Excel Export": "Excel Export", + "Export results": "Ergebnisse exportieren", + "Go to page :page": "Gehe zu Seite :page", + "Item selected": "Ausgewähltes Element", + "Items selected": "Ausgewählte Elemente", + "Pagination Navigation": "Blättern nach Seiten", + "Remove search": "Entferne Suche", + "Reset": "Zurücksetzen", + "Search": "Suche", + "Select all on this page": "Alles auf dieser Seite auswählen", + "Select all results": "Alle Ergebnisse auswählen", + "of": "von", + "per page": "pro Seite", + "results": "Ergebnisse", + "to": "zu", + "If you do not have an account, you may create one by clicking the button below. After creating an account, you may click the invitation acceptance button in this email to accept the team invitation:": "If you do not have an account, you may create one by clicking the button below. After creating an account, you may click the invitation acceptance button in this email to accept the team invitation:", + "Create Account": "Create Account", + "If you already have an account, you may accept this invitation by clicking the button below:": "If you already have an account, you may accept this invitation by clicking the button below:", + "You may accept this invitation by clicking the button below:": "You may accept this invitation by clicking the button below:", + "Accept Invitation": "Accept Invitation", + "If you did not expect to receive an invitation to this team, you may discard this email.": "If you did not expect to receive an invitation to this team, you may discard this email.", + "API Token Permissions": "API Token Permissions", + "Save": "Save", + "API Tokens": "API Tokens", + "Create API Token": "Create API Token", + "API tokens allow third-party services to authenticate with our application on your behalf.": "API tokens allow third-party services to authenticate with our application on your behalf.", + "Name": "Name", + "Permissions": "Permissions", + "Create": "Create", + "Manage API Tokens": "Manage API Tokens", + "You may delete any of your existing tokens if they are no longer needed.": "You may delete any of your existing tokens if they are no longer needed.", + "Last used": "Last used", + "Delete API Token": "Delete API Token", + "Are you sure you would like to delete this API token?": "Are you sure you would like to delete this API token?", + "Delete": "Delete", + "API Token": "API Token", + "This is a secure area of the application. Please confirm your password before continuing.": "This is a secure area of the application. Please confirm your password before continuing.", + "Password": "Password", + "Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.": "Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.", + "Email": "Email", + "Email Password Reset Link": "Email Password Reset Link", + "Login": "Login", + "Remember me": "Remember me", + "Forgot your password?": "Forgot your password?", + "Log in": "Log in", + "Terms of Service": "Terms of Service", + "Privacy Policy": "Privacy Policy", + "Confirm Password": "Confirm Password", + "Reset Password": "Reset Password", + "Two-factor Confirmation": "Two-factor Confirmation", + "Please confirm access to your account by entering the authentication code provided by your authenticator application.": "Please confirm access to your account by entering the authentication code provided by your authenticator application.", + "Please confirm access to your account by entering one of your emergency recovery codes.": "Please confirm access to your account by entering one of your emergency recovery codes.", + "Code": "Code", + "Recovery Code": "Recovery Code", + "Use a recovery code": "Use a recovery code", + "Use an authentication code": "Use an authentication code", + "A new verification link has been sent to the email address you provided during registration.": "A new verification link has been sent to the email address you provided during registration.", + "Resend Verification Email": "Resend Verification Email", + "Log Out": "Log Out", + "pagination.previous": "pagination.previous", + "pagination.next": "pagination.next", + "Showing": "Showing", + "Manage Account": "Manage Account", + "Copy": "Copy", + "Download File": "Download File", + "Edit": "Edit", + "Empty Transactions": "Empty Transactions", + "No Team": "No Team", + "Current Team": "sCurrent Team", + "Manage Team": "Manage Team", + "Team Settings": "Team Settings", + "Create New Team": "Create New Team", + "Switch Teams": "Switch Teams", + "Lang": "Lang", + "Browser Sessions": "Browser Sessions", + "Manage and log out your active sessions on other browsers and devices.": "Manage and log out your active sessions on other browsers and devices.", + "Log Out Other Browser Sessions": "Log Out Other Browser Sessions", + "Please enter your password to confirm you would like to log out of your other browser sessions across all of your devices.": "Please enter your password to confirm you would like to log out of your other browser sessions across all of your devices.", + "If necessary, you may log out of all of your other browser sessions across all of your devices. Some of your recent sessions are listed below; however, this list may not be exhaustive. If you feel your account has been compromised, you should also update your password.": "If necessary, you may log out of all of your other browser sessions across all of your devices. Some of your recent sessions are listed below; however, this list may not be exhaustive. If you feel your account has been compromised, you should also update your password.", + "This device": "This device", + "Last active": "Last active", + "Done.": "Done.", + "Two Factor Authentication": "Two Factor Authentication", + "Add additional security to your account using two factor authentication.": "Add additional security to your account using two factor authentication.", + "Finish enabling two factor authentication.": "Finish enabling two factor authentication.", + "You have enabled two factor authentication.": "You have enabled two factor authentication.", + "You have not enabled two factor authentication.": "You have not enabled two factor authentication.", + "Setup Key": "Setup Key", + "Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost.": "Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost.", + "Enable": "Enable", + "Show Recovery Codes": "Show Recovery Codes", + "Regenerate Recovery Codes": "Regenerate Recovery Codes", + "Disable": "Disable", + "Profile Information": "Profile Information", + "Photo": "Photo", + "Select A New Photo": "Select A New Photo", + "Remove Photo": "Remove Photo", + "Your email address is unverified.": "Your email address is unverified.", + "Click here to re-send the verification email.": "Click here to re-send the verification email.", + "A new verification link has been sent to your email address.": "A new verification link has been sent to your email address.", + "Add Team Member": "Add Team Member", + "Please provide the email address of the person you would like to add to this team.": "Please provide the email address of the person you would like to add to this team.", + "Role": "Role", + "Create Team": "Create Team", + "Team Details": "Team Details", + "Create a new team to collaborate with others on projects.": "Create a new team to collaborate with others on projects.", + "Team Owner": "Team Owner", + "Team Name": "Team Name", + "Delete Team": "Delete Team", + "Permanently delete this team.": "Permanently delete this team.", + "Once a team is deleted, all of its resources and data will be permanently deleted. Before deleting this team, please download any data or information regarding this team that you wish to retain.": "Once a team is deleted, all of its resources and data will be permanently deleted. Before deleting this team, please download any data or information regarding this team that you wish to retain.", + "Are you sure you want to delete this team? Once a team is deleted, all of its resources and data will be permanently deleted.": "Are you sure you want to delete this team? Once a team is deleted, all of its resources and data will be permanently deleted.", + "Team Members": "Team Members", + "All of the people that are part of this team.": "All of the people that are part of this team.", + "Leave Team": "Leave Team", + "Are you sure you would like to leave this team?": "Are you sure you would like to leave this team?", + "Leave": "Leave", + "Remove Team Member": "Remove Team Member", + "Are you sure you would like to remove this person from the team?": "Are you sure you would like to remove this person from the team?", + "Remove": "Remove", + "Manage Role": "Manage Role", + "Pending Team Invitations": "Pending Team Invitations", + "These people have been invited to your team and have been sent an invitation email. They may join the team by accepting the email invitation.": "These people have been invited to your team and have been sent an invitation email. They may join the team by accepting the email invitation.", + "The provided password does not match your current password.": "The provided password does not match your current password.", + "We were unable to find a registered user with this email address.": "We were unable to find a registered user with this email address.", + "This user already belongs to the team.": "This user already belongs to the team.", + "This user has already been invited to the team.": "This user has already been invited to the team.", + "You may not leave a team that you created.": "You may not leave a team that you created.", + "Data Retrieved Successfully": "Data Retrieved Successfully", + "Done !": "Done !", + "auth.password": "auth.password", + "The password is incorrect.": "The password is incorrect.", + "The provided password was incorrect.": "The provided password was incorrect.", + "Load More": "Load More", + "Create Plugin": "Create Plugin", + "Description": "Description", + "Icon": "Icon", + "Color": "Color", + "Upload Plugin": "Upload Plugin", + "Tables": "Tables", + "Enable Plugin": "Enable Plugin", + "Disable Plugin": "Disable Plugin", + "Delete Plugin": "Delete Plugin", + "Github": "Github", + "Docs": "Docs", + "Add New Plugin": "Add New Plugin", + "GitHub": "GitHub", + "Start Install The Package": "Start Install The Package", + "Authors": "Authors", + "Licenses": "Licenses", + "Upload New Plugin File": "Upload New Plugin File", + "Table": "Table", + "Table Name": "Table Name", + "Columns": "Columns", + "Column Name": "Column Name", + "Column Type": "Column Type", + "Default": "Default", + "Length": "Length", + "Nullable": "Nullable", + "Index": "Index", + "Auto Increment": "Auto Increment", + "Primary": "Primary", + "Unique": "Unique", + "Unsigned": "Unsigned", + "Foreign Key": "Foreign Key", + "Foreign Table": "Foreign Table", + "Foreign Column": "Foreign Column", + "On Delete Cascade": "On Delete Cascade", + "Timestamps": "Timestamps", + "Soft Deletes": "Soft Deletes", + "Table Generator": "Table Generator", + "Generate Migration": "Generate Migration", + "Run Migrate": "Run Migrate", + "Generate CRUD": "Generate CRUD", + "Generate Models": "Generate Models", + "Generate Controllers": "Generate Controllers", + "Generate Form Request": "Generate Form Request", + "Generate JSON Resource": "Generate JSON Resource", + "Generate Views": "Generate Views", + "Generate Tables": "Generate Tables", + "Generate Routes": "Generate Routes", + "Generate API Routes": "Generate API Routes", + "Generate Menu": "Generate Menu", + "Generate Flutter App": "Generate Flutter App", + "Generate Flutter Module": "Generate Flutter Module", + "Generate Flutter CRUD": "Generate Flutter CRUD", + "Back": "Back", + "Generate": "Generate", + "Module": "Module", + "Comment": "Comment", + "Soft deletes": "Soft deletes", + "Migrated": "Migrated", + "Generated": "Generated", + "Module Not Found": "Module Not Found", + "Migration Created Successfully": "Migration Created Successfully", + "Plugin Already Exists": "Plugin Already Exists", + "Plugin Created Successfully": "Plugin Created Successfully", + "Plugins Has Been Reloaded": "Plugins Has Been Reloaded", + "Plugin Status Changed Successfully": "Plugin Status Changed Successfully", + "Plugin Deleted Successfully": "Plugin Deleted Successfully", + "Plugin Install Start In Background": "Plugin Install Start In Background", + "Your Module Has Been Added Success": "Your Module Has Been Added Success", + "Sorry Your File Uploaded Is Not Correct": "Sorry Your File Uploaded Is Not Correct", + "Table Not Found": "Table Not Found", + "Table Already Exists": "Table Already Exists", + "Table Migrated Successfully": "Table Migrated Successfully", + "Table Generated Successfully": "Table Generated Successfully", + "Table updated successfully": "Table updated successfully", + "Table deleted successfully": "Table deleted successfully", + "Plugin Has Been Deleted": "Plugin Has Been Deleted", + "Id": "Id", + "Table Has Been Deleted": "Table Has Been Deleted", + "Settings": "Settings", + "Plugins": "Plugins", + "Please confirm your password before continuing": "Please confirm your password before continuing", + "There are no items to show.": "There are no items to show.", + "Actions": "Actions", + "Date Range": "Date Range", + "...": "...", + "The password confirmation has expired.": "The password confirmation has expired.", + "No user is logged in": "No user is logged in", + "Date": "Date", + "Home": "Home", + "Documentation": "Documentation", + "Change Language": "Change Language", + "Current Language": "Current Language", + "Import Translations": "Import Translations", + "Upload Or Drop your excel file here": "Upload Or Drop your excel file here", + "Import": "Import", + "Tools": "Tools" +} \ No newline at end of file diff --git a/lang/en.json b/lang/en.json new file mode 100644 index 0000000..72a85e2 --- /dev/null +++ b/lang/en.json @@ -0,0 +1,243 @@ +{ + "Current Team": "Current Team", + "Manage Team": "Manage Team", + "Team Settings": "Team Settings", + "Create New Team": "Create New Team", + "Switch Teams": "Switch Teams", + "Team Name": "Team Name", + "The team's name and owner information.": "The team's name and owner information.", + "Team Owner": "Team Owner", + "Add Team Member": "Add Team Member", + "Please provide the email address of the person you would like to add to this team.": "Please provide the email address of the person you would like to add to this team.", + "Email": "Email", + "Role": "Role", + "Pending Team Invitations": "Pending Team Invitations", + "These people have been invited to your team and have been sent an invitation email. They may join the team by accepting the email invitation.": "These people have been invited to your team and have been sent an invitation email. They may join the team by accepting the email invitation.", + "Delete Team": "Delete Team", + "Permanently delete this team.": "Permanently delete this team.", + "Once a team is deleted, all of its resources and data will be permanently deleted. Before deleting this team, please download any data or information regarding this team that you wish to retain.": "Once a team is deleted, all of its resources and data will be permanently deleted. Before deleting this team, please download any data or information regarding this team that you wish to retain.", + "Are you sure you want to delete this team? Once a team is deleted, all of its resources and data will be permanently deleted.": "Are you sure you want to delete this team? Once a team is deleted, all of its resources and data will be permanently deleted.", + "Manage Account": "Manage Account", + "API Tokens": "API Tokens", + "Profile Information": "Profile Information", + "Update your account's profile information and email address.": "Update your account's profile information and email address.", + "Photo": "Photo", + "Select A New Photo": "Select A New Photo", + "Remove Photo": "Remove Photo", + "Name": "Name", + "Your email address is unverified.": "Your email address is unverified.", + "Click here to re-send the verification email.": "Click here to re-send the verification email.", + "Save": "Save", + "Two Factor Authentication": "Two Factor Authentication", + "Add additional security to your account using two factor authentication.": "Add additional security to your account using two factor authentication.", + "You have not enabled two factor authentication.": "You have not enabled two factor authentication.", + "When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone's Google Authenticator application.": "When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone's Google Authenticator application.", + "Enable": "Enable", + "Please confirm your password before continuing": "", + "Finish enabling two factor authentication.": "Finish enabling two factor authentication.", + "To finish enabling two factor authentication, scan the following QR code using your phone's authenticator application or enter the setup key and provide the generated OTP code.": "To finish enabling two factor authentication, scan the following QR code using your phone's authenticator application or enter the setup key and provide the generated OTP code.", + "Setup Key": "Setup Key", + "Code": "Code", + "Browser Sessions": "Browser Sessions", + "Manage and log out your active sessions on other browsers and devices.": "Manage and log out your active sessions on other browsers and devices.", + "If necessary, you may log out of all of your other browser sessions across all of your devices. Some of your recent sessions are listed below; however, this list may not be exhaustive. If you feel your account has been compromised, you should also update your password.": "If necessary, you may log out of all of your other browser sessions across all of your devices. Some of your recent sessions are listed below; however, this list may not be exhaustive. If you feel your account has been compromised, you should also update your password.", + "This device": "This device", + "Log Out Other Browser Sessions": "Log Out Other Browser Sessions", + "Password": "Password", + "Remember me": "Remember me", + "Forgot your password?": "Forgot your password?", + "Log in": "Log in", + "Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.": "Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.", + "Email Password Reset Link": "Email Password Reset Link", + "Create API Token": "Create API Token", + "API tokens allow third-party services to authenticate with our application on your behalf.": "API tokens allow third-party services to authenticate with our application on your behalf.", + "Permissions": "Permissions", + "Create": "Create", + "Edit": "Edit", + "Delete": "Delete", + "Please copy your new API token. For your security, it won't be shown again.": "Please copy your new API token. For your security, it won't be shown again.", + "Manage API Tokens": "Manage API Tokens", + "You may delete any of your existing tokens if they are no longer needed.": "You may delete any of your existing tokens if they are no longer needed.", + "API Token Permissions": "API Token Permissions", + "A new verification link has been sent to your email address.": "A new verification link has been sent to your email address.", + "Are you sure you want to continue?": "", + "Browse": "", + "Cancel": "", + "Clear selection": "", + "Confirm": "", + "Drag and drop your files or Browse": "", + "Excel Export": "", + "Export results": "", + "Go to page :page": "", + "Item selected": "", + "Items selected": "", + "No user is logged in": "", + "Pagination Navigation": "", + "Remove search": "", + "Reset": "", + "Search": "", + "Select all on this page": "", + "Select all results": "", + "of": "", + "per page": "", + "results": "", + "to": "", + "If you do not have an account, you may create one by clicking the button below. After creating an account, you may click the invitation acceptance button in this email to accept the team invitation:": "If you do not have an account, you may create one by clicking the button below. After creating an account, you may click the invitation acceptance button in this email to accept the team invitation:", + "Create Account": "Create Account", + "If you already have an account, you may accept this invitation by clicking the button below:": "If you already have an account, you may accept this invitation by clicking the button below:", + "You may accept this invitation by clicking the button below:": "You may accept this invitation by clicking the button below:", + "Accept Invitation": "Accept Invitation", + "If you did not expect to receive an invitation to this team, you may discard this email.": "If you did not expect to receive an invitation to this team, you may discard this email.", + "Last used": "Last used", + "Delete API Token": "Delete API Token", + "Are you sure you would like to delete this API token?": "Are you sure you would like to delete this API token?", + "API Token": "API Token", + "This is a secure area of the application. Please confirm your password before continuing.": "This is a secure area of the application. Please confirm your password before continuing.", + "Login": "Login", + "Terms of Service": "Terms of Service", + "Privacy Policy": "Privacy Policy", + "Confirm Password": "Confirm Password", + "Reset Password": "Reset Password", + "Two-factor Confirmation": "Two-factor Confirmation", + "Please confirm access to your account by entering the authentication code provided by your authenticator application.": "Please confirm access to your account by entering the authentication code provided by your authenticator application.", + "Please confirm access to your account by entering one of your emergency recovery codes.": "Please confirm access to your account by entering one of your emergency recovery codes.", + "Recovery Code": "Recovery Code", + "Use a recovery code": "Use a recovery code", + "Use an authentication code": "Use an authentication code", + "A new verification link has been sent to the email address you provided during registration.": "A new verification link has been sent to the email address you provided during registration.", + "Resend Verification Email": "Resend Verification Email", + "Log Out": "Log Out", + "pagination.previous": "pagination.previous", + "pagination.next": "pagination.next", + "Showing": "Showing", + "Copy": "Copy", + "Download File": "Download File", + "Empty Transactions": "Empty Transactions", + "No Team": "No Team", + "Lang": "Lang", + "Please enter your password to confirm you would like to log out of your other browser sessions across all of your devices.": "Please enter your password to confirm you would like to log out of your other browser sessions across all of your devices.", + "Last active": "Last active", + "Done.": "Done.", + "You have enabled two factor authentication.": "You have enabled two factor authentication.", + "Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost.": "Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost.", + "Show Recovery Codes": "Show Recovery Codes", + "Regenerate Recovery Codes": "Regenerate Recovery Codes", + "Disable": "Disable", + "Create Team": "Create Team", + "Team Details": "Team Details", + "Create a new team to collaborate with others on projects.": "Create a new team to collaborate with others on projects.", + "Team Members": "Team Members", + "All of the people that are part of this team.": "All of the people that are part of this team.", + "Leave Team": "Leave Team", + "Are you sure you would like to leave this team?": "Are you sure you would like to leave this team?", + "Leave": "Leave", + "Remove Team Member": "Remove Team Member", + "Are you sure you would like to remove this person from the team?": "Are you sure you would like to remove this person from the team?", + "Remove": "Remove", + "Manage Role": "Manage Role", + "The provided password does not match your current password.": "The provided password does not match your current password.", + "We were unable to find a registered user with this email address.": "We were unable to find a registered user with this email address.", + "This user already belongs to the team.": "This user already belongs to the team.", + "This user has already been invited to the team.": "This user has already been invited to the team.", + "You may not leave a team that you created.": "You may not leave a team that you created.", + "Data Retrieved Successfully": "Data Retrieved Successfully", + "Done !": "Done !", + "auth.password": "auth.password", + "The password is incorrect.": "The password is incorrect.", + "The provided password was incorrect.": "The provided password was incorrect.", + "Load More": "Load More", + "Create Plugin": "Create Plugin", + "Description": "Description", + "Icon": "Icon", + "Color": "Color", + "Upload Plugin": "Upload Plugin", + "Tables": "Tables", + "Enable Plugin": "Enable Plugin", + "Disable Plugin": "Disable Plugin", + "Delete Plugin": "Delete Plugin", + "Github": "Github", + "Docs": "Docs", + "Add New Plugin": "Add New Plugin", + "GitHub": "GitHub", + "Start Install The Package": "Start Install The Package", + "Authors": "Authors", + "Licenses": "Licenses", + "Upload New Plugin File": "Upload New Plugin File", + "Table": "Table", + "Table Name": "Table Name", + "Columns": "Columns", + "Column Name": "Column Name", + "Column Type": "Column Type", + "Default": "Default", + "Length": "Length", + "Nullable": "Nullable", + "Index": "Index", + "Auto Increment": "Auto Increment", + "Primary": "Primary", + "Unique": "Unique", + "Unsigned": "Unsigned", + "Foreign Key": "Foreign Key", + "Foreign Table": "Foreign Table", + "Foreign Column": "Foreign Column", + "On Delete Cascade": "On Delete Cascade", + "Timestamps": "Timestamps", + "Soft Deletes": "Soft Deletes", + "Table Generator": "Table Generator", + "Generate Migration": "Generate Migration", + "Run Migrate": "Run Migrate", + "Generate CRUD": "Generate CRUD", + "Generate Models": "Generate Models", + "Generate Controllers": "Generate Controllers", + "Generate Form Request": "Generate Form Request", + "Generate JSON Resource": "Generate JSON Resource", + "Generate Views": "Generate Views", + "Generate Tables": "Generate Tables", + "Generate Routes": "Generate Routes", + "Generate API Routes": "Generate API Routes", + "Generate Menu": "Generate Menu", + "Generate Flutter App": "Generate Flutter App", + "Generate Flutter Module": "Generate Flutter Module", + "Generate Flutter CRUD": "Generate Flutter CRUD", + "Back": "Back", + "Generate": "Generate", + "Module": "Module", + "Comment": "Comment", + "Soft deletes": "Soft deletes", + "Migrated": "Migrated", + "Generated": "Generated", + "Module Not Found": "Module Not Found", + "Migration Created Successfully": "Migration Created Successfully", + "Plugin Already Exists": "Plugin Already Exists", + "Plugin Created Successfully": "Plugin Created Successfully", + "Plugins Has Been Reloaded": "Plugins Has Been Reloaded", + "Plugin Status Changed Successfully": "Plugin Status Changed Successfully", + "Plugin Deleted Successfully": "Plugin Deleted Successfully", + "Plugin Install Start In Background": "Plugin Install Start In Background", + "Your Module Has Been Added Success": "Your Module Has Been Added Success", + "Sorry Your File Uploaded Is Not Correct": "Sorry Your File Uploaded Is Not Correct", + "Table Not Found": "Table Not Found", + "Table Already Exists": "Table Already Exists", + "Table Migrated Successfully": "Table Migrated Successfully", + "Table Generated Successfully": "Table Generated Successfully", + "Table updated successfully": "Table updated successfully", + "Table deleted successfully": "Table deleted successfully", + "Plugin Has Been Deleted": "Plugin Has Been Deleted", + "Id": "Id", + "Table Has Been Deleted": "Table Has Been Deleted", + "Settings": "Settings", + "Plugins": "Plugins", + "There are no items to show.": "There are no items to show.", + "Actions": "Actions", + "Date Range": "Date Range", + "...": "...", + "The password confirmation has expired.": "The password confirmation has expired.", + "Date": "Date", + "Home": "Home", + "Documentation": "Documentation", + "Change Language": "Change Language", + "Current Language": "Current Language", + "Import Translations": "Import Translations", + "Upload Or Drop your excel file here": "Upload Or Drop your excel file here", + "Import": "Import", + "Tools": "Tools" +} \ No newline at end of file diff --git a/modules_statuses.json b/modules_statuses.json new file mode 100644 index 0000000..2c63c08 --- /dev/null +++ b/modules_statuses.json @@ -0,0 +1,2 @@ +{ +} diff --git a/package.json b/package.json index 4e934ca..d73f88f 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,44 @@ { "private": true, - "type": "module", "scripts": { "dev": "vite", - "build": "vite build" + "build": "vite build && vite build --ssr" }, "devDependencies": { - "axios": "^1.6.4", - "laravel-vite-plugin": "^1.0", - "vite": "^5.0" + "@protonemedia/laravel-splade": "^1.1.0", + "@tailwindcss/forms": "^0.5.3", + "@tailwindcss/typography": "^0.5.8", + "@vitejs/plugin-vue": "^4.0.0", + "autoprefixer": "^10.4.13", + "axios": "^1.1.2", + "laravel-vite-plugin": "^0.7.3", + "lodash": "^4.17.21", + "postcss": "^8.4.18", + "postcss-scss": "^4.0.6", + "sass": "^1.57.1", + "tailwindcss": "^3.2.1", + "vite": "^4.0.0", + "vue": "^3.2.41" + }, + "dependencies": { + "jquery": "^3.7.1", + "@vueuse/core": "^10.5.0", + "@suadelabs/vue3-multiselect": "^1.0.2", + "@tailwindcss/line-clamp": "^0.4.2", + "boxicons": "^2.1.4", + "codemirror-editor-vue3": "^2.1.8", + "moment": "^2.29.4", + "numeral": "^2.0.6", + "postcss-import": "^15.1.0", + "tailwindcss-rtl": "^0.9.0", + "tippy.js": "^6.3.7", + "lodash-es": "^4.17.21", + "vue-draggable-next": "^2.2.1", + "vue3-editor": "^0.1.1", + "vue3-swatches": "^1.2.3", + "swiper": "^11.0.5", + "vue3-tel-input": "^1.0.4", + "vue3-carousel": "^0.3.1", + "md-editor-v3": "^4.12.1" } } diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..67cdf1a --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/resources/css/.DS_Store b/resources/css/.DS_Store new file mode 100644 index 0000000..2ccdbc3 Binary files /dev/null and b/resources/css/.DS_Store differ diff --git a/resources/css/_checkbox-radio-switch.css b/resources/css/_checkbox-radio-switch.css new file mode 100644 index 0000000..ea593de --- /dev/null +++ b/resources/css/_checkbox-radio-switch.css @@ -0,0 +1,59 @@ +@layer components { + .checkbox, .radio, .switch { + @apply inline-flex items-center cursor-pointer relative; + } + + .checkbox input[type=checkbox], .radio input[type=radio], .switch input[type=checkbox] { + @apply absolute left-0 opacity-0 -z-1; + } + + .checkbox input[type=checkbox]+.check, .radio input[type=radio]+.check, .switch input[type=checkbox]+.check { + @apply border-gray-700 border transition-colors duration-200 dark:bg-slate-800; + } + + .checkbox input[type=checkbox]:focus+.check, .radio input[type=radio]:focus+.check, .switch input[type=checkbox]:focus+.check { + @apply ring ring-blue-700; + } + + .checkbox input[type=checkbox]+.check, .radio input[type=radio]+.check { + @apply block w-5 h-5; + } + + .checkbox input[type=checkbox]+.check { + @apply rounded; + } + + .switch input[type=checkbox]+.check { + @apply flex items-center shrink-0 w-12 h-6 p-0.5 bg-gray-200; + } + + .radio input[type=radio]+.check, .switch input[type=checkbox]+.check, .switch input[type=checkbox]+.check:before { + @apply rounded-full; + } + + .checkbox input[type=checkbox]:checked+.check, .radio input[type=radio]:checked+.check { + @apply bg-no-repeat bg-center border-4; + } + + .checkbox input[type=checkbox]:checked+.check { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath style='fill:%23fff' d='M 0.04038059,0.6267767 0.14644661,0.52071068 0.42928932,0.80355339 0.3232233,0.90961941 z M 0.21715729,0.80355339 0.85355339,0.16715729 0.95961941,0.2732233 0.3232233,0.90961941 z'%3E%3C/path%3E%3C/svg%3E"); + } + + .radio input[type=radio]:checked+.check { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z' /%3E%3C/svg%3E"); + } + + .switch input[type=checkbox]:checked+.check, .checkbox input[type=checkbox]:checked+.check, .radio input[type=radio]:checked+.check { + @apply bg-blue-600 border-blue-600; + } + + .switch input[type=checkbox]+.check:before { + content: ''; + @apply block w-5 h-5 bg-white border border-gray-700; + } + + .switch input[type=checkbox]:checked+.check:before { + transform: translate3d(110%, 0 ,0); + @apply border-blue-600; + } +} diff --git a/resources/css/_progress.css b/resources/css/_progress.css new file mode 100644 index 0000000..65d6796 --- /dev/null +++ b/resources/css/_progress.css @@ -0,0 +1,21 @@ +@layer base { + progress { + @apply h-3 rounded-full overflow-hidden; + } + + progress::-webkit-progress-bar { + @apply bg-blue-200; + } + + progress::-webkit-progress-value { + @apply bg-blue-500; + } + + progress::-moz-progress-bar { + @apply bg-blue-500; + } + + progress::-ms-fill { + @apply bg-blue-500 border-0; + } +} diff --git a/resources/css/_scrollbars.css b/resources/css/_scrollbars.css new file mode 100644 index 0000000..a181b84 --- /dev/null +++ b/resources/css/_scrollbars.css @@ -0,0 +1,41 @@ +@layer base { + html { + scrollbar-width: thin; + scrollbar-color: rgb(156, 163, 175) rgb(249, 250, 251); + } + + body::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + body::-webkit-scrollbar-track { + @apply bg-gray-50; + } + + body::-webkit-scrollbar-thumb { + @apply bg-gray-400 rounded; + } + + body::-webkit-scrollbar-thumb:hover { + @apply bg-gray-500; + } +} + +@layer utilities { + .dark-scrollbars-compat { + scrollbar-color: rgb(71, 85, 105) rgb(30, 41, 59); + } + + .dark-scrollbars::-webkit-scrollbar-track { + @apply bg-slate-800; + } + + .dark-scrollbars::-webkit-scrollbar-thumb { + @apply bg-slate-600; + } + + .dark-scrollbars::-webkit-scrollbar-thumb:hover { + @apply bg-slate-500; + } +} diff --git a/resources/css/_table.css b/resources/css/_table.css new file mode 100644 index 0000000..40146ac --- /dev/null +++ b/resources/css/_table.css @@ -0,0 +1,48 @@ +@layer base { + /*table {*/ + /* @apply w-full;*/ + /*}*/ + + /*thead {*/ + /* @apply hidden lg:table-header-group;*/ + /*}*/ + + /*tr {*/ + /* @apply max-w-full block relative border-b-4 border-gray-100*/ + /* lg:table-row lg:border-b-0 dark:border-slate-800;*/ + /*}*/ + + /*tr:last-child {*/ + /* @apply border-b-0;*/ + /*}*/ + + /*td:not(:first-child) {*/ + /* @apply lg:border-l lg:border-t-0 lg:border-r-0 lg:border-b-0 lg:border-gray-100 lg:dark:border-slate-700;*/ + /*}*/ + + /*th {*/ + /* @apply lg:text-left lg:p-3;*/ + /*}*/ + + /*td {*/ + /* @apply flex justify-between text-right py-3 px-4 align-top border-b border-gray-100*/ + /* lg:table-cell lg:text-left lg:p-3 lg:align-middle lg:border-b-0 dark:border-slate-800;*/ + /*}*/ + + /*td:last-child {*/ + /* @apply border-b-0;*/ + /*}*/ + + /*tbody tr, tbody tr:nth-child(odd) {*/ + /* @apply lg:hover:bg-gray-100 lg:dark:hover:bg-slate-700/70;*/ + /*}*/ + + /*tbody tr:nth-child(odd) {*/ + /* @apply lg:bg-gray-100/50 lg:dark:bg-slate-800/50;*/ + /*}*/ + + /*td:before {*/ + /* content: attr(data-label);*/ + /* @apply font-semibold pr-3 text-left lg:hidden;*/ + /*}*/ +} diff --git a/resources/css/app.css b/resources/css/app.css index e69de29..ce958e2 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -0,0 +1,60 @@ +@import "./tailwind/_base.css"; +@import "./tailwind/_components.css"; +@import "./tailwind/_utilities.css"; + +@import "./_checkbox-radio-switch.css"; +@import "./_progress.css"; +@import "./_scrollbars.css"; +@import "./_table.css"; + +@import 'module.esm.css'; + +@import 'tippy.js/dist/tippy.css'; +@import 'tippy.js/themes/light.css'; + +@import 'boxicons/css/boxicons.min.css'; + +@import url("https://fonts.googleapis.com/css2?family=ABeeZee:ital@0;1&family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&display=swap"); + +@layer base { + html { + -webkit-tap-highlight-color: transparent; + } + + :root.dark { + color-scheme: dark; + } + + [dir='rtl'] select { + background-position: left 0.5rem center !important; + padding-left: 2.5rem; + padding-right: 0.75rem; + } +} + +@layer components { + .filament-login-page { + @apply relative bg-no-repeat; + background-image: radial-gradient( + circle at top, + theme('colors.primary.100'), + theme('colors.white') 50% + ); + } + + .dark .filament-login-page { + background-image: radial-gradient( + circle at top, + theme('colors.primary.800'), + theme('colors.gray.800'), + theme('colors.gray.900') 100% + ); + } + + .filament-login-page form::before { + @apply w-2/3 absolute inset-x-0 h-px mx-auto bg-gradient-to-r from-gray-200 via-primary-400 to-gray-200 dark:from-gray-700 dark:via-primary-400 dark:to-gray-700; + content: ''; + z-index: 1; + top: -1px; + } +} diff --git a/resources/css/module.esm.css b/resources/css/module.esm.css new file mode 100644 index 0000000..089f91c --- /dev/null +++ b/resources/css/module.esm.css @@ -0,0 +1,1817 @@ +@charset "UTF-8"; + +/* node_modules/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css */ +.filepond--image-preview-markup { + position: absolute; + left: 0; + top: 0; +} +.filepond--image-preview-wrapper { + z-index: 2; +} +.filepond--image-preview-overlay { + display: block; + position: absolute; + left: 0; + top: 0; + width: 100%; + min-height: 5rem; + max-height: 7rem; + margin: 0; + opacity: 0; + z-index: 2; + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.filepond--image-preview-overlay svg { + width: 100%; + height: auto; + color: inherit; + max-height: inherit; +} +.filepond--image-preview-overlay-idle { + mix-blend-mode: multiply; + color: rgba(40, 40, 40, 0.85); +} +.filepond--image-preview-overlay-success { + mix-blend-mode: normal; + color: rgba(54, 151, 99, 1); +} +.filepond--image-preview-overlay-failure { + mix-blend-mode: normal; + color: rgba(196, 78, 71, 1); +} +@supports (-webkit-marquee-repetition: infinite) and ((-o-object-fit: fill) or (object-fit: fill)) { + .filepond--image-preview-overlay-idle { + mix-blend-mode: normal; + } +} +.filepond--image-preview-wrapper { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + position: absolute; + left: 0; + top: 0; + right: 0; + height: 100%; + margin: 0; + border-radius: 0.45em; + overflow: hidden; + background: rgba(0, 0, 0, 0.01); +} +.filepond--image-preview { + position: absolute; + left: 0; + top: 0; + z-index: 1; + display: flex; + align-items: center; + height: 100%; + width: 100%; + pointer-events: none; + background: #222; + will-change: transform, opacity; +} +.filepond--image-clip { + position: relative; + overflow: hidden; + margin: 0 auto; +} +.filepond--image-clip[data-transparency-indicator=grid] img, +.filepond--image-clip[data-transparency-indicator=grid] canvas { + background-color: #fff; + background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' fill='%23eee'%3E%3Cpath d='M0 0 H50 V50 H0'/%3E%3Cpath d='M50 50 H100 V100 H50'/%3E%3C/svg%3E"); + background-size: 1.25em 1.25em; +} +.filepond--image-bitmap, +.filepond--image-vector { + position: absolute; + left: 0; + top: 0; + will-change: transform; +} +.filepond--root[data-style-panel-layout~=integrated] .filepond--image-preview-wrapper { + border-radius: 0; +} +.filepond--root[data-style-panel-layout~=integrated] .filepond--image-preview { + height: 100%; + display: flex; + justify-content: center; + align-items: center; +} +.filepond--root[data-style-panel-layout~=circle] .filepond--image-preview-wrapper { + border-radius: 99999rem; +} +.filepond--root[data-style-panel-layout~=circle] .filepond--image-preview-overlay { + top: auto; + bottom: 0; + -webkit-transform: scaleY(-1); + transform: scaleY(-1); +} +.filepond--root[data-style-panel-layout~=circle] .filepond--file .filepond--file-action-button[data-align*=bottom]:not([data-align*="center"]) { + margin-bottom: 0.325em; +} +.filepond--root[data-style-panel-layout~=circle] .filepond--file [data-align*=left] { + left: calc(50% - 3em); +} +.filepond--root[data-style-panel-layout~=circle] .filepond--file [data-align*=right] { + right: calc(50% - 3em); +} +.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=left], +.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=right] { + margin-bottom: calc(0.325em + 0.1875em); +} +.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=center] { + margin-top: 0; + margin-bottom: 0.1875em; + margin-left: 0.1875em; +} + +/* node_modules/filepond-plugin-media-preview/dist/filepond-plugin-media-preview.css */ +.filepond--media-preview audio { + display: none; +} +.filepond--media-preview .audioplayer { + width: calc(100% - 1.4em); + margin: 2.3em auto auto; +} +.filepond--media-preview .playpausebtn { + margin-top: 0.3em; + margin-right: 0.3em; + height: 25px; + width: 25px; + border-radius: 25px; + border: none; + background-repeat: no-repeat; + background-position: center; + float: left; + outline: none; + cursor: pointer; +} +.filepond--media-preview .playpausebtn:hover { + background-color: rgba(0, 0, 0, 0.5); +} +.filepond--media-preview .play { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAyElEQVQ4T9XUsWoCQRRG4XPaFL5SfIy8gKYKBCysrax8Ahs7qzQ2qVIFOwsrsbEWLEK6EBFGBrIQhN2d3dnGgalm+Jh7789Ix8uOPe4YDCH0gZ66atKW0pJDCE/AEngDXtRjCpwCRucbGANzNVTBqWBhfAJDdV+GNgWj8wtM41bPt3AbsDB2f69d/0dzwC0wUDe54A8wAWbqJbfkD+BZPeQO5QsYqYu6LKb0MIb7VT3VYfG8CnwEHtT3FKi4c8e/TZMyk3LYFrwCgMdHFbRDKS8AAAAASUVORK5CYII=); +} +.filepond--media-preview .pause { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAh0lEQVQ4T+2UsQkCURBE30PLMbAMMResQrAPsQ0TK9AqDKxGZeTLD74aGNwlhzfZssvADDMrPcOe+RggYZIJcG2s2KinMidZAvu6u6uzT8u+JCeZArfmcKUeK+EaONTdQy23bxgJX8aPHvIHsSnVuzTx36rn2pQFsGuqN//ZlK7vbIDvq6vkJ9yteBXzecYbAAAAAElFTkSuQmCC); +} +.filepond--media-preview .timeline { + width: calc(100% - 2.5em); + height: 3px; + margin-top: 1em; + float: left; + border-radius: 15px; + background: rgba(255, 255, 255, 0.3); +} +.filepond--media-preview .playhead { + width: 13px; + height: 13px; + border-radius: 50%; + margin-top: -5px; + background: white; +} +.filepond--media-preview-wrapper { + position: absolute; + left: 0; + top: 0; + right: 0; + height: 100%; + margin: 0; + border-radius: 0.45em; + overflow: hidden; + background: rgba(0, 0, 0, 0.01); + pointer-events: auto; +} +.filepond--media-preview-wrapper:before { + content: " "; + position: absolute; + width: 100%; + height: 2em; + background: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#000000", endColorstr="#00000000", GradientType=0); + z-index: 3; +} +.filepond--media-preview { + position: relative; + z-index: 1; + display: block; + width: 100%; + height: 100%; + -webkit-transform-origin: center center; + transform-origin: center center; + will-change: transform, opacity; +} +.filepond--media-preview video, +.filepond--media-preview audio { + width: 100%; + will-change: transform; +} + +/* node_modules/filepond/dist/filepond.min.css */ +.filepond--assistant { + position: absolute; + overflow: hidden; + height: 1px; + width: 1px; + padding: 0; + border: 0; + clip: rect(1px, 1px, 1px, 1px); + -webkit-clip-path: inset(50%); + clip-path: inset(50%); + white-space: nowrap; +} +.filepond--browser.filepond--browser { + position: absolute; + margin: 0; + padding: 0; + left: 1em; + top: 1.75em; + width: calc(100% - 2em); + opacity: 0; + font-size: 0; +} +.filepond--data { + position: absolute; + width: 0; + height: 0; + padding: 0; + margin: 0; + border: none; + visibility: hidden; + pointer-events: none; + contain: strict; +} +.filepond--drip { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow: hidden; + opacity: .1; + pointer-events: none; + border-radius: .5em; + background: rgba(0, 0, 0, .01); +} +.filepond--drip-blob { + -webkit-transform-origin: center center; + transform-origin: center center; + width: 8em; + height: 8em; + margin-left: -4em; + margin-top: -4em; + background: #292625; + border-radius: 50%; +} +.filepond--drip-blob, +.filepond--drop-label { + position: absolute; + top: 0; + left: 0; + will-change: transform, opacity; +} +.filepond--drop-label { + right: 0; + margin: 0; + color: #4f4f4f; + display: flex; + justify-content: center; + align-items: center; + height: 0; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.filepond--drop-label.filepond--drop-label label { + display: block; + margin: 0; + padding: .5em; +} +.filepond--drop-label label { + cursor: default; + font-size: .875em; + font-weight: 400; + text-align: center; + line-height: 1.5; +} +.filepond--label-action { + text-decoration: underline; + -webkit-text-decoration-skip: ink; + text-decoration-skip-ink: auto; + -webkit-text-decoration-color: #a7a4a4; + text-decoration-color: #a7a4a4; + cursor: pointer; +} +.filepond--root[data-disabled] .filepond--drop-label label { + opacity: .5; +} +.filepond--file-action-button.filepond--file-action-button { + font-size: 1em; + width: 1.625em; + height: 1.625em; + font-family: inherit; + line-height: inherit; + margin: 0; + padding: 0; + border: none; + outline: none; + will-change: transform, opacity; +} +.filepond--file-action-button.filepond--file-action-button span { + position: absolute; + overflow: hidden; + height: 1px; + width: 1px; + padding: 0; + border: 0; + clip: rect(1px, 1px, 1px, 1px); + -webkit-clip-path: inset(50%); + clip-path: inset(50%); + white-space: nowrap; +} +.filepond--file-action-button.filepond--file-action-button svg { + width: 100%; + height: 100%; +} +.filepond--file-action-button.filepond--file-action-button:after { + position: absolute; + left: -.75em; + right: -.75em; + top: -.75em; + bottom: -.75em; + content: ""; +} +.filepond--file-action-button { + cursor: auto; + color: #fff; + border-radius: 50%; + background-color: rgba(0, 0, 0, .5); + background-image: none; + box-shadow: 0 0 0 0 hsla(0, 0%, 100%, 0); + transition: box-shadow .25s ease-in; +} +.filepond--file-action-button:focus, +.filepond--file-action-button:hover { + box-shadow: 0 0 0 .125em hsla(0, 0%, 100%, .9); +} +.filepond--file-action-button[disabled] { + color: hsla(0, 0%, 100%, .5); + background-color: rgba(0, 0, 0, .25); +} +.filepond--file-action-button[hidden] { + display: none; +} +.filepond--action-edit-item.filepond--action-edit-item { + width: 2em; + height: 2em; + padding: .1875em; +} +.filepond--action-edit-item.filepond--action-edit-item[data-align*=center] { + margin-left: -.1875em; +} +.filepond--action-edit-item.filepond--action-edit-item[data-align*=bottom] { + margin-bottom: -.1875em; +} +.filepond--action-edit-item-alt { + border: none; + line-height: inherit; + background: transparent; + font-family: inherit; + color: inherit; + outline: none; + padding: 0; + margin: 0 0 0 .25em; + pointer-events: all; + position: absolute; +} +.filepond--action-edit-item-alt svg { + width: 1.3125em; + height: 1.3125em; +} +.filepond--action-edit-item-alt span { + font-size: 0; + opacity: 0; +} +.filepond--file-info { + position: static; + display: flex; + flex-direction: column; + align-items: flex-start; + flex: 1; + margin: 0 .5em 0 0; + min-width: 0; + will-change: transform, opacity; + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.filepond--file-info * { + margin: 0; +} +.filepond--file-info .filepond--file-info-main { + font-size: .75em; + line-height: 1.2; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + width: 100%; +} +.filepond--file-info .filepond--file-info-sub { + font-size: .625em; + opacity: .5; + transition: opacity .25s ease-in-out; + white-space: nowrap; +} +.filepond--file-info .filepond--file-info-sub:empty { + display: none; +} +.filepond--file-status { + position: static; + display: flex; + flex-direction: column; + align-items: flex-end; + flex-grow: 0; + flex-shrink: 0; + margin: 0; + min-width: 2.25em; + text-align: right; + will-change: transform, opacity; + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.filepond--file-status * { + margin: 0; + white-space: nowrap; +} +.filepond--file-status .filepond--file-status-main { + font-size: .75em; + line-height: 1.2; +} +.filepond--file-status .filepond--file-status-sub { + font-size: .625em; + opacity: .5; + transition: opacity .25s ease-in-out; +} +.filepond--file-wrapper.filepond--file-wrapper { + border: none; + margin: 0; + padding: 0; + min-width: 0; + height: 100%; +} +.filepond--file-wrapper.filepond--file-wrapper > legend { + position: absolute; + overflow: hidden; + height: 1px; + width: 1px; + padding: 0; + border: 0; + clip: rect(1px, 1px, 1px, 1px); + -webkit-clip-path: inset(50%); + clip-path: inset(50%); + white-space: nowrap; +} +.filepond--file { + position: static; + display: flex; + height: 100%; + align-items: flex-start; + padding: .5625em; + color: #fff; + border-radius: .5em; +} +.filepond--file .filepond--file-status { + margin-left: auto; + margin-right: 2.25em; +} +.filepond--file .filepond--processing-complete-indicator { + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + z-index: 3; +} +.filepond--file .filepond--file-action-button, +.filepond--file .filepond--processing-complete-indicator, +.filepond--file .filepond--progress-indicator { + position: absolute; +} +.filepond--file [data-align*=left] { + left: .5625em; +} +.filepond--file [data-align*=right] { + right: .5625em; +} +.filepond--file [data-align*=center] { + left: calc(50% - .8125em); +} +.filepond--file [data-align*=bottom] { + bottom: 1.125em; +} +.filepond--file [data-align=center] { + top: calc(50% - .8125em); +} +.filepond--file .filepond--progress-indicator { + margin-top: .1875em; +} +.filepond--file .filepond--progress-indicator[data-align*=right] { + margin-right: .1875em; +} +.filepond--file .filepond--progress-indicator[data-align*=left] { + margin-left: .1875em; +} +[data-filepond-item-state*=error] .filepond--file-info, +[data-filepond-item-state*=invalid] .filepond--file-info, +[data-filepond-item-state=cancelled] .filepond--file-info { + margin-right: 2.25em; +} +[data-filepond-item-state~=processing] .filepond--file-status-sub { + opacity: 0; +} +[data-filepond-item-state~=processing] .filepond--action-abort-item-processing ~ .filepond--file-status .filepond--file-status-sub { + opacity: .5; +} +[data-filepond-item-state=processing-error] .filepond--file-status-sub { + opacity: 0; +} +[data-filepond-item-state=processing-error] .filepond--action-retry-item-processing ~ .filepond--file-status .filepond--file-status-sub { + opacity: .5; +} +[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing svg { + -webkit-animation: fall .5s linear .125s both; + animation: fall .5s linear .125s both; +} +[data-filepond-item-state=processing-complete] .filepond--file-status-sub { + opacity: .5; +} +[data-filepond-item-state=processing-complete] .filepond--file-info-sub, +[data-filepond-item-state=processing-complete] .filepond--processing-complete-indicator:not([style*=hidden]) ~ .filepond--file-status .filepond--file-status-sub { + opacity: 0; +} +[data-filepond-item-state=processing-complete] .filepond--action-revert-item-processing ~ .filepond--file-info .filepond--file-info-sub { + opacity: .5; +} +[data-filepond-item-state*=error] .filepond--file-wrapper, +[data-filepond-item-state*=error] .filepond--panel, +[data-filepond-item-state*=invalid] .filepond--file-wrapper, +[data-filepond-item-state*=invalid] .filepond--panel { + -webkit-animation: shake .65s linear both; + animation: shake .65s linear both; +} +[data-filepond-item-state*=busy] .filepond--progress-indicator svg { + -webkit-animation: spin 1s linear infinite; + animation: spin 1s linear infinite; +} +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + to { + -webkit-transform: rotate(1turn); + transform: rotate(1turn); + } +} +@keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + to { + -webkit-transform: rotate(1turn); + transform: rotate(1turn); + } +} +@-webkit-keyframes shake { + 10%, 90% { + -webkit-transform: translateX(-.0625em); + transform: translateX(-.0625em); + } + 20%, 80% { + -webkit-transform: translateX(.125em); + transform: translateX(.125em); + } + 30%, 50%, 70% { + -webkit-transform: translateX(-.25em); + transform: translateX(-.25em); + } + 40%, 60% { + -webkit-transform: translateX(.25em); + transform: translateX(.25em); + } +} +@keyframes shake { + 10%, 90% { + -webkit-transform: translateX(-.0625em); + transform: translateX(-.0625em); + } + 20%, 80% { + -webkit-transform: translateX(.125em); + transform: translateX(.125em); + } + 30%, 50%, 70% { + -webkit-transform: translateX(-.25em); + transform: translateX(-.25em); + } + 40%, 60% { + -webkit-transform: translateX(.25em); + transform: translateX(.25em); + } +} +@-webkit-keyframes fall { + 0% { + opacity: 0; + -webkit-transform: scale(.5); + transform: scale(.5); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + 70% { + opacity: 1; + -webkit-transform: scale(1.1); + transform: scale(1.1); + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + to { + -webkit-transform: scale(1); + transform: scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } +} +@keyframes fall { + 0% { + opacity: 0; + -webkit-transform: scale(.5); + transform: scale(.5); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + 70% { + opacity: 1; + -webkit-transform: scale(1.1); + transform: scale(1.1); + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + to { + -webkit-transform: scale(1); + transform: scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } +} +.filepond--hopper[data-hopper-state=drag-over] > * { + pointer-events: none; +} +.filepond--hopper[data-hopper-state=drag-over]:after { + content: ""; + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + z-index: 100; +} +.filepond--progress-indicator { + z-index: 103; +} +.filepond--file-action-button { + z-index: 102; +} +.filepond--file-status { + z-index: 101; +} +.filepond--file-info { + z-index: 100; +} +.filepond--item { + position: absolute; + top: 0; + left: 0; + right: 0; + z-index: 1; + padding: 0; + margin: .25em; + will-change: transform, opacity; +} +.filepond--item > .filepond--panel { + z-index: -1; +} +.filepond--item > .filepond--panel .filepond--panel-bottom { + box-shadow: 0 .0625em .125em -.0625em rgba(0, 0, 0, .25); +} +.filepond--item > .filepond--file-wrapper, +.filepond--item > .filepond--panel { + transition: opacity .15s ease-out; +} +.filepond--item[data-drag-state] { + cursor: -webkit-grab; + cursor: grab; +} +.filepond--item[data-drag-state] > .filepond--panel { + transition: box-shadow .125s ease-in-out; + box-shadow: 0 0 0 transparent; +} +.filepond--item[data-drag-state=drag] { + cursor: -webkit-grabbing; + cursor: grabbing; +} +.filepond--item[data-drag-state=drag] > .filepond--panel { + box-shadow: 0 .125em .3125em rgba(0, 0, 0, .325); +} +.filepond--item[data-drag-state]:not([data-drag-state=idle]) { + z-index: 2; +} +.filepond--item-panel { + background-color: #64605e; +} +[data-filepond-item-state=processing-complete] .filepond--item-panel { + background-color: #369763; +} +[data-filepond-item-state*=error] .filepond--item-panel, +[data-filepond-item-state*=invalid] .filepond--item-panel { + background-color: #c44e47; +} +.filepond--item-panel { + border-radius: .5em; + transition: background-color .25s; +} +.filepond--list-scroller { + position: absolute; + top: 0; + left: 0; + right: 0; + margin: 0; + will-change: transform; +} +.filepond--list-scroller[data-state=overflow] .filepond--list { + bottom: 0; + right: 0; +} +.filepond--list-scroller[data-state=overflow] { + overflow-y: scroll; + overflow-x: hidden; + -webkit-overflow-scrolling: touch; + -webkit-mask: linear-gradient(180deg, #000 calc(100% - .5em), transparent); + mask: linear-gradient(180deg, #000 calc(100% - .5em), transparent); +} +.filepond--list-scroller::-webkit-scrollbar { + background: transparent; +} +.filepond--list-scroller::-webkit-scrollbar:vertical { + width: 1em; +} +.filepond--list-scroller::-webkit-scrollbar:horizontal { + height: 0; +} +.filepond--list-scroller::-webkit-scrollbar-thumb { + background-color: rgba(0, 0, 0, .3); + border-radius: 99999px; + border: .3125em solid transparent; + background-clip: content-box; +} +.filepond--list.filepond--list { + position: absolute; + top: 0; + margin: 0; + padding: 0; + list-style-type: none; + will-change: transform; +} +.filepond--list { + left: .75em; + right: .75em; +} +.filepond--root[data-style-panel-layout~=integrated] { + width: 100%; + height: 100%; + max-width: none; + margin: 0; +} +.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root, +.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root { + border-radius: 0; +} +.filepond--root[data-style-panel-layout~=circle] .filepond--panel-root > *, +.filepond--root[data-style-panel-layout~=integrated] .filepond--panel-root > * { + display: none; +} +.filepond--root[data-style-panel-layout~=circle] .filepond--drop-label, +.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label { + bottom: 0; + height: auto; + display: flex; + justify-content: center; + align-items: center; + z-index: 7; +} +.filepond--root[data-style-panel-layout~=circle] .filepond--item-panel, +.filepond--root[data-style-panel-layout~=integrated] .filepond--item-panel { + display: none; +} +.filepond--root[data-style-panel-layout~=compact] .filepond--list-scroller, +.filepond--root[data-style-panel-layout~=integrated] .filepond--list-scroller { + overflow: hidden; + height: 100%; + margin-top: 0; + margin-bottom: 0; +} +.filepond--root[data-style-panel-layout~=compact] .filepond--list, +.filepond--root[data-style-panel-layout~=integrated] .filepond--list { + left: 0; + right: 0; + height: 100%; +} +.filepond--root[data-style-panel-layout~=compact] .filepond--item, +.filepond--root[data-style-panel-layout~=integrated] .filepond--item { + margin: 0; +} +.filepond--root[data-style-panel-layout~=compact] .filepond--file-wrapper, +.filepond--root[data-style-panel-layout~=integrated] .filepond--file-wrapper { + height: 100%; +} +.filepond--root[data-style-panel-layout~=compact] .filepond--drop-label, +.filepond--root[data-style-panel-layout~=integrated] .filepond--drop-label { + z-index: 7; +} +.filepond--root[data-style-panel-layout~=circle] { + border-radius: 99999rem; + overflow: hidden; +} +.filepond--root[data-style-panel-layout~=circle] > .filepond--panel { + border-radius: inherit; +} +.filepond--root[data-style-panel-layout~=circle] > .filepond--panel > * { + display: none; +} +.filepond--root[data-style-panel-layout~=circle] .filepond--file-info, +.filepond--root[data-style-panel-layout~=circle] .filepond--file-status { + display: none; +} +.filepond--root[data-style-panel-layout~=circle] .filepond--action-edit-item { + opacity: 1 !important; + visibility: visible !important; +} +@media not all and (min-resolution:0.001dpcm) { + @supports (-webkit-appearance:none) and (stroke-color:transparent) { + .filepond--root[data-style-panel-layout~=circle] { + will-change: transform; + } + } +} +.filepond--panel-root { + border-radius: .5em; + background-color: #f1f0ef; +} +.filepond--panel { + position: absolute; + left: 0; + top: 0; + right: 0; + margin: 0; + height: 100% !important; + pointer-events: none; +} +.filepond-panel:not([data-scalable=false]) { + height: auto !important; +} +.filepond--panel[data-scalable=false] > div { + display: none; +} +.filepond--panel[data-scalable=true] { + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; + background-color: transparent !important; + border: none !important; +} +.filepond--panel-bottom, +.filepond--panel-center, +.filepond--panel-top { + position: absolute; + left: 0; + top: 0; + right: 0; + margin: 0; + padding: 0; +} +.filepond--panel-bottom, +.filepond--panel-top { + height: .5em; +} +.filepond--panel-top { + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; + border-bottom: none !important; +} +.filepond--panel-top:after { + content: ""; + position: absolute; + height: 2px; + left: 0; + right: 0; + bottom: -1px; + background-color: inherit; +} +.filepond--panel-bottom, +.filepond--panel-center { + will-change: transform; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transform-origin: left top; + transform-origin: left top; + -webkit-transform: translate3d(0, .5em, 0); + transform: translate3d(0, .5em, 0); +} +.filepond--panel-bottom { + border-top-left-radius: 0 !important; + border-top-right-radius: 0 !important; + border-top: none !important; +} +.filepond--panel-bottom:before { + content: ""; + position: absolute; + height: 2px; + left: 0; + right: 0; + top: -1px; + background-color: inherit; +} +.filepond--panel-center { + height: 100px !important; + border-top: none !important; + border-bottom: none !important; + border-radius: 0 !important; +} +.filepond--panel-center:not([style]) { + visibility: hidden; +} +.filepond--progress-indicator { + position: static; + width: 1.25em; + height: 1.25em; + color: #fff; + margin: 0; + pointer-events: none; + will-change: transform, opacity; +} +.filepond--progress-indicator svg { + width: 100%; + height: 100%; + vertical-align: top; + transform-box: fill-box; +} +.filepond--progress-indicator path { + fill: none; + stroke: currentColor; +} +.filepond--list-scroller { + z-index: 6; +} +.filepond--drop-label { + z-index: 5; +} +.filepond--drip { + z-index: 3; +} +.filepond--root > .filepond--panel { + z-index: 2; +} +.filepond--browser { + z-index: 1; +} +.filepond--root { + box-sizing: border-box; + position: relative; + margin-bottom: 1em; + font-size: 1rem; + line-height: normal; + font-family: + -apple-system, + BlinkMacSystemFont, + Segoe UI, + Roboto, + Helvetica, + Arial, + sans-serif, + Apple Color Emoji, + Segoe UI Emoji, + Segoe UI Symbol; + font-weight: 450; + text-align: left; + text-rendering: optimizeLegibility; + direction: ltr; + contain: layout style size; +} +.filepond--root * { + box-sizing: inherit; + line-height: inherit; +} +.filepond--root :not(text) { + font-size: inherit; +} +.filepond--root[data-disabled] { + pointer-events: none; +} +.filepond--root[data-disabled] .filepond--list-scroller { + pointer-events: all; +} +.filepond--root[data-disabled] .filepond--list { + pointer-events: none; +} +.filepond--root .filepond--drop-label { + min-height: 4.75em; +} +.filepond--root .filepond--list-scroller { + margin-top: 1em; + margin-bottom: 1em; +} +.filepond--root .filepond--credits { + position: absolute; + right: 0; + opacity: .175; + line-height: .85; + font-size: 11px; + color: inherit; + text-decoration: none; + z-index: 3; + bottom: -14px; +} +.filepond--root .filepond--credits[style] { + top: 0; + bottom: auto; + margin-top: 14px; +} + +/* node_modules/trix/dist/trix.css */ +trix-editor { + border: 1px solid #bbb; + border-radius: 3px; + margin: 0; + padding: 0.4em 0.6em; + min-height: 5em; + outline: none; +} +trix-toolbar * { + box-sizing: border-box; +} +trix-toolbar .trix-button-row { + display: flex; + flex-wrap: nowrap; + justify-content: space-between; + overflow-x: auto; +} +trix-toolbar .trix-button-group { + display: flex; + margin-bottom: 10px; + border: 1px solid #bbb; + border-top-color: #ccc; + border-bottom-color: #888; + border-radius: 3px; +} +trix-toolbar .trix-button-group:not(:first-child) { + margin-left: 1.5vw; +} +@media (max-device-width: 768px) { + trix-toolbar .trix-button-group:not(:first-child) { + margin-left: 0; + } +} +trix-toolbar .trix-button-group-spacer { + flex-grow: 1; +} +@media (max-device-width: 768px) { + trix-toolbar .trix-button-group-spacer { + display: none; + } +} +trix-toolbar .trix-button { + position: relative; + float: left; + color: rgba(0, 0, 0, 0.6); + font-size: 0.75em; + font-weight: 600; + white-space: nowrap; + padding: 0 0.5em; + margin: 0; + outline: none; + border: none; + border-bottom: 1px solid #ddd; + border-radius: 0; + background: transparent; +} +trix-toolbar .trix-button:not(:first-child) { + border-left: 1px solid #ccc; +} +trix-toolbar .trix-button.trix-active { + background: #cbeefa; + color: black; +} +trix-toolbar .trix-button:not(:disabled) { + cursor: pointer; +} +trix-toolbar .trix-button:disabled { + color: rgba(0, 0, 0, 0.125); +} +@media (max-device-width: 768px) { + trix-toolbar .trix-button { + letter-spacing: -0.01em; + padding: 0 0.3em; + } +} +trix-toolbar .trix-button--icon { + font-size: inherit; + width: 2.6em; + height: 1.6em; + max-width: calc(0.8em + 4vw); + text-indent: -9999px; +} +@media (max-device-width: 768px) { + trix-toolbar .trix-button--icon { + height: 2em; + max-width: calc(0.8em + 3.5vw); + } +} +trix-toolbar .trix-button--icon::before { + display: inline-block; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + opacity: 0.6; + content: ""; + background-position: center; + background-repeat: no-repeat; + background-size: contain; +} +@media (max-device-width: 768px) { + trix-toolbar .trix-button--icon::before { + right: 6%; + left: 6%; + } +} +trix-toolbar .trix-button--icon.trix-active::before { + opacity: 1; +} +trix-toolbar .trix-button--icon:disabled::before { + opacity: 0.125; +} +trix-toolbar .trix-button--icon-attach::before { + background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M16.5%206v11.5a4%204%200%201%201-8%200V5a2.5%202.5%200%200%201%205%200v10.5a1%201%200%201%201-2%200V6H10v9.5a2.5%202.5%200%200%200%205%200V5a4%204%200%201%200-8%200v12.5a5.5%205.5%200%200%200%2011%200V6h-1.5z%22%2F%3E%3C%2Fsvg%3E); + top: 8%; + bottom: 4%; +} +trix-toolbar .trix-button--icon-bold::before { + background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M15.6%2011.8c1-.7%201.6-1.8%201.6-2.8a4%204%200%200%200-4-4H7v14h7c2.1%200%203.7-1.7%203.7-3.8%200-1.5-.8-2.8-2.1-3.4zM10%207.5h3a1.5%201.5%200%201%201%200%203h-3v-3zm3.5%209H10v-3h3.5a1.5%201.5%200%201%201%200%203z%22%2F%3E%3C%2Fsvg%3E); +} +trix-toolbar .trix-button--icon-italic::before { + background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M10%205v3h2.2l-3.4%208H6v3h8v-3h-2.2l3.4-8H18V5h-8z%22%2F%3E%3C%2Fsvg%3E); +} +trix-toolbar .trix-button--icon-link::before { + background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M9.88%2013.7a4.3%204.3%200%200%201%200-6.07l3.37-3.37a4.26%204.26%200%200%201%206.07%200%204.3%204.3%200%200%201%200%206.06l-1.96%201.72a.91.91%200%201%201-1.3-1.3l1.97-1.71a2.46%202.46%200%200%200-3.48-3.48l-3.38%203.37a2.46%202.46%200%200%200%200%203.48.91.91%200%201%201-1.3%201.3z%22%2F%3E%3Cpath%20d%3D%22M4.25%2019.46a4.3%204.3%200%200%201%200-6.07l1.93-1.9a.91.91%200%201%201%201.3%201.3l-1.93%201.9a2.46%202.46%200%200%200%203.48%203.48l3.37-3.38c.96-.96.96-2.52%200-3.48a.91.91%200%201%201%201.3-1.3%204.3%204.3%200%200%201%200%206.07l-3.38%203.38a4.26%204.26%200%200%201-6.07%200z%22%2F%3E%3C%2Fsvg%3E); +} +trix-toolbar .trix-button--icon-strike::before { + background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M12.73%2014l.28.14c.26.15.45.3.57.44.12.14.18.3.18.5%200%20.3-.15.56-.44.75-.3.2-.76.3-1.39.3A13.52%2013.52%200%200%201%207%2014.95v3.37a10.64%2010.64%200%200%200%204.84.88c1.26%200%202.35-.19%203.28-.56.93-.37%201.64-.9%202.14-1.57s.74-1.45.74-2.32c0-.26-.02-.51-.06-.75h-5.21zm-5.5-4c-.08-.34-.12-.7-.12-1.1%200-1.29.52-2.3%201.58-3.02%201.05-.72%202.5-1.08%204.34-1.08%201.62%200%203.28.34%204.97%201l-1.3%202.93c-1.47-.6-2.73-.9-3.8-.9-.55%200-.96.08-1.2.26-.26.17-.38.38-.38.64%200%20.27.16.52.48.74.17.12.53.3%201.05.53H7.23zM3%2013h18v-2H3v2z%22%2F%3E%3C%2Fsvg%3E); +} +trix-toolbar .trix-button--icon-quote::before { + background-image: url(data:image/svg+xml,%3Csvg%20version%3D%221%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M6%2017h3l2-4V7H5v6h3zm8%200h3l2-4V7h-6v6h3z%22%2F%3E%3C%2Fsvg%3E); +} +trix-toolbar .trix-button--icon-heading-1::before { + background-image: url(data:image/svg+xml,%3Csvg%20version%3D%221%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M12%209v3H9v7H6v-7H3V9h9zM8%204h14v3h-6v12h-3V7H8V4z%22%2F%3E%3C%2Fsvg%3E); +} +trix-toolbar .trix-button--icon-code::before { + background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M18.2%2012L15%2015.2l1.4%201.4L21%2012l-4.6-4.6L15%208.8l3.2%203.2zM5.8%2012L9%208.8%207.6%207.4%203%2012l4.6%204.6L9%2015.2%205.8%2012z%22%2F%3E%3C%2Fsvg%3E); +} +trix-toolbar .trix-button--icon-bullet-list::before { + background-image: url(data:image/svg+xml,%3Csvg%20version%3D%221%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%204a2%202%200%201%200%200%204%202%202%200%200%200%200-4zm0%206a2%202%200%201%200%200%204%202%202%200%200%200%200-4zm0%206a2%202%200%201%200%200%204%202%202%200%200%200%200-4zm4%203h14v-2H8v2zm0-6h14v-2H8v2zm0-8v2h14V5H8z%22%2F%3E%3C%2Fsvg%3E); +} +trix-toolbar .trix-button--icon-number-list::before { + background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M2%2017h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1%203h1.8L2%2013.1v.9h3v-1H3.2L5%2010.9V10H2v1zm5-6v2h14V5H7zm0%2014h14v-2H7v2zm0-6h14v-2H7v2z%22%2F%3E%3C%2Fsvg%3E); +} +trix-toolbar .trix-button--icon-undo::before { + background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M12.5%208c-2.6%200-5%201-6.9%202.6L2%207v9h9l-3.6-3.6A8%208%200%200%201%2020%2016l2.4-.8a10.5%2010.5%200%200%200-10-7.2z%22%2F%3E%3C%2Fsvg%3E); +} +trix-toolbar .trix-button--icon-redo::before { + background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M18.4%2010.6a10.5%2010.5%200%200%200-16.9%204.6L4%2016a8%208%200%200%201%2012.7-3.6L13%2016h9V7l-3.6%203.6z%22%2F%3E%3C%2Fsvg%3E); +} +trix-toolbar .trix-button--icon-decrease-nesting-level::before { + background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M3%2019h19v-2H3v2zm7-6h12v-2H10v2zm-8.3-.3l2.8%202.9L6%2014.2%204%2012l2-2-1.4-1.5L1%2012l.7.7zM3%205v2h19V5H3z%22%2F%3E%3C%2Fsvg%3E); +} +trix-toolbar .trix-button--icon-increase-nesting-level::before { + background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M3%2019h19v-2H3v2zm7-6h12v-2H10v2zm-6.9-1L1%2014.2l1.4%201.4L6%2012l-.7-.7-2.8-2.8L1%209.9%203.1%2012zM3%205v2h19V5H3z%22%2F%3E%3C%2Fsvg%3E); +} +trix-toolbar .trix-dialogs { + position: relative; +} +trix-toolbar .trix-dialog { + position: absolute; + top: 0; + left: 0; + right: 0; + font-size: 0.75em; + padding: 15px 10px; + background: #fff; + box-shadow: 0 0.3em 1em #ccc; + border-top: 2px solid #888; + border-radius: 5px; + z-index: 5; +} +trix-toolbar .trix-input--dialog { + font-size: inherit; + font-weight: normal; + padding: 0.5em 0.8em; + margin: 0 10px 0 0; + border-radius: 3px; + border: 1px solid #bbb; + background-color: #fff; + box-shadow: none; + outline: none; + -webkit-appearance: none; + -moz-appearance: none; +} +trix-toolbar .trix-input--dialog.validate:invalid { + box-shadow: #F00 0px 0px 1.5px 1px; +} +trix-toolbar .trix-button--dialog { + font-size: inherit; + padding: 0.5em; + border-bottom: none; +} +trix-toolbar .trix-dialog--link { + max-width: 600px; +} +trix-toolbar .trix-dialog__link-fields { + display: flex; + align-items: baseline; +} +trix-toolbar .trix-dialog__link-fields .trix-input { + flex: 1; +} +trix-toolbar .trix-dialog__link-fields .trix-button-group { + flex: 0 0 content; + margin: 0; +} +trix-editor [data-trix-mutable]:not(.attachment__caption-editor) { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +trix-editor [data-trix-mutable]::-moz-selection, +trix-editor [data-trix-cursor-target]::-moz-selection, +trix-editor [data-trix-mutable] ::-moz-selection { + background: none; +} +trix-editor [data-trix-mutable]::selection, +trix-editor [data-trix-cursor-target]::selection, +trix-editor [data-trix-mutable] ::selection { + background: none; +} +trix-editor [data-trix-mutable].attachment__caption-editor:focus::-moz-selection { + background: highlight; +} +trix-editor [data-trix-mutable].attachment__caption-editor:focus::selection { + background: highlight; +} +trix-editor [data-trix-mutable].attachment.attachment--file { + box-shadow: 0 0 0 2px highlight; + border-color: transparent; +} +trix-editor [data-trix-mutable].attachment img { + box-shadow: 0 0 0 2px highlight; +} +trix-editor .attachment { + position: relative; +} +trix-editor .attachment:hover { + cursor: default; +} +trix-editor .attachment--preview .attachment__caption:hover { + cursor: text; +} +trix-editor .attachment__progress { + position: absolute; + z-index: 1; + height: 20px; + top: calc(50% - 10px); + left: 5%; + width: 90%; + opacity: 0.9; + transition: opacity 200ms ease-in; +} +trix-editor .attachment__progress[value="100"] { + opacity: 0; +} +trix-editor .attachment__caption-editor { + display: inline-block; + width: 100%; + margin: 0; + padding: 0; + font-size: inherit; + font-family: inherit; + line-height: inherit; + color: inherit; + text-align: center; + vertical-align: top; + border: none; + outline: none; + -webkit-appearance: none; + -moz-appearance: none; +} +trix-editor .attachment__toolbar { + position: absolute; + z-index: 1; + top: -0.9em; + left: 0; + width: 100%; + text-align: center; +} +trix-editor .trix-button-group { + display: inline-flex; +} +trix-editor .trix-button { + position: relative; + float: left; + color: #666; + white-space: nowrap; + font-size: 80%; + padding: 0 0.8em; + margin: 0; + outline: none; + border: none; + border-radius: 0; + background: transparent; +} +trix-editor .trix-button:not(:first-child) { + border-left: 1px solid #ccc; +} +trix-editor .trix-button.trix-active { + background: #cbeefa; +} +trix-editor .trix-button:not(:disabled) { + cursor: pointer; +} +trix-editor .trix-button--remove { + text-indent: -9999px; + display: inline-block; + padding: 0; + outline: none; + width: 1.8em; + height: 1.8em; + line-height: 1.8em; + border-radius: 50%; + background-color: #fff; + border: 2px solid highlight; + box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25); +} +trix-editor .trix-button--remove::before { + display: inline-block; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + opacity: 0.7; + content: ""; + background-image: url(data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.4L17.6%205%2012%2010.6%206.4%205%205%206.4l5.6%205.6L5%2017.6%206.4%2019l5.6-5.6%205.6%205.6%201.4-1.4-5.6-5.6z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E); + background-position: center; + background-repeat: no-repeat; + background-size: 90%; +} +trix-editor .trix-button--remove:hover { + border-color: #333; +} +trix-editor .trix-button--remove:hover::before { + opacity: 1; +} +trix-editor .attachment__metadata-container { + position: relative; +} +trix-editor .attachment__metadata { + position: absolute; + left: 50%; + top: 2em; + transform: translate(-50%, 0); + max-width: 90%; + padding: 0.1em 0.6em; + font-size: 0.8em; + color: #fff; + background-color: rgba(0, 0, 0, 0.7); + border-radius: 3px; +} +trix-editor .attachment__metadata .attachment__name { + display: inline-block; + max-width: 100%; + vertical-align: bottom; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +trix-editor .attachment__metadata .attachment__size { + margin-left: 0.2em; + white-space: nowrap; +} +.trix-content { + line-height: 1.5; +} +.trix-content * { + box-sizing: border-box; + margin: 0; + padding: 0; +} +.trix-content h1 { + font-size: 1.2em; + line-height: 1.2; +} +.trix-content blockquote { + border: 0 solid #ccc; + border-left-width: 0.3em; + margin-left: 0.3em; + padding-left: 0.6em; +} +.trix-content [dir=rtl] blockquote, +.trix-content blockquote[dir=rtl] { + border-width: 0; + border-right-width: 0.3em; + margin-right: 0.3em; + padding-right: 0.6em; +} +.trix-content li { + margin-left: 1em; +} +.trix-content [dir=rtl] li { + margin-right: 1em; +} +.trix-content pre { + display: inline-block; + width: 100%; + vertical-align: top; + font-family: monospace; + font-size: 0.9em; + padding: 0.5em; + white-space: pre; + background-color: #eee; + overflow-x: auto; +} +.trix-content img { + max-width: 100%; + height: auto; +} +.trix-content .attachment { + display: inline-block; + position: relative; + max-width: 100%; +} +.trix-content .attachment a { + color: inherit; + text-decoration: none; +} +.trix-content .attachment a:hover, +.trix-content .attachment a:visited:hover { + color: inherit; +} +.trix-content .attachment__caption { + text-align: center; +} +.trix-content .attachment__caption .attachment__name + .attachment__size::before { + content: " \b7 "; +} +.trix-content .attachment--preview { + width: 100%; + text-align: center; +} +.trix-content .attachment--preview .attachment__caption { + color: #666; + font-size: 0.9em; + line-height: 1.2; +} +.trix-content .attachment--file { + color: #333; + line-height: 1; + margin: 0 2px 2px 2px; + padding: 0.4em 1em; + border: 1px solid #bbb; + border-radius: 5px; +} +.trix-content .attachment-gallery { + display: flex; + flex-wrap: wrap; + position: relative; +} +.trix-content .attachment-gallery .attachment { + flex: 1 0 33%; + padding: 0 0.5em; + max-width: 33%; +} +.trix-content .attachment-gallery.attachment-gallery--2 .attachment, +.trix-content .attachment-gallery.attachment-gallery--4 .attachment { + flex-basis: 50%; + max-width: 50%; +} + +/* packages/forms/resources/css/components/color-picker.css */ +.filament-forms-color-picker-preview { + background-image: repeating-linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%, #aaa), repeating-linear-gradient(45deg, #aaa 25%, #fff 25%, #fff 75%, #aaa 75%, #aaa); + background-position: 0 0, 4px 4px; + background-size: 8px 8px; +} +.filament-forms-color-picker-preview::after { + @apply absolute inset-0; + content: ""; + background: var(--color); +} + +/* packages/forms/resources/css/components/file-upload.css */ +.filepond--root { + @apply mb-0 overflow-hidden; +} +.filepond--panel-root { + @apply bg-white border border-gray-300 rounded-lg shadow-sm; +} +.filepond--drip-blob { + @apply bg-gray-900; +} +.dark .filepond--drop-label { + @apply text-gray-200; +} +.dark .filepond--panel-root { + @apply border-gray-600 text-white bg-gray-700; +} +.dark .filepond--drip-blob { + @apply bg-gray-100; +} +.filepond--root[data-style-panel-layout=compact] .filepond--item { + @apply mb-0.5; +} +.filepond--root[data-style-panel-layout=compact] .filepond--drop-label label { + @apply text-sm; +} +.filepond--root[data-style-panel-layout=compact] .filepond--drop-label { + min-height: 2.625em; +} +.filepond--root[data-style-panel-layout=compact] .filepond--file { + padding-top: 0.5em; + padding-bottom: 0.5em; +} +.filepond--root[data-style-panel-layout=grid] .filepond--item { + width: calc(50% - 0.5em); + display: inline; +} +@media screen(lg) { + .filepond--root[data-style-panel-layout=grid] .filepond--item { + width: calc(33.33% - 0.5em); + } +} +.filepond--download-icon { + @apply inline-block align-bottom bg-white w-4 h-4 mr-1 pointer-events-auto hover:bg-white/70; + -webkit-mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZG93bmxvYWQiPjxwYXRoIGQ9Ik0yMSAxNXY0YTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0ydi00Ij48L3BhdGg+PHBvbHlsaW5lIHBvaW50cz0iNyAxMCAxMiAxNSAxNyAxMCI+PC9wb2x5bGluZT48bGluZSB4MT0iMTIiIHkxPSIxNSIgeDI9IjEyIiB5Mj0iMyI+PC9saW5lPjwvc3ZnPg==); + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZG93bmxvYWQiPjxwYXRoIGQ9Ik0yMSAxNXY0YTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0ydi00Ij48L3BhdGg+PHBvbHlsaW5lIHBvaW50cz0iNyAxMCAxMiAxNSAxNyAxMCI+PC9wb2x5bGluZT48bGluZSB4MT0iMTIiIHkxPSIxNSIgeDI9IjEyIiB5Mj0iMyI+PC9saW5lPjwvc3ZnPg==); + -webkit-mask-repeat: no-repeat; + mask-repeat: no-repeat; + -webkit-mask-size: 100%; + mask-size: 100%; +} +.filepond--open-icon { + @apply inline-block align-bottom bg-white w-4 h-4 mr-1 pointer-events-auto hover:bg-white/70; + -webkit-mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEwIDZINmEyIDIgMCAwMC0yIDJ2MTBhMiAyIDAgMDAyIDJoMTBhMiAyIDAgMDAyLTJ2LTRNMTQgNGg2bTAgMHY2bTAtNkwxMCAxNCIgLz4KPC9zdmc+Cg==); + mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEwIDZINmEyIDIgMCAwMC0yIDJ2MTBhMiAyIDAgMDAyIDJoMTBhMiAyIDAgMDAyLTJ2LTRNMTQgNGg2bTAgMHY2bTAtNkwxMCAxNCIgLz4KPC9zdmc+Cg==); + -webkit-mask-repeat: no-repeat; + mask-repeat: no-repeat; + -webkit-mask-size: 100%; + mask-size: 100%; +} + +/* packages/forms/resources/css/components/rich-editor.css */ +.dark .trix-button { + @apply bg-gray-700 border-gray-600 text-gray-200; +} +.dark .trix-button-group { + @apply border-gray-600; +} + +/* packages/forms/resources/css/components/select.css */ +.choices { + @apply relative; +} +.choices:focus { + @apply outline-none; +} +.choices:last-child { + @apply mb-0; +} +.choices.is-open { + @apply overflow-visible; +} +.choices.is-disabled .choices__inner, +.choices.is-disabled .choices__input { + @apply select-none; +} +.choices.is-disabled .choices__item { + @apply cursor-not-allowed pointer-events-none opacity-70; +} +.choices [hidden] { + display: none !important; +} +.choices[data-type*=select-one] { + @apply cursor-pointer; +} +.choices[data-type*=select-one] .choices__input { + @apply block w-full p-2 border-b m-0; +} +.dark .choices[data-type*=select-one] .choices__input { + @apply bg-gray-700; +} +.choices[data-type*=select-multiple] .choices__inner { + @apply cursor-text; +} +.choices__inner { + @apply py-2 px-3 inline-block align-top w-full bg-white bg-no-repeat border border-gray-300 transition duration-75 rounded-lg shadow-sm; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E"); + background-position: right 0.5rem center; + background-size: 1.5em 1.5em; +} +.dark .choices__inner { + @apply border-gray-600 bg-gray-700 text-white; +} +[dir=rtl] .choices__inner { + background-position: left 0.5rem center; +} +.is-focused .choices__inner, +.is-open .choices__inner { + @apply border-primary-500 ring-1 ring-inset ring-primary-500; +} +.choices__list { + @apply m-0 pl-0 list-none; +} +.choices__list--single { + @apply pr-12 inline-block w-full; +} +[dir=rtl] .choices__list--single { + @apply pl-12 pr-0; +} +.choices__list--single .choices__item { + @apply w-full; +} +.choices__list--multiple { + @apply pr-6 flex flex-wrap gap-1; +} +[dir=rtl] .choices__list--multiple { + @apply pl-6 pr-0; +} +.choices__list--multiple:not(:empty) { + @apply flex mb-1; +} +.choices__list--multiple .choices__item { + @apply inline-flex gap-2 items-center justify-between cursor-pointer break-all box-border px-2 py-0.5 text-sm font-medium tracking-tight text-primary-700 rounded-lg bg-primary-500/10 space-x-1; +} +.dark .choices__list--multiple .choices__item { + @apply text-primary-500; +} +[dir=rtl] .choices__list--multiple .choices__item { + @apply break-normal space-x-reverse; +} +.choices__list--dropdown, +.choices__list[aria-expanded] { + @apply mt-2 rounded-lg invisible z-[1] absolute w-full bg-white border border-gray-300 shadow-sm top-full overflow-hidden break-words will-change-[visibility]; +} +.dark .choices__list--dropdown, +.dark .choices__list[aria-expanded] { + @apply bg-gray-700 border-gray-600; +} +.is-active.choices__list--dropdown, +.is-active.choices__list[aria-expanded] { + @apply visible z-10; +} +.choices__list--dropdown .choices__list, +.choices__list[aria-expanded] .choices__list { + @apply relative max-h-60 overflow-auto will-change-scroll; +} +.choices__list--dropdown .choices__item, +.choices__list[aria-expanded] .choices__item { + @apply relative px-3 py-2; +} +[dir=rtl] .choices__list--dropdown .choices__item, +[dir=rtl] .choices__list[aria-expanded] .choices__item { + @apply text-right; +} +.choices__list--dropdown .choices__item--selectable.is-highlighted, +.choices__list[aria-expanded] .choices__item--selectable.is-highlighted { + @apply bg-primary-600 text-white; +} +.choices__list--dropdown .choices__item--selectable.is-highlighted::after, +.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after { + @apply opacity-70; +} +.choices__item { + @apply cursor-default; +} +.choices__item--selectable { + @apply cursor-pointer; +} +.choices__item--disabled { + @apply cursor-not-allowed pointer-events-none select-none opacity-70; +} +.choices__placeholder { + @apply opacity-70; +} +.choices__button { + @apply appearance-none border-0 bg-transparent bg-no-repeat bg-center cursor-pointer; + text-indent: -9999px; +} +.choices__button:focus { + @apply outline-none; +} +.choices[data-type*=select-one] .choices__button { + @apply p-0 absolute right-0 mr-9 h-4 w-4 opacity-60; + background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==); + background-size: 0.7em 0.7em; + top: calc(50% - 0.55em); +} +.dark .choices[data-type*=select-one] .choices__button { + @apply opacity-30; + background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==); +} +[dir=rtl] .choices[data-type*=select-one] .choices__button { + @apply left-0 right-auto ml-9 mr-0; +} +.choices[data-type*=select-one] .choices__button:hover, +.choices[data-type*=select-one] .choices__button:focus { + @apply opacity-75; +} +.dark .choices[data-type*=select-one] .choices__button:hover, +.dark .choices[data-type*=select-one] .choices__button:focus { + @apply opacity-60; +} +.choices[data-type*=select-one] .choices__item[data-value=""] .choices__button { + @apply hidden; +} +.choices[data-type*=select-multiple] .choices__button { + @apply text-primary-700 inline-block w-3 h-3 opacity-60; + background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==); + background-size: 0.6em 0.6em; +} +.dark .choices[data-type*=select-multiple] .choices__button { + @apply opacity-75; + background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==); +} +.choices[data-type*=select-multiple] .choices__button:hover, +.choices[data-type*=select-multiple] .choices__button:focus { + @apply opacity-75; +} +.dark .choices[data-type*=select-multiple] .choices__button:hover, +.dark .choices[data-type*=select-multiple] .choices__button:focus { + @apply opacity-100; +} +.choices__list--dropdown .choices__input { + padding: 0.5rem 0.75rem !important; + border-top-width: 0 !important; + border-left-width: 0 !important; + border-bottom-width: 1px !important; + border-right-width: 0 !important; + border-color: rgb(209 213 219) !important; +} +.dark .choices__list--dropdown .choices__input { + @apply placeholder-gray-300; + border-color: rgb(75 85 99) !important; +} +.choices__input { + @apply inline-block max-w-full border-none; + border-color: transparent !important; + background-color: transparent !important; + padding: 0 !important; +} +.choices__input:focus { + outline-color: transparent !important; + box-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color) !important; +} +.choices__input::-webkit-search-decoration, +.choices__input::-webkit-search-cancel-button, +.choices__input::-webkit-search-results-button, +.choices__input::-webkit-search-results-decoration { + @apply hidden; +} +.choices__input::-ms-clear, +.choices__input::-ms-reveal { + @apply hidden w-0 h-0; +} + +/* packages/forms/resources/css/components/tags-input.css */ +.webkit-calendar-picker-indicator\:opacity-0::-webkit-calendar-picker-indicator { + @apply opacity-0; +} diff --git a/resources/css/module.esm.js b/resources/css/module.esm.js new file mode 100644 index 0000000..71b8ce1 --- /dev/null +++ b/resources/css/module.esm.js @@ -0,0 +1,35279 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __markAsModule = (target) => __defProp(target, "__esModule", {value: true}); +var __commonJS = (callback, module) => () => { + if (!module) { + module = {exports: {}}; + callback(module.exports, module); + } + return module.exports; +}; +var __export = (target, all) => { + for (var name2 in all) + __defProp(target, name2, {get: all[name2], enumerable: true}); +}; +var __exportStar = (target, module, desc) => { + if (module && typeof module === "object" || typeof module === "function") { + for (let key of __getOwnPropNames(module)) + if (!__hasOwnProp.call(target, key) && key !== "default") + __defProp(target, key, {get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable}); + } + return target; +}; +var __toModule = (module) => { + return __exportStar(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? {get: () => module.default, enumerable: true} : {value: module, enumerable: true})), module); +}; + +// node_modules/dayjs/plugin/customParseFormat.js +var require_customParseFormat = __commonJS((exports, module) => { + !function(e2, t2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = t2() : typeof define == "function" && define.amd ? define(t2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_plugin_customParseFormat = t2(); + }(exports, function() { + "use strict"; + var e2 = {LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A"}, t2 = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n2 = /\d\d/, r2 = /\d\d?/, i = /\d*[^-_:/,()\s\d]+/, o2 = {}, s2 = function(e3) { + return (e3 = +e3) + (e3 > 68 ? 1900 : 2e3); + }; + var a2 = function(e3) { + return function(t3) { + this[e3] = +t3; + }; + }, f = [/[+-]\d\d:?(\d\d)?|Z/, function(e3) { + (this.zone || (this.zone = {})).offset = function(e4) { + if (!e4) + return 0; + if (e4 === "Z") + return 0; + var t3 = e4.match(/([+-]|\d\d)/g), n3 = 60 * t3[1] + (+t3[2] || 0); + return n3 === 0 ? 0 : t3[0] === "+" ? -n3 : n3; + }(e3); + }], h = function(e3) { + var t3 = o2[e3]; + return t3 && (t3.indexOf ? t3 : t3.s.concat(t3.f)); + }, u = function(e3, t3) { + var n3, r3 = o2.meridiem; + if (r3) { + for (var i2 = 1; i2 <= 24; i2 += 1) + if (e3.indexOf(r3(i2, 0, t3)) > -1) { + n3 = i2 > 12; + break; + } + } else + n3 = e3 === (t3 ? "pm" : "PM"); + return n3; + }, d = {A: [i, function(e3) { + this.afternoon = u(e3, false); + }], a: [i, function(e3) { + this.afternoon = u(e3, true); + }], S: [/\d/, function(e3) { + this.milliseconds = 100 * +e3; + }], SS: [n2, function(e3) { + this.milliseconds = 10 * +e3; + }], SSS: [/\d{3}/, function(e3) { + this.milliseconds = +e3; + }], s: [r2, a2("seconds")], ss: [r2, a2("seconds")], m: [r2, a2("minutes")], mm: [r2, a2("minutes")], H: [r2, a2("hours")], h: [r2, a2("hours")], HH: [r2, a2("hours")], hh: [r2, a2("hours")], D: [r2, a2("day")], DD: [n2, a2("day")], Do: [i, function(e3) { + var t3 = o2.ordinal, n3 = e3.match(/\d+/); + if (this.day = n3[0], t3) + for (var r3 = 1; r3 <= 31; r3 += 1) + t3(r3).replace(/\[|\]/g, "") === e3 && (this.day = r3); + }], M: [r2, a2("month")], MM: [n2, a2("month")], MMM: [i, function(e3) { + var t3 = h("months"), n3 = (h("monthsShort") || t3.map(function(e4) { + return e4.slice(0, 3); + })).indexOf(e3) + 1; + if (n3 < 1) + throw new Error(); + this.month = n3 % 12 || n3; + }], MMMM: [i, function(e3) { + var t3 = h("months").indexOf(e3) + 1; + if (t3 < 1) + throw new Error(); + this.month = t3 % 12 || t3; + }], Y: [/[+-]?\d+/, a2("year")], YY: [n2, function(e3) { + this.year = s2(e3); + }], YYYY: [/\d{4}/, a2("year")], Z: f, ZZ: f}; + function c2(n3) { + var r3, i2; + r3 = n3, i2 = o2 && o2.formats; + for (var s3 = (n3 = r3.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t3, n4, r4) { + var o3 = r4 && r4.toUpperCase(); + return n4 || i2[r4] || e2[r4] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e3, t4, n5) { + return t4 || n5.slice(1); + }); + })).match(t2), a3 = s3.length, f2 = 0; f2 < a3; f2 += 1) { + var h2 = s3[f2], u2 = d[h2], c3 = u2 && u2[0], l = u2 && u2[1]; + s3[f2] = l ? {regex: c3, parser: l} : h2.replace(/^\[|\]$/g, ""); + } + return function(e3) { + for (var t3 = {}, n4 = 0, r4 = 0; n4 < a3; n4 += 1) { + var i3 = s3[n4]; + if (typeof i3 == "string") + r4 += i3.length; + else { + var o3 = i3.regex, f3 = i3.parser, h3 = e3.slice(r4), u3 = o3.exec(h3)[0]; + f3.call(t3, u3), e3 = e3.replace(u3, ""); + } + } + return function(e4) { + var t4 = e4.afternoon; + if (t4 !== void 0) { + var n5 = e4.hours; + t4 ? n5 < 12 && (e4.hours += 12) : n5 === 12 && (e4.hours = 0), delete e4.afternoon; + } + }(t3), t3; + }; + } + return function(e3, t3, n3) { + n3.p.customParseFormat = true, e3 && e3.parseTwoDigitYear && (s2 = e3.parseTwoDigitYear); + var r3 = t3.prototype, i2 = r3.parse; + r3.parse = function(e4) { + var t4 = e4.date, r4 = e4.utc, s3 = e4.args; + this.$u = r4; + var a3 = s3[1]; + if (typeof a3 == "string") { + var f2 = s3[2] === true, h2 = s3[3] === true, u2 = f2 || h2, d2 = s3[2]; + h2 && (d2 = s3[2]), o2 = this.$locale(), !f2 && d2 && (o2 = n3.Ls[d2]), this.$d = function(e5, t5, n4) { + try { + if (["x", "X"].indexOf(t5) > -1) + return new Date((t5 === "X" ? 1e3 : 1) * e5); + var r5 = c2(t5)(e5), i3 = r5.year, o3 = r5.month, s4 = r5.day, a4 = r5.hours, f3 = r5.minutes, h3 = r5.seconds, u3 = r5.milliseconds, d3 = r5.zone, l2 = new Date(), m2 = s4 || (i3 || o3 ? 1 : l2.getDate()), M3 = i3 || l2.getFullYear(), Y2 = 0; + i3 && !o3 || (Y2 = o3 > 0 ? o3 - 1 : l2.getMonth()); + var p2 = a4 || 0, v = f3 || 0, D2 = h3 || 0, g = u3 || 0; + return d3 ? new Date(Date.UTC(M3, Y2, m2, p2, v, D2, g + 60 * d3.offset * 1e3)) : n4 ? new Date(Date.UTC(M3, Y2, m2, p2, v, D2, g)) : new Date(M3, Y2, m2, p2, v, D2, g); + } catch (e6) { + return new Date(""); + } + }(t4, a3, r4), this.init(), d2 && d2 !== true && (this.$L = this.locale(d2).$L), u2 && t4 != this.format(a3) && (this.$d = new Date("")), o2 = {}; + } else if (a3 instanceof Array) + for (var l = a3.length, m = 1; m <= l; m += 1) { + s3[1] = a3[m - 1]; + var M2 = n3.apply(this, s3); + if (M2.isValid()) { + this.$d = M2.$d, this.$L = M2.$L, this.init(); + break; + } + m === l && (this.$d = new Date("")); + } + else + i2.call(this, e4); + }; + }; + }); +}); + +// node_modules/dayjs/plugin/localeData.js +var require_localeData = __commonJS((exports, module) => { + !function(n2, e2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = e2() : typeof define == "function" && define.amd ? define(e2) : (n2 = typeof globalThis != "undefined" ? globalThis : n2 || self).dayjs_plugin_localeData = e2(); + }(exports, function() { + "use strict"; + return function(n2, e2, t2) { + var r2 = e2.prototype, o2 = function(n3) { + return n3 && (n3.indexOf ? n3 : n3.s); + }, u = function(n3, e3, t3, r3, u2) { + var i2 = n3.name ? n3 : n3.$locale(), a3 = o2(i2[e3]), s3 = o2(i2[t3]), f = a3 || s3.map(function(n4) { + return n4.slice(0, r3); + }); + if (!u2) + return f; + var d = i2.weekStart; + return f.map(function(n4, e4) { + return f[(e4 + (d || 0)) % 7]; + }); + }, i = function() { + return t2.Ls[t2.locale()]; + }, a2 = function(n3, e3) { + return n3.formats[e3] || function(n4) { + return n4.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(n5, e4, t3) { + return e4 || t3.slice(1); + }); + }(n3.formats[e3.toUpperCase()]); + }, s2 = function() { + var n3 = this; + return {months: function(e3) { + return e3 ? e3.format("MMMM") : u(n3, "months"); + }, monthsShort: function(e3) { + return e3 ? e3.format("MMM") : u(n3, "monthsShort", "months", 3); + }, firstDayOfWeek: function() { + return n3.$locale().weekStart || 0; + }, weekdays: function(e3) { + return e3 ? e3.format("dddd") : u(n3, "weekdays"); + }, weekdaysMin: function(e3) { + return e3 ? e3.format("dd") : u(n3, "weekdaysMin", "weekdays", 2); + }, weekdaysShort: function(e3) { + return e3 ? e3.format("ddd") : u(n3, "weekdaysShort", "weekdays", 3); + }, longDateFormat: function(e3) { + return a2(n3.$locale(), e3); + }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal}; + }; + r2.localeData = function() { + return s2.bind(this)(); + }, t2.localeData = function() { + var n3 = i(); + return {firstDayOfWeek: function() { + return n3.weekStart || 0; + }, weekdays: function() { + return t2.weekdays(); + }, weekdaysShort: function() { + return t2.weekdaysShort(); + }, weekdaysMin: function() { + return t2.weekdaysMin(); + }, months: function() { + return t2.months(); + }, monthsShort: function() { + return t2.monthsShort(); + }, longDateFormat: function(e3) { + return a2(n3, e3); + }, meridiem: n3.meridiem, ordinal: n3.ordinal}; + }, t2.months = function() { + return u(i(), "months"); + }, t2.monthsShort = function() { + return u(i(), "monthsShort", "months", 3); + }, t2.weekdays = function(n3) { + return u(i(), "weekdays", null, null, n3); + }, t2.weekdaysShort = function(n3) { + return u(i(), "weekdaysShort", "weekdays", 3, n3); + }, t2.weekdaysMin = function(n3) { + return u(i(), "weekdaysMin", "weekdays", 2, n3); + }; + }; + }); +}); + +// node_modules/dayjs/plugin/timezone.js +var require_timezone = __commonJS((exports, module) => { + !function(t2, e2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = e2() : typeof define == "function" && define.amd ? define(e2) : (t2 = typeof globalThis != "undefined" ? globalThis : t2 || self).dayjs_plugin_timezone = e2(); + }(exports, function() { + "use strict"; + var t2 = {year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5}, e2 = {}; + return function(n2, i, o2) { + var r2, a2 = function(t3, n3, i2) { + i2 === void 0 && (i2 = {}); + var o3 = new Date(t3), r3 = function(t4, n4) { + n4 === void 0 && (n4 = {}); + var i3 = n4.timeZoneName || "short", o4 = t4 + "|" + i3, r4 = e2[o4]; + return r4 || (r4 = new Intl.DateTimeFormat("en-US", {hour12: false, timeZone: t4, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: i3}), e2[o4] = r4), r4; + }(n3, i2); + return r3.formatToParts(o3); + }, u = function(e3, n3) { + for (var i2 = a2(e3, n3), r3 = [], u2 = 0; u2 < i2.length; u2 += 1) { + var f2 = i2[u2], s3 = f2.type, m = f2.value, c2 = t2[s3]; + c2 >= 0 && (r3[c2] = parseInt(m, 10)); + } + var d = r3[3], l = d === 24 ? 0 : d, v = r3[0] + "-" + r3[1] + "-" + r3[2] + " " + l + ":" + r3[4] + ":" + r3[5] + ":000", h = +e3; + return (o2.utc(v).valueOf() - (h -= h % 1e3)) / 6e4; + }, f = i.prototype; + f.tz = function(t3, e3) { + t3 === void 0 && (t3 = r2); + var n3 = this.utcOffset(), i2 = this.toDate(), a3 = i2.toLocaleString("en-US", {timeZone: t3}), u2 = Math.round((i2 - new Date(a3)) / 1e3 / 60), f2 = o2(a3).$set("millisecond", this.$ms).utcOffset(15 * -Math.round(i2.getTimezoneOffset() / 15) - u2, true); + if (e3) { + var s3 = f2.utcOffset(); + f2 = f2.add(n3 - s3, "minute"); + } + return f2.$x.$timezone = t3, f2; + }, f.offsetName = function(t3) { + var e3 = this.$x.$timezone || o2.tz.guess(), n3 = a2(this.valueOf(), e3, {timeZoneName: t3}).find(function(t4) { + return t4.type.toLowerCase() === "timezonename"; + }); + return n3 && n3.value; + }; + var s2 = f.startOf; + f.startOf = function(t3, e3) { + if (!this.$x || !this.$x.$timezone) + return s2.call(this, t3, e3); + var n3 = o2(this.format("YYYY-MM-DD HH:mm:ss:SSS")); + return s2.call(n3, t3, e3).tz(this.$x.$timezone, true); + }, o2.tz = function(t3, e3, n3) { + var i2 = n3 && e3, a3 = n3 || e3 || r2, f2 = u(+o2(), a3); + if (typeof t3 != "string") + return o2(t3).tz(a3); + var s3 = function(t4, e4, n4) { + var i3 = t4 - 60 * e4 * 1e3, o3 = u(i3, n4); + if (e4 === o3) + return [i3, e4]; + var r3 = u(i3 -= 60 * (o3 - e4) * 1e3, n4); + return o3 === r3 ? [i3, o3] : [t4 - 60 * Math.min(o3, r3) * 1e3, Math.max(o3, r3)]; + }(o2.utc(t3, i2).valueOf(), f2, a3), m = s3[0], c2 = s3[1], d = o2(m).utcOffset(c2); + return d.$x.$timezone = a3, d; + }, o2.tz.guess = function() { + return Intl.DateTimeFormat().resolvedOptions().timeZone; + }, o2.tz.setDefault = function(t3) { + r2 = t3; + }; + }; + }); +}); + +// node_modules/dayjs/plugin/utc.js +var require_utc = __commonJS((exports, module) => { + !function(t2, i) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = i() : typeof define == "function" && define.amd ? define(i) : (t2 = typeof globalThis != "undefined" ? globalThis : t2 || self).dayjs_plugin_utc = i(); + }(exports, function() { + "use strict"; + var t2 = "minute", i = /[+-]\d\d(?::?\d\d)?/g, e2 = /([+-]|\d\d)/g; + return function(s2, f, n2) { + var u = f.prototype; + n2.utc = function(t3) { + var i2 = {date: t3, utc: true, args: arguments}; + return new f(i2); + }, u.utc = function(i2) { + var e3 = n2(this.toDate(), {locale: this.$L, utc: true}); + return i2 ? e3.add(this.utcOffset(), t2) : e3; + }, u.local = function() { + return n2(this.toDate(), {locale: this.$L, utc: false}); + }; + var o2 = u.parse; + u.parse = function(t3) { + t3.utc && (this.$u = true), this.$utils().u(t3.$offset) || (this.$offset = t3.$offset), o2.call(this, t3); + }; + var r2 = u.init; + u.init = function() { + if (this.$u) { + var t3 = this.$d; + this.$y = t3.getUTCFullYear(), this.$M = t3.getUTCMonth(), this.$D = t3.getUTCDate(), this.$W = t3.getUTCDay(), this.$H = t3.getUTCHours(), this.$m = t3.getUTCMinutes(), this.$s = t3.getUTCSeconds(), this.$ms = t3.getUTCMilliseconds(); + } else + r2.call(this); + }; + var a2 = u.utcOffset; + u.utcOffset = function(s3, f2) { + var n3 = this.$utils().u; + if (n3(s3)) + return this.$u ? 0 : n3(this.$offset) ? a2.call(this) : this.$offset; + if (typeof s3 == "string" && (s3 = function(t3) { + t3 === void 0 && (t3 = ""); + var s4 = t3.match(i); + if (!s4) + return null; + var f3 = ("" + s4[0]).match(e2) || ["-", 0, 0], n4 = f3[0], u3 = 60 * +f3[1] + +f3[2]; + return u3 === 0 ? 0 : n4 === "+" ? u3 : -u3; + }(s3), s3 === null)) + return this; + var u2 = Math.abs(s3) <= 16 ? 60 * s3 : s3, o3 = this; + if (f2) + return o3.$offset = u2, o3.$u = s3 === 0, o3; + if (s3 !== 0) { + var r3 = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset(); + (o3 = this.local().add(u2 + r3, t2)).$offset = u2, o3.$x.$localOffset = r3; + } else + o3 = this.utc(); + return o3; + }; + var h = u.format; + u.format = function(t3) { + var i2 = t3 || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : ""); + return h.call(this, i2); + }, u.valueOf = function() { + var t3 = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset()); + return this.$d.valueOf() - 6e4 * t3; + }, u.isUTC = function() { + return !!this.$u; + }, u.toISOString = function() { + return this.toDate().toISOString(); + }, u.toString = function() { + return this.toDate().toUTCString(); + }; + var l = u.toDate; + u.toDate = function(t3) { + return t3 === "s" && this.$offset ? n2(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : l.call(this); + }; + var c2 = u.diff; + u.diff = function(t3, i2, e3) { + if (t3 && this.$u === t3.$u) + return c2.call(this, t3, i2, e3); + var s3 = this.local(), f2 = n2(t3).local(); + return c2.call(s3, f2, i2, e3); + }; + }; + }); +}); + +// node_modules/dayjs/dayjs.min.js +var require_dayjs_min = __commonJS((exports, module) => { + !function(t2, e2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = e2() : typeof define == "function" && define.amd ? define(e2) : (t2 = typeof globalThis != "undefined" ? globalThis : t2 || self).dayjs = e2(); + }(exports, function() { + "use strict"; + var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i = "second", s2 = "minute", u = "hour", a2 = "day", o2 = "week", f = "month", h = "quarter", c2 = "year", d = "date", $ = "Invalid Date", l = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = {name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_")}, m = function(t3, e3, n3) { + var r3 = String(t3); + return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3; + }, g = {s: m, z: function(t3) { + var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i2 = n3 % 60; + return (e3 <= 0 ? "+" : "-") + m(r3, 2, "0") + ":" + m(i2, 2, "0"); + }, m: function t3(e3, n3) { + if (e3.date() < n3.date()) + return -t3(n3, e3); + var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i2 = e3.clone().add(r3, f), s3 = n3 - i2 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), f); + return +(-(r3 + (n3 - i2) / (s3 ? i2 - u2 : u2 - i2)) || 0); + }, a: function(t3) { + return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3); + }, p: function(t3) { + return {M: f, y: c2, w: o2, d: a2, D: d, h: u, m: s2, s: i, ms: r2, Q: h}[t3] || String(t3 || "").toLowerCase().replace(/s$/, ""); + }, u: function(t3) { + return t3 === void 0; + }}, v = "en", D2 = {}; + D2[v] = M2; + var p2 = function(t3) { + return t3 instanceof _; + }, S2 = function t3(e3, n3, r3) { + var i2; + if (!e3) + return v; + if (typeof e3 == "string") { + var s3 = e3.toLowerCase(); + D2[s3] && (i2 = s3), n3 && (D2[s3] = n3, i2 = s3); + var u2 = e3.split("-"); + if (!i2 && u2.length > 1) + return t3(u2[0]); + } else { + var a3 = e3.name; + D2[a3] = e3, i2 = a3; + } + return !r3 && i2 && (v = i2), i2 || !r3 && v; + }, w = function(t3, e3) { + if (p2(t3)) + return t3.clone(); + var n3 = typeof e3 == "object" ? e3 : {}; + return n3.date = t3, n3.args = arguments, new _(n3); + }, O = g; + O.l = S2, O.i = p2, O.w = function(t3, e3) { + return w(t3, {locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset}); + }; + var _ = function() { + function M3(t3) { + this.$L = S2(t3.locale, null, true), this.parse(t3); + } + var m2 = M3.prototype; + return m2.parse = function(t3) { + this.$d = function(t4) { + var e3 = t4.date, n3 = t4.utc; + if (e3 === null) + return new Date(NaN); + if (O.u(e3)) + return new Date(); + if (e3 instanceof Date) + return new Date(e3); + if (typeof e3 == "string" && !/Z$/i.test(e3)) { + var r3 = e3.match(l); + if (r3) { + var i2 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3); + return n3 ? new Date(Date.UTC(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3); + } + } + return new Date(e3); + }(t3), this.$x = t3.x || {}, this.init(); + }, m2.init = function() { + var t3 = this.$d; + this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds(); + }, m2.$utils = function() { + return O; + }, m2.isValid = function() { + return !(this.$d.toString() === $); + }, m2.isSame = function(t3, e3) { + var n3 = w(t3); + return this.startOf(e3) <= n3 && n3 <= this.endOf(e3); + }, m2.isAfter = function(t3, e3) { + return w(t3) < this.startOf(e3); + }, m2.isBefore = function(t3, e3) { + return this.endOf(e3) < w(t3); + }, m2.$g = function(t3, e3, n3) { + return O.u(t3) ? this[e3] : this.set(n3, t3); + }, m2.unix = function() { + return Math.floor(this.valueOf() / 1e3); + }, m2.valueOf = function() { + return this.$d.getTime(); + }, m2.startOf = function(t3, e3) { + var n3 = this, r3 = !!O.u(e3) || e3, h2 = O.p(t3), $2 = function(t4, e4) { + var i2 = O.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3); + return r3 ? i2 : i2.endOf(a2); + }, l2 = function(t4, e4) { + return O.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3); + }, y2 = this.$W, M4 = this.$M, m3 = this.$D, g2 = "set" + (this.$u ? "UTC" : ""); + switch (h2) { + case c2: + return r3 ? $2(1, 0) : $2(31, 11); + case f: + return r3 ? $2(1, M4) : $2(0, M4 + 1); + case o2: + var v2 = this.$locale().weekStart || 0, D3 = (y2 < v2 ? y2 + 7 : y2) - v2; + return $2(r3 ? m3 - D3 : m3 + (6 - D3), M4); + case a2: + case d: + return l2(g2 + "Hours", 0); + case u: + return l2(g2 + "Minutes", 1); + case s2: + return l2(g2 + "Seconds", 2); + case i: + return l2(g2 + "Milliseconds", 3); + default: + return this.clone(); + } + }, m2.endOf = function(t3) { + return this.startOf(t3, false); + }, m2.$set = function(t3, e3) { + var n3, o3 = O.p(t3), h2 = "set" + (this.$u ? "UTC" : ""), $2 = (n3 = {}, n3[a2] = h2 + "Date", n3[d] = h2 + "Date", n3[f] = h2 + "Month", n3[c2] = h2 + "FullYear", n3[u] = h2 + "Hours", n3[s2] = h2 + "Minutes", n3[i] = h2 + "Seconds", n3[r2] = h2 + "Milliseconds", n3)[o3], l2 = o3 === a2 ? this.$D + (e3 - this.$W) : e3; + if (o3 === f || o3 === c2) { + var y2 = this.clone().set(d, 1); + y2.$d[$2](l2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d; + } else + $2 && this.$d[$2](l2); + return this.init(), this; + }, m2.set = function(t3, e3) { + return this.clone().$set(t3, e3); + }, m2.get = function(t3) { + return this[O.p(t3)](); + }, m2.add = function(r3, h2) { + var d2, $2 = this; + r3 = Number(r3); + var l2 = O.p(h2), y2 = function(t3) { + var e3 = w($2); + return O.w(e3.date(e3.date() + Math.round(t3 * r3)), $2); + }; + if (l2 === f) + return this.set(f, this.$M + r3); + if (l2 === c2) + return this.set(c2, this.$y + r3); + if (l2 === a2) + return y2(1); + if (l2 === o2) + return y2(7); + var M4 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i] = t2, d2)[l2] || 1, m3 = this.$d.getTime() + r3 * M4; + return O.w(m3, this); + }, m2.subtract = function(t3, e3) { + return this.add(-1 * t3, e3); + }, m2.format = function(t3) { + var e3 = this, n3 = this.$locale(); + if (!this.isValid()) + return n3.invalidDate || $; + var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O.z(this), s3 = this.$H, u2 = this.$m, a3 = this.$M, o3 = n3.weekdays, f2 = n3.months, h2 = function(t4, n4, i3, s4) { + return t4 && (t4[n4] || t4(e3, r3)) || i3[n4].slice(0, s4); + }, c3 = function(t4) { + return O.s(s3 % 12 || 12, t4, "0"); + }, d2 = n3.meridiem || function(t4, e4, n4) { + var r4 = t4 < 12 ? "AM" : "PM"; + return n4 ? r4.toLowerCase() : r4; + }, l2 = {YY: String(this.$y).slice(-2), YYYY: this.$y, M: a3 + 1, MM: O.s(a3 + 1, 2, "0"), MMM: h2(n3.monthsShort, a3, f2, 3), MMMM: h2(f2, a3), D: this.$D, DD: O.s(this.$D, 2, "0"), d: String(this.$W), dd: h2(n3.weekdaysMin, this.$W, o3, 2), ddd: h2(n3.weekdaysShort, this.$W, o3, 3), dddd: o3[this.$W], H: String(s3), HH: O.s(s3, 2, "0"), h: c3(1), hh: c3(2), a: d2(s3, u2, true), A: d2(s3, u2, false), m: String(u2), mm: O.s(u2, 2, "0"), s: String(this.$s), ss: O.s(this.$s, 2, "0"), SSS: O.s(this.$ms, 3, "0"), Z: i2}; + return r3.replace(y, function(t4, e4) { + return e4 || l2[t4] || i2.replace(":", ""); + }); + }, m2.utcOffset = function() { + return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); + }, m2.diff = function(r3, d2, $2) { + var l2, y2 = O.p(d2), M4 = w(r3), m3 = (M4.utcOffset() - this.utcOffset()) * e2, g2 = this - M4, v2 = O.m(this, M4); + return v2 = (l2 = {}, l2[c2] = v2 / 12, l2[f] = v2, l2[h] = v2 / 3, l2[o2] = (g2 - m3) / 6048e5, l2[a2] = (g2 - m3) / 864e5, l2[u] = g2 / n2, l2[s2] = g2 / e2, l2[i] = g2 / t2, l2)[y2] || g2, $2 ? v2 : O.a(v2); + }, m2.daysInMonth = function() { + return this.endOf(f).$D; + }, m2.$locale = function() { + return D2[this.$L]; + }, m2.locale = function(t3, e3) { + if (!t3) + return this.$L; + var n3 = this.clone(), r3 = S2(t3, e3, true); + return r3 && (n3.$L = r3), n3; + }, m2.clone = function() { + return O.w(this.$d, this); + }, m2.toDate = function() { + return new Date(this.valueOf()); + }, m2.toJSON = function() { + return this.isValid() ? this.toISOString() : null; + }, m2.toISOString = function() { + return this.$d.toISOString(); + }, m2.toString = function() { + return this.$d.toUTCString(); + }, M3; + }(), T = _.prototype; + return w.prototype = T, [["$ms", r2], ["$s", i], ["$m", s2], ["$H", u], ["$W", a2], ["$M", f], ["$y", c2], ["$D", d]].forEach(function(t3) { + T[t3[1]] = function(e3) { + return this.$g(e3, t3[0], t3[1]); + }; + }), w.extend = function(t3, e3) { + return t3.$i || (t3(e3, _, w), t3.$i = true), w; + }, w.locale = S2, w.isDayjs = p2, w.unix = function(t3) { + return w(1e3 * t3); + }, w.en = D2[v], w.Ls = D2, w.p = {}, w; + }); +}); + +// node_modules/dayjs/locale/ar.js +var require_ar = __commonJS((exports, module) => { + !function(e2, t2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = t2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], t2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_ar = t2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function t2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var n2 = t2(e2), r2 = "\u064A\u0646\u0627\u064A\u0631_\u0641\u0628\u0631\u0627\u064A\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064A\u0644_\u0645\u0627\u064A\u0648_\u064A\u0648\u0646\u064A\u0648_\u064A\u0648\u0644\u064A\u0648_\u0623\u063A\u0633\u0637\u0633_\u0633\u0628\u062A\u0645\u0628\u0631_\u0623\u0643\u062A\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062F\u064A\u0633\u0645\u0628\u0631".split("_"), _ = {1: "\u0661", 2: "\u0662", 3: "\u0663", 4: "\u0664", 5: "\u0665", 6: "\u0666", 7: "\u0667", 8: "\u0668", 9: "\u0669", 0: "\u0660"}, d = {"\u0661": "1", "\u0662": "2", "\u0663": "3", "\u0664": "4", "\u0665": "5", "\u0666": "6", "\u0667": "7", "\u0668": "8", "\u0669": "9", "\u0660": "0"}, o2 = {name: "ar", weekdays: "\u0627\u0644\u0623\u062D\u062F_\u0627\u0644\u0625\u062B\u0646\u064A\u0646_\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062E\u0645\u064A\u0633_\u0627\u0644\u062C\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062A".split("_"), weekdaysShort: "\u0623\u062D\u062F_\u0625\u062B\u0646\u064A\u0646_\u062B\u0644\u0627\u062B\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062E\u0645\u064A\u0633_\u062C\u0645\u0639\u0629_\u0633\u0628\u062A".split("_"), weekdaysMin: "\u062D_\u0646_\u062B_\u0631_\u062E_\u062C_\u0633".split("_"), months: r2, monthsShort: r2, weekStart: 6, relativeTime: {future: "\u0628\u0639\u062F %s", past: "\u0645\u0646\u0630 %s", s: "\u062B\u0627\u0646\u064A\u0629 \u0648\u0627\u062D\u062F\u0629", m: "\u062F\u0642\u064A\u0642\u0629 \u0648\u0627\u062D\u062F\u0629", mm: "%d \u062F\u0642\u0627\u0626\u0642", h: "\u0633\u0627\u0639\u0629 \u0648\u0627\u062D\u062F\u0629", hh: "%d \u0633\u0627\u0639\u0627\u062A", d: "\u064A\u0648\u0645 \u0648\u0627\u062D\u062F", dd: "%d \u0623\u064A\u0627\u0645", M: "\u0634\u0647\u0631 \u0648\u0627\u062D\u062F", MM: "%d \u0623\u0634\u0647\u0631", y: "\u0639\u0627\u0645 \u0648\u0627\u062D\u062F", yy: "%d \u0623\u0639\u0648\u0627\u0645"}, preparse: function(e3) { + return e3.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function(e4) { + return d[e4]; + }).replace(/،/g, ","); + }, postformat: function(e3) { + return e3.replace(/\d/g, function(e4) { + return _[e4]; + }).replace(/,/g, "\u060C"); + }, ordinal: function(e3) { + return e3; + }, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "D/\u200FM/\u200FYYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd D MMMM YYYY HH:mm"}}; + return n2.default.locale(o2, null, true), o2; + }); +}); + +// node_modules/dayjs/locale/bs.js +var require_bs = __commonJS((exports, module) => { + !function(e2, t2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = t2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], t2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_bs = t2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function t2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var _ = t2(e2), a2 = {name: "bs", weekdays: "nedjelja_ponedjeljak_utorak_srijeda_\u010Detvrtak_petak_subota".split("_"), months: "januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"), weekStart: 1, weekdaysShort: "ned._pon._uto._sri._\u010Det._pet._sub.".split("_"), monthsShort: "jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"), weekdaysMin: "ne_po_ut_sr_\u010De_pe_su".split("_"), ordinal: function(e3) { + return e3; + }, formats: {LT: "H:mm", LTS: "H:mm:ss", L: "DD.MM.YYYY", LL: "D. MMMM YYYY", LLL: "D. MMMM YYYY H:mm", LLLL: "dddd, D. MMMM YYYY H:mm"}}; + return _.default.locale(a2, null, true), a2; + }); +}); + +// node_modules/dayjs/locale/ca.js +var require_ca = __commonJS((exports, module) => { + !function(e2, s2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = s2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], s2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_ca = s2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function s2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var t2 = s2(e2), _ = {name: "ca", weekdays: "Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"), weekdaysShort: "Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"), weekdaysMin: "Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"), months: "Gener_Febrer_Mar\xE7_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"), monthsShort: "Gen._Febr._Mar\xE7_Abr._Maig_Juny_Jul._Ag._Set._Oct._Nov._Des.".split("_"), weekStart: 1, formats: {LT: "H:mm", LTS: "H:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM [de] YYYY", LLL: "D MMMM [de] YYYY [a les] H:mm", LLLL: "dddd D MMMM [de] YYYY [a les] H:mm", ll: "D MMM YYYY", lll: "D MMM YYYY, H:mm", llll: "ddd D MMM YYYY, H:mm"}, relativeTime: {future: "d'aqu\xED %s", past: "fa %s", s: "uns segons", m: "un minut", mm: "%d minuts", h: "una hora", hh: "%d hores", d: "un dia", dd: "%d dies", M: "un mes", MM: "%d mesos", y: "un any", yy: "%d anys"}, ordinal: function(e3) { + return "" + e3 + (e3 === 1 || e3 === 3 ? "r" : e3 === 2 ? "n" : e3 === 4 ? "t" : "\xE8"); + }}; + return t2.default.locale(_, null, true), _; + }); +}); + +// node_modules/dayjs/locale/cs.js +var require_cs = __commonJS((exports, module) => { + !function(e2, n2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = n2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], n2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_cs = n2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function n2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var t2 = n2(e2); + function s2(e3) { + return e3 > 1 && e3 < 5 && ~~(e3 / 10) != 1; + } + function r2(e3, n3, t3, r3) { + var d2 = e3 + " "; + switch (t3) { + case "s": + return n3 || r3 ? "p\xE1r sekund" : "p\xE1r sekundami"; + case "m": + return n3 ? "minuta" : r3 ? "minutu" : "minutou"; + case "mm": + return n3 || r3 ? d2 + (s2(e3) ? "minuty" : "minut") : d2 + "minutami"; + case "h": + return n3 ? "hodina" : r3 ? "hodinu" : "hodinou"; + case "hh": + return n3 || r3 ? d2 + (s2(e3) ? "hodiny" : "hodin") : d2 + "hodinami"; + case "d": + return n3 || r3 ? "den" : "dnem"; + case "dd": + return n3 || r3 ? d2 + (s2(e3) ? "dny" : "dn\xED") : d2 + "dny"; + case "M": + return n3 || r3 ? "m\u011Bs\xEDc" : "m\u011Bs\xEDcem"; + case "MM": + return n3 || r3 ? d2 + (s2(e3) ? "m\u011Bs\xEDce" : "m\u011Bs\xEDc\u016F") : d2 + "m\u011Bs\xEDci"; + case "y": + return n3 || r3 ? "rok" : "rokem"; + case "yy": + return n3 || r3 ? d2 + (s2(e3) ? "roky" : "let") : d2 + "lety"; + } + } + var d = {name: "cs", weekdays: "ned\u011Ble_pond\u011Bl\xED_\xFAter\xFD_st\u0159eda_\u010Dtvrtek_p\xE1tek_sobota".split("_"), weekdaysShort: "ne_po_\xFAt_st_\u010Dt_p\xE1_so".split("_"), weekdaysMin: "ne_po_\xFAt_st_\u010Dt_p\xE1_so".split("_"), months: "leden_\xFAnor_b\u0159ezen_duben_kv\u011Bten_\u010Derven_\u010Dervenec_srpen_z\xE1\u0159\xED_\u0159\xEDjen_listopad_prosinec".split("_"), monthsShort: "led_\xFAno_b\u0159e_dub_kv\u011B_\u010Dvn_\u010Dvc_srp_z\xE1\u0159_\u0159\xEDj_lis_pro".split("_"), weekStart: 1, yearStart: 4, ordinal: function(e3) { + return e3 + "."; + }, formats: {LT: "H:mm", LTS: "H:mm:ss", L: "DD.MM.YYYY", LL: "D. MMMM YYYY", LLL: "D. MMMM YYYY H:mm", LLLL: "dddd D. MMMM YYYY H:mm", l: "D. M. YYYY"}, relativeTime: {future: "za %s", past: "p\u0159ed %s", s: r2, m: r2, mm: r2, h: r2, hh: r2, d: r2, dd: r2, M: r2, MM: r2, y: r2, yy: r2}}; + return t2.default.locale(d, null, true), d; + }); +}); + +// node_modules/dayjs/locale/da.js +var require_da = __commonJS((exports, module) => { + !function(e2, t2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = t2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], t2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_da = t2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function t2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var d = t2(e2), n2 = {name: "da", weekdays: "s\xF8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xF8rdag".split("_"), weekdaysShort: "s\xF8n._man._tirs._ons._tors._fre._l\xF8r.".split("_"), weekdaysMin: "s\xF8._ma._ti._on._to._fr._l\xF8.".split("_"), months: "januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"), monthsShort: "jan._feb._mar._apr._maj_juni_juli_aug._sept._okt._nov._dec.".split("_"), weekStart: 1, ordinal: function(e3) { + return e3 + "."; + }, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD.MM.YYYY", LL: "D. MMMM YYYY", LLL: "D. MMMM YYYY HH:mm", LLLL: "dddd [d.] D. MMMM YYYY [kl.] HH:mm"}, relativeTime: {future: "om %s", past: "%s siden", s: "f\xE5 sekunder", m: "et minut", mm: "%d minutter", h: "en time", hh: "%d timer", d: "en dag", dd: "%d dage", M: "en m\xE5ned", MM: "%d m\xE5neder", y: "et \xE5r", yy: "%d \xE5r"}}; + return d.default.locale(n2, null, true), n2; + }); +}); + +// node_modules/dayjs/locale/de.js +var require_de = __commonJS((exports, module) => { + !function(e2, n2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = n2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], n2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_de = n2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function n2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var t2 = n2(e2), a2 = {s: "ein paar Sekunden", m: ["eine Minute", "einer Minute"], mm: "%d Minuten", h: ["eine Stunde", "einer Stunde"], hh: "%d Stunden", d: ["ein Tag", "einem Tag"], dd: ["%d Tage", "%d Tagen"], M: ["ein Monat", "einem Monat"], MM: ["%d Monate", "%d Monaten"], y: ["ein Jahr", "einem Jahr"], yy: ["%d Jahre", "%d Jahren"]}; + function i(e3, n3, t3) { + var i2 = a2[t3]; + return Array.isArray(i2) && (i2 = i2[n3 ? 0 : 1]), i2.replace("%d", e3); + } + var r2 = {name: "de", weekdays: "Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"), weekdaysShort: "So._Mo._Di._Mi._Do._Fr._Sa.".split("_"), weekdaysMin: "So_Mo_Di_Mi_Do_Fr_Sa".split("_"), months: "Januar_Februar_M\xE4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"), monthsShort: "Jan._Feb._M\xE4rz_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"), ordinal: function(e3) { + return e3 + "."; + }, weekStart: 1, yearStart: 4, formats: {LTS: "HH:mm:ss", LT: "HH:mm", L: "DD.MM.YYYY", LL: "D. MMMM YYYY", LLL: "D. MMMM YYYY HH:mm", LLLL: "dddd, D. MMMM YYYY HH:mm"}, relativeTime: {future: "in %s", past: "vor %s", s: i, m: i, mm: i, h: i, hh: i, d: i, dd: i, M: i, MM: i, y: i, yy: i}}; + return t2.default.locale(r2, null, true), r2; + }); +}); + +// node_modules/dayjs/locale/en.js +var require_en = __commonJS((exports, module) => { + !function(e2, n2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = n2() : typeof define == "function" && define.amd ? define(n2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_en = n2(); + }(exports, function() { + "use strict"; + return {name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_")}; + }); +}); + +// node_modules/dayjs/locale/es.js +var require_es = __commonJS((exports, module) => { + !function(e2, o2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = o2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], o2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_es = o2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function o2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var s2 = o2(e2), d = {name: "es", monthsShort: "ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"), weekdays: "domingo_lunes_martes_mi\xE9rcoles_jueves_viernes_s\xE1bado".split("_"), weekdaysShort: "dom._lun._mar._mi\xE9._jue._vie._s\xE1b.".split("_"), weekdaysMin: "do_lu_ma_mi_ju_vi_s\xE1".split("_"), months: "enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"), weekStart: 1, formats: {LT: "H:mm", LTS: "H:mm:ss", L: "DD/MM/YYYY", LL: "D [de] MMMM [de] YYYY", LLL: "D [de] MMMM [de] YYYY H:mm", LLLL: "dddd, D [de] MMMM [de] YYYY H:mm"}, relativeTime: {future: "en %s", past: "hace %s", s: "unos segundos", m: "un minuto", mm: "%d minutos", h: "una hora", hh: "%d horas", d: "un d\xEDa", dd: "%d d\xEDas", M: "un mes", MM: "%d meses", y: "un a\xF1o", yy: "%d a\xF1os"}, ordinal: function(e3) { + return e3 + "\xBA"; + }}; + return s2.default.locale(d, null, true), d; + }); +}); + +// node_modules/dayjs/locale/fa.js +var require_fa = __commonJS((exports, module) => { + !function(_, e2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = e2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], e2) : (_ = typeof globalThis != "undefined" ? globalThis : _ || self).dayjs_locale_fa = e2(_.dayjs); + }(exports, function(_) { + "use strict"; + function e2(_2) { + return _2 && typeof _2 == "object" && "default" in _2 ? _2 : {default: _2}; + } + var t2 = e2(_), d = {name: "fa", weekdays: "\u06CC\u06A9\u200C\u0634\u0646\u0628\u0647_\u062F\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200C\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067E\u0646\u062C\u200C\u0634\u0646\u0628\u0647_\u062C\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"), weekdaysShort: "\u06CC\u06A9\u200C\u0634\u0646\u0628\u0647_\u062F\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200C\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067E\u0646\u062C\u200C\u0634\u0646\u0628\u0647_\u062C\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"), weekdaysMin: "\u06CC_\u062F_\u0633_\u0686_\u067E_\u062C_\u0634".split("_"), weekStart: 6, months: "\u0698\u0627\u0646\u0648\u06CC\u0647_\u0641\u0648\u0631\u06CC\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06CC\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06CC\u0647_\u0627\u0648\u062A_\u0633\u067E\u062A\u0627\u0645\u0628\u0631_\u0627\u06A9\u062A\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062F\u0633\u0627\u0645\u0628\u0631".split("_"), monthsShort: "\u0698\u0627\u0646\u0648\u06CC\u0647_\u0641\u0648\u0631\u06CC\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06CC\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06CC\u0647_\u0627\u0648\u062A_\u0633\u067E\u062A\u0627\u0645\u0628\u0631_\u0627\u06A9\u062A\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062F\u0633\u0627\u0645\u0628\u0631".split("_"), ordinal: function(_2) { + return _2; + }, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd, D MMMM YYYY HH:mm"}, relativeTime: {future: "\u062F\u0631 %s", past: "%s \u067E\u06CC\u0634", s: "\u0686\u0646\u062F \u062B\u0627\u0646\u06CC\u0647", m: "\u06CC\u06A9 \u062F\u0642\u06CC\u0642\u0647", mm: "%d \u062F\u0642\u06CC\u0642\u0647", h: "\u06CC\u06A9 \u0633\u0627\u0639\u062A", hh: "%d \u0633\u0627\u0639\u062A", d: "\u06CC\u06A9 \u0631\u0648\u0632", dd: "%d \u0631\u0648\u0632", M: "\u06CC\u06A9 \u0645\u0627\u0647", MM: "%d \u0645\u0627\u0647", y: "\u06CC\u06A9 \u0633\u0627\u0644", yy: "%d \u0633\u0627\u0644"}}; + return t2.default.locale(d, null, true), d; + }); +}); + +// node_modules/dayjs/locale/fr.js +var require_fr = __commonJS((exports, module) => { + !function(e2, n2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = n2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], n2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_fr = n2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function n2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var t2 = n2(e2), i = {name: "fr", weekdays: "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"), weekdaysShort: "dim._lun._mar._mer._jeu._ven._sam.".split("_"), weekdaysMin: "di_lu_ma_me_je_ve_sa".split("_"), months: "janvier_f\xE9vrier_mars_avril_mai_juin_juillet_ao\xFBt_septembre_octobre_novembre_d\xE9cembre".split("_"), monthsShort: "janv._f\xE9vr._mars_avr._mai_juin_juil._ao\xFBt_sept._oct._nov._d\xE9c.".split("_"), weekStart: 1, yearStart: 4, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd D MMMM YYYY HH:mm"}, relativeTime: {future: "dans %s", past: "il y a %s", s: "quelques secondes", m: "une minute", mm: "%d minutes", h: "une heure", hh: "%d heures", d: "un jour", dd: "%d jours", M: "un mois", MM: "%d mois", y: "un an", yy: "%d ans"}, ordinal: function(e3) { + return "" + e3 + (e3 === 1 ? "er" : ""); + }}; + return t2.default.locale(i, null, true), i; + }); +}); + +// node_modules/dayjs/locale/hi.js +var require_hi = __commonJS((exports, module) => { + !function(_, e2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = e2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], e2) : (_ = typeof globalThis != "undefined" ? globalThis : _ || self).dayjs_locale_hi = e2(_.dayjs); + }(exports, function(_) { + "use strict"; + function e2(_2) { + return _2 && typeof _2 == "object" && "default" in _2 ? _2 : {default: _2}; + } + var t2 = e2(_), d = {name: "hi", weekdays: "\u0930\u0935\u093F\u0935\u093E\u0930_\u0938\u094B\u092E\u0935\u093E\u0930_\u092E\u0902\u0917\u0932\u0935\u093E\u0930_\u092C\u0941\u0927\u0935\u093E\u0930_\u0917\u0941\u0930\u0942\u0935\u093E\u0930_\u0936\u0941\u0915\u094D\u0930\u0935\u093E\u0930_\u0936\u0928\u093F\u0935\u093E\u0930".split("_"), months: "\u091C\u0928\u0935\u0930\u0940_\u092B\u093C\u0930\u0935\u0930\u0940_\u092E\u093E\u0930\u094D\u091A_\u0905\u092A\u094D\u0930\u0948\u0932_\u092E\u0908_\u091C\u0942\u0928_\u091C\u0941\u0932\u093E\u0908_\u0905\u0917\u0938\u094D\u0924_\u0938\u093F\u0924\u092E\u094D\u092C\u0930_\u0905\u0915\u094D\u091F\u0942\u092C\u0930_\u0928\u0935\u092E\u094D\u092C\u0930_\u0926\u093F\u0938\u092E\u094D\u092C\u0930".split("_"), weekdaysShort: "\u0930\u0935\u093F_\u0938\u094B\u092E_\u092E\u0902\u0917\u0932_\u092C\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094D\u0930_\u0936\u0928\u093F".split("_"), monthsShort: "\u091C\u0928._\u092B\u093C\u0930._\u092E\u093E\u0930\u094D\u091A_\u0905\u092A\u094D\u0930\u0948._\u092E\u0908_\u091C\u0942\u0928_\u091C\u0941\u0932._\u0905\u0917._\u0938\u093F\u0924._\u0905\u0915\u094D\u091F\u0942._\u0928\u0935._\u0926\u093F\u0938.".split("_"), weekdaysMin: "\u0930_\u0938\u094B_\u092E\u0902_\u092C\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"), ordinal: function(_2) { + return _2; + }, formats: {LT: "A h:mm \u092C\u091C\u0947", LTS: "A h:mm:ss \u092C\u091C\u0947", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY, A h:mm \u092C\u091C\u0947", LLLL: "dddd, D MMMM YYYY, A h:mm \u092C\u091C\u0947"}, relativeTime: {future: "%s \u092E\u0947\u0902", past: "%s \u092A\u0939\u0932\u0947", s: "\u0915\u0941\u091B \u0939\u0940 \u0915\u094D\u0937\u0923", m: "\u090F\u0915 \u092E\u093F\u0928\u091F", mm: "%d \u092E\u093F\u0928\u091F", h: "\u090F\u0915 \u0918\u0902\u091F\u093E", hh: "%d \u0918\u0902\u091F\u0947", d: "\u090F\u0915 \u0926\u093F\u0928", dd: "%d \u0926\u093F\u0928", M: "\u090F\u0915 \u092E\u0939\u0940\u0928\u0947", MM: "%d \u092E\u0939\u0940\u0928\u0947", y: "\u090F\u0915 \u0935\u0930\u094D\u0937", yy: "%d \u0935\u0930\u094D\u0937"}}; + return t2.default.locale(d, null, true), d; + }); +}); + +// node_modules/dayjs/locale/hu.js +var require_hu = __commonJS((exports, module) => { + !function(e2, n2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = n2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], n2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_hu = n2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function n2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var t2 = n2(e2), r2 = {name: "hu", weekdays: "vas\xE1rnap_h\xE9tf\u0151_kedd_szerda_cs\xFCt\xF6rt\xF6k_p\xE9ntek_szombat".split("_"), weekdaysShort: "vas_h\xE9t_kedd_sze_cs\xFCt_p\xE9n_szo".split("_"), weekdaysMin: "v_h_k_sze_cs_p_szo".split("_"), months: "janu\xE1r_febru\xE1r_m\xE1rcius_\xE1prilis_m\xE1jus_j\xFAnius_j\xFAlius_augusztus_szeptember_okt\xF3ber_november_december".split("_"), monthsShort: "jan_feb_m\xE1rc_\xE1pr_m\xE1j_j\xFAn_j\xFAl_aug_szept_okt_nov_dec".split("_"), ordinal: function(e3) { + return e3 + "."; + }, weekStart: 1, relativeTime: {future: "%s m\xFAlva", past: "%s", s: function(e3, n3, t3, r3) { + return "n\xE9h\xE1ny m\xE1sodperc" + (r3 || n3 ? "" : "e"); + }, m: function(e3, n3, t3, r3) { + return "egy perc" + (r3 || n3 ? "" : "e"); + }, mm: function(e3, n3, t3, r3) { + return e3 + " perc" + (r3 || n3 ? "" : "e"); + }, h: function(e3, n3, t3, r3) { + return "egy " + (r3 || n3 ? "\xF3ra" : "\xF3r\xE1ja"); + }, hh: function(e3, n3, t3, r3) { + return e3 + " " + (r3 || n3 ? "\xF3ra" : "\xF3r\xE1ja"); + }, d: function(e3, n3, t3, r3) { + return "egy " + (r3 || n3 ? "nap" : "napja"); + }, dd: function(e3, n3, t3, r3) { + return e3 + " " + (r3 || n3 ? "nap" : "napja"); + }, M: function(e3, n3, t3, r3) { + return "egy " + (r3 || n3 ? "h\xF3nap" : "h\xF3napja"); + }, MM: function(e3, n3, t3, r3) { + return e3 + " " + (r3 || n3 ? "h\xF3nap" : "h\xF3napja"); + }, y: function(e3, n3, t3, r3) { + return "egy " + (r3 || n3 ? "\xE9v" : "\xE9ve"); + }, yy: function(e3, n3, t3, r3) { + return e3 + " " + (r3 || n3 ? "\xE9v" : "\xE9ve"); + }}, formats: {LT: "H:mm", LTS: "H:mm:ss", L: "YYYY.MM.DD.", LL: "YYYY. MMMM D.", LLL: "YYYY. MMMM D. H:mm", LLLL: "YYYY. MMMM D., dddd H:mm"}}; + return t2.default.locale(r2, null, true), r2; + }); +}); + +// node_modules/dayjs/locale/hy-am.js +var require_hy_am = __commonJS((exports, module) => { + !function(_, e2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = e2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], e2) : (_ = typeof globalThis != "undefined" ? globalThis : _ || self).dayjs_locale_hy_am = e2(_.dayjs); + }(exports, function(_) { + "use strict"; + function e2(_2) { + return _2 && typeof _2 == "object" && "default" in _2 ? _2 : {default: _2}; + } + var t2 = e2(_), d = {name: "hy-am", weekdays: "\u056F\u056B\u0580\u0561\u056F\u056B_\u0565\u0580\u056F\u0578\u0582\u0577\u0561\u0562\u0569\u056B_\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056B_\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056B_\u0570\u056B\u0576\u0563\u0577\u0561\u0562\u0569\u056B_\u0578\u0582\u0580\u0562\u0561\u0569_\u0577\u0561\u0562\u0561\u0569".split("_"), months: "\u0570\u0578\u0582\u0576\u057E\u0561\u0580\u056B_\u0583\u0565\u057F\u0580\u057E\u0561\u0580\u056B_\u0574\u0561\u0580\u057F\u056B_\u0561\u057A\u0580\u056B\u056C\u056B_\u0574\u0561\u0575\u056B\u057D\u056B_\u0570\u0578\u0582\u0576\u056B\u057D\u056B_\u0570\u0578\u0582\u056C\u056B\u057D\u056B_\u0585\u0563\u0578\u057D\u057F\u0578\u057D\u056B_\u057D\u0565\u057A\u057F\u0565\u0574\u0562\u0565\u0580\u056B_\u0570\u0578\u056F\u057F\u0565\u0574\u0562\u0565\u0580\u056B_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056B_\u0564\u0565\u056F\u057F\u0565\u0574\u0562\u0565\u0580\u056B".split("_"), weekStart: 1, weekdaysShort: "\u056F\u0580\u056F_\u0565\u0580\u056F_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"), monthsShort: "\u0570\u0576\u057E_\u0583\u057F\u0580_\u0574\u0580\u057F_\u0561\u057A\u0580_\u0574\u0575\u057D_\u0570\u0576\u057D_\u0570\u056C\u057D_\u0585\u0563\u057D_\u057D\u057A\u057F_\u0570\u056F\u057F_\u0576\u0574\u0562_\u0564\u056F\u057F".split("_"), weekdaysMin: "\u056F\u0580\u056F_\u0565\u0580\u056F_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"), ordinal: function(_2) { + return _2; + }, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD.MM.YYYY", LL: "D MMMM YYYY \u0569.", LLL: "D MMMM YYYY \u0569., HH:mm", LLLL: "dddd, D MMMM YYYY \u0569., HH:mm"}, relativeTime: {future: "%s \u0570\u0565\u057F\u0578", past: "%s \u0561\u057C\u0561\u057B", s: "\u0574\u056B \u0584\u0561\u0576\u056B \u057E\u0561\u0575\u0580\u056F\u0575\u0561\u0576", m: "\u0580\u0578\u057A\u0565", mm: "%d \u0580\u0578\u057A\u0565", h: "\u056A\u0561\u0574", hh: "%d \u056A\u0561\u0574", d: "\u0585\u0580", dd: "%d \u0585\u0580", M: "\u0561\u0574\u056B\u057D", MM: "%d \u0561\u0574\u056B\u057D", y: "\u057F\u0561\u0580\u056B", yy: "%d \u057F\u0561\u0580\u056B"}}; + return t2.default.locale(d, null, true), d; + }); +}); + +// node_modules/dayjs/locale/id.js +var require_id = __commonJS((exports, module) => { + !function(e2, a2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = a2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], a2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_id = a2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function a2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var t2 = a2(e2), _ = {name: "id", weekdays: "Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"), months: "Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"), weekdaysShort: "Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"), monthsShort: "Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"), weekdaysMin: "Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"), weekStart: 1, formats: {LT: "HH.mm", LTS: "HH.mm.ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY [pukul] HH.mm", LLLL: "dddd, D MMMM YYYY [pukul] HH.mm"}, relativeTime: {future: "dalam %s", past: "%s yang lalu", s: "beberapa detik", m: "semenit", mm: "%d menit", h: "sejam", hh: "%d jam", d: "sehari", dd: "%d hari", M: "sebulan", MM: "%d bulan", y: "setahun", yy: "%d tahun"}, ordinal: function(e3) { + return e3 + "."; + }}; + return t2.default.locale(_, null, true), _; + }); +}); + +// node_modules/dayjs/locale/it.js +var require_it = __commonJS((exports, module) => { + !function(e2, o2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = o2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], o2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_it = o2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function o2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var t2 = o2(e2), n2 = {name: "it", weekdays: "domenica_luned\xEC_marted\xEC_mercoled\xEC_gioved\xEC_venerd\xEC_sabato".split("_"), weekdaysShort: "dom_lun_mar_mer_gio_ven_sab".split("_"), weekdaysMin: "do_lu_ma_me_gi_ve_sa".split("_"), months: "gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"), weekStart: 1, monthsShort: "gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"), formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd D MMMM YYYY HH:mm"}, relativeTime: {future: "tra %s", past: "%s fa", s: "qualche secondo", m: "un minuto", mm: "%d minuti", h: "un' ora", hh: "%d ore", d: "un giorno", dd: "%d giorni", M: "un mese", MM: "%d mesi", y: "un anno", yy: "%d anni"}, ordinal: function(e3) { + return e3 + "\xBA"; + }}; + return t2.default.locale(n2, null, true), n2; + }); +}); + +// node_modules/dayjs/locale/ja.js +var require_ja = __commonJS((exports, module) => { + !function(e2, _) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = _(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], _) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_ja = _(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function _(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var t2 = _(e2), d = {name: "ja", weekdays: "\u65E5\u66DC\u65E5_\u6708\u66DC\u65E5_\u706B\u66DC\u65E5_\u6C34\u66DC\u65E5_\u6728\u66DC\u65E5_\u91D1\u66DC\u65E5_\u571F\u66DC\u65E5".split("_"), weekdaysShort: "\u65E5_\u6708_\u706B_\u6C34_\u6728_\u91D1_\u571F".split("_"), weekdaysMin: "\u65E5_\u6708_\u706B_\u6C34_\u6728_\u91D1_\u571F".split("_"), months: "1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"), monthsShort: "1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"), ordinal: function(e3) { + return e3 + "\u65E5"; + }, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY\u5E74M\u6708D\u65E5", LLL: "YYYY\u5E74M\u6708D\u65E5 HH:mm", LLLL: "YYYY\u5E74M\u6708D\u65E5 dddd HH:mm", l: "YYYY/MM/DD", ll: "YYYY\u5E74M\u6708D\u65E5", lll: "YYYY\u5E74M\u6708D\u65E5 HH:mm", llll: "YYYY\u5E74M\u6708D\u65E5(ddd) HH:mm"}, meridiem: function(e3) { + return e3 < 12 ? "\u5348\u524D" : "\u5348\u5F8C"; + }, relativeTime: {future: "%s\u5F8C", past: "%s\u524D", s: "\u6570\u79D2", m: "1\u5206", mm: "%d\u5206", h: "1\u6642\u9593", hh: "%d\u6642\u9593", d: "1\u65E5", dd: "%d\u65E5", M: "1\u30F6\u6708", MM: "%d\u30F6\u6708", y: "1\u5E74", yy: "%d\u5E74"}}; + return t2.default.locale(d, null, true), d; + }); +}); + +// node_modules/dayjs/locale/ka.js +var require_ka = __commonJS((exports, module) => { + !function(_, e2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = e2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], e2) : (_ = typeof globalThis != "undefined" ? globalThis : _ || self).dayjs_locale_ka = e2(_.dayjs); + }(exports, function(_) { + "use strict"; + function e2(_2) { + return _2 && typeof _2 == "object" && "default" in _2 ? _2 : {default: _2}; + } + var t2 = e2(_), d = {name: "ka", weekdays: "\u10D9\u10D5\u10D8\u10E0\u10D0_\u10DD\u10E0\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8_\u10E1\u10D0\u10DB\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8_\u10DD\u10D7\u10EE\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8_\u10EE\u10E3\u10D7\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8_\u10DE\u10D0\u10E0\u10D0\u10E1\u10D9\u10D4\u10D5\u10D8_\u10E8\u10D0\u10D1\u10D0\u10D7\u10D8".split("_"), weekdaysShort: "\u10D9\u10D5\u10D8_\u10DD\u10E0\u10E8_\u10E1\u10D0\u10DB_\u10DD\u10D7\u10EE_\u10EE\u10E3\u10D7_\u10DE\u10D0\u10E0_\u10E8\u10D0\u10D1".split("_"), weekdaysMin: "\u10D9\u10D5_\u10DD\u10E0_\u10E1\u10D0_\u10DD\u10D7_\u10EE\u10E3_\u10DE\u10D0_\u10E8\u10D0".split("_"), months: "\u10D8\u10D0\u10DC\u10D5\u10D0\u10E0\u10D8_\u10D7\u10D4\u10D1\u10D4\u10E0\u10D5\u10D0\u10DA\u10D8_\u10DB\u10D0\u10E0\u10E2\u10D8_\u10D0\u10DE\u10E0\u10D8\u10DA\u10D8_\u10DB\u10D0\u10D8\u10E1\u10D8_\u10D8\u10D5\u10DC\u10D8\u10E1\u10D8_\u10D8\u10D5\u10DA\u10D8\u10E1\u10D8_\u10D0\u10D2\u10D5\u10D8\u10E1\u10E2\u10DD_\u10E1\u10D4\u10E5\u10E2\u10D4\u10DB\u10D1\u10D4\u10E0\u10D8_\u10DD\u10E5\u10E2\u10DD\u10DB\u10D1\u10D4\u10E0\u10D8_\u10DC\u10DD\u10D4\u10DB\u10D1\u10D4\u10E0\u10D8_\u10D3\u10D4\u10D9\u10D4\u10DB\u10D1\u10D4\u10E0\u10D8".split("_"), monthsShort: "\u10D8\u10D0\u10DC_\u10D7\u10D4\u10D1_\u10DB\u10D0\u10E0_\u10D0\u10DE\u10E0_\u10DB\u10D0\u10D8_\u10D8\u10D5\u10DC_\u10D8\u10D5\u10DA_\u10D0\u10D2\u10D5_\u10E1\u10D4\u10E5_\u10DD\u10E5\u10E2_\u10DC\u10DD\u10D4_\u10D3\u10D4\u10D9".split("_"), weekStart: 1, formats: {LT: "h:mm A", LTS: "h:mm:ss A", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY h:mm A", LLLL: "dddd, D MMMM YYYY h:mm A"}, relativeTime: {future: "%s \u10E8\u10D4\u10DB\u10D3\u10D4\u10D2", past: "%s \u10EC\u10D8\u10DC", s: "\u10EC\u10D0\u10DB\u10D8", m: "\u10EC\u10E3\u10D7\u10D8", mm: "%d \u10EC\u10E3\u10D7\u10D8", h: "\u10E1\u10D0\u10D0\u10D7\u10D8", hh: "%d \u10E1\u10D0\u10D0\u10D7\u10D8\u10E1", d: "\u10D3\u10E6\u10D4\u10E1", dd: "%d \u10D3\u10E6\u10D8\u10E1 \u10D2\u10D0\u10DC\u10DB\u10D0\u10D5\u10DA\u10DD\u10D1\u10D0\u10E8\u10D8", M: "\u10D7\u10D5\u10D8\u10E1", MM: "%d \u10D7\u10D5\u10D8\u10E1", y: "\u10EC\u10D4\u10DA\u10D8", yy: "%d \u10EC\u10DA\u10D8\u10E1"}, ordinal: function(_2) { + return _2; + }}; + return t2.default.locale(d, null, true), d; + }); +}); + +// node_modules/dayjs/locale/ku.js +var require_ku = __commonJS((exports, module) => { + !function(e2, t2) { + typeof exports == "object" && typeof module != "undefined" ? t2(exports, require_dayjs_min()) : typeof define == "function" && define.amd ? define(["exports", "dayjs"], t2) : t2((e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_ku = {}, e2.dayjs); + }(exports, function(e2, t2) { + "use strict"; + function n2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var r2 = n2(t2), d = {1: "\u0661", 2: "\u0662", 3: "\u0663", 4: "\u0664", 5: "\u0665", 6: "\u0666", 7: "\u0667", 8: "\u0668", 9: "\u0669", 0: "\u0660"}, o2 = {"\u0661": "1", "\u0662": "2", "\u0663": "3", "\u0664": "4", "\u0665": "5", "\u0666": "6", "\u0667": "7", "\u0668": "8", "\u0669": "9", "\u0660": "0"}, u = ["\u06A9\u0627\u0646\u0648\u0648\u0646\u06CC \u062F\u0648\u0648\u06D5\u0645", "\u0634\u0648\u0628\u0627\u062A", "\u0626\u0627\u062F\u0627\u0631", "\u0646\u06CC\u0633\u0627\u0646", "\u0626\u0627\u06CC\u0627\u0631", "\u062D\u0648\u0632\u06D5\u06CC\u0631\u0627\u0646", "\u062A\u06D5\u0645\u0645\u0648\u0648\u0632", "\u0626\u0627\u0628", "\u0626\u06D5\u06CC\u0644\u0648\u0648\u0644", "\u062A\u0634\u0631\u06CC\u0646\u06CC \u06CC\u06D5\u06A9\u06D5\u0645", "\u062A\u0634\u0631\u06CC\u0646\u06CC \u062F\u0648\u0648\u06D5\u0645", "\u06A9\u0627\u0646\u0648\u0648\u0646\u06CC \u06CC\u06D5\u06A9\u06D5\u0645"], i = {name: "ku", months: u, monthsShort: u, weekdays: "\u06CC\u06D5\u06A9\u0634\u06D5\u0645\u0645\u06D5_\u062F\u0648\u0648\u0634\u06D5\u0645\u0645\u06D5_\u0633\u06CE\u0634\u06D5\u0645\u0645\u06D5_\u0686\u0648\u0627\u0631\u0634\u06D5\u0645\u0645\u06D5_\u067E\u06CE\u0646\u062C\u0634\u06D5\u0645\u0645\u06D5_\u0647\u06D5\u06CC\u0646\u06CC_\u0634\u06D5\u0645\u0645\u06D5".split("_"), weekdaysShort: "\u06CC\u06D5\u06A9\u0634\u06D5\u0645_\u062F\u0648\u0648\u0634\u06D5\u0645_\u0633\u06CE\u0634\u06D5\u0645_\u0686\u0648\u0627\u0631\u0634\u06D5\u0645_\u067E\u06CE\u0646\u062C\u0634\u06D5\u0645_\u0647\u06D5\u06CC\u0646\u06CC_\u0634\u06D5\u0645\u0645\u06D5".split("_"), weekStart: 6, weekdaysMin: "\u06CC_\u062F_\u0633_\u0686_\u067E_\u0647\u0640_\u0634".split("_"), preparse: function(e3) { + return e3.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function(e4) { + return o2[e4]; + }).replace(/،/g, ","); + }, postformat: function(e3) { + return e3.replace(/\d/g, function(e4) { + return d[e4]; + }).replace(/,/g, "\u060C"); + }, ordinal: function(e3) { + return e3; + }, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd, D MMMM YYYY HH:mm"}, meridiem: function(e3) { + return e3 < 12 ? "\u067E.\u0646" : "\u062F.\u0646"; + }, relativeTime: {future: "\u0644\u06D5 %s", past: "\u0644\u06D5\u0645\u06D5\u0648\u067E\u06CE\u0634 %s", s: "\u0686\u06D5\u0646\u062F \u0686\u0631\u06A9\u06D5\u06CC\u06D5\u06A9", m: "\u06CC\u06D5\u06A9 \u062E\u0648\u0644\u06D5\u06A9", mm: "%d \u062E\u0648\u0644\u06D5\u06A9", h: "\u06CC\u06D5\u06A9 \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631", hh: "%d \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631", d: "\u06CC\u06D5\u06A9 \u0695\u06C6\u0698", dd: "%d \u0695\u06C6\u0698", M: "\u06CC\u06D5\u06A9 \u0645\u0627\u0646\u06AF", MM: "%d \u0645\u0627\u0646\u06AF", y: "\u06CC\u06D5\u06A9 \u0633\u0627\u06B5", yy: "%d \u0633\u0627\u06B5"}}; + r2.default.locale(i, null, true), e2.default = i, e2.englishToArabicNumbersMap = d, Object.defineProperty(e2, "__esModule", {value: true}); + }); +}); + +// node_modules/dayjs/locale/ms.js +var require_ms = __commonJS((exports, module) => { + !function(e2, a2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = a2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], a2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_ms = a2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function a2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var t2 = a2(e2), s2 = {name: "ms", weekdays: "Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"), weekdaysShort: "Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"), weekdaysMin: "Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"), months: "Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"), monthsShort: "Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"), weekStart: 1, formats: {LT: "HH.mm", LTS: "HH.mm.ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH.mm", LLLL: "dddd, D MMMM YYYY HH.mm"}, relativeTime: {future: "dalam %s", past: "%s yang lepas", s: "beberapa saat", m: "seminit", mm: "%d minit", h: "sejam", hh: "%d jam", d: "sehari", dd: "%d hari", M: "sebulan", MM: "%d bulan", y: "setahun", yy: "%d tahun"}, ordinal: function(e3) { + return e3 + "."; + }}; + return t2.default.locale(s2, null, true), s2; + }); +}); + +// node_modules/dayjs/locale/my.js +var require_my = __commonJS((exports, module) => { + !function(_, e2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = e2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], e2) : (_ = typeof globalThis != "undefined" ? globalThis : _ || self).dayjs_locale_my = e2(_.dayjs); + }(exports, function(_) { + "use strict"; + function e2(_2) { + return _2 && typeof _2 == "object" && "default" in _2 ? _2 : {default: _2}; + } + var t2 = e2(_), d = {name: "my", weekdays: "\u1010\u1014\u1004\u103A\u1039\u1002\u1014\u103D\u1031_\u1010\u1014\u1004\u103A\u1039\u101C\u102C_\u1021\u1004\u103A\u1039\u1002\u102B_\u1017\u102F\u1012\u1039\u1013\u101F\u1030\u1038_\u1000\u103C\u102C\u101E\u1015\u1010\u1031\u1038_\u101E\u1031\u102C\u1000\u103C\u102C_\u1005\u1014\u1031".split("_"), months: "\u1007\u1014\u103A\u1014\u101D\u102B\u101B\u102E_\u1016\u1031\u1016\u1031\u102C\u103A\u101D\u102B\u101B\u102E_\u1019\u1010\u103A_\u1027\u1015\u103C\u102E_\u1019\u1031_\u1007\u103D\u1014\u103A_\u1007\u1030\u101C\u102D\u102F\u1004\u103A_\u101E\u103C\u1002\u102F\u1010\u103A_\u1005\u1000\u103A\u1010\u1004\u103A\u1018\u102C_\u1021\u1031\u102C\u1000\u103A\u1010\u102D\u102F\u1018\u102C_\u1014\u102D\u102F\u101D\u1004\u103A\u1018\u102C_\u1012\u102E\u1007\u1004\u103A\u1018\u102C".split("_"), weekStart: 1, weekdaysShort: "\u1014\u103D\u1031_\u101C\u102C_\u1002\u102B_\u101F\u1030\u1038_\u1000\u103C\u102C_\u101E\u1031\u102C_\u1014\u1031".split("_"), monthsShort: "\u1007\u1014\u103A_\u1016\u1031_\u1019\u1010\u103A_\u1015\u103C\u102E_\u1019\u1031_\u1007\u103D\u1014\u103A_\u101C\u102D\u102F\u1004\u103A_\u101E\u103C_\u1005\u1000\u103A_\u1021\u1031\u102C\u1000\u103A_\u1014\u102D\u102F_\u1012\u102E".split("_"), weekdaysMin: "\u1014\u103D\u1031_\u101C\u102C_\u1002\u102B_\u101F\u1030\u1038_\u1000\u103C\u102C_\u101E\u1031\u102C_\u1014\u1031".split("_"), ordinal: function(_2) { + return _2; + }, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd D MMMM YYYY HH:mm"}, relativeTime: {future: "\u101C\u102C\u1019\u100A\u103A\u1037 %s \u1019\u103E\u102C", past: "\u101C\u103D\u1014\u103A\u1001\u1032\u1037\u101E\u1031\u102C %s \u1000", s: "\u1005\u1000\u1039\u1000\u1014\u103A.\u1021\u1014\u100A\u103A\u1038\u1004\u101A\u103A", m: "\u1010\u1005\u103A\u1019\u102D\u1014\u1005\u103A", mm: "%d \u1019\u102D\u1014\u1005\u103A", h: "\u1010\u1005\u103A\u1014\u102C\u101B\u102E", hh: "%d \u1014\u102C\u101B\u102E", d: "\u1010\u1005\u103A\u101B\u1000\u103A", dd: "%d \u101B\u1000\u103A", M: "\u1010\u1005\u103A\u101C", MM: "%d \u101C", y: "\u1010\u1005\u103A\u1014\u103E\u1005\u103A", yy: "%d \u1014\u103E\u1005\u103A"}}; + return t2.default.locale(d, null, true), d; + }); +}); + +// node_modules/dayjs/locale/nl.js +var require_nl = __commonJS((exports, module) => { + !function(e2, a2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = a2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], a2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_nl = a2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function a2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var d = a2(e2), n2 = {name: "nl", weekdays: "zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"), weekdaysShort: "zo._ma._di._wo._do._vr._za.".split("_"), weekdaysMin: "zo_ma_di_wo_do_vr_za".split("_"), months: "januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"), monthsShort: "jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"), ordinal: function(e3) { + return "[" + e3 + (e3 === 1 || e3 === 8 || e3 >= 20 ? "ste" : "de") + "]"; + }, weekStart: 1, yearStart: 4, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD-MM-YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd D MMMM YYYY HH:mm"}, relativeTime: {future: "over %s", past: "%s geleden", s: "een paar seconden", m: "een minuut", mm: "%d minuten", h: "een uur", hh: "%d uur", d: "een dag", dd: "%d dagen", M: "een maand", MM: "%d maanden", y: "een jaar", yy: "%d jaar"}}; + return d.default.locale(n2, null, true), n2; + }); +}); + +// node_modules/dayjs/locale/pl.js +var require_pl = __commonJS((exports, module) => { + !function(e2, t2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = t2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], t2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_pl = t2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function t2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var i = t2(e2); + function a2(e3) { + return e3 % 10 < 5 && e3 % 10 > 1 && ~~(e3 / 10) % 10 != 1; + } + function n2(e3, t3, i2) { + var n3 = e3 + " "; + switch (i2) { + case "m": + return t3 ? "minuta" : "minut\u0119"; + case "mm": + return n3 + (a2(e3) ? "minuty" : "minut"); + case "h": + return t3 ? "godzina" : "godzin\u0119"; + case "hh": + return n3 + (a2(e3) ? "godziny" : "godzin"); + case "MM": + return n3 + (a2(e3) ? "miesi\u0105ce" : "miesi\u0119cy"); + case "yy": + return n3 + (a2(e3) ? "lata" : "lat"); + } + } + var r2 = "stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrze\u015Bnia_pa\u017Adziernika_listopada_grudnia".split("_"), _ = "stycze\u0144_luty_marzec_kwiecie\u0144_maj_czerwiec_lipiec_sierpie\u0144_wrzesie\u0144_pa\u017Adziernik_listopad_grudzie\u0144".split("_"), s2 = /D MMMM/, d = function(e3, t3) { + return s2.test(t3) ? r2[e3.month()] : _[e3.month()]; + }; + d.s = _, d.f = r2; + var o2 = {name: "pl", weekdays: "niedziela_poniedzia\u0142ek_wtorek_\u015Broda_czwartek_pi\u0105tek_sobota".split("_"), weekdaysShort: "ndz_pon_wt_\u015Br_czw_pt_sob".split("_"), weekdaysMin: "Nd_Pn_Wt_\u015Ar_Cz_Pt_So".split("_"), months: d, monthsShort: "sty_lut_mar_kwi_maj_cze_lip_sie_wrz_pa\u017A_lis_gru".split("_"), ordinal: function(e3) { + return e3 + "."; + }, weekStart: 1, yearStart: 4, relativeTime: {future: "za %s", past: "%s temu", s: "kilka sekund", m: n2, mm: n2, h: n2, hh: n2, d: "1 dzie\u0144", dd: "%d dni", M: "miesi\u0105c", MM: n2, y: "rok", yy: n2}, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD.MM.YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd, D MMMM YYYY HH:mm"}}; + return i.default.locale(o2, null, true), o2; + }); +}); + +// node_modules/dayjs/locale/pt-br.js +var require_pt_br = __commonJS((exports, module) => { + !function(e2, o2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = o2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], o2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_pt_br = o2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function o2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var a2 = o2(e2), s2 = {name: "pt-br", weekdays: "domingo_segunda-feira_ter\xE7a-feira_quarta-feira_quinta-feira_sexta-feira_s\xE1bado".split("_"), weekdaysShort: "dom_seg_ter_qua_qui_sex_s\xE1b".split("_"), weekdaysMin: "Do_2\xAA_3\xAA_4\xAA_5\xAA_6\xAA_S\xE1".split("_"), months: "janeiro_fevereiro_mar\xE7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"), monthsShort: "jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"), ordinal: function(e3) { + return e3 + "\xBA"; + }, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D [de] MMMM [de] YYYY", LLL: "D [de] MMMM [de] YYYY [\xE0s] HH:mm", LLLL: "dddd, D [de] MMMM [de] YYYY [\xE0s] HH:mm"}, relativeTime: {future: "em %s", past: "h\xE1 %s", s: "poucos segundos", m: "um minuto", mm: "%d minutos", h: "uma hora", hh: "%d horas", d: "um dia", dd: "%d dias", M: "um m\xEAs", MM: "%d meses", y: "um ano", yy: "%d anos"}}; + return a2.default.locale(s2, null, true), s2; + }); +}); + +// node_modules/dayjs/locale/pt.js +var require_pt = __commonJS((exports, module) => { + !function(e2, a2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = a2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], a2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_pt = a2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function a2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var o2 = a2(e2), t2 = {name: "pt", weekdays: "domingo_segunda-feira_ter\xE7a-feira_quarta-feira_quinta-feira_sexta-feira_s\xE1bado".split("_"), weekdaysShort: "dom_seg_ter_qua_qui_sex_sab".split("_"), weekdaysMin: "Do_2\xAA_3\xAA_4\xAA_5\xAA_6\xAA_Sa".split("_"), months: "janeiro_fevereiro_mar\xE7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"), monthsShort: "jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"), ordinal: function(e3) { + return e3 + "\xBA"; + }, weekStart: 1, yearStart: 4, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D [de] MMMM [de] YYYY", LLL: "D [de] MMMM [de] YYYY [\xE0s] HH:mm", LLLL: "dddd, D [de] MMMM [de] YYYY [\xE0s] HH:mm"}, relativeTime: {future: "em %s", past: "h\xE1 %s", s: "alguns segundos", m: "um minuto", mm: "%d minutos", h: "uma hora", hh: "%d horas", d: "um dia", dd: "%d dias", M: "um m\xEAs", MM: "%d meses", y: "um ano", yy: "%d anos"}}; + return o2.default.locale(t2, null, true), t2; + }); +}); + +// node_modules/dayjs/locale/ro.js +var require_ro = __commonJS((exports, module) => { + !function(e2, i) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = i(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], i) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_ro = i(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function i(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var t2 = i(e2), _ = {name: "ro", weekdays: "Duminic\u0103_Luni_Mar\u021Bi_Miercuri_Joi_Vineri_S\xE2mb\u0103t\u0103".split("_"), weekdaysShort: "Dum_Lun_Mar_Mie_Joi_Vin_S\xE2m".split("_"), weekdaysMin: "Du_Lu_Ma_Mi_Jo_Vi_S\xE2".split("_"), months: "Ianuarie_Februarie_Martie_Aprilie_Mai_Iunie_Iulie_August_Septembrie_Octombrie_Noiembrie_Decembrie".split("_"), monthsShort: "Ian._Febr._Mart._Apr._Mai_Iun._Iul._Aug._Sept._Oct._Nov._Dec.".split("_"), weekStart: 1, formats: {LT: "H:mm", LTS: "H:mm:ss", L: "DD.MM.YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY H:mm", LLLL: "dddd, D MMMM YYYY H:mm"}, relativeTime: {future: "peste %s", past: "acum %s", s: "c\xE2teva secunde", m: "un minut", mm: "%d minute", h: "o or\u0103", hh: "%d ore", d: "o zi", dd: "%d zile", M: "o lun\u0103", MM: "%d luni", y: "un an", yy: "%d ani"}, ordinal: function(e3) { + return e3; + }}; + return t2.default.locale(_, null, true), _; + }); +}); + +// node_modules/dayjs/locale/ru.js +var require_ru = __commonJS((exports, module) => { + !function(_, t2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = t2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], t2) : (_ = typeof globalThis != "undefined" ? globalThis : _ || self).dayjs_locale_ru = t2(_.dayjs); + }(exports, function(_) { + "use strict"; + function t2(_2) { + return _2 && typeof _2 == "object" && "default" in _2 ? _2 : {default: _2}; + } + var e2 = t2(_), n2 = "\u044F\u043D\u0432\u0430\u0440\u044F_\u0444\u0435\u0432\u0440\u0430\u043B\u044F_\u043C\u0430\u0440\u0442\u0430_\u0430\u043F\u0440\u0435\u043B\u044F_\u043C\u0430\u044F_\u0438\u044E\u043D\u044F_\u0438\u044E\u043B\u044F_\u0430\u0432\u0433\u0443\u0441\u0442\u0430_\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F_\u043E\u043A\u0442\u044F\u0431\u0440\u044F_\u043D\u043E\u044F\u0431\u0440\u044F_\u0434\u0435\u043A\u0430\u0431\u0440\u044F".split("_"), s2 = "\u044F\u043D\u0432\u0430\u0440\u044C_\u0444\u0435\u0432\u0440\u0430\u043B\u044C_\u043C\u0430\u0440\u0442_\u0430\u043F\u0440\u0435\u043B\u044C_\u043C\u0430\u0439_\u0438\u044E\u043D\u044C_\u0438\u044E\u043B\u044C_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C_\u043E\u043A\u0442\u044F\u0431\u0440\u044C_\u043D\u043E\u044F\u0431\u0440\u044C_\u0434\u0435\u043A\u0430\u0431\u0440\u044C".split("_"), r2 = "\u044F\u043D\u0432._\u0444\u0435\u0432\u0440._\u043C\u0430\u0440._\u0430\u043F\u0440._\u043C\u0430\u044F_\u0438\u044E\u043D\u044F_\u0438\u044E\u043B\u044F_\u0430\u0432\u0433._\u0441\u0435\u043D\u0442._\u043E\u043A\u0442._\u043D\u043E\u044F\u0431._\u0434\u0435\u043A.".split("_"), o2 = "\u044F\u043D\u0432._\u0444\u0435\u0432\u0440._\u043C\u0430\u0440\u0442_\u0430\u043F\u0440._\u043C\u0430\u0439_\u0438\u044E\u043D\u044C_\u0438\u044E\u043B\u044C_\u0430\u0432\u0433._\u0441\u0435\u043D\u0442._\u043E\u043A\u0442._\u043D\u043E\u044F\u0431._\u0434\u0435\u043A.".split("_"), i = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/; + function d(_2, t3, e3) { + var n3, s3; + return e3 === "m" ? t3 ? "\u043C\u0438\u043D\u0443\u0442\u0430" : "\u043C\u0438\u043D\u0443\u0442\u0443" : _2 + " " + (n3 = +_2, s3 = {mm: t3 ? "\u043C\u0438\u043D\u0443\u0442\u0430_\u043C\u0438\u043D\u0443\u0442\u044B_\u043C\u0438\u043D\u0443\u0442" : "\u043C\u0438\u043D\u0443\u0442\u0443_\u043C\u0438\u043D\u0443\u0442\u044B_\u043C\u0438\u043D\u0443\u0442", hh: "\u0447\u0430\u0441_\u0447\u0430\u0441\u0430_\u0447\u0430\u0441\u043E\u0432", dd: "\u0434\u0435\u043D\u044C_\u0434\u043D\u044F_\u0434\u043D\u0435\u0439", MM: "\u043C\u0435\u0441\u044F\u0446_\u043C\u0435\u0441\u044F\u0446\u0430_\u043C\u0435\u0441\u044F\u0446\u0435\u0432", yy: "\u0433\u043E\u0434_\u0433\u043E\u0434\u0430_\u043B\u0435\u0442"}[e3].split("_"), n3 % 10 == 1 && n3 % 100 != 11 ? s3[0] : n3 % 10 >= 2 && n3 % 10 <= 4 && (n3 % 100 < 10 || n3 % 100 >= 20) ? s3[1] : s3[2]); + } + var u = function(_2, t3) { + return i.test(t3) ? n2[_2.month()] : s2[_2.month()]; + }; + u.s = s2, u.f = n2; + var a2 = function(_2, t3) { + return i.test(t3) ? r2[_2.month()] : o2[_2.month()]; + }; + a2.s = o2, a2.f = r2; + var m = {name: "ru", weekdays: "\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435_\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A_\u0432\u0442\u043E\u0440\u043D\u0438\u043A_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043F\u044F\u0442\u043D\u0438\u0446\u0430_\u0441\u0443\u0431\u0431\u043E\u0442\u0430".split("_"), weekdaysShort: "\u0432\u0441\u043A_\u043F\u043D\u0434_\u0432\u0442\u0440_\u0441\u0440\u0434_\u0447\u0442\u0432_\u043F\u0442\u043D_\u0441\u0431\u0442".split("_"), weekdaysMin: "\u0432\u0441_\u043F\u043D_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043F\u0442_\u0441\u0431".split("_"), months: u, monthsShort: a2, weekStart: 1, yearStart: 4, formats: {LT: "H:mm", LTS: "H:mm:ss", L: "DD.MM.YYYY", LL: "D MMMM YYYY \u0433.", LLL: "D MMMM YYYY \u0433., H:mm", LLLL: "dddd, D MMMM YYYY \u0433., H:mm"}, relativeTime: {future: "\u0447\u0435\u0440\u0435\u0437 %s", past: "%s \u043D\u0430\u0437\u0430\u0434", s: "\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u043A\u0443\u043D\u0434", m: d, mm: d, h: "\u0447\u0430\u0441", hh: d, d: "\u0434\u0435\u043D\u044C", dd: d, M: "\u043C\u0435\u0441\u044F\u0446", MM: d, y: "\u0433\u043E\u0434", yy: d}, ordinal: function(_2) { + return _2; + }, meridiem: function(_2) { + return _2 < 4 ? "\u043D\u043E\u0447\u0438" : _2 < 12 ? "\u0443\u0442\u0440\u0430" : _2 < 17 ? "\u0434\u043D\u044F" : "\u0432\u0435\u0447\u0435\u0440\u0430"; + }}; + return e2.default.locale(m, null, true), m; + }); +}); + +// node_modules/dayjs/locale/sv.js +var require_sv = __commonJS((exports, module) => { + !function(e2, t2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = t2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], t2) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_sv = t2(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function t2(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var a2 = t2(e2), d = {name: "sv", weekdays: "s\xF6ndag_m\xE5ndag_tisdag_onsdag_torsdag_fredag_l\xF6rdag".split("_"), weekdaysShort: "s\xF6n_m\xE5n_tis_ons_tor_fre_l\xF6r".split("_"), weekdaysMin: "s\xF6_m\xE5_ti_on_to_fr_l\xF6".split("_"), months: "januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"), monthsShort: "jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"), weekStart: 1, yearStart: 4, ordinal: function(e3) { + var t3 = e3 % 10; + return "[" + e3 + (t3 === 1 || t3 === 2 ? "a" : "e") + "]"; + }, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY-MM-DD", LL: "D MMMM YYYY", LLL: "D MMMM YYYY [kl.] HH:mm", LLLL: "dddd D MMMM YYYY [kl.] HH:mm", lll: "D MMM YYYY HH:mm", llll: "ddd D MMM YYYY HH:mm"}, relativeTime: {future: "om %s", past: "f\xF6r %s sedan", s: "n\xE5gra sekunder", m: "en minut", mm: "%d minuter", h: "en timme", hh: "%d timmar", d: "en dag", dd: "%d dagar", M: "en m\xE5nad", MM: "%d m\xE5nader", y: "ett \xE5r", yy: "%d \xE5r"}}; + return a2.default.locale(d, null, true), d; + }); +}); + +// node_modules/dayjs/locale/tr.js +var require_tr = __commonJS((exports, module) => { + !function(a2, e2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = e2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], e2) : (a2 = typeof globalThis != "undefined" ? globalThis : a2 || self).dayjs_locale_tr = e2(a2.dayjs); + }(exports, function(a2) { + "use strict"; + function e2(a3) { + return a3 && typeof a3 == "object" && "default" in a3 ? a3 : {default: a3}; + } + var t2 = e2(a2), _ = {name: "tr", weekdays: "Pazar_Pazartesi_Sal\u0131_\xC7ar\u015Famba_Per\u015Fembe_Cuma_Cumartesi".split("_"), weekdaysShort: "Paz_Pts_Sal_\xC7ar_Per_Cum_Cts".split("_"), weekdaysMin: "Pz_Pt_Sa_\xC7a_Pe_Cu_Ct".split("_"), months: "Ocak_\u015Eubat_Mart_Nisan_May\u0131s_Haziran_Temmuz_A\u011Fustos_Eyl\xFCl_Ekim_Kas\u0131m_Aral\u0131k".split("_"), monthsShort: "Oca_\u015Eub_Mar_Nis_May_Haz_Tem_A\u011Fu_Eyl_Eki_Kas_Ara".split("_"), weekStart: 1, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD.MM.YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd, D MMMM YYYY HH:mm"}, relativeTime: {future: "%s sonra", past: "%s \xF6nce", s: "birka\xE7 saniye", m: "bir dakika", mm: "%d dakika", h: "bir saat", hh: "%d saat", d: "bir g\xFCn", dd: "%d g\xFCn", M: "bir ay", MM: "%d ay", y: "bir y\u0131l", yy: "%d y\u0131l"}, ordinal: function(a3) { + return a3 + "."; + }}; + return t2.default.locale(_, null, true), _; + }); +}); + +// node_modules/dayjs/locale/uk.js +var require_uk = __commonJS((exports, module) => { + !function(_, e2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = e2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], e2) : (_ = typeof globalThis != "undefined" ? globalThis : _ || self).dayjs_locale_uk = e2(_.dayjs); + }(exports, function(_) { + "use strict"; + function e2(_2) { + return _2 && typeof _2 == "object" && "default" in _2 ? _2 : {default: _2}; + } + var t2 = e2(_), s2 = "\u0441\u0456\u0447\u043D\u044F_\u043B\u044E\u0442\u043E\u0433\u043E_\u0431\u0435\u0440\u0435\u0437\u043D\u044F_\u043A\u0432\u0456\u0442\u043D\u044F_\u0442\u0440\u0430\u0432\u043D\u044F_\u0447\u0435\u0440\u0432\u043D\u044F_\u043B\u0438\u043F\u043D\u044F_\u0441\u0435\u0440\u043F\u043D\u044F_\u0432\u0435\u0440\u0435\u0441\u043D\u044F_\u0436\u043E\u0432\u0442\u043D\u044F_\u043B\u0438\u0441\u0442\u043E\u043F\u0430\u0434\u0430_\u0433\u0440\u0443\u0434\u043D\u044F".split("_"), n2 = "\u0441\u0456\u0447\u0435\u043D\u044C_\u043B\u044E\u0442\u0438\u0439_\u0431\u0435\u0440\u0435\u0437\u0435\u043D\u044C_\u043A\u0432\u0456\u0442\u0435\u043D\u044C_\u0442\u0440\u0430\u0432\u0435\u043D\u044C_\u0447\u0435\u0440\u0432\u0435\u043D\u044C_\u043B\u0438\u043F\u0435\u043D\u044C_\u0441\u0435\u0440\u043F\u0435\u043D\u044C_\u0432\u0435\u0440\u0435\u0441\u0435\u043D\u044C_\u0436\u043E\u0432\u0442\u0435\u043D\u044C_\u043B\u0438\u0441\u0442\u043E\u043F\u0430\u0434_\u0433\u0440\u0443\u0434\u0435\u043D\u044C".split("_"), o2 = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/; + function d(_2, e3, t3) { + var s3, n3; + return t3 === "m" ? e3 ? "\u0445\u0432\u0438\u043B\u0438\u043D\u0430" : "\u0445\u0432\u0438\u043B\u0438\u043D\u0443" : t3 === "h" ? e3 ? "\u0433\u043E\u0434\u0438\u043D\u0430" : "\u0433\u043E\u0434\u0438\u043D\u0443" : _2 + " " + (s3 = +_2, n3 = {ss: e3 ? "\u0441\u0435\u043A\u0443\u043D\u0434\u0430_\u0441\u0435\u043A\u0443\u043D\u0434\u0438_\u0441\u0435\u043A\u0443\u043D\u0434" : "\u0441\u0435\u043A\u0443\u043D\u0434\u0443_\u0441\u0435\u043A\u0443\u043D\u0434\u0438_\u0441\u0435\u043A\u0443\u043D\u0434", mm: e3 ? "\u0445\u0432\u0438\u043B\u0438\u043D\u0430_\u0445\u0432\u0438\u043B\u0438\u043D\u0438_\u0445\u0432\u0438\u043B\u0438\u043D" : "\u0445\u0432\u0438\u043B\u0438\u043D\u0443_\u0445\u0432\u0438\u043B\u0438\u043D\u0438_\u0445\u0432\u0438\u043B\u0438\u043D", hh: e3 ? "\u0433\u043E\u0434\u0438\u043D\u0430_\u0433\u043E\u0434\u0438\u043D\u0438_\u0433\u043E\u0434\u0438\u043D" : "\u0433\u043E\u0434\u0438\u043D\u0443_\u0433\u043E\u0434\u0438\u043D\u0438_\u0433\u043E\u0434\u0438\u043D", dd: "\u0434\u0435\u043D\u044C_\u0434\u043D\u0456_\u0434\u043D\u0456\u0432", MM: "\u043C\u0456\u0441\u044F\u0446\u044C_\u043C\u0456\u0441\u044F\u0446\u0456_\u043C\u0456\u0441\u044F\u0446\u0456\u0432", yy: "\u0440\u0456\u043A_\u0440\u043E\u043A\u0438_\u0440\u043E\u043A\u0456\u0432"}[t3].split("_"), s3 % 10 == 1 && s3 % 100 != 11 ? n3[0] : s3 % 10 >= 2 && s3 % 10 <= 4 && (s3 % 100 < 10 || s3 % 100 >= 20) ? n3[1] : n3[2]); + } + var i = function(_2, e3) { + return o2.test(e3) ? s2[_2.month()] : n2[_2.month()]; + }; + i.s = n2, i.f = s2; + var r2 = {name: "uk", weekdays: "\u043D\u0435\u0434\u0456\u043B\u044F_\u043F\u043E\u043D\u0435\u0434\u0456\u043B\u043E\u043A_\u0432\u0456\u0432\u0442\u043E\u0440\u043E\u043A_\u0441\u0435\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440_\u043F\u2019\u044F\u0442\u043D\u0438\u0446\u044F_\u0441\u0443\u0431\u043E\u0442\u0430".split("_"), weekdaysShort: "\u043D\u0434\u043B_\u043F\u043D\u0434_\u0432\u0442\u0440_\u0441\u0440\u0434_\u0447\u0442\u0432_\u043F\u0442\u043D_\u0441\u0431\u0442".split("_"), weekdaysMin: "\u043D\u0434_\u043F\u043D_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043F\u0442_\u0441\u0431".split("_"), months: i, monthsShort: "\u0441\u0456\u0447_\u043B\u044E\u0442_\u0431\u0435\u0440_\u043A\u0432\u0456\u0442_\u0442\u0440\u0430\u0432_\u0447\u0435\u0440\u0432_\u043B\u0438\u043F_\u0441\u0435\u0440\u043F_\u0432\u0435\u0440_\u0436\u043E\u0432\u0442_\u043B\u0438\u0441\u0442_\u0433\u0440\u0443\u0434".split("_"), weekStart: 1, relativeTime: {future: "\u0437\u0430 %s", past: "%s \u0442\u043E\u043C\u0443", s: "\u0434\u0435\u043A\u0456\u043B\u044C\u043A\u0430 \u0441\u0435\u043A\u0443\u043D\u0434", m: d, mm: d, h: d, hh: d, d: "\u0434\u0435\u043D\u044C", dd: d, M: "\u043C\u0456\u0441\u044F\u0446\u044C", MM: d, y: "\u0440\u0456\u043A", yy: d}, ordinal: function(_2) { + return _2; + }, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD.MM.YYYY", LL: "D MMMM YYYY \u0440.", LLL: "D MMMM YYYY \u0440., HH:mm", LLLL: "dddd, D MMMM YYYY \u0440., HH:mm"}}; + return t2.default.locale(r2, null, true), r2; + }); +}); + +// node_modules/dayjs/locale/vi.js +var require_vi = __commonJS((exports, module) => { + !function(t2, n2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = n2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], n2) : (t2 = typeof globalThis != "undefined" ? globalThis : t2 || self).dayjs_locale_vi = n2(t2.dayjs); + }(exports, function(t2) { + "use strict"; + function n2(t3) { + return t3 && typeof t3 == "object" && "default" in t3 ? t3 : {default: t3}; + } + var h = n2(t2), _ = {name: "vi", weekdays: "ch\u1EE7 nh\u1EADt_th\u1EE9 hai_th\u1EE9 ba_th\u1EE9 t\u01B0_th\u1EE9 n\u0103m_th\u1EE9 s\xE1u_th\u1EE9 b\u1EA3y".split("_"), months: "th\xE1ng 1_th\xE1ng 2_th\xE1ng 3_th\xE1ng 4_th\xE1ng 5_th\xE1ng 6_th\xE1ng 7_th\xE1ng 8_th\xE1ng 9_th\xE1ng 10_th\xE1ng 11_th\xE1ng 12".split("_"), weekStart: 1, weekdaysShort: "CN_T2_T3_T4_T5_T6_T7".split("_"), monthsShort: "Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"), weekdaysMin: "CN_T2_T3_T4_T5_T6_T7".split("_"), ordinal: function(t3) { + return t3; + }, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM [n\u0103m] YYYY", LLL: "D MMMM [n\u0103m] YYYY HH:mm", LLLL: "dddd, D MMMM [n\u0103m] YYYY HH:mm", l: "DD/M/YYYY", ll: "D MMM YYYY", lll: "D MMM YYYY HH:mm", llll: "ddd, D MMM YYYY HH:mm"}, relativeTime: {future: "%s t\u1EDBi", past: "%s tr\u01B0\u1EDBc", s: "v\xE0i gi\xE2y", m: "m\u1ED9t ph\xFAt", mm: "%d ph\xFAt", h: "m\u1ED9t gi\u1EDD", hh: "%d gi\u1EDD", d: "m\u1ED9t ng\xE0y", dd: "%d ng\xE0y", M: "m\u1ED9t th\xE1ng", MM: "%d th\xE1ng", y: "m\u1ED9t n\u0103m", yy: "%d n\u0103m"}}; + return h.default.locale(_, null, true), _; + }); +}); + +// node_modules/dayjs/locale/zh-cn.js +var require_zh_cn = __commonJS((exports, module) => { + !function(e2, _) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = _(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], _) : (e2 = typeof globalThis != "undefined" ? globalThis : e2 || self).dayjs_locale_zh_cn = _(e2.dayjs); + }(exports, function(e2) { + "use strict"; + function _(e3) { + return e3 && typeof e3 == "object" && "default" in e3 ? e3 : {default: e3}; + } + var t2 = _(e2), d = {name: "zh-cn", weekdays: "\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"), weekdaysShort: "\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"), weekdaysMin: "\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"), months: "\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"), monthsShort: "1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"), ordinal: function(e3, _2) { + return _2 === "W" ? e3 + "\u5468" : e3 + "\u65E5"; + }, weekStart: 1, yearStart: 4, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY\u5E74M\u6708D\u65E5", LLL: "YYYY\u5E74M\u6708D\u65E5Ah\u70B9mm\u5206", LLLL: "YYYY\u5E74M\u6708D\u65E5ddddAh\u70B9mm\u5206", l: "YYYY/M/D", ll: "YYYY\u5E74M\u6708D\u65E5", lll: "YYYY\u5E74M\u6708D\u65E5 HH:mm", llll: "YYYY\u5E74M\u6708D\u65E5dddd HH:mm"}, relativeTime: {future: "%s\u5185", past: "%s\u524D", s: "\u51E0\u79D2", m: "1 \u5206\u949F", mm: "%d \u5206\u949F", h: "1 \u5C0F\u65F6", hh: "%d \u5C0F\u65F6", d: "1 \u5929", dd: "%d \u5929", M: "1 \u4E2A\u6708", MM: "%d \u4E2A\u6708", y: "1 \u5E74", yy: "%d \u5E74"}, meridiem: function(e3, _2) { + var t3 = 100 * e3 + _2; + return t3 < 600 ? "\u51CC\u6668" : t3 < 900 ? "\u65E9\u4E0A" : t3 < 1100 ? "\u4E0A\u5348" : t3 < 1300 ? "\u4E2D\u5348" : t3 < 1800 ? "\u4E0B\u5348" : "\u665A\u4E0A"; + }}; + return t2.default.locale(d, null, true), d; + }); +}); + +// node_modules/dayjs/locale/zh-tw.js +var require_zh_tw = __commonJS((exports, module) => { + !function(_, e2) { + typeof exports == "object" && typeof module != "undefined" ? module.exports = e2(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], e2) : (_ = typeof globalThis != "undefined" ? globalThis : _ || self).dayjs_locale_zh_tw = e2(_.dayjs); + }(exports, function(_) { + "use strict"; + function e2(_2) { + return _2 && typeof _2 == "object" && "default" in _2 ? _2 : {default: _2}; + } + var t2 = e2(_), d = {name: "zh-tw", weekdays: "\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"), weekdaysShort: "\u9031\u65E5_\u9031\u4E00_\u9031\u4E8C_\u9031\u4E09_\u9031\u56DB_\u9031\u4E94_\u9031\u516D".split("_"), weekdaysMin: "\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"), months: "\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"), monthsShort: "1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"), ordinal: function(_2, e3) { + return e3 === "W" ? _2 + "\u9031" : _2 + "\u65E5"; + }, formats: {LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY\u5E74M\u6708D\u65E5", LLL: "YYYY\u5E74M\u6708D\u65E5 HH:mm", LLLL: "YYYY\u5E74M\u6708D\u65E5dddd HH:mm", l: "YYYY/M/D", ll: "YYYY\u5E74M\u6708D\u65E5", lll: "YYYY\u5E74M\u6708D\u65E5 HH:mm", llll: "YYYY\u5E74M\u6708D\u65E5dddd HH:mm"}, relativeTime: {future: "%s\u5167", past: "%s\u524D", s: "\u5E7E\u79D2", m: "1 \u5206\u9418", mm: "%d \u5206\u9418", h: "1 \u5C0F\u6642", hh: "%d \u5C0F\u6642", d: "1 \u5929", dd: "%d \u5929", M: "1 \u500B\u6708", MM: "%d \u500B\u6708", y: "1 \u5E74", yy: "%d \u5E74"}}; + return t2.default.locale(d, null, true), d; + }); +}); + +// node_modules/trix/dist/trix.js +var require_trix = __commonJS((exports, module) => { + (function() { + }).call(exports), function() { + var t2; + window.Set == null && (window.Set = t2 = function() { + function t3() { + this.clear(); + } + return t3.prototype.clear = function() { + return this.values = []; + }, t3.prototype.has = function(t4) { + return this.values.indexOf(t4) !== -1; + }, t3.prototype.add = function(t4) { + return this.has(t4) || this.values.push(t4), this; + }, t3.prototype["delete"] = function(t4) { + var e2; + return (e2 = this.values.indexOf(t4)) === -1 ? false : (this.values.splice(e2, 1), true); + }, t3.prototype.forEach = function() { + var t4; + return (t4 = this.values).forEach.apply(t4, arguments); + }, t3; + }()); + }.call(exports), function(t2) { + function e2() { + } + function n2(t3, e3) { + return function() { + t3.apply(e3, arguments); + }; + } + function i(t3) { + if (typeof this != "object") + throw new TypeError("Promises must be constructed via new"); + if (typeof t3 != "function") + throw new TypeError("not a function"); + this._state = 0, this._handled = false, this._value = void 0, this._deferreds = [], c2(t3, this); + } + function o2(t3, e3) { + for (; t3._state === 3; ) + t3 = t3._value; + return t3._state === 0 ? void t3._deferreds.push(e3) : (t3._handled = true, void h(function() { + var n3 = t3._state === 1 ? e3.onFulfilled : e3.onRejected; + if (n3 === null) + return void (t3._state === 1 ? r2 : s2)(e3.promise, t3._value); + var i2; + try { + i2 = n3(t3._value); + } catch (o3) { + return void s2(e3.promise, o3); + } + r2(e3.promise, i2); + })); + } + function r2(t3, e3) { + try { + if (e3 === t3) + throw new TypeError("A promise cannot be resolved with itself."); + if (e3 && (typeof e3 == "object" || typeof e3 == "function")) { + var o3 = e3.then; + if (e3 instanceof i) + return t3._state = 3, t3._value = e3, void a2(t3); + if (typeof o3 == "function") + return void c2(n2(o3, e3), t3); + } + t3._state = 1, t3._value = e3, a2(t3); + } catch (r3) { + s2(t3, r3); + } + } + function s2(t3, e3) { + t3._state = 2, t3._value = e3, a2(t3); + } + function a2(t3) { + t3._state === 2 && t3._deferreds.length === 0 && setTimeout(function() { + t3._handled || p2(t3._value); + }, 1); + for (var e3 = 0, n3 = t3._deferreds.length; n3 > e3; e3++) + o2(t3, t3._deferreds[e3]); + t3._deferreds = null; + } + function u(t3, e3, n3) { + this.onFulfilled = typeof t3 == "function" ? t3 : null, this.onRejected = typeof e3 == "function" ? e3 : null, this.promise = n3; + } + function c2(t3, e3) { + var n3 = false; + try { + t3(function(t4) { + n3 || (n3 = true, r2(e3, t4)); + }, function(t4) { + n3 || (n3 = true, s2(e3, t4)); + }); + } catch (i2) { + if (n3) + return; + n3 = true, s2(e3, i2); + } + } + var l = setTimeout, h = typeof setImmediate == "function" && setImmediate || function(t3) { + l(t3, 1); + }, p2 = function(t3) { + typeof console != "undefined" && console && console.warn("Possible Unhandled Promise Rejection:", t3); + }; + i.prototype["catch"] = function(t3) { + return this.then(null, t3); + }, i.prototype.then = function(t3, n3) { + var r3 = new i(e2); + return o2(this, new u(t3, n3, r3)), r3; + }, i.all = function(t3) { + var e3 = Array.prototype.slice.call(t3); + return new i(function(t4, n3) { + function i2(r4, s3) { + try { + if (s3 && (typeof s3 == "object" || typeof s3 == "function")) { + var a3 = s3.then; + if (typeof a3 == "function") + return void a3.call(s3, function(t5) { + i2(r4, t5); + }, n3); + } + e3[r4] = s3, --o3 === 0 && t4(e3); + } catch (u2) { + n3(u2); + } + } + if (e3.length === 0) + return t4([]); + for (var o3 = e3.length, r3 = 0; r3 < e3.length; r3++) + i2(r3, e3[r3]); + }); + }, i.resolve = function(t3) { + return t3 && typeof t3 == "object" && t3.constructor === i ? t3 : new i(function(e3) { + e3(t3); + }); + }, i.reject = function(t3) { + return new i(function(e3, n3) { + n3(t3); + }); + }, i.race = function(t3) { + return new i(function(e3, n3) { + for (var i2 = 0, o3 = t3.length; o3 > i2; i2++) + t3[i2].then(e3, n3); + }); + }, i._setImmediateFn = function(t3) { + h = t3; + }, i._setUnhandledRejectionFn = function(t3) { + p2 = t3; + }, typeof module != "undefined" && module.exports ? module.exports = i : t2.Promise || (t2.Promise = i); + }(exports), function() { + var t2 = typeof window.customElements == "object", e2 = typeof document.registerElement == "function", n2 = t2 || e2; + n2 || (typeof WeakMap == "undefined" && !function() { + var t3 = Object.defineProperty, e3 = Date.now() % 1e9, n3 = function() { + this.name = "__st" + (1e9 * Math.random() >>> 0) + (e3++ + "__"); + }; + n3.prototype = {set: function(e4, n4) { + var i = e4[this.name]; + return i && i[0] === e4 ? i[1] = n4 : t3(e4, this.name, {value: [e4, n4], writable: true}), this; + }, get: function(t4) { + var e4; + return (e4 = t4[this.name]) && e4[0] === t4 ? e4[1] : void 0; + }, delete: function(t4) { + var e4 = t4[this.name]; + return e4 && e4[0] === t4 ? (e4[0] = e4[1] = void 0, true) : false; + }, has: function(t4) { + var e4 = t4[this.name]; + return e4 ? e4[0] === t4 : false; + }}, window.WeakMap = n3; + }(), function(t3) { + function e3(t4) { + A.push(t4), b || (b = true, g(i)); + } + function n3(t4) { + return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(t4) || t4; + } + function i() { + b = false; + var t4 = A; + A = [], t4.sort(function(t5, e5) { + return t5.uid_ - e5.uid_; + }); + var e4 = false; + t4.forEach(function(t5) { + var n4 = t5.takeRecords(); + o2(t5), n4.length && (t5.callback_(n4, t5), e4 = true); + }), e4 && i(); + } + function o2(t4) { + t4.nodes_.forEach(function(e4) { + var n4 = m.get(e4); + n4 && n4.forEach(function(e5) { + e5.observer === t4 && e5.removeTransientObservers(); + }); + }); + } + function r2(t4, e4) { + for (var n4 = t4; n4; n4 = n4.parentNode) { + var i2 = m.get(n4); + if (i2) + for (var o3 = 0; o3 < i2.length; o3++) { + var r3 = i2[o3], s3 = r3.options; + if (n4 === t4 || s3.subtree) { + var a3 = e4(s3); + a3 && r3.enqueue(a3); + } + } + } + } + function s2(t4) { + this.callback_ = t4, this.nodes_ = [], this.records_ = [], this.uid_ = ++C3; + } + function a2(t4, e4) { + this.type = t4, this.target = e4, this.addedNodes = [], this.removedNodes = [], this.previousSibling = null, this.nextSibling = null, this.attributeName = null, this.attributeNamespace = null, this.oldValue = null; + } + function u(t4) { + var e4 = new a2(t4.type, t4.target); + return e4.addedNodes = t4.addedNodes.slice(), e4.removedNodes = t4.removedNodes.slice(), e4.previousSibling = t4.previousSibling, e4.nextSibling = t4.nextSibling, e4.attributeName = t4.attributeName, e4.attributeNamespace = t4.attributeNamespace, e4.oldValue = t4.oldValue, e4; + } + function c2(t4, e4) { + return x = new a2(t4, e4); + } + function l(t4) { + return w ? w : (w = u(x), w.oldValue = t4, w); + } + function h() { + x = w = void 0; + } + function p2(t4) { + return t4 === w || t4 === x; + } + function d(t4, e4) { + return t4 === e4 ? t4 : w && p2(t4) ? w : null; + } + function f(t4, e4, n4) { + this.observer = t4, this.target = e4, this.options = n4, this.transientObservedNodes = []; + } + if (!t3.JsMutationObserver) { + var g, m = new WeakMap(); + if (/Trident|Edge/.test(navigator.userAgent)) + g = setTimeout; + else if (window.setImmediate) + g = window.setImmediate; + else { + var v = [], y = String(Math.random()); + window.addEventListener("message", function(t4) { + if (t4.data === y) { + var e4 = v; + v = [], e4.forEach(function(t5) { + t5(); + }); + } + }), g = function(t4) { + v.push(t4), window.postMessage(y, "*"); + }; + } + var b = false, A = [], C3 = 0; + s2.prototype = {observe: function(t4, e4) { + if (t4 = n3(t4), !e4.childList && !e4.attributes && !e4.characterData || e4.attributeOldValue && !e4.attributes || e4.attributeFilter && e4.attributeFilter.length && !e4.attributes || e4.characterDataOldValue && !e4.characterData) + throw new SyntaxError(); + var i2 = m.get(t4); + i2 || m.set(t4, i2 = []); + for (var o3, r3 = 0; r3 < i2.length; r3++) + if (i2[r3].observer === this) { + o3 = i2[r3], o3.removeListeners(), o3.options = e4; + break; + } + o3 || (o3 = new f(this, t4, e4), i2.push(o3), this.nodes_.push(t4)), o3.addListeners(); + }, disconnect: function() { + this.nodes_.forEach(function(t4) { + for (var e4 = m.get(t4), n4 = 0; n4 < e4.length; n4++) { + var i2 = e4[n4]; + if (i2.observer === this) { + i2.removeListeners(), e4.splice(n4, 1); + break; + } + } + }, this), this.records_ = []; + }, takeRecords: function() { + var t4 = this.records_; + return this.records_ = [], t4; + }}; + var x, w; + f.prototype = {enqueue: function(t4) { + var n4 = this.observer.records_, i2 = n4.length; + if (n4.length > 0) { + var o3 = n4[i2 - 1], r3 = d(o3, t4); + if (r3) + return void (n4[i2 - 1] = r3); + } else + e3(this.observer); + n4[i2] = t4; + }, addListeners: function() { + this.addListeners_(this.target); + }, addListeners_: function(t4) { + var e4 = this.options; + e4.attributes && t4.addEventListener("DOMAttrModified", this, true), e4.characterData && t4.addEventListener("DOMCharacterDataModified", this, true), e4.childList && t4.addEventListener("DOMNodeInserted", this, true), (e4.childList || e4.subtree) && t4.addEventListener("DOMNodeRemoved", this, true); + }, removeListeners: function() { + this.removeListeners_(this.target); + }, removeListeners_: function(t4) { + var e4 = this.options; + e4.attributes && t4.removeEventListener("DOMAttrModified", this, true), e4.characterData && t4.removeEventListener("DOMCharacterDataModified", this, true), e4.childList && t4.removeEventListener("DOMNodeInserted", this, true), (e4.childList || e4.subtree) && t4.removeEventListener("DOMNodeRemoved", this, true); + }, addTransientObserver: function(t4) { + if (t4 !== this.target) { + this.addListeners_(t4), this.transientObservedNodes.push(t4); + var e4 = m.get(t4); + e4 || m.set(t4, e4 = []), e4.push(this); + } + }, removeTransientObservers: function() { + var t4 = this.transientObservedNodes; + this.transientObservedNodes = [], t4.forEach(function(t5) { + this.removeListeners_(t5); + for (var e4 = m.get(t5), n4 = 0; n4 < e4.length; n4++) + if (e4[n4] === this) { + e4.splice(n4, 1); + break; + } + }, this); + }, handleEvent: function(t4) { + switch (t4.stopImmediatePropagation(), t4.type) { + case "DOMAttrModified": + var e4 = t4.attrName, n4 = t4.relatedNode.namespaceURI, i2 = t4.target, o3 = new c2("attributes", i2); + o3.attributeName = e4, o3.attributeNamespace = n4; + var s3 = t4.attrChange === MutationEvent.ADDITION ? null : t4.prevValue; + r2(i2, function(t5) { + return !t5.attributes || t5.attributeFilter && t5.attributeFilter.length && t5.attributeFilter.indexOf(e4) === -1 && t5.attributeFilter.indexOf(n4) === -1 ? void 0 : t5.attributeOldValue ? l(s3) : o3; + }); + break; + case "DOMCharacterDataModified": + var i2 = t4.target, o3 = c2("characterData", i2), s3 = t4.prevValue; + r2(i2, function(t5) { + return t5.characterData ? t5.characterDataOldValue ? l(s3) : o3 : void 0; + }); + break; + case "DOMNodeRemoved": + this.addTransientObserver(t4.target); + case "DOMNodeInserted": + var a3, u2, p3 = t4.target; + t4.type === "DOMNodeInserted" ? (a3 = [p3], u2 = []) : (a3 = [], u2 = [p3]); + var d2 = p3.previousSibling, f2 = p3.nextSibling, o3 = c2("childList", t4.target.parentNode); + o3.addedNodes = a3, o3.removedNodes = u2, o3.previousSibling = d2, o3.nextSibling = f2, r2(t4.relatedNode, function(t5) { + return t5.childList ? o3 : void 0; + }); + } + h(); + }}, t3.JsMutationObserver = s2, t3.MutationObserver || (t3.MutationObserver = s2, s2._isPolyfilled = true); + } + }(self), function() { + "use strict"; + if (!window.performance || !window.performance.now) { + var t3 = Date.now(); + window.performance = {now: function() { + return Date.now() - t3; + }}; + } + window.requestAnimationFrame || (window.requestAnimationFrame = function() { + var t4 = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame; + return t4 ? function(e4) { + return t4(function() { + e4(performance.now()); + }); + } : function(t5) { + return window.setTimeout(t5, 1e3 / 60); + }; + }()), window.cancelAnimationFrame || (window.cancelAnimationFrame = function() { + return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(t4) { + clearTimeout(t4); + }; + }()); + var e3 = function() { + var t4 = document.createEvent("Event"); + return t4.initEvent("foo", true, true), t4.preventDefault(), t4.defaultPrevented; + }(); + if (!e3) { + var n3 = Event.prototype.preventDefault; + Event.prototype.preventDefault = function() { + this.cancelable && (n3.call(this), Object.defineProperty(this, "defaultPrevented", {get: function() { + return true; + }, configurable: true})); + }; + } + var i = /Trident/.test(navigator.userAgent); + if ((!window.CustomEvent || i && typeof window.CustomEvent != "function") && (window.CustomEvent = function(t4, e4) { + e4 = e4 || {}; + var n4 = document.createEvent("CustomEvent"); + return n4.initCustomEvent(t4, Boolean(e4.bubbles), Boolean(e4.cancelable), e4.detail), n4; + }, window.CustomEvent.prototype = window.Event.prototype), !window.Event || i && typeof window.Event != "function") { + var o2 = window.Event; + window.Event = function(t4, e4) { + e4 = e4 || {}; + var n4 = document.createEvent("Event"); + return n4.initEvent(t4, Boolean(e4.bubbles), Boolean(e4.cancelable)), n4; + }, window.Event.prototype = o2.prototype; + } + }(window.WebComponents), window.CustomElements = window.CustomElements || {flags: {}}, function(t3) { + var e3 = t3.flags, n3 = [], i = function(t4) { + n3.push(t4); + }, o2 = function() { + n3.forEach(function(e4) { + e4(t3); + }); + }; + t3.addModule = i, t3.initializeModules = o2, t3.hasNative = Boolean(document.registerElement), t3.isIE = /Trident/.test(navigator.userAgent), t3.useNative = !e3.register && t3.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative); + }(window.CustomElements), window.CustomElements.addModule(function(t3) { + function e3(t4, e4) { + n3(t4, function(t5) { + return e4(t5) ? true : void i(t5, e4); + }), i(t4, e4); + } + function n3(t4, e4, i2) { + var o3 = t4.firstElementChild; + if (!o3) + for (o3 = t4.firstChild; o3 && o3.nodeType !== Node.ELEMENT_NODE; ) + o3 = o3.nextSibling; + for (; o3; ) + e4(o3, i2) !== true && n3(o3, e4, i2), o3 = o3.nextElementSibling; + return null; + } + function i(t4, n4) { + for (var i2 = t4.shadowRoot; i2; ) + e3(i2, n4), i2 = i2.olderShadowRoot; + } + function o2(t4, e4) { + r2(t4, e4, []); + } + function r2(t4, e4, n4) { + if (t4 = window.wrap(t4), !(n4.indexOf(t4) >= 0)) { + n4.push(t4); + for (var i2, o3 = t4.querySelectorAll("link[rel=" + s2 + "]"), a2 = 0, u = o3.length; u > a2 && (i2 = o3[a2]); a2++) + i2.import && r2(i2.import, e4, n4); + e4(t4); + } + } + var s2 = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none"; + t3.forDocumentTree = o2, t3.forSubtree = e3; + }), window.CustomElements.addModule(function(t3) { + function e3(t4, e4) { + return n3(t4, e4) || i(t4, e4); + } + function n3(e4, n4) { + return t3.upgrade(e4, n4) ? true : void (n4 && s2(e4)); + } + function i(t4, e4) { + b(t4, function(t5) { + return n3(t5, e4) ? true : void 0; + }); + } + function o2(t4) { + w.push(t4), x || (x = true, setTimeout(r2)); + } + function r2() { + x = false; + for (var t4, e4 = w, n4 = 0, i2 = e4.length; i2 > n4 && (t4 = e4[n4]); n4++) + t4(); + w = []; + } + function s2(t4) { + C3 ? o2(function() { + a2(t4); + }) : a2(t4); + } + function a2(t4) { + t4.__upgraded__ && !t4.__attached && (t4.__attached = true, t4.attachedCallback && t4.attachedCallback()); + } + function u(t4) { + c2(t4), b(t4, function(t5) { + c2(t5); + }); + } + function c2(t4) { + C3 ? o2(function() { + l(t4); + }) : l(t4); + } + function l(t4) { + t4.__upgraded__ && t4.__attached && (t4.__attached = false, t4.detachedCallback && t4.detachedCallback()); + } + function h(t4) { + for (var e4 = t4, n4 = window.wrap(document); e4; ) { + if (e4 == n4) + return true; + e4 = e4.parentNode || e4.nodeType === Node.DOCUMENT_FRAGMENT_NODE && e4.host; + } + } + function p2(t4) { + if (t4.shadowRoot && !t4.shadowRoot.__watched) { + y.dom && console.log("watching shadow-root for: ", t4.localName); + for (var e4 = t4.shadowRoot; e4; ) + g(e4), e4 = e4.olderShadowRoot; + } + } + function d(t4, n4) { + if (y.dom) { + var i2 = n4[0]; + if (i2 && i2.type === "childList" && i2.addedNodes && i2.addedNodes) { + for (var o3 = i2.addedNodes[0]; o3 && o3 !== document && !o3.host; ) + o3 = o3.parentNode; + var r3 = o3 && (o3.URL || o3._URL || o3.host && o3.host.localName) || ""; + r3 = r3.split("/?").shift().split("/").pop(); + } + console.group("mutations (%d) [%s]", n4.length, r3 || ""); + } + var s3 = h(t4); + n4.forEach(function(t5) { + t5.type === "childList" && (E(t5.addedNodes, function(t6) { + t6.localName && e3(t6, s3); + }), E(t5.removedNodes, function(t6) { + t6.localName && u(t6); + })); + }), y.dom && console.groupEnd(); + } + function f(t4) { + for (t4 = window.wrap(t4), t4 || (t4 = window.wrap(document)); t4.parentNode; ) + t4 = t4.parentNode; + var e4 = t4.__observer; + e4 && (d(t4, e4.takeRecords()), r2()); + } + function g(t4) { + if (!t4.__observer) { + var e4 = new MutationObserver(d.bind(this, t4)); + e4.observe(t4, {childList: true, subtree: true}), t4.__observer = e4; + } + } + function m(t4) { + t4 = window.wrap(t4), y.dom && console.group("upgradeDocument: ", t4.baseURI.split("/").pop()); + var n4 = t4 === window.wrap(document); + e3(t4, n4), g(t4), y.dom && console.groupEnd(); + } + function v(t4) { + A(t4, m); + } + var y = t3.flags, b = t3.forSubtree, A = t3.forDocumentTree, C3 = window.MutationObserver._isPolyfilled && y["throttle-attached"]; + t3.hasPolyfillMutations = C3, t3.hasThrottledAttached = C3; + var x = false, w = [], E = Array.prototype.forEach.call.bind(Array.prototype.forEach), S2 = Element.prototype.createShadowRoot; + S2 && (Element.prototype.createShadowRoot = function() { + var t4 = S2.call(this); + return window.CustomElements.watchShadow(this), t4; + }), t3.watchShadow = p2, t3.upgradeDocumentTree = v, t3.upgradeDocument = m, t3.upgradeSubtree = i, t3.upgradeAll = e3, t3.attached = s2, t3.takeRecords = f; + }), window.CustomElements.addModule(function(t3) { + function e3(e4, i2) { + if (e4.localName === "template" && window.HTMLTemplateElement && HTMLTemplateElement.decorate && HTMLTemplateElement.decorate(e4), !e4.__upgraded__ && e4.nodeType === Node.ELEMENT_NODE) { + var o3 = e4.getAttribute("is"), r3 = t3.getRegisteredDefinition(e4.localName) || t3.getRegisteredDefinition(o3); + if (r3 && (o3 && r3.tag == e4.localName || !o3 && !r3.extends)) + return n3(e4, r3, i2); + } + } + function n3(e4, n4, o3) { + return s2.upgrade && console.group("upgrade:", e4.localName), n4.is && e4.setAttribute("is", n4.is), i(e4, n4), e4.__upgraded__ = true, r2(e4), o3 && t3.attached(e4), t3.upgradeSubtree(e4, o3), s2.upgrade && console.groupEnd(), e4; + } + function i(t4, e4) { + Object.__proto__ ? t4.__proto__ = e4.prototype : (o2(t4, e4.prototype, e4.native), t4.__proto__ = e4.prototype); + } + function o2(t4, e4, n4) { + for (var i2 = {}, o3 = e4; o3 !== n4 && o3 !== HTMLElement.prototype; ) { + for (var r3, s3 = Object.getOwnPropertyNames(o3), a2 = 0; r3 = s3[a2]; a2++) + i2[r3] || (Object.defineProperty(t4, r3, Object.getOwnPropertyDescriptor(o3, r3)), i2[r3] = 1); + o3 = Object.getPrototypeOf(o3); + } + } + function r2(t4) { + t4.createdCallback && t4.createdCallback(); + } + var s2 = t3.flags; + t3.upgrade = e3, t3.upgradeWithDefinition = n3, t3.implementPrototype = i; + }), window.CustomElements.addModule(function(t3) { + function e3(e4, i2) { + var u2 = i2 || {}; + if (!e4) + throw new Error("document.registerElement: first argument `name` must not be empty"); + if (e4.indexOf("-") < 0) + throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(e4) + "'."); + if (o2(e4)) + throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(e4) + "'. The type name is invalid."); + if (c2(e4)) + throw new Error("DuplicateDefinitionError: a type with name '" + String(e4) + "' is already registered"); + return u2.prototype || (u2.prototype = Object.create(HTMLElement.prototype)), u2.__name = e4.toLowerCase(), u2.extends && (u2.extends = u2.extends.toLowerCase()), u2.lifecycle = u2.lifecycle || {}, u2.ancestry = r2(u2.extends), s2(u2), a2(u2), n3(u2.prototype), l(u2.__name, u2), u2.ctor = h(u2), u2.ctor.prototype = u2.prototype, u2.prototype.constructor = u2.ctor, t3.ready && m(document), u2.ctor; + } + function n3(t4) { + if (!t4.setAttribute._polyfilled) { + var e4 = t4.setAttribute; + t4.setAttribute = function(t5, n5) { + i.call(this, t5, n5, e4); + }; + var n4 = t4.removeAttribute; + t4.removeAttribute = function(t5) { + i.call(this, t5, null, n4); + }, t4.setAttribute._polyfilled = true; + } + } + function i(t4, e4, n4) { + t4 = t4.toLowerCase(); + var i2 = this.getAttribute(t4); + n4.apply(this, arguments); + var o3 = this.getAttribute(t4); + this.attributeChangedCallback && o3 !== i2 && this.attributeChangedCallback(t4, i2, o3); + } + function o2(t4) { + for (var e4 = 0; e4 < C3.length; e4++) + if (t4 === C3[e4]) + return true; + } + function r2(t4) { + var e4 = c2(t4); + return e4 ? r2(e4.extends).concat([e4]) : []; + } + function s2(t4) { + for (var e4, n4 = t4.extends, i2 = 0; e4 = t4.ancestry[i2]; i2++) + n4 = e4.is && e4.tag; + t4.tag = n4 || t4.__name, n4 && (t4.is = t4.__name); + } + function a2(t4) { + if (!Object.__proto__) { + var e4 = HTMLElement.prototype; + if (t4.is) { + var n4 = document.createElement(t4.tag); + e4 = Object.getPrototypeOf(n4); + } + for (var i2, o3 = t4.prototype, r3 = false; o3; ) + o3 == e4 && (r3 = true), i2 = Object.getPrototypeOf(o3), i2 && (o3.__proto__ = i2), o3 = i2; + r3 || console.warn(t4.tag + " prototype not found in prototype chain for " + t4.is), t4.native = e4; + } + } + function u(t4) { + return y(E(t4.tag), t4); + } + function c2(t4) { + return t4 ? x[t4.toLowerCase()] : void 0; + } + function l(t4, e4) { + x[t4] = e4; + } + function h(t4) { + return function() { + return u(t4); + }; + } + function p2(t4, e4, n4) { + return t4 === w ? d(e4, n4) : S2(t4, e4); + } + function d(t4, e4) { + t4 && (t4 = t4.toLowerCase()), e4 && (e4 = e4.toLowerCase()); + var n4 = c2(e4 || t4); + if (n4) { + if (t4 == n4.tag && e4 == n4.is) + return new n4.ctor(); + if (!e4 && !n4.is) + return new n4.ctor(); + } + var i2; + return e4 ? (i2 = d(t4), i2.setAttribute("is", e4), i2) : (i2 = E(t4), t4.indexOf("-") >= 0 && b(i2, HTMLElement), i2); + } + function f(t4, e4) { + var n4 = t4[e4]; + t4[e4] = function() { + var t5 = n4.apply(this, arguments); + return v(t5), t5; + }; + } + var g, m = (t3.isIE, t3.upgradeDocumentTree), v = t3.upgradeAll, y = t3.upgradeWithDefinition, b = t3.implementPrototype, A = t3.useNative, C3 = ["annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph"], x = {}, w = "http://www.w3.org/1999/xhtml", E = document.createElement.bind(document), S2 = document.createElementNS.bind(document); + g = Object.__proto__ || A ? function(t4, e4) { + return t4 instanceof e4; + } : function(t4, e4) { + if (t4 instanceof e4) + return true; + for (var n4 = t4; n4; ) { + if (n4 === e4.prototype) + return true; + n4 = n4.__proto__; + } + return false; + }, f(Node.prototype, "cloneNode"), f(document, "importNode"), document.registerElement = e3, document.createElement = d, document.createElementNS = p2, t3.registry = x, t3.instanceof = g, t3.reservedTagList = C3, t3.getRegisteredDefinition = c2, document.register = document.registerElement; + }), function(t3) { + function e3() { + r2(window.wrap(document)), window.CustomElements.ready = true; + var t4 = window.requestAnimationFrame || function(t5) { + setTimeout(t5, 16); + }; + t4(function() { + setTimeout(function() { + window.CustomElements.readyTime = Date.now(), window.HTMLImports && (window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime), document.dispatchEvent(new CustomEvent("WebComponentsReady", {bubbles: true})); + }); + }); + } + var n3 = t3.useNative, i = t3.initializeModules; + if (t3.isIE, n3) { + var o2 = function() { + }; + t3.watchShadow = o2, t3.upgrade = o2, t3.upgradeAll = o2, t3.upgradeDocumentTree = o2, t3.upgradeSubtree = o2, t3.takeRecords = o2, t3.instanceof = function(t4, e4) { + return t4 instanceof e4; + }; + } else + i(); + var r2 = t3.upgradeDocumentTree, s2 = t3.upgradeDocument; + if (window.wrap || (window.ShadowDOMPolyfill ? (window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded, window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded) : window.wrap = window.unwrap = function(t4) { + return t4; + }), window.HTMLImports && (window.HTMLImports.__importsParsingHook = function(t4) { + t4.import && s2(wrap(t4.import)); + }), document.readyState === "complete" || t3.flags.eager) + e3(); + else if (document.readyState !== "interactive" || window.attachEvent || window.HTMLImports && !window.HTMLImports.ready) { + var a2 = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded"; + window.addEventListener(a2, e3); + } else + e3(); + }(window.CustomElements)); + }.call(exports), function() { + }.call(exports), function() { + var t2 = this; + (function() { + (function() { + this.Trix = {VERSION: "1.3.1", ZERO_WIDTH_SPACE: "\uFEFF", NON_BREAKING_SPACE: "\xA0", OBJECT_REPLACEMENT_CHARACTER: "\uFFFC", browser: {composesExistingText: /Android.*Chrome/.test(navigator.userAgent), forcesObjectResizing: /Trident.*rv:11/.test(navigator.userAgent), supportsInputEvents: function() { + var t3, e3, n2, i; + if (typeof InputEvent == "undefined") + return false; + for (i = ["data", "getTargetRanges", "inputType"], t3 = 0, e3 = i.length; e3 > t3; t3++) + if (n2 = i[t3], !(n2 in InputEvent.prototype)) + return false; + return true; + }()}, config: {}}; + }).call(this); + }).call(t2); + var e2 = t2.Trix; + (function() { + (function() { + e2.BasicObject = function() { + function t3() { + } + var e3, n2, i; + return t3.proxyMethod = function(t4) { + var i2, o2, r2, s2, a2; + return r2 = n2(t4), i2 = r2.name, s2 = r2.toMethod, a2 = r2.toProperty, o2 = r2.optional, this.prototype[i2] = function() { + var t5, n3; + return t5 = s2 != null ? o2 ? typeof this[s2] == "function" ? this[s2]() : void 0 : this[s2]() : a2 != null ? this[a2] : void 0, o2 ? (n3 = t5 != null ? t5[i2] : void 0, n3 != null ? e3.call(n3, t5, arguments) : void 0) : (n3 = t5[i2], e3.call(n3, t5, arguments)); + }; + }, n2 = function(t4) { + var e4, n3; + if (!(n3 = t4.match(i))) + throw new Error("can't parse @proxyMethod expression: " + t4); + return e4 = {name: n3[4]}, n3[2] != null ? e4.toMethod = n3[1] : e4.toProperty = n3[1], n3[3] != null && (e4.optional = true), e4; + }, e3 = Function.prototype.apply, i = /^(.+?)(\(\))?(\?)?\.(.+?)$/, t3; + }(); + }).call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.Object = function(n3) { + function i() { + this.id = ++o2; + } + var o2; + return t3(i, n3), o2 = 0, i.fromJSONString = function(t4) { + return this.fromJSON(JSON.parse(t4)); + }, i.prototype.hasSameConstructorAs = function(t4) { + return this.constructor === (t4 != null ? t4.constructor : void 0); + }, i.prototype.isEqualTo = function(t4) { + return this === t4; + }, i.prototype.inspect = function() { + var t4, e3, n4; + return t4 = function() { + var t5, i2, o3; + i2 = (t5 = this.contentsForInspection()) != null ? t5 : {}, o3 = []; + for (e3 in i2) + n4 = i2[e3], o3.push(e3 + "=" + n4); + return o3; + }.call(this), "#<" + this.constructor.name + ":" + this.id + (t4.length ? " " + t4.join(", ") : "") + ">"; + }, i.prototype.contentsForInspection = function() { + }, i.prototype.toJSONString = function() { + return JSON.stringify(this); + }, i.prototype.toUTF16String = function() { + return e2.UTF16String.box(this); + }, i.prototype.getCacheKey = function() { + return this.id.toString(); + }, i; + }(e2.BasicObject); + }.call(this), function() { + e2.extend = function(t3) { + var e3, n2; + for (e3 in t3) + n2 = t3[e3], this[e3] = n2; + return this; + }; + }.call(this), function() { + e2.extend({defer: function(t3) { + return setTimeout(t3, 1); + }}); + }.call(this), function() { + var t3, n2; + e2.extend({normalizeSpaces: function(t4) { + return t4.replace(RegExp("" + e2.ZERO_WIDTH_SPACE, "g"), "").replace(RegExp("" + e2.NON_BREAKING_SPACE, "g"), " "); + }, normalizeNewlines: function(t4) { + return t4.replace(/\r\n/g, "\n"); + }, breakableWhitespacePattern: RegExp("[^\\S" + e2.NON_BREAKING_SPACE + "]"), squishBreakableWhitespace: function(t4) { + return t4.replace(RegExp("" + e2.breakableWhitespacePattern.source, "g"), " ").replace(/\ {2,}/g, " "); + }, summarizeStringChange: function(t4, i) { + var o2, r2, s2, a2; + return t4 = e2.UTF16String.box(t4), i = e2.UTF16String.box(i), i.length < t4.length ? (r2 = n2(t4, i), a2 = r2[0], o2 = r2[1]) : (s2 = n2(i, t4), o2 = s2[0], a2 = s2[1]), {added: o2, removed: a2}; + }}), n2 = function(n3, i) { + var o2, r2, s2, a2, u; + return n3.isEqualTo(i) ? ["", ""] : (r2 = t3(n3, i), a2 = r2.utf16String.length, s2 = a2 ? (u = r2.offset, r2, o2 = n3.codepoints.slice(0, u).concat(n3.codepoints.slice(u + a2)), t3(i, e2.UTF16String.fromCodepoints(o2))) : t3(i, n3), [r2.utf16String.toString(), s2.utf16String.toString()]); + }, t3 = function(t4, e3) { + var n3, i, o2; + for (n3 = 0, i = t4.length, o2 = e3.length; i > n3 && t4.charAt(n3).isEqualTo(e3.charAt(n3)); ) + n3++; + for (; i > n3 + 1 && t4.charAt(i - 1).isEqualTo(e3.charAt(o2 - 1)); ) + i--, o2--; + return {utf16String: t4.slice(n3, i), offset: n3}; + }; + }.call(this), function() { + e2.extend({copyObject: function(t3) { + var e3, n2, i; + t3 == null && (t3 = {}), n2 = {}; + for (e3 in t3) + i = t3[e3], n2[e3] = i; + return n2; + }, objectsAreEqual: function(t3, e3) { + var n2, i; + if (t3 == null && (t3 = {}), e3 == null && (e3 = {}), Object.keys(t3).length !== Object.keys(e3).length) + return false; + for (n2 in t3) + if (i = t3[n2], i !== e3[n2]) + return false; + return true; + }}); + }.call(this), function() { + var t3 = [].slice; + e2.extend({arraysAreEqual: function(t4, e3) { + var n2, i, o2, r2; + if (t4 == null && (t4 = []), e3 == null && (e3 = []), t4.length !== e3.length) + return false; + for (i = n2 = 0, o2 = t4.length; o2 > n2; i = ++n2) + if (r2 = t4[i], r2 !== e3[i]) + return false; + return true; + }, arrayStartsWith: function(t4, n2) { + return t4 == null && (t4 = []), n2 == null && (n2 = []), e2.arraysAreEqual(t4.slice(0, n2.length), n2); + }, spliceArray: function() { + var e3, n2, i; + return n2 = arguments[0], e3 = 2 <= arguments.length ? t3.call(arguments, 1) : [], i = n2.slice(0), i.splice.apply(i, e3), i; + }, summarizeArrayChange: function(t4, e3) { + var n2, i, o2, r2, s2, a2, u, c2, l, h, p2; + for (t4 == null && (t4 = []), e3 == null && (e3 = []), n2 = [], h = [], o2 = new Set(), r2 = 0, u = t4.length; u > r2; r2++) + p2 = t4[r2], o2.add(p2); + for (i = new Set(), s2 = 0, c2 = e3.length; c2 > s2; s2++) + p2 = e3[s2], i.add(p2), o2.has(p2) || n2.push(p2); + for (a2 = 0, l = t4.length; l > a2; a2++) + p2 = t4[a2], i.has(p2) || h.push(p2); + return {added: n2, removed: h}; + }}); + }.call(this), function() { + var t3, n2, i, o2; + t3 = null, n2 = null, o2 = null, i = null, e2.extend({getAllAttributeNames: function() { + return t3 != null ? t3 : t3 = e2.getTextAttributeNames().concat(e2.getBlockAttributeNames()); + }, getBlockConfig: function(t4) { + return e2.config.blockAttributes[t4]; + }, getBlockAttributeNames: function() { + return n2 != null ? n2 : n2 = Object.keys(e2.config.blockAttributes); + }, getTextConfig: function(t4) { + return e2.config.textAttributes[t4]; + }, getTextAttributeNames: function() { + return o2 != null ? o2 : o2 = Object.keys(e2.config.textAttributes); + }, getListAttributeNames: function() { + var t4, n3; + return i != null ? i : i = function() { + var i2, o3; + i2 = e2.config.blockAttributes, o3 = []; + for (t4 in i2) + n3 = i2[t4].listAttribute, n3 != null && o3.push(n3); + return o3; + }(); + }}); + }.call(this), function() { + var t3, n2, i, o2, r2, s2 = [].indexOf || function(t4) { + for (var e3 = 0, n3 = this.length; n3 > e3; e3++) + if (e3 in this && this[e3] === t4) + return e3; + return -1; + }; + t3 = document.documentElement, n2 = (i = (o2 = (r2 = t3.matchesSelector) != null ? r2 : t3.webkitMatchesSelector) != null ? o2 : t3.msMatchesSelector) != null ? i : t3.mozMatchesSelector, e2.extend({handleEvent: function(n3, i2) { + var o3, r3, s3, a2, u, c2, l, h, p2, d, f, g; + return h = i2 != null ? i2 : {}, c2 = h.onElement, u = h.matchingSelector, g = h.withCallback, a2 = h.inPhase, l = h.preventDefault, d = h.times, r3 = c2 != null ? c2 : t3, p2 = u, o3 = g, f = a2 === "capturing", s3 = function(t4) { + var n4; + return d != null && --d === 0 && s3.destroy(), n4 = e2.findClosestElementFromNode(t4.target, {matchingSelector: p2}), n4 != null && (g != null && g.call(n4, t4, n4), l) ? t4.preventDefault() : void 0; + }, s3.destroy = function() { + return r3.removeEventListener(n3, s3, f); + }, r3.addEventListener(n3, s3, f), s3; + }, handleEventOnce: function(t4, n3) { + return n3 == null && (n3 = {}), n3.times = 1, e2.handleEvent(t4, n3); + }, triggerEvent: function(n3, i2) { + var o3, r3, s3, a2, u, c2, l; + return l = i2 != null ? i2 : {}, c2 = l.onElement, r3 = l.bubbles, s3 = l.cancelable, o3 = l.attributes, a2 = c2 != null ? c2 : t3, r3 = r3 !== false, s3 = s3 !== false, u = document.createEvent("Events"), u.initEvent(n3, r3, s3), o3 != null && e2.extend.call(u, o3), a2.dispatchEvent(u); + }, elementMatchesSelector: function(t4, e3) { + return (t4 != null ? t4.nodeType : void 0) === 1 ? n2.call(t4, e3) : void 0; + }, findClosestElementFromNode: function(t4, n3) { + var i2, o3, r3; + for (o3 = n3 != null ? n3 : {}, i2 = o3.matchingSelector, r3 = o3.untilNode; t4 != null && t4.nodeType !== Node.ELEMENT_NODE; ) + t4 = t4.parentNode; + if (t4 != null) { + if (i2 == null) + return t4; + if (t4.closest && r3 == null) + return t4.closest(i2); + for (; t4 && t4 !== r3; ) { + if (e2.elementMatchesSelector(t4, i2)) + return t4; + t4 = t4.parentNode; + } + } + }, findInnerElement: function(t4) { + for (; t4 != null ? t4.firstElementChild : void 0; ) + t4 = t4.firstElementChild; + return t4; + }, innerElementIsActive: function(t4) { + return document.activeElement !== t4 && e2.elementContainsNode(t4, document.activeElement); + }, elementContainsNode: function(t4, e3) { + if (t4 && e3) + for (; e3; ) { + if (e3 === t4) + return true; + e3 = e3.parentNode; + } + }, findNodeFromContainerAndOffset: function(t4, e3) { + var n3; + if (t4) + return t4.nodeType === Node.TEXT_NODE ? t4 : e3 === 0 ? (n3 = t4.firstChild) != null ? n3 : t4 : t4.childNodes.item(e3 - 1); + }, findElementFromContainerAndOffset: function(t4, n3) { + var i2; + return i2 = e2.findNodeFromContainerAndOffset(t4, n3), e2.findClosestElementFromNode(i2); + }, findChildIndexOfNode: function(t4) { + var e3; + if (t4 != null ? t4.parentNode : void 0) { + for (e3 = 0; t4 = t4.previousSibling; ) + e3++; + return e3; + } + }, removeNode: function(t4) { + var e3; + return t4 != null && (e3 = t4.parentNode) != null ? e3.removeChild(t4) : void 0; + }, walkTree: function(t4, e3) { + var n3, i2, o3, r3, s3; + return o3 = e3 != null ? e3 : {}, i2 = o3.onlyNodesOfType, r3 = o3.usingFilter, n3 = o3.expandEntityReferences, s3 = function() { + switch (i2) { + case "element": + return NodeFilter.SHOW_ELEMENT; + case "text": + return NodeFilter.SHOW_TEXT; + case "comment": + return NodeFilter.SHOW_COMMENT; + default: + return NodeFilter.SHOW_ALL; + } + }(), document.createTreeWalker(t4, s3, r3 != null ? r3 : null, n3 === true); + }, tagName: function(t4) { + var e3; + return t4 != null && (e3 = t4.tagName) != null ? e3.toLowerCase() : void 0; + }, makeElement: function(t4, e3) { + var n3, i2, o3, r3, s3, a2, u, c2, l, h, p2, d, f, g; + if (e3 == null && (e3 = {}), typeof t4 == "object" ? (e3 = t4, t4 = e3.tagName) : e3 = {attributes: e3}, o3 = document.createElement(t4), e3.editable != null && (e3.attributes == null && (e3.attributes = {}), e3.attributes.contenteditable = e3.editable), e3.attributes) { + l = e3.attributes; + for (a2 in l) + g = l[a2], o3.setAttribute(a2, g); + } + if (e3.style) { + h = e3.style; + for (a2 in h) + g = h[a2], o3.style[a2] = g; + } + if (e3.data) { + p2 = e3.data; + for (a2 in p2) + g = p2[a2], o3.dataset[a2] = g; + } + if (e3.className) + for (d = e3.className.split(" "), r3 = 0, u = d.length; u > r3; r3++) + i2 = d[r3], o3.classList.add(i2); + if (e3.textContent && (o3.textContent = e3.textContent), e3.childNodes) + for (f = [].concat(e3.childNodes), s3 = 0, c2 = f.length; c2 > s3; s3++) + n3 = f[s3], o3.appendChild(n3); + return o3; + }, getBlockTagNames: function() { + var t4, n3; + return e2.blockTagNames != null ? e2.blockTagNames : e2.blockTagNames = function() { + var i2, o3; + i2 = e2.config.blockAttributes, o3 = []; + for (t4 in i2) + n3 = i2[t4].tagName, n3 && o3.push(n3); + return o3; + }(); + }, nodeIsBlockContainer: function(t4) { + return e2.nodeIsBlockStartComment(t4 != null ? t4.firstChild : void 0); + }, nodeProbablyIsBlockContainer: function(t4) { + var n3, i2; + return n3 = e2.tagName(t4), s2.call(e2.getBlockTagNames(), n3) >= 0 && (i2 = e2.tagName(t4.firstChild), s2.call(e2.getBlockTagNames(), i2) < 0); + }, nodeIsBlockStart: function(t4, n3) { + var i2; + return i2 = (n3 != null ? n3 : {strict: true}).strict, i2 ? e2.nodeIsBlockStartComment(t4) : e2.nodeIsBlockStartComment(t4) || !e2.nodeIsBlockStartComment(t4.firstChild) && e2.nodeProbablyIsBlockContainer(t4); + }, nodeIsBlockStartComment: function(t4) { + return e2.nodeIsCommentNode(t4) && (t4 != null ? t4.data : void 0) === "block"; + }, nodeIsCommentNode: function(t4) { + return (t4 != null ? t4.nodeType : void 0) === Node.COMMENT_NODE; + }, nodeIsCursorTarget: function(t4, n3) { + var i2; + return i2 = (n3 != null ? n3 : {}).name, t4 ? e2.nodeIsTextNode(t4) ? t4.data === e2.ZERO_WIDTH_SPACE ? i2 ? t4.parentNode.dataset.trixCursorTarget === i2 : true : void 0 : e2.nodeIsCursorTarget(t4.firstChild) : void 0; + }, nodeIsAttachmentElement: function(t4) { + return e2.elementMatchesSelector(t4, e2.AttachmentView.attachmentSelector); + }, nodeIsEmptyTextNode: function(t4) { + return e2.nodeIsTextNode(t4) && (t4 != null ? t4.data : void 0) === ""; + }, nodeIsTextNode: function(t4) { + return (t4 != null ? t4.nodeType : void 0) === Node.TEXT_NODE; + }}); + }.call(this), function() { + var t3, n2, i, o2, r2; + t3 = e2.copyObject, o2 = e2.objectsAreEqual, e2.extend({normalizeRange: i = function(t4) { + var e3; + if (t4 != null) + return Array.isArray(t4) || (t4 = [t4, t4]), [n2(t4[0]), n2((e3 = t4[1]) != null ? e3 : t4[0])]; + }, rangeIsCollapsed: function(t4) { + var e3, n3, o3; + if (t4 != null) + return n3 = i(t4), o3 = n3[0], e3 = n3[1], r2(o3, e3); + }, rangesAreEqual: function(t4, e3) { + var n3, o3, s2, a2, u, c2; + if (t4 != null && e3 != null) + return s2 = i(t4), o3 = s2[0], n3 = s2[1], a2 = i(e3), c2 = a2[0], u = a2[1], r2(o3, c2) && r2(n3, u); + }}), n2 = function(e3) { + return typeof e3 == "number" ? e3 : t3(e3); + }, r2 = function(t4, e3) { + return typeof t4 == "number" ? t4 === e3 : o2(t4, e3); + }; + }.call(this), function() { + var t3, n2, i, o2, r2, s2, a2; + e2.registerElement = function(t4, e3) { + var n3, i2; + return e3 == null && (e3 = {}), t4 = t4.toLowerCase(), e3 = a2(e3), i2 = s2(e3), (n3 = i2.defaultCSS) && (delete i2.defaultCSS, o2(n3, t4)), r2(t4, i2); + }, o2 = function(t4, e3) { + var n3; + return n3 = i(e3), n3.textContent = t4.replace(/%t/g, e3); + }, i = function(e3) { + var n3, i2; + return n3 = document.createElement("style"), n3.setAttribute("type", "text/css"), n3.setAttribute("data-tag-name", e3.toLowerCase()), (i2 = t3()) && n3.setAttribute("nonce", i2), document.head.insertBefore(n3, document.head.firstChild), n3; + }, t3 = function() { + var t4; + return (t4 = n2("trix-csp-nonce") || n2("csp-nonce")) ? t4.getAttribute("content") : void 0; + }, n2 = function(t4) { + return document.head.querySelector("meta[name=" + t4 + "]"); + }, s2 = function(t4) { + var e3, n3, i2; + n3 = {}; + for (e3 in t4) + i2 = t4[e3], n3[e3] = typeof i2 == "function" ? {value: i2} : i2; + return n3; + }, a2 = function() { + var t4; + return t4 = function(t5) { + var e3, n3, i2, o3, r3; + for (e3 = {}, r3 = ["initialize", "connect", "disconnect"], n3 = 0, o3 = r3.length; o3 > n3; n3++) + i2 = r3[n3], e3[i2] = t5[i2], delete t5[i2]; + return e3; + }, window.customElements ? function(e3) { + var n3, i2, o3, r3, s3; + return s3 = t4(e3), o3 = s3.initialize, n3 = s3.connect, i2 = s3.disconnect, o3 && (r3 = n3, n3 = function() { + return this.initialized || (this.initialized = true, o3.call(this)), r3 != null ? r3.call(this) : void 0; + }), n3 && (e3.connectedCallback = n3), i2 && (e3.disconnectedCallback = i2), e3; + } : function(e3) { + var n3, i2, o3, r3; + return r3 = t4(e3), o3 = r3.initialize, n3 = r3.connect, i2 = r3.disconnect, o3 && (e3.createdCallback = o3), n3 && (e3.attachedCallback = n3), i2 && (e3.detachedCallback = i2), e3; + }; + }(), r2 = function() { + return window.customElements ? function(t4, e3) { + var n3; + return n3 = function() { + return typeof Reflect == "object" ? Reflect.construct(HTMLElement, [], n3) : HTMLElement.apply(this); + }, Object.setPrototypeOf(n3.prototype, HTMLElement.prototype), Object.setPrototypeOf(n3, HTMLElement), Object.defineProperties(n3.prototype, e3), window.customElements.define(t4, n3), n3; + } : function(t4, e3) { + var n3, i2; + return i2 = Object.create(HTMLElement.prototype, e3), n3 = document.registerElement(t4, {prototype: i2}), Object.defineProperty(i2, "constructor", {value: n3}), n3; + }; + }(); + }.call(this), function() { + var t3, n2; + e2.extend({getDOMSelection: function() { + var t4; + return t4 = window.getSelection(), t4.rangeCount > 0 ? t4 : void 0; + }, getDOMRange: function() { + var n3, i; + return (n3 = (i = e2.getDOMSelection()) != null ? i.getRangeAt(0) : void 0) && !t3(n3) ? n3 : void 0; + }, setDOMRange: function(t4) { + var n3; + return n3 = window.getSelection(), n3.removeAllRanges(), n3.addRange(t4), e2.selectionChangeObserver.update(); + }}), t3 = function(t4) { + return n2(t4.startContainer) || n2(t4.endContainer); + }, n2 = function(t4) { + return !Object.getPrototypeOf(t4); + }; + }.call(this), function() { + var t3; + t3 = {"application/x-trix-feature-detection": "test"}, e2.extend({dataTransferIsPlainText: function(t4) { + var e3, n2, i; + return i = t4.getData("text/plain"), n2 = t4.getData("text/html"), i && n2 ? (e3 = new DOMParser().parseFromString(n2, "text/html").body, e3.textContent === i ? !e3.querySelector("*") : void 0) : i != null ? i.length : void 0; + }, dataTransferIsWritable: function(e3) { + var n2, i; + if ((e3 != null ? e3.setData : void 0) != null) { + for (n2 in t3) + if (i = t3[n2], !function() { + try { + return e3.setData(n2, i), e3.getData(n2) === i; + } catch (t4) { + } + }()) + return; + return true; + } + }, keyEventIsKeyboardCommand: function() { + return /Mac|^iP/.test(navigator.platform) ? function(t4) { + return t4.metaKey; + } : function(t4) { + return t4.ctrlKey; + }; + }()}); + }.call(this), function() { + e2.extend({RTL_PATTERN: /[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B\u061F\u0621-\u063A\u0640-\u064A\u066D\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D5\u06E5\u06E6\u200F\u202B\u202E\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE72\uFE74\uFE76-\uFEFC]/, getDirection: function() { + var t3, n2, i, o2; + return n2 = e2.makeElement("input", {dir: "auto", name: "x", dirName: "x.dir"}), t3 = e2.makeElement("form"), t3.appendChild(n2), i = function() { + try { + return new FormData(t3).has(n2.dirName); + } catch (e3) { + } + }(), o2 = function() { + try { + return n2.matches(":dir(ltr),:dir(rtl)"); + } catch (t4) { + } + }(), i ? function(e3) { + return n2.value = e3, new FormData(t3).get(n2.dirName); + } : o2 ? function(t4) { + return n2.value = t4, n2.matches(":dir(rtl)") ? "rtl" : "ltr"; + } : function(t4) { + var n3; + return n3 = t4.trim().charAt(0), e2.RTL_PATTERN.test(n3) ? "rtl" : "ltr"; + }; + }()}); + }.call(this), function() { + }.call(this), function() { + var t3, n2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var o2 in e3) + i.call(e3, o2) && (t4[o2] = e3[o2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, i = {}.hasOwnProperty; + t3 = e2.arraysAreEqual, e2.Hash = function(i2) { + function o2(t4) { + t4 == null && (t4 = {}), this.values = s2(t4), o2.__super__.constructor.apply(this, arguments); + } + var r2, s2, a2, u, c2; + return n2(o2, i2), o2.fromCommonAttributesOfObjects = function(t4) { + var e3, n3, i3, o3, s3, a3; + if (t4 == null && (t4 = []), !t4.length) + return new this(); + for (e3 = r2(t4[0]), i3 = e3.getKeys(), a3 = t4.slice(1), n3 = 0, o3 = a3.length; o3 > n3; n3++) + s3 = a3[n3], i3 = e3.getKeysCommonToHash(r2(s3)), e3 = e3.slice(i3); + return e3; + }, o2.box = function(t4) { + return r2(t4); + }, o2.prototype.add = function(t4, e3) { + return this.merge(u(t4, e3)); + }, o2.prototype.remove = function(t4) { + return new e2.Hash(s2(this.values, t4)); + }, o2.prototype.get = function(t4) { + return this.values[t4]; + }, o2.prototype.has = function(t4) { + return t4 in this.values; + }, o2.prototype.merge = function(t4) { + return new e2.Hash(a2(this.values, c2(t4))); + }, o2.prototype.slice = function(t4) { + var n3, i3, o3, r3; + for (r3 = {}, n3 = 0, o3 = t4.length; o3 > n3; n3++) + i3 = t4[n3], this.has(i3) && (r3[i3] = this.values[i3]); + return new e2.Hash(r3); + }, o2.prototype.getKeys = function() { + return Object.keys(this.values); + }, o2.prototype.getKeysCommonToHash = function(t4) { + var e3, n3, i3, o3, s3; + for (t4 = r2(t4), o3 = this.getKeys(), s3 = [], e3 = 0, i3 = o3.length; i3 > e3; e3++) + n3 = o3[e3], this.values[n3] === t4.values[n3] && s3.push(n3); + return s3; + }, o2.prototype.isEqualTo = function(e3) { + return t3(this.toArray(), r2(e3).toArray()); + }, o2.prototype.isEmpty = function() { + return this.getKeys().length === 0; + }, o2.prototype.toArray = function() { + var t4, e3, n3; + return (this.array != null ? this.array : this.array = function() { + var i3; + e3 = [], i3 = this.values; + for (t4 in i3) + n3 = i3[t4], e3.push(t4, n3); + return e3; + }.call(this)).slice(0); + }, o2.prototype.toObject = function() { + return s2(this.values); + }, o2.prototype.toJSON = function() { + return this.toObject(); + }, o2.prototype.contentsForInspection = function() { + return {values: JSON.stringify(this.values)}; + }, u = function(t4, e3) { + var n3; + return n3 = {}, n3[t4] = e3, n3; + }, a2 = function(t4, e3) { + var n3, i3, o3; + i3 = s2(t4); + for (n3 in e3) + o3 = e3[n3], i3[n3] = o3; + return i3; + }, s2 = function(t4, e3) { + var n3, i3, o3, r3, s3; + for (r3 = {}, s3 = Object.keys(t4).sort(), n3 = 0, o3 = s3.length; o3 > n3; n3++) + i3 = s3[n3], i3 !== e3 && (r3[i3] = t4[i3]); + return r3; + }, r2 = function(t4) { + return t4 instanceof e2.Hash ? t4 : new e2.Hash(t4); + }, c2 = function(t4) { + return t4 instanceof e2.Hash ? t4.values : t4; + }, o2; + }(e2.Object); + }.call(this), function() { + e2.ObjectGroup = function() { + function t3(t4, e3) { + var n2, i; + this.objects = t4 != null ? t4 : [], i = e3.depth, n2 = e3.asTree, n2 && (this.depth = i, this.objects = this.constructor.groupObjects(this.objects, {asTree: n2, depth: this.depth + 1})); + } + return t3.groupObjects = function(t4, e3) { + var n2, i, o2, r2, s2, a2, u, c2, l; + for (t4 == null && (t4 = []), l = e3 != null ? e3 : {}, o2 = l.depth, n2 = l.asTree, n2 && o2 == null && (o2 = 0), c2 = [], s2 = 0, a2 = t4.length; a2 > s2; s2++) { + if (u = t4[s2], r2) { + if ((typeof u.canBeGrouped == "function" ? u.canBeGrouped(o2) : void 0) && (typeof (i = r2[r2.length - 1]).canBeGroupedWith == "function" ? i.canBeGroupedWith(u, o2) : void 0)) { + r2.push(u); + continue; + } + c2.push(new this(r2, {depth: o2, asTree: n2})), r2 = null; + } + (typeof u.canBeGrouped == "function" ? u.canBeGrouped(o2) : void 0) ? r2 = [u] : c2.push(u); + } + return r2 && c2.push(new this(r2, {depth: o2, asTree: n2})), c2; + }, t3.prototype.getObjects = function() { + return this.objects; + }, t3.prototype.getDepth = function() { + return this.depth; + }, t3.prototype.getCacheKey = function() { + var t4, e3, n2, i, o2; + for (e3 = ["objectGroup"], o2 = this.getObjects(), t4 = 0, n2 = o2.length; n2 > t4; t4++) + i = o2[t4], e3.push(i.getCacheKey()); + return e3.join("/"); + }, t3; + }(); + }.call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.ObjectMap = function(e3) { + function n3(t4) { + var e4, n4, i, o2, r2; + for (t4 == null && (t4 = []), this.objects = {}, i = 0, o2 = t4.length; o2 > i; i++) + r2 = t4[i], n4 = JSON.stringify(r2), (e4 = this.objects)[n4] == null && (e4[n4] = r2); + } + return t3(n3, e3), n3.prototype.find = function(t4) { + var e4; + return e4 = JSON.stringify(t4), this.objects[e4]; + }, n3; + }(e2.BasicObject); + }.call(this), function() { + e2.ElementStore = function() { + function t3(t4) { + this.reset(t4); + } + var e3; + return t3.prototype.add = function(t4) { + var n2; + return n2 = e3(t4), this.elements[n2] = t4; + }, t3.prototype.remove = function(t4) { + var n2, i; + return n2 = e3(t4), (i = this.elements[n2]) ? (delete this.elements[n2], i) : void 0; + }, t3.prototype.reset = function(t4) { + var e4, n2, i; + for (t4 == null && (t4 = []), this.elements = {}, n2 = 0, i = t4.length; i > n2; n2++) + e4 = t4[n2], this.add(e4); + return t4; + }, e3 = function(t4) { + return t4.dataset.trixStoreKey; + }, t3; + }(); + }.call(this), function() { + }.call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.Operation = function(e3) { + function n3() { + return n3.__super__.constructor.apply(this, arguments); + } + return t3(n3, e3), n3.prototype.isPerforming = function() { + return this.performing === true; + }, n3.prototype.hasPerformed = function() { + return this.performed === true; + }, n3.prototype.hasSucceeded = function() { + return this.performed && this.succeeded; + }, n3.prototype.hasFailed = function() { + return this.performed && !this.succeeded; + }, n3.prototype.getPromise = function() { + return this.promise != null ? this.promise : this.promise = new Promise(function(t4) { + return function(e4, n4) { + return t4.performing = true, t4.perform(function(i, o2) { + return t4.succeeded = i, t4.performing = false, t4.performed = true, t4.succeeded ? e4(o2) : n4(o2); + }); + }; + }(this)); + }, n3.prototype.perform = function(t4) { + return t4(false); + }, n3.prototype.release = function() { + var t4; + return (t4 = this.promise) != null && typeof t4.cancel == "function" && t4.cancel(), this.promise = null, this.performing = null, this.performed = null, this.succeeded = null; + }, n3.proxyMethod("getPromise().then"), n3.proxyMethod("getPromise().catch"), n3; + }(e2.BasicObject); + }.call(this), function() { + var t3, n2, i, o2, r2, s2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + a2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, a2 = {}.hasOwnProperty; + e2.UTF16String = function(t4) { + function e3(t5, e4) { + this.ucs2String = t5, this.codepoints = e4, this.length = this.codepoints.length, this.ucs2Length = this.ucs2String.length; + } + return s2(e3, t4), e3.box = function(t5) { + return t5 == null && (t5 = ""), t5 instanceof this ? t5 : this.fromUCS2String(t5 != null ? t5.toString() : void 0); + }, e3.fromUCS2String = function(t5) { + return new this(t5, o2(t5)); + }, e3.fromCodepoints = function(t5) { + return new this(r2(t5), t5); + }, e3.prototype.offsetToUCS2Offset = function(t5) { + return r2(this.codepoints.slice(0, Math.max(0, t5))).length; + }, e3.prototype.offsetFromUCS2Offset = function(t5) { + return o2(this.ucs2String.slice(0, Math.max(0, t5))).length; + }, e3.prototype.slice = function() { + var t5; + return this.constructor.fromCodepoints((t5 = this.codepoints).slice.apply(t5, arguments)); + }, e3.prototype.charAt = function(t5) { + return this.slice(t5, t5 + 1); + }, e3.prototype.isEqualTo = function(t5) { + return this.constructor.box(t5).ucs2String === this.ucs2String; + }, e3.prototype.toJSON = function() { + return this.ucs2String; + }, e3.prototype.getCacheKey = function() { + return this.ucs2String; + }, e3.prototype.toString = function() { + return this.ucs2String; + }, e3; + }(e2.BasicObject), t3 = (typeof Array.from == "function" ? Array.from("\u{1F47C}").length : void 0) === 1, n2 = (typeof " ".codePointAt == "function" ? " ".codePointAt(0) : void 0) != null, i = (typeof String.fromCodePoint == "function" ? String.fromCodePoint(32, 128124) : void 0) === " \u{1F47C}", o2 = t3 && n2 ? function(t4) { + return Array.from(t4).map(function(t5) { + return t5.codePointAt(0); + }); + } : function(t4) { + var e3, n3, i2, o3, r3; + for (o3 = [], e3 = 0, i2 = t4.length; i2 > e3; ) + r3 = t4.charCodeAt(e3++), r3 >= 55296 && 56319 >= r3 && i2 > e3 && (n3 = t4.charCodeAt(e3++), (64512 & n3) === 56320 ? r3 = ((1023 & r3) << 10) + (1023 & n3) + 65536 : e3--), o3.push(r3); + return o3; + }, r2 = i ? function(t4) { + return String.fromCodePoint.apply(String, t4); + } : function(t4) { + var e3, n3, i2; + return e3 = function() { + var e4, o3, r3; + for (r3 = [], e4 = 0, o3 = t4.length; o3 > e4; e4++) + i2 = t4[e4], n3 = "", i2 > 65535 && (i2 -= 65536, n3 += String.fromCharCode(i2 >>> 10 & 1023 | 55296), i2 = 56320 | 1023 & i2), r3.push(n3 + String.fromCharCode(i2)); + return r3; + }(), e3.join(""); + }; + }.call(this), function() { + }.call(this), function() { + }.call(this), function() { + e2.config.lang = {attachFiles: "Attach Files", bold: "Bold", bullets: "Bullets", byte: "Byte", bytes: "Bytes", captionPlaceholder: "Add a caption\u2026", code: "Code", heading1: "Heading", indent: "Increase Level", italic: "Italic", link: "Link", numbers: "Numbers", outdent: "Decrease Level", quote: "Quote", redo: "Redo", remove: "Remove", strike: "Strikethrough", undo: "Undo", unlink: "Unlink", url: "URL", urlPlaceholder: "Enter a URL\u2026", GB: "GB", KB: "KB", MB: "MB", PB: "PB", TB: "TB"}; + }.call(this), function() { + e2.config.css = {attachment: "attachment", attachmentCaption: "attachment__caption", attachmentCaptionEditor: "attachment__caption-editor", attachmentMetadata: "attachment__metadata", attachmentMetadataContainer: "attachment__metadata-container", attachmentName: "attachment__name", attachmentProgress: "attachment__progress", attachmentSize: "attachment__size", attachmentToolbar: "attachment__toolbar", attachmentGallery: "attachment-gallery"}; + }.call(this), function() { + var t3; + e2.config.blockAttributes = t3 = {default: {tagName: "div", parse: false}, quote: {tagName: "blockquote", nestable: true}, heading1: {tagName: "h1", terminal: true, breakOnReturn: true, group: false}, code: {tagName: "pre", terminal: true, text: {plaintext: true}}, bulletList: {tagName: "ul", parse: false}, bullet: {tagName: "li", listAttribute: "bulletList", group: false, nestable: true, test: function(n2) { + return e2.tagName(n2.parentNode) === t3[this.listAttribute].tagName; + }}, numberList: {tagName: "ol", parse: false}, number: {tagName: "li", listAttribute: "numberList", group: false, nestable: true, test: function(n2) { + return e2.tagName(n2.parentNode) === t3[this.listAttribute].tagName; + }}, attachmentGallery: {tagName: "div", exclusive: true, terminal: true, parse: false, group: false}}; + }.call(this), function() { + var t3, n2; + t3 = e2.config.lang, n2 = [t3.bytes, t3.KB, t3.MB, t3.GB, t3.TB, t3.PB], e2.config.fileSize = {prefix: "IEC", precision: 2, formatter: function(e3) { + var i, o2, r2, s2, a2; + switch (e3) { + case 0: + return "0 " + t3.bytes; + case 1: + return "1 " + t3.byte; + default: + return i = function() { + switch (this.prefix) { + case "SI": + return 1e3; + case "IEC": + return 1024; + } + }.call(this), o2 = Math.floor(Math.log(e3) / Math.log(i)), r2 = e3 / Math.pow(i, o2), s2 = r2.toFixed(this.precision), a2 = s2.replace(/0*$/, "").replace(/\.$/, ""), a2 + " " + n2[o2]; + } + }}; + }.call(this), function() { + e2.config.textAttributes = {bold: {tagName: "strong", inheritable: true, parser: function(t3) { + var e3; + return e3 = window.getComputedStyle(t3), e3.fontWeight === "bold" || e3.fontWeight >= 600; + }}, italic: {tagName: "em", inheritable: true, parser: function(t3) { + var e3; + return e3 = window.getComputedStyle(t3), e3.fontStyle === "italic"; + }}, href: {groupTagName: "a", parser: function(t3) { + var n2, i, o2; + return n2 = e2.AttachmentView.attachmentSelector, o2 = "a:not(" + n2 + ")", (i = e2.findClosestElementFromNode(t3, {matchingSelector: o2})) ? i.getAttribute("href") : void 0; + }}, strike: {tagName: "del", inheritable: true}, frozen: {style: {backgroundColor: "highlight"}}}; + }.call(this), function() { + var t3, n2, i, o2, r2; + r2 = "[data-trix-serialize=false]", o2 = ["contenteditable", "data-trix-id", "data-trix-store-key", "data-trix-mutable", "data-trix-placeholder", "tabindex"], n2 = "data-trix-serialized-attributes", i = "[" + n2 + "]", t3 = new RegExp("", "g"), e2.extend({serializers: {"application/json": function(t4) { + var n3; + if (t4 instanceof e2.Document) + n3 = t4; + else { + if (!(t4 instanceof HTMLElement)) + throw new Error("unserializable object"); + n3 = e2.Document.fromHTML(t4.innerHTML); + } + return n3.toSerializableDocument().toJSONString(); + }, "text/html": function(s2) { + var a2, u, c2, l, h, p2, d, f, g, m, v, y, b, A, C3, x, w; + if (s2 instanceof e2.Document) + l = e2.DocumentView.render(s2); + else { + if (!(s2 instanceof HTMLElement)) + throw new Error("unserializable object"); + l = s2.cloneNode(true); + } + for (A = l.querySelectorAll(r2), h = 0, g = A.length; g > h; h++) + c2 = A[h], e2.removeNode(c2); + for (p2 = 0, m = o2.length; m > p2; p2++) + for (a2 = o2[p2], C3 = l.querySelectorAll("[" + a2 + "]"), d = 0, v = C3.length; v > d; d++) + c2 = C3[d], c2.removeAttribute(a2); + for (x = l.querySelectorAll(i), f = 0, y = x.length; y > f; f++) { + c2 = x[f]; + try { + u = JSON.parse(c2.getAttribute(n2)), c2.removeAttribute(n2); + for (b in u) + w = u[b], c2.setAttribute(b, w); + } catch (E) { + } + } + return l.innerHTML.replace(t3, ""); + }}, deserializers: {"application/json": function(t4) { + return e2.Document.fromJSONString(t4); + }, "text/html": function(t4) { + return e2.Document.fromHTML(t4); + }}, serializeToContentType: function(t4, n3) { + var i2; + if (i2 = e2.serializers[n3]) + return i2(t4); + throw new Error("unknown content type: " + n3); + }, deserializeFromContentType: function(t4, n3) { + var i2; + if (i2 = e2.deserializers[n3]) + return i2(t4); + throw new Error("unknown content type: " + n3); + }}); + }.call(this), function() { + var t3; + t3 = e2.config.lang, e2.config.toolbar = {getDefaultHTML: function() { + return '
\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n\n \n \n \n\n \n\n \n \n \n \n
\n\n
\n \n
'; + }}; + }.call(this), function() { + e2.config.undoInterval = 5e3; + }.call(this), function() { + e2.config.attachments = {preview: {presentation: "gallery", caption: {name: true, size: true}}, file: {caption: {size: true}}}; + }.call(this), function() { + e2.config.keyNames = {8: "backspace", 9: "tab", 13: "return", 27: "escape", 37: "left", 39: "right", 46: "delete", 68: "d", 72: "h", 79: "o"}; + }.call(this), function() { + e2.config.input = {level2Enabled: true, getLevel: function() { + return this.level2Enabled && e2.browser.supportsInputEvents ? 2 : 0; + }, pickFiles: function(t3) { + var n2; + return n2 = e2.makeElement("input", {type: "file", multiple: true, hidden: true, id: this.fileInputId}), n2.addEventListener("change", function() { + return t3(n2.files), e2.removeNode(n2); + }), e2.removeNode(document.getElementById(this.fileInputId)), document.body.appendChild(n2), n2.click(); + }, fileInputId: "trix-file-input-" + Date.now().toString(16)}; + }.call(this), function() { + }.call(this), function() { + e2.registerElement("trix-toolbar", {defaultCSS: "%t {\n display: block;\n}\n\n%t {\n white-space: nowrap;\n}\n\n%t [data-trix-dialog] {\n display: none;\n}\n\n%t [data-trix-dialog][data-trix-active] {\n display: block;\n}\n\n%t [data-trix-dialog] [data-trix-validate]:invalid {\n background-color: #ffdddd;\n}", initialize: function() { + return this.innerHTML === "" ? this.innerHTML = e2.config.toolbar.getDefaultHTML() : void 0; + }}); + }.call(this), function() { + var t3 = function(t4, e3) { + function i2() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i2.prototype = e3.prototype, t4.prototype = new i2(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty, i = [].indexOf || function(t4) { + for (var e3 = 0, n3 = this.length; n3 > e3; e3++) + if (e3 in this && this[e3] === t4) + return e3; + return -1; + }; + e2.ObjectView = function(n3) { + function o2(t4, e3) { + this.object = t4, this.options = e3 != null ? e3 : {}, this.childViews = [], this.rootView = this; + } + return t3(o2, n3), o2.prototype.getNodes = function() { + var t4, e3, n4, i2, o3; + for (this.nodes == null && (this.nodes = this.createNodes()), i2 = this.nodes, o3 = [], t4 = 0, e3 = i2.length; e3 > t4; t4++) + n4 = i2[t4], o3.push(n4.cloneNode(true)); + return o3; + }, o2.prototype.invalidate = function() { + var t4; + return this.nodes = null, this.childViews = [], (t4 = this.parentView) != null ? t4.invalidate() : void 0; + }, o2.prototype.invalidateViewForObject = function(t4) { + var e3; + return (e3 = this.findViewForObject(t4)) != null ? e3.invalidate() : void 0; + }, o2.prototype.findOrCreateCachedChildView = function(t4, e3) { + var n4; + return (n4 = this.getCachedViewForObject(e3)) ? this.recordChildView(n4) : (n4 = this.createChildView.apply(this, arguments), this.cacheViewForObject(n4, e3)), n4; + }, o2.prototype.createChildView = function(t4, n4, i2) { + var o3; + return i2 == null && (i2 = {}), n4 instanceof e2.ObjectGroup && (i2.viewClass = t4, t4 = e2.ObjectGroupView), o3 = new t4(n4, i2), this.recordChildView(o3); + }, o2.prototype.recordChildView = function(t4) { + return t4.parentView = this, t4.rootView = this.rootView, this.childViews.push(t4), t4; + }, o2.prototype.getAllChildViews = function() { + var t4, e3, n4, i2, o3; + for (o3 = [], i2 = this.childViews, e3 = 0, n4 = i2.length; n4 > e3; e3++) + t4 = i2[e3], o3.push(t4), o3 = o3.concat(t4.getAllChildViews()); + return o3; + }, o2.prototype.findElement = function() { + return this.findElementForObject(this.object); + }, o2.prototype.findElementForObject = function(t4) { + var e3; + return (e3 = t4 != null ? t4.id : void 0) ? this.rootView.element.querySelector("[data-trix-id='" + e3 + "']") : void 0; + }, o2.prototype.findViewForObject = function(t4) { + var e3, n4, i2, o3; + for (i2 = this.getAllChildViews(), e3 = 0, n4 = i2.length; n4 > e3; e3++) + if (o3 = i2[e3], o3.object === t4) + return o3; + }, o2.prototype.getViewCache = function() { + return this.rootView !== this ? this.rootView.getViewCache() : this.isViewCachingEnabled() ? this.viewCache != null ? this.viewCache : this.viewCache = {} : void 0; + }, o2.prototype.isViewCachingEnabled = function() { + return this.shouldCacheViews !== false; + }, o2.prototype.enableViewCaching = function() { + return this.shouldCacheViews = true; + }, o2.prototype.disableViewCaching = function() { + return this.shouldCacheViews = false; + }, o2.prototype.getCachedViewForObject = function(t4) { + var e3; + return (e3 = this.getViewCache()) != null ? e3[t4.getCacheKey()] : void 0; + }, o2.prototype.cacheViewForObject = function(t4, e3) { + var n4; + return (n4 = this.getViewCache()) != null ? n4[e3.getCacheKey()] = t4 : void 0; + }, o2.prototype.garbageCollectCachedViews = function() { + var t4, e3, n4, o3, r2, s2; + if (t4 = this.getViewCache()) { + s2 = this.getAllChildViews().concat(this), n4 = function() { + var t5, e4, n5; + for (n5 = [], t5 = 0, e4 = s2.length; e4 > t5; t5++) + r2 = s2[t5], n5.push(r2.object.getCacheKey()); + return n5; + }(), o3 = []; + for (e3 in t4) + i.call(n4, e3) < 0 && o3.push(delete t4[e3]); + return o3; + } + }, o2; + }(e2.BasicObject); + }.call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.ObjectGroupView = function(e3) { + function n3() { + n3.__super__.constructor.apply(this, arguments), this.objectGroup = this.object, this.viewClass = this.options.viewClass, delete this.options.viewClass; + } + return t3(n3, e3), n3.prototype.getChildViews = function() { + var t4, e4, n4, i; + if (!this.childViews.length) + for (i = this.objectGroup.getObjects(), t4 = 0, e4 = i.length; e4 > t4; t4++) + n4 = i[t4], this.findOrCreateCachedChildView(this.viewClass, n4, this.options); + return this.childViews; + }, n3.prototype.createNodes = function() { + var t4, e4, n4, i, o2, r2, s2, a2, u; + for (t4 = this.createContainerElement(), s2 = this.getChildViews(), e4 = 0, i = s2.length; i > e4; e4++) + for (u = s2[e4], a2 = u.getNodes(), n4 = 0, o2 = a2.length; o2 > n4; n4++) + r2 = a2[n4], t4.appendChild(r2); + return [t4]; + }, n3.prototype.createContainerElement = function(t4) { + return t4 == null && (t4 = this.objectGroup.getDepth()), this.getChildViews()[0].createContainerElement(t4); + }, n3; + }(e2.ObjectView); + }.call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.Controller = function(e3) { + function n3() { + return n3.__super__.constructor.apply(this, arguments); + } + return t3(n3, e3), n3; + }(e2.BasicObject); + }.call(this), function() { + var t3, n2, i, o2, r2, s2, a2 = function(t4, e3) { + return function() { + return t4.apply(e3, arguments); + }; + }, u = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + c2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, c2 = {}.hasOwnProperty, l = [].indexOf || function(t4) { + for (var e3 = 0, n3 = this.length; n3 > e3; e3++) + if (e3 in this && this[e3] === t4) + return e3; + return -1; + }; + t3 = e2.findClosestElementFromNode, i = e2.nodeIsEmptyTextNode, n2 = e2.nodeIsBlockStartComment, o2 = e2.normalizeSpaces, r2 = e2.summarizeStringChange, s2 = e2.tagName, e2.MutationObserver = function(e3) { + function c3(t4) { + this.element = t4, this.didMutate = a2(this.didMutate, this), this.observer = new window.MutationObserver(this.didMutate), this.start(); + } + var h, p2, d, f; + return u(c3, e3), p2 = "data-trix-mutable", d = "[" + p2 + "]", f = {attributes: true, childList: true, characterData: true, characterDataOldValue: true, subtree: true}, c3.prototype.start = function() { + return this.reset(), this.observer.observe(this.element, f); + }, c3.prototype.stop = function() { + return this.observer.disconnect(); + }, c3.prototype.didMutate = function(t4) { + var e4, n3; + return (e4 = this.mutations).push.apply(e4, this.findSignificantMutations(t4)), this.mutations.length ? ((n3 = this.delegate) != null && typeof n3.elementDidMutate == "function" && n3.elementDidMutate(this.getMutationSummary()), this.reset()) : void 0; + }, c3.prototype.reset = function() { + return this.mutations = []; + }, c3.prototype.findSignificantMutations = function(t4) { + var e4, n3, i2, o3; + for (o3 = [], e4 = 0, n3 = t4.length; n3 > e4; e4++) + i2 = t4[e4], this.mutationIsSignificant(i2) && o3.push(i2); + return o3; + }, c3.prototype.mutationIsSignificant = function(t4) { + var e4, n3, i2, o3; + if (this.nodeIsMutable(t4.target)) + return false; + for (o3 = this.nodesModifiedByMutation(t4), e4 = 0, n3 = o3.length; n3 > e4; e4++) + if (i2 = o3[e4], this.nodeIsSignificant(i2)) + return true; + return false; + }, c3.prototype.nodeIsSignificant = function(t4) { + return t4 !== this.element && !this.nodeIsMutable(t4) && !i(t4); + }, c3.prototype.nodeIsMutable = function(e4) { + return t3(e4, {matchingSelector: d}); + }, c3.prototype.nodesModifiedByMutation = function(t4) { + var e4; + switch (e4 = [], t4.type) { + case "attributes": + t4.attributeName !== p2 && e4.push(t4.target); + break; + case "characterData": + e4.push(t4.target.parentNode), e4.push(t4.target); + break; + case "childList": + e4.push.apply(e4, t4.addedNodes), e4.push.apply(e4, t4.removedNodes); + } + return e4; + }, c3.prototype.getMutationSummary = function() { + return this.getTextMutationSummary(); + }, c3.prototype.getTextMutationSummary = function() { + var t4, e4, n3, i2, o3, r3, s3, a3, u2, c4, h2; + for (a3 = this.getTextChangesFromCharacterData(), n3 = a3.additions, o3 = a3.deletions, h2 = this.getTextChangesFromChildList(), u2 = h2.additions, r3 = 0, s3 = u2.length; s3 > r3; r3++) + e4 = u2[r3], l.call(n3, e4) < 0 && n3.push(e4); + return o3.push.apply(o3, h2.deletions), c4 = {}, (t4 = n3.join("")) && (c4.textAdded = t4), (i2 = o3.join("")) && (c4.textDeleted = i2), c4; + }, c3.prototype.getMutationsByType = function(t4) { + var e4, n3, i2, o3, r3; + for (o3 = this.mutations, r3 = [], e4 = 0, n3 = o3.length; n3 > e4; e4++) + i2 = o3[e4], i2.type === t4 && r3.push(i2); + return r3; + }, c3.prototype.getTextChangesFromChildList = function() { + var t4, e4, i2, r3, s3, a3, u2, c4, l2, p3, d2; + for (t4 = [], u2 = [], a3 = this.getMutationsByType("childList"), e4 = 0, r3 = a3.length; r3 > e4; e4++) + s3 = a3[e4], t4.push.apply(t4, s3.addedNodes), u2.push.apply(u2, s3.removedNodes); + return c4 = t4.length === 0 && u2.length === 1 && n2(u2[0]), c4 ? (p3 = [], d2 = ["\n"]) : (p3 = h(t4), d2 = h(u2)), {additions: function() { + var t5, e5, n3; + for (n3 = [], i2 = t5 = 0, e5 = p3.length; e5 > t5; i2 = ++t5) + l2 = p3[i2], l2 !== d2[i2] && n3.push(o2(l2)); + return n3; + }(), deletions: function() { + var t5, e5, n3; + for (n3 = [], i2 = t5 = 0, e5 = d2.length; e5 > t5; i2 = ++t5) + l2 = d2[i2], l2 !== p3[i2] && n3.push(o2(l2)); + return n3; + }()}; + }, c3.prototype.getTextChangesFromCharacterData = function() { + var t4, e4, n3, i2, s3, a3, u2, c4; + return e4 = this.getMutationsByType("characterData"), e4.length && (c4 = e4[0], n3 = e4[e4.length - 1], s3 = o2(c4.oldValue), i2 = o2(n3.target.data), a3 = r2(s3, i2), t4 = a3.added, u2 = a3.removed), {additions: t4 ? [t4] : [], deletions: u2 ? [u2] : []}; + }, h = function(t4) { + var e4, n3, i2, o3; + for (t4 == null && (t4 = []), o3 = [], e4 = 0, n3 = t4.length; n3 > e4; e4++) + switch (i2 = t4[e4], i2.nodeType) { + case Node.TEXT_NODE: + o3.push(i2.data); + break; + case Node.ELEMENT_NODE: + s2(i2) === "br" ? o3.push("\n") : o3.push.apply(o3, h(i2.childNodes)); + } + return o3; + }, c3; + }(e2.BasicObject); + }.call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.FileVerificationOperation = function(e3) { + function n3(t4) { + this.file = t4; + } + return t3(n3, e3), n3.prototype.perform = function(t4) { + var e4; + return e4 = new FileReader(), e4.onerror = function() { + return t4(false); + }, e4.onload = function(n4) { + return function() { + e4.onerror = null; + try { + e4.abort(); + } catch (i) { + } + return t4(true, n4.file); + }; + }(this), e4.readAsArrayBuffer(this.file); + }, n3; + }(e2.Operation); + }.call(this), function() { + var t3, n2, i = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + o2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, o2 = {}.hasOwnProperty; + t3 = e2.handleEvent, n2 = e2.innerElementIsActive, e2.InputController = function(o3) { + function r2(n3) { + var i2; + this.element = n3, this.mutationObserver = new e2.MutationObserver(this.element), this.mutationObserver.delegate = this; + for (i2 in this.events) + t3(i2, {onElement: this.element, withCallback: this.handlerFor(i2)}); + } + return i(r2, o3), r2.prototype.events = {}, r2.prototype.elementDidMutate = function() { + }, r2.prototype.editorWillSyncDocumentView = function() { + return this.mutationObserver.stop(); + }, r2.prototype.editorDidSyncDocumentView = function() { + return this.mutationObserver.start(); + }, r2.prototype.requestRender = function() { + var t4; + return (t4 = this.delegate) != null && typeof t4.inputControllerDidRequestRender == "function" ? t4.inputControllerDidRequestRender() : void 0; + }, r2.prototype.requestReparse = function() { + var t4; + return (t4 = this.delegate) != null && typeof t4.inputControllerDidRequestReparse == "function" && t4.inputControllerDidRequestReparse(), this.requestRender(); + }, r2.prototype.attachFiles = function(t4) { + var n3, i2; + return i2 = function() { + var i3, o4, r3; + for (r3 = [], i3 = 0, o4 = t4.length; o4 > i3; i3++) + n3 = t4[i3], r3.push(new e2.FileVerificationOperation(n3)); + return r3; + }(), Promise.all(i2).then(function(t5) { + return function(e3) { + return t5.handleInput(function() { + var t6, n4; + return (t6 = this.delegate) != null && t6.inputControllerWillAttachFiles(), (n4 = this.responder) != null && n4.insertFiles(e3), this.requestRender(); + }); + }; + }(this)); + }, r2.prototype.handlerFor = function(t4) { + return function(e3) { + return function(i2) { + return i2.defaultPrevented ? void 0 : e3.handleInput(function() { + return n2(this.element) ? void 0 : (this.eventName = t4, this.events[t4].call(this, i2)); + }); + }; + }(this); + }, r2.prototype.handleInput = function(t4) { + var e3, n3; + try { + return (e3 = this.delegate) != null && e3.inputControllerWillHandleInput(), t4.call(this); + } finally { + (n3 = this.delegate) != null && n3.inputControllerDidHandleInput(); + } + }, r2.prototype.createLinkHTML = function(t4, e3) { + var n3; + return n3 = document.createElement("a"), n3.href = t4, n3.textContent = e3 != null ? e3 : t4, n3.outerHTML; + }, r2; + }(e2.BasicObject); + }.call(this), function() { + var t3, n2, i, o2, r2, s2, a2, u, c2, l, h, p2, d, f = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + g.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, g = {}.hasOwnProperty, m = [].indexOf || function(t4) { + for (var e3 = 0, n3 = this.length; n3 > e3; e3++) + if (e3 in this && this[e3] === t4) + return e3; + return -1; + }; + c2 = e2.makeElement, l = e2.objectsAreEqual, d = e2.tagName, n2 = e2.browser, a2 = e2.keyEventIsKeyboardCommand, o2 = e2.dataTransferIsWritable, i = e2.dataTransferIsPlainText, u = e2.config.keyNames, e2.Level0InputController = function(n3) { + function s3() { + s3.__super__.constructor.apply(this, arguments), this.resetInputSummary(); + } + var d2; + return f(s3, n3), d2 = 0, s3.prototype.setInputSummary = function(t4) { + var e3, n4; + t4 == null && (t4 = {}), this.inputSummary.eventName = this.eventName; + for (e3 in t4) + n4 = t4[e3], this.inputSummary[e3] = n4; + return this.inputSummary; + }, s3.prototype.resetInputSummary = function() { + return this.inputSummary = {}; + }, s3.prototype.reset = function() { + return this.resetInputSummary(), e2.selectionChangeObserver.reset(); + }, s3.prototype.elementDidMutate = function(t4) { + var e3; + return this.isComposing() ? (e3 = this.delegate) != null && typeof e3.inputControllerDidAllowUnhandledInput == "function" ? e3.inputControllerDidAllowUnhandledInput() : void 0 : this.handleInput(function() { + return this.mutationIsSignificant(t4) && (this.mutationIsExpected(t4) ? this.requestRender() : this.requestReparse()), this.reset(); + }); + }, s3.prototype.mutationIsExpected = function(t4) { + var e3, n4, i2, o3, r3, s4, a3, u2, c3, l2; + return a3 = t4.textAdded, u2 = t4.textDeleted, this.inputSummary.preferDocument ? true : (e3 = a3 != null ? a3 === this.inputSummary.textAdded : !this.inputSummary.textAdded, n4 = u2 != null ? this.inputSummary.didDelete : !this.inputSummary.didDelete, c3 = (a3 === "\n" || a3 === " \n") && !e3, l2 = u2 === "\n" && !n4, s4 = c3 && !l2 || l2 && !c3, s4 && (o3 = this.getSelectedRange()) && (i2 = c3 ? a3.replace(/\n$/, "").length || -1 : (a3 != null ? a3.length : void 0) || 1, (r3 = this.responder) != null ? r3.positionIsBlockBreak(o3[1] + i2) : void 0) ? true : e3 && n4); + }, s3.prototype.mutationIsSignificant = function(t4) { + var e3, n4, i2; + return i2 = Object.keys(t4).length > 0, e3 = ((n4 = this.compositionInput) != null ? n4.getEndData() : void 0) === "", i2 || !e3; + }, s3.prototype.events = {keydown: function(t4) { + var n4, i2, o3, r3, s4, c3, l2, h2, p3; + if (this.isComposing() || this.resetInputSummary(), this.inputSummary.didInput = true, r3 = u[t4.keyCode]) { + for (i2 = this.keys, h2 = ["ctrl", "alt", "shift", "meta"], o3 = 0, c3 = h2.length; c3 > o3; o3++) + l2 = h2[o3], t4[l2 + "Key"] && (l2 === "ctrl" && (l2 = "control"), i2 = i2 != null ? i2[l2] : void 0); + (i2 != null ? i2[r3] : void 0) != null && (this.setInputSummary({keyName: r3}), e2.selectionChangeObserver.reset(), i2[r3].call(this, t4)); + } + return a2(t4) && (n4 = String.fromCharCode(t4.keyCode).toLowerCase()) && (s4 = function() { + var e3, n5, i3, o4; + for (i3 = ["alt", "shift"], o4 = [], e3 = 0, n5 = i3.length; n5 > e3; e3++) + l2 = i3[e3], t4[l2 + "Key"] && o4.push(l2); + return o4; + }(), s4.push(n4), (p3 = this.delegate) != null ? p3.inputControllerDidReceiveKeyboardCommand(s4) : void 0) ? t4.preventDefault() : void 0; + }, keypress: function(t4) { + var e3, n4, i2; + if (this.inputSummary.eventName == null && !t4.metaKey && (!t4.ctrlKey || t4.altKey)) + return (i2 = p2(t4)) ? ((e3 = this.delegate) != null && e3.inputControllerWillPerformTyping(), (n4 = this.responder) != null && n4.insertString(i2), this.setInputSummary({textAdded: i2, didDelete: this.selectionIsExpanded()})) : void 0; + }, textInput: function(t4) { + var e3, n4, i2, o3; + return e3 = t4.data, o3 = this.inputSummary.textAdded, o3 && o3 !== e3 && o3.toUpperCase() === e3 ? (n4 = this.getSelectedRange(), this.setSelectedRange([n4[0], n4[1] + o3.length]), (i2 = this.responder) != null && i2.insertString(e3), this.setInputSummary({textAdded: e3}), this.setSelectedRange(n4)) : void 0; + }, dragenter: function(t4) { + return t4.preventDefault(); + }, dragstart: function(t4) { + var e3, n4; + return n4 = t4.target, this.serializeSelectionToDataTransfer(t4.dataTransfer), this.draggedRange = this.getSelectedRange(), (e3 = this.delegate) != null && typeof e3.inputControllerDidStartDrag == "function" ? e3.inputControllerDidStartDrag() : void 0; + }, dragover: function(t4) { + var e3, n4; + return !this.draggedRange && !this.canAcceptDataTransfer(t4.dataTransfer) || (t4.preventDefault(), e3 = {x: t4.clientX, y: t4.clientY}, l(e3, this.draggingPoint)) ? void 0 : (this.draggingPoint = e3, (n4 = this.delegate) != null && typeof n4.inputControllerDidReceiveDragOverPoint == "function" ? n4.inputControllerDidReceiveDragOverPoint(this.draggingPoint) : void 0); + }, dragend: function() { + var t4; + return (t4 = this.delegate) != null && typeof t4.inputControllerDidCancelDrag == "function" && t4.inputControllerDidCancelDrag(), this.draggedRange = null, this.draggingPoint = null; + }, drop: function(t4) { + var n4, i2, o3, r3, s4, a3, u2, c3, l2; + return t4.preventDefault(), o3 = (s4 = t4.dataTransfer) != null ? s4.files : void 0, r3 = {x: t4.clientX, y: t4.clientY}, (a3 = this.responder) != null && a3.setLocationRangeFromPointRange(r3), (o3 != null ? o3.length : void 0) ? this.attachFiles(o3) : this.draggedRange ? ((u2 = this.delegate) != null && u2.inputControllerWillMoveText(), (c3 = this.responder) != null && c3.moveTextFromRange(this.draggedRange), this.draggedRange = null, this.requestRender()) : (i2 = t4.dataTransfer.getData("application/x-trix-document")) && (n4 = e2.Document.fromJSONString(i2), (l2 = this.responder) != null && l2.insertDocument(n4), this.requestRender()), this.draggedRange = null, this.draggingPoint = null; + }, cut: function(t4) { + var e3, n4; + return ((e3 = this.responder) != null ? e3.selectionIsExpanded() : void 0) && (this.serializeSelectionToDataTransfer(t4.clipboardData) && t4.preventDefault(), (n4 = this.delegate) != null && n4.inputControllerWillCutText(), this.deleteInDirection("backward"), t4.defaultPrevented) ? this.requestRender() : void 0; + }, copy: function(t4) { + var e3; + return ((e3 = this.responder) != null ? e3.selectionIsExpanded() : void 0) && this.serializeSelectionToDataTransfer(t4.clipboardData) ? t4.preventDefault() : void 0; + }, paste: function(t4) { + var n4, o3, s4, a3, u2, c3, l2, p3, f2, g2, v, y, b, A, C3, x, w, E, S2, R, k, D2, L2; + return n4 = (p3 = t4.clipboardData) != null ? p3 : t4.testClipboardData, l2 = {clipboard: n4}, n4 == null || h(t4) ? void this.getPastedHTMLUsingHiddenElement(function(t5) { + return function(e3) { + var n5, i2, o4; + return l2.type = "text/html", l2.html = e3, (n5 = t5.delegate) != null && n5.inputControllerWillPaste(l2), (i2 = t5.responder) != null && i2.insertHTML(l2.html), t5.requestRender(), (o4 = t5.delegate) != null ? o4.inputControllerDidPaste(l2) : void 0; + }; + }(this)) : ((a3 = n4.getData("URL")) ? (l2.type = "text/html", L2 = (c3 = n4.getData("public.url-name")) ? e2.squishBreakableWhitespace(c3).trim() : a3, l2.html = this.createLinkHTML(a3, L2), (f2 = this.delegate) != null && f2.inputControllerWillPaste(l2), this.setInputSummary({textAdded: L2, didDelete: this.selectionIsExpanded()}), (C3 = this.responder) != null && C3.insertHTML(l2.html), this.requestRender(), (x = this.delegate) != null && x.inputControllerDidPaste(l2)) : i(n4) ? (l2.type = "text/plain", l2.string = n4.getData("text/plain"), (w = this.delegate) != null && w.inputControllerWillPaste(l2), this.setInputSummary({textAdded: l2.string, didDelete: this.selectionIsExpanded()}), (E = this.responder) != null && E.insertString(l2.string), this.requestRender(), (S2 = this.delegate) != null && S2.inputControllerDidPaste(l2)) : (u2 = n4.getData("text/html")) ? (l2.type = "text/html", l2.html = u2, (R = this.delegate) != null && R.inputControllerWillPaste(l2), (k = this.responder) != null && k.insertHTML(l2.html), this.requestRender(), (D2 = this.delegate) != null && D2.inputControllerDidPaste(l2)) : m.call(n4.types, "Files") >= 0 && (s4 = (g2 = n4.items) != null && (v = g2[0]) != null && typeof v.getAsFile == "function" ? v.getAsFile() : void 0) && (!s4.name && (o3 = r2(s4)) && (s4.name = "pasted-file-" + ++d2 + "." + o3), l2.type = "File", l2.file = s4, (y = this.delegate) != null && y.inputControllerWillAttachFiles(), (b = this.responder) != null && b.insertFile(l2.file), this.requestRender(), (A = this.delegate) != null && A.inputControllerDidPaste(l2)), t4.preventDefault()); + }, compositionstart: function(t4) { + return this.getCompositionInput().start(t4.data); + }, compositionupdate: function(t4) { + return this.getCompositionInput().update(t4.data); + }, compositionend: function(t4) { + return this.getCompositionInput().end(t4.data); + }, beforeinput: function() { + return this.inputSummary.didInput = true; + }, input: function(t4) { + return this.inputSummary.didInput = true, t4.stopPropagation(); + }}, s3.prototype.keys = {backspace: function(t4) { + var e3; + return (e3 = this.delegate) != null && e3.inputControllerWillPerformTyping(), this.deleteInDirection("backward", t4); + }, delete: function(t4) { + var e3; + return (e3 = this.delegate) != null && e3.inputControllerWillPerformTyping(), this.deleteInDirection("forward", t4); + }, return: function() { + var t4, e3; + return this.setInputSummary({preferDocument: true}), (t4 = this.delegate) != null && t4.inputControllerWillPerformTyping(), (e3 = this.responder) != null ? e3.insertLineBreak() : void 0; + }, tab: function(t4) { + var e3, n4; + return ((e3 = this.responder) != null ? e3.canIncreaseNestingLevel() : void 0) ? ((n4 = this.responder) != null && n4.increaseNestingLevel(), this.requestRender(), t4.preventDefault()) : void 0; + }, left: function(t4) { + var e3; + return this.selectionIsInCursorTarget() ? (t4.preventDefault(), (e3 = this.responder) != null ? e3.moveCursorInDirection("backward") : void 0) : void 0; + }, right: function(t4) { + var e3; + return this.selectionIsInCursorTarget() ? (t4.preventDefault(), (e3 = this.responder) != null ? e3.moveCursorInDirection("forward") : void 0) : void 0; + }, control: {d: function(t4) { + var e3; + return (e3 = this.delegate) != null && e3.inputControllerWillPerformTyping(), this.deleteInDirection("forward", t4); + }, h: function(t4) { + var e3; + return (e3 = this.delegate) != null && e3.inputControllerWillPerformTyping(), this.deleteInDirection("backward", t4); + }, o: function(t4) { + var e3, n4; + return t4.preventDefault(), (e3 = this.delegate) != null && e3.inputControllerWillPerformTyping(), (n4 = this.responder) != null && n4.insertString("\n", {updatePosition: false}), this.requestRender(); + }}, shift: {return: function(t4) { + var e3, n4; + return (e3 = this.delegate) != null && e3.inputControllerWillPerformTyping(), (n4 = this.responder) != null && n4.insertString("\n"), this.requestRender(), t4.preventDefault(); + }, tab: function(t4) { + var e3, n4; + return ((e3 = this.responder) != null ? e3.canDecreaseNestingLevel() : void 0) ? ((n4 = this.responder) != null && n4.decreaseNestingLevel(), this.requestRender(), t4.preventDefault()) : void 0; + }, left: function(t4) { + return this.selectionIsInCursorTarget() ? (t4.preventDefault(), this.expandSelectionInDirection("backward")) : void 0; + }, right: function(t4) { + return this.selectionIsInCursorTarget() ? (t4.preventDefault(), this.expandSelectionInDirection("forward")) : void 0; + }}, alt: {backspace: function() { + var t4; + return this.setInputSummary({preferDocument: false}), (t4 = this.delegate) != null ? t4.inputControllerWillPerformTyping() : void 0; + }}, meta: {backspace: function() { + var t4; + return this.setInputSummary({preferDocument: false}), (t4 = this.delegate) != null ? t4.inputControllerWillPerformTyping() : void 0; + }}}, s3.prototype.getCompositionInput = function() { + return this.isComposing() ? this.compositionInput : this.compositionInput = new t3(this); + }, s3.prototype.isComposing = function() { + return this.compositionInput != null && !this.compositionInput.isEnded(); + }, s3.prototype.deleteInDirection = function(t4, e3) { + var n4; + return ((n4 = this.responder) != null ? n4.deleteInDirection(t4) : void 0) !== false ? this.setInputSummary({didDelete: true}) : e3 ? (e3.preventDefault(), this.requestRender()) : void 0; + }, s3.prototype.serializeSelectionToDataTransfer = function(t4) { + var n4, i2; + if (o2(t4)) + return n4 = (i2 = this.responder) != null ? i2.getSelectedDocument().toSerializableDocument() : void 0, t4.setData("application/x-trix-document", JSON.stringify(n4)), t4.setData("text/html", e2.DocumentView.render(n4).innerHTML), t4.setData("text/plain", n4.toString().replace(/\n$/, "")), true; + }, s3.prototype.canAcceptDataTransfer = function(t4) { + var e3, n4, i2, o3, r3, s4; + for (s4 = {}, o3 = (i2 = t4 != null ? t4.types : void 0) != null ? i2 : [], e3 = 0, n4 = o3.length; n4 > e3; e3++) + r3 = o3[e3], s4[r3] = true; + return s4.Files || s4["application/x-trix-document"] || s4["text/html"] || s4["text/plain"]; + }, s3.prototype.getPastedHTMLUsingHiddenElement = function(t4) { + var n4, i2, o3; + return i2 = this.getSelectedRange(), o3 = {position: "absolute", left: window.pageXOffset + "px", top: window.pageYOffset + "px", opacity: 0}, n4 = c2({style: o3, tagName: "div", editable: true}), document.body.appendChild(n4), n4.focus(), requestAnimationFrame(function(o4) { + return function() { + var r3; + return r3 = n4.innerHTML, e2.removeNode(n4), o4.setSelectedRange(i2), t4(r3); + }; + }(this)); + }, s3.proxyMethod("responder?.getSelectedRange"), s3.proxyMethod("responder?.setSelectedRange"), s3.proxyMethod("responder?.expandSelectionInDirection"), s3.proxyMethod("responder?.selectionIsInCursorTarget"), s3.proxyMethod("responder?.selectionIsExpanded"), s3; + }(e2.InputController), r2 = function(t4) { + var e3, n3; + return (e3 = t4.type) != null && (n3 = e3.match(/\/(\w+)$/)) != null ? n3[1] : void 0; + }, s2 = (typeof " ".codePointAt == "function" ? " ".codePointAt(0) : void 0) != null, p2 = function(t4) { + var n3; + return t4.key && s2 && t4.key.codePointAt(0) === t4.keyCode ? t4.key : (t4.which === null ? n3 = t4.keyCode : t4.which !== 0 && t4.charCode !== 0 && (n3 = t4.charCode), n3 != null && u[n3] !== "escape" ? e2.UTF16String.fromCodepoints([n3]).toString() : void 0); + }, h = function(t4) { + var e3, n3, i2, o3, r3, s3, a3, u2, c3, l2; + if (u2 = t4.clipboardData) { + if (m.call(u2.types, "text/html") >= 0) { + for (c3 = u2.types, i2 = 0, s3 = c3.length; s3 > i2; i2++) + if (l2 = c3[i2], e3 = /^CorePasteboardFlavorType/.test(l2), n3 = /^dyn\./.test(l2) && u2.getData(l2), a3 = e3 || n3) + return true; + return false; + } + return o3 = m.call(u2.types, "com.apple.webarchive") >= 0, r3 = m.call(u2.types, "com.apple.flat-rtfd") >= 0, o3 || r3; + } + }, t3 = function(t4) { + function e3(t5) { + var e4; + this.inputController = t5, e4 = this.inputController, this.responder = e4.responder, this.delegate = e4.delegate, this.inputSummary = e4.inputSummary, this.data = {}; + } + return f(e3, t4), e3.prototype.start = function(t5) { + var e4, n3; + return this.data.start = t5, this.isSignificant() ? (this.inputSummary.eventName === "keypress" && this.inputSummary.textAdded && (e4 = this.responder) != null && e4.deleteInDirection("left"), this.selectionIsExpanded() || (this.insertPlaceholder(), this.requestRender()), this.range = (n3 = this.responder) != null ? n3.getSelectedRange() : void 0) : void 0; + }, e3.prototype.update = function(t5) { + var e4; + return this.data.update = t5, this.isSignificant() && (e4 = this.selectPlaceholder()) ? (this.forgetPlaceholder(), this.range = e4) : void 0; + }, e3.prototype.end = function(t5) { + var e4, n3, i2, o3; + return this.data.end = t5, this.isSignificant() ? (this.forgetPlaceholder(), this.canApplyToDocument() ? (this.setInputSummary({preferDocument: true, didInput: false}), (e4 = this.delegate) != null && e4.inputControllerWillPerformTyping(), (n3 = this.responder) != null && n3.setSelectedRange(this.range), (i2 = this.responder) != null && i2.insertString(this.data.end), (o3 = this.responder) != null ? o3.setSelectedRange(this.range[0] + this.data.end.length) : void 0) : this.data.start != null || this.data.update != null ? (this.requestReparse(), this.inputController.reset()) : void 0) : this.inputController.reset(); + }, e3.prototype.getEndData = function() { + return this.data.end; + }, e3.prototype.isEnded = function() { + return this.getEndData() != null; + }, e3.prototype.isSignificant = function() { + return n2.composesExistingText ? this.inputSummary.didInput : true; + }, e3.prototype.canApplyToDocument = function() { + var t5, e4; + return ((t5 = this.data.start) != null ? t5.length : void 0) === 0 && ((e4 = this.data.end) != null ? e4.length : void 0) > 0 && this.range != null; + }, e3.proxyMethod("inputController.setInputSummary"), e3.proxyMethod("inputController.requestRender"), e3.proxyMethod("inputController.requestReparse"), e3.proxyMethod("responder?.selectionIsExpanded"), e3.proxyMethod("responder?.insertPlaceholder"), e3.proxyMethod("responder?.selectPlaceholder"), e3.proxyMethod("responder?.forgetPlaceholder"), e3; + }(e2.BasicObject); + }.call(this), function() { + var t3, n2, i, o2 = function(t4, e3) { + return function() { + return t4.apply(e3, arguments); + }; + }, r2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + s2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, s2 = {}.hasOwnProperty, a2 = [].indexOf || function(t4) { + for (var e3 = 0, n3 = this.length; n3 > e3; e3++) + if (e3 in this && this[e3] === t4) + return e3; + return -1; + }; + t3 = e2.dataTransferIsPlainText, n2 = e2.keyEventIsKeyboardCommand, i = e2.objectsAreEqual, e2.Level2InputController = function(s3) { + function u() { + return this.render = o2(this.render, this), u.__super__.constructor.apply(this, arguments); + } + var c2, l, h, p2, d, f; + return r2(u, s3), u.prototype.elementDidMutate = function() { + var t4; + return this.scheduledRender ? this.composing && (t4 = this.delegate) != null && typeof t4.inputControllerDidAllowUnhandledInput == "function" ? t4.inputControllerDidAllowUnhandledInput() : void 0 : this.reparse(); + }, u.prototype.scheduleRender = function() { + return this.scheduledRender != null ? this.scheduledRender : this.scheduledRender = requestAnimationFrame(this.render); + }, u.prototype.render = function() { + var t4; + return cancelAnimationFrame(this.scheduledRender), this.scheduledRender = null, this.composing || (t4 = this.delegate) != null && t4.render(), typeof this.afterRender == "function" && this.afterRender(), this.afterRender = null; + }, u.prototype.reparse = function() { + var t4; + return (t4 = this.delegate) != null ? t4.reparse() : void 0; + }, u.prototype.events = {keydown: function(t4) { + var e3, i2, o3, r3; + if (n2(t4)) { + if (e3 = l(t4), (r3 = this.delegate) != null ? r3.inputControllerDidReceiveKeyboardCommand(e3) : void 0) + return t4.preventDefault(); + } else if (o3 = t4.key, t4.altKey && (o3 += "+Alt"), t4.shiftKey && (o3 += "+Shift"), i2 = this.keys[o3]) + return this.withEvent(t4, i2); + }, paste: function(t4) { + var e3, n3, i2, o3, r3, s4, a3, u2, c3; + return h(t4) ? (t4.preventDefault(), this.attachFiles(t4.clipboardData.files)) : p2(t4) ? (t4.preventDefault(), n3 = {type: "text/plain", string: t4.clipboardData.getData("text/plain")}, (i2 = this.delegate) != null && i2.inputControllerWillPaste(n3), (o3 = this.responder) != null && o3.insertString(n3.string), this.render(), (r3 = this.delegate) != null ? r3.inputControllerDidPaste(n3) : void 0) : (e3 = (s4 = t4.clipboardData) != null ? s4.getData("URL") : void 0) ? (t4.preventDefault(), n3 = {type: "text/html", html: this.createLinkHTML(e3)}, (a3 = this.delegate) != null && a3.inputControllerWillPaste(n3), (u2 = this.responder) != null && u2.insertHTML(n3.html), this.render(), (c3 = this.delegate) != null ? c3.inputControllerDidPaste(n3) : void 0) : void 0; + }, beforeinput: function(t4) { + var e3; + return (e3 = this.inputTypes[t4.inputType]) ? (this.withEvent(t4, e3), this.scheduleRender()) : void 0; + }, input: function() { + return e2.selectionChangeObserver.reset(); + }, dragstart: function(t4) { + var e3, n3; + return ((e3 = this.responder) != null ? e3.selectionContainsAttachments() : void 0) ? (t4.dataTransfer.setData("application/x-trix-dragging", true), this.dragging = {range: (n3 = this.responder) != null ? n3.getSelectedRange() : void 0, point: d(t4)}) : void 0; + }, dragenter: function(t4) { + return c2(t4) ? t4.preventDefault() : void 0; + }, dragover: function(t4) { + var e3, n3; + if (this.dragging) { + if (t4.preventDefault(), e3 = d(t4), !i(e3, this.dragging.point)) + return this.dragging.point = e3, (n3 = this.responder) != null ? n3.setLocationRangeFromPointRange(e3) : void 0; + } else if (c2(t4)) + return t4.preventDefault(); + }, drop: function(t4) { + var e3, n3, i2, o3; + return this.dragging ? (t4.preventDefault(), (n3 = this.delegate) != null && n3.inputControllerWillMoveText(), (i2 = this.responder) != null && i2.moveTextFromRange(this.dragging.range), this.dragging = null, this.scheduleRender()) : c2(t4) ? (t4.preventDefault(), e3 = d(t4), (o3 = this.responder) != null && o3.setLocationRangeFromPointRange(e3), this.attachFiles(t4.dataTransfer.files)) : void 0; + }, dragend: function() { + var t4; + return this.dragging ? ((t4 = this.responder) != null && t4.setSelectedRange(this.dragging.range), this.dragging = null) : void 0; + }, compositionend: function() { + return this.composing ? (this.composing = false, this.scheduleRender()) : void 0; + }}, u.prototype.keys = {ArrowLeft: function() { + var t4, e3; + return ((t4 = this.responder) != null ? t4.shouldManageMovingCursorInDirection("backward") : void 0) ? (this.event.preventDefault(), (e3 = this.responder) != null ? e3.moveCursorInDirection("backward") : void 0) : void 0; + }, ArrowRight: function() { + var t4, e3; + return ((t4 = this.responder) != null ? t4.shouldManageMovingCursorInDirection("forward") : void 0) ? (this.event.preventDefault(), (e3 = this.responder) != null ? e3.moveCursorInDirection("forward") : void 0) : void 0; + }, Backspace: function() { + var t4, e3, n3; + return ((t4 = this.responder) != null ? t4.shouldManageDeletingInDirection("backward") : void 0) ? (this.event.preventDefault(), (e3 = this.delegate) != null && e3.inputControllerWillPerformTyping(), (n3 = this.responder) != null && n3.deleteInDirection("backward"), this.render()) : void 0; + }, Tab: function() { + var t4, e3; + return ((t4 = this.responder) != null ? t4.canIncreaseNestingLevel() : void 0) ? (this.event.preventDefault(), (e3 = this.responder) != null && e3.increaseNestingLevel(), this.render()) : void 0; + }, "Tab+Shift": function() { + var t4, e3; + return ((t4 = this.responder) != null ? t4.canDecreaseNestingLevel() : void 0) ? (this.event.preventDefault(), (e3 = this.responder) != null && e3.decreaseNestingLevel(), this.render()) : void 0; + }}, u.prototype.inputTypes = {deleteByComposition: function() { + return this.deleteInDirection("backward", {recordUndoEntry: false}); + }, deleteByCut: function() { + return this.deleteInDirection("backward"); + }, deleteByDrag: function() { + return this.event.preventDefault(), this.withTargetDOMRange(function() { + var t4; + return this.deleteByDragRange = (t4 = this.responder) != null ? t4.getSelectedRange() : void 0; + }); + }, deleteCompositionText: function() { + return this.deleteInDirection("backward", {recordUndoEntry: false}); + }, deleteContent: function() { + return this.deleteInDirection("backward"); + }, deleteContentBackward: function() { + return this.deleteInDirection("backward"); + }, deleteContentForward: function() { + return this.deleteInDirection("forward"); + }, deleteEntireSoftLine: function() { + return this.deleteInDirection("forward"); + }, deleteHardLineBackward: function() { + return this.deleteInDirection("backward"); + }, deleteHardLineForward: function() { + return this.deleteInDirection("forward"); + }, deleteSoftLineBackward: function() { + return this.deleteInDirection("backward"); + }, deleteSoftLineForward: function() { + return this.deleteInDirection("forward"); + }, deleteWordBackward: function() { + return this.deleteInDirection("backward"); + }, deleteWordForward: function() { + return this.deleteInDirection("forward"); + }, formatBackColor: function() { + return this.activateAttributeIfSupported("backgroundColor", this.event.data); + }, formatBold: function() { + return this.toggleAttributeIfSupported("bold"); + }, formatFontColor: function() { + return this.activateAttributeIfSupported("color", this.event.data); + }, formatFontName: function() { + return this.activateAttributeIfSupported("font", this.event.data); + }, formatIndent: function() { + var t4; + return ((t4 = this.responder) != null ? t4.canIncreaseNestingLevel() : void 0) ? this.withTargetDOMRange(function() { + var t5; + return (t5 = this.responder) != null ? t5.increaseNestingLevel() : void 0; + }) : void 0; + }, formatItalic: function() { + return this.toggleAttributeIfSupported("italic"); + }, formatJustifyCenter: function() { + return this.toggleAttributeIfSupported("justifyCenter"); + }, formatJustifyFull: function() { + return this.toggleAttributeIfSupported("justifyFull"); + }, formatJustifyLeft: function() { + return this.toggleAttributeIfSupported("justifyLeft"); + }, formatJustifyRight: function() { + return this.toggleAttributeIfSupported("justifyRight"); + }, formatOutdent: function() { + var t4; + return ((t4 = this.responder) != null ? t4.canDecreaseNestingLevel() : void 0) ? this.withTargetDOMRange(function() { + var t5; + return (t5 = this.responder) != null ? t5.decreaseNestingLevel() : void 0; + }) : void 0; + }, formatRemove: function() { + return this.withTargetDOMRange(function() { + var t4, e3, n3, i2; + i2 = []; + for (t4 in (e3 = this.responder) != null ? e3.getCurrentAttributes() : void 0) + i2.push((n3 = this.responder) != null ? n3.removeCurrentAttribute(t4) : void 0); + return i2; + }); + }, formatSetBlockTextDirection: function() { + return this.activateAttributeIfSupported("blockDir", this.event.data); + }, formatSetInlineTextDirection: function() { + return this.activateAttributeIfSupported("textDir", this.event.data); + }, formatStrikeThrough: function() { + return this.toggleAttributeIfSupported("strike"); + }, formatSubscript: function() { + return this.toggleAttributeIfSupported("sub"); + }, formatSuperscript: function() { + return this.toggleAttributeIfSupported("sup"); + }, formatUnderline: function() { + return this.toggleAttributeIfSupported("underline"); + }, historyRedo: function() { + var t4; + return (t4 = this.delegate) != null ? t4.inputControllerWillPerformRedo() : void 0; + }, historyUndo: function() { + var t4; + return (t4 = this.delegate) != null ? t4.inputControllerWillPerformUndo() : void 0; + }, insertCompositionText: function() { + return this.composing = true, this.insertString(this.event.data); + }, insertFromComposition: function() { + return this.composing = false, this.insertString(this.event.data); + }, insertFromDrop: function() { + var t4, e3; + return (t4 = this.deleteByDragRange) ? (this.deleteByDragRange = null, (e3 = this.delegate) != null && e3.inputControllerWillMoveText(), this.withTargetDOMRange(function() { + var e4; + return (e4 = this.responder) != null ? e4.moveTextFromRange(t4) : void 0; + })) : void 0; + }, insertFromPaste: function() { + var n3, i2, o3, r3, s4, a3, u2, c3, l2, h2, p3; + return n3 = this.event.dataTransfer, s4 = {dataTransfer: n3}, (i2 = n3.getData("URL")) ? (this.event.preventDefault(), s4.type = "text/html", p3 = (r3 = n3.getData("public.url-name")) ? e2.squishBreakableWhitespace(r3).trim() : i2, s4.html = this.createLinkHTML(i2, p3), (a3 = this.delegate) != null && a3.inputControllerWillPaste(s4), this.withTargetDOMRange(function() { + var t4; + return (t4 = this.responder) != null ? t4.insertHTML(s4.html) : void 0; + }), this.afterRender = function(t4) { + return function() { + var e3; + return (e3 = t4.delegate) != null ? e3.inputControllerDidPaste(s4) : void 0; + }; + }(this)) : t3(n3) ? (s4.type = "text/plain", s4.string = n3.getData("text/plain"), (u2 = this.delegate) != null && u2.inputControllerWillPaste(s4), this.withTargetDOMRange(function() { + var t4; + return (t4 = this.responder) != null ? t4.insertString(s4.string) : void 0; + }), this.afterRender = function(t4) { + return function() { + var e3; + return (e3 = t4.delegate) != null ? e3.inputControllerDidPaste(s4) : void 0; + }; + }(this)) : (o3 = n3.getData("text/html")) ? (this.event.preventDefault(), s4.type = "text/html", s4.html = o3, (c3 = this.delegate) != null && c3.inputControllerWillPaste(s4), this.withTargetDOMRange(function() { + var t4; + return (t4 = this.responder) != null ? t4.insertHTML(s4.html) : void 0; + }), this.afterRender = function(t4) { + return function() { + var e3; + return (e3 = t4.delegate) != null ? e3.inputControllerDidPaste(s4) : void 0; + }; + }(this)) : ((l2 = n3.files) != null ? l2.length : void 0) ? (s4.type = "File", s4.file = n3.files[0], (h2 = this.delegate) != null && h2.inputControllerWillPaste(s4), this.withTargetDOMRange(function() { + var t4; + return (t4 = this.responder) != null ? t4.insertFile(s4.file) : void 0; + }), this.afterRender = function(t4) { + return function() { + var e3; + return (e3 = t4.delegate) != null ? e3.inputControllerDidPaste(s4) : void 0; + }; + }(this)) : void 0; + }, insertFromYank: function() { + return this.insertString(this.event.data); + }, insertLineBreak: function() { + return this.insertString("\n"); + }, insertLink: function() { + return this.activateAttributeIfSupported("href", this.event.data); + }, insertOrderedList: function() { + return this.toggleAttributeIfSupported("number"); + }, insertParagraph: function() { + var t4; + return (t4 = this.delegate) != null && t4.inputControllerWillPerformTyping(), this.withTargetDOMRange(function() { + var t5; + return (t5 = this.responder) != null ? t5.insertLineBreak() : void 0; + }); + }, insertReplacementText: function() { + return this.insertString(this.event.dataTransfer.getData("text/plain"), {updatePosition: false}); + }, insertText: function() { + var t4, e3; + return this.insertString((t4 = this.event.data) != null ? t4 : (e3 = this.event.dataTransfer) != null ? e3.getData("text/plain") : void 0); + }, insertTranspose: function() { + return this.insertString(this.event.data); + }, insertUnorderedList: function() { + return this.toggleAttributeIfSupported("bullet"); + }}, u.prototype.insertString = function(t4, e3) { + var n3; + return t4 == null && (t4 = ""), (n3 = this.delegate) != null && n3.inputControllerWillPerformTyping(), this.withTargetDOMRange(function() { + var n4; + return (n4 = this.responder) != null ? n4.insertString(t4, e3) : void 0; + }); + }, u.prototype.toggleAttributeIfSupported = function(t4) { + var n3; + return a2.call(e2.getAllAttributeNames(), t4) >= 0 ? ((n3 = this.delegate) != null && n3.inputControllerWillPerformFormatting(t4), this.withTargetDOMRange(function() { + var e3; + return (e3 = this.responder) != null ? e3.toggleCurrentAttribute(t4) : void 0; + })) : void 0; + }, u.prototype.activateAttributeIfSupported = function(t4, n3) { + var i2; + return a2.call(e2.getAllAttributeNames(), t4) >= 0 ? ((i2 = this.delegate) != null && i2.inputControllerWillPerformFormatting(t4), this.withTargetDOMRange(function() { + var e3; + return (e3 = this.responder) != null ? e3.setCurrentAttribute(t4, n3) : void 0; + })) : void 0; + }, u.prototype.deleteInDirection = function(t4, e3) { + var n3, i2, o3, r3; + return o3 = (e3 != null ? e3 : {recordUndoEntry: true}).recordUndoEntry, o3 && (r3 = this.delegate) != null && r3.inputControllerWillPerformTyping(), i2 = function(e4) { + return function() { + var n4; + return (n4 = e4.responder) != null ? n4.deleteInDirection(t4) : void 0; + }; + }(this), (n3 = this.getTargetDOMRange({minLength: 2})) ? this.withTargetDOMRange(n3, i2) : i2(); + }, u.prototype.withTargetDOMRange = function(t4, n3) { + var i2; + return typeof t4 == "function" && (n3 = t4, t4 = this.getTargetDOMRange()), t4 ? (i2 = this.responder) != null ? i2.withTargetDOMRange(t4, n3.bind(this)) : void 0 : (e2.selectionChangeObserver.reset(), n3.call(this)); + }, u.prototype.getTargetDOMRange = function(t4) { + var e3, n3, i2, o3; + return i2 = (t4 != null ? t4 : {minLength: 0}).minLength, (o3 = typeof (e3 = this.event).getTargetRanges == "function" ? e3.getTargetRanges() : void 0) && o3.length && (n3 = f(o3[0]), i2 === 0 || n3.toString().length >= i2) ? n3 : void 0; + }, f = function(t4) { + var e3; + return e3 = document.createRange(), e3.setStart(t4.startContainer, t4.startOffset), e3.setEnd(t4.endContainer, t4.endOffset), e3; + }, u.prototype.withEvent = function(t4, e3) { + var n3; + this.event = t4; + try { + n3 = e3.call(this); + } finally { + this.event = null; + } + return n3; + }, c2 = function(t4) { + var e3, n3; + return a2.call((e3 = (n3 = t4.dataTransfer) != null ? n3.types : void 0) != null ? e3 : [], "Files") >= 0; + }, h = function(t4) { + var e3; + return (e3 = t4.clipboardData) ? a2.call(e3.types, "Files") >= 0 && e3.types.length === 1 && e3.files.length >= 1 : void 0; + }, p2 = function(t4) { + var e3; + return (e3 = t4.clipboardData) ? a2.call(e3.types, "text/plain") >= 0 && e3.types.length === 1 : void 0; + }, l = function(t4) { + var e3; + return e3 = [], t4.altKey && e3.push("alt"), t4.shiftKey && e3.push("shift"), e3.push(t4.key), e3; + }, d = function(t4) { + return {x: t4.clientX, y: t4.clientY}; + }, u; + }(e2.InputController); + }.call(this), function() { + var t3, n2, i, o2, r2, s2, a2, u, c2 = function(t4, e3) { + return function() { + return t4.apply(e3, arguments); + }; + }, l = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + h.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, h = {}.hasOwnProperty; + n2 = e2.defer, i = e2.handleEvent, s2 = e2.makeElement, u = e2.tagName, a2 = e2.config, r2 = a2.lang, t3 = a2.css, o2 = a2.keyNames, e2.AttachmentEditorController = function(a3) { + function h2(t4, e3, n3, i2) { + this.attachmentPiece = t4, this.element = e3, this.container = n3, this.options = i2 != null ? i2 : {}, this.didBlurCaption = c2(this.didBlurCaption, this), this.didChangeCaption = c2(this.didChangeCaption, this), this.didInputCaption = c2(this.didInputCaption, this), this.didKeyDownCaption = c2(this.didKeyDownCaption, this), this.didClickActionButton = c2(this.didClickActionButton, this), this.didClickToolbar = c2(this.didClickToolbar, this), this.attachment = this.attachmentPiece.attachment, u(this.element) === "a" && (this.element = this.element.firstChild), this.install(); + } + var p2; + return l(h2, a3), p2 = function(t4) { + return function() { + var e3; + return e3 = t4.apply(this, arguments), e3["do"](), this.undos == null && (this.undos = []), this.undos.push(e3.undo); + }; + }, h2.prototype.install = function() { + return this.makeElementMutable(), this.addToolbar(), this.attachment.isPreviewable() ? this.installCaptionEditor() : void 0; + }, h2.prototype.uninstall = function() { + var t4, e3; + for (this.savePendingCaption(); e3 = this.undos.pop(); ) + e3(); + return (t4 = this.delegate) != null ? t4.didUninstallAttachmentEditor(this) : void 0; + }, h2.prototype.savePendingCaption = function() { + var t4, e3, n3; + return this.pendingCaption != null ? (t4 = this.pendingCaption, this.pendingCaption = null, t4 ? (e3 = this.delegate) != null && typeof e3.attachmentEditorDidRequestUpdatingAttributesForAttachment == "function" ? e3.attachmentEditorDidRequestUpdatingAttributesForAttachment({caption: t4}, this.attachment) : void 0 : (n3 = this.delegate) != null && typeof n3.attachmentEditorDidRequestRemovingAttributeForAttachment == "function" ? n3.attachmentEditorDidRequestRemovingAttributeForAttachment("caption", this.attachment) : void 0) : void 0; + }, h2.prototype.makeElementMutable = p2(function() { + return {do: function(t4) { + return function() { + return t4.element.dataset.trixMutable = true; + }; + }(this), undo: function(t4) { + return function() { + return delete t4.element.dataset.trixMutable; + }; + }(this)}; + }), h2.prototype.addToolbar = p2(function() { + var n3; + return n3 = s2({tagName: "div", className: t3.attachmentToolbar, data: {trixMutable: true}, childNodes: s2({tagName: "div", className: "trix-button-row", childNodes: s2({tagName: "span", className: "trix-button-group trix-button-group--actions", childNodes: s2({tagName: "button", className: "trix-button trix-button--remove", textContent: r2.remove, attributes: {title: r2.remove}, data: {trixAction: "remove"}})})})}), this.attachment.isPreviewable() && n3.appendChild(s2({tagName: "div", className: t3.attachmentMetadataContainer, childNodes: s2({tagName: "span", className: t3.attachmentMetadata, childNodes: [s2({tagName: "span", className: t3.attachmentName, textContent: this.attachment.getFilename(), attributes: {title: this.attachment.getFilename()}}), s2({tagName: "span", className: t3.attachmentSize, textContent: this.attachment.getFormattedFilesize()})]})})), i("click", {onElement: n3, withCallback: this.didClickToolbar}), i("click", {onElement: n3, matchingSelector: "[data-trix-action]", withCallback: this.didClickActionButton}), {do: function(t4) { + return function() { + return t4.element.appendChild(n3); + }; + }(this), undo: function() { + return function() { + return e2.removeNode(n3); + }; + }(this)}; + }), h2.prototype.installCaptionEditor = p2(function() { + var o3, a4, u2, c3, l2; + return c3 = s2({tagName: "textarea", className: t3.attachmentCaptionEditor, attributes: {placeholder: r2.captionPlaceholder}, data: {trixMutable: true}}), c3.value = this.attachmentPiece.getCaption(), l2 = c3.cloneNode(), l2.classList.add("trix-autoresize-clone"), l2.tabIndex = -1, o3 = function() { + return l2.value = c3.value, c3.style.height = l2.scrollHeight + "px"; + }, i("input", {onElement: c3, withCallback: o3}), i("input", {onElement: c3, withCallback: this.didInputCaption}), i("keydown", {onElement: c3, withCallback: this.didKeyDownCaption}), i("change", {onElement: c3, withCallback: this.didChangeCaption}), i("blur", {onElement: c3, withCallback: this.didBlurCaption}), u2 = this.element.querySelector("figcaption"), a4 = u2.cloneNode(), {do: function(e3) { + return function() { + return u2.style.display = "none", a4.appendChild(c3), a4.appendChild(l2), a4.classList.add(t3.attachmentCaption + "--editing"), u2.parentElement.insertBefore(a4, u2), o3(), e3.options.editCaption ? n2(function() { + return c3.focus(); + }) : void 0; + }; + }(this), undo: function() { + return e2.removeNode(a4), u2.style.display = null; + }}; + }), h2.prototype.didClickToolbar = function(t4) { + return t4.preventDefault(), t4.stopPropagation(); + }, h2.prototype.didClickActionButton = function(t4) { + var e3, n3; + switch (e3 = t4.target.getAttribute("data-trix-action")) { + case "remove": + return (n3 = this.delegate) != null ? n3.attachmentEditorDidRequestRemovalOfAttachment(this.attachment) : void 0; + } + }, h2.prototype.didKeyDownCaption = function(t4) { + var e3; + return o2[t4.keyCode] === "return" ? (t4.preventDefault(), this.savePendingCaption(), (e3 = this.delegate) != null && typeof e3.attachmentEditorDidRequestDeselectingAttachment == "function" ? e3.attachmentEditorDidRequestDeselectingAttachment(this.attachment) : void 0) : void 0; + }, h2.prototype.didInputCaption = function(t4) { + return this.pendingCaption = t4.target.value.replace(/\s/g, " ").trim(); + }, h2.prototype.didChangeCaption = function() { + return this.savePendingCaption(); + }, h2.prototype.didBlurCaption = function() { + return this.savePendingCaption(); + }, h2; + }(e2.BasicObject); + }.call(this), function() { + var t3, n2, i, o2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + r2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, r2 = {}.hasOwnProperty; + i = e2.makeElement, t3 = e2.config.css, e2.AttachmentView = function(r3) { + function s2() { + s2.__super__.constructor.apply(this, arguments), this.attachment = this.object, this.attachment.uploadProgressDelegate = this, this.attachmentPiece = this.options.piece; + } + var a2; + return o2(s2, r3), s2.attachmentSelector = "[data-trix-attachment]", s2.prototype.createContentNodes = function() { + return []; + }, s2.prototype.createNodes = function() { + var e3, n3, o3, r4, s3, u, c2; + if (e3 = r4 = i({tagName: "figure", className: this.getClassName(), data: this.getData(), editable: false}), (n3 = this.getHref()) && (r4 = i({tagName: "a", editable: false, attributes: {href: n3, tabindex: -1}}), e3.appendChild(r4)), this.attachment.hasContent()) + r4.innerHTML = this.attachment.getContent(); + else + for (c2 = this.createContentNodes(), o3 = 0, s3 = c2.length; s3 > o3; o3++) + u = c2[o3], r4.appendChild(u); + return r4.appendChild(this.createCaptionElement()), this.attachment.isPending() && (this.progressElement = i({tagName: "progress", attributes: {class: t3.attachmentProgress, value: this.attachment.getUploadProgress(), max: 100}, data: {trixMutable: true, trixStoreKey: ["progressElement", this.attachment.id].join("/")}}), e3.appendChild(this.progressElement)), [a2("left"), e3, a2("right")]; + }, s2.prototype.createCaptionElement = function() { + var e3, n3, o3, r4, s3, a3, u; + return o3 = i({tagName: "figcaption", className: t3.attachmentCaption}), (e3 = this.attachmentPiece.getCaption()) ? (o3.classList.add(t3.attachmentCaption + "--edited"), o3.textContent = e3) : (n3 = this.getCaptionConfig(), n3.name && (r4 = this.attachment.getFilename()), n3.size && (a3 = this.attachment.getFormattedFilesize()), r4 && (s3 = i({tagName: "span", className: t3.attachmentName, textContent: r4}), o3.appendChild(s3)), a3 && (r4 && o3.appendChild(document.createTextNode(" ")), u = i({tagName: "span", className: t3.attachmentSize, textContent: a3}), o3.appendChild(u))), o3; + }, s2.prototype.getClassName = function() { + var e3, n3; + return n3 = [t3.attachment, t3.attachment + "--" + this.attachment.getType()], (e3 = this.attachment.getExtension()) && n3.push(t3.attachment + "--" + e3), n3.join(" "); + }, s2.prototype.getData = function() { + var t4, e3; + return e3 = {trixAttachment: JSON.stringify(this.attachment), trixContentType: this.attachment.getContentType(), trixId: this.attachment.id}, t4 = this.attachmentPiece.attributes, t4.isEmpty() || (e3.trixAttributes = JSON.stringify(t4)), this.attachment.isPending() && (e3.trixSerialize = false), e3; + }, s2.prototype.getHref = function() { + return n2(this.attachment.getContent(), "a") ? void 0 : this.attachment.getHref(); + }, s2.prototype.getCaptionConfig = function() { + var t4, n3, i2; + return i2 = this.attachment.getType(), t4 = e2.copyObject((n3 = e2.config.attachments[i2]) != null ? n3.caption : void 0), i2 === "file" && (t4.name = true), t4; + }, s2.prototype.findProgressElement = function() { + var t4; + return (t4 = this.findElement()) != null ? t4.querySelector("progress") : void 0; + }, a2 = function(t4) { + return i({tagName: "span", textContent: e2.ZERO_WIDTH_SPACE, data: {trixCursorTarget: t4, trixSerialize: false}}); + }, s2.prototype.attachmentDidChangeUploadProgress = function() { + var t4, e3; + return e3 = this.attachment.getUploadProgress(), (t4 = this.findProgressElement()) != null ? t4.value = e3 : void 0; + }, s2; + }(e2.ObjectView), n2 = function(t4, e3) { + var n3; + return n3 = i("div"), n3.innerHTML = t4 != null ? t4 : "", n3.querySelector(e3); + }; + }.call(this), function() { + var t3, n2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var o2 in e3) + i.call(e3, o2) && (t4[o2] = e3[o2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, i = {}.hasOwnProperty; + t3 = e2.makeElement, e2.PreviewableAttachmentView = function(i2) { + function o2() { + o2.__super__.constructor.apply(this, arguments), this.attachment.previewDelegate = this; + } + return n2(o2, i2), o2.prototype.createContentNodes = function() { + return this.image = t3({tagName: "img", attributes: {src: ""}, data: {trixMutable: true}}), this.refresh(this.image), [this.image]; + }, o2.prototype.createCaptionElement = function() { + var t4; + return t4 = o2.__super__.createCaptionElement.apply(this, arguments), t4.textContent || t4.setAttribute("data-trix-placeholder", e2.config.lang.captionPlaceholder), t4; + }, o2.prototype.refresh = function(t4) { + var e3; + return t4 == null && (t4 = (e3 = this.findElement()) != null ? e3.querySelector("img") : void 0), t4 ? this.updateAttributesForImage(t4) : void 0; + }, o2.prototype.updateAttributesForImage = function(t4) { + var e3, n3, i3, o3, r2, s2; + return r2 = this.attachment.getURL(), n3 = this.attachment.getPreviewURL(), t4.src = n3 || r2, n3 === r2 ? t4.removeAttribute("data-trix-serialized-attributes") : (i3 = JSON.stringify({src: r2}), t4.setAttribute("data-trix-serialized-attributes", i3)), s2 = this.attachment.getWidth(), e3 = this.attachment.getHeight(), s2 != null && (t4.width = s2), e3 != null && (t4.height = e3), o3 = ["imageElement", this.attachment.id, t4.src, t4.width, t4.height].join("/"), t4.dataset.trixStoreKey = o3; + }, o2.prototype.attachmentDidChangeAttributes = function() { + return this.refresh(this.image), this.refresh(); + }, o2; + }(e2.AttachmentView); + }.call(this), function() { + var t3, n2, i, o2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + r2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, r2 = {}.hasOwnProperty; + i = e2.makeElement, t3 = e2.findInnerElement, n2 = e2.getTextConfig, e2.PieceView = function(r3) { + function s2() { + var t4; + s2.__super__.constructor.apply(this, arguments), this.piece = this.object, this.attributes = this.piece.getAttributes(), t4 = this.options, this.textConfig = t4.textConfig, this.context = t4.context, this.piece.attachment ? this.attachment = this.piece.attachment : this.string = this.piece.toString(); + } + var a2; + return o2(s2, r3), s2.prototype.createNodes = function() { + var e3, n3, i2, o3, r4, s3; + if (s3 = this.attachment ? this.createAttachmentNodes() : this.createStringNodes(), e3 = this.createElement()) { + for (i2 = t3(e3), n3 = 0, o3 = s3.length; o3 > n3; n3++) + r4 = s3[n3], i2.appendChild(r4); + s3 = [e3]; + } + return s3; + }, s2.prototype.createAttachmentNodes = function() { + var t4, n3; + return t4 = this.attachment.isPreviewable() ? e2.PreviewableAttachmentView : e2.AttachmentView, n3 = this.createChildView(t4, this.piece.attachment, {piece: this.piece}), n3.getNodes(); + }, s2.prototype.createStringNodes = function() { + var t4, e3, n3, o3, r4, s3, a3, u, c2, l; + if ((u = this.textConfig) != null ? u.plaintext : void 0) + return [document.createTextNode(this.string)]; + for (a3 = [], c2 = this.string.split("\n"), n3 = e3 = 0, o3 = c2.length; o3 > e3; n3 = ++e3) + l = c2[n3], n3 > 0 && (t4 = i("br"), a3.push(t4)), (r4 = l.length) && (s3 = document.createTextNode(this.preserveSpaces(l)), a3.push(s3)); + return a3; + }, s2.prototype.createElement = function() { + var t4, e3, o3, r4, s3, a3, u, c2, l; + c2 = {}, a3 = this.attributes; + for (r4 in a3) + if (l = a3[r4], (t4 = n2(r4)) && (t4.tagName && (s3 = i(t4.tagName), o3 ? (o3.appendChild(s3), o3 = s3) : e3 = o3 = s3), t4.styleProperty && (c2[t4.styleProperty] = l), t4.style)) { + u = t4.style; + for (r4 in u) + l = u[r4], c2[r4] = l; + } + if (Object.keys(c2).length) { + e3 == null && (e3 = i("span")); + for (r4 in c2) + l = c2[r4], e3.style[r4] = l; + } + return e3; + }, s2.prototype.createContainerElement = function() { + var t4, e3, o3, r4, s3; + r4 = this.attributes; + for (o3 in r4) + if (s3 = r4[o3], (e3 = n2(o3)) && e3.groupTagName) + return t4 = {}, t4[o3] = s3, i(e3.groupTagName, t4); + }, a2 = e2.NON_BREAKING_SPACE, s2.prototype.preserveSpaces = function(t4) { + return this.context.isLast && (t4 = t4.replace(/\ $/, a2)), t4 = t4.replace(/(\S)\ {3}(\S)/g, "$1 " + a2 + " $2").replace(/\ {2}/g, a2 + " ").replace(/\ {2}/g, " " + a2), (this.context.isFirst || this.context.followsWhitespace) && (t4 = t4.replace(/^\ /, a2)), t4; + }, s2; + }(e2.ObjectView); + }.call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.TextView = function(n3) { + function i() { + i.__super__.constructor.apply(this, arguments), this.text = this.object, this.textConfig = this.options.textConfig; + } + var o2; + return t3(i, n3), i.prototype.createNodes = function() { + var t4, n4, i2, r2, s2, a2, u, c2, l, h; + for (a2 = [], c2 = e2.ObjectGroup.groupObjects(this.getPieces()), r2 = c2.length - 1, i2 = n4 = 0, s2 = c2.length; s2 > n4; i2 = ++n4) + u = c2[i2], t4 = {}, i2 === 0 && (t4.isFirst = true), i2 === r2 && (t4.isLast = true), o2(l) && (t4.followsWhitespace = true), h = this.findOrCreateCachedChildView(e2.PieceView, u, {textConfig: this.textConfig, context: t4}), a2.push.apply(a2, h.getNodes()), l = u; + return a2; + }, i.prototype.getPieces = function() { + var t4, e3, n4, i2, o3; + for (i2 = this.text.getPieces(), o3 = [], t4 = 0, e3 = i2.length; e3 > t4; t4++) + n4 = i2[t4], n4.hasAttribute("blockBreak") || o3.push(n4); + return o3; + }, o2 = function(t4) { + return /\s$/.test(t4 != null ? t4.toString() : void 0); + }, i; + }(e2.ObjectView); + }.call(this), function() { + var t3, n2, i, o2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + r2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, r2 = {}.hasOwnProperty; + i = e2.makeElement, n2 = e2.getBlockConfig, t3 = e2.config.css, e2.BlockView = function(r3) { + function s2() { + s2.__super__.constructor.apply(this, arguments), this.block = this.object, this.attributes = this.block.getAttributes(); + } + return o2(s2, r3), s2.prototype.createNodes = function() { + var t4, o3, r4, s3, a2, u, c2, l, h, p2, d; + if (o3 = document.createComment("block"), c2 = [o3], this.block.isEmpty() ? c2.push(i("br")) : (p2 = (l = n2(this.block.getLastAttribute())) != null ? l.text : void 0, d = this.findOrCreateCachedChildView(e2.TextView, this.block.text, {textConfig: p2}), c2.push.apply(c2, d.getNodes()), this.shouldAddExtraNewlineElement() && c2.push(i("br"))), this.attributes.length) + return c2; + for (h = e2.config.blockAttributes["default"].tagName, this.block.isRTL() && (t4 = {dir: "rtl"}), r4 = i({tagName: h, attributes: t4}), s3 = 0, a2 = c2.length; a2 > s3; s3++) + u = c2[s3], r4.appendChild(u); + return [r4]; + }, s2.prototype.createContainerElement = function(e3) { + var o3, r4, s3, a2, u; + return o3 = this.attributes[e3], u = n2(o3).tagName, e3 === 0 && this.block.isRTL() && (r4 = {dir: "rtl"}), o3 === "attachmentGallery" && (a2 = this.block.getBlockBreakPosition(), s3 = t3.attachmentGallery + " " + t3.attachmentGallery + "--" + a2), i({tagName: u, className: s3, attributes: r4}); + }, s2.prototype.shouldAddExtraNewlineElement = function() { + return /\n\n$/.test(this.block.toString()); + }, s2; + }(e2.ObjectView); + }.call(this), function() { + var t3, n2, i = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + o2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, o2 = {}.hasOwnProperty; + t3 = e2.defer, n2 = e2.makeElement, e2.DocumentView = function(o3) { + function r2() { + r2.__super__.constructor.apply(this, arguments), this.element = this.options.element, this.elementStore = new e2.ElementStore(), this.setDocument(this.object); + } + var s2, a2, u; + return i(r2, o3), r2.render = function(t4) { + var e3, i2; + return e3 = n2("div"), i2 = new this(t4, {element: e3}), i2.render(), i2.sync(), e3; + }, r2.prototype.setDocument = function(t4) { + return t4.isEqualTo(this.document) ? void 0 : this.document = this.object = t4; + }, r2.prototype.render = function() { + var t4, i2, o4, r3, s3, a3, u2; + if (this.childViews = [], this.shadowElement = n2("div"), !this.document.isEmpty()) { + for (s3 = e2.ObjectGroup.groupObjects(this.document.getBlocks(), {asTree: true}), a3 = [], t4 = 0, i2 = s3.length; i2 > t4; t4++) + r3 = s3[t4], u2 = this.findOrCreateCachedChildView(e2.BlockView, r3), a3.push(function() { + var t5, e3, n3, i3; + for (n3 = u2.getNodes(), i3 = [], t5 = 0, e3 = n3.length; e3 > t5; t5++) + o4 = n3[t5], i3.push(this.shadowElement.appendChild(o4)); + return i3; + }.call(this)); + return a3; + } + }, r2.prototype.isSynced = function() { + return s2(this.shadowElement, this.element); + }, r2.prototype.sync = function() { + var t4; + for (t4 = this.createDocumentFragmentForSync(); this.element.lastChild; ) + this.element.removeChild(this.element.lastChild); + return this.element.appendChild(t4), this.didSync(); + }, r2.prototype.didSync = function() { + return this.elementStore.reset(a2(this.element)), t3(function(t4) { + return function() { + return t4.garbageCollectCachedViews(); + }; + }(this)); + }, r2.prototype.createDocumentFragmentForSync = function() { + var t4, e3, n3, i2, o4, r3, s3, u2, c2, l; + for (e3 = document.createDocumentFragment(), u2 = this.shadowElement.childNodes, n3 = 0, o4 = u2.length; o4 > n3; n3++) + s3 = u2[n3], e3.appendChild(s3.cloneNode(true)); + for (c2 = a2(e3), i2 = 0, r3 = c2.length; r3 > i2; i2++) + t4 = c2[i2], (l = this.elementStore.remove(t4)) && t4.parentNode.replaceChild(l, t4); + return e3; + }, a2 = function(t4) { + return t4.querySelectorAll("[data-trix-store-key]"); + }, s2 = function(t4, e3) { + return u(t4.innerHTML) === u(e3.innerHTML); + }, u = function(t4) { + return t4.replace(/ /g, " "); + }, r2; + }(e2.ObjectView); + }.call(this), function() { + var t3, n2, i, o2, r2, s2 = function(t4, e3) { + return function() { + return t4.apply(e3, arguments); + }; + }, a2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + u.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, u = {}.hasOwnProperty; + i = e2.findClosestElementFromNode, o2 = e2.handleEvent, r2 = e2.innerElementIsActive, n2 = e2.defer, t3 = e2.AttachmentView.attachmentSelector, e2.CompositionController = function(u2) { + function c2(n3, i2) { + this.element = n3, this.composition = i2, this.didClickAttachment = s2(this.didClickAttachment, this), this.didBlur = s2(this.didBlur, this), this.didFocus = s2(this.didFocus, this), this.documentView = new e2.DocumentView(this.composition.document, {element: this.element}), o2("focus", {onElement: this.element, withCallback: this.didFocus}), o2("blur", {onElement: this.element, withCallback: this.didBlur}), o2("click", {onElement: this.element, matchingSelector: "a[contenteditable=false]", preventDefault: true}), o2("mousedown", {onElement: this.element, matchingSelector: t3, withCallback: this.didClickAttachment}), o2("click", {onElement: this.element, matchingSelector: "a" + t3, preventDefault: true}); + } + return a2(c2, u2), c2.prototype.didFocus = function() { + var t4, e3, n3; + return t4 = function(t5) { + return function() { + var e4; + return t5.focused ? void 0 : (t5.focused = true, (e4 = t5.delegate) != null && typeof e4.compositionControllerDidFocus == "function" ? e4.compositionControllerDidFocus() : void 0); + }; + }(this), (e3 = (n3 = this.blurPromise) != null ? n3.then(t4) : void 0) != null ? e3 : t4(); + }, c2.prototype.didBlur = function() { + return this.blurPromise = new Promise(function(t4) { + return function(e3) { + return n2(function() { + var n3; + return r2(t4.element) || (t4.focused = null, (n3 = t4.delegate) != null && typeof n3.compositionControllerDidBlur == "function" && n3.compositionControllerDidBlur()), t4.blurPromise = null, e3(); + }); + }; + }(this)); + }, c2.prototype.didClickAttachment = function(t4, e3) { + var n3, o3, r3; + return n3 = this.findAttachmentForElement(e3), o3 = i(t4.target, {matchingSelector: "figcaption"}) != null, (r3 = this.delegate) != null && typeof r3.compositionControllerDidSelectAttachment == "function" ? r3.compositionControllerDidSelectAttachment(n3, {editCaption: o3}) : void 0; + }, c2.prototype.getSerializableElement = function() { + return this.isEditingAttachment() ? this.documentView.shadowElement : this.element; + }, c2.prototype.render = function() { + var t4, e3, n3; + return this.revision !== this.composition.revision && (this.documentView.setDocument(this.composition.document), this.documentView.render(), this.revision = this.composition.revision), this.canSyncDocumentView() && !this.documentView.isSynced() && ((t4 = this.delegate) != null && typeof t4.compositionControllerWillSyncDocumentView == "function" && t4.compositionControllerWillSyncDocumentView(), this.documentView.sync(), (e3 = this.delegate) != null && typeof e3.compositionControllerDidSyncDocumentView == "function" && e3.compositionControllerDidSyncDocumentView()), (n3 = this.delegate) != null && typeof n3.compositionControllerDidRender == "function" ? n3.compositionControllerDidRender() : void 0; + }, c2.prototype.rerenderViewForObject = function(t4) { + return this.invalidateViewForObject(t4), this.render(); + }, c2.prototype.invalidateViewForObject = function(t4) { + return this.documentView.invalidateViewForObject(t4); + }, c2.prototype.isViewCachingEnabled = function() { + return this.documentView.isViewCachingEnabled(); + }, c2.prototype.enableViewCaching = function() { + return this.documentView.enableViewCaching(); + }, c2.prototype.disableViewCaching = function() { + return this.documentView.disableViewCaching(); + }, c2.prototype.refreshViewCache = function() { + return this.documentView.garbageCollectCachedViews(); + }, c2.prototype.isEditingAttachment = function() { + return this.attachmentEditor != null; + }, c2.prototype.installAttachmentEditorForAttachment = function(t4, n3) { + var i2, o3, r3; + if (((r3 = this.attachmentEditor) != null ? r3.attachment : void 0) !== t4 && (o3 = this.documentView.findElementForObject(t4))) + return this.uninstallAttachmentEditor(), i2 = this.composition.document.getAttachmentPieceForAttachment(t4), this.attachmentEditor = new e2.AttachmentEditorController(i2, o3, this.element, n3), this.attachmentEditor.delegate = this; + }, c2.prototype.uninstallAttachmentEditor = function() { + var t4; + return (t4 = this.attachmentEditor) != null ? t4.uninstall() : void 0; + }, c2.prototype.didUninstallAttachmentEditor = function() { + return this.attachmentEditor = null, this.render(); + }, c2.prototype.attachmentEditorDidRequestUpdatingAttributesForAttachment = function(t4, e3) { + var n3; + return (n3 = this.delegate) != null && typeof n3.compositionControllerWillUpdateAttachment == "function" && n3.compositionControllerWillUpdateAttachment(e3), this.composition.updateAttributesForAttachment(t4, e3); + }, c2.prototype.attachmentEditorDidRequestRemovingAttributeForAttachment = function(t4, e3) { + var n3; + return (n3 = this.delegate) != null && typeof n3.compositionControllerWillUpdateAttachment == "function" && n3.compositionControllerWillUpdateAttachment(e3), this.composition.removeAttributeForAttachment(t4, e3); + }, c2.prototype.attachmentEditorDidRequestRemovalOfAttachment = function(t4) { + var e3; + return (e3 = this.delegate) != null && typeof e3.compositionControllerDidRequestRemovalOfAttachment == "function" ? e3.compositionControllerDidRequestRemovalOfAttachment(t4) : void 0; + }, c2.prototype.attachmentEditorDidRequestDeselectingAttachment = function(t4) { + var e3; + return (e3 = this.delegate) != null && typeof e3.compositionControllerDidRequestDeselectingAttachment == "function" ? e3.compositionControllerDidRequestDeselectingAttachment(t4) : void 0; + }, c2.prototype.canSyncDocumentView = function() { + return !this.isEditingAttachment(); + }, c2.prototype.findAttachmentForElement = function(t4) { + return this.composition.document.getAttachmentById(parseInt(t4.dataset.trixId, 10)); + }, c2; + }(e2.BasicObject); + }.call(this), function() { + var t3, n2, i, o2 = function(t4, e3) { + return function() { + return t4.apply(e3, arguments); + }; + }, r2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + s2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, s2 = {}.hasOwnProperty; + n2 = e2.handleEvent, i = e2.triggerEvent, t3 = e2.findClosestElementFromNode, e2.ToolbarController = function(e3) { + function s3(t4) { + this.element = t4, this.didKeyDownDialogInput = o2(this.didKeyDownDialogInput, this), this.didClickDialogButton = o2(this.didClickDialogButton, this), this.didClickAttributeButton = o2(this.didClickAttributeButton, this), this.didClickActionButton = o2(this.didClickActionButton, this), this.attributes = {}, this.actions = {}, this.resetDialogInputs(), n2("mousedown", {onElement: this.element, matchingSelector: a2, withCallback: this.didClickActionButton}), n2("mousedown", {onElement: this.element, matchingSelector: c2, withCallback: this.didClickAttributeButton}), n2("click", {onElement: this.element, matchingSelector: v, preventDefault: true}), n2("click", {onElement: this.element, matchingSelector: l, withCallback: this.didClickDialogButton}), n2("keydown", {onElement: this.element, matchingSelector: h, withCallback: this.didKeyDownDialogInput}); + } + var a2, u, c2, l, h, p2, d, f, g, m, v; + return r2(s3, e3), c2 = "[data-trix-attribute]", a2 = "[data-trix-action]", v = c2 + ", " + a2, p2 = "[data-trix-dialog]", u = p2 + "[data-trix-active]", l = p2 + " [data-trix-method]", h = p2 + " [data-trix-input]", s3.prototype.didClickActionButton = function(t4, e4) { + var n3, i2, o3; + return (i2 = this.delegate) != null && i2.toolbarDidClickButton(), t4.preventDefault(), n3 = d(e4), this.getDialog(n3) ? this.toggleDialog(n3) : (o3 = this.delegate) != null ? o3.toolbarDidInvokeAction(n3) : void 0; + }, s3.prototype.didClickAttributeButton = function(t4, e4) { + var n3, i2, o3; + return (i2 = this.delegate) != null && i2.toolbarDidClickButton(), t4.preventDefault(), n3 = f(e4), this.getDialog(n3) ? this.toggleDialog(n3) : (o3 = this.delegate) != null && o3.toolbarDidToggleAttribute(n3), this.refreshAttributeButtons(); + }, s3.prototype.didClickDialogButton = function(e4, n3) { + var i2, o3; + return i2 = t3(n3, {matchingSelector: p2}), o3 = n3.getAttribute("data-trix-method"), this[o3].call(this, i2); + }, s3.prototype.didKeyDownDialogInput = function(t4, e4) { + var n3, i2; + return t4.keyCode === 13 && (t4.preventDefault(), n3 = e4.getAttribute("name"), i2 = this.getDialog(n3), this.setAttribute(i2)), t4.keyCode === 27 ? (t4.preventDefault(), this.hideDialog()) : void 0; + }, s3.prototype.updateActions = function(t4) { + return this.actions = t4, this.refreshActionButtons(); + }, s3.prototype.refreshActionButtons = function() { + return this.eachActionButton(function(t4) { + return function(e4, n3) { + return e4.disabled = t4.actions[n3] === false; + }; + }(this)); + }, s3.prototype.eachActionButton = function(t4) { + var e4, n3, i2, o3, r3; + for (o3 = this.element.querySelectorAll(a2), r3 = [], n3 = 0, i2 = o3.length; i2 > n3; n3++) + e4 = o3[n3], r3.push(t4(e4, d(e4))); + return r3; + }, s3.prototype.updateAttributes = function(t4) { + return this.attributes = t4, this.refreshAttributeButtons(); + }, s3.prototype.refreshAttributeButtons = function() { + return this.eachAttributeButton(function(t4) { + return function(e4, n3) { + return e4.disabled = t4.attributes[n3] === false, t4.attributes[n3] || t4.dialogIsVisible(n3) ? (e4.setAttribute("data-trix-active", ""), e4.classList.add("trix-active")) : (e4.removeAttribute("data-trix-active"), e4.classList.remove("trix-active")); + }; + }(this)); + }, s3.prototype.eachAttributeButton = function(t4) { + var e4, n3, i2, o3, r3; + for (o3 = this.element.querySelectorAll(c2), r3 = [], n3 = 0, i2 = o3.length; i2 > n3; n3++) + e4 = o3[n3], r3.push(t4(e4, f(e4))); + return r3; + }, s3.prototype.applyKeyboardCommand = function(t4) { + var e4, n3, o3, r3, s4, a3, u2; + for (s4 = JSON.stringify(t4.sort()), u2 = this.element.querySelectorAll("[data-trix-key]"), r3 = 0, a3 = u2.length; a3 > r3; r3++) + if (e4 = u2[r3], o3 = e4.getAttribute("data-trix-key").split("+"), n3 = JSON.stringify(o3.sort()), n3 === s4) + return i("mousedown", {onElement: e4}), true; + return false; + }, s3.prototype.dialogIsVisible = function(t4) { + var e4; + return (e4 = this.getDialog(t4)) ? e4.hasAttribute("data-trix-active") : void 0; + }, s3.prototype.toggleDialog = function(t4) { + return this.dialogIsVisible(t4) ? this.hideDialog() : this.showDialog(t4); + }, s3.prototype.showDialog = function(t4) { + var e4, n3, i2, o3, r3, s4, a3, u2, c3, l2; + for (this.hideDialog(), (a3 = this.delegate) != null && a3.toolbarWillShowDialog(), i2 = this.getDialog(t4), i2.setAttribute("data-trix-active", ""), i2.classList.add("trix-active"), u2 = i2.querySelectorAll("input[disabled]"), o3 = 0, s4 = u2.length; s4 > o3; o3++) + n3 = u2[o3], n3.removeAttribute("disabled"); + return (e4 = f(i2)) && (r3 = m(i2, t4)) && (r3.value = (c3 = this.attributes[e4]) != null ? c3 : "", r3.select()), (l2 = this.delegate) != null ? l2.toolbarDidShowDialog(t4) : void 0; + }, s3.prototype.setAttribute = function(t4) { + var e4, n3, i2; + return e4 = f(t4), n3 = m(t4, e4), n3.willValidate && !n3.checkValidity() ? (n3.setAttribute("data-trix-validate", ""), n3.classList.add("trix-validate"), n3.focus()) : ((i2 = this.delegate) != null && i2.toolbarDidUpdateAttribute(e4, n3.value), this.hideDialog()); + }, s3.prototype.removeAttribute = function(t4) { + var e4, n3; + return e4 = f(t4), (n3 = this.delegate) != null && n3.toolbarDidRemoveAttribute(e4), this.hideDialog(); + }, s3.prototype.hideDialog = function() { + var t4, e4; + return (t4 = this.element.querySelector(u)) ? (t4.removeAttribute("data-trix-active"), t4.classList.remove("trix-active"), this.resetDialogInputs(), (e4 = this.delegate) != null ? e4.toolbarDidHideDialog(g(t4)) : void 0) : void 0; + }, s3.prototype.resetDialogInputs = function() { + var t4, e4, n3, i2, o3; + for (i2 = this.element.querySelectorAll(h), o3 = [], t4 = 0, n3 = i2.length; n3 > t4; t4++) + e4 = i2[t4], e4.setAttribute("disabled", "disabled"), e4.removeAttribute("data-trix-validate"), o3.push(e4.classList.remove("trix-validate")); + return o3; + }, s3.prototype.getDialog = function(t4) { + return this.element.querySelector("[data-trix-dialog=" + t4 + "]"); + }, m = function(t4, e4) { + return e4 == null && (e4 = f(t4)), t4.querySelector("[data-trix-input][name='" + e4 + "']"); + }, d = function(t4) { + return t4.getAttribute("data-trix-action"); + }, f = function(t4) { + var e4; + return (e4 = t4.getAttribute("data-trix-attribute")) != null ? e4 : t4.getAttribute("data-trix-dialog-attribute"); + }, g = function(t4) { + return t4.getAttribute("data-trix-dialog"); + }, s3; + }(e2.BasicObject); + }.call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.ImagePreloadOperation = function(e3) { + function n3(t4) { + this.url = t4; + } + return t3(n3, e3), n3.prototype.perform = function(t4) { + var e4; + return e4 = new Image(), e4.onload = function(n4) { + return function() { + return e4.width = n4.width = e4.naturalWidth, e4.height = n4.height = e4.naturalHeight, t4(true, e4); + }; + }(this), e4.onerror = function() { + return t4(false); + }, e4.src = this.url; + }, n3; + }(e2.Operation); + }.call(this), function() { + var t3 = function(t4, e3) { + return function() { + return t4.apply(e3, arguments); + }; + }, n2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var o2 in e3) + i.call(e3, o2) && (t4[o2] = e3[o2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, i = {}.hasOwnProperty; + e2.Attachment = function(i2) { + function o2(n3) { + n3 == null && (n3 = {}), this.releaseFile = t3(this.releaseFile, this), o2.__super__.constructor.apply(this, arguments), this.attributes = e2.Hash.box(n3), this.didChangeAttributes(); + } + return n2(o2, i2), o2.previewablePattern = /^image(\/(gif|png|jpe?g)|$)/, o2.attachmentForFile = function(t4) { + var e3, n3; + return n3 = this.attributesForFile(t4), e3 = new this(n3), e3.setFile(t4), e3; + }, o2.attributesForFile = function(t4) { + return new e2.Hash({filename: t4.name, filesize: t4.size, contentType: t4.type}); + }, o2.fromJSON = function(t4) { + return new this(t4); + }, o2.prototype.getAttribute = function(t4) { + return this.attributes.get(t4); + }, o2.prototype.hasAttribute = function(t4) { + return this.attributes.has(t4); + }, o2.prototype.getAttributes = function() { + return this.attributes.toObject(); + }, o2.prototype.setAttributes = function(t4) { + var e3, n3, i3; + return t4 == null && (t4 = {}), e3 = this.attributes.merge(t4), this.attributes.isEqualTo(e3) ? void 0 : (this.attributes = e3, this.didChangeAttributes(), (n3 = this.previewDelegate) != null && typeof n3.attachmentDidChangeAttributes == "function" && n3.attachmentDidChangeAttributes(this), (i3 = this.delegate) != null && typeof i3.attachmentDidChangeAttributes == "function" ? i3.attachmentDidChangeAttributes(this) : void 0); + }, o2.prototype.didChangeAttributes = function() { + return this.isPreviewable() ? this.preloadURL() : void 0; + }, o2.prototype.isPending = function() { + return this.file != null && !(this.getURL() || this.getHref()); + }, o2.prototype.isPreviewable = function() { + return this.attributes.has("previewable") ? this.attributes.get("previewable") : this.constructor.previewablePattern.test(this.getContentType()); + }, o2.prototype.getType = function() { + return this.hasContent() ? "content" : this.isPreviewable() ? "preview" : "file"; + }, o2.prototype.getURL = function() { + return this.attributes.get("url"); + }, o2.prototype.getHref = function() { + return this.attributes.get("href"); + }, o2.prototype.getFilename = function() { + var t4; + return (t4 = this.attributes.get("filename")) != null ? t4 : ""; + }, o2.prototype.getFilesize = function() { + return this.attributes.get("filesize"); + }, o2.prototype.getFormattedFilesize = function() { + var t4; + return t4 = this.attributes.get("filesize"), typeof t4 == "number" ? e2.config.fileSize.formatter(t4) : ""; + }, o2.prototype.getExtension = function() { + var t4; + return (t4 = this.getFilename().match(/\.(\w+)$/)) != null ? t4[1].toLowerCase() : void 0; + }, o2.prototype.getContentType = function() { + return this.attributes.get("contentType"); + }, o2.prototype.hasContent = function() { + return this.attributes.has("content"); + }, o2.prototype.getContent = function() { + return this.attributes.get("content"); + }, o2.prototype.getWidth = function() { + return this.attributes.get("width"); + }, o2.prototype.getHeight = function() { + return this.attributes.get("height"); + }, o2.prototype.getFile = function() { + return this.file; + }, o2.prototype.setFile = function(t4) { + return this.file = t4, this.isPreviewable() ? this.preloadFile() : void 0; + }, o2.prototype.releaseFile = function() { + return this.releasePreloadedFile(), this.file = null; + }, o2.prototype.getUploadProgress = function() { + var t4; + return (t4 = this.uploadProgress) != null ? t4 : 0; + }, o2.prototype.setUploadProgress = function(t4) { + var e3; + return this.uploadProgress !== t4 ? (this.uploadProgress = t4, (e3 = this.uploadProgressDelegate) != null && typeof e3.attachmentDidChangeUploadProgress == "function" ? e3.attachmentDidChangeUploadProgress(this) : void 0) : void 0; + }, o2.prototype.toJSON = function() { + return this.getAttributes(); + }, o2.prototype.getCacheKey = function() { + return [o2.__super__.getCacheKey.apply(this, arguments), this.attributes.getCacheKey(), this.getPreviewURL()].join("/"); + }, o2.prototype.getPreviewURL = function() { + return this.previewURL || this.preloadingURL; + }, o2.prototype.setPreviewURL = function(t4) { + var e3, n3; + return t4 !== this.getPreviewURL() ? (this.previewURL = t4, (e3 = this.previewDelegate) != null && typeof e3.attachmentDidChangeAttributes == "function" && e3.attachmentDidChangeAttributes(this), (n3 = this.delegate) != null && typeof n3.attachmentDidChangePreviewURL == "function" ? n3.attachmentDidChangePreviewURL(this) : void 0) : void 0; + }, o2.prototype.preloadURL = function() { + return this.preload(this.getURL(), this.releaseFile); + }, o2.prototype.preloadFile = function() { + return this.file ? (this.fileObjectURL = URL.createObjectURL(this.file), this.preload(this.fileObjectURL)) : void 0; + }, o2.prototype.releasePreloadedFile = function() { + return this.fileObjectURL ? (URL.revokeObjectURL(this.fileObjectURL), this.fileObjectURL = null) : void 0; + }, o2.prototype.preload = function(t4, n3) { + var i3; + return t4 && t4 !== this.getPreviewURL() ? (this.preloadingURL = t4, i3 = new e2.ImagePreloadOperation(t4), i3.then(function(e3) { + return function(i4) { + var o3, r2; + return r2 = i4.width, o3 = i4.height, e3.getWidth() && e3.getHeight() || e3.setAttributes({width: r2, height: o3}), e3.preloadingURL = null, e3.setPreviewURL(t4), typeof n3 == "function" ? n3() : void 0; + }; + }(this))["catch"](function(t5) { + return function() { + return t5.preloadingURL = null, typeof n3 == "function" ? n3() : void 0; + }; + }(this))) : void 0; + }, o2; + }(e2.Object); + }.call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.Piece = function(n3) { + function i(t4, n4) { + n4 == null && (n4 = {}), i.__super__.constructor.apply(this, arguments), this.attributes = e2.Hash.box(n4); + } + return t3(i, n3), i.types = {}, i.registerType = function(t4, e3) { + return e3.type = t4, this.types[t4] = e3; + }, i.fromJSON = function(t4) { + var e3; + return (e3 = this.types[t4.type]) ? e3.fromJSON(t4) : void 0; + }, i.prototype.copyWithAttributes = function(t4) { + return new this.constructor(this.getValue(), t4); + }, i.prototype.copyWithAdditionalAttributes = function(t4) { + return this.copyWithAttributes(this.attributes.merge(t4)); + }, i.prototype.copyWithoutAttribute = function(t4) { + return this.copyWithAttributes(this.attributes.remove(t4)); + }, i.prototype.copy = function() { + return this.copyWithAttributes(this.attributes); + }, i.prototype.getAttribute = function(t4) { + return this.attributes.get(t4); + }, i.prototype.getAttributesHash = function() { + return this.attributes; + }, i.prototype.getAttributes = function() { + return this.attributes.toObject(); + }, i.prototype.getCommonAttributes = function() { + var t4, e3, n4; + return (n4 = pieceList.getPieceAtIndex(0)) ? (t4 = n4.attributes, e3 = t4.getKeys(), pieceList.eachPiece(function(n5) { + return e3 = t4.getKeysCommonToHash(n5.attributes), t4 = t4.slice(e3); + }), t4.toObject()) : {}; + }, i.prototype.hasAttribute = function(t4) { + return this.attributes.has(t4); + }, i.prototype.hasSameStringValueAsPiece = function(t4) { + return t4 != null && this.toString() === t4.toString(); + }, i.prototype.hasSameAttributesAsPiece = function(t4) { + return t4 != null && (this.attributes === t4.attributes || this.attributes.isEqualTo(t4.attributes)); + }, i.prototype.isBlockBreak = function() { + return false; + }, i.prototype.isEqualTo = function(t4) { + return i.__super__.isEqualTo.apply(this, arguments) || this.hasSameConstructorAs(t4) && this.hasSameStringValueAsPiece(t4) && this.hasSameAttributesAsPiece(t4); + }, i.prototype.isEmpty = function() { + return this.length === 0; + }, i.prototype.isSerializable = function() { + return true; + }, i.prototype.toJSON = function() { + return {type: this.constructor.type, attributes: this.getAttributes()}; + }, i.prototype.contentsForInspection = function() { + return {type: this.constructor.type, attributes: this.attributes.inspect()}; + }, i.prototype.canBeGrouped = function() { + return this.hasAttribute("href"); + }, i.prototype.canBeGroupedWith = function(t4) { + return this.getAttribute("href") === t4.getAttribute("href"); + }, i.prototype.getLength = function() { + return this.length; + }, i.prototype.canBeConsolidatedWith = function() { + return false; + }, i; + }(e2.Object); + }.call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.Piece.registerType("attachment", e2.AttachmentPiece = function(n3) { + function i(t4) { + this.attachment = t4, i.__super__.constructor.apply(this, arguments), this.length = 1, this.ensureAttachmentExclusivelyHasAttribute("href"), this.attachment.hasContent() || this.removeProhibitedAttributes(); + } + return t3(i, n3), i.fromJSON = function(t4) { + return new this(e2.Attachment.fromJSON(t4.attachment), t4.attributes); + }, i.permittedAttributes = ["caption", "presentation"], i.prototype.ensureAttachmentExclusivelyHasAttribute = function(t4) { + return this.hasAttribute(t4) ? (this.attachment.hasAttribute(t4) || this.attachment.setAttributes(this.attributes.slice(t4)), this.attributes = this.attributes.remove(t4)) : void 0; + }, i.prototype.removeProhibitedAttributes = function() { + var t4; + return t4 = this.attributes.slice(this.constructor.permittedAttributes), t4.isEqualTo(this.attributes) ? void 0 : this.attributes = t4; + }, i.prototype.getValue = function() { + return this.attachment; + }, i.prototype.isSerializable = function() { + return !this.attachment.isPending(); + }, i.prototype.getCaption = function() { + var t4; + return (t4 = this.attributes.get("caption")) != null ? t4 : ""; + }, i.prototype.isEqualTo = function(t4) { + var e3; + return i.__super__.isEqualTo.apply(this, arguments) && this.attachment.id === (t4 != null && (e3 = t4.attachment) != null ? e3.id : void 0); + }, i.prototype.toString = function() { + return e2.OBJECT_REPLACEMENT_CHARACTER; + }, i.prototype.toJSON = function() { + var t4; + return t4 = i.__super__.toJSON.apply(this, arguments), t4.attachment = this.attachment, t4; + }, i.prototype.getCacheKey = function() { + return [i.__super__.getCacheKey.apply(this, arguments), this.attachment.getCacheKey()].join("/"); + }, i.prototype.toConsole = function() { + return JSON.stringify(this.toString()); + }, i; + }(e2.Piece)); + }.call(this), function() { + var t3, n2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var o2 in e3) + i.call(e3, o2) && (t4[o2] = e3[o2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, i = {}.hasOwnProperty; + t3 = e2.normalizeNewlines, e2.Piece.registerType("string", e2.StringPiece = function(e3) { + function i2(e4) { + i2.__super__.constructor.apply(this, arguments), this.string = t3(e4), this.length = this.string.length; + } + return n2(i2, e3), i2.fromJSON = function(t4) { + return new this(t4.string, t4.attributes); + }, i2.prototype.getValue = function() { + return this.string; + }, i2.prototype.toString = function() { + return this.string.toString(); + }, i2.prototype.isBlockBreak = function() { + return this.toString() === "\n" && this.getAttribute("blockBreak") === true; + }, i2.prototype.toJSON = function() { + var t4; + return t4 = i2.__super__.toJSON.apply(this, arguments), t4.string = this.string, t4; + }, i2.prototype.canBeConsolidatedWith = function(t4) { + return t4 != null && this.hasSameConstructorAs(t4) && this.hasSameAttributesAsPiece(t4); + }, i2.prototype.consolidateWith = function(t4) { + return new this.constructor(this.toString() + t4.toString(), this.attributes); + }, i2.prototype.splitAtOffset = function(t4) { + var e4, n3; + return t4 === 0 ? (e4 = null, n3 = this) : t4 === this.length ? (e4 = this, n3 = null) : (e4 = new this.constructor(this.string.slice(0, t4), this.attributes), n3 = new this.constructor(this.string.slice(t4), this.attributes)), [e4, n3]; + }, i2.prototype.toConsole = function() { + var t4; + return t4 = this.string, t4.length > 15 && (t4 = t4.slice(0, 14) + "\u2026"), JSON.stringify(t4.toString()); + }, i2; + }(e2.Piece)); + }.call(this), function() { + var t3, n2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var o3 in e3) + i.call(e3, o3) && (t4[o3] = e3[o3]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, i = {}.hasOwnProperty, o2 = [].slice; + t3 = e2.spliceArray, e2.SplittableList = function(e3) { + function i2(t4) { + t4 == null && (t4 = []), i2.__super__.constructor.apply(this, arguments), this.objects = t4.slice(0), this.length = this.objects.length; + } + var r2, s2, a2; + return n2(i2, e3), i2.box = function(t4) { + return t4 instanceof this ? t4 : new this(t4); + }, i2.prototype.indexOf = function(t4) { + return this.objects.indexOf(t4); + }, i2.prototype.splice = function() { + var e4; + return e4 = 1 <= arguments.length ? o2.call(arguments, 0) : [], new this.constructor(t3.apply(null, [this.objects].concat(o2.call(e4)))); + }, i2.prototype.eachObject = function(t4) { + var e4, n3, i3, o3, r3, s3; + for (r3 = this.objects, s3 = [], n3 = e4 = 0, i3 = r3.length; i3 > e4; n3 = ++e4) + o3 = r3[n3], s3.push(t4(o3, n3)); + return s3; + }, i2.prototype.insertObjectAtIndex = function(t4, e4) { + return this.splice(e4, 0, t4); + }, i2.prototype.insertSplittableListAtIndex = function(t4, e4) { + return this.splice.apply(this, [e4, 0].concat(o2.call(t4.objects))); + }, i2.prototype.insertSplittableListAtPosition = function(t4, e4) { + var n3, i3, o3; + return o3 = this.splitObjectAtPosition(e4), i3 = o3[0], n3 = o3[1], new this.constructor(i3).insertSplittableListAtIndex(t4, n3); + }, i2.prototype.editObjectAtIndex = function(t4, e4) { + return this.replaceObjectAtIndex(e4(this.objects[t4]), t4); + }, i2.prototype.replaceObjectAtIndex = function(t4, e4) { + return this.splice(e4, 1, t4); + }, i2.prototype.removeObjectAtIndex = function(t4) { + return this.splice(t4, 1); + }, i2.prototype.getObjectAtIndex = function(t4) { + return this.objects[t4]; + }, i2.prototype.getSplittableListInRange = function(t4) { + var e4, n3, i3, o3; + return i3 = this.splitObjectsAtRange(t4), n3 = i3[0], e4 = i3[1], o3 = i3[2], new this.constructor(n3.slice(e4, o3 + 1)); + }, i2.prototype.selectSplittableList = function(t4) { + var e4, n3; + return n3 = function() { + var n4, i3, o3, r3; + for (o3 = this.objects, r3 = [], n4 = 0, i3 = o3.length; i3 > n4; n4++) + e4 = o3[n4], t4(e4) && r3.push(e4); + return r3; + }.call(this), new this.constructor(n3); + }, i2.prototype.removeObjectsInRange = function(t4) { + var e4, n3, i3, o3; + return i3 = this.splitObjectsAtRange(t4), n3 = i3[0], e4 = i3[1], o3 = i3[2], new this.constructor(n3).splice(e4, o3 - e4 + 1); + }, i2.prototype.transformObjectsInRange = function(t4, e4) { + var n3, i3, o3, r3, s3, a3, u; + return s3 = this.splitObjectsAtRange(t4), r3 = s3[0], i3 = s3[1], a3 = s3[2], u = function() { + var t5, s4, u2; + for (u2 = [], n3 = t5 = 0, s4 = r3.length; s4 > t5; n3 = ++t5) + o3 = r3[n3], u2.push(n3 >= i3 && a3 >= n3 ? e4(o3) : o3); + return u2; + }(), new this.constructor(u); + }, i2.prototype.splitObjectsAtRange = function(t4) { + var e4, n3, i3, o3, s3, u; + return o3 = this.splitObjectAtPosition(a2(t4)), n3 = o3[0], e4 = o3[1], i3 = o3[2], s3 = new this.constructor(n3).splitObjectAtPosition(r2(t4) + i3), n3 = s3[0], u = s3[1], [n3, e4, u - 1]; + }, i2.prototype.getObjectAtPosition = function(t4) { + var e4, n3, i3; + return i3 = this.findIndexAndOffsetAtPosition(t4), e4 = i3.index, n3 = i3.offset, this.objects[e4]; + }, i2.prototype.splitObjectAtPosition = function(t4) { + var e4, n3, i3, o3, r3, s3, a3, u, c2, l; + return s3 = this.findIndexAndOffsetAtPosition(t4), e4 = s3.index, r3 = s3.offset, o3 = this.objects.slice(0), e4 != null ? r3 === 0 ? (c2 = e4, l = 0) : (i3 = this.getObjectAtIndex(e4), a3 = i3.splitAtOffset(r3), n3 = a3[0], u = a3[1], o3.splice(e4, 1, n3, u), c2 = e4 + 1, l = n3.getLength() - r3) : (c2 = o3.length, l = 0), [o3, c2, l]; + }, i2.prototype.consolidate = function() { + var t4, e4, n3, i3, o3, r3; + for (i3 = [], o3 = this.objects[0], r3 = this.objects.slice(1), t4 = 0, e4 = r3.length; e4 > t4; t4++) + n3 = r3[t4], (typeof o3.canBeConsolidatedWith == "function" ? o3.canBeConsolidatedWith(n3) : void 0) ? o3 = o3.consolidateWith(n3) : (i3.push(o3), o3 = n3); + return o3 != null && i3.push(o3), new this.constructor(i3); + }, i2.prototype.consolidateFromIndexToIndex = function(t4, e4) { + var n3, i3, r3; + return i3 = this.objects.slice(0), r3 = i3.slice(t4, e4 + 1), n3 = new this.constructor(r3).consolidate().toArray(), this.splice.apply(this, [t4, r3.length].concat(o2.call(n3))); + }, i2.prototype.findIndexAndOffsetAtPosition = function(t4) { + var e4, n3, i3, o3, r3, s3, a3; + for (e4 = 0, a3 = this.objects, i3 = n3 = 0, o3 = a3.length; o3 > n3; i3 = ++n3) { + if (s3 = a3[i3], r3 = e4 + s3.getLength(), t4 >= e4 && r3 > t4) + return {index: i3, offset: t4 - e4}; + e4 = r3; + } + return {index: null, offset: null}; + }, i2.prototype.findPositionAtIndexAndOffset = function(t4, e4) { + var n3, i3, o3, r3, s3, a3; + for (s3 = 0, a3 = this.objects, n3 = i3 = 0, o3 = a3.length; o3 > i3; n3 = ++i3) + if (r3 = a3[n3], t4 > n3) + s3 += r3.getLength(); + else if (n3 === t4) { + s3 += e4; + break; + } + return s3; + }, i2.prototype.getEndPosition = function() { + var t4, e4; + return this.endPosition != null ? this.endPosition : this.endPosition = function() { + var n3, i3, o3; + for (e4 = 0, o3 = this.objects, n3 = 0, i3 = o3.length; i3 > n3; n3++) + t4 = o3[n3], e4 += t4.getLength(); + return e4; + }.call(this); + }, i2.prototype.toString = function() { + return this.objects.join(""); + }, i2.prototype.toArray = function() { + return this.objects.slice(0); + }, i2.prototype.toJSON = function() { + return this.toArray(); + }, i2.prototype.isEqualTo = function(t4) { + return i2.__super__.isEqualTo.apply(this, arguments) || s2(this.objects, t4 != null ? t4.objects : void 0); + }, s2 = function(t4, e4) { + var n3, i3, o3, r3, s3; + if (e4 == null && (e4 = []), t4.length !== e4.length) + return false; + for (s3 = true, i3 = n3 = 0, o3 = t4.length; o3 > n3; i3 = ++n3) + r3 = t4[i3], s3 && !r3.isEqualTo(e4[i3]) && (s3 = false); + return s3; + }, i2.prototype.contentsForInspection = function() { + var t4; + return {objects: "[" + function() { + var e4, n3, i3, o3; + for (i3 = this.objects, o3 = [], e4 = 0, n3 = i3.length; n3 > e4; e4++) + t4 = i3[e4], o3.push(t4.inspect()); + return o3; + }.call(this).join(", ") + "]"}; + }, a2 = function(t4) { + return t4[0]; + }, r2 = function(t4) { + return t4[1]; + }, i2; + }(e2.Object); + }.call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.Text = function(n3) { + function i(t4) { + var n4; + t4 == null && (t4 = []), i.__super__.constructor.apply(this, arguments), this.pieceList = new e2.SplittableList(function() { + var e3, i2, o2; + for (o2 = [], e3 = 0, i2 = t4.length; i2 > e3; e3++) + n4 = t4[e3], n4.isEmpty() || o2.push(n4); + return o2; + }()); + } + return t3(i, n3), i.textForAttachmentWithAttributes = function(t4, n4) { + var i2; + return i2 = new e2.AttachmentPiece(t4, n4), new this([i2]); + }, i.textForStringWithAttributes = function(t4, n4) { + var i2; + return i2 = new e2.StringPiece(t4, n4), new this([i2]); + }, i.fromJSON = function(t4) { + var n4, i2; + return i2 = function() { + var i3, o2, r2; + for (r2 = [], i3 = 0, o2 = t4.length; o2 > i3; i3++) + n4 = t4[i3], r2.push(e2.Piece.fromJSON(n4)); + return r2; + }(), new this(i2); + }, i.prototype.copy = function() { + return this.copyWithPieceList(this.pieceList); + }, i.prototype.copyWithPieceList = function(t4) { + return new this.constructor(t4.consolidate().toArray()); + }, i.prototype.copyUsingObjectMap = function(t4) { + var e3, n4; + return n4 = function() { + var n5, i2, o2, r2, s2; + for (o2 = this.getPieces(), s2 = [], n5 = 0, i2 = o2.length; i2 > n5; n5++) + e3 = o2[n5], s2.push((r2 = t4.find(e3)) != null ? r2 : e3); + return s2; + }.call(this), new this.constructor(n4); + }, i.prototype.appendText = function(t4) { + return this.insertTextAtPosition(t4, this.getLength()); + }, i.prototype.insertTextAtPosition = function(t4, e3) { + return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(t4.pieceList, e3)); + }, i.prototype.removeTextAtRange = function(t4) { + return this.copyWithPieceList(this.pieceList.removeObjectsInRange(t4)); + }, i.prototype.replaceTextAtRange = function(t4, e3) { + return this.removeTextAtRange(e3).insertTextAtPosition(t4, e3[0]); + }, i.prototype.moveTextFromRangeToPosition = function(t4, e3) { + var n4, i2; + if (!(t4[0] <= e3 && e3 <= t4[1])) + return i2 = this.getTextAtRange(t4), n4 = i2.getLength(), t4[0] < e3 && (e3 -= n4), this.removeTextAtRange(t4).insertTextAtPosition(i2, e3); + }, i.prototype.addAttributeAtRange = function(t4, e3, n4) { + var i2; + return i2 = {}, i2[t4] = e3, this.addAttributesAtRange(i2, n4); + }, i.prototype.addAttributesAtRange = function(t4, e3) { + return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e3, function(e4) { + return e4.copyWithAdditionalAttributes(t4); + })); + }, i.prototype.removeAttributeAtRange = function(t4, e3) { + return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e3, function(e4) { + return e4.copyWithoutAttribute(t4); + })); + }, i.prototype.setAttributesAtRange = function(t4, e3) { + return this.copyWithPieceList(this.pieceList.transformObjectsInRange(e3, function(e4) { + return e4.copyWithAttributes(t4); + })); + }, i.prototype.getAttributesAtPosition = function(t4) { + var e3, n4; + return (e3 = (n4 = this.pieceList.getObjectAtPosition(t4)) != null ? n4.getAttributes() : void 0) != null ? e3 : {}; + }, i.prototype.getCommonAttributes = function() { + var t4, n4; + return t4 = function() { + var t5, e3, i2, o2; + for (i2 = this.pieceList.toArray(), o2 = [], t5 = 0, e3 = i2.length; e3 > t5; t5++) + n4 = i2[t5], o2.push(n4.getAttributes()); + return o2; + }.call(this), e2.Hash.fromCommonAttributesOfObjects(t4).toObject(); + }, i.prototype.getCommonAttributesAtRange = function(t4) { + var e3; + return (e3 = this.getTextAtRange(t4).getCommonAttributes()) != null ? e3 : {}; + }, i.prototype.getExpandedRangeForAttributeAtOffset = function(t4, e3) { + var n4, i2, o2; + for (n4 = o2 = e3, i2 = this.getLength(); n4 > 0 && this.getCommonAttributesAtRange([n4 - 1, o2])[t4]; ) + n4--; + for (; i2 > o2 && this.getCommonAttributesAtRange([e3, o2 + 1])[t4]; ) + o2++; + return [n4, o2]; + }, i.prototype.getTextAtRange = function(t4) { + return this.copyWithPieceList(this.pieceList.getSplittableListInRange(t4)); + }, i.prototype.getStringAtRange = function(t4) { + return this.pieceList.getSplittableListInRange(t4).toString(); + }, i.prototype.getStringAtPosition = function(t4) { + return this.getStringAtRange([t4, t4 + 1]); + }, i.prototype.startsWithString = function(t4) { + return this.getStringAtRange([0, t4.length]) === t4; + }, i.prototype.endsWithString = function(t4) { + var e3; + return e3 = this.getLength(), this.getStringAtRange([e3 - t4.length, e3]) === t4; + }, i.prototype.getAttachmentPieces = function() { + var t4, e3, n4, i2, o2; + for (i2 = this.pieceList.toArray(), o2 = [], t4 = 0, e3 = i2.length; e3 > t4; t4++) + n4 = i2[t4], n4.attachment != null && o2.push(n4); + return o2; + }, i.prototype.getAttachments = function() { + var t4, e3, n4, i2, o2; + for (i2 = this.getAttachmentPieces(), o2 = [], t4 = 0, e3 = i2.length; e3 > t4; t4++) + n4 = i2[t4], o2.push(n4.attachment); + return o2; + }, i.prototype.getAttachmentAndPositionById = function(t4) { + var e3, n4, i2, o2, r2, s2; + for (o2 = 0, r2 = this.pieceList.toArray(), e3 = 0, n4 = r2.length; n4 > e3; e3++) { + if (i2 = r2[e3], ((s2 = i2.attachment) != null ? s2.id : void 0) === t4) + return {attachment: i2.attachment, position: o2}; + o2 += i2.length; + } + return {attachment: null, position: null}; + }, i.prototype.getAttachmentById = function(t4) { + var e3, n4, i2; + return i2 = this.getAttachmentAndPositionById(t4), e3 = i2.attachment, n4 = i2.position, e3; + }, i.prototype.getRangeOfAttachment = function(t4) { + var e3, n4; + return n4 = this.getAttachmentAndPositionById(t4.id), t4 = n4.attachment, e3 = n4.position, t4 != null ? [e3, e3 + 1] : void 0; + }, i.prototype.updateAttributesForAttachment = function(t4, e3) { + var n4; + return (n4 = this.getRangeOfAttachment(e3)) ? this.addAttributesAtRange(t4, n4) : this; + }, i.prototype.getLength = function() { + return this.pieceList.getEndPosition(); + }, i.prototype.isEmpty = function() { + return this.getLength() === 0; + }, i.prototype.isEqualTo = function(t4) { + var e3; + return i.__super__.isEqualTo.apply(this, arguments) || (t4 != null && (e3 = t4.pieceList) != null ? e3.isEqualTo(this.pieceList) : void 0); + }, i.prototype.isBlockBreak = function() { + return this.getLength() === 1 && this.pieceList.getObjectAtIndex(0).isBlockBreak(); + }, i.prototype.eachPiece = function(t4) { + return this.pieceList.eachObject(t4); + }, i.prototype.getPieces = function() { + return this.pieceList.toArray(); + }, i.prototype.getPieceAtPosition = function(t4) { + return this.pieceList.getObjectAtPosition(t4); + }, i.prototype.contentsForInspection = function() { + return {pieceList: this.pieceList.inspect()}; + }, i.prototype.toSerializableText = function() { + var t4; + return t4 = this.pieceList.selectSplittableList(function(t5) { + return t5.isSerializable(); + }), this.copyWithPieceList(t4); + }, i.prototype.toString = function() { + return this.pieceList.toString(); + }, i.prototype.toJSON = function() { + return this.pieceList.toJSON(); + }, i.prototype.toConsole = function() { + var t4; + return JSON.stringify(function() { + var e3, n4, i2, o2; + for (i2 = this.pieceList.toArray(), o2 = [], e3 = 0, n4 = i2.length; n4 > e3; e3++) + t4 = i2[e3], o2.push(JSON.parse(t4.toConsole())); + return o2; + }.call(this)); + }, i.prototype.getDirection = function() { + return e2.getDirection(this.toString()); + }, i.prototype.isRTL = function() { + return this.getDirection() === "rtl"; + }, i; + }(e2.Object); + }.call(this), function() { + var t3, n2, i, o2, r2, s2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + a2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, a2 = {}.hasOwnProperty, u = [].indexOf || function(t4) { + for (var e3 = 0, n3 = this.length; n3 > e3; e3++) + if (e3 in this && this[e3] === t4) + return e3; + return -1; + }, c2 = [].slice; + t3 = e2.arraysAreEqual, r2 = e2.spliceArray, i = e2.getBlockConfig, n2 = e2.getBlockAttributeNames, o2 = e2.getListAttributeNames, e2.Block = function(n3) { + function a3(t4, n4) { + t4 == null && (t4 = new e2.Text()), n4 == null && (n4 = []), a3.__super__.constructor.apply(this, arguments), this.text = h(t4), this.attributes = n4; + } + var l, h, p2, d, f, g, m, v, y; + return s2(a3, n3), a3.fromJSON = function(t4) { + var n4; + return n4 = e2.Text.fromJSON(t4.text), new this(n4, t4.attributes); + }, a3.prototype.isEmpty = function() { + return this.text.isBlockBreak(); + }, a3.prototype.isEqualTo = function(e3) { + return a3.__super__.isEqualTo.apply(this, arguments) || this.text.isEqualTo(e3 != null ? e3.text : void 0) && t3(this.attributes, e3 != null ? e3.attributes : void 0); + }, a3.prototype.copyWithText = function(t4) { + return new this.constructor(t4, this.attributes); + }, a3.prototype.copyWithoutText = function() { + return this.copyWithText(null); + }, a3.prototype.copyWithAttributes = function(t4) { + return new this.constructor(this.text, t4); + }, a3.prototype.copyWithoutAttributes = function() { + return this.copyWithAttributes(null); + }, a3.prototype.copyUsingObjectMap = function(t4) { + var e3; + return this.copyWithText((e3 = t4.find(this.text)) ? e3 : this.text.copyUsingObjectMap(t4)); + }, a3.prototype.addAttribute = function(t4) { + var e3; + return e3 = this.attributes.concat(d(t4)), this.copyWithAttributes(e3); + }, a3.prototype.removeAttribute = function(t4) { + var e3, n4; + return n4 = i(t4).listAttribute, e3 = g(g(this.attributes, t4), n4), this.copyWithAttributes(e3); + }, a3.prototype.removeLastAttribute = function() { + return this.removeAttribute(this.getLastAttribute()); + }, a3.prototype.getLastAttribute = function() { + return f(this.attributes); + }, a3.prototype.getAttributes = function() { + return this.attributes.slice(0); + }, a3.prototype.getAttributeLevel = function() { + return this.attributes.length; + }, a3.prototype.getAttributeAtLevel = function(t4) { + return this.attributes[t4 - 1]; + }, a3.prototype.hasAttribute = function(t4) { + return u.call(this.attributes, t4) >= 0; + }, a3.prototype.hasAttributes = function() { + return this.getAttributeLevel() > 0; + }, a3.prototype.getLastNestableAttribute = function() { + return f(this.getNestableAttributes()); + }, a3.prototype.getNestableAttributes = function() { + var t4, e3, n4, o3, r3; + for (o3 = this.attributes, r3 = [], e3 = 0, n4 = o3.length; n4 > e3; e3++) + t4 = o3[e3], i(t4).nestable && r3.push(t4); + return r3; + }, a3.prototype.getNestingLevel = function() { + return this.getNestableAttributes().length; + }, a3.prototype.decreaseNestingLevel = function() { + var t4; + return (t4 = this.getLastNestableAttribute()) ? this.removeAttribute(t4) : this; + }, a3.prototype.increaseNestingLevel = function() { + var t4, e3, n4; + return (t4 = this.getLastNestableAttribute()) ? (n4 = this.attributes.lastIndexOf(t4), e3 = r2.apply(null, [this.attributes, n4 + 1, 0].concat(c2.call(d(t4)))), this.copyWithAttributes(e3)) : this; + }, a3.prototype.getListItemAttributes = function() { + var t4, e3, n4, o3, r3; + for (o3 = this.attributes, r3 = [], e3 = 0, n4 = o3.length; n4 > e3; e3++) + t4 = o3[e3], i(t4).listAttribute && r3.push(t4); + return r3; + }, a3.prototype.isListItem = function() { + var t4; + return (t4 = i(this.getLastAttribute())) != null ? t4.listAttribute : void 0; + }, a3.prototype.isTerminalBlock = function() { + var t4; + return (t4 = i(this.getLastAttribute())) != null ? t4.terminal : void 0; + }, a3.prototype.breaksOnReturn = function() { + var t4; + return (t4 = i(this.getLastAttribute())) != null ? t4.breakOnReturn : void 0; + }, a3.prototype.findLineBreakInDirectionFromPosition = function(t4, e3) { + var n4, i2; + return i2 = this.toString(), n4 = function() { + switch (t4) { + case "forward": + return i2.indexOf("\n", e3); + case "backward": + return i2.slice(0, e3).lastIndexOf("\n"); + } + }(), n4 !== -1 ? n4 : void 0; + }, a3.prototype.contentsForInspection = function() { + return {text: this.text.inspect(), attributes: this.attributes}; + }, a3.prototype.toString = function() { + return this.text.toString(); + }, a3.prototype.toJSON = function() { + return {text: this.text, attributes: this.attributes}; + }, a3.prototype.getDirection = function() { + return this.text.getDirection(); + }, a3.prototype.isRTL = function() { + return this.text.isRTL(); + }, a3.prototype.getLength = function() { + return this.text.getLength(); + }, a3.prototype.canBeConsolidatedWith = function(t4) { + return !this.hasAttributes() && !t4.hasAttributes() && this.getDirection() === t4.getDirection(); + }, a3.prototype.consolidateWith = function(t4) { + var n4, i2; + return n4 = e2.Text.textForStringWithAttributes("\n"), i2 = this.getTextWithoutBlockBreak().appendText(n4), this.copyWithText(i2.appendText(t4.text)); + }, a3.prototype.splitAtOffset = function(t4) { + var e3, n4; + return t4 === 0 ? (e3 = null, n4 = this) : t4 === this.getLength() ? (e3 = this, n4 = null) : (e3 = this.copyWithText(this.text.getTextAtRange([0, t4])), n4 = this.copyWithText(this.text.getTextAtRange([t4, this.getLength()]))), [e3, n4]; + }, a3.prototype.getBlockBreakPosition = function() { + return this.text.getLength() - 1; + }, a3.prototype.getTextWithoutBlockBreak = function() { + return m(this.text) ? this.text.getTextAtRange([0, this.getBlockBreakPosition()]) : this.text.copy(); + }, a3.prototype.canBeGrouped = function(t4) { + return this.attributes[t4]; + }, a3.prototype.canBeGroupedWith = function(t4, e3) { + var n4, r3, s3, a4; + return s3 = t4.getAttributes(), r3 = s3[e3], n4 = this.attributes[e3], !(n4 !== r3 || i(n4).group === false && (a4 = s3[e3 + 1], u.call(o2(), a4) < 0) || this.getDirection() !== t4.getDirection() && !t4.isEmpty()); + }, h = function(t4) { + return t4 = y(t4), t4 = l(t4); + }, y = function(t4) { + var n4, i2, o3, r3, s3, a4; + return r3 = false, a4 = t4.getPieces(), i2 = 2 <= a4.length ? c2.call(a4, 0, n4 = a4.length - 1) : (n4 = 0, []), o3 = a4[n4++], o3 == null ? t4 : (i2 = function() { + var t5, e3, n5; + for (n5 = [], t5 = 0, e3 = i2.length; e3 > t5; t5++) + s3 = i2[t5], s3.isBlockBreak() ? (r3 = true, n5.push(v(s3))) : n5.push(s3); + return n5; + }(), r3 ? new e2.Text(c2.call(i2).concat([o3])) : t4); + }, p2 = e2.Text.textForStringWithAttributes("\n", {blockBreak: true}), l = function(t4) { + return m(t4) ? t4 : t4.appendText(p2); + }, m = function(t4) { + var e3, n4; + return n4 = t4.getLength(), n4 === 0 ? false : (e3 = t4.getTextAtRange([n4 - 1, n4]), e3.isBlockBreak()); + }, v = function(t4) { + return t4.copyWithoutAttribute("blockBreak"); + }, d = function(t4) { + var e3; + return e3 = i(t4).listAttribute, e3 != null ? [e3, t4] : [t4]; + }, f = function(t4) { + return t4.slice(-1)[0]; + }, g = function(t4, e3) { + var n4; + return n4 = t4.lastIndexOf(e3), n4 === -1 ? t4 : r2(t4, n4, 1); + }, a3; + }(e2.Object); + }.call(this), function() { + var t3, n2, i, o2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + r2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, r2 = {}.hasOwnProperty, s2 = [].indexOf || function(t4) { + for (var e3 = 0, n3 = this.length; n3 > e3; e3++) + if (e3 in this && this[e3] === t4) + return e3; + return -1; + }, a2 = [].slice; + n2 = e2.tagName, i = e2.walkTree, t3 = e2.nodeIsAttachmentElement, e2.HTMLSanitizer = function(r3) { + function u(t4, e3) { + var n3; + n3 = e3 != null ? e3 : {}, this.allowedAttributes = n3.allowedAttributes, this.forbiddenProtocols = n3.forbiddenProtocols, this.forbiddenElements = n3.forbiddenElements, this.allowedAttributes == null && (this.allowedAttributes = c2), this.forbiddenProtocols == null && (this.forbiddenProtocols = h), this.forbiddenElements == null && (this.forbiddenElements = l), this.body = p2(t4); + } + var c2, l, h, p2; + return o2(u, r3), c2 = "style href src width height class".split(" "), h = "javascript:".split(" "), l = "script iframe".split(" "), u.sanitize = function(t4, e3) { + var n3; + return n3 = new this(t4, e3), n3.sanitize(), n3; + }, u.prototype.sanitize = function() { + return this.sanitizeElements(), this.normalizeListElementNesting(); + }, u.prototype.getHTML = function() { + return this.body.innerHTML; + }, u.prototype.getBody = function() { + return this.body; + }, u.prototype.sanitizeElements = function() { + var t4, n3, o3, r4, s3; + for (s3 = i(this.body), r4 = []; s3.nextNode(); ) + switch (o3 = s3.currentNode, o3.nodeType) { + case Node.ELEMENT_NODE: + this.elementIsRemovable(o3) ? r4.push(o3) : this.sanitizeElement(o3); + break; + case Node.COMMENT_NODE: + r4.push(o3); + } + for (t4 = 0, n3 = r4.length; n3 > t4; t4++) + o3 = r4[t4], e2.removeNode(o3); + return this.body; + }, u.prototype.sanitizeElement = function(t4) { + var e3, n3, i2, o3, r4; + for (t4.hasAttribute("href") && (o3 = t4.protocol, s2.call(this.forbiddenProtocols, o3) >= 0 && t4.removeAttribute("href")), r4 = a2.call(t4.attributes), e3 = 0, n3 = r4.length; n3 > e3; e3++) + i2 = r4[e3].name, s2.call(this.allowedAttributes, i2) >= 0 || i2.indexOf("data-trix") === 0 || t4.removeAttribute(i2); + return t4; + }, u.prototype.normalizeListElementNesting = function() { + var t4, e3, i2, o3, r4; + for (r4 = a2.call(this.body.querySelectorAll("ul,ol")), t4 = 0, e3 = r4.length; e3 > t4; t4++) + i2 = r4[t4], (o3 = i2.previousElementSibling) && n2(o3) === "li" && o3.appendChild(i2); + return this.body; + }, u.prototype.elementIsRemovable = function(t4) { + return (t4 != null ? t4.nodeType : void 0) === Node.ELEMENT_NODE ? this.elementIsForbidden(t4) || this.elementIsntSerializable(t4) : void 0; + }, u.prototype.elementIsForbidden = function(t4) { + var e3; + return e3 = n2(t4), s2.call(this.forbiddenElements, e3) >= 0; + }, u.prototype.elementIsntSerializable = function(e3) { + return e3.getAttribute("data-trix-serialize") === "false" && !t3(e3); + }, p2 = function(t4) { + var e3, n3, i2, o3, r4; + for (t4 == null && (t4 = ""), t4 = t4.replace(/<\/html[^>]*>[^]*$/i, ""), e3 = document.implementation.createHTMLDocument(""), e3.documentElement.innerHTML = t4, r4 = e3.head.querySelectorAll("style"), i2 = 0, o3 = r4.length; o3 > i2; i2++) + n3 = r4[i2], e3.body.appendChild(n3); + return e3.body; + }, u; + }(e2.BasicObject); + }.call(this), function() { + var t3, n2, i, o2, r2, s2, a2, u, c2, l, h, p2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + d.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, d = {}.hasOwnProperty, f = [].indexOf || function(t4) { + for (var e3 = 0, n3 = this.length; n3 > e3; e3++) + if (e3 in this && this[e3] === t4) + return e3; + return -1; + }; + t3 = e2.arraysAreEqual, s2 = e2.makeElement, l = e2.tagName, r2 = e2.getBlockTagNames, h = e2.walkTree, o2 = e2.findClosestElementFromNode, i = e2.elementContainsNode, a2 = e2.nodeIsAttachmentElement, u = e2.normalizeSpaces, n2 = e2.breakableWhitespacePattern, c2 = e2.squishBreakableWhitespace, e2.HTMLParser = function(d2) { + function g(t4, e3) { + this.html = t4, this.referenceElement = (e3 != null ? e3 : {}).referenceElement, this.blocks = [], this.blockElements = [], this.processedElements = []; + } + var m, v, y, b, A, C3, x, w, E, S2, R, k; + return p2(g, d2), g.parse = function(t4, e3) { + var n3; + return n3 = new this(t4, e3), n3.parse(), n3; + }, g.prototype.getDocument = function() { + return e2.Document.fromJSON(this.blocks); + }, g.prototype.parse = function() { + var t4, n3; + try { + for (this.createHiddenContainer(), t4 = e2.HTMLSanitizer.sanitize(this.html).getHTML(), this.containerElement.innerHTML = t4, n3 = h(this.containerElement, {usingFilter: x}); n3.nextNode(); ) + this.processNode(n3.currentNode); + return this.translateBlockElementMarginsToNewlines(); + } finally { + this.removeHiddenContainer(); + } + }, g.prototype.createHiddenContainer = function() { + return this.referenceElement ? (this.containerElement = this.referenceElement.cloneNode(false), this.containerElement.removeAttribute("id"), this.containerElement.setAttribute("data-trix-internal", ""), this.containerElement.style.display = "none", this.referenceElement.parentNode.insertBefore(this.containerElement, this.referenceElement.nextSibling)) : (this.containerElement = s2({tagName: "div", style: {display: "none"}}), document.body.appendChild(this.containerElement)); + }, g.prototype.removeHiddenContainer = function() { + return e2.removeNode(this.containerElement); + }, x = function(t4) { + return l(t4) === "style" ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT; + }, g.prototype.processNode = function(t4) { + switch (t4.nodeType) { + case Node.TEXT_NODE: + if (!this.isInsignificantTextNode(t4)) + return this.appendBlockForTextNode(t4), this.processTextNode(t4); + break; + case Node.ELEMENT_NODE: + return this.appendBlockForElement(t4), this.processElement(t4); + } + }, g.prototype.appendBlockForTextNode = function(e3) { + var n3, i2, o3; + return i2 = e3.parentNode, i2 === this.currentBlockElement && this.isBlockElement(e3.previousSibling) ? this.appendStringWithAttributes("\n") : i2 !== this.containerElement && !this.isBlockElement(i2) || (n3 = this.getBlockAttributes(i2), t3(n3, (o3 = this.currentBlock) != null ? o3.attributes : void 0)) ? void 0 : (this.currentBlock = this.appendBlockForAttributesWithElement(n3, i2), this.currentBlockElement = i2); + }, g.prototype.appendBlockForElement = function(e3) { + var n3, o3, r3, s3; + if (r3 = this.isBlockElement(e3), o3 = i(this.currentBlockElement, e3), r3 && !this.isBlockElement(e3.firstChild)) { + if ((!this.isInsignificantTextNode(e3.firstChild) || !this.isBlockElement(e3.firstElementChild)) && (n3 = this.getBlockAttributes(e3), e3.firstChild)) + return o3 && t3(n3, this.currentBlock.attributes) ? this.appendStringWithAttributes("\n") : (this.currentBlock = this.appendBlockForAttributesWithElement(n3, e3), this.currentBlockElement = e3); + } else if (this.currentBlockElement && !o3 && !r3) + return (s3 = this.findParentBlockElement(e3)) ? this.appendBlockForElement(s3) : (this.currentBlock = this.appendEmptyBlock(), this.currentBlockElement = null); + }, g.prototype.findParentBlockElement = function(t4) { + var e3; + for (e3 = t4.parentElement; e3 && e3 !== this.containerElement; ) { + if (this.isBlockElement(e3) && f.call(this.blockElements, e3) >= 0) + return e3; + e3 = e3.parentElement; + } + return null; + }, g.prototype.processTextNode = function(t4) { + var e3, n3; + return n3 = t4.data, v(t4.parentNode) || (n3 = c2(n3), R((e3 = t4.previousSibling) != null ? e3.textContent : void 0) && (n3 = A(n3))), this.appendStringWithAttributes(n3, this.getTextAttributes(t4.parentNode)); + }, g.prototype.processElement = function(t4) { + var e3, n3, i2, o3, r3; + if (a2(t4)) + return e3 = w(t4, "attachment"), Object.keys(e3).length && (o3 = this.getTextAttributes(t4), this.appendAttachmentWithAttributes(e3, o3), t4.innerHTML = ""), this.processedElements.push(t4); + switch (l(t4)) { + case "br": + return this.isExtraBR(t4) || this.isBlockElement(t4.nextSibling) || this.appendStringWithAttributes("\n", this.getTextAttributes(t4)), this.processedElements.push(t4); + case "img": + e3 = {url: t4.getAttribute("src"), contentType: "image"}, i2 = b(t4); + for (n3 in i2) + r3 = i2[n3], e3[n3] = r3; + return this.appendAttachmentWithAttributes(e3, this.getTextAttributes(t4)), this.processedElements.push(t4); + case "tr": + if (t4.parentNode.firstChild !== t4) + return this.appendStringWithAttributes("\n"); + break; + case "td": + if (t4.parentNode.firstChild !== t4) + return this.appendStringWithAttributes(" | "); + } + }, g.prototype.appendBlockForAttributesWithElement = function(t4, e3) { + var n3; + return this.blockElements.push(e3), n3 = m(t4), this.blocks.push(n3), n3; + }, g.prototype.appendEmptyBlock = function() { + return this.appendBlockForAttributesWithElement([], null); + }, g.prototype.appendStringWithAttributes = function(t4, e3) { + return this.appendPiece(S2(t4, e3)); + }, g.prototype.appendAttachmentWithAttributes = function(t4, e3) { + return this.appendPiece(E(t4, e3)); + }, g.prototype.appendPiece = function(t4) { + return this.blocks.length === 0 && this.appendEmptyBlock(), this.blocks[this.blocks.length - 1].text.push(t4); + }, g.prototype.appendStringToTextAtIndex = function(t4, e3) { + var n3, i2; + return i2 = this.blocks[e3].text, n3 = i2[i2.length - 1], (n3 != null ? n3.type : void 0) === "string" ? n3.string += t4 : i2.push(S2(t4)); + }, g.prototype.prependStringToTextAtIndex = function(t4, e3) { + var n3, i2; + return i2 = this.blocks[e3].text, n3 = i2[0], (n3 != null ? n3.type : void 0) === "string" ? n3.string = t4 + n3.string : i2.unshift(S2(t4)); + }, S2 = function(t4, e3) { + var n3; + return e3 == null && (e3 = {}), n3 = "string", t4 = u(t4), {string: t4, attributes: e3, type: n3}; + }, E = function(t4, e3) { + var n3; + return e3 == null && (e3 = {}), n3 = "attachment", {attachment: t4, attributes: e3, type: n3}; + }, m = function(t4) { + var e3; + return t4 == null && (t4 = {}), e3 = [], {text: e3, attributes: t4}; + }, g.prototype.getTextAttributes = function(t4) { + var n3, i2, r3, s3, u2, c3, l2, h2, p3, d3, f2, g2; + r3 = {}, p3 = e2.config.textAttributes; + for (n3 in p3) + if (u2 = p3[n3], u2.tagName && o2(t4, {matchingSelector: u2.tagName, untilNode: this.containerElement})) + r3[n3] = true; + else if (u2.parser) { + if (g2 = u2.parser(t4)) { + for (i2 = false, d3 = this.findBlockElementAncestors(t4), c3 = 0, h2 = d3.length; h2 > c3; c3++) + if (s3 = d3[c3], u2.parser(s3) === g2) { + i2 = true; + break; + } + i2 || (r3[n3] = g2); + } + } else + u2.styleProperty && (g2 = t4.style[u2.styleProperty]) && (r3[n3] = g2); + if (a2(t4)) { + f2 = w(t4, "attributes"); + for (l2 in f2) + g2 = f2[l2], r3[l2] = g2; + } + return r3; + }, g.prototype.getBlockAttributes = function(t4) { + var n3, i2, o3, r3; + for (i2 = []; t4 && t4 !== this.containerElement; ) { + r3 = e2.config.blockAttributes; + for (n3 in r3) + o3 = r3[n3], o3.parse !== false && l(t4) === o3.tagName && ((typeof o3.test == "function" ? o3.test(t4) : void 0) || !o3.test) && (i2.push(n3), o3.listAttribute && i2.push(o3.listAttribute)); + t4 = t4.parentNode; + } + return i2.reverse(); + }, g.prototype.findBlockElementAncestors = function(t4) { + var e3, n3; + for (e3 = []; t4 && t4 !== this.containerElement; ) + n3 = l(t4), f.call(r2(), n3) >= 0 && e3.push(t4), t4 = t4.parentNode; + return e3; + }, w = function(t4, e3) { + try { + return JSON.parse(t4.getAttribute("data-trix-" + e3)); + } catch (n3) { + return {}; + } + }, b = function(t4) { + var e3, n3, i2; + return i2 = t4.getAttribute("width"), n3 = t4.getAttribute("height"), e3 = {}, i2 && (e3.width = parseInt(i2, 10)), n3 && (e3.height = parseInt(n3, 10)), e3; + }, g.prototype.isBlockElement = function(t4) { + var e3; + if ((t4 != null ? t4.nodeType : void 0) === Node.ELEMENT_NODE && !a2(t4) && !o2(t4, {matchingSelector: "td", untilNode: this.containerElement})) + return e3 = l(t4), f.call(r2(), e3) >= 0 || window.getComputedStyle(t4).display === "block"; + }, g.prototype.isInsignificantTextNode = function(t4) { + var e3, n3, i2; + if ((t4 != null ? t4.nodeType : void 0) === Node.TEXT_NODE && k(t4.data) && (n3 = t4.parentNode, i2 = t4.previousSibling, e3 = t4.nextSibling, (!C3(n3.previousSibling) || this.isBlockElement(n3.previousSibling)) && !v(n3))) + return !i2 || this.isBlockElement(i2) || !e3 || this.isBlockElement(e3); + }, g.prototype.isExtraBR = function(t4) { + return l(t4) === "br" && this.isBlockElement(t4.parentNode) && t4.parentNode.lastChild === t4; + }, v = function(t4) { + var e3; + return e3 = window.getComputedStyle(t4).whiteSpace, e3 === "pre" || e3 === "pre-wrap" || e3 === "pre-line"; + }, C3 = function(t4) { + return t4 && !R(t4.textContent); + }, g.prototype.translateBlockElementMarginsToNewlines = function() { + var t4, e3, n3, i2, o3, r3, s3, a3; + for (e3 = this.getMarginOfDefaultBlockElement(), s3 = this.blocks, a3 = [], i2 = n3 = 0, o3 = s3.length; o3 > n3; i2 = ++n3) + t4 = s3[i2], (r3 = this.getMarginOfBlockElementAtIndex(i2)) && (r3.top > 2 * e3.top && this.prependStringToTextAtIndex("\n", i2), a3.push(r3.bottom > 2 * e3.bottom ? this.appendStringToTextAtIndex("\n", i2) : void 0)); + return a3; + }, g.prototype.getMarginOfBlockElementAtIndex = function(t4) { + var e3, n3; + return !(e3 = this.blockElements[t4]) || !e3.textContent || (n3 = l(e3), f.call(r2(), n3) >= 0 || f.call(this.processedElements, e3) >= 0) ? void 0 : y(e3); + }, g.prototype.getMarginOfDefaultBlockElement = function() { + var t4; + return t4 = s2(e2.config.blockAttributes["default"].tagName), this.containerElement.appendChild(t4), y(t4); + }, y = function(t4) { + var e3; + return e3 = window.getComputedStyle(t4), e3.display === "block" ? {top: parseInt(e3.marginTop), bottom: parseInt(e3.marginBottom)} : void 0; + }, A = function(t4) { + return t4.replace(RegExp("^" + n2.source + "+"), ""); + }, k = function(t4) { + return RegExp("^" + n2.source + "*$").test(t4); + }, R = function(t4) { + return /\s$/.test(t4); + }, g; + }(e2.BasicObject); + }.call(this), function() { + var t3, n2, i, o2, r2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + s2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, s2 = {}.hasOwnProperty, a2 = [].slice, u = [].indexOf || function(t4) { + for (var e3 = 0, n3 = this.length; n3 > e3; e3++) + if (e3 in this && this[e3] === t4) + return e3; + return -1; + }; + t3 = e2.arraysAreEqual, i = e2.normalizeRange, o2 = e2.rangeIsCollapsed, n2 = e2.getBlockConfig, e2.Document = function(s3) { + function c2(t4) { + t4 == null && (t4 = []), c2.__super__.constructor.apply(this, arguments), t4.length === 0 && (t4 = [new e2.Block()]), this.blockList = e2.SplittableList.box(t4); + } + var l; + return r2(c2, s3), c2.fromJSON = function(t4) { + var n3, i2; + return i2 = function() { + var i3, o3, r3; + for (r3 = [], i3 = 0, o3 = t4.length; o3 > i3; i3++) + n3 = t4[i3], r3.push(e2.Block.fromJSON(n3)); + return r3; + }(), new this(i2); + }, c2.fromHTML = function(t4, n3) { + return e2.HTMLParser.parse(t4, n3).getDocument(); + }, c2.fromString = function(t4, n3) { + var i2; + return i2 = e2.Text.textForStringWithAttributes(t4, n3), new this([new e2.Block(i2)]); + }, c2.prototype.isEmpty = function() { + var t4; + return this.blockList.length === 1 && (t4 = this.getBlockAtIndex(0), t4.isEmpty() && !t4.hasAttributes()); + }, c2.prototype.copy = function(t4) { + var e3; + return t4 == null && (t4 = {}), e3 = t4.consolidateBlocks ? this.blockList.consolidate().toArray() : this.blockList.toArray(), new this.constructor(e3); + }, c2.prototype.copyUsingObjectsFromDocument = function(t4) { + var n3; + return n3 = new e2.ObjectMap(t4.getObjects()), this.copyUsingObjectMap(n3); + }, c2.prototype.copyUsingObjectMap = function(t4) { + var e3, n3, i2; + return n3 = function() { + var n4, o3, r3, s4; + for (r3 = this.getBlocks(), s4 = [], n4 = 0, o3 = r3.length; o3 > n4; n4++) + e3 = r3[n4], s4.push((i2 = t4.find(e3)) ? i2 : e3.copyUsingObjectMap(t4)); + return s4; + }.call(this), new this.constructor(n3); + }, c2.prototype.copyWithBaseBlockAttributes = function(t4) { + var e3, n3, i2; + return t4 == null && (t4 = []), i2 = function() { + var i3, o3, r3, s4; + for (r3 = this.getBlocks(), s4 = [], i3 = 0, o3 = r3.length; o3 > i3; i3++) + n3 = r3[i3], e3 = t4.concat(n3.getAttributes()), s4.push(n3.copyWithAttributes(e3)); + return s4; + }.call(this), new this.constructor(i2); + }, c2.prototype.replaceBlock = function(t4, e3) { + var n3; + return n3 = this.blockList.indexOf(t4), n3 === -1 ? this : new this.constructor(this.blockList.replaceObjectAtIndex(e3, n3)); + }, c2.prototype.insertDocumentAtRange = function(t4, e3) { + var n3, r3, s4, a3, u2, c3, l2; + return r3 = t4.blockList, u2 = (e3 = i(e3))[0], c3 = this.locationFromPosition(u2), s4 = c3.index, a3 = c3.offset, l2 = this, n3 = this.getBlockAtPosition(u2), o2(e3) && n3.isEmpty() && !n3.hasAttributes() ? l2 = new this.constructor(l2.blockList.removeObjectAtIndex(s4)) : n3.getBlockBreakPosition() === a3 && u2++, l2 = l2.removeTextAtRange(e3), new this.constructor(l2.blockList.insertSplittableListAtPosition(r3, u2)); + }, c2.prototype.mergeDocumentAtRange = function(e3, n3) { + var o3, r3, s4, a3, u2, c3, l2, h, p2, d, f, g; + return f = (n3 = i(n3))[0], d = this.locationFromPosition(f), r3 = this.getBlockAtIndex(d.index).getAttributes(), o3 = e3.getBaseBlockAttributes(), g = r3.slice(-o3.length), t3(o3, g) ? (l2 = r3.slice(0, -o3.length), c3 = e3.copyWithBaseBlockAttributes(l2)) : c3 = e3.copy({consolidateBlocks: true}).copyWithBaseBlockAttributes(r3), s4 = c3.getBlockCount(), a3 = c3.getBlockAtIndex(0), t3(r3, a3.getAttributes()) ? (u2 = a3.getTextWithoutBlockBreak(), p2 = this.insertTextAtRange(u2, n3), s4 > 1 && (c3 = new this.constructor(c3.getBlocks().slice(1)), h = f + u2.getLength(), p2 = p2.insertDocumentAtRange(c3, h))) : p2 = this.insertDocumentAtRange(c3, n3), p2; + }, c2.prototype.insertTextAtRange = function(t4, e3) { + var n3, o3, r3, s4, a3; + return a3 = (e3 = i(e3))[0], s4 = this.locationFromPosition(a3), o3 = s4.index, r3 = s4.offset, n3 = this.removeTextAtRange(e3), new this.constructor(n3.blockList.editObjectAtIndex(o3, function(e4) { + return e4.copyWithText(e4.text.insertTextAtPosition(t4, r3)); + })); + }, c2.prototype.removeTextAtRange = function(t4) { + var e3, n3, r3, s4, a3, u2, c3, l2, h, p2, d, f, g, m, v, y, b, A, C3, x, w; + return p2 = t4 = i(t4), l2 = p2[0], A = p2[1], o2(t4) ? this : (d = this.locationRangeFromRange(t4), u2 = d[0], y = d[1], a3 = u2.index, c3 = u2.offset, s4 = this.getBlockAtIndex(a3), v = y.index, b = y.offset, m = this.getBlockAtIndex(v), f = A - l2 === 1 && s4.getBlockBreakPosition() === c3 && m.getBlockBreakPosition() !== b && m.text.getStringAtPosition(b) === "\n", f ? r3 = this.blockList.editObjectAtIndex(v, function(t5) { + return t5.copyWithText(t5.text.removeTextAtRange([b, b + 1])); + }) : (h = s4.text.getTextAtRange([0, c3]), C3 = m.text.getTextAtRange([b, m.getLength()]), x = h.appendText(C3), g = a3 !== v && c3 === 0, w = g && s4.getAttributeLevel() >= m.getAttributeLevel(), n3 = w ? m.copyWithText(x) : s4.copyWithText(x), e3 = v + 1 - a3, r3 = this.blockList.splice(a3, e3, n3)), new this.constructor(r3)); + }, c2.prototype.moveTextFromRangeToPosition = function(t4, e3) { + var n3, o3, r3, s4, u2, c3, l2, h, p2, d; + return c3 = t4 = i(t4), p2 = c3[0], r3 = c3[1], e3 >= p2 && r3 >= e3 ? this : (o3 = this.getDocumentAtRange(t4), h = this.removeTextAtRange(t4), u2 = e3 > p2, u2 && (e3 -= o3.getLength()), l2 = o3.getBlocks(), s4 = l2[0], n3 = 2 <= l2.length ? a2.call(l2, 1) : [], n3.length === 0 ? (d = s4.getTextWithoutBlockBreak(), u2 && (e3 += 1)) : d = s4.text, h = h.insertTextAtRange(d, e3), n3.length === 0 ? h : (o3 = new this.constructor(n3), e3 += d.getLength(), h.insertDocumentAtRange(o3, e3))); + }, c2.prototype.addAttributeAtRange = function(t4, e3, i2) { + var o3; + return o3 = this.blockList, this.eachBlockAtRange(i2, function(i3, r3, s4) { + return o3 = o3.editObjectAtIndex(s4, function() { + return n2(t4) ? i3.addAttribute(t4, e3) : r3[0] === r3[1] ? i3 : i3.copyWithText(i3.text.addAttributeAtRange(t4, e3, r3)); + }); + }), new this.constructor(o3); + }, c2.prototype.addAttribute = function(t4, e3) { + var n3; + return n3 = this.blockList, this.eachBlock(function(i2, o3) { + return n3 = n3.editObjectAtIndex(o3, function() { + return i2.addAttribute(t4, e3); + }); + }), new this.constructor(n3); + }, c2.prototype.removeAttributeAtRange = function(t4, e3) { + var i2; + return i2 = this.blockList, this.eachBlockAtRange(e3, function(e4, o3, r3) { + return n2(t4) ? i2 = i2.editObjectAtIndex(r3, function() { + return e4.removeAttribute(t4); + }) : o3[0] !== o3[1] ? i2 = i2.editObjectAtIndex(r3, function() { + return e4.copyWithText(e4.text.removeAttributeAtRange(t4, o3)); + }) : void 0; + }), new this.constructor(i2); + }, c2.prototype.updateAttributesForAttachment = function(t4, e3) { + var n3, i2, o3, r3; + return o3 = (i2 = this.getRangeOfAttachment(e3))[0], n3 = this.locationFromPosition(o3).index, r3 = this.getTextAtIndex(n3), new this.constructor(this.blockList.editObjectAtIndex(n3, function(n4) { + return n4.copyWithText(r3.updateAttributesForAttachment(t4, e3)); + })); + }, c2.prototype.removeAttributeForAttachment = function(t4, e3) { + var n3; + return n3 = this.getRangeOfAttachment(e3), this.removeAttributeAtRange(t4, n3); + }, c2.prototype.insertBlockBreakAtRange = function(t4) { + var n3, o3, r3, s4; + return s4 = (t4 = i(t4))[0], r3 = this.locationFromPosition(s4).offset, o3 = this.removeTextAtRange(t4), r3 === 0 && (n3 = [new e2.Block()]), new this.constructor(o3.blockList.insertSplittableListAtPosition(new e2.SplittableList(n3), s4)); + }, c2.prototype.applyBlockAttributeAtRange = function(t4, e3, i2) { + var o3, r3, s4, a3; + return s4 = this.expandRangeToLineBreaksAndSplitBlocks(i2), r3 = s4.document, i2 = s4.range, o3 = n2(t4), o3.listAttribute ? (r3 = r3.removeLastListAttributeAtRange(i2, {exceptAttributeName: t4}), a3 = r3.convertLineBreaksToBlockBreaksInRange(i2), r3 = a3.document, i2 = a3.range) : r3 = o3.exclusive ? r3.removeBlockAttributesAtRange(i2) : o3.terminal ? r3.removeLastTerminalAttributeAtRange(i2) : r3.consolidateBlocksAtRange(i2), r3.addAttributeAtRange(t4, e3, i2); + }, c2.prototype.removeLastListAttributeAtRange = function(t4, e3) { + var i2; + return e3 == null && (e3 = {}), i2 = this.blockList, this.eachBlockAtRange(t4, function(t5, o3, r3) { + var s4; + if ((s4 = t5.getLastAttribute()) && n2(s4).listAttribute && s4 !== e3.exceptAttributeName) + return i2 = i2.editObjectAtIndex(r3, function() { + return t5.removeAttribute(s4); + }); + }), new this.constructor(i2); + }, c2.prototype.removeLastTerminalAttributeAtRange = function(t4) { + var e3; + return e3 = this.blockList, this.eachBlockAtRange(t4, function(t5, i2, o3) { + var r3; + if ((r3 = t5.getLastAttribute()) && n2(r3).terminal) + return e3 = e3.editObjectAtIndex(o3, function() { + return t5.removeAttribute(r3); + }); + }), new this.constructor(e3); + }, c2.prototype.removeBlockAttributesAtRange = function(t4) { + var e3; + return e3 = this.blockList, this.eachBlockAtRange(t4, function(t5, n3, i2) { + return t5.hasAttributes() ? e3 = e3.editObjectAtIndex(i2, function() { + return t5.copyWithoutAttributes(); + }) : void 0; + }), new this.constructor(e3); + }, c2.prototype.expandRangeToLineBreaksAndSplitBlocks = function(t4) { + var e3, n3, o3, r3, s4, a3, u2, c3, l2; + return a3 = t4 = i(t4), l2 = a3[0], r3 = a3[1], c3 = this.locationFromPosition(l2), o3 = this.locationFromPosition(r3), e3 = this, u2 = e3.getBlockAtIndex(c3.index), (c3.offset = u2.findLineBreakInDirectionFromPosition("backward", c3.offset)) != null && (s4 = e3.positionFromLocation(c3), e3 = e3.insertBlockBreakAtRange([s4, s4 + 1]), o3.index += 1, o3.offset -= e3.getBlockAtIndex(c3.index).getLength(), c3.index += 1), c3.offset = 0, o3.offset === 0 && o3.index > c3.index ? (o3.index -= 1, o3.offset = e3.getBlockAtIndex(o3.index).getBlockBreakPosition()) : (n3 = e3.getBlockAtIndex(o3.index), n3.text.getStringAtRange([o3.offset - 1, o3.offset]) === "\n" ? o3.offset -= 1 : o3.offset = n3.findLineBreakInDirectionFromPosition("forward", o3.offset), o3.offset !== n3.getBlockBreakPosition() && (s4 = e3.positionFromLocation(o3), e3 = e3.insertBlockBreakAtRange([s4, s4 + 1]))), l2 = e3.positionFromLocation(c3), r3 = e3.positionFromLocation(o3), t4 = i([l2, r3]), {document: e3, range: t4}; + }, c2.prototype.convertLineBreaksToBlockBreaksInRange = function(t4) { + var e3, n3, o3; + return n3 = (t4 = i(t4))[0], o3 = this.getStringAtRange(t4).slice(0, -1), e3 = this, o3.replace(/.*?\n/g, function(t5) { + return n3 += t5.length, e3 = e3.insertBlockBreakAtRange([n3 - 1, n3]); + }), {document: e3, range: t4}; + }, c2.prototype.consolidateBlocksAtRange = function(t4) { + var e3, n3, o3, r3, s4; + return o3 = t4 = i(t4), s4 = o3[0], n3 = o3[1], r3 = this.locationFromPosition(s4).index, e3 = this.locationFromPosition(n3).index, new this.constructor(this.blockList.consolidateFromIndexToIndex(r3, e3)); + }, c2.prototype.getDocumentAtRange = function(t4) { + var e3; + return t4 = i(t4), e3 = this.blockList.getSplittableListInRange(t4).toArray(), new this.constructor(e3); + }, c2.prototype.getStringAtRange = function(t4) { + var e3, n3, o3; + return o3 = t4 = i(t4), n3 = o3[o3.length - 1], n3 !== this.getLength() && (e3 = -1), this.getDocumentAtRange(t4).toString().slice(0, e3); + }, c2.prototype.getBlockAtIndex = function(t4) { + return this.blockList.getObjectAtIndex(t4); + }, c2.prototype.getBlockAtPosition = function(t4) { + var e3; + return e3 = this.locationFromPosition(t4).index, this.getBlockAtIndex(e3); + }, c2.prototype.getTextAtIndex = function(t4) { + var e3; + return (e3 = this.getBlockAtIndex(t4)) != null ? e3.text : void 0; + }, c2.prototype.getTextAtPosition = function(t4) { + var e3; + return e3 = this.locationFromPosition(t4).index, this.getTextAtIndex(e3); + }, c2.prototype.getPieceAtPosition = function(t4) { + var e3, n3, i2; + return i2 = this.locationFromPosition(t4), e3 = i2.index, n3 = i2.offset, this.getTextAtIndex(e3).getPieceAtPosition(n3); + }, c2.prototype.getCharacterAtPosition = function(t4) { + var e3, n3, i2; + return i2 = this.locationFromPosition(t4), e3 = i2.index, n3 = i2.offset, this.getTextAtIndex(e3).getStringAtRange([n3, n3 + 1]); + }, c2.prototype.getLength = function() { + return this.blockList.getEndPosition(); + }, c2.prototype.getBlocks = function() { + return this.blockList.toArray(); + }, c2.prototype.getBlockCount = function() { + return this.blockList.length; + }, c2.prototype.getEditCount = function() { + return this.editCount; + }, c2.prototype.eachBlock = function(t4) { + return this.blockList.eachObject(t4); + }, c2.prototype.eachBlockAtRange = function(t4, e3) { + var n3, o3, r3, s4, a3, u2, c3, l2, h, p2, d, f; + if (u2 = t4 = i(t4), d = u2[0], r3 = u2[1], p2 = this.locationFromPosition(d), o3 = this.locationFromPosition(r3), p2.index === o3.index) + return n3 = this.getBlockAtIndex(p2.index), f = [p2.offset, o3.offset], e3(n3, f, p2.index); + for (h = [], a3 = s4 = c3 = p2.index, l2 = o3.index; l2 >= c3 ? l2 >= s4 : s4 >= l2; a3 = l2 >= c3 ? ++s4 : --s4) + (n3 = this.getBlockAtIndex(a3)) ? (f = function() { + switch (a3) { + case p2.index: + return [p2.offset, n3.text.getLength()]; + case o3.index: + return [0, o3.offset]; + default: + return [0, n3.text.getLength()]; + } + }(), h.push(e3(n3, f, a3))) : h.push(void 0); + return h; + }, c2.prototype.getCommonAttributesAtRange = function(t4) { + var n3, r3, s4; + return r3 = (t4 = i(t4))[0], o2(t4) ? this.getCommonAttributesAtPosition(r3) : (s4 = [], n3 = [], this.eachBlockAtRange(t4, function(t5, e3) { + return e3[0] !== e3[1] ? (s4.push(t5.text.getCommonAttributesAtRange(e3)), n3.push(l(t5))) : void 0; + }), e2.Hash.fromCommonAttributesOfObjects(s4).merge(e2.Hash.fromCommonAttributesOfObjects(n3)).toObject()); + }, c2.prototype.getCommonAttributesAtPosition = function(t4) { + var n3, i2, o3, r3, s4, a3, c3, h, p2, d; + if (p2 = this.locationFromPosition(t4), s4 = p2.index, h = p2.offset, o3 = this.getBlockAtIndex(s4), !o3) + return {}; + r3 = l(o3), n3 = o3.text.getAttributesAtPosition(h), i2 = o3.text.getAttributesAtPosition(h - 1), a3 = function() { + var t5, n4; + t5 = e2.config.textAttributes, n4 = []; + for (c3 in t5) + d = t5[c3], d.inheritable && n4.push(c3); + return n4; + }(); + for (c3 in i2) + d = i2[c3], (d === n3[c3] || u.call(a3, c3) >= 0) && (r3[c3] = d); + return r3; + }, c2.prototype.getRangeOfCommonAttributeAtPosition = function(t4, e3) { + var n3, o3, r3, s4, a3, u2, c3, l2, h; + return a3 = this.locationFromPosition(e3), r3 = a3.index, s4 = a3.offset, h = this.getTextAtIndex(r3), u2 = h.getExpandedRangeForAttributeAtOffset(t4, s4), l2 = u2[0], o3 = u2[1], c3 = this.positionFromLocation({index: r3, offset: l2}), n3 = this.positionFromLocation({index: r3, offset: o3}), i([c3, n3]); + }, c2.prototype.getBaseBlockAttributes = function() { + var t4, e3, n3, i2, o3, r3, s4; + for (t4 = this.getBlockAtIndex(0).getAttributes(), n3 = i2 = 1, s4 = this.getBlockCount(); s4 >= 1 ? s4 > i2 : i2 > s4; n3 = s4 >= 1 ? ++i2 : --i2) + e3 = this.getBlockAtIndex(n3).getAttributes(), r3 = Math.min(t4.length, e3.length), t4 = function() { + var n4, i3, s5; + for (s5 = [], o3 = n4 = 0, i3 = r3; (i3 >= 0 ? i3 > n4 : n4 > i3) && e3[o3] === t4[o3]; o3 = i3 >= 0 ? ++n4 : --n4) + s5.push(e3[o3]); + return s5; + }(); + return t4; + }, l = function(t4) { + var e3, n3; + return n3 = {}, (e3 = t4.getLastAttribute()) && (n3[e3] = true), n3; + }, c2.prototype.getAttachmentById = function(t4) { + var e3, n3, i2, o3; + for (o3 = this.getAttachments(), n3 = 0, i2 = o3.length; i2 > n3; n3++) + if (e3 = o3[n3], e3.id === t4) + return e3; + }, c2.prototype.getAttachmentPieces = function() { + var t4; + return t4 = [], this.blockList.eachObject(function(e3) { + var n3; + return n3 = e3.text, t4 = t4.concat(n3.getAttachmentPieces()); + }), t4; + }, c2.prototype.getAttachments = function() { + var t4, e3, n3, i2, o3; + for (i2 = this.getAttachmentPieces(), o3 = [], t4 = 0, e3 = i2.length; e3 > t4; t4++) + n3 = i2[t4], o3.push(n3.attachment); + return o3; + }, c2.prototype.getRangeOfAttachment = function(t4) { + var e3, n3, o3, r3, s4, a3, u2; + for (r3 = 0, s4 = this.blockList.toArray(), n3 = e3 = 0, o3 = s4.length; o3 > e3; n3 = ++e3) { + if (a3 = s4[n3].text, u2 = a3.getRangeOfAttachment(t4)) + return i([r3 + u2[0], r3 + u2[1]]); + r3 += a3.getLength(); + } + }, c2.prototype.getLocationRangeOfAttachment = function(t4) { + var e3; + return e3 = this.getRangeOfAttachment(t4), this.locationRangeFromRange(e3); + }, c2.prototype.getAttachmentPieceForAttachment = function(t4) { + var e3, n3, i2, o3; + for (o3 = this.getAttachmentPieces(), e3 = 0, n3 = o3.length; n3 > e3; e3++) + if (i2 = o3[e3], i2.attachment === t4) + return i2; + }, c2.prototype.findRangesForBlockAttribute = function(t4) { + var e3, n3, i2, o3, r3, s4, a3; + for (r3 = 0, s4 = [], a3 = this.getBlocks(), n3 = 0, i2 = a3.length; i2 > n3; n3++) + e3 = a3[n3], o3 = e3.getLength(), e3.hasAttribute(t4) && s4.push([r3, r3 + o3]), r3 += o3; + return s4; + }, c2.prototype.findRangesForTextAttribute = function(t4, e3) { + var n3, i2, o3, r3, s4, a3, u2, c3, l2, h; + for (h = (e3 != null ? e3 : {}).withValue, a3 = 0, u2 = [], c3 = [], r3 = function(e4) { + return h != null ? e4.getAttribute(t4) === h : e4.hasAttribute(t4); + }, l2 = this.getPieces(), n3 = 0, i2 = l2.length; i2 > n3; n3++) + s4 = l2[n3], o3 = s4.getLength(), r3(s4) && (u2[1] === a3 ? u2[1] = a3 + o3 : c3.push(u2 = [a3, a3 + o3])), a3 += o3; + return c3; + }, c2.prototype.locationFromPosition = function(t4) { + var e3, n3; + return n3 = this.blockList.findIndexAndOffsetAtPosition(Math.max(0, t4)), n3.index != null ? n3 : (e3 = this.getBlocks(), {index: e3.length - 1, offset: e3[e3.length - 1].getLength()}); + }, c2.prototype.positionFromLocation = function(t4) { + return this.blockList.findPositionAtIndexAndOffset(t4.index, t4.offset); + }, c2.prototype.locationRangeFromPosition = function(t4) { + return i(this.locationFromPosition(t4)); + }, c2.prototype.locationRangeFromRange = function(t4) { + var e3, n3, o3, r3; + if (t4 = i(t4)) + return r3 = t4[0], n3 = t4[1], o3 = this.locationFromPosition(r3), e3 = this.locationFromPosition(n3), i([o3, e3]); + }, c2.prototype.rangeFromLocationRange = function(t4) { + var e3, n3; + return t4 = i(t4), e3 = this.positionFromLocation(t4[0]), o2(t4) || (n3 = this.positionFromLocation(t4[1])), i([e3, n3]); + }, c2.prototype.isEqualTo = function(t4) { + return this.blockList.isEqualTo(t4 != null ? t4.blockList : void 0); + }, c2.prototype.getTexts = function() { + var t4, e3, n3, i2, o3; + for (i2 = this.getBlocks(), o3 = [], e3 = 0, n3 = i2.length; n3 > e3; e3++) + t4 = i2[e3], o3.push(t4.text); + return o3; + }, c2.prototype.getPieces = function() { + var t4, e3, n3, i2, o3; + for (n3 = [], i2 = this.getTexts(), t4 = 0, e3 = i2.length; e3 > t4; t4++) + o3 = i2[t4], n3.push.apply(n3, o3.getPieces()); + return n3; + }, c2.prototype.getObjects = function() { + return this.getBlocks().concat(this.getTexts()).concat(this.getPieces()); + }, c2.prototype.toSerializableDocument = function() { + var t4; + return t4 = [], this.blockList.eachObject(function(e3) { + return t4.push(e3.copyWithText(e3.text.toSerializableText())); + }), new this.constructor(t4); + }, c2.prototype.toString = function() { + return this.blockList.toString(); + }, c2.prototype.toJSON = function() { + return this.blockList.toJSON(); + }, c2.prototype.toConsole = function() { + var t4; + return JSON.stringify(function() { + var e3, n3, i2, o3; + for (i2 = this.blockList.toArray(), o3 = [], e3 = 0, n3 = i2.length; n3 > e3; e3++) + t4 = i2[e3], o3.push(JSON.parse(t4.text.toConsole())); + return o3; + }.call(this)); + }, c2; + }(e2.Object); + }.call(this), function() { + e2.LineBreakInsertion = function() { + function t3(t4) { + var e3; + this.composition = t4, this.document = this.composition.document, e3 = this.composition.getSelectedRange(), this.startPosition = e3[0], this.endPosition = e3[1], this.startLocation = this.document.locationFromPosition(this.startPosition), this.endLocation = this.document.locationFromPosition(this.endPosition), this.block = this.document.getBlockAtIndex(this.endLocation.index), this.breaksOnReturn = this.block.breaksOnReturn(), this.previousCharacter = this.block.text.getStringAtPosition(this.endLocation.offset - 1), this.nextCharacter = this.block.text.getStringAtPosition(this.endLocation.offset); + } + return t3.prototype.shouldInsertBlockBreak = function() { + return this.block.hasAttributes() && this.block.isListItem() && !this.block.isEmpty() ? this.startLocation.offset !== 0 : this.breaksOnReturn && this.nextCharacter !== "\n"; + }, t3.prototype.shouldBreakFormattedBlock = function() { + return this.block.hasAttributes() && !this.block.isListItem() && (this.breaksOnReturn && this.nextCharacter === "\n" || this.previousCharacter === "\n"); + }, t3.prototype.shouldDecreaseListLevel = function() { + return this.block.hasAttributes() && this.block.isListItem() && this.block.isEmpty(); + }, t3.prototype.shouldPrependListItem = function() { + return this.block.isListItem() && this.startLocation.offset === 0 && !this.block.isEmpty(); + }, t3.prototype.shouldRemoveLastBlockAttribute = function() { + return this.block.hasAttributes() && !this.block.isListItem() && this.block.isEmpty(); + }, t3; + }(); + }.call(this), function() { + var t3, n2, i, o2, r2, s2, a2, u, c2, l, h = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + p2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, p2 = {}.hasOwnProperty; + s2 = e2.normalizeRange, c2 = e2.rangesAreEqual, u = e2.rangeIsCollapsed, a2 = e2.objectsAreEqual, t3 = e2.arrayStartsWith, l = e2.summarizeArrayChange, i = e2.getAllAttributeNames, o2 = e2.getBlockConfig, r2 = e2.getTextConfig, n2 = e2.extend, e2.Composition = function(p3) { + function d() { + this.document = new e2.Document(), this.attachments = [], this.currentAttributes = {}, this.revision = 0; + } + var f; + return h(d, p3), d.prototype.setDocument = function(t4) { + var e3; + return t4.isEqualTo(this.document) ? void 0 : (this.document = t4, this.refreshAttachments(), this.revision++, (e3 = this.delegate) != null && typeof e3.compositionDidChangeDocument == "function" ? e3.compositionDidChangeDocument(t4) : void 0); + }, d.prototype.getSnapshot = function() { + return {document: this.document, selectedRange: this.getSelectedRange()}; + }, d.prototype.loadSnapshot = function(t4) { + var n3, i2, o3, r3; + return n3 = t4.document, r3 = t4.selectedRange, (i2 = this.delegate) != null && typeof i2.compositionWillLoadSnapshot == "function" && i2.compositionWillLoadSnapshot(), this.setDocument(n3 != null ? n3 : new e2.Document()), this.setSelection(r3 != null ? r3 : [0, 0]), (o3 = this.delegate) != null && typeof o3.compositionDidLoadSnapshot == "function" ? o3.compositionDidLoadSnapshot() : void 0; + }, d.prototype.insertText = function(t4, e3) { + var n3, i2, o3, r3; + return r3 = (e3 != null ? e3 : {updatePosition: true}).updatePosition, i2 = this.getSelectedRange(), this.setDocument(this.document.insertTextAtRange(t4, i2)), o3 = i2[0], n3 = o3 + t4.getLength(), r3 && this.setSelection(n3), this.notifyDelegateOfInsertionAtRange([o3, n3]); + }, d.prototype.insertBlock = function(t4) { + var n3; + return t4 == null && (t4 = new e2.Block()), n3 = new e2.Document([t4]), this.insertDocument(n3); + }, d.prototype.insertDocument = function(t4) { + var n3, i2, o3; + return t4 == null && (t4 = new e2.Document()), i2 = this.getSelectedRange(), this.setDocument(this.document.insertDocumentAtRange(t4, i2)), o3 = i2[0], n3 = o3 + t4.getLength(), this.setSelection(n3), this.notifyDelegateOfInsertionAtRange([o3, n3]); + }, d.prototype.insertString = function(t4, n3) { + var i2, o3; + return i2 = this.getCurrentTextAttributes(), o3 = e2.Text.textForStringWithAttributes(t4, i2), this.insertText(o3, n3); + }, d.prototype.insertBlockBreak = function() { + var t4, e3, n3; + return e3 = this.getSelectedRange(), this.setDocument(this.document.insertBlockBreakAtRange(e3)), n3 = e3[0], t4 = n3 + 1, this.setSelection(t4), this.notifyDelegateOfInsertionAtRange([n3, t4]); + }, d.prototype.insertLineBreak = function() { + var t4, n3; + return n3 = new e2.LineBreakInsertion(this), n3.shouldDecreaseListLevel() ? (this.decreaseListLevel(), this.setSelection(n3.startPosition)) : n3.shouldPrependListItem() ? (t4 = new e2.Document([n3.block.copyWithoutText()]), this.insertDocument(t4)) : n3.shouldInsertBlockBreak() ? this.insertBlockBreak() : n3.shouldRemoveLastBlockAttribute() ? this.removeLastBlockAttribute() : n3.shouldBreakFormattedBlock() ? this.breakFormattedBlock(n3) : this.insertString("\n"); + }, d.prototype.insertHTML = function(t4) { + var n3, i2, o3, r3; + return n3 = e2.Document.fromHTML(t4), o3 = this.getSelectedRange(), this.setDocument(this.document.mergeDocumentAtRange(n3, o3)), r3 = o3[0], i2 = r3 + n3.getLength() - 1, this.setSelection(i2), this.notifyDelegateOfInsertionAtRange([r3, i2]); + }, d.prototype.replaceHTML = function(t4) { + var n3, i2, o3; + return n3 = e2.Document.fromHTML(t4).copyUsingObjectsFromDocument(this.document), i2 = this.getLocationRange({strict: false}), o3 = this.document.rangeFromLocationRange(i2), this.setDocument(n3), this.setSelection(o3); + }, d.prototype.insertFile = function(t4) { + return this.insertFiles([t4]); + }, d.prototype.insertFiles = function(t4) { + var n3, i2, o3, r3, s3, a3; + for (i2 = [], r3 = 0, s3 = t4.length; s3 > r3; r3++) + o3 = t4[r3], ((a3 = this.delegate) != null ? a3.compositionShouldAcceptFile(o3) : void 0) && (n3 = e2.Attachment.attachmentForFile(o3), i2.push(n3)); + return this.insertAttachments(i2); + }, d.prototype.insertAttachment = function(t4) { + return this.insertAttachments([t4]); + }, d.prototype.insertAttachments = function(t4) { + var n3, i2, o3, r3, s3, a3, u2, c3, l2; + for (c3 = new e2.Text(), r3 = 0, s3 = t4.length; s3 > r3; r3++) + n3 = t4[r3], l2 = n3.getType(), a3 = (u2 = e2.config.attachments[l2]) != null ? u2.presentation : void 0, o3 = this.getCurrentTextAttributes(), a3 && (o3.presentation = a3), i2 = e2.Text.textForAttachmentWithAttributes(n3, o3), c3 = c3.appendText(i2); + return this.insertText(c3); + }, d.prototype.shouldManageDeletingInDirection = function(t4) { + var e3; + if (e3 = this.getLocationRange(), u(e3)) { + if (t4 === "backward" && e3[0].offset === 0) + return true; + if (this.shouldManageMovingCursorInDirection(t4)) + return true; + } else if (e3[0].index !== e3[1].index) + return true; + return false; + }, d.prototype.deleteInDirection = function(t4, e3) { + var n3, i2, o3, r3, s3, a3, c3, l2; + return r3 = (e3 != null ? e3 : {}).length, s3 = this.getLocationRange(), a3 = this.getSelectedRange(), c3 = u(a3), c3 ? o3 = t4 === "backward" && s3[0].offset === 0 : l2 = s3[0].index !== s3[1].index, o3 && this.canDecreaseBlockAttributeLevel() && (i2 = this.getBlock(), i2.isListItem() ? this.decreaseListLevel() : this.decreaseBlockAttributeLevel(), this.setSelection(a3[0]), i2.isEmpty()) ? false : (c3 && (a3 = this.getExpandedRangeInDirection(t4, {length: r3}), t4 === "backward" && (n3 = this.getAttachmentAtRange(a3))), n3 ? (this.editAttachment(n3), false) : (this.setDocument(this.document.removeTextAtRange(a3)), this.setSelection(a3[0]), o3 || l2 ? false : void 0)); + }, d.prototype.moveTextFromRange = function(t4) { + var e3; + return e3 = this.getSelectedRange()[0], this.setDocument(this.document.moveTextFromRangeToPosition(t4, e3)), this.setSelection(e3); + }, d.prototype.removeAttachment = function(t4) { + var e3; + return (e3 = this.document.getRangeOfAttachment(t4)) ? (this.stopEditingAttachment(), this.setDocument(this.document.removeTextAtRange(e3)), this.setSelection(e3[0])) : void 0; + }, d.prototype.removeLastBlockAttribute = function() { + var t4, e3, n3, i2; + return n3 = this.getSelectedRange(), i2 = n3[0], e3 = n3[1], t4 = this.document.getBlockAtPosition(e3), this.removeCurrentAttribute(t4.getLastAttribute()), this.setSelection(i2); + }, f = " ", d.prototype.insertPlaceholder = function() { + return this.placeholderPosition = this.getPosition(), this.insertString(f); + }, d.prototype.selectPlaceholder = function() { + return this.placeholderPosition != null ? (this.setSelectedRange([this.placeholderPosition, this.placeholderPosition + f.length]), this.getSelectedRange()) : void 0; + }, d.prototype.forgetPlaceholder = function() { + return this.placeholderPosition = null; + }, d.prototype.hasCurrentAttribute = function(t4) { + var e3; + return e3 = this.currentAttributes[t4], e3 != null && e3 !== false; + }, d.prototype.toggleCurrentAttribute = function(t4) { + var e3; + return (e3 = !this.currentAttributes[t4]) ? this.setCurrentAttribute(t4, e3) : this.removeCurrentAttribute(t4); + }, d.prototype.canSetCurrentAttribute = function(t4) { + return o2(t4) ? this.canSetCurrentBlockAttribute(t4) : this.canSetCurrentTextAttribute(t4); + }, d.prototype.canSetCurrentTextAttribute = function() { + var t4, e3, n3, i2, o3; + if (e3 = this.getSelectedDocument()) { + for (o3 = e3.getAttachments(), n3 = 0, i2 = o3.length; i2 > n3; n3++) + if (t4 = o3[n3], !t4.hasContent()) + return false; + return true; + } + }, d.prototype.canSetCurrentBlockAttribute = function() { + var t4; + if (t4 = this.getBlock()) + return !t4.isTerminalBlock(); + }, d.prototype.setCurrentAttribute = function(t4, e3) { + return o2(t4) ? this.setBlockAttribute(t4, e3) : (this.setTextAttribute(t4, e3), this.currentAttributes[t4] = e3, this.notifyDelegateOfCurrentAttributesChange()); + }, d.prototype.setTextAttribute = function(t4, n3) { + var i2, o3, r3, s3; + if (o3 = this.getSelectedRange()) + return r3 = o3[0], i2 = o3[1], r3 !== i2 ? this.setDocument(this.document.addAttributeAtRange(t4, n3, o3)) : t4 === "href" ? (s3 = e2.Text.textForStringWithAttributes(n3, {href: n3}), this.insertText(s3)) : void 0; + }, d.prototype.setBlockAttribute = function(t4, e3) { + var n3, i2; + if (i2 = this.getSelectedRange()) + return this.canSetCurrentAttribute(t4) ? (n3 = this.getBlock(), this.setDocument(this.document.applyBlockAttributeAtRange(t4, e3, i2)), this.setSelection(i2)) : void 0; + }, d.prototype.removeCurrentAttribute = function(t4) { + return o2(t4) ? (this.removeBlockAttribute(t4), this.updateCurrentAttributes()) : (this.removeTextAttribute(t4), delete this.currentAttributes[t4], this.notifyDelegateOfCurrentAttributesChange()); + }, d.prototype.removeTextAttribute = function(t4) { + var e3; + if (e3 = this.getSelectedRange()) + return this.setDocument(this.document.removeAttributeAtRange(t4, e3)); + }, d.prototype.removeBlockAttribute = function(t4) { + var e3; + if (e3 = this.getSelectedRange()) + return this.setDocument(this.document.removeAttributeAtRange(t4, e3)); + }, d.prototype.canDecreaseNestingLevel = function() { + var t4; + return ((t4 = this.getBlock()) != null ? t4.getNestingLevel() : void 0) > 0; + }, d.prototype.canIncreaseNestingLevel = function() { + var e3, n3, i2; + if (e3 = this.getBlock()) + return ((i2 = o2(e3.getLastNestableAttribute())) != null ? i2.listAttribute : 0) ? (n3 = this.getPreviousBlock()) ? t3(n3.getListItemAttributes(), e3.getListItemAttributes()) : void 0 : e3.getNestingLevel() > 0; + }, d.prototype.decreaseNestingLevel = function() { + var t4; + if (t4 = this.getBlock()) + return this.setDocument(this.document.replaceBlock(t4, t4.decreaseNestingLevel())); + }, d.prototype.increaseNestingLevel = function() { + var t4; + if (t4 = this.getBlock()) + return this.setDocument(this.document.replaceBlock(t4, t4.increaseNestingLevel())); + }, d.prototype.canDecreaseBlockAttributeLevel = function() { + var t4; + return ((t4 = this.getBlock()) != null ? t4.getAttributeLevel() : void 0) > 0; + }, d.prototype.decreaseBlockAttributeLevel = function() { + var t4, e3; + return (t4 = (e3 = this.getBlock()) != null ? e3.getLastAttribute() : void 0) ? this.removeCurrentAttribute(t4) : void 0; + }, d.prototype.decreaseListLevel = function() { + var t4, e3, n3, i2, o3, r3; + for (r3 = this.getSelectedRange()[0], o3 = this.document.locationFromPosition(r3).index, n3 = o3, t4 = this.getBlock().getAttributeLevel(); (e3 = this.document.getBlockAtIndex(n3 + 1)) && e3.isListItem() && e3.getAttributeLevel() > t4; ) + n3++; + return r3 = this.document.positionFromLocation({index: o3, offset: 0}), i2 = this.document.positionFromLocation({index: n3, offset: 0}), this.setDocument(this.document.removeLastListAttributeAtRange([r3, i2])); + }, d.prototype.updateCurrentAttributes = function() { + var t4, e3, n3, o3, r3, s3; + if (s3 = this.getSelectedRange({ignoreLock: true})) { + for (e3 = this.document.getCommonAttributesAtRange(s3), r3 = i(), n3 = 0, o3 = r3.length; o3 > n3; n3++) + t4 = r3[n3], e3[t4] || this.canSetCurrentAttribute(t4) || (e3[t4] = false); + if (!a2(e3, this.currentAttributes)) + return this.currentAttributes = e3, this.notifyDelegateOfCurrentAttributesChange(); + } + }, d.prototype.getCurrentAttributes = function() { + return n2.call({}, this.currentAttributes); + }, d.prototype.getCurrentTextAttributes = function() { + var t4, e3, n3, i2; + t4 = {}, n3 = this.currentAttributes; + for (e3 in n3) + i2 = n3[e3], i2 !== false && r2(e3) && (t4[e3] = i2); + return t4; + }, d.prototype.freezeSelection = function() { + return this.setCurrentAttribute("frozen", true); + }, d.prototype.thawSelection = function() { + return this.removeCurrentAttribute("frozen"); + }, d.prototype.hasFrozenSelection = function() { + return this.hasCurrentAttribute("frozen"); + }, d.proxyMethod("getSelectionManager().getPointRange"), d.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"), d.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"), d.proxyMethod("getSelectionManager().locationIsCursorTarget"), d.proxyMethod("getSelectionManager().selectionIsExpanded"), d.proxyMethod("delegate?.getSelectionManager"), d.prototype.setSelection = function(t4) { + var e3, n3; + return e3 = this.document.locationRangeFromRange(t4), (n3 = this.delegate) != null ? n3.compositionDidRequestChangingSelectionToLocationRange(e3) : void 0; + }, d.prototype.getSelectedRange = function() { + var t4; + return (t4 = this.getLocationRange()) ? this.document.rangeFromLocationRange(t4) : void 0; + }, d.prototype.setSelectedRange = function(t4) { + var e3; + return e3 = this.document.locationRangeFromRange(t4), this.getSelectionManager().setLocationRange(e3); + }, d.prototype.getPosition = function() { + var t4; + return (t4 = this.getLocationRange()) ? this.document.positionFromLocation(t4[0]) : void 0; + }, d.prototype.getLocationRange = function(t4) { + var e3, n3; + return (e3 = (n3 = this.targetLocationRange) != null ? n3 : this.getSelectionManager().getLocationRange(t4)) != null ? e3 : s2({index: 0, offset: 0}); + }, d.prototype.withTargetLocationRange = function(t4, e3) { + var n3; + this.targetLocationRange = t4; + try { + n3 = e3(); + } finally { + this.targetLocationRange = null; + } + return n3; + }, d.prototype.withTargetRange = function(t4, e3) { + var n3; + return n3 = this.document.locationRangeFromRange(t4), this.withTargetLocationRange(n3, e3); + }, d.prototype.withTargetDOMRange = function(t4, e3) { + var n3; + return n3 = this.createLocationRangeFromDOMRange(t4, {strict: false}), this.withTargetLocationRange(n3, e3); + }, d.prototype.getExpandedRangeInDirection = function(t4, e3) { + var n3, i2, o3, r3; + return i2 = (e3 != null ? e3 : {}).length, o3 = this.getSelectedRange(), r3 = o3[0], n3 = o3[1], t4 === "backward" ? i2 ? r3 -= i2 : r3 = this.translateUTF16PositionFromOffset(r3, -1) : i2 ? n3 += i2 : n3 = this.translateUTF16PositionFromOffset(n3, 1), s2([r3, n3]); + }, d.prototype.shouldManageMovingCursorInDirection = function(t4) { + var e3; + return this.editingAttachment ? true : (e3 = this.getExpandedRangeInDirection(t4), this.getAttachmentAtRange(e3) != null); + }, d.prototype.moveCursorInDirection = function(t4) { + var e3, n3, i2, o3; + return this.editingAttachment ? i2 = this.document.getRangeOfAttachment(this.editingAttachment) : (o3 = this.getSelectedRange(), i2 = this.getExpandedRangeInDirection(t4), n3 = !c2(o3, i2)), this.setSelectedRange(t4 === "backward" ? i2[0] : i2[1]), n3 && (e3 = this.getAttachmentAtRange(i2)) ? this.editAttachment(e3) : void 0; + }, d.prototype.expandSelectionInDirection = function(t4, e3) { + var n3, i2; + return n3 = (e3 != null ? e3 : {}).length, i2 = this.getExpandedRangeInDirection(t4, {length: n3}), this.setSelectedRange(i2); + }, d.prototype.expandSelectionForEditing = function() { + return this.hasCurrentAttribute("href") ? this.expandSelectionAroundCommonAttribute("href") : void 0; + }, d.prototype.expandSelectionAroundCommonAttribute = function(t4) { + var e3, n3; + return e3 = this.getPosition(), n3 = this.document.getRangeOfCommonAttributeAtPosition(t4, e3), this.setSelectedRange(n3); + }, d.prototype.selectionContainsAttachments = function() { + var t4; + return ((t4 = this.getSelectedAttachments()) != null ? t4.length : void 0) > 0; + }, d.prototype.selectionIsInCursorTarget = function() { + return this.editingAttachment || this.positionIsCursorTarget(this.getPosition()); + }, d.prototype.positionIsCursorTarget = function(t4) { + var e3; + return (e3 = this.document.locationFromPosition(t4)) ? this.locationIsCursorTarget(e3) : void 0; + }, d.prototype.positionIsBlockBreak = function(t4) { + var e3; + return (e3 = this.document.getPieceAtPosition(t4)) != null ? e3.isBlockBreak() : void 0; + }, d.prototype.getSelectedDocument = function() { + var t4; + return (t4 = this.getSelectedRange()) ? this.document.getDocumentAtRange(t4) : void 0; + }, d.prototype.getSelectedAttachments = function() { + var t4; + return (t4 = this.getSelectedDocument()) != null ? t4.getAttachments() : void 0; + }, d.prototype.getAttachments = function() { + return this.attachments.slice(0); + }, d.prototype.refreshAttachments = function() { + var t4, e3, n3, i2, o3, r3, s3, a3, u2, c3, h2, p4; + for (n3 = this.document.getAttachments(), a3 = l(this.attachments, n3), t4 = a3.added, h2 = a3.removed, this.attachments = n3, i2 = 0, r3 = h2.length; r3 > i2; i2++) + e3 = h2[i2], e3.delegate = null, (u2 = this.delegate) != null && typeof u2.compositionDidRemoveAttachment == "function" && u2.compositionDidRemoveAttachment(e3); + for (p4 = [], o3 = 0, s3 = t4.length; s3 > o3; o3++) + e3 = t4[o3], e3.delegate = this, p4.push((c3 = this.delegate) != null && typeof c3.compositionDidAddAttachment == "function" ? c3.compositionDidAddAttachment(e3) : void 0); + return p4; + }, d.prototype.attachmentDidChangeAttributes = function(t4) { + var e3; + return this.revision++, (e3 = this.delegate) != null && typeof e3.compositionDidEditAttachment == "function" ? e3.compositionDidEditAttachment(t4) : void 0; + }, d.prototype.attachmentDidChangePreviewURL = function(t4) { + var e3; + return this.revision++, (e3 = this.delegate) != null && typeof e3.compositionDidChangeAttachmentPreviewURL == "function" ? e3.compositionDidChangeAttachmentPreviewURL(t4) : void 0; + }, d.prototype.editAttachment = function(t4, e3) { + var n3; + if (t4 !== this.editingAttachment) + return this.stopEditingAttachment(), this.editingAttachment = t4, (n3 = this.delegate) != null && typeof n3.compositionDidStartEditingAttachment == "function" ? n3.compositionDidStartEditingAttachment(this.editingAttachment, e3) : void 0; + }, d.prototype.stopEditingAttachment = function() { + var t4; + if (this.editingAttachment) + return (t4 = this.delegate) != null && typeof t4.compositionDidStopEditingAttachment == "function" && t4.compositionDidStopEditingAttachment(this.editingAttachment), this.editingAttachment = null; + }, d.prototype.updateAttributesForAttachment = function(t4, e3) { + return this.setDocument(this.document.updateAttributesForAttachment(t4, e3)); + }, d.prototype.removeAttributeForAttachment = function(t4, e3) { + return this.setDocument(this.document.removeAttributeForAttachment(t4, e3)); + }, d.prototype.breakFormattedBlock = function(t4) { + var n3, i2, o3, r3, s3; + return i2 = t4.document, n3 = t4.block, r3 = t4.startPosition, s3 = [r3 - 1, r3], n3.getBlockBreakPosition() === t4.startLocation.offset ? (n3.breaksOnReturn() && t4.nextCharacter === "\n" ? r3 += 1 : i2 = i2.removeTextAtRange(s3), s3 = [r3, r3]) : t4.nextCharacter === "\n" ? t4.previousCharacter === "\n" ? s3 = [r3 - 1, r3 + 1] : (s3 = [r3, r3 + 1], r3 += 1) : t4.startLocation.offset - 1 !== 0 && (r3 += 1), o3 = new e2.Document([n3.removeLastAttribute().copyWithoutText()]), this.setDocument(i2.insertDocumentAtRange(o3, s3)), this.setSelection(r3); + }, d.prototype.getPreviousBlock = function() { + var t4, e3; + return (e3 = this.getLocationRange()) && (t4 = e3[0].index, t4 > 0) ? this.document.getBlockAtIndex(t4 - 1) : void 0; + }, d.prototype.getBlock = function() { + var t4; + return (t4 = this.getLocationRange()) ? this.document.getBlockAtIndex(t4[0].index) : void 0; + }, d.prototype.getAttachmentAtRange = function(t4) { + var n3; + return n3 = this.document.getDocumentAtRange(t4), n3.toString() === e2.OBJECT_REPLACEMENT_CHARACTER + "\n" ? n3.getAttachments()[0] : void 0; + }, d.prototype.notifyDelegateOfCurrentAttributesChange = function() { + var t4; + return (t4 = this.delegate) != null && typeof t4.compositionDidChangeCurrentAttributes == "function" ? t4.compositionDidChangeCurrentAttributes(this.currentAttributes) : void 0; + }, d.prototype.notifyDelegateOfInsertionAtRange = function(t4) { + var e3; + return (e3 = this.delegate) != null && typeof e3.compositionDidPerformInsertionAtRange == "function" ? e3.compositionDidPerformInsertionAtRange(t4) : void 0; + }, d.prototype.translateUTF16PositionFromOffset = function(t4, e3) { + var n3, i2; + return i2 = this.document.toUTF16String(), n3 = i2.offsetFromUCS2Offset(t4), i2.offsetToUCS2Offset(n3 + e3); + }, d; + }(e2.BasicObject); + }.call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.UndoManager = function(e3) { + function n3(t4) { + this.composition = t4, this.undoEntries = [], this.redoEntries = []; + } + var i; + return t3(n3, e3), n3.prototype.recordUndoEntry = function(t4, e4) { + var n4, o2, r2, s2, a2; + return s2 = e4 != null ? e4 : {}, o2 = s2.context, n4 = s2.consolidatable, r2 = this.undoEntries.slice(-1)[0], n4 && i(r2, t4, o2) ? void 0 : (a2 = this.createEntry({description: t4, context: o2}), this.undoEntries.push(a2), this.redoEntries = []); + }, n3.prototype.undo = function() { + var t4, e4; + return (e4 = this.undoEntries.pop()) ? (t4 = this.createEntry(e4), this.redoEntries.push(t4), this.composition.loadSnapshot(e4.snapshot)) : void 0; + }, n3.prototype.redo = function() { + var t4, e4; + return (t4 = this.redoEntries.pop()) ? (e4 = this.createEntry(t4), this.undoEntries.push(e4), this.composition.loadSnapshot(t4.snapshot)) : void 0; + }, n3.prototype.canUndo = function() { + return this.undoEntries.length > 0; + }, n3.prototype.canRedo = function() { + return this.redoEntries.length > 0; + }, n3.prototype.createEntry = function(t4) { + var e4, n4, i2; + return i2 = t4 != null ? t4 : {}, n4 = i2.description, e4 = i2.context, {description: n4 != null ? n4.toString() : void 0, context: JSON.stringify(e4), snapshot: this.composition.getSnapshot()}; + }, i = function(t4, e4, n4) { + return (t4 != null ? t4.description : void 0) === (e4 != null ? e4.toString() : void 0) && (t4 != null ? t4.context : void 0) === JSON.stringify(n4); + }, n3; + }(e2.BasicObject); + }.call(this), function() { + var t3; + e2.attachmentGalleryFilter = function(e3) { + var n2; + return n2 = new t3(e3), n2.perform(), n2.getSnapshot(); + }, t3 = function() { + function t4(t5) { + this.document = t5.document, this.selectedRange = t5.selectedRange; + } + var e3, n2, i; + return e3 = "attachmentGallery", n2 = "presentation", i = "gallery", t4.prototype.perform = function() { + return this.removeBlockAttribute(), this.applyBlockAttribute(); + }, t4.prototype.getSnapshot = function() { + return {document: this.document, selectedRange: this.selectedRange}; + }, t4.prototype.removeBlockAttribute = function() { + var t5, n3, i2, o2, r2; + for (o2 = this.findRangesOfBlocks(), r2 = [], t5 = 0, n3 = o2.length; n3 > t5; t5++) + i2 = o2[t5], r2.push(this.document = this.document.removeAttributeAtRange(e3, i2)); + return r2; + }, t4.prototype.applyBlockAttribute = function() { + var t5, n3, i2, o2, r2, s2; + for (i2 = 0, r2 = this.findRangesOfPieces(), s2 = [], t5 = 0, n3 = r2.length; n3 > t5; t5++) + o2 = r2[t5], o2[1] - o2[0] > 1 && (o2[0] += i2, o2[1] += i2, this.document.getCharacterAtPosition(o2[1]) !== "\n" && (this.document = this.document.insertBlockBreakAtRange(o2[1]), o2[1] < this.selectedRange[1] && this.moveSelectedRangeForward(), o2[1]++, i2++), o2[0] !== 0 && this.document.getCharacterAtPosition(o2[0] - 1) !== "\n" && (this.document = this.document.insertBlockBreakAtRange(o2[0]), o2[0] < this.selectedRange[0] && this.moveSelectedRangeForward(), o2[0]++, i2++), s2.push(this.document = this.document.applyBlockAttributeAtRange(e3, true, o2))); + return s2; + }, t4.prototype.findRangesOfBlocks = function() { + return this.document.findRangesForBlockAttribute(e3); + }, t4.prototype.findRangesOfPieces = function() { + return this.document.findRangesForTextAttribute(n2, {withValue: i}); + }, t4.prototype.moveSelectedRangeForward = function() { + return this.selectedRange[0] += 1, this.selectedRange[1] += 1; + }, t4; + }(); + }.call(this), function() { + var t3 = function(t4, e3) { + return function() { + return t4.apply(e3, arguments); + }; + }; + e2.Editor = function() { + function n2(n3, o2, r2) { + this.composition = n3, this.selectionManager = o2, this.element = r2, this.insertFiles = t3(this.insertFiles, this), this.undoManager = new e2.UndoManager(this.composition), this.filters = i.slice(0); + } + var i; + return i = [e2.attachmentGalleryFilter], n2.prototype.loadDocument = function(t4) { + return this.loadSnapshot({document: t4, selectedRange: [0, 0]}); + }, n2.prototype.loadHTML = function(t4) { + return t4 == null && (t4 = ""), this.loadDocument(e2.Document.fromHTML(t4, {referenceElement: this.element})); + }, n2.prototype.loadJSON = function(t4) { + var n3, i2; + return n3 = t4.document, i2 = t4.selectedRange, n3 = e2.Document.fromJSON(n3), this.loadSnapshot({document: n3, selectedRange: i2}); + }, n2.prototype.loadSnapshot = function(t4) { + return this.undoManager = new e2.UndoManager(this.composition), this.composition.loadSnapshot(t4); + }, n2.prototype.getDocument = function() { + return this.composition.document; + }, n2.prototype.getSelectedDocument = function() { + return this.composition.getSelectedDocument(); + }, n2.prototype.getSnapshot = function() { + return this.composition.getSnapshot(); + }, n2.prototype.toJSON = function() { + return this.getSnapshot(); + }, n2.prototype.deleteInDirection = function(t4) { + return this.composition.deleteInDirection(t4); + }, n2.prototype.insertAttachment = function(t4) { + return this.composition.insertAttachment(t4); + }, n2.prototype.insertAttachments = function(t4) { + return this.composition.insertAttachments(t4); + }, n2.prototype.insertDocument = function(t4) { + return this.composition.insertDocument(t4); + }, n2.prototype.insertFile = function(t4) { + return this.composition.insertFile(t4); + }, n2.prototype.insertFiles = function(t4) { + return this.composition.insertFiles(t4); + }, n2.prototype.insertHTML = function(t4) { + return this.composition.insertHTML(t4); + }, n2.prototype.insertString = function(t4) { + return this.composition.insertString(t4); + }, n2.prototype.insertText = function(t4) { + return this.composition.insertText(t4); + }, n2.prototype.insertLineBreak = function() { + return this.composition.insertLineBreak(); + }, n2.prototype.getSelectedRange = function() { + return this.composition.getSelectedRange(); + }, n2.prototype.getPosition = function() { + return this.composition.getPosition(); + }, n2.prototype.getClientRectAtPosition = function(t4) { + var e3; + return e3 = this.getDocument().locationRangeFromRange([t4, t4 + 1]), this.selectionManager.getClientRectAtLocationRange(e3); + }, n2.prototype.expandSelectionInDirection = function(t4) { + return this.composition.expandSelectionInDirection(t4); + }, n2.prototype.moveCursorInDirection = function(t4) { + return this.composition.moveCursorInDirection(t4); + }, n2.prototype.setSelectedRange = function(t4) { + return this.composition.setSelectedRange(t4); + }, n2.prototype.activateAttribute = function(t4, e3) { + return e3 == null && (e3 = true), this.composition.setCurrentAttribute(t4, e3); + }, n2.prototype.attributeIsActive = function(t4) { + return this.composition.hasCurrentAttribute(t4); + }, n2.prototype.canActivateAttribute = function(t4) { + return this.composition.canSetCurrentAttribute(t4); + }, n2.prototype.deactivateAttribute = function(t4) { + return this.composition.removeCurrentAttribute(t4); + }, n2.prototype.canDecreaseNestingLevel = function() { + return this.composition.canDecreaseNestingLevel(); + }, n2.prototype.canIncreaseNestingLevel = function() { + return this.composition.canIncreaseNestingLevel(); + }, n2.prototype.decreaseNestingLevel = function() { + return this.canDecreaseNestingLevel() ? this.composition.decreaseNestingLevel() : void 0; + }, n2.prototype.increaseNestingLevel = function() { + return this.canIncreaseNestingLevel() ? this.composition.increaseNestingLevel() : void 0; + }, n2.prototype.canRedo = function() { + return this.undoManager.canRedo(); + }, n2.prototype.canUndo = function() { + return this.undoManager.canUndo(); + }, n2.prototype.recordUndoEntry = function(t4, e3) { + var n3, i2, o2; + return o2 = e3 != null ? e3 : {}, i2 = o2.context, n3 = o2.consolidatable, this.undoManager.recordUndoEntry(t4, {context: i2, consolidatable: n3}); + }, n2.prototype.redo = function() { + return this.canRedo() ? this.undoManager.redo() : void 0; + }, n2.prototype.undo = function() { + return this.canUndo() ? this.undoManager.undo() : void 0; + }, n2; + }(); + }.call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.ManagedAttachment = function(e3) { + function n3(t4, e4) { + var n4; + this.attachmentManager = t4, this.attachment = e4, n4 = this.attachment, this.id = n4.id, this.file = n4.file; + } + return t3(n3, e3), n3.prototype.remove = function() { + return this.attachmentManager.requestRemovalOfAttachment(this.attachment); + }, n3.proxyMethod("attachment.getAttribute"), n3.proxyMethod("attachment.hasAttribute"), n3.proxyMethod("attachment.setAttribute"), n3.proxyMethod("attachment.getAttributes"), n3.proxyMethod("attachment.setAttributes"), n3.proxyMethod("attachment.isPending"), n3.proxyMethod("attachment.isPreviewable"), n3.proxyMethod("attachment.getURL"), n3.proxyMethod("attachment.getHref"), n3.proxyMethod("attachment.getFilename"), n3.proxyMethod("attachment.getFilesize"), n3.proxyMethod("attachment.getFormattedFilesize"), n3.proxyMethod("attachment.getExtension"), n3.proxyMethod("attachment.getContentType"), n3.proxyMethod("attachment.getFile"), n3.proxyMethod("attachment.setFile"), n3.proxyMethod("attachment.releaseFile"), n3.proxyMethod("attachment.getUploadProgress"), n3.proxyMethod("attachment.setUploadProgress"), n3; + }(e2.BasicObject); + }.call(this), function() { + var t3 = function(t4, e3) { + function i() { + this.constructor = t4; + } + for (var o2 in e3) + n2.call(e3, o2) && (t4[o2] = e3[o2]); + return i.prototype = e3.prototype, t4.prototype = new i(), t4.__super__ = e3.prototype, t4; + }, n2 = {}.hasOwnProperty; + e2.AttachmentManager = function(n3) { + function i(t4) { + var e3, n4, i2; + for (t4 == null && (t4 = []), this.managedAttachments = {}, n4 = 0, i2 = t4.length; i2 > n4; n4++) + e3 = t4[n4], this.manageAttachment(e3); + } + return t3(i, n3), i.prototype.getAttachments = function() { + var t4, e3, n4, i2; + n4 = this.managedAttachments, i2 = []; + for (e3 in n4) + t4 = n4[e3], i2.push(t4); + return i2; + }, i.prototype.manageAttachment = function(t4) { + var n4, i2; + return (n4 = this.managedAttachments)[i2 = t4.id] != null ? n4[i2] : n4[i2] = new e2.ManagedAttachment(this, t4); + }, i.prototype.attachmentIsManaged = function(t4) { + return t4.id in this.managedAttachments; + }, i.prototype.requestRemovalOfAttachment = function(t4) { + var e3; + return this.attachmentIsManaged(t4) && (e3 = this.delegate) != null && typeof e3.attachmentManagerDidRequestRemovalOfAttachment == "function" ? e3.attachmentManagerDidRequestRemovalOfAttachment(t4) : void 0; + }, i.prototype.unmanageAttachment = function(t4) { + var e3; + return e3 = this.managedAttachments[t4.id], delete this.managedAttachments[t4.id], e3; + }, i; + }(e2.BasicObject); + }.call(this), function() { + var t3, n2, i, o2, r2, s2, a2, u, c2, l, h; + t3 = e2.elementContainsNode, n2 = e2.findChildIndexOfNode, r2 = e2.nodeIsBlockStart, s2 = e2.nodeIsBlockStartComment, o2 = e2.nodeIsBlockContainer, a2 = e2.nodeIsCursorTarget, u = e2.nodeIsEmptyTextNode, c2 = e2.nodeIsTextNode, i = e2.nodeIsAttachmentElement, l = e2.tagName, h = e2.walkTree, e2.LocationMapper = function() { + function e3(t4) { + this.element = t4; + } + var p2, d, f, g; + return e3.prototype.findLocationFromContainerAndOffset = function(e4, i2, o3) { + var s3, u2, l2, p3, g2, m, v; + for (m = (o3 != null ? o3 : {strict: true}).strict, u2 = 0, l2 = false, p3 = {index: 0, offset: 0}, (s3 = this.findAttachmentElementParentForNode(e4)) && (e4 = s3.parentNode, i2 = n2(s3)), v = h(this.element, {usingFilter: f}); v.nextNode(); ) { + if (g2 = v.currentNode, g2 === e4 && c2(e4)) { + a2(g2) || (p3.offset += i2); + break; + } + if (g2.parentNode === e4) { + if (u2++ === i2) + break; + } else if (!t3(e4, g2) && u2 > 0) + break; + r2(g2, {strict: m}) ? (l2 && p3.index++, p3.offset = 0, l2 = true) : p3.offset += d(g2); + } + return p3; + }, e3.prototype.findContainerAndOffsetFromLocation = function(t4) { + var e4, i2, s3, u2, l2; + if (t4.index === 0 && t4.offset === 0) { + for (e4 = this.element, u2 = 0; e4.firstChild; ) + if (e4 = e4.firstChild, o2(e4)) { + u2 = 1; + break; + } + return [e4, u2]; + } + if (l2 = this.findNodeAndOffsetFromLocation(t4), i2 = l2[0], s3 = l2[1], i2) { + if (c2(i2)) + d(i2) === 0 ? (e4 = i2.parentNode.parentNode, u2 = n2(i2.parentNode), a2(i2, {name: "right"}) && u2++) : (e4 = i2, u2 = t4.offset - s3); + else { + if (e4 = i2.parentNode, !r2(i2.previousSibling) && !o2(e4)) + for (; i2 === e4.lastChild && (i2 = e4, e4 = e4.parentNode, !o2(e4)); ) + ; + u2 = n2(i2), t4.offset !== 0 && u2++; + } + return [e4, u2]; + } + }, e3.prototype.findNodeAndOffsetFromLocation = function(t4) { + var e4, n3, i2, o3, r3, s3, u2, l2; + for (u2 = 0, l2 = this.getSignificantNodesForIndex(t4.index), n3 = 0, i2 = l2.length; i2 > n3; n3++) { + if (e4 = l2[n3], o3 = d(e4), t4.offset <= u2 + o3) + if (c2(e4)) { + if (r3 = e4, s3 = u2, t4.offset === s3 && a2(r3)) + break; + } else + r3 || (r3 = e4, s3 = u2); + if (u2 += o3, u2 > t4.offset) + break; + } + return [r3, s3]; + }, e3.prototype.findAttachmentElementParentForNode = function(t4) { + for (; t4 && t4 !== this.element; ) { + if (i(t4)) + return t4; + t4 = t4.parentNode; + } + }, e3.prototype.getSignificantNodesForIndex = function(t4) { + var e4, n3, i2, o3, r3; + for (i2 = [], r3 = h(this.element, {usingFilter: p2}), o3 = false; r3.nextNode(); ) + if (n3 = r3.currentNode, s2(n3)) { + if (typeof e4 != "undefined" && e4 !== null ? e4++ : e4 = 0, e4 === t4) + o3 = true; + else if (o3) + break; + } else + o3 && i2.push(n3); + return i2; + }, d = function(t4) { + var e4; + return t4.nodeType === Node.TEXT_NODE ? a2(t4) ? 0 : (e4 = t4.textContent, e4.length) : l(t4) === "br" || i(t4) ? 1 : 0; + }, p2 = function(t4) { + return g(t4) === NodeFilter.FILTER_ACCEPT ? f(t4) : NodeFilter.FILTER_REJECT; + }, g = function(t4) { + return u(t4) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT; + }, f = function(t4) { + return i(t4.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT; + }, e3; + }(); + }.call(this), function() { + var t3, n2, i = [].slice; + t3 = e2.getDOMRange, n2 = e2.setDOMRange, e2.PointMapper = function() { + function e3() { + } + return e3.prototype.createDOMRangeFromPoint = function(e4) { + var i2, o2, r2, s2, a2, u, c2, l; + if (c2 = e4.x, l = e4.y, document.caretPositionFromPoint) + return a2 = document.caretPositionFromPoint(c2, l), r2 = a2.offsetNode, o2 = a2.offset, i2 = document.createRange(), i2.setStart(r2, o2), i2; + if (document.caretRangeFromPoint) + return document.caretRangeFromPoint(c2, l); + if (document.body.createTextRange) { + s2 = t3(); + try { + u = document.body.createTextRange(), u.moveToPoint(c2, l), u.select(); + } catch (h) { + } + return i2 = t3(), n2(s2), i2; + } + }, e3.prototype.getClientRectsForDOMRange = function(t4) { + var e4, n3, o2; + return n3 = i.call(t4.getClientRects()), o2 = n3[0], e4 = n3[n3.length - 1], [o2, e4]; + }, e3; + }(); + }.call(this), function() { + var t3, n2 = function(t4, e3) { + return function() { + return t4.apply(e3, arguments); + }; + }, i = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + o2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, o2 = {}.hasOwnProperty, r2 = [].indexOf || function(t4) { + for (var e3 = 0, n3 = this.length; n3 > e3; e3++) + if (e3 in this && this[e3] === t4) + return e3; + return -1; + }; + t3 = e2.getDOMRange, e2.SelectionChangeObserver = function(e3) { + function o3() { + this.run = n2(this.run, this), this.update = n2(this.update, this), this.selectionManagers = []; + } + var s2; + return i(o3, e3), o3.prototype.start = function() { + return this.started ? void 0 : (this.started = true, "onselectionchange" in document ? document.addEventListener("selectionchange", this.update, true) : this.run()); + }, o3.prototype.stop = function() { + return this.started ? (this.started = false, document.removeEventListener("selectionchange", this.update, true)) : void 0; + }, o3.prototype.registerSelectionManager = function(t4) { + return r2.call(this.selectionManagers, t4) < 0 ? (this.selectionManagers.push(t4), this.start()) : void 0; + }, o3.prototype.unregisterSelectionManager = function(t4) { + var e4; + return this.selectionManagers = function() { + var n3, i2, o4, r3; + for (o4 = this.selectionManagers, r3 = [], n3 = 0, i2 = o4.length; i2 > n3; n3++) + e4 = o4[n3], e4 !== t4 && r3.push(e4); + return r3; + }.call(this), this.selectionManagers.length === 0 ? this.stop() : void 0; + }, o3.prototype.notifySelectionManagersOfSelectionChange = function() { + var t4, e4, n3, i2, o4; + for (n3 = this.selectionManagers, i2 = [], t4 = 0, e4 = n3.length; e4 > t4; t4++) + o4 = n3[t4], i2.push(o4.selectionDidChange()); + return i2; + }, o3.prototype.update = function() { + var e4; + return e4 = t3(), s2(e4, this.domRange) ? void 0 : (this.domRange = e4, this.notifySelectionManagersOfSelectionChange()); + }, o3.prototype.reset = function() { + return this.domRange = null, this.update(); + }, o3.prototype.run = function() { + return this.started ? (this.update(), requestAnimationFrame(this.run)) : void 0; + }, s2 = function(t4, e4) { + return (t4 != null ? t4.startContainer : void 0) === (e4 != null ? e4.startContainer : void 0) && (t4 != null ? t4.startOffset : void 0) === (e4 != null ? e4.startOffset : void 0) && (t4 != null ? t4.endContainer : void 0) === (e4 != null ? e4.endContainer : void 0) && (t4 != null ? t4.endOffset : void 0) === (e4 != null ? e4.endOffset : void 0); + }, o3; + }(e2.BasicObject), e2.selectionChangeObserver == null && (e2.selectionChangeObserver = new e2.SelectionChangeObserver()); + }.call(this), function() { + var t3, n2, i, o2, r2, s2, a2, u, c2, l, h = function(t4, e3) { + return function() { + return t4.apply(e3, arguments); + }; + }, p2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + d.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, d = {}.hasOwnProperty; + i = e2.getDOMSelection, n2 = e2.getDOMRange, l = e2.setDOMRange, t3 = e2.elementContainsNode, s2 = e2.nodeIsCursorTarget, r2 = e2.innerElementIsActive, o2 = e2.handleEvent, a2 = e2.normalizeRange, u = e2.rangeIsCollapsed, c2 = e2.rangesAreEqual, e2.SelectionManager = function(d2) { + function f(t4) { + this.element = t4, this.selectionDidChange = h(this.selectionDidChange, this), this.didMouseDown = h(this.didMouseDown, this), this.locationMapper = new e2.LocationMapper(this.element), this.pointMapper = new e2.PointMapper(), this.lockCount = 0, o2("mousedown", {onElement: this.element, withCallback: this.didMouseDown}); + } + return p2(f, d2), f.prototype.getLocationRange = function(t4) { + var e3, i2; + return t4 == null && (t4 = {}), e3 = t4.strict === false ? this.createLocationRangeFromDOMRange(n2(), {strict: false}) : t4.ignoreLock ? this.currentLocationRange : (i2 = this.lockedLocationRange) != null ? i2 : this.currentLocationRange; + }, f.prototype.setLocationRange = function(t4) { + var e3; + if (!this.lockedLocationRange) + return t4 = a2(t4), (e3 = this.createDOMRangeFromLocationRange(t4)) ? (l(e3), this.updateCurrentLocationRange(t4)) : void 0; + }, f.prototype.setLocationRangeFromPointRange = function(t4) { + var e3, n3; + return t4 = a2(t4), n3 = this.getLocationAtPoint(t4[0]), e3 = this.getLocationAtPoint(t4[1]), this.setLocationRange([n3, e3]); + }, f.prototype.getClientRectAtLocationRange = function(t4) { + var e3; + return (e3 = this.createDOMRangeFromLocationRange(t4)) ? this.getClientRectsForDOMRange(e3)[1] : void 0; + }, f.prototype.locationIsCursorTarget = function(t4) { + var e3, n3, i2; + return i2 = this.findNodeAndOffsetFromLocation(t4), e3 = i2[0], n3 = i2[1], s2(e3); + }, f.prototype.lock = function() { + return this.lockCount++ === 0 ? (this.updateCurrentLocationRange(), this.lockedLocationRange = this.getLocationRange()) : void 0; + }, f.prototype.unlock = function() { + var t4; + return --this.lockCount === 0 && (t4 = this.lockedLocationRange, this.lockedLocationRange = null, t4 != null) ? this.setLocationRange(t4) : void 0; + }, f.prototype.clearSelection = function() { + var t4; + return (t4 = i()) != null ? t4.removeAllRanges() : void 0; + }, f.prototype.selectionIsCollapsed = function() { + var t4; + return ((t4 = n2()) != null ? t4.collapsed : void 0) === true; + }, f.prototype.selectionIsExpanded = function() { + return !this.selectionIsCollapsed(); + }, f.prototype.createLocationRangeFromDOMRange = function(t4, e3) { + var n3, i2; + if (t4 != null && this.domRangeWithinElement(t4) && (i2 = this.findLocationFromContainerAndOffset(t4.startContainer, t4.startOffset, e3))) + return t4.collapsed || (n3 = this.findLocationFromContainerAndOffset(t4.endContainer, t4.endOffset, e3)), a2([i2, n3]); + }, f.proxyMethod("locationMapper.findLocationFromContainerAndOffset"), f.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"), f.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"), f.proxyMethod("pointMapper.createDOMRangeFromPoint"), f.proxyMethod("pointMapper.getClientRectsForDOMRange"), f.prototype.didMouseDown = function() { + return this.pauseTemporarily(); + }, f.prototype.pauseTemporarily = function() { + var e3, n3, i2, r3; + return this.paused = true, n3 = function(e4) { + return function() { + var n4, o3, s3; + for (e4.paused = false, clearTimeout(r3), o3 = 0, s3 = i2.length; s3 > o3; o3++) + n4 = i2[o3], n4.destroy(); + return t3(document, e4.element) ? e4.selectionDidChange() : void 0; + }; + }(this), r3 = setTimeout(n3, 200), i2 = function() { + var t4, i3, r4, s3; + for (r4 = ["mousemove", "keydown"], s3 = [], t4 = 0, i3 = r4.length; i3 > t4; t4++) + e3 = r4[t4], s3.push(o2(e3, {onElement: document, withCallback: n3})); + return s3; + }(); + }, f.prototype.selectionDidChange = function() { + return this.paused || r2(this.element) ? void 0 : this.updateCurrentLocationRange(); + }, f.prototype.updateCurrentLocationRange = function(t4) { + var e3; + return (t4 != null ? t4 : t4 = this.createLocationRangeFromDOMRange(n2())) && !c2(t4, this.currentLocationRange) ? (this.currentLocationRange = t4, (e3 = this.delegate) != null && typeof e3.locationRangeDidChange == "function" ? e3.locationRangeDidChange(this.currentLocationRange.slice(0)) : void 0) : void 0; + }, f.prototype.createDOMRangeFromLocationRange = function(t4) { + var e3, n3, i2, o3; + return i2 = this.findContainerAndOffsetFromLocation(t4[0]), n3 = u(t4) ? i2 : (o3 = this.findContainerAndOffsetFromLocation(t4[1])) != null ? o3 : i2, i2 != null && n3 != null ? (e3 = document.createRange(), e3.setStart.apply(e3, i2), e3.setEnd.apply(e3, n3), e3) : void 0; + }, f.prototype.getLocationAtPoint = function(t4) { + var e3, n3; + return (e3 = this.createDOMRangeFromPoint(t4)) && (n3 = this.createLocationRangeFromDOMRange(e3)) != null ? n3[0] : void 0; + }, f.prototype.domRangeWithinElement = function(e3) { + return e3.collapsed ? t3(this.element, e3.startContainer) : t3(this.element, e3.startContainer) && t3(this.element, e3.endContainer); + }, f; + }(e2.BasicObject); + }.call(this), function() { + var t3, n2, i, o2, r2 = function(t4, e3) { + function n3() { + this.constructor = t4; + } + for (var i2 in e3) + s2.call(e3, i2) && (t4[i2] = e3[i2]); + return n3.prototype = e3.prototype, t4.prototype = new n3(), t4.__super__ = e3.prototype, t4; + }, s2 = {}.hasOwnProperty, a2 = [].slice; + i = e2.rangeIsCollapsed, o2 = e2.rangesAreEqual, n2 = e2.objectsAreEqual, t3 = e2.getBlockConfig, e2.EditorController = function(s3) { + function u(t4) { + var n3, i2; + this.editorElement = t4.editorElement, n3 = t4.document, i2 = t4.html, this.selectionManager = new e2.SelectionManager(this.editorElement), this.selectionManager.delegate = this, this.composition = new e2.Composition(), this.composition.delegate = this, this.attachmentManager = new e2.AttachmentManager(this.composition.getAttachments()), this.attachmentManager.delegate = this, this.inputController = new e2["Level" + e2.config.input.getLevel() + "InputController"](this.editorElement), this.inputController.delegate = this, this.inputController.responder = this.composition, this.compositionController = new e2.CompositionController(this.editorElement, this.composition), this.compositionController.delegate = this, this.toolbarController = new e2.ToolbarController(this.editorElement.toolbarElement), this.toolbarController.delegate = this, this.editor = new e2.Editor(this.composition, this.selectionManager, this.editorElement), n3 != null ? this.editor.loadDocument(n3) : this.editor.loadHTML(i2); + } + var c2; + return r2(u, s3), u.prototype.registerSelectionManager = function() { + return e2.selectionChangeObserver.registerSelectionManager(this.selectionManager); + }, u.prototype.unregisterSelectionManager = function() { + return e2.selectionChangeObserver.unregisterSelectionManager(this.selectionManager); + }, u.prototype.render = function() { + return this.compositionController.render(); + }, u.prototype.reparse = function() { + return this.composition.replaceHTML(this.editorElement.innerHTML); + }, u.prototype.compositionDidChangeDocument = function() { + return this.notifyEditorElement("document-change"), this.handlingInput ? void 0 : this.render(); + }, u.prototype.compositionDidChangeCurrentAttributes = function(t4) { + return this.currentAttributes = t4, this.toolbarController.updateAttributes(this.currentAttributes), this.updateCurrentActions(), this.notifyEditorElement("attributes-change", {attributes: this.currentAttributes}); + }, u.prototype.compositionDidPerformInsertionAtRange = function(t4) { + return this.pasting ? this.pastedRange = t4 : void 0; + }, u.prototype.compositionShouldAcceptFile = function(t4) { + return this.notifyEditorElement("file-accept", {file: t4}); + }, u.prototype.compositionDidAddAttachment = function(t4) { + var e3; + return e3 = this.attachmentManager.manageAttachment(t4), this.notifyEditorElement("attachment-add", {attachment: e3}); + }, u.prototype.compositionDidEditAttachment = function(t4) { + var e3; + return this.compositionController.rerenderViewForObject(t4), e3 = this.attachmentManager.manageAttachment(t4), this.notifyEditorElement("attachment-edit", {attachment: e3}), this.notifyEditorElement("change"); + }, u.prototype.compositionDidChangeAttachmentPreviewURL = function(t4) { + return this.compositionController.invalidateViewForObject(t4), this.notifyEditorElement("change"); + }, u.prototype.compositionDidRemoveAttachment = function(t4) { + var e3; + return e3 = this.attachmentManager.unmanageAttachment(t4), this.notifyEditorElement("attachment-remove", {attachment: e3}); + }, u.prototype.compositionDidStartEditingAttachment = function(t4, e3) { + return this.attachmentLocationRange = this.composition.document.getLocationRangeOfAttachment(t4), this.compositionController.installAttachmentEditorForAttachment(t4, e3), this.selectionManager.setLocationRange(this.attachmentLocationRange); + }, u.prototype.compositionDidStopEditingAttachment = function() { + return this.compositionController.uninstallAttachmentEditor(), this.attachmentLocationRange = null; + }, u.prototype.compositionDidRequestChangingSelectionToLocationRange = function(t4) { + return !this.loadingSnapshot || this.isFocused() ? (this.requestedLocationRange = t4, this.compositionRevisionWhenLocationRangeRequested = this.composition.revision, this.handlingInput ? void 0 : this.render()) : void 0; + }, u.prototype.compositionWillLoadSnapshot = function() { + return this.loadingSnapshot = true; + }, u.prototype.compositionDidLoadSnapshot = function() { + return this.compositionController.refreshViewCache(), this.render(), this.loadingSnapshot = false; + }, u.prototype.getSelectionManager = function() { + return this.selectionManager; + }, u.proxyMethod("getSelectionManager().setLocationRange"), u.proxyMethod("getSelectionManager().getLocationRange"), u.prototype.attachmentManagerDidRequestRemovalOfAttachment = function(t4) { + return this.removeAttachment(t4); + }, u.prototype.compositionControllerWillSyncDocumentView = function() { + return this.inputController.editorWillSyncDocumentView(), this.selectionManager.lock(), this.selectionManager.clearSelection(); + }, u.prototype.compositionControllerDidSyncDocumentView = function() { + return this.inputController.editorDidSyncDocumentView(), this.selectionManager.unlock(), this.updateCurrentActions(), this.notifyEditorElement("sync"); + }, u.prototype.compositionControllerDidRender = function() { + return this.requestedLocationRange != null && (this.compositionRevisionWhenLocationRangeRequested === this.composition.revision && this.selectionManager.setLocationRange(this.requestedLocationRange), this.requestedLocationRange = null, this.compositionRevisionWhenLocationRangeRequested = null), this.renderedCompositionRevision !== this.composition.revision && (this.runEditorFilters(), this.composition.updateCurrentAttributes(), this.notifyEditorElement("render")), this.renderedCompositionRevision = this.composition.revision; + }, u.prototype.compositionControllerDidFocus = function() { + return this.isFocusedInvisibly() && this.setLocationRange({index: 0, offset: 0}), this.toolbarController.hideDialog(), this.notifyEditorElement("focus"); + }, u.prototype.compositionControllerDidBlur = function() { + return this.notifyEditorElement("blur"); + }, u.prototype.compositionControllerDidSelectAttachment = function(t4, e3) { + return this.toolbarController.hideDialog(), this.composition.editAttachment(t4, e3); + }, u.prototype.compositionControllerDidRequestDeselectingAttachment = function(t4) { + var e3, n3; + return e3 = (n3 = this.attachmentLocationRange) != null ? n3 : this.composition.document.getLocationRangeOfAttachment(t4), this.selectionManager.setLocationRange(e3[1]); + }, u.prototype.compositionControllerWillUpdateAttachment = function(t4) { + return this.editor.recordUndoEntry("Edit Attachment", {context: t4.id, consolidatable: true}); + }, u.prototype.compositionControllerDidRequestRemovalOfAttachment = function(t4) { + return this.removeAttachment(t4); + }, u.prototype.inputControllerWillHandleInput = function() { + return this.handlingInput = true, this.requestedRender = false; + }, u.prototype.inputControllerDidRequestRender = function() { + return this.requestedRender = true; + }, u.prototype.inputControllerDidHandleInput = function() { + return this.handlingInput = false, this.requestedRender ? (this.requestedRender = false, this.render()) : void 0; + }, u.prototype.inputControllerDidAllowUnhandledInput = function() { + return this.notifyEditorElement("change"); + }, u.prototype.inputControllerDidRequestReparse = function() { + return this.reparse(); + }, u.prototype.inputControllerWillPerformTyping = function() { + return this.recordTypingUndoEntry(); + }, u.prototype.inputControllerWillPerformFormatting = function(t4) { + return this.recordFormattingUndoEntry(t4); + }, u.prototype.inputControllerWillCutText = function() { + return this.editor.recordUndoEntry("Cut"); + }, u.prototype.inputControllerWillPaste = function(t4) { + return this.editor.recordUndoEntry("Paste"), this.pasting = true, this.notifyEditorElement("before-paste", {paste: t4}); + }, u.prototype.inputControllerDidPaste = function(t4) { + return t4.range = this.pastedRange, this.pastedRange = null, this.pasting = null, this.notifyEditorElement("paste", {paste: t4}); + }, u.prototype.inputControllerWillMoveText = function() { + return this.editor.recordUndoEntry("Move"); + }, u.prototype.inputControllerWillAttachFiles = function() { + return this.editor.recordUndoEntry("Drop Files"); + }, u.prototype.inputControllerWillPerformUndo = function() { + return this.editor.undo(); + }, u.prototype.inputControllerWillPerformRedo = function() { + return this.editor.redo(); + }, u.prototype.inputControllerDidReceiveKeyboardCommand = function(t4) { + return this.toolbarController.applyKeyboardCommand(t4); + }, u.prototype.inputControllerDidStartDrag = function() { + return this.locationRangeBeforeDrag = this.selectionManager.getLocationRange(); + }, u.prototype.inputControllerDidReceiveDragOverPoint = function(t4) { + return this.selectionManager.setLocationRangeFromPointRange(t4); + }, u.prototype.inputControllerDidCancelDrag = function() { + return this.selectionManager.setLocationRange(this.locationRangeBeforeDrag), this.locationRangeBeforeDrag = null; + }, u.prototype.locationRangeDidChange = function(t4) { + return this.composition.updateCurrentAttributes(), this.updateCurrentActions(), this.attachmentLocationRange && !o2(this.attachmentLocationRange, t4) && this.composition.stopEditingAttachment(), this.notifyEditorElement("selection-change"); + }, u.prototype.toolbarDidClickButton = function() { + return this.getLocationRange() ? void 0 : this.setLocationRange({index: 0, offset: 0}); + }, u.prototype.toolbarDidInvokeAction = function(t4) { + return this.invokeAction(t4); + }, u.prototype.toolbarDidToggleAttribute = function(t4) { + return this.recordFormattingUndoEntry(t4), this.composition.toggleCurrentAttribute(t4), this.render(), this.selectionFrozen ? void 0 : this.editorElement.focus(); + }, u.prototype.toolbarDidUpdateAttribute = function(t4, e3) { + return this.recordFormattingUndoEntry(t4), this.composition.setCurrentAttribute(t4, e3), this.render(), this.selectionFrozen ? void 0 : this.editorElement.focus(); + }, u.prototype.toolbarDidRemoveAttribute = function(t4) { + return this.recordFormattingUndoEntry(t4), this.composition.removeCurrentAttribute(t4), this.render(), this.selectionFrozen ? void 0 : this.editorElement.focus(); + }, u.prototype.toolbarWillShowDialog = function() { + return this.composition.expandSelectionForEditing(), this.freezeSelection(); + }, u.prototype.toolbarDidShowDialog = function(t4) { + return this.notifyEditorElement("toolbar-dialog-show", {dialogName: t4}); + }, u.prototype.toolbarDidHideDialog = function(t4) { + return this.thawSelection(), this.editorElement.focus(), this.notifyEditorElement("toolbar-dialog-hide", {dialogName: t4}); + }, u.prototype.freezeSelection = function() { + return this.selectionFrozen ? void 0 : (this.selectionManager.lock(), this.composition.freezeSelection(), this.selectionFrozen = true, this.render()); + }, u.prototype.thawSelection = function() { + return this.selectionFrozen ? (this.composition.thawSelection(), this.selectionManager.unlock(), this.selectionFrozen = false, this.render()) : void 0; + }, u.prototype.actions = {undo: {test: function() { + return this.editor.canUndo(); + }, perform: function() { + return this.editor.undo(); + }}, redo: {test: function() { + return this.editor.canRedo(); + }, perform: function() { + return this.editor.redo(); + }}, link: {test: function() { + return this.editor.canActivateAttribute("href"); + }}, increaseNestingLevel: {test: function() { + return this.editor.canIncreaseNestingLevel(); + }, perform: function() { + return this.editor.increaseNestingLevel() && this.render(); + }}, decreaseNestingLevel: {test: function() { + return this.editor.canDecreaseNestingLevel(); + }, perform: function() { + return this.editor.decreaseNestingLevel() && this.render(); + }}, attachFiles: {test: function() { + return true; + }, perform: function() { + return e2.config.input.pickFiles(this.editor.insertFiles); + }}}, u.prototype.canInvokeAction = function(t4) { + var e3, n3; + return this.actionIsExternal(t4) ? true : !!((e3 = this.actions[t4]) != null && (n3 = e3.test) != null ? n3.call(this) : void 0); + }, u.prototype.invokeAction = function(t4) { + var e3, n3; + return this.actionIsExternal(t4) ? this.notifyEditorElement("action-invoke", {actionName: t4}) : (e3 = this.actions[t4]) != null && (n3 = e3.perform) != null ? n3.call(this) : void 0; + }, u.prototype.actionIsExternal = function(t4) { + return /^x-./.test(t4); + }, u.prototype.getCurrentActions = function() { + var t4, e3; + e3 = {}; + for (t4 in this.actions) + e3[t4] = this.canInvokeAction(t4); + return e3; + }, u.prototype.updateCurrentActions = function() { + var t4; + return t4 = this.getCurrentActions(), n2(t4, this.currentActions) ? void 0 : (this.currentActions = t4, this.toolbarController.updateActions(this.currentActions), this.notifyEditorElement("actions-change", {actions: this.currentActions})); + }, u.prototype.runEditorFilters = function() { + var t4, e3, n3, i2, o3, r3, s4, a3; + for (a3 = this.composition.getSnapshot(), o3 = this.editor.filters, n3 = 0, i2 = o3.length; i2 > n3; n3++) + e3 = o3[n3], t4 = a3.document, s4 = a3.selectedRange, a3 = (r3 = e3.call(this.editor, a3)) != null ? r3 : {}, a3.document == null && (a3.document = t4), a3.selectedRange == null && (a3.selectedRange = s4); + return c2(a3, this.composition.getSnapshot()) ? void 0 : this.composition.loadSnapshot(a3); + }, c2 = function(t4, e3) { + return o2(t4.selectedRange, e3.selectedRange) && t4.document.isEqualTo(e3.document); + }, u.prototype.updateInputElement = function() { + var t4, n3; + return t4 = this.compositionController.getSerializableElement(), n3 = e2.serializeToContentType(t4, "text/html"), this.editorElement.setInputElementValue(n3); + }, u.prototype.notifyEditorElement = function(t4, e3) { + switch (t4) { + case "document-change": + this.documentChangedSinceLastRender = true; + break; + case "render": + this.documentChangedSinceLastRender && (this.documentChangedSinceLastRender = false, this.notifyEditorElement("change")); + break; + case "change": + case "attachment-add": + case "attachment-edit": + case "attachment-remove": + this.updateInputElement(); + } + return this.editorElement.notify(t4, e3); + }, u.prototype.removeAttachment = function(t4) { + return this.editor.recordUndoEntry("Delete Attachment"), this.composition.removeAttachment(t4), this.render(); + }, u.prototype.recordFormattingUndoEntry = function(e3) { + var n3, o3; + return n3 = t3(e3), o3 = this.selectionManager.getLocationRange(), n3 || !i(o3) ? this.editor.recordUndoEntry("Formatting", {context: this.getUndoContext(), consolidatable: true}) : void 0; + }, u.prototype.recordTypingUndoEntry = function() { + return this.editor.recordUndoEntry("Typing", {context: this.getUndoContext(this.currentAttributes), consolidatable: true}); + }, u.prototype.getUndoContext = function() { + var t4; + return t4 = 1 <= arguments.length ? a2.call(arguments, 0) : [], [this.getLocationContext(), this.getTimeContext()].concat(a2.call(t4)); + }, u.prototype.getLocationContext = function() { + var t4; + return t4 = this.selectionManager.getLocationRange(), i(t4) ? t4[0].index : t4; + }, u.prototype.getTimeContext = function() { + return e2.config.undoInterval > 0 ? Math.floor(new Date().getTime() / e2.config.undoInterval) : 0; + }, u.prototype.isFocused = function() { + var t4; + return this.editorElement === ((t4 = this.editorElement.ownerDocument) != null ? t4.activeElement : void 0); + }, u.prototype.isFocusedInvisibly = function() { + return this.isFocused() && !this.getLocationRange(); + }, u; + }(e2.Controller); + }.call(this), function() { + var t3, n2, i, o2, r2, s2, a2, u = [].indexOf || function(t4) { + for (var e3 = 0, n3 = this.length; n3 > e3; e3++) + if (e3 in this && this[e3] === t4) + return e3; + return -1; + }; + n2 = e2.browser, s2 = e2.makeElement, a2 = e2.triggerEvent, o2 = e2.handleEvent, r2 = e2.handleEventOnce, i = e2.findClosestElementFromNode, t3 = e2.AttachmentView.attachmentSelector, e2.registerElement("trix-editor", function() { + var c2, l, h, p2, d, f, g, m, v; + return g = 0, l = function(t4) { + return !document.querySelector(":focus") && t4.hasAttribute("autofocus") && document.querySelector("[autofocus]") === t4 ? t4.focus() : void 0; + }, m = function(t4) { + return t4.hasAttribute("contenteditable") ? void 0 : (t4.setAttribute("contenteditable", ""), r2("focus", {onElement: t4, withCallback: function() { + return h(t4); + }})); + }, h = function(t4) { + return d(t4), v(t4); + }, d = function(t4) { + return (typeof document.queryCommandSupported == "function" ? document.queryCommandSupported("enableObjectResizing") : void 0) ? (document.execCommand("enableObjectResizing", false, false), o2("mscontrolselect", {onElement: t4, preventDefault: true})) : void 0; + }, v = function() { + var t4; + return (typeof document.queryCommandSupported == "function" ? document.queryCommandSupported("DefaultParagraphSeparator") : void 0) && (t4 = e2.config.blockAttributes["default"].tagName, t4 === "div" || t4 === "p") ? document.execCommand("DefaultParagraphSeparator", false, t4) : void 0; + }, c2 = function(t4) { + return t4.hasAttribute("role") ? void 0 : t4.setAttribute("role", "textbox"); + }, f = function(t4) { + var e3; + if (!t4.hasAttribute("aria-label") && !t4.hasAttribute("aria-labelledby")) + return (e3 = function() { + var e4, n3, i2; + return i2 = function() { + var n4, i3, o3, r3; + for (o3 = t4.labels, r3 = [], n4 = 0, i3 = o3.length; i3 > n4; n4++) + e4 = o3[n4], e4.contains(t4) || r3.push(e4.textContent); + return r3; + }(), (n3 = i2.join(" ")) ? t4.setAttribute("aria-label", n3) : t4.removeAttribute("aria-label"); + })(), o2("focus", {onElement: t4, withCallback: e3}); + }, p2 = function() { + return n2.forcesObjectResizing ? {display: "inline", width: "auto"} : {display: "inline-block", width: "1px"}; + }(), {defaultCSS: "%t {\n display: block;\n}\n\n%t:empty:not(:focus)::before {\n content: attr(placeholder);\n color: graytext;\n cursor: text;\n pointer-events: none;\n}\n\n%t a[contenteditable=false] {\n cursor: text;\n}\n\n%t img {\n max-width: 100%;\n height: auto;\n}\n\n%t " + t3 + " figcaption textarea {\n resize: none;\n}\n\n%t " + t3 + " figcaption textarea.trix-autoresize-clone {\n position: absolute;\n left: -9999px;\n max-height: 0px;\n}\n\n%t " + t3 + " figcaption[data-trix-placeholder]:empty::before {\n content: attr(data-trix-placeholder);\n color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n display: " + p2.display + " !important;\n width: " + p2.width + " !important;\n padding: 0 !important;\n margin: 0 !important;\n border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n vertical-align: top !important;\n margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n vertical-align: bottom !important;\n margin-right: -1px !important;\n}", trixId: {get: function() { + return this.hasAttribute("trix-id") ? this.getAttribute("trix-id") : (this.setAttribute("trix-id", ++g), this.trixId); + }}, labels: {get: function() { + var t4, e3, n3; + return e3 = [], this.id && this.ownerDocument && e3.push.apply(e3, this.ownerDocument.querySelectorAll("label[for='" + this.id + "']")), (t4 = i(this, {matchingSelector: "label"})) && ((n3 = t4.control) === this || n3 === null) && e3.push(t4), e3; + }}, toolbarElement: {get: function() { + var t4, e3, n3; + return this.hasAttribute("toolbar") ? (e3 = this.ownerDocument) != null ? e3.getElementById(this.getAttribute("toolbar")) : void 0 : this.parentNode ? (n3 = "trix-toolbar-" + this.trixId, this.setAttribute("toolbar", n3), t4 = s2("trix-toolbar", {id: n3}), this.parentNode.insertBefore(t4, this), t4) : void 0; + }}, inputElement: {get: function() { + var t4, e3, n3; + return this.hasAttribute("input") ? (n3 = this.ownerDocument) != null ? n3.getElementById(this.getAttribute("input")) : void 0 : this.parentNode ? (e3 = "trix-input-" + this.trixId, this.setAttribute("input", e3), t4 = s2("input", {type: "hidden", id: e3}), this.parentNode.insertBefore(t4, this.nextElementSibling), t4) : void 0; + }}, editor: {get: function() { + var t4; + return (t4 = this.editorController) != null ? t4.editor : void 0; + }}, name: {get: function() { + var t4; + return (t4 = this.inputElement) != null ? t4.name : void 0; + }}, value: {get: function() { + var t4; + return (t4 = this.inputElement) != null ? t4.value : void 0; + }, set: function(t4) { + var e3; + return this.defaultValue = t4, (e3 = this.editor) != null ? e3.loadHTML(this.defaultValue) : void 0; + }}, notify: function(t4, e3) { + return this.editorController ? a2("trix-" + t4, {onElement: this, attributes: e3}) : void 0; + }, setInputElementValue: function(t4) { + var e3; + return (e3 = this.inputElement) != null ? e3.value = t4 : void 0; + }, initialize: function() { + return this.hasAttribute("data-trix-internal") ? void 0 : (m(this), c2(this), f(this)); + }, connect: function() { + return this.hasAttribute("data-trix-internal") ? void 0 : (this.editorController || (a2("trix-before-initialize", {onElement: this}), this.editorController = new e2.EditorController({editorElement: this, html: this.defaultValue = this.value}), requestAnimationFrame(function(t4) { + return function() { + return a2("trix-initialize", {onElement: t4}); + }; + }(this))), this.editorController.registerSelectionManager(), this.registerResetListener(), this.registerClickListener(), l(this)); + }, disconnect: function() { + var t4; + return (t4 = this.editorController) != null && t4.unregisterSelectionManager(), this.unregisterResetListener(), this.unregisterClickListener(); + }, registerResetListener: function() { + return this.resetListener = this.resetBubbled.bind(this), window.addEventListener("reset", this.resetListener, false); + }, unregisterResetListener: function() { + return window.removeEventListener("reset", this.resetListener, false); + }, registerClickListener: function() { + return this.clickListener = this.clickBubbled.bind(this), window.addEventListener("click", this.clickListener, false); + }, unregisterClickListener: function() { + return window.removeEventListener("click", this.clickListener, false); + }, resetBubbled: function(t4) { + var e3; + if (!t4.defaultPrevented && t4.target === ((e3 = this.inputElement) != null ? e3.form : void 0)) + return this.reset(); + }, clickBubbled: function(t4) { + var e3; + if (!(t4.defaultPrevented || this.contains(t4.target) || !(e3 = i(t4.target, {matchingSelector: "label"})) || u.call(this.labels, e3) < 0)) + return this.focus(); + }, reset: function() { + return this.value = this.defaultValue; + }}; + }()); + }.call(this), function() { + }.call(this); + }).call(this), typeof module == "object" && module.exports ? module.exports = e2 : typeof define == "function" && define.amd && define(e2); + }.call(exports); +}); + +// node_modules/choices.js/public/assets/scripts/choices.js +var require_choices = __commonJS((exports, module) => { + /*! choices.js v10.1.0 | © 2022 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ + (function webpackUniversalModuleDefinition(root2, factory) { + if (typeof exports === "object" && typeof module === "object") + module.exports = factory(); + else if (typeof define === "function" && define.amd) + define([], factory); + else if (typeof exports === "object") + exports["Choices"] = factory(); + else + root2["Choices"] = factory(); + })(window, function() { + return function() { + "use strict"; + var __webpack_modules__ = { + 282: function(__unused_webpack_module, exports2, __webpack_require__2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.clearChoices = exports2.activateChoices = exports2.filterChoices = exports2.addChoice = void 0; + var constants_1 = __webpack_require__2(883); + var addChoice = function(_a) { + var value = _a.value, label = _a.label, id = _a.id, groupId = _a.groupId, disabled = _a.disabled, elementId = _a.elementId, customProperties = _a.customProperties, placeholder = _a.placeholder, keyCode = _a.keyCode; + return { + type: constants_1.ACTION_TYPES.ADD_CHOICE, + value, + label, + id, + groupId, + disabled, + elementId, + customProperties, + placeholder, + keyCode + }; + }; + exports2.addChoice = addChoice; + var filterChoices = function(results) { + return { + type: constants_1.ACTION_TYPES.FILTER_CHOICES, + results + }; + }; + exports2.filterChoices = filterChoices; + var activateChoices = function(active) { + if (active === void 0) { + active = true; + } + return { + type: constants_1.ACTION_TYPES.ACTIVATE_CHOICES, + active + }; + }; + exports2.activateChoices = activateChoices; + var clearChoices = function() { + return { + type: constants_1.ACTION_TYPES.CLEAR_CHOICES + }; + }; + exports2.clearChoices = clearChoices; + }, + 783: function(__unused_webpack_module, exports2, __webpack_require__2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.addGroup = void 0; + var constants_1 = __webpack_require__2(883); + var addGroup = function(_a) { + var value = _a.value, id = _a.id, active = _a.active, disabled = _a.disabled; + return { + type: constants_1.ACTION_TYPES.ADD_GROUP, + value, + id, + active, + disabled + }; + }; + exports2.addGroup = addGroup; + }, + 464: function(__unused_webpack_module, exports2, __webpack_require__2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.highlightItem = exports2.removeItem = exports2.addItem = void 0; + var constants_1 = __webpack_require__2(883); + var addItem = function(_a) { + var value = _a.value, label = _a.label, id = _a.id, choiceId = _a.choiceId, groupId = _a.groupId, customProperties = _a.customProperties, placeholder = _a.placeholder, keyCode = _a.keyCode; + return { + type: constants_1.ACTION_TYPES.ADD_ITEM, + value, + label, + id, + choiceId, + groupId, + customProperties, + placeholder, + keyCode + }; + }; + exports2.addItem = addItem; + var removeItem = function(id, choiceId) { + return { + type: constants_1.ACTION_TYPES.REMOVE_ITEM, + id, + choiceId + }; + }; + exports2.removeItem = removeItem; + var highlightItem = function(id, highlighted) { + return { + type: constants_1.ACTION_TYPES.HIGHLIGHT_ITEM, + id, + highlighted + }; + }; + exports2.highlightItem = highlightItem; + }, + 137: function(__unused_webpack_module, exports2, __webpack_require__2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.setIsLoading = exports2.resetTo = exports2.clearAll = void 0; + var constants_1 = __webpack_require__2(883); + var clearAll = function() { + return { + type: constants_1.ACTION_TYPES.CLEAR_ALL + }; + }; + exports2.clearAll = clearAll; + var resetTo = function(state2) { + return { + type: constants_1.ACTION_TYPES.RESET_TO, + state: state2 + }; + }; + exports2.resetTo = resetTo; + var setIsLoading = function(isLoading) { + return { + type: constants_1.ACTION_TYPES.SET_IS_LOADING, + isLoading + }; + }; + exports2.setIsLoading = setIsLoading; + }, + 373: function(__unused_webpack_module, exports2, __webpack_require__2) { + var __spreadArray = this && this.__spreadArray || function(to, from, pack) { + if (pack || arguments.length === 2) + for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) + ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + var __importDefault = this && this.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { + default: mod + }; + }; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + var deepmerge_1 = __importDefault(__webpack_require__2(996)); + var fuse_js_1 = __importDefault(__webpack_require__2(221)); + var choices_1 = __webpack_require__2(282); + var groups_1 = __webpack_require__2(783); + var items_1 = __webpack_require__2(464); + var misc_1 = __webpack_require__2(137); + var components_1 = __webpack_require__2(520); + var constants_1 = __webpack_require__2(883); + var defaults_1 = __webpack_require__2(789); + var utils_1 = __webpack_require__2(799); + var reducers_1 = __webpack_require__2(655); + var store_1 = __importDefault(__webpack_require__2(744)); + var templates_1 = __importDefault(__webpack_require__2(686)); + var IS_IE11 = "-ms-scroll-limit" in document.documentElement.style && "-ms-ime-align" in document.documentElement.style; + var USER_DEFAULTS = {}; + var Choices2 = function() { + function Choices3(element, userConfig) { + var _this = this; + if (element === void 0) { + element = "[data-choice]"; + } + if (userConfig === void 0) { + userConfig = {}; + } + if (userConfig.allowHTML === void 0) { + console.warn("Deprecation warning: allowHTML will default to false in a future release. To render HTML in Choices, you will need to set it to true. Setting allowHTML will suppress this message."); + } + this.config = deepmerge_1.default.all([defaults_1.DEFAULT_CONFIG, Choices3.defaults.options, userConfig], { + arrayMerge: function(_, sourceArray) { + return __spreadArray([], sourceArray, true); + } + }); + var invalidConfigOptions = (0, utils_1.diff)(this.config, defaults_1.DEFAULT_CONFIG); + if (invalidConfigOptions.length) { + console.warn("Unknown config option(s) passed", invalidConfigOptions.join(", ")); + } + var passedElement = typeof element === "string" ? document.querySelector(element) : element; + if (!(passedElement instanceof HTMLInputElement || passedElement instanceof HTMLSelectElement)) { + throw TypeError("Expected one of the following types text|select-one|select-multiple"); + } + this._isTextElement = passedElement.type === constants_1.TEXT_TYPE; + this._isSelectOneElement = passedElement.type === constants_1.SELECT_ONE_TYPE; + this._isSelectMultipleElement = passedElement.type === constants_1.SELECT_MULTIPLE_TYPE; + this._isSelectElement = this._isSelectOneElement || this._isSelectMultipleElement; + this.config.searchEnabled = this._isSelectMultipleElement || this.config.searchEnabled; + if (!["auto", "always"].includes("".concat(this.config.renderSelectedChoices))) { + this.config.renderSelectedChoices = "auto"; + } + if (userConfig.addItemFilter && typeof userConfig.addItemFilter !== "function") { + var re = userConfig.addItemFilter instanceof RegExp ? userConfig.addItemFilter : new RegExp(userConfig.addItemFilter); + this.config.addItemFilter = re.test.bind(re); + } + if (this._isTextElement) { + this.passedElement = new components_1.WrappedInput({ + element: passedElement, + classNames: this.config.classNames, + delimiter: this.config.delimiter + }); + } else { + this.passedElement = new components_1.WrappedSelect({ + element: passedElement, + classNames: this.config.classNames, + template: function(data3) { + return _this._templates.option(data3); + } + }); + } + this.initialised = false; + this._store = new store_1.default(); + this._initialState = reducers_1.defaultState; + this._currentState = reducers_1.defaultState; + this._prevState = reducers_1.defaultState; + this._currentValue = ""; + this._canSearch = !!this.config.searchEnabled; + this._isScrollingOnIe = false; + this._highlightPosition = 0; + this._wasTap = true; + this._placeholderValue = this._generatePlaceholderValue(); + this._baseId = (0, utils_1.generateId)(this.passedElement.element, "choices-"); + this._direction = this.passedElement.dir; + if (!this._direction) { + var elementDirection = window.getComputedStyle(this.passedElement.element).direction; + var documentDirection = window.getComputedStyle(document.documentElement).direction; + if (elementDirection !== documentDirection) { + this._direction = elementDirection; + } + } + this._idNames = { + itemChoice: "item-choice" + }; + if (this._isSelectElement) { + this._presetGroups = this.passedElement.optionGroups; + this._presetOptions = this.passedElement.options; + } + this._presetChoices = this.config.choices; + this._presetItems = this.config.items; + if (this.passedElement.value && this._isTextElement) { + var splitValues = this.passedElement.value.split(this.config.delimiter); + this._presetItems = this._presetItems.concat(splitValues); + } + if (this.passedElement.options) { + this.passedElement.options.forEach(function(option3) { + _this._presetChoices.push({ + value: option3.value, + label: option3.innerHTML, + selected: !!option3.selected, + disabled: option3.disabled || option3.parentNode.disabled, + placeholder: option3.value === "" || option3.hasAttribute("placeholder"), + customProperties: option3.dataset["custom-properties"] + }); + }); + } + this._render = this._render.bind(this); + this._onFocus = this._onFocus.bind(this); + this._onBlur = this._onBlur.bind(this); + this._onKeyUp = this._onKeyUp.bind(this); + this._onKeyDown = this._onKeyDown.bind(this); + this._onClick = this._onClick.bind(this); + this._onTouchMove = this._onTouchMove.bind(this); + this._onTouchEnd = this._onTouchEnd.bind(this); + this._onMouseDown = this._onMouseDown.bind(this); + this._onMouseOver = this._onMouseOver.bind(this); + this._onFormReset = this._onFormReset.bind(this); + this._onSelectKey = this._onSelectKey.bind(this); + this._onEnterKey = this._onEnterKey.bind(this); + this._onEscapeKey = this._onEscapeKey.bind(this); + this._onDirectionKey = this._onDirectionKey.bind(this); + this._onDeleteKey = this._onDeleteKey.bind(this); + if (this.passedElement.isActive) { + if (!this.config.silent) { + console.warn("Trying to initialise Choices on element already initialised", { + element + }); + } + this.initialised = true; + return; + } + this.init(); + } + Object.defineProperty(Choices3, "defaults", { + get: function() { + return Object.preventExtensions({ + get options() { + return USER_DEFAULTS; + }, + get templates() { + return templates_1.default; + } + }); + }, + enumerable: false, + configurable: true + }); + Choices3.prototype.init = function() { + if (this.initialised) { + return; + } + this._createTemplates(); + this._createElements(); + this._createStructure(); + this._store.subscribe(this._render); + this._render(); + this._addEventListeners(); + var shouldDisable = !this.config.addItems || this.passedElement.element.hasAttribute("disabled"); + if (shouldDisable) { + this.disable(); + } + this.initialised = true; + var callbackOnInit = this.config.callbackOnInit; + if (callbackOnInit && typeof callbackOnInit === "function") { + callbackOnInit.call(this); + } + }; + Choices3.prototype.destroy = function() { + if (!this.initialised) { + return; + } + this._removeEventListeners(); + this.passedElement.reveal(); + this.containerOuter.unwrap(this.passedElement.element); + this.clearStore(); + if (this._isSelectElement) { + this.passedElement.options = this._presetOptions; + } + this._templates = templates_1.default; + this.initialised = false; + }; + Choices3.prototype.enable = function() { + if (this.passedElement.isDisabled) { + this.passedElement.enable(); + } + if (this.containerOuter.isDisabled) { + this._addEventListeners(); + this.input.enable(); + this.containerOuter.enable(); + } + return this; + }; + Choices3.prototype.disable = function() { + if (!this.passedElement.isDisabled) { + this.passedElement.disable(); + } + if (!this.containerOuter.isDisabled) { + this._removeEventListeners(); + this.input.disable(); + this.containerOuter.disable(); + } + return this; + }; + Choices3.prototype.highlightItem = function(item2, runEvent) { + if (runEvent === void 0) { + runEvent = true; + } + if (!item2 || !item2.id) { + return this; + } + var id = item2.id, _a = item2.groupId, groupId = _a === void 0 ? -1 : _a, _b = item2.value, value = _b === void 0 ? "" : _b, _c = item2.label, label = _c === void 0 ? "" : _c; + var group = groupId >= 0 ? this._store.getGroupById(groupId) : null; + this._store.dispatch((0, items_1.highlightItem)(id, true)); + if (runEvent) { + this.passedElement.triggerEvent(constants_1.EVENTS.highlightItem, { + id, + value, + label, + groupValue: group && group.value ? group.value : null + }); + } + return this; + }; + Choices3.prototype.unhighlightItem = function(item2) { + if (!item2 || !item2.id) { + return this; + } + var id = item2.id, _a = item2.groupId, groupId = _a === void 0 ? -1 : _a, _b = item2.value, value = _b === void 0 ? "" : _b, _c = item2.label, label = _c === void 0 ? "" : _c; + var group = groupId >= 0 ? this._store.getGroupById(groupId) : null; + this._store.dispatch((0, items_1.highlightItem)(id, false)); + this.passedElement.triggerEvent(constants_1.EVENTS.highlightItem, { + id, + value, + label, + groupValue: group && group.value ? group.value : null + }); + return this; + }; + Choices3.prototype.highlightAll = function() { + var _this = this; + this._store.items.forEach(function(item2) { + return _this.highlightItem(item2); + }); + return this; + }; + Choices3.prototype.unhighlightAll = function() { + var _this = this; + this._store.items.forEach(function(item2) { + return _this.unhighlightItem(item2); + }); + return this; + }; + Choices3.prototype.removeActiveItemsByValue = function(value) { + var _this = this; + this._store.activeItems.filter(function(item2) { + return item2.value === value; + }).forEach(function(item2) { + return _this._removeItem(item2); + }); + return this; + }; + Choices3.prototype.removeActiveItems = function(excludedId) { + var _this = this; + this._store.activeItems.filter(function(_a) { + var id = _a.id; + return id !== excludedId; + }).forEach(function(item2) { + return _this._removeItem(item2); + }); + return this; + }; + Choices3.prototype.removeHighlightedItems = function(runEvent) { + var _this = this; + if (runEvent === void 0) { + runEvent = false; + } + this._store.highlightedActiveItems.forEach(function(item2) { + _this._removeItem(item2); + if (runEvent) { + _this._triggerChange(item2.value); + } + }); + return this; + }; + Choices3.prototype.showDropdown = function(preventInputFocus) { + var _this = this; + if (this.dropdown.isActive) { + return this; + } + requestAnimationFrame(function() { + _this.dropdown.show(); + _this.containerOuter.open(_this.dropdown.distanceFromTopWindow); + if (!preventInputFocus && _this._canSearch) { + _this.input.focus(); + } + _this.passedElement.triggerEvent(constants_1.EVENTS.showDropdown, {}); + }); + return this; + }; + Choices3.prototype.hideDropdown = function(preventInputBlur) { + var _this = this; + if (!this.dropdown.isActive) { + return this; + } + requestAnimationFrame(function() { + _this.dropdown.hide(); + _this.containerOuter.close(); + if (!preventInputBlur && _this._canSearch) { + _this.input.removeActiveDescendant(); + _this.input.blur(); + } + _this.passedElement.triggerEvent(constants_1.EVENTS.hideDropdown, {}); + }); + return this; + }; + Choices3.prototype.getValue = function(valueOnly) { + if (valueOnly === void 0) { + valueOnly = false; + } + var values = this._store.activeItems.reduce(function(selectedItems, item2) { + var itemValue = valueOnly ? item2.value : item2; + selectedItems.push(itemValue); + return selectedItems; + }, []); + return this._isSelectOneElement ? values[0] : values; + }; + Choices3.prototype.setValue = function(items) { + var _this = this; + if (!this.initialised) { + return this; + } + items.forEach(function(value) { + return _this._setChoiceOrItem(value); + }); + return this; + }; + Choices3.prototype.setChoiceByValue = function(value) { + var _this = this; + if (!this.initialised || this._isTextElement) { + return this; + } + var choiceValue = Array.isArray(value) ? value : [value]; + choiceValue.forEach(function(val) { + return _this._findAndSelectChoiceByValue(val); + }); + return this; + }; + Choices3.prototype.setChoices = function(choicesArrayOrFetcher, value, label, replaceChoices) { + var _this = this; + if (choicesArrayOrFetcher === void 0) { + choicesArrayOrFetcher = []; + } + if (value === void 0) { + value = "value"; + } + if (label === void 0) { + label = "label"; + } + if (replaceChoices === void 0) { + replaceChoices = false; + } + if (!this.initialised) { + throw new ReferenceError("setChoices was called on a non-initialized instance of Choices"); + } + if (!this._isSelectElement) { + throw new TypeError("setChoices can't be used with INPUT based Choices"); + } + if (typeof value !== "string" || !value) { + throw new TypeError("value parameter must be a name of 'value' field in passed objects"); + } + if (replaceChoices) { + this.clearChoices(); + } + if (typeof choicesArrayOrFetcher === "function") { + var fetcher_1 = choicesArrayOrFetcher(this); + if (typeof Promise === "function" && fetcher_1 instanceof Promise) { + return new Promise(function(resolve) { + return requestAnimationFrame(resolve); + }).then(function() { + return _this._handleLoadingState(true); + }).then(function() { + return fetcher_1; + }).then(function(data3) { + return _this.setChoices(data3, value, label, replaceChoices); + }).catch(function(err) { + if (!_this.config.silent) { + console.error(err); + } + }).then(function() { + return _this._handleLoadingState(false); + }).then(function() { + return _this; + }); + } + if (!Array.isArray(fetcher_1)) { + throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: ".concat(typeof fetcher_1)); + } + return this.setChoices(fetcher_1, value, label, false); + } + if (!Array.isArray(choicesArrayOrFetcher)) { + throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices"); + } + this.containerOuter.removeLoadingState(); + this._startLoading(); + choicesArrayOrFetcher.forEach(function(groupOrChoice) { + if (groupOrChoice.choices) { + _this._addGroup({ + id: groupOrChoice.id ? parseInt("".concat(groupOrChoice.id), 10) : null, + group: groupOrChoice, + valueKey: value, + labelKey: label + }); + } else { + var choice = groupOrChoice; + _this._addChoice({ + value: choice[value], + label: choice[label], + isSelected: !!choice.selected, + isDisabled: !!choice.disabled, + placeholder: !!choice.placeholder, + customProperties: choice.customProperties + }); + } + }); + this._stopLoading(); + return this; + }; + Choices3.prototype.clearChoices = function() { + this._store.dispatch((0, choices_1.clearChoices)()); + return this; + }; + Choices3.prototype.clearStore = function() { + this._store.dispatch((0, misc_1.clearAll)()); + return this; + }; + Choices3.prototype.clearInput = function() { + var shouldSetInputWidth = !this._isSelectOneElement; + this.input.clear(shouldSetInputWidth); + if (!this._isTextElement && this._canSearch) { + this._isSearching = false; + this._store.dispatch((0, choices_1.activateChoices)(true)); + } + return this; + }; + Choices3.prototype._render = function() { + if (this._store.isLoading()) { + return; + } + this._currentState = this._store.state; + var stateChanged = this._currentState.choices !== this._prevState.choices || this._currentState.groups !== this._prevState.groups || this._currentState.items !== this._prevState.items; + var shouldRenderChoices = this._isSelectElement; + var shouldRenderItems = this._currentState.items !== this._prevState.items; + if (!stateChanged) { + return; + } + if (shouldRenderChoices) { + this._renderChoices(); + } + if (shouldRenderItems) { + this._renderItems(); + } + this._prevState = this._currentState; + }; + Choices3.prototype._renderChoices = function() { + var _this = this; + var _a = this._store, activeGroups = _a.activeGroups, activeChoices = _a.activeChoices; + var choiceListFragment = document.createDocumentFragment(); + this.choiceList.clear(); + if (this.config.resetScrollPosition) { + requestAnimationFrame(function() { + return _this.choiceList.scrollToTop(); + }); + } + if (activeGroups.length >= 1 && !this._isSearching) { + var activePlaceholders = activeChoices.filter(function(activeChoice) { + return activeChoice.placeholder === true && activeChoice.groupId === -1; + }); + if (activePlaceholders.length >= 1) { + choiceListFragment = this._createChoicesFragment(activePlaceholders, choiceListFragment); + } + choiceListFragment = this._createGroupsFragment(activeGroups, activeChoices, choiceListFragment); + } else if (activeChoices.length >= 1) { + choiceListFragment = this._createChoicesFragment(activeChoices, choiceListFragment); + } + if (choiceListFragment.childNodes && choiceListFragment.childNodes.length > 0) { + var activeItems = this._store.activeItems; + var canAddItem = this._canAddItem(activeItems, this.input.value); + if (canAddItem.response) { + this.choiceList.append(choiceListFragment); + this._highlightChoice(); + } else { + var notice = this._getTemplate("notice", canAddItem.notice); + this.choiceList.append(notice); + } + } else { + var dropdownItem = void 0; + var notice = void 0; + if (this._isSearching) { + notice = typeof this.config.noResultsText === "function" ? this.config.noResultsText() : this.config.noResultsText; + dropdownItem = this._getTemplate("notice", notice, "no-results"); + } else { + notice = typeof this.config.noChoicesText === "function" ? this.config.noChoicesText() : this.config.noChoicesText; + dropdownItem = this._getTemplate("notice", notice, "no-choices"); + } + this.choiceList.append(dropdownItem); + } + }; + Choices3.prototype._renderItems = function() { + var activeItems = this._store.activeItems || []; + this.itemList.clear(); + var itemListFragment = this._createItemsFragment(activeItems); + if (itemListFragment.childNodes) { + this.itemList.append(itemListFragment); + } + }; + Choices3.prototype._createGroupsFragment = function(groups, choices, fragment) { + var _this = this; + if (fragment === void 0) { + fragment = document.createDocumentFragment(); + } + var getGroupChoices = function(group) { + return choices.filter(function(choice) { + if (_this._isSelectOneElement) { + return choice.groupId === group.id; + } + return choice.groupId === group.id && (_this.config.renderSelectedChoices === "always" || !choice.selected); + }); + }; + if (this.config.shouldSort) { + groups.sort(this.config.sorter); + } + groups.forEach(function(group) { + var groupChoices = getGroupChoices(group); + if (groupChoices.length >= 1) { + var dropdownGroup = _this._getTemplate("choiceGroup", group); + fragment.appendChild(dropdownGroup); + _this._createChoicesFragment(groupChoices, fragment, true); + } + }); + return fragment; + }; + Choices3.prototype._createChoicesFragment = function(choices, fragment, withinGroup) { + var _this = this; + if (fragment === void 0) { + fragment = document.createDocumentFragment(); + } + if (withinGroup === void 0) { + withinGroup = false; + } + var _a = this.config, renderSelectedChoices = _a.renderSelectedChoices, searchResultLimit = _a.searchResultLimit, renderChoiceLimit = _a.renderChoiceLimit; + var filter = this._isSearching ? utils_1.sortByScore : this.config.sorter; + var appendChoice = function(choice) { + var shouldRender = renderSelectedChoices === "auto" ? _this._isSelectOneElement || !choice.selected : true; + if (shouldRender) { + var dropdownItem = _this._getTemplate("choice", choice, _this.config.itemSelectText); + fragment.appendChild(dropdownItem); + } + }; + var rendererableChoices = choices; + if (renderSelectedChoices === "auto" && !this._isSelectOneElement) { + rendererableChoices = choices.filter(function(choice) { + return !choice.selected; + }); + } + var _b = rendererableChoices.reduce(function(acc, choice) { + if (choice.placeholder) { + acc.placeholderChoices.push(choice); + } else { + acc.normalChoices.push(choice); + } + return acc; + }, { + placeholderChoices: [], + normalChoices: [] + }), placeholderChoices = _b.placeholderChoices, normalChoices = _b.normalChoices; + if (this.config.shouldSort || this._isSearching) { + normalChoices.sort(filter); + } + var choiceLimit = rendererableChoices.length; + var sortedChoices = this._isSelectOneElement ? __spreadArray(__spreadArray([], placeholderChoices, true), normalChoices, true) : normalChoices; + if (this._isSearching) { + choiceLimit = searchResultLimit; + } else if (renderChoiceLimit && renderChoiceLimit > 0 && !withinGroup) { + choiceLimit = renderChoiceLimit; + } + for (var i = 0; i < choiceLimit; i += 1) { + if (sortedChoices[i]) { + appendChoice(sortedChoices[i]); + } + } + return fragment; + }; + Choices3.prototype._createItemsFragment = function(items, fragment) { + var _this = this; + if (fragment === void 0) { + fragment = document.createDocumentFragment(); + } + var _a = this.config, shouldSortItems = _a.shouldSortItems, sorter = _a.sorter, removeItemButton = _a.removeItemButton; + if (shouldSortItems && !this._isSelectOneElement) { + items.sort(sorter); + } + if (this._isTextElement) { + this.passedElement.value = items.map(function(_a2) { + var value = _a2.value; + return value; + }).join(this.config.delimiter); + } else { + this.passedElement.options = items; + } + var addItemToFragment = function(item2) { + var listItem = _this._getTemplate("item", item2, removeItemButton); + fragment.appendChild(listItem); + }; + items.forEach(addItemToFragment); + return fragment; + }; + Choices3.prototype._triggerChange = function(value) { + if (value === void 0 || value === null) { + return; + } + this.passedElement.triggerEvent(constants_1.EVENTS.change, { + value + }); + }; + Choices3.prototype._selectPlaceholderChoice = function(placeholderChoice) { + this._addItem({ + value: placeholderChoice.value, + label: placeholderChoice.label, + choiceId: placeholderChoice.id, + groupId: placeholderChoice.groupId, + placeholder: placeholderChoice.placeholder + }); + this._triggerChange(placeholderChoice.value); + }; + Choices3.prototype._handleButtonAction = function(activeItems, element) { + if (!activeItems || !element || !this.config.removeItems || !this.config.removeItemButton) { + return; + } + var itemId = element.parentNode && element.parentNode.dataset.id; + var itemToRemove = itemId && activeItems.find(function(item2) { + return item2.id === parseInt(itemId, 10); + }); + if (!itemToRemove) { + return; + } + this._removeItem(itemToRemove); + this._triggerChange(itemToRemove.value); + if (this._isSelectOneElement && this._store.placeholderChoice) { + this._selectPlaceholderChoice(this._store.placeholderChoice); + } + }; + Choices3.prototype._handleItemAction = function(activeItems, element, hasShiftKey) { + var _this = this; + if (hasShiftKey === void 0) { + hasShiftKey = false; + } + if (!activeItems || !element || !this.config.removeItems || this._isSelectOneElement) { + return; + } + var passedId = element.dataset.id; + activeItems.forEach(function(item2) { + if (item2.id === parseInt("".concat(passedId), 10) && !item2.highlighted) { + _this.highlightItem(item2); + } else if (!hasShiftKey && item2.highlighted) { + _this.unhighlightItem(item2); + } + }); + this.input.focus(); + }; + Choices3.prototype._handleChoiceAction = function(activeItems, element) { + if (!activeItems || !element) { + return; + } + var id = element.dataset.id; + var choice = id && this._store.getChoiceById(id); + if (!choice) { + return; + } + var passedKeyCode = activeItems[0] && activeItems[0].keyCode ? activeItems[0].keyCode : void 0; + var hasActiveDropdown = this.dropdown.isActive; + choice.keyCode = passedKeyCode; + this.passedElement.triggerEvent(constants_1.EVENTS.choice, { + choice + }); + if (!choice.selected && !choice.disabled) { + var canAddItem = this._canAddItem(activeItems, choice.value); + if (canAddItem.response) { + this._addItem({ + value: choice.value, + label: choice.label, + choiceId: choice.id, + groupId: choice.groupId, + customProperties: choice.customProperties, + placeholder: choice.placeholder, + keyCode: choice.keyCode + }); + this._triggerChange(choice.value); + } + } + this.clearInput(); + if (hasActiveDropdown && this._isSelectOneElement) { + this.hideDropdown(true); + this.containerOuter.focus(); + } + }; + Choices3.prototype._handleBackspace = function(activeItems) { + if (!this.config.removeItems || !activeItems) { + return; + } + var lastItem = activeItems[activeItems.length - 1]; + var hasHighlightedItems = activeItems.some(function(item2) { + return item2.highlighted; + }); + if (this.config.editItems && !hasHighlightedItems && lastItem) { + this.input.value = lastItem.value; + this.input.setWidth(); + this._removeItem(lastItem); + this._triggerChange(lastItem.value); + } else { + if (!hasHighlightedItems) { + this.highlightItem(lastItem, false); + } + this.removeHighlightedItems(true); + } + }; + Choices3.prototype._startLoading = function() { + this._store.dispatch((0, misc_1.setIsLoading)(true)); + }; + Choices3.prototype._stopLoading = function() { + this._store.dispatch((0, misc_1.setIsLoading)(false)); + }; + Choices3.prototype._handleLoadingState = function(setLoading) { + if (setLoading === void 0) { + setLoading = true; + } + var placeholderItem = this.itemList.getChild(".".concat(this.config.classNames.placeholder)); + if (setLoading) { + this.disable(); + this.containerOuter.addLoadingState(); + if (this._isSelectOneElement) { + if (!placeholderItem) { + placeholderItem = this._getTemplate("placeholder", this.config.loadingText); + if (placeholderItem) { + this.itemList.append(placeholderItem); + } + } else { + placeholderItem.innerHTML = this.config.loadingText; + } + } else { + this.input.placeholder = this.config.loadingText; + } + } else { + this.enable(); + this.containerOuter.removeLoadingState(); + if (this._isSelectOneElement) { + if (placeholderItem) { + placeholderItem.innerHTML = this._placeholderValue || ""; + } + } else { + this.input.placeholder = this._placeholderValue || ""; + } + } + }; + Choices3.prototype._handleSearch = function(value) { + if (!this.input.isFocussed) { + return; + } + var choices = this._store.choices; + var _a = this.config, searchFloor = _a.searchFloor, searchChoices = _a.searchChoices; + var hasUnactiveChoices = choices.some(function(option3) { + return !option3.active; + }); + if (value !== null && typeof value !== "undefined" && value.length >= searchFloor) { + var resultCount = searchChoices ? this._searchChoices(value) : 0; + this.passedElement.triggerEvent(constants_1.EVENTS.search, { + value, + resultCount + }); + } else if (hasUnactiveChoices) { + this._isSearching = false; + this._store.dispatch((0, choices_1.activateChoices)(true)); + } + }; + Choices3.prototype._canAddItem = function(activeItems, value) { + var canAddItem = true; + var notice = typeof this.config.addItemText === "function" ? this.config.addItemText(value) : this.config.addItemText; + if (!this._isSelectOneElement) { + var isDuplicateValue = (0, utils_1.existsInArray)(activeItems, value); + if (this.config.maxItemCount > 0 && this.config.maxItemCount <= activeItems.length) { + canAddItem = false; + notice = typeof this.config.maxItemText === "function" ? this.config.maxItemText(this.config.maxItemCount) : this.config.maxItemText; + } + if (!this.config.duplicateItemsAllowed && isDuplicateValue && canAddItem) { + canAddItem = false; + notice = typeof this.config.uniqueItemText === "function" ? this.config.uniqueItemText(value) : this.config.uniqueItemText; + } + if (this._isTextElement && this.config.addItems && canAddItem && typeof this.config.addItemFilter === "function" && !this.config.addItemFilter(value)) { + canAddItem = false; + notice = typeof this.config.customAddItemText === "function" ? this.config.customAddItemText(value) : this.config.customAddItemText; + } + } + return { + response: canAddItem, + notice + }; + }; + Choices3.prototype._searchChoices = function(value) { + var newValue = typeof value === "string" ? value.trim() : value; + var currentValue = typeof this._currentValue === "string" ? this._currentValue.trim() : this._currentValue; + if (newValue.length < 1 && newValue === "".concat(currentValue, " ")) { + return 0; + } + var haystack = this._store.searchableChoices; + var needle = newValue; + var options2 = Object.assign(this.config.fuseOptions, { + keys: __spreadArray([], this.config.searchFields, true), + includeMatches: true + }); + var fuse = new fuse_js_1.default(haystack, options2); + var results = fuse.search(needle); + this._currentValue = newValue; + this._highlightPosition = 0; + this._isSearching = true; + this._store.dispatch((0, choices_1.filterChoices)(results)); + return results.length; + }; + Choices3.prototype._addEventListeners = function() { + var documentElement = document.documentElement; + documentElement.addEventListener("touchend", this._onTouchEnd, true); + this.containerOuter.element.addEventListener("keydown", this._onKeyDown, true); + this.containerOuter.element.addEventListener("mousedown", this._onMouseDown, true); + documentElement.addEventListener("click", this._onClick, { + passive: true + }); + documentElement.addEventListener("touchmove", this._onTouchMove, { + passive: true + }); + this.dropdown.element.addEventListener("mouseover", this._onMouseOver, { + passive: true + }); + if (this._isSelectOneElement) { + this.containerOuter.element.addEventListener("focus", this._onFocus, { + passive: true + }); + this.containerOuter.element.addEventListener("blur", this._onBlur, { + passive: true + }); + } + this.input.element.addEventListener("keyup", this._onKeyUp, { + passive: true + }); + this.input.element.addEventListener("focus", this._onFocus, { + passive: true + }); + this.input.element.addEventListener("blur", this._onBlur, { + passive: true + }); + if (this.input.element.form) { + this.input.element.form.addEventListener("reset", this._onFormReset, { + passive: true + }); + } + this.input.addEventListeners(); + }; + Choices3.prototype._removeEventListeners = function() { + var documentElement = document.documentElement; + documentElement.removeEventListener("touchend", this._onTouchEnd, true); + this.containerOuter.element.removeEventListener("keydown", this._onKeyDown, true); + this.containerOuter.element.removeEventListener("mousedown", this._onMouseDown, true); + documentElement.removeEventListener("click", this._onClick); + documentElement.removeEventListener("touchmove", this._onTouchMove); + this.dropdown.element.removeEventListener("mouseover", this._onMouseOver); + if (this._isSelectOneElement) { + this.containerOuter.element.removeEventListener("focus", this._onFocus); + this.containerOuter.element.removeEventListener("blur", this._onBlur); + } + this.input.element.removeEventListener("keyup", this._onKeyUp); + this.input.element.removeEventListener("focus", this._onFocus); + this.input.element.removeEventListener("blur", this._onBlur); + if (this.input.element.form) { + this.input.element.form.removeEventListener("reset", this._onFormReset); + } + this.input.removeEventListeners(); + }; + Choices3.prototype._onKeyDown = function(event) { + var keyCode = event.keyCode; + var activeItems = this._store.activeItems; + var hasFocusedInput = this.input.isFocussed; + var hasActiveDropdown = this.dropdown.isActive; + var hasItems = this.itemList.hasChildren(); + var keyString = String.fromCharCode(keyCode); + var wasAlphaNumericChar = /[a-zA-Z0-9-_ ]/.test(keyString); + var BACK_KEY = constants_1.KEY_CODES.BACK_KEY, DELETE_KEY = constants_1.KEY_CODES.DELETE_KEY, ENTER_KEY = constants_1.KEY_CODES.ENTER_KEY, A_KEY = constants_1.KEY_CODES.A_KEY, ESC_KEY = constants_1.KEY_CODES.ESC_KEY, UP_KEY = constants_1.KEY_CODES.UP_KEY, DOWN_KEY = constants_1.KEY_CODES.DOWN_KEY, PAGE_UP_KEY = constants_1.KEY_CODES.PAGE_UP_KEY, PAGE_DOWN_KEY = constants_1.KEY_CODES.PAGE_DOWN_KEY; + if (!this._isTextElement && !hasActiveDropdown && wasAlphaNumericChar) { + this.showDropdown(); + if (!this.input.isFocussed) { + this.input.value += keyString.toLowerCase(); + } + } + switch (keyCode) { + case A_KEY: + return this._onSelectKey(event, hasItems); + case ENTER_KEY: + return this._onEnterKey(event, activeItems, hasActiveDropdown); + case ESC_KEY: + return this._onEscapeKey(hasActiveDropdown); + case UP_KEY: + case PAGE_UP_KEY: + case DOWN_KEY: + case PAGE_DOWN_KEY: + return this._onDirectionKey(event, hasActiveDropdown); + case DELETE_KEY: + case BACK_KEY: + return this._onDeleteKey(event, activeItems, hasFocusedInput); + default: + } + }; + Choices3.prototype._onKeyUp = function(_a) { + var target = _a.target, keyCode = _a.keyCode; + var value = this.input.value; + var activeItems = this._store.activeItems; + var canAddItem = this._canAddItem(activeItems, value); + var backKey = constants_1.KEY_CODES.BACK_KEY, deleteKey = constants_1.KEY_CODES.DELETE_KEY; + if (this._isTextElement) { + var canShowDropdownNotice = canAddItem.notice && value; + if (canShowDropdownNotice) { + var dropdownItem = this._getTemplate("notice", canAddItem.notice); + this.dropdown.element.innerHTML = dropdownItem.outerHTML; + this.showDropdown(true); + } else { + this.hideDropdown(true); + } + } else { + var wasRemovalKeyCode = keyCode === backKey || keyCode === deleteKey; + var userHasRemovedValue = wasRemovalKeyCode && target && !target.value; + var canReactivateChoices = !this._isTextElement && this._isSearching; + var canSearch = this._canSearch && canAddItem.response; + if (userHasRemovedValue && canReactivateChoices) { + this._isSearching = false; + this._store.dispatch((0, choices_1.activateChoices)(true)); + } else if (canSearch) { + this._handleSearch(this.input.rawValue); + } + } + this._canSearch = this.config.searchEnabled; + }; + Choices3.prototype._onSelectKey = function(event, hasItems) { + var ctrlKey = event.ctrlKey, metaKey = event.metaKey; + var hasCtrlDownKeyPressed = ctrlKey || metaKey; + if (hasCtrlDownKeyPressed && hasItems) { + this._canSearch = false; + var shouldHightlightAll = this.config.removeItems && !this.input.value && this.input.element === document.activeElement; + if (shouldHightlightAll) { + this.highlightAll(); + } + } + }; + Choices3.prototype._onEnterKey = function(event, activeItems, hasActiveDropdown) { + var target = event.target; + var enterKey = constants_1.KEY_CODES.ENTER_KEY; + var targetWasButton = target && target.hasAttribute("data-button"); + if (this._isTextElement && target && target.value) { + var value = this.input.value; + var canAddItem = this._canAddItem(activeItems, value); + if (canAddItem.response) { + this.hideDropdown(true); + this._addItem({ + value + }); + this._triggerChange(value); + this.clearInput(); + } + } + if (targetWasButton) { + this._handleButtonAction(activeItems, target); + event.preventDefault(); + } + if (hasActiveDropdown) { + var highlightedChoice = this.dropdown.getChild(".".concat(this.config.classNames.highlightedState)); + if (highlightedChoice) { + if (activeItems[0]) { + activeItems[0].keyCode = enterKey; + } + this._handleChoiceAction(activeItems, highlightedChoice); + } + event.preventDefault(); + } else if (this._isSelectOneElement) { + this.showDropdown(); + event.preventDefault(); + } + }; + Choices3.prototype._onEscapeKey = function(hasActiveDropdown) { + if (hasActiveDropdown) { + this.hideDropdown(true); + this.containerOuter.focus(); + } + }; + Choices3.prototype._onDirectionKey = function(event, hasActiveDropdown) { + var keyCode = event.keyCode, metaKey = event.metaKey; + var downKey = constants_1.KEY_CODES.DOWN_KEY, pageUpKey = constants_1.KEY_CODES.PAGE_UP_KEY, pageDownKey = constants_1.KEY_CODES.PAGE_DOWN_KEY; + if (hasActiveDropdown || this._isSelectOneElement) { + this.showDropdown(); + this._canSearch = false; + var directionInt = keyCode === downKey || keyCode === pageDownKey ? 1 : -1; + var skipKey = metaKey || keyCode === pageDownKey || keyCode === pageUpKey; + var selectableChoiceIdentifier = "[data-choice-selectable]"; + var nextEl2 = void 0; + if (skipKey) { + if (directionInt > 0) { + nextEl2 = this.dropdown.element.querySelector("".concat(selectableChoiceIdentifier, ":last-of-type")); + } else { + nextEl2 = this.dropdown.element.querySelector(selectableChoiceIdentifier); + } + } else { + var currentEl = this.dropdown.element.querySelector(".".concat(this.config.classNames.highlightedState)); + if (currentEl) { + nextEl2 = (0, utils_1.getAdjacentEl)(currentEl, selectableChoiceIdentifier, directionInt); + } else { + nextEl2 = this.dropdown.element.querySelector(selectableChoiceIdentifier); + } + } + if (nextEl2) { + if (!(0, utils_1.isScrolledIntoView)(nextEl2, this.choiceList.element, directionInt)) { + this.choiceList.scrollToChildElement(nextEl2, directionInt); + } + this._highlightChoice(nextEl2); + } + event.preventDefault(); + } + }; + Choices3.prototype._onDeleteKey = function(event, activeItems, hasFocusedInput) { + var target = event.target; + if (!this._isSelectOneElement && !target.value && hasFocusedInput) { + this._handleBackspace(activeItems); + event.preventDefault(); + } + }; + Choices3.prototype._onTouchMove = function() { + if (this._wasTap) { + this._wasTap = false; + } + }; + Choices3.prototype._onTouchEnd = function(event) { + var target = (event || event.touches[0]).target; + var touchWasWithinContainer = this._wasTap && this.containerOuter.element.contains(target); + if (touchWasWithinContainer) { + var containerWasExactTarget = target === this.containerOuter.element || target === this.containerInner.element; + if (containerWasExactTarget) { + if (this._isTextElement) { + this.input.focus(); + } else if (this._isSelectMultipleElement) { + this.showDropdown(); + } + } + event.stopPropagation(); + } + this._wasTap = true; + }; + Choices3.prototype._onMouseDown = function(event) { + var target = event.target; + if (!(target instanceof HTMLElement)) { + return; + } + if (IS_IE11 && this.choiceList.element.contains(target)) { + var firstChoice = this.choiceList.element.firstElementChild; + var isOnScrollbar = this._direction === "ltr" ? event.offsetX >= firstChoice.offsetWidth : event.offsetX < firstChoice.offsetLeft; + this._isScrollingOnIe = isOnScrollbar; + } + if (target === this.input.element) { + return; + } + var item2 = target.closest("[data-button],[data-item],[data-choice]"); + if (item2 instanceof HTMLElement) { + var hasShiftKey = event.shiftKey; + var activeItems = this._store.activeItems; + var dataset = item2.dataset; + if ("button" in dataset) { + this._handleButtonAction(activeItems, item2); + } else if ("item" in dataset) { + this._handleItemAction(activeItems, item2, hasShiftKey); + } else if ("choice" in dataset) { + this._handleChoiceAction(activeItems, item2); + } + } + event.preventDefault(); + }; + Choices3.prototype._onMouseOver = function(_a) { + var target = _a.target; + if (target instanceof HTMLElement && "choice" in target.dataset) { + this._highlightChoice(target); + } + }; + Choices3.prototype._onClick = function(_a) { + var target = _a.target; + var clickWasWithinContainer = this.containerOuter.element.contains(target); + if (clickWasWithinContainer) { + if (!this.dropdown.isActive && !this.containerOuter.isDisabled) { + if (this._isTextElement) { + if (document.activeElement !== this.input.element) { + this.input.focus(); + } + } else { + this.showDropdown(); + this.containerOuter.focus(); + } + } else if (this._isSelectOneElement && target !== this.input.element && !this.dropdown.element.contains(target)) { + this.hideDropdown(); + } + } else { + var hasHighlightedItems = this._store.highlightedActiveItems.length > 0; + if (hasHighlightedItems) { + this.unhighlightAll(); + } + this.containerOuter.removeFocusState(); + this.hideDropdown(true); + } + }; + Choices3.prototype._onFocus = function(_a) { + var _b; + var _this = this; + var target = _a.target; + var focusWasWithinContainer = target && this.containerOuter.element.contains(target); + if (!focusWasWithinContainer) { + return; + } + var focusActions = (_b = {}, _b[constants_1.TEXT_TYPE] = function() { + if (target === _this.input.element) { + _this.containerOuter.addFocusState(); + } + }, _b[constants_1.SELECT_ONE_TYPE] = function() { + _this.containerOuter.addFocusState(); + if (target === _this.input.element) { + _this.showDropdown(true); + } + }, _b[constants_1.SELECT_MULTIPLE_TYPE] = function() { + if (target === _this.input.element) { + _this.showDropdown(true); + _this.containerOuter.addFocusState(); + } + }, _b); + focusActions[this.passedElement.element.type](); + }; + Choices3.prototype._onBlur = function(_a) { + var _b; + var _this = this; + var target = _a.target; + var blurWasWithinContainer = target && this.containerOuter.element.contains(target); + if (blurWasWithinContainer && !this._isScrollingOnIe) { + var activeItems = this._store.activeItems; + var hasHighlightedItems_1 = activeItems.some(function(item2) { + return item2.highlighted; + }); + var blurActions = (_b = {}, _b[constants_1.TEXT_TYPE] = function() { + if (target === _this.input.element) { + _this.containerOuter.removeFocusState(); + if (hasHighlightedItems_1) { + _this.unhighlightAll(); + } + _this.hideDropdown(true); + } + }, _b[constants_1.SELECT_ONE_TYPE] = function() { + _this.containerOuter.removeFocusState(); + if (target === _this.input.element || target === _this.containerOuter.element && !_this._canSearch) { + _this.hideDropdown(true); + } + }, _b[constants_1.SELECT_MULTIPLE_TYPE] = function() { + if (target === _this.input.element) { + _this.containerOuter.removeFocusState(); + _this.hideDropdown(true); + if (hasHighlightedItems_1) { + _this.unhighlightAll(); + } + } + }, _b); + blurActions[this.passedElement.element.type](); + } else { + this._isScrollingOnIe = false; + this.input.element.focus(); + } + }; + Choices3.prototype._onFormReset = function() { + this._store.dispatch((0, misc_1.resetTo)(this._initialState)); + }; + Choices3.prototype._highlightChoice = function(el) { + var _this = this; + if (el === void 0) { + el = null; + } + var choices = Array.from(this.dropdown.element.querySelectorAll("[data-choice-selectable]")); + if (!choices.length) { + return; + } + var passedEl = el; + var highlightedChoices = Array.from(this.dropdown.element.querySelectorAll(".".concat(this.config.classNames.highlightedState))); + highlightedChoices.forEach(function(choice) { + choice.classList.remove(_this.config.classNames.highlightedState); + choice.setAttribute("aria-selected", "false"); + }); + if (passedEl) { + this._highlightPosition = choices.indexOf(passedEl); + } else { + if (choices.length > this._highlightPosition) { + passedEl = choices[this._highlightPosition]; + } else { + passedEl = choices[choices.length - 1]; + } + if (!passedEl) { + passedEl = choices[0]; + } + } + passedEl.classList.add(this.config.classNames.highlightedState); + passedEl.setAttribute("aria-selected", "true"); + this.passedElement.triggerEvent(constants_1.EVENTS.highlightChoice, { + el: passedEl + }); + if (this.dropdown.isActive) { + this.input.setActiveDescendant(passedEl.id); + this.containerOuter.setActiveDescendant(passedEl.id); + } + }; + Choices3.prototype._addItem = function(_a) { + var value = _a.value, _b = _a.label, label = _b === void 0 ? null : _b, _c = _a.choiceId, choiceId = _c === void 0 ? -1 : _c, _d = _a.groupId, groupId = _d === void 0 ? -1 : _d, _e = _a.customProperties, customProperties = _e === void 0 ? {} : _e, _f = _a.placeholder, placeholder = _f === void 0 ? false : _f, _g = _a.keyCode, keyCode = _g === void 0 ? -1 : _g; + var passedValue = typeof value === "string" ? value.trim() : value; + var items = this._store.items; + var passedLabel = label || passedValue; + var passedOptionId = choiceId || -1; + var group = groupId >= 0 ? this._store.getGroupById(groupId) : null; + var id = items ? items.length + 1 : 1; + if (this.config.prependValue) { + passedValue = this.config.prependValue + passedValue.toString(); + } + if (this.config.appendValue) { + passedValue += this.config.appendValue.toString(); + } + this._store.dispatch((0, items_1.addItem)({ + value: passedValue, + label: passedLabel, + id, + choiceId: passedOptionId, + groupId, + customProperties, + placeholder, + keyCode + })); + if (this._isSelectOneElement) { + this.removeActiveItems(id); + } + this.passedElement.triggerEvent(constants_1.EVENTS.addItem, { + id, + value: passedValue, + label: passedLabel, + customProperties, + groupValue: group && group.value ? group.value : null, + keyCode + }); + }; + Choices3.prototype._removeItem = function(item2) { + var id = item2.id, value = item2.value, label = item2.label, customProperties = item2.customProperties, choiceId = item2.choiceId, groupId = item2.groupId; + var group = groupId && groupId >= 0 ? this._store.getGroupById(groupId) : null; + if (!id || !choiceId) { + return; + } + this._store.dispatch((0, items_1.removeItem)(id, choiceId)); + this.passedElement.triggerEvent(constants_1.EVENTS.removeItem, { + id, + value, + label, + customProperties, + groupValue: group && group.value ? group.value : null + }); + }; + Choices3.prototype._addChoice = function(_a) { + var value = _a.value, _b = _a.label, label = _b === void 0 ? null : _b, _c = _a.isSelected, isSelected = _c === void 0 ? false : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.groupId, groupId = _e === void 0 ? -1 : _e, _f = _a.customProperties, customProperties = _f === void 0 ? {} : _f, _g = _a.placeholder, placeholder = _g === void 0 ? false : _g, _h = _a.keyCode, keyCode = _h === void 0 ? -1 : _h; + if (typeof value === "undefined" || value === null) { + return; + } + var choices = this._store.choices; + var choiceLabel = label || value; + var choiceId = choices ? choices.length + 1 : 1; + var choiceElementId = "".concat(this._baseId, "-").concat(this._idNames.itemChoice, "-").concat(choiceId); + this._store.dispatch((0, choices_1.addChoice)({ + id: choiceId, + groupId, + elementId: choiceElementId, + value, + label: choiceLabel, + disabled: isDisabled, + customProperties, + placeholder, + keyCode + })); + if (isSelected) { + this._addItem({ + value, + label: choiceLabel, + choiceId, + customProperties, + placeholder, + keyCode + }); + } + }; + Choices3.prototype._addGroup = function(_a) { + var _this = this; + var group = _a.group, id = _a.id, _b = _a.valueKey, valueKey = _b === void 0 ? "value" : _b, _c = _a.labelKey, labelKey = _c === void 0 ? "label" : _c; + var groupChoices = (0, utils_1.isType)("Object", group) ? group.choices : Array.from(group.getElementsByTagName("OPTION")); + var groupId = id || Math.floor(new Date().valueOf() * Math.random()); + var isDisabled = group.disabled ? group.disabled : false; + if (groupChoices) { + this._store.dispatch((0, groups_1.addGroup)({ + value: group.label, + id: groupId, + active: true, + disabled: isDisabled + })); + var addGroupChoices = function(choice) { + var isOptDisabled = choice.disabled || choice.parentNode && choice.parentNode.disabled; + _this._addChoice({ + value: choice[valueKey], + label: (0, utils_1.isType)("Object", choice) ? choice[labelKey] : choice.innerHTML, + isSelected: choice.selected, + isDisabled: isOptDisabled, + groupId, + customProperties: choice.customProperties, + placeholder: choice.placeholder + }); + }; + groupChoices.forEach(addGroupChoices); + } else { + this._store.dispatch((0, groups_1.addGroup)({ + value: group.label, + id: group.id, + active: false, + disabled: group.disabled + })); + } + }; + Choices3.prototype._getTemplate = function(template) { + var _a; + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + return (_a = this._templates[template]).call.apply(_a, __spreadArray([this, this.config], args, false)); + }; + Choices3.prototype._createTemplates = function() { + var callbackOnCreateTemplates = this.config.callbackOnCreateTemplates; + var userTemplates = {}; + if (callbackOnCreateTemplates && typeof callbackOnCreateTemplates === "function") { + userTemplates = callbackOnCreateTemplates.call(this, utils_1.strToEl); + } + this._templates = (0, deepmerge_1.default)(templates_1.default, userTemplates); + }; + Choices3.prototype._createElements = function() { + this.containerOuter = new components_1.Container({ + element: this._getTemplate("containerOuter", this._direction, this._isSelectElement, this._isSelectOneElement, this.config.searchEnabled, this.passedElement.element.type, this.config.labelId), + classNames: this.config.classNames, + type: this.passedElement.element.type, + position: this.config.position + }); + this.containerInner = new components_1.Container({ + element: this._getTemplate("containerInner"), + classNames: this.config.classNames, + type: this.passedElement.element.type, + position: this.config.position + }); + this.input = new components_1.Input({ + element: this._getTemplate("input", this._placeholderValue), + classNames: this.config.classNames, + type: this.passedElement.element.type, + preventPaste: !this.config.paste + }); + this.choiceList = new components_1.List({ + element: this._getTemplate("choiceList", this._isSelectOneElement) + }); + this.itemList = new components_1.List({ + element: this._getTemplate("itemList", this._isSelectOneElement) + }); + this.dropdown = new components_1.Dropdown({ + element: this._getTemplate("dropdown"), + classNames: this.config.classNames, + type: this.passedElement.element.type + }); + }; + Choices3.prototype._createStructure = function() { + this.passedElement.conceal(); + this.containerInner.wrap(this.passedElement.element); + this.containerOuter.wrap(this.containerInner.element); + if (this._isSelectOneElement) { + this.input.placeholder = this.config.searchPlaceholderValue || ""; + } else if (this._placeholderValue) { + this.input.placeholder = this._placeholderValue; + this.input.setWidth(); + } + this.containerOuter.element.appendChild(this.containerInner.element); + this.containerOuter.element.appendChild(this.dropdown.element); + this.containerInner.element.appendChild(this.itemList.element); + if (!this._isTextElement) { + this.dropdown.element.appendChild(this.choiceList.element); + } + if (!this._isSelectOneElement) { + this.containerInner.element.appendChild(this.input.element); + } else if (this.config.searchEnabled) { + this.dropdown.element.insertBefore(this.input.element, this.dropdown.element.firstChild); + } + if (this._isSelectElement) { + this._highlightPosition = 0; + this._isSearching = false; + this._startLoading(); + if (this._presetGroups.length) { + this._addPredefinedGroups(this._presetGroups); + } else { + this._addPredefinedChoices(this._presetChoices); + } + this._stopLoading(); + } + if (this._isTextElement) { + this._addPredefinedItems(this._presetItems); + } + }; + Choices3.prototype._addPredefinedGroups = function(groups) { + var _this = this; + var placeholderChoice = this.passedElement.placeholderOption; + if (placeholderChoice && placeholderChoice.parentNode && placeholderChoice.parentNode.tagName === "SELECT") { + this._addChoice({ + value: placeholderChoice.value, + label: placeholderChoice.innerHTML, + isSelected: placeholderChoice.selected, + isDisabled: placeholderChoice.disabled, + placeholder: true + }); + } + groups.forEach(function(group) { + return _this._addGroup({ + group, + id: group.id || null + }); + }); + }; + Choices3.prototype._addPredefinedChoices = function(choices) { + var _this = this; + if (this.config.shouldSort) { + choices.sort(this.config.sorter); + } + var hasSelectedChoice = choices.some(function(choice) { + return choice.selected; + }); + var firstEnabledChoiceIndex = choices.findIndex(function(choice) { + return choice.disabled === void 0 || !choice.disabled; + }); + choices.forEach(function(choice, index2) { + var _a = choice.value, value = _a === void 0 ? "" : _a, label = choice.label, customProperties = choice.customProperties, placeholder = choice.placeholder; + if (_this._isSelectElement) { + if (choice.choices) { + _this._addGroup({ + group: choice, + id: choice.id || null + }); + } else { + var shouldPreselect = _this._isSelectOneElement && !hasSelectedChoice && index2 === firstEnabledChoiceIndex; + var isSelected = shouldPreselect ? true : choice.selected; + var isDisabled = choice.disabled; + _this._addChoice({ + value, + label, + isSelected: !!isSelected, + isDisabled: !!isDisabled, + placeholder: !!placeholder, + customProperties + }); + } + } else { + _this._addChoice({ + value, + label, + isSelected: !!choice.selected, + isDisabled: !!choice.disabled, + placeholder: !!choice.placeholder, + customProperties + }); + } + }); + }; + Choices3.prototype._addPredefinedItems = function(items) { + var _this = this; + items.forEach(function(item2) { + if (typeof item2 === "object" && item2.value) { + _this._addItem({ + value: item2.value, + label: item2.label, + choiceId: item2.id, + customProperties: item2.customProperties, + placeholder: item2.placeholder + }); + } + if (typeof item2 === "string") { + _this._addItem({ + value: item2 + }); + } + }); + }; + Choices3.prototype._setChoiceOrItem = function(item2) { + var _this = this; + var itemType = (0, utils_1.getType)(item2).toLowerCase(); + var handleType = { + object: function() { + if (!item2.value) { + return; + } + if (!_this._isTextElement) { + _this._addChoice({ + value: item2.value, + label: item2.label, + isSelected: true, + isDisabled: false, + customProperties: item2.customProperties, + placeholder: item2.placeholder + }); + } else { + _this._addItem({ + value: item2.value, + label: item2.label, + choiceId: item2.id, + customProperties: item2.customProperties, + placeholder: item2.placeholder + }); + } + }, + string: function() { + if (!_this._isTextElement) { + _this._addChoice({ + value: item2, + label: item2, + isSelected: true, + isDisabled: false + }); + } else { + _this._addItem({ + value: item2 + }); + } + } + }; + handleType[itemType](); + }; + Choices3.prototype._findAndSelectChoiceByValue = function(value) { + var _this = this; + var choices = this._store.choices; + var foundChoice = choices.find(function(choice) { + return _this.config.valueComparer(choice.value, value); + }); + if (foundChoice && !foundChoice.selected) { + this._addItem({ + value: foundChoice.value, + label: foundChoice.label, + choiceId: foundChoice.id, + groupId: foundChoice.groupId, + customProperties: foundChoice.customProperties, + placeholder: foundChoice.placeholder, + keyCode: foundChoice.keyCode + }); + } + }; + Choices3.prototype._generatePlaceholderValue = function() { + if (this._isSelectElement && this.passedElement.placeholderOption) { + var placeholderOption = this.passedElement.placeholderOption; + return placeholderOption ? placeholderOption.text : null; + } + var _a = this.config, placeholder = _a.placeholder, placeholderValue = _a.placeholderValue; + var dataset = this.passedElement.element.dataset; + if (placeholder) { + if (placeholderValue) { + return placeholderValue; + } + if (dataset.placeholder) { + return dataset.placeholder; + } + } + return null; + }; + return Choices3; + }(); + exports2["default"] = Choices2; + }, + 613: function(__unused_webpack_module, exports2, __webpack_require__2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + var utils_1 = __webpack_require__2(799); + var constants_1 = __webpack_require__2(883); + var Container = function() { + function Container2(_a) { + var element = _a.element, type = _a.type, classNames = _a.classNames, position = _a.position; + this.element = element; + this.classNames = classNames; + this.type = type; + this.position = position; + this.isOpen = false; + this.isFlipped = false; + this.isFocussed = false; + this.isDisabled = false; + this.isLoading = false; + this._onFocus = this._onFocus.bind(this); + this._onBlur = this._onBlur.bind(this); + } + Container2.prototype.addEventListeners = function() { + this.element.addEventListener("focus", this._onFocus); + this.element.addEventListener("blur", this._onBlur); + }; + Container2.prototype.removeEventListeners = function() { + this.element.removeEventListener("focus", this._onFocus); + this.element.removeEventListener("blur", this._onBlur); + }; + Container2.prototype.shouldFlip = function(dropdownPos) { + if (typeof dropdownPos !== "number") { + return false; + } + var shouldFlip = false; + if (this.position === "auto") { + shouldFlip = !window.matchMedia("(min-height: ".concat(dropdownPos + 1, "px)")).matches; + } else if (this.position === "top") { + shouldFlip = true; + } + return shouldFlip; + }; + Container2.prototype.setActiveDescendant = function(activeDescendantID) { + this.element.setAttribute("aria-activedescendant", activeDescendantID); + }; + Container2.prototype.removeActiveDescendant = function() { + this.element.removeAttribute("aria-activedescendant"); + }; + Container2.prototype.open = function(dropdownPos) { + this.element.classList.add(this.classNames.openState); + this.element.setAttribute("aria-expanded", "true"); + this.isOpen = true; + if (this.shouldFlip(dropdownPos)) { + this.element.classList.add(this.classNames.flippedState); + this.isFlipped = true; + } + }; + Container2.prototype.close = function() { + this.element.classList.remove(this.classNames.openState); + this.element.setAttribute("aria-expanded", "false"); + this.removeActiveDescendant(); + this.isOpen = false; + if (this.isFlipped) { + this.element.classList.remove(this.classNames.flippedState); + this.isFlipped = false; + } + }; + Container2.prototype.focus = function() { + if (!this.isFocussed) { + this.element.focus(); + } + }; + Container2.prototype.addFocusState = function() { + this.element.classList.add(this.classNames.focusState); + }; + Container2.prototype.removeFocusState = function() { + this.element.classList.remove(this.classNames.focusState); + }; + Container2.prototype.enable = function() { + this.element.classList.remove(this.classNames.disabledState); + this.element.removeAttribute("aria-disabled"); + if (this.type === constants_1.SELECT_ONE_TYPE) { + this.element.setAttribute("tabindex", "0"); + } + this.isDisabled = false; + }; + Container2.prototype.disable = function() { + this.element.classList.add(this.classNames.disabledState); + this.element.setAttribute("aria-disabled", "true"); + if (this.type === constants_1.SELECT_ONE_TYPE) { + this.element.setAttribute("tabindex", "-1"); + } + this.isDisabled = true; + }; + Container2.prototype.wrap = function(element) { + (0, utils_1.wrap)(element, this.element); + }; + Container2.prototype.unwrap = function(element) { + if (this.element.parentNode) { + this.element.parentNode.insertBefore(element, this.element); + this.element.parentNode.removeChild(this.element); + } + }; + Container2.prototype.addLoadingState = function() { + this.element.classList.add(this.classNames.loadingState); + this.element.setAttribute("aria-busy", "true"); + this.isLoading = true; + }; + Container2.prototype.removeLoadingState = function() { + this.element.classList.remove(this.classNames.loadingState); + this.element.removeAttribute("aria-busy"); + this.isLoading = false; + }; + Container2.prototype._onFocus = function() { + this.isFocussed = true; + }; + Container2.prototype._onBlur = function() { + this.isFocussed = false; + }; + return Container2; + }(); + exports2["default"] = Container; + }, + 217: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + var Dropdown = function() { + function Dropdown2(_a) { + var element = _a.element, type = _a.type, classNames = _a.classNames; + this.element = element; + this.classNames = classNames; + this.type = type; + this.isActive = false; + } + Object.defineProperty(Dropdown2.prototype, "distanceFromTopWindow", { + get: function() { + return this.element.getBoundingClientRect().bottom; + }, + enumerable: false, + configurable: true + }); + Dropdown2.prototype.getChild = function(selector) { + return this.element.querySelector(selector); + }; + Dropdown2.prototype.show = function() { + this.element.classList.add(this.classNames.activeState); + this.element.setAttribute("aria-expanded", "true"); + this.isActive = true; + return this; + }; + Dropdown2.prototype.hide = function() { + this.element.classList.remove(this.classNames.activeState); + this.element.setAttribute("aria-expanded", "false"); + this.isActive = false; + return this; + }; + return Dropdown2; + }(); + exports2["default"] = Dropdown; + }, + 520: function(__unused_webpack_module, exports2, __webpack_require__2) { + var __importDefault = this && this.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { + default: mod + }; + }; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.WrappedSelect = exports2.WrappedInput = exports2.List = exports2.Input = exports2.Container = exports2.Dropdown = void 0; + var dropdown_1 = __importDefault(__webpack_require__2(217)); + exports2.Dropdown = dropdown_1.default; + var container_1 = __importDefault(__webpack_require__2(613)); + exports2.Container = container_1.default; + var input_1 = __importDefault(__webpack_require__2(11)); + exports2.Input = input_1.default; + var list_1 = __importDefault(__webpack_require__2(624)); + exports2.List = list_1.default; + var wrapped_input_1 = __importDefault(__webpack_require__2(541)); + exports2.WrappedInput = wrapped_input_1.default; + var wrapped_select_1 = __importDefault(__webpack_require__2(982)); + exports2.WrappedSelect = wrapped_select_1.default; + }, + 11: function(__unused_webpack_module, exports2, __webpack_require__2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + var utils_1 = __webpack_require__2(799); + var constants_1 = __webpack_require__2(883); + var Input = function() { + function Input2(_a) { + var element = _a.element, type = _a.type, classNames = _a.classNames, preventPaste = _a.preventPaste; + this.element = element; + this.type = type; + this.classNames = classNames; + this.preventPaste = preventPaste; + this.isFocussed = this.element.isEqualNode(document.activeElement); + this.isDisabled = element.disabled; + this._onPaste = this._onPaste.bind(this); + this._onInput = this._onInput.bind(this); + this._onFocus = this._onFocus.bind(this); + this._onBlur = this._onBlur.bind(this); + } + Object.defineProperty(Input2.prototype, "placeholder", { + set: function(placeholder) { + this.element.placeholder = placeholder; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Input2.prototype, "value", { + get: function() { + return (0, utils_1.sanitise)(this.element.value); + }, + set: function(value) { + this.element.value = value; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Input2.prototype, "rawValue", { + get: function() { + return this.element.value; + }, + enumerable: false, + configurable: true + }); + Input2.prototype.addEventListeners = function() { + this.element.addEventListener("paste", this._onPaste); + this.element.addEventListener("input", this._onInput, { + passive: true + }); + this.element.addEventListener("focus", this._onFocus, { + passive: true + }); + this.element.addEventListener("blur", this._onBlur, { + passive: true + }); + }; + Input2.prototype.removeEventListeners = function() { + this.element.removeEventListener("input", this._onInput); + this.element.removeEventListener("paste", this._onPaste); + this.element.removeEventListener("focus", this._onFocus); + this.element.removeEventListener("blur", this._onBlur); + }; + Input2.prototype.enable = function() { + this.element.removeAttribute("disabled"); + this.isDisabled = false; + }; + Input2.prototype.disable = function() { + this.element.setAttribute("disabled", ""); + this.isDisabled = true; + }; + Input2.prototype.focus = function() { + if (!this.isFocussed) { + this.element.focus(); + } + }; + Input2.prototype.blur = function() { + if (this.isFocussed) { + this.element.blur(); + } + }; + Input2.prototype.clear = function(setWidth) { + if (setWidth === void 0) { + setWidth = true; + } + if (this.element.value) { + this.element.value = ""; + } + if (setWidth) { + this.setWidth(); + } + return this; + }; + Input2.prototype.setWidth = function() { + var _a = this.element, style = _a.style, value = _a.value, placeholder = _a.placeholder; + style.minWidth = "".concat(placeholder.length + 1, "ch"); + style.width = "".concat(value.length + 1, "ch"); + }; + Input2.prototype.setActiveDescendant = function(activeDescendantID) { + this.element.setAttribute("aria-activedescendant", activeDescendantID); + }; + Input2.prototype.removeActiveDescendant = function() { + this.element.removeAttribute("aria-activedescendant"); + }; + Input2.prototype._onInput = function() { + if (this.type !== constants_1.SELECT_ONE_TYPE) { + this.setWidth(); + } + }; + Input2.prototype._onPaste = function(event) { + if (this.preventPaste) { + event.preventDefault(); + } + }; + Input2.prototype._onFocus = function() { + this.isFocussed = true; + }; + Input2.prototype._onBlur = function() { + this.isFocussed = false; + }; + return Input2; + }(); + exports2["default"] = Input; + }, + 624: function(__unused_webpack_module, exports2, __webpack_require__2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + var constants_1 = __webpack_require__2(883); + var List = function() { + function List2(_a) { + var element = _a.element; + this.element = element; + this.scrollPos = this.element.scrollTop; + this.height = this.element.offsetHeight; + } + List2.prototype.clear = function() { + this.element.innerHTML = ""; + }; + List2.prototype.append = function(node) { + this.element.appendChild(node); + }; + List2.prototype.getChild = function(selector) { + return this.element.querySelector(selector); + }; + List2.prototype.hasChildren = function() { + return this.element.hasChildNodes(); + }; + List2.prototype.scrollToTop = function() { + this.element.scrollTop = 0; + }; + List2.prototype.scrollToChildElement = function(element, direction) { + var _this = this; + if (!element) { + return; + } + var listHeight = this.element.offsetHeight; + var listScrollPosition = this.element.scrollTop + listHeight; + var elementHeight = element.offsetHeight; + var elementPos = element.offsetTop + elementHeight; + var destination = direction > 0 ? this.element.scrollTop + elementPos - listScrollPosition : element.offsetTop; + requestAnimationFrame(function() { + _this._animateScroll(destination, direction); + }); + }; + List2.prototype._scrollDown = function(scrollPos, strength, destination) { + var easing = (destination - scrollPos) / strength; + var distance = easing > 1 ? easing : 1; + this.element.scrollTop = scrollPos + distance; + }; + List2.prototype._scrollUp = function(scrollPos, strength, destination) { + var easing = (scrollPos - destination) / strength; + var distance = easing > 1 ? easing : 1; + this.element.scrollTop = scrollPos - distance; + }; + List2.prototype._animateScroll = function(destination, direction) { + var _this = this; + var strength = constants_1.SCROLLING_SPEED; + var choiceListScrollTop = this.element.scrollTop; + var continueAnimation = false; + if (direction > 0) { + this._scrollDown(choiceListScrollTop, strength, destination); + if (choiceListScrollTop < destination) { + continueAnimation = true; + } + } else { + this._scrollUp(choiceListScrollTop, strength, destination); + if (choiceListScrollTop > destination) { + continueAnimation = true; + } + } + if (continueAnimation) { + requestAnimationFrame(function() { + _this._animateScroll(destination, direction); + }); + } + }; + return List2; + }(); + exports2["default"] = List; + }, + 730: function(__unused_webpack_module, exports2, __webpack_require__2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + var utils_1 = __webpack_require__2(799); + var WrappedElement = function() { + function WrappedElement2(_a) { + var element = _a.element, classNames = _a.classNames; + this.element = element; + this.classNames = classNames; + if (!(element instanceof HTMLInputElement) && !(element instanceof HTMLSelectElement)) { + throw new TypeError("Invalid element passed"); + } + this.isDisabled = false; + } + Object.defineProperty(WrappedElement2.prototype, "isActive", { + get: function() { + return this.element.dataset.choice === "active"; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WrappedElement2.prototype, "dir", { + get: function() { + return this.element.dir; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WrappedElement2.prototype, "value", { + get: function() { + return this.element.value; + }, + set: function(value) { + this.element.value = value; + }, + enumerable: false, + configurable: true + }); + WrappedElement2.prototype.conceal = function() { + this.element.classList.add(this.classNames.input); + this.element.hidden = true; + this.element.tabIndex = -1; + var origStyle = this.element.getAttribute("style"); + if (origStyle) { + this.element.setAttribute("data-choice-orig-style", origStyle); + } + this.element.setAttribute("data-choice", "active"); + }; + WrappedElement2.prototype.reveal = function() { + this.element.classList.remove(this.classNames.input); + this.element.hidden = false; + this.element.removeAttribute("tabindex"); + var origStyle = this.element.getAttribute("data-choice-orig-style"); + if (origStyle) { + this.element.removeAttribute("data-choice-orig-style"); + this.element.setAttribute("style", origStyle); + } else { + this.element.removeAttribute("style"); + } + this.element.removeAttribute("data-choice"); + this.element.value = this.element.value; + }; + WrappedElement2.prototype.enable = function() { + this.element.removeAttribute("disabled"); + this.element.disabled = false; + this.isDisabled = false; + }; + WrappedElement2.prototype.disable = function() { + this.element.setAttribute("disabled", ""); + this.element.disabled = true; + this.isDisabled = true; + }; + WrappedElement2.prototype.triggerEvent = function(eventType, data3) { + (0, utils_1.dispatchEvent)(this.element, eventType, data3); + }; + return WrappedElement2; + }(); + exports2["default"] = WrappedElement; + }, + 541: function(__unused_webpack_module, exports2, __webpack_require__2) { + var __extends = this && this.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p2 in b2) + if (Object.prototype.hasOwnProperty.call(b2, p2)) + d2[p2] = b2[p2]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + var __importDefault = this && this.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { + default: mod + }; + }; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + var wrapped_element_1 = __importDefault(__webpack_require__2(730)); + var WrappedInput = function(_super) { + __extends(WrappedInput2, _super); + function WrappedInput2(_a) { + var element = _a.element, classNames = _a.classNames, delimiter = _a.delimiter; + var _this = _super.call(this, { + element, + classNames + }) || this; + _this.delimiter = delimiter; + return _this; + } + Object.defineProperty(WrappedInput2.prototype, "value", { + get: function() { + return this.element.value; + }, + set: function(value) { + this.element.setAttribute("value", value); + this.element.value = value; + }, + enumerable: false, + configurable: true + }); + return WrappedInput2; + }(wrapped_element_1.default); + exports2["default"] = WrappedInput; + }, + 982: function(__unused_webpack_module, exports2, __webpack_require__2) { + var __extends = this && this.__extends || function() { + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p2 in b2) + if (Object.prototype.hasOwnProperty.call(b2, p2)) + d2[p2] = b2[p2]; + }; + return extendStatics(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + }(); + var __importDefault = this && this.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { + default: mod + }; + }; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + var wrapped_element_1 = __importDefault(__webpack_require__2(730)); + var WrappedSelect = function(_super) { + __extends(WrappedSelect2, _super); + function WrappedSelect2(_a) { + var element = _a.element, classNames = _a.classNames, template = _a.template; + var _this = _super.call(this, { + element, + classNames + }) || this; + _this.template = template; + return _this; + } + Object.defineProperty(WrappedSelect2.prototype, "placeholderOption", { + get: function() { + return this.element.querySelector('option[value=""]') || this.element.querySelector("option[placeholder]"); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WrappedSelect2.prototype, "optionGroups", { + get: function() { + return Array.from(this.element.getElementsByTagName("OPTGROUP")); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WrappedSelect2.prototype, "options", { + get: function() { + return Array.from(this.element.options); + }, + set: function(options2) { + var _this = this; + var fragment = document.createDocumentFragment(); + var addOptionToFragment = function(data3) { + var option3 = _this.template(data3); + fragment.appendChild(option3); + }; + options2.forEach(function(optionData) { + return addOptionToFragment(optionData); + }); + this.appendDocFragment(fragment); + }, + enumerable: false, + configurable: true + }); + WrappedSelect2.prototype.appendDocFragment = function(fragment) { + this.element.innerHTML = ""; + this.element.appendChild(fragment); + }; + return WrappedSelect2; + }(wrapped_element_1.default); + exports2["default"] = WrappedSelect; + }, + 883: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.SCROLLING_SPEED = exports2.SELECT_MULTIPLE_TYPE = exports2.SELECT_ONE_TYPE = exports2.TEXT_TYPE = exports2.KEY_CODES = exports2.ACTION_TYPES = exports2.EVENTS = void 0; + exports2.EVENTS = { + showDropdown: "showDropdown", + hideDropdown: "hideDropdown", + change: "change", + choice: "choice", + search: "search", + addItem: "addItem", + removeItem: "removeItem", + highlightItem: "highlightItem", + highlightChoice: "highlightChoice", + unhighlightItem: "unhighlightItem" + }; + exports2.ACTION_TYPES = { + ADD_CHOICE: "ADD_CHOICE", + FILTER_CHOICES: "FILTER_CHOICES", + ACTIVATE_CHOICES: "ACTIVATE_CHOICES", + CLEAR_CHOICES: "CLEAR_CHOICES", + ADD_GROUP: "ADD_GROUP", + ADD_ITEM: "ADD_ITEM", + REMOVE_ITEM: "REMOVE_ITEM", + HIGHLIGHT_ITEM: "HIGHLIGHT_ITEM", + CLEAR_ALL: "CLEAR_ALL", + RESET_TO: "RESET_TO", + SET_IS_LOADING: "SET_IS_LOADING" + }; + exports2.KEY_CODES = { + BACK_KEY: 46, + DELETE_KEY: 8, + ENTER_KEY: 13, + A_KEY: 65, + ESC_KEY: 27, + UP_KEY: 38, + DOWN_KEY: 40, + PAGE_UP_KEY: 33, + PAGE_DOWN_KEY: 34 + }; + exports2.TEXT_TYPE = "text"; + exports2.SELECT_ONE_TYPE = "select-one"; + exports2.SELECT_MULTIPLE_TYPE = "select-multiple"; + exports2.SCROLLING_SPEED = 4; + }, + 789: function(__unused_webpack_module, exports2, __webpack_require__2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.DEFAULT_CONFIG = exports2.DEFAULT_CLASSNAMES = void 0; + var utils_1 = __webpack_require__2(799); + exports2.DEFAULT_CLASSNAMES = { + containerOuter: "choices", + containerInner: "choices__inner", + input: "choices__input", + inputCloned: "choices__input--cloned", + list: "choices__list", + listItems: "choices__list--multiple", + listSingle: "choices__list--single", + listDropdown: "choices__list--dropdown", + item: "choices__item", + itemSelectable: "choices__item--selectable", + itemDisabled: "choices__item--disabled", + itemChoice: "choices__item--choice", + placeholder: "choices__placeholder", + group: "choices__group", + groupHeading: "choices__heading", + button: "choices__button", + activeState: "is-active", + focusState: "is-focused", + openState: "is-open", + disabledState: "is-disabled", + highlightedState: "is-highlighted", + selectedState: "is-selected", + flippedState: "is-flipped", + loadingState: "is-loading", + noResults: "has-no-results", + noChoices: "has-no-choices" + }; + exports2.DEFAULT_CONFIG = { + items: [], + choices: [], + silent: false, + renderChoiceLimit: -1, + maxItemCount: -1, + addItems: true, + addItemFilter: null, + removeItems: true, + removeItemButton: false, + editItems: false, + allowHTML: true, + duplicateItemsAllowed: true, + delimiter: ",", + paste: true, + searchEnabled: true, + searchChoices: true, + searchFloor: 1, + searchResultLimit: 4, + searchFields: ["label", "value"], + position: "auto", + resetScrollPosition: true, + shouldSort: true, + shouldSortItems: false, + sorter: utils_1.sortByAlpha, + placeholder: true, + placeholderValue: null, + searchPlaceholderValue: null, + prependValue: null, + appendValue: null, + renderSelectedChoices: "auto", + loadingText: "Loading...", + noResultsText: "No results found", + noChoicesText: "No choices to choose from", + itemSelectText: "Press to select", + uniqueItemText: "Only unique values can be added", + customAddItemText: "Only values matching specific conditions can be added", + addItemText: function(value) { + return 'Press Enter to add "'.concat((0, utils_1.sanitise)(value), '"'); + }, + maxItemText: function(maxItemCount) { + return "Only ".concat(maxItemCount, " values can be added"); + }, + valueComparer: function(value1, value2) { + return value1 === value2; + }, + fuseOptions: { + includeScore: true + }, + labelId: "", + callbackOnInit: null, + callbackOnCreateTemplates: null, + classNames: exports2.DEFAULT_CLASSNAMES + }; + }, + 18: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 978: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 948: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 359: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 285: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 533: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 187: function(__unused_webpack_module, exports2, __webpack_require__2) { + var __createBinding = this && this.__createBinding || (Object.create ? function(o2, m, k, k2) { + if (k2 === void 0) + k2 = k; + Object.defineProperty(o2, k2, { + enumerable: true, + get: function() { + return m[k]; + } + }); + } : function(o2, m, k, k2) { + if (k2 === void 0) + k2 = k; + o2[k2] = m[k]; + }); + var __exportStar2 = this && this.__exportStar || function(m, exports3) { + for (var p2 in m) + if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p2)) + __createBinding(exports3, m, p2); + }; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + __exportStar2(__webpack_require__2(18), exports2); + __exportStar2(__webpack_require__2(978), exports2); + __exportStar2(__webpack_require__2(948), exports2); + __exportStar2(__webpack_require__2(359), exports2); + __exportStar2(__webpack_require__2(285), exports2); + __exportStar2(__webpack_require__2(533), exports2); + __exportStar2(__webpack_require__2(287), exports2); + __exportStar2(__webpack_require__2(132), exports2); + __exportStar2(__webpack_require__2(837), exports2); + __exportStar2(__webpack_require__2(598), exports2); + __exportStar2(__webpack_require__2(369), exports2); + __exportStar2(__webpack_require__2(37), exports2); + __exportStar2(__webpack_require__2(47), exports2); + __exportStar2(__webpack_require__2(923), exports2); + __exportStar2(__webpack_require__2(876), exports2); + }, + 287: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 132: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 837: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 598: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 37: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 369: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 47: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 923: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 876: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + }, + 799: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.diff = exports2.cloneObject = exports2.existsInArray = exports2.dispatchEvent = exports2.sortByScore = exports2.sortByAlpha = exports2.strToEl = exports2.sanitise = exports2.isScrolledIntoView = exports2.getAdjacentEl = exports2.wrap = exports2.isType = exports2.getType = exports2.generateId = exports2.generateChars = exports2.getRandomNumber = void 0; + var getRandomNumber2 = function(min3, max3) { + return Math.floor(Math.random() * (max3 - min3) + min3); + }; + exports2.getRandomNumber = getRandomNumber2; + var generateChars = function(length) { + return Array.from({ + length + }, function() { + return (0, exports2.getRandomNumber)(0, 36).toString(36); + }).join(""); + }; + exports2.generateChars = generateChars; + var generateId = function(element, prefix) { + var id = element.id || element.name && "".concat(element.name, "-").concat((0, exports2.generateChars)(2)) || (0, exports2.generateChars)(4); + id = id.replace(/(:|\.|\[|\]|,)/g, ""); + id = "".concat(prefix, "-").concat(id); + return id; + }; + exports2.generateId = generateId; + var getType2 = function(obj) { + return Object.prototype.toString.call(obj).slice(8, -1); + }; + exports2.getType = getType2; + var isType = function(type, obj) { + return obj !== void 0 && obj !== null && (0, exports2.getType)(obj) === type; + }; + exports2.isType = isType; + var wrap2 = function(element, wrapper3) { + if (wrapper3 === void 0) { + wrapper3 = document.createElement("div"); + } + if (element.parentNode) { + if (element.nextSibling) { + element.parentNode.insertBefore(wrapper3, element.nextSibling); + } else { + element.parentNode.appendChild(wrapper3); + } + } + return wrapper3.appendChild(element); + }; + exports2.wrap = wrap2; + var getAdjacentEl = function(startEl, selector, direction) { + if (direction === void 0) { + direction = 1; + } + var prop = "".concat(direction > 0 ? "next" : "previous", "ElementSibling"); + var sibling = startEl[prop]; + while (sibling) { + if (sibling.matches(selector)) { + return sibling; + } + sibling = sibling[prop]; + } + return sibling; + }; + exports2.getAdjacentEl = getAdjacentEl; + var isScrolledIntoView = function(element, parent, direction) { + if (direction === void 0) { + direction = 1; + } + if (!element) { + return false; + } + var isVisible; + if (direction > 0) { + isVisible = parent.scrollTop + parent.offsetHeight >= element.offsetTop + element.offsetHeight; + } else { + isVisible = element.offsetTop >= parent.scrollTop; + } + return isVisible; + }; + exports2.isScrolledIntoView = isScrolledIntoView; + var sanitise = function(value) { + if (typeof value !== "string") { + return value; + } + return value.replace(/&/g, "&").replace(/>/g, ">").replace(/ -1) { + return state2.map(function(obj) { + var choice2 = obj; + if (choice2.id === parseInt("".concat(addItemAction_1.choiceId), 10)) { + choice2.selected = true; + } + return choice2; + }); + } + return state2; + } + case "REMOVE_ITEM": { + var removeItemAction_1 = action; + if (removeItemAction_1.choiceId && removeItemAction_1.choiceId > -1) { + return state2.map(function(obj) { + var choice2 = obj; + if (choice2.id === parseInt("".concat(removeItemAction_1.choiceId), 10)) { + choice2.selected = false; + } + return choice2; + }); + } + return state2; + } + case "FILTER_CHOICES": { + var filterChoicesAction_1 = action; + return state2.map(function(obj) { + var choice2 = obj; + choice2.active = filterChoicesAction_1.results.some(function(_a) { + var item2 = _a.item, score = _a.score; + if (item2.id === choice2.id) { + choice2.score = score; + return true; + } + return false; + }); + return choice2; + }); + } + case "ACTIVATE_CHOICES": { + var activateChoicesAction_1 = action; + return state2.map(function(obj) { + var choice2 = obj; + choice2.active = activateChoicesAction_1.active; + return choice2; + }); + } + case "CLEAR_CHOICES": { + return exports2.defaultState; + } + default: { + return state2; + } + } + } + exports2["default"] = choices; + }, + 871: function(__unused_webpack_module, exports2) { + var __spreadArray = this && this.__spreadArray || function(to, from, pack) { + if (pack || arguments.length === 2) + for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) + ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.defaultState = void 0; + exports2.defaultState = []; + function groups(state2, action) { + if (state2 === void 0) { + state2 = exports2.defaultState; + } + if (action === void 0) { + action = {}; + } + switch (action.type) { + case "ADD_GROUP": { + var addGroupAction = action; + return __spreadArray(__spreadArray([], state2, true), [{ + id: addGroupAction.id, + value: addGroupAction.value, + active: addGroupAction.active, + disabled: addGroupAction.disabled + }], false); + } + case "CLEAR_CHOICES": { + return []; + } + default: { + return state2; + } + } + } + exports2["default"] = groups; + }, + 655: function(__unused_webpack_module, exports2, __webpack_require__2) { + var __importDefault = this && this.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { + default: mod + }; + }; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.defaultState = void 0; + var redux_1 = __webpack_require__2(857); + var items_1 = __importDefault(__webpack_require__2(52)); + var groups_1 = __importDefault(__webpack_require__2(871)); + var choices_1 = __importDefault(__webpack_require__2(273)); + var loading_1 = __importDefault(__webpack_require__2(502)); + var utils_1 = __webpack_require__2(799); + exports2.defaultState = { + groups: [], + items: [], + choices: [], + loading: false + }; + var appReducer = (0, redux_1.combineReducers)({ + items: items_1.default, + groups: groups_1.default, + choices: choices_1.default, + loading: loading_1.default + }); + var rootReducer = function(passedState, action) { + var state2 = passedState; + if (action.type === "CLEAR_ALL") { + state2 = exports2.defaultState; + } else if (action.type === "RESET_TO") { + return (0, utils_1.cloneObject)(action.state); + } + return appReducer(state2, action); + }; + exports2["default"] = rootReducer; + }, + 52: function(__unused_webpack_module, exports2) { + var __spreadArray = this && this.__spreadArray || function(to, from, pack) { + if (pack || arguments.length === 2) + for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) + ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.defaultState = void 0; + exports2.defaultState = []; + function items(state2, action) { + if (state2 === void 0) { + state2 = exports2.defaultState; + } + if (action === void 0) { + action = {}; + } + switch (action.type) { + case "ADD_ITEM": { + var addItemAction = action; + var newState = __spreadArray(__spreadArray([], state2, true), [{ + id: addItemAction.id, + choiceId: addItemAction.choiceId, + groupId: addItemAction.groupId, + value: addItemAction.value, + label: addItemAction.label, + active: true, + highlighted: false, + customProperties: addItemAction.customProperties, + placeholder: addItemAction.placeholder || false, + keyCode: null + }], false); + return newState.map(function(obj) { + var item2 = obj; + item2.highlighted = false; + return item2; + }); + } + case "REMOVE_ITEM": { + return state2.map(function(obj) { + var item2 = obj; + if (item2.id === action.id) { + item2.active = false; + } + return item2; + }); + } + case "HIGHLIGHT_ITEM": { + var highlightItemAction_1 = action; + return state2.map(function(obj) { + var item2 = obj; + if (item2.id === highlightItemAction_1.id) { + item2.highlighted = highlightItemAction_1.highlighted; + } + return item2; + }); + } + default: { + return state2; + } + } + } + exports2["default"] = items; + }, + 502: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.defaultState = void 0; + exports2.defaultState = false; + var general = function(state2, action) { + if (state2 === void 0) { + state2 = exports2.defaultState; + } + if (action === void 0) { + action = {}; + } + switch (action.type) { + case "SET_IS_LOADING": { + return action.isLoading; + } + default: { + return state2; + } + } + }; + exports2["default"] = general; + }, + 744: function(__unused_webpack_module, exports2, __webpack_require__2) { + var __spreadArray = this && this.__spreadArray || function(to, from, pack) { + if (pack || arguments.length === 2) + for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) + ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + var __importDefault = this && this.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { + default: mod + }; + }; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + var redux_1 = __webpack_require__2(857); + var index_1 = __importDefault(__webpack_require__2(655)); + var Store = function() { + function Store2() { + this._store = (0, redux_1.createStore)(index_1.default, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()); + } + Store2.prototype.subscribe = function(onChange2) { + this._store.subscribe(onChange2); + }; + Store2.prototype.dispatch = function(action) { + this._store.dispatch(action); + }; + Object.defineProperty(Store2.prototype, "state", { + get: function() { + return this._store.getState(); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Store2.prototype, "items", { + get: function() { + return this.state.items; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Store2.prototype, "activeItems", { + get: function() { + return this.items.filter(function(item2) { + return item2.active === true; + }); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Store2.prototype, "highlightedActiveItems", { + get: function() { + return this.items.filter(function(item2) { + return item2.active && item2.highlighted; + }); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Store2.prototype, "choices", { + get: function() { + return this.state.choices; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Store2.prototype, "activeChoices", { + get: function() { + return this.choices.filter(function(choice) { + return choice.active === true; + }); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Store2.prototype, "selectableChoices", { + get: function() { + return this.choices.filter(function(choice) { + return choice.disabled !== true; + }); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Store2.prototype, "searchableChoices", { + get: function() { + return this.selectableChoices.filter(function(choice) { + return choice.placeholder !== true; + }); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Store2.prototype, "placeholderChoice", { + get: function() { + return __spreadArray([], this.choices, true).reverse().find(function(choice) { + return choice.placeholder === true; + }); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Store2.prototype, "groups", { + get: function() { + return this.state.groups; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Store2.prototype, "activeGroups", { + get: function() { + var _a = this, groups = _a.groups, choices = _a.choices; + return groups.filter(function(group) { + var isActive = group.active === true && group.disabled === false; + var hasActiveOptions = choices.some(function(choice) { + return choice.active === true && choice.disabled === false; + }); + return isActive && hasActiveOptions; + }, []); + }, + enumerable: false, + configurable: true + }); + Store2.prototype.isLoading = function() { + return this.state.loading; + }; + Store2.prototype.getChoiceById = function(id) { + return this.activeChoices.find(function(choice) { + return choice.id === parseInt(id, 10); + }); + }; + Store2.prototype.getGroupById = function(id) { + return this.groups.find(function(group) { + return group.id === id; + }); + }; + return Store2; + }(); + exports2["default"] = Store; + }, + 686: function(__unused_webpack_module, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + var templates = { + containerOuter: function(_a, dir, isSelectElement, isSelectOneElement, searchEnabled, passedElementType, labelId) { + var containerOuter = _a.classNames.containerOuter; + var div = Object.assign(document.createElement("div"), { + className: containerOuter + }); + div.dataset.type = passedElementType; + if (dir) { + div.dir = dir; + } + if (isSelectOneElement) { + div.tabIndex = 0; + } + if (isSelectElement) { + div.setAttribute("role", searchEnabled ? "combobox" : "listbox"); + if (searchEnabled) { + div.setAttribute("aria-autocomplete", "list"); + } + } + div.setAttribute("aria-haspopup", "true"); + div.setAttribute("aria-expanded", "false"); + if (labelId) { + div.setAttribute("aria-labeledby", labelId); + } + return div; + }, + containerInner: function(_a) { + var containerInner = _a.classNames.containerInner; + return Object.assign(document.createElement("div"), { + className: containerInner + }); + }, + itemList: function(_a, isSelectOneElement) { + var _b = _a.classNames, list2 = _b.list, listSingle = _b.listSingle, listItems = _b.listItems; + return Object.assign(document.createElement("div"), { + className: "".concat(list2, " ").concat(isSelectOneElement ? listSingle : listItems) + }); + }, + placeholder: function(_a, value) { + var _b; + var allowHTML = _a.allowHTML, placeholder = _a.classNames.placeholder; + return Object.assign(document.createElement("div"), (_b = { + className: placeholder + }, _b[allowHTML ? "innerHTML" : "innerText"] = value, _b)); + }, + item: function(_a, _b, removeItemButton) { + var _c, _d; + var allowHTML = _a.allowHTML, _e = _a.classNames, item2 = _e.item, button = _e.button, highlightedState = _e.highlightedState, itemSelectable = _e.itemSelectable, placeholder = _e.placeholder; + var id = _b.id, value = _b.value, label = _b.label, customProperties = _b.customProperties, active = _b.active, disabled = _b.disabled, highlighted = _b.highlighted, isPlaceholder = _b.placeholder; + var div = Object.assign(document.createElement("div"), (_c = { + className: item2 + }, _c[allowHTML ? "innerHTML" : "innerText"] = label, _c)); + Object.assign(div.dataset, { + item: "", + id, + value, + customProperties + }); + if (active) { + div.setAttribute("aria-selected", "true"); + } + if (disabled) { + div.setAttribute("aria-disabled", "true"); + } + if (isPlaceholder) { + div.classList.add(placeholder); + } + div.classList.add(highlighted ? highlightedState : itemSelectable); + if (removeItemButton) { + if (disabled) { + div.classList.remove(itemSelectable); + } + div.dataset.deletable = ""; + var REMOVE_ITEM_TEXT = "Remove item"; + var removeButton = Object.assign(document.createElement("button"), (_d = { + type: "button", + className: button + }, _d[allowHTML ? "innerHTML" : "innerText"] = REMOVE_ITEM_TEXT, _d)); + removeButton.setAttribute("aria-label", "".concat(REMOVE_ITEM_TEXT, ": '").concat(value, "'")); + removeButton.dataset.button = ""; + div.appendChild(removeButton); + } + return div; + }, + choiceList: function(_a, isSelectOneElement) { + var list2 = _a.classNames.list; + var div = Object.assign(document.createElement("div"), { + className: list2 + }); + if (!isSelectOneElement) { + div.setAttribute("aria-multiselectable", "true"); + } + div.setAttribute("role", "listbox"); + return div; + }, + choiceGroup: function(_a, _b) { + var _c; + var allowHTML = _a.allowHTML, _d = _a.classNames, group = _d.group, groupHeading = _d.groupHeading, itemDisabled = _d.itemDisabled; + var id = _b.id, value = _b.value, disabled = _b.disabled; + var div = Object.assign(document.createElement("div"), { + className: "".concat(group, " ").concat(disabled ? itemDisabled : "") + }); + div.setAttribute("role", "group"); + Object.assign(div.dataset, { + group: "", + id, + value + }); + if (disabled) { + div.setAttribute("aria-disabled", "true"); + } + div.appendChild(Object.assign(document.createElement("div"), (_c = { + className: groupHeading + }, _c[allowHTML ? "innerHTML" : "innerText"] = value, _c))); + return div; + }, + choice: function(_a, _b, selectText) { + var _c; + var allowHTML = _a.allowHTML, _d = _a.classNames, item2 = _d.item, itemChoice = _d.itemChoice, itemSelectable = _d.itemSelectable, selectedState = _d.selectedState, itemDisabled = _d.itemDisabled, placeholder = _d.placeholder; + var id = _b.id, value = _b.value, label = _b.label, groupId = _b.groupId, elementId = _b.elementId, isDisabled = _b.disabled, isSelected = _b.selected, isPlaceholder = _b.placeholder; + var div = Object.assign(document.createElement("div"), (_c = { + id: elementId + }, _c[allowHTML ? "innerHTML" : "innerText"] = label, _c.className = "".concat(item2, " ").concat(itemChoice), _c)); + if (isSelected) { + div.classList.add(selectedState); + } + if (isPlaceholder) { + div.classList.add(placeholder); + } + div.setAttribute("role", groupId && groupId > 0 ? "treeitem" : "option"); + Object.assign(div.dataset, { + choice: "", + id, + value, + selectText + }); + if (isDisabled) { + div.classList.add(itemDisabled); + div.dataset.choiceDisabled = ""; + div.setAttribute("aria-disabled", "true"); + } else { + div.classList.add(itemSelectable); + div.dataset.choiceSelectable = ""; + } + return div; + }, + input: function(_a, placeholderValue) { + var _b = _a.classNames, input = _b.input, inputCloned = _b.inputCloned; + var inp = Object.assign(document.createElement("input"), { + type: "search", + name: "search_terms", + className: "".concat(input, " ").concat(inputCloned), + autocomplete: "off", + autocapitalize: "off", + spellcheck: false + }); + inp.setAttribute("role", "textbox"); + inp.setAttribute("aria-autocomplete", "list"); + inp.setAttribute("aria-label", placeholderValue); + return inp; + }, + dropdown: function(_a) { + var _b = _a.classNames, list2 = _b.list, listDropdown = _b.listDropdown; + var div = document.createElement("div"); + div.classList.add(list2, listDropdown); + div.setAttribute("aria-expanded", "false"); + return div; + }, + notice: function(_a, innerText, type) { + var _b; + var allowHTML = _a.allowHTML, _c = _a.classNames, item2 = _c.item, itemChoice = _c.itemChoice, noResults = _c.noResults, noChoices = _c.noChoices; + if (type === void 0) { + type = ""; + } + var classes = [item2, itemChoice]; + if (type === "no-choices") { + classes.push(noChoices); + } else if (type === "no-results") { + classes.push(noResults); + } + return Object.assign(document.createElement("div"), (_b = {}, _b[allowHTML ? "innerHTML" : "innerText"] = innerText, _b.className = classes.join(" "), _b)); + }, + option: function(_a) { + var label = _a.label, value = _a.value, customProperties = _a.customProperties, active = _a.active, disabled = _a.disabled; + var opt = new Option(label, value, false, active); + if (customProperties) { + opt.dataset.customProperties = "".concat(customProperties); + } + opt.disabled = !!disabled; + return opt; + } + }; + exports2["default"] = templates; + }, + 996: function(module2) { + var isMergeableObject = function isMergeableObject2(value) { + return isNonNullObject(value) && !isSpecial(value); + }; + function isNonNullObject(value) { + return !!value && typeof value === "object"; + } + function isSpecial(value) { + var stringValue = Object.prototype.toString.call(value); + return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value); + } + var canUseSymbol = typeof Symbol === "function" && Symbol.for; + var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103; + function isReactElement(value) { + return value.$$typeof === REACT_ELEMENT_TYPE; + } + function emptyTarget(val) { + return Array.isArray(val) ? [] : {}; + } + function cloneUnlessOtherwiseSpecified(value, options2) { + return options2.clone !== false && options2.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options2) : value; + } + function defaultArrayMerge(target, source, options2) { + return target.concat(source).map(function(element) { + return cloneUnlessOtherwiseSpecified(element, options2); + }); + } + function getMergeFunction(key, options2) { + if (!options2.customMerge) { + return deepmerge; + } + var customMerge = options2.customMerge(key); + return typeof customMerge === "function" ? customMerge : deepmerge; + } + function getEnumerableOwnPropertySymbols(target) { + return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) { + return target.propertyIsEnumerable(symbol); + }) : []; + } + function getKeys(target) { + return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)); + } + function propertyIsOnObject(object, property) { + try { + return property in object; + } catch (_) { + return false; + } + } + function propertyIsUnsafe(target, key) { + return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key)); + } + function mergeObject(target, source, options2) { + var destination = {}; + if (options2.isMergeableObject(target)) { + getKeys(target).forEach(function(key) { + destination[key] = cloneUnlessOtherwiseSpecified(target[key], options2); + }); + } + getKeys(source).forEach(function(key) { + if (propertyIsUnsafe(target, key)) { + return; + } + if (propertyIsOnObject(target, key) && options2.isMergeableObject(source[key])) { + destination[key] = getMergeFunction(key, options2)(target[key], source[key], options2); + } else { + destination[key] = cloneUnlessOtherwiseSpecified(source[key], options2); + } + }); + return destination; + } + function deepmerge(target, source, options2) { + options2 = options2 || {}; + options2.arrayMerge = options2.arrayMerge || defaultArrayMerge; + options2.isMergeableObject = options2.isMergeableObject || isMergeableObject; + options2.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified; + var sourceIsArray = Array.isArray(source); + var targetIsArray = Array.isArray(target); + var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; + if (!sourceAndTargetTypesMatch) { + return cloneUnlessOtherwiseSpecified(source, options2); + } else if (sourceIsArray) { + return options2.arrayMerge(target, source, options2); + } else { + return mergeObject(target, source, options2); + } + } + deepmerge.all = function deepmergeAll(array, options2) { + if (!Array.isArray(array)) { + throw new Error("first argument should be an array"); + } + return array.reduce(function(prev, next) { + return deepmerge(prev, next, options2); + }, {}); + }; + var deepmerge_1 = deepmerge; + module2.exports = deepmerge_1; + }, + 221: function(__unused_webpack_module, __webpack_exports__2, __webpack_require__2) { + __webpack_require__2.r(__webpack_exports__2); + __webpack_require__2.d(__webpack_exports__2, { + default: function() { + return Fuse; + } + }); + function isArray2(value) { + return !Array.isArray ? getTag(value) === "[object Array]" : Array.isArray(value); + } + const INFINITY = 1 / 0; + function baseToString(value) { + if (typeof value == "string") { + return value; + } + let result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + function toString2(value) { + return value == null ? "" : baseToString(value); + } + function isString3(value) { + return typeof value === "string"; + } + function isNumber2(value) { + return typeof value === "number"; + } + function isBoolean2(value) { + return value === true || value === false || isObjectLike(value) && getTag(value) == "[object Boolean]"; + } + function isObject2(value) { + return typeof value === "object"; + } + function isObjectLike(value) { + return isObject2(value) && value !== null; + } + function isDefined4(value) { + return value !== void 0 && value !== null; + } + function isBlank(value) { + return !value.trim().length; + } + function getTag(value) { + return value == null ? value === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(value); + } + const EXTENDED_SEARCH_UNAVAILABLE = "Extended search is not available"; + const INCORRECT_INDEX_TYPE = "Incorrect 'index' type"; + const LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) => `Invalid value for key ${key}`; + const PATTERN_LENGTH_TOO_LARGE = (max3) => `Pattern length exceeds max of ${max3}.`; + const MISSING_KEY_PROPERTY = (name2) => `Missing ${name2} property in key`; + const INVALID_KEY_WEIGHT_VALUE = (key) => `Property 'weight' in key '${key}' must be a positive integer`; + const hasOwn = Object.prototype.hasOwnProperty; + class KeyStore { + constructor(keys) { + this._keys = []; + this._keyMap = {}; + let totalWeight = 0; + keys.forEach((key) => { + let obj = createKey(key); + totalWeight += obj.weight; + this._keys.push(obj); + this._keyMap[obj.id] = obj; + totalWeight += obj.weight; + }); + this._keys.forEach((key) => { + key.weight /= totalWeight; + }); + } + get(keyId) { + return this._keyMap[keyId]; + } + keys() { + return this._keys; + } + toJSON() { + return JSON.stringify(this._keys); + } + } + function createKey(key) { + let path = null; + let id = null; + let src = null; + let weight = 1; + if (isString3(key) || isArray2(key)) { + src = key; + path = createKeyPath(key); + id = createKeyId(key); + } else { + if (!hasOwn.call(key, "name")) { + throw new Error(MISSING_KEY_PROPERTY("name")); + } + const name2 = key.name; + src = name2; + if (hasOwn.call(key, "weight")) { + weight = key.weight; + if (weight <= 0) { + throw new Error(INVALID_KEY_WEIGHT_VALUE(name2)); + } + } + path = createKeyPath(name2); + id = createKeyId(name2); + } + return {path, id, weight, src}; + } + function createKeyPath(key) { + return isArray2(key) ? key : key.split("."); + } + function createKeyId(key) { + return isArray2(key) ? key.join(".") : key; + } + function get(obj, path) { + let list2 = []; + let arr = false; + const deepGet = (obj2, path2, index2) => { + if (!isDefined4(obj2)) { + return; + } + if (!path2[index2]) { + list2.push(obj2); + } else { + let key = path2[index2]; + const value = obj2[key]; + if (!isDefined4(value)) { + return; + } + if (index2 === path2.length - 1 && (isString3(value) || isNumber2(value) || isBoolean2(value))) { + list2.push(toString2(value)); + } else if (isArray2(value)) { + arr = true; + for (let i = 0, len = value.length; i < len; i += 1) { + deepGet(value[i], path2, index2 + 1); + } + } else if (path2.length) { + deepGet(value, path2, index2 + 1); + } + } + }; + deepGet(obj, isString3(path) ? path.split(".") : path, 0); + return arr ? list2 : list2[0]; + } + const MatchOptions = { + includeMatches: false, + findAllMatches: false, + minMatchCharLength: 1 + }; + const BasicOptions = { + isCaseSensitive: false, + includeScore: false, + keys: [], + shouldSort: true, + sortFn: (a2, b) => a2.score === b.score ? a2.idx < b.idx ? -1 : 1 : a2.score < b.score ? -1 : 1 + }; + const FuzzyOptions = { + location: 0, + threshold: 0.6, + distance: 100 + }; + const AdvancedOptions = { + useExtendedSearch: false, + getFn: get, + ignoreLocation: false, + ignoreFieldNorm: false, + fieldNormWeight: 1 + }; + var Config = { + ...BasicOptions, + ...MatchOptions, + ...FuzzyOptions, + ...AdvancedOptions + }; + const SPACE = /[^ ]+/g; + function norm(weight = 1, mantissa = 3) { + const cache2 = new Map(); + const m = Math.pow(10, mantissa); + return { + get(value) { + const numTokens = value.match(SPACE).length; + if (cache2.has(numTokens)) { + return cache2.get(numTokens); + } + const norm2 = 1 / Math.pow(numTokens, 0.5 * weight); + const n2 = parseFloat(Math.round(norm2 * m) / m); + cache2.set(numTokens, n2); + return n2; + }, + clear() { + cache2.clear(); + } + }; + } + class FuseIndex { + constructor({ + getFn = Config.getFn, + fieldNormWeight = Config.fieldNormWeight + } = {}) { + this.norm = norm(fieldNormWeight, 3); + this.getFn = getFn; + this.isCreated = false; + this.setIndexRecords(); + } + setSources(docs = []) { + this.docs = docs; + } + setIndexRecords(records = []) { + this.records = records; + } + setKeys(keys = []) { + this.keys = keys; + this._keysMap = {}; + keys.forEach((key, idx) => { + this._keysMap[key.id] = idx; + }); + } + create() { + if (this.isCreated || !this.docs.length) { + return; + } + this.isCreated = true; + if (isString3(this.docs[0])) { + this.docs.forEach((doc, docIndex) => { + this._addString(doc, docIndex); + }); + } else { + this.docs.forEach((doc, docIndex) => { + this._addObject(doc, docIndex); + }); + } + this.norm.clear(); + } + add(doc) { + const idx = this.size(); + if (isString3(doc)) { + this._addString(doc, idx); + } else { + this._addObject(doc, idx); + } + } + removeAt(idx) { + this.records.splice(idx, 1); + for (let i = idx, len = this.size(); i < len; i += 1) { + this.records[i].i -= 1; + } + } + getValueForItemAtKeyId(item2, keyId) { + return item2[this._keysMap[keyId]]; + } + size() { + return this.records.length; + } + _addString(doc, docIndex) { + if (!isDefined4(doc) || isBlank(doc)) { + return; + } + let record = { + v: doc, + i: docIndex, + n: this.norm.get(doc) + }; + this.records.push(record); + } + _addObject(doc, docIndex) { + let record = {i: docIndex, $: {}}; + this.keys.forEach((key, keyIndex) => { + let value = this.getFn(doc, key.path); + if (!isDefined4(value)) { + return; + } + if (isArray2(value)) { + let subRecords = []; + const stack = [{nestedArrIndex: -1, value}]; + while (stack.length) { + const {nestedArrIndex, value: value2} = stack.pop(); + if (!isDefined4(value2)) { + continue; + } + if (isString3(value2) && !isBlank(value2)) { + let subRecord = { + v: value2, + i: nestedArrIndex, + n: this.norm.get(value2) + }; + subRecords.push(subRecord); + } else if (isArray2(value2)) { + value2.forEach((item2, k) => { + stack.push({ + nestedArrIndex: k, + value: item2 + }); + }); + } else + ; + } + record.$[keyIndex] = subRecords; + } else if (!isBlank(value)) { + let subRecord = { + v: value, + n: this.norm.get(value) + }; + record.$[keyIndex] = subRecord; + } + }); + this.records.push(record); + } + toJSON() { + return { + keys: this.keys, + records: this.records + }; + } + } + function createIndex(keys, docs, {getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight} = {}) { + const myIndex = new FuseIndex({getFn, fieldNormWeight}); + myIndex.setKeys(keys.map(createKey)); + myIndex.setSources(docs); + myIndex.create(); + return myIndex; + } + function parseIndex(data3, {getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight} = {}) { + const {keys, records} = data3; + const myIndex = new FuseIndex({getFn, fieldNormWeight}); + myIndex.setKeys(keys); + myIndex.setIndexRecords(records); + return myIndex; + } + function computeScore$1(pattern, { + errors = 0, + currentLocation = 0, + expectedLocation = 0, + distance = Config.distance, + ignoreLocation = Config.ignoreLocation + } = {}) { + const accuracy = errors / pattern.length; + if (ignoreLocation) { + return accuracy; + } + const proximity = Math.abs(expectedLocation - currentLocation); + if (!distance) { + return proximity ? 1 : accuracy; + } + return accuracy + proximity / distance; + } + function convertMaskToIndices(matchmask = [], minMatchCharLength = Config.minMatchCharLength) { + let indices = []; + let start = -1; + let end = -1; + let i = 0; + for (let len = matchmask.length; i < len; i += 1) { + let match = matchmask[i]; + if (match && start === -1) { + start = i; + } else if (!match && start !== -1) { + end = i - 1; + if (end - start + 1 >= minMatchCharLength) { + indices.push([start, end]); + } + start = -1; + } + } + if (matchmask[i - 1] && i - start >= minMatchCharLength) { + indices.push([start, i - 1]); + } + return indices; + } + const MAX_BITS = 32; + function search(text3, pattern, patternAlphabet, { + location: location2 = Config.location, + distance = Config.distance, + threshold = Config.threshold, + findAllMatches = Config.findAllMatches, + minMatchCharLength = Config.minMatchCharLength, + includeMatches = Config.includeMatches, + ignoreLocation = Config.ignoreLocation + } = {}) { + if (pattern.length > MAX_BITS) { + throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS)); + } + const patternLen = pattern.length; + const textLen = text3.length; + const expectedLocation = Math.max(0, Math.min(location2, textLen)); + let currentThreshold = threshold; + let bestLocation = expectedLocation; + const computeMatches = minMatchCharLength > 1 || includeMatches; + const matchMask = computeMatches ? Array(textLen) : []; + let index2; + while ((index2 = text3.indexOf(pattern, bestLocation)) > -1) { + let score = computeScore$1(pattern, { + currentLocation: index2, + expectedLocation, + distance, + ignoreLocation + }); + currentThreshold = Math.min(score, currentThreshold); + bestLocation = index2 + patternLen; + if (computeMatches) { + let i = 0; + while (i < patternLen) { + matchMask[index2 + i] = 1; + i += 1; + } + } + } + bestLocation = -1; + let lastBitArr = []; + let finalScore = 1; + let binMax = patternLen + textLen; + const mask = 1 << patternLen - 1; + for (let i = 0; i < patternLen; i += 1) { + let binMin = 0; + let binMid = binMax; + while (binMin < binMid) { + const score2 = computeScore$1(pattern, { + errors: i, + currentLocation: expectedLocation + binMid, + expectedLocation, + distance, + ignoreLocation + }); + if (score2 <= currentThreshold) { + binMin = binMid; + } else { + binMax = binMid; + } + binMid = Math.floor((binMax - binMin) / 2 + binMin); + } + binMax = binMid; + let start = Math.max(1, expectedLocation - binMid + 1); + let finish = findAllMatches ? textLen : Math.min(expectedLocation + binMid, textLen) + patternLen; + let bitArr = Array(finish + 2); + bitArr[finish + 1] = (1 << i) - 1; + for (let j = finish; j >= start; j -= 1) { + let currentLocation = j - 1; + let charMatch = patternAlphabet[text3.charAt(currentLocation)]; + if (computeMatches) { + matchMask[currentLocation] = +!!charMatch; + } + bitArr[j] = (bitArr[j + 1] << 1 | 1) & charMatch; + if (i) { + bitArr[j] |= (lastBitArr[j + 1] | lastBitArr[j]) << 1 | 1 | lastBitArr[j + 1]; + } + if (bitArr[j] & mask) { + finalScore = computeScore$1(pattern, { + errors: i, + currentLocation, + expectedLocation, + distance, + ignoreLocation + }); + if (finalScore <= currentThreshold) { + currentThreshold = finalScore; + bestLocation = currentLocation; + if (bestLocation <= expectedLocation) { + break; + } + start = Math.max(1, 2 * expectedLocation - bestLocation); + } + } + } + const score = computeScore$1(pattern, { + errors: i + 1, + currentLocation: expectedLocation, + expectedLocation, + distance, + ignoreLocation + }); + if (score > currentThreshold) { + break; + } + lastBitArr = bitArr; + } + const result = { + isMatch: bestLocation >= 0, + score: Math.max(1e-3, finalScore) + }; + if (computeMatches) { + const indices = convertMaskToIndices(matchMask, minMatchCharLength); + if (!indices.length) { + result.isMatch = false; + } else if (includeMatches) { + result.indices = indices; + } + } + return result; + } + function createPatternAlphabet(pattern) { + let mask = {}; + for (let i = 0, len = pattern.length; i < len; i += 1) { + const char = pattern.charAt(i); + mask[char] = (mask[char] || 0) | 1 << len - i - 1; + } + return mask; + } + class BitapSearch { + constructor(pattern, { + location: location2 = Config.location, + threshold = Config.threshold, + distance = Config.distance, + includeMatches = Config.includeMatches, + findAllMatches = Config.findAllMatches, + minMatchCharLength = Config.minMatchCharLength, + isCaseSensitive = Config.isCaseSensitive, + ignoreLocation = Config.ignoreLocation + } = {}) { + this.options = { + location: location2, + threshold, + distance, + includeMatches, + findAllMatches, + minMatchCharLength, + isCaseSensitive, + ignoreLocation + }; + this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase(); + this.chunks = []; + if (!this.pattern.length) { + return; + } + const addChunk = (pattern2, startIndex) => { + this.chunks.push({ + pattern: pattern2, + alphabet: createPatternAlphabet(pattern2), + startIndex + }); + }; + const len = this.pattern.length; + if (len > MAX_BITS) { + let i = 0; + const remainder = len % MAX_BITS; + const end = len - remainder; + while (i < end) { + addChunk(this.pattern.substr(i, MAX_BITS), i); + i += MAX_BITS; + } + if (remainder) { + const startIndex = len - MAX_BITS; + addChunk(this.pattern.substr(startIndex), startIndex); + } + } else { + addChunk(this.pattern, 0); + } + } + searchIn(text3) { + const {isCaseSensitive, includeMatches} = this.options; + if (!isCaseSensitive) { + text3 = text3.toLowerCase(); + } + if (this.pattern === text3) { + let result2 = { + isMatch: true, + score: 0 + }; + if (includeMatches) { + result2.indices = [[0, text3.length - 1]]; + } + return result2; + } + const { + location: location2, + distance, + threshold, + findAllMatches, + minMatchCharLength, + ignoreLocation + } = this.options; + let allIndices = []; + let totalScore = 0; + let hasMatches = false; + this.chunks.forEach(({pattern, alphabet, startIndex}) => { + const {isMatch, score, indices} = search(text3, pattern, alphabet, { + location: location2 + startIndex, + distance, + threshold, + findAllMatches, + minMatchCharLength, + includeMatches, + ignoreLocation + }); + if (isMatch) { + hasMatches = true; + } + totalScore += score; + if (isMatch && indices) { + allIndices = [...allIndices, ...indices]; + } + }); + let result = { + isMatch: hasMatches, + score: hasMatches ? totalScore / this.chunks.length : 1 + }; + if (hasMatches && includeMatches) { + result.indices = allIndices; + } + return result; + } + } + class BaseMatch { + constructor(pattern) { + this.pattern = pattern; + } + static isMultiMatch(pattern) { + return getMatch(pattern, this.multiRegex); + } + static isSingleMatch(pattern) { + return getMatch(pattern, this.singleRegex); + } + search() { + } + } + function getMatch(pattern, exp) { + const matches2 = pattern.match(exp); + return matches2 ? matches2[1] : null; + } + class ExactMatch extends BaseMatch { + constructor(pattern) { + super(pattern); + } + static get type() { + return "exact"; + } + static get multiRegex() { + return /^="(.*)"$/; + } + static get singleRegex() { + return /^=(.*)$/; + } + search(text3) { + const isMatch = text3 === this.pattern; + return { + isMatch, + score: isMatch ? 0 : 1, + indices: [0, this.pattern.length - 1] + }; + } + } + class InverseExactMatch extends BaseMatch { + constructor(pattern) { + super(pattern); + } + static get type() { + return "inverse-exact"; + } + static get multiRegex() { + return /^!"(.*)"$/; + } + static get singleRegex() { + return /^!(.*)$/; + } + search(text3) { + const index2 = text3.indexOf(this.pattern); + const isMatch = index2 === -1; + return { + isMatch, + score: isMatch ? 0 : 1, + indices: [0, text3.length - 1] + }; + } + } + class PrefixExactMatch extends BaseMatch { + constructor(pattern) { + super(pattern); + } + static get type() { + return "prefix-exact"; + } + static get multiRegex() { + return /^\^"(.*)"$/; + } + static get singleRegex() { + return /^\^(.*)$/; + } + search(text3) { + const isMatch = text3.startsWith(this.pattern); + return { + isMatch, + score: isMatch ? 0 : 1, + indices: [0, this.pattern.length - 1] + }; + } + } + class InversePrefixExactMatch extends BaseMatch { + constructor(pattern) { + super(pattern); + } + static get type() { + return "inverse-prefix-exact"; + } + static get multiRegex() { + return /^!\^"(.*)"$/; + } + static get singleRegex() { + return /^!\^(.*)$/; + } + search(text3) { + const isMatch = !text3.startsWith(this.pattern); + return { + isMatch, + score: isMatch ? 0 : 1, + indices: [0, text3.length - 1] + }; + } + } + class SuffixExactMatch extends BaseMatch { + constructor(pattern) { + super(pattern); + } + static get type() { + return "suffix-exact"; + } + static get multiRegex() { + return /^"(.*)"\$$/; + } + static get singleRegex() { + return /^(.*)\$$/; + } + search(text3) { + const isMatch = text3.endsWith(this.pattern); + return { + isMatch, + score: isMatch ? 0 : 1, + indices: [text3.length - this.pattern.length, text3.length - 1] + }; + } + } + class InverseSuffixExactMatch extends BaseMatch { + constructor(pattern) { + super(pattern); + } + static get type() { + return "inverse-suffix-exact"; + } + static get multiRegex() { + return /^!"(.*)"\$$/; + } + static get singleRegex() { + return /^!(.*)\$$/; + } + search(text3) { + const isMatch = !text3.endsWith(this.pattern); + return { + isMatch, + score: isMatch ? 0 : 1, + indices: [0, text3.length - 1] + }; + } + } + class FuzzyMatch extends BaseMatch { + constructor(pattern, { + location: location2 = Config.location, + threshold = Config.threshold, + distance = Config.distance, + includeMatches = Config.includeMatches, + findAllMatches = Config.findAllMatches, + minMatchCharLength = Config.minMatchCharLength, + isCaseSensitive = Config.isCaseSensitive, + ignoreLocation = Config.ignoreLocation + } = {}) { + super(pattern); + this._bitapSearch = new BitapSearch(pattern, { + location: location2, + threshold, + distance, + includeMatches, + findAllMatches, + minMatchCharLength, + isCaseSensitive, + ignoreLocation + }); + } + static get type() { + return "fuzzy"; + } + static get multiRegex() { + return /^"(.*)"$/; + } + static get singleRegex() { + return /^(.*)$/; + } + search(text3) { + return this._bitapSearch.searchIn(text3); + } + } + class IncludeMatch extends BaseMatch { + constructor(pattern) { + super(pattern); + } + static get type() { + return "include"; + } + static get multiRegex() { + return /^'"(.*)"$/; + } + static get singleRegex() { + return /^'(.*)$/; + } + search(text3) { + let location2 = 0; + let index2; + const indices = []; + const patternLen = this.pattern.length; + while ((index2 = text3.indexOf(this.pattern, location2)) > -1) { + location2 = index2 + patternLen; + indices.push([index2, location2 - 1]); + } + const isMatch = !!indices.length; + return { + isMatch, + score: isMatch ? 0 : 1, + indices + }; + } + } + const searchers = [ + ExactMatch, + IncludeMatch, + PrefixExactMatch, + InversePrefixExactMatch, + InverseSuffixExactMatch, + SuffixExactMatch, + InverseExactMatch, + FuzzyMatch + ]; + const searchersLen = searchers.length; + const SPACE_RE = / +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/; + const OR_TOKEN = "|"; + function parseQuery(pattern, options2 = {}) { + return pattern.split(OR_TOKEN).map((item2) => { + let query = item2.trim().split(SPACE_RE).filter((item3) => item3 && !!item3.trim()); + let results = []; + for (let i = 0, len = query.length; i < len; i += 1) { + const queryItem = query[i]; + let found = false; + let idx = -1; + while (!found && ++idx < searchersLen) { + const searcher = searchers[idx]; + let token = searcher.isMultiMatch(queryItem); + if (token) { + results.push(new searcher(token, options2)); + found = true; + } + } + if (found) { + continue; + } + idx = -1; + while (++idx < searchersLen) { + const searcher = searchers[idx]; + let token = searcher.isSingleMatch(queryItem); + if (token) { + results.push(new searcher(token, options2)); + break; + } + } + } + return results; + }); + } + const MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type]); + class ExtendedSearch { + constructor(pattern, { + isCaseSensitive = Config.isCaseSensitive, + includeMatches = Config.includeMatches, + minMatchCharLength = Config.minMatchCharLength, + ignoreLocation = Config.ignoreLocation, + findAllMatches = Config.findAllMatches, + location: location2 = Config.location, + threshold = Config.threshold, + distance = Config.distance + } = {}) { + this.query = null; + this.options = { + isCaseSensitive, + includeMatches, + minMatchCharLength, + findAllMatches, + ignoreLocation, + location: location2, + threshold, + distance + }; + this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase(); + this.query = parseQuery(this.pattern, this.options); + } + static condition(_, options2) { + return options2.useExtendedSearch; + } + searchIn(text3) { + const query = this.query; + if (!query) { + return { + isMatch: false, + score: 1 + }; + } + const {includeMatches, isCaseSensitive} = this.options; + text3 = isCaseSensitive ? text3 : text3.toLowerCase(); + let numMatches = 0; + let allIndices = []; + let totalScore = 0; + for (let i = 0, qLen = query.length; i < qLen; i += 1) { + const searchers2 = query[i]; + allIndices.length = 0; + numMatches = 0; + for (let j = 0, pLen = searchers2.length; j < pLen; j += 1) { + const searcher = searchers2[j]; + const {isMatch, indices, score} = searcher.search(text3); + if (isMatch) { + numMatches += 1; + totalScore += score; + if (includeMatches) { + const type = searcher.constructor.type; + if (MultiMatchSet.has(type)) { + allIndices = [...allIndices, ...indices]; + } else { + allIndices.push(indices); + } + } + } else { + totalScore = 0; + numMatches = 0; + allIndices.length = 0; + break; + } + } + if (numMatches) { + let result = { + isMatch: true, + score: totalScore / numMatches + }; + if (includeMatches) { + result.indices = allIndices; + } + return result; + } + } + return { + isMatch: false, + score: 1 + }; + } + } + const registeredSearchers = []; + function register(...args) { + registeredSearchers.push(...args); + } + function createSearcher(pattern, options2) { + for (let i = 0, len = registeredSearchers.length; i < len; i += 1) { + let searcherClass = registeredSearchers[i]; + if (searcherClass.condition(pattern, options2)) { + return new searcherClass(pattern, options2); + } + } + return new BitapSearch(pattern, options2); + } + const LogicalOperator = { + AND: "$and", + OR: "$or" + }; + const KeyType = { + PATH: "$path", + PATTERN: "$val" + }; + const isExpression = (query) => !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]); + const isPath = (query) => !!query[KeyType.PATH]; + const isLeaf = (query) => !isArray2(query) && isObject2(query) && !isExpression(query); + const convertToExplicit = (query) => ({ + [LogicalOperator.AND]: Object.keys(query).map((key) => ({ + [key]: query[key] + })) + }); + function parse4(query, options2, {auto = true} = {}) { + const next = (query2) => { + let keys = Object.keys(query2); + const isQueryPath = isPath(query2); + if (!isQueryPath && keys.length > 1 && !isExpression(query2)) { + return next(convertToExplicit(query2)); + } + if (isLeaf(query2)) { + const key = isQueryPath ? query2[KeyType.PATH] : keys[0]; + const pattern = isQueryPath ? query2[KeyType.PATTERN] : query2[key]; + if (!isString3(pattern)) { + throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key)); + } + const obj = { + keyId: createKeyId(key), + pattern + }; + if (auto) { + obj.searcher = createSearcher(pattern, options2); + } + return obj; + } + let node = { + children: [], + operator: keys[0] + }; + keys.forEach((key) => { + const value = query2[key]; + if (isArray2(value)) { + value.forEach((item2) => { + node.children.push(next(item2)); + }); + } + }); + return node; + }; + if (!isExpression(query)) { + query = convertToExplicit(query); + } + return next(query); + } + function computeScore(results, {ignoreFieldNorm = Config.ignoreFieldNorm}) { + results.forEach((result) => { + let totalScore = 1; + result.matches.forEach(({key, norm: norm2, score}) => { + const weight = key ? key.weight : null; + totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm2)); + }); + result.score = totalScore; + }); + } + function transformMatches(result, data3) { + const matches2 = result.matches; + data3.matches = []; + if (!isDefined4(matches2)) { + return; + } + matches2.forEach((match) => { + if (!isDefined4(match.indices) || !match.indices.length) { + return; + } + const {indices, value} = match; + let obj = { + indices, + value + }; + if (match.key) { + obj.key = match.key.src; + } + if (match.idx > -1) { + obj.refIndex = match.idx; + } + data3.matches.push(obj); + }); + } + function transformScore(result, data3) { + data3.score = result.score; + } + function format4(results, docs, { + includeMatches = Config.includeMatches, + includeScore = Config.includeScore + } = {}) { + const transformers = []; + if (includeMatches) + transformers.push(transformMatches); + if (includeScore) + transformers.push(transformScore); + return results.map((result) => { + const {idx} = result; + const data3 = { + item: docs[idx], + refIndex: idx + }; + if (transformers.length) { + transformers.forEach((transformer) => { + transformer(result, data3); + }); + } + return data3; + }); + } + class Fuse { + constructor(docs, options2 = {}, index2) { + this.options = {...Config, ...options2}; + if (this.options.useExtendedSearch && false) { + } + this._keyStore = new KeyStore(this.options.keys); + this.setCollection(docs, index2); + } + setCollection(docs, index2) { + this._docs = docs; + if (index2 && !(index2 instanceof FuseIndex)) { + throw new Error(INCORRECT_INDEX_TYPE); + } + this._myIndex = index2 || createIndex(this.options.keys, this._docs, { + getFn: this.options.getFn, + fieldNormWeight: this.options.fieldNormWeight + }); + } + add(doc) { + if (!isDefined4(doc)) { + return; + } + this._docs.push(doc); + this._myIndex.add(doc); + } + remove(predicate = () => false) { + const results = []; + for (let i = 0, len = this._docs.length; i < len; i += 1) { + const doc = this._docs[i]; + if (predicate(doc, i)) { + this.removeAt(i); + i -= 1; + len -= 1; + results.push(doc); + } + } + return results; + } + removeAt(idx) { + this._docs.splice(idx, 1); + this._myIndex.removeAt(idx); + } + getIndex() { + return this._myIndex; + } + search(query, {limit: limit2 = -1} = {}) { + const { + includeMatches, + includeScore, + shouldSort, + sortFn, + ignoreFieldNorm + } = this.options; + let results = isString3(query) ? isString3(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query); + computeScore(results, {ignoreFieldNorm}); + if (shouldSort) { + results.sort(sortFn); + } + if (isNumber2(limit2) && limit2 > -1) { + results = results.slice(0, limit2); + } + return format4(results, this._docs, { + includeMatches, + includeScore + }); + } + _searchStringList(query) { + const searcher = createSearcher(query, this.options); + const {records} = this._myIndex; + const results = []; + records.forEach(({v: text3, i: idx, n: norm2}) => { + if (!isDefined4(text3)) { + return; + } + const {isMatch, score, indices} = searcher.searchIn(text3); + if (isMatch) { + results.push({ + item: text3, + idx, + matches: [{score, value: text3, norm: norm2, indices}] + }); + } + }); + return results; + } + _searchLogical(query) { + const expression = parse4(query, this.options); + const evaluate = (node, item2, idx) => { + if (!node.children) { + const {keyId, searcher} = node; + const matches2 = this._findMatches({ + key: this._keyStore.get(keyId), + value: this._myIndex.getValueForItemAtKeyId(item2, keyId), + searcher + }); + if (matches2 && matches2.length) { + return [ + { + idx, + item: item2, + matches: matches2 + } + ]; + } + return []; + } + const res2 = []; + for (let i = 0, len = node.children.length; i < len; i += 1) { + const child = node.children[i]; + const result = evaluate(child, item2, idx); + if (result.length) { + res2.push(...result); + } else if (node.operator === LogicalOperator.AND) { + return []; + } + } + return res2; + }; + const records = this._myIndex.records; + const resultMap = {}; + const results = []; + records.forEach(({$: item2, i: idx}) => { + if (isDefined4(item2)) { + let expResults = evaluate(expression, item2, idx); + if (expResults.length) { + if (!resultMap[idx]) { + resultMap[idx] = {idx, item: item2, matches: []}; + results.push(resultMap[idx]); + } + expResults.forEach(({matches: matches2}) => { + resultMap[idx].matches.push(...matches2); + }); + } + } + }); + return results; + } + _searchObjectList(query) { + const searcher = createSearcher(query, this.options); + const {keys, records} = this._myIndex; + const results = []; + records.forEach(({$: item2, i: idx}) => { + if (!isDefined4(item2)) { + return; + } + let matches2 = []; + keys.forEach((key, keyIndex) => { + matches2.push(...this._findMatches({ + key, + value: item2[keyIndex], + searcher + })); + }); + if (matches2.length) { + results.push({ + idx, + item: item2, + matches: matches2 + }); + } + }); + return results; + } + _findMatches({key, value, searcher}) { + if (!isDefined4(value)) { + return []; + } + let matches2 = []; + if (isArray2(value)) { + value.forEach(({v: text3, i: idx, n: norm2}) => { + if (!isDefined4(text3)) { + return; + } + const {isMatch, score, indices} = searcher.searchIn(text3); + if (isMatch) { + matches2.push({ + score, + key, + value: text3, + idx, + norm: norm2, + indices + }); + } + }); + } else { + const {v: text3, n: norm2} = value; + const {isMatch, score, indices} = searcher.searchIn(text3); + if (isMatch) { + matches2.push({score, key, value: text3, norm: norm2, indices}); + } + } + return matches2; + } + } + Fuse.version = "6.5.3"; + Fuse.createIndex = createIndex; + Fuse.parseIndex = parseIndex; + Fuse.config = Config; + { + Fuse.parseQuery = parse4; + } + { + register(ExtendedSearch); + } + }, + 857: function(__unused_webpack_module, __webpack_exports__2, __webpack_require__2) { + __webpack_require__2.r(__webpack_exports__2); + __webpack_require__2.d(__webpack_exports__2, { + __DO_NOT_USE__ActionTypes: function() { + return ActionTypes; + }, + applyMiddleware: function() { + return applyMiddleware; + }, + bindActionCreators: function() { + return bindActionCreators; + }, + combineReducers: function() { + return combineReducers; + }, + compose: function() { + return compose; + }, + createStore: function() { + return createStore2; + } + }); + ; + function _defineProperty3(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + ; + function ownKeys2(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread22(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + i % 2 ? ownKeys2(Object(source), true).forEach(function(key) { + _defineProperty3(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + ; + function formatProdErrorMessage(code) { + return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or use the non-minified dev environment for full errors. "; + } + var $$observable = function() { + return typeof Symbol === "function" && Symbol.observable || "@@observable"; + }(); + var randomString2 = function randomString3() { + return Math.random().toString(36).substring(7).split("").join("."); + }; + var ActionTypes = { + INIT: "@@redux/INIT" + randomString2(), + REPLACE: "@@redux/REPLACE" + randomString2(), + PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { + return "@@redux/PROBE_UNKNOWN_ACTION" + randomString2(); + } + }; + function isPlainObject(obj) { + if (typeof obj !== "object" || obj === null) + return false; + var proto2 = obj; + while (Object.getPrototypeOf(proto2) !== null) { + proto2 = Object.getPrototypeOf(proto2); + } + return Object.getPrototypeOf(obj) === proto2; + } + function miniKindOf(val) { + if (val === void 0) + return "undefined"; + if (val === null) + return "null"; + var type = typeof val; + switch (type) { + case "boolean": + case "string": + case "number": + case "symbol": + case "function": { + return type; + } + } + if (Array.isArray(val)) + return "array"; + if (isDate(val)) + return "date"; + if (isError(val)) + return "error"; + var constructorName = ctorName(val); + switch (constructorName) { + case "Symbol": + case "Promise": + case "WeakMap": + case "WeakSet": + case "Map": + case "Set": + return constructorName; + } + return type.slice(8, -1).toLowerCase().replace(/\s/g, ""); + } + function ctorName(val) { + return typeof val.constructor === "function" ? val.constructor.name : null; + } + function isError(val) { + return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number"; + } + function isDate(val) { + if (val instanceof Date) + return true; + return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function"; + } + function kindOf(val) { + var typeOfVal = typeof val; + if (false) { + } + return typeOfVal; + } + function createStore2(reducer, preloadedState, enhancer) { + var _ref2; + if (typeof preloadedState === "function" && typeof enhancer === "function" || typeof enhancer === "function" && typeof arguments[3] === "function") { + throw new Error(true ? formatProdErrorMessage(0) : 0); + } + if (typeof preloadedState === "function" && typeof enhancer === "undefined") { + enhancer = preloadedState; + preloadedState = void 0; + } + if (typeof enhancer !== "undefined") { + if (typeof enhancer !== "function") { + throw new Error(true ? formatProdErrorMessage(1) : 0); + } + return enhancer(createStore2)(reducer, preloadedState); + } + if (typeof reducer !== "function") { + throw new Error(true ? formatProdErrorMessage(2) : 0); + } + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + function getState() { + if (isDispatching) { + throw new Error(true ? formatProdErrorMessage(3) : 0); + } + return currentState; + } + function subscribe(listener) { + if (typeof listener !== "function") { + throw new Error(true ? formatProdErrorMessage(4) : 0); + } + if (isDispatching) { + throw new Error(true ? formatProdErrorMessage(5) : 0); + } + var isSubscribed = true; + ensureCanMutateNextListeners(); + nextListeners.push(listener); + return function unsubscribe() { + if (!isSubscribed) { + return; + } + if (isDispatching) { + throw new Error(true ? formatProdErrorMessage(6) : 0); + } + isSubscribed = false; + ensureCanMutateNextListeners(); + var index2 = nextListeners.indexOf(listener); + nextListeners.splice(index2, 1); + currentListeners = null; + }; + } + function dispatch2(action) { + if (!isPlainObject(action)) { + throw new Error(true ? formatProdErrorMessage(7) : 0); + } + if (typeof action.type === "undefined") { + throw new Error(true ? formatProdErrorMessage(8) : 0); + } + if (isDispatching) { + throw new Error(true ? formatProdErrorMessage(9) : 0); + } + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + var listeners2 = currentListeners = nextListeners; + for (var i = 0; i < listeners2.length; i++) { + var listener = listeners2[i]; + listener(); + } + return action; + } + function replaceReducer(nextReducer) { + if (typeof nextReducer !== "function") { + throw new Error(true ? formatProdErrorMessage(10) : 0); + } + currentReducer = nextReducer; + dispatch2({ + type: ActionTypes.REPLACE + }); + } + function observable() { + var _ref3; + var outerSubscribe = subscribe; + return _ref3 = { + subscribe: function subscribe2(observer2) { + if (typeof observer2 !== "object" || observer2 === null) { + throw new Error(true ? formatProdErrorMessage(11) : 0); + } + function observeState() { + if (observer2.next) { + observer2.next(getState()); + } + } + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { + unsubscribe + }; + } + }, _ref3[$$observable] = function() { + return this; + }, _ref3; + } + dispatch2({ + type: ActionTypes.INIT + }); + return _ref2 = { + dispatch: dispatch2, + subscribe, + getState, + replaceReducer + }, _ref2[$$observable] = observable, _ref2; + } + function warning(message) { + if (typeof console !== "undefined" && typeof console.error === "function") { + console.error(message); + } + try { + throw new Error(message); + } catch (e2) { + } + } + function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = action && action.type === ActionTypes.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer"; + if (reducerKeys.length === 0) { + return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers."; + } + if (!isPlainObject(inputState)) { + return "The " + argumentName + ' has unexpected type of "' + kindOf(inputState) + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"'); + } + var unexpectedKeys = Object.keys(inputState).filter(function(key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + unexpectedKeys.forEach(function(key) { + unexpectedKeyCache[key] = true; + }); + if (action && action.type === ActionTypes.REPLACE) + return; + if (unexpectedKeys.length > 0) { + return "Unexpected " + (unexpectedKeys.length > 1 ? "keys" : "key") + " " + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.'); + } + } + function assertReducerShape(reducers) { + Object.keys(reducers).forEach(function(key) { + var reducer = reducers[key]; + var initialState = reducer(void 0, { + type: ActionTypes.INIT + }); + if (typeof initialState === "undefined") { + throw new Error(true ? formatProdErrorMessage(12) : 0); + } + if (typeof reducer(void 0, { + type: ActionTypes.PROBE_UNKNOWN_ACTION() + }) === "undefined") { + throw new Error(true ? formatProdErrorMessage(13) : 0); + } + }); + } + function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + if (false) { + } + if (typeof reducers[key] === "function") { + finalReducers[key] = reducers[key]; + } + } + var finalReducerKeys = Object.keys(finalReducers); + var unexpectedKeyCache; + if (false) { + } + var shapeAssertionError; + try { + assertReducerShape(finalReducers); + } catch (e2) { + shapeAssertionError = e2; + } + return function combination(state2, action) { + if (state2 === void 0) { + state2 = {}; + } + if (shapeAssertionError) { + throw shapeAssertionError; + } + if (false) { + var warningMessage; + } + var hasChanged = false; + var nextState = {}; + for (var _i = 0; _i < finalReducerKeys.length; _i++) { + var _key = finalReducerKeys[_i]; + var reducer = finalReducers[_key]; + var previousStateForKey = state2[_key]; + var nextStateForKey = reducer(previousStateForKey, action); + if (typeof nextStateForKey === "undefined") { + var actionType = action && action.type; + throw new Error(true ? formatProdErrorMessage(14) : 0); + } + nextState[_key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state2).length; + return hasChanged ? nextState : state2; + }; + } + function bindActionCreator(actionCreator, dispatch2) { + return function() { + return dispatch2(actionCreator.apply(this, arguments)); + }; + } + function bindActionCreators(actionCreators, dispatch2) { + if (typeof actionCreators === "function") { + return bindActionCreator(actionCreators, dispatch2); + } + if (typeof actionCreators !== "object" || actionCreators === null) { + throw new Error(true ? formatProdErrorMessage(16) : 0); + } + var boundActionCreators = {}; + for (var key in actionCreators) { + var actionCreator = actionCreators[key]; + if (typeof actionCreator === "function") { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch2); + } + } + return boundActionCreators; + } + function compose() { + for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + if (funcs.length === 0) { + return function(arg) { + return arg; + }; + } + if (funcs.length === 1) { + return funcs[0]; + } + return funcs.reduce(function(a2, b) { + return function() { + return a2(b.apply(void 0, arguments)); + }; + }); + } + function applyMiddleware() { + for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + return function(createStore3) { + return function() { + var store = createStore3.apply(void 0, arguments); + var _dispatch = function dispatch2() { + throw new Error(true ? formatProdErrorMessage(15) : 0); + }; + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch2() { + return _dispatch.apply(void 0, arguments); + } + }; + var chain2 = middlewares.map(function(middleware) { + return middleware(middlewareAPI); + }); + _dispatch = compose.apply(void 0, chain2)(store.dispatch); + return _objectSpread22(_objectSpread22({}, store), {}, { + dispatch: _dispatch + }); + }; + }; + } + function isCrushed() { + } + if (false) { + } + } + }; + var __webpack_module_cache__ = {}; + function __webpack_require__(moduleId) { + var cachedModule = __webpack_module_cache__[moduleId]; + if (cachedModule !== void 0) { + return cachedModule.exports; + } + var module2 = __webpack_module_cache__[moduleId] = { + exports: {} + }; + __webpack_modules__[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__); + return module2.exports; + } + !function() { + __webpack_require__.n = function(module2) { + var getter = module2 && module2.__esModule ? function() { + return module2["default"]; + } : function() { + return module2; + }; + __webpack_require__.d(getter, {a: getter}); + return getter; + }; + }(); + !function() { + __webpack_require__.d = function(exports2, definition) { + for (var key in definition) { + if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports2, key)) { + Object.defineProperty(exports2, key, {enumerable: true, get: definition[key]}); + } + } + }; + }(); + !function() { + __webpack_require__.o = function(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + }; + }(); + !function() { + __webpack_require__.r = function(exports2) { + if (typeof Symbol !== "undefined" && Symbol.toStringTag) { + Object.defineProperty(exports2, Symbol.toStringTag, {value: "Module"}); + } + Object.defineProperty(exports2, "__esModule", {value: true}); + }; + }(); + var __webpack_exports__ = {}; + !function() { + var _scripts_choices__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(373); + var _scripts_choices__WEBPACK_IMPORTED_MODULE_0___default = /* @__PURE__ */ __webpack_require__.n(_scripts_choices__WEBPACK_IMPORTED_MODULE_0__); + var _scripts_interfaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(187); + var _scripts_interfaces__WEBPACK_IMPORTED_MODULE_1___default = /* @__PURE__ */ __webpack_require__.n(_scripts_interfaces__WEBPACK_IMPORTED_MODULE_1__); + var _scripts_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(883); + var _scripts_defaults__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(789); + var _scripts_templates__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(686); + __webpack_exports__["default"] = _scripts_choices__WEBPACK_IMPORTED_MODULE_0___default(); + }(); + __webpack_exports__ = __webpack_exports__["default"]; + return __webpack_exports__; + }(); + }); +}); + +// node_modules/vanilla-colorful/lib/utils/math.js +var clamp = (number, min3 = 0, max3 = 1) => { + return number > max3 ? max3 : number < min3 ? min3 : number; +}; +var round = (number, digits = 0, base = Math.pow(10, digits)) => { + return Math.round(base * number) / base; +}; + +// node_modules/vanilla-colorful/lib/utils/convert.js +var angleUnits = { + grad: 360 / 400, + turn: 360, + rad: 360 / (Math.PI * 2) +}; +var hexToHsva = (hex) => rgbaToHsva(hexToRgba(hex)); +var hexToRgba = (hex) => { + if (hex[0] === "#") + hex = hex.substr(1); + if (hex.length < 6) { + return { + r: parseInt(hex[0] + hex[0], 16), + g: parseInt(hex[1] + hex[1], 16), + b: parseInt(hex[2] + hex[2], 16), + a: 1 + }; + } + return { + r: parseInt(hex.substr(0, 2), 16), + g: parseInt(hex.substr(2, 2), 16), + b: parseInt(hex.substr(4, 2), 16), + a: 1 + }; +}; +var parseHue = (value, unit = "deg") => { + return Number(value) * (angleUnits[unit] || 1); +}; +var hslaStringToHsva = (hslString) => { + const matcher = /hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i; + const match = matcher.exec(hslString); + if (!match) + return {h: 0, s: 0, v: 0, a: 1}; + return hslaToHsva({ + h: parseHue(match[1], match[2]), + s: Number(match[3]), + l: Number(match[4]), + a: match[5] === void 0 ? 1 : Number(match[5]) / (match[6] ? 100 : 1) + }); +}; +var hslStringToHsva = hslaStringToHsva; +var hslaToHsva = ({h, s: s2, l, a: a2}) => { + s2 *= (l < 50 ? l : 100 - l) / 100; + return { + h, + s: s2 > 0 ? 2 * s2 / (l + s2) * 100 : 0, + v: l + s2, + a: a2 + }; +}; +var hsvaToHex = (hsva) => rgbaToHex(hsvaToRgba(hsva)); +var hsvaToHsla = ({h, s: s2, v, a: a2}) => { + const hh = (200 - s2) * v / 100; + return { + h: round(h), + s: round(hh > 0 && hh < 200 ? s2 * v / 100 / (hh <= 100 ? hh : 200 - hh) * 100 : 0), + l: round(hh / 2), + a: round(a2, 2) + }; +}; +var hsvaToHslString = (hsva) => { + const {h, s: s2, l} = hsvaToHsla(hsva); + return `hsl(${h}, ${s2}%, ${l}%)`; +}; +var hsvaToHslaString = (hsva) => { + const {h, s: s2, l, a: a2} = hsvaToHsla(hsva); + return `hsla(${h}, ${s2}%, ${l}%, ${a2})`; +}; +var hsvaToRgba = ({h, s: s2, v, a: a2}) => { + h = h / 360 * 6; + s2 = s2 / 100; + v = v / 100; + const hh = Math.floor(h), b = v * (1 - s2), c2 = v * (1 - (h - hh) * s2), d = v * (1 - (1 - h + hh) * s2), module = hh % 6; + return { + r: round([v, c2, b, b, d, v][module] * 255), + g: round([d, v, v, c2, b, b][module] * 255), + b: round([b, b, d, v, v, c2][module] * 255), + a: round(a2, 2) + }; +}; +var hsvaToRgbString = (hsva) => { + const {r: r2, g, b} = hsvaToRgba(hsva); + return `rgb(${r2}, ${g}, ${b})`; +}; +var hsvaToRgbaString = (hsva) => { + const {r: r2, g, b, a: a2} = hsvaToRgba(hsva); + return `rgba(${r2}, ${g}, ${b}, ${a2})`; +}; +var rgbaStringToHsva = (rgbaString) => { + const matcher = /rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i; + const match = matcher.exec(rgbaString); + if (!match) + return {h: 0, s: 0, v: 0, a: 1}; + return rgbaToHsva({ + r: Number(match[1]) / (match[2] ? 100 / 255 : 1), + g: Number(match[3]) / (match[4] ? 100 / 255 : 1), + b: Number(match[5]) / (match[6] ? 100 / 255 : 1), + a: match[7] === void 0 ? 1 : Number(match[7]) / (match[8] ? 100 : 1) + }); +}; +var rgbStringToHsva = rgbaStringToHsva; +var format = (number) => { + const hex = number.toString(16); + return hex.length < 2 ? "0" + hex : hex; +}; +var rgbaToHex = ({r: r2, g, b}) => { + return "#" + format(r2) + format(g) + format(b); +}; +var rgbaToHsva = ({r: r2, g, b, a: a2}) => { + const max3 = Math.max(r2, g, b); + const delta = max3 - Math.min(r2, g, b); + const hh = delta ? max3 === r2 ? (g - b) / delta : max3 === g ? 2 + (b - r2) / delta : 4 + (r2 - g) / delta : 0; + return { + h: round(60 * (hh < 0 ? hh + 6 : hh)), + s: round(max3 ? delta / max3 * 100 : 0), + v: round(max3 / 255 * 100), + a: a2 + }; +}; + +// node_modules/vanilla-colorful/lib/utils/compare.js +var equalColorObjects = (first, second) => { + if (first === second) + return true; + for (const prop in first) { + if (first[prop] !== second[prop]) + return false; + } + return true; +}; +var equalColorString = (first, second) => { + return first.replace(/\s/g, "") === second.replace(/\s/g, ""); +}; +var equalHex = (first, second) => { + if (first.toLowerCase() === second.toLowerCase()) + return true; + return equalColorObjects(hexToRgba(first), hexToRgba(second)); +}; + +// node_modules/vanilla-colorful/lib/utils/dom.js +var cache = {}; +var tpl = (html2) => { + let template = cache[html2]; + if (!template) { + template = document.createElement("template"); + template.innerHTML = html2; + cache[html2] = template; + } + return template; +}; +var fire = (target, type, detail) => { + target.dispatchEvent(new CustomEvent(type, { + bubbles: true, + detail + })); +}; + +// node_modules/vanilla-colorful/lib/components/slider.js +var hasTouched = false; +var isTouch = (e2) => "touches" in e2; +var isValid = (event) => { + if (hasTouched && !isTouch(event)) + return false; + if (!hasTouched) + hasTouched = isTouch(event); + return true; +}; +var pointerMove = (target, event) => { + const pointer = isTouch(event) ? event.touches[0] : event; + const rect = target.el.getBoundingClientRect(); + fire(target.el, "move", target.getMove({ + x: clamp((pointer.pageX - (rect.left + window.pageXOffset)) / rect.width), + y: clamp((pointer.pageY - (rect.top + window.pageYOffset)) / rect.height) + })); +}; +var keyMove = (target, event) => { + const keyCode = event.keyCode; + if (keyCode > 40 || target.xy && keyCode < 37 || keyCode < 33) + return; + event.preventDefault(); + fire(target.el, "move", target.getMove({ + x: keyCode === 39 ? 0.01 : keyCode === 37 ? -0.01 : keyCode === 34 ? 0.05 : keyCode === 33 ? -0.05 : keyCode === 35 ? 1 : keyCode === 36 ? -1 : 0, + y: keyCode === 40 ? 0.01 : keyCode === 38 ? -0.01 : 0 + }, true)); +}; +var Slider = class { + constructor(root2, part, aria, xy) { + const template = tpl(`
`); + root2.appendChild(template.content.cloneNode(true)); + const el = root2.querySelector(`[part=${part}]`); + el.addEventListener("mousedown", this); + el.addEventListener("touchstart", this); + el.addEventListener("keydown", this); + this.el = el; + this.xy = xy; + this.nodes = [el.firstChild, el]; + } + set dragging(state2) { + const toggleEvent = state2 ? document.addEventListener : document.removeEventListener; + toggleEvent(hasTouched ? "touchmove" : "mousemove", this); + toggleEvent(hasTouched ? "touchend" : "mouseup", this); + } + handleEvent(event) { + switch (event.type) { + case "mousedown": + case "touchstart": + event.preventDefault(); + if (!isValid(event) || !hasTouched && event.button != 0) + return; + this.el.focus(); + pointerMove(this, event); + this.dragging = true; + break; + case "mousemove": + case "touchmove": + event.preventDefault(); + pointerMove(this, event); + break; + case "mouseup": + case "touchend": + this.dragging = false; + break; + case "keydown": + keyMove(this, event); + break; + } + } + style(styles3) { + styles3.forEach((style, i) => { + for (const p2 in style) { + this.nodes[i].style.setProperty(p2, style[p2]); + } + }); + } +}; + +// node_modules/vanilla-colorful/lib/components/hue.js +var Hue = class extends Slider { + constructor(root2) { + super(root2, "hue", 'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"', false); + } + update({h}) { + this.h = h; + this.style([ + { + left: `${h / 360 * 100}%`, + color: hsvaToHslString({h, s: 100, v: 100, a: 1}) + } + ]); + this.el.setAttribute("aria-valuenow", `${round(h)}`); + } + getMove(offset2, key) { + return {h: key ? clamp(this.h + offset2.x * 360, 0, 360) : 360 * offset2.x}; + } +}; + +// node_modules/vanilla-colorful/lib/components/saturation.js +var Saturation = class extends Slider { + constructor(root2) { + super(root2, "saturation", 'aria-label="Color"', true); + } + update(hsva) { + this.hsva = hsva; + this.style([ + { + top: `${100 - hsva.v}%`, + left: `${hsva.s}%`, + color: hsvaToHslString(hsva) + }, + { + "background-color": hsvaToHslString({h: hsva.h, s: 100, v: 100, a: 1}) + } + ]); + this.el.setAttribute("aria-valuetext", `Saturation ${round(hsva.s)}%, Brightness ${round(hsva.v)}%`); + } + getMove(offset2, key) { + return { + s: key ? clamp(this.hsva.s + offset2.x * 100, 0, 100) : offset2.x * 100, + v: key ? clamp(this.hsva.v - offset2.y * 100, 0, 100) : Math.round(100 - offset2.y * 100) + }; + } +}; + +// node_modules/vanilla-colorful/lib/styles/color-picker.js +var color_picker_default = `:host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{display:block;content:'';position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}`; + +// node_modules/vanilla-colorful/lib/styles/hue.js +var hue_default = `[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}`; + +// node_modules/vanilla-colorful/lib/styles/saturation.js +var saturation_default = `[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}`; + +// node_modules/vanilla-colorful/lib/components/color-picker.js +var $isSame = Symbol("same"); +var $color = Symbol("color"); +var $hsva = Symbol("hsva"); +var $change = Symbol("change"); +var $update = Symbol("update"); +var $parts = Symbol("parts"); +var $css = Symbol("css"); +var $sliders = Symbol("sliders"); +var ColorPicker = class extends HTMLElement { + static get observedAttributes() { + return ["color"]; + } + get [$css]() { + return [color_picker_default, hue_default, saturation_default]; + } + get [$sliders]() { + return [Saturation, Hue]; + } + get color() { + return this[$color]; + } + set color(newColor) { + if (!this[$isSame](newColor)) { + const newHsva = this.colorModel.toHsva(newColor); + this[$update](newHsva); + this[$change](newColor); + } + } + constructor() { + super(); + const template = tpl(``); + const root2 = this.attachShadow({mode: "open"}); + root2.appendChild(template.content.cloneNode(true)); + root2.addEventListener("move", this); + this[$parts] = this[$sliders].map((slider) => new slider(root2)); + } + connectedCallback() { + if (this.hasOwnProperty("color")) { + const value = this.color; + delete this["color"]; + this.color = value; + } else if (!this.color) { + this.color = this.colorModel.defaultColor; + } + } + attributeChangedCallback(_attr, _oldVal, newVal) { + const color = this.colorModel.fromAttr(newVal); + if (!this[$isSame](color)) { + this.color = color; + } + } + handleEvent(event) { + const oldHsva = this[$hsva]; + const newHsva = {...oldHsva, ...event.detail}; + this[$update](newHsva); + let newColor; + if (!equalColorObjects(newHsva, oldHsva) && !this[$isSame](newColor = this.colorModel.fromHsva(newHsva))) { + this[$change](newColor); + } + } + [$isSame](color) { + return this.color && this.colorModel.equal(color, this.color); + } + [$update](hsva) { + this[$hsva] = hsva; + this[$parts].forEach((part) => part.update(hsva)); + } + [$change](value) { + this[$color] = value; + fire(this, "color-changed", {value}); + } +}; + +// node_modules/vanilla-colorful/lib/entrypoints/hex.js +var colorModel = { + defaultColor: "#000", + toHsva: hexToHsva, + fromHsva: hsvaToHex, + equal: equalHex, + fromAttr: (color) => color +}; +var HexBase = class extends ColorPicker { + get colorModel() { + return colorModel; + } +}; + +// node_modules/vanilla-colorful/hex-color-picker.js +var HexColorPicker = class extends HexBase { +}; +customElements.define("hex-color-picker", HexColorPicker); + +// node_modules/vanilla-colorful/lib/entrypoints/hsl-string.js +var colorModel2 = { + defaultColor: "hsl(0, 0%, 0%)", + toHsva: hslStringToHsva, + fromHsva: hsvaToHslString, + equal: equalColorString, + fromAttr: (color) => color +}; +var HslStringBase = class extends ColorPicker { + get colorModel() { + return colorModel2; + } +}; + +// node_modules/vanilla-colorful/hsl-string-color-picker.js +var HslStringColorPicker = class extends HslStringBase { +}; +customElements.define("hsl-string-color-picker", HslStringColorPicker); + +// node_modules/vanilla-colorful/lib/entrypoints/rgb-string.js +var colorModel3 = { + defaultColor: "rgb(0, 0, 0)", + toHsva: rgbStringToHsva, + fromHsva: hsvaToRgbString, + equal: equalColorString, + fromAttr: (color) => color +}; +var RgbStringBase = class extends ColorPicker { + get colorModel() { + return colorModel3; + } +}; + +// node_modules/vanilla-colorful/rgb-string-color-picker.js +var RgbStringColorPicker = class extends RgbStringBase { +}; +customElements.define("rgb-string-color-picker", RgbStringColorPicker); + +// node_modules/vanilla-colorful/lib/components/alpha.js +var Alpha = class extends Slider { + constructor(root2) { + super(root2, "alpha", 'aria-label="Alpha" aria-valuemin="0" aria-valuemax="1"', false); + } + update(hsva) { + this.hsva = hsva; + const colorFrom = hsvaToHslaString({...hsva, a: 0}); + const colorTo = hsvaToHslaString({...hsva, a: 1}); + const value = hsva.a * 100; + this.style([ + { + left: `${value}%`, + color: hsvaToHslaString(hsva) + }, + { + "--gradient": `linear-gradient(90deg, ${colorFrom}, ${colorTo}` + } + ]); + const v = round(value); + this.el.setAttribute("aria-valuenow", `${v}`); + this.el.setAttribute("aria-valuetext", `${v}%`); + } + getMove(offset2, key) { + return {a: key ? clamp(this.hsva.a + offset2.x) : offset2.x}; + } +}; + +// node_modules/vanilla-colorful/lib/styles/alpha.js +var alpha_default = `[part=alpha]{flex:0 0 24px}[part=alpha]::after{display:block;content:'';position:absolute;top:0;left:0;right:0;bottom:0;border-radius:inherit;background-image:var(--gradient);box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part^=alpha]{background-color:#fff;background-image:url('data:image/svg+xml,')}[part=alpha-pointer]{top:50%}`; + +// node_modules/vanilla-colorful/lib/components/alpha-color-picker.js +var AlphaColorPicker = class extends ColorPicker { + get [$css]() { + return [...super[$css], alpha_default]; + } + get [$sliders]() { + return [...super[$sliders], Alpha]; + } +}; + +// node_modules/vanilla-colorful/lib/entrypoints/rgba-string.js +var colorModel4 = { + defaultColor: "rgba(0, 0, 0, 1)", + toHsva: rgbaStringToHsva, + fromHsva: hsvaToRgbaString, + equal: equalColorString, + fromAttr: (color) => color +}; +var RgbaStringBase = class extends AlphaColorPicker { + get colorModel() { + return colorModel4; + } +}; + +// node_modules/vanilla-colorful/rgba-string-color-picker.js +var RgbaStringColorPicker = class extends RgbaStringBase { +}; +customElements.define("rgba-string-color-picker", RgbaStringColorPicker); + +// node_modules/dayjs/esm/constant.js +var SECONDS_A_MINUTE = 60; +var SECONDS_A_HOUR = SECONDS_A_MINUTE * 60; +var SECONDS_A_DAY = SECONDS_A_HOUR * 24; +var SECONDS_A_WEEK = SECONDS_A_DAY * 7; +var MILLISECONDS_A_SECOND = 1e3; +var MILLISECONDS_A_MINUTE = SECONDS_A_MINUTE * MILLISECONDS_A_SECOND; +var MILLISECONDS_A_HOUR = SECONDS_A_HOUR * MILLISECONDS_A_SECOND; +var MILLISECONDS_A_DAY = SECONDS_A_DAY * MILLISECONDS_A_SECOND; +var MILLISECONDS_A_WEEK = SECONDS_A_WEEK * MILLISECONDS_A_SECOND; +var MS = "millisecond"; +var S = "second"; +var MIN = "minute"; +var H = "hour"; +var D = "day"; +var W = "week"; +var M = "month"; +var Q = "quarter"; +var Y = "year"; +var DATE = "date"; +var FORMAT_DEFAULT = "YYYY-MM-DDTHH:mm:ssZ"; +var INVALID_DATE_STRING = "Invalid Date"; +var REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/; +var REGEX_FORMAT = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g; + +// node_modules/dayjs/esm/locale/en.js +var en_default = { + name: "en", + weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), + months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_") +}; + +// node_modules/dayjs/esm/utils.js +var padStart = function padStart2(string, length, pad) { + var s2 = String(string); + if (!s2 || s2.length >= length) + return string; + return "" + Array(length + 1 - s2.length).join(pad) + string; +}; +var padZoneStr = function padZoneStr2(instance) { + var negMinutes = -instance.utcOffset(); + var minutes = Math.abs(negMinutes); + var hourOffset = Math.floor(minutes / 60); + var minuteOffset = minutes % 60; + return "" + (negMinutes <= 0 ? "+" : "-") + padStart(hourOffset, 2, "0") + ":" + padStart(minuteOffset, 2, "0"); +}; +var monthDiff = function monthDiff2(a2, b) { + if (a2.date() < b.date()) + return -monthDiff2(b, a2); + var wholeMonthDiff = (b.year() - a2.year()) * 12 + (b.month() - a2.month()); + var anchor = a2.clone().add(wholeMonthDiff, M); + var c2 = b - anchor < 0; + var anchor2 = a2.clone().add(wholeMonthDiff + (c2 ? -1 : 1), M); + return +(-(wholeMonthDiff + (b - anchor) / (c2 ? anchor - anchor2 : anchor2 - anchor)) || 0); +}; +var absFloor = function absFloor2(n2) { + return n2 < 0 ? Math.ceil(n2) || 0 : Math.floor(n2); +}; +var prettyUnit = function prettyUnit2(u) { + var special = { + M, + y: Y, + w: W, + d: D, + D: DATE, + h: H, + m: MIN, + s: S, + ms: MS, + Q + }; + return special[u] || String(u || "").toLowerCase().replace(/s$/, ""); +}; +var isUndefined = function isUndefined2(s2) { + return s2 === void 0; +}; +var utils_default = { + s: padStart, + z: padZoneStr, + m: monthDiff, + a: absFloor, + p: prettyUnit, + u: isUndefined +}; + +// node_modules/dayjs/esm/index.js +var L = "en"; +var Ls = {}; +Ls[L] = en_default; +var isDayjs = function isDayjs2(d) { + return d instanceof Dayjs; +}; +var parseLocale = function parseLocale2(preset, object, isLocal) { + var l; + if (!preset) + return L; + if (typeof preset === "string") { + var presetLower = preset.toLowerCase(); + if (Ls[presetLower]) { + l = presetLower; + } + if (object) { + Ls[presetLower] = object; + l = presetLower; + } + var presetSplit = preset.split("-"); + if (!l && presetSplit.length > 1) { + return parseLocale2(presetSplit[0]); + } + } else { + var name2 = preset.name; + Ls[name2] = preset; + l = name2; + } + if (!isLocal && l) + L = l; + return l || !isLocal && L; +}; +var dayjs = function dayjs2(date, c2) { + if (isDayjs(date)) { + return date.clone(); + } + var cfg = typeof c2 === "object" ? c2 : {}; + cfg.date = date; + cfg.args = arguments; + return new Dayjs(cfg); +}; +var wrapper = function wrapper2(date, instance) { + return dayjs(date, { + locale: instance.$L, + utc: instance.$u, + x: instance.$x, + $offset: instance.$offset + }); +}; +var Utils = utils_default; +Utils.l = parseLocale; +Utils.i = isDayjs; +Utils.w = wrapper; +var parseDate = function parseDate2(cfg) { + var date = cfg.date, utc2 = cfg.utc; + if (date === null) + return new Date(NaN); + if (Utils.u(date)) + return new Date(); + if (date instanceof Date) + return new Date(date); + if (typeof date === "string" && !/Z$/i.test(date)) { + var d = date.match(REGEX_PARSE); + if (d) { + var m = d[2] - 1 || 0; + var ms = (d[7] || "0").substring(0, 3); + if (utc2) { + return new Date(Date.UTC(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms)); + } + return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms); + } + } + return new Date(date); +}; +var Dayjs = /* @__PURE__ */ function() { + function Dayjs2(cfg) { + this.$L = parseLocale(cfg.locale, null, true); + this.parse(cfg); + } + var _proto = Dayjs2.prototype; + _proto.parse = function parse4(cfg) { + this.$d = parseDate(cfg); + this.$x = cfg.x || {}; + this.init(); + }; + _proto.init = function init() { + var $d = this.$d; + this.$y = $d.getFullYear(); + this.$M = $d.getMonth(); + this.$D = $d.getDate(); + this.$W = $d.getDay(); + this.$H = $d.getHours(); + this.$m = $d.getMinutes(); + this.$s = $d.getSeconds(); + this.$ms = $d.getMilliseconds(); + }; + _proto.$utils = function $utils() { + return Utils; + }; + _proto.isValid = function isValid2() { + return !(this.$d.toString() === INVALID_DATE_STRING); + }; + _proto.isSame = function isSame(that, units) { + var other = dayjs(that); + return this.startOf(units) <= other && other <= this.endOf(units); + }; + _proto.isAfter = function isAfter(that, units) { + return dayjs(that) < this.startOf(units); + }; + _proto.isBefore = function isBefore(that, units) { + return this.endOf(units) < dayjs(that); + }; + _proto.$g = function $g(input, get, set2) { + if (Utils.u(input)) + return this[get]; + return this.set(set2, input); + }; + _proto.unix = function unix() { + return Math.floor(this.valueOf() / 1e3); + }; + _proto.valueOf = function valueOf() { + return this.$d.getTime(); + }; + _proto.startOf = function startOf(units, _startOf) { + var _this = this; + var isStartOf = !Utils.u(_startOf) ? _startOf : true; + var unit = Utils.p(units); + var instanceFactory = function instanceFactory2(d, m) { + var ins = Utils.w(_this.$u ? Date.UTC(_this.$y, m, d) : new Date(_this.$y, m, d), _this); + return isStartOf ? ins : ins.endOf(D); + }; + var instanceFactorySet = function instanceFactorySet2(method, slice) { + var argumentStart = [0, 0, 0, 0]; + var argumentEnd = [23, 59, 59, 999]; + return Utils.w(_this.toDate()[method].apply(_this.toDate("s"), (isStartOf ? argumentStart : argumentEnd).slice(slice)), _this); + }; + var $W = this.$W, $M = this.$M, $D = this.$D; + var utcPad = "set" + (this.$u ? "UTC" : ""); + switch (unit) { + case Y: + return isStartOf ? instanceFactory(1, 0) : instanceFactory(31, 11); + case M: + return isStartOf ? instanceFactory(1, $M) : instanceFactory(0, $M + 1); + case W: { + var weekStart = this.$locale().weekStart || 0; + var gap = ($W < weekStart ? $W + 7 : $W) - weekStart; + return instanceFactory(isStartOf ? $D - gap : $D + (6 - gap), $M); + } + case D: + case DATE: + return instanceFactorySet(utcPad + "Hours", 0); + case H: + return instanceFactorySet(utcPad + "Minutes", 1); + case MIN: + return instanceFactorySet(utcPad + "Seconds", 2); + case S: + return instanceFactorySet(utcPad + "Milliseconds", 3); + default: + return this.clone(); + } + }; + _proto.endOf = function endOf(arg) { + return this.startOf(arg, false); + }; + _proto.$set = function $set(units, _int) { + var _C$D$C$DATE$C$M$C$Y$C; + var unit = Utils.p(units); + var utcPad = "set" + (this.$u ? "UTC" : ""); + var name2 = (_C$D$C$DATE$C$M$C$Y$C = {}, _C$D$C$DATE$C$M$C$Y$C[D] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[DATE] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[M] = utcPad + "Month", _C$D$C$DATE$C$M$C$Y$C[Y] = utcPad + "FullYear", _C$D$C$DATE$C$M$C$Y$C[H] = utcPad + "Hours", _C$D$C$DATE$C$M$C$Y$C[MIN] = utcPad + "Minutes", _C$D$C$DATE$C$M$C$Y$C[S] = utcPad + "Seconds", _C$D$C$DATE$C$M$C$Y$C[MS] = utcPad + "Milliseconds", _C$D$C$DATE$C$M$C$Y$C)[unit]; + var arg = unit === D ? this.$D + (_int - this.$W) : _int; + if (unit === M || unit === Y) { + var date = this.clone().set(DATE, 1); + date.$d[name2](arg); + date.init(); + this.$d = date.set(DATE, Math.min(this.$D, date.daysInMonth())).$d; + } else if (name2) + this.$d[name2](arg); + this.init(); + return this; + }; + _proto.set = function set2(string, _int2) { + return this.clone().$set(string, _int2); + }; + _proto.get = function get(unit) { + return this[Utils.p(unit)](); + }; + _proto.add = function add(number, units) { + var _this2 = this, _C$MIN$C$H$C$S$unit; + number = Number(number); + var unit = Utils.p(units); + var instanceFactorySet = function instanceFactorySet2(n2) { + var d = dayjs(_this2); + return Utils.w(d.date(d.date() + Math.round(n2 * number)), _this2); + }; + if (unit === M) { + return this.set(M, this.$M + number); + } + if (unit === Y) { + return this.set(Y, this.$y + number); + } + if (unit === D) { + return instanceFactorySet(1); + } + if (unit === W) { + return instanceFactorySet(7); + } + var step = (_C$MIN$C$H$C$S$unit = {}, _C$MIN$C$H$C$S$unit[MIN] = MILLISECONDS_A_MINUTE, _C$MIN$C$H$C$S$unit[H] = MILLISECONDS_A_HOUR, _C$MIN$C$H$C$S$unit[S] = MILLISECONDS_A_SECOND, _C$MIN$C$H$C$S$unit)[unit] || 1; + var nextTimeStamp = this.$d.getTime() + number * step; + return Utils.w(nextTimeStamp, this); + }; + _proto.subtract = function subtract(number, string) { + return this.add(number * -1, string); + }; + _proto.format = function format4(formatStr) { + var _this3 = this; + var locale = this.$locale(); + if (!this.isValid()) + return locale.invalidDate || INVALID_DATE_STRING; + var str = formatStr || FORMAT_DEFAULT; + var zoneStr = Utils.z(this); + var $H = this.$H, $m = this.$m, $M = this.$M; + var weekdays = locale.weekdays, months = locale.months, meridiem = locale.meridiem; + var getShort = function getShort2(arr, index2, full, length) { + return arr && (arr[index2] || arr(_this3, str)) || full[index2].slice(0, length); + }; + var get$H = function get$H2(num) { + return Utils.s($H % 12 || 12, num, "0"); + }; + var meridiemFunc = meridiem || function(hour, minute, isLowercase) { + var m = hour < 12 ? "AM" : "PM"; + return isLowercase ? m.toLowerCase() : m; + }; + var matches2 = { + YY: String(this.$y).slice(-2), + YYYY: this.$y, + M: $M + 1, + MM: Utils.s($M + 1, 2, "0"), + MMM: getShort(locale.monthsShort, $M, months, 3), + MMMM: getShort(months, $M), + D: this.$D, + DD: Utils.s(this.$D, 2, "0"), + d: String(this.$W), + dd: getShort(locale.weekdaysMin, this.$W, weekdays, 2), + ddd: getShort(locale.weekdaysShort, this.$W, weekdays, 3), + dddd: weekdays[this.$W], + H: String($H), + HH: Utils.s($H, 2, "0"), + h: get$H(1), + hh: get$H(2), + a: meridiemFunc($H, $m, true), + A: meridiemFunc($H, $m, false), + m: String($m), + mm: Utils.s($m, 2, "0"), + s: String(this.$s), + ss: Utils.s(this.$s, 2, "0"), + SSS: Utils.s(this.$ms, 3, "0"), + Z: zoneStr + }; + return str.replace(REGEX_FORMAT, function(match, $1) { + return $1 || matches2[match] || zoneStr.replace(":", ""); + }); + }; + _proto.utcOffset = function utcOffset() { + return -Math.round(this.$d.getTimezoneOffset() / 15) * 15; + }; + _proto.diff = function diff(input, units, _float) { + var _C$Y$C$M$C$Q$C$W$C$D$; + var unit = Utils.p(units); + var that = dayjs(input); + var zoneDelta = (that.utcOffset() - this.utcOffset()) * MILLISECONDS_A_MINUTE; + var diff2 = this - that; + var result = Utils.m(this, that); + result = (_C$Y$C$M$C$Q$C$W$C$D$ = {}, _C$Y$C$M$C$Q$C$W$C$D$[Y] = result / 12, _C$Y$C$M$C$Q$C$W$C$D$[M] = result, _C$Y$C$M$C$Q$C$W$C$D$[Q] = result / 3, _C$Y$C$M$C$Q$C$W$C$D$[W] = (diff2 - zoneDelta) / MILLISECONDS_A_WEEK, _C$Y$C$M$C$Q$C$W$C$D$[D] = (diff2 - zoneDelta) / MILLISECONDS_A_DAY, _C$Y$C$M$C$Q$C$W$C$D$[H] = diff2 / MILLISECONDS_A_HOUR, _C$Y$C$M$C$Q$C$W$C$D$[MIN] = diff2 / MILLISECONDS_A_MINUTE, _C$Y$C$M$C$Q$C$W$C$D$[S] = diff2 / MILLISECONDS_A_SECOND, _C$Y$C$M$C$Q$C$W$C$D$)[unit] || diff2; + return _float ? result : Utils.a(result); + }; + _proto.daysInMonth = function daysInMonth() { + return this.endOf(M).$D; + }; + _proto.$locale = function $locale() { + return Ls[this.$L]; + }; + _proto.locale = function locale(preset, object) { + if (!preset) + return this.$L; + var that = this.clone(); + var nextLocaleName = parseLocale(preset, object, true); + if (nextLocaleName) + that.$L = nextLocaleName; + return that; + }; + _proto.clone = function clone3() { + return Utils.w(this.$d, this); + }; + _proto.toDate = function toDate() { + return new Date(this.valueOf()); + }; + _proto.toJSON = function toJSON() { + return this.isValid() ? this.toISOString() : null; + }; + _proto.toISOString = function toISOString() { + return this.$d.toISOString(); + }; + _proto.toString = function toString2() { + return this.$d.toUTCString(); + }; + return Dayjs2; +}(); +var proto = Dayjs.prototype; +dayjs.prototype = proto; +[["$ms", MS], ["$s", S], ["$m", MIN], ["$H", H], ["$W", D], ["$M", M], ["$y", Y], ["$D", DATE]].forEach(function(g) { + proto[g[1]] = function(input) { + return this.$g(input, g[0], g[1]); + }; +}); +dayjs.extend = function(plugin9, option3) { + if (!plugin9.$i) { + plugin9(option3, Dayjs, dayjs); + plugin9.$i = true; + } + return dayjs; +}; +dayjs.locale = parseLocale; +dayjs.isDayjs = isDayjs; +dayjs.unix = function(timestamp) { + return dayjs(timestamp * 1e3); +}; +dayjs.en = Ls[L]; +dayjs.Ls = Ls; +dayjs.p = {}; +var esm_default = dayjs; + +// packages/forms/resources/js/components/color-picker.js +var color_picker_default2 = (Alpine) => { + Alpine.data("colorPickerFormComponent", ({isAutofocused, isDisabled, state: state2}) => { + return { + state: state2, + init: function() { + if (!(this.state === null || this.state === "")) { + this.setState(this.state); + } + if (isAutofocused) { + this.togglePanelVisibility(this.$refs.input); + } + this.$refs.input.addEventListener("change", (event) => { + this.setState(event.target.value); + }); + this.$refs.panel.addEventListener("color-changed", (event) => { + this.setState(event.detail.value); + }); + }, + togglePanelVisibility: function() { + if (isDisabled) { + return; + } + this.$refs.panel.toggle(this.$refs.input); + }, + setState: function(value) { + this.state = value; + this.$refs.input.value = value; + this.$refs.panel.color = value; + } + }; + }); +}; + +// packages/forms/resources/js/components/date-time-picker.js +var import_customParseFormat = __toModule(require_customParseFormat()); +var import_localeData = __toModule(require_localeData()); +var import_timezone = __toModule(require_timezone()); +var import_utc = __toModule(require_utc()); +esm_default.extend(import_customParseFormat.default); +esm_default.extend(import_localeData.default); +esm_default.extend(import_timezone.default); +esm_default.extend(import_utc.default); +window.dayjs = esm_default; +var date_time_picker_default = (Alpine) => { + Alpine.data("dateTimePickerFormComponent", ({ + displayFormat, + firstDayOfWeek, + isAutofocused, + isDisabled, + locale, + shouldCloseOnDateSelection, + state: state2 + }) => { + const timezone2 = esm_default.tz.guess(); + return { + daysInFocusedMonth: [], + displayText: "", + emptyDaysInFocusedMonth: [], + focusedDate: null, + focusedMonth: null, + focusedYear: null, + hour: null, + isClearingState: false, + minute: null, + second: null, + state: state2, + dayLabels: [], + months: [], + init: function() { + esm_default.locale(locales[locale] ?? locales["en"]); + this.focusedDate = esm_default().tz(timezone2); + let date = this.getSelectedDate() ?? esm_default().tz(timezone2).hour(0).minute(0).second(0); + if (this.getMaxDate() !== null && date.isAfter(this.getMaxDate())) { + date = null; + } else if (this.getMinDate() !== null && date.isBefore(this.getMinDate())) { + date = null; + } + this.hour = date?.hour() ?? 0; + this.minute = date?.minute() ?? 0; + this.second = date?.second() ?? 0; + this.setDisplayText(); + this.setMonths(); + this.setDayLabels(); + if (isAutofocused) { + this.$nextTick(() => this.togglePanelVisibility(this.$refs.button)); + } + this.$watch("focusedMonth", () => { + this.focusedMonth = +this.focusedMonth; + if (this.focusedDate.month() === this.focusedMonth) { + return; + } + this.focusedDate = this.focusedDate.month(this.focusedMonth); + }); + this.$watch("focusedYear", () => { + if (this.focusedYear?.length > 4) { + this.focusedYear = this.focusedYear.substring(0, 4); + } + if (!this.focusedYear || this.focusedYear?.length !== 4) { + return; + } + let year = +this.focusedYear; + if (!Number.isInteger(year)) { + year = esm_default().tz(timezone2).year(); + this.focusedYear = year; + } + if (this.focusedDate.year() === year) { + return; + } + this.focusedDate = this.focusedDate.year(year); + }); + this.$watch("focusedDate", () => { + let month = this.focusedDate.month(); + let year = this.focusedDate.year(); + if (this.focusedMonth !== month) { + this.focusedMonth = month; + } + if (this.focusedYear !== year) { + this.focusedYear = year; + } + this.setupDaysGrid(); + }); + this.$watch("hour", () => { + let hour = +this.hour; + if (!Number.isInteger(hour)) { + this.hour = 0; + } else if (hour > 23) { + this.hour = 0; + } else if (hour < 0) { + this.hour = 23; + } else { + this.hour = hour; + } + if (this.isClearingState) { + return; + } + let date2 = this.getSelectedDate() ?? this.focusedDate; + this.setState(date2.hour(this.hour ?? 0)); + }); + this.$watch("minute", () => { + let minute = +this.minute; + if (!Number.isInteger(minute)) { + this.minute = 0; + } else if (minute > 59) { + this.minute = 0; + } else if (minute < 0) { + this.minute = 59; + } else { + this.minute = minute; + } + if (this.isClearingState) { + return; + } + let date2 = this.getSelectedDate() ?? this.focusedDate; + this.setState(date2.minute(this.minute ?? 0)); + }); + this.$watch("second", () => { + let second = +this.second; + if (!Number.isInteger(second)) { + this.second = 0; + } else if (second > 59) { + this.second = 0; + } else if (second < 0) { + this.second = 59; + } else { + this.second = second; + } + if (this.isClearingState) { + return; + } + let date2 = this.getSelectedDate() ?? this.focusedDate; + this.setState(date2.second(this.second ?? 0)); + }); + this.$watch("state", () => { + if (this.state === void 0) { + return; + } + let date2 = this.getSelectedDate(); + if (this.getMaxDate() !== null && date2?.isAfter(this.getMaxDate())) { + date2 = null; + } + if (this.getMinDate() !== null && date2?.isBefore(this.getMinDate())) { + date2 = null; + } + const newHour = date2?.hour() ?? 0; + if (this.hour !== newHour) { + this.hour = newHour; + } + const newMinute = date2?.minute() ?? 0; + if (this.minute !== newMinute) { + this.minute = newMinute; + } + const newSecond = date2?.second() ?? 0; + if (this.second !== newSecond) { + this.second = newSecond; + } + this.setDisplayText(); + }); + }, + clearState: function() { + this.isClearingState = true; + this.setState(null); + this.$nextTick(() => this.isClearingState = false); + }, + dateIsDisabled: function(date) { + if (this.getMaxDate() && date.isAfter(this.getMaxDate())) { + return true; + } + if (this.getMinDate() && date.isBefore(this.getMinDate())) { + return true; + } + return false; + }, + dayIsDisabled: function(day) { + this.focusedDate ??= esm_default().tz(timezone2); + return this.dateIsDisabled(this.focusedDate.date(day)); + }, + dayIsSelected: function(day) { + let selectedDate = this.getSelectedDate(); + if (selectedDate === null) { + return false; + } + this.focusedDate ??= esm_default().tz(timezone2); + return selectedDate.date() === day && selectedDate.month() === this.focusedDate.month() && selectedDate.year() === this.focusedDate.year(); + }, + dayIsToday: function(day) { + let date = esm_default().tz(timezone2); + this.focusedDate ??= date; + return date.date() === day && date.month() === this.focusedDate.month() && date.year() === this.focusedDate.year(); + }, + focusPreviousDay: function() { + this.focusedDate ??= esm_default().tz(timezone2); + this.focusedDate = this.focusedDate.subtract(1, "day"); + }, + focusPreviousWeek: function() { + this.focusedDate ??= esm_default().tz(timezone2); + this.focusedDate = this.focusedDate.subtract(1, "week"); + }, + focusNextDay: function() { + this.focusedDate ??= esm_default().tz(timezone2); + this.focusedDate = this.focusedDate.add(1, "day"); + }, + focusNextWeek: function() { + this.focusedDate ??= esm_default().tz(timezone2); + this.focusedDate = this.focusedDate.add(1, "week"); + }, + getDayLabels: function() { + const labels = esm_default.weekdaysShort(); + if (firstDayOfWeek === 0) { + return labels; + } + return [ + ...labels.slice(firstDayOfWeek), + ...labels.slice(0, firstDayOfWeek) + ]; + }, + getMaxDate: function() { + let date = esm_default(this.$refs.maxDate?.value); + return date.isValid() ? date : null; + }, + getMinDate: function() { + let date = esm_default(this.$refs.minDate?.value); + return date.isValid() ? date : null; + }, + getSelectedDate: function() { + if (this.state === void 0) { + return null; + } + let date = esm_default(this.state); + if (!date.isValid()) { + return null; + } + return date; + }, + togglePanelVisibility: function() { + if (isDisabled) { + return; + } + if (!this.isOpen()) { + this.focusedDate = this.getSelectedDate() ?? this.getMinDate() ?? esm_default().tz(timezone2); + this.setupDaysGrid(); + } + this.$refs.panel.toggle(this.$refs.button); + }, + selectDate: function(day = null) { + if (day) { + this.setFocusedDay(day); + } + this.focusedDate ??= esm_default().tz(timezone2); + this.setState(this.focusedDate); + if (shouldCloseOnDateSelection) { + this.togglePanelVisibility(); + } + }, + setDisplayText: function() { + this.displayText = this.getSelectedDate() ? this.getSelectedDate().format(displayFormat) : ""; + }, + setMonths: function() { + this.months = esm_default.months(); + }, + setDayLabels: function() { + this.dayLabels = this.getDayLabels(); + }, + setupDaysGrid: function() { + this.focusedDate ??= esm_default().tz(timezone2); + this.emptyDaysInFocusedMonth = Array.from({ + length: this.focusedDate.date(8 - firstDayOfWeek).day() + }, (_, i) => i + 1); + this.daysInFocusedMonth = Array.from({ + length: this.focusedDate.daysInMonth() + }, (_, i) => i + 1); + }, + setFocusedDay: function(day) { + this.focusedDate = (this.focusedDate ?? esm_default().tz(timezone2)).date(day); + }, + setState: function(date) { + if (date === null) { + this.state = null; + this.setDisplayText(); + return; + } + if (this.dateIsDisabled(date)) { + return; + } + this.state = date.hour(this.hour ?? 0).minute(this.minute ?? 0).second(this.second ?? 0).format("YYYY-MM-DD HH:mm:ss"); + this.setDisplayText(); + }, + isOpen: function() { + return this.$refs.panel.style.display === "block"; + } + }; + }); +}; +var locales = { + ar: require_ar(), + bs: require_bs(), + ca: require_ca(), + cs: require_cs(), + da: require_da(), + de: require_de(), + en: require_en(), + es: require_es(), + fa: require_fa(), + fr: require_fr(), + hi: require_hi(), + hu: require_hu(), + hy: require_hy_am(), + id: require_id(), + it: require_it(), + js: require_ja(), + ka: require_ka(), + ku: require_ku(), + ms: require_ms(), + my: require_my(), + nl: require_nl(), + pl: require_pl(), + pt_BR: require_pt_br(), + pt_PT: require_pt(), + ro: require_ro(), + ru: require_ru(), + sv: require_sv(), + tr: require_tr(), + uk: require_uk(), + vi: require_vi(), + zh_CN: require_zh_cn(), + zh_TW: require_zh_tw() +}; + +// node_modules/filepond/dist/filepond.esm.js +var filepond_esm_exports = {}; +__export(filepond_esm_exports, { + FileOrigin: () => FileOrigin$1, + FileStatus: () => FileStatus, + OptionTypes: () => OptionTypes, + Status: () => Status$1, + create: () => create$f, + destroy: () => destroy, + find: () => find, + getOptions: () => getOptions$1, + parse: () => parse, + registerPlugin: () => registerPlugin, + setOptions: () => setOptions$1, + supported: () => supported +}); +/*! + * FilePond 4.30.4 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + */ +var isNode = (value) => value instanceof HTMLElement; +var createStore = (initialState, queries2 = [], actions2 = []) => { + const state2 = { + ...initialState + }; + const actionQueue = []; + const dispatchQueue = []; + const getState = () => ({...state2}); + const processActionQueue = () => { + const queue = [...actionQueue]; + actionQueue.length = 0; + return queue; + }; + const processDispatchQueue = () => { + const queue = [...dispatchQueue]; + dispatchQueue.length = 0; + queue.forEach(({type, data: data3}) => { + dispatch2(type, data3); + }); + }; + const dispatch2 = (type, data3, isBlocking) => { + if (isBlocking && !document.hidden) { + dispatchQueue.push({type, data: data3}); + return; + } + if (actionHandlers[type]) { + actionHandlers[type](data3); + } + actionQueue.push({ + type, + data: data3 + }); + }; + const query = (str, ...args) => queryHandles[str] ? queryHandles[str](...args) : null; + const api = { + getState, + processActionQueue, + processDispatchQueue, + dispatch: dispatch2, + query + }; + let queryHandles = {}; + queries2.forEach((query2) => { + queryHandles = { + ...query2(state2), + ...queryHandles + }; + }); + let actionHandlers = {}; + actions2.forEach((action) => { + actionHandlers = { + ...action(dispatch2, query, state2), + ...actionHandlers + }; + }); + return api; +}; +var defineProperty = (obj, property, definition) => { + if (typeof definition === "function") { + obj[property] = definition; + return; + } + Object.defineProperty(obj, property, {...definition}); +}; +var forin = (obj, cb) => { + for (const key in obj) { + if (!obj.hasOwnProperty(key)) { + continue; + } + cb(key, obj[key]); + } +}; +var createObject = (definition) => { + const obj = {}; + forin(definition, (property) => { + defineProperty(obj, property, definition[property]); + }); + return obj; +}; +var attr = (node, name2, value = null) => { + if (value === null) { + return node.getAttribute(name2) || node.hasAttribute(name2); + } + node.setAttribute(name2, value); +}; +var ns = "http://www.w3.org/2000/svg"; +var svgElements = ["svg", "path"]; +var isSVGElement = (tag) => svgElements.includes(tag); +var createElement = (tag, className, attributes = {}) => { + if (typeof className === "object") { + attributes = className; + className = null; + } + const element = isSVGElement(tag) ? document.createElementNS(ns, tag) : document.createElement(tag); + if (className) { + if (isSVGElement(tag)) { + attr(element, "class", className); + } else { + element.className = className; + } + } + forin(attributes, (name2, value) => { + attr(element, name2, value); + }); + return element; +}; +var appendChild = (parent) => (child, index2) => { + if (typeof index2 !== "undefined" && parent.children[index2]) { + parent.insertBefore(child, parent.children[index2]); + } else { + parent.appendChild(child); + } +}; +var appendChildView = (parent, childViews) => (view, index2) => { + if (typeof index2 !== "undefined") { + childViews.splice(index2, 0, view); + } else { + childViews.push(view); + } + return view; +}; +var removeChildView = (parent, childViews) => (view) => { + childViews.splice(childViews.indexOf(view), 1); + if (view.element.parentNode) { + parent.removeChild(view.element); + } + return view; +}; +var IS_BROWSER = (() => typeof window !== "undefined" && typeof window.document !== "undefined")(); +var isBrowser = () => IS_BROWSER; +var testElement = isBrowser() ? createElement("svg") : {}; +var getChildCount = "children" in testElement ? (el) => el.children.length : (el) => el.childNodes.length; +var getViewRect = (elementRect, childViews, offset2, scale) => { + const left = offset2[0] || elementRect.left; + const top = offset2[1] || elementRect.top; + const right = left + elementRect.width; + const bottom = top + elementRect.height * (scale[1] || 1); + const rect = { + element: { + ...elementRect + }, + inner: { + left: elementRect.left, + top: elementRect.top, + right: elementRect.right, + bottom: elementRect.bottom + }, + outer: { + left, + top, + right, + bottom + } + }; + childViews.filter((childView) => !childView.isRectIgnored()).map((childView) => childView.rect).forEach((childViewRect) => { + expandRect(rect.inner, {...childViewRect.inner}); + expandRect(rect.outer, {...childViewRect.outer}); + }); + calculateRectSize(rect.inner); + rect.outer.bottom += rect.element.marginBottom; + rect.outer.right += rect.element.marginRight; + calculateRectSize(rect.outer); + return rect; +}; +var expandRect = (parent, child) => { + child.top += parent.top; + child.right += parent.left; + child.bottom += parent.top; + child.left += parent.left; + if (child.bottom > parent.bottom) { + parent.bottom = child.bottom; + } + if (child.right > parent.right) { + parent.right = child.right; + } +}; +var calculateRectSize = (rect) => { + rect.width = rect.right - rect.left; + rect.height = rect.bottom - rect.top; +}; +var isNumber = (value) => typeof value === "number"; +var thereYet = (position, destination, velocity, errorMargin = 1e-3) => { + return Math.abs(position - destination) < errorMargin && Math.abs(velocity) < errorMargin; +}; +var spring = ({stiffness = 0.5, damping = 0.75, mass = 10} = {}) => { + let target = null; + let position = null; + let velocity = 0; + let resting = false; + const interpolate = (ts, skipToEndState) => { + if (resting) + return; + if (!(isNumber(target) && isNumber(position))) { + resting = true; + velocity = 0; + return; + } + const f = -(position - target) * stiffness; + velocity += f / mass; + position += velocity; + velocity *= damping; + if (thereYet(position, target, velocity) || skipToEndState) { + position = target; + velocity = 0; + resting = true; + api.onupdate(position); + api.oncomplete(position); + } else { + api.onupdate(position); + } + }; + const setTarget = (value) => { + if (isNumber(value) && !isNumber(position)) { + position = value; + } + if (target === null) { + target = value; + position = value; + } + target = value; + if (position === target || typeof target === "undefined") { + resting = true; + velocity = 0; + api.onupdate(position); + api.oncomplete(position); + return; + } + resting = false; + }; + const api = createObject({ + interpolate, + target: { + set: setTarget, + get: () => target + }, + resting: { + get: () => resting + }, + onupdate: (value) => { + }, + oncomplete: (value) => { + } + }); + return api; +}; +var easeInOutQuad = (t2) => t2 < 0.5 ? 2 * t2 * t2 : -1 + (4 - 2 * t2) * t2; +var tween = ({duration = 500, easing = easeInOutQuad, delay = 0} = {}) => { + let start = null; + let t2; + let p2; + let resting = true; + let reverse = false; + let target = null; + const interpolate = (ts, skipToEndState) => { + if (resting || target === null) + return; + if (start === null) { + start = ts; + } + if (ts - start < delay) + return; + t2 = ts - start - delay; + if (t2 >= duration || skipToEndState) { + t2 = 1; + p2 = reverse ? 0 : 1; + api.onupdate(p2 * target); + api.oncomplete(p2 * target); + resting = true; + } else { + p2 = t2 / duration; + api.onupdate((t2 >= 0 ? easing(reverse ? 1 - p2 : p2) : 0) * target); + } + }; + const api = createObject({ + interpolate, + target: { + get: () => reverse ? 0 : target, + set: (value) => { + if (target === null) { + target = value; + api.onupdate(value); + api.oncomplete(value); + return; + } + if (value < target) { + target = 1; + reverse = true; + } else { + reverse = false; + target = value; + } + resting = false; + start = null; + } + }, + resting: { + get: () => resting + }, + onupdate: (value) => { + }, + oncomplete: (value) => { + } + }); + return api; +}; +var animator = { + spring, + tween +}; +var createAnimator = (definition, category, property) => { + const def = definition[category] && typeof definition[category][property] === "object" ? definition[category][property] : definition[category] || definition; + const type = typeof def === "string" ? def : def.type; + const props = typeof def === "object" ? {...def} : {}; + return animator[type] ? animator[type](props) : null; +}; +var addGetSet = (keys, obj, props, overwrite = false) => { + obj = Array.isArray(obj) ? obj : [obj]; + obj.forEach((o2) => { + keys.forEach((key) => { + let name2 = key; + let getter = () => props[key]; + let setter = (value) => props[key] = value; + if (typeof key === "object") { + name2 = key.key; + getter = key.getter || getter; + setter = key.setter || setter; + } + if (o2[name2] && !overwrite) { + return; + } + o2[name2] = { + get: getter, + set: setter + }; + }); + }); +}; +var animations = ({mixinConfig, viewProps, viewInternalAPI, viewExternalAPI}) => { + const initialProps = {...viewProps}; + const animations2 = []; + forin(mixinConfig, (property, animation) => { + const animator2 = createAnimator(animation); + if (!animator2) { + return; + } + animator2.onupdate = (value) => { + viewProps[property] = value; + }; + animator2.target = initialProps[property]; + const prop = { + key: property, + setter: (value) => { + if (animator2.target === value) { + return; + } + animator2.target = value; + }, + getter: () => viewProps[property] + }; + addGetSet([prop], [viewInternalAPI, viewExternalAPI], viewProps, true); + animations2.push(animator2); + }); + return { + write: (ts) => { + let skipToEndState = document.hidden; + let resting = true; + animations2.forEach((animation) => { + if (!animation.resting) + resting = false; + animation.interpolate(ts, skipToEndState); + }); + return resting; + }, + destroy: () => { + } + }; +}; +var addEvent = (element) => (type, fn2) => { + element.addEventListener(type, fn2); +}; +var removeEvent = (element) => (type, fn2) => { + element.removeEventListener(type, fn2); +}; +var listeners = ({ + mixinConfig, + viewProps, + viewInternalAPI, + viewExternalAPI, + viewState, + view +}) => { + const events = []; + const add = addEvent(view.element); + const remove = removeEvent(view.element); + viewExternalAPI.on = (type, fn2) => { + events.push({ + type, + fn: fn2 + }); + add(type, fn2); + }; + viewExternalAPI.off = (type, fn2) => { + events.splice(events.findIndex((event) => event.type === type && event.fn === fn2), 1); + remove(type, fn2); + }; + return { + write: () => { + return true; + }, + destroy: () => { + events.forEach((event) => { + remove(event.type, event.fn); + }); + } + }; +}; +var apis = ({mixinConfig, viewProps, viewExternalAPI}) => { + addGetSet(mixinConfig, viewExternalAPI, viewProps); +}; +var isDefined = (value) => value != null; +var defaults = { + opacity: 1, + scaleX: 1, + scaleY: 1, + translateX: 0, + translateY: 0, + rotateX: 0, + rotateY: 0, + rotateZ: 0, + originX: 0, + originY: 0 +}; +var styles = ({mixinConfig, viewProps, viewInternalAPI, viewExternalAPI, view}) => { + const initialProps = {...viewProps}; + const currentProps = {}; + addGetSet(mixinConfig, [viewInternalAPI, viewExternalAPI], viewProps); + const getOffset = () => [viewProps["translateX"] || 0, viewProps["translateY"] || 0]; + const getScale = () => [viewProps["scaleX"] || 0, viewProps["scaleY"] || 0]; + const getRect2 = () => view.rect ? getViewRect(view.rect, view.childViews, getOffset(), getScale()) : null; + viewInternalAPI.rect = {get: getRect2}; + viewExternalAPI.rect = {get: getRect2}; + mixinConfig.forEach((key) => { + viewProps[key] = typeof initialProps[key] === "undefined" ? defaults[key] : initialProps[key]; + }); + return { + write: () => { + if (!propsHaveChanged(currentProps, viewProps)) { + return; + } + applyStyles(view.element, viewProps); + Object.assign(currentProps, {...viewProps}); + return true; + }, + destroy: () => { + } + }; +}; +var propsHaveChanged = (currentProps, newProps) => { + if (Object.keys(currentProps).length !== Object.keys(newProps).length) { + return true; + } + for (const prop in newProps) { + if (newProps[prop] !== currentProps[prop]) { + return true; + } + } + return false; +}; +var applyStyles = (element, { + opacity, + perspective, + translateX, + translateY, + scaleX, + scaleY, + rotateX, + rotateY, + rotateZ, + originX, + originY, + width, + height +}) => { + let transforms2 = ""; + let styles3 = ""; + if (isDefined(originX) || isDefined(originY)) { + styles3 += `transform-origin: ${originX || 0}px ${originY || 0}px;`; + } + if (isDefined(perspective)) { + transforms2 += `perspective(${perspective}px) `; + } + if (isDefined(translateX) || isDefined(translateY)) { + transforms2 += `translate3d(${translateX || 0}px, ${translateY || 0}px, 0) `; + } + if (isDefined(scaleX) || isDefined(scaleY)) { + transforms2 += `scale3d(${isDefined(scaleX) ? scaleX : 1}, ${isDefined(scaleY) ? scaleY : 1}, 1) `; + } + if (isDefined(rotateZ)) { + transforms2 += `rotateZ(${rotateZ}rad) `; + } + if (isDefined(rotateX)) { + transforms2 += `rotateX(${rotateX}rad) `; + } + if (isDefined(rotateY)) { + transforms2 += `rotateY(${rotateY}rad) `; + } + if (transforms2.length) { + styles3 += `transform:${transforms2};`; + } + if (isDefined(opacity)) { + styles3 += `opacity:${opacity};`; + if (opacity === 0) { + styles3 += `visibility:hidden;`; + } + if (opacity < 1) { + styles3 += `pointer-events:none;`; + } + } + if (isDefined(height)) { + styles3 += `height:${height}px;`; + } + if (isDefined(width)) { + styles3 += `width:${width}px;`; + } + const elementCurrentStyle = element.elementCurrentStyle || ""; + if (styles3.length !== elementCurrentStyle.length || styles3 !== elementCurrentStyle) { + element.style.cssText = styles3; + element.elementCurrentStyle = styles3; + } +}; +var Mixins = { + styles, + listeners, + animations, + apis +}; +var updateRect = (rect = {}, element = {}, style = {}) => { + if (!element.layoutCalculated) { + rect.paddingTop = parseInt(style.paddingTop, 10) || 0; + rect.marginTop = parseInt(style.marginTop, 10) || 0; + rect.marginRight = parseInt(style.marginRight, 10) || 0; + rect.marginBottom = parseInt(style.marginBottom, 10) || 0; + rect.marginLeft = parseInt(style.marginLeft, 10) || 0; + element.layoutCalculated = true; + } + rect.left = element.offsetLeft || 0; + rect.top = element.offsetTop || 0; + rect.width = element.offsetWidth || 0; + rect.height = element.offsetHeight || 0; + rect.right = rect.left + rect.width; + rect.bottom = rect.top + rect.height; + rect.scrollTop = element.scrollTop; + rect.hidden = element.offsetParent === null; + return rect; +}; +var createView = ({ + tag = "div", + name: name2 = null, + attributes = {}, + read = () => { + }, + write: write2 = () => { + }, + create: create3 = () => { + }, + destroy: destroy3 = () => { + }, + filterFrameActionsForChild = (child, actions2) => actions2, + didCreateView = () => { + }, + didWriteView = () => { + }, + ignoreRect = false, + ignoreRectUpdate = false, + mixins = [] +} = {}) => (store, props = {}) => { + const element = createElement(tag, `filepond--${name2}`, attributes); + const style = window.getComputedStyle(element, null); + const rect = updateRect(); + let frameRect = null; + let isResting = false; + const childViews = []; + const activeMixins = []; + const ref = {}; + const state2 = {}; + const writers = [ + write2 + ]; + const readers = [ + read + ]; + const destroyers = [ + destroy3 + ]; + const getElement = () => element; + const getChildViews = () => childViews.concat(); + const getReference = () => ref; + const createChildView = (store2) => (view, props2) => view(store2, props2); + const getRect2 = () => { + if (frameRect) { + return frameRect; + } + frameRect = getViewRect(rect, childViews, [0, 0], [1, 1]); + return frameRect; + }; + const getStyle = () => style; + const _read = () => { + frameRect = null; + childViews.forEach((child) => child._read()); + const shouldUpdate = !(ignoreRectUpdate && rect.width && rect.height); + if (shouldUpdate) { + updateRect(rect, element, style); + } + const api = {root: internalAPI, props, rect}; + readers.forEach((reader) => reader(api)); + }; + const _write = (ts, frameActions, shouldOptimize) => { + let resting = frameActions.length === 0; + writers.forEach((writer) => { + const writerResting = writer({ + props, + root: internalAPI, + actions: frameActions, + timestamp: ts, + shouldOptimize + }); + if (writerResting === false) { + resting = false; + } + }); + activeMixins.forEach((mixin) => { + const mixinResting = mixin.write(ts); + if (mixinResting === false) { + resting = false; + } + }); + childViews.filter((child) => !!child.element.parentNode).forEach((child) => { + const childResting = child._write(ts, filterFrameActionsForChild(child, frameActions), shouldOptimize); + if (!childResting) { + resting = false; + } + }); + childViews.forEach((child, index2) => { + if (child.element.parentNode) { + return; + } + internalAPI.appendChild(child.element, index2); + child._read(); + child._write(ts, filterFrameActionsForChild(child, frameActions), shouldOptimize); + resting = false; + }); + isResting = resting; + didWriteView({ + props, + root: internalAPI, + actions: frameActions, + timestamp: ts + }); + return resting; + }; + const _destroy = () => { + activeMixins.forEach((mixin) => mixin.destroy()); + destroyers.forEach((destroyer) => { + destroyer({root: internalAPI, props}); + }); + childViews.forEach((child) => child._destroy()); + }; + const sharedAPIDefinition = { + element: { + get: getElement + }, + style: { + get: getStyle + }, + childViews: { + get: getChildViews + } + }; + const internalAPIDefinition = { + ...sharedAPIDefinition, + rect: { + get: getRect2 + }, + ref: { + get: getReference + }, + is: (needle) => name2 === needle, + appendChild: appendChild(element), + createChildView: createChildView(store), + linkView: (view) => { + childViews.push(view); + return view; + }, + unlinkView: (view) => { + childViews.splice(childViews.indexOf(view), 1); + }, + appendChildView: appendChildView(element, childViews), + removeChildView: removeChildView(element, childViews), + registerWriter: (writer) => writers.push(writer), + registerReader: (reader) => readers.push(reader), + registerDestroyer: (destroyer) => destroyers.push(destroyer), + invalidateLayout: () => element.layoutCalculated = false, + dispatch: store.dispatch, + query: store.query + }; + const externalAPIDefinition = { + element: { + get: getElement + }, + childViews: { + get: getChildViews + }, + rect: { + get: getRect2 + }, + resting: { + get: () => isResting + }, + isRectIgnored: () => ignoreRect, + _read, + _write, + _destroy + }; + const mixinAPIDefinition = { + ...sharedAPIDefinition, + rect: { + get: () => rect + } + }; + Object.keys(mixins).sort((a2, b) => { + if (a2 === "styles") { + return 1; + } else if (b === "styles") { + return -1; + } + return 0; + }).forEach((key) => { + const mixinAPI = Mixins[key]({ + mixinConfig: mixins[key], + viewProps: props, + viewState: state2, + viewInternalAPI: internalAPIDefinition, + viewExternalAPI: externalAPIDefinition, + view: createObject(mixinAPIDefinition) + }); + if (mixinAPI) { + activeMixins.push(mixinAPI); + } + }); + const internalAPI = createObject(internalAPIDefinition); + create3({ + root: internalAPI, + props + }); + const childCount = getChildCount(element); + childViews.forEach((child, index2) => { + internalAPI.appendChild(child.element, childCount + index2); + }); + didCreateView(internalAPI); + return createObject(externalAPIDefinition); +}; +var createPainter = (read, write2, fps = 60) => { + const name2 = "__framePainter"; + if (window[name2]) { + window[name2].readers.push(read); + window[name2].writers.push(write2); + return; + } + window[name2] = { + readers: [read], + writers: [write2] + }; + const painter = window[name2]; + const interval = 1e3 / fps; + let last = null; + let id = null; + let requestTick = null; + let cancelTick = null; + const setTimerType = () => { + if (document.hidden) { + requestTick = () => window.setTimeout(() => tick(performance.now()), interval); + cancelTick = () => window.clearTimeout(id); + } else { + requestTick = () => window.requestAnimationFrame(tick); + cancelTick = () => window.cancelAnimationFrame(id); + } + }; + document.addEventListener("visibilitychange", () => { + if (cancelTick) + cancelTick(); + setTimerType(); + tick(performance.now()); + }); + const tick = (ts) => { + id = requestTick(tick); + if (!last) { + last = ts; + } + const delta = ts - last; + if (delta <= interval) { + return; + } + last = ts - delta % interval; + painter.readers.forEach((read2) => read2()); + painter.writers.forEach((write3) => write3(ts)); + }; + setTimerType(); + tick(performance.now()); + return { + pause: () => { + cancelTick(id); + } + }; +}; +var createRoute = (routes, fn2) => ({root: root2, props, actions: actions2 = [], timestamp, shouldOptimize}) => { + actions2.filter((action) => routes[action.type]).forEach((action) => routes[action.type]({root: root2, props, action: action.data, timestamp, shouldOptimize})); + if (fn2) { + fn2({root: root2, props, actions: actions2, timestamp, shouldOptimize}); + } +}; +var insertBefore = (newNode, referenceNode) => referenceNode.parentNode.insertBefore(newNode, referenceNode); +var insertAfter = (newNode, referenceNode) => { + return referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); +}; +var isArray = (value) => Array.isArray(value); +var isEmpty = (value) => value == null; +var trim = (str) => str.trim(); +var toString = (value) => "" + value; +var toArray = (value, splitter = ",") => { + if (isEmpty(value)) { + return []; + } + if (isArray(value)) { + return value; + } + return toString(value).split(splitter).map(trim).filter((str) => str.length); +}; +var isBoolean = (value) => typeof value === "boolean"; +var toBoolean = (value) => isBoolean(value) ? value : value === "true"; +var isString = (value) => typeof value === "string"; +var toNumber = (value) => isNumber(value) ? value : isString(value) ? toString(value).replace(/[a-z]+/gi, "") : 0; +var toInt = (value) => parseInt(toNumber(value), 10); +var toFloat = (value) => parseFloat(toNumber(value)); +var isInt = (value) => isNumber(value) && isFinite(value) && Math.floor(value) === value; +var toBytes = (value, base = 1e3) => { + if (isInt(value)) { + return value; + } + let naturalFileSize = toString(value).trim(); + if (/MB$/i.test(naturalFileSize)) { + naturalFileSize = naturalFileSize.replace(/MB$i/, "").trim(); + return toInt(naturalFileSize) * base * base; + } + if (/KB/i.test(naturalFileSize)) { + naturalFileSize = naturalFileSize.replace(/KB$i/, "").trim(); + return toInt(naturalFileSize) * base; + } + return toInt(naturalFileSize); +}; +var isFunction = (value) => typeof value === "function"; +var toFunctionReference = (string) => { + let ref = self; + let levels = string.split("."); + let level = null; + while (level = levels.shift()) { + ref = ref[level]; + if (!ref) { + return null; + } + } + return ref; +}; +var methods = { + process: "POST", + patch: "PATCH", + revert: "DELETE", + fetch: "GET", + restore: "GET", + load: "GET" +}; +var createServerAPI = (outline) => { + const api = {}; + api.url = isString(outline) ? outline : outline.url || ""; + api.timeout = outline.timeout ? parseInt(outline.timeout, 10) : 0; + api.headers = outline.headers ? outline.headers : {}; + forin(methods, (key) => { + api[key] = createAction(key, outline[key], methods[key], api.timeout, api.headers); + }); + api.process = outline.process || isString(outline) || outline.url ? api.process : null; + api.remove = outline.remove || null; + delete api.headers; + return api; +}; +var createAction = (name2, outline, method, timeout, headers) => { + if (outline === null) { + return null; + } + if (typeof outline === "function") { + return outline; + } + const action = { + url: method === "GET" || method === "PATCH" ? `?${name2}=` : "", + method, + headers, + withCredentials: false, + timeout, + onload: null, + ondata: null, + onerror: null + }; + if (isString(outline)) { + action.url = outline; + return action; + } + Object.assign(action, outline); + if (isString(action.headers)) { + const parts = action.headers.split(/:(.+)/); + action.headers = { + header: parts[0], + value: parts[1] + }; + } + action.withCredentials = toBoolean(action.withCredentials); + return action; +}; +var toServerAPI = (value) => createServerAPI(value); +var isNull = (value) => value === null; +var isObject = (value) => typeof value === "object" && value !== null; +var isAPI = (value) => { + return isObject(value) && isString(value.url) && isObject(value.process) && isObject(value.revert) && isObject(value.restore) && isObject(value.fetch); +}; +var getType = (value) => { + if (isArray(value)) { + return "array"; + } + if (isNull(value)) { + return "null"; + } + if (isInt(value)) { + return "int"; + } + if (/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(value)) { + return "bytes"; + } + if (isAPI(value)) { + return "api"; + } + return typeof value; +}; +var replaceSingleQuotes = (str) => str.replace(/{\s*'/g, '{"').replace(/'\s*}/g, '"}').replace(/'\s*:/g, '":').replace(/:\s*'/g, ':"').replace(/,\s*'/g, ',"').replace(/'\s*,/g, '",'); +var conversionTable = { + array: toArray, + boolean: toBoolean, + int: (value) => getType(value) === "bytes" ? toBytes(value) : toInt(value), + number: toFloat, + float: toFloat, + bytes: toBytes, + string: (value) => isFunction(value) ? value : toString(value), + function: (value) => toFunctionReference(value), + serverapi: toServerAPI, + object: (value) => { + try { + return JSON.parse(replaceSingleQuotes(value)); + } catch (e2) { + return null; + } + } +}; +var convertTo = (value, type) => conversionTable[type](value); +var getValueByType = (newValue, defaultValue, valueType) => { + if (newValue === defaultValue) { + return newValue; + } + let newValueType = getType(newValue); + if (newValueType !== valueType) { + const convertedValue = convertTo(newValue, valueType); + newValueType = getType(convertedValue); + if (convertedValue === null) { + throw `Trying to assign value with incorrect type to "${option}", allowed type: "${valueType}"`; + } else { + newValue = convertedValue; + } + } + return newValue; +}; +var createOption = (defaultValue, valueType) => { + let currentValue = defaultValue; + return { + enumerable: true, + get: () => currentValue, + set: (newValue) => { + currentValue = getValueByType(newValue, defaultValue, valueType); + } + }; +}; +var createOptions = (options2) => { + const obj = {}; + forin(options2, (prop) => { + const optionDefinition = options2[prop]; + obj[prop] = createOption(optionDefinition[0], optionDefinition[1]); + }); + return createObject(obj); +}; +var createInitialState = (options2) => ({ + items: [], + listUpdateTimeout: null, + itemUpdateTimeout: null, + processingQueue: [], + options: createOptions(options2) +}); +var fromCamels = (string, separator = "-") => string.split(/(?=[A-Z])/).map((part) => part.toLowerCase()).join(separator); +var createOptionAPI = (store, options2) => { + const obj = {}; + forin(options2, (key) => { + obj[key] = { + get: () => store.getState().options[key], + set: (value) => { + store.dispatch(`SET_${fromCamels(key, "_").toUpperCase()}`, { + value + }); + } + }; + }); + return obj; +}; +var createOptionActions = (options2) => (dispatch2, query, state2) => { + const obj = {}; + forin(options2, (key) => { + const name2 = fromCamels(key, "_").toUpperCase(); + obj[`SET_${name2}`] = (action) => { + try { + state2.options[key] = action.value; + } catch (e2) { + } + dispatch2(`DID_SET_${name2}`, {value: state2.options[key]}); + }; + }); + return obj; +}; +var createOptionQueries = (options2) => (state2) => { + const obj = {}; + forin(options2, (key) => { + obj[`GET_${fromCamels(key, "_").toUpperCase()}`] = (action) => state2.options[key]; + }); + return obj; +}; +var InteractionMethod = { + API: 1, + DROP: 2, + BROWSE: 3, + PASTE: 4, + NONE: 5 +}; +var getUniqueId = () => Math.random().toString(36).substring(2, 11); +var arrayRemove = (arr, index2) => arr.splice(index2, 1); +var run = (cb, sync) => { + if (sync) { + cb(); + } else if (document.hidden) { + Promise.resolve(1).then(cb); + } else { + setTimeout(cb, 0); + } +}; +var on = () => { + const listeners2 = []; + const off2 = (event, cb) => { + arrayRemove(listeners2, listeners2.findIndex((listener) => listener.event === event && (listener.cb === cb || !cb))); + }; + const fire2 = (event, args, sync) => { + listeners2.filter((listener) => listener.event === event).map((listener) => listener.cb).forEach((cb) => run(() => cb(...args), sync)); + }; + return { + fireSync: (event, ...args) => { + fire2(event, args, true); + }, + fire: (event, ...args) => { + fire2(event, args, false); + }, + on: (event, cb) => { + listeners2.push({event, cb}); + }, + onOnce: (event, cb) => { + listeners2.push({ + event, + cb: (...args) => { + off2(event, cb); + cb(...args); + } + }); + }, + off: off2 + }; +}; +var copyObjectPropertiesToObject = (src, target, excluded) => { + Object.getOwnPropertyNames(src).filter((property) => !excluded.includes(property)).forEach((key) => Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(src, key))); +}; +var PRIVATE = [ + "fire", + "process", + "revert", + "load", + "on", + "off", + "onOnce", + "retryLoad", + "extend", + "archive", + "archived", + "release", + "released", + "requestProcessing", + "freeze" +]; +var createItemAPI = (item2) => { + const api = {}; + copyObjectPropertiesToObject(item2, api, PRIVATE); + return api; +}; +var removeReleasedItems = (items) => { + items.forEach((item2, index2) => { + if (item2.released) { + arrayRemove(items, index2); + } + }); +}; +var ItemStatus = { + INIT: 1, + IDLE: 2, + PROCESSING_QUEUED: 9, + PROCESSING: 3, + PROCESSING_COMPLETE: 5, + PROCESSING_ERROR: 6, + PROCESSING_REVERT_ERROR: 10, + LOADING: 7, + LOAD_ERROR: 8 +}; +var FileOrigin = { + INPUT: 1, + LIMBO: 2, + LOCAL: 3 +}; +var getNonNumeric = (str) => /[^0-9]+/.exec(str); +var getDecimalSeparator = () => getNonNumeric(1.1 .toLocaleString())[0]; +var getThousandsSeparator = () => { + const decimalSeparator = getDecimalSeparator(); + const thousandsStringWithSeparator = 1e3 .toLocaleString(); + const thousandsStringWithoutSeparator = 1e3 .toString(); + if (thousandsStringWithSeparator !== thousandsStringWithoutSeparator) { + return getNonNumeric(thousandsStringWithSeparator)[0]; + } + return decimalSeparator === "." ? "," : "."; +}; +var Type = { + BOOLEAN: "boolean", + INT: "int", + NUMBER: "number", + STRING: "string", + ARRAY: "array", + OBJECT: "object", + FUNCTION: "function", + ACTION: "action", + SERVER_API: "serverapi", + REGEX: "regex" +}; +var filters = []; +var applyFilterChain = (key, value, utils) => new Promise((resolve, reject) => { + const matchingFilters = filters.filter((f) => f.key === key).map((f) => f.cb); + if (matchingFilters.length === 0) { + resolve(value); + return; + } + const initialFilter = matchingFilters.shift(); + matchingFilters.reduce((current, next) => current.then((value2) => next(value2, utils)), initialFilter(value, utils)).then((value2) => resolve(value2)).catch((error2) => reject(error2)); +}); +var applyFilters = (key, value, utils) => filters.filter((f) => f.key === key).map((f) => f.cb(value, utils)); +var addFilter = (key, cb) => filters.push({key, cb}); +var extendDefaultOptions = (additionalOptions) => Object.assign(defaultOptions, additionalOptions); +var getOptions = () => ({...defaultOptions}); +var setOptions = (opts) => { + forin(opts, (key, value) => { + if (!defaultOptions[key]) { + return; + } + defaultOptions[key][0] = getValueByType(value, defaultOptions[key][0], defaultOptions[key][1]); + }); +}; +var defaultOptions = { + id: [null, Type.STRING], + name: ["filepond", Type.STRING], + disabled: [false, Type.BOOLEAN], + className: [null, Type.STRING], + required: [false, Type.BOOLEAN], + captureMethod: [null, Type.STRING], + allowSyncAcceptAttribute: [true, Type.BOOLEAN], + allowDrop: [true, Type.BOOLEAN], + allowBrowse: [true, Type.BOOLEAN], + allowPaste: [true, Type.BOOLEAN], + allowMultiple: [false, Type.BOOLEAN], + allowReplace: [true, Type.BOOLEAN], + allowRevert: [true, Type.BOOLEAN], + allowRemove: [true, Type.BOOLEAN], + allowProcess: [true, Type.BOOLEAN], + allowReorder: [false, Type.BOOLEAN], + allowDirectoriesOnly: [false, Type.BOOLEAN], + storeAsFile: [false, Type.BOOLEAN], + forceRevert: [false, Type.BOOLEAN], + maxFiles: [null, Type.INT], + checkValidity: [false, Type.BOOLEAN], + itemInsertLocationFreedom: [true, Type.BOOLEAN], + itemInsertLocation: ["before", Type.STRING], + itemInsertInterval: [75, Type.INT], + dropOnPage: [false, Type.BOOLEAN], + dropOnElement: [true, Type.BOOLEAN], + dropValidation: [false, Type.BOOLEAN], + ignoredFiles: [[".ds_store", "thumbs.db", "desktop.ini"], Type.ARRAY], + instantUpload: [true, Type.BOOLEAN], + maxParallelUploads: [2, Type.INT], + allowMinimumUploadDuration: [true, Type.BOOLEAN], + chunkUploads: [false, Type.BOOLEAN], + chunkForce: [false, Type.BOOLEAN], + chunkSize: [5e6, Type.INT], + chunkRetryDelays: [[500, 1e3, 3e3], Type.ARRAY], + server: [null, Type.SERVER_API], + fileSizeBase: [1e3, Type.INT], + labelFileSizeBytes: ["bytes", Type.STRING], + labelFileSizeKilobytes: ["KB", Type.STRING], + labelFileSizeMegabytes: ["MB", Type.STRING], + labelFileSizeGigabytes: ["GB", Type.STRING], + labelDecimalSeparator: [getDecimalSeparator(), Type.STRING], + labelThousandsSeparator: [getThousandsSeparator(), Type.STRING], + labelIdle: [ + 'Drag & Drop your files or Browse', + Type.STRING + ], + labelInvalidField: ["Field contains invalid files", Type.STRING], + labelFileWaitingForSize: ["Waiting for size", Type.STRING], + labelFileSizeNotAvailable: ["Size not available", Type.STRING], + labelFileCountSingular: ["file in list", Type.STRING], + labelFileCountPlural: ["files in list", Type.STRING], + labelFileLoading: ["Loading", Type.STRING], + labelFileAdded: ["Added", Type.STRING], + labelFileLoadError: ["Error during load", Type.STRING], + labelFileRemoved: ["Removed", Type.STRING], + labelFileRemoveError: ["Error during remove", Type.STRING], + labelFileProcessing: ["Uploading", Type.STRING], + labelFileProcessingComplete: ["Upload complete", Type.STRING], + labelFileProcessingAborted: ["Upload cancelled", Type.STRING], + labelFileProcessingError: ["Error during upload", Type.STRING], + labelFileProcessingRevertError: ["Error during revert", Type.STRING], + labelTapToCancel: ["tap to cancel", Type.STRING], + labelTapToRetry: ["tap to retry", Type.STRING], + labelTapToUndo: ["tap to undo", Type.STRING], + labelButtonRemoveItem: ["Remove", Type.STRING], + labelButtonAbortItemLoad: ["Abort", Type.STRING], + labelButtonRetryItemLoad: ["Retry", Type.STRING], + labelButtonAbortItemProcessing: ["Cancel", Type.STRING], + labelButtonUndoItemProcessing: ["Undo", Type.STRING], + labelButtonRetryItemProcessing: ["Retry", Type.STRING], + labelButtonProcessItem: ["Upload", Type.STRING], + iconRemove: [ + '', + Type.STRING + ], + iconProcess: [ + '', + Type.STRING + ], + iconRetry: [ + '', + Type.STRING + ], + iconUndo: [ + '', + Type.STRING + ], + iconDone: [ + '', + Type.STRING + ], + oninit: [null, Type.FUNCTION], + onwarning: [null, Type.FUNCTION], + onerror: [null, Type.FUNCTION], + onactivatefile: [null, Type.FUNCTION], + oninitfile: [null, Type.FUNCTION], + onaddfilestart: [null, Type.FUNCTION], + onaddfileprogress: [null, Type.FUNCTION], + onaddfile: [null, Type.FUNCTION], + onprocessfilestart: [null, Type.FUNCTION], + onprocessfileprogress: [null, Type.FUNCTION], + onprocessfileabort: [null, Type.FUNCTION], + onprocessfilerevert: [null, Type.FUNCTION], + onprocessfile: [null, Type.FUNCTION], + onprocessfiles: [null, Type.FUNCTION], + onremovefile: [null, Type.FUNCTION], + onpreparefile: [null, Type.FUNCTION], + onupdatefiles: [null, Type.FUNCTION], + onreorderfiles: [null, Type.FUNCTION], + beforeDropFile: [null, Type.FUNCTION], + beforeAddFile: [null, Type.FUNCTION], + beforeRemoveFile: [null, Type.FUNCTION], + beforePrepareFile: [null, Type.FUNCTION], + stylePanelLayout: [null, Type.STRING], + stylePanelAspectRatio: [null, Type.STRING], + styleItemPanelAspectRatio: [null, Type.STRING], + styleButtonRemoveItemPosition: ["left", Type.STRING], + styleButtonProcessItemPosition: ["right", Type.STRING], + styleLoadIndicatorPosition: ["right", Type.STRING], + styleProgressIndicatorPosition: ["right", Type.STRING], + styleButtonRemoveItemAlign: [false, Type.BOOLEAN], + files: [[], Type.ARRAY], + credits: [["https://pqina.nl/", "Powered by PQINA"], Type.ARRAY] +}; +var getItemByQuery = (items, query) => { + if (isEmpty(query)) { + return items[0] || null; + } + if (isInt(query)) { + return items[query] || null; + } + if (typeof query === "object") { + query = query.id; + } + return items.find((item2) => item2.id === query) || null; +}; +var getNumericAspectRatioFromString = (aspectRatio) => { + if (isEmpty(aspectRatio)) { + return aspectRatio; + } + if (/:/.test(aspectRatio)) { + const parts = aspectRatio.split(":"); + return parts[1] / parts[0]; + } + return parseFloat(aspectRatio); +}; +var getActiveItems = (items) => items.filter((item2) => !item2.archived); +var Status = { + EMPTY: 0, + IDLE: 1, + ERROR: 2, + BUSY: 3, + READY: 4 +}; +var res = null; +var canUpdateFileInput = () => { + if (res === null) { + try { + const dataTransfer = new DataTransfer(); + dataTransfer.items.add(new File(["hello world"], "This_Works.txt")); + const el = document.createElement("input"); + el.setAttribute("type", "file"); + el.files = dataTransfer.files; + res = el.files.length === 1; + } catch (err) { + res = false; + } + } + return res; +}; +var ITEM_ERROR = [ + ItemStatus.LOAD_ERROR, + ItemStatus.PROCESSING_ERROR, + ItemStatus.PROCESSING_REVERT_ERROR +]; +var ITEM_BUSY = [ + ItemStatus.LOADING, + ItemStatus.PROCESSING, + ItemStatus.PROCESSING_QUEUED, + ItemStatus.INIT +]; +var ITEM_READY = [ItemStatus.PROCESSING_COMPLETE]; +var isItemInErrorState = (item2) => ITEM_ERROR.includes(item2.status); +var isItemInBusyState = (item2) => ITEM_BUSY.includes(item2.status); +var isItemInReadyState = (item2) => ITEM_READY.includes(item2.status); +var isAsync = (state2) => isObject(state2.options.server) && (isObject(state2.options.server.process) || isFunction(state2.options.server.process)); +var queries = (state2) => ({ + GET_STATUS: () => { + const items = getActiveItems(state2.items); + const {EMPTY, ERROR, BUSY, IDLE, READY} = Status; + if (items.length === 0) + return EMPTY; + if (items.some(isItemInErrorState)) + return ERROR; + if (items.some(isItemInBusyState)) + return BUSY; + if (items.some(isItemInReadyState)) + return READY; + return IDLE; + }, + GET_ITEM: (query) => getItemByQuery(state2.items, query), + GET_ACTIVE_ITEM: (query) => getItemByQuery(getActiveItems(state2.items), query), + GET_ACTIVE_ITEMS: () => getActiveItems(state2.items), + GET_ITEMS: () => state2.items, + GET_ITEM_NAME: (query) => { + const item2 = getItemByQuery(state2.items, query); + return item2 ? item2.filename : null; + }, + GET_ITEM_SIZE: (query) => { + const item2 = getItemByQuery(state2.items, query); + return item2 ? item2.fileSize : null; + }, + GET_STYLES: () => Object.keys(state2.options).filter((key) => /^style/.test(key)).map((option3) => ({ + name: option3, + value: state2.options[option3] + })), + GET_PANEL_ASPECT_RATIO: () => { + const isShapeCircle = /circle/.test(state2.options.stylePanelLayout); + const aspectRatio = isShapeCircle ? 1 : getNumericAspectRatioFromString(state2.options.stylePanelAspectRatio); + return aspectRatio; + }, + GET_ITEM_PANEL_ASPECT_RATIO: () => state2.options.styleItemPanelAspectRatio, + GET_ITEMS_BY_STATUS: (status) => getActiveItems(state2.items).filter((item2) => item2.status === status), + GET_TOTAL_ITEMS: () => getActiveItems(state2.items).length, + SHOULD_UPDATE_FILE_INPUT: () => state2.options.storeAsFile && canUpdateFileInput() && !isAsync(state2), + IS_ASYNC: () => isAsync(state2), + GET_FILE_SIZE_LABELS: (query) => ({ + labelBytes: query("GET_LABEL_FILE_SIZE_BYTES") || void 0, + labelKilobytes: query("GET_LABEL_FILE_SIZE_KILOBYTES") || void 0, + labelMegabytes: query("GET_LABEL_FILE_SIZE_MEGABYTES") || void 0, + labelGigabytes: query("GET_LABEL_FILE_SIZE_GIGABYTES") || void 0 + }) +}); +var hasRoomForItem = (state2) => { + const count = getActiveItems(state2.items).length; + if (!state2.options.allowMultiple) { + return count === 0; + } + const maxFileCount = state2.options.maxFiles; + if (maxFileCount === null) { + return true; + } + if (count < maxFileCount) { + return true; + } + return false; +}; +var limit = (value, min3, max3) => Math.max(Math.min(max3, value), min3); +var arrayInsert = (arr, index2, item2) => arr.splice(index2, 0, item2); +var insertItem = (items, item2, index2) => { + if (isEmpty(item2)) { + return null; + } + if (typeof index2 === "undefined") { + items.push(item2); + return item2; + } + index2 = limit(index2, 0, items.length); + arrayInsert(items, index2, item2); + return item2; +}; +var isBase64DataURI = (str) => /^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(str); +var getFilenameFromURL = (url) => url.split("/").pop().split("?").shift(); +var getExtensionFromFilename = (name2) => name2.split(".").pop(); +var guesstimateExtension = (type) => { + if (typeof type !== "string") { + return ""; + } + const subtype = type.split("/").pop(); + if (/svg/.test(subtype)) { + return "svg"; + } + if (/zip|compressed/.test(subtype)) { + return "zip"; + } + if (/plain/.test(subtype)) { + return "txt"; + } + if (/msword/.test(subtype)) { + return "doc"; + } + if (/[a-z]+/.test(subtype)) { + if (subtype === "jpeg") { + return "jpg"; + } + return subtype; + } + return ""; +}; +var leftPad = (value, padding = "") => (padding + value).slice(-padding.length); +var getDateString = (date = new Date()) => `${date.getFullYear()}-${leftPad(date.getMonth() + 1, "00")}-${leftPad(date.getDate(), "00")}_${leftPad(date.getHours(), "00")}-${leftPad(date.getMinutes(), "00")}-${leftPad(date.getSeconds(), "00")}`; +var getFileFromBlob = (blob2, filename, type = null, extension = null) => { + const file2 = typeof type === "string" ? blob2.slice(0, blob2.size, type) : blob2.slice(0, blob2.size, blob2.type); + file2.lastModifiedDate = new Date(); + if (blob2._relativePath) + file2._relativePath = blob2._relativePath; + if (!isString(filename)) { + filename = getDateString(); + } + if (filename && extension === null && getExtensionFromFilename(filename)) { + file2.name = filename; + } else { + extension = extension || guesstimateExtension(file2.type); + file2.name = filename + (extension ? "." + extension : ""); + } + return file2; +}; +var getBlobBuilder = () => { + return window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder; +}; +var createBlob = (arrayBuffer, mimeType) => { + const BB = getBlobBuilder(); + if (BB) { + const bb = new BB(); + bb.append(arrayBuffer); + return bb.getBlob(mimeType); + } + return new Blob([arrayBuffer], { + type: mimeType + }); +}; +var getBlobFromByteStringWithMimeType = (byteString, mimeType) => { + const ab = new ArrayBuffer(byteString.length); + const ia = new Uint8Array(ab); + for (let i = 0; i < byteString.length; i++) { + ia[i] = byteString.charCodeAt(i); + } + return createBlob(ab, mimeType); +}; +var getMimeTypeFromBase64DataURI = (dataURI) => { + return (/^data:(.+);/.exec(dataURI) || [])[1] || null; +}; +var getBase64DataFromBase64DataURI = (dataURI) => { + const data3 = dataURI.split(",")[1]; + return data3.replace(/\s/g, ""); +}; +var getByteStringFromBase64DataURI = (dataURI) => { + return atob(getBase64DataFromBase64DataURI(dataURI)); +}; +var getBlobFromBase64DataURI = (dataURI) => { + const mimeType = getMimeTypeFromBase64DataURI(dataURI); + const byteString = getByteStringFromBase64DataURI(dataURI); + return getBlobFromByteStringWithMimeType(byteString, mimeType); +}; +var getFileFromBase64DataURI = (dataURI, filename, extension) => { + return getFileFromBlob(getBlobFromBase64DataURI(dataURI), filename, null, extension); +}; +var getFileNameFromHeader = (header) => { + if (!/^content-disposition:/i.test(header)) + return null; + const matches2 = header.split(/filename=|filename\*=.+''/).splice(1).map((name2) => name2.trim().replace(/^["']|[;"']{0,2}$/g, "")).filter((name2) => name2.length); + return matches2.length ? decodeURI(matches2[matches2.length - 1]) : null; +}; +var getFileSizeFromHeader = (header) => { + if (/content-length:/i.test(header)) { + const size = header.match(/[0-9]+/)[0]; + return size ? parseInt(size, 10) : null; + } + return null; +}; +var getTranfserIdFromHeader = (header) => { + if (/x-content-transfer-id:/i.test(header)) { + const id = (header.split(":")[1] || "").trim(); + return id || null; + } + return null; +}; +var getFileInfoFromHeaders = (headers) => { + const info = { + source: null, + name: null, + size: null + }; + const rows = headers.split("\n"); + for (let header of rows) { + const name2 = getFileNameFromHeader(header); + if (name2) { + info.name = name2; + continue; + } + const size = getFileSizeFromHeader(header); + if (size) { + info.size = size; + continue; + } + const source = getTranfserIdFromHeader(header); + if (source) { + info.source = source; + continue; + } + } + return info; +}; +var createFileLoader = (fetchFn) => { + const state2 = { + source: null, + complete: false, + progress: 0, + size: null, + timestamp: null, + duration: 0, + request: null + }; + const getProgress = () => state2.progress; + const abort = () => { + if (state2.request && state2.request.abort) { + state2.request.abort(); + } + }; + const load = () => { + const source = state2.source; + api.fire("init", source); + if (source instanceof File) { + api.fire("load", source); + } else if (source instanceof Blob) { + api.fire("load", getFileFromBlob(source, source.name)); + } else if (isBase64DataURI(source)) { + api.fire("load", getFileFromBase64DataURI(source)); + } else { + loadURL(source); + } + }; + const loadURL = (url) => { + if (!fetchFn) { + api.fire("error", { + type: "error", + body: "Can't load URL", + code: 400 + }); + return; + } + state2.timestamp = Date.now(); + state2.request = fetchFn(url, (response) => { + state2.duration = Date.now() - state2.timestamp; + state2.complete = true; + if (response instanceof Blob) { + response = getFileFromBlob(response, response.name || getFilenameFromURL(url)); + } + api.fire("load", response instanceof Blob ? response : response ? response.body : null); + }, (error2) => { + api.fire("error", typeof error2 === "string" ? { + type: "error", + code: 0, + body: error2 + } : error2); + }, (computable, current, total) => { + if (total) { + state2.size = total; + } + state2.duration = Date.now() - state2.timestamp; + if (!computable) { + state2.progress = null; + return; + } + state2.progress = current / total; + api.fire("progress", state2.progress); + }, () => { + api.fire("abort"); + }, (response) => { + const fileinfo = getFileInfoFromHeaders(typeof response === "string" ? response : response.headers); + api.fire("meta", { + size: state2.size || fileinfo.size, + filename: fileinfo.name, + source: fileinfo.source + }); + }); + }; + const api = { + ...on(), + setSource: (source) => state2.source = source, + getProgress, + abort, + load + }; + return api; +}; +var isGet = (method) => /GET|HEAD/.test(method); +var sendRequest = (data3, url, options2) => { + const api = { + onheaders: () => { + }, + onprogress: () => { + }, + onload: () => { + }, + ontimeout: () => { + }, + onerror: () => { + }, + onabort: () => { + }, + abort: () => { + aborted = true; + xhr.abort(); + } + }; + let aborted = false; + let headersReceived = false; + options2 = { + method: "POST", + headers: {}, + withCredentials: false, + ...options2 + }; + url = encodeURI(url); + if (isGet(options2.method) && data3) { + url = `${url}${encodeURIComponent(typeof data3 === "string" ? data3 : JSON.stringify(data3))}`; + } + const xhr = new XMLHttpRequest(); + const process = isGet(options2.method) ? xhr : xhr.upload; + process.onprogress = (e2) => { + if (aborted) { + return; + } + api.onprogress(e2.lengthComputable, e2.loaded, e2.total); + }; + xhr.onreadystatechange = () => { + if (xhr.readyState < 2) { + return; + } + if (xhr.readyState === 4 && xhr.status === 0) { + return; + } + if (headersReceived) { + return; + } + headersReceived = true; + api.onheaders(xhr); + }; + xhr.onload = () => { + if (xhr.status >= 200 && xhr.status < 300) { + api.onload(xhr); + } else { + api.onerror(xhr); + } + }; + xhr.onerror = () => api.onerror(xhr); + xhr.onabort = () => { + aborted = true; + api.onabort(); + }; + xhr.ontimeout = () => api.ontimeout(xhr); + xhr.open(options2.method, url, true); + if (isInt(options2.timeout)) { + xhr.timeout = options2.timeout; + } + Object.keys(options2.headers).forEach((key) => { + const value = unescape(encodeURIComponent(options2.headers[key])); + xhr.setRequestHeader(key, value); + }); + if (options2.responseType) { + xhr.responseType = options2.responseType; + } + if (options2.withCredentials) { + xhr.withCredentials = true; + } + xhr.send(data3); + return api; +}; +var createResponse = (type, code, body, headers) => ({ + type, + code, + body, + headers +}); +var createTimeoutResponse = (cb) => (xhr) => { + cb(createResponse("error", 0, "Timeout", xhr.getAllResponseHeaders())); +}; +var hasQS = (str) => /\?/.test(str); +var buildURL = (...parts) => { + let url = ""; + parts.forEach((part) => { + url += hasQS(url) && hasQS(part) ? part.replace(/\?/, "&") : part; + }); + return url; +}; +var createFetchFunction = (apiUrl = "", action) => { + if (typeof action === "function") { + return action; + } + if (!action || !isString(action.url)) { + return null; + } + const onload = action.onload || ((res2) => res2); + const onerror = action.onerror || ((res2) => null); + return (url, load, error2, progress, abort, headers) => { + const request = sendRequest(url, buildURL(apiUrl, action.url), { + ...action, + responseType: "blob" + }); + request.onload = (xhr) => { + const headers2 = xhr.getAllResponseHeaders(); + const filename = getFileInfoFromHeaders(headers2).name || getFilenameFromURL(url); + load(createResponse("load", xhr.status, action.method === "HEAD" ? null : getFileFromBlob(onload(xhr.response), filename), headers2)); + }; + request.onerror = (xhr) => { + error2(createResponse("error", xhr.status, onerror(xhr.response) || xhr.statusText, xhr.getAllResponseHeaders())); + }; + request.onheaders = (xhr) => { + headers(createResponse("headers", xhr.status, null, xhr.getAllResponseHeaders())); + }; + request.ontimeout = createTimeoutResponse(error2); + request.onprogress = progress; + request.onabort = abort; + return request; + }; +}; +var ChunkStatus = { + QUEUED: 0, + COMPLETE: 1, + PROCESSING: 2, + ERROR: 3, + WAITING: 4 +}; +var processFileChunked = (apiUrl, action, name2, file2, metadata, load, error2, progress, abort, transfer, options2) => { + const chunks = []; + const {chunkTransferId, chunkServer, chunkSize, chunkRetryDelays} = options2; + const state2 = { + serverId: chunkTransferId, + aborted: false + }; + const ondata = action.ondata || ((fd) => fd); + const onload = action.onload || ((xhr, method) => method === "HEAD" ? xhr.getResponseHeader("Upload-Offset") : xhr.response); + const onerror = action.onerror || ((res2) => null); + const requestTransferId = (cb) => { + const formData = new FormData(); + if (isObject(metadata)) + formData.append(name2, JSON.stringify(metadata)); + const headers = typeof action.headers === "function" ? action.headers(file2, metadata) : { + ...action.headers, + "Upload-Length": file2.size + }; + const requestParams = { + ...action, + headers + }; + const request = sendRequest(ondata(formData), buildURL(apiUrl, action.url), requestParams); + request.onload = (xhr) => cb(onload(xhr, requestParams.method)); + request.onerror = (xhr) => error2(createResponse("error", xhr.status, onerror(xhr.response) || xhr.statusText, xhr.getAllResponseHeaders())); + request.ontimeout = createTimeoutResponse(error2); + }; + const requestTransferOffset = (cb) => { + const requestUrl = buildURL(apiUrl, chunkServer.url, state2.serverId); + const headers = typeof action.headers === "function" ? action.headers(state2.serverId) : { + ...action.headers + }; + const requestParams = { + headers, + method: "HEAD" + }; + const request = sendRequest(null, requestUrl, requestParams); + request.onload = (xhr) => cb(onload(xhr, requestParams.method)); + request.onerror = (xhr) => error2(createResponse("error", xhr.status, onerror(xhr.response) || xhr.statusText, xhr.getAllResponseHeaders())); + request.ontimeout = createTimeoutResponse(error2); + }; + const lastChunkIndex = Math.floor(file2.size / chunkSize); + for (let i = 0; i <= lastChunkIndex; i++) { + const offset2 = i * chunkSize; + const data3 = file2.slice(offset2, offset2 + chunkSize, "application/offset+octet-stream"); + chunks[i] = { + index: i, + size: data3.size, + offset: offset2, + data: data3, + file: file2, + progress: 0, + retries: [...chunkRetryDelays], + status: ChunkStatus.QUEUED, + error: null, + request: null, + timeout: null + }; + } + const completeProcessingChunks = () => load(state2.serverId); + const canProcessChunk = (chunk) => chunk.status === ChunkStatus.QUEUED || chunk.status === ChunkStatus.ERROR; + const processChunk = (chunk) => { + if (state2.aborted) + return; + chunk = chunk || chunks.find(canProcessChunk); + if (!chunk) { + if (chunks.every((chunk2) => chunk2.status === ChunkStatus.COMPLETE)) { + completeProcessingChunks(); + } + return; + } + chunk.status = ChunkStatus.PROCESSING; + chunk.progress = null; + const ondata2 = chunkServer.ondata || ((fd) => fd); + const onerror2 = chunkServer.onerror || ((res2) => null); + const requestUrl = buildURL(apiUrl, chunkServer.url, state2.serverId); + const headers = typeof chunkServer.headers === "function" ? chunkServer.headers(chunk) : { + ...chunkServer.headers, + "Content-Type": "application/offset+octet-stream", + "Upload-Offset": chunk.offset, + "Upload-Length": file2.size, + "Upload-Name": file2.name + }; + const request = chunk.request = sendRequest(ondata2(chunk.data), requestUrl, { + ...chunkServer, + headers + }); + request.onload = () => { + chunk.status = ChunkStatus.COMPLETE; + chunk.request = null; + processChunks(); + }; + request.onprogress = (lengthComputable, loaded, total) => { + chunk.progress = lengthComputable ? loaded : null; + updateTotalProgress(); + }; + request.onerror = (xhr) => { + chunk.status = ChunkStatus.ERROR; + chunk.request = null; + chunk.error = onerror2(xhr.response) || xhr.statusText; + if (!retryProcessChunk(chunk)) { + error2(createResponse("error", xhr.status, onerror2(xhr.response) || xhr.statusText, xhr.getAllResponseHeaders())); + } + }; + request.ontimeout = (xhr) => { + chunk.status = ChunkStatus.ERROR; + chunk.request = null; + if (!retryProcessChunk(chunk)) { + createTimeoutResponse(error2)(xhr); + } + }; + request.onabort = () => { + chunk.status = ChunkStatus.QUEUED; + chunk.request = null; + abort(); + }; + }; + const retryProcessChunk = (chunk) => { + if (chunk.retries.length === 0) + return false; + chunk.status = ChunkStatus.WAITING; + clearTimeout(chunk.timeout); + chunk.timeout = setTimeout(() => { + processChunk(chunk); + }, chunk.retries.shift()); + return true; + }; + const updateTotalProgress = () => { + const totalBytesTransfered = chunks.reduce((p2, chunk) => { + if (p2 === null || chunk.progress === null) + return null; + return p2 + chunk.progress; + }, 0); + if (totalBytesTransfered === null) + return progress(false, 0, 0); + const totalSize = chunks.reduce((total, chunk) => total + chunk.size, 0); + progress(true, totalBytesTransfered, totalSize); + }; + const processChunks = () => { + const totalProcessing = chunks.filter((chunk) => chunk.status === ChunkStatus.PROCESSING).length; + if (totalProcessing >= 1) + return; + processChunk(); + }; + const abortChunks = () => { + chunks.forEach((chunk) => { + clearTimeout(chunk.timeout); + if (chunk.request) { + chunk.request.abort(); + } + }); + }; + if (!state2.serverId) { + requestTransferId((serverId) => { + if (state2.aborted) + return; + transfer(serverId); + state2.serverId = serverId; + processChunks(); + }); + } else { + requestTransferOffset((offset2) => { + if (state2.aborted) + return; + chunks.filter((chunk) => chunk.offset < offset2).forEach((chunk) => { + chunk.status = ChunkStatus.COMPLETE; + chunk.progress = chunk.size; + }); + processChunks(); + }); + } + return { + abort: () => { + state2.aborted = true; + abortChunks(); + } + }; +}; +var createFileProcessorFunction = (apiUrl, action, name2, options2) => (file2, metadata, load, error2, progress, abort, transfer) => { + if (!file2) + return; + const canChunkUpload = options2.chunkUploads; + const shouldChunkUpload = canChunkUpload && file2.size > options2.chunkSize; + const willChunkUpload = canChunkUpload && (shouldChunkUpload || options2.chunkForce); + if (file2 instanceof Blob && willChunkUpload) + return processFileChunked(apiUrl, action, name2, file2, metadata, load, error2, progress, abort, transfer, options2); + const ondata = action.ondata || ((fd) => fd); + const onload = action.onload || ((res2) => res2); + const onerror = action.onerror || ((res2) => null); + const headers = typeof action.headers === "function" ? action.headers(file2, metadata) || {} : { + ...action.headers + }; + const requestParams = { + ...action, + headers + }; + var formData = new FormData(); + if (isObject(metadata)) { + formData.append(name2, JSON.stringify(metadata)); + } + (file2 instanceof Blob ? [{name: null, file: file2}] : file2).forEach((item2) => { + formData.append(name2, item2.file, item2.name === null ? item2.file.name : `${item2.name}${item2.file.name}`); + }); + const request = sendRequest(ondata(formData), buildURL(apiUrl, action.url), requestParams); + request.onload = (xhr) => { + load(createResponse("load", xhr.status, onload(xhr.response), xhr.getAllResponseHeaders())); + }; + request.onerror = (xhr) => { + error2(createResponse("error", xhr.status, onerror(xhr.response) || xhr.statusText, xhr.getAllResponseHeaders())); + }; + request.ontimeout = createTimeoutResponse(error2); + request.onprogress = progress; + request.onabort = abort; + return request; +}; +var createProcessorFunction = (apiUrl = "", action, name2, options2) => { + if (typeof action === "function") + return (...params) => action(name2, ...params, options2); + if (!action || !isString(action.url)) + return null; + return createFileProcessorFunction(apiUrl, action, name2, options2); +}; +var createRevertFunction = (apiUrl = "", action) => { + if (typeof action === "function") { + return action; + } + if (!action || !isString(action.url)) { + return (uniqueFileId, load) => load(); + } + const onload = action.onload || ((res2) => res2); + const onerror = action.onerror || ((res2) => null); + return (uniqueFileId, load, error2) => { + const request = sendRequest(uniqueFileId, apiUrl + action.url, action); + request.onload = (xhr) => { + load(createResponse("load", xhr.status, onload(xhr.response), xhr.getAllResponseHeaders())); + }; + request.onerror = (xhr) => { + error2(createResponse("error", xhr.status, onerror(xhr.response) || xhr.statusText, xhr.getAllResponseHeaders())); + }; + request.ontimeout = createTimeoutResponse(error2); + return request; + }; +}; +var getRandomNumber = (min3 = 0, max3 = 1) => min3 + Math.random() * (max3 - min3); +var createPerceivedPerformanceUpdater = (cb, duration = 1e3, offset2 = 0, tickMin = 25, tickMax = 250) => { + let timeout = null; + const start = Date.now(); + const tick = () => { + let runtime = Date.now() - start; + let delay = getRandomNumber(tickMin, tickMax); + if (runtime + delay > duration) { + delay = runtime + delay - duration; + } + let progress = runtime / duration; + if (progress >= 1 || document.hidden) { + cb(1); + return; + } + cb(progress); + timeout = setTimeout(tick, delay); + }; + if (duration > 0) + tick(); + return { + clear: () => { + clearTimeout(timeout); + } + }; +}; +var createFileProcessor = (processFn, options2) => { + const state2 = { + complete: false, + perceivedProgress: 0, + perceivedPerformanceUpdater: null, + progress: null, + timestamp: null, + perceivedDuration: 0, + duration: 0, + request: null, + response: null + }; + const {allowMinimumUploadDuration} = options2; + const process = (file2, metadata) => { + const progressFn = () => { + if (state2.duration === 0 || state2.progress === null) + return; + api.fire("progress", api.getProgress()); + }; + const completeFn = () => { + state2.complete = true; + api.fire("load-perceived", state2.response.body); + }; + api.fire("start"); + state2.timestamp = Date.now(); + state2.perceivedPerformanceUpdater = createPerceivedPerformanceUpdater((progress) => { + state2.perceivedProgress = progress; + state2.perceivedDuration = Date.now() - state2.timestamp; + progressFn(); + if (state2.response && state2.perceivedProgress === 1 && !state2.complete) { + completeFn(); + } + }, allowMinimumUploadDuration ? getRandomNumber(750, 1500) : 0); + state2.request = processFn(file2, metadata, (response) => { + state2.response = isObject(response) ? response : { + type: "load", + code: 200, + body: `${response}`, + headers: {} + }; + state2.duration = Date.now() - state2.timestamp; + state2.progress = 1; + api.fire("load", state2.response.body); + if (!allowMinimumUploadDuration || allowMinimumUploadDuration && state2.perceivedProgress === 1) { + completeFn(); + } + }, (error2) => { + state2.perceivedPerformanceUpdater.clear(); + api.fire("error", isObject(error2) ? error2 : { + type: "error", + code: 0, + body: `${error2}` + }); + }, (computable, current, total) => { + state2.duration = Date.now() - state2.timestamp; + state2.progress = computable ? current / total : null; + progressFn(); + }, () => { + state2.perceivedPerformanceUpdater.clear(); + api.fire("abort", state2.response ? state2.response.body : null); + }, (transferId) => { + api.fire("transfer", transferId); + }); + }; + const abort = () => { + if (!state2.request) + return; + state2.perceivedPerformanceUpdater.clear(); + if (state2.request.abort) + state2.request.abort(); + state2.complete = true; + }; + const reset = () => { + abort(); + state2.complete = false; + state2.perceivedProgress = 0; + state2.progress = 0; + state2.timestamp = null; + state2.perceivedDuration = 0; + state2.duration = 0; + state2.request = null; + state2.response = null; + }; + const getProgress = allowMinimumUploadDuration ? () => state2.progress ? Math.min(state2.progress, state2.perceivedProgress) : null : () => state2.progress || null; + const getDuration = allowMinimumUploadDuration ? () => Math.min(state2.duration, state2.perceivedDuration) : () => state2.duration; + const api = { + ...on(), + process, + abort, + getProgress, + getDuration, + reset + }; + return api; +}; +var getFilenameWithoutExtension = (name2) => name2.substring(0, name2.lastIndexOf(".")) || name2; +var createFileStub = (source) => { + let data3 = [source.name, source.size, source.type]; + if (source instanceof Blob || isBase64DataURI(source)) { + data3[0] = source.name || getDateString(); + } else if (isBase64DataURI(source)) { + data3[1] = source.length; + data3[2] = getMimeTypeFromBase64DataURI(source); + } else if (isString(source)) { + data3[0] = getFilenameFromURL(source); + data3[1] = 0; + data3[2] = "application/octet-stream"; + } + return { + name: data3[0], + size: data3[1], + type: data3[2] + }; +}; +var isFile = (value) => !!(value instanceof File || value instanceof Blob && value.name); +var deepCloneObject = (src) => { + if (!isObject(src)) + return src; + const target = isArray(src) ? [] : {}; + for (const key in src) { + if (!src.hasOwnProperty(key)) + continue; + const v = src[key]; + target[key] = v && isObject(v) ? deepCloneObject(v) : v; + } + return target; +}; +var createItem = (origin = null, serverFileReference = null, file2 = null) => { + const id = getUniqueId(); + const state2 = { + archived: false, + frozen: false, + released: false, + source: null, + file: file2, + serverFileReference, + transferId: null, + processingAborted: false, + status: serverFileReference ? ItemStatus.PROCESSING_COMPLETE : ItemStatus.INIT, + activeLoader: null, + activeProcessor: null + }; + let abortProcessingRequestComplete = null; + const metadata = {}; + const setStatus = (status) => state2.status = status; + const fire2 = (event, ...params) => { + if (state2.released || state2.frozen) + return; + api.fire(event, ...params); + }; + const getFileExtension = () => getExtensionFromFilename(state2.file.name); + const getFileType = () => state2.file.type; + const getFileSize = () => state2.file.size; + const getFile2 = () => state2.file; + const load = (source, loader, onload) => { + state2.source = source; + api.fireSync("init"); + if (state2.file) { + api.fireSync("load-skip"); + return; + } + state2.file = createFileStub(source); + loader.on("init", () => { + fire2("load-init"); + }); + loader.on("meta", (meta) => { + state2.file.size = meta.size; + state2.file.filename = meta.filename; + if (meta.source) { + origin = FileOrigin.LIMBO; + state2.serverFileReference = meta.source; + state2.status = ItemStatus.PROCESSING_COMPLETE; + } + fire2("load-meta"); + }); + loader.on("progress", (progress) => { + setStatus(ItemStatus.LOADING); + fire2("load-progress", progress); + }); + loader.on("error", (error2) => { + setStatus(ItemStatus.LOAD_ERROR); + fire2("load-request-error", error2); + }); + loader.on("abort", () => { + setStatus(ItemStatus.INIT); + fire2("load-abort"); + }); + loader.on("load", (file3) => { + state2.activeLoader = null; + const success = (result) => { + state2.file = isFile(result) ? result : state2.file; + if (origin === FileOrigin.LIMBO && state2.serverFileReference) { + setStatus(ItemStatus.PROCESSING_COMPLETE); + } else { + setStatus(ItemStatus.IDLE); + } + fire2("load"); + }; + const error2 = (result) => { + state2.file = file3; + fire2("load-meta"); + setStatus(ItemStatus.LOAD_ERROR); + fire2("load-file-error", result); + }; + if (state2.serverFileReference) { + success(file3); + return; + } + onload(file3, success, error2); + }); + loader.setSource(source); + state2.activeLoader = loader; + loader.load(); + }; + const retryLoad = () => { + if (!state2.activeLoader) { + return; + } + state2.activeLoader.load(); + }; + const abortLoad = () => { + if (state2.activeLoader) { + state2.activeLoader.abort(); + return; + } + setStatus(ItemStatus.INIT); + fire2("load-abort"); + }; + const process = (processor, onprocess) => { + if (state2.processingAborted) { + state2.processingAborted = false; + return; + } + setStatus(ItemStatus.PROCESSING); + abortProcessingRequestComplete = null; + if (!(state2.file instanceof Blob)) { + api.on("load", () => { + process(processor, onprocess); + }); + return; + } + processor.on("load", (serverFileReference2) => { + state2.transferId = null; + state2.serverFileReference = serverFileReference2; + }); + processor.on("transfer", (transferId) => { + state2.transferId = transferId; + }); + processor.on("load-perceived", (serverFileReference2) => { + state2.activeProcessor = null; + state2.transferId = null; + state2.serverFileReference = serverFileReference2; + setStatus(ItemStatus.PROCESSING_COMPLETE); + fire2("process-complete", serverFileReference2); + }); + processor.on("start", () => { + fire2("process-start"); + }); + processor.on("error", (error3) => { + state2.activeProcessor = null; + setStatus(ItemStatus.PROCESSING_ERROR); + fire2("process-error", error3); + }); + processor.on("abort", (serverFileReference2) => { + state2.activeProcessor = null; + state2.serverFileReference = serverFileReference2; + setStatus(ItemStatus.IDLE); + fire2("process-abort"); + if (abortProcessingRequestComplete) { + abortProcessingRequestComplete(); + } + }); + processor.on("progress", (progress) => { + fire2("process-progress", progress); + }); + const success = (file3) => { + if (state2.archived) + return; + processor.process(file3, {...metadata}); + }; + const error2 = console.error; + onprocess(state2.file, success, error2); + state2.activeProcessor = processor; + }; + const requestProcessing = () => { + state2.processingAborted = false; + setStatus(ItemStatus.PROCESSING_QUEUED); + }; + const abortProcessing = () => new Promise((resolve) => { + if (!state2.activeProcessor) { + state2.processingAborted = true; + setStatus(ItemStatus.IDLE); + fire2("process-abort"); + resolve(); + return; + } + abortProcessingRequestComplete = () => { + resolve(); + }; + state2.activeProcessor.abort(); + }); + const revert = (revertFileUpload, forceRevert) => new Promise((resolve, reject) => { + const serverTransferId = state2.serverFileReference !== null ? state2.serverFileReference : state2.transferId; + if (serverTransferId === null) { + resolve(); + return; + } + revertFileUpload(serverTransferId, () => { + state2.serverFileReference = null; + state2.transferId = null; + resolve(); + }, (error2) => { + if (!forceRevert) { + resolve(); + return; + } + setStatus(ItemStatus.PROCESSING_REVERT_ERROR); + fire2("process-revert-error"); + reject(error2); + }); + setStatus(ItemStatus.IDLE); + fire2("process-revert"); + }); + const setMetadata = (key, value, silent) => { + const keys = key.split("."); + const root2 = keys[0]; + const last = keys.pop(); + let data3 = metadata; + keys.forEach((key2) => data3 = data3[key2]); + if (JSON.stringify(data3[last]) === JSON.stringify(value)) + return; + data3[last] = value; + fire2("metadata-update", { + key: root2, + value: metadata[root2], + silent + }); + }; + const getMetadata = (key) => deepCloneObject(key ? metadata[key] : metadata); + const api = { + id: {get: () => id}, + origin: {get: () => origin, set: (value) => origin = value}, + serverId: {get: () => state2.serverFileReference}, + transferId: {get: () => state2.transferId}, + status: {get: () => state2.status}, + filename: {get: () => state2.file.name}, + filenameWithoutExtension: {get: () => getFilenameWithoutExtension(state2.file.name)}, + fileExtension: {get: getFileExtension}, + fileType: {get: getFileType}, + fileSize: {get: getFileSize}, + file: {get: getFile2}, + relativePath: {get: () => state2.file._relativePath}, + source: {get: () => state2.source}, + getMetadata, + setMetadata: (key, value, silent) => { + if (isObject(key)) { + const data3 = key; + Object.keys(data3).forEach((key2) => { + setMetadata(key2, data3[key2], value); + }); + return key; + } + setMetadata(key, value, silent); + return value; + }, + extend: (name2, handler) => itemAPI[name2] = handler, + abortLoad, + retryLoad, + requestProcessing, + abortProcessing, + load, + process, + revert, + ...on(), + freeze: () => state2.frozen = true, + release: () => state2.released = true, + released: {get: () => state2.released}, + archive: () => state2.archived = true, + archived: {get: () => state2.archived} + }; + const itemAPI = createObject(api); + return itemAPI; +}; +var getItemIndexByQuery = (items, query) => { + if (isEmpty(query)) { + return 0; + } + if (!isString(query)) { + return -1; + } + return items.findIndex((item2) => item2.id === query); +}; +var getItemById = (items, itemId) => { + const index2 = getItemIndexByQuery(items, itemId); + if (index2 < 0) { + return; + } + return items[index2] || null; +}; +var fetchBlob = (url, load, error2, progress, abort, headers) => { + const request = sendRequest(null, url, { + method: "GET", + responseType: "blob" + }); + request.onload = (xhr) => { + const headers2 = xhr.getAllResponseHeaders(); + const filename = getFileInfoFromHeaders(headers2).name || getFilenameFromURL(url); + load(createResponse("load", xhr.status, getFileFromBlob(xhr.response, filename), headers2)); + }; + request.onerror = (xhr) => { + error2(createResponse("error", xhr.status, xhr.statusText, xhr.getAllResponseHeaders())); + }; + request.onheaders = (xhr) => { + headers(createResponse("headers", xhr.status, null, xhr.getAllResponseHeaders())); + }; + request.ontimeout = createTimeoutResponse(error2); + request.onprogress = progress; + request.onabort = abort; + return request; +}; +var getDomainFromURL = (url) => { + if (url.indexOf("//") === 0) { + url = location.protocol + url; + } + return url.toLowerCase().replace("blob:", "").replace(/([a-z])?:\/\//, "$1").split("/")[0]; +}; +var isExternalURL = (url) => (url.indexOf(":") > -1 || url.indexOf("//") > -1) && getDomainFromURL(location.href) !== getDomainFromURL(url); +var dynamicLabel = (label) => (...params) => isFunction(label) ? label(...params) : label; +var isMockItem = (item2) => !isFile(item2.file); +var listUpdated = (dispatch2, state2) => { + clearTimeout(state2.listUpdateTimeout); + state2.listUpdateTimeout = setTimeout(() => { + dispatch2("DID_UPDATE_ITEMS", {items: getActiveItems(state2.items)}); + }, 0); +}; +var optionalPromise = (fn2, ...params) => new Promise((resolve) => { + if (!fn2) { + return resolve(true); + } + const result = fn2(...params); + if (result == null) { + return resolve(true); + } + if (typeof result === "boolean") { + return resolve(result); + } + if (typeof result.then === "function") { + result.then(resolve); + } +}); +var sortItems = (state2, compare) => { + state2.items.sort((a2, b) => compare(createItemAPI(a2), createItemAPI(b))); +}; +var getItemByQueryFromState = (state2, itemHandler) => ({ + query, + success = () => { + }, + failure = () => { + }, + ...options2 +} = {}) => { + const item2 = getItemByQuery(state2.items, query); + if (!item2) { + failure({ + error: createResponse("error", 0, "Item not found"), + file: null + }); + return; + } + itemHandler(item2, success, failure, options2 || {}); +}; +var actions = (dispatch2, query, state2) => ({ + ABORT_ALL: () => { + getActiveItems(state2.items).forEach((item2) => { + item2.freeze(); + item2.abortLoad(); + item2.abortProcessing(); + }); + }, + DID_SET_FILES: ({value = []}) => { + const files = value.map((file2) => ({ + source: file2.source ? file2.source : file2, + options: file2.options + })); + let activeItems = getActiveItems(state2.items); + activeItems.forEach((item2) => { + if (!files.find((file2) => file2.source === item2.source || file2.source === item2.file)) { + dispatch2("REMOVE_ITEM", {query: item2, remove: false}); + } + }); + activeItems = getActiveItems(state2.items); + files.forEach((file2, index2) => { + if (activeItems.find((item2) => item2.source === file2.source || item2.file === file2.source)) + return; + dispatch2("ADD_ITEM", { + ...file2, + interactionMethod: InteractionMethod.NONE, + index: index2 + }); + }); + }, + DID_UPDATE_ITEM_METADATA: ({id, action, change}) => { + if (change.silent) + return; + clearTimeout(state2.itemUpdateTimeout); + state2.itemUpdateTimeout = setTimeout(() => { + const item2 = getItemById(state2.items, id); + if (!query("IS_ASYNC")) { + applyFilterChain("SHOULD_PREPARE_OUTPUT", false, { + item: item2, + query, + action, + change + }).then((shouldPrepareOutput) => { + const beforePrepareFile = query("GET_BEFORE_PREPARE_FILE"); + if (beforePrepareFile) + shouldPrepareOutput = beforePrepareFile(item2, shouldPrepareOutput); + if (!shouldPrepareOutput) + return; + dispatch2("REQUEST_PREPARE_OUTPUT", { + query: id, + item: item2, + success: (file2) => { + dispatch2("DID_PREPARE_OUTPUT", {id, file: file2}); + } + }, true); + }); + return; + } + if (item2.origin === FileOrigin.LOCAL) { + dispatch2("DID_LOAD_ITEM", { + id: item2.id, + error: null, + serverFileReference: item2.source + }); + } + const upload = () => { + setTimeout(() => { + dispatch2("REQUEST_ITEM_PROCESSING", {query: id}); + }, 32); + }; + const revert = (doUpload) => { + item2.revert(createRevertFunction(state2.options.server.url, state2.options.server.revert), query("GET_FORCE_REVERT")).then(doUpload ? upload : () => { + }).catch(() => { + }); + }; + const abort = (doUpload) => { + item2.abortProcessing().then(doUpload ? upload : () => { + }); + }; + if (item2.status === ItemStatus.PROCESSING_COMPLETE) { + return revert(state2.options.instantUpload); + } + if (item2.status === ItemStatus.PROCESSING) { + return abort(state2.options.instantUpload); + } + if (state2.options.instantUpload) { + upload(); + } + }, 0); + }, + MOVE_ITEM: ({query: query2, index: index2}) => { + const item2 = getItemByQuery(state2.items, query2); + if (!item2) + return; + const currentIndex = state2.items.indexOf(item2); + index2 = limit(index2, 0, state2.items.length - 1); + if (currentIndex === index2) + return; + state2.items.splice(index2, 0, state2.items.splice(currentIndex, 1)[0]); + }, + SORT: ({compare}) => { + sortItems(state2, compare); + dispatch2("DID_SORT_ITEMS", { + items: query("GET_ACTIVE_ITEMS") + }); + }, + ADD_ITEMS: ({items, index: index2, interactionMethod, success = () => { + }, failure = () => { + }}) => { + let currentIndex = index2; + if (index2 === -1 || typeof index2 === "undefined") { + const insertLocation = query("GET_ITEM_INSERT_LOCATION"); + const totalItems = query("GET_TOTAL_ITEMS"); + currentIndex = insertLocation === "before" ? 0 : totalItems; + } + const ignoredFiles = query("GET_IGNORED_FILES"); + const isValidFile = (source) => isFile(source) ? !ignoredFiles.includes(source.name.toLowerCase()) : !isEmpty(source); + const validItems = items.filter(isValidFile); + const promises = validItems.map((source) => new Promise((resolve, reject) => { + dispatch2("ADD_ITEM", { + interactionMethod, + source: source.source || source, + success: resolve, + failure: reject, + index: currentIndex++, + options: source.options || {} + }); + })); + Promise.all(promises).then(success).catch(failure); + }, + ADD_ITEM: ({ + source, + index: index2 = -1, + interactionMethod, + success = () => { + }, + failure = () => { + }, + options: options2 = {} + }) => { + if (isEmpty(source)) { + failure({ + error: createResponse("error", 0, "No source"), + file: null + }); + return; + } + if (isFile(source) && state2.options.ignoredFiles.includes(source.name.toLowerCase())) { + return; + } + if (!hasRoomForItem(state2)) { + if (state2.options.allowMultiple || !state2.options.allowMultiple && !state2.options.allowReplace) { + const error2 = createResponse("warning", 0, "Max files"); + dispatch2("DID_THROW_MAX_FILES", { + source, + error: error2 + }); + failure({error: error2, file: null}); + return; + } + const item3 = getActiveItems(state2.items)[0]; + if (item3.status === ItemStatus.PROCESSING_COMPLETE || item3.status === ItemStatus.PROCESSING_REVERT_ERROR) { + const forceRevert = query("GET_FORCE_REVERT"); + item3.revert(createRevertFunction(state2.options.server.url, state2.options.server.revert), forceRevert).then(() => { + if (!forceRevert) + return; + dispatch2("ADD_ITEM", { + source, + index: index2, + interactionMethod, + success, + failure, + options: options2 + }); + }).catch(() => { + }); + if (forceRevert) + return; + } + dispatch2("REMOVE_ITEM", {query: item3.id}); + } + const origin = options2.type === "local" ? FileOrigin.LOCAL : options2.type === "limbo" ? FileOrigin.LIMBO : FileOrigin.INPUT; + const item2 = createItem(origin, origin === FileOrigin.INPUT ? null : source, options2.file); + Object.keys(options2.metadata || {}).forEach((key) => { + item2.setMetadata(key, options2.metadata[key]); + }); + applyFilters("DID_CREATE_ITEM", item2, {query, dispatch: dispatch2}); + const itemInsertLocation = query("GET_ITEM_INSERT_LOCATION"); + if (!state2.options.itemInsertLocationFreedom) { + index2 = itemInsertLocation === "before" ? -1 : state2.items.length; + } + insertItem(state2.items, item2, index2); + if (isFunction(itemInsertLocation) && source) { + sortItems(state2, itemInsertLocation); + } + const id = item2.id; + item2.on("init", () => { + dispatch2("DID_INIT_ITEM", {id}); + }); + item2.on("load-init", () => { + dispatch2("DID_START_ITEM_LOAD", {id}); + }); + item2.on("load-meta", () => { + dispatch2("DID_UPDATE_ITEM_META", {id}); + }); + item2.on("load-progress", (progress) => { + dispatch2("DID_UPDATE_ITEM_LOAD_PROGRESS", {id, progress}); + }); + item2.on("load-request-error", (error2) => { + const mainStatus = dynamicLabel(state2.options.labelFileLoadError)(error2); + if (error2.code >= 400 && error2.code < 500) { + dispatch2("DID_THROW_ITEM_INVALID", { + id, + error: error2, + status: { + main: mainStatus, + sub: `${error2.code} (${error2.body})` + } + }); + failure({error: error2, file: createItemAPI(item2)}); + return; + } + dispatch2("DID_THROW_ITEM_LOAD_ERROR", { + id, + error: error2, + status: { + main: mainStatus, + sub: state2.options.labelTapToRetry + } + }); + }); + item2.on("load-file-error", (error2) => { + dispatch2("DID_THROW_ITEM_INVALID", { + id, + error: error2.status, + status: error2.status + }); + failure({error: error2.status, file: createItemAPI(item2)}); + }); + item2.on("load-abort", () => { + dispatch2("REMOVE_ITEM", {query: id}); + }); + item2.on("load-skip", () => { + dispatch2("COMPLETE_LOAD_ITEM", { + query: id, + item: item2, + data: { + source, + success + } + }); + }); + item2.on("load", () => { + const handleAdd = (shouldAdd) => { + if (!shouldAdd) { + dispatch2("REMOVE_ITEM", { + query: id + }); + return; + } + item2.on("metadata-update", (change) => { + dispatch2("DID_UPDATE_ITEM_METADATA", {id, change}); + }); + applyFilterChain("SHOULD_PREPARE_OUTPUT", false, {item: item2, query}).then((shouldPrepareOutput) => { + const beforePrepareFile = query("GET_BEFORE_PREPARE_FILE"); + if (beforePrepareFile) + shouldPrepareOutput = beforePrepareFile(item2, shouldPrepareOutput); + const loadComplete = () => { + dispatch2("COMPLETE_LOAD_ITEM", { + query: id, + item: item2, + data: { + source, + success + } + }); + listUpdated(dispatch2, state2); + }; + if (shouldPrepareOutput) { + dispatch2("REQUEST_PREPARE_OUTPUT", { + query: id, + item: item2, + success: (file2) => { + dispatch2("DID_PREPARE_OUTPUT", {id, file: file2}); + loadComplete(); + } + }, true); + return; + } + loadComplete(); + }); + }; + applyFilterChain("DID_LOAD_ITEM", item2, {query, dispatch: dispatch2}).then(() => { + optionalPromise(query("GET_BEFORE_ADD_FILE"), createItemAPI(item2)).then(handleAdd); + }).catch((e2) => { + if (!e2 || !e2.error || !e2.status) + return handleAdd(false); + dispatch2("DID_THROW_ITEM_INVALID", { + id, + error: e2.error, + status: e2.status + }); + }); + }); + item2.on("process-start", () => { + dispatch2("DID_START_ITEM_PROCESSING", {id}); + }); + item2.on("process-progress", (progress) => { + dispatch2("DID_UPDATE_ITEM_PROCESS_PROGRESS", {id, progress}); + }); + item2.on("process-error", (error2) => { + dispatch2("DID_THROW_ITEM_PROCESSING_ERROR", { + id, + error: error2, + status: { + main: dynamicLabel(state2.options.labelFileProcessingError)(error2), + sub: state2.options.labelTapToRetry + } + }); + }); + item2.on("process-revert-error", (error2) => { + dispatch2("DID_THROW_ITEM_PROCESSING_REVERT_ERROR", { + id, + error: error2, + status: { + main: dynamicLabel(state2.options.labelFileProcessingRevertError)(error2), + sub: state2.options.labelTapToRetry + } + }); + }); + item2.on("process-complete", (serverFileReference) => { + dispatch2("DID_COMPLETE_ITEM_PROCESSING", { + id, + error: null, + serverFileReference + }); + dispatch2("DID_DEFINE_VALUE", {id, value: serverFileReference}); + }); + item2.on("process-abort", () => { + dispatch2("DID_ABORT_ITEM_PROCESSING", {id}); + }); + item2.on("process-revert", () => { + dispatch2("DID_REVERT_ITEM_PROCESSING", {id}); + dispatch2("DID_DEFINE_VALUE", {id, value: null}); + }); + dispatch2("DID_ADD_ITEM", {id, index: index2, interactionMethod}); + listUpdated(dispatch2, state2); + const {url, load, restore, fetch: fetch2} = state2.options.server || {}; + item2.load(source, createFileLoader(origin === FileOrigin.INPUT ? isString(source) && isExternalURL(source) ? fetch2 ? createFetchFunction(url, fetch2) : fetchBlob : fetchBlob : origin === FileOrigin.LIMBO ? createFetchFunction(url, restore) : createFetchFunction(url, load)), (file2, success2, error2) => { + applyFilterChain("LOAD_FILE", file2, {query}).then(success2).catch(error2); + }); + }, + REQUEST_PREPARE_OUTPUT: ({item: item2, success, failure = () => { + }}) => { + const err = { + error: createResponse("error", 0, "Item not found"), + file: null + }; + if (item2.archived) + return failure(err); + applyFilterChain("PREPARE_OUTPUT", item2.file, {query, item: item2}).then((result) => { + applyFilterChain("COMPLETE_PREPARE_OUTPUT", result, {query, item: item2}).then((result2) => { + if (item2.archived) + return failure(err); + success(result2); + }); + }); + }, + COMPLETE_LOAD_ITEM: ({item: item2, data: data3}) => { + const {success, source} = data3; + const itemInsertLocation = query("GET_ITEM_INSERT_LOCATION"); + if (isFunction(itemInsertLocation) && source) { + sortItems(state2, itemInsertLocation); + } + dispatch2("DID_LOAD_ITEM", { + id: item2.id, + error: null, + serverFileReference: item2.origin === FileOrigin.INPUT ? null : source + }); + success(createItemAPI(item2)); + if (item2.origin === FileOrigin.LOCAL) { + dispatch2("DID_LOAD_LOCAL_ITEM", {id: item2.id}); + return; + } + if (item2.origin === FileOrigin.LIMBO) { + dispatch2("DID_COMPLETE_ITEM_PROCESSING", { + id: item2.id, + error: null, + serverFileReference: source + }); + dispatch2("DID_DEFINE_VALUE", { + id: item2.id, + value: item2.serverId || source + }); + return; + } + if (query("IS_ASYNC") && state2.options.instantUpload) { + dispatch2("REQUEST_ITEM_PROCESSING", {query: item2.id}); + } + }, + RETRY_ITEM_LOAD: getItemByQueryFromState(state2, (item2) => { + item2.retryLoad(); + }), + REQUEST_ITEM_PREPARE: getItemByQueryFromState(state2, (item2, success, failure) => { + dispatch2("REQUEST_PREPARE_OUTPUT", { + query: item2.id, + item: item2, + success: (file2) => { + dispatch2("DID_PREPARE_OUTPUT", {id: item2.id, file: file2}); + success({ + file: item2, + output: file2 + }); + }, + failure + }, true); + }), + REQUEST_ITEM_PROCESSING: getItemByQueryFromState(state2, (item2, success, failure) => { + const itemCanBeQueuedForProcessing = item2.status === ItemStatus.IDLE || item2.status === ItemStatus.PROCESSING_ERROR; + if (!itemCanBeQueuedForProcessing) { + const processNow = () => dispatch2("REQUEST_ITEM_PROCESSING", {query: item2, success, failure}); + const process = () => document.hidden ? processNow() : setTimeout(processNow, 32); + if (item2.status === ItemStatus.PROCESSING_COMPLETE || item2.status === ItemStatus.PROCESSING_REVERT_ERROR) { + item2.revert(createRevertFunction(state2.options.server.url, state2.options.server.revert), query("GET_FORCE_REVERT")).then(process).catch(() => { + }); + } else if (item2.status === ItemStatus.PROCESSING) { + item2.abortProcessing().then(process); + } + return; + } + if (item2.status === ItemStatus.PROCESSING_QUEUED) + return; + item2.requestProcessing(); + dispatch2("DID_REQUEST_ITEM_PROCESSING", {id: item2.id}); + dispatch2("PROCESS_ITEM", {query: item2, success, failure}, true); + }), + PROCESS_ITEM: getItemByQueryFromState(state2, (item2, success, failure) => { + const maxParallelUploads = query("GET_MAX_PARALLEL_UPLOADS"); + const totalCurrentUploads = query("GET_ITEMS_BY_STATUS", ItemStatus.PROCESSING).length; + if (totalCurrentUploads === maxParallelUploads) { + state2.processingQueue.push({ + id: item2.id, + success, + failure + }); + return; + } + if (item2.status === ItemStatus.PROCESSING) + return; + const processNext = () => { + const queueEntry = state2.processingQueue.shift(); + if (!queueEntry) + return; + const {id, success: success2, failure: failure2} = queueEntry; + const itemReference = getItemByQuery(state2.items, id); + if (!itemReference || itemReference.archived) { + processNext(); + return; + } + dispatch2("PROCESS_ITEM", {query: id, success: success2, failure: failure2}, true); + }; + item2.onOnce("process-complete", () => { + success(createItemAPI(item2)); + processNext(); + const server = state2.options.server; + const instantUpload = state2.options.instantUpload; + if (instantUpload && item2.origin === FileOrigin.LOCAL && isFunction(server.remove)) { + const noop = () => { + }; + item2.origin = FileOrigin.LIMBO; + state2.options.server.remove(item2.source, noop, noop); + } + const allItemsProcessed = query("GET_ITEMS_BY_STATUS", ItemStatus.PROCESSING_COMPLETE).length === state2.items.length; + if (allItemsProcessed) { + dispatch2("DID_COMPLETE_ITEM_PROCESSING_ALL"); + } + }); + item2.onOnce("process-error", (error2) => { + failure({error: error2, file: createItemAPI(item2)}); + processNext(); + }); + const options2 = state2.options; + item2.process(createFileProcessor(createProcessorFunction(options2.server.url, options2.server.process, options2.name, { + chunkTransferId: item2.transferId, + chunkServer: options2.server.patch, + chunkUploads: options2.chunkUploads, + chunkForce: options2.chunkForce, + chunkSize: options2.chunkSize, + chunkRetryDelays: options2.chunkRetryDelays + }), { + allowMinimumUploadDuration: query("GET_ALLOW_MINIMUM_UPLOAD_DURATION") + }), (file2, success2, error2) => { + applyFilterChain("PREPARE_OUTPUT", file2, {query, item: item2}).then((file3) => { + dispatch2("DID_PREPARE_OUTPUT", {id: item2.id, file: file3}); + success2(file3); + }).catch(error2); + }); + }), + RETRY_ITEM_PROCESSING: getItemByQueryFromState(state2, (item2) => { + dispatch2("REQUEST_ITEM_PROCESSING", {query: item2}); + }), + REQUEST_REMOVE_ITEM: getItemByQueryFromState(state2, (item2) => { + optionalPromise(query("GET_BEFORE_REMOVE_FILE"), createItemAPI(item2)).then((shouldRemove) => { + if (!shouldRemove) { + return; + } + dispatch2("REMOVE_ITEM", {query: item2}); + }); + }), + RELEASE_ITEM: getItemByQueryFromState(state2, (item2) => { + item2.release(); + }), + REMOVE_ITEM: getItemByQueryFromState(state2, (item2, success, failure, options2) => { + const removeFromView = () => { + const id = item2.id; + getItemById(state2.items, id).archive(); + dispatch2("DID_REMOVE_ITEM", {error: null, id, item: item2}); + listUpdated(dispatch2, state2); + success(createItemAPI(item2)); + }; + const server = state2.options.server; + if (item2.origin === FileOrigin.LOCAL && server && isFunction(server.remove) && options2.remove !== false) { + dispatch2("DID_START_ITEM_REMOVE", {id: item2.id}); + server.remove(item2.source, () => removeFromView(), (status) => { + dispatch2("DID_THROW_ITEM_REMOVE_ERROR", { + id: item2.id, + error: createResponse("error", 0, status, null), + status: { + main: dynamicLabel(state2.options.labelFileRemoveError)(status), + sub: state2.options.labelTapToRetry + } + }); + }); + } else { + if (options2.revert && item2.origin !== FileOrigin.LOCAL && item2.serverId !== null || state2.options.chunkUploads && item2.file.size > state2.options.chunkSize || state2.options.chunkUploads && state2.options.chunkForce) { + item2.revert(createRevertFunction(state2.options.server.url, state2.options.server.revert), query("GET_FORCE_REVERT")); + } + removeFromView(); + } + }), + ABORT_ITEM_LOAD: getItemByQueryFromState(state2, (item2) => { + item2.abortLoad(); + }), + ABORT_ITEM_PROCESSING: getItemByQueryFromState(state2, (item2) => { + if (item2.serverId) { + dispatch2("REVERT_ITEM_PROCESSING", {id: item2.id}); + return; + } + item2.abortProcessing().then(() => { + const shouldRemove = state2.options.instantUpload; + if (shouldRemove) { + dispatch2("REMOVE_ITEM", {query: item2.id}); + } + }); + }), + REQUEST_REVERT_ITEM_PROCESSING: getItemByQueryFromState(state2, (item2) => { + if (!state2.options.instantUpload) { + dispatch2("REVERT_ITEM_PROCESSING", {query: item2}); + return; + } + const handleRevert2 = (shouldRevert) => { + if (!shouldRevert) + return; + dispatch2("REVERT_ITEM_PROCESSING", {query: item2}); + }; + const fn2 = query("GET_BEFORE_REMOVE_FILE"); + if (!fn2) { + return handleRevert2(true); + } + const requestRemoveResult = fn2(createItemAPI(item2)); + if (requestRemoveResult == null) { + return handleRevert2(true); + } + if (typeof requestRemoveResult === "boolean") { + return handleRevert2(requestRemoveResult); + } + if (typeof requestRemoveResult.then === "function") { + requestRemoveResult.then(handleRevert2); + } + }), + REVERT_ITEM_PROCESSING: getItemByQueryFromState(state2, (item2) => { + item2.revert(createRevertFunction(state2.options.server.url, state2.options.server.revert), query("GET_FORCE_REVERT")).then(() => { + const shouldRemove = state2.options.instantUpload || isMockItem(item2); + if (shouldRemove) { + dispatch2("REMOVE_ITEM", {query: item2.id}); + } + }).catch(() => { + }); + }), + SET_OPTIONS: ({options: options2}) => { + const optionKeys = Object.keys(options2); + const prioritizedOptionKeys = PrioritizedOptions.filter((key) => optionKeys.includes(key)); + const orderedOptionKeys = [ + ...prioritizedOptionKeys, + ...Object.keys(options2).filter((key) => !prioritizedOptionKeys.includes(key)) + ]; + orderedOptionKeys.forEach((key) => { + dispatch2(`SET_${fromCamels(key, "_").toUpperCase()}`, { + value: options2[key] + }); + }); + } +}); +var PrioritizedOptions = [ + "server" +]; +var formatFilename = (name2) => name2; +var createElement$1 = (tagName) => { + return document.createElement(tagName); +}; +var text = (node, value) => { + let textNode = node.childNodes[0]; + if (!textNode) { + textNode = document.createTextNode(value); + node.appendChild(textNode); + } else if (value !== textNode.nodeValue) { + textNode.nodeValue = value; + } +}; +var polarToCartesian = (centerX, centerY, radius, angleInDegrees) => { + const angleInRadians = (angleInDegrees % 360 - 90) * Math.PI / 180; + return { + x: centerX + radius * Math.cos(angleInRadians), + y: centerY + radius * Math.sin(angleInRadians) + }; +}; +var describeArc = (x, y, radius, startAngle, endAngle, arcSweep) => { + const start = polarToCartesian(x, y, radius, endAngle); + const end = polarToCartesian(x, y, radius, startAngle); + return ["M", start.x, start.y, "A", radius, radius, 0, arcSweep, 0, end.x, end.y].join(" "); +}; +var percentageArc = (x, y, radius, from, to) => { + let arcSweep = 1; + if (to > from && to - from <= 0.5) { + arcSweep = 0; + } + if (from > to && from - to >= 0.5) { + arcSweep = 0; + } + return describeArc(x, y, radius, Math.min(0.9999, from) * 360, Math.min(0.9999, to) * 360, arcSweep); +}; +var create = ({root: root2, props}) => { + props.spin = false; + props.progress = 0; + props.opacity = 0; + const svg4 = createElement("svg"); + root2.ref.path = createElement("path", { + "stroke-width": 2, + "stroke-linecap": "round" + }); + svg4.appendChild(root2.ref.path); + root2.ref.svg = svg4; + root2.appendChild(svg4); +}; +var write = ({root: root2, props}) => { + if (props.opacity === 0) { + return; + } + if (props.align) { + root2.element.dataset.align = props.align; + } + const ringStrokeWidth = parseInt(attr(root2.ref.path, "stroke-width"), 10); + const size = root2.rect.element.width * 0.5; + let ringFrom = 0; + let ringTo = 0; + if (props.spin) { + ringFrom = 0; + ringTo = 0.5; + } else { + ringFrom = 0; + ringTo = props.progress; + } + const coordinates = percentageArc(size, size, size - ringStrokeWidth, ringFrom, ringTo); + attr(root2.ref.path, "d", coordinates); + attr(root2.ref.path, "stroke-opacity", props.spin || props.progress > 0 ? 1 : 0); +}; +var progressIndicator = createView({ + tag: "div", + name: "progress-indicator", + ignoreRectUpdate: true, + ignoreRect: true, + create, + write, + mixins: { + apis: ["progress", "spin", "align"], + styles: ["opacity"], + animations: { + opacity: {type: "tween", duration: 500}, + progress: { + type: "spring", + stiffness: 0.95, + damping: 0.65, + mass: 10 + } + } + } +}); +var create$1 = ({root: root2, props}) => { + root2.element.innerHTML = (props.icon || "") + `${props.label}`; + props.isDisabled = false; +}; +var write$1 = ({root: root2, props}) => { + const {isDisabled} = props; + const shouldDisable = root2.query("GET_DISABLED") || props.opacity === 0; + if (shouldDisable && !isDisabled) { + props.isDisabled = true; + attr(root2.element, "disabled", "disabled"); + } else if (!shouldDisable && isDisabled) { + props.isDisabled = false; + root2.element.removeAttribute("disabled"); + } +}; +var fileActionButton = createView({ + tag: "button", + attributes: { + type: "button" + }, + ignoreRect: true, + ignoreRectUpdate: true, + name: "file-action-button", + mixins: { + apis: ["label"], + styles: ["translateX", "translateY", "scaleX", "scaleY", "opacity"], + animations: { + scaleX: "spring", + scaleY: "spring", + translateX: "spring", + translateY: "spring", + opacity: {type: "tween", duration: 250} + }, + listeners: true + }, + create: create$1, + write: write$1 +}); +var toNaturalFileSize = (bytes, decimalSeparator = ".", base = 1e3, options2 = {}) => { + const { + labelBytes = "bytes", + labelKilobytes = "KB", + labelMegabytes = "MB", + labelGigabytes = "GB" + } = options2; + bytes = Math.round(Math.abs(bytes)); + const KB = base; + const MB = base * base; + const GB = base * base * base; + if (bytes < KB) { + return `${bytes} ${labelBytes}`; + } + if (bytes < MB) { + return `${Math.floor(bytes / KB)} ${labelKilobytes}`; + } + if (bytes < GB) { + return `${removeDecimalsWhenZero(bytes / MB, 1, decimalSeparator)} ${labelMegabytes}`; + } + return `${removeDecimalsWhenZero(bytes / GB, 2, decimalSeparator)} ${labelGigabytes}`; +}; +var removeDecimalsWhenZero = (value, decimalCount, separator) => { + return value.toFixed(decimalCount).split(".").filter((part) => part !== "0").join(separator); +}; +var create$2 = ({root: root2, props}) => { + const fileName = createElement$1("span"); + fileName.className = "filepond--file-info-main"; + attr(fileName, "aria-hidden", "true"); + root2.appendChild(fileName); + root2.ref.fileName = fileName; + const fileSize = createElement$1("span"); + fileSize.className = "filepond--file-info-sub"; + root2.appendChild(fileSize); + root2.ref.fileSize = fileSize; + text(fileSize, root2.query("GET_LABEL_FILE_WAITING_FOR_SIZE")); + text(fileName, formatFilename(root2.query("GET_ITEM_NAME", props.id))); +}; +var updateFile = ({root: root2, props}) => { + text(root2.ref.fileSize, toNaturalFileSize(root2.query("GET_ITEM_SIZE", props.id), ".", root2.query("GET_FILE_SIZE_BASE"), root2.query("GET_FILE_SIZE_LABELS", root2.query))); + text(root2.ref.fileName, formatFilename(root2.query("GET_ITEM_NAME", props.id))); +}; +var updateFileSizeOnError = ({root: root2, props}) => { + if (isInt(root2.query("GET_ITEM_SIZE", props.id))) { + updateFile({root: root2, props}); + return; + } + text(root2.ref.fileSize, root2.query("GET_LABEL_FILE_SIZE_NOT_AVAILABLE")); +}; +var fileInfo = createView({ + name: "file-info", + ignoreRect: true, + ignoreRectUpdate: true, + write: createRoute({ + DID_LOAD_ITEM: updateFile, + DID_UPDATE_ITEM_META: updateFile, + DID_THROW_ITEM_LOAD_ERROR: updateFileSizeOnError, + DID_THROW_ITEM_INVALID: updateFileSizeOnError + }), + didCreateView: (root2) => { + applyFilters("CREATE_VIEW", {...root2, view: root2}); + }, + create: create$2, + mixins: { + styles: ["translateX", "translateY"], + animations: { + translateX: "spring", + translateY: "spring" + } + } +}); +var toPercentage = (value) => Math.round(value * 100); +var create$3 = ({root: root2}) => { + const main = createElement$1("span"); + main.className = "filepond--file-status-main"; + root2.appendChild(main); + root2.ref.main = main; + const sub = createElement$1("span"); + sub.className = "filepond--file-status-sub"; + root2.appendChild(sub); + root2.ref.sub = sub; + didSetItemLoadProgress({root: root2, action: {progress: null}}); +}; +var didSetItemLoadProgress = ({root: root2, action}) => { + const title = action.progress === null ? root2.query("GET_LABEL_FILE_LOADING") : `${root2.query("GET_LABEL_FILE_LOADING")} ${toPercentage(action.progress)}%`; + text(root2.ref.main, title); + text(root2.ref.sub, root2.query("GET_LABEL_TAP_TO_CANCEL")); +}; +var didSetItemProcessProgress = ({root: root2, action}) => { + const title = action.progress === null ? root2.query("GET_LABEL_FILE_PROCESSING") : `${root2.query("GET_LABEL_FILE_PROCESSING")} ${toPercentage(action.progress)}%`; + text(root2.ref.main, title); + text(root2.ref.sub, root2.query("GET_LABEL_TAP_TO_CANCEL")); +}; +var didRequestItemProcessing = ({root: root2}) => { + text(root2.ref.main, root2.query("GET_LABEL_FILE_PROCESSING")); + text(root2.ref.sub, root2.query("GET_LABEL_TAP_TO_CANCEL")); +}; +var didAbortItemProcessing = ({root: root2}) => { + text(root2.ref.main, root2.query("GET_LABEL_FILE_PROCESSING_ABORTED")); + text(root2.ref.sub, root2.query("GET_LABEL_TAP_TO_RETRY")); +}; +var didCompleteItemProcessing = ({root: root2}) => { + text(root2.ref.main, root2.query("GET_LABEL_FILE_PROCESSING_COMPLETE")); + text(root2.ref.sub, root2.query("GET_LABEL_TAP_TO_UNDO")); +}; +var clear = ({root: root2}) => { + text(root2.ref.main, ""); + text(root2.ref.sub, ""); +}; +var error = ({root: root2, action}) => { + text(root2.ref.main, action.status.main); + text(root2.ref.sub, action.status.sub); +}; +var fileStatus = createView({ + name: "file-status", + ignoreRect: true, + ignoreRectUpdate: true, + write: createRoute({ + DID_LOAD_ITEM: clear, + DID_REVERT_ITEM_PROCESSING: clear, + DID_REQUEST_ITEM_PROCESSING: didRequestItemProcessing, + DID_ABORT_ITEM_PROCESSING: didAbortItemProcessing, + DID_COMPLETE_ITEM_PROCESSING: didCompleteItemProcessing, + DID_UPDATE_ITEM_PROCESS_PROGRESS: didSetItemProcessProgress, + DID_UPDATE_ITEM_LOAD_PROGRESS: didSetItemLoadProgress, + DID_THROW_ITEM_LOAD_ERROR: error, + DID_THROW_ITEM_INVALID: error, + DID_THROW_ITEM_PROCESSING_ERROR: error, + DID_THROW_ITEM_PROCESSING_REVERT_ERROR: error, + DID_THROW_ITEM_REMOVE_ERROR: error + }), + didCreateView: (root2) => { + applyFilters("CREATE_VIEW", {...root2, view: root2}); + }, + create: create$3, + mixins: { + styles: ["translateX", "translateY", "opacity"], + animations: { + opacity: {type: "tween", duration: 250}, + translateX: "spring", + translateY: "spring" + } + } +}); +var Buttons = { + AbortItemLoad: { + label: "GET_LABEL_BUTTON_ABORT_ITEM_LOAD", + action: "ABORT_ITEM_LOAD", + className: "filepond--action-abort-item-load", + align: "LOAD_INDICATOR_POSITION" + }, + RetryItemLoad: { + label: "GET_LABEL_BUTTON_RETRY_ITEM_LOAD", + action: "RETRY_ITEM_LOAD", + icon: "GET_ICON_RETRY", + className: "filepond--action-retry-item-load", + align: "BUTTON_PROCESS_ITEM_POSITION" + }, + RemoveItem: { + label: "GET_LABEL_BUTTON_REMOVE_ITEM", + action: "REQUEST_REMOVE_ITEM", + icon: "GET_ICON_REMOVE", + className: "filepond--action-remove-item", + align: "BUTTON_REMOVE_ITEM_POSITION" + }, + ProcessItem: { + label: "GET_LABEL_BUTTON_PROCESS_ITEM", + action: "REQUEST_ITEM_PROCESSING", + icon: "GET_ICON_PROCESS", + className: "filepond--action-process-item", + align: "BUTTON_PROCESS_ITEM_POSITION" + }, + AbortItemProcessing: { + label: "GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING", + action: "ABORT_ITEM_PROCESSING", + className: "filepond--action-abort-item-processing", + align: "BUTTON_PROCESS_ITEM_POSITION" + }, + RetryItemProcessing: { + label: "GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING", + action: "RETRY_ITEM_PROCESSING", + icon: "GET_ICON_RETRY", + className: "filepond--action-retry-item-processing", + align: "BUTTON_PROCESS_ITEM_POSITION" + }, + RevertItemProcessing: { + label: "GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING", + action: "REQUEST_REVERT_ITEM_PROCESSING", + icon: "GET_ICON_UNDO", + className: "filepond--action-revert-item-processing", + align: "BUTTON_PROCESS_ITEM_POSITION" + } +}; +var ButtonKeys = []; +forin(Buttons, (key) => { + ButtonKeys.push(key); +}); +var calculateFileInfoOffset = (root2) => { + if (getRemoveIndicatorAligment(root2) === "right") + return 0; + const buttonRect = root2.ref.buttonRemoveItem.rect.element; + return buttonRect.hidden ? null : buttonRect.width + buttonRect.left; +}; +var calculateButtonWidth = (root2) => { + const buttonRect = root2.ref.buttonAbortItemLoad.rect.element; + return buttonRect.width; +}; +var calculateFileVerticalCenterOffset = (root2) => Math.floor(root2.ref.buttonRemoveItem.rect.element.height / 4); +var calculateFileHorizontalCenterOffset = (root2) => Math.floor(root2.ref.buttonRemoveItem.rect.element.left / 2); +var getLoadIndicatorAlignment = (root2) => root2.query("GET_STYLE_LOAD_INDICATOR_POSITION"); +var getProcessIndicatorAlignment = (root2) => root2.query("GET_STYLE_PROGRESS_INDICATOR_POSITION"); +var getRemoveIndicatorAligment = (root2) => root2.query("GET_STYLE_BUTTON_REMOVE_ITEM_POSITION"); +var DefaultStyle = { + buttonAbortItemLoad: {opacity: 0}, + buttonRetryItemLoad: {opacity: 0}, + buttonRemoveItem: {opacity: 0}, + buttonProcessItem: {opacity: 0}, + buttonAbortItemProcessing: {opacity: 0}, + buttonRetryItemProcessing: {opacity: 0}, + buttonRevertItemProcessing: {opacity: 0}, + loadProgressIndicator: {opacity: 0, align: getLoadIndicatorAlignment}, + processProgressIndicator: {opacity: 0, align: getProcessIndicatorAlignment}, + processingCompleteIndicator: {opacity: 0, scaleX: 0.75, scaleY: 0.75}, + info: {translateX: 0, translateY: 0, opacity: 0}, + status: {translateX: 0, translateY: 0, opacity: 0} +}; +var IdleStyle = { + buttonRemoveItem: {opacity: 1}, + buttonProcessItem: {opacity: 1}, + info: {translateX: calculateFileInfoOffset}, + status: {translateX: calculateFileInfoOffset} +}; +var ProcessingStyle = { + buttonAbortItemProcessing: {opacity: 1}, + processProgressIndicator: {opacity: 1}, + status: {opacity: 1} +}; +var StyleMap = { + DID_THROW_ITEM_INVALID: { + buttonRemoveItem: {opacity: 1}, + info: {translateX: calculateFileInfoOffset}, + status: {translateX: calculateFileInfoOffset, opacity: 1} + }, + DID_START_ITEM_LOAD: { + buttonAbortItemLoad: {opacity: 1}, + loadProgressIndicator: {opacity: 1}, + status: {opacity: 1} + }, + DID_THROW_ITEM_LOAD_ERROR: { + buttonRetryItemLoad: {opacity: 1}, + buttonRemoveItem: {opacity: 1}, + info: {translateX: calculateFileInfoOffset}, + status: {opacity: 1} + }, + DID_START_ITEM_REMOVE: { + processProgressIndicator: {opacity: 1, align: getRemoveIndicatorAligment}, + info: {translateX: calculateFileInfoOffset}, + status: {opacity: 0} + }, + DID_THROW_ITEM_REMOVE_ERROR: { + processProgressIndicator: {opacity: 0, align: getRemoveIndicatorAligment}, + buttonRemoveItem: {opacity: 1}, + info: {translateX: calculateFileInfoOffset}, + status: {opacity: 1, translateX: calculateFileInfoOffset} + }, + DID_LOAD_ITEM: IdleStyle, + DID_LOAD_LOCAL_ITEM: { + buttonRemoveItem: {opacity: 1}, + info: {translateX: calculateFileInfoOffset}, + status: {translateX: calculateFileInfoOffset} + }, + DID_START_ITEM_PROCESSING: ProcessingStyle, + DID_REQUEST_ITEM_PROCESSING: ProcessingStyle, + DID_UPDATE_ITEM_PROCESS_PROGRESS: ProcessingStyle, + DID_COMPLETE_ITEM_PROCESSING: { + buttonRevertItemProcessing: {opacity: 1}, + info: {opacity: 1}, + status: {opacity: 1} + }, + DID_THROW_ITEM_PROCESSING_ERROR: { + buttonRemoveItem: {opacity: 1}, + buttonRetryItemProcessing: {opacity: 1}, + status: {opacity: 1}, + info: {translateX: calculateFileInfoOffset} + }, + DID_THROW_ITEM_PROCESSING_REVERT_ERROR: { + buttonRevertItemProcessing: {opacity: 1}, + status: {opacity: 1}, + info: {opacity: 1} + }, + DID_ABORT_ITEM_PROCESSING: { + buttonRemoveItem: {opacity: 1}, + buttonProcessItem: {opacity: 1}, + info: {translateX: calculateFileInfoOffset}, + status: {opacity: 1} + }, + DID_REVERT_ITEM_PROCESSING: IdleStyle +}; +var processingCompleteIndicatorView = createView({ + create: ({root: root2}) => { + root2.element.innerHTML = root2.query("GET_ICON_DONE"); + }, + name: "processing-complete-indicator", + ignoreRect: true, + mixins: { + styles: ["scaleX", "scaleY", "opacity"], + animations: { + scaleX: "spring", + scaleY: "spring", + opacity: {type: "tween", duration: 250} + } + } +}); +var create$4 = ({root: root2, props}) => { + const LocalButtons = Object.keys(Buttons).reduce((prev, curr) => { + prev[curr] = {...Buttons[curr]}; + return prev; + }, {}); + const {id} = props; + const allowRevert = root2.query("GET_ALLOW_REVERT"); + const allowRemove = root2.query("GET_ALLOW_REMOVE"); + const allowProcess = root2.query("GET_ALLOW_PROCESS"); + const instantUpload = root2.query("GET_INSTANT_UPLOAD"); + const isAsync2 = root2.query("IS_ASYNC"); + const alignRemoveItemButton = root2.query("GET_STYLE_BUTTON_REMOVE_ITEM_ALIGN"); + let buttonFilter; + if (isAsync2) { + if (allowProcess && !allowRevert) { + buttonFilter = (key) => !/RevertItemProcessing/.test(key); + } else if (!allowProcess && allowRevert) { + buttonFilter = (key) => !/ProcessItem|RetryItemProcessing|AbortItemProcessing/.test(key); + } else if (!allowProcess && !allowRevert) { + buttonFilter = (key) => !/Process/.test(key); + } + } else { + buttonFilter = (key) => !/Process/.test(key); + } + const enabledButtons = buttonFilter ? ButtonKeys.filter(buttonFilter) : ButtonKeys.concat(); + if (instantUpload && allowRevert) { + LocalButtons["RevertItemProcessing"].label = "GET_LABEL_BUTTON_REMOVE_ITEM"; + LocalButtons["RevertItemProcessing"].icon = "GET_ICON_REMOVE"; + } + if (isAsync2 && !allowRevert) { + const map2 = StyleMap["DID_COMPLETE_ITEM_PROCESSING"]; + map2.info.translateX = calculateFileHorizontalCenterOffset; + map2.info.translateY = calculateFileVerticalCenterOffset; + map2.status.translateY = calculateFileVerticalCenterOffset; + map2.processingCompleteIndicator = {opacity: 1, scaleX: 1, scaleY: 1}; + } + if (isAsync2 && !allowProcess) { + [ + "DID_START_ITEM_PROCESSING", + "DID_REQUEST_ITEM_PROCESSING", + "DID_UPDATE_ITEM_PROCESS_PROGRESS", + "DID_THROW_ITEM_PROCESSING_ERROR" + ].forEach((key) => { + StyleMap[key].status.translateY = calculateFileVerticalCenterOffset; + }); + StyleMap["DID_THROW_ITEM_PROCESSING_ERROR"].status.translateX = calculateButtonWidth; + } + if (alignRemoveItemButton && allowRevert) { + LocalButtons["RevertItemProcessing"].align = "BUTTON_REMOVE_ITEM_POSITION"; + const map2 = StyleMap["DID_COMPLETE_ITEM_PROCESSING"]; + map2.info.translateX = calculateFileInfoOffset; + map2.status.translateY = calculateFileVerticalCenterOffset; + map2.processingCompleteIndicator = {opacity: 1, scaleX: 1, scaleY: 1}; + } + if (!allowRemove) { + LocalButtons["RemoveItem"].disabled = true; + } + forin(LocalButtons, (key, definition) => { + const buttonView = root2.createChildView(fileActionButton, { + label: root2.query(definition.label), + icon: root2.query(definition.icon), + opacity: 0 + }); + if (enabledButtons.includes(key)) { + root2.appendChildView(buttonView); + } + if (definition.disabled) { + buttonView.element.setAttribute("disabled", "disabled"); + buttonView.element.setAttribute("hidden", "hidden"); + } + buttonView.element.dataset.align = root2.query(`GET_STYLE_${definition.align}`); + buttonView.element.classList.add(definition.className); + buttonView.on("click", (e2) => { + e2.stopPropagation(); + if (definition.disabled) + return; + root2.dispatch(definition.action, {query: id}); + }); + root2.ref[`button${key}`] = buttonView; + }); + root2.ref.processingCompleteIndicator = root2.appendChildView(root2.createChildView(processingCompleteIndicatorView)); + root2.ref.processingCompleteIndicator.element.dataset.align = root2.query(`GET_STYLE_BUTTON_PROCESS_ITEM_POSITION`); + root2.ref.info = root2.appendChildView(root2.createChildView(fileInfo, {id})); + root2.ref.status = root2.appendChildView(root2.createChildView(fileStatus, {id})); + const loadIndicatorView = root2.appendChildView(root2.createChildView(progressIndicator, { + opacity: 0, + align: root2.query(`GET_STYLE_LOAD_INDICATOR_POSITION`) + })); + loadIndicatorView.element.classList.add("filepond--load-indicator"); + root2.ref.loadProgressIndicator = loadIndicatorView; + const progressIndicatorView = root2.appendChildView(root2.createChildView(progressIndicator, { + opacity: 0, + align: root2.query(`GET_STYLE_PROGRESS_INDICATOR_POSITION`) + })); + progressIndicatorView.element.classList.add("filepond--process-indicator"); + root2.ref.processProgressIndicator = progressIndicatorView; + root2.ref.activeStyles = []; +}; +var write$2 = ({root: root2, actions: actions2, props}) => { + route({root: root2, actions: actions2, props}); + let action = actions2.concat().filter((action2) => /^DID_/.test(action2.type)).reverse().find((action2) => StyleMap[action2.type]); + if (action) { + root2.ref.activeStyles = []; + const stylesToApply = StyleMap[action.type]; + forin(DefaultStyle, (name2, defaultStyles) => { + const control = root2.ref[name2]; + forin(defaultStyles, (key, defaultValue) => { + const value = stylesToApply[name2] && typeof stylesToApply[name2][key] !== "undefined" ? stylesToApply[name2][key] : defaultValue; + root2.ref.activeStyles.push({control, key, value}); + }); + }); + } + root2.ref.activeStyles.forEach(({control, key, value}) => { + control[key] = typeof value === "function" ? value(root2) : value; + }); +}; +var route = createRoute({ + DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING: ({root: root2, action}) => { + root2.ref.buttonAbortItemProcessing.label = action.value; + }, + DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD: ({root: root2, action}) => { + root2.ref.buttonAbortItemLoad.label = action.value; + }, + DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL: ({root: root2, action}) => { + root2.ref.buttonAbortItemRemoval.label = action.value; + }, + DID_REQUEST_ITEM_PROCESSING: ({root: root2}) => { + root2.ref.processProgressIndicator.spin = true; + root2.ref.processProgressIndicator.progress = 0; + }, + DID_START_ITEM_LOAD: ({root: root2}) => { + root2.ref.loadProgressIndicator.spin = true; + root2.ref.loadProgressIndicator.progress = 0; + }, + DID_START_ITEM_REMOVE: ({root: root2}) => { + root2.ref.processProgressIndicator.spin = true; + root2.ref.processProgressIndicator.progress = 0; + }, + DID_UPDATE_ITEM_LOAD_PROGRESS: ({root: root2, action}) => { + root2.ref.loadProgressIndicator.spin = false; + root2.ref.loadProgressIndicator.progress = action.progress; + }, + DID_UPDATE_ITEM_PROCESS_PROGRESS: ({root: root2, action}) => { + root2.ref.processProgressIndicator.spin = false; + root2.ref.processProgressIndicator.progress = action.progress; + } +}); +var file = createView({ + create: create$4, + write: write$2, + didCreateView: (root2) => { + applyFilters("CREATE_VIEW", {...root2, view: root2}); + }, + name: "file" +}); +var create$5 = ({root: root2, props}) => { + root2.ref.fileName = createElement$1("legend"); + root2.appendChild(root2.ref.fileName); + root2.ref.file = root2.appendChildView(root2.createChildView(file, {id: props.id})); + root2.ref.data = false; +}; +var didLoadItem = ({root: root2, props}) => { + text(root2.ref.fileName, formatFilename(root2.query("GET_ITEM_NAME", props.id))); +}; +var fileWrapper = createView({ + create: create$5, + ignoreRect: true, + write: createRoute({ + DID_LOAD_ITEM: didLoadItem + }), + didCreateView: (root2) => { + applyFilters("CREATE_VIEW", {...root2, view: root2}); + }, + tag: "fieldset", + name: "file-wrapper" +}); +var PANEL_SPRING_PROPS = {type: "spring", damping: 0.6, mass: 7}; +var create$6 = ({root: root2, props}) => { + [ + { + name: "top" + }, + { + name: "center", + props: { + translateY: null, + scaleY: null + }, + mixins: { + animations: { + scaleY: PANEL_SPRING_PROPS + }, + styles: ["translateY", "scaleY"] + } + }, + { + name: "bottom", + props: { + translateY: null + }, + mixins: { + animations: { + translateY: PANEL_SPRING_PROPS + }, + styles: ["translateY"] + } + } + ].forEach((section) => { + createSection(root2, section, props.name); + }); + root2.element.classList.add(`filepond--${props.name}`); + root2.ref.scalable = null; +}; +var createSection = (root2, section, className) => { + const viewConstructor = createView({ + name: `panel-${section.name} filepond--${className}`, + mixins: section.mixins, + ignoreRectUpdate: true + }); + const view = root2.createChildView(viewConstructor, section.props); + root2.ref[section.name] = root2.appendChildView(view); +}; +var write$3 = ({root: root2, props}) => { + if (root2.ref.scalable === null || props.scalable !== root2.ref.scalable) { + root2.ref.scalable = isBoolean(props.scalable) ? props.scalable : true; + root2.element.dataset.scalable = root2.ref.scalable; + } + if (!props.height) + return; + const topRect = root2.ref.top.rect.element; + const bottomRect = root2.ref.bottom.rect.element; + const height = Math.max(topRect.height + bottomRect.height, props.height); + root2.ref.center.translateY = topRect.height; + root2.ref.center.scaleY = (height - topRect.height - bottomRect.height) / 100; + root2.ref.bottom.translateY = height - bottomRect.height; +}; +var panel = createView({ + name: "panel", + read: ({root: root2, props}) => props.heightCurrent = root2.ref.bottom.translateY, + write: write$3, + create: create$6, + ignoreRect: true, + mixins: { + apis: ["height", "heightCurrent", "scalable"] + } +}); +var createDragHelper = (items) => { + const itemIds = items.map((item2) => item2.id); + let prevIndex = void 0; + return { + setIndex: (index2) => { + prevIndex = index2; + }, + getIndex: () => prevIndex, + getItemIndex: (item2) => itemIds.indexOf(item2.id) + }; +}; +var ITEM_TRANSLATE_SPRING = { + type: "spring", + stiffness: 0.75, + damping: 0.45, + mass: 10 +}; +var ITEM_SCALE_SPRING = "spring"; +var StateMap = { + DID_START_ITEM_LOAD: "busy", + DID_UPDATE_ITEM_LOAD_PROGRESS: "loading", + DID_THROW_ITEM_INVALID: "load-invalid", + DID_THROW_ITEM_LOAD_ERROR: "load-error", + DID_LOAD_ITEM: "idle", + DID_THROW_ITEM_REMOVE_ERROR: "remove-error", + DID_START_ITEM_REMOVE: "busy", + DID_START_ITEM_PROCESSING: "busy processing", + DID_REQUEST_ITEM_PROCESSING: "busy processing", + DID_UPDATE_ITEM_PROCESS_PROGRESS: "processing", + DID_COMPLETE_ITEM_PROCESSING: "processing-complete", + DID_THROW_ITEM_PROCESSING_ERROR: "processing-error", + DID_THROW_ITEM_PROCESSING_REVERT_ERROR: "processing-revert-error", + DID_ABORT_ITEM_PROCESSING: "cancelled", + DID_REVERT_ITEM_PROCESSING: "idle" +}; +var create$7 = ({root: root2, props}) => { + root2.ref.handleClick = (e2) => root2.dispatch("DID_ACTIVATE_ITEM", {id: props.id}); + root2.element.id = `filepond--item-${props.id}`; + root2.element.addEventListener("click", root2.ref.handleClick); + root2.ref.container = root2.appendChildView(root2.createChildView(fileWrapper, {id: props.id})); + root2.ref.panel = root2.appendChildView(root2.createChildView(panel, {name: "item-panel"})); + root2.ref.panel.height = null; + props.markedForRemoval = false; + if (!root2.query("GET_ALLOW_REORDER")) + return; + root2.element.dataset.dragState = "idle"; + const grab = (e2) => { + if (!e2.isPrimary) + return; + let removedActivateListener = false; + const origin = { + x: e2.pageX, + y: e2.pageY + }; + props.dragOrigin = { + x: root2.translateX, + y: root2.translateY + }; + props.dragCenter = { + x: e2.offsetX, + y: e2.offsetY + }; + const dragState = createDragHelper(root2.query("GET_ACTIVE_ITEMS")); + root2.dispatch("DID_GRAB_ITEM", {id: props.id, dragState}); + const drag = (e3) => { + if (!e3.isPrimary) + return; + e3.stopPropagation(); + e3.preventDefault(); + props.dragOffset = { + x: e3.pageX - origin.x, + y: e3.pageY - origin.y + }; + const dist = props.dragOffset.x * props.dragOffset.x + props.dragOffset.y * props.dragOffset.y; + if (dist > 16 && !removedActivateListener) { + removedActivateListener = true; + root2.element.removeEventListener("click", root2.ref.handleClick); + } + root2.dispatch("DID_DRAG_ITEM", {id: props.id, dragState}); + }; + const drop4 = (e3) => { + if (!e3.isPrimary) + return; + document.removeEventListener("pointermove", drag); + document.removeEventListener("pointerup", drop4); + props.dragOffset = { + x: e3.pageX - origin.x, + y: e3.pageY - origin.y + }; + root2.dispatch("DID_DROP_ITEM", {id: props.id, dragState}); + if (removedActivateListener) { + setTimeout(() => root2.element.addEventListener("click", root2.ref.handleClick), 0); + } + }; + document.addEventListener("pointermove", drag); + document.addEventListener("pointerup", drop4); + }; + root2.element.addEventListener("pointerdown", grab); +}; +var route$1 = createRoute({ + DID_UPDATE_PANEL_HEIGHT: ({root: root2, action}) => { + root2.height = action.height; + } +}); +var write$4 = createRoute({ + DID_GRAB_ITEM: ({root: root2, props}) => { + props.dragOrigin = { + x: root2.translateX, + y: root2.translateY + }; + }, + DID_DRAG_ITEM: ({root: root2}) => { + root2.element.dataset.dragState = "drag"; + }, + DID_DROP_ITEM: ({root: root2, props}) => { + props.dragOffset = null; + props.dragOrigin = null; + root2.element.dataset.dragState = "drop"; + } +}, ({root: root2, actions: actions2, props, shouldOptimize}) => { + if (root2.element.dataset.dragState === "drop") { + if (root2.scaleX <= 1) { + root2.element.dataset.dragState = "idle"; + } + } + let action = actions2.concat().filter((action2) => /^DID_/.test(action2.type)).reverse().find((action2) => StateMap[action2.type]); + if (action && action.type !== props.currentState) { + props.currentState = action.type; + root2.element.dataset.filepondItemState = StateMap[props.currentState] || ""; + } + const aspectRatio = root2.query("GET_ITEM_PANEL_ASPECT_RATIO") || root2.query("GET_PANEL_ASPECT_RATIO"); + if (!aspectRatio) { + route$1({root: root2, actions: actions2, props}); + if (!root2.height && root2.ref.container.rect.element.height > 0) { + root2.height = root2.ref.container.rect.element.height; + } + } else if (!shouldOptimize) { + root2.height = root2.rect.element.width * aspectRatio; + } + if (shouldOptimize) { + root2.ref.panel.height = null; + } + root2.ref.panel.height = root2.height; +}); +var item = createView({ + create: create$7, + write: write$4, + destroy: ({root: root2, props}) => { + root2.element.removeEventListener("click", root2.ref.handleClick); + root2.dispatch("RELEASE_ITEM", {query: props.id}); + }, + tag: "li", + name: "item", + mixins: { + apis: [ + "id", + "interactionMethod", + "markedForRemoval", + "spawnDate", + "dragCenter", + "dragOrigin", + "dragOffset" + ], + styles: ["translateX", "translateY", "scaleX", "scaleY", "opacity", "height"], + animations: { + scaleX: ITEM_SCALE_SPRING, + scaleY: ITEM_SCALE_SPRING, + translateX: ITEM_TRANSLATE_SPRING, + translateY: ITEM_TRANSLATE_SPRING, + opacity: {type: "tween", duration: 150} + } + } +}); +var getItemsPerRow = (horizontalSpace, itemWidth) => { + return Math.max(1, Math.floor((horizontalSpace + 1) / itemWidth)); +}; +var getItemIndexByPosition = (view, children, positionInView) => { + if (!positionInView) + return; + const horizontalSpace = view.rect.element.width; + const l = children.length; + let last = null; + if (l === 0 || positionInView.top < children[0].rect.element.top) + return -1; + const item2 = children[0]; + const itemRect = item2.rect.element; + const itemHorizontalMargin = itemRect.marginLeft + itemRect.marginRight; + const itemWidth = itemRect.width + itemHorizontalMargin; + const itemsPerRow = getItemsPerRow(horizontalSpace, itemWidth); + if (itemsPerRow === 1) { + for (let index2 = 0; index2 < l; index2++) { + const child = children[index2]; + const childMid = child.rect.outer.top + child.rect.element.height * 0.5; + if (positionInView.top < childMid) { + return index2; + } + } + return l; + } + const itemVerticalMargin = itemRect.marginTop + itemRect.marginBottom; + const itemHeight = itemRect.height + itemVerticalMargin; + for (let index2 = 0; index2 < l; index2++) { + const indexX = index2 % itemsPerRow; + const indexY = Math.floor(index2 / itemsPerRow); + const offsetX = indexX * itemWidth; + const offsetY = indexY * itemHeight; + const itemTop = offsetY - itemRect.marginTop; + const itemRight = offsetX + itemWidth; + const itemBottom = offsetY + itemHeight + itemRect.marginBottom; + if (positionInView.top < itemBottom && positionInView.top > itemTop) { + if (positionInView.left < itemRight) { + return index2; + } else if (index2 !== l - 1) { + last = index2; + } else { + last = null; + } + } + } + if (last !== null) { + return last; + } + return l; +}; +var dropAreaDimensions = { + height: 0, + width: 0, + get getHeight() { + return this.height; + }, + set setHeight(val) { + if (this.height === 0 || val === 0) + this.height = val; + }, + get getWidth() { + return this.width; + }, + set setWidth(val) { + if (this.width === 0 || val === 0) + this.width = val; + }, + setDimensions: function(height, width) { + if (this.height === 0 || height === 0) + this.height = height; + if (this.width === 0 || width === 0) + this.width = width; + } +}; +var create$8 = ({root: root2}) => { + attr(root2.element, "role", "list"); + root2.ref.lastItemSpanwDate = Date.now(); +}; +var addItemView = ({root: root2, action}) => { + const {id, index: index2, interactionMethod} = action; + root2.ref.addIndex = index2; + const now = Date.now(); + let spawnDate = now; + let opacity = 1; + if (interactionMethod !== InteractionMethod.NONE) { + opacity = 0; + const cooldown = root2.query("GET_ITEM_INSERT_INTERVAL"); + const dist = now - root2.ref.lastItemSpanwDate; + spawnDate = dist < cooldown ? now + (cooldown - dist) : now; + } + root2.ref.lastItemSpanwDate = spawnDate; + root2.appendChildView(root2.createChildView(item, { + spawnDate, + id, + opacity, + interactionMethod + }), index2); +}; +var moveItem = (item2, x, y, vx = 0, vy = 1) => { + if (item2.dragOffset) { + item2.translateX = null; + item2.translateY = null; + item2.translateX = item2.dragOrigin.x + item2.dragOffset.x; + item2.translateY = item2.dragOrigin.y + item2.dragOffset.y; + item2.scaleX = 1.025; + item2.scaleY = 1.025; + } else { + item2.translateX = x; + item2.translateY = y; + if (Date.now() > item2.spawnDate) { + if (item2.opacity === 0) { + introItemView(item2, x, y, vx, vy); + } + item2.scaleX = 1; + item2.scaleY = 1; + item2.opacity = 1; + } + } +}; +var introItemView = (item2, x, y, vx, vy) => { + if (item2.interactionMethod === InteractionMethod.NONE) { + item2.translateX = null; + item2.translateX = x; + item2.translateY = null; + item2.translateY = y; + } else if (item2.interactionMethod === InteractionMethod.DROP) { + item2.translateX = null; + item2.translateX = x - vx * 20; + item2.translateY = null; + item2.translateY = y - vy * 10; + item2.scaleX = 0.8; + item2.scaleY = 0.8; + } else if (item2.interactionMethod === InteractionMethod.BROWSE) { + item2.translateY = null; + item2.translateY = y - 30; + } else if (item2.interactionMethod === InteractionMethod.API) { + item2.translateX = null; + item2.translateX = x - 30; + item2.translateY = null; + } +}; +var removeItemView = ({root: root2, action}) => { + const {id} = action; + const view = root2.childViews.find((child) => child.id === id); + if (!view) { + return; + } + view.scaleX = 0.9; + view.scaleY = 0.9; + view.opacity = 0; + view.markedForRemoval = true; +}; +var getItemHeight = (child) => child.rect.element.height + child.rect.element.marginBottom * 0.5 + child.rect.element.marginTop * 0.5; +var getItemWidth = (child) => child.rect.element.width + child.rect.element.marginLeft * 0.5 + child.rect.element.marginRight * 0.5; +var dragItem = ({root: root2, action}) => { + const {id, dragState} = action; + const item2 = root2.query("GET_ITEM", {id}); + const view = root2.childViews.find((child) => child.id === id); + const numItems = root2.childViews.length; + const oldIndex2 = dragState.getItemIndex(item2); + if (!view) + return; + const dragPosition = { + x: view.dragOrigin.x + view.dragOffset.x + view.dragCenter.x, + y: view.dragOrigin.y + view.dragOffset.y + view.dragCenter.y + }; + const dragHeight = getItemHeight(view); + const dragWidth = getItemWidth(view); + let cols = Math.floor(root2.rect.outer.width / dragWidth); + if (cols > numItems) + cols = numItems; + const rows = Math.floor(numItems / cols + 1); + dropAreaDimensions.setHeight = dragHeight * rows; + dropAreaDimensions.setWidth = dragWidth * cols; + var location2 = { + y: Math.floor(dragPosition.y / dragHeight), + x: Math.floor(dragPosition.x / dragWidth), + getGridIndex: function getGridIndex() { + if (dragPosition.y > dropAreaDimensions.getHeight || dragPosition.y < 0 || dragPosition.x > dropAreaDimensions.getWidth || dragPosition.x < 0) + return oldIndex2; + return this.y * cols + this.x; + }, + getColIndex: function getColIndex() { + const items = root2.query("GET_ACTIVE_ITEMS"); + const visibleChildren = root2.childViews.filter((child) => child.rect.element.height); + const children = items.map((item3) => visibleChildren.find((childView) => childView.id === item3.id)); + const currentIndex2 = children.findIndex((child) => child === view); + const dragHeight2 = getItemHeight(view); + const l = children.length; + let idx = l; + let childHeight = 0; + let childBottom = 0; + let childTop = 0; + for (let i = 0; i < l; i++) { + childHeight = getItemHeight(children[i]); + childTop = childBottom; + childBottom = childTop + childHeight; + if (dragPosition.y < childBottom) { + if (currentIndex2 > i) { + if (dragPosition.y < childTop + dragHeight2) { + idx = i; + break; + } + continue; + } + idx = i; + break; + } + } + return idx; + } + }; + const index2 = cols > 1 ? location2.getGridIndex() : location2.getColIndex(); + root2.dispatch("MOVE_ITEM", {query: view, index: index2}); + const currentIndex = dragState.getIndex(); + if (currentIndex === void 0 || currentIndex !== index2) { + dragState.setIndex(index2); + if (currentIndex === void 0) + return; + root2.dispatch("DID_REORDER_ITEMS", { + items: root2.query("GET_ACTIVE_ITEMS"), + origin: oldIndex2, + target: index2 + }); + } +}; +var route$2 = createRoute({ + DID_ADD_ITEM: addItemView, + DID_REMOVE_ITEM: removeItemView, + DID_DRAG_ITEM: dragItem +}); +var write$5 = ({root: root2, props, actions: actions2, shouldOptimize}) => { + route$2({root: root2, props, actions: actions2}); + const {dragCoordinates} = props; + const horizontalSpace = root2.rect.element.width; + const visibleChildren = root2.childViews.filter((child) => child.rect.element.height); + const children = root2.query("GET_ACTIVE_ITEMS").map((item2) => visibleChildren.find((child) => child.id === item2.id)).filter((item2) => item2); + const dragIndex = dragCoordinates ? getItemIndexByPosition(root2, children, dragCoordinates) : null; + const addIndex = root2.ref.addIndex || null; + root2.ref.addIndex = null; + let dragIndexOffset = 0; + let removeIndexOffset = 0; + let addIndexOffset = 0; + if (children.length === 0) + return; + const childRect = children[0].rect.element; + const itemVerticalMargin = childRect.marginTop + childRect.marginBottom; + const itemHorizontalMargin = childRect.marginLeft + childRect.marginRight; + const itemWidth = childRect.width + itemHorizontalMargin; + const itemHeight = childRect.height + itemVerticalMargin; + const itemsPerRow = getItemsPerRow(horizontalSpace, itemWidth); + if (itemsPerRow === 1) { + let offsetY = 0; + let dragOffset = 0; + children.forEach((child, index2) => { + if (dragIndex) { + let dist = index2 - dragIndex; + if (dist === -2) { + dragOffset = -itemVerticalMargin * 0.25; + } else if (dist === -1) { + dragOffset = -itemVerticalMargin * 0.75; + } else if (dist === 0) { + dragOffset = itemVerticalMargin * 0.75; + } else if (dist === 1) { + dragOffset = itemVerticalMargin * 0.25; + } else { + dragOffset = 0; + } + } + if (shouldOptimize) { + child.translateX = null; + child.translateY = null; + } + if (!child.markedForRemoval) { + moveItem(child, 0, offsetY + dragOffset); + } + let itemHeight2 = child.rect.element.height + itemVerticalMargin; + let visualHeight = itemHeight2 * (child.markedForRemoval ? child.opacity : 1); + offsetY += visualHeight; + }); + } else { + let prevX = 0; + let prevY = 0; + children.forEach((child, index2) => { + if (index2 === dragIndex) { + dragIndexOffset = 1; + } + if (index2 === addIndex) { + addIndexOffset += 1; + } + if (child.markedForRemoval && child.opacity < 0.5) { + removeIndexOffset -= 1; + } + const visualIndex = index2 + addIndexOffset + dragIndexOffset + removeIndexOffset; + const indexX = visualIndex % itemsPerRow; + const indexY = Math.floor(visualIndex / itemsPerRow); + const offsetX = indexX * itemWidth; + const offsetY = indexY * itemHeight; + const vectorX = Math.sign(offsetX - prevX); + const vectorY = Math.sign(offsetY - prevY); + prevX = offsetX; + prevY = offsetY; + if (child.markedForRemoval) + return; + if (shouldOptimize) { + child.translateX = null; + child.translateY = null; + } + moveItem(child, offsetX, offsetY, vectorX, vectorY); + }); + } +}; +var filterSetItemActions = (child, actions2) => actions2.filter((action) => { + if (action.data && action.data.id) { + return child.id === action.data.id; + } + return true; +}); +var list = createView({ + create: create$8, + write: write$5, + tag: "ul", + name: "list", + didWriteView: ({root: root2}) => { + root2.childViews.filter((view) => view.markedForRemoval && view.opacity === 0 && view.resting).forEach((view) => { + view._destroy(); + root2.removeChildView(view); + }); + }, + filterFrameActionsForChild: filterSetItemActions, + mixins: { + apis: ["dragCoordinates"] + } +}); +var create$9 = ({root: root2, props}) => { + root2.ref.list = root2.appendChildView(root2.createChildView(list)); + props.dragCoordinates = null; + props.overflowing = false; +}; +var storeDragCoordinates = ({root: root2, props, action}) => { + if (!root2.query("GET_ITEM_INSERT_LOCATION_FREEDOM")) + return; + props.dragCoordinates = { + left: action.position.scopeLeft - root2.ref.list.rect.element.left, + top: action.position.scopeTop - (root2.rect.outer.top + root2.rect.element.marginTop + root2.rect.element.scrollTop) + }; +}; +var clearDragCoordinates = ({props}) => { + props.dragCoordinates = null; +}; +var route$3 = createRoute({ + DID_DRAG: storeDragCoordinates, + DID_END_DRAG: clearDragCoordinates +}); +var write$6 = ({root: root2, props, actions: actions2}) => { + route$3({root: root2, props, actions: actions2}); + root2.ref.list.dragCoordinates = props.dragCoordinates; + if (props.overflowing && !props.overflow) { + props.overflowing = false; + root2.element.dataset.state = ""; + root2.height = null; + } + if (props.overflow) { + const newHeight = Math.round(props.overflow); + if (newHeight !== root2.height) { + props.overflowing = true; + root2.element.dataset.state = "overflow"; + root2.height = newHeight; + } + } +}; +var listScroller = createView({ + create: create$9, + write: write$6, + name: "list-scroller", + mixins: { + apis: ["overflow", "dragCoordinates"], + styles: ["height", "translateY"], + animations: { + translateY: "spring" + } + } +}); +var attrToggle = (element, name2, state2, enabledValue = "") => { + if (state2) { + attr(element, name2, enabledValue); + } else { + element.removeAttribute(name2); + } +}; +var resetFileInput = (input) => { + if (!input || input.value === "") { + return; + } + try { + input.value = ""; + } catch (err) { + } + if (input.value) { + const form = createElement$1("form"); + const parentNode = input.parentNode; + const ref = input.nextSibling; + form.appendChild(input); + form.reset(); + if (ref) { + parentNode.insertBefore(input, ref); + } else { + parentNode.appendChild(input); + } + } +}; +var create$a = ({root: root2, props}) => { + root2.element.id = `filepond--browser-${props.id}`; + attr(root2.element, "name", root2.query("GET_NAME")); + attr(root2.element, "aria-controls", `filepond--assistant-${props.id}`); + attr(root2.element, "aria-labelledby", `filepond--drop-label-${props.id}`); + setAcceptedFileTypes({root: root2, action: {value: root2.query("GET_ACCEPTED_FILE_TYPES")}}); + toggleAllowMultiple({root: root2, action: {value: root2.query("GET_ALLOW_MULTIPLE")}}); + toggleDirectoryFilter({root: root2, action: {value: root2.query("GET_ALLOW_DIRECTORIES_ONLY")}}); + toggleDisabled({root: root2}); + toggleRequired({root: root2, action: {value: root2.query("GET_REQUIRED")}}); + setCaptureMethod({root: root2, action: {value: root2.query("GET_CAPTURE_METHOD")}}); + root2.ref.handleChange = (e2) => { + if (!root2.element.value) { + return; + } + const files = Array.from(root2.element.files).map((file2) => { + file2._relativePath = file2.webkitRelativePath; + return file2; + }); + setTimeout(() => { + props.onload(files); + resetFileInput(root2.element); + }, 250); + }; + root2.element.addEventListener("change", root2.ref.handleChange); +}; +var setAcceptedFileTypes = ({root: root2, action}) => { + if (!root2.query("GET_ALLOW_SYNC_ACCEPT_ATTRIBUTE")) + return; + attrToggle(root2.element, "accept", !!action.value, action.value ? action.value.join(",") : ""); +}; +var toggleAllowMultiple = ({root: root2, action}) => { + attrToggle(root2.element, "multiple", action.value); +}; +var toggleDirectoryFilter = ({root: root2, action}) => { + attrToggle(root2.element, "webkitdirectory", action.value); +}; +var toggleDisabled = ({root: root2}) => { + const isDisabled = root2.query("GET_DISABLED"); + const doesAllowBrowse = root2.query("GET_ALLOW_BROWSE"); + const disableField = isDisabled || !doesAllowBrowse; + attrToggle(root2.element, "disabled", disableField); +}; +var toggleRequired = ({root: root2, action}) => { + if (!action.value) { + attrToggle(root2.element, "required", false); + } else if (root2.query("GET_TOTAL_ITEMS") === 0) { + attrToggle(root2.element, "required", true); + } +}; +var setCaptureMethod = ({root: root2, action}) => { + attrToggle(root2.element, "capture", !!action.value, action.value === true ? "" : action.value); +}; +var updateRequiredStatus = ({root: root2}) => { + const {element} = root2; + if (root2.query("GET_TOTAL_ITEMS") > 0) { + attrToggle(element, "required", false); + attrToggle(element, "name", false); + } else { + attrToggle(element, "name", true, root2.query("GET_NAME")); + const shouldCheckValidity = root2.query("GET_CHECK_VALIDITY"); + if (shouldCheckValidity) { + element.setCustomValidity(""); + } + if (root2.query("GET_REQUIRED")) { + attrToggle(element, "required", true); + } + } +}; +var updateFieldValidityStatus = ({root: root2}) => { + const shouldCheckValidity = root2.query("GET_CHECK_VALIDITY"); + if (!shouldCheckValidity) + return; + root2.element.setCustomValidity(root2.query("GET_LABEL_INVALID_FIELD")); +}; +var browser = createView({ + tag: "input", + name: "browser", + ignoreRect: true, + ignoreRectUpdate: true, + attributes: { + type: "file" + }, + create: create$a, + destroy: ({root: root2}) => { + root2.element.removeEventListener("change", root2.ref.handleChange); + }, + write: createRoute({ + DID_LOAD_ITEM: updateRequiredStatus, + DID_REMOVE_ITEM: updateRequiredStatus, + DID_THROW_ITEM_INVALID: updateFieldValidityStatus, + DID_SET_DISABLED: toggleDisabled, + DID_SET_ALLOW_BROWSE: toggleDisabled, + DID_SET_ALLOW_DIRECTORIES_ONLY: toggleDirectoryFilter, + DID_SET_ALLOW_MULTIPLE: toggleAllowMultiple, + DID_SET_ACCEPTED_FILE_TYPES: setAcceptedFileTypes, + DID_SET_CAPTURE_METHOD: setCaptureMethod, + DID_SET_REQUIRED: toggleRequired + }) +}); +var Key = { + ENTER: 13, + SPACE: 32 +}; +var create$b = ({root: root2, props}) => { + const label = createElement$1("label"); + attr(label, "for", `filepond--browser-${props.id}`); + attr(label, "id", `filepond--drop-label-${props.id}`); + attr(label, "aria-hidden", "true"); + root2.ref.handleKeyDown = (e2) => { + const isActivationKey = e2.keyCode === Key.ENTER || e2.keyCode === Key.SPACE; + if (!isActivationKey) + return; + e2.preventDefault(); + root2.ref.label.click(); + }; + root2.ref.handleClick = (e2) => { + const isLabelClick = e2.target === label || label.contains(e2.target); + if (isLabelClick) + return; + root2.ref.label.click(); + }; + label.addEventListener("keydown", root2.ref.handleKeyDown); + root2.element.addEventListener("click", root2.ref.handleClick); + updateLabelValue(label, props.caption); + root2.appendChild(label); + root2.ref.label = label; +}; +var updateLabelValue = (label, value) => { + label.innerHTML = value; + const clickable = label.querySelector(".filepond--label-action"); + if (clickable) { + attr(clickable, "tabindex", "0"); + } + return value; +}; +var dropLabel = createView({ + name: "drop-label", + ignoreRect: true, + create: create$b, + destroy: ({root: root2}) => { + root2.ref.label.addEventListener("keydown", root2.ref.handleKeyDown); + root2.element.removeEventListener("click", root2.ref.handleClick); + }, + write: createRoute({ + DID_SET_LABEL_IDLE: ({root: root2, action}) => { + updateLabelValue(root2.ref.label, action.value); + } + }), + mixins: { + styles: ["opacity", "translateX", "translateY"], + animations: { + opacity: {type: "tween", duration: 150}, + translateX: "spring", + translateY: "spring" + } + } +}); +var blob = createView({ + name: "drip-blob", + ignoreRect: true, + mixins: { + styles: ["translateX", "translateY", "scaleX", "scaleY", "opacity"], + animations: { + scaleX: "spring", + scaleY: "spring", + translateX: "spring", + translateY: "spring", + opacity: {type: "tween", duration: 250} + } + } +}); +var addBlob = ({root: root2}) => { + const centerX = root2.rect.element.width * 0.5; + const centerY = root2.rect.element.height * 0.5; + root2.ref.blob = root2.appendChildView(root2.createChildView(blob, { + opacity: 0, + scaleX: 2.5, + scaleY: 2.5, + translateX: centerX, + translateY: centerY + })); +}; +var moveBlob = ({root: root2, action}) => { + if (!root2.ref.blob) { + addBlob({root: root2}); + return; + } + root2.ref.blob.translateX = action.position.scopeLeft; + root2.ref.blob.translateY = action.position.scopeTop; + root2.ref.blob.scaleX = 1; + root2.ref.blob.scaleY = 1; + root2.ref.blob.opacity = 1; +}; +var hideBlob = ({root: root2}) => { + if (!root2.ref.blob) { + return; + } + root2.ref.blob.opacity = 0; +}; +var explodeBlob = ({root: root2}) => { + if (!root2.ref.blob) { + return; + } + root2.ref.blob.scaleX = 2.5; + root2.ref.blob.scaleY = 2.5; + root2.ref.blob.opacity = 0; +}; +var write$7 = ({root: root2, props, actions: actions2}) => { + route$4({root: root2, props, actions: actions2}); + const {blob: blob2} = root2.ref; + if (actions2.length === 0 && blob2 && blob2.opacity === 0) { + root2.removeChildView(blob2); + root2.ref.blob = null; + } +}; +var route$4 = createRoute({ + DID_DRAG: moveBlob, + DID_DROP: explodeBlob, + DID_END_DRAG: hideBlob +}); +var drip = createView({ + ignoreRect: true, + ignoreRectUpdate: true, + name: "drip", + write: write$7 +}); +var setInputFiles = (element, files) => { + try { + const dataTransfer = new DataTransfer(); + files.forEach((file2) => { + if (file2 instanceof File) { + dataTransfer.items.add(file2); + } else { + dataTransfer.items.add(new File([file2], file2.name, { + type: file2.type + })); + } + }); + element.files = dataTransfer.files; + } catch (err) { + return false; + } + return true; +}; +var create$c = ({root: root2}) => root2.ref.fields = {}; +var getField = (root2, id) => root2.ref.fields[id]; +var syncFieldPositionsWithItems = (root2) => { + root2.query("GET_ACTIVE_ITEMS").forEach((item2) => { + if (!root2.ref.fields[item2.id]) + return; + root2.element.appendChild(root2.ref.fields[item2.id]); + }); +}; +var didReorderItems = ({root: root2}) => syncFieldPositionsWithItems(root2); +var didAddItem = ({root: root2, action}) => { + const fileItem = root2.query("GET_ITEM", action.id); + const isLocalFile = fileItem.origin === FileOrigin.LOCAL; + const shouldUseFileInput = !isLocalFile && root2.query("SHOULD_UPDATE_FILE_INPUT"); + const dataContainer = createElement$1("input"); + dataContainer.type = shouldUseFileInput ? "file" : "hidden"; + dataContainer.name = root2.query("GET_NAME"); + dataContainer.disabled = root2.query("GET_DISABLED"); + root2.ref.fields[action.id] = dataContainer; + syncFieldPositionsWithItems(root2); +}; +var didLoadItem$1 = ({root: root2, action}) => { + const field = getField(root2, action.id); + if (!field) + return; + if (action.serverFileReference !== null) + field.value = action.serverFileReference; + if (!root2.query("SHOULD_UPDATE_FILE_INPUT")) + return; + const fileItem = root2.query("GET_ITEM", action.id); + setInputFiles(field, [fileItem.file]); +}; +var didPrepareOutput = ({root: root2, action}) => { + if (!root2.query("SHOULD_UPDATE_FILE_INPUT")) + return; + setTimeout(() => { + const field = getField(root2, action.id); + if (!field) + return; + setInputFiles(field, [action.file]); + }, 0); +}; +var didSetDisabled = ({root: root2}) => { + root2.element.disabled = root2.query("GET_DISABLED"); +}; +var didRemoveItem = ({root: root2, action}) => { + const field = getField(root2, action.id); + if (!field) + return; + if (field.parentNode) + field.parentNode.removeChild(field); + delete root2.ref.fields[action.id]; +}; +var didDefineValue = ({root: root2, action}) => { + const field = getField(root2, action.id); + if (!field) + return; + if (action.value === null) { + field.removeAttribute("value"); + } else { + field.value = action.value; + } + syncFieldPositionsWithItems(root2); +}; +var write$8 = createRoute({ + DID_SET_DISABLED: didSetDisabled, + DID_ADD_ITEM: didAddItem, + DID_LOAD_ITEM: didLoadItem$1, + DID_REMOVE_ITEM: didRemoveItem, + DID_DEFINE_VALUE: didDefineValue, + DID_PREPARE_OUTPUT: didPrepareOutput, + DID_REORDER_ITEMS: didReorderItems, + DID_SORT_ITEMS: didReorderItems +}); +var data2 = createView({ + tag: "fieldset", + name: "data", + create: create$c, + write: write$8, + ignoreRect: true +}); +var getRootNode = (element) => "getRootNode" in element ? element.getRootNode() : document; +var images = ["jpg", "jpeg", "png", "gif", "bmp", "webp", "svg", "tiff"]; +var text$1 = ["css", "csv", "html", "txt"]; +var map = { + zip: "zip|compressed", + epub: "application/epub+zip" +}; +var guesstimateMimeType = (extension = "") => { + extension = extension.toLowerCase(); + if (images.includes(extension)) { + return "image/" + (extension === "jpg" ? "jpeg" : extension === "svg" ? "svg+xml" : extension); + } + if (text$1.includes(extension)) { + return "text/" + extension; + } + return map[extension] || ""; +}; +var requestDataTransferItems = (dataTransfer) => new Promise((resolve, reject) => { + const links = getLinks(dataTransfer); + if (links.length && !hasFiles(dataTransfer)) { + return resolve(links); + } + getFiles(dataTransfer).then(resolve); +}); +var hasFiles = (dataTransfer) => { + if (dataTransfer.files) + return dataTransfer.files.length > 0; + return false; +}; +var getFiles = (dataTransfer) => new Promise((resolve, reject) => { + const promisedFiles = (dataTransfer.items ? Array.from(dataTransfer.items) : []).filter((item2) => isFileSystemItem(item2)).map((item2) => getFilesFromItem(item2)); + if (!promisedFiles.length) { + resolve(dataTransfer.files ? Array.from(dataTransfer.files) : []); + return; + } + Promise.all(promisedFiles).then((returnedFileGroups) => { + const files = []; + returnedFileGroups.forEach((group) => { + files.push.apply(files, group); + }); + resolve(files.filter((file2) => file2).map((file2) => { + if (!file2._relativePath) + file2._relativePath = file2.webkitRelativePath; + return file2; + })); + }).catch(console.error); +}); +var isFileSystemItem = (item2) => { + if (isEntry(item2)) { + const entry = getAsEntry(item2); + if (entry) { + return entry.isFile || entry.isDirectory; + } + } + return item2.kind === "file"; +}; +var getFilesFromItem = (item2) => new Promise((resolve, reject) => { + if (isDirectoryEntry(item2)) { + getFilesInDirectory(getAsEntry(item2)).then(resolve).catch(reject); + return; + } + resolve([item2.getAsFile()]); +}); +var getFilesInDirectory = (entry) => new Promise((resolve, reject) => { + const files = []; + let dirCounter = 0; + let fileCounter = 0; + const resolveIfDone = () => { + if (fileCounter === 0 && dirCounter === 0) { + resolve(files); + } + }; + const readEntries = (dirEntry) => { + dirCounter++; + const directoryReader = dirEntry.createReader(); + const readBatch = () => { + directoryReader.readEntries((entries) => { + if (entries.length === 0) { + dirCounter--; + resolveIfDone(); + return; + } + entries.forEach((entry2) => { + if (entry2.isDirectory) { + readEntries(entry2); + } else { + fileCounter++; + entry2.file((file2) => { + const correctedFile = correctMissingFileType(file2); + if (entry2.fullPath) + correctedFile._relativePath = entry2.fullPath; + files.push(correctedFile); + fileCounter--; + resolveIfDone(); + }); + } + }); + readBatch(); + }, reject); + }; + readBatch(); + }; + readEntries(entry); +}); +var correctMissingFileType = (file2) => { + if (file2.type.length) + return file2; + const date = file2.lastModifiedDate; + const name2 = file2.name; + const type = guesstimateMimeType(getExtensionFromFilename(file2.name)); + if (!type.length) + return file2; + file2 = file2.slice(0, file2.size, type); + file2.name = name2; + file2.lastModifiedDate = date; + return file2; +}; +var isDirectoryEntry = (item2) => isEntry(item2) && (getAsEntry(item2) || {}).isDirectory; +var isEntry = (item2) => "webkitGetAsEntry" in item2; +var getAsEntry = (item2) => item2.webkitGetAsEntry(); +var getLinks = (dataTransfer) => { + let links = []; + try { + links = getLinksFromTransferMetaData(dataTransfer); + if (links.length) { + return links; + } + links = getLinksFromTransferURLData(dataTransfer); + } catch (e2) { + } + return links; +}; +var getLinksFromTransferURLData = (dataTransfer) => { + let data3 = dataTransfer.getData("url"); + if (typeof data3 === "string" && data3.length) { + return [data3]; + } + return []; +}; +var getLinksFromTransferMetaData = (dataTransfer) => { + let data3 = dataTransfer.getData("text/html"); + if (typeof data3 === "string" && data3.length) { + const matches2 = data3.match(/src\s*=\s*"(.+?)"/); + if (matches2) { + return [matches2[1]]; + } + } + return []; +}; +var dragNDropObservers = []; +var eventPosition = (e2) => ({ + pageLeft: e2.pageX, + pageTop: e2.pageY, + scopeLeft: e2.offsetX || e2.layerX, + scopeTop: e2.offsetY || e2.layerY +}); +var createDragNDropClient = (element, scopeToObserve, filterElement) => { + const observer2 = getDragNDropObserver(scopeToObserve); + const client = { + element, + filterElement, + state: null, + ondrop: () => { + }, + onenter: () => { + }, + ondrag: () => { + }, + onexit: () => { + }, + onload: () => { + }, + allowdrop: () => { + } + }; + client.destroy = observer2.addListener(client); + return client; +}; +var getDragNDropObserver = (element) => { + const observer2 = dragNDropObservers.find((item2) => item2.element === element); + if (observer2) { + return observer2; + } + const newObserver = createDragNDropObserver(element); + dragNDropObservers.push(newObserver); + return newObserver; +}; +var createDragNDropObserver = (element) => { + const clients = []; + const routes = { + dragenter, + dragover, + dragleave, + drop + }; + const handlers = {}; + forin(routes, (event, createHandler) => { + handlers[event] = createHandler(element, clients); + element.addEventListener(event, handlers[event], false); + }); + const observer2 = { + element, + addListener: (client) => { + clients.push(client); + return () => { + clients.splice(clients.indexOf(client), 1); + if (clients.length === 0) { + dragNDropObservers.splice(dragNDropObservers.indexOf(observer2), 1); + forin(routes, (event) => { + element.removeEventListener(event, handlers[event], false); + }); + } + }; + } + }; + return observer2; +}; +var elementFromPoint = (root2, point) => { + if (!("elementFromPoint" in root2)) { + root2 = document; + } + return root2.elementFromPoint(point.x, point.y); +}; +var isEventTarget = (e2, target) => { + const root2 = getRootNode(target); + const elementAtPosition = elementFromPoint(root2, { + x: e2.pageX - window.pageXOffset, + y: e2.pageY - window.pageYOffset + }); + return elementAtPosition === target || target.contains(elementAtPosition); +}; +var initialTarget = null; +var setDropEffect = (dataTransfer, effect) => { + try { + dataTransfer.dropEffect = effect; + } catch (e2) { + } +}; +var dragenter = (root2, clients) => (e2) => { + e2.preventDefault(); + initialTarget = e2.target; + clients.forEach((client) => { + const {element, onenter} = client; + if (isEventTarget(e2, element)) { + client.state = "enter"; + onenter(eventPosition(e2)); + } + }); +}; +var dragover = (root2, clients) => (e2) => { + e2.preventDefault(); + const dataTransfer = e2.dataTransfer; + requestDataTransferItems(dataTransfer).then((items) => { + let overDropTarget = false; + clients.some((client) => { + const {filterElement, element, onenter, onexit, ondrag, allowdrop} = client; + setDropEffect(dataTransfer, "copy"); + const allowsTransfer = allowdrop(items); + if (!allowsTransfer) { + setDropEffect(dataTransfer, "none"); + return; + } + if (isEventTarget(e2, element)) { + overDropTarget = true; + if (client.state === null) { + client.state = "enter"; + onenter(eventPosition(e2)); + return; + } + client.state = "over"; + if (filterElement && !allowsTransfer) { + setDropEffect(dataTransfer, "none"); + return; + } + ondrag(eventPosition(e2)); + } else { + if (filterElement && !overDropTarget) { + setDropEffect(dataTransfer, "none"); + } + if (client.state) { + client.state = null; + onexit(eventPosition(e2)); + } + } + }); + }); +}; +var drop = (root2, clients) => (e2) => { + e2.preventDefault(); + const dataTransfer = e2.dataTransfer; + requestDataTransferItems(dataTransfer).then((items) => { + clients.forEach((client) => { + const {filterElement, element, ondrop, onexit, allowdrop} = client; + client.state = null; + if (filterElement && !isEventTarget(e2, element)) + return; + if (!allowdrop(items)) + return onexit(eventPosition(e2)); + ondrop(eventPosition(e2), items); + }); + }); +}; +var dragleave = (root2, clients) => (e2) => { + if (initialTarget !== e2.target) { + return; + } + clients.forEach((client) => { + const {onexit} = client; + client.state = null; + onexit(eventPosition(e2)); + }); +}; +var createHopper = (scope, validateItems, options2) => { + scope.classList.add("filepond--hopper"); + const {catchesDropsOnPage, requiresDropOnElement, filterItems = (items) => items} = options2; + const client = createDragNDropClient(scope, catchesDropsOnPage ? document.documentElement : scope, requiresDropOnElement); + let lastState = ""; + let currentState = ""; + client.allowdrop = (items) => { + return validateItems(filterItems(items)); + }; + client.ondrop = (position, items) => { + const filteredItems = filterItems(items); + if (!validateItems(filteredItems)) { + api.ondragend(position); + return; + } + currentState = "drag-drop"; + api.onload(filteredItems, position); + }; + client.ondrag = (position) => { + api.ondrag(position); + }; + client.onenter = (position) => { + currentState = "drag-over"; + api.ondragstart(position); + }; + client.onexit = (position) => { + currentState = "drag-exit"; + api.ondragend(position); + }; + const api = { + updateHopperState: () => { + if (lastState !== currentState) { + scope.dataset.hopperState = currentState; + lastState = currentState; + } + }, + onload: () => { + }, + ondragstart: () => { + }, + ondrag: () => { + }, + ondragend: () => { + }, + destroy: () => { + client.destroy(); + } + }; + return api; +}; +var listening = false; +var listeners$1 = []; +var handlePaste = (e2) => { + const activeEl = document.activeElement; + if (activeEl && /textarea|input/i.test(activeEl.nodeName)) { + let inScope = false; + let element = activeEl; + while (element !== document.body) { + if (element.classList.contains("filepond--root")) { + inScope = true; + break; + } + element = element.parentNode; + } + if (!inScope) + return; + } + requestDataTransferItems(e2.clipboardData).then((files) => { + if (!files.length) { + return; + } + listeners$1.forEach((listener) => listener(files)); + }); +}; +var listen = (cb) => { + if (listeners$1.includes(cb)) { + return; + } + listeners$1.push(cb); + if (listening) { + return; + } + listening = true; + document.addEventListener("paste", handlePaste); +}; +var unlisten = (listener) => { + arrayRemove(listeners$1, listeners$1.indexOf(listener)); + if (listeners$1.length === 0) { + document.removeEventListener("paste", handlePaste); + listening = false; + } +}; +var createPaster = () => { + const cb = (files) => { + api.onload(files); + }; + const api = { + destroy: () => { + unlisten(cb); + }, + onload: () => { + } + }; + listen(cb); + return api; +}; +var create$d = ({root: root2, props}) => { + root2.element.id = `filepond--assistant-${props.id}`; + attr(root2.element, "role", "status"); + attr(root2.element, "aria-live", "polite"); + attr(root2.element, "aria-relevant", "additions"); +}; +var addFilesNotificationTimeout = null; +var notificationClearTimeout = null; +var filenames = []; +var assist = (root2, message) => { + root2.element.textContent = message; +}; +var clear$1 = (root2) => { + root2.element.textContent = ""; +}; +var listModified = (root2, filename, label) => { + const total = root2.query("GET_TOTAL_ITEMS"); + assist(root2, `${label} ${filename}, ${total} ${total === 1 ? root2.query("GET_LABEL_FILE_COUNT_SINGULAR") : root2.query("GET_LABEL_FILE_COUNT_PLURAL")}`); + clearTimeout(notificationClearTimeout); + notificationClearTimeout = setTimeout(() => { + clear$1(root2); + }, 1500); +}; +var isUsingFilePond = (root2) => root2.element.parentNode.contains(document.activeElement); +var itemAdded = ({root: root2, action}) => { + if (!isUsingFilePond(root2)) { + return; + } + root2.element.textContent = ""; + const item2 = root2.query("GET_ITEM", action.id); + filenames.push(item2.filename); + clearTimeout(addFilesNotificationTimeout); + addFilesNotificationTimeout = setTimeout(() => { + listModified(root2, filenames.join(", "), root2.query("GET_LABEL_FILE_ADDED")); + filenames.length = 0; + }, 750); +}; +var itemRemoved = ({root: root2, action}) => { + if (!isUsingFilePond(root2)) { + return; + } + const item2 = action.item; + listModified(root2, item2.filename, root2.query("GET_LABEL_FILE_REMOVED")); +}; +var itemProcessed = ({root: root2, action}) => { + const item2 = root2.query("GET_ITEM", action.id); + const filename = item2.filename; + const label = root2.query("GET_LABEL_FILE_PROCESSING_COMPLETE"); + assist(root2, `${filename} ${label}`); +}; +var itemProcessedUndo = ({root: root2, action}) => { + const item2 = root2.query("GET_ITEM", action.id); + const filename = item2.filename; + const label = root2.query("GET_LABEL_FILE_PROCESSING_ABORTED"); + assist(root2, `${filename} ${label}`); +}; +var itemError = ({root: root2, action}) => { + const item2 = root2.query("GET_ITEM", action.id); + const filename = item2.filename; + assist(root2, `${action.status.main} ${filename} ${action.status.sub}`); +}; +var assistant = createView({ + create: create$d, + ignoreRect: true, + ignoreRectUpdate: true, + write: createRoute({ + DID_LOAD_ITEM: itemAdded, + DID_REMOVE_ITEM: itemRemoved, + DID_COMPLETE_ITEM_PROCESSING: itemProcessed, + DID_ABORT_ITEM_PROCESSING: itemProcessedUndo, + DID_REVERT_ITEM_PROCESSING: itemProcessedUndo, + DID_THROW_ITEM_REMOVE_ERROR: itemError, + DID_THROW_ITEM_LOAD_ERROR: itemError, + DID_THROW_ITEM_INVALID: itemError, + DID_THROW_ITEM_PROCESSING_ERROR: itemError + }), + tag: "span", + name: "assistant" +}); +var toCamels = (string, separator = "-") => string.replace(new RegExp(`${separator}.`, "g"), (sub) => sub.charAt(1).toUpperCase()); +var debounce = (func, interval = 16, immidiateOnly = true) => { + let last = Date.now(); + let timeout = null; + return (...args) => { + clearTimeout(timeout); + const dist = Date.now() - last; + const fn2 = () => { + last = Date.now(); + func(...args); + }; + if (dist < interval) { + if (!immidiateOnly) { + timeout = setTimeout(fn2, interval - dist); + } + } else { + fn2(); + } + }; +}; +var MAX_FILES_LIMIT = 1e6; +var prevent = (e2) => e2.preventDefault(); +var create$e = ({root: root2, props}) => { + const id = root2.query("GET_ID"); + if (id) { + root2.element.id = id; + } + const className = root2.query("GET_CLASS_NAME"); + if (className) { + className.split(" ").filter((name2) => name2.length).forEach((name2) => { + root2.element.classList.add(name2); + }); + } + root2.ref.label = root2.appendChildView(root2.createChildView(dropLabel, { + ...props, + translateY: null, + caption: root2.query("GET_LABEL_IDLE") + })); + root2.ref.list = root2.appendChildView(root2.createChildView(listScroller, {translateY: null})); + root2.ref.panel = root2.appendChildView(root2.createChildView(panel, {name: "panel-root"})); + root2.ref.assistant = root2.appendChildView(root2.createChildView(assistant, {...props})); + root2.ref.data = root2.appendChildView(root2.createChildView(data2, {...props})); + root2.ref.measure = createElement$1("div"); + root2.ref.measure.style.height = "100%"; + root2.element.appendChild(root2.ref.measure); + root2.ref.bounds = null; + root2.query("GET_STYLES").filter((style) => !isEmpty(style.value)).map(({name: name2, value}) => { + root2.element.dataset[name2] = value; + }); + root2.ref.widthPrevious = null; + root2.ref.widthUpdated = debounce(() => { + root2.ref.updateHistory = []; + root2.dispatch("DID_RESIZE_ROOT"); + }, 250); + root2.ref.previousAspectRatio = null; + root2.ref.updateHistory = []; + const canHover = window.matchMedia("(pointer: fine) and (hover: hover)").matches; + const hasPointerEvents = "PointerEvent" in window; + if (root2.query("GET_ALLOW_REORDER") && hasPointerEvents && !canHover) { + root2.element.addEventListener("touchmove", prevent, {passive: false}); + root2.element.addEventListener("gesturestart", prevent); + } + const credits = root2.query("GET_CREDITS"); + const hasCredits = credits.length === 2; + if (hasCredits) { + const frag = document.createElement("a"); + frag.className = "filepond--credits"; + frag.setAttribute("aria-hidden", "true"); + frag.href = credits[0]; + frag.tabindex = -1; + frag.target = "_blank"; + frag.rel = "noopener noreferrer"; + frag.textContent = credits[1]; + root2.element.appendChild(frag); + root2.ref.credits = frag; + } +}; +var write$9 = ({root: root2, props, actions: actions2}) => { + route$5({root: root2, props, actions: actions2}); + actions2.filter((action) => /^DID_SET_STYLE_/.test(action.type)).filter((action) => !isEmpty(action.data.value)).map(({type, data: data3}) => { + const name2 = toCamels(type.substring(8).toLowerCase(), "_"); + root2.element.dataset[name2] = data3.value; + root2.invalidateLayout(); + }); + if (root2.rect.element.hidden) + return; + if (root2.rect.element.width !== root2.ref.widthPrevious) { + root2.ref.widthPrevious = root2.rect.element.width; + root2.ref.widthUpdated(); + } + let bounds = root2.ref.bounds; + if (!bounds) { + bounds = root2.ref.bounds = calculateRootBoundingBoxHeight(root2); + root2.element.removeChild(root2.ref.measure); + root2.ref.measure = null; + } + const {hopper, label, list: list2, panel: panel2} = root2.ref; + if (hopper) { + hopper.updateHopperState(); + } + const aspectRatio = root2.query("GET_PANEL_ASPECT_RATIO"); + const isMultiItem = root2.query("GET_ALLOW_MULTIPLE"); + const totalItems = root2.query("GET_TOTAL_ITEMS"); + const maxItems = isMultiItem ? root2.query("GET_MAX_FILES") || MAX_FILES_LIMIT : 1; + const atMaxCapacity = totalItems === maxItems; + const addAction = actions2.find((action) => action.type === "DID_ADD_ITEM"); + if (atMaxCapacity && addAction) { + const interactionMethod = addAction.data.interactionMethod; + label.opacity = 0; + if (isMultiItem) { + label.translateY = -40; + } else { + if (interactionMethod === InteractionMethod.API) { + label.translateX = 40; + } else if (interactionMethod === InteractionMethod.BROWSE) { + label.translateY = 40; + } else { + label.translateY = 30; + } + } + } else if (!atMaxCapacity) { + label.opacity = 1; + label.translateX = 0; + label.translateY = 0; + } + const listItemMargin = calculateListItemMargin(root2); + const listHeight = calculateListHeight(root2); + const labelHeight = label.rect.element.height; + const currentLabelHeight = !isMultiItem || atMaxCapacity ? 0 : labelHeight; + const listMarginTop = atMaxCapacity ? list2.rect.element.marginTop : 0; + const listMarginBottom = totalItems === 0 ? 0 : list2.rect.element.marginBottom; + const visualHeight = currentLabelHeight + listMarginTop + listHeight.visual + listMarginBottom; + const boundsHeight = currentLabelHeight + listMarginTop + listHeight.bounds + listMarginBottom; + list2.translateY = Math.max(0, currentLabelHeight - list2.rect.element.marginTop) - listItemMargin.top; + if (aspectRatio) { + const width = root2.rect.element.width; + const height = width * aspectRatio; + if (aspectRatio !== root2.ref.previousAspectRatio) { + root2.ref.previousAspectRatio = aspectRatio; + root2.ref.updateHistory = []; + } + const history = root2.ref.updateHistory; + history.push(width); + const MAX_BOUNCES = 2; + if (history.length > MAX_BOUNCES * 2) { + const l = history.length; + const bottom = l - 10; + let bounces = 0; + for (let i = l; i >= bottom; i--) { + if (history[i] === history[i - 2]) { + bounces++; + } + if (bounces >= MAX_BOUNCES) { + return; + } + } + } + panel2.scalable = false; + panel2.height = height; + const listAvailableHeight = height - currentLabelHeight - (listMarginBottom - listItemMargin.bottom) - (atMaxCapacity ? listMarginTop : 0); + if (listHeight.visual > listAvailableHeight) { + list2.overflow = listAvailableHeight; + } else { + list2.overflow = null; + } + root2.height = height; + } else if (bounds.fixedHeight) { + panel2.scalable = false; + const listAvailableHeight = bounds.fixedHeight - currentLabelHeight - (listMarginBottom - listItemMargin.bottom) - (atMaxCapacity ? listMarginTop : 0); + if (listHeight.visual > listAvailableHeight) { + list2.overflow = listAvailableHeight; + } else { + list2.overflow = null; + } + } else if (bounds.cappedHeight) { + const isCappedHeight = visualHeight >= bounds.cappedHeight; + const panelHeight = Math.min(bounds.cappedHeight, visualHeight); + panel2.scalable = true; + panel2.height = isCappedHeight ? panelHeight : panelHeight - listItemMargin.top - listItemMargin.bottom; + const listAvailableHeight = panelHeight - currentLabelHeight - (listMarginBottom - listItemMargin.bottom) - (atMaxCapacity ? listMarginTop : 0); + if (visualHeight > bounds.cappedHeight && listHeight.visual > listAvailableHeight) { + list2.overflow = listAvailableHeight; + } else { + list2.overflow = null; + } + root2.height = Math.min(bounds.cappedHeight, boundsHeight - listItemMargin.top - listItemMargin.bottom); + } else { + const itemMargin = totalItems > 0 ? listItemMargin.top + listItemMargin.bottom : 0; + panel2.scalable = true; + panel2.height = Math.max(labelHeight, visualHeight - itemMargin); + root2.height = Math.max(labelHeight, boundsHeight - itemMargin); + } + if (root2.ref.credits && panel2.heightCurrent) + root2.ref.credits.style.transform = `translateY(${panel2.heightCurrent}px)`; +}; +var calculateListItemMargin = (root2) => { + const item2 = root2.ref.list.childViews[0].childViews[0]; + return item2 ? { + top: item2.rect.element.marginTop, + bottom: item2.rect.element.marginBottom + } : { + top: 0, + bottom: 0 + }; +}; +var calculateListHeight = (root2) => { + let visual = 0; + let bounds = 0; + const scrollList = root2.ref.list; + const itemList = scrollList.childViews[0]; + const visibleChildren = itemList.childViews.filter((child) => child.rect.element.height); + const children = root2.query("GET_ACTIVE_ITEMS").map((item2) => visibleChildren.find((child) => child.id === item2.id)).filter((item2) => item2); + if (children.length === 0) + return {visual, bounds}; + const horizontalSpace = itemList.rect.element.width; + const dragIndex = getItemIndexByPosition(itemList, children, scrollList.dragCoordinates); + const childRect = children[0].rect.element; + const itemVerticalMargin = childRect.marginTop + childRect.marginBottom; + const itemHorizontalMargin = childRect.marginLeft + childRect.marginRight; + const itemWidth = childRect.width + itemHorizontalMargin; + const itemHeight = childRect.height + itemVerticalMargin; + const newItem = typeof dragIndex !== "undefined" && dragIndex >= 0 ? 1 : 0; + const removedItem = children.find((child) => child.markedForRemoval && child.opacity < 0.45) ? -1 : 0; + const verticalItemCount = children.length + newItem + removedItem; + const itemsPerRow = getItemsPerRow(horizontalSpace, itemWidth); + if (itemsPerRow === 1) { + children.forEach((item2) => { + const height = item2.rect.element.height + itemVerticalMargin; + bounds += height; + visual += height * item2.opacity; + }); + } else { + bounds = Math.ceil(verticalItemCount / itemsPerRow) * itemHeight; + visual = bounds; + } + return {visual, bounds}; +}; +var calculateRootBoundingBoxHeight = (root2) => { + const height = root2.ref.measureHeight || null; + const cappedHeight = parseInt(root2.style.maxHeight, 10) || null; + const fixedHeight = height === 0 ? null : height; + return { + cappedHeight, + fixedHeight + }; +}; +var exceedsMaxFiles = (root2, items) => { + const allowReplace = root2.query("GET_ALLOW_REPLACE"); + const allowMultiple = root2.query("GET_ALLOW_MULTIPLE"); + const totalItems = root2.query("GET_TOTAL_ITEMS"); + let maxItems = root2.query("GET_MAX_FILES"); + const totalBrowseItems = items.length; + if (!allowMultiple && totalBrowseItems > 1) { + root2.dispatch("DID_THROW_MAX_FILES", { + source: items, + error: createResponse("warning", 0, "Max files") + }); + return true; + } + maxItems = allowMultiple ? maxItems : 1; + if (!allowMultiple && allowReplace) { + return false; + } + const hasMaxItems = isInt(maxItems); + if (hasMaxItems && totalItems + totalBrowseItems > maxItems) { + root2.dispatch("DID_THROW_MAX_FILES", { + source: items, + error: createResponse("warning", 0, "Max files") + }); + return true; + } + return false; +}; +var getDragIndex = (list2, children, position) => { + const itemList = list2.childViews[0]; + return getItemIndexByPosition(itemList, children, { + left: position.scopeLeft - itemList.rect.element.left, + top: position.scopeTop - (list2.rect.outer.top + list2.rect.element.marginTop + list2.rect.element.scrollTop) + }); +}; +var toggleDrop = (root2) => { + const isAllowed = root2.query("GET_ALLOW_DROP"); + const isDisabled = root2.query("GET_DISABLED"); + const enabled = isAllowed && !isDisabled; + if (enabled && !root2.ref.hopper) { + const hopper = createHopper(root2.element, (items) => { + const beforeDropFile = root2.query("GET_BEFORE_DROP_FILE") || (() => true); + const dropValidation = root2.query("GET_DROP_VALIDATION"); + return dropValidation ? items.every((item2) => applyFilters("ALLOW_HOPPER_ITEM", item2, { + query: root2.query + }).every((result) => result === true) && beforeDropFile(item2)) : true; + }, { + filterItems: (items) => { + const ignoredFiles = root2.query("GET_IGNORED_FILES"); + return items.filter((item2) => { + if (isFile(item2)) { + return !ignoredFiles.includes(item2.name.toLowerCase()); + } + return true; + }); + }, + catchesDropsOnPage: root2.query("GET_DROP_ON_PAGE"), + requiresDropOnElement: root2.query("GET_DROP_ON_ELEMENT") + }); + hopper.onload = (items, position) => { + const list2 = root2.ref.list.childViews[0]; + const visibleChildren = list2.childViews.filter((child) => child.rect.element.height); + const children = root2.query("GET_ACTIVE_ITEMS").map((item2) => visibleChildren.find((child) => child.id === item2.id)).filter((item2) => item2); + applyFilterChain("ADD_ITEMS", items, {dispatch: root2.dispatch}).then((queue) => { + if (exceedsMaxFiles(root2, queue)) + return false; + root2.dispatch("ADD_ITEMS", { + items: queue, + index: getDragIndex(root2.ref.list, children, position), + interactionMethod: InteractionMethod.DROP + }); + }); + root2.dispatch("DID_DROP", {position}); + root2.dispatch("DID_END_DRAG", {position}); + }; + hopper.ondragstart = (position) => { + root2.dispatch("DID_START_DRAG", {position}); + }; + hopper.ondrag = debounce((position) => { + root2.dispatch("DID_DRAG", {position}); + }); + hopper.ondragend = (position) => { + root2.dispatch("DID_END_DRAG", {position}); + }; + root2.ref.hopper = hopper; + root2.ref.drip = root2.appendChildView(root2.createChildView(drip)); + } else if (!enabled && root2.ref.hopper) { + root2.ref.hopper.destroy(); + root2.ref.hopper = null; + root2.removeChildView(root2.ref.drip); + } +}; +var toggleBrowse = (root2, props) => { + const isAllowed = root2.query("GET_ALLOW_BROWSE"); + const isDisabled = root2.query("GET_DISABLED"); + const enabled = isAllowed && !isDisabled; + if (enabled && !root2.ref.browser) { + root2.ref.browser = root2.appendChildView(root2.createChildView(browser, { + ...props, + onload: (items) => { + applyFilterChain("ADD_ITEMS", items, { + dispatch: root2.dispatch + }).then((queue) => { + if (exceedsMaxFiles(root2, queue)) + return false; + root2.dispatch("ADD_ITEMS", { + items: queue, + index: -1, + interactionMethod: InteractionMethod.BROWSE + }); + }); + } + }), 0); + } else if (!enabled && root2.ref.browser) { + root2.removeChildView(root2.ref.browser); + root2.ref.browser = null; + } +}; +var togglePaste = (root2) => { + const isAllowed = root2.query("GET_ALLOW_PASTE"); + const isDisabled = root2.query("GET_DISABLED"); + const enabled = isAllowed && !isDisabled; + if (enabled && !root2.ref.paster) { + root2.ref.paster = createPaster(); + root2.ref.paster.onload = (items) => { + applyFilterChain("ADD_ITEMS", items, {dispatch: root2.dispatch}).then((queue) => { + if (exceedsMaxFiles(root2, queue)) + return false; + root2.dispatch("ADD_ITEMS", { + items: queue, + index: -1, + interactionMethod: InteractionMethod.PASTE + }); + }); + }; + } else if (!enabled && root2.ref.paster) { + root2.ref.paster.destroy(); + root2.ref.paster = null; + } +}; +var route$5 = createRoute({ + DID_SET_ALLOW_BROWSE: ({root: root2, props}) => { + toggleBrowse(root2, props); + }, + DID_SET_ALLOW_DROP: ({root: root2}) => { + toggleDrop(root2); + }, + DID_SET_ALLOW_PASTE: ({root: root2}) => { + togglePaste(root2); + }, + DID_SET_DISABLED: ({root: root2, props}) => { + toggleDrop(root2); + togglePaste(root2); + toggleBrowse(root2, props); + const isDisabled = root2.query("GET_DISABLED"); + if (isDisabled) { + root2.element.dataset.disabled = "disabled"; + } else { + root2.element.removeAttribute("data-disabled"); + } + } +}); +var root = createView({ + name: "root", + read: ({root: root2}) => { + if (root2.ref.measure) { + root2.ref.measureHeight = root2.ref.measure.offsetHeight; + } + }, + create: create$e, + write: write$9, + destroy: ({root: root2}) => { + if (root2.ref.paster) { + root2.ref.paster.destroy(); + } + if (root2.ref.hopper) { + root2.ref.hopper.destroy(); + } + root2.element.removeEventListener("touchmove", prevent); + root2.element.removeEventListener("gesturestart", prevent); + }, + mixins: { + styles: ["height"] + } +}); +var createApp = (initialOptions = {}) => { + let originalElement = null; + const defaultOptions2 = getOptions(); + const store = createStore(createInitialState(defaultOptions2), [queries, createOptionQueries(defaultOptions2)], [actions, createOptionActions(defaultOptions2)]); + store.dispatch("SET_OPTIONS", {options: initialOptions}); + const visibilityHandler = () => { + if (document.hidden) + return; + store.dispatch("KICK"); + }; + document.addEventListener("visibilitychange", visibilityHandler); + let resizeDoneTimer = null; + let isResizing = false; + let isResizingHorizontally = false; + let initialWindowWidth = null; + let currentWindowWidth = null; + const resizeHandler = () => { + if (!isResizing) { + isResizing = true; + } + clearTimeout(resizeDoneTimer); + resizeDoneTimer = setTimeout(() => { + isResizing = false; + initialWindowWidth = null; + currentWindowWidth = null; + if (isResizingHorizontally) { + isResizingHorizontally = false; + store.dispatch("DID_STOP_RESIZE"); + } + }, 500); + }; + window.addEventListener("resize", resizeHandler); + const view = root(store, {id: getUniqueId()}); + let isResting = false; + let isHidden = false; + const readWriteApi = { + _read: () => { + if (isResizing) { + currentWindowWidth = window.innerWidth; + if (!initialWindowWidth) { + initialWindowWidth = currentWindowWidth; + } + if (!isResizingHorizontally && currentWindowWidth !== initialWindowWidth) { + store.dispatch("DID_START_RESIZE"); + isResizingHorizontally = true; + } + } + if (isHidden && isResting) { + isResting = view.element.offsetParent === null; + } + if (isResting) + return; + view._read(); + isHidden = view.rect.element.hidden; + }, + _write: (ts) => { + const actions2 = store.processActionQueue().filter((action) => !/^SET_/.test(action.type)); + if (isResting && !actions2.length) + return; + routeActionsToEvents(actions2); + isResting = view._write(ts, actions2, isResizingHorizontally); + removeReleasedItems(store.query("GET_ITEMS")); + if (isResting) { + store.processDispatchQueue(); + } + } + }; + const createEvent = (name2) => (data3) => { + const event = { + type: name2 + }; + if (!data3) { + return event; + } + if (data3.hasOwnProperty("error")) { + event.error = data3.error ? {...data3.error} : null; + } + if (data3.status) { + event.status = {...data3.status}; + } + if (data3.file) { + event.output = data3.file; + } + if (data3.source) { + event.file = data3.source; + } else if (data3.item || data3.id) { + const item2 = data3.item ? data3.item : store.query("GET_ITEM", data3.id); + event.file = item2 ? createItemAPI(item2) : null; + } + if (data3.items) { + event.items = data3.items.map(createItemAPI); + } + if (/progress/.test(name2)) { + event.progress = data3.progress; + } + if (data3.hasOwnProperty("origin") && data3.hasOwnProperty("target")) { + event.origin = data3.origin; + event.target = data3.target; + } + return event; + }; + const eventRoutes = { + DID_DESTROY: createEvent("destroy"), + DID_INIT: createEvent("init"), + DID_THROW_MAX_FILES: createEvent("warning"), + DID_INIT_ITEM: createEvent("initfile"), + DID_START_ITEM_LOAD: createEvent("addfilestart"), + DID_UPDATE_ITEM_LOAD_PROGRESS: createEvent("addfileprogress"), + DID_LOAD_ITEM: createEvent("addfile"), + DID_THROW_ITEM_INVALID: [createEvent("error"), createEvent("addfile")], + DID_THROW_ITEM_LOAD_ERROR: [createEvent("error"), createEvent("addfile")], + DID_THROW_ITEM_REMOVE_ERROR: [createEvent("error"), createEvent("removefile")], + DID_PREPARE_OUTPUT: createEvent("preparefile"), + DID_START_ITEM_PROCESSING: createEvent("processfilestart"), + DID_UPDATE_ITEM_PROCESS_PROGRESS: createEvent("processfileprogress"), + DID_ABORT_ITEM_PROCESSING: createEvent("processfileabort"), + DID_COMPLETE_ITEM_PROCESSING: createEvent("processfile"), + DID_COMPLETE_ITEM_PROCESSING_ALL: createEvent("processfiles"), + DID_REVERT_ITEM_PROCESSING: createEvent("processfilerevert"), + DID_THROW_ITEM_PROCESSING_ERROR: [createEvent("error"), createEvent("processfile")], + DID_REMOVE_ITEM: createEvent("removefile"), + DID_UPDATE_ITEMS: createEvent("updatefiles"), + DID_ACTIVATE_ITEM: createEvent("activatefile"), + DID_REORDER_ITEMS: createEvent("reorderfiles") + }; + const exposeEvent = (event) => { + const detail = {pond: exports, ...event}; + delete detail.type; + view.element.dispatchEvent(new CustomEvent(`FilePond:${event.type}`, { + detail, + bubbles: true, + cancelable: true, + composed: true + })); + const params = []; + if (event.hasOwnProperty("error")) { + params.push(event.error); + } + if (event.hasOwnProperty("file")) { + params.push(event.file); + } + const filtered = ["type", "error", "file"]; + Object.keys(event).filter((key) => !filtered.includes(key)).forEach((key) => params.push(event[key])); + exports.fire(event.type, ...params); + const handler = store.query(`GET_ON${event.type.toUpperCase()}`); + if (handler) { + handler(...params); + } + }; + const routeActionsToEvents = (actions2) => { + if (!actions2.length) + return; + actions2.filter((action) => eventRoutes[action.type]).forEach((action) => { + const routes = eventRoutes[action.type]; + (Array.isArray(routes) ? routes : [routes]).forEach((route2) => { + if (action.type === "DID_INIT_ITEM") { + exposeEvent(route2(action.data)); + } else { + setTimeout(() => { + exposeEvent(route2(action.data)); + }, 0); + } + }); + }); + }; + const setOptions3 = (options2) => store.dispatch("SET_OPTIONS", {options: options2}); + const getFile2 = (query) => store.query("GET_ACTIVE_ITEM", query); + const prepareFile = (query) => new Promise((resolve, reject) => { + store.dispatch("REQUEST_ITEM_PREPARE", { + query, + success: (item2) => { + resolve(item2); + }, + failure: (error2) => { + reject(error2); + } + }); + }); + const addFile = (source, options2 = {}) => new Promise((resolve, reject) => { + addFiles([{source, options: options2}], {index: options2.index}).then((items) => resolve(items && items[0])).catch(reject); + }); + const isFilePondFile = (obj) => obj.file && obj.id; + const removeFile = (query, options2) => { + if (typeof query === "object" && !isFilePondFile(query) && !options2) { + options2 = query; + query = void 0; + } + store.dispatch("REMOVE_ITEM", {...options2, query}); + return store.query("GET_ACTIVE_ITEM", query) === null; + }; + const addFiles = (...args) => new Promise((resolve, reject) => { + const sources = []; + const options2 = {}; + if (isArray(args[0])) { + sources.push.apply(sources, args[0]); + Object.assign(options2, args[1] || {}); + } else { + const lastArgument = args[args.length - 1]; + if (typeof lastArgument === "object" && !(lastArgument instanceof Blob)) { + Object.assign(options2, args.pop()); + } + sources.push(...args); + } + store.dispatch("ADD_ITEMS", { + items: sources, + index: options2.index, + interactionMethod: InteractionMethod.API, + success: resolve, + failure: reject + }); + }); + const getFiles2 = () => store.query("GET_ACTIVE_ITEMS"); + const processFile = (query) => new Promise((resolve, reject) => { + store.dispatch("REQUEST_ITEM_PROCESSING", { + query, + success: (item2) => { + resolve(item2); + }, + failure: (error2) => { + reject(error2); + } + }); + }); + const prepareFiles = (...args) => { + const queries2 = Array.isArray(args[0]) ? args[0] : args; + const items = queries2.length ? queries2 : getFiles2(); + return Promise.all(items.map(prepareFile)); + }; + const processFiles = (...args) => { + const queries2 = Array.isArray(args[0]) ? args[0] : args; + if (!queries2.length) { + const files = getFiles2().filter((item2) => !(item2.status === ItemStatus.IDLE && item2.origin === FileOrigin.LOCAL) && item2.status !== ItemStatus.PROCESSING && item2.status !== ItemStatus.PROCESSING_COMPLETE && item2.status !== ItemStatus.PROCESSING_REVERT_ERROR); + return Promise.all(files.map(processFile)); + } + return Promise.all(queries2.map(processFile)); + }; + const removeFiles = (...args) => { + const queries2 = Array.isArray(args[0]) ? args[0] : args; + let options2; + if (typeof queries2[queries2.length - 1] === "object") { + options2 = queries2.pop(); + } else if (Array.isArray(args[0])) { + options2 = args[1]; + } + const files = getFiles2(); + if (!queries2.length) + return Promise.all(files.map((file2) => removeFile(file2, options2))); + const mappedQueries = queries2.map((query) => isNumber(query) ? files[query] ? files[query].id : null : query).filter((query) => query); + return mappedQueries.map((q) => removeFile(q, options2)); + }; + const exports = { + ...on(), + ...readWriteApi, + ...createOptionAPI(store, defaultOptions2), + setOptions: setOptions3, + addFile, + addFiles, + getFile: getFile2, + processFile, + prepareFile, + removeFile, + moveFile: (query, index2) => store.dispatch("MOVE_ITEM", {query, index: index2}), + getFiles: getFiles2, + processFiles, + removeFiles, + prepareFiles, + sort: (compare) => store.dispatch("SORT", {compare}), + browse: () => { + var input = view.element.querySelector("input[type=file]"); + if (input) { + input.click(); + } + }, + destroy: () => { + exports.fire("destroy", view.element); + store.dispatch("ABORT_ALL"); + view._destroy(); + window.removeEventListener("resize", resizeHandler); + document.removeEventListener("visibilitychange", visibilityHandler); + store.dispatch("DID_DESTROY"); + }, + insertBefore: (element) => insertBefore(view.element, element), + insertAfter: (element) => insertAfter(view.element, element), + appendTo: (element) => element.appendChild(view.element), + replaceElement: (element) => { + insertBefore(view.element, element); + element.parentNode.removeChild(element); + originalElement = element; + }, + restoreElement: () => { + if (!originalElement) { + return; + } + insertAfter(originalElement, view.element); + view.element.parentNode.removeChild(view.element); + originalElement = null; + }, + isAttachedTo: (element) => view.element === element || originalElement === element, + element: { + get: () => view.element + }, + status: { + get: () => store.query("GET_STATUS") + } + }; + store.dispatch("DID_INIT"); + return createObject(exports); +}; +var createAppObject = (customOptions = {}) => { + const defaultOptions2 = {}; + forin(getOptions(), (key, value) => { + defaultOptions2[key] = value[0]; + }); + const app = createApp({ + ...defaultOptions2, + ...customOptions + }); + return app; +}; +var lowerCaseFirstLetter = (string) => string.charAt(0).toLowerCase() + string.slice(1); +var attributeNameToPropertyName = (attributeName) => toCamels(attributeName.replace(/^data-/, "")); +var mapObject = (object, propertyMap) => { + forin(propertyMap, (selector, mapping) => { + forin(object, (property, value) => { + const selectorRegExp = new RegExp(selector); + const matches2 = selectorRegExp.test(property); + if (!matches2) { + return; + } + delete object[property]; + if (mapping === false) { + return; + } + if (isString(mapping)) { + object[mapping] = value; + return; + } + const group = mapping.group; + if (isObject(mapping) && !object[group]) { + object[group] = {}; + } + object[group][lowerCaseFirstLetter(property.replace(selectorRegExp, ""))] = value; + }); + if (mapping.mapping) { + mapObject(object[mapping.group], mapping.mapping); + } + }); +}; +var getAttributesAsObject = (node, attributeMapping = {}) => { + const attributes = []; + forin(node.attributes, (index2) => { + attributes.push(node.attributes[index2]); + }); + const output = attributes.filter((attribute) => attribute.name).reduce((obj, attribute) => { + const value = attr(node, attribute.name); + obj[attributeNameToPropertyName(attribute.name)] = value === attribute.name ? true : value; + return obj; + }, {}); + mapObject(output, attributeMapping); + return output; +}; +var createAppAtElement = (element, options2 = {}) => { + const attributeMapping = { + "^class$": "className", + "^multiple$": "allowMultiple", + "^capture$": "captureMethod", + "^webkitdirectory$": "allowDirectoriesOnly", + "^server": { + group: "server", + mapping: { + "^process": { + group: "process" + }, + "^revert": { + group: "revert" + }, + "^fetch": { + group: "fetch" + }, + "^restore": { + group: "restore" + }, + "^load": { + group: "load" + } + } + }, + "^type$": false, + "^files$": false + }; + applyFilters("SET_ATTRIBUTE_TO_OPTION_MAP", attributeMapping); + const mergedOptions = { + ...options2 + }; + const attributeOptions = getAttributesAsObject(element.nodeName === "FIELDSET" ? element.querySelector("input[type=file]") : element, attributeMapping); + Object.keys(attributeOptions).forEach((key) => { + if (isObject(attributeOptions[key])) { + if (!isObject(mergedOptions[key])) { + mergedOptions[key] = {}; + } + Object.assign(mergedOptions[key], attributeOptions[key]); + } else { + mergedOptions[key] = attributeOptions[key]; + } + }); + mergedOptions.files = (options2.files || []).concat(Array.from(element.querySelectorAll("input:not([type=file])")).map((input) => ({ + source: input.value, + options: { + type: input.dataset.type + } + }))); + const app = createAppObject(mergedOptions); + if (element.files) { + Array.from(element.files).forEach((file2) => { + app.addFile(file2); + }); + } + app.replaceElement(element); + return app; +}; +var createApp$1 = (...args) => isNode(args[0]) ? createAppAtElement(...args) : createAppObject(...args); +var PRIVATE_METHODS = ["fire", "_read", "_write"]; +var createAppAPI = (app) => { + const api = {}; + copyObjectPropertiesToObject(app, api, PRIVATE_METHODS); + return api; +}; +var replaceInString = (string, replacements) => string.replace(/(?:{([a-zA-Z]+)})/g, (match, group) => replacements[group]); +var createWorker = (fn2) => { + const workerBlob = new Blob(["(", fn2.toString(), ")()"], { + type: "application/javascript" + }); + const workerURL = URL.createObjectURL(workerBlob); + const worker = new Worker(workerURL); + return { + transfer: (message, cb) => { + }, + post: (message, cb, transferList) => { + const id = getUniqueId(); + worker.onmessage = (e2) => { + if (e2.data.id === id) { + cb(e2.data.message); + } + }; + worker.postMessage({ + id, + message + }, transferList); + }, + terminate: () => { + worker.terminate(); + URL.revokeObjectURL(workerURL); + } + }; +}; +var loadImage = (url) => new Promise((resolve, reject) => { + const img = new Image(); + img.onload = () => { + resolve(img); + }; + img.onerror = (e2) => { + reject(e2); + }; + img.src = url; +}); +var renameFile = (file2, name2) => { + const renamedFile = file2.slice(0, file2.size, file2.type); + renamedFile.lastModifiedDate = file2.lastModifiedDate; + renamedFile.name = name2; + return renamedFile; +}; +var copyFile = (file2) => renameFile(file2, file2.name); +var registeredPlugins = []; +var createAppPlugin = (plugin9) => { + if (registeredPlugins.includes(plugin9)) { + return; + } + registeredPlugins.push(plugin9); + const pluginOutline = plugin9({ + addFilter, + utils: { + Type, + forin, + isString, + isFile, + toNaturalFileSize, + replaceInString, + getExtensionFromFilename, + getFilenameWithoutExtension, + guesstimateMimeType, + getFileFromBlob, + getFilenameFromURL, + createRoute, + createWorker, + createView, + createItemAPI, + loadImage, + copyFile, + renameFile, + createBlob, + applyFilterChain, + text, + getNumericAspectRatioFromString + }, + views: { + fileActionButton + } + }); + extendDefaultOptions(pluginOutline.options); +}; +var isOperaMini = () => Object.prototype.toString.call(window.operamini) === "[object OperaMini]"; +var hasPromises = () => "Promise" in window; +var hasBlobSlice = () => "slice" in Blob.prototype; +var hasCreateObjectURL = () => "URL" in window && "createObjectURL" in window.URL; +var hasVisibility = () => "visibilityState" in document; +var hasTiming = () => "performance" in window; +var hasCSSSupports = () => "supports" in (window.CSS || {}); +var isIE11 = () => /MSIE|Trident/.test(window.navigator.userAgent); +var supported = (() => { + const isSupported = isBrowser() && !isOperaMini() && hasVisibility() && hasPromises() && hasBlobSlice() && hasCreateObjectURL() && hasTiming() && (hasCSSSupports() || isIE11()); + return () => isSupported; +})(); +var state = { + apps: [] +}; +var name = "filepond"; +var fn = () => { +}; +var Status$1 = {}; +var FileStatus = {}; +var FileOrigin$1 = {}; +var OptionTypes = {}; +var create$f = fn; +var destroy = fn; +var parse = fn; +var find = fn; +var registerPlugin = fn; +var getOptions$1 = fn; +var setOptions$1 = fn; +if (supported()) { + createPainter(() => { + state.apps.forEach((app) => app._read()); + }, (ts) => { + state.apps.forEach((app) => app._write(ts)); + }); + const dispatch2 = () => { + document.dispatchEvent(new CustomEvent("FilePond:loaded", { + detail: { + supported, + create: create$f, + destroy, + parse, + find, + registerPlugin, + setOptions: setOptions$1 + } + })); + document.removeEventListener("DOMContentLoaded", dispatch2); + }; + if (document.readyState !== "loading") { + setTimeout(() => dispatch2(), 0); + } else { + document.addEventListener("DOMContentLoaded", dispatch2); + } + const updateOptionTypes = () => forin(getOptions(), (key, value) => { + OptionTypes[key] = value[1]; + }); + Status$1 = {...Status}; + FileOrigin$1 = {...FileOrigin}; + FileStatus = {...ItemStatus}; + OptionTypes = {}; + updateOptionTypes(); + create$f = (...args) => { + const app = createApp$1(...args); + app.on("destroy", destroy); + state.apps.push(app); + return createAppAPI(app); + }; + destroy = (hook) => { + const indexToRemove = state.apps.findIndex((app) => app.isAttachedTo(hook)); + if (indexToRemove >= 0) { + const app = state.apps.splice(indexToRemove, 1)[0]; + app.restoreElement(); + return true; + } + return false; + }; + parse = (context) => { + const matchedHooks = Array.from(context.querySelectorAll(`.${name}`)); + const newHooks = matchedHooks.filter((newHook) => !state.apps.find((app) => app.isAttachedTo(newHook))); + return newHooks.map((hook) => create$f(hook)); + }; + find = (hook) => { + const app = state.apps.find((app2) => app2.isAttachedTo(hook)); + if (!app) { + return null; + } + return createAppAPI(app); + }; + registerPlugin = (...plugins2) => { + plugins2.forEach(createAppPlugin); + updateOptionTypes(); + }; + getOptions$1 = () => { + const opts = {}; + forin(getOptions(), (key, value) => { + opts[key] = value[0]; + }); + return opts; + }; + setOptions$1 = (opts) => { + if (isObject(opts)) { + state.apps.forEach((app) => { + app.setOptions(opts); + }); + setOptions(opts); + } + return getOptions$1(); + }; +} + +// node_modules/filepond-plugin-file-validate-size/dist/filepond-plugin-file-validate-size.esm.js +/*! + * FilePondPluginFileValidateSize 2.2.7 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + */ +var plugin = ({addFilter: addFilter2, utils}) => { + const {Type: Type2, replaceInString: replaceInString2, toNaturalFileSize: toNaturalFileSize2} = utils; + addFilter2("ALLOW_HOPPER_ITEM", (file2, {query}) => { + if (!query("GET_ALLOW_FILE_SIZE_VALIDATION")) { + return true; + } + const sizeMax = query("GET_MAX_FILE_SIZE"); + if (sizeMax !== null && file2.size > sizeMax) { + return false; + } + const sizeMin = query("GET_MIN_FILE_SIZE"); + if (sizeMin !== null && file2.size < sizeMin) { + return false; + } + return true; + }); + addFilter2("LOAD_FILE", (file2, {query}) => new Promise((resolve, reject) => { + if (!query("GET_ALLOW_FILE_SIZE_VALIDATION")) { + return resolve(file2); + } + const fileFilter = query("GET_FILE_VALIDATE_SIZE_FILTER"); + if (fileFilter && !fileFilter(file2)) { + return resolve(file2); + } + const sizeMax = query("GET_MAX_FILE_SIZE"); + if (sizeMax !== null && file2.size > sizeMax) { + reject({ + status: { + main: query("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"), + sub: replaceInString2(query("GET_LABEL_MAX_FILE_SIZE"), { + filesize: toNaturalFileSize2(sizeMax, ".", query("GET_FILE_SIZE_BASE"), query("GET_FILE_SIZE_LABELS", query)) + }) + } + }); + return; + } + const sizeMin = query("GET_MIN_FILE_SIZE"); + if (sizeMin !== null && file2.size < sizeMin) { + reject({ + status: { + main: query("GET_LABEL_MIN_FILE_SIZE_EXCEEDED"), + sub: replaceInString2(query("GET_LABEL_MIN_FILE_SIZE"), { + filesize: toNaturalFileSize2(sizeMin, ".", query("GET_FILE_SIZE_BASE"), query("GET_FILE_SIZE_LABELS", query)) + }) + } + }); + return; + } + const totalSizeMax = query("GET_MAX_TOTAL_FILE_SIZE"); + if (totalSizeMax !== null) { + const currentTotalSize = query("GET_ACTIVE_ITEMS").reduce((total, item2) => { + return total + item2.fileSize; + }, 0); + if (currentTotalSize > totalSizeMax) { + reject({ + status: { + main: query("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"), + sub: replaceInString2(query("GET_LABEL_MAX_TOTAL_FILE_SIZE"), { + filesize: toNaturalFileSize2(totalSizeMax, ".", query("GET_FILE_SIZE_BASE"), query("GET_FILE_SIZE_LABELS", query)) + }) + } + }); + return; + } + } + resolve(file2); + })); + return { + options: { + allowFileSizeValidation: [true, Type2.BOOLEAN], + maxFileSize: [null, Type2.INT], + minFileSize: [null, Type2.INT], + maxTotalFileSize: [null, Type2.INT], + fileValidateSizeFilter: [null, Type2.FUNCTION], + labelMinFileSizeExceeded: ["File is too small", Type2.STRING], + labelMinFileSize: ["Minimum file size is {filesize}", Type2.STRING], + labelMaxFileSizeExceeded: ["File is too large", Type2.STRING], + labelMaxFileSize: ["Maximum file size is {filesize}", Type2.STRING], + labelMaxTotalFileSizeExceeded: ["Maximum total size exceeded", Type2.STRING], + labelMaxTotalFileSize: ["Maximum total file size is {filesize}", Type2.STRING] + } + }; +}; +var isBrowser2 = typeof window !== "undefined" && typeof window.document !== "undefined"; +if (isBrowser2) { + document.dispatchEvent(new CustomEvent("FilePond:pluginloaded", {detail: plugin})); +} +var filepond_plugin_file_validate_size_esm_default = plugin; + +// node_modules/filepond-plugin-file-validate-type/dist/filepond-plugin-file-validate-type.esm.js +/*! + * FilePondPluginFileValidateType 1.2.8 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + */ +var plugin2 = ({addFilter: addFilter2, utils}) => { + const { + Type: Type2, + isString: isString3, + replaceInString: replaceInString2, + guesstimateMimeType: guesstimateMimeType2, + getExtensionFromFilename: getExtensionFromFilename2, + getFilenameFromURL: getFilenameFromURL2 + } = utils; + const mimeTypeMatchesWildCard = (mimeType, wildcard) => { + const mimeTypeGroup = (/^[^/]+/.exec(mimeType) || []).pop(); + const wildcardGroup = wildcard.slice(0, -2); + return mimeTypeGroup === wildcardGroup; + }; + const isValidMimeType = (acceptedTypes, userInputType) => acceptedTypes.some((acceptedType) => { + if (/\*$/.test(acceptedType)) { + return mimeTypeMatchesWildCard(userInputType, acceptedType); + } + return acceptedType === userInputType; + }); + const getItemType = (item2) => { + let type = ""; + if (isString3(item2)) { + const filename = getFilenameFromURL2(item2); + const extension = getExtensionFromFilename2(filename); + if (extension) { + type = guesstimateMimeType2(extension); + } + } else { + type = item2.type; + } + return type; + }; + const validateFile = (item2, acceptedFileTypes, typeDetector) => { + if (acceptedFileTypes.length === 0) { + return true; + } + const type = getItemType(item2); + if (!typeDetector) { + return isValidMimeType(acceptedFileTypes, type); + } + return new Promise((resolve, reject) => { + typeDetector(item2, type).then((detectedType) => { + if (isValidMimeType(acceptedFileTypes, detectedType)) { + resolve(); + } else { + reject(); + } + }).catch(reject); + }); + }; + const applyMimeTypeMap = (map2) => (acceptedFileType) => map2[acceptedFileType] === null ? false : map2[acceptedFileType] || acceptedFileType; + addFilter2("SET_ATTRIBUTE_TO_OPTION_MAP", (map2) => Object.assign(map2, { + accept: "acceptedFileTypes" + })); + addFilter2("ALLOW_HOPPER_ITEM", (file2, {query}) => { + if (!query("GET_ALLOW_FILE_TYPE_VALIDATION")) { + return true; + } + return validateFile(file2, query("GET_ACCEPTED_FILE_TYPES")); + }); + addFilter2("LOAD_FILE", (file2, {query}) => new Promise((resolve, reject) => { + if (!query("GET_ALLOW_FILE_TYPE_VALIDATION")) { + resolve(file2); + return; + } + const acceptedFileTypes = query("GET_ACCEPTED_FILE_TYPES"); + const typeDetector = query("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"); + const validationResult = validateFile(file2, acceptedFileTypes, typeDetector); + const handleRejection = () => { + const acceptedFileTypesMapped = acceptedFileTypes.map(applyMimeTypeMap(query("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"))).filter((label) => label !== false); + const acceptedFileTypesMapped_unique = acceptedFileTypesMapped.filter(function(item2, index2) { + return acceptedFileTypesMapped.indexOf(item2) === index2; + }); + reject({ + status: { + main: query("GET_LABEL_FILE_TYPE_NOT_ALLOWED"), + sub: replaceInString2(query("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"), { + allTypes: acceptedFileTypesMapped_unique.join(", "), + allButLastType: acceptedFileTypesMapped_unique.slice(0, -1).join(", "), + lastType: acceptedFileTypesMapped_unique[acceptedFileTypesMapped.length - 1] + }) + } + }); + }; + if (typeof validationResult === "boolean") { + if (!validationResult) { + return handleRejection(); + } + return resolve(file2); + } + validationResult.then(() => { + resolve(file2); + }).catch(handleRejection); + })); + return { + options: { + allowFileTypeValidation: [true, Type2.BOOLEAN], + acceptedFileTypes: [[], Type2.ARRAY], + labelFileTypeNotAllowed: ["File is of invalid type", Type2.STRING], + fileValidateTypeLabelExpectedTypes: [ + "Expects {allButLastType} or {lastType}", + Type2.STRING + ], + fileValidateTypeLabelExpectedTypesMap: [{}, Type2.OBJECT], + fileValidateTypeDetectType: [null, Type2.FUNCTION] + } + }; +}; +var isBrowser3 = typeof window !== "undefined" && typeof window.document !== "undefined"; +if (isBrowser3) { + document.dispatchEvent(new CustomEvent("FilePond:pluginloaded", {detail: plugin2})); +} +var filepond_plugin_file_validate_type_esm_default = plugin2; + +// node_modules/filepond-plugin-image-crop/dist/filepond-plugin-image-crop.esm.js +/*! + * FilePondPluginImageCrop 2.0.6 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + */ +var isImage = (file2) => /^image/.test(file2.type); +var plugin3 = ({addFilter: addFilter2, utils}) => { + const {Type: Type2, isFile: isFile2, getNumericAspectRatioFromString: getNumericAspectRatioFromString2} = utils; + const allowCrop = (item2, query) => !(!isImage(item2.file) || !query("GET_ALLOW_IMAGE_CROP")); + const isObject2 = (value) => typeof value === "object"; + const isNumber2 = (value) => typeof value === "number"; + const updateCrop = (item2, obj) => item2.setMetadata("crop", Object.assign({}, item2.getMetadata("crop"), obj)); + addFilter2("DID_CREATE_ITEM", (item2, {query}) => { + item2.extend("setImageCrop", (crop) => { + if (!allowCrop(item2, query) || !isObject2(center)) + return; + item2.setMetadata("crop", crop); + return crop; + }); + item2.extend("setImageCropCenter", (center2) => { + if (!allowCrop(item2, query) || !isObject2(center2)) + return; + return updateCrop(item2, {center: center2}); + }); + item2.extend("setImageCropZoom", (zoom) => { + if (!allowCrop(item2, query) || !isNumber2(zoom)) + return; + return updateCrop(item2, {zoom: Math.max(1, zoom)}); + }); + item2.extend("setImageCropRotation", (rotation) => { + if (!allowCrop(item2, query) || !isNumber2(rotation)) + return; + return updateCrop(item2, {rotation}); + }); + item2.extend("setImageCropFlip", (flip2) => { + if (!allowCrop(item2, query) || !isObject2(flip2)) + return; + return updateCrop(item2, {flip: flip2}); + }); + item2.extend("setImageCropAspectRatio", (newAspectRatio) => { + if (!allowCrop(item2, query) || typeof newAspectRatio === "undefined") + return; + const currentCrop = item2.getMetadata("crop"); + const aspectRatio = getNumericAspectRatioFromString2(newAspectRatio); + const newCrop = { + center: { + x: 0.5, + y: 0.5 + }, + flip: currentCrop ? Object.assign({}, currentCrop.flip) : { + horizontal: false, + vertical: false + }, + rotation: 0, + zoom: 1, + aspectRatio + }; + item2.setMetadata("crop", newCrop); + return newCrop; + }); + }); + addFilter2("DID_LOAD_ITEM", (item2, {query}) => new Promise((resolve, reject) => { + const file2 = item2.file; + if (!isFile2(file2) || !isImage(file2) || !query("GET_ALLOW_IMAGE_CROP")) { + return resolve(item2); + } + const crop = item2.getMetadata("crop"); + if (crop) { + return resolve(item2); + } + const humanAspectRatio = query("GET_IMAGE_CROP_ASPECT_RATIO"); + item2.setMetadata("crop", { + center: { + x: 0.5, + y: 0.5 + }, + flip: { + horizontal: false, + vertical: false + }, + rotation: 0, + zoom: 1, + aspectRatio: humanAspectRatio ? getNumericAspectRatioFromString2(humanAspectRatio) : null + }); + resolve(item2); + })); + return { + options: { + allowImageCrop: [true, Type2.BOOLEAN], + imageCropAspectRatio: [null, Type2.STRING] + } + }; +}; +var isBrowser4 = typeof window !== "undefined" && typeof window.document !== "undefined"; +if (isBrowser4) { + document.dispatchEvent(new CustomEvent("FilePond:pluginloaded", {detail: plugin3})); +} +var filepond_plugin_image_crop_esm_default = plugin3; + +// node_modules/filepond-plugin-image-exif-orientation/dist/filepond-plugin-image-exif-orientation.esm.js +/*! + * FilePondPluginImageExifOrientation 1.0.11 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + */ +var isJPEG = (file2) => /^image\/jpeg/.test(file2.type); +var Marker = { + JPEG: 65496, + APP1: 65505, + EXIF: 1165519206, + TIFF: 18761, + Orientation: 274, + Unknown: 65280 +}; +var getUint16 = (view, offset2, little = false) => view.getUint16(offset2, little); +var getUint32 = (view, offset2, little = false) => view.getUint32(offset2, little); +var getImageOrientation = (file2) => new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onload = function(e2) { + const view = new DataView(e2.target.result); + if (getUint16(view, 0) !== Marker.JPEG) { + resolve(-1); + return; + } + const length = view.byteLength; + let offset2 = 2; + while (offset2 < length) { + const marker = getUint16(view, offset2); + offset2 += 2; + if (marker === Marker.APP1) { + if (getUint32(view, offset2 += 2) !== Marker.EXIF) { + break; + } + const little = getUint16(view, offset2 += 6) === Marker.TIFF; + offset2 += getUint32(view, offset2 + 4, little); + const tags = getUint16(view, offset2, little); + offset2 += 2; + for (let i = 0; i < tags; i++) { + if (getUint16(view, offset2 + i * 12, little) === Marker.Orientation) { + resolve(getUint16(view, offset2 + i * 12 + 8, little)); + return; + } + } + } else if ((marker & Marker.Unknown) !== Marker.Unknown) { + break; + } else { + offset2 += getUint16(view, offset2); + } + } + resolve(-1); + }; + reader.readAsArrayBuffer(file2.slice(0, 64 * 1024)); +}); +var IS_BROWSER2 = (() => typeof window !== "undefined" && typeof window.document !== "undefined")(); +var isBrowser5 = () => IS_BROWSER2; +var testSrc = "data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QA6RXhpZgAATU0AKgAAAAgAAwESAAMAAAABAAYAAAEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wAALCAABAAIBASIA/8QAJgABAAAAAAAAAAAAAAAAAAAAAxABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAAPwBH/9k="; +var shouldCorrect = void 0; +var testImage = isBrowser5() ? new Image() : {}; +testImage.onload = () => shouldCorrect = testImage.naturalWidth > testImage.naturalHeight; +testImage.src = testSrc; +var shouldCorrectImageExifOrientation = () => shouldCorrect; +var plugin4 = ({addFilter: addFilter2, utils}) => { + const {Type: Type2, isFile: isFile2} = utils; + addFilter2("DID_LOAD_ITEM", (item2, {query}) => new Promise((resolve, reject) => { + const file2 = item2.file; + if (!isFile2(file2) || !isJPEG(file2) || !query("GET_ALLOW_IMAGE_EXIF_ORIENTATION") || !shouldCorrectImageExifOrientation()) { + return resolve(item2); + } + getImageOrientation(file2).then((orientation) => { + item2.setMetadata("exif", {orientation}); + resolve(item2); + }); + })); + return { + options: { + allowImageExifOrientation: [true, Type2.BOOLEAN] + } + }; +}; +var isBrowser$1 = typeof window !== "undefined" && typeof window.document !== "undefined"; +if (isBrowser$1) { + document.dispatchEvent(new CustomEvent("FilePond:pluginloaded", {detail: plugin4})); +} +var filepond_plugin_image_exif_orientation_esm_default = plugin4; + +// node_modules/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.esm.js +/*! + * FilePondPluginImagePreview 4.6.11 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + */ +var isPreviewableImage = (file2) => /^image/.test(file2.type); +var vectorMultiply = (v, amount) => createVector(v.x * amount, v.y * amount); +var vectorAdd = (a2, b) => createVector(a2.x + b.x, a2.y + b.y); +var vectorNormalize = (v) => { + const l = Math.sqrt(v.x * v.x + v.y * v.y); + if (l === 0) { + return { + x: 0, + y: 0 + }; + } + return createVector(v.x / l, v.y / l); +}; +var vectorRotate = (v, radians, origin) => { + const cos = Math.cos(radians); + const sin = Math.sin(radians); + const t2 = createVector(v.x - origin.x, v.y - origin.y); + return createVector(origin.x + cos * t2.x - sin * t2.y, origin.y + sin * t2.x + cos * t2.y); +}; +var createVector = (x = 0, y = 0) => ({x, y}); +var getMarkupValue = (value, size, scalar = 1, axis) => { + if (typeof value === "string") { + return parseFloat(value) * scalar; + } + if (typeof value === "number") { + return value * (axis ? size[axis] : Math.min(size.width, size.height)); + } + return; +}; +var getMarkupStyles = (markup, size, scale) => { + const lineStyle = markup.borderStyle || markup.lineStyle || "solid"; + const fill = markup.backgroundColor || markup.fontColor || "transparent"; + const stroke = markup.borderColor || markup.lineColor || "transparent"; + const strokeWidth = getMarkupValue(markup.borderWidth || markup.lineWidth, size, scale); + const lineCap = markup.lineCap || "round"; + const lineJoin = markup.lineJoin || "round"; + const dashes = typeof lineStyle === "string" ? "" : lineStyle.map((v) => getMarkupValue(v, size, scale)).join(","); + const opacity = markup.opacity || 1; + return { + "stroke-linecap": lineCap, + "stroke-linejoin": lineJoin, + "stroke-width": strokeWidth || 0, + "stroke-dasharray": dashes, + stroke, + fill, + opacity + }; +}; +var isDefined2 = (value) => value != null; +var getMarkupRect = (rect, size, scalar = 1) => { + let left = getMarkupValue(rect.x, size, scalar, "width") || getMarkupValue(rect.left, size, scalar, "width"); + let top = getMarkupValue(rect.y, size, scalar, "height") || getMarkupValue(rect.top, size, scalar, "height"); + let width = getMarkupValue(rect.width, size, scalar, "width"); + let height = getMarkupValue(rect.height, size, scalar, "height"); + let right = getMarkupValue(rect.right, size, scalar, "width"); + let bottom = getMarkupValue(rect.bottom, size, scalar, "height"); + if (!isDefined2(top)) { + if (isDefined2(height) && isDefined2(bottom)) { + top = size.height - height - bottom; + } else { + top = bottom; + } + } + if (!isDefined2(left)) { + if (isDefined2(width) && isDefined2(right)) { + left = size.width - width - right; + } else { + left = right; + } + } + if (!isDefined2(width)) { + if (isDefined2(left) && isDefined2(right)) { + width = size.width - left - right; + } else { + width = 0; + } + } + if (!isDefined2(height)) { + if (isDefined2(top) && isDefined2(bottom)) { + height = size.height - top - bottom; + } else { + height = 0; + } + } + return { + x: left || 0, + y: top || 0, + width: width || 0, + height: height || 0 + }; +}; +var pointsToPathShape = (points) => points.map((point, index2) => `${index2 === 0 ? "M" : "L"} ${point.x} ${point.y}`).join(" "); +var setAttributes = (element, attr2) => Object.keys(attr2).forEach((key) => element.setAttribute(key, attr2[key])); +var ns2 = "http://www.w3.org/2000/svg"; +var svg = (tag, attr2) => { + const element = document.createElementNS(ns2, tag); + if (attr2) { + setAttributes(element, attr2); + } + return element; +}; +var updateRect2 = (element) => setAttributes(element, { + ...element.rect, + ...element.styles +}); +var updateEllipse = (element) => { + const cx = element.rect.x + element.rect.width * 0.5; + const cy = element.rect.y + element.rect.height * 0.5; + const rx = element.rect.width * 0.5; + const ry = element.rect.height * 0.5; + return setAttributes(element, { + cx, + cy, + rx, + ry, + ...element.styles + }); +}; +var IMAGE_FIT_STYLE = { + contain: "xMidYMid meet", + cover: "xMidYMid slice" +}; +var updateImage = (element, markup) => { + setAttributes(element, { + ...element.rect, + ...element.styles, + preserveAspectRatio: IMAGE_FIT_STYLE[markup.fit] || "none" + }); +}; +var TEXT_ANCHOR = { + left: "start", + center: "middle", + right: "end" +}; +var updateText = (element, markup, size, scale) => { + const fontSize = getMarkupValue(markup.fontSize, size, scale); + const fontFamily = markup.fontFamily || "sans-serif"; + const fontWeight = markup.fontWeight || "normal"; + const textAlign = TEXT_ANCHOR[markup.textAlign] || "start"; + setAttributes(element, { + ...element.rect, + ...element.styles, + "stroke-width": 0, + "font-weight": fontWeight, + "font-size": fontSize, + "font-family": fontFamily, + "text-anchor": textAlign + }); + if (element.text !== markup.text) { + element.text = markup.text; + element.textContent = markup.text.length ? markup.text : " "; + } +}; +var updateLine = (element, markup, size, scale) => { + setAttributes(element, { + ...element.rect, + ...element.styles, + fill: "none" + }); + const line = element.childNodes[0]; + const begin = element.childNodes[1]; + const end = element.childNodes[2]; + const origin = element.rect; + const target = { + x: element.rect.x + element.rect.width, + y: element.rect.y + element.rect.height + }; + setAttributes(line, { + x1: origin.x, + y1: origin.y, + x2: target.x, + y2: target.y + }); + if (!markup.lineDecoration) + return; + begin.style.display = "none"; + end.style.display = "none"; + const v = vectorNormalize({ + x: target.x - origin.x, + y: target.y - origin.y + }); + const l = getMarkupValue(0.05, size, scale); + if (markup.lineDecoration.indexOf("arrow-begin") !== -1) { + const arrowBeginRotationPoint = vectorMultiply(v, l); + const arrowBeginCenter = vectorAdd(origin, arrowBeginRotationPoint); + const arrowBeginA = vectorRotate(origin, 2, arrowBeginCenter); + const arrowBeginB = vectorRotate(origin, -2, arrowBeginCenter); + setAttributes(begin, { + style: "display:block;", + d: `M${arrowBeginA.x},${arrowBeginA.y} L${origin.x},${origin.y} L${arrowBeginB.x},${arrowBeginB.y}` + }); + } + if (markup.lineDecoration.indexOf("arrow-end") !== -1) { + const arrowEndRotationPoint = vectorMultiply(v, -l); + const arrowEndCenter = vectorAdd(target, arrowEndRotationPoint); + const arrowEndA = vectorRotate(target, 2, arrowEndCenter); + const arrowEndB = vectorRotate(target, -2, arrowEndCenter); + setAttributes(end, { + style: "display:block;", + d: `M${arrowEndA.x},${arrowEndA.y} L${target.x},${target.y} L${arrowEndB.x},${arrowEndB.y}` + }); + } +}; +var updatePath = (element, markup, size, scale) => { + setAttributes(element, { + ...element.styles, + fill: "none", + d: pointsToPathShape(markup.points.map((point) => ({ + x: getMarkupValue(point.x, size, scale, "width"), + y: getMarkupValue(point.y, size, scale, "height") + }))) + }); +}; +var createShape = (node) => (markup) => svg(node, {id: markup.id}); +var createImage = (markup) => { + const shape = svg("image", { + id: markup.id, + "stroke-linecap": "round", + "stroke-linejoin": "round", + opacity: "0" + }); + shape.onload = () => { + shape.setAttribute("opacity", markup.opacity || 1); + }; + shape.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", markup.src); + return shape; +}; +var createLine = (markup) => { + const shape = svg("g", { + id: markup.id, + "stroke-linecap": "round", + "stroke-linejoin": "round" + }); + const line = svg("line"); + shape.appendChild(line); + const begin = svg("path"); + shape.appendChild(begin); + const end = svg("path"); + shape.appendChild(end); + return shape; +}; +var CREATE_TYPE_ROUTES = { + image: createImage, + rect: createShape("rect"), + ellipse: createShape("ellipse"), + text: createShape("text"), + path: createShape("path"), + line: createLine +}; +var UPDATE_TYPE_ROUTES = { + rect: updateRect2, + ellipse: updateEllipse, + image: updateImage, + text: updateText, + path: updatePath, + line: updateLine +}; +var createMarkupByType = (type, markup) => CREATE_TYPE_ROUTES[type](markup); +var updateMarkupByType = (element, type, markup, size, scale) => { + if (type !== "path") { + element.rect = getMarkupRect(markup, size, scale); + } + element.styles = getMarkupStyles(markup, size, scale); + UPDATE_TYPE_ROUTES[type](element, markup, size, scale); +}; +var MARKUP_RECT = [ + "x", + "y", + "left", + "top", + "right", + "bottom", + "width", + "height" +]; +var toOptionalFraction = (value) => typeof value === "string" && /%/.test(value) ? parseFloat(value) / 100 : value; +var prepareMarkup = (markup) => { + const [type, props] = markup; + const rect = props.points ? {} : MARKUP_RECT.reduce((prev, curr) => { + prev[curr] = toOptionalFraction(props[curr]); + return prev; + }, {}); + return [ + type, + { + zIndex: 0, + ...props, + ...rect + } + ]; +}; +var sortMarkupByZIndex = (a2, b) => { + if (a2[1].zIndex > b[1].zIndex) { + return 1; + } + if (a2[1].zIndex < b[1].zIndex) { + return -1; + } + return 0; +}; +var createMarkupView = (_) => _.utils.createView({ + name: "image-preview-markup", + tag: "svg", + ignoreRect: true, + mixins: { + apis: ["width", "height", "crop", "markup", "resize", "dirty"] + }, + write: ({root: root2, props}) => { + if (!props.dirty) + return; + const {crop, resize, markup} = props; + const viewWidth = props.width; + const viewHeight = props.height; + let cropWidth = crop.width; + let cropHeight = crop.height; + if (resize) { + const {size: size2} = resize; + let outputWidth = size2 && size2.width; + let outputHeight = size2 && size2.height; + const outputFit = resize.mode; + const outputUpscale = resize.upscale; + if (outputWidth && !outputHeight) + outputHeight = outputWidth; + if (outputHeight && !outputWidth) + outputWidth = outputHeight; + const shouldUpscale = cropWidth < outputWidth && cropHeight < outputHeight; + if (!shouldUpscale || shouldUpscale && outputUpscale) { + let scalarWidth = outputWidth / cropWidth; + let scalarHeight = outputHeight / cropHeight; + if (outputFit === "force") { + cropWidth = outputWidth; + cropHeight = outputHeight; + } else { + let scalar; + if (outputFit === "cover") { + scalar = Math.max(scalarWidth, scalarHeight); + } else if (outputFit === "contain") { + scalar = Math.min(scalarWidth, scalarHeight); + } + cropWidth = cropWidth * scalar; + cropHeight = cropHeight * scalar; + } + } + } + const size = { + width: viewWidth, + height: viewHeight + }; + root2.element.setAttribute("width", size.width); + root2.element.setAttribute("height", size.height); + const scale = Math.min(viewWidth / cropWidth, viewHeight / cropHeight); + root2.element.innerHTML = ""; + const markupFilter = root2.query("GET_IMAGE_PREVIEW_MARKUP_FILTER"); + markup.filter(markupFilter).map(prepareMarkup).sort(sortMarkupByZIndex).forEach((markup2) => { + const [type, settings] = markup2; + const element = createMarkupByType(type, settings); + updateMarkupByType(element, type, settings, size, scale); + root2.element.appendChild(element); + }); + } +}); +var createVector$1 = (x, y) => ({x, y}); +var vectorDot = (a2, b) => a2.x * b.x + a2.y * b.y; +var vectorSubtract = (a2, b) => createVector$1(a2.x - b.x, a2.y - b.y); +var vectorDistanceSquared = (a2, b) => vectorDot(vectorSubtract(a2, b), vectorSubtract(a2, b)); +var vectorDistance = (a2, b) => Math.sqrt(vectorDistanceSquared(a2, b)); +var getOffsetPointOnEdge = (length, rotation) => { + const a2 = length; + const A = 1.5707963267948966; + const B = rotation; + const C3 = 1.5707963267948966 - rotation; + const sinA = Math.sin(A); + const sinB = Math.sin(B); + const sinC = Math.sin(C3); + const cosC = Math.cos(C3); + const ratio = a2 / sinA; + const b = ratio * sinB; + const c2 = ratio * sinC; + return createVector$1(cosC * b, cosC * c2); +}; +var getRotatedRectSize = (rect, rotation) => { + const w = rect.width; + const h = rect.height; + const hor = getOffsetPointOnEdge(w, rotation); + const ver = getOffsetPointOnEdge(h, rotation); + const tl = createVector$1(rect.x + Math.abs(hor.x), rect.y - Math.abs(hor.y)); + const tr = createVector$1(rect.x + rect.width + Math.abs(ver.y), rect.y + Math.abs(ver.x)); + const bl = createVector$1(rect.x - Math.abs(ver.y), rect.y + rect.height - Math.abs(ver.x)); + return { + width: vectorDistance(tl, tr), + height: vectorDistance(tl, bl) + }; +}; +var calculateCanvasSize = (image, canvasAspectRatio, zoom = 1) => { + const imageAspectRatio = image.height / image.width; + let canvasWidth = 1; + let canvasHeight = canvasAspectRatio; + let imgWidth = 1; + let imgHeight = imageAspectRatio; + if (imgHeight > canvasHeight) { + imgHeight = canvasHeight; + imgWidth = imgHeight / imageAspectRatio; + } + const scalar = Math.max(canvasWidth / imgWidth, canvasHeight / imgHeight); + const width = image.width / (zoom * scalar * imgWidth); + const height = width * canvasAspectRatio; + return { + width, + height + }; +}; +var getImageRectZoomFactor = (imageRect, cropRect, rotation, center2) => { + const cx = center2.x > 0.5 ? 1 - center2.x : center2.x; + const cy = center2.y > 0.5 ? 1 - center2.y : center2.y; + const imageWidth = cx * 2 * imageRect.width; + const imageHeight = cy * 2 * imageRect.height; + const rotatedCropSize = getRotatedRectSize(cropRect, rotation); + return Math.max(rotatedCropSize.width / imageWidth, rotatedCropSize.height / imageHeight); +}; +var getCenteredCropRect = (container, aspectRatio) => { + let width = container.width; + let height = width * aspectRatio; + if (height > container.height) { + height = container.height; + width = height / aspectRatio; + } + const x = (container.width - width) * 0.5; + const y = (container.height - height) * 0.5; + return { + x, + y, + width, + height + }; +}; +var getCurrentCropSize = (imageSize, crop = {}) => { + let {zoom, rotation, center: center2, aspectRatio} = crop; + if (!aspectRatio) + aspectRatio = imageSize.height / imageSize.width; + const canvasSize = calculateCanvasSize(imageSize, aspectRatio, zoom); + const canvasCenter = { + x: canvasSize.width * 0.5, + y: canvasSize.height * 0.5 + }; + const stage = { + x: 0, + y: 0, + width: canvasSize.width, + height: canvasSize.height, + center: canvasCenter + }; + const shouldLimit = typeof crop.scaleToFit === "undefined" || crop.scaleToFit; + const stageZoomFactor = getImageRectZoomFactor(imageSize, getCenteredCropRect(stage, aspectRatio), rotation, shouldLimit ? center2 : {x: 0.5, y: 0.5}); + const scale = zoom * stageZoomFactor; + return { + widthFloat: canvasSize.width / scale, + heightFloat: canvasSize.height / scale, + width: Math.round(canvasSize.width / scale), + height: Math.round(canvasSize.height / scale) + }; +}; +var IMAGE_SCALE_SPRING_PROPS = { + type: "spring", + stiffness: 0.5, + damping: 0.45, + mass: 10 +}; +var createBitmapView = (_) => _.utils.createView({ + name: "image-bitmap", + ignoreRect: true, + mixins: {styles: ["scaleX", "scaleY"]}, + create: ({root: root2, props}) => { + root2.appendChild(props.image); + } +}); +var createImageCanvasWrapper = (_) => _.utils.createView({ + name: "image-canvas-wrapper", + tag: "div", + ignoreRect: true, + mixins: { + apis: ["crop", "width", "height"], + styles: [ + "originX", + "originY", + "translateX", + "translateY", + "scaleX", + "scaleY", + "rotateZ" + ], + animations: { + originX: IMAGE_SCALE_SPRING_PROPS, + originY: IMAGE_SCALE_SPRING_PROPS, + scaleX: IMAGE_SCALE_SPRING_PROPS, + scaleY: IMAGE_SCALE_SPRING_PROPS, + translateX: IMAGE_SCALE_SPRING_PROPS, + translateY: IMAGE_SCALE_SPRING_PROPS, + rotateZ: IMAGE_SCALE_SPRING_PROPS + } + }, + create: ({root: root2, props}) => { + props.width = props.image.width; + props.height = props.image.height; + root2.ref.bitmap = root2.appendChildView(root2.createChildView(createBitmapView(_), {image: props.image})); + }, + write: ({root: root2, props}) => { + const {flip: flip2} = props.crop; + const {bitmap} = root2.ref; + bitmap.scaleX = flip2.horizontal ? -1 : 1; + bitmap.scaleY = flip2.vertical ? -1 : 1; + } +}); +var createClipView = (_) => _.utils.createView({ + name: "image-clip", + tag: "div", + ignoreRect: true, + mixins: { + apis: [ + "crop", + "markup", + "resize", + "width", + "height", + "dirty", + "background" + ], + styles: ["width", "height", "opacity"], + animations: { + opacity: {type: "tween", duration: 250} + } + }, + didWriteView: function({root: root2, props}) { + if (!props.background) + return; + root2.element.style.backgroundColor = props.background; + }, + create: ({root: root2, props}) => { + root2.ref.image = root2.appendChildView(root2.createChildView(createImageCanvasWrapper(_), Object.assign({}, props))); + root2.ref.createMarkup = () => { + if (root2.ref.markup) + return; + root2.ref.markup = root2.appendChildView(root2.createChildView(createMarkupView(_), Object.assign({}, props))); + }; + root2.ref.destroyMarkup = () => { + if (!root2.ref.markup) + return; + root2.removeChildView(root2.ref.markup); + root2.ref.markup = null; + }; + const transparencyIndicator = root2.query("GET_IMAGE_PREVIEW_TRANSPARENCY_INDICATOR"); + if (transparencyIndicator === null) + return; + if (transparencyIndicator === "grid") { + root2.element.dataset.transparencyIndicator = transparencyIndicator; + } else { + root2.element.dataset.transparencyIndicator = "color"; + } + }, + write: ({root: root2, props, shouldOptimize}) => { + const {crop, markup, resize, dirty, width, height} = props; + root2.ref.image.crop = crop; + const stage = { + x: 0, + y: 0, + width, + height, + center: { + x: width * 0.5, + y: height * 0.5 + } + }; + const image = { + width: root2.ref.image.width, + height: root2.ref.image.height + }; + const origin = { + x: crop.center.x * image.width, + y: crop.center.y * image.height + }; + const translation = { + x: stage.center.x - image.width * crop.center.x, + y: stage.center.y - image.height * crop.center.y + }; + const rotation = Math.PI * 2 + crop.rotation % (Math.PI * 2); + const cropAspectRatio = crop.aspectRatio || image.height / image.width; + const shouldLimit = typeof crop.scaleToFit === "undefined" || crop.scaleToFit; + const stageZoomFactor = getImageRectZoomFactor(image, getCenteredCropRect(stage, cropAspectRatio), rotation, shouldLimit ? crop.center : {x: 0.5, y: 0.5}); + const scale = crop.zoom * stageZoomFactor; + if (markup && markup.length) { + root2.ref.createMarkup(); + root2.ref.markup.width = width; + root2.ref.markup.height = height; + root2.ref.markup.resize = resize; + root2.ref.markup.dirty = dirty; + root2.ref.markup.markup = markup; + root2.ref.markup.crop = getCurrentCropSize(image, crop); + } else if (root2.ref.markup) { + root2.ref.destroyMarkup(); + } + const imageView = root2.ref.image; + if (shouldOptimize) { + imageView.originX = null; + imageView.originY = null; + imageView.translateX = null; + imageView.translateY = null; + imageView.rotateZ = null; + imageView.scaleX = null; + imageView.scaleY = null; + return; + } + imageView.originX = origin.x; + imageView.originY = origin.y; + imageView.translateX = translation.x; + imageView.translateY = translation.y; + imageView.rotateZ = rotation; + imageView.scaleX = scale; + imageView.scaleY = scale; + } +}); +var createImageView = (_) => _.utils.createView({ + name: "image-preview", + tag: "div", + ignoreRect: true, + mixins: { + apis: ["image", "crop", "markup", "resize", "dirty", "background"], + styles: ["translateY", "scaleX", "scaleY", "opacity"], + animations: { + scaleX: IMAGE_SCALE_SPRING_PROPS, + scaleY: IMAGE_SCALE_SPRING_PROPS, + translateY: IMAGE_SCALE_SPRING_PROPS, + opacity: {type: "tween", duration: 400} + } + }, + create: ({root: root2, props}) => { + root2.ref.clip = root2.appendChildView(root2.createChildView(createClipView(_), { + id: props.id, + image: props.image, + crop: props.crop, + markup: props.markup, + resize: props.resize, + dirty: props.dirty, + background: props.background + })); + }, + write: ({root: root2, props, shouldOptimize}) => { + const {clip} = root2.ref; + const {image, crop, markup, resize, dirty} = props; + clip.crop = crop; + clip.markup = markup; + clip.resize = resize; + clip.dirty = dirty; + clip.opacity = shouldOptimize ? 0 : 1; + if (shouldOptimize || root2.rect.element.hidden) + return; + const imageAspectRatio = image.height / image.width; + let aspectRatio = crop.aspectRatio || imageAspectRatio; + const containerWidth = root2.rect.inner.width; + const containerHeight = root2.rect.inner.height; + let fixedPreviewHeight = root2.query("GET_IMAGE_PREVIEW_HEIGHT"); + const minPreviewHeight = root2.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"); + const maxPreviewHeight = root2.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"); + const panelAspectRatio = root2.query("GET_PANEL_ASPECT_RATIO"); + const allowMultiple = root2.query("GET_ALLOW_MULTIPLE"); + if (panelAspectRatio && !allowMultiple) { + fixedPreviewHeight = containerWidth * panelAspectRatio; + aspectRatio = panelAspectRatio; + } + let clipHeight = fixedPreviewHeight !== null ? fixedPreviewHeight : Math.max(minPreviewHeight, Math.min(containerWidth * aspectRatio, maxPreviewHeight)); + let clipWidth = clipHeight / aspectRatio; + if (clipWidth > containerWidth) { + clipWidth = containerWidth; + clipHeight = clipWidth * aspectRatio; + } + if (clipHeight > containerHeight) { + clipHeight = containerHeight; + clipWidth = containerHeight / aspectRatio; + } + clip.width = clipWidth; + clip.height = clipHeight; + } +}); +var SVG_MASK = ` + + + + + + + + + + + + + + + + + +`; +var SVGMaskUniqueId = 0; +var createImageOverlayView = (fpAPI) => fpAPI.utils.createView({ + name: "image-preview-overlay", + tag: "div", + ignoreRect: true, + create: ({root: root2, props}) => { + let mask = SVG_MASK; + if (document.querySelector("base")) { + const url = new URL(window.location.href.replace(window.location.hash, "")).href; + mask = mask.replace(/url\(\#/g, "url(" + url + "#"); + } + SVGMaskUniqueId++; + root2.element.classList.add(`filepond--image-preview-overlay-${props.status}`); + root2.element.innerHTML = mask.replace(/__UID__/g, SVGMaskUniqueId); + }, + mixins: { + styles: ["opacity"], + animations: { + opacity: {type: "spring", mass: 25} + } + } +}); +var BitmapWorker = function() { + self.onmessage = (e2) => { + createImageBitmap(e2.data.message.file).then((bitmap) => { + self.postMessage({id: e2.data.id, message: bitmap}, [bitmap]); + }); + }; +}; +var ColorMatrixWorker = function() { + self.onmessage = (e2) => { + const imageData = e2.data.message.imageData; + const matrix2 = e2.data.message.colorMatrix; + const data3 = imageData.data; + const l = data3.length; + const m11 = matrix2[0]; + const m12 = matrix2[1]; + const m13 = matrix2[2]; + const m14 = matrix2[3]; + const m15 = matrix2[4]; + const m21 = matrix2[5]; + const m22 = matrix2[6]; + const m23 = matrix2[7]; + const m24 = matrix2[8]; + const m25 = matrix2[9]; + const m31 = matrix2[10]; + const m32 = matrix2[11]; + const m33 = matrix2[12]; + const m34 = matrix2[13]; + const m35 = matrix2[14]; + const m41 = matrix2[15]; + const m42 = matrix2[16]; + const m43 = matrix2[17]; + const m44 = matrix2[18]; + const m45 = matrix2[19]; + let index2 = 0, r2 = 0, g = 0, b = 0, a2 = 0; + for (; index2 < l; index2 += 4) { + r2 = data3[index2] / 255; + g = data3[index2 + 1] / 255; + b = data3[index2 + 2] / 255; + a2 = data3[index2 + 3] / 255; + data3[index2] = Math.max(0, Math.min((r2 * m11 + g * m12 + b * m13 + a2 * m14 + m15) * 255, 255)); + data3[index2 + 1] = Math.max(0, Math.min((r2 * m21 + g * m22 + b * m23 + a2 * m24 + m25) * 255, 255)); + data3[index2 + 2] = Math.max(0, Math.min((r2 * m31 + g * m32 + b * m33 + a2 * m34 + m35) * 255, 255)); + data3[index2 + 3] = Math.max(0, Math.min((r2 * m41 + g * m42 + b * m43 + a2 * m44 + m45) * 255, 255)); + } + self.postMessage({id: e2.data.id, message: imageData}, [ + imageData.data.buffer + ]); + }; +}; +var getImageSize = (url, cb) => { + let image = new Image(); + image.onload = () => { + const width = image.naturalWidth; + const height = image.naturalHeight; + image = null; + cb(width, height); + }; + image.src = url; +}; +var transforms = { + 1: () => [1, 0, 0, 1, 0, 0], + 2: (width) => [-1, 0, 0, 1, width, 0], + 3: (width, height) => [-1, 0, 0, -1, width, height], + 4: (width, height) => [1, 0, 0, -1, 0, height], + 5: () => [0, 1, 1, 0, 0, 0], + 6: (width, height) => [0, 1, -1, 0, height, 0], + 7: (width, height) => [0, -1, -1, 0, height, width], + 8: (width) => [0, -1, 1, 0, 0, width] +}; +var fixImageOrientation = (ctx, width, height, orientation) => { + if (orientation === -1) { + return; + } + ctx.transform.apply(ctx, transforms[orientation](width, height)); +}; +var createPreviewImage = (data3, width, height, orientation) => { + width = Math.round(width); + height = Math.round(height); + const canvas = document.createElement("canvas"); + canvas.width = width; + canvas.height = height; + const ctx = canvas.getContext("2d"); + if (orientation >= 5 && orientation <= 8) { + [width, height] = [height, width]; + } + fixImageOrientation(ctx, width, height, orientation); + ctx.drawImage(data3, 0, 0, width, height); + return canvas; +}; +var isBitmap = (file2) => /^image/.test(file2.type) && !/svg/.test(file2.type); +var MAX_WIDTH = 10; +var MAX_HEIGHT = 10; +var calculateAverageColor = (image) => { + const scalar = Math.min(MAX_WIDTH / image.width, MAX_HEIGHT / image.height); + const canvas = document.createElement("canvas"); + const ctx = canvas.getContext("2d"); + const width = canvas.width = Math.ceil(image.width * scalar); + const height = canvas.height = Math.ceil(image.height * scalar); + ctx.drawImage(image, 0, 0, width, height); + let data3 = null; + try { + data3 = ctx.getImageData(0, 0, width, height).data; + } catch (e2) { + return null; + } + const l = data3.length; + let r2 = 0; + let g = 0; + let b = 0; + let i = 0; + for (; i < l; i += 4) { + r2 += data3[i] * data3[i]; + g += data3[i + 1] * data3[i + 1]; + b += data3[i + 2] * data3[i + 2]; + } + r2 = averageColor(r2, l); + g = averageColor(g, l); + b = averageColor(b, l); + return {r: r2, g, b}; +}; +var averageColor = (c2, l) => Math.floor(Math.sqrt(c2 / (l / 4))); +var cloneCanvas = (origin, target) => { + target = target || document.createElement("canvas"); + target.width = origin.width; + target.height = origin.height; + const ctx = target.getContext("2d"); + ctx.drawImage(origin, 0, 0); + return target; +}; +var cloneImageData = (imageData) => { + let id; + try { + id = new ImageData(imageData.width, imageData.height); + } catch (e2) { + const canvas = document.createElement("canvas"); + const ctx = canvas.getContext("2d"); + id = ctx.createImageData(imageData.width, imageData.height); + } + id.data.set(new Uint8ClampedArray(imageData.data)); + return id; +}; +var loadImage2 = (url) => new Promise((resolve, reject) => { + const img = new Image(); + img.crossOrigin = "Anonymous"; + img.onload = () => { + resolve(img); + }; + img.onerror = (e2) => { + reject(e2); + }; + img.src = url; +}); +var createImageWrapperView = (_) => { + const OverlayView = createImageOverlayView(_); + const ImageView = createImageView(_); + const {createWorker: createWorker3} = _.utils; + const applyFilter = (root2, filter, target) => new Promise((resolve) => { + if (!root2.ref.imageData) { + root2.ref.imageData = target.getContext("2d").getImageData(0, 0, target.width, target.height); + } + const imageData = cloneImageData(root2.ref.imageData); + if (!filter || filter.length !== 20) { + target.getContext("2d").putImageData(imageData, 0, 0); + return resolve(); + } + const worker = createWorker3(ColorMatrixWorker); + worker.post({ + imageData, + colorMatrix: filter + }, (response) => { + target.getContext("2d").putImageData(response, 0, 0); + worker.terminate(); + resolve(); + }, [imageData.data.buffer]); + }); + const removeImageView = (root2, imageView) => { + root2.removeChildView(imageView); + imageView.image.width = 1; + imageView.image.height = 1; + imageView._destroy(); + }; + const shiftImage = ({root: root2}) => { + const imageView = root2.ref.images.shift(); + imageView.opacity = 0; + imageView.translateY = -15; + root2.ref.imageViewBin.push(imageView); + return imageView; + }; + const pushImage = ({root: root2, props, image}) => { + const id = props.id; + const item2 = root2.query("GET_ITEM", {id}); + if (!item2) + return; + const crop = item2.getMetadata("crop") || { + center: { + x: 0.5, + y: 0.5 + }, + flip: { + horizontal: false, + vertical: false + }, + zoom: 1, + rotation: 0, + aspectRatio: null + }; + const background = root2.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"); + let markup; + let resize; + let dirty = false; + if (root2.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")) { + markup = item2.getMetadata("markup") || []; + resize = item2.getMetadata("resize"); + dirty = true; + } + const imageView = root2.appendChildView(root2.createChildView(ImageView, { + id, + image, + crop, + resize, + markup, + dirty, + background, + opacity: 0, + scaleX: 1.15, + scaleY: 1.15, + translateY: 15 + }), root2.childViews.length); + root2.ref.images.push(imageView); + imageView.opacity = 1; + imageView.scaleX = 1; + imageView.scaleY = 1; + imageView.translateY = 0; + setTimeout(() => { + root2.dispatch("DID_IMAGE_PREVIEW_SHOW", {id}); + }, 250); + }; + const updateImage3 = ({root: root2, props}) => { + const item2 = root2.query("GET_ITEM", {id: props.id}); + if (!item2) + return; + const imageView = root2.ref.images[root2.ref.images.length - 1]; + imageView.crop = item2.getMetadata("crop"); + imageView.background = root2.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"); + if (root2.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")) { + imageView.dirty = true; + imageView.resize = item2.getMetadata("resize"); + imageView.markup = item2.getMetadata("markup"); + } + }; + const didUpdateItemMetadata = ({root: root2, props, action}) => { + if (!/crop|filter|markup|resize/.test(action.change.key)) + return; + if (!root2.ref.images.length) + return; + const item2 = root2.query("GET_ITEM", {id: props.id}); + if (!item2) + return; + if (/filter/.test(action.change.key)) { + const imageView = root2.ref.images[root2.ref.images.length - 1]; + applyFilter(root2, action.change.value, imageView.image); + return; + } + if (/crop|markup|resize/.test(action.change.key)) { + const crop = item2.getMetadata("crop"); + const image = root2.ref.images[root2.ref.images.length - 1]; + if (crop && crop.aspectRatio && image.crop && image.crop.aspectRatio && Math.abs(crop.aspectRatio - image.crop.aspectRatio) > 1e-5) { + const imageView = shiftImage({root: root2}); + pushImage({root: root2, props, image: cloneCanvas(imageView.image)}); + } else { + updateImage3({root: root2, props}); + } + } + }; + const canCreateImageBitmap = (file2) => { + const userAgent2 = window.navigator.userAgent; + const isFirefox = userAgent2.match(/Firefox\/([0-9]+)\./); + const firefoxVersion = isFirefox ? parseInt(isFirefox[1]) : null; + if (firefoxVersion <= 58) + return false; + return "createImageBitmap" in window && isBitmap(file2); + }; + const didCreatePreviewContainer = ({root: root2, props}) => { + const {id} = props; + const item2 = root2.query("GET_ITEM", id); + if (!item2) + return; + const fileURL = URL.createObjectURL(item2.file); + getImageSize(fileURL, (width, height) => { + root2.dispatch("DID_IMAGE_PREVIEW_CALCULATE_SIZE", { + id, + width, + height + }); + }); + }; + const drawPreview = ({root: root2, props}) => { + const {id} = props; + const item2 = root2.query("GET_ITEM", id); + if (!item2) + return; + const fileURL = URL.createObjectURL(item2.file); + const loadPreviewFallback = () => { + loadImage2(fileURL).then(previewImageLoaded); + }; + const previewImageLoaded = (imageData) => { + URL.revokeObjectURL(fileURL); + const exif = item2.getMetadata("exif") || {}; + const orientation = exif.orientation || -1; + let {width, height} = imageData; + if (!width || !height) + return; + if (orientation >= 5 && orientation <= 8) { + [width, height] = [height, width]; + } + const pixelDensityFactor = Math.max(1, window.devicePixelRatio * 0.75); + const zoomFactor = root2.query("GET_IMAGE_PREVIEW_ZOOM_FACTOR"); + const scaleFactor = zoomFactor * pixelDensityFactor; + const previewImageRatio = height / width; + const previewContainerWidth = root2.rect.element.width; + const previewContainerHeight = root2.rect.element.height; + let imageWidth = previewContainerWidth; + let imageHeight = imageWidth * previewImageRatio; + if (previewImageRatio > 1) { + imageWidth = Math.min(width, previewContainerWidth * scaleFactor); + imageHeight = imageWidth * previewImageRatio; + } else { + imageHeight = Math.min(height, previewContainerHeight * scaleFactor); + imageWidth = imageHeight / previewImageRatio; + } + const previewImage = createPreviewImage(imageData, imageWidth, imageHeight, orientation); + const done = () => { + const averageColor2 = root2.query("GET_IMAGE_PREVIEW_CALCULATE_AVERAGE_IMAGE_COLOR") ? calculateAverageColor(data) : null; + item2.setMetadata("color", averageColor2, true); + if ("close" in imageData) { + imageData.close(); + } + root2.ref.overlayShadow.opacity = 1; + pushImage({root: root2, props, image: previewImage}); + }; + const filter = item2.getMetadata("filter"); + if (filter) { + applyFilter(root2, filter, previewImage).then(done); + } else { + done(); + } + }; + if (canCreateImageBitmap(item2.file)) { + const worker = createWorker3(BitmapWorker); + worker.post({ + file: item2.file + }, (imageBitmap) => { + worker.terminate(); + if (!imageBitmap) { + loadPreviewFallback(); + return; + } + previewImageLoaded(imageBitmap); + }); + } else { + loadPreviewFallback(); + } + }; + const didDrawPreview = ({root: root2}) => { + const image = root2.ref.images[root2.ref.images.length - 1]; + image.translateY = 0; + image.scaleX = 1; + image.scaleY = 1; + image.opacity = 1; + }; + const restoreOverlay = ({root: root2}) => { + root2.ref.overlayShadow.opacity = 1; + root2.ref.overlayError.opacity = 0; + root2.ref.overlaySuccess.opacity = 0; + }; + const didThrowError = ({root: root2}) => { + root2.ref.overlayShadow.opacity = 0.25; + root2.ref.overlayError.opacity = 1; + }; + const didCompleteProcessing = ({root: root2}) => { + root2.ref.overlayShadow.opacity = 0.25; + root2.ref.overlaySuccess.opacity = 1; + }; + const create3 = ({root: root2}) => { + root2.ref.images = []; + root2.ref.imageData = null; + root2.ref.imageViewBin = []; + root2.ref.overlayShadow = root2.appendChildView(root2.createChildView(OverlayView, { + opacity: 0, + status: "idle" + })); + root2.ref.overlaySuccess = root2.appendChildView(root2.createChildView(OverlayView, { + opacity: 0, + status: "success" + })); + root2.ref.overlayError = root2.appendChildView(root2.createChildView(OverlayView, { + opacity: 0, + status: "failure" + })); + }; + return _.utils.createView({ + name: "image-preview-wrapper", + create: create3, + styles: ["height"], + apis: ["height"], + destroy: ({root: root2}) => { + root2.ref.images.forEach((imageView) => { + imageView.image.width = 1; + imageView.image.height = 1; + }); + }, + didWriteView: ({root: root2}) => { + root2.ref.images.forEach((imageView) => { + imageView.dirty = false; + }); + }, + write: _.utils.createRoute({ + DID_IMAGE_PREVIEW_DRAW: didDrawPreview, + DID_IMAGE_PREVIEW_CONTAINER_CREATE: didCreatePreviewContainer, + DID_FINISH_CALCULATE_PREVIEWSIZE: drawPreview, + DID_UPDATE_ITEM_METADATA: didUpdateItemMetadata, + DID_THROW_ITEM_LOAD_ERROR: didThrowError, + DID_THROW_ITEM_PROCESSING_ERROR: didThrowError, + DID_THROW_ITEM_INVALID: didThrowError, + DID_COMPLETE_ITEM_PROCESSING: didCompleteProcessing, + DID_START_ITEM_PROCESSING: restoreOverlay, + DID_REVERT_ITEM_PROCESSING: restoreOverlay + }, ({root: root2}) => { + const viewsToRemove = root2.ref.imageViewBin.filter((imageView) => imageView.opacity === 0); + root2.ref.imageViewBin = root2.ref.imageViewBin.filter((imageView) => imageView.opacity > 0); + viewsToRemove.forEach((imageView) => removeImageView(root2, imageView)); + viewsToRemove.length = 0; + }) + }); +}; +var plugin5 = (fpAPI) => { + const {addFilter: addFilter2, utils} = fpAPI; + const {Type: Type2, createRoute: createRoute2, isFile: isFile2} = utils; + const imagePreviewView = createImageWrapperView(fpAPI); + addFilter2("CREATE_VIEW", (viewAPI) => { + const {is: is2, view, query} = viewAPI; + if (!is2("file") || !query("GET_ALLOW_IMAGE_PREVIEW")) + return; + const didLoadItem2 = ({root: root2, props}) => { + const {id} = props; + const item2 = query("GET_ITEM", id); + if (!item2 || !isFile2(item2.file) || item2.archived) + return; + const file2 = item2.file; + if (!isPreviewableImage(file2)) + return; + if (!query("GET_IMAGE_PREVIEW_FILTER_ITEM")(item2)) + return; + const supportsCreateImageBitmap = "createImageBitmap" in (window || {}); + const maxPreviewFileSize = query("GET_IMAGE_PREVIEW_MAX_FILE_SIZE"); + if (!supportsCreateImageBitmap && (maxPreviewFileSize && file2.size > maxPreviewFileSize)) + return; + root2.ref.imagePreview = view.appendChildView(view.createChildView(imagePreviewView, {id})); + const fixedPreviewHeight = root2.query("GET_IMAGE_PREVIEW_HEIGHT"); + if (fixedPreviewHeight) { + root2.dispatch("DID_UPDATE_PANEL_HEIGHT", { + id: item2.id, + height: fixedPreviewHeight + }); + } + const queue = !supportsCreateImageBitmap && file2.size > query("GET_IMAGE_PREVIEW_MAX_INSTANT_PREVIEW_FILE_SIZE"); + root2.dispatch("DID_IMAGE_PREVIEW_CONTAINER_CREATE", {id}, queue); + }; + const rescaleItem = (root2, props) => { + if (!root2.ref.imagePreview) + return; + let {id} = props; + const item2 = root2.query("GET_ITEM", {id}); + if (!item2) + return; + const panelAspectRatio = root2.query("GET_PANEL_ASPECT_RATIO"); + const itemPanelAspectRatio = root2.query("GET_ITEM_PANEL_ASPECT_RATIO"); + const fixedHeight = root2.query("GET_IMAGE_PREVIEW_HEIGHT"); + if (panelAspectRatio || itemPanelAspectRatio || fixedHeight) + return; + let {imageWidth, imageHeight} = root2.ref; + if (!imageWidth || !imageHeight) + return; + const minPreviewHeight = root2.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"); + const maxPreviewHeight = root2.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"); + const exif = item2.getMetadata("exif") || {}; + const orientation = exif.orientation || -1; + if (orientation >= 5 && orientation <= 8) + [imageWidth, imageHeight] = [imageHeight, imageWidth]; + if (!isBitmap(item2.file) || root2.query("GET_IMAGE_PREVIEW_UPSCALE")) { + const scalar = 2048 / imageWidth; + imageWidth *= scalar; + imageHeight *= scalar; + } + const imageAspectRatio = imageHeight / imageWidth; + const previewAspectRatio = (item2.getMetadata("crop") || {}).aspectRatio || imageAspectRatio; + let previewHeightMax = Math.max(minPreviewHeight, Math.min(imageHeight, maxPreviewHeight)); + const itemWidth = root2.rect.element.width; + const previewHeight = Math.min(itemWidth * previewAspectRatio, previewHeightMax); + root2.dispatch("DID_UPDATE_PANEL_HEIGHT", { + id: item2.id, + height: previewHeight + }); + }; + const didResizeView = ({root: root2}) => { + root2.ref.shouldRescale = true; + }; + const didUpdateItemMetadata = ({root: root2, action}) => { + if (action.change.key !== "crop") + return; + root2.ref.shouldRescale = true; + }; + const didCalculatePreviewSize = ({root: root2, action}) => { + root2.ref.imageWidth = action.width; + root2.ref.imageHeight = action.height; + root2.ref.shouldRescale = true; + root2.ref.shouldDrawPreview = true; + root2.dispatch("KICK"); + }; + view.registerWriter(createRoute2({ + DID_RESIZE_ROOT: didResizeView, + DID_STOP_RESIZE: didResizeView, + DID_LOAD_ITEM: didLoadItem2, + DID_IMAGE_PREVIEW_CALCULATE_SIZE: didCalculatePreviewSize, + DID_UPDATE_ITEM_METADATA: didUpdateItemMetadata + }, ({root: root2, props}) => { + if (!root2.ref.imagePreview) + return; + if (root2.rect.element.hidden) + return; + if (root2.ref.shouldRescale) { + rescaleItem(root2, props); + root2.ref.shouldRescale = false; + } + if (root2.ref.shouldDrawPreview) { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + root2.dispatch("DID_FINISH_CALCULATE_PREVIEWSIZE", { + id: props.id + }); + }); + }); + root2.ref.shouldDrawPreview = false; + } + })); + }); + return { + options: { + allowImagePreview: [true, Type2.BOOLEAN], + imagePreviewFilterItem: [() => true, Type2.FUNCTION], + imagePreviewHeight: [null, Type2.INT], + imagePreviewMinHeight: [44, Type2.INT], + imagePreviewMaxHeight: [256, Type2.INT], + imagePreviewMaxFileSize: [null, Type2.INT], + imagePreviewZoomFactor: [2, Type2.INT], + imagePreviewUpscale: [false, Type2.BOOLEAN], + imagePreviewMaxInstantPreviewFileSize: [1e6, Type2.INT], + imagePreviewTransparencyIndicator: [null, Type2.STRING], + imagePreviewCalculateAverageImageColor: [false, Type2.BOOLEAN], + imagePreviewMarkupShow: [true, Type2.BOOLEAN], + imagePreviewMarkupFilter: [() => true, Type2.FUNCTION] + } + }; +}; +var isBrowser6 = typeof window !== "undefined" && typeof window.document !== "undefined"; +if (isBrowser6) { + document.dispatchEvent(new CustomEvent("FilePond:pluginloaded", {detail: plugin5})); +} +var filepond_plugin_image_preview_esm_default = plugin5; + +// node_modules/filepond-plugin-image-resize/dist/filepond-plugin-image-resize.esm.js +/*! + * FilePondPluginImageResize 2.0.10 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + */ +var isImage2 = (file2) => /^image/.test(file2.type); +var getImageSize2 = (url, cb) => { + let image = new Image(); + image.onload = () => { + const width = image.naturalWidth; + const height = image.naturalHeight; + image = null; + cb({width, height}); + }; + image.onerror = () => cb(null); + image.src = url; +}; +var plugin6 = ({addFilter: addFilter2, utils}) => { + const {Type: Type2} = utils; + addFilter2("DID_LOAD_ITEM", (item2, {query}) => new Promise((resolve, reject) => { + const file2 = item2.file; + if (!isImage2(file2) || !query("GET_ALLOW_IMAGE_RESIZE")) { + return resolve(item2); + } + const mode = query("GET_IMAGE_RESIZE_MODE"); + const width = query("GET_IMAGE_RESIZE_TARGET_WIDTH"); + const height = query("GET_IMAGE_RESIZE_TARGET_HEIGHT"); + const upscale = query("GET_IMAGE_RESIZE_UPSCALE"); + if (width === null && height === null) + return resolve(item2); + const targetWidth = width === null ? height : width; + const targetHeight = height === null ? targetWidth : height; + const fileURL = URL.createObjectURL(file2); + getImageSize2(fileURL, (size) => { + URL.revokeObjectURL(fileURL); + if (!size) + return resolve(item2); + let {width: imageWidth, height: imageHeight} = size; + const orientation = (item2.getMetadata("exif") || {}).orientation || -1; + if (orientation >= 5 && orientation <= 8) { + [imageWidth, imageHeight] = [imageHeight, imageWidth]; + } + if (imageWidth === targetWidth && imageHeight === targetHeight) + return resolve(item2); + if (!upscale) { + if (mode === "cover") { + if (imageWidth <= targetWidth || imageHeight <= targetHeight) + return resolve(item2); + } else if (imageWidth <= targetWidth && imageHeight <= targetWidth) { + return resolve(item2); + } + } + item2.setMetadata("resize", { + mode, + upscale, + size: { + width: targetWidth, + height: targetHeight + } + }); + resolve(item2); + }); + })); + return { + options: { + allowImageResize: [true, Type2.BOOLEAN], + imageResizeMode: ["cover", Type2.STRING], + imageResizeUpscale: [true, Type2.BOOLEAN], + imageResizeTargetWidth: [null, Type2.INT], + imageResizeTargetHeight: [null, Type2.INT] + } + }; +}; +var isBrowser7 = typeof window !== "undefined" && typeof window.document !== "undefined"; +if (isBrowser7) { + document.dispatchEvent(new CustomEvent("FilePond:pluginloaded", {detail: plugin6})); +} +var filepond_plugin_image_resize_esm_default = plugin6; + +// node_modules/filepond-plugin-image-transform/dist/filepond-plugin-image-transform.esm.js +/*! + * FilePondPluginImageTransform 3.8.7 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit https://pqina.nl/filepond/ for details. + */ +var isImage3 = (file2) => /^image/.test(file2.type); +var getFilenameWithoutExtension2 = (name2) => name2.substr(0, name2.lastIndexOf(".")) || name2; +var ExtensionMap = { + jpeg: "jpg", + "svg+xml": "svg" +}; +var renameFileToMatchMimeType = (filename, mimeType) => { + const name2 = getFilenameWithoutExtension2(filename); + const type = mimeType.split("/")[1]; + const extension = ExtensionMap[type] || type; + return `${name2}.${extension}`; +}; +var getValidOutputMimeType = (type) => /jpeg|png|svg\+xml/.test(type) ? type : "image/jpeg"; +var isImage$1 = (file2) => /^image/.test(file2.type); +var MATRICES = { + 1: () => [1, 0, 0, 1, 0, 0], + 2: (width) => [-1, 0, 0, 1, width, 0], + 3: (width, height) => [-1, 0, 0, -1, width, height], + 4: (width, height) => [1, 0, 0, -1, 0, height], + 5: () => [0, 1, 1, 0, 0, 0], + 6: (width, height) => [0, 1, -1, 0, height, 0], + 7: (width, height) => [0, -1, -1, 0, height, width], + 8: (width) => [0, -1, 1, 0, 0, width] +}; +var getImageOrientationMatrix = (width, height, orientation) => { + if (orientation === -1) { + orientation = 1; + } + return MATRICES[orientation](width, height); +}; +var createVector2 = (x, y) => ({x, y}); +var vectorDot2 = (a2, b) => a2.x * b.x + a2.y * b.y; +var vectorSubtract2 = (a2, b) => createVector2(a2.x - b.x, a2.y - b.y); +var vectorDistanceSquared2 = (a2, b) => vectorDot2(vectorSubtract2(a2, b), vectorSubtract2(a2, b)); +var vectorDistance2 = (a2, b) => Math.sqrt(vectorDistanceSquared2(a2, b)); +var getOffsetPointOnEdge2 = (length, rotation) => { + const a2 = length; + const A = 1.5707963267948966; + const B = rotation; + const C3 = 1.5707963267948966 - rotation; + const sinA = Math.sin(A); + const sinB = Math.sin(B); + const sinC = Math.sin(C3); + const cosC = Math.cos(C3); + const ratio = a2 / sinA; + const b = ratio * sinB; + const c2 = ratio * sinC; + return createVector2(cosC * b, cosC * c2); +}; +var getRotatedRectSize2 = (rect, rotation) => { + const w = rect.width; + const h = rect.height; + const hor = getOffsetPointOnEdge2(w, rotation); + const ver = getOffsetPointOnEdge2(h, rotation); + const tl = createVector2(rect.x + Math.abs(hor.x), rect.y - Math.abs(hor.y)); + const tr = createVector2(rect.x + rect.width + Math.abs(ver.y), rect.y + Math.abs(ver.x)); + const bl = createVector2(rect.x - Math.abs(ver.y), rect.y + rect.height - Math.abs(ver.x)); + return { + width: vectorDistance2(tl, tr), + height: vectorDistance2(tl, bl) + }; +}; +var getImageRectZoomFactor2 = (imageRect, cropRect, rotation = 0, center2 = {x: 0.5, y: 0.5}) => { + const cx = center2.x > 0.5 ? 1 - center2.x : center2.x; + const cy = center2.y > 0.5 ? 1 - center2.y : center2.y; + const imageWidth = cx * 2 * imageRect.width; + const imageHeight = cy * 2 * imageRect.height; + const rotatedCropSize = getRotatedRectSize2(cropRect, rotation); + return Math.max(rotatedCropSize.width / imageWidth, rotatedCropSize.height / imageHeight); +}; +var getCenteredCropRect2 = (container, aspectRatio) => { + let width = container.width; + let height = width * aspectRatio; + if (height > container.height) { + height = container.height; + width = height / aspectRatio; + } + const x = (container.width - width) * 0.5; + const y = (container.height - height) * 0.5; + return { + x, + y, + width, + height + }; +}; +var calculateCanvasSize2 = (image, canvasAspectRatio, zoom = 1) => { + const imageAspectRatio = image.height / image.width; + let canvasWidth = 1; + let canvasHeight = canvasAspectRatio; + let imgWidth = 1; + let imgHeight = imageAspectRatio; + if (imgHeight > canvasHeight) { + imgHeight = canvasHeight; + imgWidth = imgHeight / imageAspectRatio; + } + const scalar = Math.max(canvasWidth / imgWidth, canvasHeight / imgHeight); + const width = image.width / (zoom * scalar * imgWidth); + const height = width * canvasAspectRatio; + return { + width, + height + }; +}; +var canvasRelease = (canvas) => { + canvas.width = 1; + canvas.height = 1; + const ctx = canvas.getContext("2d"); + ctx.clearRect(0, 0, 1, 1); +}; +var isFlipped = (flip2) => flip2 && (flip2.horizontal || flip2.vertical); +var getBitmap = (image, orientation, flip2) => { + if (orientation <= 1 && !isFlipped(flip2)) { + image.width = image.naturalWidth; + image.height = image.naturalHeight; + return image; + } + const canvas = document.createElement("canvas"); + const width = image.naturalWidth; + const height = image.naturalHeight; + const swapped = orientation >= 5 && orientation <= 8; + if (swapped) { + canvas.width = height; + canvas.height = width; + } else { + canvas.width = width; + canvas.height = height; + } + const ctx = canvas.getContext("2d"); + if (orientation) { + ctx.transform.apply(ctx, getImageOrientationMatrix(width, height, orientation)); + } + if (isFlipped(flip2)) { + const matrix2 = [1, 0, 0, 1, 0, 0]; + if (!swapped && flip2.horizontal || swapped & flip2.vertical) { + matrix2[0] = -1; + matrix2[4] = width; + } + if (!swapped && flip2.vertical || swapped && flip2.horizontal) { + matrix2[3] = -1; + matrix2[5] = height; + } + ctx.transform(...matrix2); + } + ctx.drawImage(image, 0, 0, width, height); + return canvas; +}; +var imageToImageData = (imageElement, orientation, crop = {}, options2 = {}) => { + const {canvasMemoryLimit, background = null} = options2; + const zoom = crop.zoom || 1; + const bitmap = getBitmap(imageElement, orientation, crop.flip); + const imageSize = { + width: bitmap.width, + height: bitmap.height + }; + const aspectRatio = crop.aspectRatio || imageSize.height / imageSize.width; + let canvasSize = calculateCanvasSize2(imageSize, aspectRatio, zoom); + if (canvasMemoryLimit) { + const requiredMemory = canvasSize.width * canvasSize.height; + if (requiredMemory > canvasMemoryLimit) { + const scalar = Math.sqrt(canvasMemoryLimit) / Math.sqrt(requiredMemory); + imageSize.width = Math.floor(imageSize.width * scalar); + imageSize.height = Math.floor(imageSize.height * scalar); + canvasSize = calculateCanvasSize2(imageSize, aspectRatio, zoom); + } + } + const canvas = document.createElement("canvas"); + const canvasCenter = { + x: canvasSize.width * 0.5, + y: canvasSize.height * 0.5 + }; + const stage = { + x: 0, + y: 0, + width: canvasSize.width, + height: canvasSize.height, + center: canvasCenter + }; + const shouldLimit = typeof crop.scaleToFit === "undefined" || crop.scaleToFit; + const scale = zoom * getImageRectZoomFactor2(imageSize, getCenteredCropRect2(stage, aspectRatio), crop.rotation, shouldLimit ? crop.center : {x: 0.5, y: 0.5}); + canvas.width = Math.round(canvasSize.width / scale); + canvas.height = Math.round(canvasSize.height / scale); + canvasCenter.x /= scale; + canvasCenter.y /= scale; + const imageOffset = { + x: canvasCenter.x - imageSize.width * (crop.center ? crop.center.x : 0.5), + y: canvasCenter.y - imageSize.height * (crop.center ? crop.center.y : 0.5) + }; + const ctx = canvas.getContext("2d"); + if (background) { + ctx.fillStyle = background; + ctx.fillRect(0, 0, canvas.width, canvas.height); + } + ctx.translate(canvasCenter.x, canvasCenter.y); + ctx.rotate(crop.rotation || 0); + ctx.drawImage(bitmap, imageOffset.x - canvasCenter.x, imageOffset.y - canvasCenter.y, imageSize.width, imageSize.height); + const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); + canvasRelease(canvas); + return imageData; +}; +var IS_BROWSER3 = (() => typeof window !== "undefined" && typeof window.document !== "undefined")(); +if (IS_BROWSER3) { + if (!HTMLCanvasElement.prototype.toBlob) { + Object.defineProperty(HTMLCanvasElement.prototype, "toBlob", { + value: function(callback, type, quality) { + var dataURL = this.toDataURL(type, quality).split(",")[1]; + setTimeout(function() { + var binStr = atob(dataURL); + var len = binStr.length; + var arr = new Uint8Array(len); + for (var i = 0; i < len; i++) { + arr[i] = binStr.charCodeAt(i); + } + callback(new Blob([arr], {type: type || "image/png"})); + }); + } + }); + } +} +var canvasToBlob = (canvas, options2, beforeCreateBlob = null) => new Promise((resolve) => { + const promisedImage = beforeCreateBlob ? beforeCreateBlob(canvas) : canvas; + Promise.resolve(promisedImage).then((canvas2) => { + canvas2.toBlob(resolve, options2.type, options2.quality); + }); +}); +var vectorMultiply2 = (v, amount) => createVector$12(v.x * amount, v.y * amount); +var vectorAdd2 = (a2, b) => createVector$12(a2.x + b.x, a2.y + b.y); +var vectorNormalize2 = (v) => { + const l = Math.sqrt(v.x * v.x + v.y * v.y); + if (l === 0) { + return { + x: 0, + y: 0 + }; + } + return createVector$12(v.x / l, v.y / l); +}; +var vectorRotate2 = (v, radians, origin) => { + const cos = Math.cos(radians); + const sin = Math.sin(radians); + const t2 = createVector$12(v.x - origin.x, v.y - origin.y); + return createVector$12(origin.x + cos * t2.x - sin * t2.y, origin.y + sin * t2.x + cos * t2.y); +}; +var createVector$12 = (x = 0, y = 0) => ({x, y}); +var getMarkupValue2 = (value, size, scalar = 1, axis) => { + if (typeof value === "string") { + return parseFloat(value) * scalar; + } + if (typeof value === "number") { + return value * (axis ? size[axis] : Math.min(size.width, size.height)); + } + return; +}; +var getMarkupStyles2 = (markup, size, scale) => { + const lineStyle = markup.borderStyle || markup.lineStyle || "solid"; + const fill = markup.backgroundColor || markup.fontColor || "transparent"; + const stroke = markup.borderColor || markup.lineColor || "transparent"; + const strokeWidth = getMarkupValue2(markup.borderWidth || markup.lineWidth, size, scale); + const lineCap = markup.lineCap || "round"; + const lineJoin = markup.lineJoin || "round"; + const dashes = typeof lineStyle === "string" ? "" : lineStyle.map((v) => getMarkupValue2(v, size, scale)).join(","); + const opacity = markup.opacity || 1; + return { + "stroke-linecap": lineCap, + "stroke-linejoin": lineJoin, + "stroke-width": strokeWidth || 0, + "stroke-dasharray": dashes, + stroke, + fill, + opacity + }; +}; +var isDefined3 = (value) => value != null; +var getMarkupRect2 = (rect, size, scalar = 1) => { + let left = getMarkupValue2(rect.x, size, scalar, "width") || getMarkupValue2(rect.left, size, scalar, "width"); + let top = getMarkupValue2(rect.y, size, scalar, "height") || getMarkupValue2(rect.top, size, scalar, "height"); + let width = getMarkupValue2(rect.width, size, scalar, "width"); + let height = getMarkupValue2(rect.height, size, scalar, "height"); + let right = getMarkupValue2(rect.right, size, scalar, "width"); + let bottom = getMarkupValue2(rect.bottom, size, scalar, "height"); + if (!isDefined3(top)) { + if (isDefined3(height) && isDefined3(bottom)) { + top = size.height - height - bottom; + } else { + top = bottom; + } + } + if (!isDefined3(left)) { + if (isDefined3(width) && isDefined3(right)) { + left = size.width - width - right; + } else { + left = right; + } + } + if (!isDefined3(width)) { + if (isDefined3(left) && isDefined3(right)) { + width = size.width - left - right; + } else { + width = 0; + } + } + if (!isDefined3(height)) { + if (isDefined3(top) && isDefined3(bottom)) { + height = size.height - top - bottom; + } else { + height = 0; + } + } + return { + x: left || 0, + y: top || 0, + width: width || 0, + height: height || 0 + }; +}; +var pointsToPathShape2 = (points) => points.map((point, index2) => `${index2 === 0 ? "M" : "L"} ${point.x} ${point.y}`).join(" "); +var setAttributes2 = (element, attr2) => Object.keys(attr2).forEach((key) => element.setAttribute(key, attr2[key])); +var ns3 = "http://www.w3.org/2000/svg"; +var svg2 = (tag, attr2) => { + const element = document.createElementNS(ns3, tag); + if (attr2) { + setAttributes2(element, attr2); + } + return element; +}; +var updateRect3 = (element) => setAttributes2(element, { + ...element.rect, + ...element.styles +}); +var updateEllipse2 = (element) => { + const cx = element.rect.x + element.rect.width * 0.5; + const cy = element.rect.y + element.rect.height * 0.5; + const rx = element.rect.width * 0.5; + const ry = element.rect.height * 0.5; + return setAttributes2(element, { + cx, + cy, + rx, + ry, + ...element.styles + }); +}; +var IMAGE_FIT_STYLE2 = { + contain: "xMidYMid meet", + cover: "xMidYMid slice" +}; +var updateImage2 = (element, markup) => { + setAttributes2(element, { + ...element.rect, + ...element.styles, + preserveAspectRatio: IMAGE_FIT_STYLE2[markup.fit] || "none" + }); +}; +var TEXT_ANCHOR2 = { + left: "start", + center: "middle", + right: "end" +}; +var updateText2 = (element, markup, size, scale) => { + const fontSize = getMarkupValue2(markup.fontSize, size, scale); + const fontFamily = markup.fontFamily || "sans-serif"; + const fontWeight = markup.fontWeight || "normal"; + const textAlign = TEXT_ANCHOR2[markup.textAlign] || "start"; + setAttributes2(element, { + ...element.rect, + ...element.styles, + "stroke-width": 0, + "font-weight": fontWeight, + "font-size": fontSize, + "font-family": fontFamily, + "text-anchor": textAlign + }); + if (element.text !== markup.text) { + element.text = markup.text; + element.textContent = markup.text.length ? markup.text : " "; + } +}; +var updateLine2 = (element, markup, size, scale) => { + setAttributes2(element, { + ...element.rect, + ...element.styles, + fill: "none" + }); + const line = element.childNodes[0]; + const begin = element.childNodes[1]; + const end = element.childNodes[2]; + const origin = element.rect; + const target = { + x: element.rect.x + element.rect.width, + y: element.rect.y + element.rect.height + }; + setAttributes2(line, { + x1: origin.x, + y1: origin.y, + x2: target.x, + y2: target.y + }); + if (!markup.lineDecoration) + return; + begin.style.display = "none"; + end.style.display = "none"; + const v = vectorNormalize2({ + x: target.x - origin.x, + y: target.y - origin.y + }); + const l = getMarkupValue2(0.05, size, scale); + if (markup.lineDecoration.indexOf("arrow-begin") !== -1) { + const arrowBeginRotationPoint = vectorMultiply2(v, l); + const arrowBeginCenter = vectorAdd2(origin, arrowBeginRotationPoint); + const arrowBeginA = vectorRotate2(origin, 2, arrowBeginCenter); + const arrowBeginB = vectorRotate2(origin, -2, arrowBeginCenter); + setAttributes2(begin, { + style: "display:block;", + d: `M${arrowBeginA.x},${arrowBeginA.y} L${origin.x},${origin.y} L${arrowBeginB.x},${arrowBeginB.y}` + }); + } + if (markup.lineDecoration.indexOf("arrow-end") !== -1) { + const arrowEndRotationPoint = vectorMultiply2(v, -l); + const arrowEndCenter = vectorAdd2(target, arrowEndRotationPoint); + const arrowEndA = vectorRotate2(target, 2, arrowEndCenter); + const arrowEndB = vectorRotate2(target, -2, arrowEndCenter); + setAttributes2(end, { + style: "display:block;", + d: `M${arrowEndA.x},${arrowEndA.y} L${target.x},${target.y} L${arrowEndB.x},${arrowEndB.y}` + }); + } +}; +var updatePath2 = (element, markup, size, scale) => { + setAttributes2(element, { + ...element.styles, + fill: "none", + d: pointsToPathShape2(markup.points.map((point) => ({ + x: getMarkupValue2(point.x, size, scale, "width"), + y: getMarkupValue2(point.y, size, scale, "height") + }))) + }); +}; +var createShape2 = (node) => (markup) => svg2(node, {id: markup.id}); +var createImage2 = (markup) => { + const shape = svg2("image", { + id: markup.id, + "stroke-linecap": "round", + "stroke-linejoin": "round", + opacity: "0" + }); + shape.onload = () => { + shape.setAttribute("opacity", markup.opacity || 1); + }; + shape.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", markup.src); + return shape; +}; +var createLine2 = (markup) => { + const shape = svg2("g", { + id: markup.id, + "stroke-linecap": "round", + "stroke-linejoin": "round" + }); + const line = svg2("line"); + shape.appendChild(line); + const begin = svg2("path"); + shape.appendChild(begin); + const end = svg2("path"); + shape.appendChild(end); + return shape; +}; +var CREATE_TYPE_ROUTES2 = { + image: createImage2, + rect: createShape2("rect"), + ellipse: createShape2("ellipse"), + text: createShape2("text"), + path: createShape2("path"), + line: createLine2 +}; +var UPDATE_TYPE_ROUTES2 = { + rect: updateRect3, + ellipse: updateEllipse2, + image: updateImage2, + text: updateText2, + path: updatePath2, + line: updateLine2 +}; +var createMarkupByType2 = (type, markup) => CREATE_TYPE_ROUTES2[type](markup); +var updateMarkupByType2 = (element, type, markup, size, scale) => { + if (type !== "path") { + element.rect = getMarkupRect2(markup, size, scale); + } + element.styles = getMarkupStyles2(markup, size, scale); + UPDATE_TYPE_ROUTES2[type](element, markup, size, scale); +}; +var sortMarkupByZIndex2 = (a2, b) => { + if (a2[1].zIndex > b[1].zIndex) { + return 1; + } + if (a2[1].zIndex < b[1].zIndex) { + return -1; + } + return 0; +}; +var cropSVG = (blob2, crop = {}, markup, options2) => new Promise((resolve) => { + const {background = null} = options2; + const fr = new FileReader(); + fr.onloadend = () => { + const text3 = fr.result; + const original = document.createElement("div"); + original.style.cssText = `position:absolute;pointer-events:none;width:0;height:0;visibility:hidden;`; + original.innerHTML = text3; + const originalNode = original.querySelector("svg"); + document.body.appendChild(original); + const bBox = originalNode.getBBox(); + original.parentNode.removeChild(original); + const titleNode = original.querySelector("title"); + const viewBoxAttribute = originalNode.getAttribute("viewBox") || ""; + const widthAttribute = originalNode.getAttribute("width") || ""; + const heightAttribute = originalNode.getAttribute("height") || ""; + let width = parseFloat(widthAttribute) || null; + let height = parseFloat(heightAttribute) || null; + const widthUnits = (widthAttribute.match(/[a-z]+/) || [])[0] || ""; + const heightUnits = (heightAttribute.match(/[a-z]+/) || [])[0] || ""; + const viewBoxList = viewBoxAttribute.split(" ").map(parseFloat); + const viewBox = viewBoxList.length ? { + x: viewBoxList[0], + y: viewBoxList[1], + width: viewBoxList[2], + height: viewBoxList[3] + } : bBox; + let imageWidth = width != null ? width : viewBox.width; + let imageHeight = height != null ? height : viewBox.height; + originalNode.style.overflow = "visible"; + originalNode.setAttribute("width", imageWidth); + originalNode.setAttribute("height", imageHeight); + let markupSVG = ""; + if (markup && markup.length) { + const size = { + width: imageWidth, + height: imageHeight + }; + markupSVG = markup.sort(sortMarkupByZIndex2).reduce((prev, shape) => { + const el = createMarkupByType2(shape[0], shape[1]); + updateMarkupByType2(el, shape[0], shape[1], size); + el.removeAttribute("id"); + if (el.getAttribute("opacity") === 1) { + el.removeAttribute("opacity"); + } + return prev + "\n" + el.outerHTML + "\n"; + }, ""); + markupSVG = ` + +${markupSVG.replace(/ /g, " ")} + +`; + } + const aspectRatio = crop.aspectRatio || imageHeight / imageWidth; + const canvasWidth = imageWidth; + const canvasHeight = canvasWidth * aspectRatio; + const shouldLimit = typeof crop.scaleToFit === "undefined" || crop.scaleToFit; + const cropCenterX = crop.center ? crop.center.x : 0.5; + const cropCenterY = crop.center ? crop.center.y : 0.5; + const canvasZoomFactor = getImageRectZoomFactor2({ + width: imageWidth, + height: imageHeight + }, getCenteredCropRect2({ + width: canvasWidth, + height: canvasHeight + }, aspectRatio), crop.rotation, shouldLimit ? {x: cropCenterX, y: cropCenterY} : { + x: 0.5, + y: 0.5 + }); + const scale = crop.zoom * canvasZoomFactor; + const rotation = crop.rotation * (180 / Math.PI); + const canvasCenter = { + x: canvasWidth * 0.5, + y: canvasHeight * 0.5 + }; + const imageOffset = { + x: canvasCenter.x - imageWidth * cropCenterX, + y: canvasCenter.y - imageHeight * cropCenterY + }; + const cropTransforms = [ + `rotate(${rotation} ${canvasCenter.x} ${canvasCenter.y})`, + `translate(${canvasCenter.x} ${canvasCenter.y})`, + `scale(${scale})`, + `translate(${-canvasCenter.x} ${-canvasCenter.y})`, + `translate(${imageOffset.x} ${imageOffset.y})` + ]; + const cropFlipHorizontal = crop.flip && crop.flip.horizontal; + const cropFlipVertical = crop.flip && crop.flip.vertical; + const flipTransforms = [ + `scale(${cropFlipHorizontal ? -1 : 1} ${cropFlipVertical ? -1 : 1})`, + `translate(${cropFlipHorizontal ? -imageWidth : 0} ${cropFlipVertical ? -imageHeight : 0})` + ]; + const transformed = ` + + +${titleNode ? titleNode.textContent : ""} + + +${originalNode.outerHTML}${markupSVG} + + +`; + resolve(transformed); + }; + fr.readAsText(blob2); +}); +var objectToImageData = (obj) => { + let imageData; + try { + imageData = new ImageData(obj.width, obj.height); + } catch (e2) { + const canvas = document.createElement("canvas"); + imageData = canvas.getContext("2d").createImageData(obj.width, obj.height); + } + imageData.data.set(obj.data); + return imageData; +}; +var TransformWorker = () => { + const TRANSFORMS = {resize, filter}; + const applyTransforms = (transforms2, imageData) => { + transforms2.forEach((transform2) => { + imageData = TRANSFORMS[transform2.type](imageData, transform2.data); + }); + return imageData; + }; + const transform = (data3, cb) => { + let transforms2 = data3.transforms; + let filterTransform = null; + transforms2.forEach((transform2) => { + if (transform2.type === "filter") { + filterTransform = transform2; + } + }); + if (filterTransform) { + let resizeTransform = null; + transforms2.forEach((transform2) => { + if (transform2.type === "resize") { + resizeTransform = transform2; + } + }); + if (resizeTransform) { + resizeTransform.data.matrix = filterTransform.data; + transforms2 = transforms2.filter((transform2) => transform2.type !== "filter"); + } + } + cb(applyTransforms(transforms2, data3.imageData)); + }; + self.onmessage = (e2) => { + transform(e2.data.message, (response) => { + self.postMessage({id: e2.data.id, message: response}, [response.data.buffer]); + }); + }; + const br = 1; + const bg = 1; + const bb = 1; + function applyFilterMatrix(index2, data3, m) { + const ir = data3[index2] / 255; + const ig = data3[index2 + 1] / 255; + const ib = data3[index2 + 2] / 255; + const ia = data3[index2 + 3] / 255; + const mr = ir * m[0] + ig * m[1] + ib * m[2] + ia * m[3] + m[4]; + const mg = ir * m[5] + ig * m[6] + ib * m[7] + ia * m[8] + m[9]; + const mb = ir * m[10] + ig * m[11] + ib * m[12] + ia * m[13] + m[14]; + const ma = ir * m[15] + ig * m[16] + ib * m[17] + ia * m[18] + m[19]; + const or = Math.max(0, mr * ma) + br * (1 - ma); + const og = Math.max(0, mg * ma) + bg * (1 - ma); + const ob = Math.max(0, mb * ma) + bb * (1 - ma); + data3[index2] = Math.max(0, Math.min(1, or)) * 255; + data3[index2 + 1] = Math.max(0, Math.min(1, og)) * 255; + data3[index2 + 2] = Math.max(0, Math.min(1, ob)) * 255; + } + const identityMatrix = self.JSON.stringify([ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0 + ]); + function isIdentityMatrix(filter2) { + return self.JSON.stringify(filter2 || []) === identityMatrix; + } + function filter(imageData, matrix2) { + if (!matrix2 || isIdentityMatrix(matrix2)) + return imageData; + const data3 = imageData.data; + const l = data3.length; + const m11 = matrix2[0]; + const m12 = matrix2[1]; + const m13 = matrix2[2]; + const m14 = matrix2[3]; + const m15 = matrix2[4]; + const m21 = matrix2[5]; + const m22 = matrix2[6]; + const m23 = matrix2[7]; + const m24 = matrix2[8]; + const m25 = matrix2[9]; + const m31 = matrix2[10]; + const m32 = matrix2[11]; + const m33 = matrix2[12]; + const m34 = matrix2[13]; + const m35 = matrix2[14]; + const m41 = matrix2[15]; + const m42 = matrix2[16]; + const m43 = matrix2[17]; + const m44 = matrix2[18]; + const m45 = matrix2[19]; + let index2 = 0, r2 = 0, g = 0, b = 0, a2 = 0, mr = 0, mg = 0, mb = 0, ma = 0, or = 0, og = 0, ob = 0; + for (; index2 < l; index2 += 4) { + r2 = data3[index2] / 255; + g = data3[index2 + 1] / 255; + b = data3[index2 + 2] / 255; + a2 = data3[index2 + 3] / 255; + mr = r2 * m11 + g * m12 + b * m13 + a2 * m14 + m15; + mg = r2 * m21 + g * m22 + b * m23 + a2 * m24 + m25; + mb = r2 * m31 + g * m32 + b * m33 + a2 * m34 + m35; + ma = r2 * m41 + g * m42 + b * m43 + a2 * m44 + m45; + or = Math.max(0, mr * ma) + br * (1 - ma); + og = Math.max(0, mg * ma) + bg * (1 - ma); + ob = Math.max(0, mb * ma) + bb * (1 - ma); + data3[index2] = Math.max(0, Math.min(1, or)) * 255; + data3[index2 + 1] = Math.max(0, Math.min(1, og)) * 255; + data3[index2 + 2] = Math.max(0, Math.min(1, ob)) * 255; + } + return imageData; + } + function resize(imageData, data3) { + let {mode = "contain", upscale = false, width, height, matrix: matrix2} = data3; + matrix2 = !matrix2 || isIdentityMatrix(matrix2) ? null : matrix2; + if (!width && !height) { + return filter(imageData, matrix2); + } + if (width === null) { + width = height; + } else if (height === null) { + height = width; + } + if (mode !== "force") { + let scalarWidth = width / imageData.width; + let scalarHeight = height / imageData.height; + let scalar = 1; + if (mode === "cover") { + scalar = Math.max(scalarWidth, scalarHeight); + } else if (mode === "contain") { + scalar = Math.min(scalarWidth, scalarHeight); + } + if (scalar > 1 && upscale === false) { + return filter(imageData, matrix2); + } + width = imageData.width * scalar; + height = imageData.height * scalar; + } + const originWidth = imageData.width; + const originHeight = imageData.height; + const targetWidth = Math.round(width); + const targetHeight = Math.round(height); + const inputData = imageData.data; + const outputData = new Uint8ClampedArray(targetWidth * targetHeight * 4); + const ratioWidth = originWidth / targetWidth; + const ratioHeight = originHeight / targetHeight; + const ratioWidthHalf = Math.ceil(ratioWidth * 0.5); + const ratioHeightHalf = Math.ceil(ratioHeight * 0.5); + for (let j = 0; j < targetHeight; j++) { + for (let i = 0; i < targetWidth; i++) { + let x2 = (i + j * targetWidth) * 4; + let weight = 0; + let weights = 0; + let weightsAlpha = 0; + let r2 = 0; + let g = 0; + let b = 0; + let a2 = 0; + let centerY = (j + 0.5) * ratioHeight; + for (let yy = Math.floor(j * ratioHeight); yy < (j + 1) * ratioHeight; yy++) { + let dy = Math.abs(centerY - (yy + 0.5)) / ratioHeightHalf; + let centerX = (i + 0.5) * ratioWidth; + let w0 = dy * dy; + for (let xx = Math.floor(i * ratioWidth); xx < (i + 1) * ratioWidth; xx++) { + let dx = Math.abs(centerX - (xx + 0.5)) / ratioWidthHalf; + let w = Math.sqrt(w0 + dx * dx); + if (w >= -1 && w <= 1) { + weight = 2 * w * w * w - 3 * w * w + 1; + if (weight > 0) { + dx = 4 * (xx + yy * originWidth); + let ref = inputData[dx + 3]; + a2 += weight * ref; + weightsAlpha += weight; + if (ref < 255) { + weight = weight * ref / 250; + } + r2 += weight * inputData[dx]; + g += weight * inputData[dx + 1]; + b += weight * inputData[dx + 2]; + weights += weight; + } + } + } + } + outputData[x2] = r2 / weights; + outputData[x2 + 1] = g / weights; + outputData[x2 + 2] = b / weights; + outputData[x2 + 3] = a2 / weightsAlpha; + matrix2 && applyFilterMatrix(x2, outputData, matrix2); + } + } + return { + data: outputData, + width: targetWidth, + height: targetHeight + }; + } +}; +var correctOrientation = (view, offset2) => { + if (view.getUint32(offset2 + 4, false) !== 1165519206) + return; + offset2 += 4; + const intelByteAligned = view.getUint16(offset2 += 6, false) === 18761; + offset2 += view.getUint32(offset2 + 4, intelByteAligned); + const tags = view.getUint16(offset2, intelByteAligned); + offset2 += 2; + for (let i = 0; i < tags; i++) { + if (view.getUint16(offset2 + i * 12, intelByteAligned) === 274) { + view.setUint16(offset2 + i * 12 + 8, 1, intelByteAligned); + return true; + } + } + return false; +}; +var readData = (data3) => { + const view = new DataView(data3); + if (view.getUint16(0) !== 65496) + return null; + let offset2 = 2; + let marker; + let markerLength; + let orientationCorrected = false; + while (offset2 < view.byteLength) { + marker = view.getUint16(offset2, false); + markerLength = view.getUint16(offset2 + 2, false) + 2; + const isData = marker >= 65504 && marker <= 65519 || marker === 65534; + if (!isData) { + break; + } + if (!orientationCorrected) { + orientationCorrected = correctOrientation(view, offset2, markerLength); + } + if (offset2 + markerLength > view.byteLength) { + break; + } + offset2 += markerLength; + } + return data3.slice(0, offset2); +}; +var getImageHead = (file2) => new Promise((resolve) => { + const reader = new FileReader(); + reader.onload = () => resolve(readData(reader.result) || null); + reader.readAsArrayBuffer(file2.slice(0, 256 * 1024)); +}); +var getBlobBuilder2 = () => { + return window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder; +}; +var createBlob2 = (arrayBuffer, mimeType) => { + const BB = getBlobBuilder2(); + if (BB) { + const bb = new BB(); + bb.append(arrayBuffer); + return bb.getBlob(mimeType); + } + return new Blob([arrayBuffer], { + type: mimeType + }); +}; +var getUniqueId2 = () => Math.random().toString(36).substr(2, 9); +var createWorker2 = (fn2) => { + const workerBlob = new Blob(["(", fn2.toString(), ")()"], {type: "application/javascript"}); + const workerURL = URL.createObjectURL(workerBlob); + const worker = new Worker(workerURL); + const trips = []; + return { + transfer: () => { + }, + post: (message, cb, transferList) => { + const id = getUniqueId2(); + trips[id] = cb; + worker.onmessage = (e2) => { + const cb2 = trips[e2.data.id]; + if (!cb2) + return; + cb2(e2.data.message); + delete trips[e2.data.id]; + }; + worker.postMessage({ + id, + message + }, transferList); + }, + terminate: () => { + worker.terminate(); + URL.revokeObjectURL(workerURL); + } + }; +}; +var loadImage3 = (url) => new Promise((resolve, reject) => { + const img = new Image(); + img.onload = () => { + resolve(img); + }; + img.onerror = (e2) => { + reject(e2); + }; + img.src = url; +}); +var chain = (funcs) => funcs.reduce((promise, func) => promise.then((result) => func().then(Array.prototype.concat.bind(result))), Promise.resolve([])); +var canvasApplyMarkup = (canvas, markup) => new Promise((resolve) => { + const size = { + width: canvas.width, + height: canvas.height + }; + const ctx = canvas.getContext("2d"); + const drawers = markup.sort(sortMarkupByZIndex2).map((item2) => () => new Promise((resolve2) => { + const result = TYPE_DRAW_ROUTES[item2[0]](ctx, size, item2[1], resolve2); + if (result) + resolve2(); + })); + chain(drawers).then(() => resolve(canvas)); +}); +var applyMarkupStyles = (ctx, styles3) => { + ctx.beginPath(); + ctx.lineCap = styles3["stroke-linecap"]; + ctx.lineJoin = styles3["stroke-linejoin"]; + ctx.lineWidth = styles3["stroke-width"]; + if (styles3["stroke-dasharray"].length) { + ctx.setLineDash(styles3["stroke-dasharray"].split(",")); + } + ctx.fillStyle = styles3["fill"]; + ctx.strokeStyle = styles3["stroke"]; + ctx.globalAlpha = styles3.opacity || 1; +}; +var drawMarkupStyles = (ctx) => { + ctx.fill(); + ctx.stroke(); + ctx.globalAlpha = 1; +}; +var drawRect = (ctx, size, markup) => { + const rect = getMarkupRect2(markup, size); + const styles3 = getMarkupStyles2(markup, size); + applyMarkupStyles(ctx, styles3); + ctx.rect(rect.x, rect.y, rect.width, rect.height); + drawMarkupStyles(ctx, styles3); + return true; +}; +var drawEllipse = (ctx, size, markup) => { + const rect = getMarkupRect2(markup, size); + const styles3 = getMarkupStyles2(markup, size); + applyMarkupStyles(ctx, styles3); + const x = rect.x, y = rect.y, w = rect.width, h = rect.height, kappa = 0.5522848, ox = w / 2 * kappa, oy = h / 2 * kappa, xe = x + w, ye = y + h, xm = x + w / 2, ym = y + h / 2; + ctx.moveTo(x, ym); + ctx.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y); + ctx.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym); + ctx.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye); + ctx.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym); + drawMarkupStyles(ctx, styles3); + return true; +}; +var drawImage = (ctx, size, markup, done) => { + const rect = getMarkupRect2(markup, size); + const styles3 = getMarkupStyles2(markup, size); + applyMarkupStyles(ctx, styles3); + const image = new Image(); + const isCrossOriginImage = new URL(markup.src, window.location.href).origin !== window.location.origin; + if (isCrossOriginImage) + image.crossOrigin = ""; + image.onload = () => { + if (markup.fit === "cover") { + const ar = rect.width / rect.height; + const width = ar > 1 ? image.width : image.height * ar; + const height = ar > 1 ? image.width / ar : image.height; + const x = image.width * 0.5 - width * 0.5; + const y = image.height * 0.5 - height * 0.5; + ctx.drawImage(image, x, y, width, height, rect.x, rect.y, rect.width, rect.height); + } else if (markup.fit === "contain") { + const scalar = Math.min(rect.width / image.width, rect.height / image.height); + const width = scalar * image.width; + const height = scalar * image.height; + const x = rect.x + rect.width * 0.5 - width * 0.5; + const y = rect.y + rect.height * 0.5 - height * 0.5; + ctx.drawImage(image, 0, 0, image.width, image.height, x, y, width, height); + } else { + ctx.drawImage(image, 0, 0, image.width, image.height, rect.x, rect.y, rect.width, rect.height); + } + drawMarkupStyles(ctx, styles3); + done(); + }; + image.src = markup.src; +}; +var drawText = (ctx, size, markup) => { + const rect = getMarkupRect2(markup, size); + const styles3 = getMarkupStyles2(markup, size); + applyMarkupStyles(ctx, styles3); + const fontSize = getMarkupValue2(markup.fontSize, size); + const fontFamily = markup.fontFamily || "sans-serif"; + const fontWeight = markup.fontWeight || "normal"; + const textAlign = markup.textAlign || "left"; + ctx.font = `${fontWeight} ${fontSize}px ${fontFamily}`; + ctx.textAlign = textAlign; + ctx.fillText(markup.text, rect.x, rect.y); + drawMarkupStyles(ctx, styles3); + return true; +}; +var drawPath = (ctx, size, markup) => { + const styles3 = getMarkupStyles2(markup, size); + applyMarkupStyles(ctx, styles3); + ctx.beginPath(); + const points = markup.points.map((point) => ({ + x: getMarkupValue2(point.x, size, 1, "width"), + y: getMarkupValue2(point.y, size, 1, "height") + })); + ctx.moveTo(points[0].x, points[0].y); + const l = points.length; + for (let i = 1; i < l; i++) { + ctx.lineTo(points[i].x, points[i].y); + } + drawMarkupStyles(ctx, styles3); + return true; +}; +var drawLine = (ctx, size, markup) => { + const rect = getMarkupRect2(markup, size); + const styles3 = getMarkupStyles2(markup, size); + applyMarkupStyles(ctx, styles3); + ctx.beginPath(); + const origin = { + x: rect.x, + y: rect.y + }; + const target = { + x: rect.x + rect.width, + y: rect.y + rect.height + }; + ctx.moveTo(origin.x, origin.y); + ctx.lineTo(target.x, target.y); + const v = vectorNormalize2({ + x: target.x - origin.x, + y: target.y - origin.y + }); + const l = 0.04 * Math.min(size.width, size.height); + if (markup.lineDecoration.indexOf("arrow-begin") !== -1) { + const arrowBeginRotationPoint = vectorMultiply2(v, l); + const arrowBeginCenter = vectorAdd2(origin, arrowBeginRotationPoint); + const arrowBeginA = vectorRotate2(origin, 2, arrowBeginCenter); + const arrowBeginB = vectorRotate2(origin, -2, arrowBeginCenter); + ctx.moveTo(arrowBeginA.x, arrowBeginA.y); + ctx.lineTo(origin.x, origin.y); + ctx.lineTo(arrowBeginB.x, arrowBeginB.y); + } + if (markup.lineDecoration.indexOf("arrow-end") !== -1) { + const arrowEndRotationPoint = vectorMultiply2(v, -l); + const arrowEndCenter = vectorAdd2(target, arrowEndRotationPoint); + const arrowEndA = vectorRotate2(target, 2, arrowEndCenter); + const arrowEndB = vectorRotate2(target, -2, arrowEndCenter); + ctx.moveTo(arrowEndA.x, arrowEndA.y); + ctx.lineTo(target.x, target.y); + ctx.lineTo(arrowEndB.x, arrowEndB.y); + } + drawMarkupStyles(ctx, styles3); + return true; +}; +var TYPE_DRAW_ROUTES = { + rect: drawRect, + ellipse: drawEllipse, + image: drawImage, + text: drawText, + line: drawLine, + path: drawPath +}; +var imageDataToCanvas = (imageData) => { + const image = document.createElement("canvas"); + image.width = imageData.width; + image.height = imageData.height; + const ctx = image.getContext("2d"); + ctx.putImageData(imageData, 0, 0); + return image; +}; +var transformImage = (file2, instructions, options2 = {}) => new Promise((resolve, reject) => { + if (!file2 || !isImage$1(file2)) + return reject({status: "not an image file", file: file2}); + const {stripImageHead, beforeCreateBlob, afterCreateBlob, canvasMemoryLimit} = options2; + const {crop, size, filter, markup, output} = instructions; + const orientation = instructions.image && instructions.image.orientation ? Math.max(1, Math.min(8, instructions.image.orientation)) : null; + const qualityAsPercentage = output && output.quality; + const quality = qualityAsPercentage === null ? null : qualityAsPercentage / 100; + const type = output && output.type || null; + const background = output && output.background || null; + const transforms2 = []; + if (size && (typeof size.width === "number" || typeof size.height === "number")) { + transforms2.push({type: "resize", data: size}); + } + if (filter && filter.length === 20) { + transforms2.push({type: "filter", data: filter}); + } + const resolveWithBlob = (blob2) => { + const promisedBlob = afterCreateBlob ? afterCreateBlob(blob2) : blob2; + Promise.resolve(promisedBlob).then(resolve); + }; + const toBlob = (imageData, options3) => { + const canvas = imageDataToCanvas(imageData); + const promisedCanvas = markup.length ? canvasApplyMarkup(canvas, markup) : canvas; + Promise.resolve(promisedCanvas).then((canvas2) => { + canvasToBlob(canvas2, options3, beforeCreateBlob).then((blob2) => { + canvasRelease(canvas2); + if (stripImageHead) + return resolveWithBlob(blob2); + getImageHead(file2).then((imageHead) => { + if (imageHead !== null) { + blob2 = new Blob([imageHead, blob2.slice(20)], {type: blob2.type}); + } + resolveWithBlob(blob2); + }); + }).catch(reject); + }); + }; + if (/svg/.test(file2.type) && type === null) { + return cropSVG(file2, crop, markup, {background}).then((text3) => { + resolve(createBlob2(text3, "image/svg+xml")); + }); + } + const url = URL.createObjectURL(file2); + loadImage3(url).then((image) => { + URL.revokeObjectURL(url); + const imageData = imageToImageData(image, orientation, crop, { + canvasMemoryLimit, + background + }); + const outputFormat = { + quality, + type: type || file2.type + }; + if (!transforms2.length) { + return toBlob(imageData, outputFormat); + } + const worker = createWorker2(TransformWorker); + worker.post({ + transforms: transforms2, + imageData + }, (response) => { + toBlob(objectToImageData(response), outputFormat); + worker.terminate(); + }, [imageData.data.buffer]); + }).catch(reject); +}); +var MARKUP_RECT2 = ["x", "y", "left", "top", "right", "bottom", "width", "height"]; +var toOptionalFraction2 = (value) => typeof value === "string" && /%/.test(value) ? parseFloat(value) / 100 : value; +var prepareMarkup2 = (markup) => { + const [type, props] = markup; + const rect = props.points ? {} : MARKUP_RECT2.reduce((prev, curr) => { + prev[curr] = toOptionalFraction2(props[curr]); + return prev; + }, {}); + return [ + type, + { + zIndex: 0, + ...props, + ...rect + } + ]; +}; +var getImageSize3 = (file2) => new Promise((resolve, reject) => { + const imageElement = new Image(); + imageElement.src = URL.createObjectURL(file2); + const measure = () => { + const width = imageElement.naturalWidth; + const height = imageElement.naturalHeight; + const hasSize = width && height; + if (!hasSize) + return; + URL.revokeObjectURL(imageElement.src); + clearInterval(intervalId); + resolve({width, height}); + }; + imageElement.onerror = (err) => { + URL.revokeObjectURL(imageElement.src); + clearInterval(intervalId); + reject(err); + }; + const intervalId = setInterval(measure, 1); + measure(); +}); +if (typeof window !== "undefined" && typeof window.document !== "undefined") { + if (!HTMLCanvasElement.prototype.toBlob) { + Object.defineProperty(HTMLCanvasElement.prototype, "toBlob", { + value: function(cb, type, quality) { + const canvas = this; + setTimeout(() => { + const dataURL = canvas.toDataURL(type, quality).split(",")[1]; + const binStr = atob(dataURL); + let index2 = binStr.length; + const data3 = new Uint8Array(index2); + while (index2--) { + data3[index2] = binStr.charCodeAt(index2); + } + cb(new Blob([data3], {type: type || "image/png"})); + }); + } + }); + } +} +var isBrowser8 = typeof window !== "undefined" && typeof window.document !== "undefined"; +var isIOS = isBrowser8 && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; +var plugin7 = ({addFilter: addFilter2, utils}) => { + const {Type: Type2, forin: forin2, getFileFromBlob: getFileFromBlob2, isFile: isFile2} = utils; + const TRANSFORM_LIST = ["crop", "resize", "filter", "markup", "output"]; + const createVariantCreator = (updateMetadata) => (transform, file2, metadata) => transform(file2, updateMetadata ? updateMetadata(metadata) : metadata); + const isDefaultCrop = (crop) => crop.aspectRatio === null && crop.rotation === 0 && crop.zoom === 1 && crop.center && crop.center.x === 0.5 && crop.center.y === 0.5 && crop.flip && crop.flip.horizontal === false && crop.flip.vertical === false; + addFilter2("SHOULD_PREPARE_OUTPUT", (shouldPrepareOutput, {query}) => new Promise((resolve) => { + resolve(!query("IS_ASYNC")); + })); + const shouldTransformFile = (query, file2, item2) => new Promise((resolve) => { + if (!query("GET_ALLOW_IMAGE_TRANSFORM") || item2.archived || !isFile2(file2) || !isImage3(file2)) { + return resolve(false); + } + getImageSize3(file2).then(() => { + const fn2 = query("GET_IMAGE_TRANSFORM_IMAGE_FILTER"); + if (fn2) { + const filterResult = fn2(file2); + if (filterResult == null) { + return handleRevert(true); + } + if (typeof filterResult === "boolean") { + return resolve(filterResult); + } + if (typeof filterResult.then === "function") { + return filterResult.then(resolve); + } + } + resolve(true); + }).catch((err) => { + resolve(false); + }); + }); + addFilter2("DID_CREATE_ITEM", (item2, {query, dispatch: dispatch2}) => { + if (!query("GET_ALLOW_IMAGE_TRANSFORM")) + return; + item2.extend("requestPrepare", () => new Promise((resolve, reject) => { + dispatch2("REQUEST_PREPARE_OUTPUT", { + query: item2.id, + item: item2, + success: resolve, + failure: reject + }, true); + })); + }); + addFilter2("PREPARE_OUTPUT", (file2, {query, item: item2}) => new Promise((resolve) => { + shouldTransformFile(query, file2, item2).then((shouldTransform) => { + if (!shouldTransform) + return resolve(file2); + const variants = []; + if (query("GET_IMAGE_TRANSFORM_VARIANTS_INCLUDE_ORIGINAL")) { + variants.push(() => new Promise((resolve2) => { + resolve2({ + name: query("GET_IMAGE_TRANSFORM_VARIANTS_ORIGINAL_NAME"), + file: file2 + }); + })); + } + if (query("GET_IMAGE_TRANSFORM_VARIANTS_INCLUDE_DEFAULT")) { + variants.push((transform2, file3, metadata) => new Promise((resolve2) => { + transform2(file3, metadata).then((file4) => resolve2({ + name: query("GET_IMAGE_TRANSFORM_VARIANTS_DEFAULT_NAME"), + file: file4 + })); + })); + } + const variantsDefinition = query("GET_IMAGE_TRANSFORM_VARIANTS") || {}; + forin2(variantsDefinition, (key, fn2) => { + const createVariant = createVariantCreator(fn2); + variants.push((transform2, file3, metadata) => new Promise((resolve2) => { + createVariant(transform2, file3, metadata).then((file4) => resolve2({name: key, file: file4})); + })); + }); + const qualityAsPercentage = query("GET_IMAGE_TRANSFORM_OUTPUT_QUALITY"); + const qualityMode = query("GET_IMAGE_TRANSFORM_OUTPUT_QUALITY_MODE"); + const quality = qualityAsPercentage === null ? null : qualityAsPercentage / 100; + const type = query("GET_IMAGE_TRANSFORM_OUTPUT_MIME_TYPE"); + const clientTransforms = query("GET_IMAGE_TRANSFORM_CLIENT_TRANSFORMS") || TRANSFORM_LIST; + item2.setMetadata("output", { + type, + quality, + client: clientTransforms + }, true); + const transform = (file3, metadata) => new Promise((resolve2, reject) => { + const filteredMetadata = {...metadata}; + Object.keys(filteredMetadata).filter((instruction) => instruction !== "exif").forEach((instruction) => { + if (clientTransforms.indexOf(instruction) === -1) { + delete filteredMetadata[instruction]; + } + }); + const {resize, exif, output, crop, filter, markup} = filteredMetadata; + const instructions = { + image: { + orientation: exif ? exif.orientation : null + }, + output: output && (output.type || typeof output.quality === "number" || output.background) ? { + type: output.type, + quality: typeof output.quality === "number" ? output.quality * 100 : null, + background: output.background || query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR") || null + } : void 0, + size: resize && (resize.size.width || resize.size.height) ? { + mode: resize.mode, + upscale: resize.upscale, + ...resize.size + } : void 0, + crop: crop && !isDefaultCrop(crop) ? { + ...crop + } : void 0, + markup: markup && markup.length ? markup.map(prepareMarkup2) : [], + filter + }; + if (instructions.output) { + const willChangeType = output.type ? output.type !== file3.type : false; + const canChangeQuality = /\/jpe?g$/.test(file3.type); + const willChangeQuality = output.quality !== null ? canChangeQuality && qualityMode === "always" : false; + const willModifyImageData = !!(instructions.size || instructions.crop || instructions.filter || willChangeType || willChangeQuality); + if (!willModifyImageData) + return resolve2(file3); + } + const options2 = { + beforeCreateBlob: query("GET_IMAGE_TRANSFORM_BEFORE_CREATE_BLOB"), + afterCreateBlob: query("GET_IMAGE_TRANSFORM_AFTER_CREATE_BLOB"), + canvasMemoryLimit: query("GET_IMAGE_TRANSFORM_CANVAS_MEMORY_LIMIT"), + stripImageHead: query("GET_IMAGE_TRANSFORM_OUTPUT_STRIP_IMAGE_HEAD") + }; + transformImage(file3, instructions, options2).then((blob2) => { + const out = getFileFromBlob2(blob2, renameFileToMatchMimeType(file3.name, getValidOutputMimeType(blob2.type))); + resolve2(out); + }).catch(reject); + }); + const variantPromises = variants.map((create3) => create3(transform, file2, item2.getMetadata())); + Promise.all(variantPromises).then((files) => { + resolve(files.length === 1 && files[0].name === null ? files[0].file : files); + }); + }); + })); + return { + options: { + allowImageTransform: [true, Type2.BOOLEAN], + imageTransformImageFilter: [null, Type2.FUNCTION], + imageTransformOutputMimeType: [null, Type2.STRING], + imageTransformOutputQuality: [null, Type2.INT], + imageTransformOutputStripImageHead: [true, Type2.BOOLEAN], + imageTransformClientTransforms: [null, Type2.ARRAY], + imageTransformOutputQualityMode: ["always", Type2.STRING], + imageTransformVariants: [null, Type2.OBJECT], + imageTransformVariantsIncludeDefault: [true, Type2.BOOLEAN], + imageTransformVariantsDefaultName: [null, Type2.STRING], + imageTransformVariantsIncludeOriginal: [false, Type2.BOOLEAN], + imageTransformVariantsOriginalName: ["original_", Type2.STRING], + imageTransformBeforeCreateBlob: [null, Type2.FUNCTION], + imageTransformAfterCreateBlob: [null, Type2.FUNCTION], + imageTransformCanvasMemoryLimit: [isBrowser8 && isIOS ? 4096 * 4096 : null, Type2.INT], + imageTransformCanvasBackgroundColor: [null, Type2.STRING] + } + }; +}; +if (isBrowser8) { + document.dispatchEvent(new CustomEvent("FilePond:pluginloaded", {detail: plugin7})); +} +var filepond_plugin_image_transform_esm_default = plugin7; + +// node_modules/filepond-plugin-media-preview/dist/filepond-plugin-media-preview.esm.js +/*! + * FilePondPluginMediaPreview 1.0.11 + * Licensed under MIT, https://opensource.org/licenses/MIT/ + * Please visit undefined for details. + */ +var isPreviewableVideo = (file2) => /^video/.test(file2.type); +var isPreviewableAudio = (file2) => /^audio/.test(file2.type); +var AudioPlayer = class { + constructor(mediaEl, audioElems) { + this.mediaEl = mediaEl; + this.audioElems = audioElems; + this.onplayhead = false; + this.duration = 0; + this.timelineWidth = this.audioElems.timeline.offsetWidth - this.audioElems.playhead.offsetWidth; + this.moveplayheadFn = this.moveplayhead.bind(this); + this.registerListeners(); + } + registerListeners() { + this.mediaEl.addEventListener("timeupdate", this.timeUpdate.bind(this), false); + this.mediaEl.addEventListener("canplaythrough", () => this.duration = this.mediaEl.duration, false); + this.audioElems.timeline.addEventListener("click", this.timelineClicked.bind(this), false); + this.audioElems.button.addEventListener("click", this.play.bind(this)); + this.audioElems.playhead.addEventListener("mousedown", this.mouseDown.bind(this), false); + window.addEventListener("mouseup", this.mouseUp.bind(this), false); + } + play() { + if (this.mediaEl.paused) { + this.mediaEl.play(); + } else { + this.mediaEl.pause(); + } + this.audioElems.button.classList.toggle("play"); + this.audioElems.button.classList.toggle("pause"); + } + timeUpdate() { + let playPercent = this.mediaEl.currentTime / this.duration * 100; + this.audioElems.playhead.style.marginLeft = playPercent + "%"; + if (this.mediaEl.currentTime === this.duration) { + this.audioElems.button.classList.toggle("play"); + this.audioElems.button.classList.toggle("pause"); + } + } + moveplayhead(event) { + let newMargLeft = event.clientX - this.getPosition(this.audioElems.timeline); + if (newMargLeft >= 0 && newMargLeft <= this.timelineWidth) { + this.audioElems.playhead.style.marginLeft = newMargLeft + "px"; + } + if (newMargLeft < 0) { + this.audioElems.playhead.style.marginLeft = "0px"; + } + if (newMargLeft > this.timelineWidth) { + this.audioElems.playhead.style.marginLeft = this.timelineWidth - 4 + "px"; + } + } + timelineClicked(event) { + this.moveplayhead(event); + this.mediaEl.currentTime = this.duration * this.clickPercent(event); + } + mouseDown() { + this.onplayhead = true; + window.addEventListener("mousemove", this.moveplayheadFn, true); + this.mediaEl.removeEventListener("timeupdate", this.timeUpdate.bind(this), false); + } + mouseUp(event) { + window.removeEventListener("mousemove", this.moveplayheadFn, true); + if (this.onplayhead == true) { + this.moveplayhead(event); + this.mediaEl.currentTime = this.duration * this.clickPercent(event); + this.mediaEl.addEventListener("timeupdate", this.timeUpdate.bind(this), false); + } + this.onplayhead = false; + } + clickPercent(event) { + return (event.clientX - this.getPosition(this.audioElems.timeline)) / this.timelineWidth; + } + getPosition(el) { + return el.getBoundingClientRect().left; + } +}; +var createMediaView = (_) => _.utils.createView({ + name: "media-preview", + tag: "div", + ignoreRect: true, + create: ({root: root2, props}) => { + const {id} = props; + const item2 = root2.query("GET_ITEM", {id: props.id}); + let tagName = isPreviewableAudio(item2.file) ? "audio" : "video"; + root2.ref.media = document.createElement(tagName); + root2.ref.media.setAttribute("controls", true); + root2.element.appendChild(root2.ref.media); + if (isPreviewableAudio(item2.file)) { + let docfrag = document.createDocumentFragment(); + root2.ref.audio = []; + root2.ref.audio.container = document.createElement("div"), root2.ref.audio.button = document.createElement("span"), root2.ref.audio.timeline = document.createElement("div"), root2.ref.audio.playhead = document.createElement("div"); + root2.ref.audio.container.className = "audioplayer"; + root2.ref.audio.button.className = "playpausebtn play"; + root2.ref.audio.timeline.className = "timeline"; + root2.ref.audio.playhead.className = "playhead"; + root2.ref.audio.timeline.appendChild(root2.ref.audio.playhead); + root2.ref.audio.container.appendChild(root2.ref.audio.button); + root2.ref.audio.container.appendChild(root2.ref.audio.timeline); + docfrag.appendChild(root2.ref.audio.container); + root2.element.appendChild(docfrag); + } + }, + write: _.utils.createRoute({ + DID_MEDIA_PREVIEW_LOAD: ({root: root2, props}) => { + const {id} = props; + const item2 = root2.query("GET_ITEM", {id: props.id}); + if (!item2) + return; + let URL2 = window.URL || window.webkitURL; + let blob2 = new Blob([item2.file], {type: item2.file.type}); + root2.ref.media.type = item2.file.type; + root2.ref.media.src = item2.file.mock && item2.file.url || URL2.createObjectURL(blob2); + if (isPreviewableAudio(item2.file)) { + new AudioPlayer(root2.ref.media, root2.ref.audio); + } + root2.ref.media.addEventListener("loadeddata", () => { + let height = 75; + if (isPreviewableVideo(item2.file)) { + let containerWidth = root2.ref.media.offsetWidth; + let factor = root2.ref.media.videoWidth / containerWidth; + height = root2.ref.media.videoHeight / factor; + } + root2.dispatch("DID_UPDATE_PANEL_HEIGHT", { + id: props.id, + height + }); + }, false); + } + }) +}); +var createMediaWrapperView = (_) => { + const didCreatePreviewContainer = ({root: root2, props}) => { + const {id} = props; + const item2 = root2.query("GET_ITEM", id); + if (!item2) + return; + root2.dispatch("DID_MEDIA_PREVIEW_LOAD", { + id + }); + }; + const create3 = ({root: root2, props}) => { + const media = createMediaView(_); + root2.ref.media = root2.appendChildView(root2.createChildView(media, { + id: props.id + })); + }; + return _.utils.createView({ + name: "media-preview-wrapper", + create: create3, + write: _.utils.createRoute({ + DID_MEDIA_PREVIEW_CONTAINER_CREATE: didCreatePreviewContainer + }) + }); +}; +var plugin8 = (fpAPI) => { + const {addFilter: addFilter2, utils} = fpAPI; + const {Type: Type2, createRoute: createRoute2} = utils; + const mediaWrapperView = createMediaWrapperView(fpAPI); + addFilter2("CREATE_VIEW", (viewAPI) => { + const {is: is2, view, query} = viewAPI; + if (!is2("file")) { + return; + } + const didLoadItem2 = ({root: root2, props}) => { + const {id} = props; + const item2 = query("GET_ITEM", id); + const allowVideoPreview = query("GET_ALLOW_VIDEO_PREVIEW"); + const allowAudioPreview = query("GET_ALLOW_AUDIO_PREVIEW"); + if (!item2 || item2.archived || (!isPreviewableVideo(item2.file) || !allowVideoPreview) && (!isPreviewableAudio(item2.file) || !allowAudioPreview)) { + return; + } + root2.ref.mediaPreview = view.appendChildView(view.createChildView(mediaWrapperView, {id})); + root2.dispatch("DID_MEDIA_PREVIEW_CONTAINER_CREATE", {id}); + }; + view.registerWriter(createRoute2({ + DID_LOAD_ITEM: didLoadItem2 + }, ({root: root2, props}) => { + const {id} = props; + const item2 = query("GET_ITEM", id); + const allowVideoPreview = root2.query("GET_ALLOW_VIDEO_PREVIEW"); + const allowAudioPreview = root2.query("GET_ALLOW_AUDIO_PREVIEW"); + if (!item2 || (!isPreviewableVideo(item2.file) || !allowVideoPreview) && (!isPreviewableAudio(item2.file) || !allowAudioPreview) || root2.rect.element.hidden) + return; + })); + }); + return { + options: { + allowVideoPreview: [true, Type2.BOOLEAN], + allowAudioPreview: [true, Type2.BOOLEAN] + } + }; +}; +var isBrowser9 = typeof window !== "undefined" && typeof window.document !== "undefined"; +if (isBrowser9) { + document.dispatchEvent(new CustomEvent("FilePond:pluginloaded", {detail: plugin8})); +} + +// node_modules/filepond/locale/ar-ar.js +var ar_ar_default = { + labelIdle: '\u0627\u0633\u062D\u0628 \u0648 \u0627\u062F\u0631\u062C \u0645\u0644\u0641\u0627\u062A\u0643 \u0623\u0648 \u062A\u0635\u0641\u062D ', + labelInvalidField: "\u0627\u0644\u062D\u0642\u0644 \u064A\u062D\u062A\u0648\u064A \u0639\u0644\u0649 \u0645\u0644\u0641\u0627\u062A \u063A\u064A\u0631 \u0635\u0627\u0644\u062D\u0629", + labelFileWaitingForSize: "\u0628\u0627\u0646\u062A\u0638\u0627\u0631 \u0627\u0644\u062D\u062C\u0645", + labelFileSizeNotAvailable: "\u0627\u0644\u062D\u062C\u0645 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D", + labelFileLoading: "\u0628\u0627\u0644\u0625\u0646\u062A\u0638\u0627\u0631", + labelFileLoadError: "\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062A\u062D\u0645\u064A\u0644", + labelFileProcessing: "\u064A\u062A\u0645 \u0627\u0644\u0631\u0641\u0639", + labelFileProcessingComplete: "\u062A\u0645 \u0627\u0644\u0631\u0641\u0639", + labelFileProcessingAborted: "\u062A\u0645 \u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u0631\u0641\u0639", + labelFileProcessingError: "\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u0631\u0641\u0639", + labelFileProcessingRevertError: "\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062A\u0631\u0627\u062C\u0639", + labelFileRemoveError: "\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u062D\u0630\u0641", + labelTapToCancel: "\u0627\u0646\u0642\u0631 \u0644\u0644\u0625\u0644\u063A\u0627\u0621", + labelTapToRetry: "\u0627\u0646\u0642\u0631 \u0644\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629", + labelTapToUndo: "\u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u0631\u0627\u062C\u0639", + labelButtonRemoveItem: "\u0645\u0633\u062D", + labelButtonAbortItemLoad: "\u0625\u0644\u063A\u0627\u0621", + labelButtonRetryItemLoad: "\u0625\u0639\u0627\u062F\u0629", + labelButtonAbortItemProcessing: "\u0625\u0644\u063A\u0627\u0621", + labelButtonUndoItemProcessing: "\u062A\u0631\u0627\u062C\u0639", + labelButtonRetryItemProcessing: "\u0625\u0639\u0627\u062F\u0629", + labelButtonProcessItem: "\u0631\u0641\u0639", + labelMaxFileSizeExceeded: "\u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u0627", + labelMaxFileSize: "\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641 \u0627\u0644\u0623\u0642\u0635\u0649: {filesize}", + labelMaxTotalFileSizeExceeded: "\u062A\u0645 \u062A\u062C\u0627\u0648\u0632 \u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u062D\u062C\u0645 \u0627\u0644\u0625\u062C\u0645\u0627\u0644\u064A", + labelMaxTotalFileSize: "\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641: {filesize}", + labelFileTypeNotAllowed: "\u0645\u0644\u0641 \u0645\u0646 \u0646\u0648\u0639 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D", + fileValidateTypeLabelExpectedTypes: "\u062A\u062A\u0648\u0642\u0639 {allButLastType} \u0645\u0646 {lastType}", + imageValidateSizeLabelFormatError: "\u0646\u0648\u0639 \u0627\u0644\u0635\u0648\u0631\u0629 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645", + imageValidateSizeLabelImageSizeTooSmall: "\u0627\u0644\u0635\u0648\u0631\u0629 \u0635\u063A\u064A\u0631 \u062C\u062F\u0627", + imageValidateSizeLabelImageSizeTooBig: "\u0627\u0644\u0635\u0648\u0631\u0629 \u0643\u0628\u064A\u0631\u0629 \u062C\u062F\u0627", + imageValidateSizeLabelExpectedMinSize: "\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u062F\u0646\u0649 \u0644\u0644\u0623\u0628\u0639\u0627\u062F \u0647\u0648: {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u0623\u0628\u0639\u0627\u062F \u0647\u0648: {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "\u0627\u0644\u062F\u0642\u0629 \u0636\u0639\u064A\u0641\u0629 \u062C\u062F\u0627", + imageValidateSizeLabelImageResolutionTooHigh: "\u0627\u0644\u062F\u0642\u0629 \u0645\u0631\u062A\u0641\u0639\u0629 \u062C\u062F\u0627", + imageValidateSizeLabelExpectedMinResolution: "\u0623\u0642\u0644 \u062F\u0642\u0629: {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "\u0623\u0642\u0635\u0649 \u062F\u0642\u0629: {maxResolution}" +}; + +// node_modules/filepond/locale/cs-cz.js +var cs_cz_default = { + labelIdle: 'P\u0159et\xE1hn\u011Bte soubor sem (drag&drop) nebo Vyhledat ', + labelInvalidField: "Pole obsahuje chybn\xE9 soubory", + labelFileWaitingForSize: "Zji\u0161\u0165uje se velikost", + labelFileSizeNotAvailable: "Velikost nen\xED zn\xE1m\xE1", + labelFileLoading: "P\u0159en\xE1\u0161\xED se", + labelFileLoadError: "Chyba p\u0159i p\u0159enosu", + labelFileProcessing: "Prob\xEDh\xE1 upload", + labelFileProcessingComplete: "Upload dokon\u010Den", + labelFileProcessingAborted: "Upload stornov\xE1n", + labelFileProcessingError: "Chyba p\u0159i uploadu", + labelFileProcessingRevertError: "Chyba p\u0159i obnov\u011B", + labelFileRemoveError: "Chyba p\u0159i odstran\u011Bn\xED", + labelTapToCancel: "klepn\u011Bte pro storno", + labelTapToRetry: "klepn\u011Bte pro opakov\xE1n\xED", + labelTapToUndo: "klepn\u011Bte pro vr\xE1cen\xED", + labelButtonRemoveItem: "Odstranit", + labelButtonAbortItemLoad: "Storno", + labelButtonRetryItemLoad: "Opakovat", + labelButtonAbortItemProcessing: "Zp\u011Bt", + labelButtonUndoItemProcessing: "Vr\xE1tit", + labelButtonRetryItemProcessing: "Opakovat", + labelButtonProcessItem: "Upload", + labelMaxFileSizeExceeded: "Soubor je p\u0159\xEDli\u0161 velk\xFD", + labelMaxFileSize: "Nejv\u011Bt\u0161\xED velikost souboru je {filesize}", + labelMaxTotalFileSizeExceeded: "P\u0159ekro\u010Dena maxim\xE1ln\xED celkov\xE1 velikost souboru", + labelMaxTotalFileSize: "Maxim\xE1ln\xED celkov\xE1 velikost souboru je {filesize}", + labelFileTypeNotAllowed: "Soubor je nespr\xE1vn\xE9ho typu", + fileValidateTypeLabelExpectedTypes: "O\u010Dek\xE1v\xE1 se {allButLastType} nebo {lastType}", + imageValidateSizeLabelFormatError: "Obr\xE1zek tohoto typu nen\xED podporov\xE1n", + imageValidateSizeLabelImageSizeTooSmall: "Obr\xE1zek je p\u0159\xEDli\u0161 mal\xFD", + imageValidateSizeLabelImageSizeTooBig: "Obr\xE1zek je p\u0159\xEDli\u0161 velk\xFD", + imageValidateSizeLabelExpectedMinSize: "Minim\xE1ln\xED rozm\u011Br je {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maxim\xE1ln\xED rozm\u011Br je {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Rozli\u0161en\xED je p\u0159\xEDli\u0161 mal\xE9", + imageValidateSizeLabelImageResolutionTooHigh: "Rozli\u0161en\xED je p\u0159\xEDli\u0161 velk\xE9", + imageValidateSizeLabelExpectedMinResolution: "Minim\xE1ln\xED rozli\u0161en\xED je {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maxim\xE1ln\xED rozli\u0161en\xED je {maxResolution}" +}; + +// node_modules/filepond/locale/da-dk.js +var da_dk_default = { + labelIdle: 'Tr\xE6k & slip filer eller Gennemse ', + labelInvalidField: "Felt indeholder ugyldige filer", + labelFileWaitingForSize: "Venter p\xE5 st\xF8rrelse", + labelFileSizeNotAvailable: "St\xF8rrelse ikke tilg\xE6ngelig", + labelFileLoading: "Loader", + labelFileLoadError: "Load fejlede", + labelFileProcessing: "Uploader", + labelFileProcessingComplete: "Upload f\xE6rdig", + labelFileProcessingAborted: "Upload annulleret", + labelFileProcessingError: "Upload fejlede", + labelFileProcessingRevertError: "Fortryd fejlede", + labelFileRemoveError: "Fjern fejlede", + labelTapToCancel: "tryk for at annullere", + labelTapToRetry: "tryk for at pr\xF8ve igen", + labelTapToUndo: "tryk for at fortryde", + labelButtonRemoveItem: "Fjern", + labelButtonAbortItemLoad: "Annuller", + labelButtonRetryItemLoad: "Fors\xF8g igen", + labelButtonAbortItemProcessing: "Annuller", + labelButtonUndoItemProcessing: "Fortryd", + labelButtonRetryItemProcessing: "Pr\xF8v igen", + labelButtonProcessItem: "Upload", + labelMaxFileSizeExceeded: "Filen er for stor", + labelMaxFileSize: "Maksimal filst\xF8rrelse er {filesize}", + labelMaxTotalFileSizeExceeded: "Maksimal totalst\xF8rrelse overskredet", + labelMaxTotalFileSize: "Maksimal total filst\xF8rrelse er {filesize}", + labelFileTypeNotAllowed: "Ugyldig filtype", + fileValidateTypeLabelExpectedTypes: "Forventer {allButLastType} eller {lastType}", + imageValidateSizeLabelFormatError: "Ugyldigt format", + imageValidateSizeLabelImageSizeTooSmall: "Billedet er for lille", + imageValidateSizeLabelImageSizeTooBig: "Billedet er for stort", + imageValidateSizeLabelExpectedMinSize: "Minimum st\xF8rrelse er {minBredde} \xD7 {minH\xF8jde}", + imageValidateSizeLabelExpectedMaxSize: "Maksimal st\xF8rrelse er {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "For lav opl\xF8sning", + imageValidateSizeLabelImageResolutionTooHigh: "For h\xF8j opl\xF8sning", + imageValidateSizeLabelExpectedMinResolution: "Minimum opl\xF8sning er {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maksimal opl\xF8sning er {maxResolution}" +}; + +// node_modules/filepond/locale/de-de.js +var de_de_default = { + labelIdle: 'Dateien ablegen oder ausw\xE4hlen ', + labelInvalidField: "Feld beinhaltet ung\xFCltige Dateien", + labelFileWaitingForSize: "Dateigr\xF6\xDFe berechnen", + labelFileSizeNotAvailable: "Dateigr\xF6\xDFe nicht verf\xFCgbar", + labelFileLoading: "Laden", + labelFileLoadError: "Fehler beim Laden", + labelFileProcessing: "Upload l\xE4uft", + labelFileProcessingComplete: "Upload abgeschlossen", + labelFileProcessingAborted: "Upload abgebrochen", + labelFileProcessingError: "Fehler beim Upload", + labelFileProcessingRevertError: "Fehler beim Wiederherstellen", + labelFileRemoveError: "Fehler beim L\xF6schen", + labelTapToCancel: "abbrechen", + labelTapToRetry: "erneut versuchen", + labelTapToUndo: "r\xFCckg\xE4ngig", + labelButtonRemoveItem: "Entfernen", + labelButtonAbortItemLoad: "Verwerfen", + labelButtonRetryItemLoad: "Erneut versuchen", + labelButtonAbortItemProcessing: "Abbrechen", + labelButtonUndoItemProcessing: "R\xFCckg\xE4ngig", + labelButtonRetryItemProcessing: "Erneut versuchen", + labelButtonProcessItem: "Upload", + labelMaxFileSizeExceeded: "Datei ist zu gro\xDF", + labelMaxFileSize: "Maximale Dateigr\xF6\xDFe: {filesize}", + labelMaxTotalFileSizeExceeded: "Maximale gesamte Dateigr\xF6\xDFe \xFCberschritten", + labelMaxTotalFileSize: "Maximale gesamte Dateigr\xF6\xDFe: {filesize}", + labelFileTypeNotAllowed: "Dateityp ung\xFCltig", + fileValidateTypeLabelExpectedTypes: "Erwartet {allButLastType} oder {lastType}", + imageValidateSizeLabelFormatError: "Bildtyp nicht unterst\xFCtzt", + imageValidateSizeLabelImageSizeTooSmall: "Bild ist zu klein", + imageValidateSizeLabelImageSizeTooBig: "Bild ist zu gro\xDF", + imageValidateSizeLabelExpectedMinSize: "Mindestgr\xF6\xDFe: {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximale Gr\xF6\xDFe: {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Aufl\xF6sung ist zu niedrig", + imageValidateSizeLabelImageResolutionTooHigh: "Aufl\xF6sung ist zu hoch", + imageValidateSizeLabelExpectedMinResolution: "Mindestaufl\xF6sung: {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maximale Aufl\xF6sung: {maxResolution}" +}; + +// node_modules/filepond/locale/en-en.js +var en_en_default = { + labelIdle: 'Drag & Drop your files or Browse ', + labelInvalidField: "Field contains invalid files", + labelFileWaitingForSize: "Waiting for size", + labelFileSizeNotAvailable: "Size not available", + labelFileLoading: "Loading", + labelFileLoadError: "Error during load", + labelFileProcessing: "Uploading", + labelFileProcessingComplete: "Upload complete", + labelFileProcessingAborted: "Upload cancelled", + labelFileProcessingError: "Error during upload", + labelFileProcessingRevertError: "Error during revert", + labelFileRemoveError: "Error during remove", + labelTapToCancel: "tap to cancel", + labelTapToRetry: "tap to retry", + labelTapToUndo: "tap to undo", + labelButtonRemoveItem: "Remove", + labelButtonAbortItemLoad: "Abort", + labelButtonRetryItemLoad: "Retry", + labelButtonAbortItemProcessing: "Cancel", + labelButtonUndoItemProcessing: "Undo", + labelButtonRetryItemProcessing: "Retry", + labelButtonProcessItem: "Upload", + labelMaxFileSizeExceeded: "File is too large", + labelMaxFileSize: "Maximum file size is {filesize}", + labelMaxTotalFileSizeExceeded: "Maximum total size exceeded", + labelMaxTotalFileSize: "Maximum total file size is {filesize}", + labelFileTypeNotAllowed: "File of invalid type", + fileValidateTypeLabelExpectedTypes: "Expects {allButLastType} or {lastType}", + imageValidateSizeLabelFormatError: "Image type not supported", + imageValidateSizeLabelImageSizeTooSmall: "Image is too small", + imageValidateSizeLabelImageSizeTooBig: "Image is too big", + imageValidateSizeLabelExpectedMinSize: "Minimum size is {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximum size is {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Resolution is too low", + imageValidateSizeLabelImageResolutionTooHigh: "Resolution is too high", + imageValidateSizeLabelExpectedMinResolution: "Minimum resolution is {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maximum resolution is {maxResolution}" +}; + +// node_modules/filepond/locale/es-es.js +var es_es_default = { + labelIdle: 'Arrastra y suelta tus archivos o Examinar ', + labelInvalidField: "El campo contiene archivos inv\xE1lidos", + labelFileWaitingForSize: "Esperando tama\xF1o", + labelFileSizeNotAvailable: "Tama\xF1o no disponible", + labelFileLoading: "Cargando", + labelFileLoadError: "Error durante la carga", + labelFileProcessing: "Cargando", + labelFileProcessingComplete: "Carga completa", + labelFileProcessingAborted: "Carga cancelada", + labelFileProcessingError: "Error durante la carga", + labelFileProcessingRevertError: "Error durante la reversi\xF3n", + labelFileRemoveError: "Error durante la eliminaci\xF3n", + labelTapToCancel: "toca para cancelar", + labelTapToRetry: "tocar para volver a intentar", + labelTapToUndo: "tocar para deshacer", + labelButtonRemoveItem: "Eliminar", + labelButtonAbortItemLoad: "Abortar", + labelButtonRetryItemLoad: "Reintentar", + labelButtonAbortItemProcessing: "Cancelar", + labelButtonUndoItemProcessing: "Deshacer", + labelButtonRetryItemProcessing: "Reintentar", + labelButtonProcessItem: "Cargar", + labelMaxFileSizeExceeded: "El archivo es demasiado grande", + labelMaxFileSize: "El tama\xF1o m\xE1ximo del archivo es {filesize}", + labelMaxTotalFileSizeExceeded: "Tama\xF1o total m\xE1ximo excedido", + labelMaxTotalFileSize: "El tama\xF1o total m\xE1ximo del archivo es {filesize}", + labelFileTypeNotAllowed: "Archivo de tipo no v\xE1lido", + fileValidateTypeLabelExpectedTypes: "Espera {allButLastType} o {lastType}", + imageValidateSizeLabelFormatError: "Tipo de imagen no compatible", + imageValidateSizeLabelImageSizeTooSmall: "La imagen es demasiado peque\xF1a", + imageValidateSizeLabelImageSizeTooBig: "La imagen es demasiado grande", + imageValidateSizeLabelExpectedMinSize: "El tama\xF1o m\xEDnimo es {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "El tama\xF1o m\xE1ximo es {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "La resoluci\xF3n es demasiado baja", + imageValidateSizeLabelImageResolutionTooHigh: "La resoluci\xF3n es demasiado alta", + imageValidateSizeLabelExpectedMinResolution: "La resoluci\xF3n m\xEDnima es {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "La resoluci\xF3n m\xE1xima es {maxResolution}" +}; + +// node_modules/filepond/locale/fa_ir.js +var fa_ir_default = { + labelIdle: '\u0641\u0627\u06CC\u0644 \u0631\u0627 \u0627\u06CC\u0646\u062C\u0627 \u0628\u06A9\u0634\u06CC\u062F \u0648 \u0631\u0647\u0627 \u06A9\u0646\u06CC\u062F\u060C \u06CC\u0627 \u062C\u0633\u062A\u062C\u0648 \u06A9\u0646\u06CC\u062F ', + labelInvalidField: "\u0641\u06CC\u0644\u062F \u062F\u0627\u0631\u0627\u06CC \u0641\u0627\u06CC\u0644 \u0647\u0627\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A", + labelFileWaitingForSize: "Waiting for size", + labelFileSizeNotAvailable: "\u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 \u0645\u062C\u0627\u0632 \u0646\u06CC\u0633\u062A", + labelFileLoading: "\u062F\u0631\u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC", + labelFileLoadError: "\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u0627\u062C\u0631\u0627", + labelFileProcessing: "\u062F\u0631\u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC", + labelFileProcessingComplete: "\u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u06A9\u0627\u0645\u0644 \u0634\u062F", + labelFileProcessingAborted: "\u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u0644\u063A\u0648 \u0634\u062F", + labelFileProcessingError: "\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC", + labelFileProcessingRevertError: "\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u062D\u0630\u0641", + labelFileRemoveError: "\u062E\u0637\u0627 \u062F\u0631 \u0632\u0645\u0627\u0646 \u062D\u0630\u0641", + labelTapToCancel: "\u0628\u0631\u0627\u06CC \u0644\u063A\u0648 \u0636\u0631\u0628\u0647 \u0628\u0632\u0646\u06CC\u062F", + labelTapToRetry: "\u0628\u0631\u0627\u06CC \u062A\u06A9\u0631\u0627\u0631 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F", + labelTapToUndo: "\u0628\u0631\u0627\u06CC \u0628\u0631\u06AF\u0634\u062A \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F", + labelButtonRemoveItem: "\u062D\u0630\u0641", + labelButtonAbortItemLoad: "\u0644\u063A\u0648", + labelButtonRetryItemLoad: "\u062A\u06A9\u0631\u0627\u0631", + labelButtonAbortItemProcessing: "\u0644\u063A\u0648", + labelButtonUndoItemProcessing: "\u0628\u0631\u06AF\u0634\u062A", + labelButtonRetryItemProcessing: "\u062A\u06A9\u0631\u0627\u0631", + labelButtonProcessItem: "\u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC", + labelMaxFileSizeExceeded: "\u0641\u0627\u06CC\u0644 \u0628\u0633\u06CC\u0627\u0631 \u062D\u062C\u06CC\u0645 \u0627\u0633\u062A", + labelMaxFileSize: "\u062D\u062F\u0627\u06A9\u062B\u0631 \u0645\u062C\u0627\u0632 \u0641\u0627\u06CC\u0644 {filesize} \u0627\u0633\u062A", + labelMaxTotalFileSizeExceeded: "\u0627\u0632 \u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 \u0628\u06CC\u0634\u062A\u0631 \u0634\u062F", + labelMaxTotalFileSize: "\u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 {filesize} \u0627\u0633\u062A", + labelFileTypeNotAllowed: "\u0646\u0648\u0639 \u0641\u0627\u06CC\u0644 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A", + fileValidateTypeLabelExpectedTypes: "\u062F\u0631 \u0627\u0646\u062A\u0638\u0627\u0631 {allButLastType} \u06CC\u0627 {lastType}", + imageValidateSizeLabelFormatError: "\u0641\u0631\u0645\u062A \u062A\u0635\u0648\u06CC\u0631 \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u0646\u0645\u06CC \u0634\u0648\u062F", + imageValidateSizeLabelImageSizeTooSmall: "\u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u06A9\u0648\u0686\u06A9 \u0627\u0633\u062A", + imageValidateSizeLabelImageSizeTooBig: "\u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u0628\u0632\u0631\u06AF \u0627\u0633\u062A", + imageValidateSizeLabelExpectedMinSize: "\u062D\u062F\u0627\u0642\u0644 \u0627\u0646\u062F\u0627\u0632\u0647 {minWidth} \xD7 {minHeight} \u0627\u0633\u062A", + imageValidateSizeLabelExpectedMaxSize: "\u062D\u062F\u0627\u06A9\u062B\u0631 \u0627\u0646\u062F\u0627\u0632\u0647 {maxWidth} \xD7 {maxHeight} \u0627\u0633\u062A", + imageValidateSizeLabelImageResolutionTooLow: "\u0648\u0636\u0648\u062D \u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u06A9\u0645 \u0627\u0633\u062A", + imageValidateSizeLabelImageResolutionTooHigh: "\u0648\u0636\u0648\u0639 \u062A\u0635\u0648\u06CC\u0631 \u0628\u0633\u06CC\u0627\u0631 \u0632\u06CC\u0627\u062F \u0627\u0633\u062A", + imageValidateSizeLabelExpectedMinResolution: "\u062D\u062F\u0627\u0642\u0644 \u0648\u0636\u0648\u062D \u062A\u0635\u0648\u06CC\u0631 {minResolution} \u0627\u0633\u062A", + imageValidateSizeLabelExpectedMaxResolution: "\u062D\u062F\u0627\u06A9\u062B\u0631 \u0648\u0636\u0648\u062D \u062A\u0635\u0648\u06CC\u0631 {maxResolution} \u0627\u0633\u062A" +}; + +// node_modules/filepond/locale/fr-fr.js +var fr_fr_default = { + labelIdle: 'Faites glisser vos fichiers ou Parcourir ', + labelInvalidField: "Le champ contient des fichiers invalides", + labelFileWaitingForSize: "En attente de taille", + labelFileSizeNotAvailable: "Taille non disponible", + labelFileLoading: "Chargement", + labelFileLoadError: "Erreur durant le chargement", + labelFileProcessing: "Traitement", + labelFileProcessingComplete: "Traitement effectu\xE9", + labelFileProcessingAborted: "Traitement interrompu", + labelFileProcessingError: "Erreur durant le traitement", + labelFileProcessingRevertError: "Erreur durant la restauration", + labelFileRemoveError: "Erreur durant la suppression", + labelTapToCancel: "appuyer pour annuler", + labelTapToRetry: "appuyer pour r\xE9essayer", + labelTapToUndo: "appuyer pour revenir en arri\xE8re", + labelButtonRemoveItem: "Retirer", + labelButtonAbortItemLoad: "Annuler", + labelButtonRetryItemLoad: "Recommencer", + labelButtonAbortItemProcessing: "Annuler", + labelButtonUndoItemProcessing: "Revenir en arri\xE8re", + labelButtonRetryItemProcessing: "Recommencer", + labelButtonProcessItem: "Transf\xE9rer", + labelMaxFileSizeExceeded: "Le fichier est trop volumineux", + labelMaxFileSize: "La taille maximale de fichier est {filesize}", + labelMaxTotalFileSizeExceeded: "Taille totale maximale d\xE9pass\xE9e", + labelMaxTotalFileSize: "La taille totale maximale des fichiers est {filesize}", + labelFileTypeNotAllowed: "Fichier non valide", + fileValidateTypeLabelExpectedTypes: "Attendu {allButLastType} ou {lastType}", + imageValidateSizeLabelFormatError: "Type d'image non pris en charge", + imageValidateSizeLabelImageSizeTooSmall: "L'image est trop petite", + imageValidateSizeLabelImageSizeTooBig: "L'image est trop grande", + imageValidateSizeLabelExpectedMinSize: "La taille minimale est {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "La taille maximale est {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "La r\xE9solution est trop faible", + imageValidateSizeLabelImageResolutionTooHigh: "La r\xE9solution est trop \xE9lev\xE9e", + imageValidateSizeLabelExpectedMinResolution: "La r\xE9solution minimale est {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "La r\xE9solution maximale est {maxResolution}" +}; + +// node_modules/filepond/locale/hu-hu.js +var hu_hu_default = { + labelIdle: 'Mozgasd ide a f\xE1jlt a felt\xF6lt\xE9shez, vagy tall\xF3z\xE1s ', + labelInvalidField: "A mez\u0151 \xE9rv\xE9nytelen f\xE1jlokat tartalmaz", + labelFileWaitingForSize: "F\xE1ljm\xE9ret kisz\xE1mol\xE1sa", + labelFileSizeNotAvailable: "A f\xE1jlm\xE9ret nem el\xE9rhet\u0151", + labelFileLoading: "T\xF6lt\xE9s", + labelFileLoadError: "Hiba a bet\xF6lt\xE9s sor\xE1n", + labelFileProcessing: "Felt\xF6lt\xE9s", + labelFileProcessingComplete: "Sikeres felt\xF6lt\xE9s", + labelFileProcessingAborted: "A felt\xF6lt\xE9s megszak\xEDtva", + labelFileProcessingError: "Hiba t\xF6rt\xE9nt a felt\xF6lt\xE9s sor\xE1n", + labelFileProcessingRevertError: "Hiba a vissza\xE1ll\xEDt\xE1s sor\xE1n", + labelFileRemoveError: "Hiba t\xF6rt\xE9nt az elt\xE1vol\xEDt\xE1s sor\xE1n", + labelTapToCancel: "koppints a t\xF6rl\xE9shez", + labelTapToRetry: "koppints az \xFAjrakezd\xE9shez", + labelTapToUndo: "koppints a visszavon\xE1shoz", + labelButtonRemoveItem: "Elt\xE1vol\xEDt\xE1s", + labelButtonAbortItemLoad: "Megszak\xEDt\xE1s", + labelButtonRetryItemLoad: "\xDAjrapr\xF3b\xE1lkoz\xE1s", + labelButtonAbortItemProcessing: "Megszak\xEDt\xE1s", + labelButtonUndoItemProcessing: "Visszavon\xE1s", + labelButtonRetryItemProcessing: "\xDAjrapr\xF3b\xE1lkoz\xE1s", + labelButtonProcessItem: "Felt\xF6lt\xE9s", + labelMaxFileSizeExceeded: "A f\xE1jl t\xFAll\xE9pte a maxim\xE1lis m\xE9retet", + labelMaxFileSize: "Maxim\xE1lis f\xE1jlm\xE9ret: {filesize}", + labelMaxTotalFileSizeExceeded: "T\xFAll\xE9pte a maxim\xE1lis teljes m\xE9retet", + labelMaxTotalFileSize: "A maxim\xE1is teljes f\xE1jlm\xE9ret: {filesize}", + labelFileTypeNotAllowed: "\xC9rv\xE9nytelen t\xEDpus\xFA f\xE1jl", + fileValidateTypeLabelExpectedTypes: "Enged\xE9lyezett t\xEDpusok {allButLastType} vagy {lastType}", + imageValidateSizeLabelFormatError: "A k\xE9pt\xEDpus nem t\xE1mogatott", + imageValidateSizeLabelImageSizeTooSmall: "A k\xE9p t\xFAl kicsi", + imageValidateSizeLabelImageSizeTooBig: "A k\xE9p t\xFAl nagy", + imageValidateSizeLabelExpectedMinSize: "Minimum m\xE9ret: {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximum m\xE9ret: {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "A felbont\xE1s t\xFAl alacsony", + imageValidateSizeLabelImageResolutionTooHigh: "A felbont\xE1s t\xFAl magas", + imageValidateSizeLabelExpectedMinResolution: "Minim\xE1is felbont\xE1s: {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maxim\xE1lis felbont\xE1s: {maxResolution}" +}; + +// node_modules/filepond/locale/id-id.js +var id_id_default = { + labelIdle: 'Seret dan Jatuhkan file Anda atau Jelajahi', + labelInvalidField: "Field berisi file tidak valid", + labelFileWaitingForSize: "Menunggu ukuran", + labelFileSizeNotAvailable: "Ukuran tidak tersedia", + labelFileLoading: "Memuat", + labelFileLoadError: "Kesalahan saat memuat", + labelFileProcessing: "Mengunggah", + labelFileProcessingComplete: "Unggahan selesai", + labelFileProcessingAborted: "Unggahan dibatalkan", + labelFileProcessingError: "Kesalahan saat mengunggah", + labelFileProcessingRevertError: "Kesalahan saat pengembalian", + labelFileRemoveError: "Kesalahan saat menghapus", + labelTapToCancel: "ketuk untuk membatalkan", + labelTapToRetry: "ketuk untuk mencoba lagi", + labelTapToUndo: "ketuk untuk mengurungkan", + labelButtonRemoveItem: "Hapus", + labelButtonAbortItemLoad: "Batal", + labelButtonRetryItemLoad: "Coba Kembali", + labelButtonAbortItemProcessing: "Batal", + labelButtonUndoItemProcessing: "Batal", + labelButtonRetryItemProcessing: "Coba Kembali", + labelButtonProcessItem: "Unggah", + labelMaxFileSizeExceeded: "File terlalu besar", + labelMaxFileSize: "Ukuran file maksimum adalah {filesize}", + labelMaxTotalFileSizeExceeded: "Jumlah file maksimum terlampaui", + labelMaxTotalFileSize: "Jumlah file maksimum adalah {filesize}", + labelFileTypeNotAllowed: "Jenis file tidak valid", + fileValidateTypeLabelExpectedTypes: "Mengharapkan {allButLastType} atau {lastType}", + imageValidateSizeLabelFormatError: "Jenis gambar tidak didukung", + imageValidateSizeLabelImageSizeTooSmall: "Gambar terlalu kecil", + imageValidateSizeLabelImageSizeTooBig: "Gambar terlalu besar", + imageValidateSizeLabelExpectedMinSize: "Ukuran minimum adalah {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Ukuran maksimum adalah {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Resolusi terlalu rendah", + imageValidateSizeLabelImageResolutionTooHigh: "Resolusi terlalu tinggi", + imageValidateSizeLabelExpectedMinResolution: "Resolusi minimum adalah {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Resolusi maksimum adalah {maxResolution}" +}; + +// node_modules/filepond/locale/it-it.js +var it_it_default = { + labelIdle: 'Trascina e rilascia i tuoi file oppure Carica ', + labelInvalidField: "Il campo contiene dei file non validi", + labelFileWaitingForSize: "Aspettando le dimensioni", + labelFileSizeNotAvailable: "Dimensioni non disponibili", + labelFileLoading: "Caricamento", + labelFileLoadError: "Errore durante il caricamento", + labelFileProcessing: "Caricamento", + labelFileProcessingComplete: "Caricamento completato", + labelFileProcessingAborted: "Caricamento cancellato", + labelFileProcessingError: "Errore durante il caricamento", + labelFileProcessingRevertError: "Errore durante il ripristino", + labelFileRemoveError: "Errore durante l'eliminazione", + labelTapToCancel: "tocca per cancellare", + labelTapToRetry: "tocca per riprovare", + labelTapToUndo: "tocca per ripristinare", + labelButtonRemoveItem: "Elimina", + labelButtonAbortItemLoad: "Cancella", + labelButtonRetryItemLoad: "Ritenta", + labelButtonAbortItemProcessing: "Camcella", + labelButtonUndoItemProcessing: "Indietro", + labelButtonRetryItemProcessing: "Ritenta", + labelButtonProcessItem: "Carica", + labelMaxFileSizeExceeded: "Il peso del file \xE8 eccessivo", + labelMaxFileSize: "Il peso massimo del file \xE8 {filesize}", + labelMaxTotalFileSizeExceeded: "Dimensione totale massima superata", + labelMaxTotalFileSize: "La dimensione massima totale del file \xE8 {filesize}", + labelFileTypeNotAllowed: "File non supportato", + fileValidateTypeLabelExpectedTypes: "Aspetta {allButLastType} o {lastType}", + imageValidateSizeLabelFormatError: "Tipo di immagine non compatibile", + imageValidateSizeLabelImageSizeTooSmall: "L'immagine \xE8 troppo piccola", + imageValidateSizeLabelImageSizeTooBig: "L'immagine \xE8 troppo grande", + imageValidateSizeLabelExpectedMinSize: "La dimensione minima \xE8 {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "La dimensione massima \xE8 {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "La risoluzione \xE8 troppo bassa", + imageValidateSizeLabelImageResolutionTooHigh: "La risoluzione \xE8 troppo alta", + imageValidateSizeLabelExpectedMinResolution: "La risoluzione minima \xE8 {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "La risoluzione massima \xE8 {maxResolution}" +}; + +// node_modules/filepond/locale/nl-nl.js +var nl_nl_default = { + labelIdle: 'Drag & Drop je bestanden of Bladeren ', + labelInvalidField: "Veld bevat ongeldige bestanden", + labelFileWaitingForSize: "Wachten op grootte", + labelFileSizeNotAvailable: "Grootte niet beschikbaar", + labelFileLoading: "Laden", + labelFileLoadError: "Fout tijdens laden", + labelFileProcessing: "Uploaden", + labelFileProcessingComplete: "Upload afgerond", + labelFileProcessingAborted: "Upload geannuleerd", + labelFileProcessingError: "Fout tijdens upload", + labelFileProcessingRevertError: "Fout bij herstellen", + labelFileRemoveError: "Fout bij verwijderen", + labelTapToCancel: "tik om te annuleren", + labelTapToRetry: "tik om opnieuw te proberen", + labelTapToUndo: "tik om ongedaan te maken", + labelButtonRemoveItem: "Verwijderen", + labelButtonAbortItemLoad: "Afbreken", + labelButtonRetryItemLoad: "Opnieuw proberen", + labelButtonAbortItemProcessing: "Annuleren", + labelButtonUndoItemProcessing: "Ongedaan maken", + labelButtonRetryItemProcessing: "Opnieuw proberen", + labelButtonProcessItem: "Upload", + labelMaxFileSizeExceeded: "Bestand is te groot", + labelMaxFileSize: "Maximale bestandsgrootte is {filesize}", + labelMaxTotalFileSizeExceeded: "Maximale totale grootte overschreden", + labelMaxTotalFileSize: "Maximale totale bestandsgrootte is {filesize}", + labelFileTypeNotAllowed: "Ongeldig bestandstype", + fileValidateTypeLabelExpectedTypes: "Verwacht {allButLastType} of {lastType}", + imageValidateSizeLabelFormatError: "Afbeeldingstype niet ondersteund", + imageValidateSizeLabelImageSizeTooSmall: "Afbeelding is te klein", + imageValidateSizeLabelImageSizeTooBig: "Afbeelding is te groot", + imageValidateSizeLabelExpectedMinSize: "Minimale afmeting is {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximale afmeting is {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Resolutie is te laag", + imageValidateSizeLabelImageResolutionTooHigh: "Resolution is too high", + imageValidateSizeLabelExpectedMinResolution: "Minimale resolutie is {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maximale resolutie is {maxResolution}" +}; + +// node_modules/filepond/locale/pl-pl.js +var pl_pl_default = { + labelIdle: 'Przeci\u0105gnij i upu\u015B\u0107 lub wybierz pliki', + labelInvalidField: "Nieprawid\u0142owe pliki", + labelFileWaitingForSize: "Pobieranie rozmiaru", + labelFileSizeNotAvailable: "Nieznany rozmiar", + labelFileLoading: "Wczytywanie", + labelFileLoadError: "B\u0142\u0105d wczytywania", + labelFileProcessing: "Przesy\u0142anie", + labelFileProcessingComplete: "Przes\u0142ano", + labelFileProcessingAborted: "Przerwano", + labelFileProcessingError: "Przesy\u0142anie nie powiod\u0142o si\u0119", + labelFileProcessingRevertError: "Co\u015B posz\u0142o nie tak", + labelFileRemoveError: "Nieudane usuni\u0119cie", + labelTapToCancel: "Anuluj", + labelTapToRetry: "Pon\xF3w", + labelTapToUndo: "Cofnij", + labelButtonRemoveItem: "Usu\u0144", + labelButtonAbortItemLoad: "Przerwij", + labelButtonRetryItemLoad: "Pon\xF3w", + labelButtonAbortItemProcessing: "Anuluj", + labelButtonUndoItemProcessing: "Cofnij", + labelButtonRetryItemProcessing: "Pon\xF3w", + labelButtonProcessItem: "Prze\u015Blij", + labelMaxFileSizeExceeded: "Plik jest zbyt du\u017Cy", + labelMaxFileSize: "Dopuszczalna wielko\u015B\u0107 pliku to {filesize}", + labelMaxTotalFileSizeExceeded: "Przekroczono \u0142\u0105czny rozmiar plik\xF3w", + labelMaxTotalFileSize: "\u0141\u0105czny rozmiar plik\xF3w nie mo\u017Ce przekroczy\u0107 {filesize}", + labelFileTypeNotAllowed: "Niedozwolony rodzaj pliku", + fileValidateTypeLabelExpectedTypes: "Oczekiwano {allButLastType} lub {lastType}", + imageValidateSizeLabelFormatError: "Nieobs\u0142ugiwany format obrazu", + imageValidateSizeLabelImageSizeTooSmall: "Obraz jest zbyt ma\u0142y", + imageValidateSizeLabelImageSizeTooBig: "Obraz jest zbyt du\u017Cy", + imageValidateSizeLabelExpectedMinSize: "Minimalne wymiary obrazu to {minWidth}\xD7{minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maksymalna wymiary obrazu to {maxWidth}\xD7{maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Rozdzielczo\u015B\u0107 jest zbyt niska", + imageValidateSizeLabelImageResolutionTooHigh: "Rozdzielczo\u015B\u0107 jest zbyt wysoka", + imageValidateSizeLabelExpectedMinResolution: "Minimalna rozdzielczo\u015B\u0107 to {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maksymalna rozdzielczo\u015B\u0107 to {maxResolution}" +}; + +// node_modules/filepond/locale/pt-br.js +var pt_br_default = { + labelIdle: 'Arraste e solte os arquivos ou Clique aqui ', + labelInvalidField: "Arquivos inv\xE1lidos", + labelFileWaitingForSize: "Calculando o tamanho do arquivo", + labelFileSizeNotAvailable: "Tamanho do arquivo indispon\xEDvel", + labelFileLoading: "Carregando", + labelFileLoadError: "Erro durante o carregamento", + labelFileProcessing: "Enviando", + labelFileProcessingComplete: "Envio finalizado", + labelFileProcessingAborted: "Envio cancelado", + labelFileProcessingError: "Erro durante o envio", + labelFileProcessingRevertError: "Erro ao reverter o envio", + labelFileRemoveError: "Erro ao remover o arquivo", + labelTapToCancel: "clique para cancelar", + labelTapToRetry: "clique para reenviar", + labelTapToUndo: "clique para desfazer", + labelButtonRemoveItem: "Remover", + labelButtonAbortItemLoad: "Abortar", + labelButtonRetryItemLoad: "Reenviar", + labelButtonAbortItemProcessing: "Cancelar", + labelButtonUndoItemProcessing: "Desfazer", + labelButtonRetryItemProcessing: "Reenviar", + labelButtonProcessItem: "Enviar", + labelMaxFileSizeExceeded: "Arquivo \xE9 muito grande", + labelMaxFileSize: "O tamanho m\xE1ximo permitido: {filesize}", + labelMaxTotalFileSizeExceeded: "Tamanho total dos arquivos excedido", + labelMaxTotalFileSize: "Tamanho total permitido: {filesize}", + labelFileTypeNotAllowed: "Tipo de arquivo inv\xE1lido", + fileValidateTypeLabelExpectedTypes: "Tipos de arquivo suportados s\xE3o {allButLastType} ou {lastType}", + imageValidateSizeLabelFormatError: "Tipo de imagem inv\xE1lida", + imageValidateSizeLabelImageSizeTooSmall: "Imagem muito pequena", + imageValidateSizeLabelImageSizeTooBig: "Imagem muito grande", + imageValidateSizeLabelExpectedMinSize: "Tamanho m\xEDnimo permitida: {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Tamanho m\xE1ximo permitido: {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Resolu\xE7\xE3o muito baixa", + imageValidateSizeLabelImageResolutionTooHigh: "Resolu\xE7\xE3o muito alta", + imageValidateSizeLabelExpectedMinResolution: "Resolu\xE7\xE3o m\xEDnima permitida: {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Resolu\xE7\xE3o m\xE1xima permitida: {maxResolution}" +}; + +// node_modules/filepond/locale/ro-ro.js +var ro_ro_default = { + labelIdle: 'Trage \u0219i plaseaz\u0103 fi\u0219iere sau Caut\u0103-le ', + labelInvalidField: "C\xE2mpul con\u021Bine fi\u0219iere care nu sunt valide", + labelFileWaitingForSize: "\xCEn a\u0219teptarea dimensiunii", + labelFileSizeNotAvailable: "Dimensiunea nu este diponibil\u0103", + labelFileLoading: "Se \xEEncarc\u0103", + labelFileLoadError: "Eroare la \xEEnc\u0103rcare", + labelFileProcessing: "Se \xEEncarc\u0103", + labelFileProcessingComplete: "\xCEnc\u0103rcare finalizat\u0103", + labelFileProcessingAborted: "\xCEnc\u0103rcare anulat\u0103", + labelFileProcessingError: "Eroare la \xEEnc\u0103rcare", + labelFileProcessingRevertError: "Eroare la anulare", + labelFileRemoveError: "Eroare la \u015Ftergere", + labelTapToCancel: "apas\u0103 pentru a anula", + labelTapToRetry: "apas\u0103 pentru a re\xEEncerca", + labelTapToUndo: "apas\u0103 pentru a anula", + labelButtonRemoveItem: "\u015Eterge", + labelButtonAbortItemLoad: "Anuleaz\u0103", + labelButtonRetryItemLoad: "Re\xEEncearc\u0103", + labelButtonAbortItemProcessing: "Anuleaz\u0103", + labelButtonUndoItemProcessing: "Anuleaz\u0103", + labelButtonRetryItemProcessing: "Re\xEEncearc\u0103", + labelButtonProcessItem: "\xCEncarc\u0103", + labelMaxFileSizeExceeded: "Fi\u0219ierul este prea mare", + labelMaxFileSize: "Dimensiunea maxim\u0103 a unui fi\u0219ier este de {filesize}", + labelMaxTotalFileSizeExceeded: "Dimensiunea total\u0103 maxim\u0103 a fost dep\u0103\u0219it\u0103", + labelMaxTotalFileSize: "Dimensiunea total\u0103 maxim\u0103 a fi\u0219ierelor este de {filesize}", + labelFileTypeNotAllowed: "Tipul fi\u0219ierului nu este valid", + fileValidateTypeLabelExpectedTypes: "Se a\u0219teapt\u0103 {allButLastType} sau {lastType}", + imageValidateSizeLabelFormatError: "Formatul imaginii nu este acceptat", + imageValidateSizeLabelImageSizeTooSmall: "Imaginea este prea mic\u0103", + imageValidateSizeLabelImageSizeTooBig: "Imaginea este prea mare", + imageValidateSizeLabelExpectedMinSize: "M\u0103rimea minim\u0103 este de {maxWidth} x {maxHeight}", + imageValidateSizeLabelExpectedMaxSize: "M\u0103rimea maxim\u0103 este de {maxWidth} x {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Rezolu\u021Bia este prea mic\u0103", + imageValidateSizeLabelImageResolutionTooHigh: "Rezolu\u021Bia este prea mare", + imageValidateSizeLabelExpectedMinResolution: "Rezolu\u021Bia minim\u0103 este de {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Rezolu\u021Bia maxim\u0103 este de {maxResolution}" +}; + +// node_modules/filepond/locale/ru-ru.js +var ru_ru_default = { + labelIdle: '\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B \u0438\u043B\u0438 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 ', + labelInvalidField: "\u041F\u043E\u043B\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0435 \u0444\u0430\u0439\u043B\u044B", + labelFileWaitingForSize: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0440\u0430\u0437\u043C\u0435\u0440", + labelFileSizeNotAvailable: "\u0420\u0430\u0437\u043C\u0435\u0440 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F", + labelFileLoading: "\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435", + labelFileLoadError: "\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0438", + labelFileProcessing: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430", + labelFileProcessingComplete: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430", + labelFileProcessingAborted: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u0430", + labelFileProcessingError: "\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0435", + labelFileProcessingRevertError: "\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0435", + labelFileRemoveError: "\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0438", + labelTapToCancel: "\u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B", + labelTapToRetry: "\u043D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043F\u043E\u043F\u044B\u0442\u043A\u0443", + labelTapToUndo: "\u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F", + labelButtonRemoveItem: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C", + labelButtonAbortItemLoad: "\u041F\u0440\u0435\u043A\u0440\u0430\u0449\u0435\u043D\u043E", + labelButtonRetryItemLoad: "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443", + labelButtonAbortItemProcessing: "\u041E\u0442\u043C\u0435\u043D\u0430", + labelButtonUndoItemProcessing: "\u041E\u0442\u043C\u0435\u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F", + labelButtonRetryItemProcessing: "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443", + labelButtonProcessItem: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430", + labelMaxFileSizeExceeded: "\u0424\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439", + labelMaxFileSize: "\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0444\u0430\u0439\u043B\u0430: {filesize}", + labelMaxTotalFileSizeExceeded: "\u041F\u0440\u0435\u0432\u044B\u0448\u0435\u043D \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440", + labelMaxTotalFileSize: "\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0444\u0430\u0439\u043B\u0430: {filesize}", + labelFileTypeNotAllowed: "\u0424\u0430\u0439\u043B \u043D\u0435\u0432\u0435\u0440\u043D\u043E\u0433\u043E \u0442\u0438\u043F\u0430", + fileValidateTypeLabelExpectedTypes: "\u041E\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044F {allButLastType} \u0438\u043B\u0438 {lastType}", + imageValidateSizeLabelFormatError: "\u0422\u0438\u043F \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F", + imageValidateSizeLabelImageSizeTooSmall: "\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435", + imageValidateSizeLabelImageSizeTooBig: "\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435", + imageValidateSizeLabelExpectedMinSize: "\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440: {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440: {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u043D\u0438\u0437\u043A\u043E\u0435", + imageValidateSizeLabelImageResolutionTooHigh: "\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0432\u044B\u0441\u043E\u043A\u043E\u0435", + imageValidateSizeLabelExpectedMinResolution: "\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435: {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435: {maxResolution}" +}; + +// node_modules/filepond/locale/sv_se.js +var sv_se_default = { + labelIdle: 'Drag och sl\xE4pp dina filer eller Bl\xE4ddra ', + labelInvalidField: "F\xE4ltet inneh\xE5ller felaktiga filer", + labelFileWaitingForSize: "V\xE4ntar p\xE5 storlek", + labelFileSizeNotAvailable: "Storleken finns inte tillg\xE4nglig", + labelFileLoading: "Laddar", + labelFileLoadError: "Fel under laddning", + labelFileProcessing: "Laddar upp", + labelFileProcessingComplete: "Uppladdning klar", + labelFileProcessingAborted: "Uppladdning avbruten", + labelFileProcessingError: "Fel under uppladdning", + labelFileProcessingRevertError: "Fel under \xE5terst\xE4llning", + labelFileRemoveError: "Fel under borttagning", + labelTapToCancel: "tryck f\xF6r att avbryta", + labelTapToRetry: "tryck f\xF6r att f\xF6rs\xF6ka igen", + labelTapToUndo: "tryck f\xF6r att \xE5ngra", + labelButtonRemoveItem: "Tabort", + labelButtonAbortItemLoad: "Avbryt", + labelButtonRetryItemLoad: "F\xF6rs\xF6k igen", + labelButtonAbortItemProcessing: "Avbryt", + labelButtonUndoItemProcessing: "\xC5ngra", + labelButtonRetryItemProcessing: "F\xF6rs\xF6k igen", + labelButtonProcessItem: "Ladda upp", + labelMaxFileSizeExceeded: "Filen \xE4r f\xF6r stor", + labelMaxFileSize: "St\xF6rsta till\xE5tna filstorlek \xE4r {filesize}", + labelMaxTotalFileSizeExceeded: "Maximal uppladdningsstorlek uppn\xE5d", + labelMaxTotalFileSize: "Maximal uppladdningsstorlek \xE4r {filesize}", + labelFileTypeNotAllowed: "Felaktig filtyp", + fileValidateTypeLabelExpectedTypes: "Godk\xE4nda filtyper {allButLastType} eller {lastType}", + imageValidateSizeLabelFormatError: "Bildtypen saknar st\xF6d", + imageValidateSizeLabelImageSizeTooSmall: "Bilden \xE4r f\xF6r liten", + imageValidateSizeLabelImageSizeTooBig: "Bilden \xE4r f\xF6r stor", + imageValidateSizeLabelExpectedMinSize: "Minimal storlek \xE4r {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximal storlek \xE4r {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "Uppl\xF6sningen \xE4r f\xF6r l\xE5g", + imageValidateSizeLabelImageResolutionTooHigh: "Uppl\xF6sningen \xE4r f\xF6r h\xF6g", + imageValidateSizeLabelExpectedMinResolution: "Minsta till\xE5tna uppl\xF6sning \xE4r {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "H\xF6gsta till\xE5tna uppl\xF6sning \xE4r {maxResolution}" +}; + +// node_modules/filepond/locale/tr-tr.js +var tr_tr_default = { + labelIdle: 'Dosyan\u0131z\u0131 S\xFCr\xFCkleyin & B\u0131rak\u0131n ya da Se\xE7in ', + labelInvalidField: "Alan ge\xE7ersiz dosyalar i\xE7eriyor", + labelFileWaitingForSize: "Boyut hesaplan\u0131yor", + labelFileSizeNotAvailable: "Boyut mevcut de\u011Fil", + labelFileLoading: "Y\xFCkleniyor", + labelFileLoadError: "Y\xFCkleme s\u0131ras\u0131nda hata olu\u015Ftu", + labelFileProcessing: "Y\xFCkleniyor", + labelFileProcessingComplete: "Y\xFCkleme tamamland\u0131", + labelFileProcessingAborted: "Y\xFCkleme iptal edildi", + labelFileProcessingError: "Y\xFCklerken hata olu\u015Ftu", + labelFileProcessingRevertError: "Geri \xE7ekerken hata olu\u015Ftu", + labelFileRemoveError: "Kald\u0131r\u0131rken hata olu\u015Ftu", + labelTapToCancel: "\u0130ptal etmek i\xE7in t\u0131klay\u0131n", + labelTapToRetry: "Tekrar denemek i\xE7in t\u0131klay\u0131n", + labelTapToUndo: "Geri almak i\xE7in t\u0131klay\u0131n", + labelButtonRemoveItem: "Kald\u0131r", + labelButtonAbortItemLoad: "\u0130ptal Et", + labelButtonRetryItemLoad: "Tekrar dene", + labelButtonAbortItemProcessing: "\u0130ptal et", + labelButtonUndoItemProcessing: "Geri Al", + labelButtonRetryItemProcessing: "Tekrar dene", + labelButtonProcessItem: "Y\xFCkle", + labelMaxFileSizeExceeded: "Dosya \xE7ok b\xFCy\xFCk", + labelMaxFileSize: "En fazla dosya boyutu: {filesize}", + labelMaxTotalFileSizeExceeded: "Maximum boyut a\u015F\u0131ld\u0131", + labelMaxTotalFileSize: "Maximum dosya boyutu :{filesize}", + labelFileTypeNotAllowed: "Ge\xE7ersiz dosya tipi", + fileValidateTypeLabelExpectedTypes: "\u015Eu {allButLastType} ya da \u015Fu dosya olmas\u0131 gerekir: {lastType}", + imageValidateSizeLabelFormatError: "Resim tipi desteklenmiyor", + imageValidateSizeLabelImageSizeTooSmall: "Resim \xE7ok k\xFC\xE7\xFCk", + imageValidateSizeLabelImageSizeTooBig: "Resim \xE7ok b\xFCy\xFCk", + imageValidateSizeLabelExpectedMinSize: "Minimum boyut {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "Maximum boyut {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "\xC7\xF6z\xFCn\xFCrl\xFCk \xE7ok d\xFC\u015F\xFCk", + imageValidateSizeLabelImageResolutionTooHigh: "\xC7\xF6z\xFCn\xFCrl\xFCk \xE7ok y\xFCksek", + imageValidateSizeLabelExpectedMinResolution: "Minimum \xE7\xF6z\xFCn\xFCrl\xFCk {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "Maximum \xE7\xF6z\xFCn\xFCrl\xFCk {maxResolution}" +}; + +// node_modules/filepond/locale/uk-ua.js +var uk_ua_default = { + labelIdle: '\u041F\u0435\u0440\u0435\u0442\u044F\u0433\u043D\u0456\u0442\u044C \u0444\u0430\u0439\u043B\u0438 \u0430\u0431\u043E \u0432\u0438\u0431\u0435\u0440\u0456\u0442\u044C ', + labelInvalidField: "\u041F\u043E\u043B\u0435 \u043C\u0456\u0441\u0442\u0438\u0442\u044C \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u0456 \u0444\u0430\u0439\u043B\u0438", + labelFileWaitingForSize: "\u0412\u043A\u0430\u0436\u0456\u0442\u044C \u0440\u043E\u0437\u043C\u0456\u0440", + labelFileSizeNotAvailable: "\u0420\u043E\u0437\u043C\u0456\u0440 \u043D\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0438\u0439", + labelFileLoading: "\u041E\u0447\u0456\u043A\u0443\u0432\u0430\u043D\u043D\u044F", + labelFileLoadError: "\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u043E\u0447\u0456\u043A\u0443\u0432\u0430\u043D\u043D\u0456", + labelFileProcessing: "\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F", + labelFileProcessingComplete: "\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E", + labelFileProcessingAborted: "\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u0441\u043A\u0430\u0441\u043E\u0432\u0430\u043D\u043E", + labelFileProcessingError: "\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u0456", + labelFileProcessingRevertError: "\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0432\u0456\u0434\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u0456", + labelFileRemoveError: "\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0432\u0438\u0434\u0430\u043B\u0435\u043D\u043D\u0456", + labelTapToCancel: "\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438", + labelTapToRetry: "\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438 \u0441\u043F\u0440\u043E\u0431\u0443", + labelTapToUndo: "\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C, \u0449\u043E\u0431 \u0432\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438 \u043E\u0441\u0442\u0430\u043D\u043D\u044E \u0434\u0456\u044E", + labelButtonRemoveItem: "\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438", + labelButtonAbortItemLoad: "\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438", + labelButtonRetryItemLoad: "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438 \u0441\u043F\u0440\u043E\u0431\u0443", + labelButtonAbortItemProcessing: "\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438", + labelButtonUndoItemProcessing: "\u0412\u0456\u0434\u043C\u0456\u043D\u0438\u0442\u0438 \u043E\u0441\u0442\u0430\u043D\u043D\u044E \u0434\u0456\u044E", + labelButtonRetryItemProcessing: "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438 \u0441\u043F\u0440\u043E\u0431\u0443", + labelButtonProcessItem: "\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F", + labelMaxFileSizeExceeded: "\u0424\u0430\u0439\u043B \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0438\u0439", + labelMaxFileSize: "\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440 \u0444\u0430\u0439\u043B\u0443: {filesize}", + labelMaxTotalFileSizeExceeded: "\u041F\u0435\u0440\u0435\u0432\u0438\u0449\u0435\u043D\u043E \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0437\u0430\u0433\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440", + labelMaxTotalFileSize: "\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0437\u0430\u0433\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440: {filesize}", + labelFileTypeNotAllowed: "\u0424\u043E\u0440\u043C\u0430\u0442 \u0444\u0430\u0439\u043B\u0443 \u043D\u0435 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454\u0442\u044C\u0441\u044F", + fileValidateTypeLabelExpectedTypes: "\u041E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F {allButLastType} \u0430\u0431\u043E {lastType}", + imageValidateSizeLabelFormatError: "\u0424\u043E\u0440\u043C\u0430\u0442 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u043D\u0435 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454\u0442\u044C\u0441\u044F", + imageValidateSizeLabelImageSizeTooSmall: "\u0417\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u0435", + imageValidateSizeLabelImageSizeTooBig: "\u0417\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435", + imageValidateSizeLabelExpectedMinSize: "\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440: {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0437\u043C\u0456\u0440: {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "\u0420\u043E\u0437\u043C\u0456\u0440\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u0456", + imageValidateSizeLabelImageResolutionTooHigh: "\u0420\u043E\u0437\u043C\u0456\u0440\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0456", + imageValidateSizeLabelExpectedMinResolution: "\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0456 \u0440\u043E\u0437\u043C\u0456\u0440\u0438: {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0456 \u0440\u043E\u0437\u043C\u0456\u0440\u0438: {maxResolution}" +}; + +// node_modules/filepond/locale/vi-vi.js +var vi_vi_default = { + labelIdle: 'K\xE9o th\u1EA3 t\u1EC7p c\u1EE7a b\u1EA1n ho\u1EB7c T\xECm ki\u1EBFm ', + labelInvalidField: "Tr\u01B0\u1EDDng ch\u1EE9a c\xE1c t\u1EC7p kh\xF4ng h\u1EE3p l\u1EC7", + labelFileWaitingForSize: "\u0110ang ch\u1EDD k\xEDch th\u01B0\u1EDBc", + labelFileSizeNotAvailable: "K\xEDch th\u01B0\u1EDBc kh\xF4ng c\xF3 s\u1EB5n", + labelFileLoading: "\u0110ang t\u1EA3i", + labelFileLoadError: "L\u1ED7i khi t\u1EA3i", + labelFileProcessing: "\u0110ang t\u1EA3i l\xEAn", + labelFileProcessingComplete: "T\u1EA3i l\xEAn th\xE0nh c\xF4ng", + labelFileProcessingAborted: "\u0110\xE3 hu\u1EF7 t\u1EA3i l\xEAn", + labelFileProcessingError: "L\u1ED7i khi t\u1EA3i l\xEAn", + labelFileProcessingRevertError: "L\u1ED7i khi ho\xE0n nguy\xEAn", + labelFileRemoveError: "L\u1ED7i khi x\xF3a", + labelTapToCancel: "nh\u1EA5n \u0111\u1EC3 h\u1EE7y", + labelTapToRetry: "nh\u1EA5n \u0111\u1EC3 th\u1EED l\u1EA1i", + labelTapToUndo: "nh\u1EA5n \u0111\u1EC3 ho\xE0n t\xE1c", + labelButtonRemoveItem: "Xo\xE1", + labelButtonAbortItemLoad: "Hu\u1EF7 b\u1ECF", + labelButtonRetryItemLoad: "Th\u1EED l\u1EA1i", + labelButtonAbortItemProcessing: "H\u1EE7y b\u1ECF", + labelButtonUndoItemProcessing: "Ho\xE0n t\xE1c", + labelButtonRetryItemProcessing: "Th\u1EED l\u1EA1i", + labelButtonProcessItem: "T\u1EA3i l\xEAn", + labelMaxFileSizeExceeded: "T\u1EADp tin qu\xE1 l\u1EDBn", + labelMaxFileSize: "K\xEDch th\u01B0\u1EDBc t\u1EC7p t\u1ED1i \u0111a l\xE0 {filesize}", + labelMaxTotalFileSizeExceeded: "\u0110\xE3 v\u01B0\u1EE3t qu\xE1 t\u1ED5ng k\xEDch th\u01B0\u1EDBc t\u1ED1i \u0111a", + labelMaxTotalFileSize: "T\u1ED5ng k\xEDch th\u01B0\u1EDBc t\u1EC7p t\u1ED1i \u0111a l\xE0 {filesize}", + labelFileTypeNotAllowed: "T\u1EC7p thu\u1ED9c lo\u1EA1i kh\xF4ng h\u1EE3p l\u1EC7", + fileValidateTypeLabelExpectedTypes: "Ki\u1EC3u t\u1EC7p h\u1EE3p l\u1EC7 l\xE0 {allButLastType} ho\u1EB7c {lastType}", + imageValidateSizeLabelFormatError: "Lo\u1EA1i h\xECnh \u1EA3nh kh\xF4ng \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3", + imageValidateSizeLabelImageSizeTooSmall: "H\xECnh \u1EA3nh qu\xE1 nh\u1ECF", + imageValidateSizeLabelImageSizeTooBig: "H\xECnh \u1EA3nh qu\xE1 l\u1EDBn", + imageValidateSizeLabelExpectedMinSize: "K\xEDch th\u01B0\u1EDBc t\u1ED1i thi\u1EC3u l\xE0 {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "K\xEDch th\u01B0\u1EDBc t\u1ED1i \u0111a l\xE0 {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "\u0110\u1ED9 ph\xE2n gi\u1EA3i qu\xE1 th\u1EA5p", + imageValidateSizeLabelImageResolutionTooHigh: "\u0110\u1ED9 ph\xE2n gi\u1EA3i qu\xE1 cao", + imageValidateSizeLabelExpectedMinResolution: "\u0110\u1ED9 ph\xE2n gi\u1EA3i t\u1ED1i thi\u1EC3u l\xE0 {minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "\u0110\u1ED9 ph\xE2n gi\u1EA3i t\u1ED1i \u0111a l\xE0 {maxResolution}" +}; + +// node_modules/filepond/locale/zh-cn.js +var zh_cn_default = { + labelIdle: '\u62D6\u653E\u6587\u4EF6\uFF0C\u6216\u8005 \u6D4F\u89C8 ', + labelInvalidField: "\u5B57\u6BB5\u5305\u542B\u65E0\u6548\u6587\u4EF6", + labelFileWaitingForSize: "\u8BA1\u7B97\u6587\u4EF6\u5927\u5C0F", + labelFileSizeNotAvailable: "\u6587\u4EF6\u5927\u5C0F\u4E0D\u53EF\u7528", + labelFileLoading: "\u52A0\u8F7D", + labelFileLoadError: "\u52A0\u8F7D\u9519\u8BEF", + labelFileProcessing: "\u4E0A\u4F20", + labelFileProcessingComplete: "\u5DF2\u4E0A\u4F20", + labelFileProcessingAborted: "\u4E0A\u4F20\u5DF2\u53D6\u6D88", + labelFileProcessingError: "\u4E0A\u4F20\u51FA\u9519", + labelFileProcessingRevertError: "\u8FD8\u539F\u51FA\u9519", + labelFileRemoveError: "\u5220\u9664\u51FA\u9519", + labelTapToCancel: "\u70B9\u51FB\u53D6\u6D88", + labelTapToRetry: "\u70B9\u51FB\u91CD\u8BD5", + labelTapToUndo: "\u70B9\u51FB\u64A4\u6D88", + labelButtonRemoveItem: "\u5220\u9664", + labelButtonAbortItemLoad: "\u4E2D\u6B62", + labelButtonRetryItemLoad: "\u91CD\u8BD5", + labelButtonAbortItemProcessing: "\u53D6\u6D88", + labelButtonUndoItemProcessing: "\u64A4\u6D88", + labelButtonRetryItemProcessing: "\u91CD\u8BD5", + labelButtonProcessItem: "\u4E0A\u4F20", + labelMaxFileSizeExceeded: "\u6587\u4EF6\u592A\u5927", + labelMaxFileSize: "\u6700\u5927\u503C: {filesize}", + labelMaxTotalFileSizeExceeded: "\u8D85\u8FC7\u6700\u5927\u6587\u4EF6\u5927\u5C0F", + labelMaxTotalFileSize: "\u6700\u5927\u6587\u4EF6\u5927\u5C0F\uFF1A{filesize}", + labelFileTypeNotAllowed: "\u6587\u4EF6\u7C7B\u578B\u65E0\u6548", + fileValidateTypeLabelExpectedTypes: "\u5E94\u4E3A {allButLastType} \u6216 {lastType}", + imageValidateSizeLabelFormatError: "\u4E0D\u652F\u6301\u56FE\u50CF\u7C7B\u578B", + imageValidateSizeLabelImageSizeTooSmall: "\u56FE\u50CF\u592A\u5C0F", + imageValidateSizeLabelImageSizeTooBig: "\u56FE\u50CF\u592A\u5927", + imageValidateSizeLabelExpectedMinSize: "\u6700\u5C0F\u503C: {minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "\u6700\u5927\u503C: {maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "\u5206\u8FA8\u7387\u592A\u4F4E", + imageValidateSizeLabelImageResolutionTooHigh: "\u5206\u8FA8\u7387\u592A\u9AD8", + imageValidateSizeLabelExpectedMinResolution: "\u6700\u5C0F\u5206\u8FA8\u7387\uFF1A{minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "\u6700\u5927\u5206\u8FA8\u7387\uFF1A{maxResolution}" +}; + +// node_modules/filepond/locale/zh-tw.js +var zh_tw_default = { + labelIdle: '\u62D6\u653E\u6A94\u6848\uFF0C\u6216\u8005 \u700F\u89BD ', + labelInvalidField: "\u4E0D\u652F\u63F4\u6B64\u6A94\u6848", + labelFileWaitingForSize: "\u6B63\u5728\u8A08\u7B97\u6A94\u6848\u5927\u5C0F", + labelFileSizeNotAvailable: "\u6A94\u6848\u5927\u5C0F\u4E0D\u7B26", + labelFileLoading: "\u8B80\u53D6\u4E2D", + labelFileLoadError: "\u8B80\u53D6\u932F\u8AA4", + labelFileProcessing: "\u4E0A\u50B3", + labelFileProcessingComplete: "\u5DF2\u4E0A\u50B3", + labelFileProcessingAborted: "\u4E0A\u50B3\u5DF2\u53D6\u6D88", + labelFileProcessingError: "\u4E0A\u50B3\u767C\u751F\u932F\u8AA4", + labelFileProcessingRevertError: "\u9084\u539F\u932F\u8AA4", + labelFileRemoveError: "\u522A\u9664\u932F\u8AA4", + labelTapToCancel: "\u9EDE\u64CA\u53D6\u6D88", + labelTapToRetry: "\u9EDE\u64CA\u91CD\u8A66", + labelTapToUndo: "\u9EDE\u64CA\u9084\u539F", + labelButtonRemoveItem: "\u522A\u9664", + labelButtonAbortItemLoad: "\u505C\u6B62", + labelButtonRetryItemLoad: "\u91CD\u8A66", + labelButtonAbortItemProcessing: "\u53D6\u6D88", + labelButtonUndoItemProcessing: "\u53D6\u6D88", + labelButtonRetryItemProcessing: "\u91CD\u8A66", + labelButtonProcessItem: "\u4E0A\u50B3", + labelMaxFileSizeExceeded: "\u6A94\u6848\u904E\u5927", + labelMaxFileSize: "\u6700\u5927\u503C\uFF1A{filesize}", + labelMaxTotalFileSizeExceeded: "\u8D85\u904E\u6700\u5927\u53EF\u4E0A\u50B3\u5927\u5C0F", + labelMaxTotalFileSize: "\u6700\u5927\u53EF\u4E0A\u50B3\u5927\u5C0F\uFF1A{filesize}", + labelFileTypeNotAllowed: "\u4E0D\u652F\u63F4\u6B64\u985E\u578B\u6A94\u6848", + fileValidateTypeLabelExpectedTypes: "\u61C9\u70BA {allButLastType} \u6216 {lastType}", + imageValidateSizeLabelFormatError: "\u4E0D\u652F\u6301\u6B64\u985E\u5716\u7247\u985E\u578B", + imageValidateSizeLabelImageSizeTooSmall: "\u5716\u7247\u904E\u5C0F", + imageValidateSizeLabelImageSizeTooBig: "\u5716\u7247\u904E\u5927", + imageValidateSizeLabelExpectedMinSize: "\u6700\u5C0F\u5C3A\u5BF8\uFF1A{minWidth} \xD7 {minHeight}", + imageValidateSizeLabelExpectedMaxSize: "\u6700\u5927\u5C3A\u5BF8\uFF1A{maxWidth} \xD7 {maxHeight}", + imageValidateSizeLabelImageResolutionTooLow: "\u89E3\u6790\u5EA6\u904E\u4F4E", + imageValidateSizeLabelImageResolutionTooHigh: "\u89E3\u6790\u5EA6\u904E\u9AD8", + imageValidateSizeLabelExpectedMinResolution: "\u6700\u4F4E\u89E3\u6790\u5EA6\uFF1A{minResolution}", + imageValidateSizeLabelExpectedMaxResolution: "\u6700\u9AD8\u89E3\u6790\u5EA6\uFF1A{maxResolution}" +}; + +// packages/forms/resources/js/components/file-upload.js +registerPlugin(filepond_plugin_file_validate_size_esm_default); +registerPlugin(filepond_plugin_file_validate_type_esm_default); +registerPlugin(filepond_plugin_image_crop_esm_default); +registerPlugin(filepond_plugin_image_exif_orientation_esm_default); +registerPlugin(filepond_plugin_image_preview_esm_default); +registerPlugin(filepond_plugin_image_resize_esm_default); +registerPlugin(filepond_plugin_image_transform_esm_default); +registerPlugin(plugin8); +window.FilePond = filepond_esm_exports; +var file_upload_default = (Alpine) => { + Alpine.data("fileUploadFormComponent", ({ + acceptedFileTypes, + canDownload, + canOpen, + canPreview, + canReorder, + deleteUploadedFileUsing, + getUploadedFileUrlsUsing, + imageCropAspectRatio, + imagePreviewHeight, + imageResizeMode, + imageResizeTargetHeight, + imageResizeTargetWidth, + isAvatar, + loadingIndicatorPosition, + locale, + panelAspectRatio, + panelLayout, + placeholder, + maxSize, + minSize, + removeUploadedFileButtonPosition, + removeUploadedFileUsing, + reorderUploadedFilesUsing, + shouldAppendFiles, + shouldTransformImage, + state: state2, + uploadButtonPosition, + uploadProgressIndicatorPosition, + uploadUsing + }) => { + return { + fileKeyIndex: {}, + pond: null, + shouldUpdateState: true, + state: state2, + lastState: null, + uploadedFileUrlIndex: {}, + init: async function() { + setOptions$1(locales2[locale] ?? locales2["en"]); + this.pond = create$f(this.$refs.input, { + acceptedFileTypes, + allowPaste: false, + allowReorder: canReorder, + allowImagePreview: canPreview, + allowVideoPreview: canPreview, + allowAudioPreview: canPreview, + allowImageTransform: shouldTransformImage, + credits: false, + files: await this.getFiles(), + imageCropAspectRatio, + imagePreviewHeight, + imageResizeTargetHeight, + imageResizeTargetWidth, + imageResizeMode, + itemInsertLocation: shouldAppendFiles ? "after" : "before", + ...placeholder && {labelIdle: placeholder}, + maxFileSize: maxSize, + minFileSize: minSize, + styleButtonProcessItemPosition: uploadButtonPosition, + styleButtonRemoveItemPosition: removeUploadedFileButtonPosition, + styleLoadIndicatorPosition: loadingIndicatorPosition, + stylePanelAspectRatio: panelAspectRatio, + stylePanelLayout: panelLayout, + styleProgressIndicatorPosition: uploadProgressIndicatorPosition, + server: { + load: async (source, load) => { + let response = await fetch(source); + let blob2 = await response.blob(); + load(blob2); + }, + process: (fieldName, file2, metadata, load, error2, progress) => { + this.shouldUpdateState = false; + let fileKey = ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c2) => (c2 ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c2 / 4).toString(16)); + uploadUsing(fileKey, file2, (fileKey2) => { + this.shouldUpdateState = true; + load(fileKey2); + }, error2, progress); + }, + remove: async (source, load) => { + let fileKey = this.uploadedFileUrlIndex[source] ?? null; + if (!fileKey) { + return; + } + await deleteUploadedFileUsing(fileKey); + load(); + }, + revert: async (uniqueFileId, load) => { + await removeUploadedFileUsing(uniqueFileId); + load(); + } + } + }); + this.$watch("state", async () => { + if (!this.shouldUpdateState) { + return; + } + if (Object.values(this.state).filter((file2) => file2.startsWith("livewire-file:")).length) { + return; + } + if (JSON.stringify(this.state) === this.lastState) { + return; + } + this.lastState = JSON.stringify(this.state); + this.pond.files = await this.getFiles(); + }); + this.pond.on("reorderfiles", async (files) => { + const orderedFileKeys = files.map((file2) => file2.source instanceof File ? file2.serverId : this.uploadedFileUrlIndex[file2.source] ?? null).filter((fileKey) => fileKey); + await reorderUploadedFilesUsing(shouldAppendFiles ? orderedFileKeys : orderedFileKeys.reverse()); + }); + this.pond.on("initfile", async (fileItem) => { + if (!canDownload) { + return; + } + if (isAvatar) { + return; + } + this.insertDownloadLink(fileItem); + }); + this.pond.on("initfile", async (fileItem) => { + if (!canOpen) { + return; + } + if (isAvatar) { + return; + } + this.insertOpenLink(fileItem); + }); + this.pond.on("processfilestart", async () => { + this.dispatchFormEvent("file-upload-started"); + }); + this.pond.on("processfileprogress", async () => { + this.dispatchFormEvent("file-upload-started"); + }); + this.pond.on("processfile", async () => { + this.dispatchFormEvent("file-upload-finished"); + }); + this.pond.on("processfiles", async () => { + this.dispatchFormEvent("file-upload-finished"); + }); + this.pond.on("processfileabort", async () => { + this.dispatchFormEvent("file-upload-finished"); + }); + this.pond.on("processfilerevert", async () => { + this.dispatchFormEvent("file-upload-finished"); + }); + }, + dispatchFormEvent: function(name2) { + this.$el.closest("form")?.dispatchEvent(new CustomEvent(name2, { + composed: true, + cancelable: true + })); + }, + getUploadedFileUrls: async function() { + const uploadedFileUrls = await getUploadedFileUrlsUsing(); + this.fileKeyIndex = uploadedFileUrls ?? {}; + this.uploadedFileUrlIndex = Object.entries(this.fileKeyIndex).filter((value) => value).reduce((obj, [key, value]) => { + obj[value] = key; + return obj; + }, {}); + }, + getFiles: async function() { + await this.getUploadedFileUrls(); + let files = []; + for (const uploadedFileUrl of Object.values(this.fileKeyIndex)) { + if (!uploadedFileUrl) { + continue; + } + files.push({ + source: uploadedFileUrl, + options: { + type: "local" + } + }); + } + return shouldAppendFiles ? files : files.reverse(); + }, + insertDownloadLink: function(file2) { + if (file2.origin !== FileOrigin$1.LOCAL) { + return; + } + const anchor = this.getDownloadLink(file2); + if (!anchor) { + return; + } + document.getElementById(`filepond--item-${file2.id}`).querySelector(".filepond--file-info-main").prepend(anchor); + }, + insertOpenLink: function(file2) { + if (file2.origin !== FileOrigin$1.LOCAL) { + return; + } + const anchor = this.getOpenLink(file2); + if (!anchor) { + return; + } + document.getElementById(`filepond--item-${file2.id}`).querySelector(".filepond--file-info-main").prepend(anchor); + }, + getDownloadLink: function(file2) { + let fileSource = file2.source; + if (!fileSource) { + return; + } + const anchor = document.createElement("a"); + anchor.className = "filepond--download-icon"; + anchor.href = fileSource; + anchor.download = file2.file.name; + return anchor; + }, + getOpenLink: function(file2) { + let fileSource = file2.source; + if (!fileSource) { + return; + } + const anchor = document.createElement("a"); + anchor.className = "filepond--open-icon"; + anchor.href = fileSource; + anchor.target = "_blank"; + return anchor; + } + }; + }); +}; +var locales2 = { + ar: ar_ar_default, + cs: cs_cz_default, + da: da_dk_default, + de: de_de_default, + en: en_en_default, + es: es_es_default, + fa: fa_ir_default, + fr: fr_fr_default, + hu: hu_hu_default, + id: id_id_default, + it: it_it_default, + nl: nl_nl_default, + pl: pl_pl_default, + pt_BR: pt_br_default, + pt_PT: pt_br_default, + ro: ro_ro_default, + ru: ru_ru_default, + sv: sv_se_default, + tr: tr_tr_default, + uk: uk_ua_default, + vi: vi_vi_default, + zh_CN: zh_cn_default, + zh_TW: zh_tw_default +}; + +// packages/forms/resources/js/components/key-value.js +var key_value_default = (Alpine) => { + Alpine.data("keyValueFormComponent", ({state: state2}) => ({ + state: state2, + rows: [], + shouldUpdateRows: true, + init: function() { + this.updateRows(); + if (this.rows.length <= 0) { + this.addRow(); + } + this.shouldUpdateRows = true; + this.$watch("state", () => { + if (!this.shouldUpdateRows) { + this.shouldUpdateRows = true; + return; + } + this.updateRows(); + }); + }, + addRow: function() { + this.rows.push({key: "", value: ""}); + this.updateState(); + }, + deleteRow: function(index2) { + this.rows.splice(index2, 1); + if (this.rows.length <= 0) { + this.addRow(); + } + this.updateState(); + this.shouldUpdateRows = true; + }, + reorderRows: function(event) { + const rows = Alpine.raw(this.rows); + const reorderedRow = rows.splice(event.oldIndex, 1)[0]; + rows.splice(event.newIndex, 0, reorderedRow); + this.rows = rows; + this.updateState(); + }, + updateRows: function() { + let rows = []; + for (let [key, value] of Object.entries(this.state ?? {})) { + rows.push({ + key, + value + }); + } + this.rows = rows; + }, + updateState: function() { + let state3 = {}; + this.rows.forEach((row) => { + if (row.key === "" || row.key === null) { + return; + } + state3[row.key] = row.value; + }); + this.shouldUpdateRows = false; + this.state = state3; + } + })); +}; + +// node_modules/@github/file-attachment-element/dist/index.js +var Attachment = class { + constructor(file2, directory) { + this.file = file2; + this.directory = directory; + this.state = "pending"; + this.id = null; + this.href = null; + this.name = null; + this.percent = 0; + } + static traverse(transfer, directory) { + return transferredFiles(transfer, directory); + } + static from(files) { + const result = []; + for (const file2 of files) { + if (file2 instanceof File) { + result.push(new Attachment(file2)); + } else if (file2 instanceof Attachment) { + result.push(file2); + } else { + throw new Error("Unexpected type"); + } + } + return result; + } + get fullPath() { + return this.directory ? `${this.directory}/${this.file.name}` : this.file.name; + } + isImage() { + return ["image/gif", "image/png", "image/jpg", "image/jpeg"].indexOf(this.file.type) > -1; + } + saving(percent) { + if (this.state !== "pending" && this.state !== "saving") { + throw new Error(`Unexpected transition from ${this.state} to saving`); + } + this.state = "saving"; + this.percent = percent; + } + saved(attributes) { + var _a, _b, _c; + if (this.state !== "pending" && this.state !== "saving") { + throw new Error(`Unexpected transition from ${this.state} to saved`); + } + this.state = "saved"; + this.id = (_a = attributes === null || attributes === void 0 ? void 0 : attributes.id) !== null && _a !== void 0 ? _a : null; + this.href = (_b = attributes === null || attributes === void 0 ? void 0 : attributes.href) !== null && _b !== void 0 ? _b : null; + this.name = (_c = attributes === null || attributes === void 0 ? void 0 : attributes.name) !== null && _c !== void 0 ? _c : null; + } + isPending() { + return this.state === "pending"; + } + isSaving() { + return this.state === "saving"; + } + isSaved() { + return this.state === "saved"; + } +}; +function transferredFiles(transfer, directory) { + if (directory && isDirectory(transfer)) { + return traverse("", roots(transfer)); + } + return Promise.resolve(visible(Array.from(transfer.files || [])).map((f) => new Attachment(f))); +} +function hidden(file2) { + return file2.name.startsWith("."); +} +function visible(files) { + return Array.from(files).filter((file2) => !hidden(file2)); +} +function getFile(entry) { + return new Promise(function(resolve, reject) { + entry.file(resolve, reject); + }); +} +function getEntries(entry) { + return new Promise(function(resolve, reject) { + const result = []; + const reader = entry.createReader(); + const read = () => { + reader.readEntries((entries) => { + if (entries.length > 0) { + result.push(...entries); + read(); + } else { + resolve(result); + } + }, reject); + }; + read(); + }); +} +async function traverse(path, entries) { + const results = []; + for (const entry of visible(entries)) { + if (entry.isDirectory) { + results.push(...await traverse(entry.fullPath, await getEntries(entry))); + } else { + const file2 = await getFile(entry); + results.push(new Attachment(file2, path)); + } + } + return results; +} +function isDirectory(transfer) { + return transfer.items && Array.from(transfer.items).some((item2) => { + const entry = item2.webkitGetAsEntry && item2.webkitGetAsEntry(); + return entry && entry.isDirectory; + }); +} +function roots(transfer) { + return Array.from(transfer.items).map((item2) => item2.webkitGetAsEntry()).filter((entry) => entry != null); +} +var FileAttachmentElement = class extends HTMLElement { + connectedCallback() { + this.addEventListener("dragenter", onDragenter); + this.addEventListener("dragover", onDragenter); + this.addEventListener("dragleave", onDragleave); + this.addEventListener("drop", onDrop); + this.addEventListener("paste", onPaste); + this.addEventListener("change", onChange); + } + disconnectedCallback() { + this.removeEventListener("dragenter", onDragenter); + this.removeEventListener("dragover", onDragenter); + this.removeEventListener("dragleave", onDragleave); + this.removeEventListener("drop", onDrop); + this.removeEventListener("paste", onPaste); + this.removeEventListener("change", onChange); + } + get directory() { + return this.hasAttribute("directory"); + } + set directory(value) { + if (value) { + this.setAttribute("directory", ""); + } else { + this.removeAttribute("directory"); + } + } + async attach(transferred) { + const attachments = transferred instanceof DataTransfer ? await Attachment.traverse(transferred, this.directory) : Attachment.from(transferred); + const accepted = this.dispatchEvent(new CustomEvent("file-attachment-accept", { + bubbles: true, + cancelable: true, + detail: {attachments} + })); + if (accepted && attachments.length) { + this.dispatchEvent(new CustomEvent("file-attachment-accepted", { + bubbles: true, + detail: {attachments} + })); + } + } +}; +function hasFile(transfer) { + return Array.from(transfer.types).indexOf("Files") >= 0; +} +var dragging = null; +function onDragenter(event) { + const target = event.currentTarget; + if (dragging) { + clearTimeout(dragging); + } + dragging = window.setTimeout(() => target.removeAttribute("hover"), 200); + const transfer = event.dataTransfer; + if (!transfer || !hasFile(transfer)) + return; + transfer.dropEffect = "copy"; + target.setAttribute("hover", ""); + event.stopPropagation(); + event.preventDefault(); +} +function onDragleave(event) { + if (event.dataTransfer) { + event.dataTransfer.dropEffect = "none"; + } + const target = event.currentTarget; + target.removeAttribute("hover"); + event.stopPropagation(); + event.preventDefault(); +} +function onDrop(event) { + const container = event.currentTarget; + if (!(container instanceof FileAttachmentElement)) + return; + container.removeAttribute("hover"); + const transfer = event.dataTransfer; + if (!transfer || !hasFile(transfer)) + return; + container.attach(transfer); + event.stopPropagation(); + event.preventDefault(); +} +var images2 = /^image\/(gif|png|jpeg)$/; +function pastedFile(items) { + for (const item2 of items) { + if (images2.test(item2.type)) { + return item2.getAsFile(); + } + } + return null; +} +function onPaste(event) { + if (!event.clipboardData) + return; + if (!event.clipboardData.items) + return; + const container = event.currentTarget; + if (!(container instanceof FileAttachmentElement)) + return; + const file2 = pastedFile(event.clipboardData.items); + if (!file2) + return; + const files = [file2]; + container.attach(files); + event.preventDefault(); +} +function onChange(event) { + const container = event.currentTarget; + if (!(container instanceof FileAttachmentElement)) + return; + const input = event.target; + if (!(input instanceof HTMLInputElement)) + return; + const id = container.getAttribute("input"); + if (id && input.id !== id) + return; + const files = input.files; + if (!files || files.length === 0) + return; + container.attach(files); + input.value = ""; +} +if (!window.customElements.get("file-attachment")) { + window.FileAttachmentElement = FileAttachmentElement; + window.customElements.define("file-attachment", FileAttachmentElement); +} + +// node_modules/@github/markdown-toolbar-element/dist/index.js +var buttonSelectors = [ + "[data-md-button]", + "md-header", + "md-bold", + "md-italic", + "md-quote", + "md-code", + "md-link", + "md-image", + "md-unordered-list", + "md-ordered-list", + "md-task-list", + "md-mention", + "md-ref", + "md-strikethrough" +]; +function getButtons(toolbar) { + const els = []; + for (const button of toolbar.querySelectorAll(buttonSelectors.join(", "))) { + if (button.hidden || button.offsetWidth <= 0 && button.offsetHeight <= 0) + continue; + if (button.closest("markdown-toolbar") === toolbar) + els.push(button); + } + return els; +} +function keydown(fn2) { + return function(event) { + if (event.key === " " || event.key === "Enter") { + event.preventDefault(); + fn2(event); + } + }; +} +var styles2 = new WeakMap(); +var MarkdownButtonElement = class extends HTMLElement { + constructor() { + super(); + const apply2 = () => { + const style = styles2.get(this); + if (!style) + return; + applyStyle(this, style); + }; + this.addEventListener("keydown", keydown(apply2)); + this.addEventListener("click", apply2); + } + connectedCallback() { + if (!this.hasAttribute("role")) { + this.setAttribute("role", "button"); + } + } + click() { + const style = styles2.get(this); + if (!style) + return; + applyStyle(this, style); + } +}; +var MarkdownHeaderButtonElement = class extends MarkdownButtonElement { + constructor() { + super(); + const level = parseInt(this.getAttribute("level") || "3", 10); + if (level < 1 || level > 6) { + return; + } + const prefix = `${"#".repeat(level)} `; + styles2.set(this, { + prefix + }); + } +}; +if (!window.customElements.get("md-header")) { + window.MarkdownHeaderButtonElement = MarkdownHeaderButtonElement; + window.customElements.define("md-header", MarkdownHeaderButtonElement); +} +var MarkdownBoldButtonElement = class extends MarkdownButtonElement { + constructor() { + super(); + styles2.set(this, {prefix: "**", suffix: "**", trimFirst: true}); + } + connectedCallback() { + super.connectedCallback(); + this.setAttribute("hotkey", "b"); + } +}; +if (!window.customElements.get("md-bold")) { + window.MarkdownBoldButtonElement = MarkdownBoldButtonElement; + window.customElements.define("md-bold", MarkdownBoldButtonElement); +} +var MarkdownItalicButtonElement = class extends MarkdownButtonElement { + constructor() { + super(); + styles2.set(this, {prefix: "_", suffix: "_", trimFirst: true}); + } + connectedCallback() { + super.connectedCallback(); + this.setAttribute("hotkey", "i"); + } +}; +if (!window.customElements.get("md-italic")) { + window.MarkdownItalicButtonElement = MarkdownItalicButtonElement; + window.customElements.define("md-italic", MarkdownItalicButtonElement); +} +var MarkdownQuoteButtonElement = class extends MarkdownButtonElement { + constructor() { + super(); + styles2.set(this, {prefix: "> ", multiline: true, surroundWithNewlines: true}); + } + connectedCallback() { + super.connectedCallback(); + this.setAttribute("hotkey", "."); + this.setAttribute("hotkey-requires-shift", "true"); + } +}; +if (!window.customElements.get("md-quote")) { + window.MarkdownQuoteButtonElement = MarkdownQuoteButtonElement; + window.customElements.define("md-quote", MarkdownQuoteButtonElement); +} +var MarkdownCodeButtonElement = class extends MarkdownButtonElement { + constructor() { + super(); + styles2.set(this, {prefix: "`", suffix: "`", blockPrefix: "```", blockSuffix: "```"}); + } + connectedCallback() { + super.connectedCallback(); + this.setAttribute("hotkey", "e"); + } +}; +if (!window.customElements.get("md-code")) { + window.MarkdownCodeButtonElement = MarkdownCodeButtonElement; + window.customElements.define("md-code", MarkdownCodeButtonElement); +} +var MarkdownLinkButtonElement = class extends MarkdownButtonElement { + constructor() { + super(); + styles2.set(this, {prefix: "[", suffix: "](url)", replaceNext: "url", scanFor: "https?://"}); + } + connectedCallback() { + super.connectedCallback(); + this.setAttribute("hotkey", "k"); + } +}; +if (!window.customElements.get("md-link")) { + window.MarkdownLinkButtonElement = MarkdownLinkButtonElement; + window.customElements.define("md-link", MarkdownLinkButtonElement); +} +var MarkdownImageButtonElement = class extends MarkdownButtonElement { + constructor() { + super(); + styles2.set(this, {prefix: "![", suffix: "](url)", replaceNext: "url", scanFor: "https?://"}); + } +}; +if (!window.customElements.get("md-image")) { + window.MarkdownImageButtonElement = MarkdownImageButtonElement; + window.customElements.define("md-image", MarkdownImageButtonElement); +} +var MarkdownUnorderedListButtonElement = class extends MarkdownButtonElement { + constructor() { + super(); + styles2.set(this, {prefix: "- ", multiline: true, surroundWithNewlines: true}); + } + connectedCallback() { + super.connectedCallback(); + this.setAttribute("hotkey", "8"); + this.setAttribute("hotkey-requires-shift", "true"); + } +}; +if (!window.customElements.get("md-unordered-list")) { + window.MarkdownUnorderedListButtonElement = MarkdownUnorderedListButtonElement; + window.customElements.define("md-unordered-list", MarkdownUnorderedListButtonElement); +} +var MarkdownOrderedListButtonElement = class extends MarkdownButtonElement { + constructor() { + super(); + styles2.set(this, {prefix: "1. ", multiline: true, orderedList: true}); + } + connectedCallback() { + super.connectedCallback(); + this.setAttribute("hotkey", "7"); + this.setAttribute("hotkey-requires-shift", "true"); + } +}; +if (!window.customElements.get("md-ordered-list")) { + window.MarkdownOrderedListButtonElement = MarkdownOrderedListButtonElement; + window.customElements.define("md-ordered-list", MarkdownOrderedListButtonElement); +} +var MarkdownTaskListButtonElement = class extends MarkdownButtonElement { + constructor() { + super(); + styles2.set(this, {prefix: "- [ ] ", multiline: true, surroundWithNewlines: true}); + } + connectedCallback() { + super.connectedCallback(); + this.setAttribute("hotkey", "L"); + } +}; +if (!window.customElements.get("md-task-list")) { + window.MarkdownTaskListButtonElement = MarkdownTaskListButtonElement; + window.customElements.define("md-task-list", MarkdownTaskListButtonElement); +} +var MarkdownMentionButtonElement = class extends MarkdownButtonElement { + constructor() { + super(); + styles2.set(this, {prefix: "@", prefixSpace: true}); + } +}; +if (!window.customElements.get("md-mention")) { + window.MarkdownMentionButtonElement = MarkdownMentionButtonElement; + window.customElements.define("md-mention", MarkdownMentionButtonElement); +} +var MarkdownRefButtonElement = class extends MarkdownButtonElement { + constructor() { + super(); + styles2.set(this, {prefix: "#", prefixSpace: true}); + } +}; +if (!window.customElements.get("md-ref")) { + window.MarkdownRefButtonElement = MarkdownRefButtonElement; + window.customElements.define("md-ref", MarkdownRefButtonElement); +} +var MarkdownStrikethroughButtonElement = class extends MarkdownButtonElement { + constructor() { + super(); + styles2.set(this, {prefix: "~~", suffix: "~~", trimFirst: true}); + } +}; +if (!window.customElements.get("md-strikethrough")) { + window.MarkdownStrikethroughButtonElement = MarkdownStrikethroughButtonElement; + window.customElements.define("md-strikethrough", MarkdownStrikethroughButtonElement); +} +var modifierKey = navigator.userAgent.match(/Macintosh/) ? "Meta" : "Control"; +var MarkdownToolbarElement = class extends HTMLElement { + constructor() { + super(); + } + connectedCallback() { + if (!this.hasAttribute("role")) { + this.setAttribute("role", "toolbar"); + } + this.addEventListener("keydown", focusKeydown); + const fn2 = shortcut.bind(null, this); + if (this.field) { + this.field.addEventListener("keydown", fn2); + shortcutListeners.set(this, fn2); + } + this.setAttribute("tabindex", "0"); + this.addEventListener("focus", onToolbarFocus, {once: true}); + } + disconnectedCallback() { + const fn2 = shortcutListeners.get(this); + if (fn2 && this.field) { + this.field.removeEventListener("keydown", fn2); + shortcutListeners.delete(this); + } + this.removeEventListener("keydown", focusKeydown); + } + get field() { + const id = this.getAttribute("for"); + if (!id) + return null; + const root2 = "getRootNode" in this ? this.getRootNode() : document; + let field; + if (root2 instanceof Document || root2 instanceof ShadowRoot) { + field = root2.getElementById(id); + } + return field instanceof HTMLTextAreaElement ? field : null; + } +}; +function onToolbarFocus({target}) { + if (!(target instanceof Element)) + return; + target.removeAttribute("tabindex"); + let tabindex = "0"; + for (const button of getButtons(target)) { + button.setAttribute("tabindex", tabindex); + if (tabindex === "0") { + button.focus(); + tabindex = "-1"; + } + } +} +function focusKeydown(event) { + const key = event.key; + if (key !== "ArrowRight" && key !== "ArrowLeft" && key !== "Home" && key !== "End") + return; + const toolbar = event.currentTarget; + if (!(toolbar instanceof HTMLElement)) + return; + const buttons = getButtons(toolbar); + const index2 = buttons.indexOf(event.target); + const length = buttons.length; + if (index2 === -1) + return; + let n2 = 0; + if (key === "ArrowLeft") + n2 = index2 - 1; + if (key === "ArrowRight") + n2 = index2 + 1; + if (key === "End") + n2 = length - 1; + if (n2 < 0) + n2 = length - 1; + if (n2 > length - 1) + n2 = 0; + for (let i = 0; i < length; i += 1) { + buttons[i].setAttribute("tabindex", i === n2 ? "0" : "-1"); + } + event.preventDefault(); + buttons[n2].focus(); +} +var shortcutListeners = new WeakMap(); +function elementHotkeyRequiresShift(element) { + return element.hasAttribute("hotkey-requires-shift") && element.getAttribute("hotkey-requires-shift") !== "false"; +} +function findHotkey(toolbar, key, shiftPressed) { + for (const el of toolbar.querySelectorAll("[hotkey]")) { + if (el.getAttribute("hotkey") === key && (!elementHotkeyRequiresShift(el) || shiftPressed)) { + return el; + } + } + return null; +} +function shortcut(toolbar, event) { + if (event.metaKey && modifierKey === "Meta" || event.ctrlKey && modifierKey === "Control") { + const key = event.shiftKey ? event.key.toUpperCase() : event.key; + const button = findHotkey(toolbar, key, event.shiftKey); + if (button) { + button.click(); + event.preventDefault(); + } + } +} +if (!window.customElements.get("markdown-toolbar")) { + window.MarkdownToolbarElement = MarkdownToolbarElement; + window.customElements.define("markdown-toolbar", MarkdownToolbarElement); +} +function isMultipleLines(string) { + return string.trim().split("\n").length > 1; +} +function repeat(string, n2) { + return Array(n2 + 1).join(string); +} +function wordSelectionStart(text3, i) { + let index2 = i; + while (text3[index2] && text3[index2 - 1] != null && !text3[index2 - 1].match(/\s/)) { + index2--; + } + return index2; +} +function wordSelectionEnd(text3, i, multiline) { + let index2 = i; + const breakpoint = multiline ? /\n/ : /\s/; + while (text3[index2] && !text3[index2].match(breakpoint)) { + index2++; + } + return index2; +} +var canInsertText = null; +function insertText(textarea, {text: text3, selectionStart, selectionEnd}) { + const originalSelectionStart = textarea.selectionStart; + const before = textarea.value.slice(0, originalSelectionStart); + const after = textarea.value.slice(textarea.selectionEnd); + if (canInsertText === null || canInsertText === true) { + textarea.contentEditable = "true"; + try { + canInsertText = document.execCommand("insertText", false, text3); + } catch (error2) { + canInsertText = false; + } + textarea.contentEditable = "false"; + } + if (canInsertText && !textarea.value.slice(0, textarea.selectionStart).endsWith(text3)) { + canInsertText = false; + } + if (!canInsertText) { + try { + document.execCommand("ms-beginUndoUnit"); + } catch (e2) { + } + textarea.value = before + text3 + after; + try { + document.execCommand("ms-endUndoUnit"); + } catch (e2) { + } + textarea.dispatchEvent(new CustomEvent("input", {bubbles: true, cancelable: true})); + } + if (selectionStart != null && selectionEnd != null) { + textarea.setSelectionRange(selectionStart, selectionEnd); + } else { + textarea.setSelectionRange(originalSelectionStart, textarea.selectionEnd); + } +} +function styleSelectedText(textarea, styleArgs) { + const text3 = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd); + let result; + if (styleArgs.orderedList) { + result = orderedList(textarea); + } else if (styleArgs.multiline && isMultipleLines(text3)) { + result = multilineStyle(textarea, styleArgs); + } else { + result = blockStyle(textarea, styleArgs); + } + insertText(textarea, result); +} +function expandSelectedText(textarea, prefixToUse, suffixToUse, multiline = false) { + if (textarea.selectionStart === textarea.selectionEnd) { + textarea.selectionStart = wordSelectionStart(textarea.value, textarea.selectionStart); + textarea.selectionEnd = wordSelectionEnd(textarea.value, textarea.selectionEnd, multiline); + } else { + const expandedSelectionStart = textarea.selectionStart - prefixToUse.length; + const expandedSelectionEnd = textarea.selectionEnd + suffixToUse.length; + const beginsWithPrefix = textarea.value.slice(expandedSelectionStart, textarea.selectionStart) === prefixToUse; + const endsWithSuffix = textarea.value.slice(textarea.selectionEnd, expandedSelectionEnd) === suffixToUse; + if (beginsWithPrefix && endsWithSuffix) { + textarea.selectionStart = expandedSelectionStart; + textarea.selectionEnd = expandedSelectionEnd; + } + } + return textarea.value.slice(textarea.selectionStart, textarea.selectionEnd); +} +function newlinesToSurroundSelectedText(textarea) { + const beforeSelection = textarea.value.slice(0, textarea.selectionStart); + const afterSelection = textarea.value.slice(textarea.selectionEnd); + const breaksBefore = beforeSelection.match(/\n*$/); + const breaksAfter = afterSelection.match(/^\n*/); + const newlinesBeforeSelection = breaksBefore ? breaksBefore[0].length : 0; + const newlinesAfterSelection = breaksAfter ? breaksAfter[0].length : 0; + let newlinesToAppend; + let newlinesToPrepend; + if (beforeSelection.match(/\S/) && newlinesBeforeSelection < 2) { + newlinesToAppend = repeat("\n", 2 - newlinesBeforeSelection); + } + if (afterSelection.match(/\S/) && newlinesAfterSelection < 2) { + newlinesToPrepend = repeat("\n", 2 - newlinesAfterSelection); + } + if (newlinesToAppend == null) { + newlinesToAppend = ""; + } + if (newlinesToPrepend == null) { + newlinesToPrepend = ""; + } + return {newlinesToAppend, newlinesToPrepend}; +} +function blockStyle(textarea, arg) { + let newlinesToAppend; + let newlinesToPrepend; + const {prefix, suffix, blockPrefix, blockSuffix, replaceNext, prefixSpace, scanFor, surroundWithNewlines} = arg; + const originalSelectionStart = textarea.selectionStart; + const originalSelectionEnd = textarea.selectionEnd; + let selectedText = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd); + let prefixToUse = isMultipleLines(selectedText) && blockPrefix.length > 0 ? `${blockPrefix} +` : prefix; + let suffixToUse = isMultipleLines(selectedText) && blockSuffix.length > 0 ? ` +${blockSuffix}` : suffix; + if (prefixSpace) { + const beforeSelection = textarea.value[textarea.selectionStart - 1]; + if (textarea.selectionStart !== 0 && beforeSelection != null && !beforeSelection.match(/\s/)) { + prefixToUse = ` ${prefixToUse}`; + } + } + selectedText = expandSelectedText(textarea, prefixToUse, suffixToUse, arg.multiline); + let selectionStart = textarea.selectionStart; + let selectionEnd = textarea.selectionEnd; + const hasReplaceNext = replaceNext.length > 0 && suffixToUse.indexOf(replaceNext) > -1 && selectedText.length > 0; + if (surroundWithNewlines) { + const ref = newlinesToSurroundSelectedText(textarea); + newlinesToAppend = ref.newlinesToAppend; + newlinesToPrepend = ref.newlinesToPrepend; + prefixToUse = newlinesToAppend + prefix; + suffixToUse += newlinesToPrepend; + } + if (selectedText.startsWith(prefixToUse) && selectedText.endsWith(suffixToUse)) { + const replacementText = selectedText.slice(prefixToUse.length, selectedText.length - suffixToUse.length); + if (originalSelectionStart === originalSelectionEnd) { + let position = originalSelectionStart - prefixToUse.length; + position = Math.max(position, selectionStart); + position = Math.min(position, selectionStart + replacementText.length); + selectionStart = selectionEnd = position; + } else { + selectionEnd = selectionStart + replacementText.length; + } + return {text: replacementText, selectionStart, selectionEnd}; + } else if (!hasReplaceNext) { + let replacementText = prefixToUse + selectedText + suffixToUse; + selectionStart = originalSelectionStart + prefixToUse.length; + selectionEnd = originalSelectionEnd + prefixToUse.length; + const whitespaceEdges = selectedText.match(/^\s*|\s*$/g); + if (arg.trimFirst && whitespaceEdges) { + const leadingWhitespace = whitespaceEdges[0] || ""; + const trailingWhitespace = whitespaceEdges[1] || ""; + replacementText = leadingWhitespace + prefixToUse + selectedText.trim() + suffixToUse + trailingWhitespace; + selectionStart += leadingWhitespace.length; + selectionEnd -= trailingWhitespace.length; + } + return {text: replacementText, selectionStart, selectionEnd}; + } else if (scanFor.length > 0 && selectedText.match(scanFor)) { + suffixToUse = suffixToUse.replace(replaceNext, selectedText); + const replacementText = prefixToUse + suffixToUse; + selectionStart = selectionEnd = selectionStart + prefixToUse.length; + return {text: replacementText, selectionStart, selectionEnd}; + } else { + const replacementText = prefixToUse + selectedText + suffixToUse; + selectionStart = selectionStart + prefixToUse.length + selectedText.length + suffixToUse.indexOf(replaceNext); + selectionEnd = selectionStart + replaceNext.length; + return {text: replacementText, selectionStart, selectionEnd}; + } +} +function multilineStyle(textarea, arg) { + const {prefix, suffix, surroundWithNewlines} = arg; + let text3 = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd); + let selectionStart = textarea.selectionStart; + let selectionEnd = textarea.selectionEnd; + const lines = text3.split("\n"); + const undoStyle = lines.every((line) => line.startsWith(prefix) && line.endsWith(suffix)); + if (undoStyle) { + text3 = lines.map((line) => line.slice(prefix.length, line.length - suffix.length)).join("\n"); + selectionEnd = selectionStart + text3.length; + } else { + text3 = lines.map((line) => prefix + line + suffix).join("\n"); + if (surroundWithNewlines) { + const {newlinesToAppend, newlinesToPrepend} = newlinesToSurroundSelectedText(textarea); + selectionStart += newlinesToAppend.length; + selectionEnd = selectionStart + text3.length; + text3 = newlinesToAppend + text3 + newlinesToPrepend; + } + } + return {text: text3, selectionStart, selectionEnd}; +} +function orderedList(textarea) { + const orderedListRegex = /^\d+\.\s+/; + const noInitialSelection = textarea.selectionStart === textarea.selectionEnd; + let selectionEnd; + let selectionStart; + let text3 = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd); + let textToUnstyle = text3; + let lines = text3.split("\n"); + let startOfLine, endOfLine; + if (noInitialSelection) { + const linesBefore = textarea.value.slice(0, textarea.selectionStart).split(/\n/); + startOfLine = textarea.selectionStart - linesBefore[linesBefore.length - 1].length; + endOfLine = wordSelectionEnd(textarea.value, textarea.selectionStart, true); + textToUnstyle = textarea.value.slice(startOfLine, endOfLine); + } + const linesToUnstyle = textToUnstyle.split("\n"); + const undoStyling = linesToUnstyle.every((line) => orderedListRegex.test(line)); + if (undoStyling) { + lines = linesToUnstyle.map((line) => line.replace(orderedListRegex, "")); + text3 = lines.join("\n"); + if (noInitialSelection && startOfLine && endOfLine) { + const lengthDiff = linesToUnstyle[0].length - lines[0].length; + selectionStart = selectionEnd = textarea.selectionStart - lengthDiff; + textarea.selectionStart = startOfLine; + textarea.selectionEnd = endOfLine; + } + } else { + lines = numberedLines(lines); + text3 = lines.join("\n"); + const {newlinesToAppend, newlinesToPrepend} = newlinesToSurroundSelectedText(textarea); + selectionStart = textarea.selectionStart + newlinesToAppend.length; + selectionEnd = selectionStart + text3.length; + if (noInitialSelection) + selectionStart = selectionEnd; + text3 = newlinesToAppend + text3 + newlinesToPrepend; + } + return {text: text3, selectionStart, selectionEnd}; +} +function numberedLines(lines) { + let i; + let len; + let index2; + const results = []; + for (index2 = i = 0, len = lines.length; i < len; index2 = ++i) { + const line = lines[index2]; + results.push(`${index2 + 1}. ${line}`); + } + return results; +} +function applyStyle(button, stylesToApply) { + const toolbar = button.closest("markdown-toolbar"); + if (!(toolbar instanceof MarkdownToolbarElement)) + return; + const defaults4 = { + prefix: "", + suffix: "", + blockPrefix: "", + blockSuffix: "", + multiline: false, + replaceNext: "", + prefixSpace: false, + scanFor: "", + surroundWithNewlines: false, + orderedList: false, + trimFirst: false + }; + const style = Object.assign(Object.assign({}, defaults4), stylesToApply); + const field = toolbar.field; + if (field) { + field.focus(); + styleSelectedText(field, style); + } +} + +// node_modules/dompurify/dist/purify.es.js +/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */ +function _typeof(obj) { + "@babel/helpers - typeof"; + return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) { + return typeof obj2; + } : function(obj2) { + return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + }, _typeof(obj); +} +function _setPrototypeOf(o2, p2) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf3(o3, p3) { + o3.__proto__ = p3; + return o3; + }; + return _setPrototypeOf(o2, p2); +} +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) + return false; + if (Reflect.construct.sham) + return false; + if (typeof Proxy === "function") + return true; + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { + })); + return true; + } catch (e2) { + return false; + } +} +function _construct(Parent, args, Class) { + if (_isNativeReflectConstruct()) { + _construct = Reflect.construct; + } else { + _construct = function _construct2(Parent2, args2, Class2) { + var a2 = [null]; + a2.push.apply(a2, args2); + var Constructor = Function.bind.apply(Parent2, a2); + var instance = new Constructor(); + if (Class2) + _setPrototypeOf(instance, Class2.prototype); + return instance; + }; + } + return _construct.apply(null, arguments); +} +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); +} +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) + return _arrayLikeToArray(arr); +} +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) + return Array.from(iter); +} +function _unsupportedIterableToArray(o2, minLen) { + if (!o2) + return; + if (typeof o2 === "string") + return _arrayLikeToArray(o2, minLen); + var n2 = Object.prototype.toString.call(o2).slice(8, -1); + if (n2 === "Object" && o2.constructor) + n2 = o2.constructor.name; + if (n2 === "Map" || n2 === "Set") + return Array.from(o2); + if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) + return _arrayLikeToArray(o2, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) + len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) + arr2[i] = arr[i]; + return arr2; +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +var hasOwnProperty = Object.hasOwnProperty; +var setPrototypeOf = Object.setPrototypeOf; +var isFrozen = Object.isFrozen; +var getPrototypeOf = Object.getPrototypeOf; +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; +var freeze = Object.freeze; +var seal = Object.seal; +var create2 = Object.create; +var _ref = typeof Reflect !== "undefined" && Reflect; +var apply = _ref.apply; +var construct = _ref.construct; +if (!apply) { + apply = function apply2(fun, thisValue, args) { + return fun.apply(thisValue, args); + }; +} +if (!freeze) { + freeze = function freeze2(x) { + return x; + }; +} +if (!seal) { + seal = function seal2(x) { + return x; + }; +} +if (!construct) { + construct = function construct2(Func, args) { + return _construct(Func, _toConsumableArray(args)); + }; +} +var arrayForEach = unapply(Array.prototype.forEach); +var arrayPop = unapply(Array.prototype.pop); +var arrayPush = unapply(Array.prototype.push); +var stringToLowerCase = unapply(String.prototype.toLowerCase); +var stringMatch = unapply(String.prototype.match); +var stringReplace = unapply(String.prototype.replace); +var stringIndexOf = unapply(String.prototype.indexOf); +var stringTrim = unapply(String.prototype.trim); +var regExpTest = unapply(RegExp.prototype.test); +var typeErrorCreate = unconstruct(TypeError); +function unapply(func) { + return function(thisArg) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + return apply(func, thisArg, args); + }; +} +function unconstruct(func) { + return function() { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + return construct(func, args); + }; +} +function addToSet(set2, array, transformCaseFunc) { + transformCaseFunc = transformCaseFunc ? transformCaseFunc : stringToLowerCase; + if (setPrototypeOf) { + setPrototypeOf(set2, null); + } + var l = array.length; + while (l--) { + var element = array[l]; + if (typeof element === "string") { + var lcElement = transformCaseFunc(element); + if (lcElement !== element) { + if (!isFrozen(array)) { + array[l] = lcElement; + } + element = lcElement; + } + } + set2[element] = true; + } + return set2; +} +function clone(object) { + var newObject = create2(null); + var property; + for (property in object) { + if (apply(hasOwnProperty, object, [property])) { + newObject[property] = object[property]; + } + } + return newObject; +} +function lookupGetter(object, prop) { + while (object !== null) { + var desc = getOwnPropertyDescriptor(object, prop); + if (desc) { + if (desc.get) { + return unapply(desc.get); + } + if (typeof desc.value === "function") { + return unapply(desc.value); + } + } + object = getPrototypeOf(object); + } + function fallbackValue(element) { + console.warn("fallback value for", element); + return null; + } + return fallbackValue; +} +var html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]); +var svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]); +var svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]); +var svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "fedropshadow", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]); +var mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover"]); +var mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]); +var text2 = freeze(["#text"]); +var html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]); +var svg3 = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]); +var mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]); +var xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]); +var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); +var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm); +var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); +var ARIA_ATTR = seal(/^aria-[\-\w]+$/); +var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i); +var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i); +var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g); +var DOCTYPE_NAME = seal(/^html$/i); +var getGlobal = function getGlobal2() { + return typeof window === "undefined" ? null : window; +}; +var _createTrustedTypesPolicy = function _createTrustedTypesPolicy2(trustedTypes, document2) { + if (_typeof(trustedTypes) !== "object" || typeof trustedTypes.createPolicy !== "function") { + return null; + } + var suffix = null; + var ATTR_NAME = "data-tt-policy-suffix"; + if (document2.currentScript && document2.currentScript.hasAttribute(ATTR_NAME)) { + suffix = document2.currentScript.getAttribute(ATTR_NAME); + } + var policyName = "dompurify" + (suffix ? "#" + suffix : ""); + try { + return trustedTypes.createPolicy(policyName, { + createHTML: function createHTML(html2) { + return html2; + }, + createScriptURL: function createScriptURL(scriptUrl) { + return scriptUrl; + } + }); + } catch (_) { + console.warn("TrustedTypes policy " + policyName + " could not be created."); + return null; + } +}; +function createDOMPurify() { + var window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(); + var DOMPurify = function DOMPurify2(root2) { + return createDOMPurify(root2); + }; + DOMPurify.version = "2.4.0"; + DOMPurify.removed = []; + if (!window2 || !window2.document || window2.document.nodeType !== 9) { + DOMPurify.isSupported = false; + return DOMPurify; + } + var originalDocument = window2.document; + var document2 = window2.document; + var DocumentFragment = window2.DocumentFragment, HTMLTemplateElement2 = window2.HTMLTemplateElement, Node2 = window2.Node, Element2 = window2.Element, NodeFilter2 = window2.NodeFilter, _window$NamedNodeMap = window2.NamedNodeMap, NamedNodeMap = _window$NamedNodeMap === void 0 ? window2.NamedNodeMap || window2.MozNamedAttrMap : _window$NamedNodeMap, HTMLFormElement = window2.HTMLFormElement, DOMParser2 = window2.DOMParser, trustedTypes = window2.trustedTypes; + var ElementPrototype = Element2.prototype; + var cloneNode = lookupGetter(ElementPrototype, "cloneNode"); + var getNextSibling = lookupGetter(ElementPrototype, "nextSibling"); + var getChildNodes = lookupGetter(ElementPrototype, "childNodes"); + var getParentNode2 = lookupGetter(ElementPrototype, "parentNode"); + if (typeof HTMLTemplateElement2 === "function") { + var template = document2.createElement("template"); + if (template.content && template.content.ownerDocument) { + document2 = template.content.ownerDocument; + } + } + var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument); + var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML("") : ""; + var _document = document2, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName; + var importNode = originalDocument.importNode; + var documentMode = {}; + try { + documentMode = clone(document2).documentMode ? document2.documentMode : {}; + } catch (_) { + } + var hooks = {}; + DOMPurify.isSupported = typeof getParentNode2 === "function" && implementation && typeof implementation.createHTMLDocument !== "undefined" && documentMode !== 9; + var MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE; + var IS_ALLOWED_URI$1 = IS_ALLOWED_URI; + var ALLOWED_TAGS = null; + var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text2))); + var ALLOWED_ATTR = null; + var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg3), _toConsumableArray(mathMl), _toConsumableArray(xml))); + var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, { + tagNameCheck: { + writable: true, + configurable: false, + enumerable: true, + value: null + }, + attributeNameCheck: { + writable: true, + configurable: false, + enumerable: true, + value: null + }, + allowCustomizedBuiltInElements: { + writable: true, + configurable: false, + enumerable: true, + value: false + } + })); + var FORBID_TAGS = null; + var FORBID_ATTR = null; + var ALLOW_ARIA_ATTR = true; + var ALLOW_DATA_ATTR = true; + var ALLOW_UNKNOWN_PROTOCOLS = false; + var SAFE_FOR_TEMPLATES = false; + var WHOLE_DOCUMENT = false; + var SET_CONFIG = false; + var FORCE_BODY = false; + var RETURN_DOM = false; + var RETURN_DOM_FRAGMENT = false; + var RETURN_TRUSTED_TYPE = false; + var SANITIZE_DOM = true; + var SANITIZE_NAMED_PROPS = false; + var SANITIZE_NAMED_PROPS_PREFIX = "user-content-"; + var KEEP_CONTENT = true; + var IN_PLACE = false; + var USE_PROFILES = {}; + var FORBID_CONTENTS = null; + var DEFAULT_FORBID_CONTENTS = addToSet({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]); + var DATA_URI_TAGS = null; + var DEFAULT_DATA_URI_TAGS = addToSet({}, ["audio", "video", "img", "source", "image", "track"]); + var URI_SAFE_ATTRIBUTES = null; + var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]); + var MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML"; + var SVG_NAMESPACE = "http://www.w3.org/2000/svg"; + var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; + var NAMESPACE = HTML_NAMESPACE; + var IS_EMPTY_INPUT = false; + var PARSER_MEDIA_TYPE; + var SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"]; + var DEFAULT_PARSER_MEDIA_TYPE = "text/html"; + var transformCaseFunc; + var CONFIG = null; + var formElement = document2.createElement("form"); + var isRegexOrFunction = function isRegexOrFunction2(testValue) { + return testValue instanceof RegExp || testValue instanceof Function; + }; + var _parseConfig = function _parseConfig2(cfg) { + if (CONFIG && CONFIG === cfg) { + return; + } + if (!cfg || _typeof(cfg) !== "object") { + cfg = {}; + } + cfg = clone(cfg); + PARSER_MEDIA_TYPE = SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; + transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? function(x) { + return x; + } : stringToLowerCase; + ALLOWED_TAGS = "ALLOWED_TAGS" in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS; + ALLOWED_ATTR = "ALLOWED_ATTR" in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR; + URI_SAFE_ATTRIBUTES = "ADD_URI_SAFE_ATTR" in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES; + DATA_URI_TAGS = "ADD_DATA_URI_TAGS" in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS; + FORBID_CONTENTS = "FORBID_CONTENTS" in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS; + FORBID_TAGS = "FORBID_TAGS" in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {}; + FORBID_ATTR = "FORBID_ATTR" in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {}; + USE_PROFILES = "USE_PROFILES" in cfg ? cfg.USE_PROFILES : false; + ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; + ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; + ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; + SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; + WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; + RETURN_DOM = cfg.RETURN_DOM || false; + RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; + RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; + FORCE_BODY = cfg.FORCE_BODY || false; + SANITIZE_DOM = cfg.SANITIZE_DOM !== false; + SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; + KEEP_CONTENT = cfg.KEEP_CONTENT !== false; + IN_PLACE = cfg.IN_PLACE || false; + IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1; + NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE; + if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) { + CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck; + } + if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) { + CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck; + } + if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") { + CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements; + } + if (SAFE_FOR_TEMPLATES) { + ALLOW_DATA_ATTR = false; + } + if (RETURN_DOM_FRAGMENT) { + RETURN_DOM = true; + } + if (USE_PROFILES) { + ALLOWED_TAGS = addToSet({}, _toConsumableArray(text2)); + ALLOWED_ATTR = []; + if (USE_PROFILES.html === true) { + addToSet(ALLOWED_TAGS, html$1); + addToSet(ALLOWED_ATTR, html); + } + if (USE_PROFILES.svg === true) { + addToSet(ALLOWED_TAGS, svg$1); + addToSet(ALLOWED_ATTR, svg3); + addToSet(ALLOWED_ATTR, xml); + } + if (USE_PROFILES.svgFilters === true) { + addToSet(ALLOWED_TAGS, svgFilters); + addToSet(ALLOWED_ATTR, svg3); + addToSet(ALLOWED_ATTR, xml); + } + if (USE_PROFILES.mathMl === true) { + addToSet(ALLOWED_TAGS, mathMl$1); + addToSet(ALLOWED_ATTR, mathMl); + addToSet(ALLOWED_ATTR, xml); + } + } + if (cfg.ADD_TAGS) { + if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) { + ALLOWED_TAGS = clone(ALLOWED_TAGS); + } + addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc); + } + if (cfg.ADD_ATTR) { + if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) { + ALLOWED_ATTR = clone(ALLOWED_ATTR); + } + addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc); + } + if (cfg.ADD_URI_SAFE_ATTR) { + addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc); + } + if (cfg.FORBID_CONTENTS) { + if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) { + FORBID_CONTENTS = clone(FORBID_CONTENTS); + } + addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc); + } + if (KEEP_CONTENT) { + ALLOWED_TAGS["#text"] = true; + } + if (WHOLE_DOCUMENT) { + addToSet(ALLOWED_TAGS, ["html", "head", "body"]); + } + if (ALLOWED_TAGS.table) { + addToSet(ALLOWED_TAGS, ["tbody"]); + delete FORBID_TAGS.tbody; + } + if (freeze) { + freeze(cfg); + } + CONFIG = cfg; + }; + var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]); + var HTML_INTEGRATION_POINTS = addToSet({}, ["foreignobject", "desc", "title", "annotation-xml"]); + var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ["title", "style", "font", "a", "script"]); + var ALL_SVG_TAGS = addToSet({}, svg$1); + addToSet(ALL_SVG_TAGS, svgFilters); + addToSet(ALL_SVG_TAGS, svgDisallowed); + var ALL_MATHML_TAGS = addToSet({}, mathMl$1); + addToSet(ALL_MATHML_TAGS, mathMlDisallowed); + var _checkValidNamespace = function _checkValidNamespace2(element) { + var parent = getParentNode2(element); + if (!parent || !parent.tagName) { + parent = { + namespaceURI: HTML_NAMESPACE, + tagName: "template" + }; + } + var tagName = stringToLowerCase(element.tagName); + var parentTagName = stringToLowerCase(parent.tagName); + if (element.namespaceURI === SVG_NAMESPACE) { + if (parent.namespaceURI === HTML_NAMESPACE) { + return tagName === "svg"; + } + if (parent.namespaceURI === MATHML_NAMESPACE) { + return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]); + } + return Boolean(ALL_SVG_TAGS[tagName]); + } + if (element.namespaceURI === MATHML_NAMESPACE) { + if (parent.namespaceURI === HTML_NAMESPACE) { + return tagName === "math"; + } + if (parent.namespaceURI === SVG_NAMESPACE) { + return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName]; + } + return Boolean(ALL_MATHML_TAGS[tagName]); + } + if (element.namespaceURI === HTML_NAMESPACE) { + if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) { + return false; + } + if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) { + return false; + } + return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]); + } + return false; + }; + var _forceRemove = function _forceRemove2(node) { + arrayPush(DOMPurify.removed, { + element: node + }); + try { + node.parentNode.removeChild(node); + } catch (_) { + try { + node.outerHTML = emptyHTML; + } catch (_2) { + node.remove(); + } + } + }; + var _removeAttribute = function _removeAttribute2(name2, node) { + try { + arrayPush(DOMPurify.removed, { + attribute: node.getAttributeNode(name2), + from: node + }); + } catch (_) { + arrayPush(DOMPurify.removed, { + attribute: null, + from: node + }); + } + node.removeAttribute(name2); + if (name2 === "is" && !ALLOWED_ATTR[name2]) { + if (RETURN_DOM || RETURN_DOM_FRAGMENT) { + try { + _forceRemove(node); + } catch (_) { + } + } else { + try { + node.setAttribute(name2, ""); + } catch (_) { + } + } + } + }; + var _initDocument = function _initDocument2(dirty) { + var doc; + var leadingWhitespace; + if (FORCE_BODY) { + dirty = "" + dirty; + } else { + var matches2 = stringMatch(dirty, /^[\r\n\t ]+/); + leadingWhitespace = matches2 && matches2[0]; + } + if (PARSER_MEDIA_TYPE === "application/xhtml+xml") { + dirty = '' + dirty + ""; + } + var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty; + if (NAMESPACE === HTML_NAMESPACE) { + try { + doc = new DOMParser2().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE); + } catch (_) { + } + } + if (!doc || !doc.documentElement) { + doc = implementation.createDocument(NAMESPACE, "template", null); + try { + doc.documentElement.innerHTML = IS_EMPTY_INPUT ? "" : dirtyPayload; + } catch (_) { + } + } + var body = doc.body || doc.documentElement; + if (dirty && leadingWhitespace) { + body.insertBefore(document2.createTextNode(leadingWhitespace), body.childNodes[0] || null); + } + if (NAMESPACE === HTML_NAMESPACE) { + return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0]; + } + return WHOLE_DOCUMENT ? doc.documentElement : body; + }; + var _createIterator = function _createIterator2(root2) { + return createNodeIterator.call(root2.ownerDocument || root2, root2, NodeFilter2.SHOW_ELEMENT | NodeFilter2.SHOW_COMMENT | NodeFilter2.SHOW_TEXT, null, false); + }; + var _isClobbered = function _isClobbered2(elm) { + return elm instanceof HTMLFormElement && (typeof elm.nodeName !== "string" || typeof elm.textContent !== "string" || typeof elm.removeChild !== "function" || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== "function" || typeof elm.setAttribute !== "function" || typeof elm.namespaceURI !== "string" || typeof elm.insertBefore !== "function"); + }; + var _isNode = function _isNode2(object) { + return _typeof(Node2) === "object" ? object instanceof Node2 : object && _typeof(object) === "object" && typeof object.nodeType === "number" && typeof object.nodeName === "string"; + }; + var _executeHook = function _executeHook2(entryPoint, currentNode, data3) { + if (!hooks[entryPoint]) { + return; + } + arrayForEach(hooks[entryPoint], function(hook) { + hook.call(DOMPurify, currentNode, data3, CONFIG); + }); + }; + var _sanitizeElements = function _sanitizeElements2(currentNode) { + var content; + _executeHook("beforeSanitizeElements", currentNode, null); + if (_isClobbered(currentNode)) { + _forceRemove(currentNode); + return true; + } + if (regExpTest(/[\u0080-\uFFFF]/, currentNode.nodeName)) { + _forceRemove(currentNode); + return true; + } + var tagName = transformCaseFunc(currentNode.nodeName); + _executeHook("uponSanitizeElement", currentNode, { + tagName, + allowedTags: ALLOWED_TAGS + }); + if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) { + _forceRemove(currentNode); + return true; + } + if (tagName === "select" && regExpTest(/