commit 28444520024c6d04aa264418384060c7b8bfbd87 Author: Friederich Loheide Date: Sun Sep 27 16:34:53 2026 +0000 Nachrichten-Plugin 1.0.0: Direktnachrichten, Gruppen, Anhänge, GIFs, Emojis Co-Authored-By: Claude Opus 5.5 (1M context) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4ceeeb4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +*.zip diff --git a/README.md b/README.md new file mode 100644 index 0000000..025dbf9 --- /dev/null +++ b/README.md @@ -0,0 +1,65 @@ +# Nachrichten – Chat-Plugin für Inhaus + +Direktnachrichten und Gruppenchats im Mitarbeiterportal. + +- **Direktnachrichten** an alle Kolleginnen und Kollegen (Personensuche), **Gruppenchats** für alle mit dem Recht + „Gruppenchats anlegen“ (unter Rollen vergeben). Gruppen-Admins benennen um, fügen hinzu, entfernen, ernennen Admins. +- **Anhänge** (Bilder, PDFs, Office …; Einfügen aus der Zwischenablage, Ziehen & Ablegen), **GIFs**, **Emojis**, + **Reaktionen**, **Antworten** auf einzelne Nachrichten, **Bearbeiten** und **Löschen** eigener Nachrichten. +- **Ungelesen-Zähler** als Sprechblase neben der Glocke, „Neu“-Trenner, „gelesen“ unter eigenen Nachrichten, + „schreibt gerade …“. Stummschalten je Gespräch. +- **Benachrichtigung** (Glocke und Push, auch in der Inhaus-App) – je Gespräch einmal, bis es gelesen ist, und nicht, + während das Gespräch offen ist. +- Handy- und Desktop-Ansicht, Tastatur (Enter sendet, Umschalt+Enter neue Zeile, Esc bricht ab), Screenreader-Hinweise. + +Voraussetzung: Inhaus **0.39.0** oder neuer. + +## Installation + +1. Neuestes Release herunterladen: `chat-.zip` unter + https://git.loheide.cloud/friloo/inhaus-plugin-chat/releases +2. Backend → **Plugins** → hochladen → aktivieren. Updates erscheinen danach automatisch unter „Plugins“. +3. Unter **Rollen** das Recht **„Gruppenchats anlegen“** an die passenden Rollen vergeben (z. B. Teamleitungen). +4. Optional unter **Portal → Nachrichten**: GIPHY, Echtzeit, Größe von Anhängen; unter **Portal → Chat-GIFs** die + eigene GIF-Sammlung (Recht „Nachrichten einrichten“). + +## Datenschutz + +- Gespräche sehen nur ihre Mitglieder – **auch die Administration kann nicht mitlesen**. Anhänge liegen außerhalb des + öffentlichen Ordners und werden nur an Mitglieder ausgeliefert. +- **GIPHY** ist aus, bis ein Schlüssel eingetragen ist. Dann gehen Suchbegriffe an GIPHY und die Bilder werden von dort + geladen. Die eigene Sammlung bleibt im Haus. +- **Echtzeit**: Über den Dienst geht nur das Signal „es gibt Neues“ – keine Inhalte. +- Beim Entfernen des Plugins mit „Daten löschen“ verschwinden alle Nachrichten und Anhänge. + +## Echtzeit (optional) + +Ohne Einrichtung fragt der Chat alle 3 Sekunden (im Hintergrund seltener) nach Neuem – das läuft auf jedem Webspace. +Für sofortige Zustellung einen Pusher-kompatiblen Dienst eintragen: + +- **pusher.com**: App anlegen, App-ID, Key, Secret und Cluster eintragen, Server leer lassen. +- **Laravel Reverb / Soketi** (eigener Server): App-ID, Key, Secret, Server (z. B. `ws.example.org`), Port (443). + Der Server muss vom Browser (WebSocket) und vom Portal (HTTP) aus erreichbar sein. + +## Schnittstelle für die App + +Unter `/api/v1/chat/…` (Token nötig): `GET conversations`, `POST direct {user_id}`, +`GET conversations/{id}/messages?vor=`, `POST conversations/{id}/messages {body, gif_url, reply_to, files[]}`, +`POST conversations/{id}/read {message_id}`, `GET unread`. + +## Entwicklung + +```bash +npm install +npm run build # dist/ – wird mit ins Repository eingecheckt +npm run package # baut und erzeugt chat-.zip +``` + +Tests laufen in einer Inhaus-Installation, in der das Plugin unter `plugins/chat` liegt (Kopie oder Symlink): + +```bash +vendor-dev/bin/phpunit plugins/chat/tests +``` + +Release: Version in `plugin.json` erhöhen, `npm run package`, Tag `vX.Y.Z` setzen und +`tea release create --tag vX.Y.Z --asset chat-X.Y.Z.zip`. diff --git a/bin/package b/bin/package new file mode 100755 index 0000000..1c8c1b2 --- /dev/null +++ b/bin/package @@ -0,0 +1,29 @@ +#!/usr/bin/env php +.zip zum Hochladen unter Administration → Plugins. + * Enthält alles außer Quelltexten fürs Frontend-Build und node_modules. + */ +$root = dirname(__DIR__); +$manifest = json_decode(file_get_contents("{$root}/plugin.json"), true); +$target = "{$root}/chat-{$manifest['version']}.zip"; +$skip = ['node_modules', '.git', 'inhaus-sdk', 'package.json', 'package-lock.json', 'vite.config.js', basename($target)]; + +@unlink($target); +$zip = new ZipArchive; +$zip->open($target, ZipArchive::CREATE); +$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($root, FilesystemIterator::SKIP_DOTS)); + +foreach ($files as $file) { + $relative = substr($file->getPathname(), strlen($root) + 1); + + if (in_array(explode(DIRECTORY_SEPARATOR, $relative)[0], $skip, true) || str_ends_with($relative, '.zip')) { + continue; + } + + $zip->addFile($file->getPathname(), 'chat/'.$relative); +} + +$zip->close(); +echo "Paket: {$target}\n"; diff --git a/database/migrations/2026_10_21_000001_create_chat_tables.php b/database/migrations/2026_10_21_000001_create_chat_tables.php new file mode 100644 index 0000000..22af228 --- /dev/null +++ b/database/migrations/2026_10_21_000001_create_chat_tables.php @@ -0,0 +1,91 @@ +id(); + $table->string('type', 10); // direct | group + $table->string('name', 100)->nullable(); + // Direktnachrichten: „kleinere-ID:größere-ID“ – je Paar genau ein Gespräch + $table->string('direct_key', 50)->nullable()->unique(); + $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete(); + $table->unsignedBigInteger('last_message_id')->nullable(); + $table->timestamp('last_message_at')->nullable()->index(); + $table->timestamps(); + }); + + Schema::create('chat_participants', function (Blueprint $table) { + $table->foreignId('conversation_id')->constrained('chat_conversations')->cascadeOnDelete(); + $table->foreignId('user_id')->constrained()->cascadeOnDelete(); + $table->string('role', 10)->default('member'); // member | admin + $table->unsignedBigInteger('last_read_message_id')->nullable(); + $table->unsignedBigInteger('notified_message_id')->nullable(); + $table->boolean('muted')->default(false); + $table->timestamp('joined_at')->nullable(); + $table->timestamp('left_at')->nullable(); + + $table->primary(['conversation_id', 'user_id']); + $table->index(['user_id', 'left_at']); + }); + + Schema::create('chat_messages', function (Blueprint $table) { + $table->id(); + $table->foreignId('conversation_id')->constrained('chat_conversations')->cascadeOnDelete(); + $table->foreignId('user_id')->nullable()->constrained()->nullOnDelete(); + $table->string('kind', 10)->default('text'); // text | gif | system + $table->text('body')->nullable(); + $table->string('gif_url', 500)->nullable(); + $table->foreignId('reply_to_id')->nullable()->constrained('chat_messages')->nullOnDelete(); + $table->timestamp('edited_at')->nullable(); + $table->timestamp('deleted_at')->nullable(); + // updated_at: auch bei Reaktionen – so holt die Abfrage geänderte Nachrichten nach + $table->timestamps(); + + $table->index(['conversation_id', 'id']); + $table->index(['conversation_id', 'updated_at']); + }); + + Schema::create('chat_attachments', function (Blueprint $table) { + $table->id(); + $table->foreignId('message_id')->constrained('chat_messages')->cascadeOnDelete(); + $table->string('path', 300); + $table->string('name', 200); + $table->string('mime', 100); + $table->unsignedBigInteger('size'); + $table->unsignedInteger('width')->nullable(); + $table->unsignedInteger('height')->nullable(); + }); + + Schema::create('chat_reactions', function (Blueprint $table) { + $table->foreignId('message_id')->constrained('chat_messages')->cascadeOnDelete(); + $table->foreignId('user_id')->constrained()->cascadeOnDelete(); + $table->string('emoji', 16); + + $table->primary(['message_id', 'user_id', 'emoji']); + }); + + // Eigene GIF-Sammlung (von der Administration hochgeladen) + Schema::create('chat_gifs', function (Blueprint $table) { + $table->id(); + $table->string('path', 300); + $table->string('title', 100); + $table->string('tags', 300)->nullable(); + $table->unsignedInteger('width')->nullable(); + $table->unsignedInteger('height')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + foreach (['chat_gifs', 'chat_reactions', 'chat_attachments', 'chat_messages', 'chat_participants', 'chat_conversations'] as $table) { + Schema::dropIfExists($table); + } + } +}; diff --git a/dist/assets/style-BXBiFiq8.css b/dist/assets/style-BXBiFiq8.css new file mode 100644 index 0000000..58eecc4 --- /dev/null +++ b/dist/assets/style-BXBiFiq8.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--ih-color-white:#fff;--ih-spacing:.25rem;--ih-container-md:28rem;--ih-container-lg:32rem;--ih-text-xs:.75rem;--ih-text-xs--line-height:calc(1 / .75);--ih-text-sm:.875rem;--ih-text-sm--line-height:calc(1.25 / .875);--ih-text-lg:1.125rem;--ih-text-lg--line-height:calc(1.75 / 1.125);--ih-text-xl:1.25rem;--ih-text-xl--line-height:calc(1.75 / 1.25);--ih-text-4xl:2.25rem;--ih-text-4xl--line-height:calc(2.5 / 2.25);--ih-font-weight-medium:500;--ih-font-weight-semibold:600;--ih-font-weight-bold:700;--ih-tracking-tight:-.025em;--ih-leading-tight:1.25;--ih-leading-snug:1.375;--ih-animate-spin:spin 1s linear infinite;--ih-animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--ih-default-transition-duration:.15s;--ih-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.ih\:pointer-events-none{pointer-events:none}.ih\:absolute{position:absolute}.ih\:relative{position:relative}.ih\:inset-2{inset:calc(var(--ih-spacing) * 2)}.ih\:-top-1\.5{top:calc(var(--ih-spacing) * -1.5)}.ih\:top-0\.5{top:calc(var(--ih-spacing) * .5)}.ih\:top-1\/2{top:50%}.ih\:-right-1\.5{right:calc(var(--ih-spacing) * -1.5)}.ih\:right-0{right:0}.ih\:right-0\.5{right:calc(var(--ih-spacing) * .5)}.ih\:bottom-28{bottom:calc(var(--ih-spacing) * 28)}.ih\:bottom-full{bottom:100%}.ih\:left-0{left:0}.ih\:left-1\/2{left:50%}.ih\:left-2\.5{left:calc(var(--ih-spacing) * 2.5)}.ih\:z-10{z-index:10}.ih\:z-20{z-index:20}.ih\:z-30{z-index:30}.ih\:-mx-2{margin-inline:calc(var(--ih-spacing) * -2)}.ih\:-mx-4{margin-inline:calc(var(--ih-spacing) * -4)}.ih\:mx-auto{margin-inline:auto}.ih\:-my-6{margin-block:calc(var(--ih-spacing) * -6)}.ih\:my-1{margin-block:var(--ih-spacing)}.ih\:my-3{margin-block:calc(var(--ih-spacing) * 3)}.ih\:my-4{margin-block:calc(var(--ih-spacing) * 4)}.ih\:-mt-1\.5{margin-top:calc(var(--ih-spacing) * -1.5)}.ih\:mt-0\.5{margin-top:calc(var(--ih-spacing) * .5)}.ih\:mt-1{margin-top:var(--ih-spacing)}.ih\:mt-1\.5{margin-top:calc(var(--ih-spacing) * 1.5)}.ih\:mt-3{margin-top:calc(var(--ih-spacing) * 3)}.ih\:mb-0\.5{margin-bottom:calc(var(--ih-spacing) * .5)}.ih\:mb-1\.5{margin-bottom:calc(var(--ih-spacing) * 1.5)}.ih\:mb-2{margin-bottom:calc(var(--ih-spacing) * 2)}.ih\:ml-1\.5{margin-left:calc(var(--ih-spacing) * 1.5)}.ih\:line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.ih\:line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.ih\:block{display:block}.ih\:flex{display:flex}.ih\:grid{display:grid}.ih\:hidden{display:none}.ih\:inline{display:inline}.ih\:inline-block{display:inline-block}.ih\:inline-flex{display:inline-flex}.ih\:aspect-square{aspect-ratio:1}.ih\:size-3{width:calc(var(--ih-spacing) * 3);height:calc(var(--ih-spacing) * 3)}.ih\:size-3\.5{width:calc(var(--ih-spacing) * 3.5);height:calc(var(--ih-spacing) * 3.5)}.ih\:size-4{width:calc(var(--ih-spacing) * 4);height:calc(var(--ih-spacing) * 4)}.ih\:size-5{width:calc(var(--ih-spacing) * 5);height:calc(var(--ih-spacing) * 5)}.ih\:size-6{width:calc(var(--ih-spacing) * 6);height:calc(var(--ih-spacing) * 6)}.ih\:size-7{width:calc(var(--ih-spacing) * 7);height:calc(var(--ih-spacing) * 7)}.ih\:size-8{width:calc(var(--ih-spacing) * 8);height:calc(var(--ih-spacing) * 8)}.ih\:size-9{width:calc(var(--ih-spacing) * 9);height:calc(var(--ih-spacing) * 9)}.ih\:size-10{width:calc(var(--ih-spacing) * 10);height:calc(var(--ih-spacing) * 10)}.ih\:size-11{width:calc(var(--ih-spacing) * 11);height:calc(var(--ih-spacing) * 11)}.ih\:size-12{width:calc(var(--ih-spacing) * 12);height:calc(var(--ih-spacing) * 12)}.ih\:size-16{width:calc(var(--ih-spacing) * 16);height:calc(var(--ih-spacing) * 16)}.ih\:size-\[45\%\]{width:45%;height:45%}.ih\:h-4{height:calc(var(--ih-spacing) * 4)}.ih\:h-5{height:calc(var(--ih-spacing) * 5)}.ih\:h-9{height:calc(var(--ih-spacing) * 9)}.ih\:h-10{height:calc(var(--ih-spacing) * 10)}.ih\:h-16{height:calc(var(--ih-spacing) * 16)}.ih\:h-\[calc\(100dvh-4rem\)\]{height:calc(100dvh - 4rem)}.ih\:h-full{height:100%}.ih\:h-px{height:1px}.ih\:max-h-60{max-height:calc(var(--ih-spacing) * 60)}.ih\:max-h-64{max-height:calc(var(--ih-spacing) * 64)}.ih\:max-h-72{max-height:calc(var(--ih-spacing) * 72)}.ih\:max-h-\[85dvh\]{max-height:85dvh}.ih\:max-h-\[180px\]{max-height:180px}.ih\:min-h-0{min-height:0}.ih\:min-h-10{min-height:calc(var(--ih-spacing) * 10)}.ih\:w-8{width:calc(var(--ih-spacing) * 8)}.ih\:w-36{width:calc(var(--ih-spacing) * 36)}.ih\:w-\[min\(22rem\,calc\(100vw-2rem\)\)\]{width:min(22rem,100vw - 2rem)}.ih\:w-full{width:100%}.ih\:max-w-\[min\(34rem\,80\%\)\]{max-width:min(34rem,80%)}.ih\:min-w-0{min-width:0}.ih\:min-w-4{min-width:calc(var(--ih-spacing) * 4)}.ih\:min-w-5{min-width:calc(var(--ih-spacing) * 5)}.ih\:flex-1{flex:1}.ih\:shrink-0{flex-shrink:0}.ih\:-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.ih\:-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.ih\:animate-pulse{animation:var(--ih-animate-pulse)}.ih\:animate-spin{animation:var(--ih-animate-spin)}.ih\:resize-none{resize:none}.ih\:columns-2{columns:2}.ih\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.ih\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.ih\:flex-col{flex-direction:column}.ih\:flex-row-reverse{flex-direction:row-reverse}.ih\:flex-wrap{flex-wrap:wrap}.ih\:place-items-center{place-items:center}.ih\:items-baseline{align-items:baseline}.ih\:items-center{align-items:center}.ih\:items-end{align-items:flex-end}.ih\:items-start{align-items:flex-start}.ih\:justify-between{justify-content:space-between}.ih\:justify-center{justify-content:center}.ih\:gap-0\.5{gap:calc(var(--ih-spacing) * .5)}.ih\:gap-1{gap:var(--ih-spacing)}.ih\:gap-1\.5{gap:calc(var(--ih-spacing) * 1.5)}.ih\:gap-2{gap:calc(var(--ih-spacing) * 2)}.ih\:gap-2\.5{gap:calc(var(--ih-spacing) * 2.5)}.ih\:gap-3{gap:calc(var(--ih-spacing) * 3)}.ih\:gap-4{gap:calc(var(--ih-spacing) * 4)}.ih\:gap-5{gap:calc(var(--ih-spacing) * 5)}.ih\:justify-self-start{justify-self:flex-start}.ih\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ih\:overflow-hidden{overflow:hidden}.ih\:overflow-x-auto{overflow-x:auto}.ih\:overflow-y-auto{overflow-y:auto}.ih\:rounded{border-radius:.25rem}.ih\:rounded-2xl{border-radius:calc(var(--radius) * 2)}.ih\:rounded-full{border-radius:2147483647px}.ih\:rounded-lg{border-radius:var(--radius)}.ih\:rounded-md{border-radius:calc(var(--radius) - 2px)}.ih\:rounded-xl{border-radius:calc(var(--radius) * 1.5)}.ih\:rounded-br-md{border-bottom-right-radius:calc(var(--radius) - 2px)}.ih\:rounded-bl-md{border-bottom-left-radius:calc(var(--radius) - 2px)}.ih\:border{border-style:var(--tw-border-style);border-width:1px}.ih\:border-2{border-style:var(--tw-border-style);border-width:2px}.ih\:border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.ih\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.ih\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.ih\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.ih\:border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.ih\:border-l-3{border-left-style:var(--tw-border-style);border-left-width:3px}.ih\:border-dashed{--tw-border-style:dashed;border-style:dashed}.ih\:border-brand{border-color:var(--brand)}.ih\:border-input{border-color:var(--input)}.ih\:border-white\/60{border-color:var(--ih-color-white)}@supports (color:color-mix(in lab, red, red)){.ih\:border-white\/60.ih\:border-white\/60{border-color:color-mix(in oklab, var(--ih-color-white) 60%, transparent)}}.ih\:bg-accent{background-color:var(--accent)}.ih\:bg-background{background-color:var(--background)}.ih\:bg-brand{background-color:var(--brand)}.ih\:bg-brand-soft,.ih\:bg-brand-soft\/80{background-color:var(--brand-soft)}@supports (color:color-mix(in lab, red, red)){.ih\:bg-brand-soft\/80.ih\:bg-brand-soft\/80{background-color:color-mix(in oklab, var(--brand-soft) 80%, transparent)}}.ih\:bg-brand\/40{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.ih\:bg-brand\/40.ih\:bg-brand\/40{background-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.ih\:bg-card{background-color:var(--card)}.ih\:bg-foreground{background-color:var(--foreground)}.ih\:bg-muted,.ih\:bg-muted\/30{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.ih\:bg-muted\/30.ih\:bg-muted\/30{background-color:color-mix(in oklab, var(--muted) 30%, transparent)}}.ih\:bg-popover{background-color:var(--popover)}.ih\:bg-white\/15{background-color:var(--ih-color-white)}@supports (color:color-mix(in lab, red, red)){.ih\:bg-white\/15.ih\:bg-white\/15{background-color:color-mix(in oklab, var(--ih-color-white) 15%, transparent)}}.ih\:object-cover{object-fit:cover}.ih\:p-0\.5{padding:calc(var(--ih-spacing) * .5)}.ih\:p-1{padding:var(--ih-spacing)}.ih\:p-1\.5{padding:calc(var(--ih-spacing) * 1.5)}.ih\:p-2{padding:calc(var(--ih-spacing) * 2)}.ih\:p-3{padding:calc(var(--ih-spacing) * 3)}.ih\:p-6{padding:calc(var(--ih-spacing) * 6)}.ih\:p-8{padding:calc(var(--ih-spacing) * 8)}.ih\:px-1{padding-inline:var(--ih-spacing)}.ih\:px-1\.5{padding-inline:calc(var(--ih-spacing) * 1.5)}.ih\:px-2{padding-inline:calc(var(--ih-spacing) * 2)}.ih\:px-3{padding-inline:calc(var(--ih-spacing) * 3)}.ih\:px-4{padding-inline:calc(var(--ih-spacing) * 4)}.ih\:py-0\.5{padding-block:calc(var(--ih-spacing) * .5)}.ih\:py-1{padding-block:var(--ih-spacing)}.ih\:py-1\.5{padding-block:calc(var(--ih-spacing) * 1.5)}.ih\:py-2{padding-block:calc(var(--ih-spacing) * 2)}.ih\:py-2\.5{padding-block:calc(var(--ih-spacing) * 2.5)}.ih\:py-4{padding-block:calc(var(--ih-spacing) * 4)}.ih\:py-6{padding-block:calc(var(--ih-spacing) * 6)}.ih\:py-8{padding-block:calc(var(--ih-spacing) * 8)}.ih\:py-10{padding-block:calc(var(--ih-spacing) * 10)}.ih\:pr-1{padding-right:var(--ih-spacing)}.ih\:pr-3{padding-right:calc(var(--ih-spacing) * 3)}.ih\:pb-1{padding-bottom:var(--ih-spacing)}.ih\:pl-0\.5{padding-left:calc(var(--ih-spacing) * .5)}.ih\:pl-8{padding-left:calc(var(--ih-spacing) * 8)}.ih\:text-center{text-align:center}.ih\:text-left{text-align:left}.ih\:font-sans{font-family:var(--font-body)}.ih\:text-4xl{font-size:var(--ih-text-4xl);line-height:var(--tw-leading,var(--ih-text-4xl--line-height))}.ih\:text-lg{font-size:var(--ih-text-lg);line-height:var(--tw-leading,var(--ih-text-lg--line-height))}.ih\:text-sm{font-size:var(--ih-text-sm);line-height:var(--tw-leading,var(--ih-text-sm--line-height))}.ih\:text-xl{font-size:var(--ih-text-xl);line-height:var(--tw-leading,var(--ih-text-xl--line-height))}.ih\:text-xs{font-size:var(--ih-text-xs);line-height:var(--tw-leading,var(--ih-text-xs--line-height))}.ih\:text-\[10px\]{font-size:10px}.ih\:text-\[11px\]{font-size:11px}.ih\:text-\[13px\]{font-size:13px}.ih\:text-\[15px\]{font-size:15px}.ih\:leading-snug{--tw-leading:var(--ih-leading-snug);line-height:var(--ih-leading-snug)}.ih\:leading-tight{--tw-leading:var(--ih-leading-tight);line-height:var(--ih-leading-tight)}.ih\:font-bold{--tw-font-weight:var(--ih-font-weight-bold);font-weight:var(--ih-font-weight-bold)}.ih\:font-medium{--tw-font-weight:var(--ih-font-weight-medium);font-weight:var(--ih-font-weight-medium)}.ih\:font-semibold{--tw-font-weight:var(--ih-font-weight-semibold);font-weight:var(--ih-font-weight-semibold)}.ih\:tracking-tight{--tw-tracking:var(--ih-tracking-tight);letter-spacing:var(--ih-tracking-tight)}.ih\:break-words{overflow-wrap:break-word}.ih\:whitespace-pre-wrap{white-space:pre-wrap}.ih\:text-background{color:var(--background)}.ih\:text-brand-foreground{color:var(--brand-foreground)}.ih\:text-brand-text{color:var(--brand-text)}.ih\:text-destructive{color:var(--destructive)}.ih\:text-foreground{color:var(--foreground)}.ih\:text-muted-foreground,.ih\:text-muted-foreground\/60{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.ih\:text-muted-foreground\/60.ih\:text-muted-foreground\/60{color:color-mix(in oklab, var(--muted-foreground) 60%, transparent)}}.ih\:text-popover-foreground{color:var(--popover-foreground)}.ih\:italic{font-style:italic}.ih\:tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ih\:no-underline{text-decoration-line:none}.ih\:underline{text-decoration-line:underline}.ih\:underline-offset-2{text-underline-offset:2px}.ih\:opacity-0{opacity:0}.ih\:opacity-60{opacity:.6}.ih\:opacity-75{opacity:.75}.ih\:opacity-80{opacity:.8}.ih\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ih\:shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ih\:shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ih\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--ih-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ih-default-transition-duration))}.ih\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--ih-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ih-default-transition-duration))}.ih\:group-focus-within\/react\:flex.ih\:group-focus-within\/react\:flex:is(:where(.ih\:group\/react):focus-within *){display:flex}@media (hover:hover){.ih\:group-hover\:opacity-100.ih\:group-hover\:opacity-100:is(:where(.ih\:group):hover *){opacity:1}.ih\:group-hover\/react\:flex.ih\:group-hover\/react\:flex:is(:where(.ih\:group\/react):hover *){display:flex}}.ih\:focus-within\:opacity-100.ih\:focus-within\:opacity-100:focus-within{opacity:1}@media (hover:hover){.ih\:hover\:bg-accent.ih\:hover\:bg-accent:hover,.ih\:hover\:bg-accent\/60.ih\:hover\:bg-accent\/60:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.ih\:hover\:bg-accent\/60.ih\:hover\:bg-accent\/60:hover{background-color:color-mix(in oklab, var(--accent) 60%, transparent)}}.ih\:hover\:bg-muted.ih\:hover\:bg-muted:hover,.ih\:hover\:bg-muted\/60.ih\:hover\:bg-muted\/60:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.ih\:hover\:bg-muted\/60.ih\:hover\:bg-muted\/60:hover{background-color:color-mix(in oklab, var(--muted) 60%, transparent)}}.ih\:hover\:bg-white\/25.ih\:hover\:bg-white\/25:hover{background-color:var(--ih-color-white)}@supports (color:color-mix(in lab, red, red)){.ih\:hover\:bg-white\/25.ih\:hover\:bg-white\/25:hover{background-color:color-mix(in oklab, var(--ih-color-white) 25%, transparent)}}.ih\:hover\:text-destructive.ih\:hover\:text-destructive:hover{color:var(--destructive)}.ih\:hover\:text-foreground.ih\:hover\:text-foreground:hover{color:var(--foreground)}.ih\:hover\:underline.ih\:hover\:underline:hover{text-decoration-line:underline}.ih\:hover\:opacity-100.ih\:hover\:opacity-100:hover{opacity:1}.ih\:hover\:ring-2.ih\:hover\:ring-2:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ih\:hover\:ring-brand.ih\:hover\:ring-brand:hover{--tw-ring-color:var(--brand)}}.ih\:focus-visible\:ring-3.ih\:focus-visible\:ring-3:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ih\:focus-visible\:ring-ring\/30.ih\:focus-visible\:ring-ring\/30:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.ih\:focus-visible\:ring-ring\/30.ih\:focus-visible\:ring-ring\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 30%, transparent)}}.ih\:focus-visible\:outline-none.ih\:focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.ih\:disabled\:opacity-40.ih\:disabled\:opacity-40:disabled{opacity:.4}@media (min-width:40rem){.ih\:sm\:block.ih\:sm\:block{display:block}.ih\:sm\:max-w-lg.ih\:sm\:max-w-lg{max-width:var(--ih-container-lg)}.ih\:sm\:max-w-md.ih\:sm\:max-w-md{max-width:var(--ih-container-md)}.ih\:sm\:px-5.ih\:sm\:px-5{padding-inline:calc(var(--ih-spacing) * 5)}}@media (min-width:64rem){.ih\:lg\:mx-0.ih\:lg\:mx-0{margin-inline:0}.ih\:lg\:my-0.ih\:lg\:my-0{margin-block:0}.ih\:lg\:block.ih\:lg\:block{display:block}.ih\:lg\:hidden.ih\:lg\:hidden{display:none}.ih\:lg\:h-\[calc\(100dvh-8\.5rem\)\].ih\:lg\:h-\[calc\(100dvh-8\.5rem\)\]{height:calc(100dvh - 8.5rem)}.ih\:lg\:w-80.ih\:lg\:w-80{width:calc(var(--ih-spacing) * 80)}.ih\:lg\:rounded-xl.ih\:lg\:rounded-xl{border-radius:calc(var(--radius) * 1.5)}.ih\:lg\:border.ih\:lg\:border{border-style:var(--tw-border-style);border-width:1px}.ih\:lg\:shadow-xs.ih\:lg\:shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}@media (min-width:80rem){.ih\:xl\:w-96.ih\:xl\:w-96{width:calc(var(--ih-spacing) * 96)}}@media (hover:none){.ih\:\[\@media\(hover\:none\)\]\:opacity-100.ih\:\[\@media\(hover\:none\)\]\:opacity-100{opacity:1}}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} diff --git a/dist/chunks/createLucideIcon-CYyWUN7r.js b/dist/chunks/createLucideIcon-CYyWUN7r.js new file mode 100644 index 0000000..1da56d8 --- /dev/null +++ b/dist/chunks/createLucideIcon-CYyWUN7r.js @@ -0,0 +1 @@ +import{h as e,inject as t}from"vue";var n={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},r=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim();function i(e){return e!=null}function a(e,t={}){let a=t.attributeNames??{},o=e=>a[e]??e,s=e.size??e.width??n.width,c=e.size??e.height??n.height,l=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],u=[...e.name?[`lucide-${e.name}`]:[],...l],d=t.className?.split(` `).filter(Boolean)??[],f=t.includeDefaultClasses===!1?r(...d):r(`lucide`,...u,...d),p=t.absoluteStrokeWidth?Number(t.strokeWidth??n[`stroke-width`])*Number(e.size??e.width??n.width)/Number(t.size??t.width??n.width):t.strokeWidth??n[`stroke-width`];return[`svg`,{...Object.entries(n).reduce((e,[t,n])=>(e[o(t)]=n,e),{}),...`color`in t&&t.color&&{[o(`stroke`)]:t.color},...`size`in t&&i(t.size)&&{[o(`width`)]:t.size,[o(`height`)]:t.size},...`width`in t&&i(t.width)&&{[o(`width`)]:t.width},...`height`in t&&i(t.height)&&{[o(`height`)]:t.height},[o(`stroke-width`)]:p,...f&&{[o(`class`)]:f},[o(`viewBox`)]:`0 0 ${s} ${c}`,...t.hasA11yProp===!1?{[o(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,r,i]=e,a=t.nonScalingStroke?{[o(`vector-effect`)]:`non-scaling-stroke`,...r}:r;return i?[n,a,i]:[n,a]})]}var o=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},s=e=>e===``,c=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),l=Symbol(`lucide-icons`);function u(){return t(l,{})}var d=({name:t,iconNode:n,"icon-node":r,icon:i={name:t&&c(t),node:n??r??[],size:24,aliases:[]},absoluteStrokeWidth:l,"absolute-stroke-width":d,nonScalingStroke:f,"non-scaling-stroke":p,strokeWidth:m,"stroke-width":h,size:g,width:_=g,height:v=g,color:y,...b},{slots:x})=>{let{size:S,color:C,strokeWidth:w=2,absoluteStrokeWidth:T=!1,nonScalingStroke:E=!1,class:D=``}=u(),O=s(l)||s(d)||l===!0||d===!0||T===!0,k=s(f)||s(p)||f===!0||p===!0||E===!0;delete b.class;let A=x.default?.(),[,j,M=[]]=a(i,{color:y??C,width:_??g??S,height:v??g??S,strokeWidth:m??h??w,absoluteStrokeWidth:O,nonScalingStroke:k,className:D,hasA11yProp:A!=null&&A.length>0||o(b),attributes:b});return e(`svg`,j,[...M.map(([t,n])=>e(t,n)),...A??[]])};function f(t,n=[]){let r=typeof t==`string`?{name:t,node:n}:t;return(t,{slots:n})=>e(d,{...t,icon:r},n.default?{default:n.default}:void 0)}export{f as t}; \ No newline at end of file diff --git a/dist/chunks/pusher-DXDYBH7H.js b/dist/chunks/pusher-DXDYBH7H.js new file mode 100644 index 0000000..02e0285 --- /dev/null +++ b/dist/chunks/pusher-DXDYBH7H.js @@ -0,0 +1,2 @@ +import{t as e}from"./rolldown-runtime-CbXtAM7H.js";var t=e(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.Pusher=r():n.Pusher=r()})(self,()=>(()=>{var e={594(e,t){var n=this&&this.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(t,"__esModule",{value:!0});var r=256,i=function(){function e(e){e===void 0&&(e=`=`),this._paddingCharacter=e}return e.prototype.encodedLength=function(e){return this._paddingCharacter?(e+2)/3*4|0:(e*8+5)/6|0},e.prototype.encode=function(e){for(var t=``,n=0;n>>18&63),t+=this._encodeByte(r>>>12&63),t+=this._encodeByte(r>>>6&63),t+=this._encodeByte(r>>>0&63)}var i=e.length-n;if(i>0){var r=e[n]<<16|(i===2?e[n+1]<<8:0);t+=this._encodeByte(r>>>18&63),t+=this._encodeByte(r>>>12&63),t+=i===2?this._encodeByte(r>>>6&63):this._paddingCharacter||``,t+=this._paddingCharacter||``}return t},e.prototype.maxDecodedLength=function(e){return this._paddingCharacter?e/4*3|0:(e*6+7)/8|0},e.prototype.decodedLength=function(e){return this.maxDecodedLength(e.length-this._getPaddingLength(e))},e.prototype.decode=function(e){if(e.length===0)return new Uint8Array;for(var t=this._getPaddingLength(e),n=e.length-t,i=new Uint8Array(this.maxDecodedLength(n)),a=0,o=0,s=0,c=0,l=0,u=0,d=0;o>>4,i[a++]=l<<4|u>>>2,i[a++]=u<<6|d,s|=c&r,s|=l&r,s|=u&r,s|=d&r;if(o>>4,s|=c&r,s|=l&r),o>>2,s|=u&r),o>>8&6,t+=51-e>>>8&-75,t+=61-e>>>8&-15,t+=62-e>>>8&3,String.fromCharCode(t)},e.prototype._decodeChar=function(e){var t=r;return t+=(42-e&e-44)>>>8&-r+e-43+62,t+=(46-e&e-48)>>>8&-r+e-47+63,t+=(47-e&e-58)>>>8&-r+e-48+52,t+=(64-e&e-91)>>>8&-r+e-65+0,t+=(96-e&e-123)>>>8&-r+e-97+26,t},e.prototype._getPaddingLength=function(e){var t=0;if(this._paddingCharacter){for(var n=e.length-1;n>=0&&e[n]===this._paddingCharacter;n--)t++;if(e.length<4||t>2)throw Error(`Base64Coder: incorrect padding`)}return t},e}();t.Coder=i;var a=new i;function o(e){return a.encode(e)}t.encode=o;function s(e){return a.decode(e)}t.decode=s;var c=function(e){n(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._encodeByte=function(e){var t=e;return t+=65,t+=25-e>>>8&6,t+=51-e>>>8&-75,t+=61-e>>>8&-13,t+=62-e>>>8&49,String.fromCharCode(t)},t.prototype._decodeChar=function(e){var t=r;return t+=(44-e&e-46)>>>8&-r+e-45+62,t+=(94-e&e-96)>>>8&-r+e-95+63,t+=(47-e&e-58)>>>8&-r+e-48+52,t+=(64-e&e-91)>>>8&-r+e-65+0,t+=(96-e&e-123)>>>8&-r+e-97+26,t},t}(i);t.URLSafeCoder=c;var l=new c;function u(e){return l.encode(e)}t.encodeURLSafe=u;function d(e){return l.decode(e)}t.decodeURLSafe=d,t.encodedLength=function(e){return a.encodedLength(e)},t.maxDecodedLength=function(e){return a.maxDecodedLength(e)},t.decodedLength=function(e){return a.decodedLength(e)}},978(e,t){var n=`utf8: invalid source encoding`;function r(e){for(var t=[],r=0;r=e.length)throw Error(n);var o=e[++r];if((o&192)!=128)throw Error(n);i=(i&31)<<6|o&63,a=128}else if(i<240){if(r>=e.length-1)throw Error(n);var o=e[++r],s=e[++r];if((o&192)!=128||(s&192)!=128)throw Error(n);i=(i&15)<<12|(o&63)<<6|s&63,a=2048}else if(i<248){if(r>=e.length-2)throw Error(n);var o=e[++r],s=e[++r],c=e[++r];if((o&192)!=128||(s&192)!=128||(c&192)!=128)throw Error(n);i=(i&15)<<18|(o&63)<<12|(s&63)<<6|c&63,a=65536}else throw Error(n);if(i=55296&&i<=57343)throw Error(n);if(i>=65536){if(i>1114111)throw Error(n);i-=65536,t.push(String.fromCharCode(55296|i>>10)),i=56320|i&1023}}t.push(String.fromCharCode(i))}return t.join(``)}t.D4=r},721(e,t,n){e.exports=n(207).default},207(e,t,n){n.d(t,{default:()=>$});class r{constructor(e,t){this.lastId=0,this.prefix=e,this.name=t}create(e){this.lastId++;var t=this.lastId,n=this.prefix+t,r=this.name+`[`+t+`]`,i=!1,a=function(){i||=(e.apply(null,arguments),!0)};return this[t]=a,{number:t,id:n,name:r,callback:a}}remove(e){delete this[e.number]}}var i=new r(`_pusher_script_`,`Pusher.ScriptReceivers`);let a={VERSION:`8.6.0`,PROTOCOL:7,wsPort:80,wssPort:443,wsPath:``,httpHost:`sockjs.pusher.com`,httpPort:80,httpsPort:443,httpPath:`/pusher`,stats_host:`stats.pusher.com`,authEndpoint:`/pusher/auth`,authTransport:`ajax`,activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,userAuthentication:{endpoint:`/pusher/user-auth`,transport:`ajax`},channelAuthorization:{endpoint:`/pusher/auth`,transport:`ajax`},cdn_http:`http://js.pusher.com`,cdn_https:`https://js.pusher.com`,dependency_suffix:``};class o{constructor(e){this.options=e,this.receivers=e.receivers||i,this.loading={}}load(e,t,n){var r=this;if(r.loading[e]&&r.loading[e].length>0)r.loading[e].push(n);else{r.loading[e]=[n];var i=Y.createScriptRequest(r.getPath(e,t)),a=r.receivers.create(function(t){if(r.receivers.remove(a),r.loading[e]){var n=r.loading[e];delete r.loading[e];for(var o=function(e){e||i.cleanup()},s=0;s>>6)+b(128|t&63):b(224|t>>>12&15)+b(128|t>>>6&63)+b(128|t&63)},oe=function(e){return e.replace(/[^\x00-\x7F]/g,ae)},se=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[x.charAt(n>>>18),x.charAt(n>>>12&63),t>=2?`=`:x.charAt(n>>>6&63),t>=1?`=`:x.charAt(n&63)].join(``)},ce=typeof window<`u`&&window.btoa||function(e){return e.replace(/[\s\S]{1,3}/g,se)};class le{constructor(e,t,n,r){this.clear=t,this.timer=e(()=>{this.timer&&=r(this.timer)},n)}isRunning(){return this.timer!==null}ensureAborted(){this.timer&&=(this.clear(this.timer),null)}}let ue=le;function de(e){window.clearTimeout(e)}function fe(e){window.clearInterval(e)}class C extends ue{constructor(e,t){super(setTimeout,de,e,function(e){return t(),null})}}class pe extends ue{constructor(e,t){super(setInterval,fe,e,function(e){return t(),e})}}let w={now(){return Date.now?Date.now():new Date().valueOf()},defer(e){return new C(0,e)},method(e,...t){var n=Array.prototype.slice.call(arguments,1);return function(t){return t[e].apply(t,n.concat(arguments))}}};function T(e,...t){for(var n=0;n{window.console&&window.console.log&&window.console.log(e)}}debug(...e){this.log(this.globalLog,e)}warn(...e){this.log(this.globalLogWarn,e)}error(...e){this.log(this.globalLogError,e)}globalLogWarn(e){window.console&&window.console.warn?window.console.warn(e):this.globalLog(e)}globalLogError(e){window.console&&window.console.error?window.console.error(e):this.globalLogWarn(e)}log(e,...t){var n=me.apply(this,arguments);$.log?$.log(n):$.logToConsole&&e.bind(this)(n)}}let A=new De,Oe=function(e,t,n,r,i){(n.headers!==void 0||n.headersProvider!=null)&&A.warn(`To send headers with the ${r.toString()} request, you must use AJAX, rather than JSONP.`);var a=e.nextAuthCallbackID.toString();e.nextAuthCallbackID++;var o=e.getDocument(),s=o.createElement(`script`);e.auth_callbacks[a]=function(e){i(null,e)};var c=`Pusher.auth_callbacks['`+a+`']`;s.src=n.endpoint+`?callback=`+encodeURIComponent(c)+`&`+t;var l=o.getElementsByTagName(`head`)[0]||o.documentElement;l.insertBefore(s,l.firstChild)};class ke{constructor(e){this.src=e}send(e){var t=this,n=`Error loading `+t.src;t.script=document.createElement(`script`),t.script.id=e.id,t.script.src=t.src,t.script.type=`text/javascript`,t.script.charset=`UTF-8`,t.script.addEventListener?(t.script.onerror=function(){e.callback(n)},t.script.onload=function(){e.callback(null)}):t.script.onreadystatechange=function(){(t.script.readyState===`loaded`||t.script.readyState===`complete`)&&e.callback(null)},t.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(t.errorScript=document.createElement(`script`),t.errorScript.id=e.id+`_error`,t.errorScript.text=e.name+`('`+n+`');`,t.script.async=t.errorScript.async=!1):t.script.async=!0;var r=document.getElementsByTagName(`head`)[0];r.insertBefore(t.script,r.firstChild),t.errorScript&&r.insertBefore(t.errorScript,t.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class Ae{constructor(e,t){this.url=e,this.data=t}send(e){if(!this.request){var t=Te(this.data),n=this.url+`/`+e.number+`?`+t;this.request=Y.createScriptRequest(n),this.request.send(e)}}cleanup(){this.request&&this.request.cleanup()}}let je={name:`jsonp`,getAgent:function(e,t){return function(n,r){var a=`http`+(t?`s`:``)+`://`+(e.host||e.options.host)+e.options.path,o=Y.createJSONPRequest(a,n),s=Y.ScriptReceivers.create(function(t,n){i.remove(s),o.cleanup(),n&&n.host&&(e.host=n.host),r&&r(t,n)});o.send(s)}}};function j(e,t,n){var r=e+(t.useTLS?`s`:``),i=t.useTLS?t.hostTLS:t.hostNonTLS;return r+`://`+i+n}function M(e,t){return`/app/`+e+(`?protocol=`+a.PROTOCOL+`&client=js&version=`+a.VERSION+(t?`&`+t:``))}var Me={getInitial:function(e,t){return j(`ws`,t,(t.httpPath||``)+M(e,`flash=false`))}},Ne={getInitial:function(e,t){return j(`http`,t,(t.httpPath||`/pusher`)+M(e))}},Pe={getInitial:function(e,t){return j(`http`,t,t.httpPath||`/pusher`)},getPath:function(e,t){return M(e)}};class Fe{constructor(){this._callbacks={}}get(e){return this._callbacks[N(e)]}add(e,t,n){var r=N(e);this._callbacks[r]=this._callbacks[r]||[],this._callbacks[r].push({fn:t,context:n})}remove(e,t,n){if(!e&&!t&&!n){this._callbacks={};return}var r=e?[N(e)]:he(this._callbacks);t||n?this.removeCallback(r,t,n):this.removeAllCallbacks(r)}removeCallback(e,t,n){O(e,function(e){this._callbacks[e]=ye(this._callbacks[e]||[],function(e){return t&&t!==e.fn||n&&n!==e.context}),this._callbacks[e].length===0&&delete this._callbacks[e]},this)}removeAllCallbacks(e){O(e,function(e){delete this._callbacks[e]},this)}}function N(e){return`_`+e}class P{constructor(e){this.callbacks=new Fe,this.global_callbacks=[],this.failThrough=e}bind(e,t,n){return this.callbacks.add(e,t,n),this}bind_global(e){return this.global_callbacks.push(e),this}unbind(e,t,n){return this.callbacks.remove(e,t,n),this}unbind_global(e){return e?(this.global_callbacks=ye(this.global_callbacks||[],t=>t!==e),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(e,t,n){for(var r=0;r0)for(var r=0;r{this.onError(e),this.changeState(`closed`)}),!1}return this.bindListeners(),A.debug(`Connecting`,{transport:this.name,url:e}),this.changeState(`connecting`),!0}close(){return this.socket?(this.socket.close(),!0):!1}send(e){return this.state===`open`&&(w.defer(()=>{this.socket&&this.socket.send(e)}),!0)}ping(){this.state===`open`&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState(`open`),this.socket.onopen=void 0}onError(e){this.emit(`error`,{type:`WebSocketError`,error:e}),this.timeline.error(this.buildTimelineMessage({error:e.toString()}))}onClose(e){e?this.changeState(`closed`,{code:e.code,reason:e.reason,wasClean:e.wasClean}):this.changeState(`closed`),this.unbindListeners(),this.socket=void 0}onMessage(e){this.emit(`message`,e)}onActivity(){this.emit(`activity`)}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=e=>{this.onError(e)},this.socket.onclose=e=>{this.onClose(e)},this.socket.onmessage=e=>{this.onMessage(e)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(e,t){this.state=e,this.timeline.info(this.buildTimelineMessage({state:e,params:t})),this.emit(e,t)}buildTimelineMessage(e){return T({cid:this.id},e)}}class F{constructor(e){this.hooks=e}isSupported(e){return this.hooks.isSupported(e)}createConnection(e,t,n,r){return new Ie(this.hooks,e,t,n,r)}}var Le=new F({urls:Me,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!Y.getWebSocketAPI()},isSupported:function(){return!!Y.getWebSocketAPI()},getSocket:function(e){return Y.createWebSocket(e)}}),Re={urls:Ne,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},ze=T({getSocket:function(e){return Y.HTTPFactory.createStreamingSocket(e)}},Re),Be=T({getSocket:function(e){return Y.HTTPFactory.createPollingSocket(e)}},Re),Ve={isSupported:function(){return Y.isXHRSupported()}};let I={ws:Le,xhr_streaming:new F(T({},ze,Ve)),xhr_polling:new F(T({},Be,Ve))};var He=new F({file:`sockjs`,urls:Pe,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(e,t){return new window.SockJS(e,null,{js_path:c.getPath(`sockjs`,{useTLS:t.useTLS}),ignore_null_origin:t.ignoreNullOrigin})},beforeOpen:function(e,t){e.send(JSON.stringify({path:t}))}}),Ue={isSupported:function(e){return Y.isXDRSupported(e.useTLS)}},We=new F(T({},ze,Ue)),Ge=new F(T({},Be,Ue));I.xdr_streaming=We,I.xdr_polling=Ge,I.sockjs=He;let Ke=I;class qe extends P{constructor(){super();var e=this;typeof window<`u`&&window.addEventListener!==void 0&&(window.addEventListener(`online`,function(){e.emit(`online`)},!1),window.addEventListener(`offline`,function(){e.emit(`offline`)},!1))}isOnline(){return window.navigator.onLine===void 0||window.navigator.onLine}}var Je=new qe;class Ye{constructor(e,t,n){this.manager=e,this.transport=t,this.minPingDelay=n.minPingDelay,this.maxPingDelay=n.maxPingDelay,this.pingDelay=void 0}createConnection(e,t,n,r){r=T({},r,{activityTimeout:this.pingDelay});var i=this.transport.createConnection(e,t,n,r),a=null,o=function(){i.unbind(`open`,o),i.bind(`closed`,s),a=w.now()},s=e=>{if(i.unbind(`closed`,s),e.code===1002||e.code===1003)this.manager.reportDeath();else if(!e.wasClean&&a){var t=w.now()-a;t<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(t/2,this.minPingDelay))}};return i.bind(`open`,o),i}isSupported(e){return this.manager.isAlive()&&this.transport.isSupported(e)}}let Xe={decodeMessage:function(e){try{var t=JSON.parse(e.data),n=t.data;if(typeof n==`string`)try{n=JSON.parse(t.data)}catch{}var r={event:t.event,channel:t.channel,data:n};return t.user_id&&(r.user_id=t.user_id),r}catch(t){throw{type:`MessageParseError`,error:t,data:e.data}}},encodeMessage:function(e){return JSON.stringify(e)},processHandshake:function(e){var t=Xe.decodeMessage(e);if(t.event===`pusher:connection_established`){if(!t.data.activity_timeout)throw`No activity timeout specified in handshake`;return{action:`connected`,id:t.data.socket_id,activityTimeout:t.data.activity_timeout*1e3}}if(t.event===`pusher:error`)return{action:this.getCloseAction(t.data),error:this.getCloseError(t.data)};throw`Invalid handshake`},getCloseAction:function(e){return e.code<4e3?e.code>=1002&&e.code<=1004?`backoff`:null:e.code===4e3?`tls_only`:e.code<4100?`refused`:e.code<4200?`backoff`:e.code<4300?`retry`:`refused`},getCloseError:function(e){return e.code!==1e3&&e.code!==1001?{type:`PusherError`,data:{code:e.code,message:e.reason||e.message}}:null}},L=Xe;class Ze extends P{constructor(e,t){super(),this.id=e,this.transport=t,this.activityTimeout=t.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(e){return this.transport.send(e)}send_event(e,t,n){var r={event:e,data:t};return n&&(r.channel=n),A.debug(`Event sent`,r),this.send(L.encodeMessage(r))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event(`pusher:ping`,{})}close(){this.transport.close()}bindListeners(){var e={message:e=>{var t;try{t=L.decodeMessage(e)}catch(t){this.emit(`error`,{type:`MessageParseError`,error:t,data:e.data})}if(t!==void 0){switch(A.debug(`Event recd`,t),t.event){case`pusher:error`:this.emit(`error`,{type:`PusherError`,data:t.data});break;case`pusher:ping`:this.emit(`ping`);break;case`pusher:pong`:this.emit(`pong`)}this.emit(`message`,t)}},activity:()=>{this.emit(`activity`)},error:e=>{this.emit(`error`,e)},closed:e=>{t(),e&&e.code&&this.handleCloseEvent(e),this.transport=null,this.emit(`closed`)}},t=()=>{D(e,(e,t)=>{this.transport.unbind(t,e)})};D(e,(e,t)=>{this.transport.bind(t,e)})}handleCloseEvent(e){var t=L.getCloseAction(e),n=L.getCloseError(e);n&&this.emit(`error`,n),t&&this.emit(t,{action:t,error:n})}}class Qe{constructor(e,t){this.transport=e,this.callback=t,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=e=>{this.unbindListeners();var t;try{t=L.processHandshake(e)}catch(e){this.finish(`error`,{error:e}),this.transport.close();return}t.action===`connected`?this.finish(`connected`,{connection:new Ze(t.id,this.transport),activityTimeout:t.activityTimeout}):(this.finish(t.action,{error:t.error}),this.transport.close())},this.onClosed=e=>{this.unbindListeners();var t=L.getCloseAction(e)||`backoff`,n=L.getCloseError(e);this.finish(t,{error:n})},this.transport.bind(`message`,this.onMessage),this.transport.bind(`closed`,this.onClosed)}unbindListeners(){this.transport.unbind(`message`,this.onMessage),this.transport.unbind(`closed`,this.onClosed)}finish(e,t){this.callback(T({transport:this.transport,action:e},t))}}class $e{constructor(e,t){this.timeline=e,this.options=t||{}}send(e,t){this.timeline.isEmpty()||this.timeline.send(Y.TimelineTransport.getAgent(this,e),t)}}class R extends P{constructor(e,t){super(function(t,n){A.debug(`No callbacks on `+e+` for `+t)}),this.name=e,this.pusher=t,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(e,t){return t(null,{auth:``})}trigger(e,t){if(e.indexOf(`client-`)!==0)throw new ee(`Event '`+e+`' does not start with 'client-'`);if(!this.subscribed){var n=u.buildLogSuffix(`triggeringClientEvents`);A.warn(`Client event triggered before channel 'subscription_succeeded' event . ${n}`)}return this.pusher.send_event(e,t,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(e){var t=e.event,n=e.data;t===`pusher_internal:subscription_succeeded`?this.handleSubscriptionSucceededEvent(e):t===`pusher_internal:subscription_count`?this.handleSubscriptionCountEvent(e):t.indexOf(`pusher_internal:`)!==0&&this.emit(t,n,{})}handleSubscriptionSucceededEvent(e){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit(`pusher:subscription_succeeded`,e.data)}handleSubscriptionCountEvent(e){e.data.subscription_count&&(this.subscriptionCount=e.data.subscription_count),this.emit(`pusher:subscription_count`,e.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,(e,t)=>{e?(this.subscriptionPending=!1,A.error(e.toString()),this.emit(`pusher:subscription_error`,Object.assign({},{type:`AuthError`,error:e.message},e instanceof _?{status:e.status}:{}))):this.pusher.send_event(`pusher:subscribe`,{auth:t.auth,channel_data:t.channel_data,channel:this.name})}))}unsubscribe(){this.subscribed=!1,this.pusher.send_event(`pusher:unsubscribe`,{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class z extends R{authorize(e,t){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:e},t)}}class et{constructor(){this.reset()}get(e){return Object.prototype.hasOwnProperty.call(this.members,e)?{id:e,info:this.members[e]}:null}each(e){D(this.members,(t,n)=>{e(this.get(n))})}setMyID(e){this.myID=e}onSubscription(e){this.members=e.presence.hash,this.count=e.presence.count,this.me=this.get(this.myID)}addMember(e){return this.get(e.user_id)===null&&this.count++,this.members[e.user_id]=e.user_info,this.get(e.user_id)}removeMember(e){var t=this.get(e.user_id);return t&&(delete this.members[e.user_id],this.count--),t}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}var tt=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};class nt extends z{constructor(e,t){super(e,t),this.members=new et}authorize(e,t){super.authorize(e,(e,n)=>tt(this,void 0,void 0,function*(){if(!e){if(n=n,n.channel_data!=null){var r=JSON.parse(n.channel_data);this.members.setMyID(r.user_id)}else if(yield this.pusher.user.signinDonePromise,this.pusher.user.user_data!=null)this.members.setMyID(this.pusher.user.user_data.id);else{let e=u.buildLogSuffix(`authorizationEndpoint`);A.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${e}, or the user should be signed in.`),t(`Invalid auth response`);return}}t(e,n)}))}handleEvent(e){var t=e.event;if(t.indexOf(`pusher_internal:`)===0)this.handleInternalEvent(e);else{var n=e.data,r={};e.user_id&&(r.user_id=e.user_id),this.emit(t,n,r)}}handleInternalEvent(e){var t=e.event,n=e.data;switch(t){case`pusher_internal:subscription_succeeded`:this.handleSubscriptionSucceededEvent(e);break;case`pusher_internal:subscription_count`:this.handleSubscriptionCountEvent(e);break;case`pusher_internal:member_added`:var r=this.members.addMember(n);this.emit(`pusher:member_added`,r);break;case`pusher_internal:member_removed`:var i=this.members.removeMember(n);i&&this.emit(`pusher:member_removed`,i)}}handleSubscriptionSucceededEvent(e){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(e.data),this.emit(`pusher:subscription_succeeded`,this.members))}disconnect(){this.members.reset(),super.disconnect()}}var rt=n(978),B=n(594);class it extends z{constructor(e,t,n){super(e,t),this.key=null,this.nacl=n}authorize(e,t){super.authorize(e,(e,n)=>{if(e){t(e,n);return}let r=n.shared_secret;if(!r){t(Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null);return}this.key=(0,B.decode)(r),delete n.shared_secret,t(null,n)})}trigger(e,t){throw new m(`Client events are not currently supported for encrypted channels`)}handleEvent(e){var t=e.event,n=e.data;if(t.indexOf(`pusher_internal:`)===0||t.indexOf(`pusher:`)===0){super.handleEvent(e);return}this.handleEncryptedEvent(t,n)}handleEncryptedEvent(e,t){if(!this.key){A.debug(`Received encrypted event before key has been retrieved from the authEndpoint`);return}if(!t.ciphertext||!t.nonce){A.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+t);return}let n=(0,B.decode)(t.ciphertext);if(n.length{if(t){A.error(`Failed to make a request to the authEndpoint: ${a}. Unable to fetch new key, so dropping encrypted event`);return}if(i=this.nacl.secretbox.open(n,r,this.key),i===null){A.error(`Failed to decrypt event with new key. Dropping encrypted event`);return}this.emit(e,this.getDataToEmit(i))});return}this.emit(e,this.getDataToEmit(i))}getDataToEmit(e){let t=(0,rt.D4)(e);try{return JSON.parse(t)}catch{return t}}}class at extends P{constructor(e,t){super(),this.state=`initialized`,this.connection=null,this.key=e,this.options=t,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var n=Y.getNetwork();n.bind(`online`,()=>{this.timeline.info({netinfo:`online`}),(this.state===`connecting`||this.state===`unavailable`)&&this.retryIn(0)}),n.bind(`offline`,()=>{this.timeline.info({netinfo:`offline`}),this.connection&&this.sendActivityCheck()}),this.updateStrategy()}switchCluster(e){this.key=e,this.updateStrategy(),this.retryIn(0)}connect(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState(`failed`);return}this.updateState(`connecting`),this.startConnecting(),this.setUnavailableTimer()}}send(e){return this.connection?this.connection.send(e):!1}send_event(e,t,n){return this.connection?this.connection.send_event(e,t,n):!1}disconnect(){this.disconnectInternally(),this.updateState(`disconnected`)}isUsingTLS(){return this.usingTLS}startConnecting(){var e=(t,n)=>{t?this.runner=this.strategy.connect(0,e):n.action===`error`?(this.emit(`error`,{type:`HandshakeError`,error:n.error}),this.timeline.error({handshakeError:n.error})):(this.abortConnecting(),this.handshakeCallbacks[n.action](n))};this.runner=this.strategy.connect(0,e)}abortConnecting(){this.runner&&=(this.runner.abort(),null)}disconnectInternally(){this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection&&this.abandonConnection().close()}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(e){this.timeline.info({action:`retry`,delay:e}),e>0&&this.emit(`connecting_in`,Math.round(e/1e3)),this.retryTimer=new C(e||0,()=>{this.disconnectInternally(),this.connect()})}clearRetryTimer(){this.retryTimer&&=(this.retryTimer.ensureAborted(),null)}setUnavailableTimer(){this.unavailableTimer=new C(this.options.unavailableTimeout,()=>{this.updateState(`unavailable`)})}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new C(this.options.pongTimeout,()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)})}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new C(this.activityTimeout,()=>{this.sendActivityCheck()}))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(e){return T({},e,{message:e=>{this.resetActivityCheck(),this.emit(`message`,e)},ping:()=>{this.send_event(`pusher:pong`,{})},activity:()=>{this.resetActivityCheck()},error:e=>{this.emit(`error`,e)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(e){return T({},e,{connected:e=>{this.activityTimeout=Math.min(this.options.activityTimeout,e.activityTimeout,e.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(e.connection),this.socket_id=this.connection.id,this.updateState(`connected`,{socket_id:this.socket_id})}})}buildErrorCallbacks(){let e=e=>t=>{t.error&&this.emit(`error`,{type:`WebSocketError`,error:t.error}),e(t)};return{tls_only:e(()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)}),refused:e(()=>{this.disconnect()}),backoff:e(()=>{this.retryIn(1e3)}),retry:e(()=>{this.retryIn(0)})}}setConnection(e){for(var t in this.connection=e,this.connectionCallbacks)this.connection.bind(t,this.connectionCallbacks[t]);this.resetActivityCheck()}abandonConnection(){if(this.connection){for(var e in this.stopActivityCheck(),this.connectionCallbacks)this.connection.unbind(e,this.connectionCallbacks[e]);var t=this.connection;return this.connection=null,t}}updateState(e,t){var n=this.state;if(this.state=e,n!==e){var r=e;r===`connected`&&(r+=` with new socket ID `+t.socket_id),A.debug(`State changed`,n+` -> `+r),this.timeline.info({state:e,params:t}),this.emit(`state_change`,{previous:n,current:e}),this.emit(e,t)}}shouldRetry(){return this.state===`connecting`||this.state===`connected`}}class ot{constructor(){this.channels={}}add(e,t){return this.channels[e]||(this.channels[e]=st(e,t)),this.channels[e]}all(){return ge(this.channels)}find(e){return this.channels[e]}remove(e){var t=this.channels[e];return delete this.channels[e],t}disconnect(){D(this.channels,function(e){e.disconnect()})}}function st(e,t){if(e.indexOf(`private-encrypted-`)===0){if(t.config.nacl)return V.createEncryptedChannel(e,t,t.config.nacl);let n=u.buildLogSuffix(`encryptedChannelSupport`);throw new m(`Tried to subscribe to a private-encrypted- channel but no nacl implementation available. ${n}`)}if(e.indexOf(`private-`)===0)return V.createPrivateChannel(e,t);if(e.indexOf(`presence-`)===0)return V.createPresenceChannel(e,t);if(e.indexOf(`#`)===0)throw new te(`Cannot create a channel with name "`+e+`".`);return V.createChannel(e,t)}let V={createChannels(){return new ot},createConnectionManager(e,t){return new at(e,t)},createChannel(e,t){return new R(e,t)},createPrivateChannel(e,t){return new z(e,t)},createPresenceChannel(e,t){return new nt(e,t)},createEncryptedChannel(e,t,n){return new it(e,t,n)},createTimelineSender(e,t){return new $e(e,t)},createHandshake(e,t){return new Qe(e,t)},createAssistantToTheTransportManager(e,t,n){return new Ye(e,t,n)}};class ct{constructor(e){this.options=e||{},this.livesLeft=this.options.lives||1/0}getAssistant(e){return V.createAssistantToTheTransportManager(this,e,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){--this.livesLeft}}class H{constructor(e,t){this.strategies=e,this.loop=!!t.loop,this.failFast=!!t.failFast,this.timeout=t.timeout,this.timeoutLimit=t.timeoutLimit}isSupported(){return Se(this.strategies,w.method(`isSupported`))}connect(e,t){var n=this.strategies,r=0,i=this.timeout,a=null,o=(s,c)=>{c?t(null,c):(r+=1,this.loop&&(r%=n.length),r0&&(i=new C(n.timeout,function(){a.abort(),r(!0)})),a=e.connect(t,function(e,t){e&&i&&i.isRunning()&&!n.failFast||(i&&i.ensureAborted(),r(e,t))}),{abort:function(){i&&i.ensureAborted(),a.abort()},forceMinPriority:function(e){a.forceMinPriority(e)}}}}class U{constructor(e){this.strategies=e}isSupported(){return Se(this.strategies,w.method(`isSupported`))}connect(e,t){return lt(this.strategies,e,function(e,n){return function(r,i){if(n[e].error=r,r){ut(n)&&t(!0);return}O(n,function(e){e.forceMinPriority(i.transport.priority)}),t(null,i)}})}}function lt(e,t,n){var r=_e(e,function(e,r,i,a){return e.connect(t,n(r,a))});return{abort:function(){O(r,dt)},forceMinPriority:function(e){O(r,function(t){t.forceMinPriority(e)})}}}function ut(e){return Ce(e,function(e){return!!e.error})}function dt(e){!e.error&&!e.aborted&&(e.abort(),e.aborted=!0)}class ft{constructor(e,t,n){this.strategy=e,this.transports=t,this.ttl=n.ttl||18e5,this.usingTLS=n.useTLS,this.timeline=n.timeline}isSupported(){return this.strategy.isSupported()}connect(e,t){var n=this.usingTLS,r=pt(n),i=r&&r.cacheSkipCount?r.cacheSkipCount:0,a=[this.strategy];if(r&&r.timestamp+this.ttl>=w.now()){var o=this.transports[r.transport];o&&([`ws`,`wss`].includes(r.transport)||i>3?(this.timeline.info({cached:!0,transport:r.transport,latency:r.latency}),a.push(new H([o],{timeout:r.latency*2+1e3,failFast:!0}))):i++)}var s=w.now(),c=a.pop().connect(e,function r(o,l){o?(ht(n),a.length>0?(s=w.now(),c=a.pop().connect(e,r)):t(o)):(mt(n,l.transport.name,w.now()-s,i),t(null,l))});return{abort:function(){c.abort()},forceMinPriority:function(t){e=t,c&&c.forceMinPriority(t)}}}}function W(e){return`pusherTransport`+(e?`TLS`:`NonTLS`)}function pt(e){var t=Y.getLocalStorage();if(t)try{var n=t[W(e)];if(n)return JSON.parse(n)}catch{ht(e)}return null}function mt(e,t,n,r){var i=Y.getLocalStorage();if(i)try{i[W(e)]=k({timestamp:w.now(),transport:t,latency:n,cacheSkipCount:r})}catch{}}function ht(e){var t=Y.getLocalStorage();if(t)try{delete t[W(e)]}catch{}}class G{constructor(e,{delay:t}){this.strategy=e,this.options={delay:t}}isSupported(){return this.strategy.isSupported()}connect(e,t){var n=this.strategy,r,i=new C(this.options.delay,function(){r=n.connect(e,t)});return{abort:function(){i.ensureAborted(),r&&r.abort()},forceMinPriority:function(t){e=t,r&&r.forceMinPriority(t)}}}}class K{constructor(e,t,n){this.test=e,this.trueBranch=t,this.falseBranch=n}isSupported(){return(this.test()?this.trueBranch:this.falseBranch).isSupported()}connect(e,t){return(this.test()?this.trueBranch:this.falseBranch).connect(e,t)}}class gt{constructor(e){this.strategy=e}isSupported(){return this.strategy.isSupported()}connect(e,t){var n=this.strategy.connect(e,function(e,r){r&&n.abort(),t(e,r)});return n}}function q(e){return function(){return e.isSupported()}}let _t=function(e,t,n){var r={};function i(t,i,a,o,s){var c=n(e,t,i,a,o,s);return r[t]=c,c}var a=Object.assign({},t,{hostNonTLS:e.wsHost+`:`+e.wsPort,hostTLS:e.wsHost+`:`+e.wssPort,httpPath:e.wsPath}),o=Object.assign({},a,{useTLS:!0}),s=Object.assign({},t,{hostNonTLS:e.httpHost+`:`+e.httpPort,hostTLS:e.httpHost+`:`+e.httpsPort,httpPath:e.httpPath}),c={loop:!0,timeout:15e3,timeoutLimit:6e4},l=new ct({minPingDelay:1e4,maxPingDelay:e.activityTimeout}),u=new ct({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),d=i(`ws`,`ws`,3,a,l),ee=i(`wss`,`ws`,3,o,l),te=i(`sockjs`,`sockjs`,1,s),f=i(`xhr_streaming`,`xhr_streaming`,1,s,u),ne=i(`xdr_streaming`,`xdr_streaming`,1,s,u),p=i(`xhr_polling`,`xhr_polling`,1,s),m=i(`xdr_polling`,`xdr_polling`,1,s),h=new H([d],c),g=new H([ee],c),_=new H([te],c),v=new H([new K(q(f),f,ne)],c),y=new H([new K(q(p),p,m)],c),b=new H([new K(q(v),new U([v,new G(y,{delay:4e3})]),y)],c),x=new K(q(b),b,_),re=t.useTLS?new U([h,new G(x,{delay:2e3})]):new U([h,new G(g,{delay:2e3}),new G(x,{delay:5e3})]);return new ft(new gt(new K(q(d),re,x)),r,{ttl:18e5,timeline:t.timeline,useTLS:t.useTLS})};function vt(){var e=this;e.timeline.info(e.buildTimelineMessage({transport:e.name+(e.options.useTLS?`s`:``)})),e.hooks.isInitialized()?e.changeState(`initialized`):e.hooks.file?(e.changeState(`initializing`),c.load(e.hooks.file,{useTLS:e.options.useTLS},function(t,n){e.hooks.isInitialized()?(e.changeState(`initialized`),n(!0)):(t&&e.onError(t),e.onClose(),n(!1))})):e.onClose()}let yt={getRequest:function(e){var t=new window.XDomainRequest;return t.ontimeout=function(){e.emit(`error`,new f),e.close()},t.onerror=function(t){e.emit(`error`,t),e.close()},t.onprogress=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText)},t.onload=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText),e.emit(`finished`,200),e.close()},t},abortRequest:function(e){e.ontimeout=e.onerror=e.onprogress=e.onload=null,e.abort()}};class bt extends P{constructor(e,t,n){super(),this.hooks=e,this.method=t,this.url=n}start(e){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},Y.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader(`Content-Type`,`application/json`),this.xhr.send(e)}close(){this.unloader&&=(Y.removeUnloadListener(this.unloader),null),this.xhr&&=(this.hooks.abortRequest(this.xhr),null)}onChunk(e,t){for(;;){var n=this.advanceBuffer(t);if(n)this.emit(`chunk`,{status:e,data:n});else break}this.isBufferTooLong(t)&&this.emit(`buffer_too_long`)}advanceBuffer(e){var t=e.slice(this.position),n=t.indexOf(` +`);return n===-1?null:(this.position+=n+1,t.slice(0,n))}isBufferTooLong(e){return this.position===e.length&&e.length>262144}}var xt;(function(e){e[e.CONNECTING=0]=`CONNECTING`,e[e.OPEN=1]=`OPEN`,e[e.CLOSED=3]=`CLOSED`})(xt||={});let J=xt;var St=1;class Ct{constructor(e,t){this.hooks=e,this.session=Ot(1e3)+`/`+kt(8),this.location=wt(t),this.readyState=J.CONNECTING,this.openStream()}send(e){return this.sendRaw(JSON.stringify([e]))}ping(){this.hooks.sendHeartbeat(this)}close(e,t){this.onClose(e,t,!0)}sendRaw(e){if(this.readyState===J.OPEN)try{return Y.createSocketRequest(`POST`,Et(Tt(this.location,this.session))).start(e),!0}catch{return!1}return!1}reconnect(){this.closeStream(),this.openStream()}onClose(e,t,n){this.closeStream(),this.readyState=J.CLOSED,this.onclose&&this.onclose({code:e,reason:t,wasClean:n})}onChunk(e){if(e.status===200){this.readyState===J.OPEN&&this.onActivity();var t;switch(e.data.slice(0,1)){case`o`:t=JSON.parse(e.data.slice(1)||`{}`),this.onOpen(t);break;case`a`:t=JSON.parse(e.data.slice(1)||`[]`);for(var n=0;n{this.onChunk(e)}),this.stream.bind(`finished`,e=>{this.hooks.onFinished(this,e)}),this.stream.bind(`buffer_too_long`,()=>{this.reconnect()});try{this.stream.start()}catch(e){w.defer(()=>{this.onError(e),this.onClose(1006,`Could not start streaming`,!1)})}}closeStream(){this.stream&&=(this.stream.unbind_all(),this.stream.close(),null)}}function wt(e){var t=/([^\?]*)\/*(\??.*)/.exec(e);return{base:t[1],queryString:t[2]}}function Tt(e,t){return e.base+`/`+t+`/xhr_send`}function Et(e){return e+(e.indexOf(`?`)===-1?`?`:`&`)+`t=`+ +new Date+`&n=`+St++}function Dt(e,t){var n=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(e);return n[1]+t+n[3]}function Ot(e){return Y.randomInt(e)}function kt(e){for(var t=[],n=0;n0&&e.onChunk(t.status,t.responseText);break;case 4:t.responseText&&t.responseText.length>0&&e.onChunk(t.status,t.responseText),e.emit(`finished`,t.status),e.close()}},t},abortRequest:function(e){e.onreadystatechange=null,e.abort()}},Pt={createStreamingSocket(e){return this.createSocket(jt,e)},createPollingSocket(e){return this.createSocket(Mt,e)},createSocket(e,t){return new At(e,t)},createXHR(e,t){return this.createRequest(Nt,e,t)},createRequest(e,t,n){return new bt(e,t,n)}};Pt.createXDR=function(e,t){return this.createRequest(yt,e,t)};let Y={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:i,DependenciesReceivers:s,getDefaultStrategy:_t,Transports:Ke,transportConnectionInitializer:vt,HTTPFactory:Pt,TimelineTransport:je,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(e){if(typeof window<`u`){window.Pusher=e;var t=()=>{this.onDocumentBody(e.ready)};window.JSON?t():c.load(`json2`,{},t)}},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:v,jsonp:Oe}},onDocumentBody(e){document.body?e():setTimeout(()=>{this.onDocumentBody(e)},0)},createJSONPRequest(e,t){return new Ae(e,t)},createScriptRequest(e){return new ke(e)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){return new(this.getXHRAPI())},createMicrosoftXHR(){return new ActiveXObject(`Microsoft.XMLHTTP`)},getNetwork(){return Je},createWebSocket(e){return new(this.getWebSocketAPI())(e)},createSocketRequest(e,t){if(this.isXHRSupported())return this.HTTPFactory.createXHR(e,t);if(this.isXDRSupported(t.indexOf(`https:`)===0))return this.HTTPFactory.createXDR(e,t);throw`Cross-origin HTTP requests are not supported`},isXHRSupported(){var e=this.getXHRAPI();return!!e&&new e().withCredentials!==void 0},isXDRSupported(e){var t=e?`https:`:`http:`,n=this.getProtocol();return!!window.XDomainRequest&&n===t},addUnloadListener(e){window.addEventListener===void 0?window.attachEvent!==void 0&&window.attachEvent(`onunload`,e):window.addEventListener(`pagehide`,e,!1)},removeUnloadListener(e){window.addEventListener===void 0?window.detachEvent!==void 0&&window.detachEvent(`onunload`,e):window.removeEventListener(`pagehide`,e,!1)},randomInt(e){let t=window.crypto||window.msCrypto,n=Math.floor(2**32/e)*e,r;do r=t.getRandomValues(new Uint32Array(1))[0];while(r>=n);return r%e}};var X;(function(e){e[e.ERROR=3]=`ERROR`,e[e.INFO=6]=`INFO`,e[e.DEBUG=7]=`DEBUG`})(X||={});let Z=X;class Ft{constructor(e,t,n){this.key=e,this.session=t,this.events=[],this.options=n||{},this.sent=0,this.uniqueID=0}log(e,t){e<=this.options.level&&(this.events.push(T({},t,{timestamp:w.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(e){this.log(Z.ERROR,e)}info(e){this.log(Z.INFO,e)}debug(e){this.log(Z.DEBUG,e)}isEmpty(){return this.events.length===0}send(e,t){var n=T({session:this.session,bundle:this.sent+1,key:this.key,lib:`js`,version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],e(n,(e,n)=>{e||this.sent++,t&&t(e,n)}),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class It{constructor(e,t,n,r){this.name=e,this.priority=t,this.transport=n,this.options=r||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(e,t){if(!this.isSupported())return Lt(new g,t);if(this.priority{n||(l(),i?i.close():r.close())},forceMinPriority:e=>{n||this.priority{var n=`socket_id=`+encodeURIComponent(e.socketId);for(var r in t.params)n+=`&`+encodeURIComponent(r)+`=`+encodeURIComponent(t.params[r]);if(t.paramsProvider!=null){let e=t.paramsProvider();for(var r in e)n+=`&`+encodeURIComponent(r)+`=`+encodeURIComponent(e[r])}return n},Ut=e=>{if(Y.getAuthorizers()[e.transport]===void 0)throw`'${e.transport}' is not a recognized auth transport`;return(t,n)=>{let r=Ht(t,e);Y.getAuthorizers()[e.transport](Y,r,e,d.UserAuthentication,n)}},Wt=(e,t)=>{var n=`socket_id=`+encodeURIComponent(e.socketId);for(var r in n+=`&channel_name=`+encodeURIComponent(e.channelName),t.params)n+=`&`+encodeURIComponent(r)+`=`+encodeURIComponent(t.params[r]);if(t.paramsProvider!=null){let e=t.paramsProvider();for(var r in e)n+=`&`+encodeURIComponent(r)+`=`+encodeURIComponent(e[r])}return n},Gt=e=>{if(Y.getAuthorizers()[e.transport]===void 0)throw`'${e.transport}' is not a recognized auth transport`;return(t,n)=>{let r=Wt(t,e);Y.getAuthorizers()[e.transport](Y,r,e,d.ChannelAuthorization,n)}},Kt=(e,t,n)=>{let r={authTransport:t.transport,authEndpoint:t.endpoint,auth:{params:t.params,headers:t.headers}};return(t,i)=>{n(e.channel(t.channelName),r).authorize(t.socketId,i)}};function qt(e,t){let n={activityTimeout:e.activityTimeout||a.activityTimeout,cluster:e.cluster,httpPath:e.httpPath||a.httpPath,httpPort:e.httpPort||a.httpPort,httpsPort:e.httpsPort||a.httpsPort,pongTimeout:e.pongTimeout||a.pongTimeout,statsHost:e.statsHost||a.stats_host,unavailableTimeout:e.unavailableTimeout||a.unavailableTimeout,wsPath:e.wsPath||a.wsPath,wsPort:e.wsPort||a.wsPort,wssPort:e.wssPort||a.wssPort,enableStats:Qt(e),httpHost:Jt(e),useTLS:Zt(e),wsHost:Yt(e),userAuthenticator:en(e),channelAuthorizer:nn(e,t)};return`disabledTransports`in e&&(n.disabledTransports=e.disabledTransports),`enabledTransports`in e&&(n.enabledTransports=e.enabledTransports),`ignoreNullOrigin`in e&&(n.ignoreNullOrigin=e.ignoreNullOrigin),`timelineParams`in e&&(n.timelineParams=e.timelineParams),`nacl`in e&&(n.nacl=e.nacl),n}function Jt(e){return e.httpHost?e.httpHost:e.cluster?`sockjs-${e.cluster}.pusher.com`:a.httpHost}function Yt(e){return e.wsHost?e.wsHost:Xt(e.cluster)}function Xt(e){return`ws-${e}.pusher.com`}function Zt(e){return Y.getProtocol()===`https:`||e.forceTLS!==!1}function Qt(e){return`enableStats`in e?e.enableStats:`disableStats`in e&&!e.disableStats}let $t=e=>`customHandler`in e&&e.customHandler!=null;function en(e){let t=Object.assign(Object.assign({},a.userAuthentication),e.userAuthentication);return $t(t)?t.customHandler:Ut(t)}function tn(e,t){let n;return`channelAuthorization`in e?n=Object.assign(Object.assign({},a.channelAuthorization),e.channelAuthorization):(n={transport:e.authTransport||a.authTransport,endpoint:e.authEndpoint||a.authEndpoint},`auth`in e&&(`params`in e.auth&&(n.params=e.auth.params),`headers`in e.auth&&(n.headers=e.auth.headers)),`authorizer`in e&&(n.customHandler=Kt(t,n,e.authorizer))),n}function nn(e,t){let n=tn(e,t);return $t(n)?n.customHandler:Gt(n)}class rn extends P{constructor(e){super(function(e,t){A.debug(`No callbacks on watchlist events for ${e}`)}),this.pusher=e,this.bindWatchlistInternalEvent()}handleEvent(e){e.data.events.forEach(e=>{this.emit(e.name,e)})}bindWatchlistInternalEvent(){this.pusher.connection.bind(`message`,e=>{e.event===`pusher_internal:watchlist_events`&&this.handleEvent(e)})}}function an(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}let on=an;class sn extends P{constructor(e){super(function(e,t){A.debug(`No callbacks on user for `+e)}),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(e,t)=>{if(e){A.warn(`Error during signin: ${e}`),this.emit(`pusher:signin_error`,Object.assign({},{type:`AuthError`,error:e.message},e instanceof _?{status:e.status}:{})),this._cleanup();return}this.pusher.send_event(`pusher:signin`,{auth:t.auth,user_data:t.user_data})},this.pusher=e,this.pusher.connection.bind(`state_change`,({previous:e,current:t})=>{e!==`connected`&&t===`connected`&&this._signin(),e===`connected`&&t!==`connected`&&(this._cleanup(),this._newSigninPromiseIfNeeded())}),this.watchlist=new rn(e),this.pusher.connection.bind(`message`,e=>{e.event===`pusher:signin_success`&&this._onSigninSuccess(e.data),this.serverToUserChannel&&this.serverToUserChannel.name===e.channel&&this.serverToUserChannel.handleEvent(e)})}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),this.pusher.connection.state===`connected`&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(e){try{this.user_data=JSON.parse(e.user_data)}catch{A.error(`Failed parsing user data after signin: ${e.user_data}`),this._cleanup();return}if(typeof this.user_data.id!=`string`||this.user_data.id===``){A.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),this._cleanup();return}this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){let e=e=>{e.subscriptionPending&&e.subscriptionCancelled?e.reinstateSubscription():!e.subscriptionPending&&this.pusher.connection.state===`connected`&&e.subscribe()};this.serverToUserChannel=new R(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global((e,t)=>{e.indexOf(`pusher_internal:`)!==0&&e.indexOf(`pusher:`)!==0&&this.emit(e,t)}),e(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&=(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested||this.signinDonePromise&&!this.signinDonePromise.done)return;let{promise:e,resolve:t,reject:n}=on();e.done=!1;let r=()=>{e.done=!0};e.then(r).catch(r),this.signinDonePromise=e,this._signinDoneResolve=t}}class Q{static ready(){Q.isReady=!0;for(var e=0,t=Q.instances.length;eY.getDefaultStrategy(this.config,e,zt);this.connection=V.createConnectionManager(this.key,{getStrategy:n,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:!!this.config.useTLS}),this.connection.bind(`connected`,()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())}),this.connection.bind(`message`,e=>{var t=e.event.indexOf(`pusher_internal:`)===0;if(e.channel){var n=this.channel(e.channel);n&&n.handleEvent(e)}t||this.global_emitter.emit(e.event,e.data)}),this.connection.bind(`connecting`,()=>{this.channels.disconnect()}),this.connection.bind(`disconnected`,()=>{this.channels.disconnect()}),this.connection.bind(`error`,e=>{A.warn(e)}),Q.instances.push(this),this.timeline.info({instances:Q.instances.length}),this.user=new sn(this),Q.isReady&&this.connect()}switchCluster(e){let{appKey:t,cluster:n}=e;this.key=t,this.options=Object.assign(Object.assign({},this.options),{cluster:n}),this.config=qt(this.options,this),this.connection.switchCluster(this.key)}channel(e){return this.channels.find(e)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var e=this.connection.isUsingTLS(),t=this.timelineSender;this.timelineSenderTimer=new pe(6e4,function(){t.send(e)})}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&=(this.timelineSenderTimer.ensureAborted(),null)}bind(e,t,n){return this.global_emitter.bind(e,t,n),this}unbind(e,t,n){return this.global_emitter.unbind(e,t,n),this}bind_global(e){return this.global_emitter.bind_global(e),this}unbind_global(e){return this.global_emitter.unbind_global(e),this}unbind_all(e){return this.global_emitter.unbind_all(),this}subscribeAll(){for(var e in this.channels.channels)this.channels.channels.hasOwnProperty(e)&&this.subscribe(e)}subscribe(e){var t=this.channels.add(e,this);return t.subscriptionPending&&t.subscriptionCancelled?t.reinstateSubscription():!t.subscriptionPending&&this.connection.state===`connected`&&t.subscribe(),t}unsubscribe(e){var t=this.channels.find(e);t&&t.subscriptionPending?t.cancelSubscription():(t=this.channels.remove(e),t&&t.subscribed&&t.unsubscribe())}send_event(e,t,n){return this.connection.send_event(e,t,n)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}Q.instances=[],Q.isReady=!1,Q.logToConsole=!1,Q.Runtime=Y,Q.ScriptReceivers=Y.ScriptReceivers,Q.DependenciesReceivers=Y.DependenciesReceivers,Q.auth_callbacks=Y.auth_callbacks;let $=Q;function cn(e){if(e==null)throw`You must pass your app key when you instantiate Pusher.`}Y.setup(Q)}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}return n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n(721)})())}));export default t(); \ No newline at end of file diff --git a/dist/chunks/rolldown-runtime-CbXtAM7H.js b/dist/chunks/rolldown-runtime-CbXtAM7H.js new file mode 100644 index 0000000..576b96d --- /dev/null +++ b/dist/chunks/rolldown-runtime-CbXtAM7H.js @@ -0,0 +1 @@ +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));export{c as n,o as t}; \ No newline at end of file diff --git a/dist/header/Unread.js b/dist/header/Unread.js new file mode 100644 index 0000000..96b42f5 --- /dev/null +++ b/dist/header/Unread.js @@ -0,0 +1 @@ +import{t as e}from"../chunks/createLucideIcon-CYyWUN7r.js";import{createCommentVNode as t,createElementBlock as n,createVNode as r,onBeforeUnmount as i,onMounted as a,openBlock as o,ref as s,toDisplayString as c,unref as l}from"vue";import{http as u}from"@inhaus/ui";var d=e({name:`message-circle`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]}),f=[`aria-label`,`title`],p={key:0,class:`ih:absolute ih:top-0.5 ih:right-0.5 ih:grid ih:h-4 ih:min-w-4 ih:place-items-center ih:rounded-full ih:bg-brand ih:px-1 ih:text-[10px] ih:font-semibold ih:text-brand-foreground ih:tabular-nums`,"aria-hidden":`true`},m={__name:`Unread`,props:{unread:{type:Number,default:0}},setup(e){let m=s(e.unread),h,g=e=>m.value=e.detail;async function _(){document.visibilityState===`visible`&&!location.pathname.startsWith(`/chat`)&&(m.value=(await u.get(`/chat/api/ungelesen`).catch(()=>({unread:m.value}))).unread)}return a(()=>{window.addEventListener(`inhaus-chat:unread`,g),h=setInterval(_,3e4)}),i(()=>{window.removeEventListener(`inhaus-chat:unread`,g),clearInterval(h)}),(e,i)=>(o(),n(`a`,{href:`/chat`,class:`ih:relative ih:grid ih:size-9 ih:place-items-center ih:rounded-md ih:text-muted-foreground ih:transition-colors ih:hover:bg-accent ih:hover:text-foreground`,"aria-label":m.value?`Nachrichten, ${m.value} ungelesen`:`Nachrichten`,title:m.value?`${m.value} ungelesene Nachrichten`:`Nachrichten`},[r(l(d),{class:`ih:size-5`}),m.value?(o(),n(`span`,p,c(m.value>99?`99+`:m.value),1)):t(``,!0)],8,f))}};export{m as default}; \ No newline at end of file diff --git a/dist/inhaus.json b/dist/inhaus.json new file mode 100644 index 0000000..ff0fd8a --- /dev/null +++ b/dist/inhaus.json @@ -0,0 +1,9 @@ +{ + "components": { + "header/Unread": "header/Unread.js", + "pages/Index": "pages/Index.js" + }, + "css": [ + "assets/style-BXBiFiq8.css" + ] +} \ No newline at end of file diff --git a/dist/pages/Index.js b/dist/pages/Index.js new file mode 100644 index 0000000..3a1b260 --- /dev/null +++ b/dist/pages/Index.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/pusher-DXDYBH7H.js","../chunks/rolldown-runtime-CbXtAM7H.js"])))=>i.map(i=>d[i]); +import{n as e}from"../chunks/rolldown-runtime-CbXtAM7H.js";import{t}from"../chunks/createLucideIcon-CYyWUN7r.js";import{Fragment as n,computed as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createElementVNode as s,createTextVNode as c,createVNode as l,mergeModels as u,nextTick as d,normalizeClass as f,normalizeStyle as p,onBeforeUnmount as m,onMounted as h,openBlock as g,ref as _,renderList as v,renderSlot as y,resolveDynamicComponent as b,toDisplayString as x,unref as S,useModel as C,vModelText as w,watch as T,withCtx as E,withDirectives as D,withKeys as O,withModifiers as k}from"vue";import{AppLayout as A,Button as j,Dialog as M,DialogContent as N,DialogDescription as P,DialogFooter as F,DialogHeader as I,DialogTitle as L,FileIcon as R,Input as z,Label as B,PersonAvatar as V,Switch as ee,http as H,toast as U}from"@inhaus/ui";var te=t({name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]}),ne=t({name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]}),re=t({name:`bell-off`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]}),W=t({name:`corner-up-left`,size:24,node:[[`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`,key:`1nkjon`}],[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}]]}),G=t({name:`crown`,size:24,node:[[`path`,{d:`M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z`,key:`1vdc57`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]}),ie=t({name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]}),ae=t({name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]}),oe=t({name:`face-slightly-smiling-plus`,size:24,node:[[`path`,{d:`M13.267 2.08a10 10 0 108.653 8.653`,key:`1wbpyh`}],[`path`,{d:`M15 10V9`,key:`4dkmfx`}],[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M16.472 15a6 6 0 01-8.943 0`,key:`7qomzy`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M9 10V9`,key:`1lazqi`}]],aliases:[`smile-plus`]}),se=t({name:`face-slightly-smiling`,size:24,node:[[`path`,{d:`M15 10V9`,key:`4dkmfx`}],[`path`,{d:`M16.472 15a6 6 0 01-8.943 0`,key:`7qomzy`}],[`path`,{d:`M9 10V9`,key:`1lazqi`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]],aliases:[`smile`]}),ce=t({name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]}),le=t({name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]}),ue=t({name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]}),K=t({name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]}),de=t({name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]}),fe=t({name:`message-square-plus`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]}),pe=t({name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]}),me=t({name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]}),he=t({name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]}),q=t({name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]}),ge=t({name:`send-horizontal`,size:24,node:[[`path`,{d:`M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z`,key:`117uat`}],[`path`,{d:`M6 12h16`,key:`s4cdu5`}]],aliases:[`send-horizonal`]}),_e=t({name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]}),ve=t({name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]}),ye=t({name:`user-minus`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]}),be=t({name:`user-plus`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]}),xe=t({name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]}),Se=t({name:`users-round`,size:24,node:[[`path`,{d:`M18 21a8 8 0 0 0-16 0`,key:`3ypg7q`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3`,key:`10s06x`}]],aliases:[`users-2`]}),J=t({name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]}),Y=`/chat/api`,X={conversations:()=>H.get(`${Y}/gespraeche`),direct:e=>H.post(`${Y}/direkt`,{user_id:e}),createGroup:(e,t)=>H.post(`${Y}/gruppen`,{name:e,members:t}),updateConversation:(e,t)=>H.put(`${Y}/gespraeche/${e}`,t),leave:e=>H.delete(`${Y}/gespraeche/${e}`),addMembers:(e,t)=>H.post(`${Y}/gespraeche/${e}/mitglieder`,{members:t}),removeMember:(e,t)=>H.delete(`${Y}/gespraeche/${e}/mitglieder/${t}`),setAdmin:(e,t,n)=>H.put(`${Y}/gespraeche/${e}/mitglieder/${t}`,{admin:n}),messages:(e,t)=>H.get(`${Y}/gespraeche/${e}/nachrichten${t?`?vor=${t}`:``}`),send(e,{body:t,gifUrl:n,replyTo:r,files:i}){let a=new FormData;return t&&a.append(`body`,t),n&&a.append(`gif_url`,n),r&&a.append(`reply_to`,r),(i??[]).forEach(e=>a.append(`files[]`,e)),H.post(`${Y}/gespraeche/${e}/nachrichten`,a)},edit:(e,t)=>H.put(`${Y}/nachrichten/${e}`,{body:t}),remove:e=>H.delete(`${Y}/nachrichten/${e}`),react:(e,t)=>H.post(`${Y}/nachrichten/${e}/reaktion`,{emoji:t}),read:(e,t)=>H.post(`${Y}/gespraeche/${e}/gelesen`,{message_id:t}),typing:e=>H.post(`${Y}/gespraeche/${e}/tippt`),updates:e=>H.get(`${Y}/neues?${new URLSearchParams(Object.entries(e).filter(([,e])=>e!=null))}`),unread:()=>H.get(`${Y}/ungelesen`),gifs:e=>H.get(`${Y}/gifs?q=${encodeURIComponent(e??``)}`),people:e=>H.get(`/personen/suche?q=${encodeURIComponent(e)}`)};function Z(e){window.dispatchEvent(new CustomEvent(`inhaus-chat:unread`,{detail:e}))}var Ce={class:`ih:grid ih:gap-2`},we={key:0,class:`ih:flex ih:flex-wrap ih:gap-1.5`},Te=[`aria-label`,`onClick`],Ee={class:`ih:relative`},De=[`autofocus`,`placeholder`],Oe={key:1,class:`ih:max-h-64 ih:overflow-y-auto ih:rounded-md ih:border ih:bg-popover ih:p-1`,role:`listbox`},ke=[`aria-selected`],Ae=[`onClick`,`onMouseenter`],je={class:`ih:min-w-0 ih:flex-1`},Me={class:`ih:block ih:truncate ih:font-medium`},Ne={key:0,class:`ih:block ih:truncate ih:text-xs ih:text-muted-foreground`},Pe={key:2,class:`ih:px-1 ih:text-[13px] ih:text-muted-foreground`},Fe={__name:`PeopleSelect`,props:u({multiple:{type:Boolean,default:!1},exclude:{type:Array,default:()=>[]},placeholder:{type:String,default:`Name oder E-Mail eingeben …`},autofocus:{type:Boolean,default:!1}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:u([`pick`],[`update:modelValue`]),setup(e,{emit:t}){let r=e,i=t,u=C(e,`modelValue`),d=_(``),p=_([]),m=_(0),h=_(!1),y;T(d,e=>{if(clearTimeout(y),e.trim().length<2){p.value=[];return}y=setTimeout(async()=>{h.value=!0;try{let t=[...r.exclude,...u.value.map(e=>e.id)];p.value=(await X.people(e.trim())).people.filter(e=>!t.includes(e.id)),m.value=0}finally{h.value=!1}},200)});function b(e){e&&(i(`pick`,e),r.multiple&&(u.value=[...u.value,e]),d.value=``,p.value=[])}let E=e=>u.value=u.value.filter(t=>t.id!==e.id);return(t,r)=>(g(),o(`div`,Ce,[e.multiple&&u.value.length?(g(),o(`div`,we,[(g(!0),o(n,null,v(u.value,e=>(g(),o(`span`,{key:e.id,class:`ih:inline-flex ih:items-center ih:gap-1.5 ih:rounded-full ih:border ih:bg-card ih:py-0.5 ih:pr-1 ih:pl-0.5 ih:text-[13px]`},[l(S(V),{person:e,class:`ih:size-6 ih:text-[10px]`},null,8,[`person`]),c(` `+x(e.name)+` `,1),s(`button`,{type:`button`,class:`ih:rounded-full ih:p-0.5 ih:text-muted-foreground ih:hover:bg-muted ih:hover:text-foreground`,"aria-label":`${e.name} entfernen`,onClick:t=>E(e)},[l(S(J),{class:`ih:size-3.5`})],8,Te)]))),128))])):a(``,!0),s(`div`,Ee,[l(S(q),{class:`ih:pointer-events-none ih:absolute ih:top-1/2 ih:left-2.5 ih:size-4 ih:-translate-y-1/2 ih:text-muted-foreground`}),D(s(`input`,{"onUpdate:modelValue":r[0]||=e=>d.value=e,type:`search`,autocomplete:`off`,autofocus:e.autofocus,placeholder:e.placeholder,"aria-label":`Person suchen`,class:`ih:h-10 ih:w-full ih:rounded-md ih:border ih:border-input ih:bg-card ih:pr-3 ih:pl-8 ih:text-sm ih:shadow-xs ih:focus-visible:ring-3 ih:focus-visible:ring-ring/30 ih:focus-visible:outline-none`,onKeydown:[r[1]||=O(k(e=>m.value=Math.min(p.value.length-1,m.value+1),[`prevent`]),[`down`]),r[2]||=O(k(e=>m.value=Math.max(0,m.value-1),[`prevent`]),[`up`]),r[3]||=O(k(e=>b(p.value[m.value]),[`prevent`]),[`enter`])]},null,40,De),[[w,d.value]])]),p.value.length?(g(),o(`ul`,Oe,[(g(!0),o(n,null,v(p.value,(e,t)=>(g(),o(`li`,{key:e.id,role:`option`,"aria-selected":t===m.value},[s(`button`,{type:`button`,class:f([`ih:flex ih:w-full ih:items-center ih:gap-2.5 ih:rounded ih:px-2 ih:py-1.5 ih:text-left ih:text-sm`,t===m.value?`ih:bg-accent`:`ih:hover:bg-accent/60`]),onClick:t=>b(e),onMouseenter:e=>m.value=t},[l(S(V),{person:e,class:`ih:size-7 ih:text-[11px]`},null,8,[`person`]),s(`span`,je,[s(`span`,Me,x(e.name),1),e.job_title||e.department?(g(),o(`span`,Ne,x([e.job_title,e.department].filter(Boolean).join(` · `)),1)):a(``,!0)])],42,Ae)],8,ke))),128))])):d.value.trim().length>=2&&!h.value?(g(),o(`p`,Pe,`Niemand gefunden.`)):a(``,!0)]))}},Ie={class:`ih:grid ih:gap-5`},Le={class:`ih:flex ih:items-center ih:justify-between ih:gap-3 ih:text-sm`},Re={key:1,class:`ih:grid ih:gap-2`},ze={class:`ih:-mx-2 ih:grid`},Be={class:`ih:min-w-0 ih:flex-1 ih:text-sm`},Ve={class:`ih:font-medium`},He={key:0,class:`ih:text-muted-foreground`},Ue={key:1,class:`ih:ml-1.5 ih:inline-flex ih:items-center ih:gap-0.5 ih:text-xs ih:text-brand-text`},We=[`title`,`aria-label`,`onClick`],Ge=[`aria-label`,`onClick`],Ke={key:0,class:`ih:grid ih:gap-2 ih:rounded-md ih:border ih:p-3`},qe={class:`ih:flex ih:items-center ih:gap-1.5 ih:text-sm ih:font-medium`},Je={__name:`ConversationInfo`,props:u({conversation:{type:Object,required:!0},me:{type:Object,required:!0}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:u([`updated`,`left`],[`update:open`]),setup(e,{emit:t}){let u=e,d=C(e,`open`),f=t,p=r(()=>u.conversation.type===`group`),m=_(``),h=_([]),y=_(!1);T(d,e=>{e&&(m.value=u.conversation.name,h.value=[])});async function w(e,t){y.value=!0;try{let n=await e();f(`updated`,n.conversations),t&&U.success(t)}catch(e){U.error(e.message)}finally{y.value=!1}}let D=()=>w(()=>X.updateConversation(u.conversation.id,{name:m.value.trim()}),`Gruppe umbenannt`),O=e=>w(()=>X.updateConversation(u.conversation.id,{muted:e}),e?`Stummgeschaltet – keine Benachrichtigungen mehr`:`Benachrichtigungen wieder an`),A=()=>w(()=>X.addMembers(u.conversation.id,h.value.map(e=>e.id)),`Hinzugefügt`).then(()=>h.value=[]),F=e=>window.confirm(`${e.name} aus der Gruppe entfernen?`)&&w(()=>X.removeMember(u.conversation.id,e.id)),R=e=>w(()=>X.setAdmin(u.conversation.id,e.id,!e.admin));async function B(){window.confirm(p.value?`Gruppe verlassen? Sie sehen die Nachrichten danach nicht mehr.`:`Gespräch aus Ihrer Liste entfernen? Mit der nächsten Nachricht erscheint es wieder.`)&&(await w(()=>X.leave(u.conversation.id)),d.value=!1,f(`left`))}return(t,r)=>(g(),i(S(M),{open:d.value,"onUpdate:open":r[2]||=e=>d.value=e},{default:E(()=>[l(S(N),{class:`ih:max-h-[85dvh] ih:overflow-y-auto ih:sm:max-w-lg`},{default:E(()=>[l(S(I),null,{default:E(()=>[l(S(L),null,{default:E(()=>[c(x(e.conversation.name),1)]),_:1}),l(S(P),null,{default:E(()=>[c(x(p.value?`Gruppe mit ${e.conversation.members.length} Mitgliedern`:`Direktnachricht`),1)]),_:1})]),_:1}),s(`div`,Ie,[p.value&&e.conversation.is_admin?(g(),o(`form`,{key:0,class:`ih:flex ih:gap-2`,onSubmit:k(D,[`prevent`])},[l(S(z),{modelValue:m.value,"onUpdate:modelValue":r[0]||=e=>m.value=e,maxlength:`100`,"aria-label":`Name der Gruppe`},null,8,[`modelValue`]),l(S(j),{type:`submit`,variant:`outline`,disabled:y.value||!m.value.trim()||m.value.trim()===e.conversation.name},{default:E(()=>[...r[3]||=[c(`Umbenennen`,-1)]]),_:1},8,[`disabled`])],32)):a(``,!0),s(`label`,Le,[r[4]||=s(`span`,null,[s(`span`,{class:`ih:font-medium`},`Stummschalten`),s(`span`,{class:`ih:block ih:text-xs ih:text-muted-foreground`},`Keine Glocke und kein Push für dieses Gespräch.`)],-1),l(S(ee),{"model-value":e.conversation.muted,disabled:y.value,"onUpdate:modelValue":O},null,8,[`model-value`,`disabled`])]),p.value?(g(),o(`section`,Re,[r[7]||=s(`h3`,{class:`ih:text-sm ih:font-semibold`},`Mitglieder`,-1),s(`ul`,ze,[(g(!0),o(n,null,v(e.conversation.members,t=>(g(),o(`li`,{key:t.id,class:`ih:flex ih:items-center ih:gap-3 ih:rounded-md ih:px-2 ih:py-1.5 ih:hover:bg-muted/60`},[l(S(V),{person:t,class:`ih:size-8 ih:text-[11px]`},null,8,[`person`]),s(`span`,Be,[s(`span`,Ve,x(t.name),1),t.id===e.me.id?(g(),o(`span`,He,` (Sie)`)):a(``,!0),t.admin?(g(),o(`span`,Ue,[l(S(G),{class:`ih:size-3`}),r[5]||=c(` Admin`,-1)])):a(``,!0)]),e.conversation.is_admin&&t.id!==e.me.id?(g(),o(n,{key:0},[s(`button`,{type:`button`,class:`ih:rounded ih:p-1.5 ih:text-muted-foreground ih:hover:bg-accent ih:hover:text-foreground`,title:t.admin?`Admin-Rechte entziehen`:`Zum Admin machen`,"aria-label":t.admin?`${t.name}: Admin-Rechte entziehen`:`${t.name} zum Admin machen`,onClick:e=>R(t)},[l(S(G),{class:`ih:size-4`})],8,We),s(`button`,{type:`button`,class:`ih:rounded ih:p-1.5 ih:text-muted-foreground ih:hover:bg-accent ih:hover:text-destructive`,"aria-label":`${t.name} entfernen`,onClick:e=>F(t)},[l(S(ye),{class:`ih:size-4`})],8,Ge)],64)):a(``,!0)]))),128))]),e.conversation.is_admin?(g(),o(`div`,Ke,[s(`span`,qe,[l(S(be),{class:`ih:size-4`}),r[6]||=c(` Personen hinzufügen`,-1)]),l(Fe,{modelValue:h.value,"onUpdate:modelValue":r[1]||=e=>h.value=e,multiple:``,exclude:e.conversation.members.map(e=>e.id)},null,8,[`modelValue`,`exclude`]),h.value.length?(g(),i(S(j),{key:0,size:`sm`,class:`ih:justify-self-start`,disabled:y.value,onClick:A},{default:E(()=>[y.value?(g(),i(S(K),{key:0,class:`ih:animate-spin`})):a(``,!0),c(` `+x(h.value.length)+` hinzufügen`,1)]),_:1},8,[`disabled`])):a(``,!0)])):a(``,!0)])):a(``,!0),l(S(j),{variant:`outline`,class:`ih:justify-self-start ih:text-destructive ih:hover:text-destructive`,disabled:y.value,onClick:B},{default:E(()=>[(g(),i(b(p.value?S(de):S(ae)))),c(` `+x(p.value?`Gruppe verlassen`:`Aus der Liste entfernen`),1)]),_:1},8,[`disabled`])])]),_:1})]),_:1},8,[`open`]))}},Ye={__name:`ChatAvatar`,props:{conversation:{type:Object,required:!0},size:{type:String,default:`ih:size-10`}},setup(e){return(t,n)=>e.conversation.person?(g(),i(S(V),{key:0,person:e.conversation.person,class:f(e.size)},null,8,[`person`,`class`])):(g(),o(`span`,{key:1,class:f([`ih:grid ih:shrink-0 ih:place-items-center ih:rounded-full ih:bg-brand-soft ih:text-brand-text`,e.size]),"aria-hidden":`true`},[l(S(xe),{class:`ih:size-[45%]`})],2))}},Xe=new Intl.DateTimeFormat(`de-DE`,{hour:`2-digit`,minute:`2-digit`}),Ze=new Intl.DateTimeFormat(`de-DE`,{weekday:`short`}),Qe=new Intl.DateTimeFormat(`de-DE`,{day:`2-digit`,month:`2-digit`,year:`2-digit`}),$e=new Intl.DateTimeFormat(`de-DE`,{weekday:`long`,day:`numeric`,month:`long`,year:`numeric`}),Q=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();function et(e){if(!e)return``;let t=new Date(e),n=(Q(new Date)-Q(t))/864e5;return n===0?Xe.format(t):n===1?`Gestern`:n<7?Ze.format(t):Qe.format(t)}var tt=e=>Xe.format(new Date(e));function nt(e){let t=new Date(e),n=(Q(new Date)-Q(t))/864e5;return n===0?`Heute`:n===1?`Gestern`:$e.format(t)}var $=(e,t)=>Q(new Date(e))===Q(new Date(t));function rt(e){return e<1024?`${e} B`:e<1048576?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1).replace(`.`,`,`)} MB`}function it(e){let t=[],n=/(https?:\/\/[^\s<>"']+[^\s<>"'.,;:!?)\]])/g,r=0;for(let i of e.matchAll(n))i.index>r&&t.push({text:e.slice(r,i.index)}),t.push({text:i[0],href:i[0]}),r=i.index+i[0].length;return r!!e&&/^(\p{Extended_Pictographic}|\p{Emoji_Component}|‍|️|\s){1,12}$/u.test(e)&&[...e.replace(/\s/g,``)].length<=8,ot={class:`ih:flex ih:h-full ih:min-h-0 ih:flex-col`},st={class:`ih:flex ih:items-center ih:gap-2 ih:border-b ih:p-3`},ct={class:`ih:border-b ih:p-3`},lt={class:`ih:relative`},ut={class:`ih:min-h-0 ih:flex-1 ih:overflow-y-auto`,"aria-label":`Gespräche`},dt=[`aria-current`,`onClick`],ft={class:`ih:min-w-0 ih:flex-1`},pt={class:`ih:flex ih:items-baseline ih:gap-2`},mt={class:`ih:shrink-0 ih:text-[11px] ih:text-muted-foreground ih:tabular-nums`},ht={class:`ih:flex ih:items-center ih:gap-2`},gt=[`aria-label`],_t={key:0,class:`ih:p-6 ih:text-center ih:text-sm ih:text-muted-foreground`},vt={__name:`ConversationList`,props:{conversations:{type:Array,required:!0},activeId:{type:Number,default:null},canCreateGroups:{type:Boolean,default:!1}},emits:[`open`,`new-chat`,`new-group`],setup(e,{emit:t}){let c=e,u=t,d=_(``),p=r(()=>{let e=d.value.trim().toLowerCase();return e?c.conversations.filter(t=>[t.name,...t.members.map(e=>e.name)].join(` `).toLowerCase().includes(e)):c.conversations});return(t,r)=>(g(),o(`div`,ot,[s(`div`,st,[r[3]||=s(`h1`,{class:`ih:flex-1 ih:text-lg ih:font-semibold ih:tracking-tight`},`Nachrichten`,-1),e.canCreateGroups?(g(),i(S(j),{key:0,variant:`ghost`,size:`icon`,title:`Neue Gruppe`,"aria-label":`Neue Gruppe`,onClick:r[0]||=e=>u(`new-group`)},{default:E(()=>[l(S(Se))]),_:1})):a(``,!0),l(S(j),{size:`icon`,title:`Neue Nachricht`,"aria-label":`Neue Nachricht`,onClick:r[1]||=e=>u(`new-chat`)},{default:E(()=>[l(S(fe))]),_:1})]),s(`div`,ct,[s(`div`,lt,[l(S(q),{class:`ih:pointer-events-none ih:absolute ih:top-1/2 ih:left-2.5 ih:size-4 ih:-translate-y-1/2 ih:text-muted-foreground`}),D(s(`input`,{"onUpdate:modelValue":r[2]||=e=>d.value=e,type:`search`,placeholder:`Gespräche durchsuchen`,"aria-label":`Gespräche durchsuchen`,class:`ih:h-9 ih:w-full ih:rounded-md ih:bg-muted ih:pr-3 ih:pl-8 ih:text-sm ih:focus-visible:ring-3 ih:focus-visible:ring-ring/30 ih:focus-visible:outline-none`},null,512),[[w,d.value]])])]),s(`ul`,ut,[(g(!0),o(n,null,v(p.value,t=>(g(),o(`li`,{key:t.id},[s(`button`,{type:`button`,class:f([`ih:flex ih:w-full ih:items-center ih:gap-3 ih:px-3 ih:py-2.5 ih:text-left ih:transition-colors`,t.id===e.activeId?`ih:bg-brand-soft`:`ih:hover:bg-accent/60`]),"aria-current":t.id===e.activeId?`true`:void 0,onClick:e=>u(`open`,t.id)},[l(Ye,{conversation:t,size:`ih:size-11`},null,8,[`conversation`]),s(`span`,ft,[s(`span`,pt,[s(`span`,{class:f([`ih:min-w-0 ih:flex-1 ih:truncate ih:text-sm`,t.unread?`ih:font-semibold`:`ih:font-medium`])},x(t.name),3),s(`span`,mt,x(S(et)(t.last_message_at)),1)]),s(`span`,ht,[s(`span`,{class:f([`ih:min-w-0 ih:flex-1 ih:truncate ih:text-[13px]`,t.unread?`ih:text-foreground`:`ih:text-muted-foreground`])},x(t.preview??(t.type===`group`?`${t.members.length} Mitglieder`:`Noch keine Nachrichten`)),3),t.muted?(g(),i(S(re),{key:0,class:`ih:size-3.5 ih:shrink-0 ih:text-muted-foreground`,"aria-label":`Stummgeschaltet`})):a(``,!0),t.unread?(g(),o(`span`,{key:1,class:`ih:grid ih:h-5 ih:min-w-5 ih:shrink-0 ih:place-items-center ih:rounded-full ih:bg-brand ih:px-1.5 ih:text-[11px] ih:font-semibold ih:text-brand-foreground ih:tabular-nums`,"aria-label":`${t.unread} ungelesen`},x(t.unread>99?`99+`:t.unread),9,gt)):a(``,!0)])])],10,dt)]))),128)),p.value.length?a(``,!0):(g(),o(`li`,_t,x(d.value?`Nichts gefunden.`:`Noch keine Gespräche. Oben rechts eine neue Nachricht beginnen.`),1))])]))}},yt={class:`ih:grid ih:gap-4`},bt={key:0,class:`ih:grid ih:gap-1.5`},xt={class:`ih:grid ih:gap-1.5`},St={key:1,class:`ih:flex ih:items-center ih:gap-2 ih:text-sm ih:text-muted-foreground`},Ct={__name:`NewChatDialog`,props:u({group:{type:Boolean,default:!1},me:{type:Object,required:!0}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:u([`created`],[`update:open`]),setup(e,{emit:t}){let n=e,r=C(e,`open`),u=t,d=_(``),f=_([]),p=_(!1);T(r,e=>{e&&(d.value=``,f.value=[])});async function m(e){if(!n.group){p.value=!0;try{let t=await X.direct(e.id);r.value=!1,u(`created`,t)}catch(e){U.error(e.message)}finally{p.value=!1}}}async function h(){p.value=!0;try{let e=await X.createGroup(d.value.trim(),f.value.map(e=>e.id));r.value=!1,u(`created`,e)}catch(e){U.error(e.message)}finally{p.value=!1}}return(t,n)=>(g(),i(S(M),{open:r.value,"onUpdate:open":n[3]||=e=>r.value=e},{default:E(()=>[l(S(N),{class:`ih:sm:max-w-md`},{default:E(()=>[l(S(I),null,{default:E(()=>[l(S(L),null,{default:E(()=>[c(x(e.group?`Neue Gruppe`:`Neue Nachricht`),1)]),_:1}),l(S(P),null,{default:E(()=>[c(x(e.group?`Name und Mitglieder wählen – Sie verwalten die Gruppe.`:`An wen möchten Sie schreiben?`),1)]),_:1})]),_:1}),s(`div`,yt,[e.group?(g(),o(`div`,bt,[l(S(B),{for:`chat-group-name`},{default:E(()=>[...n[4]||=[c(`Name der Gruppe`,-1)]]),_:1}),l(S(z),{id:`chat-group-name`,modelValue:d.value,"onUpdate:modelValue":n[0]||=e=>d.value=e,maxlength:`100`,placeholder:`z. B. Station 3 – Frühdienst`},null,8,[`modelValue`])])):a(``,!0),s(`div`,xt,[e.group?(g(),i(S(B),{key:0},{default:E(()=>[...n[5]||=[c(`Mitglieder`,-1)]]),_:1})):a(``,!0),l(Fe,{modelValue:f.value,"onUpdate:modelValue":n[1]||=e=>f.value=e,multiple:e.group,exclude:[e.me.id],autofocus:``,onPick:m},null,8,[`modelValue`,`multiple`,`exclude`])]),p.value&&!e.group?(g(),o(`p`,St,[l(S(K),{class:`ih:size-4 ih:animate-spin`}),n[6]||=c(` Gespräch wird geöffnet …`,-1)])):a(``,!0)]),e.group?(g(),i(S(F),{key:0},{default:E(()=>[l(S(j),{variant:`ghost`,onClick:n[2]||=e=>r.value=!1},{default:E(()=>[...n[7]||=[c(`Abbrechen`,-1)]]),_:1}),l(S(j),{disabled:p.value||!d.value.trim()||!f.value.length,onClick:h},{default:E(()=>[p.value?(g(),i(S(K),{key:0,class:`ih:animate-spin`})):a(``,!0),n[8]||=c(` Gruppe erstellen `,-1)]),_:1},8,[`disabled`])]),_:1})):a(``,!0)]),_:1})]),_:1},8,[`open`]))}},wt=[{label:`Smileys`,icon:`😀`,emojis:`😀 😃 😄 😁 😆 😅 🤣 😂 🙂 🙃 😉 😊 😇 🥰 😍 🤩 😘 😗 😚 😋 😛 😜 🤪 😝 🤗 🤭 🤫 🤔 🤐 🤨 😐 😑 😶 😏 😒 🙄 😬 😌 😔 😪 😴 😷 🤒 🤕 🤢 🤧 🥵 🥶 🥴 😵 🤯 🤠 🥳 😎 🤓 🧐 😕 😟 🙁 😮 😯 😲 😳 🥺 😦 😧 😨 😰 😥 😢 😭 😱 😖 😣 😞 😓 😩 😫 🥱 😤 😡 😠 🤬`.split(` `)},{label:`Gesten`,icon:`👍`,emojis:`👍 👎 👌 🤌 ✌️ 🤞 🤟 🤘 🤙 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐️ 🖖 👋 👏 🙌 👐 🤲 🤝 🙏 ✍️ 💪 🦾 👀 🧠 🫶 ❤️ 🧡 💛 💚 💙 💜 🖤 🤍 🤎 💔 ❣️ 💕 💞 💓 💗 💖 💘 💯 ✨ ⭐ 🌟 💥 🔥 🎉 🎊`.split(` `)},{label:`Menschen`,icon:`🧑`,emojis:`👶 🧒 👦 👧 🧑 👱 👨 🧔 👩 🧓 👴 👵 🙋 🙆 🙅 🤷 🤦 🙇 💁 🧑‍⚕️ 🧑‍🍳 🧑‍🔧 🧑‍🏫 🧑‍💻 🧑‍💼 🧑‍🔬 🧑‍🎨 🧑‍🚒 👮 🕵️ 💂 👷 🤴 👸 🧙 🧚 🦸 🏃 🚶 🧘 🏋️ 🚴 🤸 👯 💃 🕺 👪 🧑‍🤝‍🧑`.split(` `)},{label:`Natur`,icon:`🌿`,emojis:`🐶 🐱 🐭 🐹 🐰 🦊 🐻 🐼 🐨 🐯 🦁 🐮 🐷 🐸 🐵 🐔 🐧 🐦 🦆 🦉 🐴 🦄 🐝 🐞 🦋 🐢 🐍 🐙 🐠 🐬 🐳 🌵 🎄 🌲 🌳 🌴 🌱 🌿 🍀 🍁 🍂 🌷 🌹 🌻 🌼 🌸 🌞 🌝 🌙 ⭐ ☀️ 🌤️ ⛅ 🌧️ ⛈️ ❄️ ☃️ 🌈 🌊`.split(` `)},{label:`Essen`,icon:`🍕`,emojis:`🍏 🍎 🍐 🍊 🍋 🍌 🍉 🍇 🍓 🫐 🍒 🍑 🥭 🍍 🥥 🥝 🍅 🥑 🥦 🥕 🌽 🥔 🥐 🥖 🥨 🧀 🥚 🍳 🥞 🥓 🍔 🍟 🍕 🌭 🥪 🌮 🥗 🍝 🍜 🍲 🍣 🍰 🎂 🧁 🍩 🍪 🍫 🍬 🍭 🍦 ☕ 🍵 🧃 🥤 🍺 🍻 🥂 🍷`.split(` `)},{label:`Aktivitäten`,icon:`⚽`,emojis:`⚽ 🏀 🏈 ⚾ 🎾 🏐 🏓 🏸 🥅 ⛳ 🎣 🎽 🎿 ⛸️ 🥇 🥈 🥉 🏆 🏅 🎗️ 🎫 🎟️ 🎭 🎨 🎬 🎤 🎧 🎼 🎹 🥁 🎷 🎺 🎸 🎻 🎲 🧩 🎯 🎳 🎮 🎰`.split(` `)},{label:`Dinge`,icon:`💡`,emojis:`⌚ 📱 💻 ⌨️ 🖥️ 🖨️ 🖱️ 💾 📷 📞 ☎️ 📺 ⏰ ⏳ 💡 🔦 🕯️ 💰 💳 🧾 ✉️ 📧 📨 📦 📝 📁 📂 📅 📆 📌 📎 ✂️ 🔒 🔑 🔨 🛠️ 🧰 🩺 💊 💉 🩹 🧯 🛒 🎁 🎈 🏠 🏥 🏫 🚗 🚌 🚲 ✈️ 🚀 🕐`.split(` `)},{label:`Symbole`,icon:`✅`,emojis:`✅ ☑️ ✔️ ❌ ❎ ➕ ➖ ❓ ❗ ‼️ ⁉️ 💤 ⚠️ 🚫 ⛔ 🔴 🟠 🟡 🟢 🔵 🟣 ⚫ ⚪ 🔶 🔷 ▶️ ⏸️ ⏹️ 🔄 🔁 🆗 🆕 🆒 🆘 ℹ️ 🔔 🔕 📣 💬 💭 🗯️ ♻️ ⬆️ ⬇️ ⬅️ ➡️`.split(` `)}],Tt={class:`ih:flex ih:border-b ih:px-1`,role:`tablist`,"aria-label":`Emoji-Gruppen`},Et=[`aria-selected`,`title`,`onClick`],Dt=[`aria-label`],Ot=[`aria-label`,`onClick`],kt={__name:`EmojiPicker`,emits:[`pick`],setup(e,{emit:t}){let r=t,i=_(0);return(e,t)=>(g(),o(`div`,null,[s(`div`,Tt,[(g(!0),o(n,null,v(S(wt),(e,t)=>(g(),o(`button`,{key:e.label,type:`button`,role:`tab`,"aria-selected":i.value===t,title:e.label,class:f([`ih:grid ih:size-9 ih:place-items-center ih:text-lg ih:transition-opacity`,i.value===t?`ih:border-b-2 ih:border-brand`:`ih:opacity-60 ih:hover:opacity-100`]),onClick:e=>i.value=t},x(e.icon),11,Et))),128))]),s(`div`,{class:`ih:grid ih:max-h-60 ih:grid-cols-8 ih:gap-0.5 ih:overflow-y-auto ih:p-2`,role:`tabpanel`,"aria-label":S(wt)[i.value].label},[(g(!0),o(n,null,v(S(wt)[i.value].emojis,e=>(g(),o(`button`,{key:e,type:`button`,class:`ih:grid ih:aspect-square ih:place-items-center ih:rounded ih:text-xl ih:hover:bg-accent`,"aria-label":e,onClick:t=>r(`pick`,e)},x(e),9,Ot))),128))],8,Dt)]))}},At={class:`ih:border-b ih:p-2`},jt={class:`ih:relative`},Mt={class:`ih:max-h-72 ih:overflow-y-auto ih:p-2`},Nt={key:0,class:`ih:grid ih:place-items-center ih:py-8`},Pt={key:1,class:`ih:columns-2 ih:gap-1.5`},Ft=[`title`,`onClick`],It=[`src`,`alt`],Lt={key:2,class:`ih:py-6 ih:text-center ih:text-sm ih:text-muted-foreground`},Rt={key:0,class:`ih:border-t ih:px-3 ih:py-1.5 ih:text-[10px] ih:text-muted-foreground`},zt={__name:`GifPicker`,emits:[`pick`],setup(e,{emit:t}){let r=t,i=_(``),c=_([]),u=_(!1),d=_(!1),f;async function m(){d.value=!0;try{let e=await X.gifs(i.value);c.value=e.gifs,u.value=e.giphy}finally{d.value=!1}}return T(i,()=>{clearTimeout(f),f=setTimeout(m,300)}),h(m),(e,t)=>(g(),o(`div`,null,[s(`div`,At,[s(`div`,jt,[l(S(q),{class:`ih:pointer-events-none ih:absolute ih:top-1/2 ih:left-2.5 ih:size-4 ih:-translate-y-1/2 ih:text-muted-foreground`}),D(s(`input`,{"onUpdate:modelValue":t[0]||=e=>i.value=e,type:`search`,placeholder:`GIFs suchen`,"aria-label":`GIFs suchen`,autofocus:``,class:`ih:h-9 ih:w-full ih:rounded-md ih:bg-muted ih:pr-3 ih:pl-8 ih:text-sm ih:focus-visible:outline-none`},null,512),[[w,i.value]])])]),s(`div`,Mt,[d.value&&!c.value.length?(g(),o(`div`,Nt,[l(S(K),{class:`ih:size-5 ih:animate-spin ih:text-muted-foreground`})])):c.value.length?(g(),o(`div`,Pt,[(g(!0),o(n,null,v(c.value,e=>(g(),o(`button`,{key:e.url,type:`button`,class:`ih:mb-1.5 ih:block ih:w-full ih:overflow-hidden ih:rounded ih:bg-muted ih:hover:ring-2 ih:hover:ring-brand`,title:e.title,onClick:t=>r(`pick`,e)},[s(`img`,{src:e.preview,alt:e.title,loading:`lazy`,class:`ih:block ih:w-full`,style:p(e.width&&e.height?{aspectRatio:`${e.width} / ${e.height}`}:{})},null,12,It)],8,Ft))),128))])):(g(),o(`p`,Lt,x(i.value?`Keine GIFs gefunden.`:`Noch keine GIFs in der Sammlung.`),1))]),u.value?(g(),o(`p`,Rt,`Mit Suche über GIPHY – Suchbegriffe gehen an GIPHY.`)):a(``,!0)]))}},Bt={__name:`Popup`,emits:[`close`],setup(e,{emit:t}){let n=t,r=_(null),i=e=>r.value&&!r.value.contains(e.target)&&!e.target.closest?.(`[data-popup-toggle]`)&&n(`close`),a=e=>e.key===`Escape`&&n(`close`);return h(()=>{document.addEventListener(`pointerdown`,i),document.addEventListener(`keydown`,a)}),m(()=>{document.removeEventListener(`pointerdown`,i),document.removeEventListener(`keydown`,a)}),(e,t)=>(g(),o(`div`,{ref_key:`root`,ref:r,class:`ih:absolute ih:bottom-full ih:left-0 ih:z-30 ih:mb-2 ih:w-[min(22rem,calc(100vw-2rem))] ih:overflow-hidden ih:rounded-lg ih:border ih:bg-popover ih:text-popover-foreground ih:shadow-lg`,role:`dialog`},[y(e.$slots,`default`)],512))}},Vt={class:`ih:border-t ih:bg-card ih:p-3`},Ht={key:0,class:`ih:mb-2 ih:flex ih:items-start ih:gap-2 ih:rounded-md ih:border-l-3 ih:border-brand ih:bg-muted ih:px-3 ih:py-1.5 ih:text-[13px]`},Ut={class:`ih:min-w-0 ih:flex-1`},Wt={class:`ih:block ih:font-semibold`},Gt={key:0,class:`ih:line-clamp-1 ih:text-muted-foreground`},Kt={key:1,class:`ih:mb-2 ih:flex ih:gap-2 ih:overflow-x-auto ih:pb-1`},qt=[`src`,`alt`],Jt={key:1,class:`ih:flex ih:h-16 ih:w-36 ih:items-center ih:gap-2 ih:rounded-md ih:border ih:bg-muted ih:px-2 ih:text-xs`},Yt={class:`ih:min-w-0`},Xt={class:`ih:block ih:truncate ih:font-medium`},Zt=[`aria-label`,`onClick`],Qt={class:`ih:relative ih:flex ih:items-end ih:gap-1`},$t=[`aria-expanded`],en=[`aria-expanded`],tn=[`placeholder`],nn=[`disabled`,`aria-label`],rn={class:`ih:mt-1.5 ih:hidden ih:text-[11px] ih:text-muted-foreground ih:sm:block`},an={__name:`Composer`,props:{replyTo:{type:Object,default:null},editing:{type:Object,default:null},maxUploadMb:{type:Number,default:25},sending:{type:Boolean,default:!1}},emits:[`send`,`save-edit`,`cancel`,`typing`],setup(e,{expose:t,emit:u}){let p=e,m=u,h=_(``),y=_([]),b=_(null),C=_(null),O=_(null),k=r(()=>!p.sending&&(h.value.trim()||y.value.length));T(()=>p.editing,e=>{h.value=e?.body??``,d(A)}),T(()=>p.replyTo,e=>e&&d(A));function A(){b.value?.focus(),j()}function j(){let e=b.value;e&&(e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,180)}px`)}let M=0;function N(){j(),Date.now()-M>3e3&&h.value.trim()&&(M=Date.now(),m(`typing`))}function P(e){for(let t of e){if(t.size>p.maxUploadMb*1024*1024){U.error(`„${t.name}“ ist größer als ${p.maxUploadMb} MB.`);continue}if(y.value.length>=10){U.error(`Höchstens 10 Dateien je Nachricht.`);break}y.value.push({file:t,url:t.type.startsWith(`image/`)?URL.createObjectURL(t):null})}A()}function F(e){let t=[...e.clipboardData?.files??[]];t.length&&(e.preventDefault(),P(t))}function I(e){let[t]=y.value.splice(e,1);t?.url&&URL.revokeObjectURL(t.url)}function L(){if(p.editing){h.value.trim()&&m(`save-edit`,h.value.trim());return}k.value&&(m(`send`,{body:h.value,files:y.value.map(e=>e.file)}),y.value.forEach(e=>e.url&&URL.revokeObjectURL(e.url)),y.value=[],h.value=``,d(j))}function R(e){e.key===`Enter`&&!e.shiftKey&&!e.isComposing&&(e.preventDefault(),L()),e.key===`Escape`&&(p.editing||p.replyTo)&&m(`cancel`)}function z(e){let t=b.value,n=t?.selectionStart??h.value.length,r=t?.selectionEnd??h.value.length;h.value=h.value.slice(0,n)+e+h.value.slice(r),d(()=>{t?.focus(),t?.setSelectionRange(n+e.length,n+e.length)})}function B(e){O.value=null,m(`send`,{gifUrl:e.url})}let V=e=>O.value=O.value===e?null:e;return t({addFiles:P,focus:A}),(t,r)=>(g(),o(`div`,Vt,[e.replyTo||e.editing?(g(),o(`div`,Ht,[e.editing?(g(),i(S(he),{key:0,class:`ih:mt-0.5 ih:size-3.5 ih:shrink-0 ih:text-brand-text`})):a(``,!0),s(`span`,Ut,[s(`span`,Wt,x(e.editing?`Nachricht bearbeiten`:`Antwort an ${e.replyTo.user?.name??``}`),1),e.replyTo?(g(),o(`span`,Gt,x(e.replyTo.body||(e.replyTo.gif_url?`GIF`:`Datei`)),1)):a(``,!0)]),s(`button`,{type:`button`,class:`ih:rounded ih:p-0.5 ih:text-muted-foreground ih:hover:text-foreground`,"aria-label":`Abbrechen`,onClick:r[0]||=e=>m(`cancel`)},[l(S(J),{class:`ih:size-4`})])])):a(``,!0),y.value.length?(g(),o(`ul`,Kt,[(g(!0),o(n,null,v(y.value,(e,t)=>(g(),o(`li`,{key:t,class:`ih:relative ih:shrink-0`},[e.url?(g(),o(`img`,{key:0,src:e.url,alt:e.file.name,class:`ih:size-16 ih:rounded-md ih:border ih:object-cover`},null,8,qt)):(g(),o(`span`,Jt,[l(S(ce),{class:`ih:size-5 ih:shrink-0 ih:text-muted-foreground`}),s(`span`,Yt,[s(`span`,Xt,x(e.file.name),1),c(x(S(rt)(e.file.size)),1)])])),s(`button`,{type:`button`,class:`ih:absolute ih:-top-1.5 ih:-right-1.5 ih:grid ih:size-5 ih:place-items-center ih:rounded-full ih:bg-foreground ih:text-background`,"aria-label":`${e.file.name} entfernen`,onClick:e=>I(t)},[l(S(J),{class:`ih:size-3`})],8,Zt)]))),128))])):a(``,!0),s(`div`,Qt,[O.value===`emoji`?(g(),i(Bt,{key:0,onClose:r[1]||=e=>O.value=null},{default:E(()=>[l(kt,{onPick:z})]),_:1})):a(``,!0),O.value===`gif`?(g(),i(Bt,{key:1,onClose:r[2]||=e=>O.value=null},{default:E(()=>[l(zt,{onPick:B})]),_:1})):a(``,!0),e.editing?a(``,!0):(g(),o(n,{key:2},[s(`button`,{type:`button`,"data-popup-toggle":``,class:f([`ih:grid ih:size-10 ih:shrink-0 ih:place-items-center ih:rounded-full ih:text-muted-foreground ih:hover:bg-muted ih:hover:text-foreground`,{"ih:bg-muted ih:text-foreground":O.value===`emoji`}]),"aria-label":`Emoji einfügen`,"aria-expanded":O.value===`emoji`,onClick:r[3]||=e=>V(`emoji`)},[l(S(se),{class:`ih:size-5`})],10,$t),s(`button`,{type:`button`,"data-popup-toggle":``,class:f([`ih:grid ih:h-10 ih:shrink-0 ih:place-items-center ih:rounded-full ih:px-2 ih:text-xs ih:font-bold ih:text-muted-foreground ih:hover:bg-muted ih:hover:text-foreground`,{"ih:bg-muted ih:text-foreground":O.value===`gif`}]),"aria-label":`GIF senden`,"aria-expanded":O.value===`gif`,onClick:r[4]||=e=>V(`gif`)},`GIF`,10,en),s(`button`,{type:`button`,class:`ih:grid ih:size-10 ih:shrink-0 ih:place-items-center ih:rounded-full ih:text-muted-foreground ih:hover:bg-muted ih:hover:text-foreground`,"aria-label":`Datei anhängen`,onClick:r[5]||=e=>C.value?.click()},[l(S(me),{class:`ih:size-5`})]),s(`input`,{ref_key:`fileInput`,ref:C,type:`file`,multiple:``,class:`ih:hidden`,onChange:r[6]||=e=>{P([...e.target.files]),e.target.value=``}},null,544)],64)),D(s(`textarea`,{ref_key:`input`,ref:b,"onUpdate:modelValue":r[7]||=e=>h.value=e,rows:`1`,maxlength:`5000`,placeholder:e.editing?`Nachricht bearbeiten`:`Nachricht schreiben`,"aria-label":`Nachricht`,class:`ih:max-h-[180px] ih:min-h-10 ih:flex-1 ih:resize-none ih:rounded-2xl ih:border ih:border-input ih:bg-background ih:px-4 ih:py-2 ih:text-[15px] ih:leading-snug ih:focus-visible:ring-3 ih:focus-visible:ring-ring/30 ih:focus-visible:outline-none`,onInput:N,onKeydown:R,onPaste:F},null,40,tn),[[w,h.value]]),s(`button`,{type:`button`,class:`ih:grid ih:size-10 ih:shrink-0 ih:place-items-center ih:rounded-full ih:bg-brand ih:text-brand-foreground ih:transition-opacity ih:disabled:opacity-40`,disabled:e.editing?!h.value.trim():!k.value,"aria-label":e.editing?`Speichern`:`Senden`,onClick:L},[e.sending?(g(),i(S(K),{key:0,class:`ih:size-5 ih:animate-spin`})):(g(),i(S(ge),{key:1,class:`ih:size-5`}))],8,nn)]),s(`p`,rn,[r[8]||=s(`kbd`,{class:`ih:font-sans`},`Enter`,-1),r[9]||=c(` senden · `,-1),r[10]||=s(`kbd`,{class:`ih:font-sans`},`Umschalt + Enter`,-1),r[11]||=c(` neue Zeile · Bilder lassen sich auch einfügen oder hierher ziehen `,-1),l(S(le),{class:`ih:inline ih:size-3`})])]))}},on={key:0,class:`ih:my-3 ih:text-center`},sn={class:`ih:inline-block ih:rounded-full ih:bg-muted ih:px-3 ih:py-1 ih:text-xs ih:text-muted-foreground`},cn=[`id`],ln={key:0,class:`ih:w-8 ih:shrink-0`},un={key:0,class:`ih:mb-0.5 ih:px-3 ih:text-xs ih:font-medium ih:text-muted-foreground`},dn={key:0,class:`ih:rounded-2xl ih:border ih:border-dashed ih:px-3 ih:py-2 ih:text-sm ih:text-muted-foreground ih:italic`},fn={class:`ih:block ih:font-semibold`},pn={class:`ih:line-clamp-2 ih:opacity-80`},mn=[`src`],hn=[`href`,`title`],gn=[`src`,`alt`],_n=[`href`],vn={class:`ih:min-w-0 ih:flex-1`},yn={class:`ih:block ih:truncate ih:text-sm ih:font-medium`},bn={class:`ih:block ih:text-xs ih:opacity-75`},xn=[`href`],Sn={key:2,class:`ih:flex ih:shrink-0 ih:items-center ih:opacity-0 ih:transition-opacity ih:group-hover:opacity-100 ih:focus-within:opacity-100 ih:[@media(hover:none)]:opacity-100`},Cn={class:`ih:group/react ih:relative`},wn={type:`button`,class:`ih:grid ih:size-7 ih:place-items-center ih:rounded-full ih:text-muted-foreground ih:hover:bg-muted`,"aria-label":`Reagieren`},Tn=[`aria-label`,`onClick`],En={key:1,class:`ih:relative ih:z-10 ih:-mt-1.5 ih:flex ih:flex-wrap ih:gap-1 ih:px-2`},Dn=[`aria-pressed`,`aria-label`,`onClick`],On={class:`ih:text-sm`},kn={class:`ih:mt-0.5 ih:px-1 ih:text-[11px] ih:text-muted-foreground ih:tabular-nums`},An={__name:`MessageBubble`,props:{message:{type:Object,required:!0},showAuthor:{type:Boolean,default:!0},showAvatar:{type:Boolean,default:!0},group:{type:Boolean,default:!1},reactions:{type:Array,required:!0},read:{type:Boolean,default:!1}},emits:[`react`,`reply`,`edit`,`delete`,`jump`],setup(e,{emit:t}){let u=e,d=t,m=r(()=>u.message),h=r(()=>!m.value.attachments.length&&!m.value.reply_to&&at(m.value.body)),_=r(()=>m.value.attachments.filter(e=>e.image)),y=r(()=>m.value.attachments.filter(e=>!e.image));return(t,r)=>m.value.kind===`system`?(g(),o(`div`,on,[s(`span`,sn,x(m.value.body),1)])):(g(),o(`div`,{key:1,id:`nachricht-${m.value.id}`,class:f([`ih:group ih:flex ih:items-end ih:gap-2`,[m.value.mine?`ih:flex-row-reverse`:``,e.showAuthor?`ih:mt-3`:`ih:mt-0.5`]])},[e.group&&!m.value.mine?(g(),o(`div`,ln,[e.showAvatar&&m.value.user?(g(),i(S(V),{key:0,person:m.value.user,class:`ih:size-8 ih:text-[11px]`},null,8,[`person`])):a(``,!0)])):a(``,!0),s(`div`,{class:f([`ih:flex ih:max-w-[min(34rem,80%)] ih:min-w-0 ih:flex-col`,m.value.mine?`ih:items-end`:`ih:items-start`])},[e.group&&!m.value.mine&&e.showAuthor?(g(),o(`span`,un,x(m.value.user?.name??`Gelöschtes Konto`),1)):a(``,!0),s(`div`,{class:f([`ih:relative ih:flex ih:items-center ih:gap-1`,m.value.mine?`ih:flex-row-reverse`:``])},[m.value.deleted?(g(),o(`div`,dn,`Nachricht gelöscht`)):(g(),o(`div`,{key:1,class:f([`ih:min-w-0 ih:overflow-hidden ih:text-[15px] ih:leading-snug`,h.value||m.value.kind===`gif`?``:[m.value.mine?`ih:rounded-2xl ih:rounded-br-md ih:bg-brand ih:text-brand-foreground`:`ih:rounded-2xl ih:rounded-bl-md ih:border ih:bg-card`,_.value.length&&!m.value.body?``:`ih:px-3 ih:py-2`]])},[m.value.reply_to?(g(),o(`button`,{key:0,type:`button`,class:f([`ih:mb-1.5 ih:block ih:w-full ih:rounded-md ih:border-l-3 ih:px-2 ih:py-1 ih:text-left ih:text-[13px]`,m.value.mine?`ih:border-white/60 ih:bg-white/15`:`ih:border-brand ih:bg-muted`]),onClick:r[0]||=e=>d(`jump`,m.value.reply_to.id)},[s(`span`,fn,x(m.value.reply_to.name),1),s(`span`,pn,x(m.value.reply_to.text),1)],2)):a(``,!0),m.value.kind===`gif`?(g(),o(`img`,{key:1,src:m.value.gif_url,alt:`GIF`,loading:`lazy`,class:`ih:max-h-60 ih:rounded-2xl`},null,8,mn)):a(``,!0),_.value.length?(g(),o(`div`,{key:2,class:f([`ih:grid ih:gap-0.5`,_.value.length>1?`ih:grid-cols-2`:``])},[(g(!0),o(n,null,v(_.value,e=>(g(),o(`a`,{key:e.id,href:e.url,target:`_blank`,rel:`noopener`,class:`ih:block ih:overflow-hidden ih:bg-muted`,title:e.name},[s(`img`,{src:e.url,alt:e.name,loading:`lazy`,class:`ih:block ih:max-h-72 ih:w-full ih:object-cover`,style:p(e.width?{aspectRatio:`${e.width} / ${e.height}`}:{})},null,12,gn)],8,hn))),128))],2)):a(``,!0),(g(!0),o(n,null,v(y.value,e=>(g(),o(`a`,{key:e.id,href:e.url,class:f([`ih:my-1 ih:flex ih:items-center ih:gap-2.5 ih:rounded-lg ih:p-2 ih:no-underline`,m.value.mine?`ih:bg-white/15 ih:hover:bg-white/25`:`ih:bg-muted ih:hover:bg-accent`])},[l(S(R),{extension:e.name.split(`.`).pop(),class:`ih:shrink-0`},null,8,[`extension`]),s(`span`,vn,[s(`span`,yn,x(e.name),1),s(`span`,bn,x(S(rt)(e.size)),1)]),l(S(ie),{class:`ih:size-4 ih:shrink-0 ih:opacity-75`})],10,_n))),128)),m.value.body?(g(),o(`p`,{key:3,class:f([`ih:break-words ih:whitespace-pre-wrap`,[h.value?`ih:text-4xl ih:leading-tight`:``,_.value.length?`ih:px-3 ih:py-2`:``]])},[(g(!0),o(n,null,v(S(it)(m.value.body),(e,t)=>(g(),o(n,{key:t},[e.href?(g(),o(`a`,{key:0,href:e.href,target:`_blank`,rel:`noopener noreferrer`,class:`ih:underline ih:underline-offset-2`},x(e.text),9,xn)):(g(),o(n,{key:1},[c(x(e.text),1)],64))],64))),128))],2)):a(``,!0)],2)),m.value.deleted?a(``,!0):(g(),o(`div`,Sn,[s(`div`,Cn,[s(`button`,wn,[l(S(oe),{class:`ih:size-4`})]),s(`div`,{class:f([`ih:absolute ih:bottom-full ih:z-20 ih:hidden ih:gap-0.5 ih:rounded-full ih:border ih:bg-popover ih:p-1 ih:shadow-md ih:group-focus-within/react:flex ih:group-hover/react:flex`,m.value.mine?`ih:right-0`:`ih:left-0`])},[(g(!0),o(n,null,v(e.reactions,e=>(g(),o(`button`,{key:e,type:`button`,class:`ih:grid ih:size-8 ih:place-items-center ih:rounded-full ih:text-lg ih:hover:bg-accent`,"aria-label":`Mit ${e} reagieren`,onClick:t=>d(`react`,e)},x(e),9,Tn))),128))],2)]),s(`button`,{type:`button`,class:`ih:grid ih:size-7 ih:place-items-center ih:rounded-full ih:text-muted-foreground ih:hover:bg-muted`,"aria-label":`Antworten`,onClick:r[1]||=e=>d(`reply`)},[l(S(W),{class:`ih:size-4`})]),m.value.mine?(g(),o(n,{key:0},[m.value.body&&m.value.kind===`text`?(g(),o(`button`,{key:0,type:`button`,class:`ih:grid ih:size-7 ih:place-items-center ih:rounded-full ih:text-muted-foreground ih:hover:bg-muted`,"aria-label":`Bearbeiten`,onClick:r[2]||=e=>d(`edit`)},[l(S(he),{class:`ih:size-4`})])):a(``,!0),s(`button`,{type:`button`,class:`ih:grid ih:size-7 ih:place-items-center ih:rounded-full ih:text-muted-foreground ih:hover:bg-muted ih:hover:text-destructive`,"aria-label":`Löschen`,onClick:r[3]||=e=>d(`delete`)},[l(S(_e),{class:`ih:size-4`})])],64)):a(``,!0)]))],2),m.value.reactions.length?(g(),o(`div`,En,[(g(!0),o(n,null,v(m.value.reactions,e=>(g(),o(`button`,{key:e.emoji,type:`button`,class:f([`ih:flex ih:items-center ih:gap-1 ih:rounded-full ih:border ih:px-1.5 ih:text-xs ih:shadow-xs ih:tabular-nums`,e.mine?`ih:border-brand ih:bg-brand-soft`:`ih:bg-card`]),"aria-pressed":e.mine,"aria-label":`${e.emoji} ${e.count}`,onClick:t=>d(`react`,e.emoji)},[s(`span`,On,x(e.emoji),1),c(x(e.count>1?e.count:``),1)],10,Dn))),128))])):a(``,!0),s(`span`,kn,[c(x(S(tt)(m.value.created_at)),1),m.value.edited?(g(),o(n,{key:0},[c(` · bearbeitet`)],64)):a(``,!0),m.value.mine&&e.read?(g(),o(n,{key:1},[c(` · gelesen`)],64)):a(``,!0)])],2)],10,cn))}},jn=[`aria-label`],Mn={class:`ih:flex ih:items-center ih:gap-3 ih:border-b ih:px-3 ih:py-2.5`},Nn={class:`ih:min-w-0 ih:flex-1`},Pn={class:`ih:flex ih:items-center ih:gap-1.5 ih:truncate ih:font-semibold`},Fn=[`href`],In={key:1,class:`ih:truncate`},Ln=[`aria-label`],Rn={key:0,class:`ih:grid ih:h-full ih:place-items-center`},zn={key:0,class:`ih:flex ih:justify-center ih:py-2`},Bn={key:1,class:`ih:py-10 ih:text-center ih:text-sm ih:text-muted-foreground`},Vn={key:0,class:`ih:my-4 ih:flex ih:justify-center`},Hn={class:`ih:rounded-full ih:bg-card ih:px-3 ih:py-1 ih:text-xs ih:font-medium ih:text-muted-foreground ih:shadow-xs`},Un={key:1,class:`ih:my-3 ih:flex ih:items-center ih:gap-3 ih:text-xs ih:font-semibold ih:text-brand-text`},Wn={key:1,class:`ih:pointer-events-none ih:absolute ih:inset-2 ih:z-20 ih:grid ih:place-items-center ih:rounded-xl ih:border-2 ih:border-dashed ih:border-brand ih:bg-brand-soft/80 ih:text-brand-text`},Gn={class:`ih:flex ih:items-center ih:gap-2 ih:font-medium`},Kn={__name:`Thread`,props:{conversation:{type:Object,required:!0},me:{type:Object,required:!0},reactions:{type:Array,required:!0},maxUploadMb:{type:Number,default:25},typing:{type:Array,default:()=>[]}},emits:[`back`,`info`,`changed`,`read`],setup(e,{expose:t,emit:u}){let p=e,m=u,y=_([]),b=_(!1),C=_(!0),w=_(!1),E=_(!1),D=_(null),O=_(null),A=_(null),j=_(null),M=_(!0),N=_(0),P=_(!1),F=_(null),I=r(()=>p.conversation.type===`group`),L=()=>y.value.at(-1)?.id??0,R=r(()=>[...y.value].reverse().find(e=>e.mine&&!e.deleted&&e.kind!==`system`)?.id);async function z(){C.value=!0,y.value=[],D.value=O.value=null;try{let e=await X.messages(p.conversation.id);y.value=e.messages,b.value=e.more;let t=p.conversation.last_read_id??0;F.value=p.conversation.unread?e.messages.find(e=>e.id>t&&!e.mine&&e.kind!==`system`)?.id??null:null}finally{C.value=!1,await d(),V(F.value?document.getElementById(`nachricht-${F.value}`):null),W(),j.value?.focus()}}async function B(){if(!b.value||w.value||!y.value.length)return;w.value=!0;let e=A.value,t=e.scrollHeight;try{let n=await X.messages(p.conversation.id,y.value[0].id);y.value=[...n.messages,...y.value],b.value=n.more,await d(),e.scrollTop=e.scrollHeight-t}finally{w.value=!1}}function V(e){let t=A.value;t&&(e?e.scrollIntoView({block:`center`}):t.scrollTop=t.scrollHeight,N.value=0)}function ee(){let e=A.value;M.value=e.scrollHeight-e.scrollTop-e.clientHeight<80,M.value&&(N.value=0,W()),e.scrollTop<120&&B()}let H;function W(){clearTimeout(H),H=setTimeout(async()=>{if(![...y.value].reverse().find(e=>!e.mine)||document.visibilityState!==`visible`||!M.value||!p.conversation.unread)return;let e=await X.read(p.conversation.id,L());m(`read`,{id:p.conversation.id,unread:e.unread})},400)}async function G(e){let t=e.filter(e=>e.conversation_id===p.conversation.id);if(!t.length)return;let n=new Map(y.value.map(e=>[e.id,e])),r=0;for(let e of t)n.has(e.id)?Object.assign(n.get(e.id),e):e.id>L()&&(y.value.push(e),r+=+!e.mine);if(!r)return;let i=M.value;await d(),i?(V(),W()):N.value+=r}async function ie(e){E.value=!0;try{let{message:t}=await X.send(p.conversation.id,{...e,replyTo:D.value?.id});D.value=null,y.value.some(e=>e.id===t.id)||y.value.push(t),await d(),V(),m(`changed`)}catch(e){U.error(e.message)}finally{E.value=!1}}async function ae(e){let t=O.value;try{await X.edit(t.id,e),Object.assign(t,{body:e,edited:!0}),O.value=null}catch(e){U.error(e.message)}}async function oe(e){window.confirm(`Nachricht für alle löschen?`)&&(await X.remove(e.id),Object.assign(e,{deleted:!0,body:null,gif_url:null,attachments:[],reactions:[]}),m(`changed`))}async function se(e,t){let n=e.reactions.find(e=>e.emoji===t);n?.mine?(n.count--,n.mine=!1,e.reactions=e.reactions.filter(e=>e.count>0)):n?(n.count++,n.mine=!0):e.reactions.push({emoji:t,count:1,mine:!0}),await X.react(e.id,t).catch(e=>U.error(e.message))}function ce(e){let t=document.getElementById(`nachricht-${e}`);t&&(t.scrollIntoView({block:`center`,behavior:`smooth`}),t.classList.add(`ih:animate-pulse`),setTimeout(()=>t.classList.remove(`ih:animate-pulse`),1500))}function le(e){P.value=!1;let t=[...e.dataTransfer?.files??[]];t.length&&j.value?.addFiles(t)}let de=(e,t)=>{let n=y.value[t-1];return!n||n.kind===`system`||n.user?.id!==e.user?.id||!$(n.created_at,e.created_at)||new Date(e.created_at)-new Date(n.created_at)>3e5},fe=(e,t)=>{let n=y.value[t+1];return!n||n.kind===`system`||n.user?.id!==e.user?.id||!$(n.created_at,e.created_at)},pe=r(()=>p.typing.length?`${p.typing.join(`, `)} ${p.typing.length===1?`schreibt`:`schreiben`} …`:I.value?p.conversation.members.map(e=>e.first_name||e.name).join(`, `):p.conversation.person?.job_title??``);return T(()=>p.conversation.id,z),h(z),t({merge:G,lastId:L}),(t,r)=>(g(),o(`section`,{class:`ih:relative ih:flex ih:h-full ih:min-h-0 ih:flex-col`,"aria-label":`Gespräch mit ${e.conversation.name}`,onDragover:r[5]||=k(e=>P.value=!0,[`prevent`]),onDragleave:r[6]||=k(e=>P.value=!1,[`self`]),onDrop:k(le,[`prevent`])},[s(`header`,Mn,[s(`button`,{type:`button`,class:`ih:grid ih:size-9 ih:place-items-center ih:rounded-md ih:text-muted-foreground ih:hover:bg-accent ih:lg:hidden`,"aria-label":`Zurück zur Übersicht`,onClick:r[0]||=e=>m(`back`)},[l(S(ne),{class:`ih:size-5`})]),l(Ye,{conversation:e.conversation},null,8,[`conversation`]),s(`div`,Nn,[s(`h2`,Pn,[e.conversation.person?(g(),o(`a`,{key:0,href:`/personen/${e.conversation.person.id}`,class:`ih:truncate ih:hover:underline`},x(e.conversation.name),9,Fn)):(g(),o(`span`,In,x(e.conversation.name),1)),e.conversation.muted?(g(),i(S(re),{key:2,class:`ih:size-3.5 ih:shrink-0 ih:text-muted-foreground`,"aria-label":`Stummgeschaltet`})):a(``,!0)]),s(`p`,{class:f([`ih:truncate ih:text-xs`,e.typing.length?`ih:text-brand-text`:`ih:text-muted-foreground`]),"aria-live":`polite`},x(pe.value),3)]),s(`button`,{type:`button`,class:`ih:grid ih:size-9 ih:place-items-center ih:rounded-md ih:text-muted-foreground ih:hover:bg-accent`,"aria-label":I.value?`Gruppe: Mitglieder und Einstellungen`:`Einstellungen zum Gespräch`,onClick:r[1]||=e=>m(`info`)},[l(S(ue),{class:`ih:size-5`})],8,Ln)]),s(`div`,{ref_key:`scroller`,ref:A,class:`ih:min-h-0 ih:flex-1 ih:overflow-y-auto ih:bg-muted/30 ih:px-3 ih:py-4 ih:sm:px-5`,role:`log`,"aria-live":`polite`,"aria-relevant":`additions`,onScrollPassive:ee},[C.value?(g(),o(`div`,Rn,[l(S(K),{class:`ih:size-6 ih:animate-spin ih:text-muted-foreground`})])):(g(),o(n,{key:1},[w.value?(g(),o(`div`,zn,[l(S(K),{class:`ih:size-4 ih:animate-spin ih:text-muted-foreground`})])):a(``,!0),y.value.length?a(``,!0):(g(),o(`p`,Bn,`Schreiben Sie die erste Nachricht.`)),(g(!0),o(n,null,v(y.value,(t,i)=>(g(),o(n,{key:t.id},[i===0||!S($)(y.value[i-1].created_at,t.created_at)?(g(),o(`div`,Vn,[s(`span`,Hn,x(S(nt)(t.created_at)),1)])):a(``,!0),t.id===F.value?(g(),o(`div`,Un,[...r[7]||=[s(`span`,{class:`ih:h-px ih:flex-1 ih:bg-brand/40`},null,-1),c(`Neu`,-1),s(`span`,{class:`ih:h-px ih:flex-1 ih:bg-brand/40`},null,-1)]])):a(``,!0),l(An,{message:t,group:I.value,"show-author":de(t,i),"show-avatar":fe(t,i),reactions:e.reactions,read:t.id===R.value&&!!e.conversation.others_read_id&&e.conversation.others_read_id>=t.id,onReact:e=>se(t,e),onReply:e=>{D.value=t,O.value=null},onEdit:e=>{O.value=t,D.value=null},onDelete:e=>oe(t),onJump:ce},null,8,[`message`,`group`,`show-author`,`show-avatar`,`reactions`,`read`,`onReact`,`onReply`,`onEdit`,`onDelete`])],64))),128))],64))],544),N.value?(g(),o(`button`,{key:0,type:`button`,class:`ih:absolute ih:bottom-28 ih:left-1/2 ih:z-10 ih:flex ih:-translate-x-1/2 ih:items-center ih:gap-1.5 ih:rounded-full ih:bg-brand ih:px-3 ih:py-1.5 ih:text-xs ih:font-medium ih:text-brand-foreground ih:shadow-lg`,onClick:r[2]||=e=>{V(),W()}},[l(S(te),{class:`ih:size-3.5`}),c(` `+x(N.value)+` `+x(N.value===1?`neue Nachricht`:`neue Nachrichten`),1)])):a(``,!0),l(an,{ref_key:`composer`,ref:j,"reply-to":D.value,editing:O.value,sending:E.value,"max-upload-mb":e.maxUploadMb,onSend:ie,onSaveEdit:ae,onCancel:r[3]||=e=>{D.value=null,O.value=null},onTyping:r[4]||=t=>S(X).typing(e.conversation.id).catch(()=>{})},null,8,[`reply-to`,`editing`,`sending`,`max-upload-mb`]),P.value?(g(),o(`div`,Wn,[s(`span`,Gn,[l(S(ve),{class:`ih:size-5`}),r[8]||=c(` Dateien hier ablegen`,-1)])])):a(``,!0)],40,jn))}},qn=`modulepreload`,Jn=function(e,t){return new URL(e,t).href},Yn={},Xn=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Jn(t,n),t=s(t),t in Yn)return;Yn[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:qn,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function Zn({realtime:t,userId:n,openId:r,lastId:i,onUpdate:a}){let o=null,s=null,c=!1,l=!1,u=null,d=()=>{let e=document.visibilityState===`visible`;return u?.connection?.state===`connected`?e?2e4:6e4:e?document.hasFocus()?3e3:6e3:3e4};async function f(){if(!(c||l)){c=!0,clearTimeout(s);try{let e=await X.updates({seit:o,offen:r(),nach:i()});o=e.cursor,a(e)}catch{}finally{c=!1,l||(s=setTimeout(f,d()))}}}let p=()=>document.visibilityState===`visible`&&f();return document.addEventListener(`visibilitychange`,p),window.addEventListener(`focus`,p),t&&Xn(async()=>{let{default:t}=await import(`../chunks/pusher-DXDYBH7H.js`).then(t=>e(t.default,1));return{default:t}},__vite__mapDeps([0,1]),import.meta.url).then(({default:e})=>{l||(u=new e(t.key,{cluster:t.cluster,...t.host?{wsHost:t.host,wsPort:t.port,wssPort:t.port,forceTLS:t.tls,enabledTransports:[`ws`,`wss`]}:{},channelAuthorization:{endpoint:`/chat/api/echtzeit/anmelden`,headers:{"X-XSRF-TOKEN":decodeURIComponent(document.cookie.match(/(?:^|; )XSRF-TOKEN=([^;]*)/)?.[1]??``),Accept:`application/json`}}}),u.subscribe(`private-chat-user-${n}`).bind(`update`,()=>f()))}).catch(()=>{}),f(),{now:f,reset(){o=null,f()},stop(){l=!0,clearTimeout(s),document.removeEventListener(`visibilitychange`,p),window.removeEventListener(`focus`,p),u?.disconnect()}}}var Qn={class:`ih:-mx-4 ih:-my-6 ih:flex ih:h-[calc(100dvh-4rem)] ih:overflow-hidden ih:border-y ih:bg-card ih:lg:mx-0 ih:lg:my-0 ih:lg:h-[calc(100dvh-8.5rem)] ih:lg:rounded-xl ih:lg:border ih:lg:shadow-xs`},$n={key:1,class:`ih:grid ih:h-full ih:place-items-center ih:p-8 ih:text-center`},er={__name:`Index`,props:{me:{type:Object,required:!0},conversations:{type:Array,required:!0},activeId:{type:Number,default:null},canCreateGroups:{type:Boolean,default:!1},realtime:{type:Object,default:null},reactions:{type:Array,required:!0},maxUploadMb:{type:Number,default:25}},setup(e){let t=e,n=_(t.conversations),c=_(t.activeId),u=_([]),d=_(null),p=_(null),v=_(!1),y=r(()=>n.value.find(e=>e.id===c.value)??null);function b(e,t=!0){c.value=e,u.value=[],t&&location.pathname!==`/chat/${e??``}`.replace(/\/$/,``)&&history.pushState({chat:e},``,e?`/chat/${e}`:`/chat`),w?.now()}let x=()=>b(Number(location.pathname.split(`/`)[2])||null,!1);function C(e){e&&(n.value=e,Z(e.reduce((e,t)=>e+(t.muted?0:t.unread),0)))}let w=null;h(()=>{window.addEventListener(`popstate`,x),w=Zn({realtime:t.realtime,userId:t.me.id,openId:()=>c.value,lastId:()=>d.value?.lastId()??0,onUpdate(e){C(e.conversations),u.value=e.typing??[],d.value?.merge(e.messages??[]),Z(e.unread)}})}),m(()=>{window.removeEventListener(`popstate`,x),w?.stop()});function T(e){C(e.conversations),b(e.id)}async function D(){C((await X.conversations()).conversations)}function O({id:e,unread:t}){let r=n.value.find(t=>t.id===e);r&&(r.unread=0),Z(t)}return(t,r)=>(g(),i(S(A),{title:`Nachrichten`},{default:E(()=>[s(`div`,Qn,[s(`aside`,{class:f([`ih:w-full ih:shrink-0 ih:border-r ih:lg:block ih:lg:w-80 ih:xl:w-96`,y.value?`ih:hidden`:`ih:block`])},[l(vt,{conversations:n.value,"active-id":c.value,"can-create-groups":e.canCreateGroups,onOpen:b,onNewChat:r[0]||=e=>p.value=`chat`,onNewGroup:r[1]||=e=>p.value=`group`},null,8,[`conversations`,`active-id`,`can-create-groups`])],2),s(`main`,{class:f([`ih:min-w-0 ih:flex-1 ih:lg:block`,y.value?`ih:block`:`ih:hidden`])},[y.value?(g(),i(Kn,{key:0,ref_key:`thread`,ref:d,conversation:y.value,me:e.me,reactions:e.reactions,typing:u.value,"max-upload-mb":e.maxUploadMb,onBack:r[2]||=e=>b(null),onInfo:r[3]||=e=>v.value=!0,onChanged:D,onRead:O},null,8,[`conversation`,`me`,`reactions`,`typing`,`max-upload-mb`])):(g(),o(`div`,$n,[s(`div`,null,[l(S(pe),{class:`ih:mx-auto ih:size-12 ih:text-muted-foreground/60`,"stroke-width":1.5}),r[7]||=s(`p`,{class:`ih:mt-3 ih:font-medium`},`Wählen Sie ein Gespräch`,-1),r[8]||=s(`p`,{class:`ih:mt-1 ih:text-sm ih:text-muted-foreground`},`oder beginnen Sie eine neue Nachricht.`,-1)])]))],2)]),l(Ct,{open:p.value!==null,group:p.value===`group`,me:e.me,"onUpdate:open":r[4]||=e=>!e&&(p.value=null),onCreated:T},null,8,[`open`,`group`,`me`]),y.value?(g(),i(Je,{key:0,open:v.value,"onUpdate:open":r[5]||=e=>v.value=e,conversation:y.value,me:e.me,onUpdated:C,onLeft:r[6]||=e=>b(null)},null,8,[`open`,`conversation`,`me`])):a(``,!0)]),_:1}))}};export{er as default}; \ No newline at end of file diff --git a/inhaus-sdk/theme.css b/inhaus-sdk/theme.css new file mode 100644 index 0000000..8e14bdf --- /dev/null +++ b/inhaus-sdk/theme.css @@ -0,0 +1,63 @@ +/* + * Automatisch erzeugt (scripts/generate-sdk-shims.mjs) – Design-Tokens des Portals. + * In der style.css eines Plugins: @import "../../inhaus-sdk/theme.css"; + * Farben, Ecken und Schrift folgen so dem Erscheinungsbild der Installation. + * + * Tailwind-Klassen in Plugins tragen das Präfix „ih:“ (z. B. ih:grid, ih:lg:grid-cols-2, ih:bg-brand). + * So kann das CSS eines Plugins nie die Klassen des Portals überschreiben. + * Nur Hilfsklassen – Grundstile (Preflight) bringt das Portal selbst mit. + */ +@import "tailwindcss/theme" layer(theme) prefix(ih); +@import "tailwindcss/utilities" layer(utilities); +@custom-variant dark (&:is(.dark *)); + +@theme inline { + --font-sans: var(--font-body); + + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) * 1.5); + --radius-2xl: calc(var(--radius) * 2); + /* „Pille“: voll gerundet – außer bei „Eckig“ im Erscheinungsbild (dann 0) */ + --radius-pill: calc(var(--radius) * 1000); + + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + + --color-brand: var(--brand); + --color-brand-foreground: var(--brand-foreground); + --color-brand-text: var(--brand-text); + --color-accent2: var(--accent2); + --color-accent2-foreground: var(--accent2-foreground); + --color-accent2-text: var(--accent2-text); + --color-brand-soft: var(--brand-soft); + --color-brand-soft-foreground: var(--brand-soft-foreground); + --color-brand-50: var(--brand-50); + --color-brand-100: var(--brand-100); + --color-brand-200: var(--brand-200); + --color-brand-300: var(--brand-300); + --color-brand-400: var(--brand-400); + --color-brand-500: var(--brand-500); + --color-brand-600: var(--brand-600); + --color-brand-700: var(--brand-700); + --color-brand-800: var(--brand-800); + --color-brand-900: var(--brand-900); + --color-brand-950: var(--brand-950); +} diff --git a/inhaus-sdk/vite.js b/inhaus-sdk/vite.js new file mode 100644 index 0000000..694892c --- /dev/null +++ b/inhaus-sdk/vite.js @@ -0,0 +1,127 @@ +/** + * Vite-Voreinstellung für Inhaus-Plugins (Plugin-SDK). + * + * // vite.config.js im Plugin + * import { defineConfig } from 'vite'; + * import { inhausPlugin } from './inhaus-sdk/vite.js'; + * export default defineConfig(inhausPlugin()); + * + * Baut jede Vue-Datei unter resources/js/{pages,widgets,blocks,profile,profile-panels,editorial,header}/ + * als eigenes ES-Modul nach dist/ und schreibt dist/inhaus.json. Vue, Inertia und @inhaus/ui + * bleiben extern – das Portal stellt sie per Import Map bereit. + */ +import { existsSync, globSync } from 'node:fs'; +import { resolve } from 'node:path'; +import postcss from 'postcss'; +import vue from '@vitejs/plugin-vue'; +import tailwindcss from '@tailwindcss/vite'; + +export const KINDS = ['pages', 'widgets', 'blocks', 'profile', 'profile-panels', 'editorial', 'header']; +export const EXTERNAL = ['vue', '@inertiajs/vue3', '@inhaus/ui']; + +export function inhausPlugin({ root = process.cwd() } = {}) { + const input = {}; + + for (const kind of KINDS) { + for (const file of globSync(`resources/js/${kind}/**/*.vue`, { cwd: root })) { + const name = file.replace(`resources/js/${kind}/`, '').replace(/\.vue$/, ''); + input[`${kind}/${name}`] = resolve(root, file); + } + } + + if (existsSync(resolve(root, 'resources/css/style.css'))) { + input.style = resolve(root, 'resources/css/style.css'); + } + + if (Object.keys(input).length === 0) { + throw new Error('Keine Oberfläche gefunden: Vue-Dateien gehören nach resources/js//.'); + } + + return { + plugins: [vue(), tailwindcss(), manifest(Object.keys(input)), strongerVariants()], + // Plugins laufen unter /plugin-assets/// – Pfade relativ halten + base: './', + build: { + outDir: 'dist', + emptyOutDir: true, + target: 'es2022', + rollupOptions: { + input, + external: EXTERNAL, + preserveEntrySignatures: 'strict', + output: { + format: 'es', + entryFileNames: '[name].js', + chunkFileNames: 'chunks/[name]-[hash].js', + assetFileNames: 'assets/[name]-[hash][extname]', + }, + }, + }, + }; +} + +/** dist/inhaus.json: welche Komponente in welcher Datei steckt, welches CSS dazugehört */ +function manifest(entries) { + return { + name: 'inhaus-manifest', + generateBundle(_, bundle) { + const components = {}; + const css = []; + + for (const file of Object.values(bundle)) { + if (file.type === 'chunk' && file.isEntry && entries.includes(file.name) && file.name !== 'style') { + components[file.name] = file.fileName; + } + + if (file.type === 'asset' && file.fileName.endsWith('.css')) { + css.push(file.fileName); + } + } + + // Leere Hülle des CSS-Einstiegs nicht ausliefern + for (const [key, file] of Object.entries(bundle)) { + if (file.type === 'chunk' && file.name === 'style') delete bundle[key]; + } + + this.emitFile({ type: 'asset', fileName: 'inhaus.json', source: JSON.stringify({ components, css: [...new Set(css)] }, null, 4) }); + }, + }; +} + +/** + * Mehrere Plugins bringen jeweils eigenes CSS mit, und dieselbe Hilfsklasse (z. B. ih:grid) kann in + * mehreren Dateien stehen. Lädt ein anderes Plugin sein CSS später, würde dessen „ih:grid“ sonst + * die Varianten dieses Plugins (ih:lg:hidden, ih:hover:…) überstimmen. Deshalb bekommen Regeln + * mit Variante (Media Query, :hover …) eine doppelte Klasse – sie gewinnen so immer gegen + * einfache Klassen, egal in welcher Reihenfolge die Dateien laden. + */ +export function strongerVariants() { + const pseudo = /(? { + let conditional = false; + + for (let parent = rule.parent; parent && parent.type !== 'root'; parent = parent.parent) { + if (parent.type === 'atrule' && parent.name !== 'layer') conditional = true; + } + + rule.selectors = rule.selectors.map((selector) => (conditional || pseudo.test(selector.replace(/^[^.]*/, ''))) && firstClass.test(selector) + ? selector.replace(firstClass, (match) => match + match) + : selector); + }); + + file.source = root.toString(); + } + }, + }; +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..94f3bca --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1728 @@ +{ + "name": "inhaus-plugin-chat", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "inhaus-plugin-chat", + "dependencies": { + "@lucide/vue": "^1.48.0", + "pusher-js": "^8.6.0" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.3.3", + "@vitejs/plugin-vue": "^6.0.9", + "postcss": "^8.5.28", + "tailwindcss": "^4.3.3", + "vite": "^8.3.1", + "vue": "^3.5.43" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz", + "integrity": "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.8" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", + "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@lucide/vue": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/@lucide/vue/-/vue-1.48.0.tgz", + "integrity": "sha512-3/Nwx/RsqQ4ZrrSML1GNsSWCSDyLnBgoF/eEr1q9G6iZymn3+WKtzIj7Dbc/Nxrt9WOPuGrJ58S+CBiamK+36w==", + "license": "ISC", + "peerDependencies": { + "vue": ">=3.0.1" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.151.0.tgz", + "integrity": "sha512-J1yXrIlNDZVzE3ada310xeAw7nH8yCAyLPuUIsjKatFPmfn5bS1oW+cM+QsGOtVWd5nhSpbwZWx/rue+r5Z+PA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/oxc-project" + } + }, + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.11.tgz", + "integrity": "sha512-A5kXfGKvKWWZE0TtPrfsvT+q4Y5d1QG8gGUzpYjGydM+fARM9MuX90PrXYXe0XbsDVgyxxNzHo6giCj90bsFNw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.11.tgz", + "integrity": "sha512-z6cTycz+iJ4PVkuL4HHW4DfTfoeU/2nqYYuSOrTmH7yHK5Y0LCOnA03V4ZNxavyVaU1oOqUgIg2klN/s+USGOA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.11.tgz", + "integrity": "sha512-jShvqNtP6vDC6/A5JOAzbVV+DkgHqhl/ScVCJEbt+TUY6QYz7YnXcrg3sLtFBniro0f/Ld50ZwCWA6f7KYD1nQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.11.tgz", + "integrity": "sha512-f2i2xiNWq1Z1l2++q2fuhZRdLAT3aqxD6vRNm1RAxpUoBcdqNB3C0s1Bt+K+PbEx2F5F4gQp6hqKkphCY/xF9w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.11.tgz", + "integrity": "sha512-4Ir5FSOKIAMr4r0kExpt1s3bMgzJU3rA45AYOHtQpls0oNeqcYBKrWMlckrYH4KCfGLfkfn1tN1dmZPMVsdXow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.11.tgz", + "integrity": "sha512-/gnRDM+39BROzAN/k1OZjDPnDMcZxB/0EUxKjONO5yVkNEvlsoMDrxGNKgZi/ttFriS2gwlDNzB65pvNbFOXIQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.11.tgz", + "integrity": "sha512-PFaK8HwvAHbaKbBcDNQihjMKYvFnA5hiENx/l5tphTDz1E0WFp32l0A7aq7lyUwGsRw/xSrNIy/gIK4thrSCrw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.11.tgz", + "integrity": "sha512-AskzJUIKRLPxkruR1wLKewGbOw+EYfU/9lOrBFj4AFrEA8hPpKFnODWNu2WLaNs0QNkEb9QIJufmVZZIL/bJlg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.11.tgz", + "integrity": "sha512-qlUGAheh2yh8afH7QBgx0PrRHN85hKnNd78x8MeMhXivuevgd8vgf6/CstOzmNKY/lLTHvNTrPy98cLnAugzJw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.11.tgz", + "integrity": "sha512-secpEad+0vCbSfn8upFySkDskv+bGPk3THSDS9Y89yc4rb4kzqHp8Dmyd9BkQW4SnhNXBZCl/6CrO//hZahNJQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.11.tgz", + "integrity": "sha512-mOVBT3dPpkWm8XBWPmU4bf+U6dYDLeMo/9ojUmis4N0L5uu10qra5vOyngZ7/PSdoE4G9KvRt4bloRxNjLas7A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.11.tgz", + "integrity": "sha512-Is78i9A8Ui4SqcxUwFJ9uMmjDn58IbVTjFWYdQestFEgeuEmHMLGNriXnVJKkwG2YiZjw8cP0zCTyDMdDGtOOg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.11.tgz", + "integrity": "sha512-dUCXneZ87INUMyQ0D+C0HrEBNUPNXHaPmU5GTjyKTJEiussw9Kaj5Ln8UztPe4epV/ffvgNBEadksdYhmW6xJA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.11.tgz", + "integrity": "sha512-jByxb6qfd+bH1xUd0qnfFnb17i9sWBPY2tOavJ0l3tdr3OTu+Kvtm8cd/JV5nFt657b1VqGltxg9olOEfofXWw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.11.tgz", + "integrity": "sha512-/PzKqzAJ03i19oy2ItPvyvaVjOjBCNnfaJs8yvUdGBKmiESgnrJSQ2awd81QzFbbnAmu7YO9ZnJrDCb9VSJPRA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz", + "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.24.1", + "jiti": "^2.7.0", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz", + "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-arm64": "4.3.3", + "@tailwindcss/oxide-darwin-x64": "4.3.3", + "@tailwindcss/oxide-freebsd-x64": "4.3.3", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", + "@tailwindcss/oxide-linux-x64-musl": "4.3.3", + "@tailwindcss/oxide-wasm32-wasi": "4.3.3", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz", + "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz", + "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz", + "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz", + "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz", + "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz", + "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz", + "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz", + "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz", + "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz", + "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.1", + "@emnapi/runtime": "^1.11.1", + "@emnapi/wasi-threads": "^1.2.2", + "@napi-rs/wasm-runtime": "^1.1.4", + "@tybys/wasm-util": "^0.10.2", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz", + "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz", + "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.3.tgz", + "integrity": "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.3", + "@tailwindcss/oxide": "4.3.3", + "tailwindcss": "4.3.3" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@vitejs/plugin-vue": { + "version": "6.0.9", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.9.tgz", + "integrity": "sha512-rD/MORlhaZMlXWW0rEn4FB4wMinWC0z/D7Ye160S5+Rs1mC8ZDAdcDp4SjKfUhG5t8q1ktcPVw4xuTkPRlzrSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.43.tgz", + "integrity": "sha512-zdiLhnbe1QQqgDT8xZMpNmyqZ3qlI+/Q/FHQco57Kwl/b05HhCzN6eVGN9QU9rbga4CrS0H5SYY8VGHZCt/1Hg==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.8", + "@vue/shared": "3.5.43", + "entities": "^7.0.1", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.1" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.43.tgz", + "integrity": "sha512-PEZoAk3NQmsn/ejMzSOCyTYqwGqczrWm70PuhBKjjv1+TCoQAaO/zOqNwjV+honlNstT5ILxtc+8r8UUfj+iEQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.5.43", + "@vue/shared": "3.5.43" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.43.tgz", + "integrity": "sha512-FCbrG3XNCRl+js3huuKx4IVHBLTvMkJhVepjbxSPu1gn4yWLaYtGNQdjJGZaMytXB6qb76qQDDmDSLy/vkmleQ==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.8", + "@vue/compiler-core": "3.5.43", + "@vue/compiler-dom": "3.5.43", + "@vue/compiler-ssr": "3.5.43", + "@vue/shared": "3.5.43", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.21", + "postcss": "^8.5.28", + "source-map-js": "^1.2.1" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.43.tgz", + "integrity": "sha512-GF62orf7KiJX9RqrHNGrYBudsQGD0OhJ5nDs90O8UiDuS40+YMYomiXu6w6EuvtXuRDc3MSNis3EaaSKAVSWpg==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.43", + "@vue/shared": "3.5.43" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.43.tgz", + "integrity": "sha512-G/c9GyOZNI2jVaaS6OX1EF1SSFSv7H0ERqNTl4+DTFMlZmB5eVAB53aLQNam/7NL2NPtaDD7RdVrzf8uJzMuOA==", + "license": "MIT", + "dependencies": { + "@vue/shared": "3.5.43" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.43.tgz", + "integrity": "sha512-hU6U6VnVhBGQDpvlnnDlIB8ZGJBiOcgk2lh/0InltHiz3D8oSkluvuvY+do1G2H3+udeKFsmaBlgVYP7gXQzEw==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.43", + "@vue/shared": "3.5.43" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.43.tgz", + "integrity": "sha512-Bb2Jc0YjjJdMt1SJmb9b2L/IWd3I8lIT9x9eS/xvvP9CiVgna0ffua74xKRmt4/uSJ+0r4iN8ex1jrqkhQGWQw==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.43", + "@vue/runtime-core": "3.5.43", + "@vue/shared": "3.5.43", + "csstype": "^3.2.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.43.tgz", + "integrity": "sha512-l2Ygjv9NehV94PSBxNWsAHC0j/eIIKbn92mBuWXAPGLnn6HfJ6MH5ubsd+Nk0YoZ5FRuxWI1P2VSoh+dbPQhCQ==", + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.5.43", + "@vue/runtime-dom": "3.5.43", + "@vue/shared": "3.5.43" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.43.tgz", + "integrity": "sha512-uksS7YGMR5NZyr4JNq0Rp+QyLns0ueaz20KwzIPW9R0LH1Vnt4E+XUM29PNseEbf1www2gOuhuDi5AKOIXag9Q==", + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.25.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.25.1.tgz", + "integrity": "sha512-nGXts5znJzmWPu+mIE9izCOzdg63oJca2mDzGWWTth7sr4aCToKcoyFVBQwN75Ij5Pf6p510EwkTqViTRzDV+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/nanoid": { + "version": "3.3.19", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.19.tgz", + "integrity": "sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.28", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz", + "integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.18", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/pusher-js": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/pusher-js/-/pusher-js-8.6.0.tgz", + "integrity": "sha512-wShJPfCS/kYkCBVzVW67wa9cnQIgHTszEK2XHNrFkOgGruuGw081aERAxfRjfdFU+WcIt8x6dvbwkTW4iZuQ8Q==", + "license": "MIT", + "dependencies": { + "tweetnacl": "^1.0.3" + } + }, + "node_modules/rolldown": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.11.tgz", + "integrity": "sha512-qpSwIyz0jHQq5qXBTNxFmE6664rJ7O+4TvPFOiOaBSrz8IOHc1koKKSqTM2H6u1UG1+TveuC6vaDHKXFOvb1Kw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.151.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm-eabi": "1.2.11", + "@rolldown/binding-android-arm64": "1.2.11", + "@rolldown/binding-darwin-arm64": "1.2.11", + "@rolldown/binding-darwin-x64": "1.2.11", + "@rolldown/binding-freebsd-x64": "1.2.11", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.11", + "@rolldown/binding-linux-arm64-gnu": "1.2.11", + "@rolldown/binding-linux-arm64-musl": "1.2.11", + "@rolldown/binding-linux-ppc64-gnu": "1.2.11", + "@rolldown/binding-linux-s390x-gnu": "1.2.11", + "@rolldown/binding-linux-x64-gnu": "1.2.11", + "@rolldown/binding-linux-x64-musl": "1.2.11", + "@rolldown/binding-openharmony-arm64": "1.2.11", + "@rolldown/binding-win32-arm64-msvc": "1.2.11", + "@rolldown/binding-win32-x64-msvc": "1.2.11" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz", + "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "license": "Unlicense" + }, + "node_modules/vite": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.1.tgz", + "integrity": "sha512-/bvH9E9tmCXRGp2uXY3WbOldqpTwFkbha/8ANaEQ6VkxhH60KyqLwgZq6lG2y+4uT55x9+9eUHMpQ7uGnOCKjA==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.33.0", + "picomatch": "^4.0.7", + "postcss": "^8.5.28", + "rolldown": "~1.2.9", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.7.1", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/vite/node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vite/node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/vue": { + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.43.tgz", + "integrity": "sha512-o5qZoksdnjIKvW1srZ3ab7pcDNYAerBjRe54D0LBLfRdCYFrSgBHVXokMas35czQc0//lmx4/tuY4ZNQ+Rf2Ng==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.43", + "@vue/compiler-sfc": "3.5.43", + "@vue/runtime-dom": "3.5.43", + "@vue/server-renderer": "3.5.43", + "@vue/shared": "3.5.43" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..ba53a22 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "inhaus-plugin-chat", + "private": true, + "type": "module", + "scripts": { + "build": "vite build", + "dev": "vite build --watch", + "package": "vite build && php bin/package" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.3.3", + "@vitejs/plugin-vue": "^6.0.9", + "postcss": "^8.5.28", + "tailwindcss": "^4.3.3", + "vite": "^8.3.1", + "vue": "^3.5.43" + }, + "dependencies": { + "@lucide/vue": "^1.48.0", + "pusher-js": "^8.6.0" + } +} diff --git a/plugin.json b/plugin.json new file mode 100644 index 0000000..81fb46e --- /dev/null +++ b/plugin.json @@ -0,0 +1,14 @@ +{ + "slug": "chat", + "name": "Nachrichten", + "version": "1.0.0", + "description": "Direktnachrichten und Gruppenchats im Portal – mit Anhängen, Bildern, GIFs (eigene Sammlung und optional GIPHY), Emojis, Reaktionen, Antworten und Gelesen-Status. Gruppen anlegen nur mit Recht; auf Wunsch Echtzeit über einen Pusher-kompatiblen Dienst.", + "author": "Loheide", + "namespace": "Inhaus\\Plugins\\Chat\\", + "class": "Inhaus\\Plugins\\Chat\\ChatPlugin", + "requires": { + "core": ">=0.39.0", + "php": ">=8.3" + }, + "update_url": "https://git.loheide.cloud/api/v1/repos/friloo/inhaus-plugin-chat/releases/latest" +} diff --git a/resources/css/style.css b/resources/css/style.css new file mode 100644 index 0000000..843a864 --- /dev/null +++ b/resources/css/style.css @@ -0,0 +1,3 @@ +/* Tailwind mit den Design-Tokens des Portals – Klassen mit Präfix „ih:“, z. B. ih:bg-brand, ih:text-muted-foreground, ih:rounded-lg */ +@import "../../inhaus-sdk/theme.css"; +@source "../js"; diff --git a/resources/js/components/ChatAvatar.vue b/resources/js/components/ChatAvatar.vue new file mode 100644 index 0000000..c1a56a7 --- /dev/null +++ b/resources/js/components/ChatAvatar.vue @@ -0,0 +1,17 @@ + + + diff --git a/resources/js/components/Composer.vue b/resources/js/components/Composer.vue new file mode 100644 index 0000000..4cea3c8 --- /dev/null +++ b/resources/js/components/Composer.vue @@ -0,0 +1,199 @@ + + +