fix: cho phép người đã tải ảnh lên được quyền chỉnh sửa

This commit is contained in:
3dtours committed 2026-06-20 08:27:58 +07:00
1 parent ac11bb56db
commit ae74035ad5
12 files changed
+179 -83

No files matched your search

@@ -1,4 +1,4 @@
import{n as e}from"./index-DChzoIDA.js";var t=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.html2canvas=r())})(e,(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function r(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function i(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function a(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||t)}for(var o=function(){function e(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}return e.prototype.add=function(t,n,r,i){return new e(this.left+t,this.top+n,this.width+r,this.height+i)},e.fromClientRect=function(t,n){return new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height)},e.fromDOMRectList=function(t,n){var r=Array.from(n).find(function(e){return e.width!==0});return r?new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),s=function(e,t){return o.fromClientRect(e,t.getBoundingClientRect())},c=function(e){var t=e.body,n=e.documentElement;if(!t||!n)throw Error(`Unable to get document size`);return new o(0,0,Math.max(Math.max(t.scrollWidth,n.scrollWidth),Math.max(t.offsetWidth,n.offsetWidth),Math.max(t.clientWidth,n.clientWidth)),Math.max(Math.max(t.scrollHeight,n.scrollHeight),Math.max(t.offsetHeight,n.offsetHeight),Math.max(t.clientHeight,n.clientHeight)))},l=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),n--)}else t.push(i)}return t},u=function(){var e=[...arguments];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var t=e.length;if(!t)return``;for(var n=[],r=-1,i=``;++r<t;){var a=e[r];a<=65535?n.push(a):(a-=65536,n.push((a>>10)+55296,a%1024+56320)),(r+1===t||n.length>16384)&&(i+=String.fromCharCode.apply(String,n),n.length=0)}return i},d=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,f=typeof Uint8Array>`u`?[]:new Uint8Array(256),p=0;p<d.length;p++)f[d.charCodeAt(p)]=p;for(var m=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,h=typeof Uint8Array>`u`?[]:new Uint8Array(256),g=0;g<m.length;g++)h[m.charCodeAt(g)]=g;for(var _=function(e){var t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);var l=typeof ArrayBuffer<`u`&&typeof Uint8Array<`u`&&Uint8Array.prototype.slice!==void 0?new ArrayBuffer(t):Array(t),u=Array.isArray(l)?l:new Uint8Array(l);for(r=0;r<n;r+=4)a=h[e.charCodeAt(r)],o=h[e.charCodeAt(r+1)],s=h[e.charCodeAt(r+2)],c=h[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},v=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},y=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},b=5,x=11,S=2,C=x-b,w=65536>>b,T=(1<<b)-1,E=w+(1024>>b)+32,D=65536>>x,O=(1<<C)-1,ee=functLine truncated
import{n as e}from"./index-UWqs1Nt4.js";var t=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.html2canvas=r())})(e,(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function r(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function i(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function a(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||t)}for(var o=function(){function e(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}return e.prototype.add=function(t,n,r,i){return new e(this.left+t,this.top+n,this.width+r,this.height+i)},e.fromClientRect=function(t,n){return new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height)},e.fromDOMRectList=function(t,n){var r=Array.from(n).find(function(e){return e.width!==0});return r?new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),s=function(e,t){return o.fromClientRect(e,t.getBoundingClientRect())},c=function(e){var t=e.body,n=e.documentElement;if(!t||!n)throw Error(`Unable to get document size`);return new o(0,0,Math.max(Math.max(t.scrollWidth,n.scrollWidth),Math.max(t.offsetWidth,n.offsetWidth),Math.max(t.clientWidth,n.clientWidth)),Math.max(Math.max(t.scrollHeight,n.scrollHeight),Math.max(t.offsetHeight,n.offsetHeight),Math.max(t.clientHeight,n.clientHeight)))},l=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),n--)}else t.push(i)}return t},u=function(){var e=[...arguments];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var t=e.length;if(!t)return``;for(var n=[],r=-1,i=``;++r<t;){var a=e[r];a<=65535?n.push(a):(a-=65536,n.push((a>>10)+55296,a%1024+56320)),(r+1===t||n.length>16384)&&(i+=String.fromCharCode.apply(String,n),n.length=0)}return i},d=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,f=typeof Uint8Array>`u`?[]:new Uint8Array(256),p=0;p<d.length;p++)f[d.charCodeAt(p)]=p;for(var m=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,h=typeof Uint8Array>`u`?[]:new Uint8Array(256),g=0;g<m.length;g++)h[m.charCodeAt(g)]=g;for(var _=function(e){var t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);var l=typeof ArrayBuffer<`u`&&typeof Uint8Array<`u`&&Uint8Array.prototype.slice!==void 0?new ArrayBuffer(t):Array(t),u=Array.isArray(l)?l:new Uint8Array(l);for(r=0;r<n;r+=4)a=h[e.charCodeAt(r)],o=h[e.charCodeAt(r+1)],s=h[e.charCodeAt(r+2)],c=h[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},v=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},y=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},b=5,x=11,S=2,C=x-b,w=65536>>b,T=(1<<b)-1,E=w+(1024>>b)+32,D=65536>>x,O=(1<<C)-1,ee=functLine truncated
content: "" !important;
display: none !important;
}`,bc=function(e){xc(e,`.`+_c+hc+yc+`
-2
View File
@@ -1,2 +0,0 @@
/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-orange-50:oklch(98% .016 73.684);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-950:oklch(26.2% .051 172.552);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033Line truncated
+2
View File
@@ -0,0 +1,2 @@
/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-orange-50:oklch(98% .016 73.684);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-950:oklch(26.2% .051 172.552);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 Line truncated
@@ -2,10 +2,10 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
`+V+e}var ee=!1;function te(e,t){if(!e||ee)return``;ee=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
`),a=r.stack.split(`
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{ee=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?H(e):``}function ne(e){switch(e.tag){case 5:return H(e.type);case 16:return H(`Lazy`);case 13:return H(`Suspense`);case 19:return H(`SuspenseList`);case 0:case 2:case 15:return e=te(e.type,!1),e;case 11:return e=te(e.type.render,!1),e;case 1:return e=te(e.type,!0),e;default:return``}}function re(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case E:return`Fragment`;case T:return`Portal`;case O:return`Profiler`;case D:return`StrictMode`;case M:return`Suspense`;case N:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case A:return(e.displayName||`Context`)+`.Consumer`;case k:return(e._context.displayName||`Context`)+`.Provider`;case j:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case P:return t=e.displayName||null,t===null?re(e.type)||`Memo`:t;case F:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}function ie(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return re(t);case 8:return t===D?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function U(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function ae(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function oe(e){var t=ae(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function se(e){e._valueTracker||=oe(e)}function W(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=ae(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function ce(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function le(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ue(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=U(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function de(e,t){t=t.checked,t!=null&&S(e,`checked`,t,!1)}function fe(e,t){de(e,t);var n=U(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?me(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&me(e,t.type,U(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function pe(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function me(e,t,n){(t!==`number`||ce(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var he=Array.isArray;function ge(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+U(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function _e(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));retu Line truncated
`).replace(di,``)}function pi(e,t,n){if(t=fi(t),fi(e)!==t&&n)throw Error(r(425))}function mi(){}var hi=null,gi=null;function _i(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var vi=typeof setTimeout==`function`?setTimeout:void 0,yi=typeof clearTimeout==`function`?clearTimeout:void 0,bi=typeof Promise==`function`?Promise:void 0,xi=typeof queueMicrotask==`function`?queueMicrotask:bi===void 0?vi:function(e){return bi.resolve(null).then(e).catch(Si)};function Si(e){setTimeout(function(){throw e})}function Ci(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),rn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);rn(t)}function wi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Ti(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Ei=Math.random().toString(36).slice(2),Di=`__reactFiber$`+Ei,Oi=`__reactProps$`+Ei,ki=`__reactContainer$`+Ei,Ai=`__reactEvents$`+Ei,ji=`__reactListeners$`+Ei,Mi=`__reactHandles$`+Ei;function Ni(e){var t=e[Di];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ki]||n[Di]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ti(e);e!==null;){if(n=e[Di])return n;e=Ti(e)}return t}e=n,n=e.parentNode}return null}function Pi(e){return e=e[Di]||e[ki],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Ii(e){return e[Oi]||null}var Li=[],Ri=-1;function zi(e){return{current:e}}function Bi(e){0>Ri||(e.current=Li[Ri],Li[Ri]=null,Ri--)}function Vi(e,t){Ri++,Li[Ri]=e.current,e.current=t}var Hi={},Ui=zi(Hi),Wi=zi(!1),Gi=Hi;function Ki(e,t){var n=e.type.contextTypes;if(!n)return Hi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function qi(e){return e=e.childContextTypes,e!=null}function Ji(){Bi(Wi),Bi(Ui)}function Yi(e,t,n){if(Ui.current!==Hi)throw Error(r(168));Vi(Ui,t),Vi(Wi,n)}function Xi(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,ie(e)||`Unknown`,a));return B({},n,i)}function Zi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hi,Gi=Ui.current,Vi(Ui,e),Vi(Wi,Wi.current),!0}function Qi(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=Xi(e,t,Gi),i.__reactInternalMemoizedMergedChildContext=e,Bi(Wi),Bi(Ui),Vi(Ui,e)):Bi(Wi),Vi(Wi,n)}var $i=null,ea=!1,ta=!1;function na(e){$i===null?$i=[e]:$i.push(e)}function ra(e){ea=!0,na(e)}function ia(){if(!ta&&$i!==null){ta=!0;var e=0,t=Nt;try{var n=$i;for(Nt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}$i=null,ea=!1}catch(t){throw $i!==null&&($i=$i.slice(e+1)),it(ut,ia),t}finally{Nt=t,ta=!1}}return null}var aa=[],oa=0,sa=null,ca=0,la=[],ua=0,da=null,fa=1,pa=``;function ma(e,t){aa[oa++]=ca,aa[oa++]=sa,sa=e,ca=t}function ha(e,t,n){la[ua++]=fa,la[ua++]=pa,la[ua++]=da,da=e;var r=fa;e=pa;var i=32-vt(r)-1;r&=~(1<<i),n+=1;var a=32-vt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,fa=1<<32-vt(t)+i|n<<i|r,pa=a+e}else fa=1<<a|n<<i|r,pa=e}function ga(e){e.return!==null&&(ma(e,1),ha(e,1,0))}function _a(e){for(;e===sa;)sa=aa[--oa],aa[oa]=null,ca=aa[--oa],aa[oa]=null;for(;e===da;)da=la[--ua],la[ua]=null,pa=la[--ua],la[ua]=null,fa=la[--ua],la[ua]=null}var va=null,ya=null,ba=!1,xa=null;function Sa(e,t){var n=Xl(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ca(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,va=e,ya=wi(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,va=e,ya=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=da===null?null:{id:fa,overflow:pa},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Xl(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,va=e,ya=null,!0);default:return!1}}function wa(e){return(e.mode&1)!=0&&(e.flags&128)==0}function Ta(e){if(ba){var t=ya;if(t){var n=t;if(!Ca(e,t)){if(wa(e))throw Error(r(418));t=wi(n.nextSibling);var i=va;t&&Ca(e,t)?Sa(i,n):(e.flags=e.flags&-4097|2,ba=!1,va=e)}}else{if(wa(e))throw Error(r(418));e.flags=e.flags&-4097|2,ba=!1,va=e}}}function Ea(e){for(e=e.retu Line truncated
`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{ee=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?H(e):``}function ne(e){switch(e.tag){case 5:return H(e.type);case 16:return H(`Lazy`);case 13:return H(`Suspense`);case 19:return H(`SuspenseList`);case 0:case 2:case 15:return e=te(e.type,!1),e;case 11:return e=te(e.type.render,!1),e;case 1:return e=te(e.type,!0),e;default:return``}}function re(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case E:return`Fragment`;case T:return`Portal`;case O:return`Profiler`;case D:return`StrictMode`;case M:return`Suspense`;case N:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case A:return(e.displayName||`Context`)+`.Consumer`;case k:return(e._context.displayName||`Context`)+`.Provider`;case j:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case P:return t=e.displayName||null,t===null?re(e.type)||`Memo`:t;case F:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}function ie(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return re(t);case 8:return t===D?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function U(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function ae(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function oe(e){var t=ae(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function se(e){e._valueTracker||=oe(e)}function W(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=ae(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function ce(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function le(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ue(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=U(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function de(e,t){t=t.checked,t!=null&&S(e,`checked`,t,!1)}function fe(e,t){de(e,t);var n=U(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?me(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&me(e,t.type,U(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function pe(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function me(e,t,n){(t!==`number`||ce(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var he=Array.isArray;function ge(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+U(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function _e(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));retu Line truncated
`).replace(ui,``)}function fi(e,t,n){if(t=di(t),di(e)!==t&&n)throw Error(r(425))}function pi(){}var mi=null,hi=null;function gi(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _i=typeof setTimeout==`function`?setTimeout:void 0,vi=typeof clearTimeout==`function`?clearTimeout:void 0,yi=typeof Promise==`function`?Promise:void 0,bi=typeof queueMicrotask==`function`?queueMicrotask:yi===void 0?_i:function(e){return yi.resolve(null).then(e).catch(xi)};function xi(e){setTimeout(function(){throw e})}function Si(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),nn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);nn(t)}function Ci(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function wi(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Ti=Math.random().toString(36).slice(2),Ei=`__reactFiber$`+Ti,Di=`__reactProps$`+Ti,Oi=`__reactContainer$`+Ti,ki=`__reactEvents$`+Ti,Ai=`__reactListeners$`+Ti,ji=`__reactHandles$`+Ti;function Mi(e){var t=e[Ei];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Oi]||n[Ei]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=wi(e);e!==null;){if(n=e[Ei])return n;e=wi(e)}return t}e=n,n=e.parentNode}return null}function Ni(e){return e=e[Ei]||e[Oi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Pi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Fi(e){return e[Di]||null}var Ii=[],Li=-1;function Ri(e){return{current:e}}function zi(e){0>Li||(e.current=Ii[Li],Ii[Li]=null,Li--)}function Bi(e,t){Li++,Ii[Li]=e.current,e.current=t}var Vi={},Hi=Ri(Vi),Ui=Ri(!1),Wi=Vi;function Gi(e,t){var n=e.type.contextTypes;if(!n)return Vi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ki(e){return e=e.childContextTypes,e!=null}function qi(){zi(Ui),zi(Hi)}function Ji(e,t,n){if(Hi.current!==Vi)throw Error(r(168));Bi(Hi,t),Bi(Ui,n)}function Yi(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,ie(e)||`Unknown`,a));return B({},n,i)}function Xi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vi,Wi=Hi.current,Bi(Hi,e),Bi(Ui,Ui.current),!0}function Zi(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=Yi(e,t,Wi),i.__reactInternalMemoizedMergedChildContext=e,zi(Ui),zi(Hi),Bi(Hi,e)):zi(Ui),Bi(Ui,n)}var Qi=null,$i=!1,ea=!1;function ta(e){Qi===null?Qi=[e]:Qi.push(e)}function na(e){$i=!0,ta(e)}function ra(){if(!ea&&Qi!==null){ea=!0;var e=0,t=Nt;try{var n=Qi;for(Nt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Qi=null,$i=!1}catch(t){throw Qi!==null&&(Qi=Qi.slice(e+1)),it(ut,ra),t}finally{Nt=t,ea=!1}}return null}var ia=[],aa=0,oa=null,sa=0,ca=[],la=0,ua=null,da=1,fa=``;function pa(e,t){ia[aa++]=sa,ia[aa++]=oa,oa=e,sa=t}function ma(e,t,n){ca[la++]=da,ca[la++]=fa,ca[la++]=ua,ua=e;var r=da;e=fa;var i=32-vt(r)-1;r&=~(1<<i),n+=1;var a=32-vt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,da=1<<32-vt(t)+i|n<<i|r,fa=a+e}else da=1<<a|n<<i|r,fa=e}function ha(e){e.return!==null&&(pa(e,1),ma(e,1,0))}function ga(e){for(;e===oa;)oa=ia[--aa],ia[aa]=null,sa=ia[--aa],ia[aa]=null;for(;e===ua;)ua=ca[--la],ca[la]=null,fa=ca[--la],ca[la]=null,da=ca[--la],ca[la]=null}var _a=null,va=null,ya=!1,ba=null;function xa(e,t){var n=Yl(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Sa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,_a=e,va=Ci(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,_a=e,va=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=ua===null?null:{id:da,overflow:fa},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Yl(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,_a=e,va=null,!0);default:return!1}}function Ca(e){return(e.mode&1)!=0&&(e.flags&128)==0}function wa(e){if(ya){var t=va;if(t){var n=t;if(!Sa(e,t)){if(Ca(e))throw Error(r(418));t=Ci(n.nextSibling);var i=_a;t&&Sa(e,t)?xa(i,n):(e.flags=e.flags&-4097|2,ya=!1,_a=e)}}else{if(Ca(e))throw Error(r(418));e.flags=e.flags&-4097|2,ya=!1,_a=e}}}function Ta(e){for(e=e.retu Line truncated
Error generating stack: `+e.message+`
`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Es(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ds(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Os=typeof WeakMap==`function`?WeakMap:Map;function ks(e,t,n){n=eo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ol||(ol=!0,sl=r),Ds(e,t)},n}function As(e,t,n){n=eo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ds(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Ds(e,t),typeof r!=`function`&&(cl===null?cl=new Set([this]):cl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function js(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Os;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ul.bind(null,e,t,n),t.then(e,e))}function Ms(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Ns(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=eo(-1,1),t.tag=2,to(n,t,1))),n.lanes|=1),e)}var Ps=C.ReactCurrentOwner,Fs=!1;function Is(e,t,n,r){t.child=e===null?La(t,null,n,r):Ia(t,e.child,n,r)}function Ls(e,t,n,r,i){n=n.render;var a=t.ref;return Ga(t,i),r=Mo(e,t,n,r,a,i),n=No(),e!==null&&!Fs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,rc(e,t,i)):(ba&&n&&ga(t),t.flags|=1,Is(e,t,r,i),t.child)}function Rs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Zl(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,zs(e,t,a,r,i)):(e=eu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Cr:n,n(o,r)&&e.ref===t.ref)return rc(e,t,i)}return t.flags|=1,e=$l(a,r),e.ref=t.ref,e.return=t,t.child=e}function zs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Cr(a,r)&&e.ref===t.ref)if(Fs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Fs=!0);else return t.lanes=e.lanes,rc(e,t,i)}return Hs(e,t,n,r,i)}function Bs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Vi(Yc,Jc),Jc|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Vi(Yc,Jc),Jc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,Vi(Yc,Jc),Jc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),Vi(Yc,Jc),Jc|=r;return Is(e,t,i,n),t.child}function Vs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Hs(e,t,n,r,i){var a=qi(n)?Gi:Ui.current;return a=Ki(t,a),Ga(t,i),n=Mo(e,t,n,r,a,i),r=No(),e!==null&&!Fs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,rc(e,t,i)):(ba&&r&&ga(t),t.flags|=1,Is(e,t,n,i),t.child)}function Us(e,t,n,r,i){if(qi(n)){var a=!0;Zi(t)}else a=!1;if(Ga(t,i),t.stateNode===null)nc(e,t),Ss(t,n,r),ws(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=Ka(l):(l=qi(n)?Gi:Ui.current,l=Ki(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Cs(t,o,r,l),Za=!1;var f=t.memoizedState;o.state=f,io(t,r,o,i),c=t.memoizedState,s!==r||f!==c||Wi.current||Za?(typeof u==`function`&&(ys(t,n,u,r),c=t.memoizedState),(s=Za||xs(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,$a(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:vs(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=Ka(c):(c=qi(n)?Gi:Ui.current,c=Ki(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Cs(t,o,r,c),Za=!1,f=t.memoizedState,o.state=f,io(t,r,o,i);var m=t.memoizedState;s!==d|| Line truncated
`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Ts(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Es(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Ds=typeof WeakMap==`function`?WeakMap:Map;function Os(e,t,n){n=$a(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){al||(al=!0,ol=r),Es(e,t)},n}function ks(e,t,n){n=$a(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Es(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Es(e,t),typeof r!=`function`&&(sl===null?sl=new Set([this]):sl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function As(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ds;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Hl.bind(null,e,t,n),t.then(e,e))}function js(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Ms(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=$a(-1,1),t.tag=2,eo(n,t,1))),n.lanes|=1),e)}var Ns=C.ReactCurrentOwner,Ps=!1;function Fs(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function Is(e,t,n,r,i){n=n.render;var a=t.ref;return Wa(t,i),r=jo(e,t,n,r,a,i),n=Mo(),e!==null&&!Ps?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,nc(e,t,i)):(ya&&n&&ha(t),t.flags|=1,Fs(e,t,r,i),t.child)}function Ls(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Xl(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Rs(e,t,a,r,i)):(e=$l(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Sr:n,n(o,r)&&e.ref===t.ref)return nc(e,t,i)}return t.flags|=1,e=Ql(a,r),e.ref=t.ref,e.return=t,t.child=e}function Rs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Sr(a,r)&&e.ref===t.ref)if(Ps=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Ps=!0);else return t.lanes=e.lanes,nc(e,t,i)}return Vs(e,t,n,r,i)}function zs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bi(Jc,qc),qc|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Bi(Jc,qc),qc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,Bi(Jc,qc),qc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),Bi(Jc,qc),qc|=r;return Fs(e,t,i,n),t.child}function Bs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Vs(e,t,n,r,i){var a=Ki(n)?Wi:Hi.current;return a=Gi(t,a),Wa(t,i),n=jo(e,t,n,r,a,i),r=Mo(),e!==null&&!Ps?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,nc(e,t,i)):(ya&&r&&ha(t),t.flags|=1,Fs(e,t,n,i),t.child)}function Hs(e,t,n,r,i){if(Ki(n)){var a=!0;Xi(t)}else a=!1;if(Wa(t,i),t.stateNode===null)tc(e,t),xs(t,n,r),Cs(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=Ga(l):(l=Ki(n)?Wi:Hi.current,l=Gi(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Ss(t,o,r,l),Xa=!1;var f=t.memoizedState;o.state=f,ro(t,r,o,i),c=t.memoizedState,s!==r||f!==c||Ui.current||Xa?(typeof u==`function`&&(vs(t,n,u,r),c=t.memoizedState),(s=Xa||bs(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Qa(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:_s(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=Ga(c):(c=Ki(n)?Wi:Hi.current,c=Gi(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Ss(t,o,r,c),Xa=!1,f=t.memoizedState,o.state=f,ro(t,r,o,i);var m=t.memoizedState;s!==d|| Line truncated
@keyframes gentle-shake {
0%, 100% {
transform: rotate(0deg) scale(1);
@@ -35,7 +35,7 @@ Error generating stack: `+e.message+`
-ms-overflow-style: none;
scrollbar-width: none;
}
`})]}),(0,q.jsx)(`div`,{className:`absolute bottom-[calc(2rem+env(safe-area-inset-bottom,0px))] left-1/2 -translate-x-1/2 z-20 w-full px-4`,children:(0,q.jsxs)(`button`,{onClick:n,className:`w-full max-w-md mx-auto flex items-center justify-center gap-3 bg-white/20 backdrop-blur-lg text-white font-bold py-4 px-8 rounded-2xl transition-all shadow-2xl border border-white/30 hover:bg-white/30 active:scale-95`,children:[(0,q.jsx)(fe,{className:`w-5 h-5`}),`Khám phá các hành trình du lịch`]})}),(0,q.jsx)(ze,{isOpen:a,onClose:()=>o(!1),onSwitchToSignup:t,onLoginSuccess:r})]})};function Ge(e,t){let n=(0,Ke.useRef)(t);(0,Ke.useEffect)(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}var Ke,qe=o((()=>{Ke=u(p(),1)}));function Je(e,t,n){t.center!==n.center&&e.setLatLng(t.center),t.radius!=null&&t.radius!==n.radius&&e.setRadius(t.radius)}var Ye=o((()=>{}));function Xe(e){return Object.freeze({__version:1,map:e})}function Ze(e,t){return Object.freeze({...e,...t})}function Qe(){let e=(0,$e.useContext)(et);if(e==null)throw Error(`No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>`);return e}var $e,et,tt,nt=o((()=>{$e=u(p(),1),et=(0,$e.createContext)(null),tt=et.Provider}));function rt(e){function t(t,n){let{instance:r,context:i}=e(t).current;return(0,ot.useImperativeHandle)(n,()=>r),t.children==null?null:ot.createElement(tt,{value:i},t.children)}return(0,ot.forwardRef)(t)}function it(e){function t(t,n){let[r,i]=(0,ot.useState)(!1),{instance:a}=e(t,i).current;(0,ot.useImperativeHandle)(n,()=>a),(0,ot.useEffect)(function(){r&&a.update()},[a,r,t.children]);let o=a._contentNode;return o?(0,st.createPortal)(t.children,o):null}return(0,ot.forwardRef)(t)}function at(e){function t(t,n){let{instance:r}=e(t).current;return(0,ot.useImperativeHandle)(n,()=>r),null}return(0,ot.forwardRef)(t)}var ot,st,ct=o((()=>{ot=u(p(),1),st=_(),nt()}));function lt(e){return function(t){let n=Qe(),r=e(t,n),{instance:i}=r.current,a=(0,ut.useRef)(t.position),{position:o}=t;return(0,ut.useEffect)(function(){return i.addTo(n.map),function(){i.remove()}},[n.map,i]),(0,ut.useEffect)(function(){o!=null&&o!==a.current&&(i.setPosition(o),a.current=o)},[i,o]),r}}var ut,dt=o((()=>{ut=u(p(),1),nt()}));function ft(e,t){let n=(0,pt.useRef)();(0,pt.useEffect)(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}var pt,mt=o((()=>{pt=u(p(),1)}));function ht(e,t){let n=e.pane??t.pane;return n?{...e,pane:n}:e}var gt=o((()=>{}));function _t(e,t){return function(n,r){let i=Qe(),a=e(ht(n,i),i);return Ge(i.map,n.attribution),ft(a.current,n.eventHandlers),t(a.current,i,n,r),a}}var vt=o((()=>{qe(),nt(),mt(),gt()})),yt=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.leaflet={}))})(e,(function(e){var t=`1.9.4`;function n(e){var t,n,r,i;for(n=1,r=arguments.length;n<r;n++)for(t in i=arguments[n],i)e[t]=i[t];return e}var r=Object.create||(function(){function e(){}return function(t){return e.prototype=t,new e}})();function i(e,t){var n=Array.prototype.slice;if(e.bind)return e.bind.apply(e,n.call(arguments,1));var r=n.call(arguments,2);return function(){return e.apply(t,r.length?r.concat(n.call(arguments)):arguments)}}var a=0;function o(e){return`_leaflet_id`in e||(e._leaflet_id=++a),e._leaflet_id}function s(e,t,n){var r,i,a,o=function(){r=!1,i&&=(a.apply(n,i),!1)};return a=function(){r?i=arguments:(e.apply(n,arguments),setTimeout(o,t),r=!0)},a}function c(e,t,n){var r=t[1],i=t[0],a=r-i;return e===r&&n?e:((e-i)%a+a)%a+i}function l(){return!1}function u(e,t){if(t===!1)return e;var n=10**(t===void 0?6:t);return Math.round(e*n)/n}function d(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,``)}function f(e){return d(e).split(/\s+/)}function p(e,t){for(var n in Object.prototype.hasOwnProperty.call(e,`options`)||(e.options=e.options?r(e.options):{}),t)e.options[n]=t[n];return e.options}function m(e,t,n){var r=[];for(var i in e)r.push(encodeURIComponent(n?i.toUpperCase():i)+`=`+encodeURIComponent(e[i]));return(!t||t.indexOf(`?`)===-1?`?`:`&`)+r.join(`&`)}var h=/\{ *([\w_ -]+) *\}/g;function g(e,t){return e.replace(h,function(e,n){var r=t[n];if(r===void 0)throw Error(`No value provided for variable `+e);return typeof r==`function`&&(r=r(t)),r})}var _=Array.isArray||function(e){return Object.prototype.toString.call(e)===`[object Array]`};function v(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var y=`data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=`;function b(e){return window[`webkit`+e]||window[`moz`+e]||window[`ms`+e]}var x=0;function S(e){var t=+new Date,n=Math.max(0,16-(t-x));return x=t+n,window.setTimeout(e,n)}var C=window.requestAnimationFrame||b(`RequestAnimatiLine truncated
`})]}),(0,q.jsx)(`div`,{className:`absolute bottom-[calc(2rem+env(safe-area-inset-bottom,0px))] left-1/2 -translate-x-1/2 z-20 w-full px-4`,children:(0,q.jsxs)(`button`,{onClick:n,className:`w-full max-w-md mx-auto flex items-center justify-center gap-3 bg-white/20 backdrop-blur-lg text-white font-bold py-4 px-8 rounded-2xl transition-all shadow-2xl border border-white/30 hover:bg-white/30 active:scale-95`,children:[(0,q.jsx)(fe,{className:`w-5 h-5`}),`Khám phá các hành trình du lịch`]})}),(0,q.jsx)(ze,{isOpen:a,onClose:()=>o(!1),onSwitchToSignup:t,onLoginSuccess:r})]})};function Ge(e,t){let n=(0,Ke.useRef)(t);(0,Ke.useEffect)(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}var Ke,qe=o((()=>{Ke=u(p(),1)}));function Je(e,t,n){t.center!==n.center&&e.setLatLng(t.center),t.radius!=null&&t.radius!==n.radius&&e.setRadius(t.radius)}var Ye=o((()=>{}));function Xe(e){return Object.freeze({__version:1,map:e})}function Ze(e,t){return Object.freeze({...e,...t})}function Qe(){let e=(0,$e.useContext)(et);if(e==null)throw Error(`No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>`);return e}var $e,et,tt,nt=o((()=>{$e=u(p(),1),et=(0,$e.createContext)(null),tt=et.Provider}));function rt(e){function t(t,n){let{instance:r,context:i}=e(t).current;return(0,ot.useImperativeHandle)(n,()=>r),t.children==null?null:ot.createElement(tt,{value:i},t.children)}return(0,ot.forwardRef)(t)}function it(e){function t(t,n){let[r,i]=(0,ot.useState)(!1),{instance:a}=e(t,i).current;(0,ot.useImperativeHandle)(n,()=>a),(0,ot.useEffect)(function(){r&&a.update()},[a,r,t.children]);let o=a._contentNode;return o?(0,st.createPortal)(t.children,o):null}return(0,ot.forwardRef)(t)}function at(e){function t(t,n){let{instance:r}=e(t).current;return(0,ot.useImperativeHandle)(n,()=>r),null}return(0,ot.forwardRef)(t)}var ot,st,ct=o((()=>{ot=u(p(),1),st=_(),nt()}));function lt(e){return function(t){let n=Qe(),r=e(t,n),{instance:i}=r.current,a=(0,ut.useRef)(t.position),{position:o}=t;return(0,ut.useEffect)(function(){return i.addTo(n.map),function(){i.remove()}},[n.map,i]),(0,ut.useEffect)(function(){o!=null&&o!==a.current&&(i.setPosition(o),a.current=o)},[i,o]),r}}var ut,dt=o((()=>{ut=u(p(),1),nt()}));function ft(e,t){let n=(0,pt.useRef)();(0,pt.useEffect)(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}var pt,mt=o((()=>{pt=u(p(),1)}));function ht(e,t){let n=e.pane??t.pane;return n?{...e,pane:n}:e}var gt=o((()=>{}));function _t(e,t){return function(n,r){let i=Qe(),a=e(ht(n,i),i);return Ge(i.map,n.attribution),ft(a.current,n.eventHandlers),t(a.current,i,n,r),a}}var vt=o((()=>{qe(),nt(),mt(),gt()})),yt=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.leaflet={}))})(e,(function(e){var t=`1.9.4`;function n(e){var t,n,r,i;for(n=1,r=arguments.length;n<r;n++)for(t in i=arguments[n],i)e[t]=i[t];return e}var r=Object.create||(function(){function e(){}return function(t){return e.prototype=t,new e}})();function i(e,t){var n=Array.prototype.slice;if(e.bind)return e.bind.apply(e,n.call(arguments,1));var r=n.call(arguments,2);return function(){return e.apply(t,r.length?r.concat(n.call(arguments)):arguments)}}var a=0;function o(e){return`_leaflet_id`in e||(e._leaflet_id=++a),e._leaflet_id}function s(e,t,n){var r,i,a,o=function(){r=!1,i&&=(a.apply(n,i),!1)};return a=function(){r?i=arguments:(e.apply(n,arguments),setTimeout(o,t),r=!0)},a}function c(e,t,n){var r=t[1],i=t[0],a=r-i;return e===r&&n?e:((e-i)%a+a)%a+i}function l(){return!1}function u(e,t){if(t===!1)return e;var n=10**(t===void 0?6:t);return Math.round(e*n)/n}function d(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,``)}function f(e){return d(e).split(/\s+/)}function p(e,t){for(var n in Object.prototype.hasOwnProperty.call(e,`options`)||(e.options=e.options?r(e.options):{}),t)e.options[n]=t[n];return e.options}function m(e,t,n){var r=[];for(var i in e)r.push(encodeURIComponent(n?i.toUpperCase():i)+`=`+encodeURIComponent(e[i]));return(!t||t.indexOf(`?`)===-1?`?`:`&`)+r.join(`&`)}var h=/\{ *([\w_ -]+) *\}/g;function g(e,t){return e.replace(h,function(e,n){var r=t[n];if(r===void 0)throw Error(`No value provided for variable `+e);return typeof r==`function`&&(r=r(t)),r})}var _=Array.isArray||function(e){return Object.prototype.toString.call(e)===`[object Array]`};function v(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var y=`data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=`;function b(e){return window[`webkit`+e]||window[`moz`+e]||window[`ms`+e]}var x=0;function S(e){var t=+new Date,n=Math.max(0,16-(t-x));return x=t+n,window.setTimeout(e,n)}var C=window.requestAnimationFrame||b(`RequestAnimatiLine truncated
.no-scrollbar::-webkit-scrollbar {
display: none;
}
@@ -43,7 +43,7 @@ Error generating stack: `+e.message+`
-ms-overflow-style: none;
scrollbar-width: none;
}
`})]})]}),(0,q.jsxs)(`div`,{className:`w-full md:w-2/5 h-3/5 md:h-full flex flex-col bg-slate-900 border-t md:border-t-0 md:border-l border-slate-800`,children:[(0,q.jsx)(`div`,{className:`p-6 border-b border-slate-800 flex items-center justify-between`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`h3`,{className:`text-lg font-black tracking-tight text-white flex items-center gap-2`,children:[(0,q.jsx)(pe,{className:`w-5 h-5 text-emerald-500`}),`Bình luận cộng đồng`]}),(0,q.jsx)(`p`,{className:`text-xs text-slate-400 mt-1`,children:`Ảnh chia sẻ công khai trên bản đồ`})]})}),(0,q.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-6 space-y-4 bg-slate-900/50`,children:[d?(0,q.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 text-slate-500 gap-2`,children:[(0,q.jsx)(oe,{className:`w-8 h-8 animate-spin text-emerald-500`}),(0,q.jsx)(`span`,{className:`text-xs font-semibold`,children:`Đang tải bình luận...`})]}):s.length===0?(0,q.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-slate-500 gap-3`,children:[(0,q.jsx)(`div`,{className:`p-4 bg-slate-800/40 rounded-full text-slate-600`,children:(0,q.jsx)(pe,{className:`w-8 h-8`})}),(0,q.jsx)(`span`,{className:`text-sm font-semibold italic`,children:`Chưa có bình luận nào. Hãy bắt đầu cuộc trò chuyện!`})]}):s.map(e=>(0,q.jsxs)(`div`,{className:`flex gap-3 items-start animate-in fade-in slide-in-from-bottom-2 duration-200`,children:[(0,q.jsx)(`div`,{className:`w-8 h-8 rounded-full bg-slate-800 flex items-center justify-center flex-shrink-0 border border-slate-700/60`,children:(0,q.jsx)(K,{className:`w-4.5 h-4.5 text-slate-400`})}),(0,q.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,q.jsxs)(`div`,{className:`bg-slate-800/55 p-3.5 rounded-2xl rounded-tl-none border border-slate-800 shadow-lg`,children:[(0,q.jsxs)(`div`,{className:`flex justify-between items-center mb-1`,children:[(0,q.jsx)(`span`,{className:`text-xs font-black text-slate-200 truncate`,children:e.userName}),(0,q.jsx)(`span`,{className:`text-[9px] font-medium text-slate-500`,children:new Date(e.createdAt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})})]}),(0,q.jsx)(`p`,{className:`text-sm text-slate-300 leading-relaxed break-words`,children:e.content})]})})]},e.id)),(0,q.jsx)(`div`,{ref:h})]}),(0,q.jsx)(`div`,{className:`p-4 bg-slate-950/40 border-t border-slate-800/80`,children:(0,q.jsxs)(`div`,{className:`relative flex items-center gap-2`,children:[(0,q.jsx)(`input`,{type:`text`,value:l,onChange:e=>u(e.target.value),onKeyDown:e=>e.key===`Enter`&&!p&&ne(),placeholder:`Viết bình luận công khai...`,className:`flex-1 bg-slate-800/65 border border-slate-700/70 text-slate-100 placeholder-slate-500 rounded-2xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:border-transparent transition-all`,disabled:p}),(0,q.jsx)(`button`,{onClick:ne,disabled:!l.trim()||p,className:`p-3 bg-emerald-600 hover:bg-emerald-500 disabled:bg-slate-800 disabled:opacity-40 text-white rounded-2xl transition-all active:scale-95 shadow-lg shadow-emerald-950/30 flex items-center justify-center`,children:p?(0,q.jsx)(oe,{className:`w-4.5 h-4.5 animate-spin`}):(0,q.jsx)(Ce,{className:`w-4.5 h-4.5`})})]})})]})]}),(0,q.jsx)(Ci,{isOpen:M,onClose:()=>N(!1),initialLat:typeof T==`number`?T:void 0,initialLng:typeof D==`number`?D:void 0,onSelect:(e,t)=>{E(e),O(t)}})]}):null},Ti=bn.default.default||bn.default,Ei=Qt.default.icon({iconUrl:`https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png`,shadowUrl:`https://unpkg.com/leaflet@1.9.4/dist/images/marker-shadow.png`,iconSize:[25,41],iconAnchor:[12,41]});Qt.default.Marker.prototype.options.icon=Ei;function Di({position:e}){let t=Xt();return(0,y.useEffect)(()=>{t.setView(e,t.getZoom())},[e,t]),null}function Oi({onMapAction:e}){return Zt({click:()=>e(),movestart:e,dragstart:e}),null}function ki(){let e=En(e=>e.setMapCenter);return Zt({moveend:t=>{let n=t.target,r=n.getCenter(),i=n.getZoom(),a=[r.lat,r.lng];e(a),localStorage.setItem(`map_view_state`,JSON.stringify({center:a,zoom:i}))}}),null}var Ai=({onBack:e,onLogout:t,user:n,onViewTour:r,onOpenMyPhotos:i,onLoginSuccess:a})=>{let o=En(e=>e.publicTours),s=En(e=>e.fetchPublicTours),c=En(e=>e.fetchTour),l=En(e=>e.setMapCenter),u=He(),[d]=(0,y.useState)(()=>{let e=localStorage.getItem(`map_view_state`);if(e)try{return JSON.parse(e)}catch{return null}return null}),[f,p]=(0,y.useState)(d?.center||[10.7769,106.7009]),[m]=(0,y.useState)(d?.zoom||13),[h,g]=(0,y.useState)([]),[_,v]=(0,y.useState)(null),[b,x]=(0,y.useState)([]),S=y.useMemo(()=>{let e={};return h.forEach(t=>{let n=t.metadata?.lat,r=t.metadata?.lng;if(typeof n==`number`&&typeof r==`number`){let i=`${n.toFixed(5)},${r.toFixed(5)}`;e[i]||(e[i]=[]),e[i].push(t)}}),Object.values(e)},[h]),C=async()=>{try{let e=await fetch(`/api/v1/public-photos`);e.ok&&g(await e.json())}catch(e){console.error(`Error fetching public photos:`,e)}},[w,T]=(0,y.useState Line truncated
`})]})]}),(0,q.jsxs)(`div`,{className:`block md:hidden p-6 bg-slate-900 border-t border-slate-800/60 space-y-4 shrink-0`,children:[(0,q.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2.5 text-left`,children:[(0,q.jsx)(`div`,{className:`p-2.5 bg-emerald-500/10 rounded-xl text-emerald-400`,children:(0,q.jsx)(K,{className:`w-5 h-5`})}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`text-[10px] text-slate-450 block uppercase font-bold tracking-wider`,children:`Người đăng ảnh`}),(0,q.jsx)(`span`,{className:`text-sm font-semibold text-white`,children:n.uploader?.name||`Ẩn danh`})]})]}),ae&&n.originalUrl&&(0,q.jsxs)(`a`,{href:n.originalUrl,download:!0,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1.5 bg-slate-850 hover:bg-slate-800 border border-slate-700 text-slate-200 hover:text-white font-bold py-2 px-4 rounded-xl transition-all text-xs`,children:[(0,q.jsx)(V,{className:`w-4 h-4 text-emerald-500`}),`Tải ảnh gốc`]})]}),(0,q.jsx)(`div`,{className:`border-t border-slate-800/60 pt-2`})]}),(0,q.jsxs)(`div`,{className:`w-full md:w-2/5 h-auto md:h-full flex flex-col bg-slate-900 border-t md:border-t-0 md:border-l border-slate-800`,children:[(0,q.jsx)(`div`,{className:`p-6 border-b border-slate-800 flex items-center justify-between`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`h3`,{className:`text-lg font-black tracking-tight text-white flex items-center gap-2`,children:[(0,q.jsx)(pe,{className:`w-5 h-5 text-emerald-500`}),`Bình luận cộng đồng`]}),(0,q.jsx)(`p`,{className:`text-xs text-slate-400 mt-1`,children:`Ảnh chia sẻ công khai trên bản đồ`})]})}),(0,q.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-6 space-y-4 bg-slate-900/50`,children:[d?(0,q.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 text-slate-500 gap-2`,children:[(0,q.jsx)(oe,{className:`w-8 h-8 animate-spin text-emerald-500`}),(0,q.jsx)(`span`,{className:`text-xs font-semibold`,children:`Đang tải bình luận...`})]}):s.length===0?(0,q.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-slate-500 gap-3`,children:[(0,q.jsx)(`div`,{className:`p-4 bg-slate-800/40 rounded-full text-slate-600`,children:(0,q.jsx)(pe,{className:`w-8 h-8`})}),(0,q.jsx)(`span`,{className:`text-sm font-semibold italic`,children:`Chưa có bình luận nào. Hãy bắt đầu cuộc trò chuyện!`})]}):s.map(e=>(0,q.jsxs)(`div`,{className:`flex gap-3 items-start animate-in fade-in slide-in-from-bottom-2 duration-200`,children:[(0,q.jsx)(`div`,{className:`w-8 h-8 rounded-full bg-slate-800 flex items-center justify-center flex-shrink-0 border border-slate-700/60`,children:(0,q.jsx)(K,{className:`w-4.5 h-4.5 text-slate-400`})}),(0,q.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,q.jsxs)(`div`,{className:`bg-slate-800/55 p-3.5 rounded-2xl rounded-tl-none border border-slate-800 shadow-lg`,children:[(0,q.jsxs)(`div`,{className:`flex justify-between items-center mb-1`,children:[(0,q.jsx)(`span`,{className:`text-xs font-black text-slate-200 truncate`,children:e.userName}),(0,q.jsx)(`span`,{className:`text-[9px] font-medium text-slate-500`,children:new Date(e.createdAt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})})]}),(0,q.jsx)(`p`,{className:`text-sm text-slate-300 leading-relaxed break-words`,children:e.content})]})})]},e.id)),(0,q.jsx)(`div`,{ref:h})]}),(0,q.jsx)(`div`,{className:`p-4 bg-slate-950/40 border-t border-slate-800/80`,children:(0,q.jsxs)(`div`,{className:`relative flex items-center gap-2`,children:[(0,q.jsx)(`input`,{type:`text`,value:l,onChange:e=>u(e.target.value),onKeyDown:e=>e.key===`Enter`&&!p&&U(),placeholder:`Viết bình luận công khai...`,className:`flex-1 bg-slate-800/65 border border-slate-700/70 text-slate-100 placeholder-slate-500 rounded-2xl px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:border-transparent transition-all`,disabled:p}),(0,q.jsx)(`button`,{onClick:U,disabled:!l.trim()||p,className:`p-3 bg-emerald-600 hover:bg-emerald-500 disabled:bg-slate-800 disabled:opacity-40 text-white rounded-2xl transition-all active:scale-95 shadow-lg shadow-emerald-950/30 flex items-center justify-center`,children:p?(0,q.jsx)(oe,{className:`w-4.5 h-4.5 animate-spin`}):(0,q.jsx)(Ce,{className:`w-4.5 h-4.5`})})]})})]})]}),(0,q.jsx)(Si,{isOpen:M,onClose:()=>N(!1),initialLat:typeof T==`number`?T:void 0,initialLng:typeof D==`number`?D:void 0,onSelect:(e,t)=>{E(e),O(t)}}),I&&(0,q.jsxs)(`div`,{className:`fixed inset-0 z-[9999] bg-black/95 flex items-center justify-center cursor-zoom-out animate-in fade-in duration-200`,onClick:()=>R(!1),children:[(0,q.jsx)(`button`,{onClick:()=>R(!1),className:`fixed top-6 right-6 p-3 bg-black/50 hover:bg-black/75 border border-white/10 rounded-full text-white transition-colors z-[10000]`,children:(0,q.jsx)(Ie,{className:`w-6 h-6`})}),(0,q.jsx)(`img`,{src:n.imageUrl,alt:`FulLine truncated
<div class="relative group">
<div class="w-12 h-12 rounded-full border-4 border-white shadow-lg overflow-hidden transition-transform group-hover:scale-110">
<img src="${n}" class="w-full h-full object-cover" onerror="this.src='https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?w=100'"/>
@@ -52,7 +52,7 @@ Error generating stack: `+e.message+`
S
</div>
</div>
`,iconSize:[48,48],iconAnchor:[24,24]}),children:(0,q.jsx)(sn,{direction:`top`,offset:[0,-20],opacity:1,children:(0,q.jsxs)(`div`,{className:`p-1 max-w-[180px]`,children:[(0,q.jsx)(`div`,{className:`font-black text-blue-600 text-[11px] mb-0.5 uppercase tracking-tight truncate`,children:e.title}),e.tags&&e.tags.length>0&&(0,q.jsx)(`div`,{className:`flex flex-wrap gap-1 mb-1`,children:e.tags.map(e=>(0,q.jsx)(`span`,{className:`px-1.5 py-0.5 bg-blue-50 text-blue-500 rounded text-[8px] font-bold border border-blue-100`,children:e},e))}),e.description&&(0,q.jsx)(`div`,{className:`text-[10px] text-gray-500 line-clamp-2 leading-tight italic`,children:e.description})]})})},e.id)})},`cluster-${re.length}`),S.map(e=>{let t=e[0],n=t.metadata?.lat,r=t.metadata?.lng;return typeof n!=`number`||typeof r!=`number`?null:(0,q.jsx)(nn,{position:[n,r],eventHandlers:{click:()=>{v(t),x(e)}},icon:Qt.default.divIcon({className:`custom-photo-bubble`,html:`
`,iconSize:[48,48],iconAnchor:[24,24]}),children:(0,q.jsx)(on,{direction:`top`,offset:[0,-20],opacity:1,children:(0,q.jsxs)(`div`,{className:`p-1 max-w-[180px]`,children:[(0,q.jsx)(`div`,{className:`font-black text-blue-600 text-[11px] mb-0.5 uppercase tracking-tight truncate`,children:e.title}),e.tags&&e.tags.length>0&&(0,q.jsx)(`div`,{className:`flex flex-wrap gap-1 mb-1`,children:e.tags.map(e=>(0,q.jsx)(`span`,{className:`px-1.5 py-0.5 bg-blue-50 text-blue-500 rounded text-[8px] font-bold border border-blue-100`,children:e},e))}),e.description&&(0,q.jsx)(`div`,{className:`text-[10px] text-gray-500 line-clamp-2 leading-tight italic`,children:e.description})]})})},e.id)})},`cluster-${re.length}`),S.map(e=>{let t=e[0],n=t.metadata?.lat,r=t.metadata?.lng;return typeof n!=`number`||typeof r!=`number`?null:(0,q.jsx)(tn,{position:[n,r],eventHandlers:{click:()=>{v(t),x(e)}},icon:Zt.default.divIcon({className:`custom-photo-bubble`,html:`
<div class="relative group">
<div class="w-12 h-12 rounded-full border-4 border-emerald-500 shadow-lg overflow-hidden transition-transform group-hover:scale-110">
<img src="${t.imageUrl}" class="w-full h-full object-cover" />
@@ -66,59 +66,59 @@ Error generating stack: `+e.message+`
</div>
`:``}
</div>
`,iconSize:[48,48],iconAnchor:[24,24]})},t.id)})]}),V&&(0,q.jsx)(`div`,{className:`absolute z-[2000] bg-white rounded-2xl shadow-2xl border border-gray-100 py-2 w-48 animate-in zoom-in-95 duration-200`,style:{top:V.y,left:V.x},onClick:e=>e.stopPropagation(),children:V.canShare?(0,q.jsxs)(`button`,{onClick:()=>te(V.id,V.title),className:`w-full text-left px-4 py-2 hover:bg-blue-50 text-sm font-bold text-gray-700 flex items-center gap-2 transition-colors`,children:[(0,q.jsx)(Te,{className:`w-4 h-4 text-blue-600`}),` Sao chép liên kết`]}):(0,q.jsx)(`div`,{className:`px-4 py-2 text-xs text-gray-400 italic`,children:`Bạn không có quyền chia sẻ tour này`})}),(0,q.jsx)(Dn,{isOpen:w,onClose:()=>T(!1)}),(0,q.jsx)(On,{isOpen:E,onClose:()=>D(!1),onSuccess:e=>{let t=localStorage.getItem(`my_journey_notes`),n=[];try{n=t?JSON.parse(t):[]}catch{n=[]}let i={id:Date.now().toString(),title:`Ghi chú của hành trình: ${e.title}`,content:`<p>Bắt đầu lập kế hoạch cho chuyến đi <strong>${e.title}</strong> của bạn tại đây...</p>`,createdAt:new Date().toISOString()};localStorage.setItem(`my_journey_notes`,JSON.stringify([i,...n])),c(e.id),r(e.id)}}),_&&(0,q.jsx)(wi,{isOpen:!!_,onClose:()=>{v(null),x([])},photo:_,photoGroup:b,onSelectPhoto:e=>v(e),onLoginSuccess:a,onUpdatePhoto:e=>{g(t=>t.map(t=>t.id===e.id?e:t)),v(e),x(t=>t.map(t=>t.id===e.id?e:t))}})]})};function ji(e){"@babel/helpers - typeof";return ji=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ji(e)}function Mi(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Ni(e,t){if(t.length<e)throw TypeError(e+` argument`+(e>1?`s`:``)+` required, but only `+t.length+` present`)}function Pi(e){Ni(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||ji(e)===`object`&&t===`[object Date]`?new Date(e.getTime()):typeof e==`number`||t===`[object Number]`?new Date(e):((typeof e==`string`||t===`[object String]`)&&typeof console<`u`&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}function Fi(e,t){Ni(2,arguments);var n=Pi(e).getTime(),r=Mi(t);return new Date(n+r)}var Ii={};function Li(){return Ii}function Ri(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var zi=365.2425,Bi=10**8*24*60*60*1e3,Vi=6e4,Hi=36e5;-Bi;var Ui=3600*24;Ui*7,Ui*zi/12*3;function Wi(e){return Ni(1,arguments),e instanceof Date||ji(e)===`object`&&Object.prototype.toString.call(e)===`[object Date]`}function Gi(e){if(Ni(1,arguments),!Wi(e)&&typeof e!=`number`)return!1;var t=Pi(e);return!isNaN(Number(t))}function Ki(e,t){return Ni(2,arguments),Pi(e).getTime()-Pi(t).getTime()}var qi={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},Ji=`trunc`;function Yi(e){return e?qi[e]:qi[Ji]}function Xi(e,t,n){Ni(2,arguments);var r=Ki(e,t)/Vi;return Yi(n?.roundingMethod)(r)}function Zi(e,t){return Ni(2,arguments),Fi(e,-Mi(t))}var Qi=864e5;function $i(e){Ni(1,arguments);var t=Pi(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/Qi)+1}function ea(e){Ni(1,arguments);var t=1,n=Pi(e),r=n.getUTCDay(),i=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function ta(e){Ni(1,arguments);var t=Pi(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=ea(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=ea(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function na(e){Ni(1,arguments);var t=ta(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),ea(n)}var ra=6048e5;function ia(e){Ni(1,arguments);var t=Pi(e),n=ea(t).getTime()-na(t).getTime();return Math.round(n/ra)+1}function aa(e,t){var n;Ni(1,arguments);var r=Li(),i=Mi(t?.weekStartsOn??(t==null||(n=t.locale)==null?void 0:n.options?.weekStartsOn)??r.weekStartsOn??r.locale?.options?.weekStartsOn??0);if(!(i>=0&&i<=6))throw RangeError(`weekStartsOn must be between 0 and 6 inclusively`);var a=Pi(e),o=a.getUTCDay(),s=(o<i?7:0)+o-i;return a.setUTCDate(a.getUTCDate()-s),a.setUTCHours(0,0,0,0),a}function oa(e,t){var n;Ni(1,arguments);var r=Pi(e),i=r.getUTCFullYear(),a=Li(),o=Mi(t?.firstWeekContainsDate??(t==null||(n=t.locale)==null?void 0:n.options?.firstWeekContainsDate)??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1);if(!(o>=1&&o<=7))throw RangeError(`firstWeekContainsDate must be between 1 and 7 iLine truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ds(e,t){return cs(e)||ls(e,t)||Ka(e,t)||us()}function fs(e,t=`utf8`){return new TextDecoder(t).decode(e)}var ps=new TextEncoder;function ms(e){return ps.encode(e)}var hs=1024*8,gs=(()=>{let e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),_s={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array},vs=class e{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=hs,n={}){let r=!1;typeof t==`number`?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);let i=n.offset?n.offset>>>0:0,a=t.byteLength-i,o=i;(ArrayBuffer.isView(t)||t instanceof e)&&(t.byteLength!==t.buffer.byteLength&&(o=t.byteOffset+i),t=t.buffer),r?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=t,this.length=a,this.byteLength=a,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,a),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let e=this._marks.pop();if(e===void 0)throw Error(`Mark stack empty`);return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){let t=(this.offset+e)*2,n=new Uint8Array(t);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=t,this.byteLength=t,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,`uint8`)}readArray(e,t){let n=_s[t].BYTES_PER_ELEMENT*e,r=this.byteOffset+this.offset,i=this.buffer.slice(r,r+n);if(this.littleEndian===gs&&t!==`uint8`&&t!==`int8`){let e=new Uint8Array(this.buffer.slice(r,r+n));e.reverse();let i=new _s[t](e.buffer);return this.offset+=n,i.reverse(),i}let a=new _s[t](i);return this.offset+=n,a}readInt16(){let e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){let e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){let e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){let e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){let e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){let e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){let e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){let e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t=``;for(let n=0;n<e;n++)t+=this.readChar();return t}readUtf8(e=1){return fs(this.readBytes(e))}decodeText(e=1,t=`utf8`){return fs(this.readBytes(e),t)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLast Line truncated
`),Ve(e,t),Pe.publish(`endTilingPattern`,t),Re.pop().restore()};var J,He=p.__private__.newObject=function(){var e=Ue();return We(e,!0),e},Ue=p.__private__.newObjectDeferred=function(){return ee++,te[ee]=function(){return re},ee},We=function(e,t){return t=typeof t==`boolean`&&t,te[e]=re,t&&W(e+` 0 obj`),e},Ge=p.__private__.newAdditionalObject=function(){var e={objId:Ue(),content:``};return ie.push(e),e},Ke=Ue(),qe=Ue(),Je=p.__private__.decodeColorString=function(e){var t=e.split(` `);if(t.length!==2||t[1]!==`g`&&t[1]!==`G`)t.length!==5||t[4]!==`k`&&t[4]!==`K`||(t=[(1-t[0])*(1-t[3]),(1-t[1])*(1-t[3]),(1-t[2])*(1-t[3]),`r`]);else{var n=parseFloat(t[0]);t=[n,n,n,`r`]}for(var r=`#`,i=0;i<3;i++)r+=(`0`+Math.floor(255*parseFloat(t[i])).toString(16)).slice(-2);return r},Ye=p.__private__.encodeColorString=function(e){var t;typeof e==`string`&&(e={ch1:e});var n=e.ch1,r=e.ch2,i=e.ch3,a=e.ch4,o=e.pdfColorType===`draw`?[`G`,`RG`,`K`]:[`g`,`rg`,`k`];if(typeof n==`string`&&n.charAt(0)!==`#`){var s=new fp(n);if(s.ok)n=s.toHex();else if(!/^\d*\.?\d*$/.test(n))throw Error(`Invalid color "`+n+`" passed to jsPDF.encodeColorString.`)}if(typeof n==`string`&&/^#[0-9A-Fa-f]{3}$/.test(n)&&(n=`#`+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]),typeof n==`string`&&/^#[0-9A-Fa-f]{6}$/.test(n)){var c=parseInt(n.substr(1),16);n=c>>16&255,r=c>>8&255,i=255&c}if(r===void 0||a===void 0&&n===r&&r===i)t=typeof n==`string`?n+` `+o[0]:e.precision===2?D(n/255)+` `+o[0]:O(n/255)+` `+o[0];else if(a===void 0||ji(a)===`object`){if(a&&!isNaN(a.a)&&a.a===0)return[`1.`,`1.`,`1.`,o[1]].join(` `);t=typeof n==`string`?[n,r,i,o[1]].join(` `):e.precision===2?[D(n/255),D(r/255),D(i/255),o[1]].join(` `):[O(n/255),O(r/255),O(i/255),o[1]].join(` `)}else t=typeof n==`string`?[n,r,i,a,o[2]].join(` `):e.precision===2?[D(n),D(r),D(i),D(a),o[2]].join(` `):[O(n),O(r),O(i),O(a),o[2]].join(` `);return t},Xe=p.__private__.getFilters=function(){return o},Ze=p.__private__.putStream=function(e){var t=(e||={}).data||``,n=e.filters||Xe(),r=e.alreadyAppliedFilters||[],i=e.addLength1||!1,a=t.length,o=e.objectId,s=function(e){return e};if(u!==null&&o===void 0)throw Error(`ObjectId must be passed to putStream for file encryption`);u!==null&&(s=Y.encryptor(o,0));var c={};!0===n&&(n=[`FlateEncode`]);var l=e.additionalKeyValues||[],d=(c=Rp.API.processDataByFilters===void 0?{data:t,reverseChain:[]}:Rp.API.processDataByFilters(t,n)).reverseChain+(Array.isArray(r)?r.join(` `):r.toString());if(c.data.length!==0&&(l.push({key:`Length`,value:c.data.length}),!0===i&&l.push({key:`Length1`,value:a})),d.length!=0)if(d.split(`/`).length-1==1)l.push({key:`Filter`,value:d});else{l.push({key:`Filter`,value:`[`+d+`]`});for(var f=0;f<l.length;f+=1)if(l[f].key===`DecodeParms`){for(var p=[],m=0;m<c.reverseChain.split(`/`).length-1;m+=1)p.push(`null`);p.push(l[f].value),l[f].value=`[`+p.join(` `)+`]`}}W(`<<`);for(var h=0;h<l.length;h++)W(`/`+l[h].key+` `+l[h].value);W(`>>`),c.data.length!==0&&(W(`stream`),W(s(c.data)),W(`endstream`))},Qe=p.__private__.putPage=function(e){var t=e.number,n=e.data,r=e.objId,i=e.contentsObjId;We(r,!0),W(`<</Type /Page`),W(`/Parent `+e.rootDictionaryObjId+` 0 R`),W(`/Resources `+e.resourceDictionaryObjId+` 0 R`),W(`/MediaBox [`+parseFloat(w(e.mediaBox.bottomLeftX))+` `+parseFloat(w(e.mediaBox.bottomLeftY))+` `+w(e.mediaBox.topRightX)+` `+w(e.mediaBox.topRightY)+`]`),e.cropBox!==null&&W(`/CropBox [`+w(e.cropBox.bottomLeftX)+` `+w(e.cropBox.bottomLeftY)+` `+w(e.cropBox.topRightX)+` `+w(e.cropBox.topRightY)+`]`),e.bleedBox!==null&&W(`/BleedBox [`+w(e.bleedBox.bottomLeftX)+` `+w(e.bleedBox.bottomLeftY)+` `+w(e.bleedBox.topRightX)+` `+w(e.bleedBox.topRightY)+`]`),e.trimBox!==null&&W(`/TrimBox [`+w(e.trimBox.bottomLeftX)+` `+w(e.trimBox.bottomLeftY)+` `+w(e.trimBox.topRightX)+` `+w(e.trimBox.topRightY)+`]`),e.artBox!==null&&W(`/ArtBox [`+w(e.artBox.bottomLeftX)+` `+w(e.artBox.bottomLeftY)+` `+w(e.artBox.topRightX)+` `+w(e.artBox.topRightY)+`]`),typeof e.userUnit==`number`&&e.userUnit!==1&&W(`/UserUnit `+e.userUnit),Pe.publish(`putPage`,{objId:r,pageContext:K[t],pageNumber:t,page:n}),W(`/Contents `+i+` 0 R`),W(`>>`),W(`endobj`);var a=n.join(`
`,iconSize:[48,48],iconAnchor:[24,24]})},t.id)})]}),V&&(0,q.jsx)(`div`,{className:`absolute z-[2000] bg-white rounded-2xl shadow-2xl border border-gray-100 py-2 w-48 animate-in zoom-in-95 duration-200`,style:{top:V.y,left:V.x},onClick:e=>e.stopPropagation(),children:V.canShare?(0,q.jsxs)(`button`,{onClick:()=>te(V.id,V.title),className:`w-full text-left px-4 py-2 hover:bg-blue-50 text-sm font-bold text-gray-700 flex items-center gap-2 transition-colors`,children:[(0,q.jsx)(Te,{className:`w-4 h-4 text-blue-600`}),` Sao chép liên kết`]}):(0,q.jsx)(`div`,{className:`px-4 py-2 text-xs text-gray-400 italic`,children:`Bạn không có quyền chia sẻ tour này`})}),(0,q.jsx)(En,{isOpen:w,onClose:()=>T(!1)}),(0,q.jsx)(Dn,{isOpen:E,onClose:()=>D(!1),onSuccess:e=>{let t=localStorage.getItem(`my_journey_notes`),n=[];try{n=t?JSON.parse(t):[]}catch{n=[]}let i={id:Date.now().toString(),title:`Ghi chú của hành trình: ${e.title}`,content:`<p>Bắt đầu lập kế hoạch cho chuyến đi <strong>${e.title}</strong> của bạn tại đây...</p>`,createdAt:new Date().toISOString()};localStorage.setItem(`my_journey_notes`,JSON.stringify([i,...n])),c(e.id),r(e.id)}}),_&&(0,q.jsx)(Ci,{isOpen:!!_,onClose:()=>{v(null),x([])},photo:_,photoGroup:b,onSelectPhoto:e=>v(e),onLoginSuccess:a,onUpdatePhoto:e=>{g(t=>t.map(t=>t.id===e.id?e:t)),v(e),x(t=>t.map(t=>t.id===e.id?e:t))}})]})};function Ai(e){"@babel/helpers - typeof";return Ai=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ai(e)}function ji(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Mi(e,t){if(t.length<e)throw TypeError(e+` argument`+(e>1?`s`:``)+` required, but only `+t.length+` present`)}function Ni(e){Mi(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ai(e)===`object`&&t===`[object Date]`?new Date(e.getTime()):typeof e==`number`||t===`[object Number]`?new Date(e):((typeof e==`string`||t===`[object String]`)&&typeof console<`u`&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}function Pi(e,t){Mi(2,arguments);var n=Ni(e).getTime(),r=ji(t);return new Date(n+r)}var Fi={};function Ii(){return Fi}function Li(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var Ri=365.2425,zi=10**8*24*60*60*1e3,Bi=6e4,Vi=36e5;-zi;var Hi=3600*24;Hi*7,Hi*Ri/12*3;function Ui(e){return Mi(1,arguments),e instanceof Date||Ai(e)===`object`&&Object.prototype.toString.call(e)===`[object Date]`}function Wi(e){if(Mi(1,arguments),!Ui(e)&&typeof e!=`number`)return!1;var t=Ni(e);return!isNaN(Number(t))}function Gi(e,t){return Mi(2,arguments),Ni(e).getTime()-Ni(t).getTime()}var Ki={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},qi=`trunc`;function Ji(e){return e?Ki[e]:Ki[qi]}function Yi(e,t,n){Mi(2,arguments);var r=Gi(e,t)/Bi;return Ji(n?.roundingMethod)(r)}function Xi(e,t){return Mi(2,arguments),Pi(e,-ji(t))}var Zi=864e5;function Qi(e){Mi(1,arguments);var t=Ni(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/Zi)+1}function $i(e){Mi(1,arguments);var t=1,n=Ni(e),r=n.getUTCDay(),i=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function ea(e){Mi(1,arguments);var t=Ni(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=$i(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=$i(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function ta(e){Mi(1,arguments);var t=ea(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),$i(n)}var na=6048e5;function ra(e){Mi(1,arguments);var t=Ni(e),n=$i(t).getTime()-ta(t).getTime();return Math.round(n/na)+1}function ia(e,t){var n;Mi(1,arguments);var r=Ii(),i=ji(t?.weekStartsOn??(t==null||(n=t.locale)==null?void 0:n.options?.weekStartsOn)??r.weekStartsOn??r.locale?.options?.weekStartsOn??0);if(!(i>=0&&i<=6))throw RangeError(`weekStartsOn must be between 0 and 6 inclusively`);var a=Ni(e),o=a.getUTCDay(),s=(o<i?7:0)+o-i;return a.setUTCDate(a.getUTCDate()-s),a.setUTCHours(0,0,0,0),a}function aa(e,t){var n;Mi(1,arguments);var r=Ni(e),i=r.getUTCFullYear(),a=Ii(),o=ji(t?.firstWeekContainsDate??(t==null||(n=t.locale)==null?void 0:n.options?.firstWeekContainsDate)??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1);if(!(o>=1&&o<=7))throw RangeError(`firstWeekContainsDate must be between 1 and 7 iLine truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function us(e,t){return ss(e)||cs(e,t)||Ga(e,t)||ls()}function ds(e,t=`utf8`){return new TextDecoder(t).decode(e)}var fs=new TextEncoder;function ps(e){return fs.encode(e)}var ms=1024*8,hs=(()=>{let e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),gs={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array},_s=class e{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=ms,n={}){let r=!1;typeof t==`number`?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);let i=n.offset?n.offset>>>0:0,a=t.byteLength-i,o=i;(ArrayBuffer.isView(t)||t instanceof e)&&(t.byteLength!==t.buffer.byteLength&&(o=t.byteOffset+i),t=t.buffer),r?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=t,this.length=a,this.byteLength=a,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,a),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let e=this._marks.pop();if(e===void 0)throw Error(`Mark stack empty`);return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){let t=(this.offset+e)*2,n=new Uint8Array(t);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=t,this.byteLength=t,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,`uint8`)}readArray(e,t){let n=gs[t].BYTES_PER_ELEMENT*e,r=this.byteOffset+this.offset,i=this.buffer.slice(r,r+n);if(this.littleEndian===hs&&t!==`uint8`&&t!==`int8`){let e=new Uint8Array(this.buffer.slice(r,r+n));e.reverse();let i=new gs[t](e.buffer);return this.offset+=n,i.reverse(),i}let a=new gs[t](i);return this.offset+=n,a}readInt16(){let e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){let e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){let e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){let e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){let e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){let e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){let e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){let e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t=``;for(let n=0;n<e;n++)t+=this.readChar();return t}readUtf8(e=1){return ds(this.readBytes(e))}decodeText(e=1,t=`utf8`){return ds(this.readBytes(e),t)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLast Line truncated
`),Ve(e,t),Pe.publish(`endTilingPattern`,t),Re.pop().restore()};var J,He=p.__private__.newObject=function(){var e=Ue();return We(e,!0),e},Ue=p.__private__.newObjectDeferred=function(){return ee++,te[ee]=function(){return re},ee},We=function(e,t){return t=typeof t==`boolean`&&t,te[e]=re,t&&W(e+` 0 obj`),e},Ge=p.__private__.newAdditionalObject=function(){var e={objId:Ue(),content:``};return ie.push(e),e},Ke=Ue(),qe=Ue(),Je=p.__private__.decodeColorString=function(e){var t=e.split(` `);if(t.length!==2||t[1]!==`g`&&t[1]!==`G`)t.length!==5||t[4]!==`k`&&t[4]!==`K`||(t=[(1-t[0])*(1-t[3]),(1-t[1])*(1-t[3]),(1-t[2])*(1-t[3]),`r`]);else{var n=parseFloat(t[0]);t=[n,n,n,`r`]}for(var r=`#`,i=0;i<3;i++)r+=(`0`+Math.floor(255*parseFloat(t[i])).toString(16)).slice(-2);return r},Ye=p.__private__.encodeColorString=function(e){var t;typeof e==`string`&&(e={ch1:e});var n=e.ch1,r=e.ch2,i=e.ch3,a=e.ch4,o=e.pdfColorType===`draw`?[`G`,`RG`,`K`]:[`g`,`rg`,`k`];if(typeof n==`string`&&n.charAt(0)!==`#`){var s=new dp(n);if(s.ok)n=s.toHex();else if(!/^\d*\.?\d*$/.test(n))throw Error(`Invalid color "`+n+`" passed to jsPDF.encodeColorString.`)}if(typeof n==`string`&&/^#[0-9A-Fa-f]{3}$/.test(n)&&(n=`#`+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]),typeof n==`string`&&/^#[0-9A-Fa-f]{6}$/.test(n)){var c=parseInt(n.substr(1),16);n=c>>16&255,r=c>>8&255,i=255&c}if(r===void 0||a===void 0&&n===r&&r===i)t=typeof n==`string`?n+` `+o[0]:e.precision===2?D(n/255)+` `+o[0]:O(n/255)+` `+o[0];else if(a===void 0||Ai(a)===`object`){if(a&&!isNaN(a.a)&&a.a===0)return[`1.`,`1.`,`1.`,o[1]].join(` `);t=typeof n==`string`?[n,r,i,o[1]].join(` `):e.precision===2?[D(n/255),D(r/255),D(i/255),o[1]].join(` `):[O(n/255),O(r/255),O(i/255),o[1]].join(` `)}else t=typeof n==`string`?[n,r,i,a,o[2]].join(` `):e.precision===2?[D(n),D(r),D(i),D(a),o[2]].join(` `):[O(n),O(r),O(i),O(a),o[2]].join(` `);return t},Xe=p.__private__.getFilters=function(){return o},Ze=p.__private__.putStream=function(e){var t=(e||={}).data||``,n=e.filters||Xe(),r=e.alreadyAppliedFilters||[],i=e.addLength1||!1,a=t.length,o=e.objectId,s=function(e){return e};if(u!==null&&o===void 0)throw Error(`ObjectId must be passed to putStream for file encryption`);u!==null&&(s=Y.encryptor(o,0));var c={};!0===n&&(n=[`FlateEncode`]);var l=e.additionalKeyValues||[],d=(c=Lp.API.processDataByFilters===void 0?{data:t,reverseChain:[]}:Lp.API.processDataByFilters(t,n)).reverseChain+(Array.isArray(r)?r.join(` `):r.toString());if(c.data.length!==0&&(l.push({key:`Length`,value:c.data.length}),!0===i&&l.push({key:`Length1`,value:a})),d.length!=0)if(d.split(`/`).length-1==1)l.push({key:`Filter`,value:d});else{l.push({key:`Filter`,value:`[`+d+`]`});for(var f=0;f<l.length;f+=1)if(l[f].key===`DecodeParms`){for(var p=[],m=0;m<c.reverseChain.split(`/`).length-1;m+=1)p.push(`null`);p.push(l[f].value),l[f].value=`[`+p.join(` `)+`]`}}W(`<<`);for(var h=0;h<l.length;h++)W(`/`+l[h].key+` `+l[h].value);W(`>>`),c.data.length!==0&&(W(`stream`),W(s(c.data)),W(`endstream`))},Qe=p.__private__.putPage=function(e){var t=e.number,n=e.data,r=e.objId,i=e.contentsObjId;We(r,!0),W(`<</Type /Page`),W(`/Parent `+e.rootDictionaryObjId+` 0 R`),W(`/Resources `+e.resourceDictionaryObjId+` 0 R`),W(`/MediaBox [`+parseFloat(w(e.mediaBox.bottomLeftX))+` `+parseFloat(w(e.mediaBox.bottomLeftY))+` `+w(e.mediaBox.topRightX)+` `+w(e.mediaBox.topRightY)+`]`),e.cropBox!==null&&W(`/CropBox [`+w(e.cropBox.bottomLeftX)+` `+w(e.cropBox.bottomLeftY)+` `+w(e.cropBox.topRightX)+` `+w(e.cropBox.topRightY)+`]`),e.bleedBox!==null&&W(`/BleedBox [`+w(e.bleedBox.bottomLeftX)+` `+w(e.bleedBox.bottomLeftY)+` `+w(e.bleedBox.topRightX)+` `+w(e.bleedBox.topRightY)+`]`),e.trimBox!==null&&W(`/TrimBox [`+w(e.trimBox.bottomLeftX)+` `+w(e.trimBox.bottomLeftY)+` `+w(e.trimBox.topRightX)+` `+w(e.trimBox.topRightY)+`]`),e.artBox!==null&&W(`/ArtBox [`+w(e.artBox.bottomLeftX)+` `+w(e.artBox.bottomLeftY)+` `+w(e.artBox.topRightX)+` `+w(e.artBox.topRightY)+`]`),typeof e.userUnit==`number`&&e.userUnit!==1&&W(`/UserUnit `+e.userUnit),Pe.publish(`putPage`,{objId:r,pageContext:K[t],pageNumber:t,page:n}),W(`/Contents `+i+` 0 R`),W(`>>`),W(`endobj`);var a=n.join(`
`);return b===y&&(a+=`
Q`),We(i,!0),Ze({data:a,filters:Xe(),objectId:i}),W(`endobj`),r},$e=p.__private__.putPages=function(){var e,t,n=[];for(e=1;e<=Ne;e++)K[e].objId=Ue(),K[e].contentsObjId=Ue();for(e=1;e<=Ne;e++)n.push(Qe({number:e,data:U[e],objId:K[e].objId,contentsObjId:K[e].contentsObjId,mediaBox:K[e].mediaBox,cropBox:K[e].cropBox,bleedBox:K[e].bleedBox,trimBox:K[e].trimBox,artBox:K[e].artBox,userUnit:K[e].userUnit,rootDictionaryObjId:Ke,resourceDictionaryObjId:qe}));We(Ke,!0),W(`<</Type /Pages`);var r=`/Kids [`;for(t=0;t<Ne;t++)r+=n[t]+` 0 R `;W(r+`]`),W(`/Count `+Ne),W(`>>`),W(`endobj`),Pe.publish(`postPutPages`)},et=function(e){Pe.publish(`putFont`,{font:e,out:W,newObject:He,putStream:Ze}),!0!==e.isAlreadyPutted&&(e.objectNumber=He(),W(`<<`),W(`/Type /Font`),W(`/BaseFont /`+Mp(e.postScriptName)),W(`/Subtype /Type1`),typeof e.encoding==`string`&&W(`/Encoding /`+e.encoding),W(`/FirstChar 32`),W(`/LastChar 255`),W(`>>`),W(`endobj`))},tt=function(e){e.objectNumber=He();var t=[];t.push({key:`Type`,value:`/XObject`}),t.push({key:`Subtype`,value:`/Form`}),t.push({key:`BBox`,value:`[`+[w(e.x),w(e.y),w(e.x+e.width),w(e.y+e.height)].join(` `)+`]`}),t.push({key:`Matrix`,value:`[`+e.matrix.toString()+`]`}),Ze({data:e.pages[1].join(`
`),additionalKeyValues:t,objectId:e.objectNumber}),W(`endobj`)},nt=function(e,t){t||=21;var n=He(),r=function(e,t){var n,r=[],i=1/(t-1);for(n=0;n<1;n+=i)r.push(n);if(r.push(1),e[0].offset!=0){var a={offset:0,color:e[0].color};e.unshift(a)}if(e[e.length-1].offset!=1){var o={offset:1,color:e[e.length-1].color};e.push(o)}for(var s=``,c=0,l=0;l<r.length;l++){for(n=r[l];n>e[c+1].offset;)c++;var u=e[c].offset,d=(n-u)/(e[c+1].offset-u),f=e[c].color,p=e[c+1].color;s+=H(Math.round((1-d)*f[0]+d*p[0]).toString(16))+H(Math.round((1-d)*f[1]+d*p[1]).toString(16))+H(Math.round((1-d)*f[2]+d*p[2]).toString(16))}return s.trim()}(e.colors,t),i=[];i.push({key:`FunctionType`,value:`0`}),i.push({key:`Domain`,value:`[0.0 1.0]`}),i.push({key:`Size`,value:`[`+t+`]`}),i.push({key:`BitsPerSample`,value:`8`}),i.push({key:`Range`,value:`[0.0 1.0 0.0 1.0 0.0 1.0]`}),i.push({key:`Decode`,value:`[0.0 1.0 0.0 1.0 0.0 1.0]`}),Ze({data:r,additionalKeyValues:i,alreadyAppliedFilters:[`/ASCIIHexDecode`],objectId:n}),W(`endobj`),e.objectNumber=He(),W(`<< /ShadingType `+e.type),W(`/ColorSpace /DeviceRGB`);var a=`/Coords [`+w(parseFloat(e.coords[0]))+` `+w(parseFloat(e.coords[1]))+` `;e.type===2?a+=w(parseFloat(e.coords[2]))+` `+w(parseFloat(e.coords[3])):a+=w(parseFloat(e.coords[2]))+` `+w(parseFloat(e.coords[3]))+` `+w(parseFloat(e.coords[4]))+` `+w(parseFloat(e.coords[5])),W(a+=`]`),e.matrix&&W(`/Matrix [`+e.matrix.toString()+`]`),W(`/Function `+n+` 0 R`),W(`/Extend [true true]`),W(`>>`),W(`endobj`)},rt=function(e,t){var n=Ue(),r=He();t.push({resourcesOid:n,objectOid:r}),e.objectNumber=r;var i=[];i.push({key:`Type`,value:`/Pattern`}),i.push({key:`PatternType`,value:`1`}),i.push({key:`PaintType`,value:`1`}),i.push({key:`TilingType`,value:`1`}),i.push({key:`BBox`,value:`[`+e.boundingBox.map(w).join(` `)+`]`}),i.push({key:`XStep`,value:w(e.xStep)}),i.push({key:`YStep`,value:w(e.yStep)}),i.push({key:`Resources`,value:n+` 0 R`}),e.matrix&&i.push({key:`Matrix`,value:`[`+e.matrix.toString()+`]`}),Ze({data:e.stream,additionalKeyValues:i,objectId:e.objectNumber}),W(`endobj`)},it=function(e){for(var t in e.objectNumber=He(),W(`<<`),e)switch(t){case`opacity`:W(`/ca `+D(e[t]));break;case`stroke-opacity`:W(`/CA `+D(e[t]))}W(`>>`),W(`endobj`)},at=function(e){We(e.resourcesOid,!0),W(`<<`),W(`/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]`),function(){for(var e in W(`/Font <<`),Ee)Ee.hasOwnProperty(e)&&(!1===d||!0===d&&f.hasOwnProperty(e))&&W(`/`+e+` `+Ee[e].objectNumber+` 0 R`);W(`>>`)}(),function(){if(Object.keys(ke).length>0){for(var e in W(`/Shading <<`),ke)ke.hasOwnProperty(e)&&ke[e]instanceof Ip&&ke[e].objectNumber>=0&&W(`/`+e+` `+ke[e].objectNumber+` 0 R`);Pe.publish(`putShadingPatternDict`),W(`>>`)}}(),function(e){if(Object.keys(ke).length>0){for(var t in W(`/Pattern <<`),ke)ke.hasOwnProperty(t)&&ke[t]instanceof p.TilingPattern&&ke[t].objectNumber>=0&&ke[t].objectNumber<e&&W(`/`+t+` `+ke[t].objectNumber+` 0 R`);Pe.publish(`putTilingPatternDict`),W(`>>`)}}(e.objectOid),function(){if(Object.keys(G).length>0){for(var e in W(`/ExtGState <<`),G)G.hasOwnProperty(e)&&G[e].objectNumber>=0&&W(`/`+e+` `+G[e].objectNumber+` 0 R`);Pe.publish(`putGStateDict`),W(`>>`)}}(),function(){for(var e in W(`/XObject <<`),Ie)Ie.hasOwnProperty(e)&&Ie[e].objectNumber>=0&&W(`/`+e+` `+Ie[e].objectNumber+` 0 R`);Pe.publish(`putXobjectDict`),W(`>>`)}(),W(`>>`),W(`endobj`)},ot=function(e){De[e.fontName]=De[e.fontName]||{},De[e.fontName][e.fontStyle]=e.id},st=function(e,t,n,r,i){var a={id:`F`+(Object.keys(Ee).length+1).toString(10),postScriptName:e,fontName:t,fontStyle:n,encoding:r,isStandardFont:i||!1,metadata:{}};return Pe.publish(`addFont`,{font:a,instance:this}),Ee[a.id]=a,ot(a),a.id},ct=p.__private__.pdfEscape=p.pdfEscape=function(e,t){return function(e,t){var n,r,i,a,o,s,c,l,u;if(i=(t||={}).sourceEncoding||`Unicode`,o=t.outputEncoding,(t.autoencode||o)&&Ee[xe].metadata&&Ee[xe].metadata[i]&&Ee[xe].metadata[i].encoding&&(a=Ee[xe].metadata[i].encoding,!o&&Ee[xe].encoding&&(o=Ee[xe].encoding),!o&&a.codePages&&(o=a.codePages[0]),typeof o==`string`&&(o=a[o]),o)){for(c=!1,s=[],n=0,r=e.length;n<r;n++)(l=o[e.charCodeAt(n)])?s.push(String.fromCharCode(l)):s.push(e[n]),s[n].charCodeAt(0)>>8&&(c=!0);e=s.join(``)}for(n=e.length;c===void 0&&n!==0;)e.charCodeAt(n-1)>>8&&(c=!0),n--;if(!c)return e;for(s=t.noBOM?[]:[254,255],n=0,r=e.length;n<r;n++){if((u=(l=e.charCodeAt(n))>>8)>>8)throw Error(`Character at position `+n+` of string '`+e+`' exceeds 16bits. Cannot be encoded into UCS-2 BE`);s.push(u),s.push(l-(u<<8))}return String.fromCharCode.apply(void 0,s)}(e,t).replace(/\\/g,`\\\\`).replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)},lt=p.__private__.beginPage=function(e){U[++Ne]=[],K[Ne]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(e[0]),topRightY:Number(e[1])}},ft(Ne),se(U[B])},ut=function(e,t){var r,a,o;switch(n=t||n,typeof e==`string`&&(r=_(e.toLowerCase()),Array.isArray(r)&&(a=r[0],o=r[1])),ArrLine truncated
`)},xt=p.__private__.getBlob=function(e){return new Blob([le(e)],{type:`application/pdf`})},St=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},Ct=function(e){var t,n=e.document,r=n.documentElement,i=n.head,a=n.body;return i||(i=n.createElement(`head`),r.appendChild(i)),a||(a=n.createElement(`body`),r.appendChild(a)),St(i),St(a),(t=n.createElement(`style`)).appendChild(n.createTextNode(`html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}`)),i.appendChild(t),{document:n,body:a}},wt=p.output=p.__private__.output=(J=function(e,t){switch(typeof(t||={})==`string`?t={filename:t}:t.filename=t.filename||`generated.pdf`,e){case void 0:return bt();case`save`:p.save(t.filename);break;case`arraybuffer`:return le(bt());case`blob`:return xt(bt());case`bloburi`:case`bloburl`:if(ap.URL!==void 0&&typeof ap.URL.createObjectURL==`function`)return ap.URL&&ap.URL.createObjectURL(xt(bt()))||void 0;sp.warn(`bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.`);break;case`datauristring`:case`dataurlstring`:var n=``,r=bt();try{n=mp(r)}catch{n=mp(unescape(encodeURIComponent(r)))}return`data:application/pdf;filename=`+encodeURIComponent(t.filename)+`;base64,`+n;case`pdfobjectnewwindow`:if(Object.prototype.toString.call(ap)===`[object Window]`){var i=`https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js`,a=!t.pdfObjectUrl;a||(i=t.pdfObjectUrl);var o=ap.open();if(o!==null){var s=Ct(o),c=s.document.createElement(`script`),l=this;c.src=i,a&&(c.integrity=`sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==`,c.crossOrigin=`anonymous`),c.onload=function(){o.PDFObject.embed(l.output(`dataurlstring`),t)},s.body.appendChild(c)}return o}throw Error(`The option pdfobjectnewwindow just works in a browser-environment.`);case`pdfjsnewwindow`:if(Object.prototype.toString.call(ap)===`[object Window]`){var u=t.pdfJsUrl||`examples/PDF.js/web/viewer.html`,d=ap.open();if(d!==null){var f=Ct(d),m=f.document.createElement(`iframe`),h=u.indexOf(`?`)===-1?`?`:`&`;l=this,m.id=`pdfViewer`,m.width=`500px`,m.height=`400px`,m.src=u+h+`file=&downloadName=`+encodeURIComponent(t.filename),m.onload=function(){d.document.title=t.filename,m.contentWindow.PDFViewerApplication.open(l.output(`bloburl`))},f.body.appendChild(m)}return d}throw Error(`The option pdfjsnewwindow just works in a browser-environment.`);case`dataurlnewwindow`:if(Object.prototype.toString.call(ap)!==`[object Window]`)throw Error(`The option dataurlnewwindow just works in a browser-environment.`);var g=ap.open();if(g!==null){var _=Ct(g),v=_.document.createElement(`iframe`);v.src=this.output(`datauristring`,t),_.body.appendChild(v),g.document.title=t.filename}if(g||typeof safari>`u`)return g;break;case`datauri`:case`dataurl`:return ap.document.location.href=this.output(`datauristring`,t);default:return null}},J.foo=function(){try{return J.apply(this,arguments)}catch(n){var e=n.stack||``;~e.indexOf(` at `)&&(e=e.split(` at `)[1]);var t=`Error in function `+e.split(`
`)[0].split(`<`)[0]+`: `+n.message;if(!ap.console)throw Error(t);ap.console.error(t,n),ap.alert&&alert(t)}},J.foo.bar=J,J.foo),Tt=function(e){return!0===Array.isArray(Fe)&&Fe.indexOf(e)>-1};switch(r){case`pt`:Se=1;break;case`mm`:Se=72/25.4;break;case`cm`:Se=72/2.54;break;case`in`:Se=72;break;case`px`:Se=Tt(`px_scaling`)==1?.75:96/72;break;case`pc`:case`em`:Se=12;break;case`ex`:Se=6;break;default:if(typeof r!=`number`)throw Error(`Invalid unit: `+r);Se=r}var Y=null;R(),P();var Et=p.__private__.getPageInfo=p.getPageInfo=function(e){if(isNaN(e)||e%1!=0)throw Error(`Invalid argument passed to jsPDF.getPageInfo`);return{objId:K[e].objId,pageNumber:e,pageContext:K[e]}},Dt=p.__private__.getPageInfoByObjId=function(e){if(isNaN(e)||e%1!=0)throw Error(`Invalid argument passed to jsPDF.getPageInfoByObjId`);for(var t in K)if(K[t].objId===e)break;return Et(t)},Ot=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:K[B].objId,pageNumber:B,pageContext:K[B]}};p.addPage=function(){return ut.apply(this,arguments),this},p.setPage=function(){return ft.apply(this,arguments),se.call(this,U[B]),this},p.insertPage=function(e){return this.addPage(),this.movePage(B,e),this},p.movePage=function(e,t){var n,r;if(e>t){n=U[e],r=K[e];for(var i=e;i>t;i--)U[i]=U[i-1],K[i]=K[i-1];U[t]=n,K[t]=r,this.setPage(t)}else if(e<t){n=U[e],r=K[e];for(var a=e;a<t;a++)U[a]=U[a+1],K[a]=K[a+1];U[t]=n,K[t]=r,this.setPage(t)}return this},p.deletePage=function(){return dt.apply(this,arguments),this},p.__private__.text=p.text=function(e,t,n,r,i){var a,o,s,c,l,u,d,p,m,h=(r||={}).scope||this;if(typeof e==`number`&&typeof t==`number`&&(typeof n==`string`||Array.isArray(n))){var g=n;n=t,t=e,e=g}if(arguments[3]instanceof q==0?(s=arguments[4],c=arguments[5],ji(d=arguments[3])===`object`&&d!==null||(typeof s==`string`&&(c=s,s=null),typeof d==`string`&&(c=d,d=null),typeof d==`number`&&(s=d,d=null),r={flags:d,angle:s,align:c})):(T(`The transform parameter of text() with a Matrix value`),m=i),isNaN(t)||isNaN(n)||e==null)throw Error(`Invalid arguments passed to jsPDF.text`);if(e.length===0)return h;var _,v=``,x=typeof r.lineHeightFactor==`number`?r.lineHeightFactor:Ht,S=h.internal.scaleFactor;function C(e){return e=e.split(` `).join(Array(r.TabLen||9).join(` `)),ct(e,d)}function E(e){for(var t,n=e.concat(),r=[],i=n.length;i--;)typeof(t=n.shift())==`string`?r.push(t):Array.isArray(e)&&(t.length===1||t[1]===void 0&&t[2]===void 0)?r.push(t[0]):r.push([t[0],t[1],t[2]]);return r}function D(e,t){var n;if(typeof e==`string`)n=t(e)[0];else if(Array.isArray(e)){for(var r,i,a=e.concat(),o=[],s=a.length;s--;)typeof(r=a.shift())==`string`?o.push(t(r)[0]):Array.isArray(r)&&typeof r[0]==`string`&&(i=t(r[0],r[1],r[2]),o.push([i[0],i[1],i[2]]));n=o}return n}var O=!1,A=!0;if(typeof e==`string`)O=!0;else if(Array.isArray(e)){var j=e.concat();o=[];for(var M,N=j.length;N--;)(typeof(M=j.shift())!=`string`||Array.isArray(M)&&typeof M[0]!=`string`)&&(A=!1);O=A}if(!1===O)throw Error(`Type of text must be string or Array. "`+e+`" is not recognized.`);typeof e==`string`&&(e=e.match(/[\r?\n]/)?e.split(/\r\n|\r|\n/g):[e]);var P=de/h.internal.scaleFactor,F=P*(x-1);switch(r.baseline){case`bottom`:n-=F;break;case`top`:n+=P-F;break;case`hanging`:n+=P-2*F;break;case`middle`:n+=P/2-F}if((u=r.maxWidth||0)>0&&(typeof e==`string`?e=h.splitTextToSize(e,u):Object.prototype.toString.call(e)===`[object Array]`&&(e=e.reduce(function(e,t){return e.concat(h.splitTextToSize(t,u))},[]))),a={text:e,x:t,y:n,options:r,mutex:{pdfEscape:ct,activeFontKey:xe,fonts:Ee,activeFontSize:de}},Pe.publish(`preProcessText`,a),e=a.text,s=(r=a.options).angle,m instanceof q==0&&s&&typeof s==`number`){s*=Math.PI/180,r.rotationDirection===0&&(s=-s),b===y&&(s=-s);var I=Math.cos(s),R=Math.sin(s);m=new q(I,R,-R,I,0,0)}else s&&s instanceof q&&(m=s);b!==y||m||(m=Be),(l=r.charSpace||rn)!==void 0&&(v+=w(k(l))+` Tc
Q`),We(i,!0),Ze({data:a,filters:Xe(),objectId:i}),W(`endobj`),r},$e=p.__private__.putPages=function(){var e,t,n=[];for(e=1;e<=Ne;e++)K[e].objId=Ue(),K[e].contentsObjId=Ue();for(e=1;e<=Ne;e++)n.push(Qe({number:e,data:U[e],objId:K[e].objId,contentsObjId:K[e].contentsObjId,mediaBox:K[e].mediaBox,cropBox:K[e].cropBox,bleedBox:K[e].bleedBox,trimBox:K[e].trimBox,artBox:K[e].artBox,userUnit:K[e].userUnit,rootDictionaryObjId:Ke,resourceDictionaryObjId:qe}));We(Ke,!0),W(`<</Type /Pages`);var r=`/Kids [`;for(t=0;t<Ne;t++)r+=n[t]+` 0 R `;W(r+`]`),W(`/Count `+Ne),W(`>>`),W(`endobj`),Pe.publish(`postPutPages`)},et=function(e){Pe.publish(`putFont`,{font:e,out:W,newObject:He,putStream:Ze}),!0!==e.isAlreadyPutted&&(e.objectNumber=He(),W(`<<`),W(`/Type /Font`),W(`/BaseFont /`+jp(e.postScriptName)),W(`/Subtype /Type1`),typeof e.encoding==`string`&&W(`/Encoding /`+e.encoding),W(`/FirstChar 32`),W(`/LastChar 255`),W(`>>`),W(`endobj`))},tt=function(e){e.objectNumber=He();var t=[];t.push({key:`Type`,value:`/XObject`}),t.push({key:`Subtype`,value:`/Form`}),t.push({key:`BBox`,value:`[`+[w(e.x),w(e.y),w(e.x+e.width),w(e.y+e.height)].join(` `)+`]`}),t.push({key:`Matrix`,value:`[`+e.matrix.toString()+`]`}),Ze({data:e.pages[1].join(`
`),additionalKeyValues:t,objectId:e.objectNumber}),W(`endobj`)},nt=function(e,t){t||=21;var n=He(),r=function(e,t){var n,r=[],i=1/(t-1);for(n=0;n<1;n+=i)r.push(n);if(r.push(1),e[0].offset!=0){var a={offset:0,color:e[0].color};e.unshift(a)}if(e[e.length-1].offset!=1){var o={offset:1,color:e[e.length-1].color};e.push(o)}for(var s=``,c=0,l=0;l<r.length;l++){for(n=r[l];n>e[c+1].offset;)c++;var u=e[c].offset,d=(n-u)/(e[c+1].offset-u),f=e[c].color,p=e[c+1].color;s+=H(Math.round((1-d)*f[0]+d*p[0]).toString(16))+H(Math.round((1-d)*f[1]+d*p[1]).toString(16))+H(Math.round((1-d)*f[2]+d*p[2]).toString(16))}return s.trim()}(e.colors,t),i=[];i.push({key:`FunctionType`,value:`0`}),i.push({key:`Domain`,value:`[0.0 1.0]`}),i.push({key:`Size`,value:`[`+t+`]`}),i.push({key:`BitsPerSample`,value:`8`}),i.push({key:`Range`,value:`[0.0 1.0 0.0 1.0 0.0 1.0]`}),i.push({key:`Decode`,value:`[0.0 1.0 0.0 1.0 0.0 1.0]`}),Ze({data:r,additionalKeyValues:i,alreadyAppliedFilters:[`/ASCIIHexDecode`],objectId:n}),W(`endobj`),e.objectNumber=He(),W(`<< /ShadingType `+e.type),W(`/ColorSpace /DeviceRGB`);var a=`/Coords [`+w(parseFloat(e.coords[0]))+` `+w(parseFloat(e.coords[1]))+` `;e.type===2?a+=w(parseFloat(e.coords[2]))+` `+w(parseFloat(e.coords[3])):a+=w(parseFloat(e.coords[2]))+` `+w(parseFloat(e.coords[3]))+` `+w(parseFloat(e.coords[4]))+` `+w(parseFloat(e.coords[5])),W(a+=`]`),e.matrix&&W(`/Matrix [`+e.matrix.toString()+`]`),W(`/Function `+n+` 0 R`),W(`/Extend [true true]`),W(`>>`),W(`endobj`)},rt=function(e,t){var n=Ue(),r=He();t.push({resourcesOid:n,objectOid:r}),e.objectNumber=r;var i=[];i.push({key:`Type`,value:`/Pattern`}),i.push({key:`PatternType`,value:`1`}),i.push({key:`PaintType`,value:`1`}),i.push({key:`TilingType`,value:`1`}),i.push({key:`BBox`,value:`[`+e.boundingBox.map(w).join(` `)+`]`}),i.push({key:`XStep`,value:w(e.xStep)}),i.push({key:`YStep`,value:w(e.yStep)}),i.push({key:`Resources`,value:n+` 0 R`}),e.matrix&&i.push({key:`Matrix`,value:`[`+e.matrix.toString()+`]`}),Ze({data:e.stream,additionalKeyValues:i,objectId:e.objectNumber}),W(`endobj`)},it=function(e){for(var t in e.objectNumber=He(),W(`<<`),e)switch(t){case`opacity`:W(`/ca `+D(e[t]));break;case`stroke-opacity`:W(`/CA `+D(e[t]))}W(`>>`),W(`endobj`)},at=function(e){We(e.resourcesOid,!0),W(`<<`),W(`/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]`),function(){for(var e in W(`/Font <<`),Ee)Ee.hasOwnProperty(e)&&(!1===d||!0===d&&f.hasOwnProperty(e))&&W(`/`+e+` `+Ee[e].objectNumber+` 0 R`);W(`>>`)}(),function(){if(Object.keys(ke).length>0){for(var e in W(`/Shading <<`),ke)ke.hasOwnProperty(e)&&ke[e]instanceof Fp&&ke[e].objectNumber>=0&&W(`/`+e+` `+ke[e].objectNumber+` 0 R`);Pe.publish(`putShadingPatternDict`),W(`>>`)}}(),function(e){if(Object.keys(ke).length>0){for(var t in W(`/Pattern <<`),ke)ke.hasOwnProperty(t)&&ke[t]instanceof p.TilingPattern&&ke[t].objectNumber>=0&&ke[t].objectNumber<e&&W(`/`+t+` `+ke[t].objectNumber+` 0 R`);Pe.publish(`putTilingPatternDict`),W(`>>`)}}(e.objectOid),function(){if(Object.keys(G).length>0){for(var e in W(`/ExtGState <<`),G)G.hasOwnProperty(e)&&G[e].objectNumber>=0&&W(`/`+e+` `+G[e].objectNumber+` 0 R`);Pe.publish(`putGStateDict`),W(`>>`)}}(),function(){for(var e in W(`/XObject <<`),Ie)Ie.hasOwnProperty(e)&&Ie[e].objectNumber>=0&&W(`/`+e+` `+Ie[e].objectNumber+` 0 R`);Pe.publish(`putXobjectDict`),W(`>>`)}(),W(`>>`),W(`endobj`)},ot=function(e){De[e.fontName]=De[e.fontName]||{},De[e.fontName][e.fontStyle]=e.id},st=function(e,t,n,r,i){var a={id:`F`+(Object.keys(Ee).length+1).toString(10),postScriptName:e,fontName:t,fontStyle:n,encoding:r,isStandardFont:i||!1,metadata:{}};return Pe.publish(`addFont`,{font:a,instance:this}),Ee[a.id]=a,ot(a),a.id},ct=p.__private__.pdfEscape=p.pdfEscape=function(e,t){return function(e,t){var n,r,i,a,o,s,c,l,u;if(i=(t||={}).sourceEncoding||`Unicode`,o=t.outputEncoding,(t.autoencode||o)&&Ee[xe].metadata&&Ee[xe].metadata[i]&&Ee[xe].metadata[i].encoding&&(a=Ee[xe].metadata[i].encoding,!o&&Ee[xe].encoding&&(o=Ee[xe].encoding),!o&&a.codePages&&(o=a.codePages[0]),typeof o==`string`&&(o=a[o]),o)){for(c=!1,s=[],n=0,r=e.length;n<r;n++)(l=o[e.charCodeAt(n)])?s.push(String.fromCharCode(l)):s.push(e[n]),s[n].charCodeAt(0)>>8&&(c=!0);e=s.join(``)}for(n=e.length;c===void 0&&n!==0;)e.charCodeAt(n-1)>>8&&(c=!0),n--;if(!c)return e;for(s=t.noBOM?[]:[254,255],n=0,r=e.length;n<r;n++){if((u=(l=e.charCodeAt(n))>>8)>>8)throw Error(`Character at position `+n+` of string '`+e+`' exceeds 16bits. Cannot be encoded into UCS-2 BE`);s.push(u),s.push(l-(u<<8))}return String.fromCharCode.apply(void 0,s)}(e,t).replace(/\\/g,`\\\\`).replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)},lt=p.__private__.beginPage=function(e){U[++Ne]=[],K[Ne]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(e[0]),topRightY:Number(e[1])}},ft(Ne),se(U[B])},ut=function(e,t){var r,a,o;switch(n=t||n,typeof e==`string`&&(r=_(e.toLowerCase()),Array.isArray(r)&&(a=r[0],o=r[1])),ArrLine truncated
`)},xt=p.__private__.getBlob=function(e){return new Blob([le(e)],{type:`application/pdf`})},St=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},Ct=function(e){var t,n=e.document,r=n.documentElement,i=n.head,a=n.body;return i||(i=n.createElement(`head`),r.appendChild(i)),a||(a=n.createElement(`body`),r.appendChild(a)),St(i),St(a),(t=n.createElement(`style`)).appendChild(n.createTextNode(`html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}`)),i.appendChild(t),{document:n,body:a}},wt=p.output=p.__private__.output=(J=function(e,t){switch(typeof(t||={})==`string`?t={filename:t}:t.filename=t.filename||`generated.pdf`,e){case void 0:return bt();case`save`:p.save(t.filename);break;case`arraybuffer`:return le(bt());case`blob`:return xt(bt());case`bloburi`:case`bloburl`:if(ip.URL!==void 0&&typeof ip.URL.createObjectURL==`function`)return ip.URL&&ip.URL.createObjectURL(xt(bt()))||void 0;op.warn(`bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.`);break;case`datauristring`:case`dataurlstring`:var n=``,r=bt();try{n=pp(r)}catch{n=pp(unescape(encodeURIComponent(r)))}return`data:application/pdf;filename=`+encodeURIComponent(t.filename)+`;base64,`+n;case`pdfobjectnewwindow`:if(Object.prototype.toString.call(ip)===`[object Window]`){var i=`https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js`,a=!t.pdfObjectUrl;a||(i=t.pdfObjectUrl);var o=ip.open();if(o!==null){var s=Ct(o),c=s.document.createElement(`script`),l=this;c.src=i,a&&(c.integrity=`sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==`,c.crossOrigin=`anonymous`),c.onload=function(){o.PDFObject.embed(l.output(`dataurlstring`),t)},s.body.appendChild(c)}return o}throw Error(`The option pdfobjectnewwindow just works in a browser-environment.`);case`pdfjsnewwindow`:if(Object.prototype.toString.call(ip)===`[object Window]`){var u=t.pdfJsUrl||`examples/PDF.js/web/viewer.html`,d=ip.open();if(d!==null){var f=Ct(d),m=f.document.createElement(`iframe`),h=u.indexOf(`?`)===-1?`?`:`&`;l=this,m.id=`pdfViewer`,m.width=`500px`,m.height=`400px`,m.src=u+h+`file=&downloadName=`+encodeURIComponent(t.filename),m.onload=function(){d.document.title=t.filename,m.contentWindow.PDFViewerApplication.open(l.output(`bloburl`))},f.body.appendChild(m)}return d}throw Error(`The option pdfjsnewwindow just works in a browser-environment.`);case`dataurlnewwindow`:if(Object.prototype.toString.call(ip)!==`[object Window]`)throw Error(`The option dataurlnewwindow just works in a browser-environment.`);var g=ip.open();if(g!==null){var _=Ct(g),v=_.document.createElement(`iframe`);v.src=this.output(`datauristring`,t),_.body.appendChild(v),g.document.title=t.filename}if(g||typeof safari>`u`)return g;break;case`datauri`:case`dataurl`:return ip.document.location.href=this.output(`datauristring`,t);default:return null}},J.foo=function(){try{return J.apply(this,arguments)}catch(n){var e=n.stack||``;~e.indexOf(` at `)&&(e=e.split(` at `)[1]);var t=`Error in function `+e.split(`
`)[0].split(`<`)[0]+`: `+n.message;if(!ip.console)throw Error(t);ip.console.error(t,n),ip.alert&&alert(t)}},J.foo.bar=J,J.foo),Tt=function(e){return!0===Array.isArray(Fe)&&Fe.indexOf(e)>-1};switch(r){case`pt`:Se=1;break;case`mm`:Se=72/25.4;break;case`cm`:Se=72/2.54;break;case`in`:Se=72;break;case`px`:Se=Tt(`px_scaling`)==1?.75:96/72;break;case`pc`:case`em`:Se=12;break;case`ex`:Se=6;break;default:if(typeof r!=`number`)throw Error(`Invalid unit: `+r);Se=r}var Y=null;R(),P();var Et=p.__private__.getPageInfo=p.getPageInfo=function(e){if(isNaN(e)||e%1!=0)throw Error(`Invalid argument passed to jsPDF.getPageInfo`);return{objId:K[e].objId,pageNumber:e,pageContext:K[e]}},Dt=p.__private__.getPageInfoByObjId=function(e){if(isNaN(e)||e%1!=0)throw Error(`Invalid argument passed to jsPDF.getPageInfoByObjId`);for(var t in K)if(K[t].objId===e)break;return Et(t)},Ot=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:K[B].objId,pageNumber:B,pageContext:K[B]}};p.addPage=function(){return ut.apply(this,arguments),this},p.setPage=function(){return ft.apply(this,arguments),se.call(this,U[B]),this},p.insertPage=function(e){return this.addPage(),this.movePage(B,e),this},p.movePage=function(e,t){var n,r;if(e>t){n=U[e],r=K[e];for(var i=e;i>t;i--)U[i]=U[i-1],K[i]=K[i-1];U[t]=n,K[t]=r,this.setPage(t)}else if(e<t){n=U[e],r=K[e];for(var a=e;a<t;a++)U[a]=U[a+1],K[a]=K[a+1];U[t]=n,K[t]=r,this.setPage(t)}return this},p.deletePage=function(){return dt.apply(this,arguments),this},p.__private__.text=p.text=function(e,t,n,r,i){var a,o,s,c,l,u,d,p,m,h=(r||={}).scope||this;if(typeof e==`number`&&typeof t==`number`&&(typeof n==`string`||Array.isArray(n))){var g=n;n=t,t=e,e=g}if(arguments[3]instanceof q==0?(s=arguments[4],c=arguments[5],Ai(d=arguments[3])===`object`&&d!==null||(typeof s==`string`&&(c=s,s=null),typeof d==`string`&&(c=d,d=null),typeof d==`number`&&(s=d,d=null),r={flags:d,angle:s,align:c})):(T(`The transform parameter of text() with a Matrix value`),m=i),isNaN(t)||isNaN(n)||e==null)throw Error(`Invalid arguments passed to jsPDF.text`);if(e.length===0)return h;var _,v=``,x=typeof r.lineHeightFactor==`number`?r.lineHeightFactor:Vt,S=h.internal.scaleFactor;function C(e){return e=e.split(` `).join(Array(r.TabLen||9).join(` `)),ct(e,d)}function E(e){for(var t,n=e.concat(),r=[],i=n.length;i--;)typeof(t=n.shift())==`string`?r.push(t):Array.isArray(e)&&(t.length===1||t[1]===void 0&&t[2]===void 0)?r.push(t[0]):r.push([t[0],t[1],t[2]]);return r}function D(e,t){var n;if(typeof e==`string`)n=t(e)[0];else if(Array.isArray(e)){for(var r,i,a=e.concat(),o=[],s=a.length;s--;)typeof(r=a.shift())==`string`?o.push(t(r)[0]):Array.isArray(r)&&typeof r[0]==`string`&&(i=t(r[0],r[1],r[2]),o.push([i[0],i[1],i[2]]));n=o}return n}var O=!1,A=!0;if(typeof e==`string`)O=!0;else if(Array.isArray(e)){var j=e.concat();o=[];for(var M,N=j.length;N--;)(typeof(M=j.shift())!=`string`||Array.isArray(M)&&typeof M[0]!=`string`)&&(A=!1);O=A}if(!1===O)throw Error(`Type of text must be string or Array. "`+e+`" is not recognized.`);typeof e==`string`&&(e=e.match(/[\r?\n]/)?e.split(/\r\n|\r|\n/g):[e]);var P=de/h.internal.scaleFactor,F=P*(x-1);switch(r.baseline){case`bottom`:n-=F;break;case`top`:n+=P-F;break;case`hanging`:n+=P-2*F;break;case`middle`:n+=P/2-F}if((u=r.maxWidth||0)>0&&(typeof e==`string`?e=h.splitTextToSize(e,u):Object.prototype.toString.call(e)===`[object Array]`&&(e=e.reduce(function(e,t){return e.concat(h.splitTextToSize(t,u))},[]))),a={text:e,x:t,y:n,options:r,mutex:{pdfEscape:ct,activeFontKey:xe,fonts:Ee,activeFontSize:de}},Pe.publish(`preProcessText`,a),e=a.text,s=(r=a.options).angle,m instanceof q==0&&s&&typeof s==`number`){s*=Math.PI/180,r.rotationDirection===0&&(s=-s),b===y&&(s=-s);var I=Math.cos(s),R=Math.sin(s);m=new q(I,R,-R,I,0,0)}else s&&s instanceof q&&(m=s);b!==y||m||(m=Be),(l=r.charSpace||nn)!==void 0&&(v+=w(k(l))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(p=r.horizontalScale)!==void 0&&(v+=w(100*p)+` Tz
`),r.lang;var z=-1,B=r.renderingMode===void 0?r.stroke:r.renderingMode,V=h.internal.getCurrentPageInfo().pageContext;switch(B){case 0:case!1:case`fill`:z=0;break;case 1:case!0:case`stroke`:z=1;break;case 2:case`fillThenStroke`:z=2;break;case 3:case`invisible`:z=3;break;case 4:case`fillAndAddForClipping`:z=4;break;case 5:case`strokeAndAddPathForClipping`:z=5;break;case 6:case`fillThenStrokeAndAddToPathForClipping`:z=6;break;case 7:case`addToPathForClipping`:z=7}var H=V.usedRenderingMode===void 0?-1:V.usedRenderingMode;z===-1?H!==-1&&(v+=`0 Tr
`):v+=z+` Tr
`,z!==-1&&(V.usedRenderingMode=z),c=r.align||`left`;var ee,te=de*x,ne=h.internal.pageSize.getWidth(),re=Ee[xe];l=r.charSpace||rn,u=r.maxWidth||0,d=Object.assign({autoencode:!0,noBOM:!0},r.flags);var ie=[],U=function(e){return h.getStringUnitWidth(e,{font:re,charSpace:l,fontSize:de,doKerning:!1})*de/S};if(Object.prototype.toString.call(e)===`[object Array]`){var ae;o=E(e),c!==`left`&&(ee=o.map(U));var oe,se=0;if(c===`right`){t-=ee[0],e=[],N=o.length;for(var ce=0;ce<N;ce++)ce===0?(oe=Yt(t),ae=Xt(n)):(oe=k(se-ee[ce]),ae=-te),e.push([o[ce],oe,ae]),se=ee[ce]}else if(c===`center`){t-=ee[0]/2,e=[],N=o.length;for(var le=0;le<N;le++)le===0?(oe=Yt(t),ae=Xt(n)):(oe=k((se-ee[le])/2),ae=-te),e.push([o[le],oe,ae]),se=ee[le]}else if(c===`left`){e=[],N=o.length;for(var ue=0;ue<N;ue++)e.push(o[ue])}else if(c===`justify`&&re.encoding===`Identity-H`){e=[],N=o.length,u=u===0?ne:u;for(var fe=0,pe=0;pe<N;pe++)if(ae=pe===0?Xt(n):-te,oe=pe===0?Yt(t):fe,pe<N-1){var he=k((u-ee[pe])/(o[pe].split(` `).length-1)),ge=o[pe].split(` `);e.push([ge[0]+` `,oe,ae]),fe=0;for(var _e=1;_e<ge.length;_e++){var ve=(U(ge[_e-1]+` `+ge[_e])-U(ge[_e]))*S+he;_e==ge.length-1?e.push([ge[_e],ve,0]):e.push([ge[_e]+` `,ve,0]),fe-=ve}}else e.push([o[pe],oe,ae]);e.push([``,fe,0])}else{if(c!==`justify`)throw Error(`Unrecognized alignment option, use "left", "center", "right" or "justify".`);for(e=[],N=o.length,u=u===0?ne:u,pe=0;pe<N;pe++){ae=pe===0?Xt(n):-te,oe=pe===0?Yt(t):0;var ye=o[pe].split(` `).length-1,be=ye>0?(u-ee[pe])/ye:0;pe<N-1?ie.push(w(k(be))):ie.push(0),e.push([o[pe],oe,ae])}}}!0===(typeof r.R2L==`boolean`?r.R2L:me)&&(e=D(e,function(e,t,n){return[e.split(``).reverse().join(``),t,n]})),a={text:e,x:t,y:n,options:r,mutex:{pdfEscape:ct,activeFontKey:xe,fonts:Ee,activeFontSize:de}},Pe.publish(`postProcessText`,a),e=a.text,_=a.mutex.isHex||!1;var Se=Ee[xe].encoding;Se!==`WinAnsiEncoding`&&Se!==`StandardEncoding`||(e=D(e,function(e,t,n){return[C(e),t,n]})),o=E(e),e=[];for(var Ce,we,Te,De=+!!Array.isArray(o[0]),Oe=``,ke=function(e,t,n){var i=``;return n instanceof q?(n=typeof r.angle==`number`?ze(n,new q(1,0,0,1,e,t)):ze(new q(1,0,0,1,e,t),n),b===y&&(n=ze(new q(1,0,0,-1,0,0),n)),i=n.join(` `)+` Tm
`,z!==-1&&(V.usedRenderingMode=z),c=r.align||`left`;var ee,te=de*x,ne=h.internal.pageSize.getWidth(),re=Ee[xe];l=r.charSpace||nn,u=r.maxWidth||0,d=Object.assign({autoencode:!0,noBOM:!0},r.flags);var ie=[],U=function(e){return h.getStringUnitWidth(e,{font:re,charSpace:l,fontSize:de,doKerning:!1})*de/S};if(Object.prototype.toString.call(e)===`[object Array]`){var ae;o=E(e),c!==`left`&&(ee=o.map(U));var oe,se=0;if(c===`right`){t-=ee[0],e=[],N=o.length;for(var ce=0;ce<N;ce++)ce===0?(oe=Jt(t),ae=Yt(n)):(oe=k(se-ee[ce]),ae=-te),e.push([o[ce],oe,ae]),se=ee[ce]}else if(c===`center`){t-=ee[0]/2,e=[],N=o.length;for(var le=0;le<N;le++)le===0?(oe=Jt(t),ae=Yt(n)):(oe=k((se-ee[le])/2),ae=-te),e.push([o[le],oe,ae]),se=ee[le]}else if(c===`left`){e=[],N=o.length;for(var ue=0;ue<N;ue++)e.push(o[ue])}else if(c===`justify`&&re.encoding===`Identity-H`){e=[],N=o.length,u=u===0?ne:u;for(var fe=0,pe=0;pe<N;pe++)if(ae=pe===0?Yt(n):-te,oe=pe===0?Jt(t):fe,pe<N-1){var he=k((u-ee[pe])/(o[pe].split(` `).length-1)),ge=o[pe].split(` `);e.push([ge[0]+` `,oe,ae]),fe=0;for(var _e=1;_e<ge.length;_e++){var ve=(U(ge[_e-1]+` `+ge[_e])-U(ge[_e]))*S+he;_e==ge.length-1?e.push([ge[_e],ve,0]):e.push([ge[_e]+` `,ve,0]),fe-=ve}}else e.push([o[pe],oe,ae]);e.push([``,fe,0])}else{if(c!==`justify`)throw Error(`Unrecognized alignment option, use "left", "center", "right" or "justify".`);for(e=[],N=o.length,u=u===0?ne:u,pe=0;pe<N;pe++){ae=pe===0?Yt(n):-te,oe=pe===0?Jt(t):0;var ye=o[pe].split(` `).length-1,be=ye>0?(u-ee[pe])/ye:0;pe<N-1?ie.push(w(k(be))):ie.push(0),e.push([o[pe],oe,ae])}}}!0===(typeof r.R2L==`boolean`?r.R2L:me)&&(e=D(e,function(e,t,n){return[e.split(``).reverse().join(``),t,n]})),a={text:e,x:t,y:n,options:r,mutex:{pdfEscape:ct,activeFontKey:xe,fonts:Ee,activeFontSize:de}},Pe.publish(`postProcessText`,a),e=a.text,_=a.mutex.isHex||!1;var Se=Ee[xe].encoding;Se!==`WinAnsiEncoding`&&Se!==`StandardEncoding`||(e=D(e,function(e,t,n){return[C(e),t,n]})),o=E(e),e=[];for(var Ce,we,Te,De=+!!Array.isArray(o[0]),Oe=``,ke=function(e,t,n){var i=``;return n instanceof q?(n=typeof r.angle==`number`?ze(n,new q(1,0,0,1,e,t)):ze(new q(1,0,0,1,e,t),n),b===y&&(n=ze(new q(1,0,0,-1,0,0),n)),i=n.join(` `)+` Tm
`):i=w(e)+` `+w(t)+` Td
`,i},Ae=0;Ae<o.length;Ae++){switch(Oe=``,De){case 1:Te=(_?`<`:`(`)+o[Ae][0]+(_?`>`:`)`),Ce=parseFloat(o[Ae][1]),we=parseFloat(o[Ae][2]);break;case 0:Te=(_?`<`:`(`)+o[Ae]+(_?`>`:`)`),Ce=Yt(t),we=Xt(n)}ie!==void 0&&ie[Ae]!==void 0&&(Oe=ie[Ae]+` Tw
`,i},Ae=0;Ae<o.length;Ae++){switch(Oe=``,De){case 1:Te=(_?`<`:`(`)+o[Ae][0]+(_?`>`:`)`),Ce=parseFloat(o[Ae][1]),we=parseFloat(o[Ae][2]);break;case 0:Te=(_?`<`:`(`)+o[Ae]+(_?`>`:`)`),Ce=Jt(t),we=Yt(n)}ie!==void 0&&ie[Ae]!==void 0&&(Oe=ie[Ae]+` Tw
`),Ae===0?e.push(Oe+ke(Ce,we,m)+Te):De===0?e.push(Oe+Te):De===1&&e.push(Oe+ke(Ce,we,m)+Te)}e=De===0?e.join(` Tj
T* `):e.join(` Tj
`),e+=` Tj
`;var G=`BT
/`;return G+=xe+` `+de+` Tf
`,G+=w(de*x)+` TL
`,G+=tn+`
`,G+=v,G+=e,W(G+=`ET`),f[xe]=!0,h};var kt=p.__private__.clip=p.clip=function(e){return W(e===`evenodd`?`W*`:`W`),this};p.clipEvenOdd=function(){return kt(`evenodd`)},p.__private__.discardPath=p.discardPath=function(){return W(`n`),this};var At=p.__private__.isValidStyle=function(e){var t=!1;return[void 0,null,`S`,`D`,`F`,`DF`,`FD`,`f`,`f*`,`B`,`B*`,`n`].indexOf(e)!==-1&&(t=!0),t};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(e){return At(e)&&(l=e),this};var jt=p.__private__.getStyle=p.getStyle=function(e){var t=l;switch(e){case`D`:case`S`:t=`S`;break;case`F`:t=`f`;break;case`FD`:case`DF`:t=`B`;break;case`f`:case`f*`:case`B`:case`B*`:t=e}return t},Mt=p.close=function(){return W(`h`),this};p.stroke=function(){return W(`S`),this},p.fill=function(e){return Nt(`f`,e),this},p.fillEvenOdd=function(e){return Nt(`f*`,e),this},p.fillStroke=function(e){return Nt(`B`,e),this},p.fillStrokeEvenOdd=function(e){return Nt(`B*`,e),this};var Nt=function(e,t){ji(t)===`object`?It(t,e):W(e)},Pt=function(e){e===null||b===y&&e===void 0||(e=jt(e),W(e))};function Ft(e,t,n,r,i){var a=new Lp(t||this.boundingBox,n||this.xStep,r||this.yStep,this.gState,i||this.matrix);return a.stream=this.stream,Ve(e+`$$`+ this.cloneIndex+++`$$`,a),a}var It=function(e,t){var n=Ae[e.key],r=ke[n];if(r instanceof Ip)W(`q`),W(Lt(t)),r.gState&&p.setGState(r.gState),W(e.matrix.toString()+` cm`),W(`/`+n+` sh`),W(`Q`);else if(r instanceof Lp){var i=new q(1,0,0,-1,0,bn());e.matrix&&(i=i.multiply(e.matrix||Be),n=Ft.call(r,e.key,e.boundingBox,e.xStep,e.yStep,i).id),W(`q`),W(`/Pattern cs`),W(`/`+n+` scn`),r.gState&&p.setGState(r.gState),W(t),W(`Q`)}},Lt=function(e){switch(e){case`f`:case`F`:case`n`:return`W n`;case`f*`:return`W* n`;case`B`:case`S`:return`W S`;case`B*`:return`W* S`}},Rt=p.moveTo=function(e,t){return W(w(k(e))+` `+w(A(t))+` m`),this},zt=p.lineTo=function(e,t){return W(w(k(e))+` `+w(A(t))+` l`),this},Bt=p.curveTo=function(e,t,n,r,i,a){return W([w(k(e)),w(A(t)),w(k(n)),w(A(r)),w(k(i)),w(A(a)),`c`].join(` `)),this};p.__private__.line=p.line=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!At(i))throw Error(`Invalid arguments passed to jsPDF.line`);return b===v?this.lines([[n-e,r-t]],e,t,[1,1],i||`S`):this.lines([[n-e,r-t]],e,t,[1,1]).stroke()},p.__private__.lines=p.lines=function(e,t,n,r,i,a){var o,s,c,l,u,d,f,p,m,h,g,_;if(typeof e==`number`&&(_=n,n=t,t=e,e=_),r||=[1,1],a||=!1,isNaN(t)||isNaN(n)||!Array.isArray(e)||!Array.isArray(r)||!At(i)||typeof a!=`boolean`)throw Error(`Invalid arguments passed to jsPDF.lines`);for(Rt(t,n),o=r[0],s=r[1],l=e.length,h=t,g=n,c=0;c<l;c++)(u=e[c]).length===2?(h=u[0]*o+h,g=u[1]*s+g,zt(h,g)):(d=u[0]*o+h,f=u[1]*s+g,p=u[2]*o+h,m=u[3]*s+g,h=u[4]*o+h,g=u[5]*s+g,Bt(d,f,p,m,h,g));return a&&Mt(),Pt(i),this},p.path=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.c;switch(n.op){case`m`:Rt(r[0],r[1]);break;case`l`:zt(r[0],r[1]);break;case`c`:Bt.apply(this,r);break;case`h`:Mt()}}return this},p.__private__.rect=p.rect=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!At(i))throw Error(`Invalid arguments passed to jsPDF.rect`);return b===v&&(r=-r),W([w(k(e)),w(A(t)),w(k(n)),w(k(r)),`re`].join(` `)),Pt(i),this},p.__private__.triangle=p.triangle=function(e,t,n,r,i,a,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a)||!At(o))throw Error(`Invalid arguments passed to jsPDF.triangle`);return this.lines([[n-e,r-t],[i-n,a-r],[e-i,t-a]],e,t,[1,1],o,!0),this},p.__private__.roundedRect=p.roundedRect=function(e,t,n,r,i,a,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a)||!At(o))throw Error(`Invalid arguments passed to jsPDF.roundedRect`);var s=4/3*(Math.SQRT2-1);return i=Math.min(i,.5*n),a=Math.min(a,.5*r),this.lines([[n-2*i,0],[i*s,0,i,a-a*s,i,a],[0,r-2*a],[0,a*s,-i*s,a,-i,a],[2*i-n,0],[-i*s,0,-i,-a*s,-i,-a],[0,2*a-r],[0,-a*s,i*s,-a,i,-a]],e+i,t,[1,1],o,!0),this},p.__private__.ellipse=p.ellipse=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!At(i))throw Error(`Invalid arguments passed to jsPDF.ellipse`);var a=4/3*(Math.SQRT2-1)*n,o=4/3*(Math.SQRT2-1)*r;return Rt(e+n,t),Bt(e+n,t-o,e+a,t-r,e,t-r),Bt(e-a,t-r,e-n,t-o,e-n,t),Bt(e-n,t+o,e-a,t+r,e,t+r),Bt(e+a,t+r,e+n,t+o,e+n,t),Pt(i),this},p.__private__.circle=p.circle=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||!At(r))throw Error(`Invalid arguments passed to jsPDF.circle`);return this.ellipse(e,t,n,n,r)},p.setFont=function(e,t,n){return n&&(t=C(t,n)),xe=mt(e,t,{disableWarning:!1}),this};var Vt=p.__private__.getFont=p.getFont=function(){return Ee[mt.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var e,t,n={};for(e in De)if(De.hasOwnProperty(e))for(t in n[e]=[],De[e])De[e].hasOwnProperty(t)&&n[e].push(t);return n},p.addFont=function(e,t,n,r,i){var a=[`StandardEncoding`,`MacRomanEncoding`,`Identity-H`,`WinAnsiEncoding`];return arguments[3]&&a.indexOf(arguments[3])!==-1?i=arguments[3]:arguments[3]&&a.indexOf(arguments[3])==-1&&(n=C(n,r)),st.call(this,e,t,n,i||=`IdentiLine truncated
`),i}},rm=function(e,t){var n=e.fontSize===0?e.maxFontSize:e.fontSize,r={text:``,fontSize:``},i=(t=(t=t.substr(0,1)==`(`?t.substr(1):t).substr(t.length-1)==`)`?t.substr(0,t.length-1):t).split(` `);i=e.multiline?i.map(function(e){return e.split(`
`)}):i.map(function(e){return[e]});var a=n,o=Z.internal.getHeight(e)||0;o=o<0?-o:o;var s=Z.internal.getWidth(e)||0;s=s<0?-s:s;var c=function(t,n,r){return t+1<i.length?im(n+` `+i[t+1][0],e,r).width<=s-4:!1};a++;t:for(;a>0;){t=``,a--;var l,u,d=im(`3`,e,a).height,f=e.multiline?o-a:(o-d)/2,p=f+=2,m=0,h=0,g=0;if(a<=0){t=`(...) Tj
`,t+=`% Width of Text: `+im(t,e,a=12).width+`, FieldWidth:`+s+`
`;break}for(var _=``,v=0,y=0;y<i.length;y++)if(i.hasOwnProperty(y)){var b=!1;if(i[y].length!==1&&g!==i[y].length-1){if((d+2)*(v+2)+2>o)continue t;_+=i[y][g],b=!0,h=y,y--}else{_=(_+=i[y][g]+` `).substr(_.length-1)==` `?_.substr(0,_.length-1):_;var x=parseInt(y),S=c(x,_,a),C=y>=i.length-1;if(S&&!C){_+=` `,g=0;continue}if(S||C){if(C)h=x;else if(e.multiline&&(d+2)*(v+2)+2>o)continue t}else{if(!e.multiline||(d+2)*(v+2)+2>o)continue t;h=x}}for(var w=``,T=m;T<=h;T++){var E=i[T];if(e.multiline){if(T===h){w+=E[g]+` `,g=(g+1)%E.length;continue}if(T===m){w+=E[E.length-1]+` `;continue}}w+=E[0]+` `}switch(w=w.substr(w.length-1)==` `?w.substr(0,w.length-1):w,u=im(w,e,a).width,e.textAlign){case`right`:l=s-u-2;break;case`center`:l=(s-u)/2;break;default:l=2}t+=Wp(l)+` `+Wp(p)+` Td
`,t+=`(`+Vp(w)+`) Tj
`,t+=-Wp(l)+` 0 Td
`,p=-(a+2),u=0,m=b?h:h+1,v++,_=``}break}return r.text=t,r.fontSize=a,r},im=function(e,t,n){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(e,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:t.scope.getStringUnitWidth(`3`,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:i}},am={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},om=function(e,t){var n={type:`reference`,object:e};t.internal.getPageInfo(e.page).pageContext.annotations.find(function(e){return e.type===n.type&&e.object===n.object})===void 0&&t.internal.getPageInfo(e.page).pageContext.annotations.push(n)},sm=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||!1===e.internal.acroformPlugin.isInitialized)){if(pm.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(am)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw Error(`Exception while creating AcroformDictionary`);Bp=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new fm,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe(`postPutResources`,function(){(function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe(`buildDocument`,function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];r.objId=void 0,r.hasAnnotation&&om(r,e)}})(e)}),e.internal.events.subscribe(`putCatalog`,function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw Error(`putCatalogCallback: Root missing.`);e.internal.write(`/AcroForm `+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+` 0 R`)})(e)}),e.internal.events.subscribe(`postPutPages`,function(t){(function(e,t){var n=!e;for(var r in e||(t.internal.newObjectDeferredBegin(t.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),t.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),e||=t.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(e.hasOwnProperty(r)){var i=e[r],a=[],o=i.Rect;if(i.Rect&&=tm(i.Rect,t),t.internal.newObjectDeferredBegin(i.objId,!0),i.DA=Z.createDefaultAppearanceStream(i),ji(i)===`object`&&typeof i.getKeyValueListForStream==`function`&&(a=i.getKeyValueListForStream()),i.Rect=o,i.hasAppearanceStream&&!i.appearanceStreamContent){var s=nm(i);a.push({key:`AP`,value:`<</N `+s+`>>`}),t.internal.acroformPlugin.xForms.push(s)}if(i.appearanceStreamContent){var c=``;for(var l in i.appearanceStreamContent)if(i.appearanceStreamContent.hasOwnProperty(l)){var u=i.appearanceStreamContent[l];if(c+=`/`+l+` `,c+=`<<`,Object.keys(u).length>=1||Array.isArray(u)){for(var r in u)if(u.hasOwnProperty(r)){var d=u[r];typeof d==`function`&&(d=d.call(t,i)),c+=`/`+r+` `+d+` `,t.internal.acroformPlugin.xForms.indexOf(d)>=0||t.internal.acroformPlugin.xForms.push(d)}}else typeof(d=u)==`function`&&(d=d.call(t,i)),c+=`/`+r+` `+d,t.internal.acroformPlugin.xForms.indexOf(d)>=0||t.internal.acroformPlugin.xForms.push(d);c+=`>>`}a.push({key:`AP`,value:`<<
`+c+`>>`})}t.internal.putStream({additionalKeyValues:a,objectId:i.objId}),t.internal.out(`endobj`)}n&&function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=n,i=e[n];t.internal.newObjectDeferredBegin(i.objId,!0),ji(i)===`object`&&typeof i.putStream==`function`&&i.putStream(),delete e[r]}}(t.internal.acroformPlugin.xForms,t)})(t,e)}),e.internal.acroformPlugin.isInitialized=!0}},cm=zp.__acroform__.arrayToPdfArray=function(e,t,n){var r=function(e){return e};if(Array.isArray(e)){for(var i=`[`,a=0;a<e.length;a++)switch(a!==0&&(i+=` `),ji(e[a])){case`boolean`:case`number`:case`object`:i+=e[a].toString();break;case`string`:e[a].substr(0,1)===`/`?i+=`/`+Up(e[a].substr(1)):(t!==void 0&&n&&(r=n.internal.getEncryptor(t)),i+=`(`+Vp(r(e[a].toString()))+`)`)}return i+`]`}throw Error(`Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray`)},lm=function(e,t,n){var r=function(e){return e};return t!==void 0&&n&&(r=n.internal.getEncryptor(t)),(e||=``).toString(),`(`+Vp(r(e))+`)`},um=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};um.prototype.toString=function(){return this.objId+` 0 R`},um.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out(`endobj`)},um.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(e){return e!=`content`&&e!=`appearanceStreamContent`&&e!=`scope`&&e!=`objId`&&e.substring(0,1)!=`_`});for(var n in t)if(!1===Object.getOwnPropertyDescriptor(this,t[n]).configurable){var r=t[n],i=this[r];i&&(Array.isArray(i)?e.push({key:r,value:cm(i,this.objId,this.scope)}):i instanceof um?(i.scope=this.scope,e.push({key:r,value:i.objId+` 0 R`})):typeof i!=`function`&&e.push({key:r,value:i}))}return e};var dm=function(){um.call(this),Object.defineProperty(this,"Type",{value:`/XObject`,configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:`/Form`,configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:`2 0 R`,configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};Kp(dm,um);var fm=function(){um.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),`(`+Vp(t(e))+`)`}},set:function(t){e=t}})};Kp(fm,um);var pm=function e(){um.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){if(isNaN(e))throw Error(`Invalid value "`+e+`" for attribute F supplied.`);t=e}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Qp(t,3)},set:function(e){!!e==1?this.F=$p(t,3):this.F=em(t,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){if(isNaN(e))throw Error(`Invalid value "`+e+`" for attribute Ff supplied.`);n=e}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(e){r=e===void 0?[]:e}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(e){r[0]=e}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(e){r[1]=e}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(e){r[2]=e}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(e){r[3]=e}});var i=``;Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(e){switch(e){case`/Btn`:case`/Tx`:case`/Ch`:case`/Sig`:i=e;break;default:throw Error(`Invalid value "`+e+`" for attribute FT supplied.`)}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof xm)return;a=`FieldObject`+ e.FieldNum++}var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),`(`+Vp(t(a))+`)`},set:functio Line truncated
`)}},set:function(e){ji(e)===`object`&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||``},set:function(e){typeof e==`string`&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){var n=t==null?``:t.toString();n.substr(0,1)===`/`&&(n=n.substr(1)),e=`/`+Up(n)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e=`/`+Up(t)}})};Kp(vm,pm);var ym=function(){vm.call(this),this.pushButton=!0};Kp(ym,vm);var bm=function(){vm.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t===void 0?[]:t}})};Kp(bm,vm);var xm=function(){var e,t;pm.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(e){t=e}});var n,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};this.scope&&(e=this.scope.internal.getEncryptor(this.objId));var t,n=[];for(t in n.push(`<<`),r)n.push(`/`+t+` (`+Vp(e(r[t]))+`)`);return n.push(`>>`),n.join(`
`)},set:function(e){ji(e)===`object`&&(r=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||``},set:function(e){typeof e==`string`&&(r.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){var t=e==null?``:e.toString();t.substr(0,1)===`/`&&(t=t.substr(1)),n=`/`+Up(t)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){var t=e==null?``:e.toString();t.substr(0,1)===`/`&&(t=t.substr(1)),n=`/`+Up(t)}}),this.caption=`l`,this.appearanceState=`Off`,this._AppearanceType=Z.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Kp(xm,pm),bm.prototype.setAppearance=function(e){if(!(`createAppearanceStream`in e)||!(`getCA`in e))throw Error(`Couldn't assign Appearance to RadioButton. Appearance was Invalid!`);for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var n=this.Kids[t];n.appearanceStreamContent=e.createAppearanceStream(n.optionName),n.caption=e.getCA()}},bm.prototype.createOption=function(e){var t=new xm;return t.Parent=this,t.optionName=e,this.Kids.push(t),Tm.call(this.scope,t),t};var Sm=function(){vm.call(this),this.fontName=`zapfdingbats`,this.caption=`3`,this.appearanceState=`On`,this.value=`On`,this.textAlign=`center`,this.appearanceStreamContent=Z.CheckBox.createAppearanceStream()};Kp(Sm,vm);var Cm=function(){pm.call(this),this.FT=`/Tx`,Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Qp(this.Ff,13)},set:function(e){!!e==1?this.Ff=$p(this.Ff,13):this.Ff=em(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Qp(this.Ff,21)},set:function(e){!!e==1?this.Ff=$p(this.Ff,21):this.Ff=em(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Qp(this.Ff,23)},set:function(e){!!e==1?this.Ff=$p(this.Ff,23):this.Ff=em(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Qp(this.Ff,24)},set:function(e){!!e==1?this.Ff=$p(this.Ff,24):this.Ff=em(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Qp(this.Ff,25)},set:function(e){!!e==1?this.Ff=$p(this.Ff,25):this.Ff=em(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Qp(this.Ff,26)},set:function(e){!!e==1?this.Ff=$p(this.Ff,26):this.Ff=em(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Kp(Cm,pm);var wm=function(){Cm.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Qp(this.Ff,14)},set:function(e){!!e==1?this.Ff=$p(this.Ff,14):this.Ff=em(this.Ff,14)}}),this.password=!0};Kp(wm,Cm);var Z={CheckBox:{createAppearanceStream:function(){return{N:{On:Z.CheckBox.YesNormal},D:{On:Z.CheckBox.YesPushDown,Off:Z.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=Jp(e);t.scope=e.scope;var n=[],r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),a=rm(e,e.caption);return n.push(`0.749023 g`),n.push(`0 0 `+Wp(Z.internal.getWidth(e))+` `+Wp(Z.internal.getHeight(e))+` re`),n.push(`f`),n.push(`BMC`),n.push(`q`),n.push(`0 0 1 rg`),n.push(`/`+r+` `+Wp(a.fontSize)+` Tf `+i),n.push(`BT`),n.push(a.text),n.push(`ET`),n.push(`Q`),n.push(`EMC`),t.stream=n.join(`
`),t},YesNormal:function(e){var t=Jp(e);t.scope=e.scope;var n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color),i=[],a=Z.internal.getHeight(e),o=Z.internal.getWidth(e),s=rm(e,e.caption);return i.push(`1 g`),i.push(`0 0 `+Wp(o)+` `+Wp(a)+` re`),i.push(`f`),i.push(`q`),i.push(`0 0 1 rg`),i.push(`0 0 `+Wp(o-1)+` `+Wp(a-1)+` re`),i.push(`W`),i.push(`n`),i.push(`0 g`),i.push(`BT`),i.push(`/`+n+` `+Wp(s.fontSize)+` Tf `+r),i.push(s.text),i.push(`ET`),i.push(`Q`),t.stream=i.join(`
`),t},OffPushDown:function(e){var t=Jp(e);t.scope=e.scope;var n=[];return n.push(`0.749023 g`),n.push(`0 0 `+Wp(Z.internal.getWidth(e))+` `+Wp(Z.internal.getHeight(e))+` re`),n.push(`f`),t.stream=n.join(`
`),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:Z.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=Z.RadioButton.Circle.YesNormal,t.D[e]=Z.RadioButton.Circle.YesPushDown,t},getCA:function(){return`l`},YesNormal:function(e){var t=Jp(e);t.scope=e.scope;var n=[],r=Z.internal.getWidth(e)<=Z.internal.getHeight(e)?Z.internal.getWidth(e)/4:Z.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Z.internal.Bezier_C,a=Number((r*i).toFixed(5));return n.push(`q`),n.push(`1 0 0 1 `+Gp(Z.internal.getWidth(e)/2)+` `+Gp(Z.internal.getHeight(e)/2)+` cm`),n.push(r+` 0 m`),n.push(r+` `+a+` `+a+` `+r+` 0 `+r+` c`),n.push(`-`+a+` `+r+` -`+r+` `+a+` -`+r+` 0 c`),n.push(`-`+r+` -`+a+` -`+a+` -`+r+` 0 -`+r+` c`),n.push(a+` -`+r+` `+r+` -`+a+` `+r+` 0 c`),n.push(`f`),n.push(`Q`),t.stream=n.join(`
`),t},YesPushDown:function(e){var t=Jp(e);t.scope=e.scope;var n=[],r=Z.internal.getWidth(e)<=Z.internal.getHeight(e)?Z.internal.getWidth(e)/4:Z.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*Z.internal.Bezier_C).toFixed(5)),o=Number((r*Z.internal.Bezier_C).toFixed(5));return n.push(`0.749023 g`),n.push(`q`),n.push(`1 0 0 1 `+Gp(Z.internal.getWidth(e)/2)+` `+Gp(Z.internal.getHeight(e)/2)+` cm`),n.push(i+` 0 m`),n.push(i+` `+a+` `+a+` `+i+` 0 `+i+` c`),n.push(`-`+a+` `+i+` -`+i+` `+a+` -`+i+` 0 c`),n.push(`-`+i+` -`+a+` -`+a+` -`+i+` 0 -`+i+` c`),n.push(a+` -`+i+` `+i+` -`+a+` `+i+` 0 c`),n.push(`f`),n.push(`Q`),n.push(`0 g`),n.push(`q`),n.push(`1 0 0 1 `+Gp(Z.internal.getWidth(e)/2)+` `+Gp(Z.internal.getHeight(e)/2)+` cm`),n.push(r+` 0 m`),n.push(r+` `+o+` `+o+` `+r+` 0 `+r+` c`),n.push(`-`+o+` `+r+` -`+r+` `+o+` -`+r+` 0 c`),n.push(`-`+r+` -`+o+` -`+o+` -`+r+` 0 -`+r+` c`),n.push(o+` -`+r+` `+r+` -`+o+` `+r+` 0 c`),n.push(`f`),n.push(`Q`),t.stream=n.join(`
`),t},OffPushDown:function(e){var t=Jp(e);t.scope=e.scope;var n=[],r=Z.internal.getWidth(e)<=Z.internal.getHeight(e)?Z.internal.getWidth(e)/4:Z.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*Z.internal.Bezier_C).toFixed(5));return n.push(`0.749023 g`),n.push(`q`),n.push(`1 0 0 1 `+Gp(Z.internal.getWidth(e)/2)+` `+Gp(Z.internal.getHeight(e)/2)+` cm`),n.push(i+` 0 m`),n.push(i+` `+a+` `+a+` `+i+` 0 `+i+` c`),n.push(`-`+a+` `+i+` -`+i+` `+a+` -`+i+` 0 c`),n.push(`-`+i+` -`+a+` -`+a+` -`+i+` 0 -`+i+` c`),n.push(a+` -`+i+` `+i+` -`+a+` `+i+` 0 c`),n.push(`f`),n.push(`Q`),t.stream=n.join(`
`),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:Z.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=Z.RadioButton.Cross.YesNormal,t.D[e]=Z.RadioButton.Cross.YesPushDown,t},getCA:function(){return`8`},YesNormal:function(e){var t=Jp(e);t.scope=e.scope;var n=[],r=Z.internal.calculateCross(e);return n.push(`q`),n.push(`1 1 `+Wp(Z.internal.getWidth(e)-2)+` `+Wp(Z.internal.getHeight(e)-2)+` re`),n.push(`W`),n.push(`n`),n.push(Wp(r.x1.x)+` `+Wp(r.x1.y)+` m`),n.push(Wp(r.x2.x)+` `+Wp(r.x2.y)+` l`),n.push(Wp(r.x4.x)+` `+Wp(r.x4.y)+` m`),n.push(Wp(r.x3.x)+` `+Wp(r.x3.y)+` l`),n.push(`s`),n.push(`Q`),t.stream=n.join(`
`),t},YesPushDown:function(e){var t=Jp(e);t.scope=e.scope;var n=Z.internal.calculateCross(e),r=[];return r.push(`0.749023 g`),r.push(`0 0 `+Wp(Z.internal.getWidth(e))+` `+Wp(Z.internal.getHeight(e))+` re`),r.push(`f`),r.push(`q`),r.push(`1 1 `+Wp(Z.internal.getWidth(e)-2)+` `+Wp(Z.internal.getHeight(e)-2)+` re`),r.push(`W`),r.push(`n`),r.push(Wp(n.x1.x)+` `+Wp(n.x1.y)+` m`),r.push(Wp(n.x2.x)+` `+Wp(n.x2.y)+` l`),r.push(Wp(n.x4.x)+` `+Wp(n.x4.y)+` m`),r.push(Wp(n.x3.x)+` `+Wp(n.x3.y)+` l`),r.push(`s`),r.push(`Q`),t.stream=r.join(`
`),t},OffPushDown:function(e){var t=Jp(e);t.scope=e.scope;var n=[];return n.push(`0.749023 g`),n.push(`0 0 `+Wp(Z.internal.getWidth(e))+` `+Wp(Z.internal.getHeight(e))+` re`),n.push(`f`),t.stream=n.join(`
`),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return`/`+t+` `+e.fontSize+` Tf `+n}};Z.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=Z.internal.getWidth(e),n=Z.internal.getHeight(e),r=Math.min(t,n);return{x1:{x:(t-r)/2,y:(n-r)/2+r},x2:{x:(t-r)/2+r,y:(n-r)/2},x3:{x:(t-r)/2,y:(n-r)/2},x4:{x:(t-r)/2+r,y:(n-r)/2+r}}}},Z.internal.getWidth=function(e){var t=0;return ji(e)===`object`&&(t=qp(e.Rect[2])),t},Z.internal.getHeight=function(e){var t=0;return ji(e)===`object`&&(t=qp(e.Rect[3])),t};var Tm=zp.addField=function(e){if(sm(this,e),!(e instanceof pm))throw Error(`Invalid argument passed to jsPDF.addField.`);var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};zp.AcroFormChoiceField=mm,zp.AcroFormListBox=hm,zp.AcroFormComboBox=gm,zp.AcroFormEditBox=_m,zp.AcroFormButton=vm,zp.AcroFormPushButton=ym,zp.AcroFormRadioButton=bm,zp.AcroFormCheckBox=Sm,zp.AcroFormTextField=Cm,zp.AcroFormPasswordField=wm,zp.AcroFormAppearance=Z,zp.AcroForm={ChoiceField:mm,ListBox:hm,ComboBox:gm,EditBox:_m,Button:vm,PushButton:ym,RadioButton:bm,CheckBox:Sm,TextField:Cm,PasswordField:wm,Appearance:Z},Rp.AcroForm={ChoiceField:mm,ListBox:hm,ComboBox:gm,EditBox:_m,Button:vm,PushButton:ym,RadioButton:bm,CheckBox:Sm,TextField:Cm,PasswordField:wm,Appearance:Z},Rp.AcroForm;function Em(e){return e.reduce(function(e,t,n){return e[t]=n,e},{})}(function(e){var t=`addImage_`;e.__addimage__={};var n=`UNKNOWN`,r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=e.__addimage__.getImageFileTypeByImageData=function(e,t){var i,a,o,s,c,l=n;if((t||=n)===`RGBA`||e.data!==void 0&&e.data instanceof Uint8ClampedArray&&`height`in e&&`width`in e)return`RGBA`;if(S(e))for(c in r)for(o=r[c],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(o[i][a]!==void 0&&o[i][a]!==e[a]){s=!1;break}if(!0===s){l=c;break}}else for(c in r)for(o=r[c],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(o[i][a]!==void 0&&o[i][a]!==e.charCodeAt(a)){s=!1;break}if(!0===s){l=c;break}}return l===n&&t!==n&&(l=t),l},a=function e(t){for(var n=this.internal.write,r=this.internal.putStream,i=(0,this.internal.getFilters)();i.indexOf(`FlateEncode`)!==-1;)i.splice(i.indexOf(`FlateEncode`),1);t.objectId=this.internal.newObject();var a=[];if(a.push({key:`Type`,value:`/XObject`}),a.push({key:`Subtype`,value:`/Image`}),a.push({key:`Width`,value:t.width}),a.push({key:`Height`,value:t.height}),t.colorSpace===_.INDEXED?a.push({key:`ColorSpace`,value:`[/Indexed /DeviceRGB `+(t.palette.length/3-1)+` `+(`sMask`in t&&t.sMask!==void 0?t.objectId+2:t.objectId+1)+` 0 R]`}):(a.push({key:`ColorSpace`,value:`/`+t.colorSpace}),t.colorSpace===_.DEVICE_CMYK&&a.push({key:`Decode`,value:`[1 0 1 0 1 0 1 0]`})),a.push({key:`BitsPerComponent`,value:t.bitsPerComponent}),`decodeParameters`in t&&t.decodeParameters!==void 0&&a.push({key:`DecodeParms`,value:`<<`+t.decodeParameters+`>>`}),`transparency`in t&&Array.isArray(t.transparency)&&t.transparency.length>0){for(var o=``,s=0,c=t.transparency.length;s<c;s++)o+=t.transparency[s]+` `+t.transparency[s]+` `;a.push({key:`Mask`,value:`[`+o+`]`})}t.sMask!==void 0&&a.push({key:`SMask`,value:t.objectId+1+` 0 R`});var l=t.filter===void 0?void 0:[`/`+t.filter];if(r({data:t.data,additionalKeyValues:a,alreadyAppliedFilters:l,objectId:t.objectId}),n(`endobj`),`sMask`in t&&t.sMask!==void 0){var u=t.sMaskBitsPerComponent??t.bitsPerComponent,d={width:t.width,height:t.height,colorSpace:`DeviceGray`,bitsPerComponent:u,data:t.sMask};`filter`in t&&(d.decodeParameters=`/Predictor ${t.predictor} /Colors 1 /BitsPerComponent ${u} /Columns ${t.width}`,d.filter=t.filter),e.call(this,d)}if(t.colorSpace===_.INDEXED){var f=this.internal.newObject();r({data:w(new Uint8Array(t.palette)),objectId:f}),n(`endobj`)}},o=function(){var e=this.internal.collections[t+`images`];for(var n in e)a.call(this,e[n])},s=function(){var e,n=this.internal.collections[t+`images`],r=this.internal.write;for(var i in n)r(`/I`+(e=n[i]).index,e.objectId,`0`,`R`)},c=function(){this.internal.collections[t+`images`]||(this.internal.collections[t+`images`]={},this.internal.events.subscribe(`putResources`,o),this.internal.events.subscribe(`putXobjectDict`,s))},l=function(){var e=this.internal.collections[t+`images`];return c.call(this),e},u=function(){return Object.keys(this.internal.collections[t+`images`]).Line truncated
`,G+=en+`
`,G+=v,G+=e,W(G+=`ET`),f[xe]=!0,h};var kt=p.__private__.clip=p.clip=function(e){return W(e===`evenodd`?`W*`:`W`),this};p.clipEvenOdd=function(){return kt(`evenodd`)},p.__private__.discardPath=p.discardPath=function(){return W(`n`),this};var At=p.__private__.isValidStyle=function(e){var t=!1;return[void 0,null,`S`,`D`,`F`,`DF`,`FD`,`f`,`f*`,`B`,`B*`,`n`].indexOf(e)!==-1&&(t=!0),t};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(e){return At(e)&&(l=e),this};var jt=p.__private__.getStyle=p.getStyle=function(e){var t=l;switch(e){case`D`:case`S`:t=`S`;break;case`F`:t=`f`;break;case`FD`:case`DF`:t=`B`;break;case`f`:case`f*`:case`B`:case`B*`:t=e}return t},Mt=p.close=function(){return W(`h`),this};p.stroke=function(){return W(`S`),this},p.fill=function(e){return Nt(`f`,e),this},p.fillEvenOdd=function(e){return Nt(`f*`,e),this},p.fillStroke=function(e){return Nt(`B`,e),this},p.fillStrokeEvenOdd=function(e){return Nt(`B*`,e),this};var Nt=function(e,t){Ai(t)===`object`?It(t,e):W(e)},Pt=function(e){e===null||b===y&&e===void 0||(e=jt(e),W(e))};function Ft(e,t,n,r,i){var a=new Ip(t||this.boundingBox,n||this.xStep,r||this.yStep,this.gState,i||this.matrix);return a.stream=this.stream,Ve(e+`$$`+ this.cloneIndex+++`$$`,a),a}var It=function(e,t){var n=Ae[e.key],r=ke[n];if(r instanceof Fp)W(`q`),W(Lt(t)),r.gState&&p.setGState(r.gState),W(e.matrix.toString()+` cm`),W(`/`+n+` sh`),W(`Q`);else if(r instanceof Ip){var i=new q(1,0,0,-1,0,yn());e.matrix&&(i=i.multiply(e.matrix||Be),n=Ft.call(r,e.key,e.boundingBox,e.xStep,e.yStep,i).id),W(`q`),W(`/Pattern cs`),W(`/`+n+` scn`),r.gState&&p.setGState(r.gState),W(t),W(`Q`)}},Lt=function(e){switch(e){case`f`:case`F`:case`n`:return`W n`;case`f*`:return`W* n`;case`B`:case`S`:return`W S`;case`B*`:return`W* S`}},Rt=p.moveTo=function(e,t){return W(w(k(e))+` `+w(A(t))+` m`),this},zt=p.lineTo=function(e,t){return W(w(k(e))+` `+w(A(t))+` l`),this},Bt=p.curveTo=function(e,t,n,r,i,a){return W([w(k(e)),w(A(t)),w(k(n)),w(A(r)),w(k(i)),w(A(a)),`c`].join(` `)),this};p.__private__.line=p.line=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!At(i))throw Error(`Invalid arguments passed to jsPDF.line`);return b===v?this.lines([[n-e,r-t]],e,t,[1,1],i||`S`):this.lines([[n-e,r-t]],e,t,[1,1]).stroke()},p.__private__.lines=p.lines=function(e,t,n,r,i,a){var o,s,c,l,u,d,f,p,m,h,g,_;if(typeof e==`number`&&(_=n,n=t,t=e,e=_),r||=[1,1],a||=!1,isNaN(t)||isNaN(n)||!Array.isArray(e)||!Array.isArray(r)||!At(i)||typeof a!=`boolean`)throw Error(`Invalid arguments passed to jsPDF.lines`);for(Rt(t,n),o=r[0],s=r[1],l=e.length,h=t,g=n,c=0;c<l;c++)(u=e[c]).length===2?(h=u[0]*o+h,g=u[1]*s+g,zt(h,g)):(d=u[0]*o+h,f=u[1]*s+g,p=u[2]*o+h,m=u[3]*s+g,h=u[4]*o+h,g=u[5]*s+g,Bt(d,f,p,m,h,g));return a&&Mt(),Pt(i),this},p.path=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.c;switch(n.op){case`m`:Rt(r[0],r[1]);break;case`l`:zt(r[0],r[1]);break;case`c`:Bt.apply(this,r);break;case`h`:Mt()}}return this},p.__private__.rect=p.rect=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!At(i))throw Error(`Invalid arguments passed to jsPDF.rect`);return b===v&&(r=-r),W([w(k(e)),w(A(t)),w(k(n)),w(k(r)),`re`].join(` `)),Pt(i),this},p.__private__.triangle=p.triangle=function(e,t,n,r,i,a,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a)||!At(o))throw Error(`Invalid arguments passed to jsPDF.triangle`);return this.lines([[n-e,r-t],[i-n,a-r],[e-i,t-a]],e,t,[1,1],o,!0),this},p.__private__.roundedRect=p.roundedRect=function(e,t,n,r,i,a,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a)||!At(o))throw Error(`Invalid arguments passed to jsPDF.roundedRect`);var s=4/3*(Math.SQRT2-1);return i=Math.min(i,.5*n),a=Math.min(a,.5*r),this.lines([[n-2*i,0],[i*s,0,i,a-a*s,i,a],[0,r-2*a],[0,a*s,-i*s,a,-i,a],[2*i-n,0],[-i*s,0,-i,-a*s,-i,-a],[0,2*a-r],[0,-a*s,i*s,-a,i,-a]],e+i,t,[1,1],o,!0),this},p.__private__.ellipse=p.ellipse=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!At(i))throw Error(`Invalid arguments passed to jsPDF.ellipse`);var a=4/3*(Math.SQRT2-1)*n,o=4/3*(Math.SQRT2-1)*r;return Rt(e+n,t),Bt(e+n,t-o,e+a,t-r,e,t-r),Bt(e-a,t-r,e-n,t-o,e-n,t),Bt(e-n,t+o,e-a,t+r,e,t+r),Bt(e+a,t+r,e+n,t+o,e+n,t),Pt(i),this},p.__private__.circle=p.circle=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||!At(r))throw Error(`Invalid arguments passed to jsPDF.circle`);return this.ellipse(e,t,n,n,r)},p.setFont=function(e,t,n){return n&&(t=C(t,n)),xe=mt(e,t,{disableWarning:!1}),this};var X=p.__private__.getFont=p.getFont=function(){return Ee[mt.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var e,t,n={};for(e in De)if(De.hasOwnProperty(e))for(t in n[e]=[],De[e])De[e].hasOwnProperty(t)&&n[e].push(t);return n},p.addFont=function(e,t,n,r,i){var a=[`StandardEncoding`,`MacRomanEncoding`,`Identity-H`,`WinAnsiEncoding`];return arguments[3]&&a.indexOf(arguments[3])!==-1?i=arguments[3]:arguments[3]&&a.indexOf(arguments[3])==-1&&(n=C(n,r)),st.call(this,e,t,n,i||=`IdentitLine truncated
`),i}},nm=function(e,t){var n=e.fontSize===0?e.maxFontSize:e.fontSize,r={text:``,fontSize:``},i=(t=(t=t.substr(0,1)==`(`?t.substr(1):t).substr(t.length-1)==`)`?t.substr(0,t.length-1):t).split(` `);i=e.multiline?i.map(function(e){return e.split(`
`)}):i.map(function(e){return[e]});var a=n,o=wm.internal.getHeight(e)||0;o=o<0?-o:o;var s=wm.internal.getWidth(e)||0;s=s<0?-s:s;var c=function(t,n,r){return t+1<i.length?rm(n+` `+i[t+1][0],e,r).width<=s-4:!1};a++;t:for(;a>0;){t=``,a--;var l,u,d=rm(`3`,e,a).height,f=e.multiline?o-a:(o-d)/2,p=f+=2,m=0,h=0,g=0;if(a<=0){t=`(...) Tj
`,t+=`% Width of Text: `+rm(t,e,a=12).width+`, FieldWidth:`+s+`
`;break}for(var _=``,v=0,y=0;y<i.length;y++)if(i.hasOwnProperty(y)){var b=!1;if(i[y].length!==1&&g!==i[y].length-1){if((d+2)*(v+2)+2>o)continue t;_+=i[y][g],b=!0,h=y,y--}else{_=(_+=i[y][g]+` `).substr(_.length-1)==` `?_.substr(0,_.length-1):_;var x=parseInt(y),S=c(x,_,a),C=y>=i.length-1;if(S&&!C){_+=` `,g=0;continue}if(S||C){if(C)h=x;else if(e.multiline&&(d+2)*(v+2)+2>o)continue t}else{if(!e.multiline||(d+2)*(v+2)+2>o)continue t;h=x}}for(var w=``,T=m;T<=h;T++){var E=i[T];if(e.multiline){if(T===h){w+=E[g]+` `,g=(g+1)%E.length;continue}if(T===m){w+=E[E.length-1]+` `;continue}}w+=E[0]+` `}switch(w=w.substr(w.length-1)==` `?w.substr(0,w.length-1):w,u=rm(w,e,a).width,e.textAlign){case`right`:l=s-u-2;break;case`center`:l=(s-u)/2;break;default:l=2}t+=Up(l)+` `+Up(p)+` Td
`,t+=`(`+Bp(w)+`) Tj
`,t+=-Up(l)+` 0 Td
`,p=-(a+2),u=0,m=b?h:h+1,v++,_=``}break}return r.text=t,r.fontSize=a,r},rm=function(e,t,n){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(e,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:t.scope.getStringUnitWidth(`3`,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:i}},im={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},am=function(e,t){var n={type:`reference`,object:e};t.internal.getPageInfo(e.page).pageContext.annotations.find(function(e){return e.type===n.type&&e.object===n.object})===void 0&&t.internal.getPageInfo(e.page).pageContext.annotations.push(n)},om=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||!1===e.internal.acroformPlugin.isInitialized)){if(fm.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(im)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw Error(`Exception while creating AcroformDictionary`);zp=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new dm,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe(`postPutResources`,function(){(function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe(`buildDocument`,function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];r.objId=void 0,r.hasAnnotation&&am(r,e)}})(e)}),e.internal.events.subscribe(`putCatalog`,function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw Error(`putCatalogCallback: Root missing.`);e.internal.write(`/AcroForm `+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+` 0 R`)})(e)}),e.internal.events.subscribe(`postPutPages`,function(t){(function(e,t){var n=!e;for(var r in e||(t.internal.newObjectDeferredBegin(t.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),t.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),e||=t.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(e.hasOwnProperty(r)){var i=e[r],a=[],o=i.Rect;if(i.Rect&&=em(i.Rect,t),t.internal.newObjectDeferredBegin(i.objId,!0),i.DA=wm.createDefaultAppearanceStream(i),Ai(i)===`object`&&typeof i.getKeyValueListForStream==`function`&&(a=i.getKeyValueListForStream()),i.Rect=o,i.hasAppearanceStream&&!i.appearanceStreamContent){var s=tm(i);a.push({key:`AP`,value:`<</N `+s+`>>`}),t.internal.acroformPlugin.xForms.push(s)}if(i.appearanceStreamContent){var c=``;for(var l in i.appearanceStreamContent)if(i.appearanceStreamContent.hasOwnProperty(l)){var u=i.appearanceStreamContent[l];if(c+=`/`+l+` `,c+=`<<`,Object.keys(u).length>=1||Array.isArray(u)){for(var r in u)if(u.hasOwnProperty(r)){var d=u[r];typeof d==`function`&&(d=d.call(t,i)),c+=`/`+r+` `+d+` `,t.internal.acroformPlugin.xForms.indexOf(d)>=0||t.internal.acroformPlugin.xForms.push(d)}}else typeof(d=u)==`function`&&(d=d.call(t,i)),c+=`/`+r+` `+d,t.internal.acroformPlugin.xForms.indexOf(d)>=0||t.internal.acroformPlugin.xForms.push(d);c+=`>>`}a.push({key:`AP`,value:`<<
`+c+`>>`})}t.internal.putStream({additionalKeyValues:a,objectId:i.objId}),t.internal.out(`endobj`)}n&&function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=n,i=e[n];t.internal.newObjectDeferredBegin(i.objId,!0),Ai(i)===`object`&&typeof i.putStream==`function`&&i.putStream(),delete e[r]}}(t.internal.acroformPlugin.xForms,t)})(t,e)}),e.internal.acroformPlugin.isInitialized=!0}},sm=Rp.__acroform__.arrayToPdfArray=function(e,t,n){var r=function(e){return e};if(Array.isArray(e)){for(var i=`[`,a=0;a<e.length;a++)switch(a!==0&&(i+=` `),Ai(e[a])){case`boolean`:case`number`:case`object`:i+=e[a].toString();break;case`string`:e[a].substr(0,1)===`/`?i+=`/`+Hp(e[a].substr(1)):(t!==void 0&&n&&(r=n.internal.getEncryptor(t)),i+=`(`+Bp(r(e[a].toString()))+`)`)}return i+`]`}throw Error(`Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray`)},cm=function(e,t,n){var r=function(e){return e};return t!==void 0&&n&&(r=n.internal.getEncryptor(t)),(e||=``).toString(),`(`+Bp(r(e))+`)`},lm=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};lm.prototype.toString=function(){return this.objId+` 0 R`},lm.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out(`endobj`)},lm.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(e){return e!=`content`&&e!=`appearanceStreamContent`&&e!=`scope`&&e!=`objId`&&e.substring(0,1)!=`_`});for(var n in t)if(!1===Object.getOwnPropertyDescriptor(this,t[n]).configurable){var r=t[n],i=this[r];i&&(Array.isArray(i)?e.push({key:r,value:sm(i,this.objId,this.scope)}):i instanceof lm?(i.scope=this.scope,e.push({key:r,value:i.objId+` 0 R`})):typeof i!=`function`&&e.push({key:r,value:i}))}return e};var um=function(){lm.call(this),Object.defineProperty(this,"Type",{value:`/XObject`,configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:`/Form`,configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:`2 0 R`,configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};Gp(um,lm);var dm=function(){lm.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),`(`+Bp(t(e))+`)`}},set:function(t){e=t}})};Gp(dm,lm);var fm=function e(){lm.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){if(isNaN(e))throw Error(`Invalid value "`+e+`" for attribute F supplied.`);t=e}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Zp(t,3)},set:function(e){!!e==1?this.F=Qp(t,3):this.F=$p(t,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){if(isNaN(e))throw Error(`Invalid value "`+e+`" for attribute Ff supplied.`);n=e}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(e){r=e===void 0?[]:e}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(e){r[0]=e}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(e){r[1]=e}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(e){r[2]=e}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(e){r[3]=e}});var i=``;Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(e){switch(e){case`/Btn`:case`/Tx`:case`/Ch`:case`/Sig`:i=e;break;default:throw Error(`Invalid value "`+e+`" for attribute FT supplied.`)}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof bm)return;a=`FieldObject`+ e.FieldNum++}var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),`(`+Bp(t(a))+`)`},set:functio Line truncated
`)}},set:function(e){Ai(e)===`object`&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||``},set:function(e){typeof e==`string`&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){var n=t==null?``:t.toString();n.substr(0,1)===`/`&&(n=n.substr(1)),e=`/`+Hp(n)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e=`/`+Hp(t)}})};Gp(_m,fm);var vm=function(){_m.call(this),this.pushButton=!0};Gp(vm,_m);var ym=function(){_m.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t===void 0?[]:t}})};Gp(ym,_m);var bm=function(){var e,t;fm.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(e){t=e}});var n,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};this.scope&&(e=this.scope.internal.getEncryptor(this.objId));var t,n=[];for(t in n.push(`<<`),r)n.push(`/`+t+` (`+Bp(e(r[t]))+`)`);return n.push(`>>`),n.join(`
`)},set:function(e){Ai(e)===`object`&&(r=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||``},set:function(e){typeof e==`string`&&(r.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){var t=e==null?``:e.toString();t.substr(0,1)===`/`&&(t=t.substr(1)),n=`/`+Hp(t)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){var t=e==null?``:e.toString();t.substr(0,1)===`/`&&(t=t.substr(1)),n=`/`+Hp(t)}}),this.caption=`l`,this.appearanceState=`Off`,this._AppearanceType=wm.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Gp(bm,fm),ym.prototype.setAppearance=function(e){if(!(`createAppearanceStream`in e)||!(`getCA`in e))throw Error(`Couldn't assign Appearance to RadioButton. Appearance was Invalid!`);for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var n=this.Kids[t];n.appearanceStreamContent=e.createAppearanceStream(n.optionName),n.caption=e.getCA()}},ym.prototype.createOption=function(e){var t=new bm;return t.Parent=this,t.optionName=e,this.Kids.push(t),Tm.call(this.scope,t),t};var xm=function(){_m.call(this),this.fontName=`zapfdingbats`,this.caption=`3`,this.appearanceState=`On`,this.value=`On`,this.textAlign=`center`,this.appearanceStreamContent=wm.CheckBox.createAppearanceStream()};Gp(xm,_m);var Sm=function(){fm.call(this),this.FT=`/Tx`,Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Zp(this.Ff,13)},set:function(e){!!e==1?this.Ff=Qp(this.Ff,13):this.Ff=$p(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Zp(this.Ff,21)},set:function(e){!!e==1?this.Ff=Qp(this.Ff,21):this.Ff=$p(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Zp(this.Ff,23)},set:function(e){!!e==1?this.Ff=Qp(this.Ff,23):this.Ff=$p(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Zp(this.Ff,24)},set:function(e){!!e==1?this.Ff=Qp(this.Ff,24):this.Ff=$p(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Zp(this.Ff,25)},set:function(e){!!e==1?this.Ff=Qp(this.Ff,25):this.Ff=$p(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Zp(this.Ff,26)},set:function(e){!!e==1?this.Ff=Qp(this.Ff,26):this.Ff=$p(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Gp(Sm,fm);var Cm=function(){Sm.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Zp(this.Ff,14)},set:function(e){!!e==1?this.Ff=Qp(this.Ff,14):this.Ff=$p(this.Ff,14)}}),this.password=!0};Gp(Cm,Sm);var wm={CheckBox:{createAppearanceStream:function(){return{N:{On:wm.CheckBox.YesNormal},D:{On:wm.CheckBox.YesPushDown,Off:wm.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=qp(e);t.scope=e.scope;var n=[],r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),a=nm(e,e.caption);return n.push(`0.749023 g`),n.push(`0 0 `+Up(wm.internal.getWidth(e))+` `+Up(wm.internal.getHeight(e))+` re`),n.push(`f`),n.push(`BMC`),n.push(`q`),n.push(`0 0 1 rg`),n.push(`/`+r+` `+Up(a.fontSize)+` Tf `+i),n.push(`BT`),n.push(a.text),n.push(`ET`),n.push(`Q`),n.push(`EMC`),t.stream=n.join(`
`),t},YesNormal:function(e){var t=qp(e);t.scope=e.scope;var n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color),i=[],a=wm.internal.getHeight(e),o=wm.internal.getWidth(e),s=nm(e,e.caption);return i.push(`1 g`),i.push(`0 0 `+Up(o)+` `+Up(a)+` re`),i.push(`f`),i.push(`q`),i.push(`0 0 1 rg`),i.push(`0 0 `+Up(o-1)+` `+Up(a-1)+` re`),i.push(`W`),i.push(`n`),i.push(`0 g`),i.push(`BT`),i.push(`/`+n+` `+Up(s.fontSize)+` Tf `+r),i.push(s.text),i.push(`ET`),i.push(`Q`),t.stream=i.join(`
`),t},OffPushDown:function(e){var t=qp(e);t.scope=e.scope;var n=[];return n.push(`0.749023 g`),n.push(`0 0 `+Up(wm.internal.getWidth(e))+` `+Up(wm.internal.getHeight(e))+` re`),n.push(`f`),t.stream=n.join(`
`),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:wm.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=wm.RadioButton.Circle.YesNormal,t.D[e]=wm.RadioButton.Circle.YesPushDown,t},getCA:function(){return`l`},YesNormal:function(e){var t=qp(e);t.scope=e.scope;var n=[],r=wm.internal.getWidth(e)<=wm.internal.getHeight(e)?wm.internal.getWidth(e)/4:wm.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=wm.internal.Bezier_C,a=Number((r*i).toFixed(5));return n.push(`q`),n.push(`1 0 0 1 `+Wp(wm.internal.getWidth(e)/2)+` `+Wp(wm.internal.getHeight(e)/2)+` cm`),n.push(r+` 0 m`),n.push(r+` `+a+` `+a+` `+r+` 0 `+r+` c`),n.push(`-`+a+` `+r+` -`+r+` `+a+` -`+r+` 0 c`),n.push(`-`+r+` -`+a+` -`+a+` -`+r+` 0 -`+r+` c`),n.push(a+` -`+r+` `+r+` -`+a+` `+r+` 0 c`),n.push(`f`),n.push(`Q`),t.stream=n.join(`
`),t},YesPushDown:function(e){var t=qp(e);t.scope=e.scope;var n=[],r=wm.internal.getWidth(e)<=wm.internal.getHeight(e)?wm.internal.getWidth(e)/4:wm.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*wm.internal.Bezier_C).toFixed(5)),o=Number((r*wm.internal.Bezier_C).toFixed(5));return n.push(`0.749023 g`),n.push(`q`),n.push(`1 0 0 1 `+Wp(wm.internal.getWidth(e)/2)+` `+Wp(wm.internal.getHeight(e)/2)+` cm`),n.push(i+` 0 m`),n.push(i+` `+a+` `+a+` `+i+` 0 `+i+` c`),n.push(`-`+a+` `+i+` -`+i+` `+a+` -`+i+` 0 c`),n.push(`-`+i+` -`+a+` -`+a+` -`+i+` 0 -`+i+` c`),n.push(a+` -`+i+` `+i+` -`+a+` `+i+` 0 c`),n.push(`f`),n.push(`Q`),n.push(`0 g`),n.push(`q`),n.push(`1 0 0 1 `+Wp(wm.internal.getWidth(e)/2)+` `+Wp(wm.internal.getHeight(e)/2)+` cm`),n.push(r+` 0 m`),n.push(r+` `+o+` `+o+` `+r+` 0 `+r+` c`),n.push(`-`+o+` `+r+` -`+r+` `+o+` -`+r+` 0 c`),n.push(`-`+r+` -`+o+` -`+o+` -`+r+` 0 -`+r+` c`),n.push(o+` -`+r+` `+r+` -`+o+` `+r+` 0 c`),n.push(`f`),n.push(`Q`),t.stream=n.join(`
`),t},OffPushDown:function(e){var t=qp(e);t.scope=e.scope;var n=[],r=wm.internal.getWidth(e)<=wm.internal.getHeight(e)?wm.internal.getWidth(e)/4:wm.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*wm.internal.Bezier_C).toFixed(5));return n.push(`0.749023 g`),n.push(`q`),n.push(`1 0 0 1 `+Wp(wm.internal.getWidth(e)/2)+` `+Wp(wm.internal.getHeight(e)/2)+` cm`),n.push(i+` 0 m`),n.push(i+` `+a+` `+a+` `+i+` 0 `+i+` c`),n.push(`-`+a+` `+i+` -`+i+` `+a+` -`+i+` 0 c`),n.push(`-`+i+` -`+a+` -`+a+` -`+i+` 0 -`+i+` c`),n.push(a+` -`+i+` `+i+` -`+a+` `+i+` 0 c`),n.push(`f`),n.push(`Q`),t.stream=n.join(`
`),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:wm.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=wm.RadioButton.Cross.YesNormal,t.D[e]=wm.RadioButton.Cross.YesPushDown,t},getCA:function(){return`8`},YesNormal:function(e){var t=qp(e);t.scope=e.scope;var n=[],r=wm.internal.calculateCross(e);return n.push(`q`),n.push(`1 1 `+Up(wm.internal.getWidth(e)-2)+` `+Up(wm.internal.getHeight(e)-2)+` re`),n.push(`W`),n.push(`n`),n.push(Up(r.x1.x)+` `+Up(r.x1.y)+` m`),n.push(Up(r.x2.x)+` `+Up(r.x2.y)+` l`),n.push(Up(r.x4.x)+` `+Up(r.x4.y)+` m`),n.push(Up(r.x3.x)+` `+Up(r.x3.y)+` l`),n.push(`s`),n.push(`Q`),t.stream=n.join(`
`),t},YesPushDown:function(e){var t=qp(e);t.scope=e.scope;var n=wm.internal.calculateCross(e),r=[];return r.push(`0.749023 g`),r.push(`0 0 `+Up(wm.internal.getWidth(e))+` `+Up(wm.internal.getHeight(e))+` re`),r.push(`f`),r.push(`q`),r.push(`1 1 `+Up(wm.internal.getWidth(e)-2)+` `+Up(wm.internal.getHeight(e)-2)+` re`),r.push(`W`),r.push(`n`),r.push(Up(n.x1.x)+` `+Up(n.x1.y)+` m`),r.push(Up(n.x2.x)+` `+Up(n.x2.y)+` l`),r.push(Up(n.x4.x)+` `+Up(n.x4.y)+` m`),r.push(Up(n.x3.x)+` `+Up(n.x3.y)+` l`),r.push(`s`),r.push(`Q`),t.stream=r.join(`
`),t},OffPushDown:function(e){var t=qp(e);t.scope=e.scope;var n=[];return n.push(`0.749023 g`),n.push(`0 0 `+Up(wm.internal.getWidth(e))+` `+Up(wm.internal.getHeight(e))+` re`),n.push(`f`),t.stream=n.join(`
`),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return`/`+t+` `+e.fontSize+` Tf `+n}};wm.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=wm.internal.getWidth(e),n=wm.internal.getHeight(e),r=Math.min(t,n);return{x1:{x:(t-r)/2,y:(n-r)/2+r},x2:{x:(t-r)/2+r,y:(n-r)/2},x3:{x:(t-r)/2,y:(n-r)/2},x4:{x:(t-r)/2+r,y:(n-r)/2+r}}}},wm.internal.getWidth=function(e){var t=0;return Ai(e)===`object`&&(t=Kp(e.Rect[2])),t},wm.internal.getHeight=function(e){var t=0;return Ai(e)===`object`&&(t=Kp(e.Rect[3])),t};var Tm=Rp.addField=function(e){if(om(this,e),!(e instanceof fm))throw Error(`Invalid argument passed to jsPDF.addField.`);var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};Rp.AcroFormChoiceField=pm,Rp.AcroFormListBox=mm,Rp.AcroFormComboBox=hm,Rp.AcroFormEditBox=gm,Rp.AcroFormButton=_m,Rp.AcroFormPushButton=vm,Rp.AcroFormRadioButton=ym,Rp.AcroFormCheckBox=xm,Rp.AcroFormTextField=Sm,Rp.AcroFormPasswordField=Cm,Rp.AcroFormAppearance=wm,Rp.AcroForm={ChoiceField:pm,ListBox:mm,ComboBox:hm,EditBox:gm,Button:_m,PushButton:vm,RadioButton:ym,CheckBox:xm,TextField:Sm,PasswordField:Cm,Appearance:wm},Lp.AcroForm={ChoiceField:pm,ListBox:mm,ComboBox:hm,EditBox:gm,Button:_m,PushButton:vm,RadioButton:ym,CheckBox:xm,TextField:Sm,PasswordField:Cm,Appearance:wm},Lp.AcroForm;function Em(e){return e.reduce(function(e,t,n){return e[t]=n,e},{})}(function(e){var t=`addImage_`;e.__addimage__={};var n=`UNKNOWN`,r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=e.__addimage__.getImageFileTypeByImageData=function(e,t){var i,a,o,s,c,l=n;if((t||=n)===`RGBA`||e.data!==void 0&&e.data instanceof Uint8ClampedArray&&`height`in e&&`width`in e)return`RGBA`;if(S(e))for(c in r)for(o=r[c],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(o[i][a]!==void 0&&o[i][a]!==e[a]){s=!1;break}if(!0===s){l=c;break}}else for(c in r)for(o=r[c],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(o[i][a]!==void 0&&o[i][a]!==e.charCodeAt(a)){s=!1;break}if(!0===s){l=c;break}}return l===n&&t!==n&&(l=t),l},a=function e(t){for(var n=this.internal.write,r=this.internal.putStream,i=(0,this.internal.getFilters)();i.indexOf(`FlateEncode`)!==-1;)i.splice(i.indexOf(`FlateEncode`),1);t.objectId=this.internal.newObject();var a=[];if(a.push({key:`Type`,value:`/XObject`}),a.push({key:`Subtype`,value:`/Image`}),a.push({key:`Width`,value:t.width}),a.push({key:`Height`,value:t.height}),t.colorSpace===_.INDEXED?a.push({key:`ColorSpace`,value:`[/Indexed /DeviceRGB `+(t.palette.length/3-1)+` `+(`sMask`in t&&t.sMask!==void 0?t.objectId+2:t.objectId+1)+` 0 R]`}):(a.push({key:`ColorSpace`,value:`/`+t.colorSpace}),t.colorSpace===_.DEVICE_CMYK&&a.push({key:`Decode`,value:`[1 0 1 0 1 0 1 0]`})),a.push({key:`BitsPerComponent`,value:t.bitsPerComponent}),`decodeParameters`in t&&t.decodeParameters!==void 0&&a.push({key:`DecodeParms`,value:`<<`+t.decodeParameters+`>>`}),`transparency`in t&&Array.isArray(t.transparency)&&t.transparency.length>0){for(var o=``,s=0,c=t.transparency.length;s<c;s++)o+=t.transparency[s]+` `+t.transparency[s]+` `;a.push({key:`Mask`,value:`[`+o+`]`})}t.sMask!==void 0&&a.push({key:`SMask`,value:t.objectId+1+` 0 R`});var l=t.filter===void 0?void 0:[`/`+t.filter];if(r({data:t.data,additionalKeyValues:a,alreadyAppliedFilters:l,objectId:t.objectId}),n(`endobj`),`sMask`in t&&t.sMask!==void 0){var u=t.sMaskBitsPerComponent??t.bitsPerComponent,d={width:t.width,height:t.height,colorSpace:`DeviceGray`,bitsPerComponent:u,data:t.sMask};`filter`in t&&(d.decodeParameters=`/Predictor ${t.predictor} /Colors 1 /BitsPerComponent ${u} /Columns ${t.width}`,d.filter=t.filter),e.call(this,d)}if(t.colorSpace===_.INDEXED){var f=this.internal.newObject();r({data:w(new Uint8Array(t.palette)),objectId:f}),n(`endobj`)}},o=function(){var e=this.internal.collections[t+`images`];for(var n in e)a.call(this,e[n])},s=function(){var e,n=this.internal.collections[t+`images`],r=this.internal.write;for(var i in n)r(`/I`+(e=n[i]).index,e.objectId,`0`,`R`)},c=function(){this.internal.collections[t+`images`]||(this.internal.collections[t+`images`]={},this.internal.events.subscribe(`putResources`,o),this.internal.events.subscribe(`putXobjectDict`,s))},l=function(){var e=this.internal.collections[t+`images`];return c.call(this),e},u=function(){return Object.keys(this.internal.collections[t+`imLine truncated
`},e.outline.makeRef=function(e){return e.id+` 0 R`},e.outline.makeString=function(t){return`(`+e.internal.pdfEscape(t)+`)`},e.outline.objStart=function(e){this.ctx.val+=`\r
`+e.id+` 0 obj\r
<<\r
`},e.outline.objEnd=function(){this.ctx.val+=`>> \r
endobj\r
`},e.outline.count_r=function(e,t){for(var n=0;n<t.children.length;n++)e.count++,this.count_r(e,t.children[n]);return e.count}}])}(Rp.API),function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(e,n,r,i,a,o){var s,c=this.decode.DCT_DECODE,l=null;if(typeof e==`string`||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=a||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,s=function(e){for(var n,r=256*e.charCodeAt(4)+e.charCodeAt(5),i=e.length,a={width:0,height:0,numcomponents:1},o=4;o<i;o+=2){if(o+=r,t.indexOf(e.charCodeAt(o+1))!==-1){n=256*e.charCodeAt(o+5)+e.charCodeAt(o+6),a={width:256*e.charCodeAt(o+7)+e.charCodeAt(o+8),height:n,numcomponents:e.charCodeAt(o+9)};break}r=256*e.charCodeAt(o+2)+e.charCodeAt(o+3)}return a}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),s.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}l={data:e,width:s.width,height:s.height,colorSpace:o,bitsPerComponent:8,filter:c,index:n,alias:r}}return l}}(Rp.API),Rp.API.processPNG=function(e,t,n,r){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var i,a=ep(e,{checkCrc:!0}),o=a.width,s=a.height,c=a.channels,l=a.palette,u=a.depth;i=l&&c===1?function(e){for(var t=e.width,n=e.height,r=e.data,i=e.palette,a=e.depth,o=!1,s=[],c=[],l=void 0,u=!1,d=0,f=0;f<i.length;f++){var p=ds(i[f],4),m=p[0],h=p[1],g=p[2],_=p[3];s.push(m,h,g),_!=null&&(_===0?(d++,c.length<1&&c.push(f)):_<255&&(u=!0))}if(u||d>1){o=!0,c=void 0;var v=t*n;l=new Uint8Array(v);for(var y=new DataView(r.buffer),b=0;b<v;b++){var x=ds(i[eh(y,b,a)],4)[3];l[b]=x}}else d===0&&(c=void 0);return{colorSpace:`Indexed`,colorsPerPixel:1,sMaskBitsPerComponent:o?8:void 0,colorBytes:r,alphaBytes:l,needSMask:o,palette:s,mask:c}}(a):c===2||c===4?function(e){for(var t=e.data,n=e.width,r=e.height,i=e.channels,a=e.depth,o=i===2?`DeviceGray`:`DeviceRGB`,s=i-1,c=n*r,l=s,u=c*l,d=1*c,f=Math.ceil(u*a/8),p=Math.ceil(d*a/8),m=new Uint8Array(f),h=new Uint8Array(p),g=new DataView(t.buffer),_=new DataView(m.buffer),v=new DataView(h.buffer),y=!1,b=0;b<c;b++){for(var x=b*i,S=0;S<l;S++)th(_,eh(g,x+S,a),b*l+S,a);var C=eh(g,x+l,a);C<(1<<a)-1&&(y=!0),th(v,C,1*b,a)}return{colorSpace:o,colorsPerPixel:s,sMaskBitsPerComponent:y?a:void 0,colorBytes:m,alphaBytes:h,needSMask:y}}(a):function(e){var t=e.data,n=e.channels===1?`DeviceGray`:`DeviceRGB`;return{colorSpace:n,colorsPerPixel:n===`DeviceGray`?1:3,colorBytes:t instanceof Uint16Array?function(e){for(var t=e.length,n=new Uint8Array(2*t),r=new DataView(n.buffer,n.byteOffset,n.byteLength),i=0;i<t;i++)r.setUint16(2*i,e[i],!1);return n}(t):t,needSMask:!1}}(a);var d,f,p,m=i,h=m.colorSpace,g=m.colorsPerPixel,_=m.sMaskBitsPerComponent,v=m.colorBytes,y=m.alphaBytes,b=m.needSMask,x=m.palette,S=m.mask,C=null;return r!==Rp.API.image_compression.NONE&&typeof os==`function`?(C=function(e){var t;switch(e){case Rp.API.image_compression.FAST:t=11;break;case Rp.API.image_compression.MEDIUM:t=13;break;case Rp.API.image_compression.SLOW:t=14;break;default:t=12}return t}(r),d=this.decode.FLATE_DECODE,f=`/Predictor ${C} /Colors ${g} /BitsPerComponent ${u} /Columns ${o}`,e=Km(v,Math.ceil(o*g*u/8),g,u,r),b&&(p=Km(y,Math.ceil(o*_/8),1,_,r))):(d=void 0,f=void 0,e=v,b&&(p=y)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(p&&this.__addimage__.isArrayBuffer(p)||this.__addimage__.isArrayBufferView(p))&&(p=this.__addimage__.arrayBufferToBinaryString(p)),{alias:n,data:e,index:t,filter:d,decodeParameters:f,transparency:S,palette:x,sMask:p,predictor:C,width:o,height:s,bitsPerComponent:u,sMaskBitsPerComponent:_,colorSpace:h}}},function(e){e.processGIF89A=function(t,n,r,i){var a=new rh(t),o=a.width,s=a.height,c=[];a.decodeAndBlitFrameRGBA(0,c);var l={data:c,width:o,height:s},u=new ah(100).encode(l,100);return e.processJPEG.call(this,u,n,r,i)},e.processGIF87A=e.processGIF89A}(Rp.API),oh.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15) Line truncated
`},e.outline.count_r=function(e,t){for(var n=0;n<t.children.length;n++)e.count++,this.count_r(e,t.children[n]);return e.count}}])}(Lp.API),function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(e,n,r,i,a,o){var s,c=this.decode.DCT_DECODE,l=null;if(typeof e==`string`||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=a||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,s=function(e){for(var n,r=256*e.charCodeAt(4)+e.charCodeAt(5),i=e.length,a={width:0,height:0,numcomponents:1},o=4;o<i;o+=2){if(o+=r,t.indexOf(e.charCodeAt(o+1))!==-1){n=256*e.charCodeAt(o+5)+e.charCodeAt(o+6),a={width:256*e.charCodeAt(o+7)+e.charCodeAt(o+8),height:n,numcomponents:e.charCodeAt(o+9)};break}r=256*e.charCodeAt(o+2)+e.charCodeAt(o+3)}return a}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),s.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}l={data:e,width:s.width,height:s.height,colorSpace:o,bitsPerComponent:8,filter:c,index:n,alias:r}}return l}}(Lp.API),Lp.API.processPNG=function(e,t,n,r){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var i,a=$f(e,{checkCrc:!0}),o=a.width,s=a.height,c=a.channels,l=a.palette,u=a.depth;i=l&&c===1?function(e){for(var t=e.width,n=e.height,r=e.data,i=e.palette,a=e.depth,o=!1,s=[],c=[],l=void 0,u=!1,d=0,f=0;f<i.length;f++){var p=us(i[f],4),m=p[0],h=p[1],g=p[2],_=p[3];s.push(m,h,g),_!=null&&(_===0?(d++,c.length<1&&c.push(f)):_<255&&(u=!0))}if(u||d>1){o=!0,c=void 0;var v=t*n;l=new Uint8Array(v);for(var y=new DataView(r.buffer),b=0;b<v;b++){var x=us(i[eh(y,b,a)],4)[3];l[b]=x}}else d===0&&(c=void 0);return{colorSpace:`Indexed`,colorsPerPixel:1,sMaskBitsPerComponent:o?8:void 0,colorBytes:r,alphaBytes:l,needSMask:o,palette:s,mask:c}}(a):c===2||c===4?function(e){for(var t=e.data,n=e.width,r=e.height,i=e.channels,a=e.depth,o=i===2?`DeviceGray`:`DeviceRGB`,s=i-1,c=n*r,l=s,u=c*l,d=1*c,f=Math.ceil(u*a/8),p=Math.ceil(d*a/8),m=new Uint8Array(f),h=new Uint8Array(p),g=new DataView(t.buffer),_=new DataView(m.buffer),v=new DataView(h.buffer),y=!1,b=0;b<c;b++){for(var x=b*i,S=0;S<l;S++)th(_,eh(g,x+S,a),b*l+S,a);var C=eh(g,x+l,a);C<(1<<a)-1&&(y=!0),th(v,C,1*b,a)}return{colorSpace:o,colorsPerPixel:s,sMaskBitsPerComponent:y?a:void 0,colorBytes:m,alphaBytes:h,needSMask:y}}(a):function(e){var t=e.data,n=e.channels===1?`DeviceGray`:`DeviceRGB`;return{colorSpace:n,colorsPerPixel:n===`DeviceGray`?1:3,colorBytes:t instanceof Uint16Array?function(e){for(var t=e.length,n=new Uint8Array(2*t),r=new DataView(n.buffer,n.byteOffset,n.byteLength),i=0;i<t;i++)r.setUint16(2*i,e[i],!1);return n}(t):t,needSMask:!1}}(a);var d,f,p,m=i,h=m.colorSpace,g=m.colorsPerPixel,_=m.sMaskBitsPerComponent,v=m.colorBytes,y=m.alphaBytes,b=m.needSMask,x=m.palette,S=m.mask,C=null;return r!==Lp.API.image_compression.NONE&&typeof as==`function`?(C=function(e){var t;switch(e){case Lp.API.image_compression.FAST:t=11;break;case Lp.API.image_compression.MEDIUM:t=13;break;case Lp.API.image_compression.SLOW:t=14;break;default:t=12}return t}(r),d=this.decode.FLATE_DECODE,f=`/Predictor ${C} /Colors ${g} /BitsPerComponent ${u} /Columns ${o}`,e=Km(v,Math.ceil(o*g*u/8),g,u,r),b&&(p=Km(y,Math.ceil(o*_/8),1,_,r))):(d=void 0,f=void 0,e=v,b&&(p=y)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(p&&this.__addimage__.isArrayBuffer(p)||this.__addimage__.isArrayBufferView(p))&&(p=this.__addimage__.arrayBufferToBinaryString(p)),{alias:n,data:e,index:t,filter:d,decodeParameters:f,transparency:S,palette:x,sMask:p,predictor:C,width:o,height:s,bitsPerComponent:u,sMaskBitsPerComponent:_,colorSpace:h}}},function(e){e.processGIF89A=function(t,n,r,i){var a=new rh(t),o=a.width,s=a.height,c=[];a.decodeAndBlitFrameRGBA(0,c);var l={data:c,width:o,height:s},u=new ah(100).encode(l,100);return e.processJPEG.call(this,u,n,r,i)},e.processGIF87A=e.processGIF89A}(Lp.API),oh.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15) Line truncated
`:``)+e})):v.push(e[0])}),h=v,c=Hm.apply(this,[_,n])}for(a=0,o=h.length;a<o;a++){var y=0;if(r=h[a],c&&r[0]==`
`&&(r=r.substr(1),y=1),f+p+(m=(i=Vm.apply(this,[r,n])).reduce(function(e,t){return e+t},0))>t||y){if(m>t){for(s=Um.apply(this,[r,i,t-(f+p),t]),u.push(s.shift()),u=[s.pop()];s.length;)d.push([s.shift()]);m=i.slice(r.length-(u[0]?u[0].length:0)).reduce(function(e,t){return e+t},0)}else u=[r];d.push(u),f=m+c,p=g}else u.push(r),f+=p+m,p=g}return l=c?function(e,t){return(t?_:``)+e.join(` `)}:function(e){return e.join(` `)},d.map(l)},Bm.splitTextToSize=function(e,t,n){var r,i=(n||={}).fontSize||this.internal.getFontSize(),a=function(e){if(e.widths&&e.kerning)return{widths:e.widths,kerning:e.kerning};var t=this.internal.getFont(e.fontName,e.fontStyle),n=`Unicode`;return t.metadata[n]?{widths:t.metadata[n].widths||{0:1},kerning:t.metadata[n].kerning||{}}:{font:t.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/i;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=n.lineIndent;var s,c,l=[];for(s=0,c=r.length;s<c;s++)l=l.concat(Wm.apply(this,[r[s],o,a]));return l},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t=`0123456789abcdef`,n=`klmnopqrstuvwxyz`,r={},i={},a=0;a<16;a++)r[n[a]]=t[a],i[t[a]]=n[a];var o=function(e){return`0x`+parseInt(e,10).toString(16)},s=e.__fontmetrics__.compress=function(e){var t,n,r,a,c=[`{`];for(var l in e){if(t=e[l],isNaN(parseInt(l,10))?n=`'`+l+`'`:(l=parseInt(l,10),n=(n=o(l).slice(2)).slice(0,-1)+i[n.slice(-1)]),typeof t==`number`)t<0?(r=o(t).slice(3),a=`-`):(r=o(t).slice(2),a=``),r=a+r.slice(0,-1)+i[r.slice(-1)];else{if(ji(t)!==`object`)throw Error(`Don't know what to do with value type `+ji(t)+`.`);r=s(t)}c.push(n+r)}return c.push(`}`),c.join(``)},c=e.__fontmetrics__.uncompress=function(e){if(typeof e!=`string`)throw Error(`Invalid argument passed to uncompress.`);for(var t,n,i,a,o={},s=1,c=o,l=[],u=``,d=``,f=e.length-1,p=1;p<f;p+=1)(a=e[p])==`'`?t?(i=t.join(``),t=void 0):t=[]:t?t.push(a):a==`{`?(l.push([c,i]),c={},i=void 0):a==`}`?((n=l.pop())[0][n[1]]=c,i=void 0,c=n[0]):a==`-`?s=-1:i===void 0?r.hasOwnProperty(a)?(u+=r[a],i=parseInt(u,16)*s,s=1,u=``):u+=a:r.hasOwnProperty(a)?(d+=r[a],c[i]=parseInt(d,16)*s,s=1,i=void 0,d=``):d+=a;return o},l={codePages:[`WinAnsiEncoding`],WinAnsiEncoding:c(`{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}`)},u={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},d={Unicode:{"Courier-Oblique":c(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-BoldItalic":c(`{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}`),"Helvetica-Bold":c(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6Line truncated
`&&(r=r.substr(1),y=1),f+p+(m=(i=Vm.apply(this,[r,n])).reduce(function(e,t){return e+t},0))>t||y){if(m>t){for(s=Um.apply(this,[r,i,t-(f+p),t]),u.push(s.shift()),u=[s.pop()];s.length;)d.push([s.shift()]);m=i.slice(r.length-(u[0]?u[0].length:0)).reduce(function(e,t){return e+t},0)}else u=[r];d.push(u),f=m+c,p=g}else u.push(r),f+=p+m,p=g}return l=c?function(e,t){return(t?_:``)+e.join(` `)}:function(e){return e.join(` `)},d.map(l)},Bm.splitTextToSize=function(e,t,n){var r,i=(n||={}).fontSize||this.internal.getFontSize(),a=function(e){if(e.widths&&e.kerning)return{widths:e.widths,kerning:e.kerning};var t=this.internal.getFont(e.fontName,e.fontStyle),n=`Unicode`;return t.metadata[n]?{widths:t.metadata[n].widths||{0:1},kerning:t.metadata[n].kerning||{}}:{font:t.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/i;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=n.lineIndent;var s,c,l=[];for(s=0,c=r.length;s<c;s++)l=l.concat(Wm.apply(this,[r[s],o,a]));return l},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t=`0123456789abcdef`,n=`klmnopqrstuvwxyz`,r={},i={},a=0;a<16;a++)r[n[a]]=t[a],i[t[a]]=n[a];var o=function(e){return`0x`+parseInt(e,10).toString(16)},s=e.__fontmetrics__.compress=function(e){var t,n,r,a,c=[`{`];for(var l in e){if(t=e[l],isNaN(parseInt(l,10))?n=`'`+l+`'`:(l=parseInt(l,10),n=(n=o(l).slice(2)).slice(0,-1)+i[n.slice(-1)]),typeof t==`number`)t<0?(r=o(t).slice(3),a=`-`):(r=o(t).slice(2),a=``),r=a+r.slice(0,-1)+i[r.slice(-1)];else{if(Ai(t)!==`object`)throw Error(`Don't know what to do with value type `+Ai(t)+`.`);r=s(t)}c.push(n+r)}return c.push(`}`),c.join(``)},c=e.__fontmetrics__.uncompress=function(e){if(typeof e!=`string`)throw Error(`Invalid argument passed to uncompress.`);for(var t,n,i,a,o={},s=1,c=o,l=[],u=``,d=``,f=e.length-1,p=1;p<f;p+=1)(a=e[p])==`'`?t?(i=t.join(``),t=void 0):t=[]:t?t.push(a):a==`{`?(l.push([c,i]),c={},i=void 0):a==`}`?((n=l.pop())[0][n[1]]=c,i=void 0,c=n[0]):a==`-`?s=-1:i===void 0?r.hasOwnProperty(a)?(u+=r[a],i=parseInt(u,16)*s,s=1,u=``):u+=a:r.hasOwnProperty(a)?(d+=r[a],c[i]=parseInt(d,16)*s,s=1,i=void 0,d=``):d+=a;return o},l={codePages:[`WinAnsiEncoding`],WinAnsiEncoding:c(`{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}`)},u={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},d={Unicode:{"Courier-Oblique":c(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-BoldItalic":c(`{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}`),"Helvetica-Bold":c(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6Line truncated
<<
`+t.join(`
`)+`
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},Rp.API.addMetadata=function(e,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:e,namespaceUri:t??`http://jspdf.default.namespaceuri/`,rawXml:typeof t==`boolean`&&t},this.internal.events.subscribe(`putCatalog`,lh),this.internal.events.subscribe(`postPutResources`,ch)),this},function(e){var t=e.API,n=t.pdfEscape16=function(e,t){for(var n,r=t.metadata.Unicode.widths,i=[``,`0`,`00`,`000`,`0000`],a=[``],o=0,s=e.length;o<s;++o){if(n=t.metadata.characterToGlyph(e.charCodeAt(o)),t.metadata.glyIdsUsed.push(n),t.metadata.toUnicode[n]=e.charCodeAt(o),r.indexOf(n)==-1&&(r.push(n),r.push([parseInt(t.metadata.widthOfGlyph(n),10)])),n==`0`)return a.join(``);n=n.toString(16),a.push(i[4-n.length],n)}return a.join(``)},r=function(e){var t,n,r,i,a,o,s;for(a=`/CIDInit /ProcSet findresource begin
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},Lp.API.addMetadata=function(e,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:e,namespaceUri:t??`http://jspdf.default.namespaceuri/`,rawXml:typeof t==`boolean`&&t},this.internal.events.subscribe(`putCatalog`,lh),this.internal.events.subscribe(`postPutResources`,ch)),this},function(e){var t=e.API,n=t.pdfEscape16=function(e,t){for(var n,r=t.metadata.Unicode.widths,i=[``,`0`,`00`,`000`,`0000`],a=[``],o=0,s=e.length;o<s;++o){if(n=t.metadata.characterToGlyph(e.charCodeAt(o)),t.metadata.glyIdsUsed.push(n),t.metadata.toUnicode[n]=e.charCodeAt(o),r.indexOf(n)==-1&&(r.push(n),r.push([parseInt(t.metadata.widthOfGlyph(n),10)])),n==`0`)return a.join(``);n=n.toString(16),a.push(i[4-n.length],n)}return a.join(``)},r=function(e){var t,n,r,i,a,o,s;for(a=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
@@ -142,9 +142,9 @@ endbfchar
`),a+`endcmap
CMapName currentdict /CMap defineresource pop
end
end`};t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t.newObject,o=t.putStream;if(n.metadata instanceof e.API.TTFFont&&n.encoding===`Identity-H`){for(var s=n.metadata.Unicode.widths,c=n.metadata.subset.encode(n.metadata.glyIdsUsed,1),l=``,u=0;u<c.length;u++)l+=String.fromCharCode(c[u]);var d=a();o({data:l,addLength1:!0,objectId:d}),i(`endobj`);var f=a();o({data:r(n.metadata.toUnicode),addLength1:!0,objectId:f}),i(`endobj`);var p=a();i(`<<`),i(`/Type /FontDescriptor`),i(`/FontName /`+Mp(n.fontName)),i(`/FontFile2 `+d+` 0 R`),i(`/FontBBox `+e.API.PDFObject.convert(n.metadata.bbox)),i(`/Flags `+n.metadata.flags),i(`/StemV `+n.metadata.stemV),i(`/ItalicAngle `+n.metadata.italicAngle),i(`/Ascent `+n.metadata.ascender),i(`/Descent `+n.metadata.decender),i(`/CapHeight `+n.metadata.capHeight),i(`>>`),i(`endobj`);var m=a();i(`<<`),i(`/Type /Font`),i(`/BaseFont /`+Mp(n.fontName)),i(`/FontDescriptor `+p+` 0 R`),i(`/W `+e.API.PDFObject.convert(s)),i(`/CIDToGIDMap /Identity`),i(`/DW 1000`),i(`/Subtype /CIDFontType2`),i(`/CIDSystemInfo`),i(`<<`),i(`/Supplement 0`),i(`/Registry (Adobe)`),i(`/Ordering (`+n.encoding+`)`),i(`>>`),i(`>>`),i(`endobj`),n.objectNumber=a(),i(`<<`),i(`/Type /Font`),i(`/Subtype /Type0`),i(`/ToUnicode `+f+` 0 R`),i(`/BaseFont /`+Mp(n.fontName)),i(`/Encoding /`+n.encoding),i(`/DescendantFonts [`+m+` 0 R]`),i(`>>`),i(`endobj`),n.isAlreadyPutted=!0}})(t)}]),t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t.newObject,o=t.putStream;if(n.metadata instanceof e.API.TTFFont&&n.encoding===`WinAnsiEncoding`){for(var s=n.metadata.rawData,c=``,l=0;l<s.length;l++)c+=String.fromCharCode(s[l]);var u=a();o({data:c,addLength1:!0,objectId:u}),i(`endobj`);var d=a();o({data:r(n.metadata.toUnicode),addLength1:!0,objectId:d}),i(`endobj`);var f=a();i(`<<`),i(`/Descent `+n.metadata.decender),i(`/CapHeight `+n.metadata.capHeight),i(`/StemV `+n.metadata.stemV),i(`/Type /FontDescriptor`),i(`/FontFile2 `+u+` 0 R`),i(`/Flags 96`),i(`/FontBBox `+e.API.PDFObject.convert(n.metadata.bbox)),i(`/FontName /`+Mp(n.fontName)),i(`/ItalicAngle `+n.metadata.italicAngle),i(`/Ascent `+n.metadata.ascender),i(`>>`),i(`endobj`),n.objectNumber=a();for(var p=0;p<n.metadata.hmtx.widths.length;p++)n.metadata.hmtx.widths[p]=parseInt(n.metadata.hmtx.widths[p]*(1e3/n.metadata.head.unitsPerEm));i(`<</Subtype/TrueType/Type/Font/ToUnicode `+d+` 0 R/BaseFont/`+Mp(n.fontName)+`/FontDescriptor `+f+` 0 R/Encoding/`+n.encoding+` /FirstChar 29 /LastChar 255 /Widths `+e.API.PDFObject.convert(n.metadata.hmtx.widths)+`>>`),i(`endobj`),n.isAlreadyPutted=!0}})(t)}]);var i=function(e){var t,r=e.text||``,i=e.x,a=e.y,o=e.options||{},s=e.mutex||{},c=s.pdfEscape,l=s.activeFontKey,u=s.fonts,d=l,f=``,p=0,m=``,h=u[d].encoding;if(u[d].encoding!==`Identity-H`)return{text:r,x:i,y:a,options:o,mutex:s};for(m=r,d=l,Array.isArray(r)&&(m=r[0]),p=0;p<m.length;p+=1)u[d].metadata.hasOwnProperty(`cmap`)&&(t=u[d].metadata.cmap.unicode.codeMap[m[p].charCodeAt(0)]),t||m[p].charCodeAt(0)<256&&u[d].metadata.hasOwnProperty(`Unicode`)?f+=m[p]:f+=``;var g=``;return parseInt(d.slice(1))<14||h===`WinAnsiEncoding`?g=c(f,d).split(``).map(function(e){return e.charCodeAt(0).toString(16)}).join(``):h===`Identity-H`&&(g=n(f,u[d])),s.isHex=!0,{text:g,x:i,y:a,options:o,mutex:s}};t.events.push([`postProcessText`,function(e){var t=e.text||``,n=[],r={text:t,x:e.x,y:e.y,options:e.options,mutex:e.mutex};if(Array.isArray(t)){var a=0;for(a=0;a<t.length;a+=1)Array.isArray(t[a])&&t[a].length===3?n.push([i(Object.assign({},r,{text:t[a][0]})).text,t[a][1],t[a][2]]):n.push(i(Object.assign({},r,{text:t[a]})).text);e.text=n}else e.text=i(Object.assign({},r,{text:t})).text}])}(Rp),function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0},e.addFileToVFS=function(e,n){return t.call(this),this.internal.vFS[e]=n,this},e.getFileFromVFS=function(e){return t.call(this),this.internal.vFS[e]===void 0?null:this.internal.vFS[e]}}(Rp.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(e){var n,r,i,a,o,s,c,l=t,u=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],f={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},p={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},m=`(.).(.<.>.<.[.].[.{.}.{.«.».«.‹.›.‹.⁅.⁆.⁅.⁽.⁾.⁽.₍.₎.₍.≤.≥.≤.〈.〉.〈.﹙.﹚.﹙.﹛.﹜.﹛.﹝.﹞.﹝.﹤.﹥.﹤`.split(`.`),h=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),g=!1,_=0;this.__bidiEngine__={};var v=function(e){var t=e.charCodeAt(),n=t>>8,r=p[n];return r===void 0?n===252||n===253?`AL`:h.test(n)?`L`:n===8?`R`:`N`:l[256*r+(255&t)]},y=function(e){for(var t,n=0;n<e.length;n++){if((t=v(e.charAt(n)))===`L`)return!1;if(t===`R`)return!0}return!1},b=function(e,t,o,s){var c,l,u,d,f=t[s];switLine truncated
end`};t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t.newObject,o=t.putStream;if(n.metadata instanceof e.API.TTFFont&&n.encoding===`Identity-H`){for(var s=n.metadata.Unicode.widths,c=n.metadata.subset.encode(n.metadata.glyIdsUsed,1),l=``,u=0;u<c.length;u++)l+=String.fromCharCode(c[u]);var d=a();o({data:l,addLength1:!0,objectId:d}),i(`endobj`);var f=a();o({data:r(n.metadata.toUnicode),addLength1:!0,objectId:f}),i(`endobj`);var p=a();i(`<<`),i(`/Type /FontDescriptor`),i(`/FontName /`+jp(n.fontName)),i(`/FontFile2 `+d+` 0 R`),i(`/FontBBox `+e.API.PDFObject.convert(n.metadata.bbox)),i(`/Flags `+n.metadata.flags),i(`/StemV `+n.metadata.stemV),i(`/ItalicAngle `+n.metadata.italicAngle),i(`/Ascent `+n.metadata.ascender),i(`/Descent `+n.metadata.decender),i(`/CapHeight `+n.metadata.capHeight),i(`>>`),i(`endobj`);var m=a();i(`<<`),i(`/Type /Font`),i(`/BaseFont /`+jp(n.fontName)),i(`/FontDescriptor `+p+` 0 R`),i(`/W `+e.API.PDFObject.convert(s)),i(`/CIDToGIDMap /Identity`),i(`/DW 1000`),i(`/Subtype /CIDFontType2`),i(`/CIDSystemInfo`),i(`<<`),i(`/Supplement 0`),i(`/Registry (Adobe)`),i(`/Ordering (`+n.encoding+`)`),i(`>>`),i(`>>`),i(`endobj`),n.objectNumber=a(),i(`<<`),i(`/Type /Font`),i(`/Subtype /Type0`),i(`/ToUnicode `+f+` 0 R`),i(`/BaseFont /`+jp(n.fontName)),i(`/Encoding /`+n.encoding),i(`/DescendantFonts [`+m+` 0 R]`),i(`>>`),i(`endobj`),n.isAlreadyPutted=!0}})(t)}]),t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t.newObject,o=t.putStream;if(n.metadata instanceof e.API.TTFFont&&n.encoding===`WinAnsiEncoding`){for(var s=n.metadata.rawData,c=``,l=0;l<s.length;l++)c+=String.fromCharCode(s[l]);var u=a();o({data:c,addLength1:!0,objectId:u}),i(`endobj`);var d=a();o({data:r(n.metadata.toUnicode),addLength1:!0,objectId:d}),i(`endobj`);var f=a();i(`<<`),i(`/Descent `+n.metadata.decender),i(`/CapHeight `+n.metadata.capHeight),i(`/StemV `+n.metadata.stemV),i(`/Type /FontDescriptor`),i(`/FontFile2 `+u+` 0 R`),i(`/Flags 96`),i(`/FontBBox `+e.API.PDFObject.convert(n.metadata.bbox)),i(`/FontName /`+jp(n.fontName)),i(`/ItalicAngle `+n.metadata.italicAngle),i(`/Ascent `+n.metadata.ascender),i(`>>`),i(`endobj`),n.objectNumber=a();for(var p=0;p<n.metadata.hmtx.widths.length;p++)n.metadata.hmtx.widths[p]=parseInt(n.metadata.hmtx.widths[p]*(1e3/n.metadata.head.unitsPerEm));i(`<</Subtype/TrueType/Type/Font/ToUnicode `+d+` 0 R/BaseFont/`+jp(n.fontName)+`/FontDescriptor `+f+` 0 R/Encoding/`+n.encoding+` /FirstChar 29 /LastChar 255 /Widths `+e.API.PDFObject.convert(n.metadata.hmtx.widths)+`>>`),i(`endobj`),n.isAlreadyPutted=!0}})(t)}]);var i=function(e){var t,r=e.text||``,i=e.x,a=e.y,o=e.options||{},s=e.mutex||{},c=s.pdfEscape,l=s.activeFontKey,u=s.fonts,d=l,f=``,p=0,m=``,h=u[d].encoding;if(u[d].encoding!==`Identity-H`)return{text:r,x:i,y:a,options:o,mutex:s};for(m=r,d=l,Array.isArray(r)&&(m=r[0]),p=0;p<m.length;p+=1)u[d].metadata.hasOwnProperty(`cmap`)&&(t=u[d].metadata.cmap.unicode.codeMap[m[p].charCodeAt(0)]),t||m[p].charCodeAt(0)<256&&u[d].metadata.hasOwnProperty(`Unicode`)?f+=m[p]:f+=``;var g=``;return parseInt(d.slice(1))<14||h===`WinAnsiEncoding`?g=c(f,d).split(``).map(function(e){return e.charCodeAt(0).toString(16)}).join(``):h===`Identity-H`&&(g=n(f,u[d])),s.isHex=!0,{text:g,x:i,y:a,options:o,mutex:s}};t.events.push([`postProcessText`,function(e){var t=e.text||``,n=[],r={text:t,x:e.x,y:e.y,options:e.options,mutex:e.mutex};if(Array.isArray(t)){var a=0;for(a=0;a<t.length;a+=1)Array.isArray(t[a])&&t[a].length===3?n.push([i(Object.assign({},r,{text:t[a][0]})).text,t[a][1],t[a][2]]):n.push(i(Object.assign({},r,{text:t[a]})).text);e.text=n}else e.text=i(Object.assign({},r,{text:t})).text}])}(Lp),function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0},e.addFileToVFS=function(e,n){return t.call(this),this.internal.vFS[e]=n,this},e.getFileFromVFS=function(e){return t.call(this),this.internal.vFS[e]===void 0?null:this.internal.vFS[e]}}(Lp.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(e){var n,r,i,a,o,s,c,l=t,u=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],f={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},p={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},m=`(.).(.<.>.<.[.].[.{.}.{.«.».«.‹.›.‹.⁅.⁆.⁅.⁽.⁾.⁽.₍.₎.₍.≤.≥.≤.〈.〉.〈.﹙.﹚.﹙.﹛.﹜.﹛.﹝.﹞.﹝.﹤.﹥.﹤`.split(`.`),h=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),g=!1,_=0;this.__bidiEngine__={};var v=function(e){var t=e.charCodeAt(),n=t>>8,r=p[n];return r===void 0?n===252||n===253?`AL`:h.test(n)?`L`:n===8?`R`:`N`:l[256*r+(255&t)]},y=function(e){for(var t,n=0;n<e.length;n++){if((t=v(e.charAt(n)))===`L`)return!1;if(t===`R`)return!0}return!1},b=function(e,t,o,s){var c,l,u,d,f=t[s];switLine truncated
`)}return``+n},t}();function jh(e,t,n,r,i){r||={};var a=1.15,o=i.internal.scaleFactor,s=i.internal.getFontSize()/o,c=s*(i.getLineHeightFactor?i.getLineHeightFactor():a),l=/\r\n|\r|\n/g,u=``,d=1;if((r.valign===`middle`||r.valign===`bottom`||r.halign===`center`||r.halign===`right`)&&(u=typeof e==`string`?e.split(l):e,d=u.length||1),n+=s*(2-a),r.valign===`middle`?n-=d/2*c:r.valign===`bottom`&&(n-=d*c),r.halign===`center`||r.halign===`right`){var f=s;if(r.halign===`center`&&(f*=.5),u&&d>=1){for(var p=0;p<u.length;p++)i.text(u[p],t-i.getStringUnitWidth(u[p])*f,n),n+=c;return i}t-=i.getStringUnitWidth(e)*f}return r.halign===`justify`?i.text(e,t,n,{maxWidth:r.maxWidth||100,align:`justify`}):i.text(e,t,n),i}var Mh={},Nh=function(){function e(e){this.jsPDFDocument=e,this.userStyles={textColor:e.getTextColor?this.jsPDFDocument.getTextColor():0,fontSize:e.internal.getFontSize(),fontStyle:e.internal.getFont().fontStyle,font:e.internal.getFont().fontName,lineWidth:e.getLineWidth?this.jsPDFDocument.getLineWidth():0,lineColor:e.getDrawColor?this.jsPDFDocument.getDrawColor():0}}return e.setDefaults=function(e,t){t===void 0&&(t=null),t?t.__autoTableDocumentDefaults=e:Mh=e},e.unifyColor=function(e){return Array.isArray(e)?e:typeof e==`number`?[e,e,e]:typeof e==`string`?[e]:null},e.prototype.applyStyles=function(t,n){var r,i,a;n===void 0&&(n=!1),t.fontStyle&&this.jsPDFDocument.setFontStyle&&this.jsPDFDocument.setFontStyle(t.fontStyle);var o=this.jsPDFDocument.internal.getFont(),s=o.fontStyle,c=o.fontName;if(t.font&&(c=t.font),t.fontStyle){s=t.fontStyle;var l=this.getFontList()[c];l&&l.indexOf(s)===-1&&this.jsPDFDocument.setFontStyle&&(this.jsPDFDocument.setFontStyle(l[0]),s=l[0])}if(this.jsPDFDocument.setFont(c,s),t.fontSize&&this.jsPDFDocument.setFontSize(t.fontSize),!n){var u=e.unifyColor(t.fillColor);u&&(r=this.jsPDFDocument).setFillColor.apply(r,u),u=e.unifyColor(t.textColor),u&&(i=this.jsPDFDocument).setTextColor.apply(i,u),u=e.unifyColor(t.lineColor),u&&(a=this.jsPDFDocument).setDrawColor.apply(a,u),typeof t.lineWidth==`number`&&this.jsPDFDocument.setLineWidth(t.lineWidth)}},e.prototype.splitTextToSize=function(e,t,n){return this.jsPDFDocument.splitTextToSize(e,t,n)},e.prototype.rect=function(e,t,n,r,i){return this.jsPDFDocument.rect(e,t,n,r,i)},e.prototype.getLastAutoTable=function(){return this.jsPDFDocument.lastAutoTable||null},e.prototype.getTextWidth=function(e){return this.jsPDFDocument.getTextWidth(e)},e.prototype.getDocument=function(){return this.jsPDFDocument},e.prototype.setPage=function(e){this.jsPDFDocument.setPage(e)},e.prototype.addPage=function(){return this.jsPDFDocument.addPage()},e.prototype.getFontList=function(){return this.jsPDFDocument.getFontList()},e.prototype.getGlobalOptions=function(){return Mh||{}},e.prototype.getDocumentOptions=function(){return this.jsPDFDocument.__autoTableDocumentDefaults||{}},e.prototype.pageSize=function(){var e=this.jsPDFDocument.internal.pageSize;return e.width??(e={width:e.getWidth(),height:e.getHeight()}),e},e.prototype.scaleFactor=function(){return this.jsPDFDocument.internal.scaleFactor},e.prototype.getLineHeightFactor=function(){var e=this.jsPDFDocument;return e.getLineHeightFactor?e.getLineHeightFactor():1.15},e.prototype.getLineHeight=function(e){return e/this.scaleFactor()*this.getLineHeightFactor()},e.prototype.pageNumber=function(){var e=this.jsPDFDocument.internal.getCurrentPageInfo();return e?e.pageNumber:this.jsPDFDocument.internal.getNumberOfPages()},e}(),Ph=function(e,t){return Ph=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ph(e,t)};function Fh(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Ph(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ih=function(e){Fh(t,e);function t(t){var n=e.call(this)||this;return n._element=t,n}return t}(Array);function Lh(e){return{font:`helvetica`,fontStyle:`normal`,overflow:`linebreak`,fillColor:!1,textColor:20,halign:`left`,valign:`top`,fontSize:10,cellPadding:5/e,lineColor:200,lineWidth:0,cellWidth:`auto`,minCellHeight:0,minCellWidth:0}}function Rh(e){return{striped:{table:{fillColor:255,textColor:80,fontStyle:`normal`},head:{textColor:255,fillColor:[41,128,185],fontStyle:`bold`},body:{},foot:{textColor:255,fillColor:[41,128,185],fontStyle:`bold`},alternateRow:{fillColor:245}},grid:{table:{fillColor:255,textColor:80,fontStyle:`normal`,lineWidth:.1},head:{textColor:255,fillColor:[26,188,156],fontStyle:`bold`,lineWidth:0},body:{},foot:{textColor:255,fillColor:[26,188,156],fontStyle:`bold`,lineWidth:0},alternateRow:{}},plain:{head:{fontStyle:`bold`},foot:{fontStyle:`bold`}}}[e]}function zh(e,t,n){return n.applyStyles(t,!0),(Array.isArray(e)?e:[e]).map(function(e){return n.getTextWidth(e)}).reduce(function(e,t){return Math.max(e,t)},0)}function Bh(e,t,n,r){var i=t Line truncated
`),t.innerText||t.textContent||``}function Qh(e,t,n){for(var r=0,i=[e,t,n];r<i.length;r++){var a=i[r];a&&typeof a!=`object`&&console.error(`The options parameter should be of type object, is: `+typeof a),a.startY&&typeof a.startY!=`number`&&(console.error(`Invalid value for startY option`,a.startY),delete a.startY)}}function $h(e,t,n,r,i){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var a=Object(e),o=1;o<arguments.length;o++){var s=arguments[o];if(s!=null)for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(a[c]=s[c])}return a}function eg(e,t){var n=new Nh(e),r=n.getDocumentOptions(),i=n.getGlobalOptions();Qh(i,r,t);var a=$h({},i,r,t),o;typeof window<`u`&&(o=window);var s=tg(i,r,t),c=ng(i,r,t),l=rg(n,a),u=ag(n,a,o);return{id:t.tableId,content:u,hooks:c,styles:s,settings:l}}function tg(e,t,n){for(var r={styles:{},headStyles:{},bodyStyles:{},footStyles:{},alternateRowStyles:{},columnStyles:{}},i=function(i){if(i===`columnStyles`){var a=e[i],o=t[i],s=n[i];r.columnStyles=$h({},a,o,s)}else{var c=[e,t,n].map(function(e){return e[i]||{}});r[i]=$h({},c[0],c[1],c[2])}},a=0,o=Object.keys(r);a<o.length;a++){var s=o[a];i(s)}return r}function ng(e,t,n){for(var r=[e,t,n],i={didParseCell:[],willDrawCell:[],didDrawCell:[],willDrawPage:[],didDrawPage:[]},a=0,o=r;a<o.length;a++){var s=o[a];s.didParseCell&&i.didParseCell.push(s.didParseCell),s.willDrawCell&&i.willDrawCell.push(s.willDrawCell),s.didDrawCell&&i.didDrawCell.push(s.didDrawCell),s.willDrawPage&&i.willDrawPage.push(s.willDrawPage),s.didDrawPage&&i.didDrawPage.push(s.didDrawPage)}return i}function rg(e,t){var n=Hh(t.margin,40/e.scaleFactor()),r=ig(e,t.startY)??n.top,i=t.showFoot===!0?`everyPage`:t.showFoot===!1?`never`:t.showFoot??`everyPage`,a=t.showHead===!0?`everyPage`:t.showHead===!1?`never`:t.showHead??`everyPage`,o=t.useCss??!1,s=t.theme||(o?`plain`:`striped`),c=!!t.horizontalPageBreak,l=t.horizontalPageBreakRepeat??null;return{includeHiddenHtml:t.includeHiddenHtml??!1,useCss:o,theme:s,startY:r,margin:n,pageBreak:t.pageBreak??`auto`,rowPageBreak:t.rowPageBreak??`auto`,tableWidth:t.tableWidth??`auto`,showHead:a,showFoot:i,tableLineWidth:t.tableLineWidth??0,tableLineColor:t.tableLineColor??200,horizontalPageBreak:c,horizontalPageBreakRepeat:l,horizontalPageBreakBehaviour:t.horizontalPageBreakBehaviour??`afterAllRows`}}function ig(e,t){var n=e.getLastAutoTable(),r=e.scaleFactor(),i=e.pageNumber(),a=!1;return n&&n.startPageNumber&&(a=n.startPageNumber+n.pageNumber-1===i),typeof t==`number`?t:(t==null||t===!1)&&a&&n?.finalY!=null?n.finalY+20/r:null}function ag(e,t,n){var r=t.head||[],i=t.body||[],a=t.foot||[];if(t.html){var o=t.includeHiddenHtml;if(n){var s=Yh(e,t.html,n,o,t.useCss)||{};r=s.head||r,i=s.body||r,a=s.foot||r}else console.error(`Cannot parse html in non browser environment`)}return{columns:t.columns||og(r,i,a),head:r,body:i,foot:a}}function og(e,t,n){var r=e[0]||t[0]||n[0]||[],i=[];return Object.keys(r).filter(function(e){return e!==`_element`}).forEach(function(e){var t=1,n=Array.isArray(r)?r[parseInt(e)]:r[e];typeof n==`object`&&!Array.isArray(n)&&(t=n?.colSpan||1);for(var a=0;a<t;a++){var o=void 0;o=Array.isArray(r)?i.length:e+(a>0?`_${a}`:``);var s={dataKey:o};i.push(s)}}),i}var sg=function(){function e(e,t,n){this.table=t,this.pageNumber=t.pageNumber,this.settings=t.settings,this.cursor=n,this.doc=e.getDocument()}return e}(),cg=function(e){Fh(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t,n,o)||this;return s.cell=r,s.row=i,s.column=a,s.section=i.section,s}return t}(sg),lg=function(){function e(e,t){this.pageNumber=1,this.id=e.id,this.settings=e.settings,this.styles=e.styles,this.hooks=e.hooks,this.columns=t.columns,this.head=t.head,this.body=t.body,this.foot=t.foot}return e.prototype.getHeadHeight=function(e){return this.head.reduce(function(t,n){return t+n.getMaxCellHeight(e)},0)},e.prototype.getFootHeight=function(e){return this.foot.reduce(function(t,n){return t+n.getMaxCellHeight(e)},0)},e.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},e.prototype.callCellHooks=function(e,t,n,r,i,a){for(var o=0,s=t;o<s.length;o++){var c=s[o],l=c(new cg(e,this,n,r,i,a))===!1;if(n.text=Array.isArray(n.text)?n.text:[n.text],l)return!1}return!0},e.prototype.callEndPageHooks=function(e,t){e.applyStyles(e.userStyles);for(var n=0,r=this.hooks.didDrawPage;n<r.length;n++){var i=r[n];i(new sg(e,this,t))}},e.prototype.callWillDrawPageHooks=function(e,t){for(var n=0,r=this.hooks.willDrawPage;n<r.length;n++){var i=r[n];i(new sg(e,this,t))}},e.prototype.getWidth=function(e){if(typeof this.settings.tableWidth==`number`)return this.settings.tableWidth;if(this.settings.tableWidth===`wrap`)return this.columns.reduce(function(e,t){return e+t.wrappedWidth},0);var t=this.settings.margin;return e-t.left-t.right},e}(),ug=function(){function e(e,t,n,r,i){i===void 0&&(i=!1),this.height=0,this.raw=e,e instanceof Ih&&(this.raw=e._element,this.element=e._element),this.index=t,this.section=n,this.cells=r,this.spa Line truncated
`),t.innerText||t.textContent||``}function Qh(e,t,n){for(var r=0,i=[e,t,n];r<i.length;r++){var a=i[r];a&&typeof a!=`object`&&console.error(`The options parameter should be of type object, is: `+typeof a),a.startY&&typeof a.startY!=`number`&&(console.error(`Invalid value for startY option`,a.startY),delete a.startY)}}function $h(e,t,n,r,i){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var a=Object(e),o=1;o<arguments.length;o++){var s=arguments[o];if(s!=null)for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(a[c]=s[c])}return a}function eg(e,t){var n=new Nh(e),r=n.getDocumentOptions(),i=n.getGlobalOptions();Qh(i,r,t);var a=$h({},i,r,t),o;typeof window<`u`&&(o=window);var s=tg(i,r,t),c=ng(i,r,t),l=rg(n,a),u=ag(n,a,o);return{id:t.tableId,content:u,hooks:c,styles:s,settings:l}}function tg(e,t,n){for(var r={styles:{},headStyles:{},bodyStyles:{},footStyles:{},alternateRowStyles:{},columnStyles:{}},i=function(i){if(i===`columnStyles`){var a=e[i],o=t[i],s=n[i];r.columnStyles=$h({},a,o,s)}else{var c=[e,t,n].map(function(e){return e[i]||{}});r[i]=$h({},c[0],c[1],c[2])}},a=0,o=Object.keys(r);a<o.length;a++){var s=o[a];i(s)}return r}function ng(e,t,n){for(var r=[e,t,n],i={didParseCell:[],willDrawCell:[],didDrawCell:[],willDrawPage:[],didDrawPage:[]},a=0,o=r;a<o.length;a++){var s=o[a];s.didParseCell&&i.didParseCell.push(s.didParseCell),s.willDrawCell&&i.willDrawCell.push(s.willDrawCell),s.didDrawCell&&i.didDrawCell.push(s.didDrawCell),s.willDrawPage&&i.willDrawPage.push(s.willDrawPage),s.didDrawPage&&i.didDrawPage.push(s.didDrawPage)}return i}function rg(e,t){var n=Hh(t.margin,40/e.scaleFactor()),r=ig(e,t.startY)??n.top,i=t.showFoot===!0?`everyPage`:t.showFoot===!1?`never`:t.showFoot??`everyPage`,a=t.showHead===!0?`everyPage`:t.showHead===!1?`never`:t.showHead??`everyPage`,o=t.useCss??!1,s=t.theme||(o?`plain`:`striped`),c=!!t.horizontalPageBreak,l=t.horizontalPageBreakRepeat??null;return{includeHiddenHtml:t.includeHiddenHtml??!1,useCss:o,theme:s,startY:r,margin:n,pageBreak:t.pageBreak??`auto`,rowPageBreak:t.rowPageBreak??`auto`,tableWidth:t.tableWidth??`auto`,showHead:a,showFoot:i,tableLineWidth:t.tableLineWidth??0,tableLineColor:t.tableLineColor??200,horizontalPageBreak:c,horizontalPageBreakRepeat:l,horizontalPageBreakBehaviour:t.horizontalPageBreakBehaviour??`afterAllRows`}}function ig(e,t){var n=e.getLastAutoTable(),r=e.scaleFactor(),i=e.pageNumber(),a=!1;return n&&n.startPageNumber&&(a=n.startPageNumber+n.pageNumber-1===i),typeof t==`number`?t:(t==null||t===!1)&&a&&n?.finalY!=null?n.finalY+20/r:null}function ag(e,t,n){var r=t.head||[],i=t.body||[],a=t.foot||[];if(t.html){var o=t.includeHiddenHtml;if(n){var s=Yh(e,t.html,n,o,t.useCss)||{};r=s.head||r,i=s.body||r,a=s.foot||r}else console.error(`Cannot parse html in non browser environment`)}return{columns:t.columns||og(r,i,a),head:r,body:i,foot:a}}function og(e,t,n){var r=e[0]||t[0]||n[0]||[],i=[];return Object.keys(r).filter(function(e){return e!==`_element`}).forEach(function(e){var t=1,n=Array.isArray(r)?r[parseInt(e)]:r[e];typeof n==`object`&&!Array.isArray(n)&&(t=n?.colSpan||1);for(var a=0;a<t;a++){var o=void 0;o=Array.isArray(r)?i.length:e+(a>0?`_${a}`:``);var s={dataKey:o};i.push(s)}}),i}var sg=function(){function e(e,t,n){this.table=t,this.pageNumber=t.pageNumber,this.settings=t.settings,this.cursor=n,this.doc=e.getDocument()}return e}(),cg=function(e){Fh(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t,n,o)||this;return s.cell=r,s.row=i,s.column=a,s.section=i.section,s}return t}(sg),lg=function(){function e(e,t){this.pageNumber=1,this.id=e.id,this.settings=e.settings,this.styles=e.styles,this.hooks=e.hooks,this.columns=t.columns,this.head=t.head,this.body=t.body,this.foot=t.foot}return e.prototype.getHeadHeight=function(e){return this.head.reduce(function(t,n){return t+n.getMaxCellHeight(e)},0)},e.prototype.getFootHeight=function(e){return this.foot.reduce(function(t,n){return t+n.getMaxCellHeight(e)},0)},e.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},e.prototype.callCellHooks=function(e,t,n,r,i,a){for(var o=0,s=t;o<s.length;o++){var c=s[o],l=c(new cg(e,this,n,r,i,a))===!1;if(n.text=Array.isArray(n.text)?n.text:[n.text],l)return!1}return!0},e.prototype.callEndPageHooks=function(e,t){e.applyStyles(e.userStyles);for(var n=0,r=this.hooks.didDrawPage;n<r.length;n++){var i=r[n];i(new sg(e,this,t))}},e.prototype.callWillDrawPageHooks=function(e,t){for(var n=0,r=this.hooks.willDrawPage;n<r.length;n++){var i=r[n];i(new sg(e,this,t))}},e.prototype.getWidth=function(e){if(typeof this.settings.tableWidth==`number`)return this.settings.tableWidth;if(this.settings.tableWidth===`wrap`)return this.columns.reduce(function(e,t){return e+t.wrappedWidth},0);var t=this.settings.margin;return e-t.left-t.right},e}(),ug=function(){function e(e,t,n,r,i){i===void 0&&(i=!1),this.height=0,this.raw=e,e instanceof Ih&&(this.raw=e._element,this.element=e._element),this.index=t,this.section=n,this.cells=r,this.spa Line truncated
<div class="relative flex items-center justify-center">
<!-- Hiệu ứng ping tỏa lan -->
<div class="absolute w-8 h-8 bg-blue-400 rounded-full opacity-30 animate-ping"></div>
@@ -157,7 +157,7 @@ end`};t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t
</div>
</div>
</div>
`,iconSize:[32,32],iconAnchor:[16,16]})}),[ee]);(0,y.useEffect)(()=>{if(!n&&navigator.geolocation){let e=navigator.geolocation.watchPosition(e=>{l([e.coords.latitude,e.coords.longitude]),d(e.coords.heading),p(e.coords.speed)},e=>console.warn(`Lỗi định vị người dùng:`,e),{enableHighAccuracy:!0});return()=>navigator.geolocation.clearWatch(e)}else d(null),p(null)},[n]),(0,y.useEffect)(()=>{let e=e=>{let t=null;e.webkitCompassHeading!==void 0&&e.webkitCompassHeading!==null?t=e.webkitCompassHeading:e.alpha!==null&&e.alpha!==void 0&&(e.absolute===!0||e.type===`deviceorientationabsolute`)&&(t=(360-e.alpha)%360),t!==null&&R(t)};return window.addEventListener(`deviceorientation`,e,!0),window.addEventListener(`deviceorientationabsolute`,e,!0),()=>{window.removeEventListener(`deviceorientation`,e,!0),window.removeEventListener(`deviceorientationabsolute`,e,!0)}},[]),(0,y.useEffect)(()=>{if(!v){S(0);return}let e=null;u!==null&&f!==null&&f>.5?e=-u:P!==null&&(e=-P),e!==null&&S(e)},[v,u,f,P]);let[W,ce]=(0,y.useState)(!1),[le,ue]=(0,y.useState)(!1),[ge,_e]=(0,y.useState)(null),[ve,xe]=(0,y.useState)(null),[Ce,Ee]=(0,y.useState)(null),[De,Oe]=(0,y.useState)(!1),[G,je]=(0,y.useState)(null),Me=(0,y.useMemo)(()=>{let e=localStorage.getItem(`token`);if(!e)return null;try{return JSON.parse(atob(e.split(`.`)[1])).sub}catch{return null}},[]),Ne=(0,y.useMemo)(()=>{let e=localStorage.getItem(`user`);if(!e)return null;try{return JSON.parse(e)}catch{return null}},[]),[K,Le]=(0,y.useState)(!1),[Re,ze]=(0,y.useState)(``),[Be,Ve]=(0,y.useState)(``),[J,Ue]=(0,y.useState)(``),[We,Ge]=(0,y.useState)(``),[Ke,qe]=(0,y.useState)(!1),[Je,Ye]=(0,y.useState)(!1),[Xe,Ze]=(0,y.useState)(``),Qe=G&&G.metadata&&Array.isArray(G.metadata.likedUserIds)?G.metadata.likedUserIds:[],$e=Ne&&Qe.includes(Ne.id),et=Qe.length,tt=async()=>{if(G)try{let e=await fetch(`/api/v1/photos/${G.id}/toggle-like`,{method:`POST`,headers:{Authorization:`Bearer ${localStorage.getItem(`token`)}`}});if(e.ok){let t=await e.json();je(e=>e?{...e,metadata:{...e.metadata,likedUserIds:t.likedUserIds}}:null),i&&ln(i.id)}}catch(e){console.error(`Error toggling like:`,e)}};(0,y.useEffect)(()=>{let e=G?.metadata?.lat,t=G?.metadata?.lng;typeof e==`number`&&typeof t==`number`?(Ze(`Đang xác định địa điểm...`),fetch(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${e}&lon=${t}&accept-language=vi`).then(e=>{if(!e.ok)throw Error();return e.json()}).then(n=>{n&&n.display_name?Ze(n.display_name.split(`,`).slice(0,3).join(`,`).trim()||n.display_name):Ze(`${e.toFixed(4)}, ${t.toFixed(4)}`)}).catch(()=>{Ze(`${e.toFixed(4)}, ${t.toFixed(4)}`)})):Ze(`Chưa xác định tọa độ`)},[G?.id,G?.metadata?.lat,G?.metadata?.lng]),(0,y.useEffect)(()=>{G&&(ze(G.metadata?.title||``),Ve(G.metadata?.description||``),Ue(G.metadata?.lat??``),Ge(G.metadata?.lng??``),Le(!1))},[G]);let nt=async()=>{if(G){if(J!==``&&(isNaN(J)||J<-90||J>90)){wn({title:`Lỗi`,message:`Vĩ độ không hợp lệ (-90 đến 90).`,type:`error`});return}if(We!==``&&(isNaN(We)||We<-180||We>180)){wn({title:`Lỗi`,message:`Kinh độ không hợp lệ (-180 đến 180).`,type:`error`});return}qe(!0);try{let e=await fetch(`/api/v1/photos/${G.id}`,{method:`PATCH`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${localStorage.getItem(`token`)}`},body:JSON.stringify({title:Re,description:Be,latitude:J===``?void 0:J,longitude:We===``?void 0:We})});if(!e.ok)throw Error(`Failed to update photo info`);let t=await e.json();wn({title:`Thành công`,message:`Thông tin ảnh đã được cập nhật.`,type:`success`}),je(e=>e?{...e,metadata:t.metadata}:null),i&&ln(i.id),Le(!1)}catch{wn({title:`Lỗi`,message:`Không thể cập nhật thông tin ảnh. Vui lòng thử lại.`,type:`error`})}finally{qe(!1)}}},[rt,it]=(0,y.useState)([]),[at,ot]=(0,y.useState)(i?.title??``),[st,ct]=(0,y.useState)(i?.description??``),[lt,ut]=(0,y.useState)(i?.adultCount??0),[dt,ft]=(0,y.useState)(i?.childCount??0),[pt,mt]=(0,y.useState)(i?.childDiscount??0),[ht,gt]=(0,y.useState)(i?.tags??[]),[_t,vt]=(0,y.useState)(``),yt=[`Văn hóa`,`Mạo hiểm`,`Nghỉ dưỡng`,`Thư giãn`,`Ẩm thực`,`Khám phá`,`Gia đình`],[bt,xt]=(0,y.useState)(`all`),St=(0,y.useMemo)(()=>{if(!i?.photos)return[];let e=i.photos;if(bt!==`all`){let t=a.find(e=>e.id===bt);if(t){let n=t.locations.map(e=>e.id);e=e.filter(e=>e.locationId&&n.includes(e.locationId))}else e=[]}return e},[i?.photos,bt,a]);(0,y.useEffect)(()=>{St.length>0&&!G?je(St[0]):G&&!St.some(e=>e.id===G.id)&&je(St.length>0?St[0]:null)},[St,G]);let[Ct,wt]=(0,y.useState)(!1),[Tt,Y]=(0,y.useState)(``),[Et,Dt]=(0,y.useState)(``),[Ot,kt]=(0,y.useState)(null),[At,jt]=(0,y.useState)(``),[Mt,Nt]=(0,y.useState)([]),[Pt,Ft]=(0,y.useState)(!1),[It,Lt]=(0,y.useState)(0),[Rt,zt]=(0,y.useState)(!1),[Bt,Vt]=(0,y.useState)(!1),[Ht,Ut]=(0,y.useState)(`driving`),[Wt,Gt]=(0,y.useState)([]),[Kt,qt]=(0,y.useState)(0),[Jt,Yt]=(0,y.useState)(null),[Xt,Zt]=(0,y.useState)([]),[$t,en]=(0,y.use Line truncated
`,iconSize:[32,32],iconAnchor:[16,16]})}),[ee]);(0,y.useEffect)(()=>{if(!n&&navigator.geolocation){let e=navigator.geolocation.watchPosition(e=>{l([e.coords.latitude,e.coords.longitude]),d(e.coords.heading),p(e.coords.speed)},e=>console.warn(`Lỗi định vị người dùng:`,e),{enableHighAccuracy:!0});return()=>navigator.geolocation.clearWatch(e)}else d(null),p(null)},[n]),(0,y.useEffect)(()=>{let e=e=>{let t=null;e.webkitCompassHeading!==void 0&&e.webkitCompassHeading!==null?t=e.webkitCompassHeading:e.alpha!==null&&e.alpha!==void 0&&(e.absolute===!0||e.type===`deviceorientationabsolute`)&&(t=(360-e.alpha)%360),t!==null&&R(t)};return window.addEventListener(`deviceorientation`,e,!0),window.addEventListener(`deviceorientationabsolute`,e,!0),()=>{window.removeEventListener(`deviceorientation`,e,!0),window.removeEventListener(`deviceorientationabsolute`,e,!0)}},[]),(0,y.useEffect)(()=>{if(!v){S(0);return}let e=null;u!==null&&f!==null&&f>.5?e=-u:P!==null&&(e=-P),e!==null&&S(e)},[v,u,f,P]);let[W,ce]=(0,y.useState)(!1),[le,ue]=(0,y.useState)(!1),[ge,_e]=(0,y.useState)(null),[ve,xe]=(0,y.useState)(null),[Ce,Ee]=(0,y.useState)(null),[De,Oe]=(0,y.useState)(!1),[G,je]=(0,y.useState)(null),Me=(0,y.useMemo)(()=>{let e=localStorage.getItem(`token`)||localStorage.getItem(`guest_token`);if(!e)return null;try{return JSON.parse(atob(e.split(`.`)[1])).sub}catch{return null}},[]),Ne=(0,y.useMemo)(()=>{let e=localStorage.getItem(`user`)||localStorage.getItem(`guest_user`);if(!e)return null;try{return JSON.parse(e)}catch{return null}},[]),[K,Le]=(0,y.useState)(!1),[Re,ze]=(0,y.useState)(``),[Be,Ve]=(0,y.useState)(``),[J,Ue]=(0,y.useState)(``),[We,Ge]=(0,y.useState)(``),[Ke,qe]=(0,y.useState)(!1),[Je,Ye]=(0,y.useState)(!1),[Xe,Ze]=(0,y.useState)(``),[Qe,$e]=(0,y.useState)(!1),et=G&&G.metadata&&Array.isArray(G.metadata.likedUserIds)?G.metadata.likedUserIds:[],tt=Ne&&et.includes(Ne.id),nt=et.length,rt=async()=>{if(G)try{let e=await fetch(`/api/v1/photos/${G.id}/toggle-like`,{method:`POST`,headers:{Authorization:`Bearer ${localStorage.getItem(`token`)||localStorage.getItem(`guest_token`)}`}});if(e.ok){let t=await e.json();je(e=>e?{...e,metadata:{...e.metadata,likedUserIds:t.likedUserIds}}:null),i&&un(i.id)}}catch(e){console.error(`Error toggling like:`,e)}};(0,y.useEffect)(()=>{let e=G?.metadata?.lat,t=G?.metadata?.lng;typeof e==`number`&&typeof t==`number`?(Ze(`Đang xác định địa điểm...`),fetch(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${e}&lon=${t}&accept-language=vi`).then(e=>{if(!e.ok)throw Error();return e.json()}).then(n=>{n&&n.display_name?Ze(n.display_name.split(`,`).slice(0,3).join(`,`).trim()||n.display_name):Ze(`${e.toFixed(4)}, ${t.toFixed(4)}`)}).catch(()=>{Ze(`${e.toFixed(4)}, ${t.toFixed(4)}`)})):Ze(`Chưa xác định tọa độ`)},[G?.id,G?.metadata?.lat,G?.metadata?.lng]),(0,y.useEffect)(()=>{G&&(ze(G.metadata?.title||``),Ve(G.metadata?.description||``),Ue(G.metadata?.lat??``),Ge(G.metadata?.lng??``),Le(!1))},[G]);let it=async()=>{if(G){if(J!==``&&(isNaN(J)||J<-90||J>90)){En({title:`Lỗi`,message:`Vĩ độ không hợp lệ (-90 đến 90).`,type:`error`});return}if(We!==``&&(isNaN(We)||We<-180||We>180)){En({title:`Lỗi`,message:`Kinh độ không hợp lệ (-180 đến 180).`,type:`error`});return}qe(!0);try{let e=await fetch(`/api/v1/photos/${G.id}`,{method:`PATCH`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${localStorage.getItem(`token`)||localStorage.getItem(`guest_token`)}`},body:JSON.stringify({title:Re,description:Be,latitude:J===``?void 0:J,longitude:We===``?void 0:We})});if(!e.ok)throw Error(`Failed to update photo info`);let t=await e.json();En({title:`Thành công`,message:`Thông tin ảnh đã được cập nhật.`,type:`success`}),je(e=>e?{...e,metadata:t.metadata}:null),i&&un(i.id),Le(!1)}catch{En({title:`Lỗi`,message:`Không thể cập nhật thông tin ảnh. Vui lòng thử lại.`,type:`error`})}finally{qe(!1)}}},[at,ot]=(0,y.useState)([]),[st,ct]=(0,y.useState)(i?.title??``),[lt,ut]=(0,y.useState)(i?.description??``),[dt,ft]=(0,y.useState)(i?.adultCount??0),[pt,mt]=(0,y.useState)(i?.childCount??0),[ht,gt]=(0,y.useState)(i?.childDiscount??0),[_t,vt]=(0,y.useState)(i?.tags??[]),[yt,bt]=(0,y.useState)(``),xt=[`Văn hóa`,`Mạo hiểm`,`Nghỉ dưỡng`,`Thư giãn`,`Ẩm thực`,`Khám phá`,`Gia đình`],[St,Ct]=(0,y.useState)(`all`),wt=(0,y.useMemo)(()=>{if(!i?.photos)return[];let e=i.photos;if(St!==`all`){let t=a.find(e=>e.id===St);if(t){let n=t.locations.map(e=>e.id);e=e.filter(e=>e.locationId&&n.includes(e.locationId))}else e=[]}return e},[i?.photos,St,a]);(0,y.useEffect)(()=>{wt.length>0&&!G?je(wt[0]):G&&!wt.some(e=>e.id===G.id)&&je(wt.length>0?wt[0]:null)},[wt,G]);let[Tt,Y]=(0,y.useState)(!1),[Et,Dt]=(0,y.useState)(``),[Ot,kt]=(0,y.useState)(``),[At,jt]=(0,y.useState)(null),[Mt,Nt]=(0,y.useState)(``),[Pt,Ft]=(0,y.useState)([]),[It,Lt]=(0,y.useState)(!1),[Rt,zt]=(0,y.useState)(0),[Bt,X]=(0,y.useState)(!1),[Vt,Ht]=(0,y. Line truncated
<div class="quick-note-box" style="border-left: 4px solid #f59e0b; padding: 12px; margin: 16px 0; background: #fffbeb; border-radius: 8px; border: 1px solid #fef3c7; box-shadow: 0 2px 4px rgba(0,0,0,0.02);">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;">
<span style="font-size: 10px; color: #b45309; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;">🕒 ${o} • 👤 ${a}</span>
@@ -165,7 +165,7 @@ end`};t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t
<p style="margin: 0; color: #4b5563; font-size: 14px; line-height: 1.5;"><strong>📍 ${e}:</strong> ${t}</p>
</div>
<p></p>
`;if(u)u.content+=d;else{let e={id:Date.now().toString(),title:s,content:`<p>Bắt đầu lập kế hoạch cho chuyến đi <strong>${i?.title}</strong> của bạn tại đây...</p>`+d,createdAt:new Date().toISOString()};l.unshift(e)}localStorage.setItem(`my_journey_notes`,JSON.stringify(l)),wn({title:`Thành công`,message:`Đã lưu vào ghi chú chung!`,type:`success`})},Vn=async()=>{if(i&&await Cn({title:`Xóa Tour vĩnh viễn?`,message:`Toàn bộ dữ liệu về lộ trình, chi phí và hình ảnh của chuyến đi này sẽ bị xóa bỏ hoàn toàn. Bạn có chắc chắn muốn thực hiện?`}))try{await Sn(i.id),wn({title:`Thành công`,message:`Hành trình đã được xóa.`,type:`success`}),e()}catch(e){wn({title:`Lỗi`,message:e.message||`Không thể xóa hành trình.`,type:`error`})}},Hn=y.useRef(null);(0,y.useEffect)(()=>{Jt&&Hn.current&&Qt.default.DomEvent.disableClickPropagation(Hn.current)},[Jt]),(0,y.useEffect)(()=>{Yt(null)},[m,g]);let Un=(0,y.useMemo)(()=>a.flatMap(e=>e.locations).find(e=>e.plannedStart&&new Date(e.plannedStart).getTime()===0),[a]),Wn=(0,y.useMemo)(()=>a.flatMap(e=>e.locations).find(e=>e.plannedEnd&&new Date(e.plannedEnd).getTime()===0),[a]),Gn=[{id:`plan`,label:`Lộ trình`,icon:fe,visible:!0},{id:`expense`,label:`Chi phí`,icon:Fe,visible:[`OWNER`,`MANAGER`,`MEMBER`].includes(o||``)},{id:`photo`,label:`Ảnh`,icon:ie,visible:!0},{id:`settings`,label:`Cài đặt`,icon:we,visible:o===`OWNER`}].filter(e=>e.visible),Kn=[`OWNER`,`MANAGER`,`MEMBER`].includes(o||``),qn=(0,y.useMemo)(()=>{if(i?.startDate&&i?.endDate)return`${new Date(i.startDate).toLocaleDateString(`vi-VN`)} - ${new Date(i.endDate).toLocaleDateString(`vi-VN`)}`;let e=a[0],t=a[a.length-1],n=e?.startDate,r=t?.endDate||t?.startDate;return n&&r?`${new Date(n).toLocaleDateString(`vi-VN`)} - ${new Date(r).toLocaleDateString(`vi-VN`)}`:n?`Từ ${new Date(n).toLocaleDateString(`vi-VN`)}`:`Chưa xác định ngày`},[i,a]),Jn=[`Đừng nghe họ nói, hãy tự mình đi xem.`,`Thế giới là một cuốn sách, và ai không đi du lịch thì chỉ mới đọc được một trang.`,`Hành trình ngàn dặm bắt đầu từ một bước chân.`,`Đi là để trở về, nhưng với một tâm hồn mới.`],Yn=(0,y.useMemo)(()=>Jn[Math.floor(Math.random()*Jn.length)],[]),Xn={title:i?.title||`Hành trình khám phá TP.HCM`,date:qn,membersCount:i?.participants?.length||0,budget:i?.totalCost?`${Number(i.totalCost).toLocaleString()} VND`:`0 VND`,coverImage:i?.photos?.[0]?.imageUrl||`https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?q=80&w=2070&auto=format&fit=crop`};return(0,q.jsxs)(`div`,{className:`min-h-screen bg-gray-50 pb-20`,children:[(0,q.jsxs)(`div`,{className:`sticky top-0 z-30 bg-white/80 backdrop-blur-md border-b border-gray-100 px-4 py-3 flex items-center justify-between`,children:[(0,q.jsx)(`button`,{onClick:e,className:`p-2 hover:bg-gray-100 rounded-full transition-colors`,children:(0,q.jsx)(I,{className:`w-6 h-6 text-gray-600`})}),(0,q.jsx)(`h1`,{className:`text-lg font-bold text-gray-800 truncate px-4 flex-1 text-center`,children:Xn.title}),(0,q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[!n&&r&&(0,q.jsx)(`button`,{onClick:r,className:`p-2 hover:bg-amber-50 text-amber-600 rounded-full transition-colors`,title:`Ghi chú của tôi`,children:(0,q.jsx)(H,{className:`w-5 h-5`})}),jn&&(0,q.jsx)(`button`,{onClick:Ln,className:`p-2 hover:bg-blue-50 text-blue-600 rounded-full transition-colors`,title:`Chia sẻ tour`,children:(0,q.jsx)(Te,{className:`w-5 h-5`})})]})]}),(0,q.jsxs)(`div`,{className:`relative min-h-[480px] w-full bg-blue-900 flex flex-col justify-end`,children:[(0,q.jsx)(`img`,{src:Xn.coverImage,className:`absolute inset-0 w-full h-full object-cover opacity-60`,alt:`Tour Cover`}),(0,q.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent`}),(0,q.jsx)(`div`,{className:`relative z-10 p-6 text-white pt-28 pb-20`,children:(0,q.jsxs)(`div`,{className:`max-w-2xl mx-auto space-y-4`,children:[(0,q.jsx)(`h2`,{className:`text-3xl font-black tracking-tight drop-shadow-md`,children:Xn.title}),i?.tags&&i.tags.length>0&&(0,q.jsx)(`div`,{className:`flex flex-wrap gap-2 pt-1`,children:i.tags.map(e=>(0,q.jsx)(`span`,{className:`px-2.5 py-1 bg-white/20 backdrop-blur-md border border-white/30 rounded-lg text-[10px] font-black uppercase tracking-wider`,children:e},e))}),i?.description&&(0,q.jsxs)(`p`,{className:`text-sm md:text-base text-white/90 max-w-xl line-clamp-3 md:line-clamp-none bg-black/20 backdrop-blur-sm p-4 rounded-2xl border border-white/10 italic leading-relaxed`,children:[(0,q.jsx)(be,{className:`w-4 h-4 inline-block mr-2 opacity-50`}),i.description]}),(0,q.jsxs)(`div`,{className:`mt-3 text-[11px] sm:text-sm font-bold text-white bg-black/40 backdrop-blur-md px-4 py-2 rounded-xl border border-white/10 inline-flex items-center max-w-full`,children:[(0,q.jsx)(`span`,{className:`text-white/60 mr-1`,childLine truncated
`;if(u)u.content+=d;else{let e={id:Date.now().toString(),title:s,content:`<p>Bắt đầu lập kế hoạch cho chuyến đi <strong>${i?.title}</strong> của bạn tại đây...</p>`+d,createdAt:new Date().toISOString()};l.unshift(e)}localStorage.setItem(`my_journey_notes`,JSON.stringify(l)),En({title:`Thành công`,message:`Đã lưu vào ghi chú chung!`,type:`success`})},Hn=async()=>{if(i&&await wn({title:`Xóa Tour vĩnh viễn?`,message:`Toàn bộ dữ liệu về lộ trình, chi phí và hình ảnh của chuyến đi này sẽ bị xóa bỏ hoàn toàn. Bạn có chắc chắn muốn thực hiện?`}))try{await Cn(i.id),En({title:`Thành công`,message:`Hành trình đã được xóa.`,type:`success`}),e()}catch(e){En({title:`Lỗi`,message:e.message||`Không thể xóa hành trình.`,type:`error`})}},Un=y.useRef(null);(0,y.useEffect)(()=>{Yt&&Un.current&&Zt.default.DomEvent.disableClickPropagation(Un.current)},[Yt]),(0,y.useEffect)(()=>{Xt(null)},[m,g]);let Wn=(0,y.useMemo)(()=>a.flatMap(e=>e.locations).find(e=>e.plannedStart&&new Date(e.plannedStart).getTime()===0),[a]),Gn=(0,y.useMemo)(()=>a.flatMap(e=>e.locations).find(e=>e.plannedEnd&&new Date(e.plannedEnd).getTime()===0),[a]),Kn=[{id:`plan`,label:`Lộ trình`,icon:fe,visible:!0},{id:`expense`,label:`Chi phí`,icon:Fe,visible:[`OWNER`,`MANAGER`,`MEMBER`].includes(o||``)},{id:`photo`,label:`Ảnh`,icon:ie,visible:!0},{id:`settings`,label:`Cài đặt`,icon:we,visible:o===`OWNER`}].filter(e=>e.visible),qn=[`OWNER`,`MANAGER`,`MEMBER`].includes(o||``),Jn=(0,y.useMemo)(()=>{if(i?.startDate&&i?.endDate)return`${new Date(i.startDate).toLocaleDateString(`vi-VN`)} - ${new Date(i.endDate).toLocaleDateString(`vi-VN`)}`;let e=a[0],t=a[a.length-1],n=e?.startDate,r=t?.endDate||t?.startDate;return n&&r?`${new Date(n).toLocaleDateString(`vi-VN`)} - ${new Date(r).toLocaleDateString(`vi-VN`)}`:n?`Từ ${new Date(n).toLocaleDateString(`vi-VN`)}`:`Chưa xác định ngày`},[i,a]),Yn=[`Đừng nghe họ nói, hãy tự mình đi xem.`,`Thế giới là một cuốn sách, và ai không đi du lịch thì chỉ mới đọc được một trang.`,`Hành trình ngàn dặm bắt đầu từ một bước chân.`,`Đi là để trở về, nhưng với một tâm hồn mới.`],Xn=(0,y.useMemo)(()=>Yn[Math.floor(Math.random()*Yn.length)],[]),Zn={title:i?.title||`Hành trình khám phá TP.HCM`,date:Jn,membersCount:i?.participants?.length||0,budget:i?.totalCost?`${Number(i.totalCost).toLocaleString()} VND`:`0 VND`,coverImage:i?.photos?.[0]?.imageUrl||`https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?q=80&w=2070&auto=format&fit=crop`};return(0,q.jsxs)(`div`,{className:`min-h-screen bg-gray-50 pb-20`,children:[(0,q.jsxs)(`div`,{className:`sticky top-0 z-30 bg-white/80 backdrop-blur-md border-b border-gray-100 px-4 py-3 flex items-center justify-between`,children:[(0,q.jsx)(`button`,{onClick:e,className:`p-2 hover:bg-gray-100 rounded-full transition-colors`,children:(0,q.jsx)(I,{className:`w-6 h-6 text-gray-600`})}),(0,q.jsx)(`h1`,{className:`text-lg font-bold text-gray-800 truncate px-4 flex-1 text-center`,children:Zn.title}),(0,q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[!n&&r&&(0,q.jsx)(`button`,{onClick:r,className:`p-2 hover:bg-amber-50 text-amber-600 rounded-full transition-colors`,title:`Ghi chú của tôi`,children:(0,q.jsx)(H,{className:`w-5 h-5`})}),Mn&&(0,q.jsx)(`button`,{onClick:Rn,className:`p-2 hover:bg-blue-50 text-blue-600 rounded-full transition-colors`,title:`Chia sẻ tour`,children:(0,q.jsx)(Te,{className:`w-5 h-5`})})]})]}),(0,q.jsxs)(`div`,{className:`relative min-h-[480px] w-full bg-blue-900 flex flex-col justify-end`,children:[(0,q.jsx)(`img`,{src:Zn.coverImage,className:`absolute inset-0 w-full h-full object-cover opacity-60`,alt:`Tour Cover`}),(0,q.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent`}),(0,q.jsx)(`div`,{className:`relative z-10 p-6 text-white pt-28 pb-20`,children:(0,q.jsxs)(`div`,{className:`max-w-2xl mx-auto space-y-4`,children:[(0,q.jsx)(`h2`,{className:`text-3xl font-black tracking-tight drop-shadow-md`,children:Zn.title}),i?.tags&&i.tags.length>0&&(0,q.jsx)(`div`,{className:`flex flex-wrap gap-2 pt-1`,children:i.tags.map(e=>(0,q.jsx)(`span`,{className:`px-2.5 py-1 bg-white/20 backdrop-blur-md border border-white/30 rounded-lg text-[10px] font-black uppercase tracking-wider`,children:e},e))}),i?.description&&(0,q.jsxs)(`p`,{className:`text-sm md:text-base text-white/90 max-w-xl line-clamp-3 md:line-clamp-none bg-black/20 backdrop-blur-sm p-4 rounded-2xl border border-white/10 italic leading-relaxed`,children:[(0,q.jsx)(be,{className:`w-4 h-4 inline-block mr-2 opacity-50`}),i.description]}),(0,q.jsxs)(`div`,{className:`mt-3 text-[11px] sm:text-sm font-bold text-white bg-black/40 backdrop-blur-md px-4 py-2 rounded-xl border border-white/10 inline-flex items-center max-w-full`,children:[(0,q.jsx)(`span`,{className:`text-white/60 mr-1`,childLine truncated
`){let r=new s.default(this.ops),i=new e,a=0;for(;r.hasNext();){if(r.peekType()!==`insert`)return;let s=r.peek(),c=o.default.length(s)-r.peekLength(),l=typeof s.insert==`string`?s.insert.indexOf(n,c)-c:-1;if(l<0)i.push(r.next());else if(l>0)i.push(r.next(l));else{if(t(i,r.next(1).attributes||{},a)===!1)return;a+=1,i=new e}}i.length()>0&&t(i,{},a)}invert(t){let n=new e;return this.reduce((r,i)=>{if(i.insert)n.delete(o.default.length(i));else if(typeof i.retain==`number`&&i.attributes==null)return n.retain(i.retain),r+i.retain;else if(i.delete||typeof i.retain==`number`){let e=i.delete||i.retain;return t.slice(r,r+e).forEach(e=>{i.delete?n.push(e):i.retain&&i.attributes&&n.retain(o.default.length(e),a.default.invert(i.attributes,e.attributes))}),r+e}else if(typeof i.retain==`object`&&i.retain!==null){let o=t.slice(r,r+1),c=new s.default(o.ops).next(),[u,d,f]=l(i.retain,c.insert),p=e.getHandler(u);return n.retain({[u]:p.invert(d,f)},a.default.invert(i.attributes,c.attributes)),r+1}return r},0),n.chop()}transform(t,n=!1){if(n=!!n,typeof t==`number`)return this.transformPosition(t,n);let r=t,i=new s.default(this.ops),c=new s.default(r.ops),l=new e;for(;i.hasNext()||c.hasNext();)if(i.peekType()===`insert`&&(n||c.peekType()!==`insert`))l.retain(o.default.length(i.next()));else if(c.peekType()===`insert`)l.push(c.next());else{let t=Math.min(i.peekLength(),c.peekLength()),r=i.next(t),o=c.next(t);if(r.delete)continue;if(o.delete)l.push(o);else{let i=r.retain,s=o.retain,c=typeof s==`object`&&s?s:t;if(typeof i==`object`&&i&&typeof s==`object`&&s){let t=Object.keys(i)[0];if(t===Object.keys(s)[0]){let r=e.getHandler(t);r&&(c={[t]:r.transform(i[t],s[t],n)})}}l.retain(c,a.default.transform(r.attributes,o.attributes,n))}}return l.chop()}transformPosition(e,t=!1){t=!!t;let n=new s.default(this.ops),r=0;for(;n.hasNext()&&r<=e;){let i=n.peekLength(),a=n.peekType();if(n.next(),a===`delete`){e-=Math.min(i,e-r);continue}else a===`insert`&&(r<e||!t)&&(e+=i);r+=i}return e}};u.Op=o.default,u.OpIterator=s.default,u.AttributeMap=a.default,u.handlers={},e.default=u,typeof t==`object`&&(t.exports=u,t.exports.default=u)}))(),1),QC=class extends zC{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return``}};QC.blotName=`break`,QC.tagName=`BR`;var $C=class extends GC{},ew={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function tw(e){return e.replace(/[&<>"']/g,e=>ew[e])}var nw=class e extends PC{static allowedChildren=[e,QC,zC,$C];static order=[`cursor`,`inline`,`link`,`underline`,`strike`,`italic`,`bold`,`script`,`code`];static compare(t,n){let r=e.order.indexOf(t),i=e.order.indexOf(n);return r>=0||i>=0?r-i:t===n?0:t<n?-1:1}formatAt(t,n,r,i){if(e.compare(this.statics.blotName,r)<0&&this.scroll.query(r,mC.BLOT)){let e=this.isolate(t,n);i&&e.wrap(r,i)}else super.formatAt(t,n,r,i)}optimize(t){if(super.optimize(t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){let e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}},rw=1,iw=class extends IC{cache={};delta(){return this.cache.delta??(this.cache.delta=ow(this)),this.cache.delta}deleteAt(e,t){super.deleteAt(e,t),this.cache={}}formatAt(e,t,n,r){t<=0||(this.scroll.query(n,mC.BLOCK)?e+t===this.length()&&this.format(n,r):super.formatAt(e,Math.min(t,this.length()-e-1),n,r),this.cache={})}insertAt(e,t,n){if(n!=null){super.insertAt(e,t,n),this.cache={};return}if(t.length===0)return;let r=t.split(`
`),i=r.shift();i.length>0&&(e<this.length()-1||this.children.tail==null?super.insertAt(Math.min(e,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let a=this;r.reduce((e,t)=>(a=a.split(e,!0),a.insertAt(0,t),t.length),e+i.length)}insertBefore(e,t){let{head:n}=this.children;super.insertBefore(e,t),n instanceof QC&&n.remove(),this.cache={}}length(){return this.cache.length??(this.cache.length=super.length()+rw),this.cache.length}moveChildren(e,t){super.moveChildren(e,t),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t&&(e===0||e>=this.length()-rw)){let t=this.clone();return e===0?(this.parent.insertBefore(t,this),this):(this.parent.insertBefore(t,this.next),t)}let n=super.split(e,t);return this.cache={},n}};iw.blotName=`block`,iw.tagName=`P`,iw.defaultChild=QC,iw.allowedChildren=[QC,nw,zC,$C];var aw=class extends zC{attach(){super.attach(),this.attributes=new CC(this.domNode)}delta(){return new Q.default().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){let n=this.scroll.query(e,mC.BLOCK_ATTRIBUTE);n!=null&&this.attributes.attribute(n,t)}formatAt(e,t,n,r){this.format(n,r)}insertAt(e,t,n){if(n!=null){super.insertAt(e,t,n);return}let r=t.split(`
`),i=r.pop(),a=r.map(e=>{let t=this.scroll.create(iw.blotName);return t.insertAt(0,e),t}),o=this.split(e);a.forEach(e=>{this.parent.insertBefore(e,o)}),i&&this.parent.insertBefore(this.scroll.create(`text`,i),o)}};aw.scope=mC.BLOCK_BLOT;function ow(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.descendants(DC).reduce((e,n)=>n.length()===0?e:e.insert(n.value(),sw(n,{},t)),new Q.default).insert(`
@@ -208,4 +208,4 @@ end`};t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t
`,{[pT.blotName]:t}),e.insert(n)),new Q.default);let n=this.quill.root.ownerDocument.createElement(`div`);return n.classList.add(pT.className),n.innerHTML=QE(this.options.hljs,t,e),aE(this.quill.scroll,n,[(e,t)=>{let n=JE.value(e);return n?t.compose(new Q.default().retain(t.length(),{[YE.blotName]:n})):t}],[(e,n)=>e.data.split(`
`).reduce((e,n,r)=>(r!==0&&e.insert(`
`,{[pT.blotName]:t}),e.insert(n)),n)],new WeakMap)}};$E.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:`plain`,label:`Plain`},{key:`bash`,label:`Bash`},{key:`cpp`,label:`C++`},{key:`cs`,label:`C#`},{key:`css`,label:`CSS`},{key:`diff`,label:`Diff`},{key:`xml`,label:`HTML/XML`},{key:`java`,label:`Java`},{key:`javascript`,label:`JavaScript`},{key:`markdown`,label:`Markdown`},{key:`php`,label:`PHP`},{key:`python`,label:`Python`},{key:`ruby`,label:`Ruby`},{key:`sql`,label:`SQL`}]};var eD=class e extends iw{static blotName=`table`;static tagName=`TD`;static create(e){let t=super.create();return e?t.setAttribute(`data-row`,e):t.setAttribute(`data-row`,iD()),t}static formats(e){if(e.hasAttribute(`data-row`))return e.getAttribute(`data-row`)}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,n){t===e.blotName&&n?this.domNode.setAttribute(`data-row`,n):super.format(t,n)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}},tD=class extends Qw{static blotName=`table-row`;static tagName=`TR`;checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){let e=this.children.head.formats(),t=this.children.tail.formats(),n=this.next.children.head.formats(),r=this.next.children.tail.formats();return e.table===t.table&&e.table===n.table&&e.table===r.table}return!1}optimize(e){super.optimize(e),this.children.forEach(e=>{if(e.next==null)return;let t=e.formats(),n=e.next.formats();if(t.table!==n.table){let t=this.splitAfter(e);t&&t.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}},nD=class extends Qw{static blotName=`table-body`;static tagName=`TBODY`},rD=class extends Qw{static blotName=`table-container`;static tagName=`TABLE`;balanceCells(){let e=this.descendants(tD),t=e.reduce((e,t)=>Math.max(t.children.length,e),0);e.forEach(e=>{Array(t-e.children.length).fill(0).forEach(()=>{let t;e.children.head!=null&&(t=eD.formats(e.children.head.domNode));let n=this.scroll.create(eD.blotName,t);e.appendChild(n),n.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){let[t]=this.descendant(nD);t==null||t.children.head==null||t.children.forEach(t=>{t.children.at(e)?.remove()})}insertColumn(e){let[t]=this.descendant(nD);t==null||t.children.head==null||t.children.forEach(t=>{let n=t.children.at(e),r=eD.formats(t.children.head.domNode),i=this.scroll.create(eD.blotName,r);t.insertBefore(i,n)})}insertRow(e){let[t]=this.descendant(nD);if(t==null||t.children.head==null)return;let n=iD(),r=this.scroll.create(tD.blotName);t.children.head.children.forEach(()=>{let e=this.scroll.create(eD.blotName,n);r.appendChild(e)});let i=t.children.at(e);t.insertBefore(r,i)}rows(){let e=this.children.head;return e==null?[]:e.children.map(e=>e)}};rD.allowedChildren=[nD],nD.requiredContainer=rD,nD.allowedChildren=[tD],tD.requiredContainer=nD,tD.allowedChildren=[eD],eD.requiredContainer=tD;function iD(){return`row-${Math.random().toString(36).slice(2,6)}`}var aD=class extends Aw{static register(){$.register(eD),$.register(tD),$.register(nD),$.register(rD)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(rD).forEach(e=>{e.balanceCells()})}deleteColumn(){let[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update($.sources.USER))}deleteRow(){let[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update($.sources.USER))}deleteTable(){let[e]=this.getTable();if(e==null)return;let t=e.offset();e.remove(),this.quill.update($.sources.USER),this.quill.setSelection(t,$.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];let[t,n]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==eD.blotName)return[null,null,null,-1];let r=t.parent;return[r.parent.parent,r,t,n]}insertColumn(e){let t=this.quill.getSelection();if(!t)return;let[n,r,i]=this.getTable(t);if(i==null)return;let a=i.cellOffset();n.insertColumn(a+e),this.quill.update($.sources.USER);let o=r.rowOffset();e===0&&(o+=1),this.quill.setSelection(t.index+o,t.length,$.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){let t=this.quill.getSelection();if(!t)return;let[n,r,i]=this.getTable(t);if(i==null)return;let a=r.rowOffset();n.insertRow(a+e),this.quill.update($.sources.USER),e>0?this.quill.setSelection(t,$.sources.SILENT):this.quill.setSelection(t.index+r.children.length,t.length,$.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){let n=this.quill.getSelection();if(n==null)return;let r=Array(e).fill(0).reduce(e=>{let n=Array(t).fill(`
`).join(``);return e.insert(n,{table:iD()})},new Q.default().retain(n.index));this.quill.updateContents(r,$.sources.USER),this.quill.setSelection(n.index,$.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on($.events.SCROLL_OPTIMIZE,e=>{e.some(e=>[`TD`,`TR`,`TBODY`,`TABLE`].includes(e.target.tagName)?(this.quill.once($.events.TEXT_CHANGE,(e,t,n)=>{n===$.sources.USER&&this.balanceTables()}),!0):!1)})}},oD=mw(`quill:toolbar`),sD=class extends Aw{constructor(e,t){if(super(e,t),Array.isArray(this.options.container)){let t=document.createElement(`div`);t.setAttribute(`role`,`toolbar`),lD(t,this.options.container),e.container?.parentNode?.insertBefore(t,e.container),this.container=t}else typeof this.options.container==`string`?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){oD.error(`Container required for toolbar`,this.options);return}this.container.classList.add(`ql-toolbar`),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(e=>{let t=this.options.handlers?.[e];t&&this.addHandler(e,t)}),Array.from(this.container.querySelectorAll(`button, select`)).forEach(e=>{this.attach(e)}),this.quill.on($.events.EDITOR_CHANGE,()=>{let[e]=this.quill.selection.getRange();this.update(e)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(e=>e.indexOf(`ql-`)===0);if(!t)return;if(t=t.slice(3),e.tagName===`BUTTON`&&e.setAttribute(`type`,`button`),this.handlers[t]==null&&this.quill.scroll.query(t)==null){oD.warn(`ignoring attaching to nonexistent format`,t,e);return}let n=e.tagName===`SELECT`?`change`:`click`;e.addEventListener(n,n=>{let r;if(e.tagName===`SELECT`){if(e.selectedIndex<0)return;let t=e.options[e.selectedIndex];r=t.hasAttribute(`selected`)?!1:t.value||!1}else r=e.classList.contains(`ql-active`)?!1:e.value||!e.hasAttribute(`value`),n.preventDefault();this.quill.focus();let[i]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,r);else if(this.quill.scroll.query(t).prototype instanceof zC){if(r=prompt(`Enter ${t}`),!r)return;this.quill.updateContents(new Q.default().retain(i.index).delete(i.length).insert({[t]:r}),$.sources.USER)}else this.quill.format(t,r,$.sources.USER);this.update(i)}),this.controls.push([t,e])}update(e){let t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{let[r,i]=n;if(i.tagName===`SELECT`){let n=null;if(e==null)n=null;else if(t[r]==null)n=i.querySelector(`option[selected]`);else if(!Array.isArray(t[r])){let e=t[r];typeof e==`string`&&(e=e.replace(/"/g,`\\"`)),n=i.querySelector(`option[value="${e}"]`)}n==null?(i.value=``,i.selectedIndex=-1):n.selected=!0}else if(e==null)i.classList.remove(`ql-active`),i.setAttribute(`aria-pressed`,`false`);else if(i.hasAttribute(`value`)){let e=t[r],n=e===i.getAttribute(`value`)||e!=null&&e.toString()===i.getAttribute(`value`)||e==null&&!i.getAttribute(`value`);i.classList.toggle(`ql-active`,n),i.setAttribute(`aria-pressed`,n.toString())}else{let e=t[r]!=null;i.classList.toggle(`ql-active`,e),i.setAttribute(`aria-pressed`,e.toString())}})}};sD.DEFAULTS={};function cD(e,t,n){let r=document.createElement(`button`);r.setAttribute(`type`,`button`),r.classList.add(`ql-${t}`),r.setAttribute(`aria-pressed`,`false`),n==null?r.setAttribute(`aria-label`,t):(r.value=n,r.setAttribute(`aria-label`,`${t}: ${n}`)),e.appendChild(r)}function lD(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(t=>{let n=document.createElement(`span`);n.classList.add(`ql-formats`),t.forEach(e=>{if(typeof e==`string`)cD(n,e);else{let t=Object.keys(e)[0],r=e[t];Array.isArray(r)?uD(n,t,r):cD(n,t,r)}}),e.appendChild(n)})}function uD(e,t,n){let r=document.createElement(`select`);r.classList.add(`ql-${t}`),n.forEach(e=>{let t=document.createElement(`option`);e===!1?t.setAttribute(`selected`,`selected`):t.setAttribute(`value`,String(e)),r.appendChild(t)}),e.appendChild(r)}sD.DEFAULTS={container:null,handlers:{clean(){let e=this.quill.getSelection();if(e!=null)if(e.length===0){let e=this.quill.getFormat();Object.keys(e).forEach(e=>{this.quill.scroll.query(e,mC.INLINE)!=null&&this.quill.format(e,!1,$.sources.USER)})}else this.quill.removeFormat(e.index,e.length,$.sources.USER)},direction(e){let{align:t}=this.quill.getFormat();e===`rtl`&&t==null?this.quill.format(`align`,`right`,$.sources.USER):!e&&t===`right`&&this.quill.format(`align`,!1,$.sources.USER),this.quill.format(`direction`,e,$.sources.USER)},indent(e){let t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if(e===`+1`||e===`-1`){let t=e===`+1`?1:-1;n.direction===`rtl`&&(t*=-1),this.quill.format(`indent`,r+t,$.sources.USER)}},link(e){e===!0&&(e=prompt(`Enter link URL:`)),this.quill.format(`link`,e,$.sources.USER)},list(e){let t=this.quill.getSelection(),n=this.quill.getFormat(t);e===`check`?n.list===`checked`||n.list===`unchecked`?this.quill.format(`list`,!1,$.sources.USER):this.quill.fo Line truncated
`).join(``);return e.insert(n,{table:iD()})},new Q.default().retain(n.index));this.quill.updateContents(r,$.sources.USER),this.quill.setSelection(n.index,$.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on($.events.SCROLL_OPTIMIZE,e=>{e.some(e=>[`TD`,`TR`,`TBODY`,`TABLE`].includes(e.target.tagName)?(this.quill.once($.events.TEXT_CHANGE,(e,t,n)=>{n===$.sources.USER&&this.balanceTables()}),!0):!1)})}},oD=mw(`quill:toolbar`),sD=class extends Aw{constructor(e,t){if(super(e,t),Array.isArray(this.options.container)){let t=document.createElement(`div`);t.setAttribute(`role`,`toolbar`),lD(t,this.options.container),e.container?.parentNode?.insertBefore(t,e.container),this.container=t}else typeof this.options.container==`string`?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){oD.error(`Container required for toolbar`,this.options);return}this.container.classList.add(`ql-toolbar`),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(e=>{let t=this.options.handlers?.[e];t&&this.addHandler(e,t)}),Array.from(this.container.querySelectorAll(`button, select`)).forEach(e=>{this.attach(e)}),this.quill.on($.events.EDITOR_CHANGE,()=>{let[e]=this.quill.selection.getRange();this.update(e)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(e=>e.indexOf(`ql-`)===0);if(!t)return;if(t=t.slice(3),e.tagName===`BUTTON`&&e.setAttribute(`type`,`button`),this.handlers[t]==null&&this.quill.scroll.query(t)==null){oD.warn(`ignoring attaching to nonexistent format`,t,e);return}let n=e.tagName===`SELECT`?`change`:`click`;e.addEventListener(n,n=>{let r;if(e.tagName===`SELECT`){if(e.selectedIndex<0)return;let t=e.options[e.selectedIndex];r=t.hasAttribute(`selected`)?!1:t.value||!1}else r=e.classList.contains(`ql-active`)?!1:e.value||!e.hasAttribute(`value`),n.preventDefault();this.quill.focus();let[i]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,r);else if(this.quill.scroll.query(t).prototype instanceof zC){if(r=prompt(`Enter ${t}`),!r)return;this.quill.updateContents(new Q.default().retain(i.index).delete(i.length).insert({[t]:r}),$.sources.USER)}else this.quill.format(t,r,$.sources.USER);this.update(i)}),this.controls.push([t,e])}update(e){let t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{let[r,i]=n;if(i.tagName===`SELECT`){let n=null;if(e==null)n=null;else if(t[r]==null)n=i.querySelector(`option[selected]`);else if(!Array.isArray(t[r])){let e=t[r];typeof e==`string`&&(e=e.replace(/"/g,`\\"`)),n=i.querySelector(`option[value="${e}"]`)}n==null?(i.value=``,i.selectedIndex=-1):n.selected=!0}else if(e==null)i.classList.remove(`ql-active`),i.setAttribute(`aria-pressed`,`false`);else if(i.hasAttribute(`value`)){let e=t[r],n=e===i.getAttribute(`value`)||e!=null&&e.toString()===i.getAttribute(`value`)||e==null&&!i.getAttribute(`value`);i.classList.toggle(`ql-active`,n),i.setAttribute(`aria-pressed`,n.toString())}else{let e=t[r]!=null;i.classList.toggle(`ql-active`,e),i.setAttribute(`aria-pressed`,e.toString())}})}};sD.DEFAULTS={};function cD(e,t,n){let r=document.createElement(`button`);r.setAttribute(`type`,`button`),r.classList.add(`ql-${t}`),r.setAttribute(`aria-pressed`,`false`),n==null?r.setAttribute(`aria-label`,t):(r.value=n,r.setAttribute(`aria-label`,`${t}: ${n}`)),e.appendChild(r)}function lD(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(t=>{let n=document.createElement(`span`);n.classList.add(`ql-formats`),t.forEach(e=>{if(typeof e==`string`)cD(n,e);else{let t=Object.keys(e)[0],r=e[t];Array.isArray(r)?uD(n,t,r):cD(n,t,r)}}),e.appendChild(n)})}function uD(e,t,n){let r=document.createElement(`select`);r.classList.add(`ql-${t}`),n.forEach(e=>{let t=document.createElement(`option`);e===!1?t.setAttribute(`selected`,`selected`):t.setAttribute(`value`,String(e)),r.appendChild(t)}),e.appendChild(r)}sD.DEFAULTS={container:null,handlers:{clean(){let e=this.quill.getSelection();if(e!=null)if(e.length===0){let e=this.quill.getFormat();Object.keys(e).forEach(e=>{this.quill.scroll.query(e,mC.INLINE)!=null&&this.quill.format(e,!1,$.sources.USER)})}else this.quill.removeFormat(e.index,e.length,$.sources.USER)},direction(e){let{align:t}=this.quill.getFormat();e===`rtl`&&t==null?this.quill.format(`align`,`right`,$.sources.USER):!e&&t===`right`&&this.quill.format(`align`,!1,$.sources.USER),this.quill.format(`direction`,e,$.sources.USER)},indent(e){let t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if(e===`+1`||e===`-1`){let t=e===`+1`?1:-1;n.direction===`rtl`&&(t*=-1),this.quill.format(`indent`,r+t,$.sources.USER)}},link(e){e===!0&&(e=prompt(`Enter link URL:`)),this.quill.format(`link`,e,$.sources.USER)},list(e){let t=this.quill.getSelection(),n=this.quill.getFormat(t);e===`check`?n.list===`checked`||n.list===`unchecked`?this.quill.format(`list`,!1,$.sources.USER):this.quill.fo Line truncated
@@ -1,4 +1,4 @@
import{n as e,r as t,t as n}from"./index-DChzoIDA.js";function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}function a(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=e(((e,t)=>{var n=function(e){return e&&e.Math===Math&&e};t.exports=n(typeof globalThis==`object`&&globalThis)||n(typeof window==`object`&&window)||n(typeof self==`object`&&self)||n(typeof global==`object`&&global)||n(typeof e==`object`&&e)||(function(){return this})()||Function(`return this`)()})),s=e(((e,t)=>{t.exports=function(e){try{return!!e()}catch{return!0}}})),c=e(((e,t)=>{t.exports=!s()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})})),l=e(((e,t)=>{t.exports=!s()(function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})})),u=e(((e,t)=>{var n=l(),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}})),d=e((e=>{var t={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor;e.f=n&&!t.call({1:2},1)?function(e){var t=n(this,e);return!!t&&t.enumerable}:t})),f=e(((e,t)=>{t.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}})),p=e(((e,t)=>{var n=l(),r=Function.prototype,i=r.call,a=n&&r.bind.bind(i,i);t.exports=n?a:function(e){return function(){return i.apply(e,arguments)}}})),m=e(((e,t)=>{var n=p(),r=n({}.toString),i=n(``.slice);t.exports=function(e){return i(r(e),8,-1)}})),h=e(((e,t)=>{var n=p(),r=s(),i=m(),a=Object,o=n(``.split);t.exports=r(function(){return!a(`z`).propertyIsEnumerable(0)})?function(e){return i(e)===`String`?o(e,``):a(e)}:a})),g=e(((e,t)=>{t.exports=function(e){return e==null}})),_=e(((e,t)=>{var n=g(),r=TypeError;t.exports=function(e){if(n(e))throw new r(`Can't call method on `+e);return e}})),v=e(((e,t)=>{var n=h(),r=_();t.exports=function(e){return n(r(e))}})),y=e(((e,t)=>{var n=typeof document==`object`&&document.all;t.exports=n===void 0&&n!==void 0?function(e){return typeof e==`function`||e===n}:function(e){return typeof e==`function`}})),b=e(((e,t)=>{var n=y();t.exports=function(e){return typeof e==`object`?e!==null:n(e)}})),x=e(((e,t)=>{var n=o(),r=y(),i=function(e){return r(e)?e:void 0};t.exports=function(e,t){return arguments.length<2?i(n[e]):n[e]&&n[e][t]}})),S=e(((e,t)=>{t.exports=p()({}.isPrototypeOf)})),C=e(((e,t)=>{var n=o().navigator,r=n&&n.userAgent;t.exports=r?String(r):``})),w=e(((e,t)=>{var n=o(),r=C(),i=n.process,a=n.Deno,s=i&&i.versions||a&&a.version,c=s&&s.v8,l,u;c&&(l=c.split(`.`),u=l[0]>0&&l[0]<4?1:+(l[0]+l[1])),!u&&r&&(l=r.match(/Edge\/(\d+)/),(!l||l[1]>=74)&&(l=r.match(/Chrome\/(\d+)/),l&&(u=+l[1]))),t.exports=u})),T=e(((e,t)=>{var n=w(),r=s(),i=o().String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol(`symbol detection`);return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})})),E=e(((e,t)=>{t.exports=T()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`})),D=e(((e,t)=>{var n=x(),r=y(),i=S(),a=E(),o=Object;t.exports=a?function(e){return typeof e==`symbol`}:function(e){var t=n(`Symbol`);return r(t)&&i(t.prototype,o(e))}})),O=e(((e,t)=>{var n=String;t.exports=function(e){try{return n(e)}catch{return`Object`}}})),k=e(((e,t)=>{var n=y(),r=O(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a function`)}})),A=e(((e,t)=>{var n=k(),r=g();t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}})),j=e(((e,t)=>{var n=u(),r=y(),i=b(),a=TypeError;t.exports=function(e,t){var o,s;if(t===`string`&&r(o=e.toString)&&!i(s=n(o,e))||r(o=e.valueOf)&&!i(s=n(o,e))||t!==`string`&&r(o=e.toString)&&!i(s=n(o,e)))return s;throw new a(`Can't convert object to primitive value`)}})),M=e(((e,t)=>{t.exports=!1})),N=e(((e,t)=>{var n=o(),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch{n[e]=t}return t}})),P=e(((e,t)=>{var n=M(),r=o(),i=N(),a=`__core-js_shared__`,s=t.exports=r[a]||i(a,{});(s.versions||=[]).push({version:`3.49.0`,mode:n?`pure`:`global`,copyright:`© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.`,license:`https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE`,source:`https://github.com/zloirock/core-js`})})),F=e(((e,t)=>{var n=P();t.exports=function(e,t){return n[e]||(n[e]=t||{})}})),I=e(((e,t)=>{var n=_(),r=Object;t.exports=function(e){return r(n(e))}})),L=e(((e,t)=>{var n=p(),r=I(),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return i(r(e),t)}})),R=e(((e,t)=>{var n=p(),r=0,i=Math.random(),a=n(1.1.toString);t.exports=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+a(++r+i,36)}})),z=e(((e,t)=>{var n=o(),r=F(),i=L(),a=R(),s=T(),c=E(),l=n.Symbol,u=r(Line truncated
import{n as e,r as t,t as n}from"./index-UWqs1Nt4.js";function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}function a(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=e(((e,t)=>{var n=function(e){return e&&e.Math===Math&&e};t.exports=n(typeof globalThis==`object`&&globalThis)||n(typeof window==`object`&&window)||n(typeof self==`object`&&self)||n(typeof global==`object`&&global)||n(typeof e==`object`&&e)||(function(){return this})()||Function(`return this`)()})),s=e(((e,t)=>{t.exports=function(e){try{return!!e()}catch{return!0}}})),c=e(((e,t)=>{t.exports=!s()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})})),l=e(((e,t)=>{t.exports=!s()(function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})})),u=e(((e,t)=>{var n=l(),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}})),d=e((e=>{var t={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor;e.f=n&&!t.call({1:2},1)?function(e){var t=n(this,e);return!!t&&t.enumerable}:t})),f=e(((e,t)=>{t.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}})),p=e(((e,t)=>{var n=l(),r=Function.prototype,i=r.call,a=n&&r.bind.bind(i,i);t.exports=n?a:function(e){return function(){return i.apply(e,arguments)}}})),m=e(((e,t)=>{var n=p(),r=n({}.toString),i=n(``.slice);t.exports=function(e){return i(r(e),8,-1)}})),h=e(((e,t)=>{var n=p(),r=s(),i=m(),a=Object,o=n(``.split);t.exports=r(function(){return!a(`z`).propertyIsEnumerable(0)})?function(e){return i(e)===`String`?o(e,``):a(e)}:a})),g=e(((e,t)=>{t.exports=function(e){return e==null}})),_=e(((e,t)=>{var n=g(),r=TypeError;t.exports=function(e){if(n(e))throw new r(`Can't call method on `+e);return e}})),v=e(((e,t)=>{var n=h(),r=_();t.exports=function(e){return n(r(e))}})),y=e(((e,t)=>{var n=typeof document==`object`&&document.all;t.exports=n===void 0&&n!==void 0?function(e){return typeof e==`function`||e===n}:function(e){return typeof e==`function`}})),b=e(((e,t)=>{var n=y();t.exports=function(e){return typeof e==`object`?e!==null:n(e)}})),x=e(((e,t)=>{var n=o(),r=y(),i=function(e){return r(e)?e:void 0};t.exports=function(e,t){return arguments.length<2?i(n[e]):n[e]&&n[e][t]}})),S=e(((e,t)=>{t.exports=p()({}.isPrototypeOf)})),C=e(((e,t)=>{var n=o().navigator,r=n&&n.userAgent;t.exports=r?String(r):``})),w=e(((e,t)=>{var n=o(),r=C(),i=n.process,a=n.Deno,s=i&&i.versions||a&&a.version,c=s&&s.v8,l,u;c&&(l=c.split(`.`),u=l[0]>0&&l[0]<4?1:+(l[0]+l[1])),!u&&r&&(l=r.match(/Edge\/(\d+)/),(!l||l[1]>=74)&&(l=r.match(/Chrome\/(\d+)/),l&&(u=+l[1]))),t.exports=u})),T=e(((e,t)=>{var n=w(),r=s(),i=o().String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol(`symbol detection`);return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})})),E=e(((e,t)=>{t.exports=T()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`})),D=e(((e,t)=>{var n=x(),r=y(),i=S(),a=E(),o=Object;t.exports=a?function(e){return typeof e==`symbol`}:function(e){var t=n(`Symbol`);return r(t)&&i(t.prototype,o(e))}})),O=e(((e,t)=>{var n=String;t.exports=function(e){try{return n(e)}catch{return`Object`}}})),k=e(((e,t)=>{var n=y(),r=O(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a function`)}})),A=e(((e,t)=>{var n=k(),r=g();t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}})),j=e(((e,t)=>{var n=u(),r=y(),i=b(),a=TypeError;t.exports=function(e,t){var o,s;if(t===`string`&&r(o=e.toString)&&!i(s=n(o,e))||r(o=e.valueOf)&&!i(s=n(o,e))||t!==`string`&&r(o=e.toString)&&!i(s=n(o,e)))return s;throw new a(`Can't convert object to primitive value`)}})),M=e(((e,t)=>{t.exports=!1})),N=e(((e,t)=>{var n=o(),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch{n[e]=t}return t}})),P=e(((e,t)=>{var n=M(),r=o(),i=N(),a=`__core-js_shared__`,s=t.exports=r[a]||i(a,{});(s.versions||=[]).push({version:`3.49.0`,mode:n?`pure`:`global`,copyright:`© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.`,license:`https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE`,source:`https://github.com/zloirock/core-js`})})),F=e(((e,t)=>{var n=P();t.exports=function(e,t){return n[e]||(n[e]=t||{})}})),I=e(((e,t)=>{var n=_(),r=Object;t.exports=function(e){return r(n(e))}})),L=e(((e,t)=>{var n=p(),r=I(),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return i(r(e),t)}})),R=e(((e,t)=>{var n=p(),r=0,i=Math.random(),a=n(1.1.toString);t.exports=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+a(++r+i,36)}})),z=e(((e,t)=>{var n=o(),r=F(),i=L(),a=R(),s=T(),c=E(),l=n.Symbol,u=r(Line truncated
`)&&e.flags===`s`)})})),At=e(((e,t)=>{var n=s(),r=o().RegExp;t.exports=n(function(){var e=r(`(?<a>b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$<a>c`)!==`bc`})})),jt=e(((e,t)=>{var n=u(),r=p(),i=Ct(),a=wt(),o=Tt(),s=F(),c=Ot(),l=fe().get,d=kt(),f=At(),m=s(`native-string-replace`,String.prototype.replace),h=RegExp.prototype.exec,g=h,_=r(``.charAt),v=r(``.indexOf),y=r(``.replace),b=r(``.slice),x=(function(){var e=/a/,t=/b*/g;return n(h,e,`a`),n(h,t,`a`),e.lastIndex!==0||t.lastIndex!==0})(),S=o.BROKEN_CARET,C=/()??/.exec(``)[1]!==void 0,w=x||C||S||d||f,T=function(e,t){for(var n=e.groups=c(null),r=0;r<t.length;r++){var i=t[r];n[i[0]]=e[i[1]]}};w&&(g=function(e){var t=this,r=l(t),o=i(e),s=r.raw,c,u,d;if(s)return s.lastIndex=t.lastIndex,c=n(g,s,o),t.lastIndex=s.lastIndex,c&&r.groups&&T(c,r.groups),c;var f=r.groups,p=S&&t.sticky,w=n(a,t),E=t.source,D=0,O=o;if(p){w=y(w,`y`,``),v(w,`g`)===-1&&(w+=`g`),O=b(o,t.lastIndex);var k=t.lastIndex>0&&_(o,t.lastIndex-1);t.lastIndex>0&&(!t.multiline||t.multiline&&k!==`
`&&k!==`\r`&&k!==`\u2028`&&k!==`\u2029`)&&(E=`(?: (?:`+E+`))`,O=` `+O,D++),u=RegExp(`^(?:`+E+`)`,w)}C&&(u=RegExp(`^`+E+`$(?!\\s)`,w)),x&&(d=t.lastIndex);var A=n(h,p?u:t,O);return p?A?(A.input=o,A[0]=b(A[0],D),A.index=t.lastIndex,t.lastIndex+=A[0].length):t.lastIndex=0:x&&A&&(t.lastIndex=t.global?A.index+A[0].length:d),C&&A&&A.length>1&&n(m,A[0],u,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===void 0&&(A[e]=void 0)}),A&&f&&T(A,f),A}),t.exports=g})),Mt=e((()=>{var e=U(),t=jt();e({target:`RegExp`,proto:!0,forced:/./.exec!==t},{exec:t})})),Nt=e(((e,t)=>{Mt();var n=u(),r=me(),i=jt(),a=s(),o=z(),c=oe(),l=o(`species`),d=RegExp.prototype;t.exports=function(e,t,s,u){var f=o(e),p=!a(function(){var t={};return t[f]=function(){return 7},``[e](t)!==7}),m=p&&!a(function(){var t=!1,n=/a/;if(e===`split`){var r={};r[l]=function(){return n},n={constructor:r,flags:``},n[f]=/./[f]}return n.exec=function(){return t=!0,null},n[f](``),!t});if(!p||!m||s){var h=/./[f],g=t(f,``[e],function(e,t,r,a,o){var s=t.exec;return s===i||s===d.exec?p&&!o?{done:!0,value:n(h,t,r,a)}:{done:!0,value:n(e,r,t,a)}:{done:!1}});r(String.prototype,e,g[0]),r(d,f,g[1])}u&&c(d[f],`sham`,!0)}})),Pt=e(((e,t)=>{var n=p(),r=ge(),i=Ct(),a=_(),o=n(``.charAt),s=n(``.charCodeAt),c=n(``.slice),l=function(e){return function(t,n){var l=i(a(t)),u=r(n),d=l.length,f,p;return u<0||u>=d?e?``:void 0:(f=s(l,u),f<55296||f>56319||u+1===d||(p=s(l,u+1))<56320||p>57343?e?o(l,u):f:e?c(l,u,u+2):(f-55296<<10)+(p-56320)+65536)}};t.exports={codeAt:l(!1),charAt:l(!0)}})),Ft=e(((e,t)=>{var n=Pt().charAt;t.exports=function(e,t,r){return t+(r&&n(e,t).length||1)}})),It=e(((e,t)=>{var n=o(),r=s(),i=n.RegExp;t.exports={correct:!r(function(){var e=!0;try{i(`.`,`d`)}catch{e=!1}var t={},n=``,r=e?`dgimsy`:`gimsy`,a=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},o={dotAll:`s`,global:`g`,ignoreCase:`i`,multiline:`m`,sticky:`y`};for(var s in e&&(o.hasIndices=`d`),o)a(s,o[s]);return Object.getOwnPropertyDescriptor(i.prototype,`flags`).get.call(t)!==r||n!==r})}})),Lt=e(((e,t)=>{var n=u(),r=L(),i=S(),a=It(),o=wt(),s=RegExp.prototype;t.exports=a.correct?function(e){return e.flags}:function(e){return!a.correct&&i(s,e)&&!r(e,`flags`)?n(o,e):e.flags}})),Rt=e(((e,t)=>{var n=u(),r=B(),i=y(),a=m(),o=jt(),s=TypeError;t.exports=function(e,t){var c=e.exec;if(i(c)){var l=n(c,e,t);return l!==null&&r(l),l}if(a(e)===`RegExp`)return n(o,e,t);throw new s(`RegExp#exec called on incompatible receiver`)}})),zt=e((()=>{var e=u(),t=p(),n=Nt(),r=B(),i=b(),a=H(),o=Ct(),s=_(),c=A(),l=Ft(),d=Lt(),f=Rt(),m=t(``.indexOf);n(`match`,function(t,n,u){return[function(n){var r=s(this),a=i(n)?c(n,t):void 0;return a?e(a,n,r):new RegExp(n)[t](o(r))},function(e){var t=r(this),i=o(e),s=u(n,t,i);if(s.done)return s.value;var c=o(d(t));if(!~m(c,`g`))return f(t,i);var p=!!~m(c,`u`)||!!~m(c,`v`);t.lastIndex=0;for(var h=[],g=0,_;(_=f(t,i))!==null;){var v=o(_[0]);h[g]=v,v===``&&(t.lastIndex=l(i,a(t.lastIndex),p)),g++}return g===0?null:h}]})})),Bt=e(((e,t)=>{var n=p(),r=I(),i=Math.floor,a=n(``.charAt),o=n(``.replace),s=n(``.slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(e,t,n,u,d,f){var p=n+e.length,m=u.length,h=l;return d!==void 0&&(d=r(d),h=c),o(f,h,function(r,o){var c;switch(a(o,0)){case`$`:return`$`;case`&`:return e;case"`":return s(t,0,n);case`'`:return s(t,p);case`<`:c=d[s(o,1,-1)];break;default:var l=+o;if(l===0)return r;if(l>m){var f=i(l/10);return f===0?r:f<=m?u[f-1]===void 0?a(o,1):u[f-1]+a(o,1):r}c=u[l-1]}return c===void 0?``:c})}})),Vt=e((()=>{var e=He(),t=u(),n=p(),r=Nt(),i=s(),a=B(),o=y(),c=b(),l=ge(),d=H(),f=Ct(),m=_(),h=Ft(),g=A(),v=Bt(),x=Lt(),S=Rt(),C=z()(`replace`),w=Math.max,T=Math.min,E=n([].concat),D=n([].push),O=n(``.indexOf),k=n(``.slice),j=function(e){return e===void 0?e:String(e)},M=(function(){return`a`.replace(/./,`$0`)===`$0`})(),N=(function(){return/./[C]?/./[C](`a`,`$0`)===``:!1})();r(`replace`,function(n,r,i){var s=N?`$`:`$0`;return[function(e,n){var i=m(this),a=c(e)?g(e,C):void 0;return a?t(a,e,i,n):t(r,f(i),e,n)},function(t,n){var c=a(this),u=f(t),p=o(n);p||(n=f(n));var m=f(x(c));if(typeof n==`string`&&!~O(n,s)&&!~O(n,`$<`)&&!~O(m,`y`)){var g=i(r,c,u,n);if(g.done)return g.value}var _=!!~O(m,`g`),y;_&&(y=!!~O(m,`u`)||!!~O(m,`v`),c.lastIndex=0);for(var b=[],C;C=S(c,u),!(C===null||(D(b,C),!_));)f(C[0])===``&&(c.lastIndex=h(u,d(c.lastIndex),y));for(var A=``,M=0,N=0;N<b.length;N++){C=b[N];for(var P=f(C[0]),F=w(T(l(C.index),u.length),0),I=[],L,R=1;R<C.length;R++)D(I,j(C[R]));var z=C.groups;if(p){var ee=E([P],I,F,u);z!==void 0&&D(ee,z),L=f(e(n,void 0,ee))}else L=v(P,u,F,I,z,n);F>=M&&(A+=k(u,M,F)+L,M=F+P.length)}return A+k(u,M)}]},!!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:`7`},e},``.replace(e,`$<a>`)!==`7`})||!M||N)})),Ht=e(((e,t)=>{var n=b(),r=m(),i=z()(`match`);t.exports=function(e){var t;return n(e)&&((t=e[i])===void 0?r(e)===`RegExp`:!!t)}})),Ut=e(((e,t)=>{var n=Ht(),r=TypeError;t.exports=function(e){iLine truncated
\v\f\r \xA0               \u2028\u2029`})),fn=e(((e,t)=>{var n=p(),r=_(),i=Ct(),a=dn(),o=n(``.replace),s=RegExp(`^[`+a+`]+`),c=RegExp(`(^|[^`+a+`])[`+a+`]+$`),l=function(e){return function(t){var n=i(r(t));return e&1&&(n=o(n,s,``)),e&2&&(n=o(n,c,`$1`)),n}};t.exports={start:l(1),end:l(2),trim:l(3)}})),pn=e(((e,t)=>{var n=se().PROPER,r=s(),i=dn(),a=`​…᠎`;t.exports=function(e){return r(function(){return!!i[e]()||a[e]()!==a||n&&i[e].name!==e})}})),mn=e((()=>{var e=U(),t=fn().trim;e({target:`String`,proto:!0,forced:pn()(`trim`)},{trim:function(){return t(this)}})})),hn=e(((e,t)=>{t.exports=function(e){this.ok=!1,this.alpha=1,e.charAt(0)==`#`&&(e=e.substr(1,6)),e=e.replace(/ /g,``),e=e.toLowerCase();var t={aliceblue:`f0f8ff`,antiquewhite:`faebd7`,aqua:`00ffff`,aquamarine:`7fffd4`,azure:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`000000`,blanchedalmond:`ffebcd`,blue:`0000ff`,blueviolet:`8a2be2`,brown:`a52a2a`,burlywood:`deb887`,cadetblue:`5f9ea0`,chartreuse:`7fff00`,chocolate:`d2691e`,coral:`ff7f50`,cornflowerblue:`6495ed`,cornsilk:`fff8dc`,crimson:`dc143c`,cyan:`00ffff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgoldenrod:`b8860b`,darkgray:`a9a9a9`,darkgreen:`006400`,darkkhaki:`bdb76b`,darkmagenta:`8b008b`,darkolivegreen:`556b2f`,darkorange:`ff8c00`,darkorchid:`9932cc`,darkred:`8b0000`,darksalmon:`e9967a`,darkseagreen:`8fbc8f`,darkslateblue:`483d8b`,darkslategray:`2f4f4f`,darkturquoise:`00ced1`,darkviolet:`9400d3`,deeppink:`ff1493`,deepskyblue:`00bfff`,dimgray:`696969`,dodgerblue:`1e90ff`,feldspar:`d19275`,firebrick:`b22222`,floralwhite:`fffaf0`,forestgreen:`228b22`,fuchsia:`ff00ff`,gainsboro:`dcdcdc`,ghostwhite:`f8f8ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,green:`008000`,greenyellow:`adff2f`,honeydew:`f0fff0`,hotpink:`ff69b4`,indianred:`cd5c5c`,indigo:`4b0082`,ivory:`fffff0`,khaki:`f0e68c`,lavender:`e6e6fa`,lavenderblush:`fff0f5`,lawngreen:`7cfc00`,lemonchiffon:`fffacd`,lightblue:`add8e6`,lightcoral:`f08080`,lightcyan:`e0ffff`,lightgoldenrodyellow:`fafad2`,lightgrey:`d3d3d3`,lightgreen:`90ee90`,lightpink:`ffb6c1`,lightsalmon:`ffa07a`,lightseagreen:`20b2aa`,lightskyblue:`87cefa`,lightslateblue:`8470ff`,lightslategray:`778899`,lightsteelblue:`b0c4de`,lightyellow:`ffffe0`,lime:`00ff00`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`ff00ff`,maroon:`800000`,mediumaquamarine:`66cdaa`,mediumblue:`0000cd`,mediumorchid:`ba55d3`,mediumpurple:`9370d8`,mediumseagreen:`3cb371`,mediumslateblue:`7b68ee`,mediumspringgreen:`00fa9a`,mediumturquoise:`48d1cc`,mediumvioletred:`c71585`,midnightblue:`191970`,mintcream:`f5fffa`,mistyrose:`ffe4e1`,moccasin:`ffe4b5`,navajowhite:`ffdead`,navy:`000080`,oldlace:`fdf5e6`,olive:`808000`,olivedrab:`6b8e23`,orange:`ffa500`,orangered:`ff4500`,orchid:`da70d6`,palegoldenrod:`eee8aa`,palegreen:`98fb98`,paleturquoise:`afeeee`,palevioletred:`d87093`,papayawhip:`ffefd5`,peachpuff:`ffdab9`,peru:`cd853f`,pink:`ffc0cb`,plum:`dda0dd`,powderblue:`b0e0e6`,purple:`800080`,rebeccapurple:`663399`,red:`ff0000`,rosybrown:`bc8f8f`,royalblue:`4169e1`,saddlebrown:`8b4513`,salmon:`fa8072`,sandybrown:`f4a460`,seagreen:`2e8b57`,seashell:`fff5ee`,sienna:`a0522d`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,snow:`fffafa`,springgreen:`00ff7f`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,thistle:`d8bfd8`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,violetred:`d02090`,wheat:`f5deb3`,white:`ffffff`,whitesmoke:`f5f5f5`,yellow:`ffff00`,yellowgreen:`9acd32`};e=t[e]||e;for(var n=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:[`rgba(123, 234, 45, 0.8)`,`rgba(255,234,245,1.0)`],process:function(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3]),parseFloat(e[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:[`rgb(123, 234, 45)`,`rgb(255,234,245)`],process:function(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:[`#00ff00`,`336699`],process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:[`#fb0`,`f0f`],process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],r=0;r<n.length;r++){var i=n[r].re,a=n[r].process,o=i.exec(e);if(o){var s=a(o);this.r=s[0],this.g=s[1],this.b=s[2],s.length>3&&(this.alpha=s[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return`rgb(`+this.r+`, `+this.g+`, `+this.b+`)`},this.toRGBA=function(){return`rgba(`+this.r+`, `+this.g+`, `+this.b+`, `+this.alpha+`)`},this.toHex=function(){var e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return e.length==1&&(e=`0`+e),t.length==1&&(t=`0`+t),n.length==1&&(n=`0`+n),`#`+e+t+n},this.getHelpXML=functi Line truncated
+2 -2
View File
@@ -5,8 +5,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<title>Travel Planner</title>
<script type="module" crossorigin src="/assets/index-DChzoIDA.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CHBet_N8.css">
<script type="module" crossorigin src="/assets/index-UWqs1Nt4.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-I6bJ9cOX.css">
</head>
<body>
<div id="root"></div>
+61 -12
View File
@@ -61,6 +61,7 @@ export const PublicPhotoModal: React.FC<PublicPhotoModalProps> = ({
const [isSavingEdit, setIsSavingEdit] = useState(false);
const [isMapOpen, setIsMapOpen] = useState(false);
const [resolvedAddress, setResolvedAddress] = useState<string>('');
const [isFullscreen, setIsFullscreen] = useState(false);
useEffect(() => {
const lat = photo?.metadata?.lat;
@@ -89,7 +90,7 @@ export const PublicPhotoModal: React.FC<PublicPhotoModalProps> = ({
}, [photo?.id, photo?.metadata?.lat, photo?.metadata?.lng]);
const checkCurrentUser = () => {
const userStr = localStorage.getItem('user');
const userStr = localStorage.getItem('user') || localStorage.getItem('guest_user');
if (userStr) {
try {
setCurrentUser(JSON.parse(userStr));
@@ -125,7 +126,7 @@ export const PublicPhotoModal: React.FC<PublicPhotoModalProps> = ({
setIsSavingEdit(true);
try {
const token = localStorage.getItem('token');
const token = localStorage.getItem('token') || localStorage.getItem('guest_token');
const res = await fetch(`/api/v1/photos/${photo.id}`, {
method: 'PATCH',
headers: {
@@ -165,7 +166,7 @@ export const PublicPhotoModal: React.FC<PublicPhotoModalProps> = ({
const likeCount = likedUserIds.length;
const handleToggleLike = async () => {
let token = localStorage.getItem('token');
let token = localStorage.getItem('token') || localStorage.getItem('guest_token');
let userObj = currentUser;
if (!token) {
@@ -362,18 +363,18 @@ export const PublicPhotoModal: React.FC<PublicPhotoModalProps> = ({
/>
{/* Container */}
<div className="relative w-full max-w-5xl h-[85vh] bg-slate-900 border border-slate-800 rounded-[32px] shadow-2xl overflow-hidden flex flex-col md:flex-row animate-in zoom-in-95 duration-300 text-slate-100">
<div className="relative w-full max-w-5xl h-[90vh] md:h-[85vh] bg-slate-900 border border-slate-800 rounded-[32px] shadow-2xl overflow-y-auto md:overflow-hidden flex flex-col md:flex-row animate-in zoom-in-95 duration-300 text-slate-100">
{/* Close Button Mobile/Desktop */}
<button
onClick={onClose}
className="absolute top-4 right-4 z-50 p-2 bg-slate-950/60 hover:bg-slate-800/80 border border-slate-700/50 rounded-full text-slate-300 hover:text-white transition-colors"
className="fixed md:absolute top-6 right-6 md:top-4 md:right-4 z-50 p-2 bg-slate-950/60 hover:bg-slate-800/80 border border-slate-700/50 rounded-full text-slate-300 hover:text-white transition-colors"
>
<X className="w-5 h-5" />
</button>
{/* Left Side: Photo Detail */}
<div className="relative w-full md:w-3/5 h-2/5 md:h-full bg-slate-950 flex items-center justify-center overflow-hidden group">
<div className="relative w-full md:w-3/5 h-[45vh] md:h-full bg-slate-950 flex items-center justify-center overflow-hidden group shrink-0">
{/* Like Button Overlay */}
<button
onClick={handleToggleLike}
@@ -389,10 +390,11 @@ export const PublicPhotoModal: React.FC<PublicPhotoModalProps> = ({
<img
src={photo.imageUrl}
alt="Public Map Upload"
className="w-full h-full object-contain"
className="w-full h-full object-contain cursor-zoom-in"
onClick={() => setIsFullscreen(true)}
/>
{/* Info & Timeline overlay inside photo panel */}
<div className="absolute bottom-0 left-0 right-0 p-6 bg-gradient-to-t from-slate-950 via-slate-950/90 to-transparent flex flex-col gap-4">
<div className="absolute bottom-0 left-0 right-0 p-6 bg-gradient-to-t from-black/60 via-black/20 to-transparent flex flex-col gap-4">
{/* Timeline scroll */}
{photoGroup && photoGroup.length > 1 && (
@@ -559,18 +561,18 @@ export const PublicPhotoModal: React.FC<PublicPhotoModalProps> = ({
<MapPin className="w-3.5 h-3.5 text-rose-500" />
Địa điểm: {resolvedAddress}
</div>
<div className="flex items-center gap-1.5 font-semibold text-emerald-400">
<div className="hidden md:flex items-center gap-1.5 font-semibold text-emerald-400">
<User className="w-3.5 h-3.5" />
Người đăng: {photo.uploader?.name || 'Ẩn danh'}
</div>
</div>
{photo.originalUrl && (
{isAuthorized && photo.originalUrl && (
<a
href={photo.originalUrl}
download
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-1.5 bg-slate-800/80 hover:bg-slate-700/80 border border-slate-700/50 text-slate-200 hover:text-white font-bold py-1 px-3 rounded-full transition-all active:scale-95 text-[10px]"
className="hidden md:flex items-center gap-1.5 bg-slate-800/80 hover:bg-slate-700/80 border border-slate-700/50 text-slate-200 hover:text-white font-bold py-1 px-3 rounded-full transition-all active:scale-95 text-[10px]"
>
<Download className="w-3.5 h-3.5 text-emerald-500" />
Tải ảnh gốc
@@ -592,8 +594,36 @@ export const PublicPhotoModal: React.FC<PublicPhotoModalProps> = ({
</div>
</div>
{/* Mobile Only: Uploader details & divider */}
<div className="block md:hidden p-6 bg-slate-900 border-t border-slate-800/60 space-y-4 shrink-0">
<div className="flex items-center justify-between gap-4">
<div className="flex items-center gap-2.5 text-left">
<div className="p-2.5 bg-emerald-500/10 rounded-xl text-emerald-400">
<User className="w-5 h-5" />
</div>
<div>
<span className="text-[10px] text-slate-450 block uppercase font-bold tracking-wider">Người đăng ảnh</span>
<span className="text-sm font-semibold text-white">{photo.uploader?.name || 'Ẩn danh'}</span>
</div>
</div>
{isAuthorized && photo.originalUrl && (
<a
href={photo.originalUrl}
download
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-1.5 bg-slate-850 hover:bg-slate-800 border border-slate-700 text-slate-200 hover:text-white font-bold py-2 px-4 rounded-xl transition-all text-xs"
>
<Download className="w-4 h-4 text-emerald-500" />
Tải ảnh gốc
</a>
)}
</div>
<div className="border-t border-slate-800/60 pt-2" />
</div>
{/* Right Side: Comments */}
<div className="w-full md:w-2/5 h-3/5 md:h-full flex flex-col bg-slate-900 border-t md:border-t-0 md:border-l border-slate-800">
<div className="w-full md:w-2/5 h-auto md:h-full flex flex-col bg-slate-900 border-t md:border-t-0 md:border-l border-slate-800">
{/* Comments Header */}
<div className="p-6 border-b border-slate-800 flex items-center justify-between">
@@ -685,6 +715,25 @@ export const PublicPhotoModal: React.FC<PublicPhotoModalProps> = ({
setEditLng(lng);
}}
/>
{isFullscreen && (
<div
className="fixed inset-0 z-[9999] bg-black/95 flex items-center justify-center cursor-zoom-out animate-in fade-in duration-200"
onClick={() => setIsFullscreen(false)}
>
<button
onClick={() => setIsFullscreen(false)}
className="fixed top-6 right-6 p-3 bg-black/50 hover:bg-black/75 border border-white/10 rounded-full text-white transition-colors z-[10000]"
>
<X className="w-6 h-6" />
</button>
<img
src={photo.imageUrl}
alt="Fullscreen photo"
className="max-w-full max-h-full object-contain select-none animate-in zoom-in-95 duration-200"
/>
</div>
)}
</div>
);
};
+29 -8
View File
@@ -1,4 +1,4 @@
import React, { useEffect, useState, useMemo } from 'react';
import { useEffect, useState, useMemo } from 'react';
import { ChevronLeft, Image as ImageIcon, Download, Calendar, MapPin, Loader2, Filter, X, Trash2, Edit, Heart } from 'lucide-react';
import { useNotification } from '@/hooks/useNotification';
import { useConfirm } from '@/hooks/useConfirm';
@@ -22,6 +22,7 @@ export const MyPhotosPage = ({ onBack }: { onBack: () => void }) => {
const [isSavingEdit, setIsSavingEdit] = useState(false);
const [isMapOpen, setIsMapOpen] = useState(false);
const [resolvedAddress, setResolvedAddress] = useState<string>('');
const [isFullscreen, setIsFullscreen] = useState(false);
useEffect(() => {
const lat = selectedPhotoForDisplay?.metadata?.lat;
@@ -75,7 +76,7 @@ export const MyPhotosPage = ({ onBack }: { onBack: () => void }) => {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${localStorage.getItem('token')}`
'Authorization': `Bearer ${localStorage.getItem('token') || localStorage.getItem('guest_token')}`
},
body: JSON.stringify({
title: editTitle,
@@ -103,7 +104,7 @@ export const MyPhotosPage = ({ onBack }: { onBack: () => void }) => {
};
const currentUser = useMemo(() => {
const userStr = localStorage.getItem('user');
const userStr = localStorage.getItem('user') || localStorage.getItem('guest_user');
if (!userStr) return null;
try {
return JSON.parse(userStr);
@@ -120,7 +121,7 @@ export const MyPhotosPage = ({ onBack }: { onBack: () => void }) => {
const handleToggleLike = async () => {
if (!selectedPhotoForDisplay) return;
const token = localStorage.getItem('token');
const token = localStorage.getItem('token') || localStorage.getItem('guest_token');
if (!token) return;
try {
@@ -146,7 +147,7 @@ export const MyPhotosPage = ({ onBack }: { onBack: () => void }) => {
try {
const response = await fetch('/api/v1/users/me/photos', {
headers: {
'Authorization': `Bearer ${localStorage.getItem('token')}`
'Authorization': `Bearer ${localStorage.getItem('token') || localStorage.getItem('guest_token')}`
}
});
if (!response.ok) throw new Error('Failed to fetch photos');
@@ -217,7 +218,7 @@ export const MyPhotosPage = ({ onBack }: { onBack: () => void }) => {
const response = await fetch(`/api/v1/photos/${photoId}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${localStorage.getItem('token')}`
'Authorization': `Bearer ${localStorage.getItem('token') || localStorage.getItem('guest_token')}`
}
});
@@ -347,7 +348,8 @@ export const MyPhotosPage = ({ onBack }: { onBack: () => void }) => {
<img
src={selectedPhotoForDisplay.imageUrl || selectedPhotoForDisplay.originalUrl}
alt="Selected Photo"
className="max-w-full max-h-[calc(100vh-350px)] object-contain"
className="max-w-full max-h-[calc(100vh-350px)] object-contain cursor-zoom-in"
onClick={() => setIsFullscreen(true)}
/>
{/* Overlays (Only show when not editing) */}
@@ -378,7 +380,7 @@ export const MyPhotosPage = ({ onBack }: { onBack: () => void }) => {
</button>
{/* Bottom metadata details gradient panel overlay */}
<div className="absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/95 via-black/50 to-transparent p-6 text-white flex flex-col gap-2">
<div className="absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent p-6 text-white flex flex-col gap-2 text-left">
<div className="flex justify-between items-start gap-4">
<div className="flex-1 min-w-0">
{selectedPhotoForDisplay.metadata?.title ? (
@@ -584,6 +586,25 @@ export const MyPhotosPage = ({ onBack }: { onBack: () => void }) => {
setEditLng(lng);
}}
/>
{isFullscreen && selectedPhotoForDisplay && (
<div
className="fixed inset-0 z-[9999] bg-black/95 flex items-center justify-center cursor-zoom-out animate-in fade-in duration-200"
onClick={() => setIsFullscreen(false)}
>
<button
onClick={() => setIsFullscreen(false)}
className="fixed top-6 right-6 p-3 bg-black/50 hover:bg-black/75 border border-white/10 rounded-full text-white transition-colors z-[10000]"
>
<X className="w-6 h-6" />
</button>
<img
src={selectedPhotoForDisplay.imageUrl || selectedPhotoForDisplay.originalUrl}
alt="Fullscreen photo"
className="max-w-full max-h-full object-contain select-none animate-in zoom-in-95 duration-200"
/>
</div>
)}
</div>
);
};
+31 -10
View File
@@ -504,7 +504,7 @@ export const TourDetailPage = ({
const [isMemberDetailOpen, setIsMemberDetailOpen] = useState(false);
const [selectedPhotoForDisplay, setSelectedPhotoForDisplay] = useState<any | null>(null); // New state for large photo display
const currentUserId = useMemo(() => {
const token = localStorage.getItem('token');
const token = localStorage.getItem('token') || localStorage.getItem('guest_token');
if (!token) return null;
try {
return JSON.parse(atob(token.split('.')[1])).sub;
@@ -514,7 +514,7 @@ export const TourDetailPage = ({
}, []);
const currentUser = useMemo(() => {
const userStr = localStorage.getItem('user');
const userStr = localStorage.getItem('user') || localStorage.getItem('guest_user');
if (!userStr) return null;
try {
return JSON.parse(userStr);
@@ -531,6 +531,7 @@ export const TourDetailPage = ({
const [isSavingPhotoEdit, setIsSavingPhotoEdit] = useState(false);
const [isMapOpen, setIsMapOpen] = useState(false);
const [resolvedAddress, setResolvedAddress] = useState<string>('');
const [isFullscreen, setIsFullscreen] = useState(false);
const likedUserIds = selectedPhotoForDisplay && selectedPhotoForDisplay.metadata && Array.isArray(selectedPhotoForDisplay.metadata.likedUserIds)
? selectedPhotoForDisplay.metadata.likedUserIds
@@ -544,7 +545,7 @@ export const TourDetailPage = ({
const response = await fetch(`/api/v1/photos/${selectedPhotoForDisplay.id}/toggle-like`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${localStorage.getItem('token')}`
'Authorization': `Bearer ${localStorage.getItem('token') || localStorage.getItem('guest_token')}`
}
});
if (response.ok) {
@@ -621,7 +622,7 @@ export const TourDetailPage = ({
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${localStorage.getItem('token')}`
'Authorization': `Bearer ${localStorage.getItem('token') || localStorage.getItem('guest_token')}`
},
body: JSON.stringify({
title: editPhotoTitle,
@@ -735,7 +736,7 @@ export const TourDetailPage = ({
const response = await fetch(`/api/v1/photos/${photoId}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${localStorage.getItem('token')}`
'Authorization': `Bearer ${localStorage.getItem('token') || localStorage.getItem('guest_token')}`
}
});
@@ -2057,7 +2058,8 @@ export const TourDetailPage = ({
<img
src={selectedPhotoForDisplay.imageUrl}
alt="Selected Tour Photo"
className="max-w-full max-h-[calc(100vh-350px)] object-contain"
className="max-w-full max-h-[calc(100vh-350px)] object-contain cursor-zoom-in"
onClick={() => setIsFullscreen(true)}
/>
{/* Overlays (Only show when not editing) */}
@@ -2076,7 +2078,7 @@ export const TourDetailPage = ({
</button>
{/* Delete button overlay (if owner) */}
{currentUserId === selectedPhotoForDisplay.uploaderId && !isPublicView && (
{currentUserId === selectedPhotoForDisplay.uploaderId && (
<button
onClick={(e) => {
e.stopPropagation();
@@ -2090,7 +2092,7 @@ export const TourDetailPage = ({
)}
{/* Bottom metadata details gradient panel overlay */}
<div className="absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/95 via-black/50 to-transparent p-6 text-white flex flex-col gap-2 text-left">
<div className="absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent p-6 text-white flex flex-col gap-2 text-left">
<div className="flex justify-between items-start gap-4">
<div className="flex-1 min-w-0">
{selectedPhotoForDisplay.metadata?.title ? (
@@ -2110,7 +2112,7 @@ export const TourDetailPage = ({
</div>
{/* Edit Button Overlay */}
{!isPublicView && (currentUser?.isAdmin || currentUserId === selectedPhotoForDisplay.uploaderId) && (
{((!isPublicView && currentUser?.isAdmin) || (currentUserId && currentUserId === selectedPhotoForDisplay.uploaderId)) && (
<button
onClick={() => setIsEditingPhoto(true)}
className="p-2 bg-white/10 hover:bg-white/20 border border-white/15 rounded-xl text-white hover:text-gray-200 transition-all shrink-0 backdrop-blur-sm"
@@ -2137,7 +2139,7 @@ export const TourDetailPage = ({
</div>
</div>
{selectedPhotoForDisplay.originalUrl && (
{(currentUser?.isAdmin || currentUserId === selectedPhotoForDisplay.uploaderId) && selectedPhotoForDisplay.originalUrl && (
<a
href={selectedPhotoForDisplay.originalUrl}
download
@@ -2744,6 +2746,25 @@ export const TourDetailPage = ({
setEditPhotoLng(lng);
}}
/>
{isFullscreen && selectedPhotoForDisplay && (
<div
className="fixed inset-0 z-[9999] bg-black/95 flex items-center justify-center cursor-zoom-out animate-in fade-in duration-200"
onClick={() => setIsFullscreen(false)}
>
<button
onClick={() => setIsFullscreen(false)}
className="fixed top-6 right-6 p-3 bg-black/50 hover:bg-black/75 border border-white/10 rounded-full text-white transition-colors z-[10000]"
>
<X className="w-6 h-6" />
</button>
<img
src={selectedPhotoForDisplay.imageUrl}
alt="Fullscreen photo"
className="max-w-full max-h-full object-contain select-none animate-in zoom-in-95 duration-200"
/>
</div>
)}
</div>
);
};