@konemono/nostr-login-components 1.2.5 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/components/button-base2.js.map +1 -1
  2. package/dist/components/css.js +1 -1
  3. package/dist/components/nl-auth2.js.map +1 -1
  4. package/dist/components/nl-banner2.js +1 -3
  5. package/dist/components/nl-banner2.js.map +1 -1
  6. package/dist/components/nl-change-account2.js.map +1 -1
  7. package/dist/components/nl-confirm-logout2.js.map +1 -1
  8. package/dist/components/nl-connect2.js.map +1 -1
  9. package/dist/components/nl-dialog2.js.map +1 -1
  10. package/dist/components/nl-iframe2.js.map +1 -1
  11. package/dist/components/nl-import-flow2.js.map +1 -1
  12. package/dist/components/nl-info-extension2.js.map +1 -1
  13. package/dist/components/nl-info2.js.map +1 -1
  14. package/dist/components/nl-loading2.js.map +1 -1
  15. package/dist/components/nl-local-signup2.js.map +1 -1
  16. package/dist/components/nl-nip46-relay-settings2.js.map +1 -1
  17. package/dist/components/nl-otp-migrate2.js.map +1 -1
  18. package/dist/components/nl-previously-logged2.js.map +1 -1
  19. package/dist/components/nl-select2.js.map +1 -1
  20. package/dist/components/nl-signin-bunker-url2.js.map +1 -1
  21. package/dist/components/nl-signin-connection-string2.js.map +1 -1
  22. package/dist/components/nl-signin-nsec2.js.map +1 -1
  23. package/dist/components/nl-signin-otp2.js.map +1 -1
  24. package/dist/components/nl-signin-read-only2.js.map +1 -1
  25. package/dist/components/nl-signin2.js.map +1 -1
  26. package/dist/components/nl-signup2.js.map +1 -1
  27. package/dist/components/nl-welcome-signin2.js.map +1 -1
  28. package/dist/components/nl-welcome-signup2.js.map +1 -1
  29. package/dist/components/nl-welcome2.js.map +1 -1
  30. package/package.json +1 -1
@@ -1 +1 @@
1
- {"file":"nl-confirm-logout2.js","mappings":";;;;;AAAA,MAAM,kBAAkB,GAAG,ir3CAAir3C,CAAC;AAC7s3C,8BAAe,kBAAkB;;MCQpB,eAAe;;;;;;;0BACL,cAAc;2BACb,6HAA6H;;IAKnJ,YAAY;QACV,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,YAAY;QACV,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,YAAY;QACV,KAAK,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;KAC3C;IAED,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,2DAAI,KAAK,EAAC,yCAAyC,IAAE,IAAI,CAAC,UAAU,CAAM,EAC1E,0DAAG,KAAK,EAAC,qEAAqE,IAAE,IAAI,CAAC,WAAW,CAAK,EAErG,4DAAK,KAAK,EAAC,+CAA+C,IAExD,oEAAa,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAC,aAAa,EAAC,KAAK,EAAC,UAAU,GAAG,EAC3F,oEAAa,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,KAAK,EAAC,MAAM,EAAC,QAAQ,EAAC,wBAAwB,GAAG,CAC9F,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-confirm-logout/nl-confirm-logout.css?tag=nl-confirm-logout","src/components/nl-confirm-logout/nl-confirm-logout.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\nimport { CURRENT_MODULE, METHOD_MODULE } from '@/types';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-confirm-logout',\n styleUrl: 'nl-confirm-logout.css',\n shadow: false,\n})\nexport class NlConfirmLogout {\n @Prop() titleModal = \"Delete keys?\";\n @Prop() description = \"Your profile keys are stored in this browser tab and will be deleted if you log out, and your profile will be inaccessible.\";\n @Event() handleLogoutBanner: EventEmitter<string>;\n @Event() handleBackUpModal: EventEmitter<string>;\n @Event() nlCloseModal: EventEmitter;\n\n handleLogout() {\n this.handleLogoutBanner.emit(METHOD_MODULE.LOGOUT);\n this.nlCloseModal.emit();\n }\n\n handleCancel() {\n this.nlCloseModal.emit();\n }\n\n handleBackUp() {\n state.path = [CURRENT_MODULE.IMPORT_FLOW];\n }\n\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-4xl\">{this.titleModal}</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{this.description}</p>\n\n <div class=\"mt-3 ml-auto mr-auto w-60 flex flex-col gap-2\">\n {/* <button-base onClick={() => this.handleCancel()} titleBtn=\"Cancel\" /> */}\n <button-base onClick={() => this.handleBackUp()} titleBtn=\"Backup keys\" theme=\"lemonade\" />\n <button-base onClick={() => this.handleLogout()} theme=\"crab\" titleBtn=\"Logout and delete keys\" />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-confirm-logout2.js","mappings":";;;;;AAAA,MAAM,kBAAkB,GAAG,4r3CAA4r3C,CAAC;AACxt3C,8BAAe,kBAAkB;;MCQpB,eAAe;;;;;;;0BACL,cAAc;2BACb,6HAA6H;;IAKnJ,YAAY;QACV,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,YAAY;QACV,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,YAAY;QACV,KAAK,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;KAC3C;IAED,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,2DAAI,KAAK,EAAC,yCAAyC,IAAE,IAAI,CAAC,UAAU,CAAM,EAC1E,0DAAG,KAAK,EAAC,qEAAqE,IAAE,IAAI,CAAC,WAAW,CAAK,EAErG,4DAAK,KAAK,EAAC,+CAA+C,IAExD,oEAAa,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAC,aAAa,EAAC,KAAK,EAAC,UAAU,GAAG,EAC3F,oEAAa,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,KAAK,EAAC,MAAM,EAAC,QAAQ,EAAC,wBAAwB,GAAG,CAC9F,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-confirm-logout/nl-confirm-logout.css?tag=nl-confirm-logout","src/components/nl-confirm-logout/nl-confirm-logout.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\nimport { CURRENT_MODULE, METHOD_MODULE } from '@/types';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-confirm-logout',\n styleUrl: 'nl-confirm-logout.css',\n shadow: false,\n})\nexport class NlConfirmLogout {\n @Prop() titleModal = \"Delete keys?\";\n @Prop() description = \"Your profile keys are stored in this browser tab and will be deleted if you log out, and your profile will be inaccessible.\";\n @Event() handleLogoutBanner: EventEmitter<string>;\n @Event() handleBackUpModal: EventEmitter<string>;\n @Event() nlCloseModal: EventEmitter;\n\n handleLogout() {\n this.handleLogoutBanner.emit(METHOD_MODULE.LOGOUT);\n this.nlCloseModal.emit();\n }\n\n handleCancel() {\n this.nlCloseModal.emit();\n }\n\n handleBackUp() {\n state.path = [CURRENT_MODULE.IMPORT_FLOW];\n }\n\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-4xl\">{this.titleModal}</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{this.description}</p>\n\n <div class=\"mt-3 ml-auto mr-auto w-60 flex flex-col gap-2\">\n {/* <button-base onClick={() => this.handleCancel()} titleBtn=\"Cancel\" /> */}\n <button-base onClick={() => this.handleBackUp()} titleBtn=\"Backup keys\" theme=\"lemonade\" />\n <button-base onClick={() => this.handleLogout()} theme=\"crab\" titleBtn=\"Logout and delete keys\" />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-connect2.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,ks3CAAks3C,CAAC;AACxt3C,wBAAe,YAAY;;MCQd,SAAS;;;;;4BACG,sBAAsB;2BACT,EAAE;sBACZ,KAAK;wCACwB,EAAE;mCAEjB,KAAK;;IAG7C,kBAAkB,CAAC,MAAM;QACvB,KAAK,CAAC,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;KACtC;IAED,kBAAkB;QAChB,IAAI,CAAC,mBAAmB,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC;KACtD;IAED,eAAe,CAAC,CAAa;QAC3B,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;KACjE;IAED,iBAAiB,MAAK;IAEtB,cAAc,CAAC,CAAQ,EAAE,EAAoB;QAC3C,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KAC9B;IAED,sBAAsB;QACpB,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;KAC3D;IAED,MAAM;QACJ,MAAM,UAAU,GAAG,GAAG,IAAI,CAAC,mBAAmB,GAAG,YAAY,GAAG,UAAU,mDAAmD,CAAC;QAE9H,QACE,EAAC,QAAQ,uDACP,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,2DAAI,KAAK,EAAC,yCAAyC,IAAE,IAAI,CAAC,YAAY,CAAM,CACxE,EAEN,4DAAK,KAAK,EAAC,KAAK,IACb,OAAO,CAAC,IAAI,CAAC,wBAAwB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-connect/nl-connect.css?tag=nl-connect","src/components/nl-connect/nl-connect.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Fragment, h, Prop, State } from '@stencil/core';\nimport { AuthMethod, ConnectionString, CURRENT_MODULE } from '@/types';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-connect',\n styleUrl: 'nl-connect.css',\n shadow: false,\n})\nexport class NlConnect {\n @Prop() titleWelcome = 'Connect to key store';\n @Prop() authMethods: AuthMethod[] = [];\n @Prop() hasOTP: boolean = false;\n @Prop() connectionStringServices: ConnectionString[] = [];\n\n @State() isOpenAdvancedLogin: boolean = false;\n @Event() nlNostrConnect: EventEmitter<ConnectionString>;\n\n handleChangeScreen(screen) {\n state.path = [...state.path, screen];\n }\n\n handleOpenAdvanced() {\n this.isOpenAdvancedLogin = !this.isOpenAdvancedLogin;\n }\n\n allowAuthMethod(m: AuthMethod) {\n return !this.authMethods.length || this.authMethods.includes(m);\n }\n\n componentWillLoad() {}\n\n handleOpenLink(e: Event, cs: ConnectionString) {\n e.preventDefault();\n this.nlNostrConnect.emit(cs);\n }\n\n handleConnectionString() {\n this.handleChangeScreen(CURRENT_MODULE.CONNECTION_STRING);\n }\n\n render() {\n const arrowClass = `${this.isOpenAdvancedLogin ? 'rotate-180' : 'rotate-0'} duration-300 flex-shrink-0 w-4 h-4 text-blue-500`;\n\n return (\n <Fragment>\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-3xl\">{this.titleWelcome}</h1>\n </div>\n\n <div class=\"p-4\">\n {Boolean(this.connectionStringServices.length) && (\n <div class=\"max-w-96 mx-auto pt-5\">\n <p class=\"nl-description font-medium text-sm pb-1.5\">Select key store:</p>\n <ul class=\"p-2 rounded-lg border border-gray-200 flex flex-col w-full gap-0.5\">\n {this.connectionStringServices.map(el => {\n const isLoading = el.available === 'loading';\n const isUnavailable = el.available === false;\n const isDisabled = isLoading || isUnavailable;\n\n return (\n <li class={isDisabled ? 'opacity-50 pointer-events-none' : ''}>\n <a\n href={isDisabled ? undefined : el.link}\n target=\"_blank\"\n onClick={e => {\n if (isDisabled) {\n e.preventDefault();\n return;\n }\n this.handleOpenLink(e, el);\n }}\n class={`flex items-center gap-x-3.5 w-full py-2 px-3 rounded-lg text-sm justify-between ${isDisabled ? 'cursor-default' : 'hover:bg-gray-300 cursor-pointer'}`}\n >\n <div class=\"w-full max-w-7 h-7 flex relative\">\n <div class=\"uppercase font-bold w-full h-full rounded-full border border-gray-400 flex justify-center items-center\">\n {Boolean(el.img) ? (\n <img class={`w-full rounded-full ${isUnavailable ? 'grayscale' : ''}`} src={el.img} alt={el.name} />\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"#9ca3af\" class=\"w-4 h-4 block\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z\"\n />\n </svg>\n )}\n </div>\n </div>\n <div class=\"overflow-hidden flex flex-col w-full\">\n <div class=\"nl-title truncate overflow-hidden\">\n {el.name}\n {isLoading && <span class=\"nl-description text-xs ml-2\">checking...</span>}\n {isUnavailable && <span class=\"nl-description text-xs ml-2\">offline</span>}\n </div>\n </div>\n </a>\n </li>\n );\n })}\n </ul>\n </div>\n )}\n </div>\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n\n <div class=\"max-w-72 mx-auto\">\n <nl-nip46-relay-settings\n defaultRelays={state.customNip46Relays}\n onNlRelaysChanged={e => {\n state.customNip46Relays = e.detail;\n }}\n />\n </div>\n\n <div class=\"max-w-52 mx-auto pb-5\">\n {(this.allowAuthMethod('connect') || this.allowAuthMethod('readOnly')) && (\n <div class=\"flex justify-center\">\n <div\n onClick={() => this.handleOpenAdvanced()}\n class=\"text-blue-500 mt-3 decoration-dashed cursor-pointer inline-flex gap-2 items-center pb-1 border-dashed border-b-[1px] border-blue-500 text-sm font-light\"\n >\n Advanced\n <svg\n class={arrowClass}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </div>\n </div>\n )}\n\n <div\n class={`${this.isOpenAdvancedLogin ? 'max-h-[500px] mt-3 duration-300' : 'max-h-0 mt-0 duration-[0.25s]'} transition-max-height ease-in flex gap-3 flex-col overflow-hidden`}\n >\n {/* {this.hasExtension && !this.allowAuthMethod('extension') && this.renderSignInWithExtension()} */}\n {this.allowAuthMethod('connect') && (\n <button-base titleBtn=\"User name\" onClick={() => this.handleChangeScreen(CURRENT_MODULE.LOGIN)}>\n <svg\n style={{ display: 'none' }}\n slot=\"icon-start\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"2\"\n stroke=\"currentColor\"\n // class=\"flex-shrink-0 w-4 h-4 text-gray-500\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z\"\n />\n </svg>\n </button-base>\n )}\n\n {this.allowAuthMethod('connect') && (\n <button-base titleBtn=\"Connection string\" onClick={() => this.handleConnectionString()}>\n <svg style={{ display: 'none' }} slot=\"icon-start\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M3.75 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 3.75 9.375v-4.5ZM3.75 14.625c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5a1.125 1.125 0 0 1-1.125-1.125v-4.5ZM13.5 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 13.5 9.375v-4.5Z\"\n />\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M6.75 6.75h.75v.75h-.75v-.75ZM6.75 16.5h.75v.75h-.75v-.75ZM16.5 6.75h.75v.75h-.75v-.75ZM13.5 13.5h.75v.75h-.75v-.75ZM13.5 19.5h.75v.75h-.75v-.75ZM19.5 13.5h.75v.75h-.75v-.75ZM19.5 19.5h.75v.75h-.75v-.75ZM16.5 16.5h.75v.75h-.75v-.75Z\"\n />\n </svg>\n </button-base>\n )}\n\n {this.allowAuthMethod('connect') && (\n <button-base onClick={() => this.handleChangeScreen(CURRENT_MODULE.LOGIN_BUNKER_URL)} titleBtn=\"Bunker URL\">\n <svg style={{ display: 'none' }} slot=\"icon-start\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364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ACX;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-connect/nl-connect.css?tag=nl-connect","src/components/nl-connect/nl-connect.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Fragment, h, Prop, State } from '@stencil/core';\nimport { AuthMethod, ConnectionString, CURRENT_MODULE } from '@/types';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-connect',\n styleUrl: 'nl-connect.css',\n shadow: false,\n})\nexport class NlConnect {\n @Prop() titleWelcome = 'Connect to key store';\n @Prop() authMethods: AuthMethod[] = [];\n @Prop() hasOTP: boolean = false;\n @Prop() connectionStringServices: ConnectionString[] = [];\n\n @State() isOpenAdvancedLogin: boolean = false;\n @Event() nlNostrConnect: EventEmitter<ConnectionString>;\n\n handleChangeScreen(screen) {\n state.path = [...state.path, screen];\n }\n\n handleOpenAdvanced() {\n this.isOpenAdvancedLogin = !this.isOpenAdvancedLogin;\n }\n\n allowAuthMethod(m: AuthMethod) {\n return !this.authMethods.length || this.authMethods.includes(m);\n }\n\n componentWillLoad() {}\n\n handleOpenLink(e: Event, cs: ConnectionString) {\n e.preventDefault();\n this.nlNostrConnect.emit(cs);\n }\n\n handleConnectionString() {\n this.handleChangeScreen(CURRENT_MODULE.CONNECTION_STRING);\n }\n\n render() {\n const arrowClass = `${this.isOpenAdvancedLogin ? 'rotate-180' : 'rotate-0'} duration-300 flex-shrink-0 w-4 h-4 text-blue-500`;\n\n return (\n <Fragment>\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-3xl\">{this.titleWelcome}</h1>\n </div>\n\n <div class=\"p-4\">\n {Boolean(this.connectionStringServices.length) && (\n <div class=\"max-w-96 mx-auto pt-5\">\n <p class=\"nl-description font-medium text-sm pb-1.5\">Select key store:</p>\n <ul class=\"p-2 rounded-lg border border-gray-200 flex flex-col w-full gap-0.5\">\n {this.connectionStringServices.map(el => {\n const isLoading = el.available === 'loading';\n const isUnavailable = el.available === false;\n const isDisabled = isLoading || isUnavailable;\n\n return (\n <li class={isDisabled ? 'opacity-50 pointer-events-none' : ''}>\n <a\n href={isDisabled ? undefined : el.link}\n target=\"_blank\"\n onClick={e => {\n if (isDisabled) {\n e.preventDefault();\n return;\n }\n this.handleOpenLink(e, el);\n }}\n class={`flex items-center gap-x-3.5 w-full py-2 px-3 rounded-lg text-sm justify-between ${isDisabled ? 'cursor-default' : 'hover:bg-gray-300 cursor-pointer'}`}\n >\n <div class=\"w-full max-w-7 h-7 flex relative\">\n <div class=\"uppercase font-bold w-full h-full rounded-full border border-gray-400 flex justify-center items-center\">\n {Boolean(el.img) ? (\n <img class={`w-full rounded-full ${isUnavailable ? 'grayscale' : ''}`} src={el.img} alt={el.name} />\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"#9ca3af\" class=\"w-4 h-4 block\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z\"\n />\n </svg>\n )}\n </div>\n </div>\n <div class=\"overflow-hidden flex flex-col w-full\">\n <div class=\"nl-title truncate overflow-hidden\">\n {el.name}\n {isLoading && <span class=\"nl-description text-xs ml-2\">checking...</span>}\n {isUnavailable && <span class=\"nl-description text-xs ml-2\">offline</span>}\n </div>\n </div>\n </a>\n </li>\n );\n })}\n </ul>\n </div>\n )}\n </div>\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n\n <div class=\"max-w-72 mx-auto\">\n <nl-nip46-relay-settings\n defaultRelays={state.customNip46Relays}\n onNlRelaysChanged={e => {\n state.customNip46Relays = e.detail;\n }}\n />\n </div>\n\n <div class=\"max-w-52 mx-auto pb-5\">\n {(this.allowAuthMethod('connect') || this.allowAuthMethod('readOnly')) && (\n <div class=\"flex justify-center\">\n <div\n onClick={() => this.handleOpenAdvanced()}\n class=\"text-blue-500 mt-3 decoration-dashed cursor-pointer inline-flex gap-2 items-center pb-1 border-dashed border-b-[1px] border-blue-500 text-sm font-light\"\n >\n Advanced\n <svg\n class={arrowClass}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </div>\n </div>\n )}\n\n <div\n class={`${this.isOpenAdvancedLogin ? 'max-h-[500px] mt-3 duration-300' : 'max-h-0 mt-0 duration-[0.25s]'} transition-max-height ease-in flex gap-3 flex-col overflow-hidden`}\n >\n {/* {this.hasExtension && !this.allowAuthMethod('extension') && this.renderSignInWithExtension()} */}\n {this.allowAuthMethod('connect') && (\n <button-base titleBtn=\"User name\" onClick={() => this.handleChangeScreen(CURRENT_MODULE.LOGIN)}>\n <svg\n style={{ display: 'none' }}\n slot=\"icon-start\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"2\"\n stroke=\"currentColor\"\n // class=\"flex-shrink-0 w-4 h-4 text-gray-500\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z\"\n />\n </svg>\n </button-base>\n )}\n\n {this.allowAuthMethod('connect') && (\n <button-base titleBtn=\"Connection string\" onClick={() => this.handleConnectionString()}>\n <svg style={{ display: 'none' }} slot=\"icon-start\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M3.75 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 3.75 9.375v-4.5ZM3.75 14.625c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5a1.125 1.125 0 0 1-1.125-1.125v-4.5ZM13.5 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 13.5 9.375v-4.5Z\"\n />\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M6.75 6.75h.75v.75h-.75v-.75ZM6.75 16.5h.75v.75h-.75v-.75ZM16.5 6.75h.75v.75h-.75v-.75ZM13.5 13.5h.75v.75h-.75v-.75ZM13.5 19.5h.75v.75h-.75v-.75ZM19.5 13.5h.75v.75h-.75v-.75ZM19.5 19.5h.75v.75h-.75v-.75ZM16.5 16.5h.75v.75h-.75v-.75Z\"\n />\n </svg>\n </button-base>\n )}\n\n {this.allowAuthMethod('connect') && (\n <button-base onClick={() => this.handleChangeScreen(CURRENT_MODULE.LOGIN_BUNKER_URL)} titleBtn=\"Bunker URL\">\n <svg style={{ display: 'none' }} slot=\"icon-start\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244\"\n />\n </svg>\n </button-base>\n )}\n </div>\n </div>\n </Fragment>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-dialog2.js","mappings":";;AAAA,MAAM,WAAW,GAAG,s4sCAAs4sC,CAAC;AAC35sC,uBAAe,WAAW;;MCMb,QAAQ;;;;;;IAGnB,gBAAgB;;QACd,MAAA,IAAI,CAAC,aAAa,0CAAE,SAAS,EAAE,CAAC;KACjC;IAED,oBAAoB;;QAClB,MAAA,IAAI,CAAC,aAAa,0CAAE,KAAK,EAAE,CAAC;KAC7B;IAED,MAAM;QACJ,QACE,+DAAQ,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,aAAa,GAAG,EAAuB,CAAC,EAAE,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,aAAa,EAAE,IACzJ,8DAAa,CACN,EACT;KACH;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-dialog/nl-dialog.css?tag=nl-dialog&encapsulation=shadow","src/components/nl-dialog/nl-dialog.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'nl-dialog',\n styleUrl: 'nl-dialog.css',\n shadow: true,\n})\nexport class NlDialog {\n private dialogElement?: HTMLDialogElement;\n\n componentDidLoad() {\n this.dialogElement?.showModal();\n }\n\n disconnectedCallback() {\n this.dialogElement?.close();\n }\n\n render() {\n return (\n <dialog ref={el => (this.dialogElement = el as HTMLDialogElement)} class={'m-auto nl-banner-dialog'} style={{ border: '0', backgroundColor: 'transparent' }}>\n <slot></slot>\n </dialog>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-dialog2.js","mappings":";;AAAA,MAAM,WAAW,GAAG,8toCAA8toC,CAAC;AACnvoC,uBAAe,WAAW;;MCMb,QAAQ;;;;;;IAGnB,gBAAgB;;QACd,MAAA,IAAI,CAAC,aAAa,0CAAE,SAAS,EAAE,CAAC;KACjC;IAED,oBAAoB;;QAClB,MAAA,IAAI,CAAC,aAAa,0CAAE,KAAK,EAAE,CAAC;KAC7B;IAED,MAAM;QACJ,QACE,+DAAQ,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,aAAa,GAAG,EAAuB,CAAC,EAAE,KAAK,EAAE,yBAAyB,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,aAAa,EAAE,IACzJ,8DAAa,CACN,EACT;KACH;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-dialog/nl-dialog.css?tag=nl-dialog&encapsulation=shadow","src/components/nl-dialog/nl-dialog.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'nl-dialog',\n styleUrl: 'nl-dialog.css',\n shadow: true,\n})\nexport class NlDialog {\n private dialogElement?: HTMLDialogElement;\n\n componentDidLoad() {\n this.dialogElement?.showModal();\n }\n\n disconnectedCallback() {\n this.dialogElement?.close();\n }\n\n render() {\n return (\n <dialog ref={el => (this.dialogElement = el as HTMLDialogElement)} class={'m-auto nl-banner-dialog'} style={{ border: '0', backgroundColor: 'transparent' }}>\n <slot></slot>\n </dialog>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-iframe2.js","mappings":";;AAAA,MAAM,WAAW,GAAG,ks3CAAks3C,CAAC;AACvt3C,uBAAe,WAAW;;MCMb,eAAe;;;;;0BACL,SAAS;2BACR,6HAA6H;yBAC/H,EAAE;;IAGtB,YAAY;QACV,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAI9B,4DAAK,KAAK,EAAC,0BAA0B,IAClC,IAAI,CAAC,SAAS,KACb,+DACE,GAAG,EAAE,IAAI,CAAC,SAAS,EACnB,KAAK,EAAE;gBACL,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,OAAO;gBACf,MAAM,EAAE,gBAAgB;gBACxB,YAAY,EAAE,KAAK;aACpB,GACO,CACX,CACG,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-iframe/nl-iframe.css?tag=nl-iframe","src/components/nl-iframe/nl-iframe.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'nl-iframe',\n styleUrl: 'nl-iframe.css',\n shadow: false,\n})\nexport class NlConfirmLogout {\n @Prop() titleModal = 'Confirm';\n @Prop() description = 'Your profile keys are stored in this browser tab and will be deleted if you log out, and your profile will be inaccessible.';\n @Prop() iframeUrl = '';\n @Event() nlCloseModal: EventEmitter;\n\n handleCancel() {\n this.nlCloseModal.emit();\n }\n\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n {/* <h1 class=\"nl-title font-bold text-center text-4xl\">{this.titleModal}</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{this.description}</p> */}\n\n <div class=\"mt-3 flex flex-col gap-2\">\n {this.iframeUrl && (\n <iframe\n src={this.iframeUrl}\n style={{\n width: '100%',\n height: '600px',\n border: '1px solid #ccc',\n borderRadius: '8px',\n }}\n ></iframe>\n )}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-iframe2.js","mappings":";;AAAA,MAAM,WAAW,GAAG,4r3CAA4r3C,CAAC;AACjt3C,uBAAe,WAAW;;MCMb,eAAe;;;;;0BACL,SAAS;2BACR,6HAA6H;yBAC/H,EAAE;;IAGtB,YAAY;QACV,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAI9B,4DAAK,KAAK,EAAC,0BAA0B,IAClC,IAAI,CAAC,SAAS,KACb,+DACE,GAAG,EAAE,IAAI,CAAC,SAAS,EACnB,KAAK,EAAE;gBACL,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,OAAO;gBACf,MAAM,EAAE,gBAAgB;gBACxB,YAAY,EAAE,KAAK;aACpB,GACO,CACX,CACG,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-iframe/nl-iframe.css?tag=nl-iframe","src/components/nl-iframe/nl-iframe.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'nl-iframe',\n styleUrl: 'nl-iframe.css',\n shadow: false,\n})\nexport class NlConfirmLogout {\n @Prop() titleModal = 'Confirm';\n @Prop() description = 'Your profile keys are stored in this browser tab and will be deleted if you log out, and your profile will be inaccessible.';\n @Prop() iframeUrl = '';\n @Event() nlCloseModal: EventEmitter;\n\n handleCancel() {\n this.nlCloseModal.emit();\n }\n\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n {/* <h1 class=\"nl-title font-bold text-center text-4xl\">{this.titleModal}</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{this.description}</p> */}\n\n <div class=\"mt-3 flex flex-col gap-2\">\n {this.iframeUrl && (\n <iframe\n src={this.iframeUrl}\n style={{\n width: '100%',\n height: '600px',\n border: '1px solid #ccc',\n borderRadius: '8px',\n }}\n ></iframe>\n )}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-import-flow2.js","mappings":";;;;;AAAA,MAAM,eAAe,GAAG,ms3CAAms3C,CAAC;AAC5t3C,2BAAe,eAAe;;MCQjB,YAAY;;;;;;yBACc,mBAAmB;2BAClC,kBAAkB;wBACD,EAAE;2BAElB,KAAK;2BACL,KAAK;sBAEV,KAAK;;IAKvB,kBAAkB,CAAC,KAA0B;QAC3C,MAA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AAC,EAAE,QAAQ,EAAC,iBAAiB,IAC1G,KAAK,CAAC,SAAS,IACd,YACE,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,2IAA2I,EACjJ,IAAI,EAAC,QAAQ,gBACF,SAAS,GACd,KAER,WAAK,IAAI,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,IAC5J,8BACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,yMAAyM,GAC3M,CACE,CACP,CACW,CACV,CACG,EACX;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-import-flow/nl-import-flow.css?tag=nl-import-flow","src/components/nl-import-flow/nl-import-flow.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h, Fragment, State, Prop, Event, EventEmitter } from '@stencil/core';\nimport { state } from '@/store';\nimport { ConnectionString } from '@/types';\n\n@Component({\n tag: 'nl-import-flow',\n styleUrl: 'nl-import-flow.css',\n shadow: false,\n})\nexport class NlImportFlow {\n @Prop({ mutable: true }) titleInfo = 'Back up your keys';\n @Prop() titleImport = 'Choose a service';\n @Prop() services: ConnectionString[] = [];\n\n @State() isContinued = false;\n @State() isKeyBackup = false;\n\n @State() isCopy = false;\n\n @Event() nlImportAccount: EventEmitter<ConnectionString>;\n @Event() nlExportKeys: EventEmitter<void>;\n\n handleDomainSelect(event: CustomEvent<string>) {\n const s = this.services.find(s => s.domain === event.detail);\n state.nlImport = s;\n }\n\n handleCreateAccount(e: MouseEvent) {\n e.preventDefault();\n this.nlImportAccount.emit(state.nlImport);\n }\n\n handleContinue() {\n this.isContinued = true;\n }\n\n handleContinueKeyBackup() {\n this.isKeyBackup = true;\n }\n\n async copyToClipboard() {\n this.nlExportKeys.emit();\n this.isCopy = true;\n\n setTimeout(() => {\n this.isCopy = false;\n }, 1500);\n }\n\n render() {\n if (!this.isContinued && !this.isKeyBackup) {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">{this.titleInfo}</h1>\n <p class=\"nl-description font-light text-sm pt-2 pb-2 max-w-96 mx-auto\">\n Nostr profiles are controlled by cryptographic keys.\n <br />\n <br />\n Your keys are currently only stored in this browser tab, and may be lost if you close it.\n <br />\n <br />\n You should backup your keys.\n <br />\n <br />\n We recommend to import your keys into a key store service, to protect them and to use with other apps.\n {/* <br />\n <br />\n You can also export your keys and save them in your password manager. */}\n </p>\n <div class=\"ml-auto mr-auto mb-2 w-72\">\n <button-base onClick={() => this.handleContinue()} titleBtn=\"Import to key store\" />\n </div>\n <div class=\"ml-auto mr-auto w-72\">\n <button-base onClick={() => this.handleContinueKeyBackup()} titleBtn=\"Export keys\" />\n </div>\n </div>\n );\n }\n\n if (this.isKeyBackup) {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">Key export</h1>\n <p class=\"nl-description font-light text-sm pt-2 pb-2 max-w-96 mx-auto\">\n Copy your keys and store them in a safe place, like a password manager.\n <br />\n <br />\n You can sign into other Nostr apps by pasting your keys into them.\n <br />\n <br />\n Your keys must be kept secret, never share them with anyone.\n </p>\n <div class=\"max-w-72 mx-auto\">\n <div class=\"ml-auto mr-auto mb-2 w-72\">\n <button-base onClick={() => this.copyToClipboard()} titleBtn={this.isCopy ? 'Copied!' : 'Copy to clipboard'} />\n </div>\n </div>\n </div>\n );\n }\n\n const options = this.services.filter(s => s.canImport).map(s => ({ name: s.domain!, value: s.domain! }));\n\n return (\n <Fragment>\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">{this.titleImport}</h1>\n <p class=\"nl-description font-light text-center text-sm pt-2 max-w-96 mx-auto\">\n Your Nostr keys will be imported into the service you choose. You will manage your keys on their website.\n </p>\n </div>\n\n <div class=\"max-w-72 mx-auto mb-5\">\n <div class=\"mb-0.5\">\n <nl-select onSelectDomain={e => this.handleDomainSelect(e)} selected={0} options={options}></nl-select>\n </div>\n <p class=\"nl-title font-light text-sm mb-2\">Default provider is a fine choice to start with.</p>\n\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n\n <button-base disabled={state.isLoading} onClick={e => this.handleCreateAccount(e)} titleBtn=\"Start importing\">\n {state.isLoading ? (\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading inline-block w-4 h-4 border-[3px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n ) : (\n <svg slot=\"icon-start\" style={{ display: 'none' }} xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z\"\n />\n </svg>\n )}\n </button-base>\n </div>\n </Fragment>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-import-flow2.js","mappings":";;;;;AAAA,MAAM,eAAe,GAAG,4r3CAA4r3C,CAAC;AACrt3C,2BAAe,eAAe;;MCQjB,YAAY;;;;;;yBACc,mBAAmB;2BAClC,kBAAkB;wBACD,EAAE;2BAElB,KAAK;2BACL,KAAK;sBAEV,KAAK;;IAKvB,kBAAkB,CAAC,KAA0B;QAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,KA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,KAAK,EAAC,2IAA2I,EACjJ,IAAI,EAAC,QAAQ,gBACF,SAAS,GACd,KAER,WAAK,IAAI,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,IAC5J,8BACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,yMAAyM,GAC3M,CACE,CACP,CACW,CACV,CACG,EACX;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-import-flow/nl-import-flow.css?tag=nl-import-flow","src/components/nl-import-flow/nl-import-flow.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h, Fragment, State, Prop, Event, EventEmitter } from '@stencil/core';\nimport { state } from '@/store';\nimport { ConnectionString } from '@/types';\n\n@Component({\n tag: 'nl-import-flow',\n styleUrl: 'nl-import-flow.css',\n shadow: false,\n})\nexport class NlImportFlow {\n @Prop({ mutable: true }) titleInfo = 'Back up your keys';\n @Prop() titleImport = 'Choose a service';\n @Prop() services: ConnectionString[] = [];\n\n @State() isContinued = false;\n @State() isKeyBackup = false;\n\n @State() isCopy = false;\n\n @Event() nlImportAccount: EventEmitter<ConnectionString>;\n @Event() nlExportKeys: EventEmitter<void>;\n\n handleDomainSelect(event: CustomEvent<string>) {\n const s = this.services.find(s => s.domain === event.detail);\n state.nlImport = s;\n }\n\n handleCreateAccount(e: MouseEvent) {\n e.preventDefault();\n this.nlImportAccount.emit(state.nlImport);\n }\n\n handleContinue() {\n this.isContinued = true;\n }\n\n handleContinueKeyBackup() {\n this.isKeyBackup = true;\n }\n\n async copyToClipboard() {\n this.nlExportKeys.emit();\n this.isCopy = true;\n\n setTimeout(() => {\n this.isCopy = false;\n }, 1500);\n }\n\n render() {\n if (!this.isContinued && !this.isKeyBackup) {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">{this.titleInfo}</h1>\n <p class=\"nl-description font-light text-sm pt-2 pb-2 max-w-96 mx-auto\">\n Nostr profiles are controlled by cryptographic keys.\n <br />\n <br />\n Your keys are currently only stored in this browser tab, and may be lost if you close it.\n <br />\n <br />\n You should backup your keys.\n <br />\n <br />\n We recommend to import your keys into a key store service, to protect them and to use with other apps.\n {/* <br />\n <br />\n You can also export your keys and save them in your password manager. */}\n </p>\n <div class=\"ml-auto mr-auto mb-2 w-72\">\n <button-base onClick={() => this.handleContinue()} titleBtn=\"Import to key store\" />\n </div>\n <div class=\"ml-auto mr-auto w-72\">\n <button-base onClick={() => this.handleContinueKeyBackup()} titleBtn=\"Export keys\" />\n </div>\n </div>\n );\n }\n\n if (this.isKeyBackup) {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">Key export</h1>\n <p class=\"nl-description font-light text-sm pt-2 pb-2 max-w-96 mx-auto\">\n Copy your keys and store them in a safe place, like a password manager.\n <br />\n <br />\n You can sign into other Nostr apps by pasting your keys into them.\n <br />\n <br />\n Your keys must be kept secret, never share them with anyone.\n </p>\n <div class=\"max-w-72 mx-auto\">\n <div class=\"ml-auto mr-auto mb-2 w-72\">\n <button-base onClick={() => this.copyToClipboard()} titleBtn={this.isCopy ? 'Copied!' : 'Copy to clipboard'} />\n </div>\n </div>\n </div>\n );\n }\n\n const options = this.services.filter(s => s.canImport).map(s => ({ name: s.domain!, value: s.domain! }));\n\n return (\n <Fragment>\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">{this.titleImport}</h1>\n <p class=\"nl-description font-light text-center text-sm pt-2 max-w-96 mx-auto\">\n Your Nostr keys will be imported into the service you choose. You will manage your keys on their website.\n </p>\n </div>\n\n <div class=\"max-w-72 mx-auto mb-5\">\n <div class=\"mb-0.5\">\n <nl-select onSelectDomain={e => this.handleDomainSelect(e)} selected={0} options={options}></nl-select>\n </div>\n <p class=\"nl-title font-light text-sm mb-2\">Default provider is a fine choice to start with.</p>\n\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n\n <button-base disabled={state.isLoading} onClick={e => this.handleCreateAccount(e)} titleBtn=\"Start importing\">\n {state.isLoading ? (\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading inline-block w-4 h-4 border-[3px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n ) : (\n <svg slot=\"icon-start\" style={{ display: 'none' }} xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z\"\n />\n </svg>\n )}\n </button-base>\n </div>\n </Fragment>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-info-extension2.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,ks3CAAks3C,CAAC;AAC9t3C,8BAAe,kBAAkB;;MCOpB,eAAe;;;;;IAC1B,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC7B,KAAK,CAAC,kBAAkB,IACvB,eACE,UAAI,KAAK,EAAC,yCAAyC,oBAAmB,EACtE,WAAK,KAAK,EAAC,kCAAkC,IAC3C,YACE,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,6JAA6J,EACnK,IAAI,EAAC,QAAQ,gBACF,SAAS,GACd,CACJ,EACN,WAAK,KAAK,EAAC,2BAA2B,IACpC,SAAG,KAAK,EAAC,0DAA0D,IAAE,KAAK,CAAC,KAAK,CAAK,CACjF,CACF,KAEN,eACE,UAAI,KAAK,EAAC,yCAAyC,iCAAgC,EACnF,SAAG,KAAK,EAAC,qEAAqE,WACxE,GAAG,EACP,SAAG,IAAI,EAAC,qBAAqB,EAAC,MAAM,EAAC,QAAQ,WAEzC,OACF,GAAG,EACL,SAAG,IAAI,EAAC,iFAAiF,EAAC,MAAM,EAAC,QAAQ,YAErG,EAAC,GAAG,QACL,GAAG,EACN,SAAG,IAAI,EAAC,oDAAoD,EAAC,MAAM,EAAC,QAAQ,cAExE,CACF,CACA,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-info-extension/nl-info-extension.css?tag=nl-info-extension","src/components/nl-info-extension/nl-info-extension.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h } from '@stencil/core';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-info-extension',\n styleUrl: 'nl-info-extension.css',\n shadow: false,\n})\nexport class NlInfoExtension {\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n {state.isLoadingExtension ? (\n <div>\n <h1 class=\"nl-title font-bold text-center text-4xl\">Signing in...</h1>\n <div class=\"mt-10 mb-10 ml-auto mr-auto w-20\">\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading ml-auto mr-auto inline-block w-20 h-20 border-[4px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n </div>\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n </div>\n ) : (\n <div>\n <h1 class=\"nl-title font-bold text-center text-4xl\">Install browser extension!</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">\n Try{' '}\n <a href=\"https://getalby.com\" target=\"_blank\">\n Alby\n </a>\n ,{' '}\n <a href=\"https://chromewebstore.google.com/detail/nos2x/kpgefcfmnafjgpblomihpgmejjdanjjp\" target=\"_blank\">\n nos2x\n </a>{' '}\n or{' '}\n <a href=\"https://apps.apple.com/us/app/nostore/id1666553677\" target=\"_blank\">\n Nostore\n </a>\n </p>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-info-extension2.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,4r3CAA4r3C,CAAC;AACxt3C,8BAAe,kBAAkB;;MCOpB,eAAe;;;;;IAC1B,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC7B,KAAK,CAAC,kBAAkB,IACvB,eACE,UAAI,KAAK,EAAC,yCAAyC,oBAAmB,EACtE,WAAK,KAAK,EAAC,kCAAkC,IAC3C,YACE,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,6JAA6J,EACnK,IAAI,EAAC,QAAQ,gBACF,SAAS,GACd,CACJ,EACN,WAAK,KAAK,EAAC,2BAA2B,IACpC,SAAG,KAAK,EAAC,0DAA0D,IAAE,KAAK,CAAC,KAAK,CAAK,CACjF,CACF,KAEN,eACE,UAAI,KAAK,EAAC,yCAAyC,iCAAgC,EACnF,SAAG,KAAK,EAAC,qEAAqE,WACxE,GAAG,EACP,SAAG,IAAI,EAAC,qBAAqB,EAAC,MAAM,EAAC,QAAQ,WAEzC,OACF,GAAG,EACL,SAAG,IAAI,EAAC,iFAAiF,EAAC,MAAM,EAAC,QAAQ,YAErG,EAAC,GAAG,QACL,GAAG,EACN,SAAG,IAAI,EAAC,oDAAoD,EAAC,MAAM,EAAC,QAAQ,cAExE,CACF,CACA,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-info-extension/nl-info-extension.css?tag=nl-info-extension","src/components/nl-info-extension/nl-info-extension.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h } from '@stencil/core';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-info-extension',\n styleUrl: 'nl-info-extension.css',\n shadow: false,\n})\nexport class NlInfoExtension {\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n {state.isLoadingExtension ? (\n <div>\n <h1 class=\"nl-title font-bold text-center text-4xl\">Signing in...</h1>\n <div class=\"mt-10 mb-10 ml-auto mr-auto w-20\">\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading ml-auto mr-auto inline-block w-20 h-20 border-[4px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n </div>\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n </div>\n ) : (\n <div>\n <h1 class=\"nl-title font-bold text-center text-4xl\">Install browser extension!</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">\n Try{' '}\n <a href=\"https://getalby.com\" target=\"_blank\">\n Alby\n </a>\n ,{' '}\n <a href=\"https://chromewebstore.google.com/detail/nos2x/kpgefcfmnafjgpblomihpgmejjdanjjp\" target=\"_blank\">\n nos2x\n </a>{' '}\n or{' '}\n <a href=\"https://apps.apple.com/us/app/nostore/id1666553677\" target=\"_blank\">\n Nostore\n </a>\n </p>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-info2.js","mappings":";;AAAA,MAAM,SAAS,GAAG,ks3CAAks3C,CAAC;AACrt3C,qBAAe,SAAS;;MCMX,MAAM;;;;;IACjB,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,4DAAK,KAAK,EAAC,wBAAwB,EAAC,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,OAAO,EAAC,aAAa,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,IAC/H,6DAAM,KAAK,EAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAC,EAAE,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,GAAG,EAC5D,6DACE,CAAC,EAAC,o1BAAo1B,EACt1B,IAAI,EAAC,OAAO,GACZ,CACE,EACN,2DAAI,KAAK,EAAC,yCAAyC,cAC3C,6DAAM,KAAK,EAAC,YAAY,YAAa,CACxC,EACL,0DAAG,KAAK,EAAC,yFAAyF,sBAAoB,EACtH,0DAAG,KAAK,EAAC,qEAAqE,8BACrD,GAAG,EAC1B,0DAAG,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,mBAAmB,WAEvC,OACH,4DAAM,gBACI,GAAG,EACd,0DAAG,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,0CAA0C,kBAE9D,EAAC,GAAG,aACA,GAAG,EACX,0DAAG,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,oBAAoB,iBAExC,MAEF,CACA,EACN;KACH;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-info/nl-info.css?tag=nl-info","src/components/nl-info/nl-info.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'nl-info',\n styleUrl: 'nl-info.css',\n shadow: false,\n})\nexport class NlInfo {\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <svg class=\"w-12 h-12 mx-auto mb-2\" width=\"225\" height=\"224\" viewBox=\"0 0 225 224\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"224.047\" height=\"224\" rx=\"64\" fill=\"#6951FA\" />\n <path\n d=\"M162.441 135.941V88.0593C170.359 85.1674 176 77.5348 176 68.6696C176 57.2919 166.708 48 155.33 48C143.953 48 134.661 57.2444 134.661 68.6696C134.661 77.5822 140.302 85.1674 148.219 88.0593V135.941C147.698 136.13 147.176 136.367 146.655 136.604L87.3956 77.3452C88.6282 74.6904 89.2919 71.7511 89.2919 68.6696C89.2919 57.2444 80.0474 48 68.6696 48C57.2919 48 48 57.2444 48 68.6696C48 77.5822 53.6415 85.1674 61.5585 88.0593V135.941C53.6415 138.833 48 146.465 48 155.33C48 166.708 57.2444 176 68.6696 176C80.0948 176 89.3393 166.708 89.3393 155.33C89.3393 146.418 83.6978 138.833 75.7807 135.941V88.0593C76.3022 87.8696 76.8237 87.6326 77.3452 87.3956L136.604 146.655C135.372 149.31 134.708 152.249 134.708 155.33C134.708 166.708 143.953 176 155.378 176C166.803 176 176.047 166.708 176.047 155.33C176.047 146.418 170.406 138.833 162.489 135.941H162.441Z\"\n fill=\"white\"\n />\n </svg>\n <h1 class=\"nl-title font-bold text-center text-4xl\">\n Nostr <span class=\"font-light\">Login</span>\n </h1>\n <p class=\"text-green-800 dark:text-green-200 font-light text-center text-lg pt-2 max-w-96 mx-auto\">Version: 1.7.11</p>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">\n Learn more about Nostr{' '}\n <a target=\"_blank\" href=\"https://nostr.how\">\n here\n </a>\n .<br />\n This is an{' '}\n <a target=\"_blank\" href=\"https://github.com/nostrband/nostr-login\">\n open-source\n </a>{' '}\n tool by{' '}\n <a target=\"_blank\" href=\"https://nostr.band\">\n Nostr.Band\n </a>\n .\n </p>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-info2.js","mappings":";;AAAA,MAAM,SAAS,GAAG,4r3CAA4r3C,CAAC;AAC/s3C,qBAAe,SAAS;;MCMX,MAAM;;;;;IACjB,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,4DAAK,KAAK,EAAC,wBAAwB,EAAC,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,OAAO,EAAC,aAAa,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,IAC/H,6DAAM,KAAK,EAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAC,EAAE,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,GAAG,EAC5D,6DACE,CAAC,EAAC,o1BAAo1B,EACt1B,IAAI,EAAC,OAAO,GACZ,CACE,EACN,2DAAI,KAAK,EAAC,yCAAyC,cAC3C,6DAAM,KAAK,EAAC,YAAY,YAAa,CACxC,EACL,0DAAG,KAAK,EAAC,yFAAyF,sBAAoB,EACtH,0DAAG,KAAK,EAAC,qEAAqE,8BACrD,GAAG,EAC1B,0DAAG,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,mBAAmB,WAEvC,OACH,4DAAM,gBACI,GAAG,EACd,0DAAG,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,0CAA0C,kBAE9D,EAAC,GAAG,aACA,GAAG,EACX,0DAAG,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,oBAAoB,iBAExC,MAEF,CACA,EACN;KACH;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-info/nl-info.css?tag=nl-info","src/components/nl-info/nl-info.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'nl-info',\n styleUrl: 'nl-info.css',\n shadow: false,\n})\nexport class NlInfo {\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <svg class=\"w-12 h-12 mx-auto mb-2\" width=\"225\" height=\"224\" viewBox=\"0 0 225 224\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"224.047\" height=\"224\" rx=\"64\" fill=\"#6951FA\" />\n <path\n d=\"M162.441 135.941V88.0593C170.359 85.1674 176 77.5348 176 68.6696C176 57.2919 166.708 48 155.33 48C143.953 48 134.661 57.2444 134.661 68.6696C134.661 77.5822 140.302 85.1674 148.219 88.0593V135.941C147.698 136.13 147.176 136.367 146.655 136.604L87.3956 77.3452C88.6282 74.6904 89.2919 71.7511 89.2919 68.6696C89.2919 57.2444 80.0474 48 68.6696 48C57.2919 48 48 57.2444 48 68.6696C48 77.5822 53.6415 85.1674 61.5585 88.0593V135.941C53.6415 138.833 48 146.465 48 155.33C48 166.708 57.2444 176 68.6696 176C80.0948 176 89.3393 166.708 89.3393 155.33C89.3393 146.418 83.6978 138.833 75.7807 135.941V88.0593C76.3022 87.8696 76.8237 87.6326 77.3452 87.3956L136.604 146.655C135.372 149.31 134.708 152.249 134.708 155.33C134.708 166.708 143.953 176 155.378 176C166.803 176 176.047 166.708 176.047 155.33C176.047 146.418 170.406 138.833 162.489 135.941H162.441Z\"\n fill=\"white\"\n />\n </svg>\n <h1 class=\"nl-title font-bold text-center text-4xl\">\n Nostr <span class=\"font-light\">Login</span>\n </h1>\n <p class=\"text-green-800 dark:text-green-200 font-light text-center text-lg pt-2 max-w-96 mx-auto\">Version: 1.7.11</p>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">\n Learn more about Nostr{' '}\n <a target=\"_blank\" href=\"https://nostr.how\">\n here\n </a>\n .<br />\n This is an{' '}\n <a target=\"_blank\" href=\"https://github.com/nostrband/nostr-login\">\n open-source\n </a>{' '}\n tool by{' '}\n <a target=\"_blank\" href=\"https://nostr.band\">\n Nostr.Band\n </a>\n .\n </p>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-loading2.js","mappings":";;;;;AAAA,MAAM,YAAY,GAAG,ks3CAAks3C,CAAC;AACxt3C,wBAAe,YAAY;;MCQd,SAAS;;;;;;;;IAKpB,UAAU,CAAC,CAAC;QACV,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;KAC9B;IAED,mBAAmB,CAAC,CAAC;QACnB,CAAC,CAAC,cAAc,EAAE,CAAC;;QAEnB,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;KAC5B;IAED,MAAM;QACJ,IAAI,KAAK,GAAG,eAAe,CAAC;QAC5B,IAAI,IAAI,GAAG,8CAA8C,CAAC;QAC1D,IAAI,KAAK,CAAC,WAAW,EAAE;YACrB,KAAK,GAAG,EAAE,CAAC;YACX,IAAI,GAAG,EAAE,CA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Q,GAAG,EAAE,SAAS,EAAE,KAAK,EAAC,OAAO,EAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAW,CACzH,CACP,EACA,KAAK,CAAC,WAAW,KAChB,4DAAK,KAAK,EAAC,0CAA0C,IACnD,+DAAQ,MAAM,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,GAAW,CACnH,CACP,EACA,UAAU,KACT,4DAAK,KAAK,EAAC,2BAA2B,IACpC,oEACE,OAAO,EAAE,CAAC;gBACR,IAAI,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;oBACrC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;iBAC7B;qBAAM;oBACL,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;iBACpB;aACF,EACD,QAAQ,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,UAAU,GAAG,QAAQ,GAClD,CACE,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-loading/nl-loading.css?tag=nl-loading","src/components/nl-loading/nl-loading.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\nimport { state } from '@/store';\nimport { CURRENT_MODULE } from '@/types';\n\n@Component({\n tag: 'nl-loading',\n styleUrl: 'nl-loading.css',\n shadow: false,\n})\nexport class NlLoading {\n @Event() stopFetchHandler: EventEmitter<boolean>;\n @Event() handleContinue: EventEmitter<boolean>;\n @Prop() path: string;\n\n handleStop(e) {\n e.preventDefault();\n this.stopFetchHandler.emit();\n }\n\n handleContinueClick(e) {\n e.preventDefault();\n // reset();\n this.handleContinue.emit();\n }\n\n render() {\n let title = 'Connecting...';\n let text = 'Establishing connection to your key storage.';\n if (state.njumpIframe) {\n title = '';\n text = '';\n } else if (this.path === CURRENT_MODULE.LOCAL_SIGNUP) {\n title = 'Creating...';\n text = 'Publishing your profile on Nostr.';\n } else if (state.authUrl) {\n if (state.isLoading) {\n title = 'Confirming...';\n text = 'Please confirm the connection in your key storage app.';\n } else {\n title = 'Almost ready!';\n text = 'Continue to confirm the connection to your key storage.';\n }\n }\n\n const showButton = this.path !== CURRENT_MODULE.LOCAL_SIGNUP;\n const showIframe = !state.isLoading && state.iframeUrl && state.authUrl;\n const iframeUrl = state.iframeUrl ? `${state.iframeUrl}?connect=${encodeURIComponent(state.authUrl)}` : '';\n\n return (\n <div class=\"p-4 overflow-y-auto\">\n {title && <h1 class=\"nl-title font-bold text-center text-4xl\">{title}</h1>}\n {text && <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{text}</p>}\n {!state.njumpIframe && !state.authUrl && state.isLoading && (\n <div class=\"mt-10 mb-10 ml-auto mr-auto w-20\">\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading ml-auto mr-auto inline-block w-20 h-20 border-[4px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n </div>\n )}\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n {iframeUrl && (\n <div class=\"mt-3 ml-auto mr-auto w-72 flex justify-center\">\n <iframe src={iframeUrl} width=\"180px\" height=\"80px\" style={{ display: showIframe ? 'block' : 'none', border: '0' }}></iframe>\n </div>\n )}\n {state.njumpIframe && (\n <div class=\"mt-3 ml-auto mr-auto flex justify-center\">\n <iframe srcdoc={state.njumpIframe} width=\"600px\" style={{ border: '0', height: '80vh', borderRadius: '8px' }}></iframe>\n </div>\n )}\n {showButton && (\n <div class=\"mt-3 ml-auto mr-auto w-72\">\n <button-base\n onClick={e => {\n if (state.authUrl && !state.isLoading) {\n this.handleContinueClick(e);\n } else {\n this.handleStop(e);\n }\n }}\n titleBtn={!state.isLoading ? 'Continue' : 'Cancel'}\n />\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-loading2.js","mappings":";;;;;AAAA,MAAM,YAAY,GAAG,4r3CAA4r3C,CAAC;AAClt3C,wBAAe,YAAY;;MCQd,SAAS;;;;;;;;IAKpB,UAAU,CAAC,CAAC;QACV,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;KAC9B;IAED,mBAAmB,CAAC,CAAC;QACnB,CAAC,CAAC,cAAc,EAAE,CAAC;;QAEnB,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;KAC5B;IAED,MAAM;QACJ,IAAI,KAAK,GAAG,eAAe,CAAC;QAC5B,IAAI,IAAI,GAAG,8CAA8C,CAAC;QAC1D,IAAI,KAAK,CAAC,WAAW,EAAE;YACrB,KAAK,GAAG,EAAE,CAAC;YACX,IAAI,GAAG,EAAE,CAAC;SACX;aAAM,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,YAAY,EAAE;YACpD,KAAK,GAAG,aAAa,CAAC;YACtB,IAAI,GAAG,mCAAmC,CAAC;SAC5C;aAAM,IAAI,KAAK,CAAC,OAAO,EAAE;YACxB,IAAI,KAAK,CAAC,SAAS,EAAE;gBACnB,KAAK,GAAG,eAAe,CAAC;gBACxB,IAAI,GAAG,wDAAwD,CAAC;aACjE;iBAAM;gBACL,KAAK,GAAG,eAAe,CAAC;gBACxB,IAAI,GAAG,yDAAyD,CAAC;aAClE;SACF;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,YAAY,CAAC;QAC7D,MAAM,UAAU,GAAG,CAAC,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,IAAI,KA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C,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;oBACrC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;iBAC7B;qBAAM;oBACL,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;iBACpB;aACF,EACD,QAAQ,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,UAAU,GAAG,QAAQ,GAClD,CACE,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-loading/nl-loading.css?tag=nl-loading","src/components/nl-loading/nl-loading.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\nimport { state } from '@/store';\nimport { CURRENT_MODULE } from '@/types';\n\n@Component({\n tag: 'nl-loading',\n styleUrl: 'nl-loading.css',\n shadow: false,\n})\nexport class NlLoading {\n @Event() stopFetchHandler: EventEmitter<boolean>;\n @Event() handleContinue: EventEmitter<boolean>;\n @Prop() path: string;\n\n handleStop(e) {\n e.preventDefault();\n this.stopFetchHandler.emit();\n }\n\n handleContinueClick(e) {\n e.preventDefault();\n // reset();\n this.handleContinue.emit();\n }\n\n render() {\n let title = 'Connecting...';\n let text = 'Establishing connection to your key storage.';\n if (state.njumpIframe) {\n title = '';\n text = '';\n } else if (this.path === CURRENT_MODULE.LOCAL_SIGNUP) {\n title = 'Creating...';\n text = 'Publishing your profile on Nostr.';\n } else if (state.authUrl) {\n if (state.isLoading) {\n title = 'Confirming...';\n text = 'Please confirm the connection in your key storage app.';\n } else {\n title = 'Almost ready!';\n text = 'Continue to confirm the connection to your key storage.';\n }\n }\n\n const showButton = this.path !== CURRENT_MODULE.LOCAL_SIGNUP;\n const showIframe = !state.isLoading && state.iframeUrl && state.authUrl;\n const iframeUrl = state.iframeUrl ? `${state.iframeUrl}?connect=${encodeURIComponent(state.authUrl)}` : '';\n\n return (\n <div class=\"p-4 overflow-y-auto\">\n {title && <h1 class=\"nl-title font-bold text-center text-4xl\">{title}</h1>}\n {text && <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{text}</p>}\n {!state.njumpIframe && !state.authUrl && state.isLoading && (\n <div class=\"mt-10 mb-10 ml-auto mr-auto w-20\">\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading ml-auto mr-auto inline-block w-20 h-20 border-[4px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n </div>\n )}\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n {iframeUrl && (\n <div class=\"mt-3 ml-auto mr-auto w-72 flex justify-center\">\n <iframe src={iframeUrl} width=\"180px\" height=\"80px\" style={{ display: showIframe ? 'block' : 'none', border: '0' }}></iframe>\n </div>\n )}\n {state.njumpIframe && (\n <div class=\"mt-3 ml-auto mr-auto flex justify-center\">\n <iframe srcdoc={state.njumpIframe} width=\"600px\" style={{ border: '0', height: '80vh', borderRadius: '8px' }}></iframe>\n </div>\n )}\n {showButton && (\n <div class=\"mt-3 ml-auto mr-auto w-72\">\n <button-base\n onClick={e => {\n if (state.authUrl && !state.isLoading) {\n this.handleContinueClick(e);\n } else {\n this.handleStop(e);\n }\n }}\n titleBtn={!state.isLoading ? 'Continue' : 'Cancel'}\n />\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-local-signup2.js","mappings":";;;;AAAA,MAAM,gBAAgB,GAAG,ks3CAAks3C,CAAC;AAC5t3C,4BAAe,gBAAgB;;MCOlB,aAAa;;;;;;;2BACF,sBAAsB;2BACtB,sDAAsD;gCACjD,sDAAsD;2BAC3D,KAAK;2BAEJ,KAAK;;IAO5B,iBAAiB,CAAC,KAAY;QAC5B,KAAK,CAAC,QAAQ,CAAC,UAAU,GAAI,KAAK,CAAC,MAA2B,CAAC,KAAK,CAAC;;KAEtE;IAED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EAAa,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,WAAW,GAAG,aAAa,GAAG,gBAAgB,IAC7I,KAAK,CAAC,SAAS,IACd,YACE,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,2IAA2I,EACjJ,IAAI,EAAC,QAAQ,gBACF,SAAS,GACd,KAER,WAAK,IAAI,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,IAC5J,8BACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,yMAAyM,GAC3M,CACE,CACP,CACW,CACV,CACG,EACX;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-local-signup/nl-local-signup.css?tag=nl-local-signup","src/components/nl-local-signup/nl-local-signup.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h, Fragment, State, Prop, Event, EventEmitter } from '@stencil/core';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-local-signup',\n styleUrl: 'nl-local-signup.css',\n shadow: false,\n})\nexport class NlLocalSignup {\n @Prop() titleSignup = 'Create Nostr profile';\n @Prop() description = 'Choose any username, you can always change it later.';\n @Prop() descriptionNjump = 'Proceed to creating your Nostr profile in a new tab.';\n @Prop() signupNjump = false;\n\n @State() isAvailable = false;\n\n @Event() nlLocalSignup: EventEmitter<string>;\n @Event() nlSignupNjump: EventEmitter<void>;\n // @Event() nlCheckSignup: EventEmitter<string>;\n @Event() fetchHandler: EventEmitter<boolean>;\n\n handleInputChange(event: Event) {\n state.nlSignup.signupName = (event.target as HTMLInputElement).value;\n // this.nlCheckSignup.emit(`${(event.target as HTMLInputElement).value}@${state.nlSignup.domain}`);\n }\n\n handleCreateAccount(e: MouseEvent) {\n e.preventDefault();\n\n if (this.signupNjump) {\n this.nlSignupNjump.emit();\n } else {\n this.nlLocalSignup.emit(`${state.nlSignup.signupName}`);\n }\n }\n\n render() {\n return (\n <Fragment>\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">{this.titleSignup}</h1>\n <p class=\"nl-description font-light text-center text-sm pt-2 max-w-96 mx-auto\">{this.signupNjump ? this.descriptionNjump : this.description}</p>\n </div>\n\n <div class=\"max-w-72 mx-auto\">\n {!this.signupNjump && (\n <div class=\"relative mb-2\">\n <input\n onInput={e => this.handleInputChange(e)}\n type=\"text\"\n class=\"nl-input peer py-3 px-4 ps-11 block w-full border-transparent rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none dark:border-transparent\"\n placeholder=\"Enter username\"\n value={state.nlSignup.signupName}\n />\n <div class=\"absolute inset-y-0 start-0 flex items-center pointer-events-none ps-4 peer-disabled:opacity-50 peer-disabled:pointer-events-none\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"2\"\n stroke={this.isAvailable ? '#00cc00' : 'currentColor'}\n class=\"flex-shrink-0 w-4 h-4 text-gray-500\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z\"\n />\n </svg>\n </div>\n </div>\n )}\n\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n\n <button-base disabled={state.isLoading} onClick={e => this.handleCreateAccount(e)} titleBtn={this.signupNjump ? 'Get started' : 'Create profile'}>\n {state.isLoading ? (\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading inline-block w-4 h-4 border-[3px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n ) : (\n <svg slot=\"icon-start\" style={{ display: 'none' }} xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z\"\n />\n </svg>\n )}\n </button-base>\n </div>\n </Fragment>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-local-signup2.js","mappings":";;;;AAAA,MAAM,gBAAgB,GAAG,4r3CAA4r3C,CAAC;AACtt3C,4BAAe,gBAAgB;;MCOlB,aAAa;;;;;;;2BACF,sBAAsB;2BACtB,sDAAsD;gCACjD,sDAAsD;2BAC3D,KAAK;2BAEJ,KAAK;;IAO5B,iBAAiB,CAAC,KAAY;QAC5B,KAAK,CAAC,QAAQ,CAAC,UAAU,GAAI,KAAK,CAAC,MAA2B,CAAC,KAAK,CAAC;;KAEtE;IAED,mBAAmB,CAAC,CAAa;QAC/B,CAAC,CAAC,cAAc,EAAE,CAAC;QAEnB,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;SAC3B;aAAM;YACL,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;SACzD;KACF;IAED,MAAM;QACJ,QACE,EAAC,QAAQ,uDACP,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,2DAAI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AAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,IAC5J,8BACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,yMAAyM,GAC3M,CACE,CACP,CACW,CACV,CACG,EACX;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-local-signup/nl-local-signup.css?tag=nl-local-signup","src/components/nl-local-signup/nl-local-signup.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h, Fragment, State, Prop, Event, EventEmitter } from '@stencil/core';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-local-signup',\n styleUrl: 'nl-local-signup.css',\n shadow: false,\n})\nexport class NlLocalSignup {\n @Prop() titleSignup = 'Create Nostr profile';\n @Prop() description = 'Choose any username, you can always change it later.';\n @Prop() descriptionNjump = 'Proceed to creating your Nostr profile in a new tab.';\n @Prop() signupNjump = false;\n\n @State() isAvailable = false;\n\n @Event() nlLocalSignup: EventEmitter<string>;\n @Event() nlSignupNjump: EventEmitter<void>;\n // @Event() nlCheckSignup: EventEmitter<string>;\n @Event() fetchHandler: EventEmitter<boolean>;\n\n handleInputChange(event: Event) {\n state.nlSignup.signupName = (event.target as HTMLInputElement).value;\n // this.nlCheckSignup.emit(`${(event.target as HTMLInputElement).value}@${state.nlSignup.domain}`);\n }\n\n handleCreateAccount(e: MouseEvent) {\n e.preventDefault();\n\n if (this.signupNjump) {\n this.nlSignupNjump.emit();\n } else {\n this.nlLocalSignup.emit(`${state.nlSignup.signupName}`);\n }\n }\n\n render() {\n return (\n <Fragment>\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">{this.titleSignup}</h1>\n <p class=\"nl-description font-light text-center text-sm pt-2 max-w-96 mx-auto\">{this.signupNjump ? this.descriptionNjump : this.description}</p>\n </div>\n\n <div class=\"max-w-72 mx-auto\">\n {!this.signupNjump && (\n <div class=\"relative mb-2\">\n <input\n onInput={e => this.handleInputChange(e)}\n type=\"text\"\n class=\"nl-input peer py-3 px-4 ps-11 block w-full border-transparent rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none dark:border-transparent\"\n placeholder=\"Enter username\"\n value={state.nlSignup.signupName}\n />\n <div class=\"absolute inset-y-0 start-0 flex items-center pointer-events-none ps-4 peer-disabled:opacity-50 peer-disabled:pointer-events-none\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"2\"\n stroke={this.isAvailable ? '#00cc00' : 'currentColor'}\n class=\"flex-shrink-0 w-4 h-4 text-gray-500\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z\"\n />\n </svg>\n </div>\n </div>\n )}\n\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n\n <button-base disabled={state.isLoading} onClick={e => this.handleCreateAccount(e)} titleBtn={this.signupNjump ? 'Get started' : 'Create profile'}>\n {state.isLoading ? (\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading inline-block w-4 h-4 border-[3px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n ) : (\n <svg slot=\"icon-start\" style={{ display: 'none' }} xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z\"\n />\n </svg>\n )}\n </button-base>\n </div>\n </Fragment>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-nip46-relay-settings2.js","mappings":";;AAAA,MAAM,uBAAuB,GAAG,8q3CAA8q3C,CAAC;AAC/s3C,mCAAe,uBAAuB;;ACCtC;AACA,MAAM,sBAAsB,GAAG,CAAC,uBAAuB,EAAE,+BAA+B,CAAC,CAAC;MAO7E,oBAAoB;;;;;6BAEG,CAAC,GAAG,sBAAsB,CAAC;sBAEjC,EAAE;wBACF,EAAE;4BACG,KAAK;;IAItC,iBAAiB;QACf,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;KACvC;IAED,QAAQ;QACN,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,IAAI,KAAK,KAAK,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE;YACtE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;gBAChC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBACtC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;gBACnB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACxC;SACF;KACF;IAED,WAAW,CAAC,KAAa;QACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,CAAC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B,OAAO,EAAE,CAAC,KAAK,IAAI,CAAC,QAAQ,GAAI,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,EACpE,UAAU,EAAE,CAAC;gBACX,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;oBACrB,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACjB;aACF,GACD,EACF,+DAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,qFAAqF,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,UAEvI,CACL,CACF,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-nip46-relay-settings/nl-nip46-relay-settings.css?tag=nl-nip46-relay-settings","src/components/nl-nip46-relay-settings/nl-nip46-relay-settings.tsx"],"sourcesContent":[".nip46-relay-settings {\n /* スタイルは既存のコンポーネントを参考に必要に応じて追加 */\n}\n","import { Component, h, State, Event, EventEmitter, Prop } from '@stencil/core';\n\n/** リセット時に戻すハードコード済みデフォルトリレー */\nconst FACTORY_DEFAULT_RELAYS = ['wss://relay.nsec.app/', 'wss://ephemeral.snowflare.cc/'];\n\n@Component({\n tag: 'nl-nip46-relay-settings',\n styleUrl: 'nl-nip46-relay-settings.css',\n shadow: false,\n})\nexport class NlNip46RelaySettings {\n /** 親から渡される現在のリレーリスト(localStorage由来の場合あり) */\n @Prop() defaultRelays: string[] = [...FACTORY_DEFAULT_RELAYS];\n\n @State() relays: string[] = [];\n @State() newRelay: string = '';\n @State() showSettings: boolean = false;\n\n @Event() nlRelaysChanged: EventEmitter<string[]>;\n\n componentWillLoad() {\n this.relays = [...this.defaultRelays];\n }\n\n addRelay() {\n const relay = this.newRelay.trim();\n if (relay && (relay.startsWith('wss://') || relay.startsWith('ws://'))) {\n if (!this.relays.includes(relay)) {\n this.relays = [...this.relays, relay];\n this.newRelay = '';\n this.nlRelaysChanged.emit(this.relays);\n }\n }\n }\n\n removeRelay(index: number) {\n this.relays = this.relays.filter((_, i) => i !== index);\n this.nlRelaysChanged.emit(this.relays);\n }\n\n resetToDefaults() {\n this.relays = [...FACTORY_DEFAULT_RELAYS];\n this.nlRelaysChanged.emit(this.relays);\n }\n\n render() {\n return (\n <div class=\"nip46-relay-settings mb-4\">\n <button\n type=\"button\"\n class=\"text-xs text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 underline cursor-pointer\"\n onClick={() => (this.showSettings = !this.showSettings)}\n >\n {this.showSettings ? '▼' : '▶'} Advanced: Relay Settings\n </button>\n\n {this.showSettings && (\n <div class=\"mt-2 p-3 border border-gray-300 dark:border-gray-600 rounded bg-gray-50 dark:bg-gray-800\">\n <div class=\"flex justify-between items-center mb-2\">\n <div class=\"text-xs font-semibold text-gray-700 dark:text-gray-300\">Nip46 Relays:</div>\n <button\n type=\"button\"\n class=\"text-xs text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300 underline cursor-pointer\"\n onClick={() => this.resetToDefaults()}\n >\n Reset to defaults\n </button>\n </div>\n\n <ul class=\"text-xs mb-3 space-y-1\">\n {this.relays.map((relay, index) => (\n <li class=\"flex justify-between items-center py-1 px-2 bg-white dark:bg-gray-700 rounded\">\n <span class=\"truncate text-gray-700 dark:text-gray-300 flex-1\">{relay}</span>\n <button\n type=\"button\"\n class=\"ml-2 text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 font-bold cursor-pointer\"\n onClick={() => this.removeRelay(index)}\n title=\"Remove relay\"\n >\n ✕\n </button>\n </li>\n ))}\n </ul>\n\n <div class=\"flex gap-2\">\n <input\n type=\"text\"\n class=\"flex-1 text-xs px-2 py-1.5 border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100\"\n placeholder=\"wss://relay.example.com\"\n value={this.newRelay}\n onInput={e => (this.newRelay = (e.target as HTMLInputElement).value)}\n onKeyPress={e => {\n if (e.key === 'Enter') {\n e.preventDefault();\n this.addRelay();\n }\n }}\n />\n <button type=\"button\" class=\"text-xs px-3 py-1.5 bg-blue-500 hover:bg-blue-600 text-white rounded cursor-pointer\" onClick={() => this.addRelay()}>\n Add\n </button>\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-nip46-relay-settings2.js","mappings":";;AAAA,MAAM,uBAAuB,GAAG,wq3CAAwq3C,CAAC;AACzs3C,mCAAe,uBAAuB;;ACCtC;AACA,MAAM,sBAAsB,GAAG,CAAC,uBAAuB,EAAE,+BAA+B,CAAC,CAAC;MAO7E,oBAAoB;;;;;6BAEG,CAAC,GAAG,sBAAsB,CAAC;sBAEjC,EAAE;wBACF,EAAE;4BACG,KAAK;;IAItC,iBAAiB;QACf,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;KACvC;IAED,QAAQ;QACN,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,IAAI,KAAK,KAAK,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE;YACtE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;gBAChC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBACtC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;gBACnB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACxC;SACF;KACF;IAED,WAAW,CAAC,KAAa;QACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,CAAC;QACxD,IAAI,CAAC,eAAe,CAAC,IAAI,CA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AAQ,GAAI,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,EACpE,UAAU,EAAE,CAAC;gBACX,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;oBACrB,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACjB;aACF,GACD,EACF,+DAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,qFAAqF,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,UAEvI,CACL,CACF,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-nip46-relay-settings/nl-nip46-relay-settings.css?tag=nl-nip46-relay-settings","src/components/nl-nip46-relay-settings/nl-nip46-relay-settings.tsx"],"sourcesContent":[".nip46-relay-settings {\n /* スタイルは既存のコンポーネントを参考に必要に応じて追加 */\n}\n","import { Component, h, State, Event, EventEmitter, Prop } from '@stencil/core';\n\n/** リセット時に戻すハードコード済みデフォルトリレー */\nconst FACTORY_DEFAULT_RELAYS = ['wss://relay.nsec.app/', 'wss://ephemeral.snowflare.cc/'];\n\n@Component({\n tag: 'nl-nip46-relay-settings',\n styleUrl: 'nl-nip46-relay-settings.css',\n shadow: false,\n})\nexport class NlNip46RelaySettings {\n /** 親から渡される現在のリレーリスト(localStorage由来の場合あり) */\n @Prop() defaultRelays: string[] = [...FACTORY_DEFAULT_RELAYS];\n\n @State() relays: string[] = [];\n @State() newRelay: string = '';\n @State() showSettings: boolean = false;\n\n @Event() nlRelaysChanged: EventEmitter<string[]>;\n\n componentWillLoad() {\n this.relays = [...this.defaultRelays];\n }\n\n addRelay() {\n const relay = this.newRelay.trim();\n if (relay && (relay.startsWith('wss://') || relay.startsWith('ws://'))) {\n if (!this.relays.includes(relay)) {\n this.relays = [...this.relays, relay];\n this.newRelay = '';\n this.nlRelaysChanged.emit(this.relays);\n }\n }\n }\n\n removeRelay(index: number) {\n this.relays = this.relays.filter((_, i) => i !== index);\n this.nlRelaysChanged.emit(this.relays);\n }\n\n resetToDefaults() {\n this.relays = [...FACTORY_DEFAULT_RELAYS];\n this.nlRelaysChanged.emit(this.relays);\n }\n\n render() {\n return (\n <div class=\"nip46-relay-settings mb-4\">\n <button\n type=\"button\"\n class=\"text-xs text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 underline cursor-pointer\"\n onClick={() => (this.showSettings = !this.showSettings)}\n >\n {this.showSettings ? '▼' : '▶'} Advanced: Relay Settings\n </button>\n\n {this.showSettings && (\n <div class=\"mt-2 p-3 border border-gray-300 dark:border-gray-600 rounded bg-gray-50 dark:bg-gray-800\">\n <div class=\"flex justify-between items-center mb-2\">\n <div class=\"text-xs font-semibold text-gray-700 dark:text-gray-300\">Nip46 Relays:</div>\n <button\n type=\"button\"\n class=\"text-xs text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300 underline cursor-pointer\"\n onClick={() => this.resetToDefaults()}\n >\n Reset to defaults\n </button>\n </div>\n\n <ul class=\"text-xs mb-3 space-y-1\">\n {this.relays.map((relay, index) => (\n <li class=\"flex justify-between items-center py-1 px-2 bg-white dark:bg-gray-700 rounded\">\n <span class=\"truncate text-gray-700 dark:text-gray-300 flex-1\">{relay}</span>\n <button\n type=\"button\"\n class=\"ml-2 text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 font-bold cursor-pointer\"\n onClick={() => this.removeRelay(index)}\n title=\"Remove relay\"\n >\n ✕\n </button>\n </li>\n ))}\n </ul>\n\n <div class=\"flex gap-2\">\n <input\n type=\"text\"\n class=\"flex-1 text-xs px-2 py-1.5 border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100\"\n placeholder=\"wss://relay.example.com\"\n value={this.newRelay}\n onInput={e => (this.newRelay = (e.target as HTMLInputElement).value)}\n onKeyPress={e => {\n if (e.key === 'Enter') {\n e.preventDefault();\n this.addRelay();\n }\n }}\n />\n <button type=\"button\" class=\"text-xs px-3 py-1.5 bg-blue-500 hover:bg-blue-600 text-white rounded cursor-pointer\" onClick={() => this.addRelay()}>\n Add\n </button>\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-otp-migrate2.js","mappings":";;;;;AAAA,MAAM,eAAe,GAAG,ks3CAAks3C,CAAC;AAC3t3C,2BAAe,eAAe;;MCQjB,YAAY;;;;;yBACc,gCAAgC;2BAC/C,kBAAkB;0BACnB,wGAAwG;wBACtF,EAAE;;IAIzC,kBAAkB,CAAC,KAA0B;QAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7D,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;KACpB;IAED,mBAAmB,CAAC,CAAa;QAC/B,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;KAC3C;IAED,MAAM;QACJ,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,MAAO,EAAE,KAAK,EAAE,CAAC,CAAC,MAAO,EAAE,CAAC,CAAC,CAAC;QAEzG,QACE,EAAC,QAAQ,uDACP,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,2DAAI,KAAK,EAAC,yCAAyC,IAAE,IAAI,CAAC,WAAW,CAAM,EAC3E,0DAAG,KAAK,EAAC,qEAAqE,IAAE,IAAI,CAAC,UAAU,CAAK,CAChG,EAEN,4DAAK,KAAK,EAAC,uBAAuB,IAChC,4DAAK,KAAK,EAAC,QAAQ,IACjB,kEAAW,cAAc,EAAE,CAAC,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,GAAc,CACnG,EACN,0DAAG,KAAK,EAAC,kCAAkC,uDAAqD,EAEhG,4DAAK,KAAK,EAAC,2BAA2B,IACpC,0DAAG,KAAK,EAAC,0DAA0D,IAAE,KAAK,CAAC,KAAK,CAAK,CACjF,EAEN,oEAAa,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAC,iBAAiB,IAC1G,KAAK,CAAC,SAAS,IACd,YACE,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,2IAA2I,EACjJ,IAAI,EAAC,QAAQ,gBACF,SAAS,GACd,KAER,WAAK,IAAI,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,IAC5J,8BACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,yMAAyM,GAC3M,CACE,CACP,CACW,CACV,CACG,EACX;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-otp-migrate/nl-otp-migrate.css?tag=nl-otp-migrate","src/components/nl-otp-migrate/nl-otp-migrate.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h, Fragment, Prop, Event, EventEmitter } from '@stencil/core';\nimport { state } from '@/store';\nimport { ConnectionString } from '@/types';\n\n@Component({\n tag: 'nl-otp-migrate',\n styleUrl: 'nl-otp-migrate.css',\n shadow: false,\n})\nexport class NlImportFlow {\n @Prop({ mutable: true }) titleInfo = 'Import keys to storage service';\n @Prop() titleImport = 'Choose a service';\n @Prop() textImport = 'You will be prompted to import keys to the chosen service, and this website will connect to your keys.';\n @Prop() services: ConnectionString[] = [];\n\n @Event() nlImportAccount: EventEmitter<ConnectionString>;\n\n handleDomainSelect(event: CustomEvent<string>) {\n const s = this.services.find(s => s.domain === event.detail);\n state.nlImport = s;\n }\n\n handleCreateAccount(e: MouseEvent) {\n e.preventDefault();\n this.nlImportAccount.emit(state.nlImport);\n }\n\n render() {\n const options = this.services.filter(s => s.canImport).map(s => ({ name: s.domain!, value: s.domain! }));\n\n return (\n <Fragment>\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">{this.titleImport}</h1>\n <p class=\"nl-description font-light text-center text-sm pt-2 max-w-96 mx-auto\">{this.textImport}</p>\n </div>\n\n <div class=\"max-w-72 mx-auto mb-5\">\n <div class=\"mb-0.5\">\n <nl-select onSelectDomain={e => this.handleDomainSelect(e)} selected={0} options={options}></nl-select>\n </div>\n <p class=\"nl-title font-light text-sm mb-2\">Default provider is a fine choice to start with.</p>\n\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n\n <button-base disabled={state.isLoading} onClick={e => this.handleCreateAccount(e)} titleBtn=\"Start importing\">\n {state.isLoading ? (\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading inline-block w-4 h-4 border-[3px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n ) : (\n <svg slot=\"icon-start\" style={{ display: 'none' }} xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 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AAE,OAAO,EAAE,OAAO,GAAc,CACnG,EACN,0DAAG,KAAK,EAAC,kCAAkC,uDAAqD,EAEhG,4DAAK,KAAK,EAAC,2BAA2B,IACpC,0DAAG,KAAK,EAAC,0DAA0D,IAAE,KAAK,CAAC,KAAK,CAAK,CACjF,EAEN,oEAAa,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAC,iBAAiB,IAC1G,KAAK,CAAC,SAAS,IACd,YACE,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,2IAA2I,EACjJ,IAAI,EAAC,QAAQ,gBACF,SAAS,GACd,KAER,WAAK,IAAI,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,IAC5J,8BACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,yMAAyM,GAC3M,CACE,CACP,CACW,CACV,CACG,EACX;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-otp-migrate/nl-otp-migrate.css?tag=nl-otp-migrate","src/components/nl-otp-migrate/nl-otp-migrate.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h, Fragment, Prop, Event, EventEmitter } from '@stencil/core';\nimport { state } from '@/store';\nimport { ConnectionString } from '@/types';\n\n@Component({\n tag: 'nl-otp-migrate',\n styleUrl: 'nl-otp-migrate.css',\n shadow: false,\n})\nexport class NlImportFlow {\n @Prop({ mutable: true }) titleInfo = 'Import keys to storage service';\n @Prop() titleImport = 'Choose a service';\n @Prop() textImport = 'You will be prompted to import keys to the chosen service, and this website will connect to your keys.';\n @Prop() services: ConnectionString[] = [];\n\n @Event() nlImportAccount: EventEmitter<ConnectionString>;\n\n handleDomainSelect(event: CustomEvent<string>) {\n const s = this.services.find(s => s.domain === event.detail);\n state.nlImport = s;\n }\n\n handleCreateAccount(e: MouseEvent) {\n e.preventDefault();\n this.nlImportAccount.emit(state.nlImport);\n }\n\n render() {\n const options = this.services.filter(s => s.canImport).map(s => ({ name: s.domain!, value: s.domain! }));\n\n return (\n <Fragment>\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">{this.titleImport}</h1>\n <p class=\"nl-description font-light text-center text-sm pt-2 max-w-96 mx-auto\">{this.textImport}</p>\n </div>\n\n <div class=\"max-w-72 mx-auto mb-5\">\n <div class=\"mb-0.5\">\n <nl-select onSelectDomain={e => this.handleDomainSelect(e)} selected={0} options={options}></nl-select>\n </div>\n <p class=\"nl-title font-light text-sm mb-2\">Default provider is a fine choice to start with.</p>\n\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n\n <button-base disabled={state.isLoading} onClick={e => this.handleCreateAccount(e)} titleBtn=\"Start importing\">\n {state.isLoading ? (\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading inline-block w-4 h-4 border-[3px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n ) : (\n <svg slot=\"icon-start\" style={{ display: 'none' }} xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z\"\n />\n </svg>\n )}\n </button-base>\n </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K,EAAC,sCAAsC,IAC/C,WAAK,KAAK,EAAC,mCAAmC,IAAE,QAAQ,CAAO,EAC/D,uBAAiB,IAAI,EAAE,EAAE,GAAI,CACzB,EACN,WACE,OAAO,EAAE,CAAC;oBACR,CAAC,CAAC,eAAe,EAAE,CAAC;oBACpB,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;iBAC7B,EACD,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,WAAW,kBACN,KAAK,EAClB,MAAM,EAAC,cAAc,EACrB,KAAK,EAAC,4DAA4D,IAElE,8BACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,+ZAA+Z,GACja,CACE,CACH,EACL;SACH,CAAC,CACC,CACD,CACP,CACK,EACN,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,0DAAG,KAAK,EAAC,2DAA2D,oBACrD,GAAG,EAChB,6DAAM,OAAO,EAAE,MAAM,IAAI,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAC,mCAAmC,0BAEjF,CACL,CACA,CACG,EACX;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-previously-logged/nl-previously-logged.css?tag=nl-previously-logged","src/components/nl-previously-logged/nl-previously-logged.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n","import { Component, h, Fragment, Prop, Event, EventEmitter, Watch } from '@stencil/core';\nimport { CURRENT_MODULE, Info, RecentType } from '@/types';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-previously-logged',\n styleUrl: 'nl-previously-logged.css',\n shadow: false,\n})\nexport class NlPreviouslyLogged {\n @Prop() titlePage = 'Your profiles';\n @Prop() description = 'Switch between active profiles or choose a recent one for fast login.';\n\n @Prop() accounts: Info[] = [];\n @Prop() recents: RecentType[] = [];\n\n @Event() nlSwitchAccount: EventEmitter<Info>;\n @Event() nlLoginRecentAccount: EventEmitter<RecentType>;\n @Event() nlRemoveRecent: EventEmitter<RecentType>;\n\n handleGoToWelcome() {\n state.path = [CURRENT_MODULE.WELCOME];\n }\n\n switchToWelcomeIfEmpty() {\n if (!this.recents.length && !this.accounts.length) {\n state.path = [CURRENT_MODULE.WELCOME];\n }\n }\n\n @Watch('accounts')\n watchAccounts() {\n this.switchToWelcomeIfEmpty();\n }\n\n @Watch('recents')\n watchRecents() {\n this.switchToWelcomeIfEmpty();\n }\n\n handleRemoveRecent(user: Info) {\n this.nlRemoveRecent.emit(user);\n }\n\n handleSwitch(el: Info) {\n this.nlSwitchAccount.emit(el);\n }\n\n handleLoginRecentAccount(el: RecentType) {\n this.nlLoginRecentAccount.emit(el);\n }\n\n render() {\n return (\n <Fragment>\n <div class=\"p-4 pt-0 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-4xl\">{this.titlePage}</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{this.description}</p>\n </div>\n <div class=\"p-4\">\n {Boolean(this.accounts.length) && (\n <div class=\"max-w-96 mx-auto\">\n <p class=\"nl-description font-medium text-sm pb-1.5\">Active profiles</p>\n <ul class=\"p-2 rounded-lg border border-blue-200 flex flex-col w-full gap-0.5\">\n {this.accounts.map(el => {\n const isShowImg = Boolean(el?.picture);\n const userName = el.name || el.nip05 || el.pubkey;\n const isShowUserName = Boolean(userName);\n\n return (\n <li onClick={() => this.handleSwitch(el)} class=\"group hover:bg-gray-400 flex cursor-pointer gap-x-3.5 py-2 px-3 rounded-lg text-sm items-center justify-between\">\n <div class=\"flex items-center gap-x-3.5 w-full\">\n <div class=\"w-full max-w-7 h-7 flex relative\">\n <div class=\"absolute top-[-2px] right-[-2px] bg-white border-2 border-white rounded-xl\">\n <div class=\"active h-1.5 w-1.5 bg-green-500 rounded-xl\"></div>\n </div>\n <div class=\"group-hover:border-blue-400 uppercase font-bold w-full h-full rounded-full border border-gray-400 flex justify-center items-center\">\n {isShowImg ? (\n <img class=\"w-full rounded-full\" src={el.picture} alt=\"Logo\" />\n ) : isShowUserName ? (\n userName[0]\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-full\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\"\n />\n </svg>\n )}\n </div>\n </div>\n\n <div class=\"overflow-hidden flex flex-col w-full\">\n <div class=\"nl-title truncate overflow-hidden\">{userName}</div>\n <nl-login-status info={el} />\n </div>\n </div>\n {/* <div class=\"w-full max-w-6\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-full hover:text-blue-600\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15M12 9l3 3m0 0-3 3m3-3H2.25\"\n />\n </svg>\n </div> */}\n </li>\n );\n })}\n </ul>\n </div>\n )}\n\n {Boolean(this.recents.length) && (\n <div class=\"max-w-96 mx-auto pt-5\">\n <p class=\"nl-description font-medium text-sm pb-1.5\">Recent profiles</p>\n <ul class=\"p-2 rounded-lg border border-gray-200 flex flex-col w-full gap-0.5\">\n {this.recents.map(el => {\n const isShowImg = Boolean(el?.picture);\n const userName = el.name || el.nip05 || el.pubkey;\n const isShowUserName = Boolean(userName);\n\n return (\n <li\n onClick={() => this.handleLoginRecentAccount(el)}\n class=\"flex items-center gap-x-3.5 w-full hover:bg-gray-400 flex cursor-pointer items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm justify-between\"\n >\n <div class=\"w-full max-w-7 h-7 flex relative\">\n <div class=\"absolute top-[-3px] right-[-3px] bg-white border border-white rounded-xl\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-3 h-3\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\" />\n </svg>\n </div>\n <div class=\"uppercase font-bold w-full h-full rounded-full border border-gray-400 flex justify-center items-center\">\n {isShowImg ? (\n <img class=\"w-full rounded-full\" src={el.picture} alt=\"Logo\" />\n ) : isShowUserName ? (\n userName[0]\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-full\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\"\n />\n </svg>\n )}\n </div>\n </div>\n <div class=\"overflow-hidden flex flex-col w-full\">\n <div class=\"nl-title truncate overflow-hidden\">{userName}</div>\n <nl-login-status info={el} />\n </div>\n <svg\n onClick={e => {\n e.stopPropagation();\n this.handleRemoveRecent(el);\n }}\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n class=\"w-full max-w-6 h-6 text-red-500 hover:text-red-600 ml-auto\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0\"\n />\n </svg>\n </li>\n );\n })}\n </ul>\n </div>\n )}\n </div>\n <div class=\"p-4 overflow-y-auto\">\n <p class=\"nl-footer font-light text-center text-sm max-w-96 mx-auto\">\n You can also{' '}\n <span onClick={() => this.handleGoToWelcome()} class=\"cursor-pointer pb-3 text-blue-500\">\n add another profile\n </span>\n </p>\n </div>\n </Fragment>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-previously-logged2.js","mappings":";;;;;AAAA,MAAM,qBAAqB,GAAG,4r3CAA4r3C,CAAC;AAC3t3C,iCAAe,qBAAqB;;MCQvB,kBAAkB;;;;;;;yBACT,eAAe;2BACb,uEAAuE;wBAElE,EAAE;uBACG,EAAE;;IAMlC,iBAAiB;QACf,KAAK,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;KACvC;IAED,sBAAsB;QACpB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YACjD,KAAK,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;SACvC;KACF;IAGD,aAAa;QACX,IAAI,CAAC,sBAAsB,EAAE,CAAC;KAC/B;IAGD,YAAY;QACV,IAAI,CAAC,sBAAsB,EAAE,CAAC;KAC/B;IAED,kBAAkB,CAAC,IAAU;QAC3B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-previously-logged/nl-previously-logged.css?tag=nl-previously-logged","src/components/nl-previously-logged/nl-previously-logged.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n","import { Component, h, Fragment, Prop, Event, EventEmitter, Watch } from '@stencil/core';\nimport { CURRENT_MODULE, Info, RecentType } from '@/types';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-previously-logged',\n styleUrl: 'nl-previously-logged.css',\n shadow: false,\n})\nexport class NlPreviouslyLogged {\n @Prop() titlePage = 'Your profiles';\n @Prop() description = 'Switch between active profiles or choose a recent one for fast login.';\n\n @Prop() accounts: Info[] = [];\n @Prop() recents: RecentType[] = [];\n\n @Event() nlSwitchAccount: EventEmitter<Info>;\n @Event() nlLoginRecentAccount: EventEmitter<RecentType>;\n @Event() nlRemoveRecent: EventEmitter<RecentType>;\n\n handleGoToWelcome() {\n state.path = [CURRENT_MODULE.WELCOME];\n }\n\n switchToWelcomeIfEmpty() {\n if (!this.recents.length && !this.accounts.length) {\n state.path = [CURRENT_MODULE.WELCOME];\n }\n }\n\n @Watch('accounts')\n watchAccounts() {\n this.switchToWelcomeIfEmpty();\n }\n\n @Watch('recents')\n watchRecents() {\n this.switchToWelcomeIfEmpty();\n }\n\n handleRemoveRecent(user: Info) {\n this.nlRemoveRecent.emit(user);\n }\n\n handleSwitch(el: Info) {\n this.nlSwitchAccount.emit(el);\n }\n\n handleLoginRecentAccount(el: RecentType) {\n this.nlLoginRecentAccount.emit(el);\n }\n\n render() {\n return (\n <Fragment>\n <div class=\"p-4 pt-0 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-4xl\">{this.titlePage}</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{this.description}</p>\n </div>\n <div class=\"p-4\">\n {Boolean(this.accounts.length) && (\n <div class=\"max-w-96 mx-auto\">\n <p class=\"nl-description font-medium text-sm pb-1.5\">Active profiles</p>\n <ul class=\"p-2 rounded-lg border border-blue-200 flex flex-col w-full gap-0.5\">\n {this.accounts.map(el => {\n const isShowImg = Boolean(el?.picture);\n const userName = el.name || el.nip05 || el.pubkey;\n const isShowUserName = Boolean(userName);\n\n return (\n <li onClick={() => this.handleSwitch(el)} class=\"group hover:bg-gray-400 flex cursor-pointer gap-x-3.5 py-2 px-3 rounded-lg text-sm items-center justify-between\">\n <div class=\"flex items-center gap-x-3.5 w-full\">\n <div class=\"w-full max-w-7 h-7 flex relative\">\n <div class=\"absolute top-[-2px] right-[-2px] bg-white border-2 border-white rounded-xl\">\n <div class=\"active h-1.5 w-1.5 bg-green-500 rounded-xl\"></div>\n </div>\n <div class=\"group-hover:border-blue-400 uppercase font-bold w-full h-full rounded-full border border-gray-400 flex justify-center items-center\">\n {isShowImg ? (\n <img class=\"w-full rounded-full\" src={el.picture} alt=\"Logo\" />\n ) : isShowUserName ? (\n userName[0]\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-full\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\"\n />\n </svg>\n )}\n </div>\n </div>\n\n <div class=\"overflow-hidden flex flex-col w-full\">\n <div class=\"nl-title truncate overflow-hidden\">{userName}</div>\n <nl-login-status info={el} />\n </div>\n </div>\n {/* <div class=\"w-full max-w-6\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-full hover:text-blue-600\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15M12 9l3 3m0 0-3 3m3-3H2.25\"\n />\n </svg>\n </div> */}\n </li>\n );\n })}\n </ul>\n </div>\n )}\n\n {Boolean(this.recents.length) && (\n <div class=\"max-w-96 mx-auto pt-5\">\n <p class=\"nl-description font-medium text-sm pb-1.5\">Recent profiles</p>\n <ul class=\"p-2 rounded-lg border border-gray-200 flex flex-col w-full gap-0.5\">\n {this.recents.map(el => {\n const isShowImg = Boolean(el?.picture);\n const userName = el.name || el.nip05 || el.pubkey;\n const isShowUserName = Boolean(userName);\n\n return (\n <li\n onClick={() => this.handleLoginRecentAccount(el)}\n class=\"flex items-center gap-x-3.5 w-full hover:bg-gray-400 flex cursor-pointer items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm justify-between\"\n >\n <div class=\"w-full max-w-7 h-7 flex relative\">\n <div class=\"absolute top-[-3px] right-[-3px] bg-white border border-white rounded-xl\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-3 h-3\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\" />\n </svg>\n </div>\n <div class=\"uppercase font-bold w-full h-full rounded-full border border-gray-400 flex justify-center items-center\">\n {isShowImg ? (\n <img class=\"w-full rounded-full\" src={el.picture} alt=\"Logo\" />\n ) : isShowUserName ? (\n userName[0]\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-full\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\"\n />\n </svg>\n )}\n </div>\n </div>\n <div class=\"overflow-hidden flex flex-col w-full\">\n <div class=\"nl-title truncate overflow-hidden\">{userName}</div>\n <nl-login-status info={el} />\n </div>\n <svg\n onClick={e => {\n e.stopPropagation();\n this.handleRemoveRecent(el);\n }}\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n class=\"w-full max-w-6 h-6 text-red-500 hover:text-red-600 ml-auto\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0\"\n />\n </svg>\n </li>\n );\n })}\n </ul>\n </div>\n )}\n </div>\n <div class=\"p-4 overflow-y-auto\">\n <p class=\"nl-footer font-light text-center text-sm max-w-96 mx-auto\">\n You can also{' '}\n <span onClick={() => this.handleGoToWelcome()} class=\"cursor-pointer pb-3 text-blue-500\">\n add another profile\n </span>\n </p>\n </div>\n </Fragment>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-select2.js","mappings":";;AAAA,MAAM,WAAW,GAAG,ms3CAAms3C,CAAC;AACxt3C,uBAAe,WAA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[],"sources":["src/components/nl-select/nl-select.css?tag=nl-select","src/components/nl-select/nl-select.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h, Listen, Prop, State, Watch, Element, Event, EventEmitter } from '@stencil/core';\n\nexport type OptionType = {\n name: string;\n value: string;\n};\n\n@Component({\n tag: 'nl-select',\n styleUrl: 'nl-select.css',\n shadow: false,\n})\nexport class NlSelect {\n @State() isOpen: boolean = false;\n @State() value: OptionType = null;\n @Prop() options: OptionType[];\n @Prop() selected: number;\n\n @Element() element: HTMLElement;\n\n @Event() selectDomain: EventEmitter<string>;\n\n buttonRef: HTMLButtonElement;\n ulRef: HTMLUListElement;\n wrapperRef: HTMLDivElement;\n\n @Listen('click', { target: 'window' })\n handleWindowClick() {\n if (this.wrapperRef.querySelector('.listClass')) {\n this.isOpen = false;\n }\n }\n\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n this.calculateDropdownPosition();\n }\n\n @State() mode: boolean = false;\n @Prop() darkMode: boolean = false;\n @State() themeState: 'default' | 'ocean' | 'lemonade' | 'purple' = 'default';\n @Prop() theme: 'default' | 'ocean' | 'lemonade' | 'purple' = 'default';\n @Watch('theme')\n watchPropHandler(newValue: 'default' | 'ocean' | 'lemonade' | 'purple') {\n this.themeState = newValue;\n }\n\n @Watch('darkMode')\n watchModeHandler(newValue: boolean) {\n this.mode = newValue;\n }\n\n connectedCallback() {\n this.themeState = this.theme;\n this.mode = this.darkMode;\n\n this.value = this.options[this.selected];\n this.selectDomain.emit(this.value.value);\n }\n\n calculateDropdownPosition() {\n if (this.isOpen && this.buttonRef) {\n const buttonRect = this.buttonRef.getBoundingClientRect();\n this.ulRef.style.top = `${buttonRect.height}px`;\n }\n }\n\n handleChange(el: OptionType) {\n this.value = el;\n this.isOpen = false;\n\n this.selectDomain.emit(this.value.value);\n }\n\n render() {\n const listClass = `${this.isOpen ? 'listClass' : 'hidden'} min-w-[15rem] nl-select-list absolute left-0 shadow-md rounded-lg p-2 mt-1 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full`;\n const arrowClass = `${this.isOpen ? 'rotate-180' : 'rotate-0'} duration-300 flex-shrink-0 w-4 h-4 text-gray-500`;\n\n return (\n <div class={`theme-${this.themeState}`}>\n <div class=\"relative\" ref={el => (this.wrapperRef = el)}>\n <button\n ref={el => (this.buttonRef = el)}\n onClick={() => this.toggleDropdown()}\n type=\"button\"\n class=\"nl-select peer py-3 px-4 flex items-center w-full justify-between border-transparent rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none dark:border-transparent\"\n >\n <span class=\"truncate overflow-hidden\">{this.value.name}</span>\n <svg\n class={arrowClass}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n\n <ul ref={el => (this.ulRef = el)} class={listClass}>\n {this.options.map(el => {\n return (\n <li onClick={() => this.handleChange(el)} class=\"nl-select-option flex cursor-pointer items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm\">\n {el.name}\n </li>\n );\n })}\n </ul>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-select2.js","mappings":";;AAAA,MAAM,WAAW,GAAG,4r3CAA4r3C,CAAC;AACjt3C,uBAAe,WAAW;;MCWb,QAAQ;;;;;sBACQ,KAAK;qBACH,IAAI;;;oBAwBR,KAAK;wBACF,KAAK;0BACkC,SAAS;qBACf,SAAS;;IAdtE,iBAAiB;QACf,IAAI,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE;YAC/C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;SACrB;KACF;IAED,cAAc;QACZ,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;QAC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EAAE,EAAE,KAAK,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,IACrD,+DACE,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EAChC,OAAO,EAAE,MAAM,IAAI,CAAC,cAAc,EAAE,EACpC,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,kLAAkL,IAExL,6DAAM,KAAK,EAAC,0BAA0B,IAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAQ,EAC/D,4DACE,KAAK,EAAE,UAAU,EACjB,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,kBACR,GAAG,oBACD,OAAO,qBACN,OAAO,IAEvB,6DAAM,CAAC,EAAC,cAAc,GAAG,CACrB,CACC,EAET,2DAAI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,IAC/C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAClB,QACE,UAAI,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,KAAK,EAAC,0FAA0F,IACvI,EAAE,CAAC,IAAI,CACL,EACL;SACH,CAAC,CACC,CACD,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-select/nl-select.css?tag=nl-select","src/components/nl-select/nl-select.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h, Listen, Prop, State, Watch, Element, Event, EventEmitter } from '@stencil/core';\n\nexport type OptionType = {\n name: string;\n value: string;\n};\n\n@Component({\n tag: 'nl-select',\n styleUrl: 'nl-select.css',\n shadow: false,\n})\nexport class NlSelect {\n @State() isOpen: boolean = false;\n @State() value: OptionType = null;\n @Prop() options: OptionType[];\n @Prop() selected: number;\n\n @Element() element: HTMLElement;\n\n @Event() selectDomain: EventEmitter<string>;\n\n buttonRef: HTMLButtonElement;\n ulRef: HTMLUListElement;\n wrapperRef: HTMLDivElement;\n\n @Listen('click', { target: 'window' })\n handleWindowClick() {\n if (this.wrapperRef.querySelector('.listClass')) {\n this.isOpen = false;\n }\n }\n\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n this.calculateDropdownPosition();\n }\n\n @State() mode: boolean = false;\n @Prop() darkMode: boolean = false;\n @State() themeState: 'default' | 'ocean' | 'lemonade' | 'purple' = 'default';\n @Prop() theme: 'default' | 'ocean' | 'lemonade' | 'purple' = 'default';\n @Watch('theme')\n watchPropHandler(newValue: 'default' | 'ocean' | 'lemonade' | 'purple') {\n this.themeState = newValue;\n }\n\n @Watch('darkMode')\n watchModeHandler(newValue: boolean) {\n this.mode = newValue;\n }\n\n connectedCallback() {\n this.themeState = this.theme;\n this.mode = this.darkMode;\n\n this.value = this.options[this.selected];\n this.selectDomain.emit(this.value.value);\n }\n\n calculateDropdownPosition() {\n if (this.isOpen && this.buttonRef) {\n const buttonRect = this.buttonRef.getBoundingClientRect();\n this.ulRef.style.top = `${buttonRect.height}px`;\n }\n }\n\n handleChange(el: OptionType) {\n this.value = el;\n this.isOpen = false;\n\n this.selectDomain.emit(this.value.value);\n }\n\n render() {\n const listClass = `${this.isOpen ? 'listClass' : 'hidden'} min-w-[15rem] nl-select-list absolute left-0 shadow-md rounded-lg p-2 mt-1 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full`;\n const arrowClass = `${this.isOpen ? 'rotate-180' : 'rotate-0'} duration-300 flex-shrink-0 w-4 h-4 text-gray-500`;\n\n return (\n <div class={`theme-${this.themeState}`}>\n <div class=\"relative\" ref={el => (this.wrapperRef = el)}>\n <button\n ref={el => (this.buttonRef = el)}\n onClick={() => this.toggleDropdown()}\n type=\"button\"\n class=\"nl-select peer py-3 px-4 flex items-center w-full justify-between border-transparent rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none dark:border-transparent\"\n >\n <span class=\"truncate overflow-hidden\">{this.value.name}</span>\n <svg\n class={arrowClass}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n\n <ul ref={el => (this.ulRef = el)} class={listClass}>\n {this.options.map(el => {\n return (\n <li onClick={() => this.handleChange(el)} class=\"nl-select-option flex cursor-pointer items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm\">\n {el.name}\n </li>\n );\n })}\n </ul>\n </div>\n </div>\n );\n }\n}\n"],"version":3}