Files
WMS/storage/framework/views/00a9a72d6af4a09fd7fdc60635862604.php
T

137 lines
6.5 KiB
PHP
Executable File

<?php # [BlazeFolded]:{flux::button}:{/Users/mag/Sites/WMS/Concepts/WMS_Core/vendor/livewire/flux/src/../stubs/resources/views/flux/button/index.blade.php}:{1776985208} ?>
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
'optionsRoute' => 'passkey.login-options',
'submitRoute' => 'passkey.login',
'label' => __('Sign in with a passkey'),
'loadingLabel' => __('Authenticating...'),
'separator' => __('Or continue with email'),
]));
foreach ($attributes->all() as $__key => $__value) {
if (in_array($__key, $__propNames)) {
$$__key = $$__key ?? $__value;
} else {
$__newAttributes[$__key] = $__value;
}
}
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
unset($__propNames);
unset($__newAttributes);
foreach (array_filter(([
'optionsRoute' => 'passkey.login-options',
'submitRoute' => 'passkey.login',
'label' => __('Sign in with a passkey'),
'loadingLabel' => __('Authenticating...'),
'separator' => __('Or continue with email'),
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
$$__key = $$__key ?? $__value;
}
$__defined_vars = get_defined_vars();
foreach ($attributes->all() as $__key => $__value) {
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
}
unset($__defined_vars, $__key, $__value); ?>
<?php
$__assetKey = '2307540050-0';
ob_start();
?>
<?php echo app('Illuminate\Foundation\Vite')('resources/js/passkeys.js'); ?>
<?php
$__output = ob_get_clean();
// If the asset has already been loaded anywhere during this request, skip it...
if (in_array($__assetKey, \Livewire\Features\SupportScriptsAndAssets\SupportScriptsAndAssets::$alreadyRunAssetKeys)) {
// Skip it...
} else {
\Livewire\Features\SupportScriptsAndAssets\SupportScriptsAndAssets::$alreadyRunAssetKeys[] = $__assetKey;
// Check if we're in a Livewire component or not and store the asset accordingly...
if (isset($this)) {
\Livewire\store($this)->push('assets', $__output, $__assetKey);
} else {
\Livewire\Features\SupportScriptsAndAssets\SupportScriptsAndAssets::$nonLivewireAssets[$__assetKey] = $__output;
}
}
?>
<div
x-data="{
supported: false,
loading: false,
error: null,
updateSupport() {
this.supported = Boolean(window.Passkeys?.isSupported());
},
init() {
this.updateSupport();
window.addEventListener('passkeys:ready', () => this.updateSupport(), { once: true });
},
async verify() {
this.loading = true;
this.error = null;
try {
const response = await window.Passkeys.verify({
routes: {
options: '<?php echo e(route($optionsRoute)); ?>',
submit: '<?php echo e(route($submitRoute)); ?>',
},
});
Livewire.navigate(response.redirect || '/dashboard');
} catch (e) {
if (e.constructor?.name !== 'UserCancelledError') {
this.error = e.message;
}
} finally {
this.loading = false;
}
},
}"
>
<template x-if="supported">
<div>
<div class="grid gap-2">
<?php ob_start(); ?><button type="button" class="relative items-center font-medium justify-center gap-2 whitespace-nowrap disabled:opacity-75 dark:disabled:opacity-75 disabled:cursor-default disabled:pointer-events-none justify-center h-10 text-sm rounded-lg ps-3 pe-4 inline-flex bg-white hover:bg-zinc-50 dark:bg-zinc-700 dark:hover:bg-zinc-600/75 text-zinc-800 dark:text-white border border-zinc-200 hover:border-zinc-200 border-b-zinc-300/80 dark:border-zinc-600 dark:hover:border-zinc-600 shadow-xs [[data-flux-button-group]_&amp;]:border-s-0 [:is([data-flux-button-group]&gt;&amp;:first-child,_[data-flux-button-group]_:first-child&gt;&amp;)]:border-s-[1px] w-full" data-flux-button="data-flux-button" data-flux-group-target="data-flux-group-target" x-on:click="verify()" x-bind:disabled="loading">
<svg class="shrink-0 [:where(&amp;)]:size-4" data-flux-icon xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
<path fill-rule="evenodd" d="M8 3c-.988 0-1.908.286-2.682.78a.75.75 0 0 1-.806-1.266A6.5 6.5 0 0 1 14.5 8c0 1.665-.333 3.254-.936 4.704a.75.75 0 0 1-1.385-.577C12.708 10.857 13 9.464 13 8a5 5 0 0 0-5-5ZM3.55 4.282a.75.75 0 0 1 .23 1.036A4.973 4.973 0 0 0 3 8a.75.75 0 0 1-1.5 0c0-1.282.372-2.48 1.014-3.488a.75.75 0 0 1 1.036-.23ZM8 5.875A2.125 2.125 0 0 0 5.875 8a3.625 3.625 0 0 1-3.625 3.625H2.213a.75.75 0 1 1 .008-1.5h.03A2.125 2.125 0 0 0 4.376 8a3.625 3.625 0 1 1 7.25 0c0 .078-.001.156-.003.233a.75.75 0 1 1-1.5-.036c.002-.066.003-.131.003-.197A2.125 2.125 0 0 0 8 5.875ZM7.995 7.25a.75.75 0 0 1 .75.75 6.502 6.502 0 0 1-4.343 6.133.75.75 0 1 1-.498-1.415A5.002 5.002 0 0 0 7.245 8a.75.75 0 0 1 .75-.75Zm2.651 2.87a.75.75 0 0 1 .463.955 9.39 9.39 0 0 1-3.008 4.25.75.75 0 0 1-.936-1.171 7.892 7.892 0 0 0 2.527-3.57.75.75 0 0 1 .954-.463Z" clip-rule="evenodd"/>
</svg>
<span><?php ob_start(); ?>
<span x-show="!loading"><?php echo e($label); ?></span>
<span x-show="loading" x-cloak><?php echo e($loadingLabel); ?></span>
<?php echo trim(ob_get_clean()); ?></span>
</button>
<?php echo ltrim(ob_get_clean()); ?>
<p x-show="error" x-text="error" x-cloak
class="text-sm text-center text-red-600 dark:text-red-400"></p>
</div>
<div class="relative my-6">
<div class="absolute inset-0 flex items-center">
<div class="w-full border-t border-zinc-200 dark:border-zinc-700"></div>
</div>
<div class="relative flex justify-center text-xs uppercase">
<span class="px-2 text-zinc-500 dark:text-zinc-400 bg-white dark:bg-zinc-900">
<?php echo e($separator); ?>
</span>
</div>
</div>
</div>
</template>
</div>
<?php /**PATH /Users/mag/Sites/WMS/Concepts/WMS_Core/resources/views/components/passkey-verify.blade.php ENDPATH**/ ?>