820d1edc8c6696bc06abc14193127f89d31706b7b437ba99fe000e16cfb0a4f7.json raw
1 {"ast":null,"code":"import _asyncToGenerator from \"/home/mleku/src/orly.dev/next/signer/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { inject } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Router } from '@angular/router';\nimport { FALLBACK_PROFILE_RELAYS, NavComponent, NostrHelper, ProfileMetadataService, RelayListService, StorageService, ToastComponent, publishToRelaysWithAuth } from '@common';\nimport { SimplePool } from 'nostr-tools/pool';\nimport { finalizeEvent } from 'nostr-tools';\nimport { hexToBytes } from '@noble/hashes/utils';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"@angular/forms\";\nfunction ProfileEditComponent_Conditional_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 2)(1, \"span\", 3);\n i0.ɵɵtext(2, \"Loading profile...\");\n i0.ɵɵelementEnd()();\n }\n}\nfunction ProfileEditComponent_Conditional_4_Conditional_41_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0, \" Saving... \");\n }\n}\nfunction ProfileEditComponent_Conditional_4_Conditional_42_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0, \" Save \");\n }\n}\nfunction ProfileEditComponent_Conditional_4_Conditional_43_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 27)(1, \"div\", 28);\n i0.ɵɵelement(2, \"i\", 29);\n i0.ɵɵelementStart(3, \"span\");\n i0.ɵɵtext(4);\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance(4);\n i0.ɵɵtextInterpolate(ctx_r1.alertMessage);\n }\n}\nfunction ProfileEditComponent_Conditional_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 4)(1, \"div\", 5)(2, \"label\", 6);\n i0.ɵɵtext(3, \"Name\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"input\", 7);\n i0.ɵɵtwoWayListener(\"ngModelChange\", function ProfileEditComponent_Conditional_4_Template_input_ngModelChange_4_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵtwoWayBindingSet(ctx_r1.profile.name, $event) || (ctx_r1.profile.name = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(5, \"div\", 5)(6, \"label\", 8);\n i0.ɵɵtext(7, \"Display Name\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(8, \"input\", 9);\n i0.ɵɵtwoWayListener(\"ngModelChange\", function ProfileEditComponent_Conditional_4_Template_input_ngModelChange_8_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵtwoWayBindingSet(ctx_r1.profile.display_name, $event) || (ctx_r1.profile.display_name = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(9, \"div\", 5)(10, \"label\", 10);\n i0.ɵɵtext(11, \"Avatar URL\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(12, \"input\", 11);\n i0.ɵɵtwoWayListener(\"ngModelChange\", function ProfileEditComponent_Conditional_4_Template_input_ngModelChange_12_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵtwoWayBindingSet(ctx_r1.profile.picture, $event) || (ctx_r1.profile.picture = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(13, \"div\", 5)(14, \"label\", 12);\n i0.ɵɵtext(15, \"Banner URL\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(16, \"input\", 13);\n i0.ɵɵtwoWayListener(\"ngModelChange\", function ProfileEditComponent_Conditional_4_Template_input_ngModelChange_16_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵtwoWayBindingSet(ctx_r1.profile.banner, $event) || (ctx_r1.profile.banner = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(17, \"div\", 5)(18, \"label\", 14);\n i0.ɵɵtext(19, \"Website\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(20, \"input\", 15);\n i0.ɵɵtwoWayListener(\"ngModelChange\", function ProfileEditComponent_Conditional_4_Template_input_ngModelChange_20_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵtwoWayBindingSet(ctx_r1.profile.website, $event) || (ctx_r1.profile.website = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(21, \"div\", 5)(22, \"label\", 16);\n i0.ɵɵtext(23, \"About\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(24, \"textarea\", 17);\n i0.ɵɵtwoWayListener(\"ngModelChange\", function ProfileEditComponent_Conditional_4_Template_textarea_ngModelChange_24_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵtwoWayBindingSet(ctx_r1.profile.about, $event) || (ctx_r1.profile.about = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(25, \"div\", 5)(26, \"label\", 18);\n i0.ɵɵtext(27, \"NIP-05 Identifier\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(28, \"input\", 19);\n i0.ɵɵtwoWayListener(\"ngModelChange\", function ProfileEditComponent_Conditional_4_Template_input_ngModelChange_28_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵtwoWayBindingSet(ctx_r1.profile.nip05, $event) || (ctx_r1.profile.nip05 = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(29, \"div\", 5)(30, \"label\", 20);\n i0.ɵɵtext(31, \"Lightning Address (LUD-16)\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(32, \"input\", 21);\n i0.ɵɵtwoWayListener(\"ngModelChange\", function ProfileEditComponent_Conditional_4_Template_input_ngModelChange_32_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵtwoWayBindingSet(ctx_r1.profile.lud16, $event) || (ctx_r1.profile.lud16 = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(33, \"div\", 5)(34, \"label\", 22);\n i0.ɵɵtext(35, \"LNURL\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(36, \"input\", 23);\n i0.ɵɵtwoWayListener(\"ngModelChange\", function ProfileEditComponent_Conditional_4_Template_input_ngModelChange_36_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵtwoWayBindingSet(ctx_r1.profile.lnurl, $event) || (ctx_r1.profile.lnurl = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵelementEnd()()();\n i0.ɵɵelementStart(37, \"div\", 24)(38, \"button\", 25);\n i0.ɵɵlistener(\"click\", function ProfileEditComponent_Conditional_4_Template_button_click_38_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onClickCancel());\n });\n i0.ɵɵtext(39, \" Cancel \");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(40, \"button\", 26);\n i0.ɵɵlistener(\"click\", function ProfileEditComponent_Conditional_4_Template_button_click_40_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onClickSave());\n });\n i0.ɵɵtemplate(41, ProfileEditComponent_Conditional_4_Conditional_41_Template, 1, 0)(42, ProfileEditComponent_Conditional_4_Conditional_42_Template, 1, 0);\n i0.ɵɵelementEnd()();\n i0.ɵɵtemplate(43, ProfileEditComponent_Conditional_4_Conditional_43_Template, 5, 1, \"div\", 27);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance(4);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx_r1.profile.name);\n i0.ɵɵadvance(4);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx_r1.profile.display_name);\n i0.ɵɵadvance(4);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx_r1.profile.picture);\n i0.ɵɵadvance(4);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx_r1.profile.banner);\n i0.ɵɵadvance(4);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx_r1.profile.website);\n i0.ɵɵadvance(4);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx_r1.profile.about);\n i0.ɵɵadvance(4);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx_r1.profile.nip05);\n i0.ɵɵadvance(4);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx_r1.profile.lud16);\n i0.ɵɵadvance(4);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx_r1.profile.lnurl);\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"disabled\", ctx_r1.saving);\n i0.ɵɵadvance();\n i0.ɵɵconditional(ctx_r1.saving ? 41 : 42);\n i0.ɵɵadvance(2);\n i0.ɵɵconditional(ctx_r1.alertMessage ? 43 : -1);\n }\n}\nexport let ProfileEditComponent = /*#__PURE__*/(() => {\n class ProfileEditComponent extends NavComponent {\n #storage = inject(StorageService);\n #router = inject(Router);\n #profileMetadata = inject(ProfileMetadataService);\n #relayList = inject(RelayListService);\n profile = {\n name: '',\n display_name: '',\n picture: '',\n banner: '',\n website: '',\n about: '',\n nip05: '',\n lud16: '',\n lnurl: ''\n };\n // Store original event content to preserve extra fields\n #originalContent = {};\n #originalTags = [];\n loading = true;\n saving = false;\n alertMessage;\n #privkey;\n #pubkey;\n ngOnInit() {\n var _this = this;\n return _asyncToGenerator(function* () {\n yield _this.#loadProfile();\n })();\n }\n #loadProfile() {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n try {\n const selectedIdentityId = _this2.#storage.getBrowserSessionHandler().browserSessionData?.selectedIdentityId ?? null;\n const identity = _this2.#storage.getBrowserSessionHandler().browserSessionData?.identities.find(x => x.id === selectedIdentityId);\n if (!identity) {\n _this2.loading = false;\n return;\n }\n _this2.#privkey = identity.privkey;\n _this2.#pubkey = NostrHelper.pubkeyFromPrivkey(identity.privkey);\n // Initialize services\n yield _this2.#profileMetadata.initialize();\n // Try to get cached profile first\n const cachedProfile = _this2.#profileMetadata.getCachedProfile(_this2.#pubkey);\n if (cachedProfile) {\n _this2.profile = {\n name: cachedProfile.name || '',\n display_name: cachedProfile.display_name || cachedProfile.displayName || '',\n picture: cachedProfile.picture || '',\n banner: cachedProfile.banner || '',\n website: cachedProfile.website || '',\n about: cachedProfile.about || '',\n nip05: cachedProfile.nip05 || '',\n lud16: cachedProfile.lud16 || '',\n lnurl: cachedProfile.lud06 || ''\n };\n }\n // Fetch the actual kind 0 event to get original content and tags\n yield _this2.#fetchOriginalEvent();\n _this2.loading = false;\n } catch (error) {\n console.error('Failed to load profile:', error);\n _this2.loading = false;\n }\n })();\n }\n #fetchOriginalEvent() {\n var _this3 = this;\n return _asyncToGenerator(function* () {\n if (!_this3.#pubkey) return;\n const pool = new SimplePool();\n try {\n const events = yield _this3.#queryWithTimeout(pool, FALLBACK_PROFILE_RELAYS, [{\n kinds: [0],\n authors: [_this3.#pubkey]\n }], 10000);\n if (events.length > 0) {\n // Get the most recent event\n const latestEvent = events.reduce((latest, event) => event.created_at > latest.created_at ? event : latest);\n // Store original tags (excluding the ones we'll update)\n _this3.#originalTags = latestEvent.tags.filter(tag => tag[0] !== 'name' && tag[0] !== 'display_name' && tag[0] !== 'picture' && tag[0] !== 'banner' && tag[0] !== 'website' && tag[0] !== 'about' && tag[0] !== 'nip05' && tag[0] !== 'lud16' && tag[0] !== 'client');\n // Parse and store original content\n try {\n _this3.#originalContent = JSON.parse(latestEvent.content);\n // Update form with values from event content\n _this3.profile = {\n name: _this3.#originalContent['name'] || '',\n display_name: _this3.#originalContent['display_name'] || _this3.#originalContent['displayName'] || '',\n picture: _this3.#originalContent['picture'] || '',\n banner: _this3.#originalContent['banner'] || '',\n website: _this3.#originalContent['website'] || '',\n about: _this3.#originalContent['about'] || '',\n nip05: _this3.#originalContent['nip05'] || '',\n lud16: _this3.#originalContent['lud16'] || '',\n lnurl: _this3.#originalContent['lnurl'] || ''\n };\n } catch {\n console.error('Failed to parse profile content');\n }\n }\n } finally {\n pool.close(FALLBACK_PROFILE_RELAYS);\n }\n })();\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n #queryWithTimeout(pool, relays, filters, timeoutMs) {\n return _asyncToGenerator(function* () {\n return new Promise(resolve => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const events = [];\n let settled = false;\n const timeout = setTimeout(() => {\n if (!settled) {\n settled = true;\n resolve(events);\n }\n }, timeoutMs);\n const sub = pool.subscribeMany(relays, filters, {\n onevent(event) {\n events.push(event);\n },\n oneose() {\n if (!settled) {\n settled = true;\n clearTimeout(timeout);\n sub.close();\n resolve(events);\n }\n }\n });\n });\n })();\n }\n onClickSave() {\n var _this4 = this;\n return _asyncToGenerator(function* () {\n if (_this4.saving || !_this4.#privkey || !_this4.#pubkey) return;\n _this4.saving = true;\n _this4.alertMessage = undefined;\n try {\n // Build the content JSON, preserving extra fields\n const content = {\n ..._this4.#originalContent\n };\n // Update with form values\n content['name'] = _this4.profile.name;\n content['display_name'] = _this4.profile.display_name;\n content['displayName'] = _this4.profile.display_name; // Some clients use this\n content['picture'] = _this4.profile.picture;\n content['banner'] = _this4.profile.banner;\n content['website'] = _this4.profile.website;\n content['about'] = _this4.profile.about;\n content['nip05'] = _this4.profile.nip05;\n content['lud16'] = _this4.profile.lud16;\n if (_this4.profile.lnurl) {\n content['lnurl'] = _this4.profile.lnurl;\n }\n content['pubkey'] = _this4.#pubkey;\n // Build tags array, preserving extra tags\n const tags = [..._this4.#originalTags];\n // Add standard tags\n if (_this4.profile.name) tags.push(['name', _this4.profile.name]);\n if (_this4.profile.display_name) tags.push(['display_name', _this4.profile.display_name]);\n if (_this4.profile.picture) tags.push(['picture', _this4.profile.picture]);\n if (_this4.profile.banner) tags.push(['banner', _this4.profile.banner]);\n if (_this4.profile.website) tags.push(['website', _this4.profile.website]);\n if (_this4.profile.about) tags.push(['about', _this4.profile.about]);\n if (_this4.profile.nip05) tags.push(['nip05', _this4.profile.nip05]);\n if (_this4.profile.lud16) tags.push(['lud16', _this4.profile.lud16]);\n // Add alt tag if not present\n if (!tags.some(t => t[0] === 'alt')) {\n tags.push(['alt', `User profile for ${_this4.profile.name || _this4.profile.display_name || 'user'}`]);\n }\n // Always add client tag\n tags.push(['client', 'smesh-signer']);\n // Create the unsigned event\n const unsignedEvent = {\n kind: 0,\n created_at: Math.floor(Date.now() / 1000),\n tags,\n content: JSON.stringify(content)\n };\n // Sign the event\n const privkeyBytes = hexToBytes(_this4.#privkey);\n const signedEvent = finalizeEvent(unsignedEvent, privkeyBytes);\n // Get write relays from NIP-65 or use fallback\n yield _this4.#relayList.initialize();\n const writeRelays = yield _this4.#relayList.fetchRelayList(_this4.#pubkey);\n let relayUrls;\n if (writeRelays.length > 0) {\n // Filter to write relays only\n relayUrls = writeRelays.filter(r => r.write).map(r => r.url);\n // If no write relays found, use all relays\n if (relayUrls.length === 0) {\n relayUrls = writeRelays.map(r => r.url);\n }\n } else {\n // Use fallback relays\n relayUrls = FALLBACK_PROFILE_RELAYS;\n }\n // Publish to relays with NIP-42 authentication support\n const results = yield publishToRelaysWithAuth(relayUrls, signedEvent, _this4.#privkey);\n // Count successes\n const successes = results.filter(r => r.success);\n const failures = results.filter(r => !r.success);\n if (failures.length > 0) {\n console.log('Some relays failed:', failures.map(f => `${f.relay}: ${f.message}`));\n }\n if (successes.length === 0) {\n throw new Error('Failed to publish to any relay');\n }\n console.log(`Profile published to ${successes.length}/${results.length} relays`);\n // Clear cached profile and refetch\n yield _this4.#profileMetadata.clearCacheForPubkey(_this4.#pubkey);\n yield _this4.#profileMetadata.fetchProfile(_this4.#pubkey);\n // Navigate back to identity page\n _this4.#router.navigateByUrl('/home/identity');\n } catch (error) {\n console.error('Failed to save profile:', error);\n _this4.alertMessage = error instanceof Error ? error.message : 'Failed to save profile';\n setTimeout(() => {\n _this4.alertMessage = undefined;\n }, 4500);\n } finally {\n _this4.saving = false;\n }\n })();\n }\n onClickCancel() {\n this.#router.navigateByUrl('/home/identity');\n }\n static ɵfac = /*@__PURE__*/(() => {\n let ɵProfileEditComponent_BaseFactory;\n return function ProfileEditComponent_Factory(__ngFactoryType__) {\n return (ɵProfileEditComponent_BaseFactory || (ɵProfileEditComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ProfileEditComponent)))(__ngFactoryType__ || ProfileEditComponent);\n };\n })();\n static ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n type: ProfileEditComponent,\n selectors: [[\"app-profile-edit\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 7,\n vars: 1,\n consts: [[\"toast\", \"\"], [1, \"sam-text-header\"], [1, \"loading-container\"], [1, \"sam-text-muted\"], [1, \"content\"], [1, \"form-group\"], [\"for\", \"name\"], [\"id\", \"name\", \"type\", \"text\", \"placeholder\", \"Your name\", \"autocomplete\", \"off\", 1, \"form-control\", 3, \"ngModelChange\", \"ngModel\"], [\"for\", \"display_name\"], [\"id\", \"display_name\", \"type\", \"text\", \"placeholder\", \"Display name\", \"autocomplete\", \"off\", 1, \"form-control\", 3, \"ngModelChange\", \"ngModel\"], [\"for\", \"picture\"], [\"id\", \"picture\", \"type\", \"url\", \"placeholder\", \"https://example.com/avatar.jpg\", \"autocomplete\", \"off\", 1, \"form-control\", 3, \"ngModelChange\", \"ngModel\"], [\"for\", \"banner\"], [\"id\", \"banner\", \"type\", \"url\", \"placeholder\", \"https://example.com/banner.jpg\", \"autocomplete\", \"off\", 1, \"form-control\", 3, \"ngModelChange\", \"ngModel\"], [\"for\", \"website\"], [\"id\", \"website\", \"type\", \"url\", \"placeholder\", \"https://yourwebsite.com\", \"autocomplete\", \"off\", 1, \"form-control\", 3, \"ngModelChange\", \"ngModel\"], [\"for\", \"about\"], [\"id\", \"about\", \"placeholder\", \"Tell us about yourself...\", \"rows\", \"4\", 1, \"form-control\", 3, \"ngModelChange\", \"ngModel\"], [\"for\", \"nip05\"], [\"id\", \"nip05\", \"type\", \"text\", \"placeholder\", \"you@example.com\", \"autocomplete\", \"off\", 1, \"form-control\", 3, \"ngModelChange\", \"ngModel\"], [\"for\", \"lud16\"], [\"id\", \"lud16\", \"type\", \"text\", \"placeholder\", \"you@getalby.com\", \"autocomplete\", \"off\", 1, \"form-control\", 3, \"ngModelChange\", \"ngModel\"], [\"for\", \"lnurl\"], [\"id\", \"lnurl\", \"type\", \"text\", \"placeholder\", \"lnurl1...\", \"autocomplete\", \"off\", 1, \"form-control\", 3, \"ngModelChange\", \"ngModel\"], [1, \"sam-footer-grid-2\"], [\"type\", \"button\", 1, \"btn\", \"btn-secondary\", 3, \"click\"], [\"type\", \"button\", 1, \"btn\", \"btn-primary\", 3, \"click\", \"disabled\"], [1, \"alert-container\"], [\"role\", \"alert\", 1, \"alert\", \"alert-danger\", \"sam-flex-row\", \"gap\"], [1, \"bi\", \"bi-exclamation-triangle\"]],\n template: function ProfileEditComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 1)(1, \"span\");\n i0.ɵɵtext(2, \"Edit Profile\");\n i0.ɵɵelementEnd()();\n i0.ɵɵtemplate(3, ProfileEditComponent_Conditional_3_Template, 3, 0, \"div\", 2)(4, ProfileEditComponent_Conditional_4_Template, 44, 12);\n i0.ɵɵelement(5, \"lib-toast\", null, 0);\n }\n if (rf & 2) {\n i0.ɵɵadvance(3);\n i0.ɵɵconditional(ctx.loading ? 3 : 4);\n }\n },\n dependencies: [FormsModule, i1.DefaultValueAccessor, i1.NgControlStatus, i1.NgModel, ToastComponent],\n styles: [\"[_nghost-%COMP%] {\\n height: 100%;\\n display: flex;\\n flex-direction: column;\\n}\\n[_nghost-%COMP%] .loading-container[_ngcontent-%COMP%] {\\n flex: 1;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n[_nghost-%COMP%] .content[_ngcontent-%COMP%] {\\n padding-left: var(--size);\\n padding-right: var(--size);\\n flex-grow: 1;\\n display: flex;\\n flex-direction: column;\\n gap: 12px;\\n overflow-y: auto;\\n padding-bottom: var(--size);\\n}\\n[_nghost-%COMP%] .form-group[_ngcontent-%COMP%] {\\n display: flex;\\n flex-direction: column;\\n gap: 4px;\\n}\\n[_nghost-%COMP%] .form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\\n font-size: 12px;\\n font-weight: 500;\\n color: var(--muted-foreground);\\n text-transform: uppercase;\\n letter-spacing: 0.05em;\\n}\\n[_nghost-%COMP%] .form-group[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%] {\\n font-size: 14px;\\n background: var(--background-light);\\n border: 1px solid var(--border);\\n color: var(--foreground);\\n border-radius: var(--radius);\\n padding: 8px 12px;\\n}\\n[_nghost-%COMP%] .form-group[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus {\\n outline: none;\\n border-color: var(--primary);\\n box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);\\n}\\n[_nghost-%COMP%] .form-group[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]::placeholder {\\n color: var(--muted-foreground);\\n opacity: 0.6;\\n}\\n[_nghost-%COMP%] .form-group[_ngcontent-%COMP%] textarea.form-control[_ngcontent-%COMP%] {\\n resize: vertical;\\n min-height: 80px;\\n}\\n[_nghost-%COMP%] .alert-container[_ngcontent-%COMP%] {\\n position: absolute;\\n bottom: 70px;\\n left: var(--size);\\n right: var(--size);\\n}\"]\n });\n }\n return ProfileEditComponent;\n})();","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}