kaze 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kaze/commands/install_command.rb +22 -5
- data/lib/kaze/commands/installs_hotwire_stack.rb +62 -0
- data/lib/kaze/commands/{install_inertia_stacks.rb → installs_inertia_stacks.rb} +19 -17
- data/lib/kaze/version.rb +1 -1
- data/stubs/default/app/validators/lowercase_validator.rb +1 -0
- data/stubs/default/app/views/layouts/mailer.html.erb +3 -1
- data/stubs/default/app/views/layouts/mailer.text.erb +3 -1
- data/stubs/default/config/routes.rb +1 -1
- data/stubs/hotwire/Procfile.dev +2 -0
- data/stubs/hotwire/app/components/application_logo_component.rb +14 -0
- data/stubs/hotwire/app/components/auth_session_status_component.rb +17 -0
- data/stubs/hotwire/app/components/danger_button_component.rb +13 -0
- data/stubs/hotwire/app/components/dropdown_component.html.erb +20 -0
- data/stubs/hotwire/app/components/dropdown_component.rb +15 -0
- data/stubs/hotwire/app/components/dropdown_link_component.rb +12 -0
- data/stubs/hotwire/app/components/input_error_component.rb +18 -0
- data/stubs/hotwire/app/components/input_label_component.rb +13 -0
- data/stubs/hotwire/app/components/modal_component.html.erb +62 -0
- data/stubs/hotwire/app/components/modal_component.rb +14 -0
- data/stubs/hotwire/app/components/nav_link_component.rb +15 -0
- data/stubs/hotwire/app/components/primary_button_component.rb +13 -0
- data/stubs/hotwire/app/components/responsive_nav_link_component.rb +15 -0
- data/stubs/hotwire/app/components/secondary_button_component.rb +13 -0
- data/stubs/hotwire/app/components/text_input_component.rb +11 -0
- data/stubs/hotwire/app/controllers/application_controller.rb +3 -0
- data/stubs/hotwire/app/controllers/auth/authenticated_session_controller.rb +29 -0
- data/stubs/hotwire/app/controllers/auth/new_password_controller.rb +19 -0
- data/stubs/hotwire/app/controllers/auth/password_reset_link_controller.rb +19 -0
- data/stubs/hotwire/app/controllers/auth/registered_user_controller.rb +23 -0
- data/stubs/hotwire/app/controllers/dashboard_controller.rb +4 -0
- data/stubs/hotwire/app/controllers/password_controller.rb +11 -0
- data/stubs/hotwire/app/controllers/profile_controller.rb +33 -0
- data/stubs/hotwire/app/controllers/welcome_controller.rb +7 -0
- data/stubs/hotwire/app/javascript/alpinejs.js +2 -0
- data/stubs/hotwire/app/javascript/application.js +8 -0
- data/stubs/hotwire/app/views/auth/forgot_password.html.erb +23 -0
- data/stubs/hotwire/app/views/auth/login.html.erb +40 -0
- data/stubs/hotwire/app/views/auth/register.html.erb +47 -0
- data/stubs/hotwire/app/views/auth/reset_password.html.erb +28 -0
- data/stubs/hotwire/app/views/dashboard/index.html.erb +15 -0
- data/stubs/hotwire/app/views/layouts/_navigation.html.erb +92 -0
- data/stubs/hotwire/app/views/layouts/application.html.erb +42 -0
- data/stubs/hotwire/app/views/layouts/guest.html.erb +33 -0
- data/stubs/hotwire/app/views/profile/edit.html.erb +27 -0
- data/stubs/hotwire/app/views/profile/partials/_delete_user_form.html.erb +48 -0
- data/stubs/hotwire/app/views/profile/partials/_update_password_form.html.erb +58 -0
- data/stubs/hotwire/app/views/profile/partials/_update_profile_information_form.html.erb +49 -0
- data/stubs/hotwire/app/views/welcome/index.html.erb +68 -0
- data/stubs/hotwire/config/importmap.rb +3 -0
- data/stubs/hotwire/config/tailwind.config.js +23 -0
- data/stubs/inertia-common/app/controllers/concerns/authenticate.rb +34 -0
- data/stubs/{default → inertia-common}/app/controllers/dashboard_controller.rb +1 -1
- data/stubs/inertia-common/bin/vite +27 -0
- data/stubs/inertia-common/config/vite.json +16 -0
- data/stubs/inertia-react-ts/app/views/layouts/application.html.erb +0 -4
- data/stubs/inertia-react-ts/config/tailwind.config.js +1 -1
- data/stubs/inertia-react-ts/package.json +24 -24
- data/stubs/inertia-vue-ts/app/javascript/Pages/Welcome.vue +1 -1
- data/stubs/inertia-vue-ts/app/views/layouts/application.html.erb +0 -4
- data/stubs/inertia-vue-ts/config/tailwind.config.js +1 -1
- metadata +63 -18
- data/stubs/default/config/vite.json +0 -16
- /data/stubs/{default → hotwire}/app/controllers/concerns/authenticate.rb +0 -0
- /data/stubs/{default → hotwire}/bin/vite +0 -0
- /data/stubs/{default → inertia-common}/Procfile.dev +0 -0
- /data/stubs/{default → inertia-common}/app/controllers/application_controller.rb +0 -0
- /data/stubs/{default → inertia-common}/app/controllers/auth/authenticated_session_controller.rb +0 -0
- /data/stubs/{default → inertia-common}/app/controllers/auth/new_password_controller.rb +0 -0
- /data/stubs/{default → inertia-common}/app/controllers/auth/password_reset_link_controller.rb +0 -0
- /data/stubs/{default → inertia-common}/app/controllers/auth/registered_user_controller.rb +0 -0
- /data/stubs/{default → inertia-common}/app/controllers/concerns/handle_inertia_requests.rb +0 -0
- /data/stubs/{default → inertia-common}/app/controllers/concerns/verify_csrf_token.rb +0 -0
- /data/stubs/{default → inertia-common}/app/controllers/password_controller.rb +0 -0
- /data/stubs/{default → inertia-common}/app/controllers/profile_controller.rb +0 -0
- /data/stubs/{default → inertia-common}/app/controllers/welcome_controller.rb +0 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
class Auth::PasswordResetLinkController < ApplicationController
|
2
|
+
skip_authentication
|
3
|
+
|
4
|
+
layout "guest"
|
5
|
+
|
6
|
+
def new
|
7
|
+
@form = Auth::SendPasswordResetLinkForm.new
|
8
|
+
|
9
|
+
render "auth/forgot_password"
|
10
|
+
end
|
11
|
+
|
12
|
+
def create
|
13
|
+
@form = Auth::SendPasswordResetLinkForm.new params.permit(:email)
|
14
|
+
|
15
|
+
return redirect_back_or_to password_request_path, flash: { status: "We have emailed your password reset link." } if @form.send_reset_link?
|
16
|
+
|
17
|
+
render "auth/forgot_password", status: :unprocessable_entity
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Auth::RegisteredUserController < ApplicationController
|
2
|
+
skip_authentication
|
3
|
+
|
4
|
+
layout "guest"
|
5
|
+
|
6
|
+
def new
|
7
|
+
@form = Auth::RegisterForm.new
|
8
|
+
|
9
|
+
render "auth/register"
|
10
|
+
end
|
11
|
+
|
12
|
+
def create
|
13
|
+
@form = Auth::RegisterForm.new params.permit(:name, :email, :password, :password_confirmation)
|
14
|
+
|
15
|
+
return render "auth/register", status: :unprocessable_entity if @form.invalid?
|
16
|
+
|
17
|
+
user = User.create(name: @form.name, email: @form.email, password: @form.password)
|
18
|
+
|
19
|
+
login user
|
20
|
+
|
21
|
+
redirect_to dashboard_path
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class PasswordController < ApplicationController
|
2
|
+
def update
|
3
|
+
@update_password_form = UpdatePasswordForm.new params.permit(:current_password, :password, :password_confirmation)
|
4
|
+
|
5
|
+
return render partial: "profile/partials/update_password_form", status: :unprocessable_entity if @update_password_form.invalid?
|
6
|
+
|
7
|
+
Current.user.update(password: @update_password_form.password)
|
8
|
+
|
9
|
+
redirect_back_or_to profile_edit_path, flash: { status: "password-updated" }
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
class ProfileController < ApplicationController
|
2
|
+
def edit
|
3
|
+
@update_profile_information_form = UpdateProfileInformationForm.new(name: Current.user.name, email: Current.user.email)
|
4
|
+
@update_password_form = UpdatePasswordForm.new
|
5
|
+
@delete_user_form = DeleteUserForm.new
|
6
|
+
|
7
|
+
render "profile/edit"
|
8
|
+
end
|
9
|
+
|
10
|
+
def update
|
11
|
+
@update_profile_information_form = UpdateProfileInformationForm.new params.permit(:name, :email)
|
12
|
+
|
13
|
+
return render partial: "profile/partials/update_profile_information_form", status: :unprocessable_entity if @update_profile_information_form.invalid?
|
14
|
+
|
15
|
+
Current.user.update(name: @update_profile_information_form.name, email: @update_profile_information_form.email)
|
16
|
+
|
17
|
+
redirect_to profile_edit_path, flash: { status: "profile-updated" }
|
18
|
+
end
|
19
|
+
|
20
|
+
def destroy
|
21
|
+
@delete_user_form = DeleteUserForm.new params.permit(:password)
|
22
|
+
|
23
|
+
return render partial: "profile/partials/delete_user_form", status: :unprocessable_entity if @delete_user_form.invalid?
|
24
|
+
|
25
|
+
user = Current.user
|
26
|
+
|
27
|
+
logout
|
28
|
+
|
29
|
+
user.delete
|
30
|
+
|
31
|
+
redirect_to "/"
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,2 @@
|
|
1
|
+
var e=false;var t=false;var r=[];function scheduler(e){queueJob(e)}function queueJob(e){r.includes(e)||r.push(e);queueFlush()}function dequeueJob(e){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}function queueFlush(){if(!t&&!e){e=true;queueMicrotask(flushJobs)}}function flushJobs(){e=false;t=true;for(let e=0;e<r.length;e++)r[e]();r.length=0;t=false}var n;var i;var a;var o;var s=true;function disableEffectScheduling(e){s=false;e();s=true}function setReactivityEngine(e){n=e.reactive;a=e.release;i=t=>e.effect(t,{scheduler:e=>{s?scheduler(e):e()}});o=e.raw}function overrideEffect(e){i=e}function elementBoundEffect(e){let cleanup2=()=>{};let wrappedEffect=t=>{let r=i(t);if(!e._x_effects){e._x_effects=new Set;e._x_runEffects=()=>{e._x_effects.forEach((e=>e()))}}e._x_effects.add(r);cleanup2=()=>{if(void 0!==r){e._x_effects.delete(r);a(r)}};return r};return[wrappedEffect,()=>{cleanup2()}]}var l=[];var c=[];var u=[];function onElAdded(e){u.push(e)}function onElRemoved(e,t){if("function"===typeof t){e._x_cleanups||(e._x_cleanups=[]);e._x_cleanups.push(t)}else{t=e;c.push(t)}}function onAttributesAdded(e){l.push(e)}function onAttributeRemoved(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={});e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]);e._x_attributeCleanups[t].push(r)}function cleanupAttributes(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach((([r,n])=>{if(void 0===t||t.includes(r)){n.forEach((e=>e()));delete e._x_attributeCleanups[r]}}))}var f=new MutationObserver(onMutate);var d=false;function startObservingMutations(){f.observe(document,{subtree:true,childList:true,attributes:true,attributeOldValue:true});d=true}function stopObservingMutations(){flushObserver();f.disconnect();d=false}var p=[];var _=false;function flushObserver(){p=p.concat(f.takeRecords());if(p.length&&!_){_=true;queueMicrotask((()=>{processRecordQueue();_=false}))}}function processRecordQueue(){onMutate(p);p.length=0}function mutateDom(e){if(!d)return e();stopObservingMutations();let t=e();startObservingMutations();return t}var m=false;var v=[];function deferMutations(){m=true}function flushAndStopDeferringMutations(){m=false;onMutate(v);v=[]}function onMutate(e){if(m){v=v.concat(e);return}let t=[];let r=[];let n=new Map;let i=new Map;for(let a=0;a<e.length;a++)if(!e[a].target._x_ignoreMutationObserver){if("childList"===e[a].type){e[a].addedNodes.forEach((e=>1===e.nodeType&&t.push(e)));e[a].removedNodes.forEach((e=>1===e.nodeType&&r.push(e)))}if("attributes"===e[a].type){let t=e[a].target;let r=e[a].attributeName;let o=e[a].oldValue;let add2=()=>{n.has(t)||n.set(t,[]);n.get(t).push({name:r,value:t.getAttribute(r)})};let remove=()=>{i.has(t)||i.set(t,[]);i.get(t).push(r)};if(t.hasAttribute(r)&&null===o)add2();else if(t.hasAttribute(r)){remove();add2()}else remove()}}i.forEach(((e,t)=>{cleanupAttributes(t,e)}));n.forEach(((e,t)=>{l.forEach((r=>r(t,e)))}));for(let e of r)if(!t.includes(e)){c.forEach((t=>t(e)));if(e._x_cleanups)while(e._x_cleanups.length)e._x_cleanups.pop()()}t.forEach((e=>{e._x_ignoreSelf=true;e._x_ignore=true}));for(let e of t)if(!r.includes(e)&&e.isConnected){delete e._x_ignoreSelf;delete e._x_ignore;u.forEach((t=>t(e)));e._x_ignore=true;e._x_ignoreSelf=true}t.forEach((e=>{delete e._x_ignoreSelf;delete e._x_ignore}));t=null;r=null;n=null;i=null}function scope(e){return mergeProxies(closestDataStack(e))}function addScopeToNode(e,t,r){e._x_dataStack=[t,...closestDataStack(r||e)];return()=>{e._x_dataStack=e._x_dataStack.filter((e=>e!==t))}}function refreshScope(e,t){let r=e._x_dataStack[0];Object.entries(t).forEach((([e,t])=>{r[e]=t}))}function closestDataStack(e){return e._x_dataStack?e._x_dataStack:"function"===typeof ShadowRoot&&e instanceof ShadowRoot?closestDataStack(e.host):e.parentNode?closestDataStack(e.parentNode):[]}function mergeProxies(e){let t=new Proxy({},{ownKeys:()=>Array.from(new Set(e.flatMap((e=>Object.keys(e))))),has:(t,r)=>e.some((e=>e.hasOwnProperty(r))),get:(r,n)=>(e.find((e=>{if(e.hasOwnProperty(n)){let r=Object.getOwnPropertyDescriptor(e,n);if(r.get&&r.get._x_alreadyBound||r.set&&r.set._x_alreadyBound)return true;if((r.get||r.set)&&r.enumerable){let i=r.get;let a=r.set;let o=r;i=i&&i.bind(t);a=a&&a.bind(t);i&&(i._x_alreadyBound=true);a&&(a._x_alreadyBound=true);Object.defineProperty(e,n,{...o,get:i,set:a})}return true}return false}))||{})[n],set:(t,r,n)=>{let i=e.find((e=>e.hasOwnProperty(r)));i?i[r]=n:e[e.length-1][r]=n;return true}});return t}function initInterceptors(e){let isObject2=e=>"object"===typeof e&&!Array.isArray(e)&&null!==e;let recurse=(t,r="")=>{Object.entries(Object.getOwnPropertyDescriptors(t)).forEach((([n,{value:i,enumerable:a}])=>{if(false===a||void 0===i)return;let o=""===r?n:`${r}.${n}`;"object"===typeof i&&null!==i&&i._x_interceptor?t[n]=i.initialize(e,o,n):!isObject2(i)||i===t||i instanceof Element||recurse(i,o)}))};return recurse(e)}function interceptor(e,t=(()=>{})){let r={initialValue:void 0,_x_interceptor:true,initialize(t,r,n){return e(this.initialValue,(()=>get(t,r)),(e=>set(t,r,e)),r,n)}};t(r);return e=>{if("object"===typeof e&&null!==e&&e._x_interceptor){let t=r.initialize.bind(r);r.initialize=(n,i,a)=>{let o=e.initialize(n,i,a);r.initialValue=o;return t(n,i,a)}}else r.initialValue=e;return r}}function get(e,t){return t.split(".").reduce(((e,t)=>e[t]),e)}function set(e,t,r){"string"===typeof t&&(t=t.split("."));if(1!==t.length){if(0===t.length)throw error;if(e[t[0]])return set(e[t[0]],t.slice(1),r);e[t[0]]={};return set(e[t[0]],t.slice(1),r)}e[t[0]]=r}var g={};function magic(e,t){g[e]=t}function injectMagics(e,t){Object.entries(g).forEach((([r,n])=>{Object.defineProperty(e,`$${r}`,{get(){let[e,r]=getElementBoundUtilities(t);e={interceptor:interceptor,...e};onElRemoved(t,r);return n(t,e)},enumerable:false})}));return e}function tryCatch(e,t,r,...n){try{return r(...n)}catch(r){handleError(r,e,t)}}function handleError(e,t,r){Object.assign(e,{el:t,expression:r});console.warn(`Alpine Expression Error: ${e.message}\n\n${r?'Expression: "'+r+'"\n\n':""}`,t);setTimeout((()=>{throw e}),0)}var h=true;function dontAutoEvaluateFunctions(e){let t=h;h=false;e();h=t}function evaluate(e,t,r={}){let n;evaluateLater(e,t)((e=>n=e),r);return n}function evaluateLater(...e){return x(...e)}var x=normalEvaluator;function setEvaluator(e){x=e}function normalEvaluator(e,t){let r={};injectMagics(r,e);let n=[r,...closestDataStack(e)];if("function"===typeof t)return generateEvaluatorFromFunction(n,t);let i=generateEvaluatorFromString(n,t,e);return tryCatch.bind(null,e,t,i)}function generateEvaluatorFromFunction(e,t){return(r=(()=>{}),{scope:n={},params:i=[]}={})=>{let a=t.apply(mergeProxies([n,...e]),i);runIfTypeOfFunction(r,a)}}var y={};function generateFunctionFromString(e,t){if(y[e])return y[e];let r=Object.getPrototypeOf((async function(){})).constructor;let n=/^[\n\s]*if.*\(.*\)/.test(e)||/^(let|const)\s/.test(e)?`(() => { ${e} })()`:e;const safeAsyncFunction=()=>{try{return new r(["__self","scope"],`with (scope) { __self.result = ${n} }; __self.finished = true; return __self.result;`)}catch(r){handleError(r,t,e);return Promise.resolve()}};let i=safeAsyncFunction();y[e]=i;return i}function generateEvaluatorFromString(e,t,r){let n=generateFunctionFromString(t,r);return(i=(()=>{}),{scope:a={},params:o=[]}={})=>{n.result=void 0;n.finished=false;let s=mergeProxies([a,...e]);if("function"===typeof n){let e=n(n,s).catch((e=>handleError(e,r,t)));if(n.finished){runIfTypeOfFunction(i,n.result,s,o,r);n.result=void 0}else e.then((e=>{runIfTypeOfFunction(i,e,s,o,r)})).catch((e=>handleError(e,r,t))).finally((()=>n.result=void 0))}}}function runIfTypeOfFunction(e,t,r,n,i){if(h&&"function"===typeof t){let a=t.apply(r,n);a instanceof Promise?a.then((t=>runIfTypeOfFunction(e,t,r,n))).catch((e=>handleError(e,i,t))):e(a)}else e(t)}var b="x-";function prefix(e=""){return b+e}function setPrefix(e){b=e}var w={};function directive(e,t){w[e]=t}function directives(e,t,r){let n={};let i=Array.from(t).map(toTransformedAttributes(((e,t)=>n[e]=t))).filter(outNonAlpineAttributes).map(toParsedDirectives(n,r)).sort(byPriority);return i.map((t=>getDirectiveHandler(e,t)))}function attributesOnly(e){return Array.from(e).map(toTransformedAttributes()).filter((e=>!outNonAlpineAttributes(e)))}var E=false;var S=new Map;var k=Symbol();function deferHandlingDirectives(e){E=true;let t=Symbol();k=t;S.set(t,[]);let flushHandlers=()=>{while(S.get(t).length)S.get(t).shift()();S.delete(t)};let stopDeferring=()=>{E=false;flushHandlers()};e(flushHandlers);stopDeferring()}function getElementBoundUtilities(e){let t=[];let cleanup2=e=>t.push(e);let[r,n]=elementBoundEffect(e);t.push(n);let i={Alpine:F,effect:r,cleanup:cleanup2,evaluateLater:evaluateLater.bind(evaluateLater,e),evaluate:evaluate.bind(evaluate,e)};let doCleanup=()=>t.forEach((e=>e()));return[i,doCleanup]}function getDirectiveHandler(e,t){let noop=()=>{};let r=w[t.type]||noop;let[n,i]=getElementBoundUtilities(e);onAttributeRemoved(e,t.original,i);let fullHandler=()=>{if(!e._x_ignore&&!e._x_ignoreSelf){r.inline&&r.inline(e,t,n);r=r.bind(r,e,t,n);E?S.get(k).push(r):r()}};fullHandler.runCleanups=i;return fullHandler}var startingWith=(e,t)=>({name:r,value:n})=>{r.startsWith(e)&&(r=r.replace(e,t));return{name:r,value:n}};var into=e=>e;function toTransformedAttributes(e=(()=>{})){return({name:t,value:r})=>{let{name:n,value:i}=A.reduce(((e,t)=>t(e)),{name:t,value:r});n!==t&&e(n,t);return{name:n,value:i}}}var A=[];function mapAttributes(e){A.push(e)}function outNonAlpineAttributes({name:e}){return alpineAttributeRegex().test(e)}var alpineAttributeRegex=()=>new RegExp(`^${b}([^:^.]+)\\b`);function toParsedDirectives(e,t){return({name:r,value:n})=>{let i=r.match(alpineAttributeRegex());let a=r.match(/:([a-zA-Z0-9\-:]+)/);let o=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[];let s=t||e[r]||r;return{type:i?i[1]:null,value:a?a[1]:null,modifiers:o.map((e=>e.replace(".",""))),expression:n,original:s}}}var O="DEFAULT";var C=["ignore","ref","data","id","bind","init","for","mask","model","modelable","transition","show","if",O,"teleport","element"];function byPriority(e,t){let r=-1===C.indexOf(e.type)?O:e.type;let n=-1===C.indexOf(t.type)?O:t.type;return C.indexOf(r)-C.indexOf(n)}function dispatch(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:true,composed:true,cancelable:true}))}var R=[];var T=false;function nextTick(e=(()=>{})){queueMicrotask((()=>{T||setTimeout((()=>{releaseNextTicks()}))}));return new Promise((t=>{R.push((()=>{e();t()}))}))}function releaseNextTicks(){T=false;while(R.length)R.shift()()}function holdNextTicks(){T=true}function walk(e,t){if("function"===typeof ShadowRoot&&e instanceof ShadowRoot){Array.from(e.children).forEach((e=>walk(e,t)));return}let r=false;t(e,(()=>r=true));if(r)return;let n=e.firstElementChild;while(n){walk(n,t,false);n=n.nextElementSibling}}function warn(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function start(){document.body||warn("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");dispatch(document,"alpine:init");dispatch(document,"alpine:initializing");startObservingMutations();onElAdded((e=>initTree(e,walk)));onElRemoved((e=>destroyTree(e)));onAttributesAdded(((e,t)=>{directives(e,t).forEach((e=>e()))}));let outNestedComponents=e=>!closestRoot(e.parentElement,true);Array.from(document.querySelectorAll(allSelectors())).filter(outNestedComponents).forEach((e=>{initTree(e)}));dispatch(document,"alpine:initialized")}var M=[];var j=[];function rootSelectors(){return M.map((e=>e()))}function allSelectors(){return M.concat(j).map((e=>e()))}function addRootSelector(e){M.push(e)}function addInitSelector(e){j.push(e)}function closestRoot(e,t=false){return findClosest(e,(e=>{const r=t?allSelectors():rootSelectors();if(r.some((t=>e.matches(t))))return true}))}function findClosest(e,t){if(e){if(t(e))return e;e._x_teleportBack&&(e=e._x_teleportBack);if(e.parentElement)return findClosest(e.parentElement,t)}}function isRoot(e){return rootSelectors().some((t=>e.matches(t)))}function initTree(e,t=walk){deferHandlingDirectives((()=>{t(e,((e,t)=>{directives(e,e.attributes).forEach((e=>e()));e._x_ignore&&t()}))}))}function destroyTree(e){walk(e,(e=>cleanupAttributes(e)))}function setClasses(e,t){return Array.isArray(t)?setClassesFromString(e,t.join(" ")):"object"===typeof t&&null!==t?setClassesFromObject(e,t):"function"===typeof t?setClasses(e,t()):setClassesFromString(e,t)}function setClassesFromString(e,t){let missingClasses=t=>t.split(" ").filter((t=>!e.classList.contains(t))).filter(Boolean);let addClassesAndReturnUndo=t=>{e.classList.add(...t);return()=>{e.classList.remove(...t)}};t=true===t?t="":t||"";return addClassesAndReturnUndo(missingClasses(t))}function setClassesFromObject(e,t){let split=e=>e.split(" ").filter(Boolean);let r=Object.entries(t).flatMap((([e,t])=>!!t&&split(e))).filter(Boolean);let n=Object.entries(t).flatMap((([e,t])=>!t&&split(e))).filter(Boolean);let i=[];let a=[];n.forEach((t=>{if(e.classList.contains(t)){e.classList.remove(t);a.push(t)}}));r.forEach((t=>{if(!e.classList.contains(t)){e.classList.add(t);i.push(t)}}));return()=>{a.forEach((t=>e.classList.add(t)));i.forEach((t=>e.classList.remove(t)))}}function setStyles(e,t){return"object"===typeof t&&null!==t?setStylesFromObject(e,t):setStylesFromString(e,t)}function setStylesFromObject(e,t){let r={};Object.entries(t).forEach((([t,n])=>{r[t]=e.style[t];t.startsWith("--")||(t=kebabCase(t));e.style.setProperty(t,n)}));setTimeout((()=>{0===e.style.length&&e.removeAttribute("style")}));return()=>{setStyles(e,r)}}function setStylesFromString(e,t){let r=e.getAttribute("style",t);e.setAttribute("style",t);return()=>{e.setAttribute("style",r||"")}}function kebabCase(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function once(e,t=(()=>{})){let r=false;return function(){if(r)t.apply(this,arguments);else{r=true;e.apply(this,arguments)}}}directive("transition",((e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{"function"===typeof n&&(n=i(n));n?registerTransitionsFromClassString(e,n,t):registerTransitionsFromHelper(e,r,t)}));function registerTransitionsFromClassString(e,t,r){registerTransitionObject(e,setClasses,"");let n={enter:t=>{e._x_transition.enter.during=t},"enter-start":t=>{e._x_transition.enter.start=t},"enter-end":t=>{e._x_transition.enter.end=t},leave:t=>{e._x_transition.leave.during=t},"leave-start":t=>{e._x_transition.leave.start=t},"leave-end":t=>{e._x_transition.leave.end=t}};n[r](t)}function registerTransitionsFromHelper(e,t,r){registerTransitionObject(e,setStyles);let n=!t.includes("in")&&!t.includes("out")&&!r;let i=n||t.includes("in")||["enter"].includes(r);let a=n||t.includes("out")||["leave"].includes(r);t.includes("in")&&!n&&(t=t.filter(((e,r)=>r<t.indexOf("out"))));t.includes("out")&&!n&&(t=t.filter(((e,r)=>r>t.indexOf("out"))));let o=!t.includes("opacity")&&!t.includes("scale");let s=o||t.includes("opacity");let l=o||t.includes("scale");let c=s?0:1;let u=l?modifierValue(t,"scale",95)/100:1;let f=modifierValue(t,"delay",0);let d=modifierValue(t,"origin","center");let p="opacity, transform";let _=modifierValue(t,"duration",150)/1e3;let m=modifierValue(t,"duration",75)/1e3;let v="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i){e._x_transition.enter.during={transformOrigin:d,transitionDelay:f,transitionProperty:p,transitionDuration:`${_}s`,transitionTimingFunction:v};e._x_transition.enter.start={opacity:c,transform:`scale(${u})`};e._x_transition.enter.end={opacity:1,transform:"scale(1)"}}if(a){e._x_transition.leave.during={transformOrigin:d,transitionDelay:f,transitionProperty:p,transitionDuration:`${m}s`,transitionTimingFunction:v};e._x_transition.leave.start={opacity:1,transform:"scale(1)"};e._x_transition.leave.end={opacity:c,transform:`scale(${u})`}}}function registerTransitionObject(e,t,r={}){e._x_transition||(e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(r=(()=>{}),n=(()=>{})){transition(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},r,n)},out(r=(()=>{}),n=(()=>{})){transition(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},r,n)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let clickAwayCompatibleShow=()=>{"visible"===document.visibilityState?requestAnimationFrame(r):setTimeout(r)};if(t)e._x_transition&&(e._x_transition.enter||e._x_transition.leave)?e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(r):clickAwayCompatibleShow():e._x_transition?e._x_transition.in(r):clickAwayCompatibleShow();else{e._x_hidePromise=e._x_transition?new Promise(((t,r)=>{e._x_transition.out((()=>{}),(()=>t(n)));e._x_transitioning.beforeCancel((()=>r({isFromCancelledTransition:true})))})):Promise.resolve(n);queueMicrotask((()=>{let t=closestHide(e);if(t){t._x_hideChildren||(t._x_hideChildren=[]);t._x_hideChildren.push(e)}else queueMicrotask((()=>{let hideAfterChildren=e=>{let t=Promise.all([e._x_hidePromise,...(e._x_hideChildren||[]).map(hideAfterChildren)]).then((([e])=>e()));delete e._x_hidePromise;delete e._x_hideChildren;return t};hideAfterChildren(e).catch((e=>{if(!e.isFromCancelledTransition)throw e}))}))}))}};function closestHide(e){let t=e.parentNode;if(t)return t._x_hidePromise?t:closestHide(t)}function transition(e,t,{during:r,start:n,end:i}={},a=(()=>{}),o=(()=>{})){e._x_transitioning&&e._x_transitioning.cancel();if(0===Object.keys(r).length&&0===Object.keys(n).length&&0===Object.keys(i).length){a();o();return}let s,l,c;performTransition(e,{start(){s=t(e,n)},during(){l=t(e,r)},before:a,end(){s();c=t(e,i)},after:o,cleanup(){l();c()}})}function performTransition(e,t){let r,n,i;let a=once((()=>{mutateDom((()=>{r=true;n||t.before();if(!i){t.end();releaseNextTicks()}t.after();e.isConnected&&t.cleanup();delete e._x_transitioning}))}));e._x_transitioning={beforeCancels:[],beforeCancel(e){this.beforeCancels.push(e)},cancel:once((function(){while(this.beforeCancels.length)this.beforeCancels.shift()();a()})),finish:a};mutateDom((()=>{t.start();t.during()}));holdNextTicks();requestAnimationFrame((()=>{if(r)return;let a=1e3*Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""));let o=1e3*Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""));0===a&&(a=1e3*Number(getComputedStyle(e).animationDuration.replace("s","")));mutateDom((()=>{t.before()}));n=true;requestAnimationFrame((()=>{if(!r){mutateDom((()=>{t.end()}));releaseNextTicks();setTimeout(e._x_transitioning.finish,a+o);i=true}}))}))}function modifierValue(e,t,r){if(-1===e.indexOf(t))return r;const n=e[e.indexOf(t)+1];if(!n)return r;if("scale"===t&&isNaN(n))return r;if("duration"===t){let e=n.match(/([0-9]+)ms/);if(e)return e[1]}return"origin"===t&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[n,e[e.indexOf(t)+2]].join(" "):n}var P=false;function skipDuringClone(e,t=(()=>{})){return(...r)=>P?t(...r):e(...r)}function clone(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack);P=true;dontRegisterReactiveSideEffects((()=>{cloneTree(t)}));P=false}function cloneTree(e){let t=false;let shallowWalker=(e,r)=>{walk(e,((e,n)=>{if(t&&isRoot(e))return n();t=true;r(e,n)}))};initTree(e,shallowWalker)}function dontRegisterReactiveSideEffects(e){let t=i;overrideEffect(((e,r)=>{let n=t(e);a(n);return()=>{}}));e();overrideEffect(t)}function bind(e,t,r,i=[]){e._x_bindings||(e._x_bindings=n({}));e._x_bindings[t]=r;t=i.includes("camel")?camelCase(t):t;switch(t){case"value":bindInputValue(e,r);break;case"style":bindStyles(e,r);break;case"class":bindClasses(e,r);break;default:bindAttribute(e,t,r);break}}function bindInputValue(e,t){if("radio"===e.type){void 0===e.attributes.value&&(e.value=t);window.fromModel&&(e.checked=checkedAttrLooseCompare(e.value,t))}else if("checkbox"===e.type)Number.isInteger(t)?e.value=t:Number.isInteger(t)||Array.isArray(t)||"boolean"===typeof t||[null,void 0].includes(t)?Array.isArray(t)?e.checked=t.some((t=>checkedAttrLooseCompare(t,e.value))):e.checked=!!t:e.value=String(t);else if("SELECT"===e.tagName)updateSelect(e,t);else{if(e.value===t)return;e.value=t}}function bindClasses(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses();e._x_undoAddedClasses=setClasses(e,t)}function bindStyles(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles();e._x_undoAddedStyles=setStyles(e,t)}function bindAttribute(e,t,r){if([null,void 0,false].includes(r)&&attributeShouldntBePreservedIfFalsy(t))e.removeAttribute(t);else{isBooleanAttr(t)&&(r=t);setIfChanged(e,t,r)}}function setIfChanged(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function updateSelect(e,t){const r=[].concat(t).map((e=>e+""));Array.from(e.options).forEach((e=>{e.selected=r.includes(e.value)}))}function camelCase(e){return e.toLowerCase().replace(/-(\w)/g,((e,t)=>t.toUpperCase()))}function checkedAttrLooseCompare(e,t){return e==t}function isBooleanAttr(e){const t=["disabled","checked","required","readonly","hidden","open","selected","autofocus","itemscope","multiple","novalidate","allowfullscreen","allowpaymentrequest","formnovalidate","autoplay","controls","loop","muted","playsinline","default","ismap","reversed","async","defer","nomodule"];return t.includes(e)}function attributeShouldntBePreservedIfFalsy(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function getBinding(e,t,r){if(e._x_bindings&&void 0!==e._x_bindings[t])return e._x_bindings[t];let n=e.getAttribute(t);return null===n?"function"===typeof r?r():r:isBooleanAttr(t)?!![t,"true"].includes(n):""===n||n}function debounce(e,t){var r;return function(){var n=this,i=arguments;var later=function(){r=null;e.apply(n,i)};clearTimeout(r);r=setTimeout(later,t)}}function throttle(e,t){let r;return function(){let n=this,i=arguments;if(!r){e.apply(n,i);r=true;setTimeout((()=>r=false),t)}}}function plugin(e){e(F)}var N={};var $=false;function store(e,t){if(!$){N=n(N);$=true}if(void 0===t)return N[e];N[e]=t;"object"===typeof t&&null!==t&&t.hasOwnProperty("init")&&"function"===typeof t.init&&N[e].init();initInterceptors(N[e])}function getStores(){return N}var D={};function bind2(e,t){D[e]="function"!==typeof t?()=>t:t}function injectBindingProviders(e){Object.entries(D).forEach((([t,r])=>{Object.defineProperty(e,t,{get(){return(...e)=>r(...e)}})}));return e}var I={};function data(e,t){I[e]=t}function injectDataProviders(e,t){Object.entries(I).forEach((([r,n])=>{Object.defineProperty(e,r,{get(){return(...e)=>n.bind(t)(...e)},enumerable:false})}));return e}var L={get reactive(){return n},get release(){return a},get effect(){return i},get raw(){return o},version:"3.10.0",flushAndStopDeferringMutations:flushAndStopDeferringMutations,dontAutoEvaluateFunctions:dontAutoEvaluateFunctions,disableEffectScheduling:disableEffectScheduling,setReactivityEngine:setReactivityEngine,closestDataStack:closestDataStack,skipDuringClone:skipDuringClone,addRootSelector:addRootSelector,addInitSelector:addInitSelector,addScopeToNode:addScopeToNode,deferMutations:deferMutations,mapAttributes:mapAttributes,evaluateLater:evaluateLater,setEvaluator:setEvaluator,mergeProxies:mergeProxies,findClosest:findClosest,closestRoot:closestRoot,interceptor:interceptor,transition:transition,setStyles:setStyles,mutateDom:mutateDom,directive:directive,throttle:throttle,debounce:debounce,evaluate:evaluate,initTree:initTree,nextTick:nextTick,prefixed:prefix,prefix:setPrefix,plugin:plugin,magic:magic,store:store,start:start,clone:clone,bound:getBinding,$data:scope,data:data,bind:bind2};var F=L;function makeMap(e,t){const r=Object.create(null);const n=e.split(",");for(let e=0;e<n.length;e++)r[n[e]]=true;return t?e=>!!r[e.toLowerCase()]:e=>!!r[e]}var B={};var z=Object.assign;var q=Object.prototype.hasOwnProperty;var hasOwn=(e,t)=>q.call(e,t);var V=Array.isArray;var isMap=e=>"[object Map]"===toTypeString(e);var isString=e=>"string"===typeof e;var isSymbol=e=>"symbol"===typeof e;var isObject=e=>null!==e&&"object"===typeof e;var H=Object.prototype.toString;var toTypeString=e=>H.call(e);var toRawType=e=>toTypeString(e).slice(8,-1);var isIntegerKey=e=>isString(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e;var cacheStringFunction=e=>{const t=Object.create(null);return r=>{const n=t[r];return n||(t[r]=e(r))}};var K=/-(\w)/g;cacheStringFunction((e=>e.replace(K,((e,t)=>t?t.toUpperCase():""))));var W=/\B([A-Z])/g;cacheStringFunction((e=>e.replace(W,"-$1").toLowerCase()));var U=cacheStringFunction((e=>e.charAt(0).toUpperCase()+e.slice(1)));cacheStringFunction((e=>e?`on${U(e)}`:""));var hasChanged=(e,t)=>e!==t&&(e===e||t===t);var G=new WeakMap;var J=[];var Z;var Q=Symbol("");var X=Symbol("");function isEffect(e){return e&&true===e._isEffect}function effect2(e,t=B){isEffect(e)&&(e=e.raw);const r=createReactiveEffect(e,t);t.lazy||r();return r}function stop(e){if(e.active){cleanup(e);e.options.onStop&&e.options.onStop();e.active=false}}var Y=0;function createReactiveEffect(e,t){const r=function reactiveEffect(){if(!r.active)return e();if(!J.includes(r)){cleanup(r);try{enableTracking();J.push(r);Z=r;return e()}finally{J.pop();resetTracking();Z=J[J.length-1]}}};r.id=Y++;r.allowRecurse=!!t.allowRecurse;r._isEffect=true;r.active=true;r.raw=e;r.deps=[];r.options=t;return r}function cleanup(e){const{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}var ee=true;var te=[];function pauseTracking(){te.push(ee);ee=false}function enableTracking(){te.push(ee);ee=true}function resetTracking(){const e=te.pop();ee=void 0===e||e}function track(e,t,r){if(!ee||void 0===Z)return;let n=G.get(e);n||G.set(e,n=new Map);let i=n.get(r);i||n.set(r,i=new Set);if(!i.has(Z)){i.add(Z);Z.deps.push(i);false}}function trigger(e,t,r,n,i,a){const o=G.get(e);if(!o)return;const s=new Set;const add2=e=>{e&&e.forEach((e=>{(e!==Z||e.allowRecurse)&&s.add(e)}))};if("clear"===t)o.forEach(add2);else if("length"===r&&V(e))o.forEach(((e,t)=>{("length"===t||t>=n)&&add2(e)}));else{void 0!==r&&add2(o.get(r));switch(t){case"add":if(V(e))isIntegerKey(r)&&add2(o.get("length"));else{add2(o.get(Q));isMap(e)&&add2(o.get(X))}break;case"delete":if(!V(e)){add2(o.get(Q));isMap(e)&&add2(o.get(X))}break;case"set":isMap(e)&&add2(o.get(Q));break}}const run=e=>{false;e.options.scheduler?e.options.scheduler(e):e()};s.forEach(run)}var re=makeMap("__proto__,__v_isRef,__isVue");var ne=new Set(Object.getOwnPropertyNames(Symbol).map((e=>Symbol[e])).filter(isSymbol));var ie=createGetter();var ae=createGetter(false,true);var oe=createGetter(true);var se=createGetter(true,true);var le={};["includes","indexOf","lastIndexOf"].forEach((e=>{const t=Array.prototype[e];le[e]=function(...e){const r=toRaw(this);for(let e=0,t=this.length;e<t;e++)track(r,"get",e+"");const n=t.apply(r,e);return-1===n||false===n?t.apply(r,e.map(toRaw)):n}}));["push","pop","shift","unshift","splice"].forEach((e=>{const t=Array.prototype[e];le[e]=function(...e){pauseTracking();const r=t.apply(this,e);resetTracking();return r}}));function createGetter(e=false,t=false){return function get3(r,n,i){if("__v_isReactive"===n)return!e;if("__v_isReadonly"===n)return e;if("__v_raw"===n&&i===(e?t?Ee:we:t?be:ye).get(r))return r;const a=V(r);if(!e&&a&&hasOwn(le,n))return Reflect.get(le,n,i);const o=Reflect.get(r,n,i);if(isSymbol(n)?ne.has(n):re(n))return o;e||track(r,"get",n);if(t)return o;if(isRef(o)){const e=!a||!isIntegerKey(n);return e?o.value:o}return isObject(o)?e?readonly(o):reactive2(o):o}}var ce=createSetter();var ue=createSetter(true);function createSetter(e=false){return function set3(t,r,n,i){let a=t[r];if(!e){n=toRaw(n);a=toRaw(a);if(!V(t)&&isRef(a)&&!isRef(n)){a.value=n;return true}}const o=V(t)&&isIntegerKey(r)?Number(r)<t.length:hasOwn(t,r);const s=Reflect.set(t,r,n,i);t===toRaw(i)&&(o?hasChanged(n,a)&&trigger(t,"set",r,n,a):trigger(t,"add",r,n));return s}}function deleteProperty(e,t){const r=hasOwn(e,t);const n=e[t];const i=Reflect.deleteProperty(e,t);i&&r&&trigger(e,"delete",t,void 0,n);return i}function has(e,t){const r=Reflect.has(e,t);isSymbol(t)&&ne.has(t)||track(e,"has",t);return r}function ownKeys(e){track(e,"iterate",V(e)?"length":Q);return Reflect.ownKeys(e)}var fe={get:ie,set:ce,deleteProperty:deleteProperty,has:has,ownKeys:ownKeys};var de={get:oe,set(e,t){false;return true},deleteProperty(e,t){false;return true}};z({},fe,{get:ae,set:ue});z({},de,{get:se});var toReactive=e=>isObject(e)?reactive2(e):e;var toReadonly=e=>isObject(e)?readonly(e):e;var toShallow=e=>e;var getProto=e=>Reflect.getPrototypeOf(e);function get$1(e,t,r=false,n=false){e=e.__v_raw;const i=toRaw(e);const a=toRaw(t);t!==a&&!r&&track(i,"get",t);!r&&track(i,"get",a);const{has:o}=getProto(i);const s=n?toShallow:r?toReadonly:toReactive;if(o.call(i,t))return s(e.get(t));if(o.call(i,a))return s(e.get(a));e!==i&&e.get(t)}function has$1(e,t=false){const r=this.__v_raw;const n=toRaw(r);const i=toRaw(e);e!==i&&!t&&track(n,"has",e);!t&&track(n,"has",i);return e===i?r.has(e):r.has(e)||r.has(i)}function size(e,t=false){e=e.__v_raw;!t&&track(toRaw(e),"iterate",Q);return Reflect.get(e,"size",e)}function add(e){e=toRaw(e);const t=toRaw(this);const r=getProto(t);const n=r.has.call(t,e);if(!n){t.add(e);trigger(t,"add",e,e)}return this}function set$1(e,t){t=toRaw(t);const r=toRaw(this);const{has:n,get:i}=getProto(r);let a=n.call(r,e);if(a)false;else{e=toRaw(e);a=n.call(r,e)}const o=i.call(r,e);r.set(e,t);a?hasChanged(t,o)&&trigger(r,"set",e,t,o):trigger(r,"add",e,t);return this}function deleteEntry(e){const t=toRaw(this);const{has:r,get:n}=getProto(t);let i=r.call(t,e);if(i)false;else{e=toRaw(e);i=r.call(t,e)}const a=n?n.call(t,e):void 0;const o=t.delete(e);i&&trigger(t,"delete",e,void 0,a);return o}function clear(){const e=toRaw(this);const t=0!==e.size;const r=void 0;const n=e.clear();t&&trigger(e,"clear",void 0,void 0,r);return n}function createForEach(e,t){return function forEach(r,n){const i=this;const a=i.__v_raw;const o=toRaw(a);const s=t?toShallow:e?toReadonly:toReactive;!e&&track(o,"iterate",Q);return a.forEach(((e,t)=>r.call(n,s(e),s(t),i)))}}function createIterableMethod(e,t,r){return function(...n){const i=this.__v_raw;const a=toRaw(i);const o=isMap(a);const s="entries"===e||e===Symbol.iterator&&o;const l="keys"===e&&o;const c=i[e](...n);const u=r?toShallow:t?toReadonly:toReactive;!t&&track(a,"iterate",l?X:Q);return{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(e){return function(...t){false;return"delete"!==e&&this}}var pe={get(e){return get$1(this,e)},get size(){return size(this)},has:has$1,add:add,set:set$1,delete:deleteEntry,clear:clear,forEach:createForEach(false,false)};var _e={get(e){return get$1(this,e,false,true)},get size(){return size(this)},has:has$1,add:add,set:set$1,delete:deleteEntry,clear:clear,forEach:createForEach(false,true)};var me={get(e){return get$1(this,e,true)},get size(){return size(this,true)},has(e){return has$1.call(this,e,true)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(true,false)};var ve={get(e){return get$1(this,e,true,true)},get size(){return size(this,true)},has(e){return has$1.call(this,e,true)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(true,true)};var ge=["keys","values","entries",Symbol.iterator];ge.forEach((e=>{pe[e]=createIterableMethod(e,false,false);me[e]=createIterableMethod(e,true,false);_e[e]=createIterableMethod(e,false,true);ve[e]=createIterableMethod(e,true,true)}));function createInstrumentationGetter(e,t){const r=t?e?ve:_e:e?me:pe;return(t,n,i)=>"__v_isReactive"===n?!e:"__v_isReadonly"===n?e:"__v_raw"===n?t:Reflect.get(hasOwn(r,n)&&n in t?r:t,n,i)}var he={get:createInstrumentationGetter(false,false)};createInstrumentationGetter(false,true);var xe={get:createInstrumentationGetter(true,false)};createInstrumentationGetter(true,true);var ye=new WeakMap;var be=new WeakMap;var we=new WeakMap;var Ee=new WeakMap;function targetTypeMap(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(e){return e.__v_skip||!Object.isExtensible(e)?0:targetTypeMap(toRawType(e))}function reactive2(e){return e&&e.__v_isReadonly?e:createReactiveObject(e,false,fe,he,ye)}function readonly(e){return createReactiveObject(e,true,de,xe,we)}function createReactiveObject(e,t,r,n,i){if(!isObject(e)){false;return e}if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=i.get(e);if(a)return a;const o=getTargetType(e);if(0===o)return e;const s=new Proxy(e,2===o?n:r);i.set(e,s);return s}function toRaw(e){return e&&toRaw(e.__v_raw)||e}function isRef(e){return Boolean(e&&true===e.__v_isRef)}magic("nextTick",(()=>nextTick));magic("dispatch",(e=>dispatch.bind(dispatch,e)));magic("watch",((e,{evaluateLater:t,effect:r})=>(n,i)=>{let a=t(n);let o=true;let s;let l=r((()=>a((e=>{JSON.stringify(e);o?s=e:queueMicrotask((()=>{i(e,s);s=e}));o=false}))));e._x_effects.delete(l)}));magic("store",getStores);magic("data",(e=>scope(e)));magic("root",(e=>closestRoot(e)));magic("refs",(e=>{if(e._x_refs_proxy)return e._x_refs_proxy;e._x_refs_proxy=mergeProxies(getArrayOfRefObject(e));return e._x_refs_proxy}));function getArrayOfRefObject(e){let t=[];let r=e;while(r){r._x_refs&&t.push(r._x_refs);r=r.parentNode}return t}var Se={};function findAndIncrementId(e){Se[e]||(Se[e]=0);return++Se[e]}function closestIdRoot(e,t){return findClosest(e,(e=>{if(e._x_ids&&e._x_ids[t])return true}))}function setIdRoot(e,t){e._x_ids||(e._x_ids={});e._x_ids[t]||(e._x_ids[t]=findAndIncrementId(t))}magic("id",(e=>(t,r=null)=>{let n=closestIdRoot(e,t);let i=n?n._x_ids[t]:findAndIncrementId(t);return r?`${t}-${i}-${r}`:`${t}-${i}`}));magic("el",(e=>e));warnMissingPluginMagic("Focus","focus","focus");warnMissingPluginMagic("Persist","persist","persist");function warnMissingPluginMagic(e,t,r){magic(t,(t=>warn(`You can't use [$${directiveName}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,t)))}directive("modelable",((e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);let innerGet=()=>{let e;i((t=>e=t));return e};let a=n(`${t} = __placeholder`);let innerSet=e=>a((()=>{}),{scope:{__placeholder:e}});let o=innerGet();innerSet(o);queueMicrotask((()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let t=e._x_model.get;let n=e._x_model.set;r((()=>innerSet(t())));r((()=>n(innerGet())))}))}));directive("teleport",((e,{expression:t},{cleanup:r})=>{"template"!==e.tagName.toLowerCase()&&warn("x-teleport can only be used on a <template> tag",e);let n=document.querySelector(t);n||warn(`Cannot find x-teleport element for selector: "${t}"`);let i=e.content.cloneNode(true).firstElementChild;e._x_teleport=i;i._x_teleportBack=e;e._x_forwardEvents&&e._x_forwardEvents.forEach((t=>{i.addEventListener(t,(t=>{t.stopPropagation();e.dispatchEvent(new t.constructor(t.type,t))}))}));addScopeToNode(i,{},e);mutateDom((()=>{n.appendChild(i);initTree(i);i._x_ignore=true}));r((()=>i.remove()))}));var handler=()=>{};handler.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=true:e._x_ignore=true;r((()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore}))};directive("ignore",handler);directive("effect",((e,{expression:t},{effect:r})=>r(evaluateLater(e,t))));function on(e,t,r,n){let i=e;let handler3=e=>n(e);let a={};let wrapHandler=(e,t)=>r=>t(e,r);r.includes("dot")&&(t=dotSyntax(t));r.includes("camel")&&(t=camelCase2(t));r.includes("passive")&&(a.passive=true);r.includes("capture")&&(a.capture=true);r.includes("window")&&(i=window);r.includes("document")&&(i=document);r.includes("prevent")&&(handler3=wrapHandler(handler3,((e,t)=>{t.preventDefault();e(t)})));r.includes("stop")&&(handler3=wrapHandler(handler3,((e,t)=>{t.stopPropagation();e(t)})));r.includes("self")&&(handler3=wrapHandler(handler3,((t,r)=>{r.target===e&&t(r)})));if(r.includes("away")||r.includes("outside")){i=document;handler3=wrapHandler(handler3,((t,r)=>{e.contains(r.target)||false!==r.target.isConnected&&(e.offsetWidth<1&&e.offsetHeight<1||false!==e._x_isShown&&t(r))}))}r.includes("once")&&(handler3=wrapHandler(handler3,((e,r)=>{e(r);i.removeEventListener(t,handler3,a)})));handler3=wrapHandler(handler3,((e,n)=>{isKeyEvent(t)&&isListeningForASpecificKeyThatHasntBeenPressed(n,r)||e(n)}));if(r.includes("debounce")){let e=r[r.indexOf("debounce")+1]||"invalid-wait";let t=isNumeric(e.split("ms")[0])?Number(e.split("ms")[0]):250;handler3=debounce(handler3,t)}if(r.includes("throttle")){let e=r[r.indexOf("throttle")+1]||"invalid-wait";let t=isNumeric(e.split("ms")[0])?Number(e.split("ms")[0]):250;handler3=throttle(handler3,t)}i.addEventListener(t,handler3,a);return()=>{i.removeEventListener(t,handler3,a)}}function dotSyntax(e){return e.replace(/-/g,".")}function camelCase2(e){return e.toLowerCase().replace(/-(\w)/g,((e,t)=>t.toUpperCase()))}function isNumeric(e){return!Array.isArray(e)&&!isNaN(e)}function kebabCase2(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function isKeyEvent(e){return["keydown","keyup"].includes(e)}function isListeningForASpecificKeyThatHasntBeenPressed(e,t){let r=t.filter((e=>!["window","document","prevent","stop","once"].includes(e)));if(r.includes("debounce")){let e=r.indexOf("debounce");r.splice(e,isNumeric((r[e+1]||"invalid-wait").split("ms")[0])?2:1)}if(0===r.length)return false;if(1===r.length&&keyToModifiers(e.key).includes(r[0]))return false;const n=["ctrl","shift","alt","meta","cmd","super"];const i=n.filter((e=>r.includes(e)));r=r.filter((e=>!i.includes(e)));if(i.length>0){const t=i.filter((t=>{"cmd"!==t&&"super"!==t||(t="meta");return e[`${t}Key`]}));if(t.length===i.length&&keyToModifiers(e.key).includes(r[0]))return false}return true}function keyToModifiers(e){if(!e)return[];e=kebabCase2(e);let t={ctrl:"control",slash:"/",space:"-",spacebar:"-",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",equal:"="};t[e]=e;return Object.keys(t).map((r=>{if(t[r]===e)return r})).filter((e=>e))}directive("model",((e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let a=evaluateLater(e,r);let o=`${r} = rightSideOfExpression($event, ${r})`;let s=evaluateLater(e,o);var l="select"===e.tagName.toLowerCase()||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let c=generateAssignmentFunction(e,t,r);let u=on(e,l,t,(e=>{s((()=>{}),{scope:{$event:e,rightSideOfExpression:c}})}));e._x_removeModelListeners||(e._x_removeModelListeners={});e._x_removeModelListeners.default=u;i((()=>e._x_removeModelListeners.default()));let f=evaluateLater(e,`${r} = __placeholder`);e._x_model={get(){let e;a((t=>e=t));return e},set(e){f((()=>{}),{scope:{__placeholder:e}})}};e._x_forceModelUpdate=()=>{a((t=>{void 0===t&&r.match(/\./)&&(t="");window.fromModel=true;mutateDom((()=>bind(e,"value",t)));delete window.fromModel}))};n((()=>{t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate()}))}));function generateAssignmentFunction(e,t,r){"radio"===e.type&&mutateDom((()=>{e.hasAttribute("name")||e.setAttribute("name",r)}));return(r,n)=>mutateDom((()=>{if(r instanceof CustomEvent&&void 0!==r.detail)return r.detail||r.target.value;if("checkbox"===e.type){if(Array.isArray(n)){let e=t.includes("number")?safeParseNumber(r.target.value):r.target.value;return r.target.checked?n.concat([e]):n.filter((t=>!checkedAttrLooseCompare2(t,e)))}return r.target.checked}if("select"===e.tagName.toLowerCase()&&e.multiple)return t.includes("number")?Array.from(r.target.selectedOptions).map((e=>{let t=e.value||e.text;return safeParseNumber(t)})):Array.from(r.target.selectedOptions).map((e=>e.value||e.text));{let e=r.target.value;return t.includes("number")?safeParseNumber(e):t.includes("trim")?e.trim():e}}))}function safeParseNumber(e){let t=e?parseFloat(e):null;return isNumeric2(t)?t:e}function checkedAttrLooseCompare2(e,t){return e==t}function isNumeric2(e){return!Array.isArray(e)&&!isNaN(e)}directive("cloak",(e=>queueMicrotask((()=>mutateDom((()=>e.removeAttribute(prefix("cloak"))))))));addInitSelector((()=>`[${prefix("init")}]`));directive("init",skipDuringClone(((e,{expression:t},{evaluate:r})=>"string"===typeof t?!!t.trim()&&r(t,{},false):r(t,{},false))));directive("text",((e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r((()=>{i((t=>{mutateDom((()=>{e.textContent=t}))}))}))}));directive("html",((e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r((()=>{i((t=>{mutateDom((()=>{e.innerHTML=t;e._x_ignoreSelf=true;initTree(e);delete e._x_ignoreSelf}))}))}))}));mapAttributes(startingWith(":",into(prefix("bind:"))));directive("bind",((e,{value:t,modifiers:r,expression:n,original:i},{effect:a})=>{if(!t)return applyBindingsObject(e,n,i,a);if("key"===t)return storeKeyForXFor(e,n);let o=evaluateLater(e,n);a((()=>o((i=>{void 0===i&&n.match(/\./)&&(i="");mutateDom((()=>bind(e,t,i,r)))}))))}));function applyBindingsObject(e,t,r,n){let i={};injectBindingProviders(i);let a=evaluateLater(e,t);let o=[];while(o.length)o.pop()();a((t=>{let n=Object.entries(t).map((([e,t])=>({name:e,value:t})));let i=attributesOnly(n);n=n.map((e=>i.find((t=>t.name===e.name))?{name:`x-bind:${e.name}`,value:`"${e.value}"`}:e));directives(e,n,r).map((e=>{o.push(e.runCleanups);e()}))}),{scope:i})}function storeKeyForXFor(e,t){e._x_keyExpression=t}addRootSelector((()=>`[${prefix("data")}]`));directive("data",skipDuringClone(((e,{expression:t},{cleanup:r})=>{t=""===t?"{}":t;let i={};injectMagics(i,e);let a={};injectDataProviders(a,i);let o=evaluate(e,t,{scope:a});void 0===o&&(o={});injectMagics(o,e);let s=n(o);initInterceptors(s);let l=addScopeToNode(e,s);s.init&&evaluate(e,s.init);r((()=>{s.destroy&&evaluate(e,s.destroy);l()}))})));directive("show",((e,{modifiers:t,expression:r},{effect:n})=>{let i=evaluateLater(e,r);e._x_doHide||(e._x_doHide=()=>{mutateDom((()=>e.style.display="none"))});e._x_doShow||(e._x_doShow=()=>{mutateDom((()=>{1===e.style.length&&"none"===e.style.display?e.removeAttribute("style"):e.style.removeProperty("display")}))});let hide=()=>{e._x_doHide();e._x_isShown=false};let show=()=>{e._x_doShow();e._x_isShown=true};let clickAwayCompatibleShow=()=>setTimeout(show);let a=once((e=>e?show():hide()),(t=>{"function"===typeof e._x_toggleAndCascadeWithTransitions?e._x_toggleAndCascadeWithTransitions(e,t,show,hide):t?clickAwayCompatibleShow():hide()}));let o;let s=true;n((()=>i((e=>{if(s||e!==o){t.includes("immediate")&&(e?clickAwayCompatibleShow():hide());a(e);o=e;s=false}}))))}));directive("for",((e,{expression:t},{effect:r,cleanup:n})=>{let i=parseForExpression(t);let a=evaluateLater(e,i.items);let o=evaluateLater(e,e._x_keyExpression||"index");e._x_prevKeys=[];e._x_lookup={};r((()=>loop(e,i,a,o)));n((()=>{Object.values(e._x_lookup).forEach((e=>e.remove()));delete e._x_prevKeys;delete e._x_lookup}))}));function loop(e,t,r,i){let isObject2=e=>"object"===typeof e&&!Array.isArray(e);let a=e;r((r=>{isNumeric3(r)&&r>=0&&(r=Array.from(Array(r).keys(),(e=>e+1)));void 0===r&&(r=[]);let o=e._x_lookup;let s=e._x_prevKeys;let l=[];let c=[];if(isObject2(r))r=Object.entries(r).map((([e,n])=>{let a=getIterationScopeVariables(t,n,e,r);i((e=>c.push(e)),{scope:{index:e,...a}});l.push(a)}));else for(let e=0;e<r.length;e++){let n=getIterationScopeVariables(t,r[e],e,r);i((e=>c.push(e)),{scope:{index:e,...n}});l.push(n)}let u=[];let f=[];let d=[];let p=[];for(let e=0;e<s.length;e++){let t=s[e];-1===c.indexOf(t)&&d.push(t)}s=s.filter((e=>!d.includes(e)));let _="template";for(let e=0;e<c.length;e++){let t=c[e];let r=s.indexOf(t);if(-1===r){s.splice(e,0,t);u.push([_,e])}else if(r!==e){let t=s.splice(e,1)[0];let n=s.splice(r-1,1)[0];s.splice(e,0,n);s.splice(r,0,t);f.push([t,n])}else p.push(t);_=t}for(let e=0;e<d.length;e++){let t=d[e];!o[t]._x_effects||o[t]._x_effects.forEach(dequeueJob);o[t].remove();o[t]=null;delete o[t]}for(let e=0;e<f.length;e++){let[t,r]=f[e];let n=o[t];let i=o[r];let a=document.createElement("div");mutateDom((()=>{i.after(a);n.after(i);i._x_currentIfEl&&i.after(i._x_currentIfEl);a.before(n);n._x_currentIfEl&&n.after(n._x_currentIfEl);a.remove()}));refreshScope(i,l[c.indexOf(r)])}for(let e=0;e<u.length;e++){let[t,r]=u[e];let i="template"===t?a:o[t];i._x_currentIfEl&&(i=i._x_currentIfEl);let s=l[r];let f=c[r];let d=document.importNode(a.content,true).firstElementChild;addScopeToNode(d,n(s),a);mutateDom((()=>{i.after(d);initTree(d)}));"object"===typeof f&&warn("x-for key cannot be an object, it must be a string or an integer",a);o[f]=d}for(let e=0;e<p.length;e++)refreshScope(o[p[e]],l[c.indexOf(p[e])]);a._x_prevKeys=c}))}function parseForExpression(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/;let r=/^\s*\(|\)\s*$/g;let n=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;let i=e.match(n);if(!i)return;let a={};a.items=i[2].trim();let o=i[1].replace(r,"").trim();let s=o.match(t);if(s){a.item=o.replace(t,"").trim();a.index=s[1].trim();s[2]&&(a.collection=s[2].trim())}else a.item=o;return a}function getIterationScopeVariables(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t)){let r=e.item.replace("[","").replace("]","").split(",").map((e=>e.trim()));r.forEach(((e,r)=>{i[e]=t[r]}))}else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&"object"===typeof t){let r=e.item.replace("{","").replace("}","").split(",").map((e=>e.trim()));r.forEach((e=>{i[e]=t[e]}))}else i[e.item]=t;e.index&&(i[e.index]=r);e.collection&&(i[e.collection]=n);return i}function isNumeric3(e){return!Array.isArray(e)&&!isNaN(e)}function handler2(){}handler2.inline=(e,{expression:t},{cleanup:r})=>{let n=closestRoot(e);n._x_refs||(n._x_refs={});n._x_refs[t]=e;r((()=>delete n._x_refs[t]))};directive("ref",handler2);directive("if",((e,{expression:t},{effect:r,cleanup:n})=>{let i=evaluateLater(e,t);let show=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let t=e.content.cloneNode(true).firstElementChild;addScopeToNode(t,{},e);mutateDom((()=>{e.after(t);initTree(t)}));e._x_currentIfEl=t;e._x_undoIf=()=>{walk(t,(e=>{!e._x_effects||e._x_effects.forEach(dequeueJob)}));t.remove();delete e._x_currentIfEl};return t};let hide=()=>{if(e._x_undoIf){e._x_undoIf();delete e._x_undoIf}};r((()=>i((e=>{e?show():hide()}))));n((()=>e._x_undoIf&&e._x_undoIf()))}));directive("id",((e,{expression:t},{evaluate:r})=>{let n=r(t);n.forEach((t=>setIdRoot(e,t)))}));mapAttributes(startingWith("@",into(prefix("on:"))));directive("on",skipDuringClone(((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let a=n?evaluateLater(e,n):()=>{};if("template"===e.tagName.toLowerCase()){e._x_forwardEvents||(e._x_forwardEvents=[]);e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t)}let o=on(e,t,r,(e=>{a((()=>{}),{scope:{$event:e},params:[e]})}));i((()=>o()))})));warnMissingPluginDirective("Collapse","collapse","collapse");warnMissingPluginDirective("Intersect","intersect","intersect");warnMissingPluginDirective("Focus","trap","focus");warnMissingPluginDirective("Mask","mask","mask");function warnMissingPluginDirective(e,t,r){directive(t,(n=>warn(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n)))}F.setEvaluator(normalEvaluator);F.setReactivityEngine({reactive:reactive2,effect:effect2,release:stop,raw:toRaw});var ke=F;var Ae=ke;export{Ae as default};
|
2
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
2
|
+
Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<!-- Session Status -->
|
6
|
+
<%= render(AuthSessionStatusComponent.new({ class: "mb-4", status: flash[:status] })) %>
|
7
|
+
|
8
|
+
<%= form_with model: @form, url: password_request_path do |form| %>
|
9
|
+
<!-- Email Address -->
|
10
|
+
<div>
|
11
|
+
<%= render(InputLabelComponent.new({ for: "email", value: "Email" })) %>
|
12
|
+
|
13
|
+
<%= render(TextInputComponent.new({ id: "email", class: "block mt-1 w-full", type: "email", name: "email", value: @form.email, required: true, autofocus: true, autocomplete: "username" })) %>
|
14
|
+
|
15
|
+
<%= render(InputErrorComponent.new({ class: "mt-2", message: @form.error_messages[:email] })) %>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="flex items-center justify-end mt-4">
|
19
|
+
<%= render(PrimaryButtonComponent.new) do %>
|
20
|
+
Email Password Reset Link
|
21
|
+
<% end %>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<!-- Session Status -->
|
2
|
+
<%= render(AuthSessionStatusComponent.new({ class: "mb-4", status: flash[:status] })) %>
|
3
|
+
|
4
|
+
<%= form_with model: @form, url: login_path do |form| %>
|
5
|
+
<!-- Email Address -->
|
6
|
+
<div>
|
7
|
+
<%= render(InputLabelComponent.new({ for: "email", value: "Email" })) %>
|
8
|
+
|
9
|
+
<%= render(TextInputComponent.new({ id: "email", class: "block mt-1 w-full", type: "email", name: "email", value: @form.email, required: true, autofocus: true, autocomplete: "username" })) %>
|
10
|
+
|
11
|
+
<%= render(InputErrorComponent.new({ class: "mt-2", message: @form.error_messages[:email] })) %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<!-- Password -->
|
15
|
+
<div class="mt-4">
|
16
|
+
<%= render(InputLabelComponent.new({ for: "password", value: "Password" })) %>
|
17
|
+
|
18
|
+
<%= render(TextInputComponent.new({ id: "password", class: "block mt-1 w-full", type: "password", name: "password", required: true, autocomplete: "current-password" })) %>
|
19
|
+
|
20
|
+
<%= render(InputErrorComponent.new({ class: "mt-2", message: @form.error_messages[:password] })) %>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<!-- Remember Me -->
|
24
|
+
<div class="block mt-4">
|
25
|
+
<label for="remember_me" class="inline-flex items-center">
|
26
|
+
<input id="remember_me" type="checkbox" class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800" name="remember">
|
27
|
+
<span class="ms-2 text-sm text-gray-600 dark:text-gray-400">Remember me</span>
|
28
|
+
</label>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div class="flex items-center justify-end mt-4">
|
32
|
+
<a class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800" href="<%= password_request_path %>">
|
33
|
+
Forgot your password?
|
34
|
+
</a>
|
35
|
+
|
36
|
+
<%= render(PrimaryButtonComponent.new({ class: "ms-4" })) do %>
|
37
|
+
Login
|
38
|
+
<% end %>
|
39
|
+
</div>
|
40
|
+
<% end %>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<%= form_with model: @form, url: register_path do |form| %>
|
2
|
+
<!-- Name -->
|
3
|
+
<div>
|
4
|
+
<%= render(InputLabelComponent.new({ for: "name", value: "Name" })) %>
|
5
|
+
|
6
|
+
<%= render(TextInputComponent.new({ id: "name", class: "block mt-1 w-full", type: "text", name: "name", value: @form.name, required: true, autofocus: true, autocomplete: "name" })) %>
|
7
|
+
|
8
|
+
<%= render(InputErrorComponent.new({ class: "mt-2", message: @form.error_messages[:name] })) %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<!-- Email Address -->
|
12
|
+
<div class="mt-4">
|
13
|
+
<%= render(InputLabelComponent.new({ for: "email", value: "Email" })) %>
|
14
|
+
|
15
|
+
<%= render(TextInputComponent.new({ id: "email", class: "block mt-1 w-full", type: "email", name: "email", value: @form.email, required: true, autocomplete: "username" })) %>
|
16
|
+
|
17
|
+
<%= render(InputErrorComponent.new({ class: "mt-2", message: @form.error_messages[:email] })) %>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<!-- Password -->
|
21
|
+
<div class="mt-4">
|
22
|
+
<%= render(InputLabelComponent.new({ for: "password", value: "Password" })) %>
|
23
|
+
|
24
|
+
<%= render(TextInputComponent.new({ id: "password", class: "block mt-1 w-full", type: "password", name: "password", required: true, autocomplete: "new-password" })) %>
|
25
|
+
|
26
|
+
<%= render(InputErrorComponent.new({ class: "mt-2", message: @form.error_messages[:password] })) %>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<!-- Confirm Password -->
|
30
|
+
<div class="mt-4">
|
31
|
+
<%= render(InputLabelComponent.new({ for: "password_confirmation", value: "Confirm Password" })) %>
|
32
|
+
|
33
|
+
<%= render(TextInputComponent.new({ id: "password_confirmation", class: "block mt-1 w-full", type: "password", name: "password_confirmation", required: true, autocomplete: "new-password" })) %>
|
34
|
+
|
35
|
+
<%= render(InputErrorComponent.new({ class: "mt-2", message: @form.error_messages[:password_confirmation] })) %>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<div class="flex items-center justify-end mt-4">
|
39
|
+
<a class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800" href="<%= login_path %>">
|
40
|
+
Already registered?
|
41
|
+
</a>
|
42
|
+
|
43
|
+
<%= render(PrimaryButtonComponent.new({ class: "ms-4" })) do %>
|
44
|
+
Register
|
45
|
+
<% end %>
|
46
|
+
</div>
|
47
|
+
<% end %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<%= form_with model: @form, url: password_store_path do |form| %>
|
2
|
+
<!-- Password Reset Token -->
|
3
|
+
<input type="hidden" name="token" value="<%= @form.token %>">
|
4
|
+
|
5
|
+
<!-- Password -->
|
6
|
+
<div>
|
7
|
+
<%= render(InputLabelComponent.new({ for: "password", value: "Password" })) %>
|
8
|
+
|
9
|
+
<%= render(TextInputComponent.new({ id: "password", class: "block mt-1 w-full", type: "password", name: "password", required: true, autofocus: true, autocomplete: "new-password" })) %>
|
10
|
+
|
11
|
+
<%= render(InputErrorComponent.new({ class: "mt-2", message: @form.error_messages[:password] })) %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<!-- Confirm Password -->
|
15
|
+
<div class="mt-4">
|
16
|
+
<%= render(InputLabelComponent.new({ for: "password_confirmation", value: "Confirm Password" })) %>
|
17
|
+
|
18
|
+
<%= render(TextInputComponent.new({ id: "password_confirmation", class: "block mt-1 w-full", type: "password", name: "password_confirmation", required: true, autocomplete: "new-password" })) %>
|
19
|
+
|
20
|
+
<%= render(InputErrorComponent.new({ class: "mt-2", message: @form.error_messages[:password_confirmation] })) %>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="flex items-center justify-end mt-4">
|
24
|
+
<%= render(PrimaryButtonComponent.new) do %>
|
25
|
+
Reset Password
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% content_for(:header) do %>
|
2
|
+
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
|
3
|
+
Dashboard
|
4
|
+
</h2>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<div class="py-12">
|
8
|
+
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
9
|
+
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg">
|
10
|
+
<div class="p-6 text-gray-900 dark:text-gray-100">
|
11
|
+
You're logged in!
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -0,0 +1,92 @@
|
|
1
|
+
<nav x-data="{ open: false }" class="bg-white dark:bg-gray-800 border-b border-gray-100 dark:border-gray-700">
|
2
|
+
<!-- Primary Navigation Menu -->
|
3
|
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
4
|
+
<div class="flex justify-between h-16">
|
5
|
+
<div class="flex">
|
6
|
+
<!-- Logo -->
|
7
|
+
<div class="shrink-0 flex items-center">
|
8
|
+
<a href="<%= dashboard_path %>">
|
9
|
+
<%= render(ApplicationLogoComponent.new({ class: "block h-9 w-auto fill-current text-gray-800 dark:text-gray-200" })) %>
|
10
|
+
</a>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<!-- Navigation Links -->
|
14
|
+
<div class="hidden space-x-8 sm:-my-px sm:ms-10 sm:flex">
|
15
|
+
<%= render(NavLinkComponent.new({ href: dashboard_path })) do %>
|
16
|
+
Dashboard
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<!-- Settings Dropdown -->
|
22
|
+
<div class="hidden sm:flex sm:items-center sm:ms-6">
|
23
|
+
<%= render DropdownComponent.new do |component| %>
|
24
|
+
<% component.with_trigger(classes: "") do %>
|
25
|
+
<button class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none transition ease-in-out duration-150">
|
26
|
+
<div><%= Current.user.name %></div>
|
27
|
+
|
28
|
+
<div class="ms-1">
|
29
|
+
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
30
|
+
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
|
31
|
+
</svg>
|
32
|
+
</div>
|
33
|
+
</button>
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
<%= render(DropdownLinkComponent.new({ href: profile_edit_path })) do %>
|
37
|
+
Profile
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<!-- Authentication -->
|
41
|
+
<form method="POST" action="<%= logout_path %>">
|
42
|
+
<input type="hidden" name="authenticity_token" value="<%= form_authenticity_token %>">
|
43
|
+
<%= render(DropdownLinkComponent.new({ href: logout_path, onclick: "event.preventDefault();this.closest('form').submit();" })) do %>
|
44
|
+
Log Out
|
45
|
+
<% end %>
|
46
|
+
</form>
|
47
|
+
<% end %>
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<!-- Hamburger -->
|
51
|
+
<div class="-me-2 flex items-center sm:hidden">
|
52
|
+
<button @click="open = ! open" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-900 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-900 focus:text-gray-500 dark:focus:text-gray-400 transition duration-150 ease-in-out">
|
53
|
+
<svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
|
54
|
+
<path :class="{'hidden': open, 'inline-flex': ! open }" class="inline-flex" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
55
|
+
<path :class="{'hidden': ! open, 'inline-flex': open }" class="hidden" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
56
|
+
</svg>
|
57
|
+
</button>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<!-- Responsive Navigation Menu -->
|
63
|
+
<div :class="{'block': open, 'hidden': ! open}" class="hidden sm:hidden">
|
64
|
+
<div class="pt-2 pb-3 space-y-1">
|
65
|
+
<%= render(ResponsiveNavLinkComponent.new({ href: dashboard_path })) do %>
|
66
|
+
Dashboard
|
67
|
+
<% end %>
|
68
|
+
</div>
|
69
|
+
|
70
|
+
<!-- Responsive Settings Options -->
|
71
|
+
<div class="pt-4 pb-1 border-t border-gray-200 dark:border-gray-600">
|
72
|
+
<div class="px-4">
|
73
|
+
<div class="font-medium text-base text-gray-800 dark:text-gray-200"><%= Current.user.name %></div>
|
74
|
+
<div class="font-medium text-sm text-gray-500"><%= Current.user.email %></div>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
<div class="mt-3 space-y-1">
|
78
|
+
<%= render(ResponsiveNavLinkComponent.new({ href: profile_edit_path })) do %>
|
79
|
+
Profile
|
80
|
+
<% end %>
|
81
|
+
|
82
|
+
<!-- Authentication -->
|
83
|
+
<form method="POST" action="<%= logout_path %>">
|
84
|
+
<input type="hidden" name="authenticity_token" value="<%= form_authenticity_token %>">
|
85
|
+
<%= render(ResponsiveNavLinkComponent.new({ href: logout_path, onclick: "event.preventDefault();this.closest('form').submit();" })) do %>
|
86
|
+
Log Out
|
87
|
+
<% end %>
|
88
|
+
</form>
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
</nav>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
|
7
|
+
<title><%= content_for(:title) || "Rails" %></title>
|
8
|
+
|
9
|
+
<%= csrf_meta_tags %>
|
10
|
+
<%= csp_meta_tag %>
|
11
|
+
|
12
|
+
<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
|
13
|
+
|
14
|
+
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
15
|
+
<%= javascript_importmap_tags %>
|
16
|
+
|
17
|
+
<%= hotwire_livereload_tags if Rails.env.development? %>
|
18
|
+
<%= turbo_refreshes_with method: :morph, scroll: :preserve %>
|
19
|
+
|
20
|
+
<%= yield :head %>
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body class="font-sans antialiased">
|
24
|
+
<div class="min-h-screen bg-gray-100">
|
25
|
+
<%= render "layouts/navigation" %>
|
26
|
+
|
27
|
+
<!-- Page Heading -->
|
28
|
+
<% if content_for?(:header) %>
|
29
|
+
<header class="bg-white dark:bg-gray-800 shadow">
|
30
|
+
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
|
31
|
+
<%= yield :header %>
|
32
|
+
</div>
|
33
|
+
</header>
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
<!-- Page Content -->
|
37
|
+
<main>
|
38
|
+
<%= yield %>
|
39
|
+
</main>
|
40
|
+
</div>
|
41
|
+
</body>
|
42
|
+
</html>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
|
7
|
+
<title><%= content_for(:title) || "Rails" %></title>
|
8
|
+
|
9
|
+
<%= csrf_meta_tags %>
|
10
|
+
<%= csp_meta_tag %>
|
11
|
+
|
12
|
+
<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
|
13
|
+
|
14
|
+
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
15
|
+
<%= javascript_importmap_tags %>
|
16
|
+
|
17
|
+
<%= hotwire_livereload_tags if Rails.env.development? %>
|
18
|
+
<%= turbo_refreshes_with method: :morph, scroll: :preserve %>
|
19
|
+
</head>
|
20
|
+
<body class="font-sans text-gray-900 antialiased">
|
21
|
+
<div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100 dark:bg-gray-900">
|
22
|
+
<div>
|
23
|
+
<a href="/">
|
24
|
+
<%= render(ApplicationLogoComponent.new({ class: "w-20 h-20 fill-current text-gray-500" })) %>
|
25
|
+
</a>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-gray-800 shadow-md overflow-hidden sm:rounded-lg">
|
29
|
+
<%= yield %>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
</body>
|
33
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<% content_for(:header) do %>
|
2
|
+
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
|
3
|
+
Profile
|
4
|
+
</h2>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<div class="py-12">
|
8
|
+
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">
|
9
|
+
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
10
|
+
<div class="max-w-xl">
|
11
|
+
<%= render "profile/partials/update_profile_information_form" %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
16
|
+
<div class="max-w-xl">
|
17
|
+
<%= render "profile/partials/update_password_form" %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
22
|
+
<div class="max-w-xl">
|
23
|
+
<%= render "profile/partials/delete_user_form" %>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|