From 3e760e6cc6f5d121a4ee9c187a400dc249b4296e Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 24 Jun 2024 14:38:53 +1000 Subject: [PATCH] New payment flow --- .../ClientPortal/InvoiceController.php | 3 +- app/Livewire/InvoicePay.php | 104 +++ app/Livewire/Signature.php | 25 + app/Livewire/Terms.php | 35 + package-lock.json | 13 +- package.json | 3 +- .../{app-f3b33400.css => app-8e387ada.css} | 2 +- public/build/manifest.json | 2 +- .../vendor/signature_pad@5/signature_pad.js | 633 +++++++++++++++++ .../signature_pad@5/signature_pad.js.map | 1 + .../signature_pad@5/signature_pad.min.js | 6 + .../signature_pad@5/signature_pad.min.js.map | 1 + .../signature_pad@5/signature_pad.umd.js | 641 ++++++++++++++++++ .../signature_pad@5/signature_pad.umd.js.map | 1 + .../signature_pad@5/signature_pad.umd.min.js | 6 + .../signature_pad.umd.min.js.map | 1 + .../vendor/signature_pad@5/types/bezier.d.ts | 17 + .../vendor/signature_pad@5/types/point.d.ts | 16 + .../types/signature_event_target.d.ts | 7 + .../signature_pad@5/types/signature_pad.d.ts | 115 ++++ .../signature_pad@5/types/throttle.d.ts | 1 + .../components/livewire/invoice-pay.blade.php | 3 + .../components/livewire/signature.blade.php | 49 ++ .../components/livewire/terms.blade.php | 40 ++ .../ninja2020/invoices/show_smooth.blade.php | 34 + 25 files changed, 1754 insertions(+), 5 deletions(-) create mode 100644 app/Livewire/InvoicePay.php create mode 100644 app/Livewire/Signature.php create mode 100644 app/Livewire/Terms.php rename public/build/assets/{app-f3b33400.css => app-8e387ada.css} (55%) create mode 100644 public/vendor/signature_pad@5/signature_pad.js create mode 100644 public/vendor/signature_pad@5/signature_pad.js.map create mode 100644 public/vendor/signature_pad@5/signature_pad.min.js create mode 100644 public/vendor/signature_pad@5/signature_pad.min.js.map create mode 100644 public/vendor/signature_pad@5/signature_pad.umd.js create mode 100644 public/vendor/signature_pad@5/signature_pad.umd.js.map create mode 100644 public/vendor/signature_pad@5/signature_pad.umd.min.js create mode 100644 public/vendor/signature_pad@5/signature_pad.umd.min.js.map create mode 100644 public/vendor/signature_pad@5/types/bezier.d.ts create mode 100644 public/vendor/signature_pad@5/types/point.d.ts create mode 100644 public/vendor/signature_pad@5/types/signature_event_target.d.ts create mode 100644 public/vendor/signature_pad@5/types/signature_pad.d.ts create mode 100644 public/vendor/signature_pad@5/types/throttle.d.ts create mode 100644 resources/views/portal/ninja2020/components/livewire/invoice-pay.blade.php create mode 100644 resources/views/portal/ninja2020/components/livewire/signature.blade.php create mode 100644 resources/views/portal/ninja2020/components/livewire/terms.blade.php create mode 100644 resources/views/portal/ninja2020/invoices/show_smooth.blade.php diff --git a/app/Http/Controllers/ClientPortal/InvoiceController.php b/app/Http/Controllers/ClientPortal/InvoiceController.php index 0d8449daae..44f9318b21 100644 --- a/app/Http/Controllers/ClientPortal/InvoiceController.php +++ b/app/Http/Controllers/ClientPortal/InvoiceController.php @@ -62,6 +62,7 @@ class InvoiceController extends Controller $invitation = $invoice->invitations()->where('client_contact_id', auth()->guard('contact')->user()->id)->first(); + // @phpstan-ignore-next-line if ($invitation && auth()->guard('contact') && ! session()->get('is_silent') && ! $invitation->viewed_date) { $invitation->markViewed(); @@ -83,7 +84,7 @@ class InvoiceController extends Controller return render('invoices.show-fullscreen', $data); } - return $this->render('invoices.show', $data); + return $this->render('invoices.show_smooth', $data); } public function showBlob($hash) diff --git a/app/Livewire/InvoicePay.php b/app/Livewire/InvoicePay.php new file mode 100644 index 0000000000..81712229b8 --- /dev/null +++ b/app/Livewire/InvoicePay.php @@ -0,0 +1,104 @@ +signature_accepted = true; + $this->invite = \App\Models\InvoiceInvitation::withTrashed()->find($this->invitation_id)->withoutRelations(); + $this->invite->signature_base64 = $base64; + $this->invite->signature_date = now()->addSeconds($this->invite->contact->client->timezone_offset()); + $this->invite->save(); + + } + + #[On('terms-accepted')] + public function termsAccepted() + { + nlog("Terms accepted"); + $this->invite = \App\Models\InvoiceInvitation::withTrashed()->find($this->invitation_id)->withoutRelations(); + $this->terms_accepted =true; + } + + #[Computed()] + public function component(): string + { + if(!$this->terms_accepted) + return Terms::class; + + if(!$this->signature_accepted) + return Signature::class; + } + + #[Computed()] + public function componentUniqueId(): string + { + return "purchase-".md5(time()); + } + + public function mount() + { + + MultiDB::setDb($this->db); + + // @phpstan-ignore-next-line + $this->invite = \App\Models\InvoiceInvitation::with('invoice','contact.client','company')->withTrashed()->find($this->invitation_id); + $invoice = $this->invite->invoice; + $company = $this->invite->company; + $contact = $this->invite->contact; + $client = $this->invite->contact->client; + $this->variables = ($this->invite && auth()->guard('contact')->user()->client->getSetting('show_accept_invoice_terms')) ? (new HtmlEngine($this->invite))->generateLabelsAndValues() : false; + + $this->settings = $client->getMergedSettings(); + + } + + public function render() + { + return render('components.livewire.invoice-pay', [ + 'context' => [ + 'settings' => $this->settings, + 'invoice' => $this->invite->invoice, + 'variables' => $this->variables, + ], + ]); + } +} \ No newline at end of file diff --git a/app/Livewire/Signature.php b/app/Livewire/Signature.php new file mode 100644 index 0000000000..f604b6f5b4 --- /dev/null +++ b/app/Livewire/Signature.php @@ -0,0 +1,25 @@ +invoice = $this->context['invoice']; + $this->variables = $this->context['variables']; + } + + public function render() + { + return render('components.livewire.terms'); + } +} diff --git a/package-lock.json b/package-lock.json index 8c337b628e..27558e8d49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,8 @@ "lodash": "^4.17.21", "resolve-url-loader": "^4.0.0", "sass": "^1.43.4", - "sass-loader": "^12.3.0" + "sass-loader": "^12.3.0", + "signature_pad": "^5.0.2" }, "devDependencies": { "@babel/compat-data": "7.15.0", @@ -9599,6 +9600,11 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "node_modules/signature_pad": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/signature_pad/-/signature_pad-5.0.2.tgz", + "integrity": "sha512-FSseAwRWznAQg90CnrTbC570u1QYi8gijZiyboc18SK2IUx7sYVZhNPLnJRCnwhpyOpgdqXf91XAHL4Yg41yCg==" + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -18394,6 +18400,11 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "signature_pad": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/signature_pad/-/signature_pad-5.0.2.tgz", + "integrity": "sha512-FSseAwRWznAQg90CnrTbC570u1QYi8gijZiyboc18SK2IUx7sYVZhNPLnJRCnwhpyOpgdqXf91XAHL4Yg41yCg==" + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", diff --git a/package.json b/package.json index bff788fc32..a0edb0de1d 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,8 @@ "lodash": "^4.17.21", "resolve-url-loader": "^4.0.0", "sass": "^1.43.4", - "sass-loader": "^12.3.0" + "sass-loader": "^12.3.0", + "signature_pad": "^5.0.2" }, "type": "module" } diff --git a/public/build/assets/app-f3b33400.css b/public/build/assets/app-8e387ada.css similarity index 55% rename from public/build/assets/app-f3b33400.css rename to public/build/assets/app-8e387ada.css index 2c37a323fc..d7b0d66b4f 100644 --- a/public/build/assets/app-f3b33400.css +++ b/public/build/assets/app-8e387ada.css @@ -1 +1 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Open Sans,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.form-input,.form-textarea,.form-select,.form-multiselect{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}.form-input:focus,.form-textarea:focus,.form-select:focus,.form-multiselect:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}.form-select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}.form-select:where([size]:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}.form-checkbox,.form-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}.form-checkbox{border-radius:0}.form-radio{border-radius:100%}.form-checkbox:focus,.form-radio:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.form-checkbox:checked,.form-radio:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}.form-checkbox:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-checkbox:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-radio:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-radio:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:checked:hover,.form-checkbox:checked:focus,.form-radio:checked:hover,.form-radio:checked:focus{border-color:transparent;background-color:currentColor}.form-checkbox:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){.form-checkbox:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:indeterminate:hover,.form-checkbox:indeterminate:focus{border-color:transparent;background-color:currentColor}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.button{border-radius:.25rem;padding:.75rem 1rem;font-size:.875rem;line-height:1rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}button:disabled{cursor:not-allowed;opacity:.5}.button-primary{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.button-primary:hover{font-weight:600}.button-block{display:block;width:100%}.button-danger{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.button-danger:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.button-secondary{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.button-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.button-link{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.button-link:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity));text-decoration-line:underline}.button-link:focus{text-decoration-line:underline;outline:2px solid transparent;outline-offset:2px}.validation{margin-top:.5rem;margin-bottom:.25rem;border-left-width:2px;--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));padding:.25rem .75rem}.validation-fail{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.validation-pass{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.input{margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.input:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}.input-label{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.input-slim{padding-top:.5rem;padding-bottom:.5rem}.form-checkbox{cursor:pointer;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.form-select{border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.alert{margin-top:.5rem;margin-bottom:.25rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));padding:.75rem 1rem;font-size:.875rem;line-height:1.25rem}.alert-success{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.alert-failure{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.badge{display:inline-flex;align-items:center;border-radius:9999px;padding:.125rem .625rem;font-size:.75rem;font-weight:500;line-height:1rem}.badge-light{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.badge-primary{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.badge-danger{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.badge-success{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.badge-secondary{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.badge-warning{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity))}.badge-info{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}@media (min-width: 640px){.dataTables_length{margin-top:1.25rem!important;margin-bottom:1.25rem!important}}@media (min-width: 1024px){.dataTables_length{margin-top:1rem!important;margin-bottom:1rem!important}}.dataTables_length select{margin-left:.5rem!important;margin-right:.5rem!important;--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important;margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.dataTables_length select:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}.dataTables_filter{margin-bottom:1rem}.dataTables_filter input{margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.dataTables_filter input:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}@media (min-width: 1024px){.dataTables_filter{margin-top:-3rem!important}}.dataTables_paginate{padding-bottom:1.5rem!important;padding-top:.5rem!important}.dataTables_paginate .paginate_button{margin-right:.25rem!important;cursor:pointer!important;border-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important;font-weight:500!important;--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important;border-radius:.25rem;padding:.75rem 1rem;font-size:.875rem;line-height:1rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dataTables_paginate .current{--tw-bg-opacity: 1 !important;background-color:rgb(37 99 235 / var(--tw-bg-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.dataTables_info{font-size:.875rem!important;line-height:1.25rem!important}.dataTables_empty{padding-top:1rem!important;padding-bottom:1rem!important}.pagination{display:flex!important;align-items:center!important}.pagination .page-link{margin-top:-1px!important;display:inline-flex!important;cursor:pointer!important;align-items:center!important;border-top-width:2px!important;border-color:transparent!important;padding-left:1rem!important;padding-right:1rem!important;padding-top:1rem!important;font-size:.875rem!important;font-weight:500!important;line-height:1.25rem!important;--tw-text-opacity: 1 !important;color:rgb(107 114 128 / var(--tw-text-opacity))!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-duration:.15s!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pagination .page-link:hover{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.pagination .page-link:focus{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity));outline:2px solid transparent;outline-offset:2px}.pagination .active>span{--tw-border-opacity: 1 !important;border-color:rgb(37 99 235 / var(--tw-border-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(37 99 235 / var(--tw-text-opacity))!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-1{left:.25rem}.right-0{right:0}.top-0{top:0}.top-1{top:.25rem}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-auto{grid-column:auto}.col-span-1{grid-column:span 1 / span 1}.col-span-12{grid-column:span 12 / span 12}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.col-span-6{grid-column:span 6 / span 6}.col-span-8{grid-column:span 8 / span 8}.float-right{float:right}.m-0{margin:0}.m-auto{margin:auto}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.-my-6{margin-top:-1.5rem;margin-bottom:-1.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-\[22px\]{margin-left:22px;margin-right:22px}.mx-\[40px\]{margin-left:40px;margin-right:40px}.mx-\[auto\],.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-1{margin-left:-.25rem}.-ml-4{margin-left:-1rem}.-ml-px{margin-left:-1px}.-mr-1{margin-right:-.25rem}.-mr-14{margin-right:-3.5rem}.-mt-4{margin-top:-1rem}.-mt-6{margin-top:-1.5rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\[10px\]{margin-bottom:10px}.mb-\[11px\]{margin-bottom:11px}.mb-\[20px\]{margin-bottom:20px}.mb-\[25px\]{margin-bottom:25px}.mb-\[26px\]{margin-bottom:26px}.mb-\[36px\]{margin-bottom:36px}.mb-\[40px\]{margin-bottom:40px}.mb-\[5px\]{margin-bottom:5px}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-\[10px\]{margin-left:10px}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-\[30px\]{margin-top:30px}.mt-\[50px\]{margin-top:50px}.mt-\[auto\]{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-0{height:0px}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-24{height:6rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-\[40px\]{height:40px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[450px\]{min-height:450px}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-1\/6{width:16.666667%}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-24{width:6rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-4\/5{width:80%}.w-4\/6{width:66.666667%}.w-48{width:12rem}.w-5{width:1.25rem}.w-5\/6{width:83.333333%}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[100\%\]{width:100%}.w-\[87px\]{width:87px}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-\[212px\]{max-width:212px}.max-w-\[450px\]{max-width:450px}.max-w-\[625px\]{max-width:625px}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-1\/2{flex-basis:50%}.basis-full{flex-basis:100%}.table-auto{table-layout:auto}.border-collapse{border-collapse:collapse}.origin-top-right{transform-origin:top right}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-content-end{place-content:end}.place-items-center{place-items:center}.content-center{align-content:center}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-stretch{justify-content:stretch}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-\[13px\]{gap:13px}.gap-\[44px\]{gap:44px}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-y-\[20px\]{row-gap:20px}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-t-\[0px\]{border-top-width:0px}.border-t-\[10px\]{border-top-width:10px}.border-t-\[1px\]{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.border-fuchsia-600{--tw-border-opacity: 1;border-color:rgb(192 38 211 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-red-900{--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-opacity-50{--tw-border-opacity: .5}.bg-\[\#F2F9FE\]{--tw-bg-opacity: 1;background-color:rgb(242 249 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-100{--tw-bg-opacity: 1}.bg-clip-padding{background-clip:padding-box}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.object-center{-o-object-position:center;object-position:center}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-8{padding:2rem}.p-\[12px\]{padding:12px}.p-\[20px\]{padding:20px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\[12px\]{padding-left:12px;padding-right:12px}.px-\[20px\]{padding-left:20px;padding-right:20px}.px-\[22px\]{padding-left:22px;padding-right:22px}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[33px\]{padding-top:33px;padding-bottom:33px}.py-\[36px\]{padding-top:36px;padding-bottom:36px}.py-\[9\.5px\]{padding-top:9.5px;padding-bottom:9.5px}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-\[20px\]{padding-bottom:20px}.pb-\[56px\]{padding-bottom:56px}.pb-\[58px\]{padding-bottom:58px}.pl-0{padding-left:0}.pl-1{padding-left:.25rem}.pl-1\.5{padding-left:.375rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-\[18px\]{padding-left:18px}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pr-\[18px\]{padding-right:18px}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-\[20px\]{padding-top:20px}.pt-\[29px\]{padding-top:29px}.pt-\[35px\]{padding-top:35px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-\[\'Open_Sans\'\]{font-family:Open Sans}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[12px\]{font-size:12px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[22px\]{font-size:22px}.text-\[24px\]{font-size:24px}.text-\[35px\]{font-size:35px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-\[16px\]{font-weight:16px}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-\[1\.2rem\]{line-height:1.2rem}.leading-\[1\.35em\]{line-height:1.35em}.leading-\[1\.36em\]{line-height:1.36em}.leading-\[1\.375em\]{line-height:1.375em}.leading-\[1\.3em\]{line-height:1.3em}.leading-\[1\.5em\]{line-height:1.5em}.leading-\[1\.75em\]{line-height:1.75em}.leading-normal{line-height:1.5}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#212529\]{--tw-text-opacity: 1;color:rgb(33 37 41 / var(--tw-text-opacity))}.text-\[\#6C727F\]{--tw-text-opacity: 1;color:rgb(108 114 127 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\:text-gray-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.placeholder\:text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[8px\]:after{content:var(--tw-content);left:8px}.after\:top-\[5px\]:after{content:var(--tw-content);top:5px}.after\:h-\[30px\]:after{content:var(--tw-content);height:30px}.after\:w-\[30px\]:after{content:var(--tw-content);width:30px}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.focus-within\:z-10:focus-within{z-index:10}.hover\:list-disc:hover{list-style-type:disc}.hover\:border-blue-600:hover{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-gray-800:hover{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.hover\:border-transparent:hover{border-color:transparent}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-red-900:hover{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}.hover\:font-semibold:hover{font-weight:600}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.hover\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-2xl:hover{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-fuchsia-300:focus{--tw-border-opacity: 1;border-color:rgb(240 171 252 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:bg-gray-600:focus{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.focus\:bg-white:focus{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.focus\:font-semibold:focus{font-weight:600}.focus\:text-gray-500:focus{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.focus\:text-gray-600:focus{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.focus\:text-gray-900:focus{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.focus\:underline:focus{text-decoration-line:underline}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\:bg-gray-50:active{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.active\:text-gray-800:active{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.active\:outline-none:active{outline:2px solid transparent;outline-offset:2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-50:disabled{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.group:hover .group-hover\:border-transparent{border-color:transparent}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.peer:checked~.peer-checked\:text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.peer:checked~.peer-checked\:after\:translate-x-\[140\%\]:after{content:var(--tw-content);--tw-translate-x: 140%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}@media (min-width: 640px){.sm\:inset-0{top:0;right:0;bottom:0;left:0}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:col-span-4{grid-column:span 4 / span 4}.sm\:col-span-6{grid-column:span 6 / span 6}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:mx-0{margin-left:0;margin-right:0}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:ml-3{margin-left:.75rem}.sm\:ml-4{margin-left:1rem}.sm\:ml-6{margin-left:1.5rem}.sm\:mt-0{margin-top:0}.sm\:mt-4{margin-top:1rem}.sm\:mt-6{margin-top:1.5rem}.sm\:block{display:block}.sm\:inline-block{display:inline-block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:h-10{height:2.5rem}.sm\:h-screen{height:100vh}.sm\:w-10{width:2.5rem}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-sm{max-width:24rem}.sm\:flex-shrink-0{flex-shrink:0}.sm\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-4{gap:1rem}.sm\:rounded-lg{border-radius:.5rem}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.sm\:align-middle{vertical-align:middle}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:col-span-4{grid-column:span 4 / span 4}.md\:col-span-5{grid-column:span 5 / span 5}.md\:col-span-6{grid-column:span 6 / span 6}.md\:col-start-2{grid-column-start:2}.md\:col-start-4{grid-column-start:4}.md\:mx-0,.md\:mx-\[0\]{margin-left:0;margin-right:0}.md\:-mr-1{margin-right:-.25rem}.md\:mb-6{margin-bottom:1.5rem}.md\:mb-\[46px\]{margin-bottom:46px}.md\:ml-2{margin-left:.5rem}.md\:ml-6{margin-left:1.5rem}.md\:mr-0{margin-right:0}.md\:mr-2{margin-right:.5rem}.md\:mt-0{margin-top:0}.md\:mt-10{margin-top:2.5rem}.md\:mt-5{margin-top:1.25rem}.md\:block{display:block}.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:min-h-\[411px\]{min-height:411px}.md\:w-1\/2{width:50%}.md\:w-1\/3{width:33.333333%}.md\:max-w-3xl{max-width:48rem}.md\:max-w-xl{max-width:36rem}.md\:flex-shrink-0{flex-shrink:0}.md\:shrink{flex-shrink:1}.md\:grow-0{flex-grow:0}.md\:basis-1\/2{flex-basis:50%}.md\:basis-\[449px\]{flex-basis:449px}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:justify-between{justify-content:space-between}.md\:gap-6{gap:1.5rem}.md\:gap-x-\[21px\]{-moz-column-gap:21px;column-gap:21px}.md\:gap-y-6{row-gap:1.5rem}.md\:border-r{border-right-width:1px}.md\:border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.md\:p-24{padding:6rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:px-\[40px\]{padding-left:40px;padding-right:40px}.md\:pb-\[40px\]{padding-bottom:40px}.md\:pl-4{padding-left:1rem}.md\:pl-\[52px\]{padding-left:52px}.md\:pl-\[61px\]{padding-left:61px}.md\:pr-\[20px\]{padding-right:20px}.md\:pr-\[48px\]{padding-right:48px}.md\:pt-0{padding-top:0}.md\:pt-\[58px\]{padding-top:58px}.md\:text-left{text-align:left}.md\:text-center{text-align:center}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-\[30px\]{font-size:30px}.md\:text-\[32px\]{font-size:32px}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:col-span-3{grid-column:span 3 / span 3}.lg\:col-span-6{grid-column:span 6 / span 6}.lg\:col-span-7{grid-column:span 7 / span 7}.lg\:col-span-8{grid-column:span 8 / span 8}.lg\:col-start-3{grid-column-start:3}.lg\:col-start-4{grid-column-start:4}.lg\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\:mt-24{margin-top:6rem}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:h-screen{height:100vh}.lg\:w-1\/2{width:50%}.lg\:w-1\/4{width:25%}.lg\:w-1\/5{width:20%}.lg\:max-w-\[80\%\]{max-width:80%}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:items-center{align-items:center}.lg\:gap-4{gap:1rem}.lg\:rounded-lg{border-radius:.5rem}.lg\:px-16{padding-left:4rem;padding-right:4rem}.lg\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-2{padding-top:.5rem;padding-bottom:.5rem}}@media (min-width: 1280px){.xl\:col-span-4{grid-column:span 4 / span 4}.xl\:col-span-6{grid-column:span 6 / span 6}.xl\:col-span-8{grid-column:span 8 / span 8}.xl\:col-span-9{grid-column:span 9 / span 9}.xl\:col-start-4{grid-column-start:4}.xl\:ml-5{margin-left:1.25rem}.xl\:mt-0{margin-top:0}.xl\:mt-32{margin-top:8rem}.xl\:flex{display:flex}.xl\:w-auto{width:auto}.xl\:basis-auto{flex-basis:auto}.xl\:flex-row{flex-direction:row}.xl\:flex-nowrap{flex-wrap:nowrap}.xl\:justify-center{justify-content:center}.xl\:border-r{border-right-width:1px}.xl\:border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.xl\:px-16{padding-left:4rem;padding-right:4rem}.xl\:px-20{padding-left:5rem;padding-right:5rem}.xl\:px-5{padding-left:1.25rem;padding-right:1.25rem}.xl\:pr-20{padding-right:5rem}}@media (prefers-color-scheme: dark){.dark\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\:focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}} +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Open Sans,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.form-input,.form-textarea,.form-select,.form-multiselect{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}.form-input:focus,.form-textarea:focus,.form-select:focus,.form-multiselect:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}.form-select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}.form-select:where([size]:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}.form-checkbox,.form-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}.form-checkbox{border-radius:0}.form-radio{border-radius:100%}.form-checkbox:focus,.form-radio:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.form-checkbox:checked,.form-radio:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}.form-checkbox:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-checkbox:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-radio:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-radio:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:checked:hover,.form-checkbox:checked:focus,.form-radio:checked:hover,.form-radio:checked:focus{border-color:transparent;background-color:currentColor}.form-checkbox:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){.form-checkbox:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:indeterminate:hover,.form-checkbox:indeterminate:focus{border-color:transparent;background-color:currentColor}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.button{border-radius:.25rem;padding:.75rem 1rem;font-size:.875rem;line-height:1rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}button:disabled{cursor:not-allowed;opacity:.5}.button-primary{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.button-primary:hover{font-weight:600}.button-block{display:block;width:100%}.button-danger{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.button-danger:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.button-secondary{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.button-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.button-link{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.button-link:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity));text-decoration-line:underline}.button-link:focus{text-decoration-line:underline;outline:2px solid transparent;outline-offset:2px}.validation{margin-top:.5rem;margin-bottom:.25rem;border-left-width:2px;--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));padding:.25rem .75rem}.validation-fail{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.validation-pass{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.input{margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.input:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}.input-label{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.input-slim{padding-top:.5rem;padding-bottom:.5rem}.form-checkbox{cursor:pointer;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.form-select{border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.alert{margin-top:.5rem;margin-bottom:.25rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));padding:.75rem 1rem;font-size:.875rem;line-height:1.25rem}.alert-success{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.alert-failure{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.badge{display:inline-flex;align-items:center;border-radius:9999px;padding:.125rem .625rem;font-size:.75rem;font-weight:500;line-height:1rem}.badge-light{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.badge-primary{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.badge-danger{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.badge-success{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.badge-secondary{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.badge-warning{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity))}.badge-info{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}@media (min-width: 640px){.dataTables_length{margin-top:1.25rem!important;margin-bottom:1.25rem!important}}@media (min-width: 1024px){.dataTables_length{margin-top:1rem!important;margin-bottom:1rem!important}}.dataTables_length select{margin-left:.5rem!important;margin-right:.5rem!important;--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important;margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.dataTables_length select:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}.dataTables_filter{margin-bottom:1rem}.dataTables_filter input{margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.dataTables_filter input:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}@media (min-width: 1024px){.dataTables_filter{margin-top:-3rem!important}}.dataTables_paginate{padding-bottom:1.5rem!important;padding-top:.5rem!important}.dataTables_paginate .paginate_button{margin-right:.25rem!important;cursor:pointer!important;border-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important;font-weight:500!important;--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important;border-radius:.25rem;padding:.75rem 1rem;font-size:.875rem;line-height:1rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dataTables_paginate .current{--tw-bg-opacity: 1 !important;background-color:rgb(37 99 235 / var(--tw-bg-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.dataTables_info{font-size:.875rem!important;line-height:1.25rem!important}.dataTables_empty{padding-top:1rem!important;padding-bottom:1rem!important}.pagination{display:flex!important;align-items:center!important}.pagination .page-link{margin-top:-1px!important;display:inline-flex!important;cursor:pointer!important;align-items:center!important;border-top-width:2px!important;border-color:transparent!important;padding-left:1rem!important;padding-right:1rem!important;padding-top:1rem!important;font-size:.875rem!important;font-weight:500!important;line-height:1.25rem!important;--tw-text-opacity: 1 !important;color:rgb(107 114 128 / var(--tw-text-opacity))!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-duration:.15s!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pagination .page-link:hover{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.pagination .page-link:focus{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity));outline:2px solid transparent;outline-offset:2px}.pagination .active>span{--tw-border-opacity: 1 !important;border-color:rgb(37 99 235 / var(--tw-border-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(37 99 235 / var(--tw-text-opacity))!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-1{left:.25rem}.right-0{right:0}.top-0{top:0}.top-1{top:.25rem}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-auto{grid-column:auto}.col-span-1{grid-column:span 1 / span 1}.col-span-12{grid-column:span 12 / span 12}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.col-span-6{grid-column:span 6 / span 6}.col-span-8{grid-column:span 8 / span 8}.float-right{float:right}.m-0{margin:0}.m-auto{margin:auto}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.-my-6{margin-top:-1.5rem;margin-bottom:-1.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-\[22px\]{margin-left:22px;margin-right:22px}.mx-\[40px\]{margin-left:40px;margin-right:40px}.mx-\[auto\],.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-1{margin-left:-.25rem}.-ml-4{margin-left:-1rem}.-ml-px{margin-left:-1px}.-mr-1{margin-right:-.25rem}.-mr-14{margin-right:-3.5rem}.-mt-4{margin-top:-1rem}.-mt-6{margin-top:-1.5rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\[10px\]{margin-bottom:10px}.mb-\[11px\]{margin-bottom:11px}.mb-\[20px\]{margin-bottom:20px}.mb-\[25px\]{margin-bottom:25px}.mb-\[26px\]{margin-bottom:26px}.mb-\[36px\]{margin-bottom:36px}.mb-\[40px\]{margin-bottom:40px}.mb-\[5px\]{margin-bottom:5px}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-\[10px\]{margin-left:10px}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-\[30px\]{margin-top:30px}.mt-\[50px\]{margin-top:50px}.mt-\[auto\]{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-0{height:0px}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-24{height:6rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-\[40px\]{height:40px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[450px\]{min-height:450px}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-1\/6{width:16.666667%}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-24{width:6rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-4\/5{width:80%}.w-4\/6{width:66.666667%}.w-48{width:12rem}.w-5{width:1.25rem}.w-5\/6{width:83.333333%}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[100\%\]{width:100%}.w-\[87px\]{width:87px}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-\[212px\]{max-width:212px}.max-w-\[450px\]{max-width:450px}.max-w-\[625px\]{max-width:625px}.max-w-md{max-width:28rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-1\/2{flex-basis:50%}.basis-full{flex-basis:100%}.table-auto{table-layout:auto}.border-collapse{border-collapse:collapse}.origin-top-right{transform-origin:top right}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-content-end{place-content:end}.place-items-center{place-items:center}.content-center{align-content:center}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-stretch{justify-content:stretch}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-\[13px\]{gap:13px}.gap-\[44px\]{gap:44px}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-y-\[20px\]{row-gap:20px}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-t-\[0px\]{border-top-width:0px}.border-t-\[10px\]{border-top-width:10px}.border-t-\[1px\]{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.border-fuchsia-600{--tw-border-opacity: 1;border-color:rgb(192 38 211 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-red-900{--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-opacity-50{--tw-border-opacity: .5}.bg-\[\#F2F9FE\]{--tw-bg-opacity: 1;background-color:rgb(242 249 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-100{--tw-bg-opacity: 1}.bg-clip-padding{background-clip:padding-box}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.object-center{-o-object-position:center;object-position:center}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[12px\]{padding:12px}.p-\[20px\]{padding:20px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\[12px\]{padding-left:12px;padding-right:12px}.px-\[20px\]{padding-left:20px;padding-right:20px}.px-\[22px\]{padding-left:22px;padding-right:22px}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[33px\]{padding-top:33px;padding-bottom:33px}.py-\[36px\]{padding-top:36px;padding-bottom:36px}.py-\[9\.5px\]{padding-top:9.5px;padding-bottom:9.5px}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-\[20px\]{padding-bottom:20px}.pb-\[56px\]{padding-bottom:56px}.pb-\[58px\]{padding-bottom:58px}.pl-0{padding-left:0}.pl-1{padding-left:.25rem}.pl-1\.5{padding-left:.375rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-\[18px\]{padding-left:18px}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pr-\[18px\]{padding-right:18px}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-\[20px\]{padding-top:20px}.pt-\[29px\]{padding-top:29px}.pt-\[35px\]{padding-top:35px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-\[\'Open_Sans\'\]{font-family:Open Sans}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[12px\]{font-size:12px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[22px\]{font-size:22px}.text-\[24px\]{font-size:24px}.text-\[35px\]{font-size:35px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-\[16px\]{font-weight:16px}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-\[1\.2rem\]{line-height:1.2rem}.leading-\[1\.35em\]{line-height:1.35em}.leading-\[1\.36em\]{line-height:1.36em}.leading-\[1\.375em\]{line-height:1.375em}.leading-\[1\.3em\]{line-height:1.3em}.leading-\[1\.5em\]{line-height:1.5em}.leading-\[1\.75em\]{line-height:1.75em}.leading-normal{line-height:1.5}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#212529\]{--tw-text-opacity: 1;color:rgb(33 37 41 / var(--tw-text-opacity))}.text-\[\#6C727F\]{--tw-text-opacity: 1;color:rgb(108 114 127 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\:text-gray-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.placeholder\:text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[8px\]:after{content:var(--tw-content);left:8px}.after\:top-\[5px\]:after{content:var(--tw-content);top:5px}.after\:h-\[30px\]:after{content:var(--tw-content);height:30px}.after\:w-\[30px\]:after{content:var(--tw-content);width:30px}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.focus-within\:z-10:focus-within{z-index:10}.hover\:list-disc:hover{list-style-type:disc}.hover\:border-blue-600:hover{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-gray-800:hover{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.hover\:border-transparent:hover{border-color:transparent}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-red-900:hover{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}.hover\:font-semibold:hover{font-weight:600}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.hover\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-2xl:hover{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-fuchsia-300:focus{--tw-border-opacity: 1;border-color:rgb(240 171 252 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:bg-gray-600:focus{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.focus\:bg-white:focus{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.focus\:font-semibold:focus{font-weight:600}.focus\:text-gray-500:focus{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.focus\:text-gray-600:focus{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.focus\:text-gray-900:focus{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.focus\:underline:focus{text-decoration-line:underline}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\:bg-gray-50:active{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.active\:text-gray-800:active{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.active\:outline-none:active{outline:2px solid transparent;outline-offset:2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-50:disabled{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.group:hover .group-hover\:border-transparent{border-color:transparent}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.peer:checked~.peer-checked\:text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.peer:checked~.peer-checked\:after\:translate-x-\[140\%\]:after{content:var(--tw-content);--tw-translate-x: 140%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}@media (min-width: 640px){.sm\:inset-0{top:0;right:0;bottom:0;left:0}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:col-span-4{grid-column:span 4 / span 4}.sm\:col-span-6{grid-column:span 6 / span 6}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:mx-0{margin-left:0;margin-right:0}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:ml-3{margin-left:.75rem}.sm\:ml-4{margin-left:1rem}.sm\:ml-6{margin-left:1.5rem}.sm\:mt-0{margin-top:0}.sm\:mt-4{margin-top:1rem}.sm\:mt-6{margin-top:1.5rem}.sm\:block{display:block}.sm\:inline-block{display:inline-block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:h-10{height:2.5rem}.sm\:h-screen{height:100vh}.sm\:w-10{width:2.5rem}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-sm{max-width:24rem}.sm\:flex-shrink-0{flex-shrink:0}.sm\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-4{gap:1rem}.sm\:rounded-lg{border-radius:.5rem}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.sm\:align-middle{vertical-align:middle}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:col-span-4{grid-column:span 4 / span 4}.md\:col-span-5{grid-column:span 5 / span 5}.md\:col-span-6{grid-column:span 6 / span 6}.md\:col-start-2{grid-column-start:2}.md\:col-start-4{grid-column-start:4}.md\:mx-0,.md\:mx-\[0\]{margin-left:0;margin-right:0}.md\:-mr-1{margin-right:-.25rem}.md\:mb-6{margin-bottom:1.5rem}.md\:mb-\[46px\]{margin-bottom:46px}.md\:ml-2{margin-left:.5rem}.md\:ml-6{margin-left:1.5rem}.md\:mr-0{margin-right:0}.md\:mr-2{margin-right:.5rem}.md\:mt-0{margin-top:0}.md\:mt-10{margin-top:2.5rem}.md\:mt-5{margin-top:1.25rem}.md\:block{display:block}.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:min-h-\[411px\]{min-height:411px}.md\:w-1\/2{width:50%}.md\:w-1\/3{width:33.333333%}.md\:max-w-3xl{max-width:48rem}.md\:max-w-xl{max-width:36rem}.md\:flex-shrink-0{flex-shrink:0}.md\:shrink{flex-shrink:1}.md\:grow-0{flex-grow:0}.md\:basis-1\/2{flex-basis:50%}.md\:basis-\[449px\]{flex-basis:449px}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:justify-between{justify-content:space-between}.md\:gap-6{gap:1.5rem}.md\:gap-x-\[21px\]{-moz-column-gap:21px;column-gap:21px}.md\:gap-y-6{row-gap:1.5rem}.md\:border-r{border-right-width:1px}.md\:border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.md\:p-24{padding:6rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:px-\[40px\]{padding-left:40px;padding-right:40px}.md\:pb-\[40px\]{padding-bottom:40px}.md\:pl-4{padding-left:1rem}.md\:pl-\[52px\]{padding-left:52px}.md\:pl-\[61px\]{padding-left:61px}.md\:pr-\[20px\]{padding-right:20px}.md\:pr-\[48px\]{padding-right:48px}.md\:pt-0{padding-top:0}.md\:pt-\[58px\]{padding-top:58px}.md\:text-left{text-align:left}.md\:text-center{text-align:center}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-\[30px\]{font-size:30px}.md\:text-\[32px\]{font-size:32px}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:col-span-3{grid-column:span 3 / span 3}.lg\:col-span-6{grid-column:span 6 / span 6}.lg\:col-span-7{grid-column:span 7 / span 7}.lg\:col-span-8{grid-column:span 8 / span 8}.lg\:col-start-3{grid-column-start:3}.lg\:col-start-4{grid-column-start:4}.lg\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\:mt-24{margin-top:6rem}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:h-screen{height:100vh}.lg\:w-1\/2{width:50%}.lg\:w-1\/4{width:25%}.lg\:w-1\/5{width:20%}.lg\:max-w-\[80\%\]{max-width:80%}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:items-center{align-items:center}.lg\:gap-4{gap:1rem}.lg\:rounded-lg{border-radius:.5rem}.lg\:px-16{padding-left:4rem;padding-right:4rem}.lg\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-2{padding-top:.5rem;padding-bottom:.5rem}}@media (min-width: 1280px){.xl\:col-span-4{grid-column:span 4 / span 4}.xl\:col-span-6{grid-column:span 6 / span 6}.xl\:col-span-8{grid-column:span 8 / span 8}.xl\:col-span-9{grid-column:span 9 / span 9}.xl\:col-start-4{grid-column-start:4}.xl\:ml-5{margin-left:1.25rem}.xl\:mt-0{margin-top:0}.xl\:mt-32{margin-top:8rem}.xl\:flex{display:flex}.xl\:w-auto{width:auto}.xl\:basis-auto{flex-basis:auto}.xl\:flex-row{flex-direction:row}.xl\:flex-nowrap{flex-wrap:nowrap}.xl\:justify-center{justify-content:center}.xl\:border-r{border-right-width:1px}.xl\:border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.xl\:px-16{padding-left:4rem;padding-right:4rem}.xl\:px-20{padding-left:5rem;padding-right:5rem}.xl\:px-5{padding-left:1.25rem;padding-right:1.25rem}.xl\:pr-20{padding-right:5rem}}@media (prefers-color-scheme: dark){.dark\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\:focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}} diff --git a/public/build/manifest.json b/public/build/manifest.json index e51ed0f236..107b49e837 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -240,7 +240,7 @@ "src": "resources/js/setup/setup.js" }, "resources/sass/app.scss": { - "file": "assets/app-f3b33400.css", + "file": "assets/app-8e387ada.css", "isEntry": true, "src": "resources/sass/app.scss" } diff --git a/public/vendor/signature_pad@5/signature_pad.js b/public/vendor/signature_pad@5/signature_pad.js new file mode 100644 index 0000000000..5755aea42f --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.js @@ -0,0 +1,633 @@ +/*! + * Signature Pad v5.0.2 | https://github.com/szimek/signature_pad + * (c) 2024 Szymon Nowak | Released under the MIT license + */ + +class Point { + constructor(x, y, pressure, time) { + if (isNaN(x) || isNaN(y)) { + throw new Error(`Point is invalid: (${x}, ${y})`); + } + this.x = +x; + this.y = +y; + this.pressure = pressure || 0; + this.time = time || Date.now(); + } + distanceTo(start) { + return Math.sqrt(Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2)); + } + equals(other) { + return (this.x === other.x && + this.y === other.y && + this.pressure === other.pressure && + this.time === other.time); + } + velocityFrom(start) { + return this.time !== start.time + ? this.distanceTo(start) / (this.time - start.time) + : 0; + } +} + +class Bezier { + static fromPoints(points, widths) { + const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2; + const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1; + return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end); + } + static calculateControlPoints(s1, s2, s3) { + const dx1 = s1.x - s2.x; + const dy1 = s1.y - s2.y; + const dx2 = s2.x - s3.x; + const dy2 = s2.y - s3.y; + const m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 }; + const m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 }; + const l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1); + const l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2); + const dxm = m1.x - m2.x; + const dym = m1.y - m2.y; + const k = l2 / (l1 + l2); + const cm = { x: m2.x + dxm * k, y: m2.y + dym * k }; + const tx = s2.x - cm.x; + const ty = s2.y - cm.y; + return { + c1: new Point(m1.x + tx, m1.y + ty), + c2: new Point(m2.x + tx, m2.y + ty), + }; + } + constructor(startPoint, control2, control1, endPoint, startWidth, endWidth) { + this.startPoint = startPoint; + this.control2 = control2; + this.control1 = control1; + this.endPoint = endPoint; + this.startWidth = startWidth; + this.endWidth = endWidth; + } + length() { + const steps = 10; + let length = 0; + let px; + let py; + for (let i = 0; i <= steps; i += 1) { + const t = i / steps; + const cx = this.point(t, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x); + const cy = this.point(t, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y); + if (i > 0) { + const xdiff = cx - px; + const ydiff = cy - py; + length += Math.sqrt(xdiff * xdiff + ydiff * ydiff); + } + px = cx; + py = cy; + } + return length; + } + point(t, start, c1, c2, end) { + return (start * (1.0 - t) * (1.0 - t) * (1.0 - t)) + + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t) + + (3.0 * c2 * (1.0 - t) * t * t) + + (end * t * t * t); + } +} + +class SignatureEventTarget { + constructor() { + try { + this._et = new EventTarget(); + } + catch (error) { + this._et = document; + } + } + addEventListener(type, listener, options) { + this._et.addEventListener(type, listener, options); + } + dispatchEvent(event) { + return this._et.dispatchEvent(event); + } + removeEventListener(type, callback, options) { + this._et.removeEventListener(type, callback, options); + } +} + +function throttle(fn, wait = 250) { + let previous = 0; + let timeout = null; + let result; + let storedContext; + let storedArgs; + const later = () => { + previous = Date.now(); + timeout = null; + result = fn.apply(storedContext, storedArgs); + if (!timeout) { + storedContext = null; + storedArgs = []; + } + }; + return function wrapper(...args) { + const now = Date.now(); + const remaining = wait - (now - previous); + storedContext = this; + storedArgs = args; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = now; + result = fn.apply(storedContext, storedArgs); + if (!timeout) { + storedContext = null; + storedArgs = []; + } + } + else if (!timeout) { + timeout = window.setTimeout(later, remaining); + } + return result; + }; +} + +class SignaturePad extends SignatureEventTarget { + constructor(canvas, options = {}) { + var _a, _b, _c; + super(); + this.canvas = canvas; + this._drawingStroke = false; + this._isEmpty = true; + this._lastPoints = []; + this._data = []; + this._lastVelocity = 0; + this._lastWidth = 0; + this._handleMouseDown = (event) => { + if (!this._isLeftButtonPressed(event, true) || this._drawingStroke) { + return; + } + this._strokeBegin(this._pointerEventToSignatureEvent(event)); + }; + this._handleMouseMove = (event) => { + if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) { + this._strokeEnd(this._pointerEventToSignatureEvent(event), false); + return; + } + this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event)); + }; + this._handleMouseUp = (event) => { + if (this._isLeftButtonPressed(event)) { + return; + } + this._strokeEnd(this._pointerEventToSignatureEvent(event)); + }; + this._handleTouchStart = (event) => { + if (event.targetTouches.length !== 1 || this._drawingStroke) { + return; + } + if (event.cancelable) { + event.preventDefault(); + } + this._strokeBegin(this._touchEventToSignatureEvent(event)); + }; + this._handleTouchMove = (event) => { + if (event.targetTouches.length !== 1) { + return; + } + if (event.cancelable) { + event.preventDefault(); + } + if (!this._drawingStroke) { + this._strokeEnd(this._touchEventToSignatureEvent(event), false); + return; + } + this._strokeMoveUpdate(this._touchEventToSignatureEvent(event)); + }; + this._handleTouchEnd = (event) => { + if (event.targetTouches.length !== 0) { + return; + } + if (event.cancelable) { + event.preventDefault(); + } + this.canvas.removeEventListener('touchmove', this._handleTouchMove); + this._strokeEnd(this._touchEventToSignatureEvent(event)); + }; + this._handlePointerDown = (event) => { + if (!this._isLeftButtonPressed(event) || this._drawingStroke) { + return; + } + event.preventDefault(); + this._strokeBegin(this._pointerEventToSignatureEvent(event)); + }; + this._handlePointerMove = (event) => { + if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) { + this._strokeEnd(this._pointerEventToSignatureEvent(event), false); + return; + } + event.preventDefault(); + this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event)); + }; + this._handlePointerUp = (event) => { + if (this._isLeftButtonPressed(event)) { + return; + } + event.preventDefault(); + this._strokeEnd(this._pointerEventToSignatureEvent(event)); + }; + this.velocityFilterWeight = options.velocityFilterWeight || 0.7; + this.minWidth = options.minWidth || 0.5; + this.maxWidth = options.maxWidth || 2.5; + this.throttle = (_a = options.throttle) !== null && _a !== void 0 ? _a : 16; + this.minDistance = (_b = options.minDistance) !== null && _b !== void 0 ? _b : 5; + this.dotSize = options.dotSize || 0; + this.penColor = options.penColor || 'black'; + this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)'; + this.compositeOperation = options.compositeOperation || 'source-over'; + this.canvasContextOptions = (_c = options.canvasContextOptions) !== null && _c !== void 0 ? _c : {}; + this._strokeMoveUpdate = this.throttle + ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle) + : SignaturePad.prototype._strokeUpdate; + this._ctx = canvas.getContext('2d', this.canvasContextOptions); + this.clear(); + this.on(); + } + clear() { + const { _ctx: ctx, canvas } = this; + ctx.fillStyle = this.backgroundColor; + ctx.clearRect(0, 0, canvas.width, canvas.height); + ctx.fillRect(0, 0, canvas.width, canvas.height); + this._data = []; + this._reset(this._getPointGroupOptions()); + this._isEmpty = true; + } + fromDataURL(dataUrl, options = {}) { + return new Promise((resolve, reject) => { + const image = new Image(); + const ratio = options.ratio || window.devicePixelRatio || 1; + const width = options.width || this.canvas.width / ratio; + const height = options.height || this.canvas.height / ratio; + const xOffset = options.xOffset || 0; + const yOffset = options.yOffset || 0; + this._reset(this._getPointGroupOptions()); + image.onload = () => { + this._ctx.drawImage(image, xOffset, yOffset, width, height); + resolve(); + }; + image.onerror = (error) => { + reject(error); + }; + image.crossOrigin = 'anonymous'; + image.src = dataUrl; + this._isEmpty = false; + }); + } + toDataURL(type = 'image/png', encoderOptions) { + switch (type) { + case 'image/svg+xml': + if (typeof encoderOptions !== 'object') { + encoderOptions = undefined; + } + return `data:image/svg+xml;base64,${btoa(this.toSVG(encoderOptions))}`; + default: + if (typeof encoderOptions !== 'number') { + encoderOptions = undefined; + } + return this.canvas.toDataURL(type, encoderOptions); + } + } + on() { + this.canvas.style.touchAction = 'none'; + this.canvas.style.msTouchAction = 'none'; + this.canvas.style.userSelect = 'none'; + const isIOS = /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document; + if (window.PointerEvent && !isIOS) { + this._handlePointerEvents(); + } + else { + this._handleMouseEvents(); + if ('ontouchstart' in window) { + this._handleTouchEvents(); + } + } + } + off() { + this.canvas.style.touchAction = 'auto'; + this.canvas.style.msTouchAction = 'auto'; + this.canvas.style.userSelect = 'auto'; + this.canvas.removeEventListener('pointerdown', this._handlePointerDown); + this.canvas.removeEventListener('mousedown', this._handleMouseDown); + this.canvas.removeEventListener('touchstart', this._handleTouchStart); + this._removeMoveUpEventListeners(); + } + _getListenerFunctions() { + var _a; + const canvasWindow = window.document === this.canvas.ownerDocument + ? window + : (_a = this.canvas.ownerDocument.defaultView) !== null && _a !== void 0 ? _a : this.canvas.ownerDocument; + return { + addEventListener: canvasWindow.addEventListener.bind(canvasWindow), + removeEventListener: canvasWindow.removeEventListener.bind(canvasWindow), + }; + } + _removeMoveUpEventListeners() { + const { removeEventListener } = this._getListenerFunctions(); + removeEventListener('pointermove', this._handlePointerMove); + removeEventListener('pointerup', this._handlePointerUp); + removeEventListener('mousemove', this._handleMouseMove); + removeEventListener('mouseup', this._handleMouseUp); + removeEventListener('touchmove', this._handleTouchMove); + removeEventListener('touchend', this._handleTouchEnd); + } + isEmpty() { + return this._isEmpty; + } + fromData(pointGroups, { clear = true } = {}) { + if (clear) { + this.clear(); + } + this._fromData(pointGroups, this._drawCurve.bind(this), this._drawDot.bind(this)); + this._data = this._data.concat(pointGroups); + } + toData() { + return this._data; + } + _isLeftButtonPressed(event, only) { + if (only) { + return event.buttons === 1; + } + return (event.buttons & 1) === 1; + } + _pointerEventToSignatureEvent(event) { + return { + event: event, + type: event.type, + x: event.clientX, + y: event.clientY, + pressure: 'pressure' in event ? event.pressure : 0, + }; + } + _touchEventToSignatureEvent(event) { + const touch = event.changedTouches[0]; + return { + event: event, + type: event.type, + x: touch.clientX, + y: touch.clientY, + pressure: touch.force, + }; + } + _getPointGroupOptions(group) { + return { + penColor: group && 'penColor' in group ? group.penColor : this.penColor, + dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize, + minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth, + maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth, + velocityFilterWeight: group && 'velocityFilterWeight' in group + ? group.velocityFilterWeight + : this.velocityFilterWeight, + compositeOperation: group && 'compositeOperation' in group + ? group.compositeOperation + : this.compositeOperation, + }; + } + _strokeBegin(event) { + const cancelled = !this.dispatchEvent(new CustomEvent('beginStroke', { detail: event, cancelable: true })); + if (cancelled) { + return; + } + const { addEventListener } = this._getListenerFunctions(); + switch (event.event.type) { + case 'mousedown': + addEventListener('mousemove', this._handleMouseMove); + addEventListener('mouseup', this._handleMouseUp); + break; + case 'touchstart': + addEventListener('touchmove', this._handleTouchMove); + addEventListener('touchend', this._handleTouchEnd); + break; + case 'pointerdown': + addEventListener('pointermove', this._handlePointerMove); + addEventListener('pointerup', this._handlePointerUp); + break; + } + this._drawingStroke = true; + const pointGroupOptions = this._getPointGroupOptions(); + const newPointGroup = Object.assign(Object.assign({}, pointGroupOptions), { points: [] }); + this._data.push(newPointGroup); + this._reset(pointGroupOptions); + this._strokeUpdate(event); + } + _strokeUpdate(event) { + if (!this._drawingStroke) { + return; + } + if (this._data.length === 0) { + this._strokeBegin(event); + return; + } + this.dispatchEvent(new CustomEvent('beforeUpdateStroke', { detail: event })); + const point = this._createPoint(event.x, event.y, event.pressure); + const lastPointGroup = this._data[this._data.length - 1]; + const lastPoints = lastPointGroup.points; + const lastPoint = lastPoints.length > 0 && lastPoints[lastPoints.length - 1]; + const isLastPointTooClose = lastPoint + ? point.distanceTo(lastPoint) <= this.minDistance + : false; + const pointGroupOptions = this._getPointGroupOptions(lastPointGroup); + if (!lastPoint || !(lastPoint && isLastPointTooClose)) { + const curve = this._addPoint(point, pointGroupOptions); + if (!lastPoint) { + this._drawDot(point, pointGroupOptions); + } + else if (curve) { + this._drawCurve(curve, pointGroupOptions); + } + lastPoints.push({ + time: point.time, + x: point.x, + y: point.y, + pressure: point.pressure, + }); + } + this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event })); + } + _strokeEnd(event, shouldUpdate = true) { + this._removeMoveUpEventListeners(); + if (!this._drawingStroke) { + return; + } + if (shouldUpdate) { + this._strokeUpdate(event); + } + this._drawingStroke = false; + this.dispatchEvent(new CustomEvent('endStroke', { detail: event })); + } + _handlePointerEvents() { + this._drawingStroke = false; + this.canvas.addEventListener('pointerdown', this._handlePointerDown); + } + _handleMouseEvents() { + this._drawingStroke = false; + this.canvas.addEventListener('mousedown', this._handleMouseDown); + } + _handleTouchEvents() { + this.canvas.addEventListener('touchstart', this._handleTouchStart); + } + _reset(options) { + this._lastPoints = []; + this._lastVelocity = 0; + this._lastWidth = (options.minWidth + options.maxWidth) / 2; + this._ctx.fillStyle = options.penColor; + this._ctx.globalCompositeOperation = options.compositeOperation; + } + _createPoint(x, y, pressure) { + const rect = this.canvas.getBoundingClientRect(); + return new Point(x - rect.left, y - rect.top, pressure, new Date().getTime()); + } + _addPoint(point, options) { + const { _lastPoints } = this; + _lastPoints.push(point); + if (_lastPoints.length > 2) { + if (_lastPoints.length === 3) { + _lastPoints.unshift(_lastPoints[0]); + } + const widths = this._calculateCurveWidths(_lastPoints[1], _lastPoints[2], options); + const curve = Bezier.fromPoints(_lastPoints, widths); + _lastPoints.shift(); + return curve; + } + return null; + } + _calculateCurveWidths(startPoint, endPoint, options) { + const velocity = options.velocityFilterWeight * endPoint.velocityFrom(startPoint) + + (1 - options.velocityFilterWeight) * this._lastVelocity; + const newWidth = this._strokeWidth(velocity, options); + const widths = { + end: newWidth, + start: this._lastWidth, + }; + this._lastVelocity = velocity; + this._lastWidth = newWidth; + return widths; + } + _strokeWidth(velocity, options) { + return Math.max(options.maxWidth / (velocity + 1), options.minWidth); + } + _drawCurveSegment(x, y, width) { + const ctx = this._ctx; + ctx.moveTo(x, y); + ctx.arc(x, y, width, 0, 2 * Math.PI, false); + this._isEmpty = false; + } + _drawCurve(curve, options) { + const ctx = this._ctx; + const widthDelta = curve.endWidth - curve.startWidth; + const drawSteps = Math.ceil(curve.length()) * 2; + ctx.beginPath(); + ctx.fillStyle = options.penColor; + for (let i = 0; i < drawSteps; i += 1) { + const t = i / drawSteps; + const tt = t * t; + const ttt = tt * t; + const u = 1 - t; + const uu = u * u; + const uuu = uu * u; + let x = uuu * curve.startPoint.x; + x += 3 * uu * t * curve.control1.x; + x += 3 * u * tt * curve.control2.x; + x += ttt * curve.endPoint.x; + let y = uuu * curve.startPoint.y; + y += 3 * uu * t * curve.control1.y; + y += 3 * u * tt * curve.control2.y; + y += ttt * curve.endPoint.y; + const width = Math.min(curve.startWidth + ttt * widthDelta, options.maxWidth); + this._drawCurveSegment(x, y, width); + } + ctx.closePath(); + ctx.fill(); + } + _drawDot(point, options) { + const ctx = this._ctx; + const width = options.dotSize > 0 + ? options.dotSize + : (options.minWidth + options.maxWidth) / 2; + ctx.beginPath(); + this._drawCurveSegment(point.x, point.y, width); + ctx.closePath(); + ctx.fillStyle = options.penColor; + ctx.fill(); + } + _fromData(pointGroups, drawCurve, drawDot) { + for (const group of pointGroups) { + const { points } = group; + const pointGroupOptions = this._getPointGroupOptions(group); + if (points.length > 1) { + for (let j = 0; j < points.length; j += 1) { + const basicPoint = points[j]; + const point = new Point(basicPoint.x, basicPoint.y, basicPoint.pressure, basicPoint.time); + if (j === 0) { + this._reset(pointGroupOptions); + } + const curve = this._addPoint(point, pointGroupOptions); + if (curve) { + drawCurve(curve, pointGroupOptions); + } + } + } + else { + this._reset(pointGroupOptions); + drawDot(points[0], pointGroupOptions); + } + } + } + toSVG({ includeBackgroundColor = false } = {}) { + const pointGroups = this._data; + const ratio = Math.max(window.devicePixelRatio || 1, 1); + const minX = 0; + const minY = 0; + const maxX = this.canvas.width / ratio; + const maxY = this.canvas.height / ratio; + const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); + svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + svg.setAttribute('viewBox', `${minX} ${minY} ${maxX} ${maxY}`); + svg.setAttribute('width', maxX.toString()); + svg.setAttribute('height', maxY.toString()); + if (includeBackgroundColor && this.backgroundColor) { + const rect = document.createElement('rect'); + rect.setAttribute('width', '100%'); + rect.setAttribute('height', '100%'); + rect.setAttribute('fill', this.backgroundColor); + svg.appendChild(rect); + } + this._fromData(pointGroups, (curve, { penColor }) => { + const path = document.createElement('path'); + if (!isNaN(curve.control1.x) && + !isNaN(curve.control1.y) && + !isNaN(curve.control2.x) && + !isNaN(curve.control2.y)) { + const attr = `M ${curve.startPoint.x.toFixed(3)},${curve.startPoint.y.toFixed(3)} ` + + `C ${curve.control1.x.toFixed(3)},${curve.control1.y.toFixed(3)} ` + + `${curve.control2.x.toFixed(3)},${curve.control2.y.toFixed(3)} ` + + `${curve.endPoint.x.toFixed(3)},${curve.endPoint.y.toFixed(3)}`; + path.setAttribute('d', attr); + path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3)); + path.setAttribute('stroke', penColor); + path.setAttribute('fill', 'none'); + path.setAttribute('stroke-linecap', 'round'); + svg.appendChild(path); + } + }, (point, { penColor, dotSize, minWidth, maxWidth }) => { + const circle = document.createElement('circle'); + const size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2; + circle.setAttribute('r', size.toString()); + circle.setAttribute('cx', point.x.toString()); + circle.setAttribute('cy', point.y.toString()); + circle.setAttribute('fill', penColor); + svg.appendChild(circle); + }); + return svg.outerHTML; + } +} + +export { SignaturePad as default }; +//# sourceMappingURL=signature_pad.js.map diff --git a/public/vendor/signature_pad@5/signature_pad.js.map b/public/vendor/signature_pad@5/signature_pad.js.map new file mode 100644 index 0000000000..30373d84e3 --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signature_pad.js","sources":["../src/point.ts","../src/bezier.ts","../src/signature_event_target.ts","../src/throttle.ts","../src/signature_pad.ts"],"sourcesContent":["// Interface for point data structure used e.g. in SignaturePad#fromData method\nexport interface BasicPoint {\n x: number;\n y: number;\n pressure: number;\n time: number;\n}\n\nexport class Point implements BasicPoint {\n public x: number;\n public y: number;\n public pressure: number;\n public time: number;\n\n constructor(x: number, y: number, pressure?: number, time?: number) {\n if (isNaN(x) || isNaN(y)) {\n throw new Error(`Point is invalid: (${x}, ${y})`);\n }\n this.x = +x;\n this.y = +y;\n this.pressure = pressure || 0;\n this.time = time || Date.now();\n }\n\n public distanceTo(start: BasicPoint): number {\n return Math.sqrt(\n Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2),\n );\n }\n\n public equals(other: BasicPoint): boolean {\n return (\n this.x === other.x &&\n this.y === other.y &&\n this.pressure === other.pressure &&\n this.time === other.time\n );\n }\n\n public velocityFrom(start: BasicPoint): number {\n return this.time !== start.time\n ? this.distanceTo(start) / (this.time - start.time)\n : 0;\n }\n}\n","import { BasicPoint, Point } from './point';\n\nexport class Bezier {\n public static fromPoints(\n points: Point[],\n widths: { start: number; end: number },\n ): Bezier {\n const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2;\n const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1;\n\n return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end);\n }\n\n private static calculateControlPoints(\n s1: BasicPoint,\n s2: BasicPoint,\n s3: BasicPoint,\n ): {\n c1: BasicPoint;\n c2: BasicPoint;\n } {\n const dx1 = s1.x - s2.x;\n const dy1 = s1.y - s2.y;\n const dx2 = s2.x - s3.x;\n const dy2 = s2.y - s3.y;\n\n const m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 };\n const m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 };\n\n const l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n const l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);\n\n const dxm = m1.x - m2.x;\n const dym = m1.y - m2.y;\n\n const k = l2 / (l1 + l2);\n const cm = { x: m2.x + dxm * k, y: m2.y + dym * k };\n\n const tx = s2.x - cm.x;\n const ty = s2.y - cm.y;\n\n return {\n c1: new Point(m1.x + tx, m1.y + ty),\n c2: new Point(m2.x + tx, m2.y + ty),\n };\n }\n\n constructor(\n public startPoint: Point,\n public control2: BasicPoint,\n public control1: BasicPoint,\n public endPoint: Point,\n public startWidth: number,\n public endWidth: number,\n ) {}\n\n // Returns approximated length. Code taken from https://www.lemoda.net/maths/bezier-length/index.html.\n public length(): number {\n const steps = 10;\n let length = 0;\n let px;\n let py;\n\n for (let i = 0; i <= steps; i += 1) {\n const t = i / steps;\n const cx = this.point(\n t,\n this.startPoint.x,\n this.control1.x,\n this.control2.x,\n this.endPoint.x,\n );\n const cy = this.point(\n t,\n this.startPoint.y,\n this.control1.y,\n this.control2.y,\n this.endPoint.y,\n );\n\n if (i > 0) {\n const xdiff = cx - (px as number);\n const ydiff = cy - (py as number);\n\n length += Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n }\n\n px = cx;\n py = cy;\n }\n\n return length;\n }\n\n // Calculate parametric value of x or y given t and the four point coordinates of a cubic bezier curve.\n private point(\n t: number,\n start: number,\n c1: number,\n c2: number,\n end: number,\n ): number {\n // prettier-ignore\n return ( start * (1.0 - t) * (1.0 - t) * (1.0 - t))\n + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t)\n + (3.0 * c2 * (1.0 - t) * t * t)\n + ( end * t * t * t);\n }\n}\n","export class SignatureEventTarget {\n /* tslint:disable: variable-name */\n private _et: EventTarget;\n /* tslint:enable: variable-name */\n\n constructor() {\n try {\n this._et = new EventTarget();\n } catch (error) {\n // Using document as EventTarget to support iOS 13 and older.\n // Because EventTarget constructor just exists at iOS 14 and later.\n this._et = document;\n }\n }\n\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions,\n ): void {\n this._et.addEventListener(type, listener, options);\n }\n\n dispatchEvent(event: Event): boolean {\n return this._et.dispatchEvent(event);\n }\n\n removeEventListener(\n type: string,\n callback: EventListenerOrEventListenerObject | null,\n options?: boolean | EventListenerOptions,\n ): void {\n this._et.removeEventListener(type, callback, options);\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias */\n// Slightly simplified version of http://stackoverflow.com/a/27078401/815507\n\nexport function throttle(\n fn: (...args: any[]) => any,\n wait = 250,\n): (this: any, ...args: any[]) => any {\n let previous = 0;\n let timeout: number | null = null;\n let result: any;\n let storedContext: any;\n let storedArgs: any[];\n\n const later = (): void => {\n previous = Date.now();\n timeout = null;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n };\n\n return function wrapper(this: any, ...args: any[]): any {\n const now = Date.now();\n const remaining = wait - (now - previous);\n\n storedContext = this;\n storedArgs = args;\n\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n\n previous = now;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n } else if (!timeout) {\n timeout = window.setTimeout(later, remaining);\n }\n\n return result;\n };\n}\n","/**\n * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:\n * http://corner.squareup.com/2012/07/smoother-signatures.html\n *\n * Implementation of interpolation using cubic Bézier curves is taken from:\n * https://web.archive.org/web/20160323213433/http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html\n *\n * Algorithm for approximated length of a Bézier curve is taken from:\n * http://www.lemoda.net/maths/bezier-length/index.html\n */\n\nimport { Bezier } from './bezier';\nimport { BasicPoint, Point } from './point';\nimport { SignatureEventTarget } from './signature_event_target';\nimport { throttle } from './throttle';\n\nexport interface SignatureEvent {\n event: MouseEvent | TouchEvent | PointerEvent;\n type: string;\n x: number;\n y: number;\n pressure: number;\n}\n\nexport interface FromDataOptions {\n clear?: boolean;\n}\n\nexport interface ToSVGOptions {\n includeBackgroundColor?: boolean;\n}\n\nexport interface PointGroupOptions {\n dotSize: number;\n minWidth: number;\n maxWidth: number;\n penColor: string;\n velocityFilterWeight: number;\n /**\n * This is the globalCompositeOperation for the line.\n * *default: 'source-over'*\n * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation\n */\n compositeOperation: GlobalCompositeOperation;\n}\n\nexport interface Options extends Partial {\n minDistance?: number;\n backgroundColor?: string;\n throttle?: number;\n canvasContextOptions?: CanvasRenderingContext2DSettings;\n}\n\nexport interface PointGroup extends PointGroupOptions {\n points: BasicPoint[];\n}\n\nexport default class SignaturePad extends SignatureEventTarget {\n // Public stuff\n public dotSize: number;\n public minWidth: number;\n public maxWidth: number;\n public penColor: string;\n public minDistance: number;\n public velocityFilterWeight: number;\n public compositeOperation: GlobalCompositeOperation;\n public backgroundColor: string;\n public throttle: number;\n public canvasContextOptions: CanvasRenderingContext2DSettings;\n\n // Private stuff\n /* tslint:disable: variable-name */\n private _ctx: CanvasRenderingContext2D;\n private _drawingStroke = false;\n private _isEmpty = true;\n private _lastPoints: Point[] = []; // Stores up to 4 most recent points; used to generate a new curve\n private _data: PointGroup[] = []; // Stores all points in groups (one group per line or dot)\n private _lastVelocity = 0;\n private _lastWidth = 0;\n private _strokeMoveUpdate: (event: SignatureEvent) => void;\n /* tslint:enable: variable-name */\n\n constructor(\n private canvas: HTMLCanvasElement,\n options: Options = {},\n ) {\n super();\n this.velocityFilterWeight = options.velocityFilterWeight || 0.7;\n this.minWidth = options.minWidth || 0.5;\n this.maxWidth = options.maxWidth || 2.5;\n\n // We need to handle 0 value, so use `??` instead of `||`\n this.throttle = options.throttle ?? 16; // in milliseconds\n this.minDistance = options.minDistance ?? 5; // in pixels\n this.dotSize = options.dotSize || 0;\n this.penColor = options.penColor || 'black';\n this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)';\n this.compositeOperation = options.compositeOperation || 'source-over';\n this.canvasContextOptions = options.canvasContextOptions ?? {};\n\n this._strokeMoveUpdate = this.throttle\n ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle)\n : SignaturePad.prototype._strokeUpdate;\n this._ctx = canvas.getContext(\n '2d',\n this.canvasContextOptions,\n ) as CanvasRenderingContext2D;\n\n this.clear();\n\n // Enable mouse and touch event handlers\n this.on();\n }\n\n public clear(): void {\n const { _ctx: ctx, canvas } = this;\n\n // Clear canvas using background color\n ctx.fillStyle = this.backgroundColor;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n this._data = [];\n this._reset(this._getPointGroupOptions());\n this._isEmpty = true;\n }\n\n public fromDataURL(\n dataUrl: string,\n options: {\n ratio?: number;\n width?: number;\n height?: number;\n xOffset?: number;\n yOffset?: number;\n } = {},\n ): Promise {\n return new Promise((resolve, reject) => {\n const image = new Image();\n const ratio = options.ratio || window.devicePixelRatio || 1;\n const width = options.width || this.canvas.width / ratio;\n const height = options.height || this.canvas.height / ratio;\n const xOffset = options.xOffset || 0;\n const yOffset = options.yOffset || 0;\n\n this._reset(this._getPointGroupOptions());\n\n image.onload = (): void => {\n this._ctx.drawImage(image, xOffset, yOffset, width, height);\n resolve();\n };\n image.onerror = (error): void => {\n reject(error);\n };\n image.crossOrigin = 'anonymous';\n image.src = dataUrl;\n\n this._isEmpty = false;\n });\n }\n\n public toDataURL(\n type: 'image/svg+xml',\n encoderOptions?: ToSVGOptions,\n ): string;\n public toDataURL(type?: string, encoderOptions?: number): string;\n public toDataURL(\n type = 'image/png',\n encoderOptions?: number | ToSVGOptions | undefined,\n ): string {\n switch (type) {\n case 'image/svg+xml':\n if (typeof encoderOptions !== 'object') {\n encoderOptions = undefined;\n }\n return `data:image/svg+xml;base64,${btoa(\n this.toSVG(encoderOptions as ToSVGOptions),\n )}`;\n default:\n if (typeof encoderOptions !== 'number') {\n encoderOptions = undefined;\n }\n return this.canvas.toDataURL(type, encoderOptions);\n }\n }\n\n public on(): void {\n // Disable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'none';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'none';\n this.canvas.style.userSelect = 'none';\n\n const isIOS =\n /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document;\n\n // The \"Scribble\" feature of iOS intercepts point events. So that we can\n // lose some of them when tapping rapidly. Use touch events for iOS\n // platforms to prevent it. See\n // https://developer.apple.com/forums/thread/664108 for more information.\n if (window.PointerEvent && !isIOS) {\n this._handlePointerEvents();\n } else {\n this._handleMouseEvents();\n\n if ('ontouchstart' in window) {\n this._handleTouchEvents();\n }\n }\n }\n\n public off(): void {\n // Enable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'auto';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'auto';\n this.canvas.style.userSelect = 'auto';\n\n this.canvas.removeEventListener('pointerdown', this._handlePointerDown);\n this.canvas.removeEventListener('mousedown', this._handleMouseDown);\n this.canvas.removeEventListener('touchstart', this._handleTouchStart);\n\n this._removeMoveUpEventListeners();\n }\n\n private _getListenerFunctions() {\n const canvasWindow =\n window.document === this.canvas.ownerDocument\n ? window\n : this.canvas.ownerDocument.defaultView ?? this.canvas.ownerDocument;\n\n return {\n addEventListener: canvasWindow.addEventListener.bind(\n canvasWindow,\n ) as typeof window.addEventListener,\n removeEventListener: canvasWindow.removeEventListener.bind(\n canvasWindow,\n ) as typeof window.removeEventListener,\n };\n }\n\n private _removeMoveUpEventListeners(): void {\n const { removeEventListener } = this._getListenerFunctions();\n removeEventListener('pointermove', this._handlePointerMove);\n removeEventListener('pointerup', this._handlePointerUp);\n\n removeEventListener('mousemove', this._handleMouseMove);\n removeEventListener('mouseup', this._handleMouseUp);\n\n removeEventListener('touchmove', this._handleTouchMove);\n removeEventListener('touchend', this._handleTouchEnd);\n }\n\n public isEmpty(): boolean {\n return this._isEmpty;\n }\n\n public fromData(\n pointGroups: PointGroup[],\n { clear = true }: FromDataOptions = {},\n ): void {\n if (clear) {\n this.clear();\n }\n\n this._fromData(\n pointGroups,\n this._drawCurve.bind(this),\n this._drawDot.bind(this),\n );\n\n this._data = this._data.concat(pointGroups);\n }\n\n public toData(): PointGroup[] {\n return this._data;\n }\n\n public _isLeftButtonPressed(event: MouseEvent, only?: boolean): boolean {\n if (only) {\n return event.buttons === 1;\n }\n\n return (event.buttons & 1) === 1;\n }\n private _pointerEventToSignatureEvent(\n event: MouseEvent | PointerEvent,\n ): SignatureEvent {\n return {\n event: event,\n type: event.type,\n x: event.clientX,\n y: event.clientY,\n pressure: 'pressure' in event ? event.pressure : 0,\n };\n }\n\n private _touchEventToSignatureEvent(event: TouchEvent): SignatureEvent {\n const touch = event.changedTouches[0];\n return {\n event: event,\n type: event.type,\n x: touch.clientX,\n y: touch.clientY,\n pressure: touch.force,\n };\n }\n\n // Event handlers\n private _handleMouseDown = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || this._drawingStroke) {\n return;\n }\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseMove = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when not pressing primary button or pressing multiple buttons\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseUp = (event: MouseEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleTouchStart = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1 || this._drawingStroke) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this._strokeBegin(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchMove = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n if (!this._drawingStroke) {\n this._strokeEnd(this._touchEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchEnd = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 0) {\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this.canvas.removeEventListener('touchmove', this._handleTouchMove);\n\n this._strokeEnd(this._touchEventToSignatureEvent(event));\n };\n\n private _handlePointerDown = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event) || this._drawingStroke) {\n return;\n }\n\n event.preventDefault();\n\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerMove = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when primary button not pressed or multiple buttons pressed\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n event.preventDefault();\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerUp = (event: PointerEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n event.preventDefault();\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _getPointGroupOptions(group?: PointGroup): PointGroupOptions {\n return {\n penColor: group && 'penColor' in group ? group.penColor : this.penColor,\n dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize,\n minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth,\n maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth,\n velocityFilterWeight:\n group && 'velocityFilterWeight' in group\n ? group.velocityFilterWeight\n : this.velocityFilterWeight,\n compositeOperation:\n group && 'compositeOperation' in group\n ? group.compositeOperation\n : this.compositeOperation,\n };\n }\n\n // Private methods\n private _strokeBegin(event: SignatureEvent): void {\n const cancelled = !this.dispatchEvent(\n new CustomEvent('beginStroke', { detail: event, cancelable: true }),\n );\n if (cancelled) {\n return;\n }\n\n const { addEventListener } = this._getListenerFunctions();\n switch (event.event.type) {\n case 'mousedown':\n addEventListener('mousemove', this._handleMouseMove);\n addEventListener('mouseup', this._handleMouseUp);\n break;\n case 'touchstart':\n addEventListener('touchmove', this._handleTouchMove);\n addEventListener('touchend', this._handleTouchEnd);\n break;\n case 'pointerdown':\n addEventListener('pointermove', this._handlePointerMove);\n addEventListener('pointerup', this._handlePointerUp);\n break;\n default:\n // do nothing\n }\n\n this._drawingStroke = true;\n\n const pointGroupOptions = this._getPointGroupOptions();\n\n const newPointGroup: PointGroup = {\n ...pointGroupOptions,\n points: [],\n };\n\n this._data.push(newPointGroup);\n this._reset(pointGroupOptions);\n this._strokeUpdate(event);\n }\n\n private _strokeUpdate(event: SignatureEvent): void {\n if (!this._drawingStroke) {\n return;\n }\n\n if (this._data.length === 0) {\n // This can happen if clear() was called while a signature is still in progress,\n // or if there is a race condition between start/update events.\n this._strokeBegin(event);\n return;\n }\n\n this.dispatchEvent(\n new CustomEvent('beforeUpdateStroke', { detail: event }),\n );\n\n const point = this._createPoint(event.x, event.y, event.pressure);\n const lastPointGroup = this._data[this._data.length - 1];\n const lastPoints = lastPointGroup.points;\n const lastPoint =\n lastPoints.length > 0 && lastPoints[lastPoints.length - 1];\n const isLastPointTooClose = lastPoint\n ? point.distanceTo(lastPoint) <= this.minDistance\n : false;\n const pointGroupOptions = this._getPointGroupOptions(lastPointGroup);\n\n // Skip this point if it's too close to the previous one\n if (!lastPoint || !(lastPoint && isLastPointTooClose)) {\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (!lastPoint) {\n this._drawDot(point, pointGroupOptions);\n } else if (curve) {\n this._drawCurve(curve, pointGroupOptions);\n }\n\n lastPoints.push({\n time: point.time,\n x: point.x,\n y: point.y,\n pressure: point.pressure,\n });\n }\n\n this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event }));\n }\n\n private _strokeEnd(event: SignatureEvent, shouldUpdate = true): void {\n this._removeMoveUpEventListeners();\n\n if (!this._drawingStroke) {\n return;\n }\n\n if (shouldUpdate) {\n this._strokeUpdate(event);\n }\n\n this._drawingStroke = false;\n this.dispatchEvent(new CustomEvent('endStroke', { detail: event }));\n }\n\n private _handlePointerEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('pointerdown', this._handlePointerDown);\n }\n\n private _handleMouseEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('mousedown', this._handleMouseDown);\n }\n\n private _handleTouchEvents(): void {\n this.canvas.addEventListener('touchstart', this._handleTouchStart);\n }\n\n // Called when a new line is started\n private _reset(options: PointGroupOptions): void {\n this._lastPoints = [];\n this._lastVelocity = 0;\n this._lastWidth = (options.minWidth + options.maxWidth) / 2;\n this._ctx.fillStyle = options.penColor;\n this._ctx.globalCompositeOperation = options.compositeOperation;\n }\n\n private _createPoint(x: number, y: number, pressure: number): Point {\n const rect = this.canvas.getBoundingClientRect();\n\n return new Point(\n x - rect.left,\n y - rect.top,\n pressure,\n new Date().getTime(),\n );\n }\n\n // Add point to _lastPoints array and generate a new curve if there are enough points (i.e. 3)\n private _addPoint(point: Point, options: PointGroupOptions): Bezier | null {\n const { _lastPoints } = this;\n\n _lastPoints.push(point);\n\n if (_lastPoints.length > 2) {\n // To reduce the initial lag make it work with 3 points\n // by copying the first point to the beginning.\n if (_lastPoints.length === 3) {\n _lastPoints.unshift(_lastPoints[0]);\n }\n\n // _points array will always have 4 points here.\n const widths = this._calculateCurveWidths(\n _lastPoints[1],\n _lastPoints[2],\n options,\n );\n const curve = Bezier.fromPoints(_lastPoints, widths);\n\n // Remove the first element from the list, so that there are no more than 4 points at any time.\n _lastPoints.shift();\n\n return curve;\n }\n\n return null;\n }\n\n private _calculateCurveWidths(\n startPoint: Point,\n endPoint: Point,\n options: PointGroupOptions,\n ): { start: number; end: number } {\n const velocity =\n options.velocityFilterWeight * endPoint.velocityFrom(startPoint) +\n (1 - options.velocityFilterWeight) * this._lastVelocity;\n\n const newWidth = this._strokeWidth(velocity, options);\n\n const widths = {\n end: newWidth,\n start: this._lastWidth,\n };\n\n this._lastVelocity = velocity;\n this._lastWidth = newWidth;\n\n return widths;\n }\n\n private _strokeWidth(velocity: number, options: PointGroupOptions): number {\n return Math.max(options.maxWidth / (velocity + 1), options.minWidth);\n }\n\n private _drawCurveSegment(x: number, y: number, width: number): void {\n const ctx = this._ctx;\n\n ctx.moveTo(x, y);\n ctx.arc(x, y, width, 0, 2 * Math.PI, false);\n this._isEmpty = false;\n }\n\n private _drawCurve(curve: Bezier, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const widthDelta = curve.endWidth - curve.startWidth;\n // '2' is just an arbitrary number here. If only length is used, then\n // there are gaps between curve segments :/\n const drawSteps = Math.ceil(curve.length()) * 2;\n\n ctx.beginPath();\n ctx.fillStyle = options.penColor;\n\n for (let i = 0; i < drawSteps; i += 1) {\n // Calculate the Bezier (x, y) coordinate for this step.\n const t = i / drawSteps;\n const tt = t * t;\n const ttt = tt * t;\n const u = 1 - t;\n const uu = u * u;\n const uuu = uu * u;\n\n let x = uuu * curve.startPoint.x;\n x += 3 * uu * t * curve.control1.x;\n x += 3 * u * tt * curve.control2.x;\n x += ttt * curve.endPoint.x;\n\n let y = uuu * curve.startPoint.y;\n y += 3 * uu * t * curve.control1.y;\n y += 3 * u * tt * curve.control2.y;\n y += ttt * curve.endPoint.y;\n\n const width = Math.min(\n curve.startWidth + ttt * widthDelta,\n options.maxWidth,\n );\n this._drawCurveSegment(x, y, width);\n }\n\n ctx.closePath();\n ctx.fill();\n }\n\n private _drawDot(point: BasicPoint, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const width =\n options.dotSize > 0\n ? options.dotSize\n : (options.minWidth + options.maxWidth) / 2;\n\n ctx.beginPath();\n this._drawCurveSegment(point.x, point.y, width);\n ctx.closePath();\n ctx.fillStyle = options.penColor;\n ctx.fill();\n }\n\n private _fromData(\n pointGroups: PointGroup[],\n drawCurve: SignaturePad['_drawCurve'],\n drawDot: SignaturePad['_drawDot'],\n ): void {\n for (const group of pointGroups) {\n const { points } = group;\n const pointGroupOptions = this._getPointGroupOptions(group);\n\n if (points.length > 1) {\n for (let j = 0; j < points.length; j += 1) {\n const basicPoint = points[j];\n const point = new Point(\n basicPoint.x,\n basicPoint.y,\n basicPoint.pressure,\n basicPoint.time,\n );\n\n if (j === 0) {\n this._reset(pointGroupOptions);\n }\n\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (curve) {\n drawCurve(curve, pointGroupOptions);\n }\n }\n } else {\n this._reset(pointGroupOptions);\n\n drawDot(points[0], pointGroupOptions);\n }\n }\n }\n\n public toSVG({ includeBackgroundColor = false }: ToSVGOptions = {}): string {\n const pointGroups = this._data;\n const ratio = Math.max(window.devicePixelRatio || 1, 1);\n const minX = 0;\n const minY = 0;\n const maxX = this.canvas.width / ratio;\n const maxY = this.canvas.height / ratio;\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n svg.setAttribute('viewBox', `${minX} ${minY} ${maxX} ${maxY}`);\n svg.setAttribute('width', maxX.toString());\n svg.setAttribute('height', maxY.toString());\n\n if (includeBackgroundColor && this.backgroundColor) {\n const rect = document.createElement('rect');\n rect.setAttribute('width', '100%');\n rect.setAttribute('height', '100%');\n rect.setAttribute('fill', this.backgroundColor);\n\n svg.appendChild(rect);\n }\n\n this._fromData(\n pointGroups,\n\n (curve, { penColor }) => {\n const path = document.createElement('path');\n\n // Need to check curve for NaN values, these pop up when drawing\n // lines on the canvas that are not continuous. E.g. Sharp corners\n // or stopping mid-stroke and than continuing without lifting mouse.\n /* eslint-disable no-restricted-globals */\n if (\n !isNaN(curve.control1.x) &&\n !isNaN(curve.control1.y) &&\n !isNaN(curve.control2.x) &&\n !isNaN(curve.control2.y)\n ) {\n const attr =\n `M ${curve.startPoint.x.toFixed(3)},${curve.startPoint.y.toFixed(\n 3,\n )} ` +\n `C ${curve.control1.x.toFixed(3)},${curve.control1.y.toFixed(3)} ` +\n `${curve.control2.x.toFixed(3)},${curve.control2.y.toFixed(3)} ` +\n `${curve.endPoint.x.toFixed(3)},${curve.endPoint.y.toFixed(3)}`;\n path.setAttribute('d', attr);\n path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3));\n path.setAttribute('stroke', penColor);\n path.setAttribute('fill', 'none');\n path.setAttribute('stroke-linecap', 'round');\n\n svg.appendChild(path);\n }\n /* eslint-enable no-restricted-globals */\n },\n\n (point, { penColor, dotSize, minWidth, maxWidth }) => {\n const circle = document.createElement('circle');\n const size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2;\n circle.setAttribute('r', size.toString());\n circle.setAttribute('cx', point.x.toString());\n circle.setAttribute('cy', point.y.toString());\n circle.setAttribute('fill', penColor);\n\n svg.appendChild(circle);\n },\n );\n\n return svg.outerHTML;\n }\n}\n"],"names":[],"mappings":";;;;;MAQa,KAAK,CAAA;AAMhB,IAAA,WAAA,CAAY,CAAS,EAAE,CAAS,EAAE,QAAiB,EAAE,IAAa,EAA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CAAC,CAAC,CAAC;AACtE,gBAAA,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACtC,gBAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAClC,gBAAA,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAE7C,gBAAA,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;aACvB;AAEH,SAAC,EAED,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAI;YACnD,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;AAChD,YAAA,MAAM,IAAI,GAAG,OAAO,GAAG,CAAC,GAAG,OAAO,GAAG,CAAC,QAAQ,GAAG,QAAQ,IAAI,CAAC,CAAC;YAC/D,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC1C,YAAA,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC9C,YAAA,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC9C,YAAA,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAEtC,YAAA,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AAC1B,SAAC,CACF,CAAC;QAEF,OAAO,GAAG,CAAC,SAAS,CAAC;KACtB;AACF;;;;"} \ No newline at end of file diff --git a/public/vendor/signature_pad@5/signature_pad.min.js b/public/vendor/signature_pad@5/signature_pad.min.js new file mode 100644 index 0000000000..b4fd439dc0 --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.min.js @@ -0,0 +1,6 @@ +/*! + * Signature Pad v5.0.2 | https://github.com/szimek/signature_pad + * (c) 2024 Szymon Nowak | Released under the MIT license + */ +class t{constructor(t,e,i,n){if(isNaN(t)||isNaN(e))throw new Error(`Point is invalid: (${t}, ${e})`);this.x=+t,this.y=+e,this.pressure=i||0,this.time=n||Date.now()}distanceTo(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))}equals(t){return this.x===t.x&&this.y===t.y&&this.pressure===t.pressure&&this.time===t.time}velocityFrom(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):0}}class e{static fromPoints(t,i){const n=this.calculateControlPoints(t[0],t[1],t[2]).c2,s=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new e(t[1],n,s,t[2],i.start,i.end)}static calculateControlPoints(e,i,n){const s=e.x-i.x,o=e.y-i.y,r=i.x-n.x,h=i.y-n.y,a=(e.x+i.x)/2,c=(e.y+i.y)/2,d=(i.x+n.x)/2,l=(i.y+n.y)/2,u=Math.sqrt(s*s+o*o),v=Math.sqrt(r*r+h*h),_=v/(u+v),p=d+(a-d)*_,m=l+(c-l)*_,g=i.x-p,w=i.y-m;return{c1:new t(a+g,c+w),c2:new t(d+g,l+w)}}constructor(t,e,i,n,s,o){this.startPoint=t,this.control2=e,this.control1=i,this.endPoint=n,this.startWidth=s,this.endWidth=o}length(){let t,e,i=0;for(let n=0;n<=10;n+=1){const s=n/10,o=this.point(s,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),r=this.point(s,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(n>0){const n=o-t,s=r-e;i+=Math.sqrt(n*n+s*s)}t=o,e=r}return i}point(t,e,i,n,s){return e*(1-t)*(1-t)*(1-t)+3*i*(1-t)*(1-t)*t+3*n*(1-t)*t*t+s*t*t*t}}class i{constructor(){try{this._et=new EventTarget}catch(t){this._et=document}}addEventListener(t,e,i){this._et.addEventListener(t,e,i)}dispatchEvent(t){return this._et.dispatchEvent(t)}removeEventListener(t,e,i){this._et.removeEventListener(t,e,i)}}class n extends i{constructor(t,e={}){var i,s,o;super(),this.canvas=t,this._drawingStroke=!1,this._isEmpty=!0,this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this._handleMouseDown=t=>{this._isLeftButtonPressed(t,!0)&&!this._drawingStroke&&this._strokeBegin(this._pointerEventToSignatureEvent(t))},this._handleMouseMove=t=>{this._isLeftButtonPressed(t,!0)&&this._drawingStroke?this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t)):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1)},this._handleMouseUp=t=>{this._isLeftButtonPressed(t)||this._strokeEnd(this._pointerEventToSignatureEvent(t))},this._handleTouchStart=t=>{1!==t.targetTouches.length||this._drawingStroke||(t.cancelable&&t.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(t)))},this._handleTouchMove=t=>{1===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._drawingStroke?this._strokeMoveUpdate(this._touchEventToSignatureEvent(t)):this._strokeEnd(this._touchEventToSignatureEvent(t),!1))},this._handleTouchEnd=t=>{0===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this.canvas.removeEventListener("touchmove",this._handleTouchMove),this._strokeEnd(this._touchEventToSignatureEvent(t)))},this._handlePointerDown=t=>{this._isLeftButtonPressed(t)&&!this._drawingStroke&&(t.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(t)))},this._handlePointerMove=t=>{this._isLeftButtonPressed(t,!0)&&this._drawingStroke?(t.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t))):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1)},this._handlePointerUp=t=>{this._isLeftButtonPressed(t)||(t.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(t)))},this.velocityFilterWeight=e.velocityFilterWeight||.7,this.minWidth=e.minWidth||.5,this.maxWidth=e.maxWidth||2.5,this.throttle=null!==(i=e.throttle)&&void 0!==i?i:16,this.minDistance=null!==(s=e.minDistance)&&void 0!==s?s:5,this.dotSize=e.dotSize||0,this.penColor=e.penColor||"black",this.backgroundColor=e.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=e.compositeOperation||"source-over",this.canvasContextOptions=null!==(o=e.canvasContextOptions)&&void 0!==o?o:{},this._strokeMoveUpdate=this.throttle?function(t,e=250){let i,n,s,o=0,r=null;const h=()=>{o=Date.now(),r=null,i=t.apply(n,s),r||(n=null,s=[])};return function(...a){const c=Date.now(),d=e-(c-o);return n=this,s=a,d<=0||d>e?(r&&(clearTimeout(r),r=null),o=c,i=t.apply(n,s),r||(n=null,s=[])):r||(r=window.setTimeout(h,d)),i}}(n.prototype._strokeUpdate,this.throttle):n.prototype._strokeUpdate,this._ctx=t.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:t,canvas:e}=this;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0}fromDataURL(t,e={}){return new Promise(((i,n)=>{const s=new Image,o=e.ratio||window.devicePixelRatio||1,r=e.width||this.canvas.width/o,h=e.height||this.canvas.height/o,a=e.xOffset||0,c=e.yOffset||0;this._reset(this._getPointGroupOptions()),s.onload=()=>{this._ctx.drawImage(s,a,c,r,h),i()},s.onerror=t=>{n(t)},s.crossOrigin="anonymous",s.src=t,this._isEmpty=!1}))}toDataURL(t="image/png",e){return"image/svg+xml"===t?("object"!=typeof e&&(e=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(e))}`):("number"!=typeof e&&(e=void 0),this.canvas.toDataURL(t,e))}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";const t=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!t?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){var t;const e=window.document===this.canvas.ownerDocument?window:null!==(t=this.canvas.ownerDocument.defaultView)&&void 0!==t?t:this.canvas.ownerDocument;return{addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}_removeMoveUpEventListeners(){const{removeEventListener:t}=this._getListenerFunctions();t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp),t("mousemove",this._handleMouseMove),t("mouseup",this._handleMouseUp),t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}fromData(t,{clear:e=!0}={}){e&&this.clear(),this._fromData(t,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(t)}toData(){return this._data}_isLeftButtonPressed(t,e){return e?1===t.buttons:!(1&~t.buttons)}_pointerEventToSignatureEvent(t){return{event:t,type:t.type,x:t.clientX,y:t.clientY,pressure:"pressure"in t?t.pressure:0}}_touchEventToSignatureEvent(t){const e=t.changedTouches[0];return{event:t,type:t.type,x:e.clientX,y:e.clientY,pressure:e.force}}_getPointGroupOptions(t){return{penColor:t&&"penColor"in t?t.penColor:this.penColor,dotSize:t&&"dotSize"in t?t.dotSize:this.dotSize,minWidth:t&&"minWidth"in t?t.minWidth:this.minWidth,maxWidth:t&&"maxWidth"in t?t.maxWidth:this.maxWidth,velocityFilterWeight:t&&"velocityFilterWeight"in t?t.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:t&&"compositeOperation"in t?t.compositeOperation:this.compositeOperation}}_strokeBegin(t){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:t,cancelable:!0})))return;const{addEventListener:e}=this._getListenerFunctions();switch(t.event.type){case"mousedown":e("mousemove",this._handleMouseMove),e("mouseup",this._handleMouseUp);break;case"touchstart":e("touchmove",this._handleTouchMove),e("touchend",this._handleTouchEnd);break;case"pointerdown":e("pointermove",this._handlePointerMove),e("pointerup",this._handlePointerUp)}this._drawingStroke=!0;const i=this._getPointGroupOptions(),n=Object.assign(Object.assign({},i),{points:[]});this._data.push(n),this._reset(i),this._strokeUpdate(t)}_strokeUpdate(t){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(t);this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:t}));const e=this._createPoint(t.x,t.y,t.pressure),i=this._data[this._data.length-1],n=i.points,s=n.length>0&&n[n.length-1],o=!!s&&e.distanceTo(s)<=this.minDistance,r=this._getPointGroupOptions(i);if(!s||!s||!o){const t=this._addPoint(e,r);s?t&&this._drawCurve(t,r):this._drawDot(e,r),n.push({time:e.time,x:e.x,y:e.y,pressure:e.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:t}))}_strokeEnd(t,e=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(e&&this._strokeUpdate(t),this._drawingStroke=!1,this.dispatchEvent(new CustomEvent("endStroke",{detail:t})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown)}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown)}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart)}_reset(t){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(t.minWidth+t.maxWidth)/2,this._ctx.fillStyle=t.penColor,this._ctx.globalCompositeOperation=t.compositeOperation}_createPoint(e,i,n){const s=this.canvas.getBoundingClientRect();return new t(e-s.left,i-s.top,n,(new Date).getTime())}_addPoint(t,i){const{_lastPoints:n}=this;if(n.push(t),n.length>2){3===n.length&&n.unshift(n[0]);const t=this._calculateCurveWidths(n[1],n[2],i),s=e.fromPoints(n,t);return n.shift(),s}return null}_calculateCurveWidths(t,e,i){const n=i.velocityFilterWeight*e.velocityFrom(t)+(1-i.velocityFilterWeight)*this._lastVelocity,s=this._strokeWidth(n,i),o={end:s,start:this._lastWidth};return this._lastVelocity=n,this._lastWidth=s,o}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,i){const n=this._ctx;n.moveTo(t,e),n.arc(t,e,i,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(t,e){const i=this._ctx,n=t.endWidth-t.startWidth,s=2*Math.ceil(t.length());i.beginPath(),i.fillStyle=e.penColor;for(let i=0;i0?e.dotSize:(e.minWidth+e.maxWidth)/2;i.beginPath(),this._drawCurveSegment(t.x,t.y,n),i.closePath(),i.fillStyle=e.penColor,i.fill()}_fromData(e,i,n){for(const s of e){const{points:e}=s,o=this._getPointGroupOptions(s);if(e.length>1)for(let n=0;n{const i=document.createElement("path");if(!(isNaN(t.control1.x)||isNaN(t.control1.y)||isNaN(t.control2.x)||isNaN(t.control2.y))){const n=`M ${t.startPoint.x.toFixed(3)},${t.startPoint.y.toFixed(3)} C ${t.control1.x.toFixed(3)},${t.control1.y.toFixed(3)} ${t.control2.x.toFixed(3)},${t.control2.y.toFixed(3)} ${t.endPoint.x.toFixed(3)},${t.endPoint.y.toFixed(3)}`;i.setAttribute("d",n),i.setAttribute("stroke-width",(2.25*t.endWidth).toFixed(3)),i.setAttribute("stroke",e),i.setAttribute("fill","none"),i.setAttribute("stroke-linecap","round"),o.appendChild(i)}}),((t,{penColor:e,dotSize:i,minWidth:n,maxWidth:s})=>{const r=document.createElement("circle"),h=i>0?i:(n+s)/2;r.setAttribute("r",h.toString()),r.setAttribute("cx",t.x.toString()),r.setAttribute("cy",t.y.toString()),r.setAttribute("fill",e),o.appendChild(r)})),o.outerHTML}}export{n as default}; +//# sourceMappingURL=signature_pad.min.js.map diff --git a/public/vendor/signature_pad@5/signature_pad.min.js.map b/public/vendor/signature_pad@5/signature_pad.min.js.map new file mode 100644 index 0000000000..5180002228 --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signature_pad.min.js","sources":["../src/point.ts","../src/bezier.ts","../src/signature_event_target.ts","../src/signature_pad.ts","../src/throttle.ts"],"sourcesContent":["// Interface for point data structure used e.g. in SignaturePad#fromData method\nexport interface BasicPoint {\n x: number;\n y: number;\n pressure: number;\n time: number;\n}\n\nexport class Point implements BasicPoint {\n public x: number;\n public y: number;\n public pressure: number;\n public time: number;\n\n constructor(x: number, y: number, pressure?: number, time?: number) {\n if (isNaN(x) || isNaN(y)) {\n throw new Error(`Point is invalid: (${x}, ${y})`);\n }\n this.x = +x;\n this.y = +y;\n this.pressure = pressure || 0;\n this.time = time || Date.now();\n }\n\n public distanceTo(start: BasicPoint): number {\n return Math.sqrt(\n Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2),\n );\n }\n\n public equals(other: BasicPoint): boolean {\n return (\n this.x === other.x &&\n this.y === other.y &&\n this.pressure === other.pressure &&\n this.time === other.time\n );\n }\n\n public velocityFrom(start: BasicPoint): number {\n return this.time !== start.time\n ? this.distanceTo(start) / (this.time - start.time)\n : 0;\n }\n}\n","import { BasicPoint, Point } from './point';\n\nexport class Bezier {\n public static fromPoints(\n points: Point[],\n widths: { start: number; end: number },\n ): Bezier {\n const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2;\n const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1;\n\n return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end);\n }\n\n private static calculateControlPoints(\n s1: BasicPoint,\n s2: BasicPoint,\n s3: BasicPoint,\n ): {\n c1: BasicPoint;\n c2: BasicPoint;\n } {\n const dx1 = s1.x - s2.x;\n const dy1 = s1.y - s2.y;\n const dx2 = s2.x - s3.x;\n const dy2 = s2.y - s3.y;\n\n const m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 };\n const m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 };\n\n const l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n const l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);\n\n const dxm = m1.x - m2.x;\n const dym = m1.y - m2.y;\n\n const k = l2 / (l1 + l2);\n const cm = { x: m2.x + dxm * k, y: m2.y + dym * k };\n\n const tx = s2.x - cm.x;\n const ty = s2.y - cm.y;\n\n return {\n c1: new Point(m1.x + tx, m1.y + ty),\n c2: new Point(m2.x + tx, m2.y + ty),\n };\n }\n\n constructor(\n public startPoint: Point,\n public control2: BasicPoint,\n public control1: BasicPoint,\n public endPoint: Point,\n public startWidth: number,\n public endWidth: number,\n ) {}\n\n // Returns approximated length. Code taken from https://www.lemoda.net/maths/bezier-length/index.html.\n public length(): number {\n const steps = 10;\n let length = 0;\n let px;\n let py;\n\n for (let i = 0; i <= steps; i += 1) {\n const t = i / steps;\n const cx = this.point(\n t,\n this.startPoint.x,\n this.control1.x,\n this.control2.x,\n this.endPoint.x,\n );\n const cy = this.point(\n t,\n this.startPoint.y,\n this.control1.y,\n this.control2.y,\n this.endPoint.y,\n );\n\n if (i > 0) {\n const xdiff = cx - (px as number);\n const ydiff = cy - (py as number);\n\n length += Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n }\n\n px = cx;\n py = cy;\n }\n\n return length;\n }\n\n // Calculate parametric value of x or y given t and the four point coordinates of a cubic bezier curve.\n private point(\n t: number,\n start: number,\n c1: number,\n c2: number,\n end: number,\n ): number {\n // prettier-ignore\n return ( start * (1.0 - t) * (1.0 - t) * (1.0 - t))\n + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t)\n + (3.0 * c2 * (1.0 - t) * t * t)\n + ( end * t * t * t);\n }\n}\n","export class SignatureEventTarget {\n /* tslint:disable: variable-name */\n private _et: EventTarget;\n /* tslint:enable: variable-name */\n\n constructor() {\n try {\n this._et = new EventTarget();\n } catch (error) {\n // Using document as EventTarget to support iOS 13 and older.\n // Because EventTarget constructor just exists at iOS 14 and later.\n this._et = document;\n }\n }\n\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions,\n ): void {\n this._et.addEventListener(type, listener, options);\n }\n\n dispatchEvent(event: Event): boolean {\n return this._et.dispatchEvent(event);\n }\n\n removeEventListener(\n type: string,\n callback: EventListenerOrEventListenerObject | null,\n options?: boolean | EventListenerOptions,\n ): void {\n this._et.removeEventListener(type, callback, options);\n }\n}\n","/**\n * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:\n * http://corner.squareup.com/2012/07/smoother-signatures.html\n *\n * Implementation of interpolation using cubic Bézier curves is taken from:\n * https://web.archive.org/web/20160323213433/http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html\n *\n * Algorithm for approximated length of a Bézier curve is taken from:\n * http://www.lemoda.net/maths/bezier-length/index.html\n */\n\nimport { Bezier } from './bezier';\nimport { BasicPoint, Point } from './point';\nimport { SignatureEventTarget } from './signature_event_target';\nimport { throttle } from './throttle';\n\nexport interface SignatureEvent {\n event: MouseEvent | TouchEvent | PointerEvent;\n type: string;\n x: number;\n y: number;\n pressure: number;\n}\n\nexport interface FromDataOptions {\n clear?: boolean;\n}\n\nexport interface ToSVGOptions {\n includeBackgroundColor?: boolean;\n}\n\nexport interface PointGroupOptions {\n dotSize: number;\n minWidth: number;\n maxWidth: number;\n penColor: string;\n velocityFilterWeight: number;\n /**\n * This is the globalCompositeOperation for the line.\n * *default: 'source-over'*\n * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation\n */\n compositeOperation: GlobalCompositeOperation;\n}\n\nexport interface Options extends Partial {\n minDistance?: number;\n backgroundColor?: string;\n throttle?: number;\n canvasContextOptions?: CanvasRenderingContext2DSettings;\n}\n\nexport interface PointGroup extends PointGroupOptions {\n points: BasicPoint[];\n}\n\nexport default class SignaturePad extends SignatureEventTarget {\n // Public stuff\n public dotSize: number;\n public minWidth: number;\n public maxWidth: number;\n public penColor: string;\n public minDistance: number;\n public velocityFilterWeight: number;\n public compositeOperation: GlobalCompositeOperation;\n public backgroundColor: string;\n public throttle: number;\n public canvasContextOptions: CanvasRenderingContext2DSettings;\n\n // Private stuff\n /* tslint:disable: variable-name */\n private _ctx: CanvasRenderingContext2D;\n private _drawingStroke = false;\n private _isEmpty = true;\n private _lastPoints: Point[] = []; // Stores up to 4 most recent points; used to generate a new curve\n private _data: PointGroup[] = []; // Stores all points in groups (one group per line or dot)\n private _lastVelocity = 0;\n private _lastWidth = 0;\n private _strokeMoveUpdate: (event: SignatureEvent) => void;\n /* tslint:enable: variable-name */\n\n constructor(\n private canvas: HTMLCanvasElement,\n options: Options = {},\n ) {\n super();\n this.velocityFilterWeight = options.velocityFilterWeight || 0.7;\n this.minWidth = options.minWidth || 0.5;\n this.maxWidth = options.maxWidth || 2.5;\n\n // We need to handle 0 value, so use `??` instead of `||`\n this.throttle = options.throttle ?? 16; // in milliseconds\n this.minDistance = options.minDistance ?? 5; // in pixels\n this.dotSize = options.dotSize || 0;\n this.penColor = options.penColor || 'black';\n this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)';\n this.compositeOperation = options.compositeOperation || 'source-over';\n this.canvasContextOptions = options.canvasContextOptions ?? {};\n\n this._strokeMoveUpdate = this.throttle\n ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle)\n : SignaturePad.prototype._strokeUpdate;\n this._ctx = canvas.getContext(\n '2d',\n this.canvasContextOptions,\n ) as CanvasRenderingContext2D;\n\n this.clear();\n\n // Enable mouse and touch event handlers\n this.on();\n }\n\n public clear(): void {\n const { _ctx: ctx, canvas } = this;\n\n // Clear canvas using background color\n ctx.fillStyle = this.backgroundColor;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n this._data = [];\n this._reset(this._getPointGroupOptions());\n this._isEmpty = true;\n }\n\n public fromDataURL(\n dataUrl: string,\n options: {\n ratio?: number;\n width?: number;\n height?: number;\n xOffset?: number;\n yOffset?: number;\n } = {},\n ): Promise {\n return new Promise((resolve, reject) => {\n const image = new Image();\n const ratio = options.ratio || window.devicePixelRatio || 1;\n const width = options.width || this.canvas.width / ratio;\n const height = options.height || this.canvas.height / ratio;\n const xOffset = options.xOffset || 0;\n const yOffset = options.yOffset || 0;\n\n this._reset(this._getPointGroupOptions());\n\n image.onload = (): void => {\n this._ctx.drawImage(image, xOffset, yOffset, width, height);\n resolve();\n };\n image.onerror = (error): void => {\n reject(error);\n };\n image.crossOrigin = 'anonymous';\n image.src = dataUrl;\n\n this._isEmpty = false;\n });\n }\n\n public toDataURL(\n type: 'image/svg+xml',\n encoderOptions?: ToSVGOptions,\n ): string;\n public toDataURL(type?: string, encoderOptions?: number): string;\n public toDataURL(\n type = 'image/png',\n encoderOptions?: number | ToSVGOptions | undefined,\n ): string {\n switch (type) {\n case 'image/svg+xml':\n if (typeof encoderOptions !== 'object') {\n encoderOptions = undefined;\n }\n return `data:image/svg+xml;base64,${btoa(\n this.toSVG(encoderOptions as ToSVGOptions),\n )}`;\n default:\n if (typeof encoderOptions !== 'number') {\n encoderOptions = undefined;\n }\n return this.canvas.toDataURL(type, encoderOptions);\n }\n }\n\n public on(): void {\n // Disable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'none';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'none';\n this.canvas.style.userSelect = 'none';\n\n const isIOS =\n /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document;\n\n // The \"Scribble\" feature of iOS intercepts point events. So that we can\n // lose some of them when tapping rapidly. Use touch events for iOS\n // platforms to prevent it. See\n // https://developer.apple.com/forums/thread/664108 for more information.\n if (window.PointerEvent && !isIOS) {\n this._handlePointerEvents();\n } else {\n this._handleMouseEvents();\n\n if ('ontouchstart' in window) {\n this._handleTouchEvents();\n }\n }\n }\n\n public off(): void {\n // Enable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'auto';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'auto';\n this.canvas.style.userSelect = 'auto';\n\n this.canvas.removeEventListener('pointerdown', this._handlePointerDown);\n this.canvas.removeEventListener('mousedown', this._handleMouseDown);\n this.canvas.removeEventListener('touchstart', this._handleTouchStart);\n\n this._removeMoveUpEventListeners();\n }\n\n private _getListenerFunctions() {\n const canvasWindow =\n window.document === this.canvas.ownerDocument\n ? window\n : this.canvas.ownerDocument.defaultView ?? this.canvas.ownerDocument;\n\n return {\n addEventListener: canvasWindow.addEventListener.bind(\n canvasWindow,\n ) as typeof window.addEventListener,\n removeEventListener: canvasWindow.removeEventListener.bind(\n canvasWindow,\n ) as typeof window.removeEventListener,\n };\n }\n\n private _removeMoveUpEventListeners(): void {\n const { removeEventListener } = this._getListenerFunctions();\n removeEventListener('pointermove', this._handlePointerMove);\n removeEventListener('pointerup', this._handlePointerUp);\n\n removeEventListener('mousemove', this._handleMouseMove);\n removeEventListener('mouseup', this._handleMouseUp);\n\n removeEventListener('touchmove', this._handleTouchMove);\n removeEventListener('touchend', this._handleTouchEnd);\n }\n\n public isEmpty(): boolean {\n return this._isEmpty;\n }\n\n public fromData(\n pointGroups: PointGroup[],\n { clear = true }: FromDataOptions = {},\n ): void {\n if (clear) {\n this.clear();\n }\n\n this._fromData(\n pointGroups,\n this._drawCurve.bind(this),\n this._drawDot.bind(this),\n );\n\n this._data = this._data.concat(pointGroups);\n }\n\n public toData(): PointGroup[] {\n return this._data;\n }\n\n public _isLeftButtonPressed(event: MouseEvent, only?: boolean): boolean {\n if (only) {\n return event.buttons === 1;\n }\n\n return (event.buttons & 1) === 1;\n }\n private _pointerEventToSignatureEvent(\n event: MouseEvent | PointerEvent,\n ): SignatureEvent {\n return {\n event: event,\n type: event.type,\n x: event.clientX,\n y: event.clientY,\n pressure: 'pressure' in event ? event.pressure : 0,\n };\n }\n\n private _touchEventToSignatureEvent(event: TouchEvent): SignatureEvent {\n const touch = event.changedTouches[0];\n return {\n event: event,\n type: event.type,\n x: touch.clientX,\n y: touch.clientY,\n pressure: touch.force,\n };\n }\n\n // Event handlers\n private _handleMouseDown = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || this._drawingStroke) {\n return;\n }\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseMove = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when not pressing primary button or pressing multiple buttons\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseUp = (event: MouseEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleTouchStart = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1 || this._drawingStroke) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this._strokeBegin(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchMove = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n if (!this._drawingStroke) {\n this._strokeEnd(this._touchEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchEnd = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 0) {\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this.canvas.removeEventListener('touchmove', this._handleTouchMove);\n\n this._strokeEnd(this._touchEventToSignatureEvent(event));\n };\n\n private _handlePointerDown = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event) || this._drawingStroke) {\n return;\n }\n\n event.preventDefault();\n\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerMove = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when primary button not pressed or multiple buttons pressed\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n event.preventDefault();\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerUp = (event: PointerEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n event.preventDefault();\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _getPointGroupOptions(group?: PointGroup): PointGroupOptions {\n return {\n penColor: group && 'penColor' in group ? group.penColor : this.penColor,\n dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize,\n minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth,\n maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth,\n velocityFilterWeight:\n group && 'velocityFilterWeight' in group\n ? group.velocityFilterWeight\n : this.velocityFilterWeight,\n compositeOperation:\n group && 'compositeOperation' in group\n ? group.compositeOperation\n : this.compositeOperation,\n };\n }\n\n // Private methods\n private _strokeBegin(event: SignatureEvent): void {\n const cancelled = !this.dispatchEvent(\n new CustomEvent('beginStroke', { detail: event, cancelable: true }),\n );\n if (cancelled) {\n return;\n }\n\n const { addEventListener } = this._getListenerFunctions();\n switch (event.event.type) {\n case 'mousedown':\n addEventListener('mousemove', this._handleMouseMove);\n addEventListener('mouseup', this._handleMouseUp);\n break;\n case 'touchstart':\n addEventListener('touchmove', this._handleTouchMove);\n addEventListener('touchend', this._handleTouchEnd);\n break;\n case 'pointerdown':\n addEventListener('pointermove', this._handlePointerMove);\n addEventListener('pointerup', this._handlePointerUp);\n break;\n default:\n // do nothing\n }\n\n this._drawingStroke = true;\n\n const pointGroupOptions = this._getPointGroupOptions();\n\n const newPointGroup: PointGroup = {\n ...pointGroupOptions,\n points: [],\n };\n\n this._data.push(newPointGroup);\n this._reset(pointGroupOptions);\n this._strokeUpdate(event);\n }\n\n private _strokeUpdate(event: SignatureEvent): void {\n if (!this._drawingStroke) {\n return;\n }\n\n if (this._data.length === 0) {\n // This can happen if clear() was called while a signature is still in progress,\n // or if there is a race condition between start/update events.\n this._strokeBegin(event);\n return;\n }\n\n this.dispatchEvent(\n new CustomEvent('beforeUpdateStroke', { detail: event }),\n );\n\n const point = this._createPoint(event.x, event.y, event.pressure);\n const lastPointGroup = this._data[this._data.length - 1];\n const lastPoints = lastPointGroup.points;\n const lastPoint =\n lastPoints.length > 0 && lastPoints[lastPoints.length - 1];\n const isLastPointTooClose = lastPoint\n ? point.distanceTo(lastPoint) <= this.minDistance\n : false;\n const pointGroupOptions = this._getPointGroupOptions(lastPointGroup);\n\n // Skip this point if it's too close to the previous one\n if (!lastPoint || !(lastPoint && isLastPointTooClose)) {\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (!lastPoint) {\n this._drawDot(point, pointGroupOptions);\n } else if (curve) {\n this._drawCurve(curve, pointGroupOptions);\n }\n\n lastPoints.push({\n time: point.time,\n x: point.x,\n y: point.y,\n pressure: point.pressure,\n });\n }\n\n this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event }));\n }\n\n private _strokeEnd(event: SignatureEvent, shouldUpdate = true): void {\n this._removeMoveUpEventListeners();\n\n if (!this._drawingStroke) {\n return;\n }\n\n if (shouldUpdate) {\n this._strokeUpdate(event);\n }\n\n this._drawingStroke = false;\n this.dispatchEvent(new CustomEvent('endStroke', { detail: event }));\n }\n\n private _handlePointerEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('pointerdown', this._handlePointerDown);\n }\n\n private _handleMouseEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('mousedown', this._handleMouseDown);\n }\n\n private _handleTouchEvents(): void {\n this.canvas.addEventListener('touchstart', this._handleTouchStart);\n }\n\n // Called when a new line is started\n private _reset(options: PointGroupOptions): void {\n this._lastPoints = [];\n this._lastVelocity = 0;\n this._lastWidth = (options.minWidth + options.maxWidth) / 2;\n this._ctx.fillStyle = options.penColor;\n this._ctx.globalCompositeOperation = options.compositeOperation;\n }\n\n private _createPoint(x: number, y: number, pressure: number): Point {\n const rect = this.canvas.getBoundingClientRect();\n\n return new Point(\n x - rect.left,\n y - rect.top,\n pressure,\n new Date().getTime(),\n );\n }\n\n // Add point to _lastPoints array and generate a new curve if there are enough points (i.e. 3)\n private _addPoint(point: Point, options: PointGroupOptions): Bezier | null {\n const { _lastPoints } = this;\n\n _lastPoints.push(point);\n\n if (_lastPoints.length > 2) {\n // To reduce the initial lag make it work with 3 points\n // by copying the first point to the beginning.\n if (_lastPoints.length === 3) {\n _lastPoints.unshift(_lastPoints[0]);\n }\n\n // _points array will always have 4 points here.\n const widths = this._calculateCurveWidths(\n _lastPoints[1],\n _lastPoints[2],\n options,\n );\n const curve = Bezier.fromPoints(_lastPoints, widths);\n\n // Remove the first element from the list, so that there are no more than 4 points at any time.\n _lastPoints.shift();\n\n return curve;\n }\n\n return null;\n }\n\n private _calculateCurveWidths(\n startPoint: Point,\n endPoint: Point,\n options: PointGroupOptions,\n ): { start: number; end: number } {\n const velocity =\n options.velocityFilterWeight * endPoint.velocityFrom(startPoint) +\n (1 - options.velocityFilterWeight) * this._lastVelocity;\n\n const newWidth = this._strokeWidth(velocity, options);\n\n const widths = {\n end: newWidth,\n start: this._lastWidth,\n };\n\n this._lastVelocity = velocity;\n this._lastWidth = newWidth;\n\n return widths;\n }\n\n private _strokeWidth(velocity: number, options: PointGroupOptions): number {\n return Math.max(options.maxWidth / (velocity + 1), options.minWidth);\n }\n\n private _drawCurveSegment(x: number, y: number, width: number): void {\n const ctx = this._ctx;\n\n ctx.moveTo(x, y);\n ctx.arc(x, y, width, 0, 2 * Math.PI, false);\n this._isEmpty = false;\n }\n\n private _drawCurve(curve: Bezier, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const widthDelta = curve.endWidth - curve.startWidth;\n // '2' is just an arbitrary number here. If only length is used, then\n // there are gaps between curve segments :/\n const drawSteps = Math.ceil(curve.length()) * 2;\n\n ctx.beginPath();\n ctx.fillStyle = options.penColor;\n\n for (let i = 0; i < drawSteps; i += 1) {\n // Calculate the Bezier (x, y) coordinate for this step.\n const t = i / drawSteps;\n const tt = t * t;\n const ttt = tt * t;\n const u = 1 - t;\n const uu = u * u;\n const uuu = uu * u;\n\n let x = uuu * curve.startPoint.x;\n x += 3 * uu * t * curve.control1.x;\n x += 3 * u * tt * curve.control2.x;\n x += ttt * curve.endPoint.x;\n\n let y = uuu * curve.startPoint.y;\n y += 3 * uu * t * curve.control1.y;\n y += 3 * u * tt * curve.control2.y;\n y += ttt * curve.endPoint.y;\n\n const width = Math.min(\n curve.startWidth + ttt * widthDelta,\n options.maxWidth,\n );\n this._drawCurveSegment(x, y, width);\n }\n\n ctx.closePath();\n ctx.fill();\n }\n\n private _drawDot(point: BasicPoint, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const width =\n options.dotSize > 0\n ? options.dotSize\n : (options.minWidth + options.maxWidth) / 2;\n\n ctx.beginPath();\n this._drawCurveSegment(point.x, point.y, width);\n ctx.closePath();\n ctx.fillStyle = options.penColor;\n ctx.fill();\n }\n\n private _fromData(\n pointGroups: PointGroup[],\n drawCurve: SignaturePad['_drawCurve'],\n drawDot: SignaturePad['_drawDot'],\n ): void {\n for (const group of pointGroups) {\n const { points } = group;\n const pointGroupOptions = this._getPointGroupOptions(group);\n\n if (points.length > 1) {\n for (let j = 0; j < points.length; j += 1) {\n const basicPoint = points[j];\n const point = new Point(\n basicPoint.x,\n basicPoint.y,\n basicPoint.pressure,\n basicPoint.time,\n );\n\n if (j === 0) {\n this._reset(pointGroupOptions);\n }\n\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (curve) {\n drawCurve(curve, pointGroupOptions);\n }\n }\n } else {\n this._reset(pointGroupOptions);\n\n drawDot(points[0], pointGroupOptions);\n }\n }\n }\n\n public toSVG({ includeBackgroundColor = false }: ToSVGOptions = {}): string {\n const pointGroups = this._data;\n const ratio = Math.max(window.devicePixelRatio || 1, 1);\n const minX = 0;\n const minY = 0;\n const maxX = this.canvas.width / ratio;\n const maxY = this.canvas.height / ratio;\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n svg.setAttribute('viewBox', `${minX} ${minY} ${maxX} ${maxY}`);\n svg.setAttribute('width', maxX.toString());\n svg.setAttribute('height', maxY.toString());\n\n if (includeBackgroundColor && this.backgroundColor) {\n const rect = document.createElement('rect');\n rect.setAttribute('width', '100%');\n rect.setAttribute('height', '100%');\n rect.setAttribute('fill', this.backgroundColor);\n\n svg.appendChild(rect);\n }\n\n this._fromData(\n pointGroups,\n\n (curve, { penColor }) => {\n const path = document.createElement('path');\n\n // Need to check curve for NaN values, these pop up when drawing\n // lines on the canvas that are not continuous. E.g. Sharp corners\n // or stopping mid-stroke and than continuing without lifting mouse.\n /* eslint-disable no-restricted-globals */\n if (\n !isNaN(curve.control1.x) &&\n !isNaN(curve.control1.y) &&\n !isNaN(curve.control2.x) &&\n !isNaN(curve.control2.y)\n ) {\n const attr =\n `M ${curve.startPoint.x.toFixed(3)},${curve.startPoint.y.toFixed(\n 3,\n )} ` +\n `C ${curve.control1.x.toFixed(3)},${curve.control1.y.toFixed(3)} ` +\n `${curve.control2.x.toFixed(3)},${curve.control2.y.toFixed(3)} ` +\n `${curve.endPoint.x.toFixed(3)},${curve.endPoint.y.toFixed(3)}`;\n path.setAttribute('d', attr);\n path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3));\n path.setAttribute('stroke', penColor);\n path.setAttribute('fill', 'none');\n path.setAttribute('stroke-linecap', 'round');\n\n svg.appendChild(path);\n }\n /* eslint-enable no-restricted-globals */\n },\n\n (point, { penColor, dotSize, minWidth, maxWidth }) => {\n const circle = document.createElement('circle');\n const size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2;\n circle.setAttribute('r', size.toString());\n circle.setAttribute('cx', point.x.toString());\n circle.setAttribute('cy', point.y.toString());\n circle.setAttribute('fill', penColor);\n\n svg.appendChild(circle);\n },\n );\n\n return svg.outerHTML;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias */\n// Slightly simplified version of http://stackoverflow.com/a/27078401/815507\n\nexport function throttle(\n fn: (...args: any[]) => any,\n wait = 250,\n): (this: any, ...args: any[]) => any {\n let previous = 0;\n let timeout: number | null = null;\n let result: any;\n let storedContext: any;\n let storedArgs: any[];\n\n const later = (): void => {\n previous = Date.now();\n timeout = null;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n };\n\n return function wrapper(this: any, ...args: any[]): any {\n const now = Date.now();\n const remaining = wait - (now - previous);\n\n storedContext = this;\n storedArgs = args;\n\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n\n previous = now;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n } else if (!timeout) {\n timeout = window.setTimeout(later, remaining);\n }\n\n return result;\n };\n}\n"],"names":["Point","constructor","x","y","pressure","time","isNaN","Error","this","Date","now","distanceTo","start","Math","sqrt","pow","equals","other","velocityFrom","Bezier","fromPoints","points","widths","c2","calculateControlPoints","c3","c1","end","s1","s2","s3","dx1","dy1","dx2","dy2","m1","m2","l1","l2","k","cm","tx","ty","startPoint","control2","control1","endPoint","startWidth","endWidth","length","px","py","i","t","cx","point","cy","xdiff","ydiff","SignatureEventTarget","_et","EventTarget","error","document","addEventListener","type","listener","options","dispatchEvent","event","removeEventListener","callback","SignaturePad","canvas","super","_drawingStroke","_isEmpty","_lastPoints","_data","_lastVelocity","_lastWidth","_handleMouseDown","_isLeftButtonPressed","_strokeBegin","_pointerEventToSignatureEvent","_handleMouseMove","_strokeMoveUpdate","_strokeEnd","_handleMouseUp","_handleTouchStart","targetTouches","cancelable","preventDefault","_touchEventToSignatureEvent","_handleTouchMove","_handleTouchEnd","_handlePointerDown","_handlePointerMove","_handlePointerUp","velocityFilterWeight","minWidth","maxWidth","throttle","_a","minDistance","_b","dotSize","penColor","backgroundColor","compositeOperation","canvasContextOptions","_c","fn","wait","result","storedContext","storedArgs","previous","timeout","later","apply","args","remaining","clearTimeout","window","setTimeout","prototype","_strokeUpdate","_ctx","getContext","clear","on","ctx","fillStyle","clearRect","width","height","fillRect","_reset","_getPointGroupOptions","fromDataURL","dataUrl","Promise","resolve","reject","image","Image","ratio","devicePixelRatio","xOffset","yOffset","onload","drawImage","onerror","crossOrigin","src","toDataURL","encoderOptions","undefined","btoa","toSVG","style","touchAction","msTouchAction","userSelect","isIOS","test","navigator","userAgent","PointerEvent","_handlePointerEvents","_handleMouseEvents","_handleTouchEvents","off","_removeMoveUpEventListeners","_getListenerFunctions","canvasWindow","ownerDocument","defaultView","bind","isEmpty","fromData","pointGroups","_fromData","_drawCurve","_drawDot","concat","toData","only","buttons","clientX","clientY","touch","changedTouches","force","group","CustomEvent","detail","pointGroupOptions","newPointGroup","push","_createPoint","lastPointGroup","lastPoints","lastPoint","isLastPointTooClose","curve","_addPoint","shouldUpdate","globalCompositeOperation","rect","getBoundingClientRect","left","top","getTime","unshift","_calculateCurveWidths","shift","velocity","newWidth","_strokeWidth","max","_drawCurveSegment","moveTo","arc","PI","widthDelta","drawSteps","ceil","beginPath","tt","ttt","u","uu","uuu","min","closePath","fill","drawCurve","drawDot","j","basicPoint","includeBackgroundColor","maxX","maxY","svg","createElementNS","setAttribute","toString","createElement","appendChild","path","attr","toFixed","circle","size","outerHTML"],"mappings":";;;;MAQaA,EAMX,WAAAC,CAAYC,EAAWC,EAAWC,EAAmBC,GACnD,GAAIC,MAAMJ,IAAMI,MAAMH,GACpB,MAAM,IAAII,MAAM,sBAAsBL,MAAMC,MAE9CK,KAAKN,GAAKA,EACVM,KAAKL,GAAKA,EACVK,KAAKJ,SAAWA,GAAY,EAC5BI,KAAKH,KAAOA,GAAQI,KAAKC,KAC1B,CAEM,UAAAC,CAAWC,GAChB,OAAOC,KAAKC,KACVD,KAAKE,IAAIP,KA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.js b/public/vendor/signature_pad@5/signature_pad.umd.js new file mode 100644 index 0000000000..10d34b64d8 --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.umd.js @@ -0,0 +1,641 @@ +/*! + * Signature Pad v5.0.2 | https://github.com/szimek/signature_pad + * (c) 2024 Szymon Nowak | Released under the MIT license + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SignaturePad = factory()); +})(this, (function () { 'use strict'; + + class Point { + constructor(x, y, pressure, time) { + if (isNaN(x) || isNaN(y)) { + throw new Error(`Point is invalid: (${x}, ${y})`); + } + this.x = +x; + this.y = +y; + this.pressure = pressure || 0; + this.time = time || Date.now(); + } + distanceTo(start) { + return Math.sqrt(Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2)); + } + equals(other) { + return (this.x === other.x && + this.y === other.y && + this.pressure === other.pressure && + this.time === other.time); + } + velocityFrom(start) { + return this.time !== start.time + ? this.distanceTo(start) / (this.time - start.time) + : 0; + } + } + + class Bezier { + static fromPoints(points, widths) { + const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2; + const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1; + return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end); + } + static calculateControlPoints(s1, s2, s3) { + const dx1 = s1.x - s2.x; + const dy1 = s1.y - s2.y; + const dx2 = s2.x - s3.x; + const dy2 = s2.y - s3.y; + const m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 }; + const m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 }; + const l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1); + const l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2); + const dxm = m1.x - m2.x; + const dym = m1.y - m2.y; + const k = l2 / (l1 + l2); + const cm = { x: m2.x + dxm * k, y: m2.y + dym * k }; + const tx = s2.x - cm.x; + const ty = s2.y - cm.y; + return { + c1: new Point(m1.x + tx, m1.y + ty), + c2: new Point(m2.x + tx, m2.y + ty), + }; + } + constructor(startPoint, control2, control1, endPoint, startWidth, endWidth) { + this.startPoint = startPoint; + this.control2 = control2; + this.control1 = control1; + this.endPoint = endPoint; + this.startWidth = startWidth; + this.endWidth = endWidth; + } + length() { + const steps = 10; + let length = 0; + let px; + let py; + for (let i = 0; i <= steps; i += 1) { + const t = i / steps; + const cx = this.point(t, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x); + const cy = this.point(t, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y); + if (i > 0) { + const xdiff = cx - px; + const ydiff = cy - py; + length += Math.sqrt(xdiff * xdiff + ydiff * ydiff); + } + px = cx; + py = cy; + } + return length; + } + point(t, start, c1, c2, end) { + return (start * (1.0 - t) * (1.0 - t) * (1.0 - t)) + + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t) + + (3.0 * c2 * (1.0 - t) * t * t) + + (end * t * t * t); + } + } + + class SignatureEventTarget { + constructor() { + try { + this._et = new EventTarget(); + } + catch (error) { + this._et = document; + } + } + addEventListener(type, listener, options) { + this._et.addEventListener(type, listener, options); + } + dispatchEvent(event) { + return this._et.dispatchEvent(event); + } + removeEventListener(type, callback, options) { + this._et.removeEventListener(type, callback, options); + } + } + + function throttle(fn, wait = 250) { + let previous = 0; + let timeout = null; + let result; + let storedContext; + let storedArgs; + const later = () => { + previous = Date.now(); + timeout = null; + result = fn.apply(storedContext, storedArgs); + if (!timeout) { + storedContext = null; + storedArgs = []; + } + }; + return function wrapper(...args) { + const now = Date.now(); + const remaining = wait - (now - previous); + storedContext = this; + storedArgs = args; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = now; + result = fn.apply(storedContext, storedArgs); + if (!timeout) { + storedContext = null; + storedArgs = []; + } + } + else if (!timeout) { + timeout = window.setTimeout(later, remaining); + } + return result; + }; + } + + class SignaturePad extends SignatureEventTarget { + constructor(canvas, options = {}) { + var _a, _b, _c; + super(); + this.canvas = canvas; + this._drawingStroke = false; + this._isEmpty = true; + this._lastPoints = []; + this._data = []; + this._lastVelocity = 0; + this._lastWidth = 0; + this._handleMouseDown = (event) => { + if (!this._isLeftButtonPressed(event, true) || this._drawingStroke) { + return; + } + this._strokeBegin(this._pointerEventToSignatureEvent(event)); + }; + this._handleMouseMove = (event) => { + if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) { + this._strokeEnd(this._pointerEventToSignatureEvent(event), false); + return; + } + this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event)); + }; + this._handleMouseUp = (event) => { + if (this._isLeftButtonPressed(event)) { + return; + } + this._strokeEnd(this._pointerEventToSignatureEvent(event)); + }; + this._handleTouchStart = (event) => { + if (event.targetTouches.length !== 1 || this._drawingStroke) { + return; + } + if (event.cancelable) { + event.preventDefault(); + } + this._strokeBegin(this._touchEventToSignatureEvent(event)); + }; + this._handleTouchMove = (event) => { + if (event.targetTouches.length !== 1) { + return; + } + if (event.cancelable) { + event.preventDefault(); + } + if (!this._drawingStroke) { + this._strokeEnd(this._touchEventToSignatureEvent(event), false); + return; + } + this._strokeMoveUpdate(this._touchEventToSignatureEvent(event)); + }; + this._handleTouchEnd = (event) => { + if (event.targetTouches.length !== 0) { + return; + } + if (event.cancelable) { + event.preventDefault(); + } + this.canvas.removeEventListener('touchmove', this._handleTouchMove); + this._strokeEnd(this._touchEventToSignatureEvent(event)); + }; + this._handlePointerDown = (event) => { + if (!this._isLeftButtonPressed(event) || this._drawingStroke) { + return; + } + event.preventDefault(); + this._strokeBegin(this._pointerEventToSignatureEvent(event)); + }; + this._handlePointerMove = (event) => { + if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) { + this._strokeEnd(this._pointerEventToSignatureEvent(event), false); + return; + } + event.preventDefault(); + this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event)); + }; + this._handlePointerUp = (event) => { + if (this._isLeftButtonPressed(event)) { + return; + } + event.preventDefault(); + this._strokeEnd(this._pointerEventToSignatureEvent(event)); + }; + this.velocityFilterWeight = options.velocityFilterWeight || 0.7; + this.minWidth = options.minWidth || 0.5; + this.maxWidth = options.maxWidth || 2.5; + this.throttle = (_a = options.throttle) !== null && _a !== void 0 ? _a : 16; + this.minDistance = (_b = options.minDistance) !== null && _b !== void 0 ? _b : 5; + this.dotSize = options.dotSize || 0; + this.penColor = options.penColor || 'black'; + this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)'; + this.compositeOperation = options.compositeOperation || 'source-over'; + this.canvasContextOptions = (_c = options.canvasContextOptions) !== null && _c !== void 0 ? _c : {}; + this._strokeMoveUpdate = this.throttle + ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle) + : SignaturePad.prototype._strokeUpdate; + this._ctx = canvas.getContext('2d', this.canvasContextOptions); + this.clear(); + this.on(); + } + clear() { + const { _ctx: ctx, canvas } = this; + ctx.fillStyle = this.backgroundColor; + ctx.clearRect(0, 0, canvas.width, canvas.height); + ctx.fillRect(0, 0, canvas.width, canvas.height); + this._data = []; + this._reset(this._getPointGroupOptions()); + this._isEmpty = true; + } + fromDataURL(dataUrl, options = {}) { + return new Promise((resolve, reject) => { + const image = new Image(); + const ratio = options.ratio || window.devicePixelRatio || 1; + const width = options.width || this.canvas.width / ratio; + const height = options.height || this.canvas.height / ratio; + const xOffset = options.xOffset || 0; + const yOffset = options.yOffset || 0; + this._reset(this._getPointGroupOptions()); + image.onload = () => { + this._ctx.drawImage(image, xOffset, yOffset, width, height); + resolve(); + }; + image.onerror = (error) => { + reject(error); + }; + image.crossOrigin = 'anonymous'; + image.src = dataUrl; + this._isEmpty = false; + }); + } + toDataURL(type = 'image/png', encoderOptions) { + switch (type) { + case 'image/svg+xml': + if (typeof encoderOptions !== 'object') { + encoderOptions = undefined; + } + return `data:image/svg+xml;base64,${btoa(this.toSVG(encoderOptions))}`; + default: + if (typeof encoderOptions !== 'number') { + encoderOptions = undefined; + } + return this.canvas.toDataURL(type, encoderOptions); + } + } + on() { + this.canvas.style.touchAction = 'none'; + this.canvas.style.msTouchAction = 'none'; + this.canvas.style.userSelect = 'none'; + const isIOS = /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document; + if (window.PointerEvent && !isIOS) { + this._handlePointerEvents(); + } + else { + this._handleMouseEvents(); + if ('ontouchstart' in window) { + this._handleTouchEvents(); + } + } + } + off() { + this.canvas.style.touchAction = 'auto'; + this.canvas.style.msTouchAction = 'auto'; + this.canvas.style.userSelect = 'auto'; + this.canvas.removeEventListener('pointerdown', this._handlePointerDown); + this.canvas.removeEventListener('mousedown', this._handleMouseDown); + this.canvas.removeEventListener('touchstart', this._handleTouchStart); + this._removeMoveUpEventListeners(); + } + _getListenerFunctions() { + var _a; + const canvasWindow = window.document === this.canvas.ownerDocument + ? window + : (_a = this.canvas.ownerDocument.defaultView) !== null && _a !== void 0 ? _a : this.canvas.ownerDocument; + return { + addEventListener: canvasWindow.addEventListener.bind(canvasWindow), + removeEventListener: canvasWindow.removeEventListener.bind(canvasWindow), + }; + } + _removeMoveUpEventListeners() { + const { removeEventListener } = this._getListenerFunctions(); + removeEventListener('pointermove', this._handlePointerMove); + removeEventListener('pointerup', this._handlePointerUp); + removeEventListener('mousemove', this._handleMouseMove); + removeEventListener('mouseup', this._handleMouseUp); + removeEventListener('touchmove', this._handleTouchMove); + removeEventListener('touchend', this._handleTouchEnd); + } + isEmpty() { + return this._isEmpty; + } + fromData(pointGroups, { clear = true } = {}) { + if (clear) { + this.clear(); + } + this._fromData(pointGroups, this._drawCurve.bind(this), this._drawDot.bind(this)); + this._data = this._data.concat(pointGroups); + } + toData() { + return this._data; + } + _isLeftButtonPressed(event, only) { + if (only) { + return event.buttons === 1; + } + return (event.buttons & 1) === 1; + } + _pointerEventToSignatureEvent(event) { + return { + event: event, + type: event.type, + x: event.clientX, + y: event.clientY, + pressure: 'pressure' in event ? event.pressure : 0, + }; + } + _touchEventToSignatureEvent(event) { + const touch = event.changedTouches[0]; + return { + event: event, + type: event.type, + x: touch.clientX, + y: touch.clientY, + pressure: touch.force, + }; + } + _getPointGroupOptions(group) { + return { + penColor: group && 'penColor' in group ? group.penColor : this.penColor, + dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize, + minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth, + maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth, + velocityFilterWeight: group && 'velocityFilterWeight' in group + ? group.velocityFilterWeight + : this.velocityFilterWeight, + compositeOperation: group && 'compositeOperation' in group + ? group.compositeOperation + : this.compositeOperation, + }; + } + _strokeBegin(event) { + const cancelled = !this.dispatchEvent(new CustomEvent('beginStroke', { detail: event, cancelable: true })); + if (cancelled) { + return; + } + const { addEventListener } = this._getListenerFunctions(); + switch (event.event.type) { + case 'mousedown': + addEventListener('mousemove', this._handleMouseMove); + addEventListener('mouseup', this._handleMouseUp); + break; + case 'touchstart': + addEventListener('touchmove', this._handleTouchMove); + addEventListener('touchend', this._handleTouchEnd); + break; + case 'pointerdown': + addEventListener('pointermove', this._handlePointerMove); + addEventListener('pointerup', this._handlePointerUp); + break; + } + this._drawingStroke = true; + const pointGroupOptions = this._getPointGroupOptions(); + const newPointGroup = Object.assign(Object.assign({}, pointGroupOptions), { points: [] }); + this._data.push(newPointGroup); + this._reset(pointGroupOptions); + this._strokeUpdate(event); + } + _strokeUpdate(event) { + if (!this._drawingStroke) { + return; + } + if (this._data.length === 0) { + this._strokeBegin(event); + return; + } + this.dispatchEvent(new CustomEvent('beforeUpdateStroke', { detail: event })); + const point = this._createPoint(event.x, event.y, event.pressure); + const lastPointGroup = this._data[this._data.length - 1]; + const lastPoints = lastPointGroup.points; + const lastPoint = lastPoints.length > 0 && lastPoints[lastPoints.length - 1]; + const isLastPointTooClose = lastPoint + ? point.distanceTo(lastPoint) <= this.minDistance + : false; + const pointGroupOptions = this._getPointGroupOptions(lastPointGroup); + if (!lastPoint || !(lastPoint && isLastPointTooClose)) { + const curve = this._addPoint(point, pointGroupOptions); + if (!lastPoint) { + this._drawDot(point, pointGroupOptions); + } + else if (curve) { + this._drawCurve(curve, pointGroupOptions); + } + lastPoints.push({ + time: point.time, + x: point.x, + y: point.y, + pressure: point.pressure, + }); + } + this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event })); + } + _strokeEnd(event, shouldUpdate = true) { + this._removeMoveUpEventListeners(); + if (!this._drawingStroke) { + return; + } + if (shouldUpdate) { + this._strokeUpdate(event); + } + this._drawingStroke = false; + this.dispatchEvent(new CustomEvent('endStroke', { detail: event })); + } + _handlePointerEvents() { + this._drawingStroke = false; + this.canvas.addEventListener('pointerdown', this._handlePointerDown); + } + _handleMouseEvents() { + this._drawingStroke = false; + this.canvas.addEventListener('mousedown', this._handleMouseDown); + } + _handleTouchEvents() { + this.canvas.addEventListener('touchstart', this._handleTouchStart); + } + _reset(options) { + this._lastPoints = []; + this._lastVelocity = 0; + this._lastWidth = (options.minWidth + options.maxWidth) / 2; + this._ctx.fillStyle = options.penColor; + this._ctx.globalCompositeOperation = options.compositeOperation; + } + _createPoint(x, y, pressure) { + const rect = this.canvas.getBoundingClientRect(); + return new Point(x - rect.left, y - rect.top, pressure, new Date().getTime()); + } + _addPoint(point, options) { + const { _lastPoints } = this; + _lastPoints.push(point); + if (_lastPoints.length > 2) { + if (_lastPoints.length === 3) { + _lastPoints.unshift(_lastPoints[0]); + } + const widths = this._calculateCurveWidths(_lastPoints[1], _lastPoints[2], options); + const curve = Bezier.fromPoints(_lastPoints, widths); + _lastPoints.shift(); + return curve; + } + return null; + } + _calculateCurveWidths(startPoint, endPoint, options) { + const velocity = options.velocityFilterWeight * endPoint.velocityFrom(startPoint) + + (1 - options.velocityFilterWeight) * this._lastVelocity; + const newWidth = this._strokeWidth(velocity, options); + const widths = { + end: newWidth, + start: this._lastWidth, + }; + this._lastVelocity = velocity; + this._lastWidth = newWidth; + return widths; + } + _strokeWidth(velocity, options) { + return Math.max(options.maxWidth / (velocity + 1), options.minWidth); + } + _drawCurveSegment(x, y, width) { + const ctx = this._ctx; + ctx.moveTo(x, y); + ctx.arc(x, y, width, 0, 2 * Math.PI, false); + this._isEmpty = false; + } + _drawCurve(curve, options) { + const ctx = this._ctx; + const widthDelta = curve.endWidth - curve.startWidth; + const drawSteps = Math.ceil(curve.length()) * 2; + ctx.beginPath(); + ctx.fillStyle = options.penColor; + for (let i = 0; i < drawSteps; i += 1) { + const t = i / drawSteps; + const tt = t * t; + const ttt = tt * t; + const u = 1 - t; + const uu = u * u; + const uuu = uu * u; + let x = uuu * curve.startPoint.x; + x += 3 * uu * t * curve.control1.x; + x += 3 * u * tt * curve.control2.x; + x += ttt * curve.endPoint.x; + let y = uuu * curve.startPoint.y; + y += 3 * uu * t * curve.control1.y; + y += 3 * u * tt * curve.control2.y; + y += ttt * curve.endPoint.y; + const width = Math.min(curve.startWidth + ttt * widthDelta, options.maxWidth); + this._drawCurveSegment(x, y, width); + } + ctx.closePath(); + ctx.fill(); + } + _drawDot(point, options) { + const ctx = this._ctx; + const width = options.dotSize > 0 + ? options.dotSize + : (options.minWidth + options.maxWidth) / 2; + ctx.beginPath(); + this._drawCurveSegment(point.x, point.y, width); + ctx.closePath(); + ctx.fillStyle = options.penColor; + ctx.fill(); + } + _fromData(pointGroups, drawCurve, drawDot) { + for (const group of pointGroups) { + const { points } = group; + const pointGroupOptions = this._getPointGroupOptions(group); + if (points.length > 1) { + for (let j = 0; j < points.length; j += 1) { + const basicPoint = points[j]; + const point = new Point(basicPoint.x, basicPoint.y, basicPoint.pressure, basicPoint.time); + if (j === 0) { + this._reset(pointGroupOptions); + } + const curve = this._addPoint(point, pointGroupOptions); + if (curve) { + drawCurve(curve, pointGroupOptions); + } + } + } + else { + this._reset(pointGroupOptions); + drawDot(points[0], pointGroupOptions); + } + } + } + toSVG({ includeBackgroundColor = false } = {}) { + const pointGroups = this._data; + const ratio = Math.max(window.devicePixelRatio || 1, 1); + const minX = 0; + const minY = 0; + const maxX = this.canvas.width / ratio; + const maxY = this.canvas.height / ratio; + const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); + svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + svg.setAttribute('viewBox', `${minX} ${minY} ${maxX} ${maxY}`); + svg.setAttribute('width', maxX.toString()); + svg.setAttribute('height', maxY.toString()); + if (includeBackgroundColor && this.backgroundColor) { + const rect = document.createElement('rect'); + rect.setAttribute('width', '100%'); + rect.setAttribute('height', '100%'); + rect.setAttribute('fill', this.backgroundColor); + svg.appendChild(rect); + } + this._fromData(pointGroups, (curve, { penColor }) => { + const path = document.createElement('path'); + if (!isNaN(curve.control1.x) && + !isNaN(curve.control1.y) && + !isNaN(curve.control2.x) && + !isNaN(curve.control2.y)) { + const attr = `M ${curve.startPoint.x.toFixed(3)},${curve.startPoint.y.toFixed(3)} ` + + `C ${curve.control1.x.toFixed(3)},${curve.control1.y.toFixed(3)} ` + + `${curve.control2.x.toFixed(3)},${curve.control2.y.toFixed(3)} ` + + `${curve.endPoint.x.toFixed(3)},${curve.endPoint.y.toFixed(3)}`; + path.setAttribute('d', attr); + path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3)); + path.setAttribute('stroke', penColor); + path.setAttribute('fill', 'none'); + path.setAttribute('stroke-linecap', 'round'); + svg.appendChild(path); + } + }, (point, { penColor, dotSize, minWidth, maxWidth }) => { + const circle = document.createElement('circle'); + const size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2; + circle.setAttribute('r', size.toString()); + circle.setAttribute('cx', point.x.toString()); + circle.setAttribute('cy', point.y.toString()); + circle.setAttribute('fill', penColor); + svg.appendChild(circle); + }); + return svg.outerHTML; + } + } + + return SignaturePad; + +})); +//# sourceMappingURL=signature_pad.umd.js.map diff --git a/public/vendor/signature_pad@5/signature_pad.umd.js.map b/public/vendor/signature_pad@5/signature_pad.umd.js.map new file mode 100644 index 0000000000..e6038ff6bc --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signature_pad.umd.js","sources":["../src/point.ts","../src/bezier.ts","../src/signature_event_target.ts","../src/throttle.ts","../src/signature_pad.ts"],"sourcesContent":["// Interface for point data structure used e.g. in SignaturePad#fromData method\nexport interface BasicPoint {\n x: number;\n y: number;\n pressure: number;\n time: number;\n}\n\nexport class Point implements BasicPoint {\n public x: number;\n public y: number;\n public pressure: number;\n public time: number;\n\n constructor(x: number, y: number, pressure?: number, time?: number) {\n if (isNaN(x) || isNaN(y)) {\n throw new Error(`Point is invalid: (${x}, ${y})`);\n }\n this.x = +x;\n this.y = +y;\n this.pressure = pressure || 0;\n this.time = time || Date.now();\n }\n\n public distanceTo(start: BasicPoint): number {\n return Math.sqrt(\n Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2),\n );\n }\n\n public equals(other: BasicPoint): boolean {\n return (\n this.x === other.x &&\n this.y === other.y &&\n this.pressure === other.pressure &&\n this.time === other.time\n );\n }\n\n public velocityFrom(start: BasicPoint): number {\n return this.time !== start.time\n ? this.distanceTo(start) / (this.time - start.time)\n : 0;\n }\n}\n","import { BasicPoint, Point } from './point';\n\nexport class Bezier {\n public static fromPoints(\n points: Point[],\n widths: { start: number; end: number },\n ): Bezier {\n const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2;\n const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1;\n\n return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end);\n }\n\n private static calculateControlPoints(\n s1: BasicPoint,\n s2: BasicPoint,\n s3: BasicPoint,\n ): {\n c1: BasicPoint;\n c2: BasicPoint;\n } {\n const dx1 = s1.x - s2.x;\n const dy1 = s1.y - s2.y;\n const dx2 = s2.x - s3.x;\n const dy2 = s2.y - s3.y;\n\n const m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 };\n const m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 };\n\n const l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n const l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);\n\n const dxm = m1.x - m2.x;\n const dym = m1.y - m2.y;\n\n const k = l2 / (l1 + l2);\n const cm = { x: m2.x + dxm * k, y: m2.y + dym * k };\n\n const tx = s2.x - cm.x;\n const ty = s2.y - cm.y;\n\n return {\n c1: new Point(m1.x + tx, m1.y + ty),\n c2: new Point(m2.x + tx, m2.y + ty),\n };\n }\n\n constructor(\n public startPoint: Point,\n public control2: BasicPoint,\n public control1: BasicPoint,\n public endPoint: Point,\n public startWidth: number,\n public endWidth: number,\n ) {}\n\n // Returns approximated length. Code taken from https://www.lemoda.net/maths/bezier-length/index.html.\n public length(): number {\n const steps = 10;\n let length = 0;\n let px;\n let py;\n\n for (let i = 0; i <= steps; i += 1) {\n const t = i / steps;\n const cx = this.point(\n t,\n this.startPoint.x,\n this.control1.x,\n this.control2.x,\n this.endPoint.x,\n );\n const cy = this.point(\n t,\n this.startPoint.y,\n this.control1.y,\n this.control2.y,\n this.endPoint.y,\n );\n\n if (i > 0) {\n const xdiff = cx - (px as number);\n const ydiff = cy - (py as number);\n\n length += Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n }\n\n px = cx;\n py = cy;\n }\n\n return length;\n }\n\n // Calculate parametric value of x or y given t and the four point coordinates of a cubic bezier curve.\n private point(\n t: number,\n start: number,\n c1: number,\n c2: number,\n end: number,\n ): number {\n // prettier-ignore\n return ( start * (1.0 - t) * (1.0 - t) * (1.0 - t))\n + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t)\n + (3.0 * c2 * (1.0 - t) * t * t)\n + ( end * t * t * t);\n }\n}\n","export class SignatureEventTarget {\n /* tslint:disable: variable-name */\n private _et: EventTarget;\n /* tslint:enable: variable-name */\n\n constructor() {\n try {\n this._et = new EventTarget();\n } catch (error) {\n // Using document as EventTarget to support iOS 13 and older.\n // Because EventTarget constructor just exists at iOS 14 and later.\n this._et = document;\n }\n }\n\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions,\n ): void {\n this._et.addEventListener(type, listener, options);\n }\n\n dispatchEvent(event: Event): boolean {\n return this._et.dispatchEvent(event);\n }\n\n removeEventListener(\n type: string,\n callback: EventListenerOrEventListenerObject | null,\n options?: boolean | EventListenerOptions,\n ): void {\n this._et.removeEventListener(type, callback, options);\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias */\n// Slightly simplified version of http://stackoverflow.com/a/27078401/815507\n\nexport function throttle(\n fn: (...args: any[]) => any,\n wait = 250,\n): (this: any, ...args: any[]) => any {\n let previous = 0;\n let timeout: number | null = null;\n let result: any;\n let storedContext: any;\n let storedArgs: any[];\n\n const later = (): void => {\n previous = Date.now();\n timeout = null;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n };\n\n return function wrapper(this: any, ...args: any[]): any {\n const now = Date.now();\n const remaining = wait - (now - previous);\n\n storedContext = this;\n storedArgs = args;\n\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n\n previous = now;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n } else if (!timeout) {\n timeout = window.setTimeout(later, remaining);\n }\n\n return result;\n };\n}\n","/**\n * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:\n * http://corner.squareup.com/2012/07/smoother-signatures.html\n *\n * Implementation of interpolation using cubic Bézier curves is taken from:\n * https://web.archive.org/web/20160323213433/http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html\n *\n * Algorithm for approximated length of a Bézier curve is taken from:\n * http://www.lemoda.net/maths/bezier-length/index.html\n */\n\nimport { Bezier } from './bezier';\nimport { BasicPoint, Point } from './point';\nimport { SignatureEventTarget } from './signature_event_target';\nimport { throttle } from './throttle';\n\nexport interface SignatureEvent {\n event: MouseEvent | TouchEvent | PointerEvent;\n type: string;\n x: number;\n y: number;\n pressure: number;\n}\n\nexport interface FromDataOptions {\n clear?: boolean;\n}\n\nexport interface ToSVGOptions {\n includeBackgroundColor?: boolean;\n}\n\nexport interface PointGroupOptions {\n dotSize: number;\n minWidth: number;\n maxWidth: number;\n penColor: string;\n velocityFilterWeight: number;\n /**\n * This is the globalCompositeOperation for the line.\n * *default: 'source-over'*\n * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation\n */\n compositeOperation: GlobalCompositeOperation;\n}\n\nexport interface Options extends Partial {\n minDistance?: number;\n backgroundColor?: string;\n throttle?: number;\n canvasContextOptions?: CanvasRenderingContext2DSettings;\n}\n\nexport interface PointGroup extends PointGroupOptions {\n points: BasicPoint[];\n}\n\nexport default class SignaturePad extends SignatureEventTarget {\n // Public stuff\n public dotSize: number;\n public minWidth: number;\n public maxWidth: number;\n public penColor: string;\n public minDistance: number;\n public velocityFilterWeight: number;\n public compositeOperation: GlobalCompositeOperation;\n public backgroundColor: string;\n public throttle: number;\n public canvasContextOptions: CanvasRenderingContext2DSettings;\n\n // Private stuff\n /* tslint:disable: variable-name */\n private _ctx: CanvasRenderingContext2D;\n private _drawingStroke = false;\n private _isEmpty = true;\n private _lastPoints: Point[] = []; // Stores up to 4 most recent points; used to generate a new curve\n private _data: PointGroup[] = []; // Stores all points in groups (one group per line or dot)\n private _lastVelocity = 0;\n private _lastWidth = 0;\n private _strokeMoveUpdate: (event: SignatureEvent) => void;\n /* tslint:enable: variable-name */\n\n constructor(\n private canvas: HTMLCanvasElement,\n options: Options = {},\n ) {\n super();\n this.velocityFilterWeight = options.velocityFilterWeight || 0.7;\n this.minWidth = options.minWidth || 0.5;\n this.maxWidth = options.maxWidth || 2.5;\n\n // We need to handle 0 value, so use `??` instead of `||`\n this.throttle = options.throttle ?? 16; // in milliseconds\n this.minDistance = options.minDistance ?? 5; // in pixels\n this.dotSize = options.dotSize || 0;\n this.penColor = options.penColor || 'black';\n this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)';\n this.compositeOperation = options.compositeOperation || 'source-over';\n this.canvasContextOptions = options.canvasContextOptions ?? {};\n\n this._strokeMoveUpdate = this.throttle\n ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle)\n : SignaturePad.prototype._strokeUpdate;\n this._ctx = canvas.getContext(\n '2d',\n this.canvasContextOptions,\n ) as CanvasRenderingContext2D;\n\n this.clear();\n\n // Enable mouse and touch event handlers\n this.on();\n }\n\n public clear(): void {\n const { _ctx: ctx, canvas } = this;\n\n // Clear canvas using background color\n ctx.fillStyle = this.backgroundColor;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n this._data = [];\n this._reset(this._getPointGroupOptions());\n this._isEmpty = true;\n }\n\n public fromDataURL(\n dataUrl: string,\n options: {\n ratio?: number;\n width?: number;\n height?: number;\n xOffset?: number;\n yOffset?: number;\n } = {},\n ): Promise {\n return new Promise((resolve, reject) => {\n const image = new Image();\n const ratio = options.ratio || window.devicePixelRatio || 1;\n const width = options.width || this.canvas.width / ratio;\n const height = options.height || this.canvas.height / ratio;\n const xOffset = options.xOffset || 0;\n const yOffset = options.yOffset || 0;\n\n this._reset(this._getPointGroupOptions());\n\n image.onload = (): void => {\n this._ctx.drawImage(image, xOffset, yOffset, width, height);\n resolve();\n };\n image.onerror = (error): void => {\n reject(error);\n };\n image.crossOrigin = 'anonymous';\n image.src = dataUrl;\n\n this._isEmpty = false;\n });\n }\n\n public toDataURL(\n type: 'image/svg+xml',\n encoderOptions?: ToSVGOptions,\n ): string;\n public toDataURL(type?: string, encoderOptions?: number): string;\n public toDataURL(\n type = 'image/png',\n encoderOptions?: number | ToSVGOptions | undefined,\n ): string {\n switch (type) {\n case 'image/svg+xml':\n if (typeof encoderOptions !== 'object') {\n encoderOptions = undefined;\n }\n return `data:image/svg+xml;base64,${btoa(\n this.toSVG(encoderOptions as ToSVGOptions),\n )}`;\n default:\n if (typeof encoderOptions !== 'number') {\n encoderOptions = undefined;\n }\n return this.canvas.toDataURL(type, encoderOptions);\n }\n }\n\n public on(): void {\n // Disable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'none';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'none';\n this.canvas.style.userSelect = 'none';\n\n const isIOS =\n /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document;\n\n // The \"Scribble\" feature of iOS intercepts point events. So that we can\n // lose some of them when tapping rapidly. Use touch events for iOS\n // platforms to prevent it. See\n // https://developer.apple.com/forums/thread/664108 for more information.\n if (window.PointerEvent && !isIOS) {\n this._handlePointerEvents();\n } else {\n this._handleMouseEvents();\n\n if ('ontouchstart' in window) {\n this._handleTouchEvents();\n }\n }\n }\n\n public off(): void {\n // Enable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'auto';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'auto';\n this.canvas.style.userSelect = 'auto';\n\n this.canvas.removeEventListener('pointerdown', this._handlePointerDown);\n this.canvas.removeEventListener('mousedown', this._handleMouseDown);\n this.canvas.removeEventListener('touchstart', this._handleTouchStart);\n\n this._removeMoveUpEventListeners();\n }\n\n private _getListenerFunctions() {\n const canvasWindow =\n window.document === this.canvas.ownerDocument\n ? window\n : this.canvas.ownerDocument.defaultView ?? this.canvas.ownerDocument;\n\n return {\n addEventListener: canvasWindow.addEventListener.bind(\n canvasWindow,\n ) as typeof window.addEventListener,\n removeEventListener: canvasWindow.removeEventListener.bind(\n canvasWindow,\n ) as typeof window.removeEventListener,\n };\n }\n\n private _removeMoveUpEventListeners(): void {\n const { removeEventListener } = this._getListenerFunctions();\n removeEventListener('pointermove', this._handlePointerMove);\n removeEventListener('pointerup', this._handlePointerUp);\n\n removeEventListener('mousemove', this._handleMouseMove);\n removeEventListener('mouseup', this._handleMouseUp);\n\n removeEventListener('touchmove', this._handleTouchMove);\n removeEventListener('touchend', this._handleTouchEnd);\n }\n\n public isEmpty(): boolean {\n return this._isEmpty;\n }\n\n public fromData(\n pointGroups: PointGroup[],\n { clear = true }: FromDataOptions = {},\n ): void {\n if (clear) {\n this.clear();\n }\n\n this._fromData(\n pointGroups,\n this._drawCurve.bind(this),\n this._drawDot.bind(this),\n );\n\n this._data = this._data.concat(pointGroups);\n }\n\n public toData(): PointGroup[] {\n return this._data;\n }\n\n public _isLeftButtonPressed(event: MouseEvent, only?: boolean): boolean {\n if (only) {\n return event.buttons === 1;\n }\n\n return (event.buttons & 1) === 1;\n }\n private _pointerEventToSignatureEvent(\n event: MouseEvent | PointerEvent,\n ): SignatureEvent {\n return {\n event: event,\n type: event.type,\n x: event.clientX,\n y: event.clientY,\n pressure: 'pressure' in event ? event.pressure : 0,\n };\n }\n\n private _touchEventToSignatureEvent(event: TouchEvent): SignatureEvent {\n const touch = event.changedTouches[0];\n return {\n event: event,\n type: event.type,\n x: touch.clientX,\n y: touch.clientY,\n pressure: touch.force,\n };\n }\n\n // Event handlers\n private _handleMouseDown = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || this._drawingStroke) {\n return;\n }\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseMove = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when not pressing primary button or pressing multiple buttons\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseUp = (event: MouseEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleTouchStart = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1 || this._drawingStroke) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this._strokeBegin(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchMove = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n if (!this._drawingStroke) {\n this._strokeEnd(this._touchEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchEnd = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 0) {\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this.canvas.removeEventListener('touchmove', this._handleTouchMove);\n\n this._strokeEnd(this._touchEventToSignatureEvent(event));\n };\n\n private _handlePointerDown = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event) || this._drawingStroke) {\n return;\n }\n\n event.preventDefault();\n\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerMove = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when primary button not pressed or multiple buttons pressed\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n event.preventDefault();\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerUp = (event: PointerEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n event.preventDefault();\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _getPointGroupOptions(group?: PointGroup): PointGroupOptions {\n return {\n penColor: group && 'penColor' in group ? group.penColor : this.penColor,\n dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize,\n minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth,\n maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth,\n velocityFilterWeight:\n group && 'velocityFilterWeight' in group\n ? group.velocityFilterWeight\n : this.velocityFilterWeight,\n compositeOperation:\n group && 'compositeOperation' in group\n ? group.compositeOperation\n : this.compositeOperation,\n };\n }\n\n // Private methods\n private _strokeBegin(event: SignatureEvent): void {\n const cancelled = !this.dispatchEvent(\n new CustomEvent('beginStroke', { detail: event, cancelable: true }),\n );\n if (cancelled) {\n return;\n }\n\n const { addEventListener } = this._getListenerFunctions();\n switch (event.event.type) {\n case 'mousedown':\n addEventListener('mousemove', this._handleMouseMove);\n addEventListener('mouseup', this._handleMouseUp);\n break;\n case 'touchstart':\n addEventListener('touchmove', this._handleTouchMove);\n addEventListener('touchend', this._handleTouchEnd);\n break;\n case 'pointerdown':\n addEventListener('pointermove', this._handlePointerMove);\n addEventListener('pointerup', this._handlePointerUp);\n break;\n default:\n // do nothing\n }\n\n this._drawingStroke = true;\n\n const pointGroupOptions = this._getPointGroupOptions();\n\n const newPointGroup: PointGroup = {\n ...pointGroupOptions,\n points: [],\n };\n\n this._data.push(newPointGroup);\n this._reset(pointGroupOptions);\n this._strokeUpdate(event);\n }\n\n private _strokeUpdate(event: SignatureEvent): void {\n if (!this._drawingStroke) {\n return;\n }\n\n if (this._data.length === 0) {\n // This can happen if clear() was called while a signature is still in progress,\n // or if there is a race condition between start/update events.\n this._strokeBegin(event);\n return;\n }\n\n this.dispatchEvent(\n new CustomEvent('beforeUpdateStroke', { detail: event }),\n );\n\n const point = this._createPoint(event.x, event.y, event.pressure);\n const lastPointGroup = this._data[this._data.length - 1];\n const lastPoints = lastPointGroup.points;\n const lastPoint =\n lastPoints.length > 0 && lastPoints[lastPoints.length - 1];\n const isLastPointTooClose = lastPoint\n ? point.distanceTo(lastPoint) <= this.minDistance\n : false;\n const pointGroupOptions = this._getPointGroupOptions(lastPointGroup);\n\n // Skip this point if it's too close to the previous one\n if (!lastPoint || !(lastPoint && isLastPointTooClose)) {\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (!lastPoint) {\n this._drawDot(point, pointGroupOptions);\n } else if (curve) {\n this._drawCurve(curve, pointGroupOptions);\n }\n\n lastPoints.push({\n time: point.time,\n x: point.x,\n y: point.y,\n pressure: point.pressure,\n });\n }\n\n this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event }));\n }\n\n private _strokeEnd(event: SignatureEvent, shouldUpdate = true): void {\n this._removeMoveUpEventListeners();\n\n if (!this._drawingStroke) {\n return;\n }\n\n if (shouldUpdate) {\n this._strokeUpdate(event);\n }\n\n this._drawingStroke = false;\n this.dispatchEvent(new CustomEvent('endStroke', { detail: event }));\n }\n\n private _handlePointerEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('pointerdown', this._handlePointerDown);\n }\n\n private _handleMouseEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('mousedown', this._handleMouseDown);\n }\n\n private _handleTouchEvents(): void {\n this.canvas.addEventListener('touchstart', this._handleTouchStart);\n }\n\n // Called when a new line is started\n private _reset(options: PointGroupOptions): void {\n this._lastPoints = [];\n this._lastVelocity = 0;\n this._lastWidth = (options.minWidth + options.maxWidth) / 2;\n this._ctx.fillStyle = options.penColor;\n this._ctx.globalCompositeOperation = options.compositeOperation;\n }\n\n private _createPoint(x: number, y: number, pressure: number): Point {\n const rect = this.canvas.getBoundingClientRect();\n\n return new Point(\n x - rect.left,\n y - rect.top,\n pressure,\n new Date().getTime(),\n );\n }\n\n // Add point to _lastPoints array and generate a new curve if there are enough points (i.e. 3)\n private _addPoint(point: Point, options: PointGroupOptions): Bezier | null {\n const { _lastPoints } = this;\n\n _lastPoints.push(point);\n\n if (_lastPoints.length > 2) {\n // To reduce the initial lag make it work with 3 points\n // by copying the first point to the beginning.\n if (_lastPoints.length === 3) {\n _lastPoints.unshift(_lastPoints[0]);\n }\n\n // _points array will always have 4 points here.\n const widths = this._calculateCurveWidths(\n _lastPoints[1],\n _lastPoints[2],\n options,\n );\n const curve = Bezier.fromPoints(_lastPoints, widths);\n\n // Remove the first element from the list, so that there are no more than 4 points at any time.\n _lastPoints.shift();\n\n return curve;\n }\n\n return null;\n }\n\n private _calculateCurveWidths(\n startPoint: Point,\n endPoint: Point,\n options: PointGroupOptions,\n ): { start: number; end: number } {\n const velocity =\n options.velocityFilterWeight * endPoint.velocityFrom(startPoint) +\n (1 - options.velocityFilterWeight) * this._lastVelocity;\n\n const newWidth = this._strokeWidth(velocity, options);\n\n const widths = {\n end: newWidth,\n start: this._lastWidth,\n };\n\n this._lastVelocity = velocity;\n this._lastWidth = newWidth;\n\n return widths;\n }\n\n private _strokeWidth(velocity: number, options: PointGroupOptions): number {\n return Math.max(options.maxWidth / (velocity + 1), options.minWidth);\n }\n\n private _drawCurveSegment(x: number, y: number, width: number): void {\n const ctx = this._ctx;\n\n ctx.moveTo(x, y);\n ctx.arc(x, y, width, 0, 2 * Math.PI, false);\n this._isEmpty = false;\n }\n\n private _drawCurve(curve: Bezier, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const widthDelta = curve.endWidth - curve.startWidth;\n // '2' is just an arbitrary number here. If only length is used, then\n // there are gaps between curve segments :/\n const drawSteps = Math.ceil(curve.length()) * 2;\n\n ctx.beginPath();\n ctx.fillStyle = options.penColor;\n\n for (let i = 0; i < drawSteps; i += 1) {\n // Calculate the Bezier (x, y) coordinate for this step.\n const t = i / drawSteps;\n const tt = t * t;\n const ttt = tt * t;\n const u = 1 - t;\n const uu = u * u;\n const uuu = uu * u;\n\n let x = uuu * curve.startPoint.x;\n x += 3 * uu * t * curve.control1.x;\n x += 3 * u * tt * curve.control2.x;\n x += ttt * curve.endPoint.x;\n\n let y = uuu * curve.startPoint.y;\n y += 3 * uu * t * curve.control1.y;\n y += 3 * u * tt * curve.control2.y;\n y += ttt * curve.endPoint.y;\n\n const width = Math.min(\n curve.startWidth + ttt * widthDelta,\n options.maxWidth,\n );\n this._drawCurveSegment(x, y, width);\n }\n\n ctx.closePath();\n ctx.fill();\n }\n\n private _drawDot(point: BasicPoint, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const width =\n options.dotSize > 0\n ? options.dotSize\n : (options.minWidth + options.maxWidth) / 2;\n\n ctx.beginPath();\n this._drawCurveSegment(point.x, point.y, width);\n ctx.closePath();\n ctx.fillStyle = options.penColor;\n ctx.fill();\n }\n\n private _fromData(\n pointGroups: PointGroup[],\n drawCurve: SignaturePad['_drawCurve'],\n drawDot: SignaturePad['_drawDot'],\n ): void {\n for (const group of pointGroups) {\n const { points } = group;\n const pointGroupOptions = this._getPointGroupOptions(group);\n\n if (points.length > 1) {\n for (let j = 0; j < points.length; j += 1) {\n const basicPoint = points[j];\n const point = new Point(\n basicPoint.x,\n basicPoint.y,\n basicPoint.pressure,\n basicPoint.time,\n );\n\n if (j === 0) {\n this._reset(pointGroupOptions);\n }\n\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (curve) {\n drawCurve(curve, pointGroupOptions);\n }\n }\n } else {\n this._reset(pointGroupOptions);\n\n drawDot(points[0], pointGroupOptions);\n }\n }\n }\n\n public toSVG({ includeBackgroundColor = false }: ToSVGOptions = {}): string {\n const pointGroups = this._data;\n const ratio = Math.max(window.devicePixelRatio || 1, 1);\n const minX = 0;\n const minY = 0;\n const maxX = this.canvas.width / ratio;\n const maxY = this.canvas.height / ratio;\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n svg.setAttribute('viewBox', `${minX} ${minY} ${maxX} ${maxY}`);\n svg.setAttribute('width', maxX.toString());\n svg.setAttribute('height', maxY.toString());\n\n if (includeBackgroundColor && this.backgroundColor) {\n const rect = document.createElement('rect');\n rect.setAttribute('width', '100%');\n rect.setAttribute('height', '100%');\n rect.setAttribute('fill', this.backgroundColor);\n\n svg.appendChild(rect);\n }\n\n this._fromData(\n pointGroups,\n\n (curve, { penColor }) => {\n const path = document.createElement('path');\n\n // Need to check curve for NaN values, these pop up when drawing\n // lines on the canvas that are not continuous. E.g. Sharp corners\n // or stopping mid-stroke and than continuing without lifting mouse.\n /* eslint-disable no-restricted-globals */\n if (\n !isNaN(curve.control1.x) &&\n !isNaN(curve.control1.y) &&\n !isNaN(curve.control2.x) &&\n !isNaN(curve.control2.y)\n ) {\n const attr =\n `M ${curve.startPoint.x.toFixed(3)},${curve.startPoint.y.toFixed(\n 3,\n )} ` +\n `C ${curve.control1.x.toFixed(3)},${curve.control1.y.toFixed(3)} ` +\n `${curve.control2.x.toFixed(3)},${curve.control2.y.toFixed(3)} ` +\n `${curve.endPoint.x.toFixed(3)},${curve.endPoint.y.toFixed(3)}`;\n path.setAttribute('d', attr);\n path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3));\n path.setAttribute('stroke', penColor);\n path.setAttribute('fill', 'none');\n path.setAttribute('stroke-linecap', 'round');\n\n svg.appendChild(path);\n }\n /* eslint-enable no-restricted-globals */\n },\n\n (point, { penColor, dotSize, minWidth, maxWidth }) => {\n const circle = document.createElement('circle');\n const size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2;\n circle.setAttribute('r', size.toString());\n circle.setAttribute('cx', point.x.toString());\n circle.setAttribute('cy', point.y.toString());\n circle.setAttribute('fill', penColor);\n\n svg.appendChild(circle);\n },\n );\n\n return svg.outerHTML;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;UAQa,KAAK,CAAA;IAMhB,IAAA,WAAA,CAAY,CAAS,EAAE,CAAS,EAAE,QAAiB,EAAE,IAAa,EAAA;YAChE,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;gBACxB,MAAM,IAAI,KAAK,CAAC,CAAA,mBAAA,EAAsB,CAAC,CAAK,EAAA,EAAA,CAAC,CAAG,CAAA,CAAA,CAAC,CAAC;aACnD;IACD,QAAA,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACZ,QAAA,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACZ,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,CAAC,CAAC;YAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,GAAG,E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EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAI;gBACnD,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChD,YAAA,MAAM,IAAI,GAAG,OAAO,GAAG,CAAC,GAAG,OAAO,GAAG,CAAC,QAAQ,GAAG,QAAQ,IAAI,CAAC,CAAC;gBAC/D,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC1C,YAAA,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9C,YAAA,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9C,YAAA,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAEtC,YAAA,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,SAAC,CACF,CAAC;YAEF,OAAO,GAAG,CAAC,SAAS,CAAC;SACtB;IACF;;;;;;;;"} \ No newline at end of file diff --git a/public/vendor/signature_pad@5/signature_pad.umd.min.js b/public/vendor/signature_pad@5/signature_pad.umd.min.js new file mode 100644 index 0000000000..d37c43bb65 --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.umd.min.js @@ -0,0 +1,6 @@ +/*! + * Signature Pad v5.0.2 | https://github.com/szimek/signature_pad + * (c) 2024 Szymon Nowak | Released under the MIT license + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).SignaturePad=e()}(this,(function(){"use strict";class t{constructor(t,e,i,n){if(isNaN(t)||isNaN(e))throw new Error(`Point is invalid: (${t}, ${e})`);this.x=+t,this.y=+e,this.pressure=i||0,this.time=n||Date.now()}distanceTo(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))}equals(t){return this.x===t.x&&this.y===t.y&&this.pressure===t.pressure&&this.time===t.time}velocityFrom(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):0}}class e{static fromPoints(t,i){const n=this.calculateControlPoints(t[0],t[1],t[2]).c2,s=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new e(t[1],n,s,t[2],i.start,i.end)}static calculateControlPoints(e,i,n){const s=e.x-i.x,o=e.y-i.y,r=i.x-n.x,h=i.y-n.y,a=(e.x+i.x)/2,c=(e.y+i.y)/2,d=(i.x+n.x)/2,l=(i.y+n.y)/2,u=Math.sqrt(s*s+o*o),v=Math.sqrt(r*r+h*h),_=v/(u+v),p=d+(a-d)*_,m=l+(c-l)*_,g=i.x-p,w=i.y-m;return{c1:new t(a+g,c+w),c2:new t(d+g,l+w)}}constructor(t,e,i,n,s,o){this.startPoint=t,this.control2=e,this.control1=i,this.endPoint=n,this.startWidth=s,this.endWidth=o}length(){let t,e,i=0;for(let n=0;n<=10;n+=1){const s=n/10,o=this.point(s,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),r=this.point(s,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(n>0){const n=o-t,s=r-e;i+=Math.sqrt(n*n+s*s)}t=o,e=r}return i}point(t,e,i,n,s){return e*(1-t)*(1-t)*(1-t)+3*i*(1-t)*(1-t)*t+3*n*(1-t)*t*t+s*t*t*t}}class i{constructor(){try{this._et=new EventTarget}catch(t){this._et=document}}addEventListener(t,e,i){this._et.addEventListener(t,e,i)}dispatchEvent(t){return this._et.dispatchEvent(t)}removeEventListener(t,e,i){this._et.removeEventListener(t,e,i)}}class n extends i{constructor(t,e={}){var i,s,o;super(),this.canvas=t,this._drawingStroke=!1,this._isEmpty=!0,this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this._handleMouseDown=t=>{this._isLeftButtonPressed(t,!0)&&!this._drawingStroke&&this._strokeBegin(this._pointerEventToSignatureEvent(t))},this._handleMouseMove=t=>{this._isLeftButtonPressed(t,!0)&&this._drawingStroke?this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t)):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1)},this._handleMouseUp=t=>{this._isLeftButtonPressed(t)||this._strokeEnd(this._pointerEventToSignatureEvent(t))},this._handleTouchStart=t=>{1!==t.targetTouches.length||this._drawingStroke||(t.cancelable&&t.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(t)))},this._handleTouchMove=t=>{1===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._drawingStroke?this._strokeMoveUpdate(this._touchEventToSignatureEvent(t)):this._strokeEnd(this._touchEventToSignatureEvent(t),!1))},this._handleTouchEnd=t=>{0===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this.canvas.removeEventListener("touchmove",this._handleTouchMove),this._strokeEnd(this._touchEventToSignatureEvent(t)))},this._handlePointerDown=t=>{this._isLeftButtonPressed(t)&&!this._drawingStroke&&(t.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(t)))},this._handlePointerMove=t=>{this._isLeftButtonPressed(t,!0)&&this._drawingStroke?(t.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t))):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1)},this._handlePointerUp=t=>{this._isLeftButtonPressed(t)||(t.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(t)))},this.velocityFilterWeight=e.velocityFilterWeight||.7,this.minWidth=e.minWidth||.5,this.maxWidth=e.maxWidth||2.5,this.throttle=null!==(i=e.throttle)&&void 0!==i?i:16,this.minDistance=null!==(s=e.minDistance)&&void 0!==s?s:5,this.dotSize=e.dotSize||0,this.penColor=e.penColor||"black",this.backgroundColor=e.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=e.compositeOperation||"source-over",this.canvasContextOptions=null!==(o=e.canvasContextOptions)&&void 0!==o?o:{},this._strokeMoveUpdate=this.throttle?function(t,e=250){let i,n,s,o=0,r=null;const h=()=>{o=Date.now(),r=null,i=t.apply(n,s),r||(n=null,s=[])};return function(...a){const c=Date.now(),d=e-(c-o);return n=this,s=a,d<=0||d>e?(r&&(clearTimeout(r),r=null),o=c,i=t.apply(n,s),r||(n=null,s=[])):r||(r=window.setTimeout(h,d)),i}}(n.prototype._strokeUpdate,this.throttle):n.prototype._strokeUpdate,this._ctx=t.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:t,canvas:e}=this;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0}fromDataURL(t,e={}){return new Promise(((i,n)=>{const s=new Image,o=e.ratio||window.devicePixelRatio||1,r=e.width||this.canvas.width/o,h=e.height||this.canvas.height/o,a=e.xOffset||0,c=e.yOffset||0;this._reset(this._getPointGroupOptions()),s.onload=()=>{this._ctx.drawImage(s,a,c,r,h),i()},s.onerror=t=>{n(t)},s.crossOrigin="anonymous",s.src=t,this._isEmpty=!1}))}toDataURL(t="image/png",e){return"image/svg+xml"===t?("object"!=typeof e&&(e=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(e))}`):("number"!=typeof e&&(e=void 0),this.canvas.toDataURL(t,e))}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";const t=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!t?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){var t;const e=window.document===this.canvas.ownerDocument?window:null!==(t=this.canvas.ownerDocument.defaultView)&&void 0!==t?t:this.canvas.ownerDocument;return{addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}_removeMoveUpEventListeners(){const{removeEventListener:t}=this._getListenerFunctions();t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp),t("mousemove",this._handleMouseMove),t("mouseup",this._handleMouseUp),t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}fromData(t,{clear:e=!0}={}){e&&this.clear(),this._fromData(t,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(t)}toData(){return this._data}_isLeftButtonPressed(t,e){return e?1===t.buttons:!(1&~t.buttons)}_pointerEventToSignatureEvent(t){return{event:t,type:t.type,x:t.clientX,y:t.clientY,pressure:"pressure"in t?t.pressure:0}}_touchEventToSignatureEvent(t){const e=t.changedTouches[0];return{event:t,type:t.type,x:e.clientX,y:e.clientY,pressure:e.force}}_getPointGroupOptions(t){return{penColor:t&&"penColor"in t?t.penColor:this.penColor,dotSize:t&&"dotSize"in t?t.dotSize:this.dotSize,minWidth:t&&"minWidth"in t?t.minWidth:this.minWidth,maxWidth:t&&"maxWidth"in t?t.maxWidth:this.maxWidth,velocityFilterWeight:t&&"velocityFilterWeight"in t?t.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:t&&"compositeOperation"in t?t.compositeOperation:this.compositeOperation}}_strokeBegin(t){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:t,cancelable:!0})))return;const{addEventListener:e}=this._getListenerFunctions();switch(t.event.type){case"mousedown":e("mousemove",this._handleMouseMove),e("mouseup",this._handleMouseUp);break;case"touchstart":e("touchmove",this._handleTouchMove),e("touchend",this._handleTouchEnd);break;case"pointerdown":e("pointermove",this._handlePointerMove),e("pointerup",this._handlePointerUp)}this._drawingStroke=!0;const i=this._getPointGroupOptions(),n=Object.assign(Object.assign({},i),{points:[]});this._data.push(n),this._reset(i),this._strokeUpdate(t)}_strokeUpdate(t){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(t);this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:t}));const e=this._createPoint(t.x,t.y,t.pressure),i=this._data[this._data.length-1],n=i.points,s=n.length>0&&n[n.length-1],o=!!s&&e.distanceTo(s)<=this.minDistance,r=this._getPointGroupOptions(i);if(!s||!s||!o){const t=this._addPoint(e,r);s?t&&this._drawCurve(t,r):this._drawDot(e,r),n.push({time:e.time,x:e.x,y:e.y,pressure:e.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:t}))}_strokeEnd(t,e=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(e&&this._strokeUpdate(t),this._drawingStroke=!1,this.dispatchEvent(new CustomEvent("endStroke",{detail:t})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown)}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown)}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart)}_reset(t){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(t.minWidth+t.maxWidth)/2,this._ctx.fillStyle=t.penColor,this._ctx.globalCompositeOperation=t.compositeOperation}_createPoint(e,i,n){const s=this.canvas.getBoundingClientRect();return new t(e-s.left,i-s.top,n,(new Date).getTime())}_addPoint(t,i){const{_lastPoints:n}=this;if(n.push(t),n.length>2){3===n.length&&n.unshift(n[0]);const t=this._calculateCurveWidths(n[1],n[2],i),s=e.fromPoints(n,t);return n.shift(),s}return null}_calculateCurveWidths(t,e,i){const n=i.velocityFilterWeight*e.velocityFrom(t)+(1-i.velocityFilterWeight)*this._lastVelocity,s=this._strokeWidth(n,i),o={end:s,start:this._lastWidth};return this._lastVelocity=n,this._lastWidth=s,o}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,i){const n=this._ctx;n.moveTo(t,e),n.arc(t,e,i,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(t,e){const i=this._ctx,n=t.endWidth-t.startWidth,s=2*Math.ceil(t.length());i.beginPath(),i.fillStyle=e.penColor;for(let i=0;i0?e.dotSize:(e.minWidth+e.maxWidth)/2;i.beginPath(),this._drawCurveSegment(t.x,t.y,n),i.closePath(),i.fillStyle=e.penColor,i.fill()}_fromData(e,i,n){for(const s of e){const{points:e}=s,o=this._getPointGroupOptions(s);if(e.length>1)for(let n=0;n{const i=document.createElement("path");if(!(isNaN(t.control1.x)||isNaN(t.control1.y)||isNaN(t.control2.x)||isNaN(t.control2.y))){const n=`M ${t.startPoint.x.toFixed(3)},${t.startPoint.y.toFixed(3)} C ${t.control1.x.toFixed(3)},${t.control1.y.toFixed(3)} ${t.control2.x.toFixed(3)},${t.control2.y.toFixed(3)} ${t.endPoint.x.toFixed(3)},${t.endPoint.y.toFixed(3)}`;i.setAttribute("d",n),i.setAttribute("stroke-width",(2.25*t.endWidth).toFixed(3)),i.setAttribute("stroke",e),i.setAttribute("fill","none"),i.setAttribute("stroke-linecap","round"),o.appendChild(i)}}),((t,{penColor:e,dotSize:i,minWidth:n,maxWidth:s})=>{const r=document.createElement("circle"),h=i>0?i:(n+s)/2;r.setAttribute("r",h.toString()),r.setAttribute("cx",t.x.toString()),r.setAttribute("cy",t.y.toString()),r.setAttribute("fill",e),o.appendChild(r)})),o.outerHTML}}return n})); +//# sourceMappingURL=signature_pad.umd.min.js.map diff --git a/public/vendor/signature_pad@5/signature_pad.umd.min.js.map b/public/vendor/signature_pad@5/signature_pad.umd.min.js.map new file mode 100644 index 0000000000..a150de1fc6 --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.umd.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signature_pad.umd.min.js","sources":["../src/point.ts","../src/bezier.ts","../src/signature_event_target.ts","../src/signature_pad.ts","../src/throttle.ts"],"sourcesContent":["// Interface for point data structure used e.g. in SignaturePad#fromData method\nexport interface BasicPoint {\n x: number;\n y: number;\n pressure: number;\n time: number;\n}\n\nexport class Point implements BasicPoint {\n public x: number;\n public y: number;\n public pressure: number;\n public time: number;\n\n constructor(x: number, y: number, pressure?: number, time?: number) {\n if (isNaN(x) || isNaN(y)) {\n throw new Error(`Point is invalid: (${x}, ${y})`);\n }\n this.x = +x;\n this.y = +y;\n this.pressure = pressure || 0;\n this.time = time || Date.now();\n }\n\n public distanceTo(start: BasicPoint): number {\n return Math.sqrt(\n Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2),\n );\n }\n\n public equals(other: BasicPoint): boolean {\n return (\n this.x === other.x &&\n this.y === other.y &&\n this.pressure === other.pressure &&\n this.time === other.time\n );\n }\n\n public velocityFrom(start: BasicPoint): number {\n return this.time !== start.time\n ? this.distanceTo(start) / (this.time - start.time)\n : 0;\n }\n}\n","import { BasicPoint, Point } from './point';\n\nexport class Bezier {\n public static fromPoints(\n points: Point[],\n widths: { start: number; end: number },\n ): Bezier {\n const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2;\n const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1;\n\n return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end);\n }\n\n private static calculateControlPoints(\n s1: BasicPoint,\n s2: BasicPoint,\n s3: BasicPoint,\n ): {\n c1: BasicPoint;\n c2: BasicPoint;\n } {\n const dx1 = s1.x - s2.x;\n const dy1 = s1.y - s2.y;\n const dx2 = s2.x - s3.x;\n const dy2 = s2.y - s3.y;\n\n const m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 };\n const m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 };\n\n const l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n const l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);\n\n const dxm = m1.x - m2.x;\n const dym = m1.y - m2.y;\n\n const k = l2 / (l1 + l2);\n const cm = { x: m2.x + dxm * k, y: m2.y + dym * k };\n\n const tx = s2.x - cm.x;\n const ty = s2.y - cm.y;\n\n return {\n c1: new Point(m1.x + tx, m1.y + ty),\n c2: new Point(m2.x + tx, m2.y + ty),\n };\n }\n\n constructor(\n public startPoint: Point,\n public control2: BasicPoint,\n public control1: BasicPoint,\n public endPoint: Point,\n public startWidth: number,\n public endWidth: number,\n ) {}\n\n // Returns approximated length. Code taken from https://www.lemoda.net/maths/bezier-length/index.html.\n public length(): number {\n const steps = 10;\n let length = 0;\n let px;\n let py;\n\n for (let i = 0; i <= steps; i += 1) {\n const t = i / steps;\n const cx = this.point(\n t,\n this.startPoint.x,\n this.control1.x,\n this.control2.x,\n this.endPoint.x,\n );\n const cy = this.point(\n t,\n this.startPoint.y,\n this.control1.y,\n this.control2.y,\n this.endPoint.y,\n );\n\n if (i > 0) {\n const xdiff = cx - (px as number);\n const ydiff = cy - (py as number);\n\n length += Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n }\n\n px = cx;\n py = cy;\n }\n\n return length;\n }\n\n // Calculate parametric value of x or y given t and the four point coordinates of a cubic bezier curve.\n private point(\n t: number,\n start: number,\n c1: number,\n c2: number,\n end: number,\n ): number {\n // prettier-ignore\n return ( start * (1.0 - t) * (1.0 - t) * (1.0 - t))\n + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t)\n + (3.0 * c2 * (1.0 - t) * t * t)\n + ( end * t * t * t);\n }\n}\n","export class SignatureEventTarget {\n /* tslint:disable: variable-name */\n private _et: EventTarget;\n /* tslint:enable: variable-name */\n\n constructor() {\n try {\n this._et = new EventTarget();\n } catch (error) {\n // Using document as EventTarget to support iOS 13 and older.\n // Because EventTarget constructor just exists at iOS 14 and later.\n this._et = document;\n }\n }\n\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions,\n ): void {\n this._et.addEventListener(type, listener, options);\n }\n\n dispatchEvent(event: Event): boolean {\n return this._et.dispatchEvent(event);\n }\n\n removeEventListener(\n type: string,\n callback: EventListenerOrEventListenerObject | null,\n options?: boolean | EventListenerOptions,\n ): void {\n this._et.removeEventListener(type, callback, options);\n }\n}\n","/**\n * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:\n * http://corner.squareup.com/2012/07/smoother-signatures.html\n *\n * Implementation of interpolation using cubic Bézier curves is taken from:\n * https://web.archive.org/web/20160323213433/http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html\n *\n * Algorithm for approximated length of a Bézier curve is taken from:\n * http://www.lemoda.net/maths/bezier-length/index.html\n */\n\nimport { Bezier } from './bezier';\nimport { BasicPoint, Point } from './point';\nimport { SignatureEventTarget } from './signature_event_target';\nimport { throttle } from './throttle';\n\nexport interface SignatureEvent {\n event: MouseEvent | TouchEvent | PointerEvent;\n type: string;\n x: number;\n y: number;\n pressure: number;\n}\n\nexport interface FromDataOptions {\n clear?: boolean;\n}\n\nexport interface ToSVGOptions {\n includeBackgroundColor?: boolean;\n}\n\nexport interface PointGroupOptions {\n dotSize: number;\n minWidth: number;\n maxWidth: number;\n penColor: string;\n velocityFilterWeight: number;\n /**\n * This is the globalCompositeOperation for the line.\n * *default: 'source-over'*\n * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation\n */\n compositeOperation: GlobalCompositeOperation;\n}\n\nexport interface Options extends Partial {\n minDistance?: number;\n backgroundColor?: string;\n throttle?: number;\n canvasContextOptions?: CanvasRenderingContext2DSettings;\n}\n\nexport interface PointGroup extends PointGroupOptions {\n points: BasicPoint[];\n}\n\nexport default class SignaturePad extends SignatureEventTarget {\n // Public stuff\n public dotSize: number;\n public minWidth: number;\n public maxWidth: number;\n public penColor: string;\n public minDistance: number;\n public velocityFilterWeight: number;\n public compositeOperation: GlobalCompositeOperation;\n public backgroundColor: string;\n public throttle: number;\n public canvasContextOptions: CanvasRenderingContext2DSettings;\n\n // Private stuff\n /* tslint:disable: variable-name */\n private _ctx: CanvasRenderingContext2D;\n private _drawingStroke = false;\n private _isEmpty = true;\n private _lastPoints: Point[] = []; // Stores up to 4 most recent points; used to generate a new curve\n private _data: PointGroup[] = []; // Stores all points in groups (one group per line or dot)\n private _lastVelocity = 0;\n private _lastWidth = 0;\n private _strokeMoveUpdate: (event: SignatureEvent) => void;\n /* tslint:enable: variable-name */\n\n constructor(\n private canvas: HTMLCanvasElement,\n options: Options = {},\n ) {\n super();\n this.velocityFilterWeight = options.velocityFilterWeight || 0.7;\n this.minWidth = options.minWidth || 0.5;\n this.maxWidth = options.maxWidth || 2.5;\n\n // We need to handle 0 value, so use `??` instead of `||`\n this.throttle = options.throttle ?? 16; // in milliseconds\n this.minDistance = options.minDistance ?? 5; // in pixels\n this.dotSize = options.dotSize || 0;\n this.penColor = options.penColor || 'black';\n this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)';\n this.compositeOperation = options.compositeOperation || 'source-over';\n this.canvasContextOptions = options.canvasContextOptions ?? {};\n\n this._strokeMoveUpdate = this.throttle\n ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle)\n : SignaturePad.prototype._strokeUpdate;\n this._ctx = canvas.getContext(\n '2d',\n this.canvasContextOptions,\n ) as CanvasRenderingContext2D;\n\n this.clear();\n\n // Enable mouse and touch event handlers\n this.on();\n }\n\n public clear(): void {\n const { _ctx: ctx, canvas } = this;\n\n // Clear canvas using background color\n ctx.fillStyle = this.backgroundColor;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n this._data = [];\n this._reset(this._getPointGroupOptions());\n this._isEmpty = true;\n }\n\n public fromDataURL(\n dataUrl: string,\n options: {\n ratio?: number;\n width?: number;\n height?: number;\n xOffset?: number;\n yOffset?: number;\n } = {},\n ): Promise {\n return new Promise((resolve, reject) => {\n const image = new Image();\n const ratio = options.ratio || window.devicePixelRatio || 1;\n const width = options.width || this.canvas.width / ratio;\n const height = options.height || this.canvas.height / ratio;\n const xOffset = options.xOffset || 0;\n const yOffset = options.yOffset || 0;\n\n this._reset(this._getPointGroupOptions());\n\n image.onload = (): void => {\n this._ctx.drawImage(image, xOffset, yOffset, width, height);\n resolve();\n };\n image.onerror = (error): void => {\n reject(error);\n };\n image.crossOrigin = 'anonymous';\n image.src = dataUrl;\n\n this._isEmpty = false;\n });\n }\n\n public toDataURL(\n type: 'image/svg+xml',\n encoderOptions?: ToSVGOptions,\n ): string;\n public toDataURL(type?: string, encoderOptions?: number): string;\n public toDataURL(\n type = 'image/png',\n encoderOptions?: number | ToSVGOptions | undefined,\n ): string {\n switch (type) {\n case 'image/svg+xml':\n if (typeof encoderOptions !== 'object') {\n encoderOptions = undefined;\n }\n return `data:image/svg+xml;base64,${btoa(\n this.toSVG(encoderOptions as ToSVGOptions),\n )}`;\n default:\n if (typeof encoderOptions !== 'number') {\n encoderOptions = undefined;\n }\n return this.canvas.toDataURL(type, encoderOptions);\n }\n }\n\n public on(): void {\n // Disable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'none';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'none';\n this.canvas.style.userSelect = 'none';\n\n const isIOS =\n /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document;\n\n // The \"Scribble\" feature of iOS intercepts point events. So that we can\n // lose some of them when tapping rapidly. Use touch events for iOS\n // platforms to prevent it. See\n // https://developer.apple.com/forums/thread/664108 for more information.\n if (window.PointerEvent && !isIOS) {\n this._handlePointerEvents();\n } else {\n this._handleMouseEvents();\n\n if ('ontouchstart' in window) {\n this._handleTouchEvents();\n }\n }\n }\n\n public off(): void {\n // Enable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'auto';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'auto';\n this.canvas.style.userSelect = 'auto';\n\n this.canvas.removeEventListener('pointerdown', this._handlePointerDown);\n this.canvas.removeEventListener('mousedown', this._handleMouseDown);\n this.canvas.removeEventListener('touchstart', this._handleTouchStart);\n\n this._removeMoveUpEventListeners();\n }\n\n private _getListenerFunctions() {\n const canvasWindow =\n window.document === this.canvas.ownerDocument\n ? window\n : this.canvas.ownerDocument.defaultView ?? this.canvas.ownerDocument;\n\n return {\n addEventListener: canvasWindow.addEventListener.bind(\n canvasWindow,\n ) as typeof window.addEventListener,\n removeEventListener: canvasWindow.removeEventListener.bind(\n canvasWindow,\n ) as typeof window.removeEventListener,\n };\n }\n\n private _removeMoveUpEventListeners(): void {\n const { removeEventListener } = this._getListenerFunctions();\n removeEventListener('pointermove', this._handlePointerMove);\n removeEventListener('pointerup', this._handlePointerUp);\n\n removeEventListener('mousemove', this._handleMouseMove);\n removeEventListener('mouseup', this._handleMouseUp);\n\n removeEventListener('touchmove', this._handleTouchMove);\n removeEventListener('touchend', this._handleTouchEnd);\n }\n\n public isEmpty(): boolean {\n return this._isEmpty;\n }\n\n public fromData(\n pointGroups: PointGroup[],\n { clear = true }: FromDataOptions = {},\n ): void {\n if (clear) {\n this.clear();\n }\n\n this._fromData(\n pointGroups,\n this._drawCurve.bind(this),\n this._drawDot.bind(this),\n );\n\n this._data = this._data.concat(pointGroups);\n }\n\n public toData(): PointGroup[] {\n return this._data;\n }\n\n public _isLeftButtonPressed(event: MouseEvent, only?: boolean): boolean {\n if (only) {\n return event.buttons === 1;\n }\n\n return (event.buttons & 1) === 1;\n }\n private _pointerEventToSignatureEvent(\n event: MouseEvent | PointerEvent,\n ): SignatureEvent {\n return {\n event: event,\n type: event.type,\n x: event.clientX,\n y: event.clientY,\n pressure: 'pressure' in event ? event.pressure : 0,\n };\n }\n\n private _touchEventToSignatureEvent(event: TouchEvent): SignatureEvent {\n const touch = event.changedTouches[0];\n return {\n event: event,\n type: event.type,\n x: touch.clientX,\n y: touch.clientY,\n pressure: touch.force,\n };\n }\n\n // Event handlers\n private _handleMouseDown = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || this._drawingStroke) {\n return;\n }\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseMove = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when not pressing primary button or pressing multiple buttons\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseUp = (event: MouseEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleTouchStart = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1 || this._drawingStroke) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this._strokeBegin(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchMove = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n if (!this._drawingStroke) {\n this._strokeEnd(this._touchEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchEnd = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 0) {\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this.canvas.removeEventListener('touchmove', this._handleTouchMove);\n\n this._strokeEnd(this._touchEventToSignatureEvent(event));\n };\n\n private _handlePointerDown = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event) || this._drawingStroke) {\n return;\n }\n\n event.preventDefault();\n\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerMove = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when primary button not pressed or multiple buttons pressed\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n event.preventDefault();\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerUp = (event: PointerEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n event.preventDefault();\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _getPointGroupOptions(group?: PointGroup): PointGroupOptions {\n return {\n penColor: group && 'penColor' in group ? group.penColor : this.penColor,\n dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize,\n minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth,\n maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth,\n velocityFilterWeight:\n group && 'velocityFilterWeight' in group\n ? group.velocityFilterWeight\n : this.velocityFilterWeight,\n compositeOperation:\n group && 'compositeOperation' in group\n ? group.compositeOperation\n : this.compositeOperation,\n };\n }\n\n // Private methods\n private _strokeBegin(event: SignatureEvent): void {\n const cancelled = !this.dispatchEvent(\n new CustomEvent('beginStroke', { detail: event, cancelable: true }),\n );\n if (cancelled) {\n return;\n }\n\n const { addEventListener } = this._getListenerFunctions();\n switch (event.event.type) {\n case 'mousedown':\n addEventListener('mousemove', this._handleMouseMove);\n addEventListener('mouseup', this._handleMouseUp);\n break;\n case 'touchstart':\n addEventListener('touchmove', this._handleTouchMove);\n addEventListener('touchend', this._handleTouchEnd);\n break;\n case 'pointerdown':\n addEventListener('pointermove', this._handlePointerMove);\n addEventListener('pointerup', this._handlePointerUp);\n break;\n default:\n // do nothing\n }\n\n this._drawingStroke = true;\n\n const pointGroupOptions = this._getPointGroupOptions();\n\n const newPointGroup: PointGroup = {\n ...pointGroupOptions,\n points: [],\n };\n\n this._data.push(newPointGroup);\n this._reset(pointGroupOptions);\n this._strokeUpdate(event);\n }\n\n private _strokeUpdate(event: SignatureEvent): void {\n if (!this._drawingStroke) {\n return;\n }\n\n if (this._data.length === 0) {\n // This can happen if clear() was called while a signature is still in progress,\n // or if there is a race condition between start/update events.\n this._strokeBegin(event);\n return;\n }\n\n this.dispatchEvent(\n new CustomEvent('beforeUpdateStroke', { detail: event }),\n );\n\n const point = this._createPoint(event.x, event.y, event.pressure);\n const lastPointGroup = this._data[this._data.length - 1];\n const lastPoints = lastPointGroup.points;\n const lastPoint =\n lastPoints.length > 0 && lastPoints[lastPoints.length - 1];\n const isLastPointTooClose = lastPoint\n ? point.distanceTo(lastPoint) <= this.minDistance\n : false;\n const pointGroupOptions = this._getPointGroupOptions(lastPointGroup);\n\n // Skip this point if it's too close to the previous one\n if (!lastPoint || !(lastPoint && isLastPointTooClose)) {\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (!lastPoint) {\n this._drawDot(point, pointGroupOptions);\n } else if (curve) {\n this._drawCurve(curve, pointGroupOptions);\n }\n\n lastPoints.push({\n time: point.time,\n x: point.x,\n y: point.y,\n pressure: point.pressure,\n });\n }\n\n this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event }));\n }\n\n private _strokeEnd(event: SignatureEvent, shouldUpdate = true): void {\n this._removeMoveUpEventListeners();\n\n if (!this._drawingStroke) {\n return;\n }\n\n if (shouldUpdate) {\n this._strokeUpdate(event);\n }\n\n this._drawingStroke = false;\n this.dispatchEvent(new CustomEvent('endStroke', { detail: event }));\n }\n\n private _handlePointerEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('pointerdown', this._handlePointerDown);\n }\n\n private _handleMouseEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('mousedown', this._handleMouseDown);\n }\n\n private _handleTouchEvents(): void {\n this.canvas.addEventListener('touchstart', this._handleTouchStart);\n }\n\n // Called when a new line is started\n private _reset(options: PointGroupOptions): void {\n this._lastPoints = [];\n this._lastVelocity = 0;\n this._lastWidth = (options.minWidth + options.maxWidth) / 2;\n this._ctx.fillStyle = options.penColor;\n this._ctx.globalCompositeOperation = options.compositeOperation;\n }\n\n private _createPoint(x: number, y: number, pressure: number): Point {\n const rect = this.canvas.getBoundingClientRect();\n\n return new Point(\n x - rect.left,\n y - rect.top,\n pressure,\n new Date().getTime(),\n );\n }\n\n // Add point to _lastPoints array and generate a new curve if there are enough points (i.e. 3)\n private _addPoint(point: Point, options: PointGroupOptions): Bezier | null {\n const { _lastPoints } = this;\n\n _lastPoints.push(point);\n\n if (_lastPoints.length > 2) {\n // To reduce the initial lag make it work with 3 points\n // by copying the first point to the beginning.\n if (_lastPoints.length === 3) {\n _lastPoints.unshift(_lastPoints[0]);\n }\n\n // _points array will always have 4 points here.\n const widths = this._calculateCurveWidths(\n _lastPoints[1],\n _lastPoints[2],\n options,\n );\n const curve = Bezier.fromPoints(_lastPoints, widths);\n\n // Remove the first element from the list, so that there are no more than 4 points at any time.\n _lastPoints.shift();\n\n return curve;\n }\n\n return null;\n }\n\n private _calculateCurveWidths(\n startPoint: Point,\n endPoint: Point,\n options: PointGroupOptions,\n ): { start: number; end: number } {\n const velocity =\n options.velocityFilterWeight * endPoint.velocityFrom(startPoint) +\n (1 - options.velocityFilterWeight) * this._lastVelocity;\n\n const newWidth = this._strokeWidth(velocity, options);\n\n const widths = {\n end: newWidth,\n start: this._lastWidth,\n };\n\n this._lastVelocity = velocity;\n this._lastWidth = newWidth;\n\n return widths;\n }\n\n private _strokeWidth(velocity: number, options: PointGroupOptions): number {\n return Math.max(options.maxWidth / (velocity + 1), options.minWidth);\n }\n\n private _drawCurveSegment(x: number, y: number, width: number): void {\n const ctx = this._ctx;\n\n ctx.moveTo(x, y);\n ctx.arc(x, y, width, 0, 2 * Math.PI, false);\n this._isEmpty = false;\n }\n\n private _drawCurve(curve: Bezier, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const widthDelta = curve.endWidth - curve.startWidth;\n // '2' is just an arbitrary number here. If only length is used, then\n // there are gaps between curve segments :/\n const drawSteps = Math.ceil(curve.length()) * 2;\n\n ctx.beginPath();\n ctx.fillStyle = options.penColor;\n\n for (let i = 0; i < drawSteps; i += 1) {\n // Calculate the Bezier (x, y) coordinate for this step.\n const t = i / drawSteps;\n const tt = t * t;\n const ttt = tt * t;\n const u = 1 - t;\n const uu = u * u;\n const uuu = uu * u;\n\n let x = uuu * curve.startPoint.x;\n x += 3 * uu * t * curve.control1.x;\n x += 3 * u * tt * curve.control2.x;\n x += ttt * curve.endPoint.x;\n\n let y = uuu * curve.startPoint.y;\n y += 3 * uu * t * curve.control1.y;\n y += 3 * u * tt * curve.control2.y;\n y += ttt * curve.endPoint.y;\n\n const width = Math.min(\n curve.startWidth + ttt * widthDelta,\n options.maxWidth,\n );\n this._drawCurveSegment(x, y, width);\n }\n\n ctx.closePath();\n ctx.fill();\n }\n\n private _drawDot(point: BasicPoint, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const width =\n options.dotSize > 0\n ? options.dotSize\n : (options.minWidth + options.maxWidth) / 2;\n\n ctx.beginPath();\n this._drawCurveSegment(point.x, point.y, width);\n ctx.closePath();\n ctx.fillStyle = options.penColor;\n ctx.fill();\n }\n\n private _fromData(\n pointGroups: PointGroup[],\n drawCurve: SignaturePad['_drawCurve'],\n drawDot: SignaturePad['_drawDot'],\n ): void {\n for (const group of pointGroups) {\n const { points } = group;\n const pointGroupOptions = this._getPointGroupOptions(group);\n\n if (points.length > 1) {\n for (let j = 0; j < points.length; j += 1) {\n const basicPoint = points[j];\n const point = new Point(\n basicPoint.x,\n basicPoint.y,\n basicPoint.pressure,\n basicPoint.time,\n );\n\n if (j === 0) {\n this._reset(pointGroupOptions);\n }\n\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (curve) {\n drawCurve(curve, pointGroupOptions);\n }\n }\n } else {\n this._reset(pointGroupOptions);\n\n drawDot(points[0], pointGroupOptions);\n }\n }\n }\n\n public toSVG({ includeBackgroundColor = false }: ToSVGOptions = {}): string {\n const pointGroups = this._data;\n const ratio = Math.max(window.devicePixelRatio || 1, 1);\n const minX = 0;\n const minY = 0;\n const maxX = this.canvas.width / ratio;\n const maxY = this.canvas.height / ratio;\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n svg.setAttribute('viewBox', `${minX} ${minY} ${maxX} ${maxY}`);\n svg.setAttribute('width', maxX.toString());\n svg.setAttribute('height', maxY.toString());\n\n if (includeBackgroundColor && this.backgroundColor) {\n const rect = document.createElement('rect');\n rect.setAttribute('width', '100%');\n rect.setAttribute('height', '100%');\n rect.setAttribute('fill', this.backgroundColor);\n\n svg.appendChild(rect);\n }\n\n this._fromData(\n pointGroups,\n\n (curve, { penColor }) => {\n const path = document.createElement('path');\n\n // Need to check curve for NaN values, these pop up when drawing\n // lines on the canvas that are not continuous. E.g. Sharp corners\n // or stopping mid-stroke and than continuing without lifting mouse.\n /* eslint-disable no-restricted-globals */\n if (\n !isNaN(curve.control1.x) &&\n !isNaN(curve.control1.y) &&\n !isNaN(curve.control2.x) &&\n !isNaN(curve.control2.y)\n ) {\n const attr =\n `M ${curve.startPoint.x.toFixed(3)},${curve.startPoint.y.toFixed(\n 3,\n )} ` +\n `C ${curve.control1.x.toFixed(3)},${curve.control1.y.toFixed(3)} ` +\n `${curve.control2.x.toFixed(3)},${curve.control2.y.toFixed(3)} ` +\n `${curve.endPoint.x.toFixed(3)},${curve.endPoint.y.toFixed(3)}`;\n path.setAttribute('d', attr);\n path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3));\n path.setAttribute('stroke', penColor);\n path.setAttribute('fill', 'none');\n path.setAttribute('stroke-linecap', 'round');\n\n svg.appendChild(path);\n }\n /* eslint-enable no-restricted-globals */\n },\n\n (point, { penColor, dotSize, minWidth, maxWidth }) => {\n const circle = document.createElement('circle');\n const size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2;\n circle.setAttribute('r', size.toString());\n circle.setAttribute('cx', point.x.toString());\n circle.setAttribute('cy', point.y.toString());\n circle.setAttribute('fill', penColor);\n\n svg.appendChild(circle);\n },\n );\n\n return svg.outerHTML;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias */\n// Slightly simplified version of http://stackoverflow.com/a/27078401/815507\n\nexport function throttle(\n fn: (...args: any[]) => any,\n wait = 250,\n): (this: any, ...args: any[]) => any {\n let previous = 0;\n let timeout: number | null = null;\n let result: any;\n let storedContext: any;\n let storedArgs: any[];\n\n const later = (): void => {\n previous = Date.now();\n timeout = null;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n };\n\n return function wrapper(this: any, ...args: any[]): any {\n const now = Date.now();\n const remaining = wait - (now - previous);\n\n storedContext = this;\n storedArgs = args;\n\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n\n previous = now;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n } else if (!timeout) {\n timeout = window.setTimeout(later, remaining);\n }\n\n return result;\n };\n}\n"],"names":["Point","constructor","x","y","pressure","time","isNaN","Error","this","Date","now","distanceTo","start","Math","sqrt","pow","equals","other","velocityFrom","Bezier","fromPoints","points","widths","c2","calculateControlPoints","c3","c1","end","s1","s2","s3","dx1","dy1","dx2","dy2","m1","m2","l1","l2","k","cm","tx","ty","startPoint","control2","control1","endPoint","startWidth","endWidth","length","px","py","i","t","cx","point","cy","xdiff","ydiff","SignatureEventTarget","_et","EventTarget","error","document","addEventListener","type","listener","options","dispatchEvent","event","removeEventListener","callback","SignaturePad","canvas","super","_drawingStroke","_isEmpty","_lastPoints","_data","_lastVelocity","_lastWidth","_handleMouseDown","_isLeftButtonPressed","_strokeBegin","_pointerEventToSignatureEvent","_handleMouseMove","_strokeMoveUpdate","_strokeEnd","_handleMouseUp","_handleTouchStart","targetTouches","cancelable","preventDefault","_touchEventToSignatureEvent","_handleTouchMove","_handleTouchEnd","_handlePointerDown","_handlePointerMove","_handlePointerUp","velocityFilterWeight","minWidth","maxWidth","throttle","_a","minDistance","_b","dotSize","penColor","backgroundColor","compositeOperation","canvasContextOptions","_c","fn","wait","result","storedContext","storedArgs","previous","timeout","later","apply","args","remaining","clearTimeout","window","setTimeout","prototype","_strokeUpdate","_ctx","getContext","clear","on","ctx","fillStyle","clearRect","width","height","fillRect","_reset","_getPointGroupOptions","fromDataURL","dataUrl","Promise","resolve","reject","image","Image","ratio","devicePixelRatio","xOffset","yOffset","onload","drawImage","onerror","crossOrigin","src","toDataURL","encoderOptions","undefined","btoa","toSVG","style","touchAction","msTouchAction","userSelect","isIOS","test","navigator","userAgent","PointerEvent","_handlePointerEvents","_handleMouseEvents","_handleTouchEvents","off","_removeMoveUpEventListeners","_getListenerFunctions","canvasWindow","ownerDocument","defaultView","bind","isEmpty","fromData","pointGroups","_fromData","_drawCurve","_drawDot","concat","toData","only","buttons","clientX","clientY","touch","changedTouches","force","group","CustomEvent","detail","pointGroupOptions","newPointGroup","push","_createPoint","lastPointGroup","lastPoints","lastPoint","isLastPointTooClose","curve","_addPoint","shouldUpdate","globalCompositeOperation","rect","getBoundingClientRect","left","top","getTime","unshift","_calculateCurveWidths","shift","velocity","newWidth","_strokeWidth","max","_drawCurveSegment","moveTo","arc","PI","widthDelta","drawSteps","ceil","beginPath","tt","ttt","u","uu","uuu","min","closePath","fill","drawCurve","drawDot","j","basicPoint","includeBackgroundColor","maxX","maxY","svg","createElementNS","setAttribute","toString","createElement","appendChild","path","attr","toFixed","circle","size","outerHTML"],"mappings":";;;;mPAQaA,EAMX,WAAAC,CAAYC,EAAWC,EAAWC,EAAmBC,GACnD,GAAIC,MAAMJ,IAAMI,MAAMH,GACpB,MAAM,IAAII,MAAM,sBAAsBL,MAAMC,MAE9CK,KAAKN,GAAKA,EACVM,KAAKL,GAAKA,EACVK,KAAKJ,SAAWA,GAAY,EAC5BI,KAAKH,KAAOA,GAAQI,KAAKC,KAC1B,CAEM,UAAAC,CAAWC,GAChB,OAAOC,KAAKC,KACVD,KAAKE,IAAIP,KAAKN,EAAIU,EAAMV,EAAG,GAAKW,KAAKE,IAAIP,KAAKL,EAAIS,EAAMT,EAAG,GAE9D,CAEM,MAAAa,CAAOC,GACZ,OACET,KAAKN,IAAMe,EAAMf,GACjBM,KAAKL,IAAMc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MwM,EAAMjK,SAAS3C,IACrBI,MAAMwM,EAAMjK,SAAS1C,IACrBG,MAAMwM,EAAMlK,SAAS1C,IACrBI,MAAMwM,EAAMlK,SAASzC,IACtB,CACA,MAAMyP,EACJ,KAAK9C,EAAMnK,WAAWzC,EAAE2P,QAAQ,MAAM/C,EAAMnK,WAAWxC,EAAE0P,QACvD,QAEG/C,EAAMjK,SAAS3C,EAAE2P,QAAQ,MAAM/C,EAAMjK,SAAS1C,EAAE0P,QAAQ,MAC1D/C,EAAMlK,SAAS1C,EAAE2P,QAAQ,MAAM/C,EAAMlK,SAASzC,EAAE0P,QAAQ,MACxD/C,EAAMhK,SAAS5C,EAAE2P,QAAQ,MAAM/C,EAAMhK,SAAS3C,EAAE0P,QAAQ,KAC7DF,EAAKJ,aAAa,IAAKK,GACvBD,EAAKJ,aAAa,gBAAkC,KAAjBzC,EAAM9J,UAAiB6M,QAAQ,IAClEF,EAAKJ,aAAa,SAAU5I,GAC5BgJ,EAAKJ,aAAa,OAAQ,QAC1BI,EAAKJ,aAAa,iBAAkB,SAEpCF,EAAIK,YAAYC,EACjB,KAIH,CAACpM,GAASoD,WAAUD,UAASN,WAAUC,eACrC,MAAMyJ,EAAS/L,SAAS0L,cAAc,UAChCM,EAAOrJ,EAAU,EAAIA,GAAWN,EAAWC,GAAY,EAC7DyJ,EAAOP,aAAa,IAAKQ,EAAKP,YAC9BM,EAAOP,aAAa,KAAMhM,EAAMrD,EAAEsP,YAClCM,EAAOP,aAAa,KAAMhM,EAAMpD,EAAEqP,YAClCM,EAAOP,aAAa,OAAQ5I,GAE5B0I,EAAIK,YAAYI,EAAO,IAIpBT,EAAIW,SACZ"} \ No newline at end of file diff --git a/public/vendor/signature_pad@5/types/bezier.d.ts b/public/vendor/signature_pad@5/types/bezier.d.ts new file mode 100644 index 0000000000..066a8af8e1 --- /dev/null +++ b/public/vendor/signature_pad@5/types/bezier.d.ts @@ -0,0 +1,17 @@ +import { BasicPoint, Point } from './point'; +export declare class Bezier { + startPoint: Point; + control2: BasicPoint; + control1: BasicPoint; + endPoint: Point; + startWidth: number; + endWidth: number; + static fromPoints(points: Point[], widths: { + start: number; + end: number; + }): Bezier; + private static calculateControlPoints; + constructor(startPoint: Point, control2: BasicPoint, control1: BasicPoint, endPoint: Point, startWidth: number, endWidth: number); + length(): number; + private point; +} diff --git a/public/vendor/signature_pad@5/types/point.d.ts b/public/vendor/signature_pad@5/types/point.d.ts new file mode 100644 index 0000000000..5091110697 --- /dev/null +++ b/public/vendor/signature_pad@5/types/point.d.ts @@ -0,0 +1,16 @@ +export interface BasicPoint { + x: number; + y: number; + pressure: number; + time: number; +} +export declare class Point implements BasicPoint { + x: number; + y: number; + pressure: number; + time: number; + constructor(x: number, y: number, pressure?: number, time?: number); + distanceTo(start: BasicPoint): number; + equals(other: BasicPoint): boolean; + velocityFrom(start: BasicPoint): number; +} diff --git a/public/vendor/signature_pad@5/types/signature_event_target.d.ts b/public/vendor/signature_pad@5/types/signature_event_target.d.ts new file mode 100644 index 0000000000..332ea3dd9e --- /dev/null +++ b/public/vendor/signature_pad@5/types/signature_event_target.d.ts @@ -0,0 +1,7 @@ +export declare class SignatureEventTarget { + private _et; + constructor(); + addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void; + dispatchEvent(event: Event): boolean; + removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions): void; +} diff --git a/public/vendor/signature_pad@5/types/signature_pad.d.ts b/public/vendor/signature_pad@5/types/signature_pad.d.ts new file mode 100644 index 0000000000..cf19c3a193 --- /dev/null +++ b/public/vendor/signature_pad@5/types/signature_pad.d.ts @@ -0,0 +1,115 @@ +/** + * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from: + * http://corner.squareup.com/2012/07/smoother-signatures.html + * + * Implementation of interpolation using cubic Bézier curves is taken from: + * https://web.archive.org/web/20160323213433/http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html + * + * Algorithm for approximated length of a Bézier curve is taken from: + * http://www.lemoda.net/maths/bezier-length/index.html + */ +import { BasicPoint } from './point'; +import { SignatureEventTarget } from './signature_event_target'; +export interface SignatureEvent { + event: MouseEvent | TouchEvent | PointerEvent; + type: string; + x: number; + y: number; + pressure: number; +} +export interface FromDataOptions { + clear?: boolean; +} +export interface ToSVGOptions { + includeBackgroundColor?: boolean; +} +export interface PointGroupOptions { + dotSize: number; + minWidth: number; + maxWidth: number; + penColor: string; + velocityFilterWeight: number; + /** + * This is the globalCompositeOperation for the line. + * *default: 'source-over'* + * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + */ + compositeOperation: GlobalCompositeOperation; +} +export interface Options extends Partial { + minDistance?: number; + backgroundColor?: string; + throttle?: number; + canvasContextOptions?: CanvasRenderingContext2DSettings; +} +export interface PointGroup extends PointGroupOptions { + points: BasicPoint[]; +} +export default class SignaturePad extends SignatureEventTarget { + private canvas; + dotSize: number; + minWidth: number; + maxWidth: number; + penColor: string; + minDistance: number; + velocityFilterWeight: number; + compositeOperation: GlobalCompositeOperation; + backgroundColor: string; + throttle: number; + canvasContextOptions: CanvasRenderingContext2DSettings; + private _ctx; + private _drawingStroke; + private _isEmpty; + private _lastPoints; + private _data; + private _lastVelocity; + private _lastWidth; + private _strokeMoveUpdate; + constructor(canvas: HTMLCanvasElement, options?: Options); + clear(): void; + fromDataURL(dataUrl: string, options?: { + ratio?: number; + width?: number; + height?: number; + xOffset?: number; + yOffset?: number; + }): Promise; + toDataURL(type: 'image/svg+xml', encoderOptions?: ToSVGOptions): string; + toDataURL(type?: string, encoderOptions?: number): string; + on(): void; + off(): void; + private _getListenerFunctions; + private _removeMoveUpEventListeners; + isEmpty(): boolean; + fromData(pointGroups: PointGroup[], { clear }?: FromDataOptions): void; + toData(): PointGroup[]; + _isLeftButtonPressed(event: MouseEvent, only?: boolean): boolean; + private _pointerEventToSignatureEvent; + private _touchEventToSignatureEvent; + private _handleMouseDown; + private _handleMouseMove; + private _handleMouseUp; + private _handleTouchStart; + private _handleTouchMove; + private _handleTouchEnd; + private _handlePointerDown; + private _handlePointerMove; + private _handlePointerUp; + private _getPointGroupOptions; + private _strokeBegin; + private _strokeUpdate; + private _strokeEnd; + private _handlePointerEvents; + private _handleMouseEvents; + private _handleTouchEvents; + private _reset; + private _createPoint; + private _addPoint; + private _calculateCurveWidths; + private _strokeWidth; + private _drawCurveSegment; + private _drawCurve; + private _drawDot; + private _fromData; + toSVG({ includeBackgroundColor }?: ToSVGOptions): string; +} diff --git a/public/vendor/signature_pad@5/types/throttle.d.ts b/public/vendor/signature_pad@5/types/throttle.d.ts new file mode 100644 index 0000000000..dc89f6389a --- /dev/null +++ b/public/vendor/signature_pad@5/types/throttle.d.ts @@ -0,0 +1 @@ +export declare function throttle(fn: (...args: any[]) => any, wait?: number): (this: any, ...args: any[]) => any; diff --git a/resources/views/portal/ninja2020/components/livewire/invoice-pay.blade.php b/resources/views/portal/ninja2020/components/livewire/invoice-pay.blade.php new file mode 100644 index 0000000000..a2f84e9935 --- /dev/null +++ b/resources/views/portal/ninja2020/components/livewire/invoice-pay.blade.php @@ -0,0 +1,3 @@ +
+ @livewire($this->component,['context' => $context], key($this->componentUniqueId())) +
diff --git a/resources/views/portal/ninja2020/components/livewire/signature.blade.php b/resources/views/portal/ninja2020/components/livewire/signature.blade.php new file mode 100644 index 0000000000..7a6620a217 --- /dev/null +++ b/resources/views/portal/ninja2020/components/livewire/signature.blade.php @@ -0,0 +1,49 @@ +
+
+
+

{{ ctrans('texts.sign_here_ux_tip') }}

+ +
+ + +
+
+
+ + @assets + + @endassets + @script + + @endscript +
\ No newline at end of file diff --git a/resources/views/portal/ninja2020/components/livewire/terms.blade.php b/resources/views/portal/ninja2020/components/livewire/terms.blade.php new file mode 100644 index 0000000000..5cb12e4570 --- /dev/null +++ b/resources/views/portal/ninja2020/components/livewire/terms.blade.php @@ -0,0 +1,40 @@ +
+
+
+

+ {{ ctrans('texts.terms') }} +

+
+
+

{{ ctrans('texts.invoice') }} {{ $invoice->number }}:

+ @if($variables && $invoice->terms) +
{!! $invoice->parseHtmlVariables('terms', $variables) !!}
+ @elseif($invoice->terms) +
{!! $invoice->terms !!}
+ @else + {{ ctrans('texts.not_specified') }} + @endif +
+
+
+
+
+
+ +
+
+ @script + + @endscript + +
\ No newline at end of file diff --git a/resources/views/portal/ninja2020/invoices/show_smooth.blade.php b/resources/views/portal/ninja2020/invoices/show_smooth.blade.php new file mode 100644 index 0000000000..2fdb482089 --- /dev/null +++ b/resources/views/portal/ninja2020/invoices/show_smooth.blade.php @@ -0,0 +1,34 @@ +@extends('portal.ninja2020.layout.app') +@section('meta_title', ctrans('texts.view_invoice')) + +@push('head') +@endpush + +@section('body') + + @if($invoice->isPayable() && $client->getSetting('custom_message_unpaid_invoice')) + @component('portal.ninja2020.components.message') +
{{ $client->getSetting('custom_message_unpaid_invoice') }}
+ @endcomponent + @elseif($invoice->status_id === 4 && $client->getSetting('custom_message_paid_invoice')) + @component('portal.ninja2020.components.message') +
{{ $client->getSetting('custom_message_paid_invoice') }}
+ @endcomponent + @endif + + @if($invoice->isPayable()) + @livewire('invoice-pay', ['invitation_id' => $invitation->id, 'db' => $invoice->company->db]) + @endif + + @include('portal.ninja2020.components.entity-documents', ['entity' => $invoice]) + +@endsection + +@section('footer') + + + +@endsection + +@push('head') +@endpush