@@ -0,0 +1,211 @@
var e = Object . create , t = Object . defineProperty , n = Object . getOwnPropertyDescriptor , r = Object . getOwnPropertyNames , i = Object . getPrototypeOf , a = Object . prototype . hasOwnProperty , o = ( e , t ) => ( ) => ( e && ( t = e ( e = 0 ) ) , t ) , s = ( e , t ) => ( ) => ( t || ( e ( ( t = { exports : { } } ) . exports , t ) , e = null ) , t . exports ) , c = ( e , n ) => { let r = { } ; for ( var i in e ) t ( r , i , { get : e [ i ] , enumerable : ! 0 } ) ; return n || t ( r , Symbol . toStringTag , { value : ` Module ` } ) , r } , l = ( e , i , o , s ) => { if ( i && typeof i == ` object ` || typeof i == ` function ` ) for ( var c = r ( i ) , l = 0 , u = c . length , d ; l < u ; l ++ ) d = c [ l ] , ! a . call ( e , d ) && d !== o && t ( e , d , { get : ( e => i [ e ] ) . bind ( null , d ) , enumerable : ! ( s = n ( i , d ) ) || s . enumerable } ) ; return e } , u = ( n , r , a ) => ( a = n == null ? { } : e ( i ( n ) ) , l ( r || ! n || ! n . _ _esModule ? t ( a , ` default ` , { value : n , enumerable : ! 0 } ) : a , n ) ) , d = e => a . call ( e , ` module.exports ` ) ? e [ ` module.exports ` ] : l ( t ( { } , ` __esModule ` , { value : ! 0 } ) , e ) ; ( function ( ) { let e = document . createElement ( ` link ` ) . relList ; if ( e && e . supports && e . supports ( ` modulepreload ` ) ) return ; for ( let e of document . querySelectorAll ( ` link[rel="modulepreload"] ` ) ) n ( e ) ; new MutationObserver ( e => { for ( let t of e ) if ( t . type === ` childList ` ) for ( let e of t . addedNodes ) e . tagName === ` LINK ` && e . rel === ` modulepreload ` && n ( e ) } ) . observe ( document , { childList : ! 0 , subtree : ! 0 } ) ; function t ( e ) { let t = { } ; return e . integrity && ( t . integrity = e . integrity ) , e . referrerPolicy && ( t . referrerPolicy = e . referrerPolicy ) , e . crossOrigin === ` use-credentials ` ? t . credentials = ` include ` : e . crossOrigin === ` anonymous ` ? t . credentials = ` omit ` : t . credentials = ` same-origin ` , t } function n ( e ) { if ( e . ep ) return ; e . ep = ! 0 ; let n = t ( e ) ; fetch ( e . href , n ) } } ) ( ) ; var f = s ( ( e => { var t = Symbol . for ( ` react.element ` ) , n = Symbol . for ( ` react.portal ` ) , r = Symbol . for ( ` react.fragment ` ) , i = Symbol . for ( ` react.strict_mode ` ) , a = Symbol . for ( ` react.profiler ` ) , o = Symbol . for ( ` react.provider ` ) , s = Symbol . for ( ` react.context ` ) , c = Symbol . for ( ` react.forward_ref ` ) , l = Symbol . for ( ` react.suspense ` ) , u = Symbol . for ( ` react.memo ` ) , d = Symbol . for ( ` react.lazy ` ) , f = Symbol . iterator ; function p ( e ) { return typeof e != ` object ` || ! e ? null : ( e = f && e [ f ] || e [ ` @@iterator ` ] , typeof e == ` function ` ? e : null ) } var m = { isMounted : function ( ) { return ! 1 } , enqueueForceUpdate : function ( ) { } , enqueueReplaceState : function ( ) { } , enqueueSetState : function ( ) { } } , h = Object . assign , g = { } ; function _ ( e , t , n ) { this . props = e , this . context = t , this . refs = g , this . updater = n || m } _ . prototype . isReactComponent = { } , _ . prototype . setState = function ( e , t ) { if ( typeof e != ` object ` && typeof e != ` function ` && e != null ) throw Error ( ` setState(...): takes an object of state variables to update or a function which returns an object of state variables. ` ) ; this . updater . enqueueSetState ( this , e , t , ` setState ` ) } , _ . prototype . forceUpdate = function ( e ) { this . updater . enqueueForceUpdate ( this , e , ` forceUpdate ` ) } ; function v ( ) { } v . prototype = _ . prototype ; function y ( e , t , n ) { this . props = e , this . context = t , this . refs = g , this . updater = n || m } var b = y . prototype = new v ; b . constructor = y , h ( b , _ . prototype ) , b . isPureReactComponent = ! 0 ; var x = Array . isArray , S = Object . prototype . hasOwnProperty , C = { current : null } , w = { key : ! 0 , ref : ! 0 , _ _self : ! 0 , _ _source : ! 0 } ; function T ( e , n , r ) { var i , a = { } , o = null , s = null ; if ( n != null ) for ( i in n . ref !== void 0 && ( s = n . ref ) , n . key !== void 0 && ( o = ` ` + n . key ) , n ) S . call ( n , i ) && ! w . hasOwnProperty ( i ) && ( a [ i ] = n [ i ] ) ; var c = arguments . length - 2 ; if ( c === 1 ) a . children = r ; else if ( 1 < c ) { for ( var l = Array ( c ) , u = 0 ; u < c ; u ++ ) l [ u ] = arguments [ u + 2 ] ; a . children = l } if ( e && e . defaultProps ) for ( i in c = e . defaultProps , c ) a [ i ] === void 0 && ( a [ i ] = c [ i ] ) ; return { $$typeof : t , type : e , key : o , ref : s , props : a , _owner : C . current } } function E ( e , n ) { return { $$typeof : t , type : e . type , key : n , ref : e . ref , props : e . props , _owner : e . _owner } } function D ( e ) { return typeof e == ` object ` && ! ! e && e . $$typeof === t } function O ( e ) { var t = { "=" : ` =0 ` , ":" : ` =2 ` } ; return ` $ ` + e . replace ( /[=:]/g , function ( e ) { return t [ e ] } ) } var k = /\/+/g ; function A ( e , t ) { return typeof e == ` object ` && e && e . key != null ? O ( ` ` + e . key ) : t . toString ( 36 ) } function j ( e , r , i , a , o ) { var s = typeof e ; ( s === ` undefined ` || s === ` boolean ` ) && ( e = null ) ; var c = ! 1 ; if ( e === null ) c = ! 0 ; else switch ( s ) { case ` string ` : case ` number ` : c = ! 0 ; break ; case ` object ` : switch ( e . $$typeof ) { case t : case n : c = ! 0 } } if ( c ) return c = e , o = o ( c ) , e = a === ` ` ? ` . ` + A ( c , 0 ) : a , x ( o ) ? ( i = ` ` , e != null && ( i = e . replace ( k , ` $ &/ ` ) + ` / ` ) , j ( o , r , i , ` ` , function ( e ) { return e } ) ) : o != null && ( D ( o ) && ( o = E ( o , i + ( ! o . key || c && c . key === o . key ? ` ` : ( ` ` + o . key ) . replace ( k , ` $ &/ ` ) + ` / ` ) + e ) ) , r . push ( o ) ) , 1 ; if ( c = 0 , a = a === ` ` ? ` . ` : a + ` : ` , x ( e ) ) for ( var l = 0 ; l < e . length ; l ++ ) { s = e [ l ] ; var u = a + A ( s , l ) ; c += j ( s , r , i , u , o ) } else if ( u = p ( e ) , typeof u == ` function ` ) for ( e = u . call ( e ) , l = 0 ; ! ( s = e . next ( ) ) . done ; ) s = s . value , u = a + A ( s , l ++ ) , c += j ( s , r , i , u , o ) ; else if ( s === ` object ` ) throw r = String ( e ) , Error ( ` Objects are not valid as a React child (found: ` + ( r === ` [object Object] ` ? ` object with keys { ` + Object . keys ( e ) . join ( ` , ` ) + ` } ` : r ) + ` ). If you meant to render a collection of children, use an array instead. ` ) ; return c } function M ( e , t , n ) { if ( e == null ) return e ; var r = [ ] , i = 0 ; return j ( e , r , ` ` , ` ` , function ( e ) { return t . call ( n , e , i ++ ) } ) , r } function N ( e ) { if ( e . _status === - 1 ) { var t = e . _result ; t = t ( ) , t . then ( function ( t ) { ( e . _status === 0 || e . _status === - 1 ) && ( e . _status = 1 , e . _result = t ) } , function ( t ) { ( e . _status === 0 || e . _status === - 1 ) && ( e . _status = 2 , e . _result = t ) } ) , e . _status === - 1 && ( e . _status = 0 , e . _result = t ) } if ( e . _status === 1 ) return e . _result . default ; throw e . _result } var P = Line truncated
` +V+e}var U=!1;function ee(e,t){if(!e||U)return ` ` ;U=!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{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name: ` ` )?H(e): ` ` }function te(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=ee(e.type,!1),e;case 11:return e=ee(e.type.render,!1),e;case 1:return e=ee(e.type,!0),e;default:return ` ` }}function ne(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?ne(e.type)|| ` Memo ` :t;case F:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}function re(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 ne(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 ie(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=ie(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=ie(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,ie(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= ` ` +ie(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));
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),an(t);return}r--}else n!== ` $ ` &&n!== ` $ ? ` &&n!== ` $ ! ` ||r++;n=i}while(n);an(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,re(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=Ft;try{var n= $ i;for(Ft=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)),ot(ft,ia),t}finally{Ft=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-bt(r)-1;r&=~(1<<i),n+=1;var a=32-bt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,fa=1<<32-bt(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
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?wr: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(wr(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
@ keyframes gentle - shake {
0 % , 100 % {
transform : rotate ( 0 deg ) scale ( 1 ) ;
}
50 % {
transform : rotate ( 2 deg ) scale ( 1.05 ) ;
}
}
` })]}),We=({onContinue:e,onGoToSignup:t,onGoToMap:n,onLoginSuccess:r,isInitialSetup:i})=>{let[a,o]=(0,y.useState)(!1),s=(0,y.useRef)(null),c=Ue(),[l,u]=(0,y.useState)([]),[d,f]=(0,y.useState)(0),[p,m]=(0,y.useState)( ` / background . avif ` ),[h,g]=(0,y.useState)( ` ` ),[_,v]=(0,y.useState)(!0),[b,x]=(0,y.useState)(!1),[S,C]=(0,y.useState)(1);(0,y.useEffect)(()=>{let e=l.length>0?l[d]?.imageUrl: ` / background . avif ` ;e&&e!==(S===1?p:h)&&(S===1?(g(e),x(!0),v(!1),C(2)):(m(e),v(!0),x(!1),C(1)))},[d,l]);let w=async()=>{try{let e=await fetch( ` / api / v1 / public - photos ` );e.ok&&u(await e.json())}catch(e){console.error( ` Lỗi khi tải ảnh công khai : ` ,e)}};return(0,y.useEffect)(()=>{w()},[]),(0,y.useEffect)(()=>{if(l.length<=1)return;let e=setInterval(()=>{f(e=>(e+1)%l.length)},12e3);return()=>clearInterval(e)},[l]),(0,G.jsxs)( ` div ` ,{className: ` h - screen w - full overflow - hidden font - sans bg - gray - 900 relative ` ,children:[(0,G.jsxs)( ` div ` ,{className: ` absolute inset - 0 z - 0 bg - gray - 950 overflow - hidden ` ,children:[p&&(0,G.jsx)( ` img ` ,{src:p,className: ` absolute inset - y - 0 left - 0 h - full w - [ 120 % ] max - w - none object - cover transition - opacity duration - [ 1200 ms ] ease - in - out animate - panning ` ,style:{opacity:_?.8:0},alt: ` Travel Background 1 ` },p),h&&(0,G.jsx)( ` img ` ,{src:h,className: ` absolute inset - y - 0 left - 0 h - full w - [ 120 % ] max - w - none object - cover transition - opacity duration - [ 1200 ms ] ease - in - out animate - panning ` ,style:{opacity:b?.8:0},alt: ` Travel Background 2 ` },h)]}),(0,G.jsx)( ` style ` ,{children: `
@ keyframes pan - left - to - right {
0 % {
transform : translateX ( 0 ) translateZ ( 0 ) ;
}
100 % {
transform : translateX ( - 16.667 % ) translateZ ( 0 ) ;
}
}
. animate - panning {
animation : pan - left - to - right 13500 ms linear forwards ;
will - change : transform ;
}
` }),(0,G.jsxs)( ` div ` ,{className: ` absolute top - 0 left - 0 right - 0 z - 20 p - 4 flex justify - between items - center ` ,children:[(0,G.jsxs)( ` div ` ,{className: ` flex items - center gap - 2 text - white drop - shadow - lg ` ,children:[(0,G.jsx)(B,{className: ` w - 8 h - 8 ` }),(0,G.jsx)( ` span ` ,{className: ` text - xl font - black tracking - tighter uppercase hidden sm : block ` ,children: ` Travel Planner ` })]}),(0,G.jsxs)( ` button ` ,{onClick:()=>o(!0),className: ` flex items - center justify - center gap - 2 bg - white / 10 backdrop - blur - md text - white font - bold py - 2 px - 4 rounded - full border border - white / 20 hover : bg - white / 20 transition - all ` ,children:[(0,G.jsx)(W,{className: ` w - 4 h - 4 ` }),(0,G.jsx)( ` span ` ,{className: ` text - sm ` ,children: ` Đăng nhập ` })]})]}),(0,G.jsx)( ` div ` ,{className: ` absolute inset - 0 flex items - center justify - center z - 10 ` ,children:(0,G.jsx)(K,{onClick:()=>s.current?.click()})}),(0,G.jsx)( ` input ` ,{type: ` file ` ,ref:s,onChange:async e=>{let t=e.target.files?.[0];if(t){c({title: ` Đang xử lý ... ` ,message: ` Vui lòng chờ trong giây lát . ` ,type: ` info ` });try{let e=await new Promise(e=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(t=>e(t),()=>e(null),{timeout:5e3,enableHighAccuracy:!0}):e(null)}),n=localStorage.getItem( ` guest _token ` ),i=JSON.parse(localStorage.getItem( ` guest _user ` )|| ` null ` );if(!n){let e=await fetch( ` / api / v1 / auth / create - guest ` ,{method: ` POST ` });if(!e.ok)throw Error( ` Không thể tạo phiên khách . ` );let t=await e.json();n=t.access_token,i=t.user,localStorage.setItem( ` guest _token ` ,n),localStorage.setItem( ` guest _user ` ,JSON.stringify(i))}let a=new FormData;a.append( ` images ` ,t),e&&(a.append( ` latitude ` ,e.coords.latitude.toString()),a.append( ` longitude ` ,e.coords.longitude.toString()));let o=await fetch( ` / api / v1 / photos / upload - anonymous ` ,{method: ` POST ` ,headers:{Authorization: ` Bearer $ { n } ` },body:a});if(!o.ok){let e=await o.json();throw Error(e.message|| ` Tải ảnh thất bại . ` )}c({title: ` Thành công ! ` ,message: ` Ảnh của bạn đã được tải lên . ` ,type: ` success ` }),await w(),f(0),localStorage.setItem( ` token ` ,n),localStorage.setItem( ` user ` ,JSON.stringify(i)),r&&r(i)}catch(e){c({title: ` Lỗi ` ,message:e.message,type: ` error ` })}finally{e.target&&(e.target.value= ` ` )}}},accept: ` image / * ` ,capture: ` environment ` ,className: ` hidden ` }),l.length>0&&(0,G.jsxs)( ` div ` ,{className: ` absolute bottom - 28 left - 0 right - 0 z - 20 px - 4 flex flex - col items - center gap - 2 ` ,children:[(0,G.jsxs)( ` span ` ,{className: ` text - xs font - bold uppercase tracking - wider text - white / 70 drop - shadow - md ` ,children:[ ` Khoảnh khắc từ cộng đồng ( ` ,l.length, ` ) ` ]}),(0,G.jsx)( ` div ` ,{className: ` flex gap - 3 overflow - x - auto max - w - full no - scrollbar pb - 2 px - 4 justify - center ` ,children:l.slice(0,8).map((e,t)=>(0,G.jsx)( ` button ` ,{onClick:()=>f(t),className: ` relative w - 14 h - 14 rounded - xl overflow - hidden border - 2 transition - all active : scale - 95 shrink - 0 $ { d === t ? ` border-emerald-500 scale-110 shadow-lg ` : ` border-white/20 hover:border-white/50 ` } ` ,children:(0,G.jsx)( ` img ` ,{src:e.imageUrl,alt: ` Community thumbnail ` ,className: ` w - full h - full object - cover ` })},e.id))}),(0,G.jsx)( ` style ` ,{children: `
. no - scrollbar : : - webkit - scrollbar {
display : none ;
}
. no - scrollbar {
- ms - overflow - style : none ;
scrollbar - width : none ;
}
` })]}),(0,G.jsx)( ` div ` ,{className: ` absolute bottom - 8 left - 1 / 2 - translate - x - 1 / 2 z - 20 w - full px - 4 ` ,children:(0,G.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 - 2 xl transition - all shadow - 2 xl border border - white / 30 hover : bg - white / 30 active : scale - 95 ` ,children:[(0,G.jsx)(de,{className: ` w - 5 h - 5 ` }), ` Khám phá các hành trình du lịch ` ]})}),(0,G.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( ` RequestAnimationFrame ` )||S,w=window.cancelAnimationFrame|
Line truncated
. no - scrollbar : : - webkit - scrollbar {
display : none ;
}
. no - scrollbar {
- ms - overflow - style : none ;
scrollbar - width : none ;
}
` })]})]}),(0,G.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,G.jsx)( ` div ` ,{className: ` p - 6 border - b border - slate - 800 flex items - center justify - between ` ,children:(0,G.jsxs)( ` div ` ,{children:[(0,G.jsxs)( ` h3 ` ,{className: ` text - lg font - black tracking - tight text - white flex items - center gap - 2 ` ,children:[(0,G.jsx)(fe,{className: ` w - 5 h - 5 text - emerald - 500 ` }), ` Bình luận cộng đồng ` ]}),(0,G.jsx)( ` p ` ,{className: ` text - xs text - slate - 400 mt - 1 ` ,children: ` Ảnh chia sẻ công khai trên bản đồ ` })]})}),(0,G.jsxs)( ` div ` ,{className: ` flex - 1 overflow - y - auto p - 6 space - y - 4 bg - slate - 900 / 50 ` ,children:[u?(0,G.jsxs)( ` div ` ,{className: ` flex flex - col items - center justify - center py - 12 text - slate - 500 gap - 2 ` ,children:[(0,G.jsx)(ae,{className: ` w - 8 h - 8 animate - spin text - emerald - 500 ` }),(0,G.jsx)( ` span ` ,{className: ` text - xs font - semibold ` ,children: ` Đang tải bình luận ... ` })]}):o.length===0?(0,G.jsxs)( ` div ` ,{className: ` flex flex - col items - center justify - center py - 16 text - slate - 500 gap - 3 ` ,children:[(0,G.jsx)( ` div ` ,{className: ` p - 4 bg - slate - 800 / 40 rounded - full text - slate - 600 ` ,children:(0,G.jsx)(fe,{className: ` w - 8 h - 8 ` })}),(0,G.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 ! ` })]}):o.map(e=>(0,G.jsxs)( ` div ` ,{className: ` flex gap - 3 items - start animate - in fade - in slide - in - from - bottom - 2 duration - 200 ` ,children:[(0,G.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,G.jsx)(Ne,{className: ` w - 4.5 h - 4.5 text - slate - 400 ` })}),(0,G.jsx)( ` div ` ,{className: ` flex - 1 min - w - 0 ` ,children:(0,G.jsxs)( ` div ` ,{className: ` bg - slate - 800 / 55 p - 3.5 rounded - 2 xl rounded - tl - none border border - slate - 800 shadow - lg ` ,children:[(0,G.jsxs)( ` div ` ,{className: ` flex justify - between items - center mb - 1 ` ,children:[(0,G.jsx)( ` span ` ,{className: ` text - xs font - black text - slate - 200 truncate ` ,children:e.userName}),(0,G.jsx)( ` span ` ,{className: ` text - [ 9 px ] font - medium text - slate - 500 ` ,children:new Date(e.createdAt).toLocaleTimeString([],{hour: ` 2 - digit ` ,minute: ` 2 - digit ` })})]}),(0,G.jsx)( ` p ` ,{className: ` text - sm text - slate - 300 leading - relaxed break - words ` ,children:e.content})]})})]},e.id)),(0,G.jsx)( ` div ` ,{ref:m})]}),(0,G.jsx)( ` div ` ,{className: ` p - 4 bg - slate - 950 / 40 border - t border - slate - 800 / 80 ` ,children:(0,G.jsxs)( ` div ` ,{className: ` relative flex items - center gap - 2 ` ,children:[(0,G.jsx)( ` input ` ,{type: ` text ` ,value:c,onChange:e=>l(e.target.value),onKeyDown:e=>e.key=== ` Enter ` &&!f&&g(),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 - 2 xl px - 4 py - 3 text - sm focus : outline - none focus : ring - 2 focus : ring - emerald - 500 focus : border - transparent transition - all ` ,disabled:f}),(0,G.jsx)( ` button ` ,{onClick:g,disabled:!c.trim()||f,className: ` p - 3 bg - emerald - 600 hover : bg - emerald - 500 disabled : bg - slate - 800 disabled : opacity - 40 text - white rounded - 2 xl transition - all active : scale - 95 shadow - lg shadow - emerald - 950 / 30 flex items - center justify - center ` ,children:f?(0,G.jsx)(ae,{className: ` w - 4.5 h - 4.5 animate - spin ` }):(0,G.jsx)(xe,{className: ` w - 4.5 h - 4.5 ` })})]})})]})]})]}):null},vi=yn.default.default||yn.default,yi=J.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]});J.default.Marker.prototype.options.icon=yi;function bi({position:e}){let t=Xt();return(0,y.useEffect)(()=>{t.setView(e,t.getZoom())},[e,t]),null}function xi({onMapAction:e}){return Zt({click:()=>e(),movestart:e,dragstart:e}),null}function Si(){let e=Tn(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 Ci=({onBack:e,onLogout:t,user:n,onViewTour:r,onOpenMyPhotos:i,onLoginSuccess:a})=>{let o=Tn(e=>e.publicTours),s=Tn(e=>e.fetchPublicTours),c=Tn(e=>e.fetchTour),l=Tn(e=>e.setMapCenter),u=Ue(),[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)(!1),[E,D]=(0,y.useState)(!1),[O,k]=(0,y.useState)(!1),[A,j]=(0,y.useState)(``),[M,N]=(0,y.useState)([]),[P,F]=(0,y.useState)(!1);(0,y.useEffect)(()=>{
Line 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'" / >
< / d i v >
< div class = "absolute -bottom-1 -right-1 bg-blue-600 rounded-full w-5 h-5 border-2 border-white flex items-center justify-center text-[10px] font-black text-white" >
S
< / d i v >
< / d i v >
` ,iconSize:[48,48],iconAnchor:[24,24]}),children:(0,G.jsx)(on,{direction: ` top ` ,offset:[0,-20],opacity:1,children:(0,G.jsxs)( ` div ` ,{className: ` p - 1 max - w - [ 180 px ] ` ,children:[(0,G.jsx)( ` div ` ,{className: ` font - black text - blue - 600 text - [ 11 px ] mb - 0.5 uppercase tracking - tight truncate ` ,children:e.title}),e.tags&&e.tags.length>0&&(0,G.jsx)( ` div ` ,{className: ` flex flex - wrap gap - 1 mb - 1 ` ,children:e.tags.map(e=>(0,G.jsx)( ` span ` ,{className: ` px - 1.5 py - 0.5 bg - blue - 50 text - blue - 500 rounded text - [ 8 px ] font - bold border border - blue - 100 ` ,children:e},e))}),e.description&&(0,G.jsx)( ` div ` ,{className: ` text - [ 10 px ] 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,G.jsx)(tn,{position:[n,r],eventHandlers:{click:()=>{v(t),x(e)}},icon:J.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" / >
< / d i v >
< div class = "absolute -bottom-1 -right-1 bg-emerald-600 rounded-full w-5 h-5 border-2 border-white flex items-center justify-center text-[10px] font-black text-white" >
📸
< / d i v >
$ { e . length > 1 ? `
< div class = "absolute -top-1 -left-1 bg-rose-600 rounded-full w-5 h-5 border-2 border-white flex items-center justify-center text-[9px] font-black text-white shadow-md animate-bounce" >
$ { e . length }
< / d i v >
` : ` ` }
< / d i v >
` ,iconSize:[48,48],iconAnchor:[24,24]})},t.id)})]}),V&&(0,G.jsx)( ` div ` ,{className: ` absolute z - [ 2000 ] bg - white rounded - 2 xl shadow - 2 xl 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,G.jsxs)( ` button ` ,{onClick:()=>ee(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,G.jsx)(Ce,{className: ` w - 4 h - 4 text - blue - 600 ` }), ` Sao chép liên kết ` ]}):(0,G.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,G.jsx)(En,{isOpen:w,onClose:()=>T(!1)}),(0,G.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 } < / s t r o n g > c ủ a b ạ n t ạ i đ â y . . . < / p > ` , c r e a t e d A t : n e w D a t e ( ) . t o I S O S t r i n g ( ) } ; l o c a l S t o r a g e . s e t I t e m ( ` m y _ j o u r n e y _ n o t e s ` , J S O N . s t r i n g i f y ( [ i , . . . n ] ) ) , c ( e . i d ) , r ( e . i d ) } } ) , _ & & ( 0 , G . j s x ) ( _ i , { i s O p e n : ! ! _ , o n C l o s e : ( ) = > { v ( n u l l ) , x ( [ ] ) } , p h o t o : _ , p h o t o G r o u p : b , o n S e l e c t P h o t o : e = > v ( e ) , o n L o g i n S u c c e s s : a } ) ] } ) } ; f u n c t i o n w i ( e ) { " @ b a b e l / h e l p e r s - t y p e o f " ; r e t u r n w i = t y p e o f S y m b o l = = ` f u n c t i o n ` & & t y p e o f S y m b o l . i t e r a t o r = = ` s y m b o l ` ? f u n c t i o n ( e ) { r e t u r n t y p e o f e } : f u n c t i o n ( e ) { r e t u r n e & & t y p e o f S y m b o l = = ` f u n c t i o n ` & & e . c o n s t r u c t o r = = = S y m b o l & & e ! = = S y m b o l . p r o t o t y p e ? ` s y m b o l ` : t y p e o f e } , w i ( e ) } f u n c t i o n T i ( e ) { i f ( e = = = n u l l | | e = = = ! 0 | | e = = = ! 1 ) r e t u r n N a N ; v a r t = N u m b e r ( e ) ; r e t u r n i s N a N ( t ) ? t : t < 0 ? M a t h . c e i l ( t ) : M a t h . f l o o r ( t ) } f u n c t i o n E i ( e , t ) { i f ( t . l e n g t h < e ) t h r o w T y p e E r r o r ( e + ` a r g u m e n t ` + ( e > 1 ? ` s ` : ` ` ) + ` r e q u i r e d , b u t o n l y ` + t . l e n g t h + ` p r e s e n t ` ) } f u n c t i o n D i ( e ) { E i ( 1 , a r g u m e n t s ) ; v a r t = O b j e c t . p r o t o t y p e . t o S t r i n g . c a l l ( e ) ; r e t u r n e i n s t a n c e o f D a t e | | w i ( e ) = = = ` o b j e c t ` & & t = = = ` [ o b j e c t D a t e ] ` ? n e w D a t e ( e . g e t T i m e ( ) ) : t y p e o f e = = ` n u m b e r ` | | t = = = ` [ o b j e c t N u m b e r ] ` ? n e w D a t e ( e ) : ( ( t y p e o f e = = ` s t r i n g ` | | t = = = ` [ o b j e c t S t r i n g ] ` ) & & t y p e o f c o n s o l e < ` u ` & & ( c o n s o l e . w a r n ( " S t a r t i n g w i t h v 2 . 0 . 0 - b e t a . 1 d a t e - f n s d o e s n ' t a c c e p t s t r i n g s a s d a t e a r g u m e n t s . P l e a s e u s e ` p a r s e I S O ` t o p a r s e s t r i n g s . S e e : h t t p s : / / g i t h u b . c o m / d a t e - f n s / d a t e - f n s / b l o b / m a s t e r / d o c s / u p g r a d e G u i d e . m d # s t r i n g - a r g u m e n t s " ) , c o n s o l e . w a r n ( E r r o r ( ) . s t a c k ) ) , n e w D a t e ( N a N ) ) } f u n c t i o n O i ( e , t ) { E i ( 2 , a r g u m e n t s ) ; v a r n = D i ( e ) . g e t T i m e ( ) , r = T i ( t ) ; r e t u r n n e w D a t e ( n + r ) } v a r k i = { } ; f u n c t i o n A i ( ) { r e t u r n k i } f u n c t i o n j i ( e ) { v a r t = n e w D a t e ( D a t e . U T C ( e . g e t F u l l Y e a r ( ) , e . g e t M o n t h ( ) , e . g e t D a t e ( ) , e . g e t H o u r s ( ) , e . g e t M i n u t e s ( ) , e . g e t S e c o n d s ( ) , e . g e t M i l l i s e c o n d s ( ) ) ) ; r e t u r n t . s e t U T C F u l l Y e a r ( e . g e t F u l l Y e a r ( ) ) , e . g e t T i m e ( ) - t . g e t T i m e ( ) } v a r M i = 3 6 5 . 2 4 2 5 , N i = 1 0 * * 8 * 2 4 * 6 0 * 6 0 * 1 e 3 , P i = 6 e 4 , F i = 3 6 e 5 ; - N i ; v a r I i = 3 6 0 0 * 2 4 ; I i * 7 , I i * M i / 1 2 * 3 ; f u n c t i o n L i ( e ) { r e t u r n E i ( 1 , a r g u m e n t s ) , e i n s t a n c e o f D a t e | | w i ( e ) = = = ` o b j e c t ` & & O b j e c t . p r o t o t y p e . t o S t r i n g . c a l l ( e ) = = = ` [ o b j e c t D a t e ] ` } f u n c t i o n R i ( e ) { i f ( E i ( 1 , a r g u m e n t s ) , ! L i ( e ) & & t y p e o f e ! = ` n u m b e r ` ) r e t u r n ! 1 ; v a r t = D i ( e ) ; r e t u r n ! i s N a N ( N u m b e r ( t ) ) } f u n c t i o n z i ( e , t ) { r e t u r n E i ( 2 , a r g u m e n t s ) , D i ( e ) . g e t T i m e ( ) - D i ( t ) . g e t T i m e ( ) } v a r B i = { c e i l : M a t h . c e i l , r o u n d : M a t h . r o u n d , f l o o r : M a t h . f l o o r , t r u n c : f u n c t i o n ( e ) { r e t u r n e < 0 ? M a t h . c e i l ( e ) : M a t h . f l o o r ( e ) } } , V i = ` t r u n c ` ; f u n c t i o n H i ( e ) { r e t u r n e ? B i [ e ] : B i [ V i ] } f u n c t i o n U i ( e , t , n ) { E i ( 2 , a r g u m e n t s ) ; v a r r = z i ( e , t ) / P i ; r e t u r n H i ( n ? . r o u n d i n g M e t h o d ) ( r ) } f u n c t i o n W i ( e , t ) { r e t u r n E i ( 2 , a r g u m e n t s ) , O i ( e , - T i ( t ) ) } v a r G i = 8 6 4 e 5 ; f u n c t i o n K i ( e ) { E i ( 1 , a r g u m e n t s ) ; v a r t = D i ( e ) , n = t . g e t T i m e ( ) ; t . s e t U T C M o n t h ( 0 , 1 ) , t . s e t U T C H o u r s ( 0 , 0 , 0 , 0 ) ; v a r r = n - t . g e t T i m e ( ) ; r e t u r n M a t h . f l o o r ( r / G i ) + 1 } f u n c t i o n q i ( e ) { E i ( 1 , a r g u m e n t s ) ; v a r t = 1 , n = D i ( e ) , r = n . g e t U T C D a y ( ) , i = ( r < t ? 7 : 0 ) + r - t ; r e t u r n n . s e t U T C D a t e ( n . g e t U T C D a t e ( ) - i ) , n . s e t U T C H o u r s ( 0 , 0 , 0 , 0 ) , n } f u n c t i o n J i ( e ) { E i ( 1 , a r g u m e n t s ) ; v a r t = D i ( e ) , n = t . g e t U T C F u l l Y e a r ( ) , r = n e w D a t e ( 0 ) ; r . s e t U T C F u l l Y e a r ( n + 1 , 0 , 4 ) , r . s e t U T C H o u r s ( 0 , 0 , 0 , 0 ) ; v a r i = q i ( r ) , a = n e w D a t e ( 0 ) ; a . s e t U T C F u l l Y e a r ( n , 0 , 4 ) , a . s e t U T C H o u r s ( 0 , 0 , 0 , 0 ) ; v a r o = q i ( a ) ; r e t u r n t . g e t T i m e ( ) > = i . g e t T i m e ( ) ? n + 1 : t . g e t T i m e ( ) > = o . g e t T i m e ( ) ? n : n - 1 } f u n c t i o n Y i ( e ) { E i ( 1 , a r g u m e n t s ) ; v a r t = J i ( e ) , n = n e w D a t e ( 0 ) ; r e t u r n n . s e t U T C F u l l Y e a r ( t , 0 , 4 ) , n . s e t U T C H o u r s ( 0 , 0 , 0 , 0 ) , q i ( n ) } v a r X i = 6 0 4 8 e 5 ; f u n c t i o n Z i ( e ) { E i ( 1 , a r g u m e n t s ) ; v a r t = D i ( e ) , n = q i ( t ) . g e t T i m e ( ) - Y i ( t ) . g e t T i m e ( ) ; r e t u r n M a t h . r o u n d ( n / X i ) + 1 } f u n c t i o n Q i ( e , t ) { v a r n ; E i ( 1 , a r g u m e n t s ) ; v a r r = A i ( ) , i = T i ( t ? . w e e k S t a r t s O n ? ? ( t = = n u l l | | ( n = t . l o c a l e ) = = n u l l ? v o i d 0 : n . o p t i o n s ? . w e e k S t a r t s O n ) ? ? r . w e e k S t a r t s O n ? ? r . l o c a l e ? . o p t i o n s ? . w e e k S t a r t s O n ? ? 0 ) ; i f ( ! ( i > = 0 & & i < = 6 ) ) t h r o w R a n g e E r r o r ( ` w e e k S t a r t s O n m u s t b e b e t w e e n 0 a n d 6 i n c l u s i v e l y ` ) ; v a r a = D i ( e ) , o = a . g e t U T C D a y ( ) , s = ( o < i ? 7 : 0 ) + o - i ; r e t u r n a . s e t U T C D a t e ( a . g e t U T C D a t e ( ) - s ) , a . s e t U T C H o u r s ( 0 , 0 , 0 , 0 ) , a } f u n c t i o n $ i ( e , t ) { v a r n ; E i ( 1 , a r g u m e n t s ) ; v a r r = D i ( e ) , i = r . g e t U T C F u l l Y e a r ( ) , a = A i ( ) , o = T i ( t ? . f i r s t W e e k C o n t a i n s D a t e ? ? ( t = = n u l l | | ( n = t . l o c a l e ) = = n u l l ? v o i d 0 : n . o p t i o n s ? . f i r s t W e e k C o n t a i n s D a t e ) ? ? a . f i r s t W e e k C o n t a i n s D a t e ? ? a . l o c a l e ? . o p t i o n s ? . f i r s t W e e k C o n t a i n s D a t e ? ? 1 ) ; i f ( ! ( o > = 1 & & o < = 7 ) ) t h r o w R a n g e E r r o r ( ` f i r s t W e e k C o n t a i n s D a t e m u s t b e b e t w e e n 1 a n d 7 i n c l u s i v e l y ` ) ; v a r s = n e w D a t e ( 0 ) ; s . s e t U T C F u l l Y e a r ( i + 1 , 0 , o ) , s . s e t U T C H o u r s ( 0 , 0 , 0 , 0 ) ; v a r c = Q i Line truncated
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}function is(e,t){return ts(e)||ns(e,t)||za(e,t)||rs()}function as(e,t= ` utf8 ` ){return new TextDecoder(t).decode(e)}var os=new TextEncoder;function ss(e){return os.encode(e)}var cs=1024*8,ls=(()=>{let e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),us={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},ds=class e{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=cs,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=us[t].BYTES_PER_ELEMENT*e,r=this.byteOffset+this.offset,i=this.buffer.slice(r,r+n);if(this.littleEndian===ls&&t!== ` uint8 ` &&t!== ` int8 ` ){let e=new Uint8Array(this.buffer.slice(r,r+n));e.reverse();let i=new us[t](e.buffer);return this.offset+=n,i.reverse(),i}let a=new us[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 as(this.readBytes(e))}decodeText(e=1,t= ` utf8 ` ){return as(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
` ),Ue(e,t),Ie.publish( ` endTilingPattern ` ,t),ze.pop().restore()};var K,We=p.__private__.newObject=function(){var e=Ge();return Ke(e,!0),e},Ge=p.__private__.newObjectDeferred=function(){return U++,ee[U]=function(){return ne},U},Ke=function(e,t){return t=typeof t== ` boolean ` &&t,ee[e]=ne,t&&W(e+ ` 0 obj ` ),e},qe=p.__private__.newAdditionalObject=function(){var e={objId:Ge(),content: ` ` };return re.push(e),e},Je=Ge(),Ye=Ge(),Xe=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},Ze=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 ap(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||wi(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},Qe=p.__private__.getFilters=function(){return o}, $ e=p.__private__.putStream=function(e){var t=(e||={}).data|| ` ` ,n=e.filters||Qe(),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=q.encryptor(o,0));var c={};!0===n&&(n=[ ` FlateEncode ` ]);var l=e.additionalKeyValues||[],d=(c=jp.API.processDataByFilters===void 0?{data:t,reverseChain:[]}:jp.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 ` ))},et=p.__private__.putPage=function(e){var t=e.number,n=e.data,r=e.objId,i=e.contentsObjId;Ke(r,!0),W( ` << / T y p e / P a g e ` ) , W ( ` / P a r e n t ` + e . r o o t D i c t i o n a r y O b j I d + ` 0 R ` ) , W ( ` / R e s o u r c e s ` + e . r e s o u r c e D i c t i o n a r y O b j I d + ` 0 R ` ) , W ( ` / M e d i a B o x [ ` + p a r s e F l o a t ( w ( e . m e d i a B o x . b o t t o m L e f t X ) ) + ` ` + p a r s e F l o a t ( w ( e . m e d i a B o x . b o t t o m L e f t Y ) ) + ` ` + w ( e . m e d i a B o x . t o p R i g h t X ) + ` ` + w ( e . m e d i a B o x . t o p R i g h t Y ) + ` ] ` ) , e . c r o p B o x ! = = n u l l & & W ( ` / C r o p B o x [ ` + w ( e . c r o p B o x . b o t t o m L e f t X ) + ` ` + w ( e . c r o p B o x . b o t t o m L e f t Y ) + ` ` + w ( e . c r o p B o x . t o p R i g h t X ) + ` ` + w ( e . c r o p B o x . t o p R i g h t Y ) + ` ] ` ) , e . b l e e d B o x ! = = n u l l & & W ( ` / B l e e d B o x [ ` + w ( e . b l e e d B o x . b o t t o m L e f t X ) + ` ` + w ( e . b l e e d B o x . b o t t o m L e f t Y ) + ` ` + w ( e . b l e e d B o x . t o p R i g h t X ) + ` ` + w ( e . b l e e d B o x . t o p R i g h t Y ) + ` ] ` ) , e . t r i m B o x ! = = n u l l & & W ( ` / T r i m B o x [ ` + w ( e . t r i m B o x . b o t t o m L e f t X ) + ` ` + w ( e . t r i m B o x . b o t t o m L e f t Y ) + ` ` + w ( e . t r i m B o x . t o p R i g h t X ) + ` ` + w ( e . t r i m B o x . t o p R i g h t Y ) + ` ] ` ) , e . a r t B o x ! = = n u l l & & W ( ` / A r t B o x [ ` + w ( e . a r t B o x . b o t t o m L e f t X ) + ` ` + w ( e . a r t B o x . b o t t o m L e f t Y ) + ` ` + w ( e . a r t B o x . t o p R i g h t X ) + ` ` + w ( e . a r t B o x . t o p R i g h t Y ) + ` ] ` ) , t y p e o f e . u s e r U n i t = = ` n u m b e r ` & & e . u s e r U n i t ! = = 1 & & W ( ` / U s e r U n i t ` + e . u s e r U n i t ) , I e . p u b l i s h ( ` p u t P a g e ` , { o b j I d : r , p a g e C o n t e x t : F e [ t ] , p a g e N u m b e r : t , p a g e : n } ) , W ( ` / C o n t e n t s ` + i + ` 0 R ` ) , W ( ` > > ` ) , W ( ` e n d o b j ` ) ; v a r a = n . j o i n ( `
` );return b===y&&(a+= `
Q ` ),Ke(i,!0), $ e({data:a,filters:Qe(),objectId:i}),W( ` endobj ` ),r},tt=p.__private__.putPages=function(){var e,t,n=[];for(e=1;e<=Pe;e++)Fe[e].objId=Ge(),Fe[e].contentsObjId=Ge();for(e=1;e<=Pe;e++)n.push(et({number:e,data:ie[e],objId:Fe[e].objId,contentsObjId:Fe[e].contentsObjId,mediaBox:Fe[e].mediaBox,cropBox:Fe[e].cropBox,bleedBox:Fe[e].bleedBox,trimBox:Fe[e].trimBox,artBox:Fe[e].artBox,userUnit:Fe[e].userUnit,rootDictionaryObjId:Je,resourceDictionaryObjId:Ye}));Ke(Je,!0),W( ` << / T y p e / P a g e s ` ) ; v a r r = ` / K i d s [ ` ; f o r ( t = 0 ; t < P e ; t + + ) r + = n [ t ] + ` 0 R ` ; W ( r + ` ] ` ) , W ( ` / C o u n t ` + P e ) , W ( ` > > ` ) , W ( ` e n d o b j ` ) , I e . p u b l i s h ( ` p o s t P u t P a g e s ` ) } , n t = f u n c t i o n ( e ) { I e . p u b l i s h ( ` p u t F o n t ` , { f o n t : e , o u t : W , n e w O b j e c t : W e , p u t S t r e a m : $ e } ) , ! 0 ! = = e . i s A l r e a d y P u t t e d & & ( e . o b j e c t N u m b e r = W e ( ) , W ( ` < < ` ) , W ( ` / T y p e / F o n t ` ) , W ( ` / B a s e F o n t / ` + T p ( e . p o s t S c r i p t N a m e ) ) , W ( ` / S u b t y p e / T y p e 1 ` ) , t y p e o f e . e n c o d i n g = = ` s t r i n g ` & & W ( ` / E n c o d i n g / ` + e . e n c o d i n g ) , W ( ` / F i r s t C h a r 3 2 ` ) , W ( ` / L a s t C h a r 2 5 5 ` ) , W ( ` > > ` ) , W ( ` e n d o b j ` ) ) } , r t = f u n c t i o n ( e ) { e . o b j e c t N u m b e r = W e ( ) ; v a r t = [ ] ; t . p u s h ( { k e y : ` T y p e ` , v a l u e : ` / X O b j e c t ` } ) , t . p u s h ( { k e y : ` S u b t y p e ` , v a l u e : ` / F o r m ` } ) , t . p u s h ( { k e y : ` B B o x ` , v a l u e : ` [ ` + [ w ( e . x ) , w ( e . y ) , w ( e . x + e . w i d t h ) , w ( e . y + e . h e i g h t ) ] . j o i n ( ` ` ) + ` ] ` } ) , t . p u s h ( { k e y : ` M a t r i x ` , v a l u e : ` [ ` + e . m a t r i x . t o S t r i n g ( ) + ` ] ` } ) , $ e ( { d a t a : e . p a g e s [ 1 ] . j o i n ( `
` ),additionalKeyValues:t,objectId:e.objectNumber}),W( ` endobj ` )},it=function(e,t){t||=21;var n=We(),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 ] ` }), $ e({data:r,additionalKeyValues:i,alreadyAppliedFilters:[ ` / ASCIIHexDecode ` ],objectId:n}),W( ` endobj ` ),e.objectNumber=We(),W( ` << / S h a d i n g T y p e ` + e . t y p e ) , W ( ` / C o l o r S p a c e / D e v i c e R G B ` ) ; v a r a = ` / C o o r d s [ ` + w ( p a r s e F l o a t ( e . c o o r d s [ 0 ] ) ) + ` ` + w ( p a r s e F l o a t ( e . c o o r d s [ 1 ] ) ) + ` ` ; e . t y p e = = = 2 ? a + = w ( p a r s e F l o a t ( e . c o o r d s [ 2 ] ) ) + ` ` + w ( p a r s e F l o a t ( e . c o o r d s [ 3 ] ) ) : a + = w ( p a r s e F l o a t ( e . c o o r d s [ 2 ] ) ) + ` ` + w ( p a r s e F l o a t ( e . c o o r d s [ 3 ] ) ) + ` ` + w ( p a r s e F l o a t ( e . c o o r d s [ 4 ] ) ) + ` ` + w ( p a r s e F l o a t ( e . c o o r d s [ 5 ] ) ) , W ( a + = ` ] ` ) , e . m a t r i x & & W ( ` / M a t r i x [ ` + e . m a t r i x . t o S t r i n g ( ) + ` ] ` ) , W ( ` / F u n c t i o n ` + n + ` 0 R ` ) , W ( ` / E x t e n d [ t r u e t r u e ] ` ) , W ( ` > > ` ) , W ( ` e n d o b j ` ) } , a t = f u n c t i o n ( e , t ) { v a r n = G e ( ) , r = W e ( ) ; t . p u s h ( { r e s o u r c e s O i d : n , o b j e c t O i d : r } ) , e . o b j e c t N u m b e r = r ; v a r i = [ ] ; i . p u s h ( { k e y : ` T y p e ` , v a l u e : ` / P a t t e r n ` } ) , i . p u s h ( { k e y : ` P a t t e r n T y p e ` , v a l u e : ` 1 ` } ) , i . p u s h ( { k e y : ` P a i n t T y p e ` , v a l u e : ` 1 ` } ) , i . p u s h ( { k e y : ` T i l i n g T y p e ` , v a l u e : ` 1 ` } ) , i . p u s h ( { k e y : ` B B o x ` , v a l u e : ` [ ` + e . b o u n d i n g B o x . m a p ( w ) . j o i n ( ` ` ) + ` ] ` } ) , i . p u s h ( { k e y : ` X S t e p ` , v a l u e : w ( e . x S t e p ) } ) , i . p u s h ( { k e y : ` Y S t e p ` , v a l u e : w ( e . y S t e p ) } ) , i . p u s h ( { k e y : ` R e s o u r c e s ` , v a l u e : n + ` 0 R ` } ) , e . m a t r i x & & i . p u s h ( { k e y : ` M a t r i x ` , v a l u e : ` [ ` + e . m a t r i x . t o S t r i n g ( ) + ` ] ` } ) , $ e ( { d a t a : e . s t r e a m , a d d i t i o n a l K e y V a l u e s : i , o b j e c t I d : e . o b j e c t N u m b e r } ) , W ( ` e n d o b j ` ) } , o t = f u n c t i o n ( e ) { f o r ( v a r t i n e . o b j e c t N u m b e r = W e ( ) , W ( ` < < ` ) , e ) s w i t c h ( t ) { c a s e ` o p a c i t y ` : W ( ` / c a ` + D ( e [ t ] ) ) ; b r e a k ; c a s e ` s t r o k e - o p a c i t y ` : W ( ` / C A ` + D ( e [ t ] ) ) } W ( ` > > ` ) , W ( ` e n d o b j ` ) } , s t = f u n c t i o n ( e ) { K e ( e . r e s o u r c e s O i d , ! 0 ) , W ( ` < < ` ) , W ( ` / P r o c S e t [ / P D F / T e x t / I m a g e B / I m a g e C / I m a g e I ] ` ) , f u n c t i o n ( ) { f o r ( v a r e i n W ( ` / F o n t < < ` ) , E e ) E e . h a s O w n P r o p e r t y ( e ) & & ( ! 1 = = = d | | ! 0 = = = d & & f . h a s O w n P r o p e r t y ( e ) ) & & W ( ` / ` + e + ` ` + E e [ e ] . o b j e c t N u m b e r + ` 0 R ` ) ; W ( ` > > ` ) } ( ) , f u n c t i o n ( ) { i f ( O b j e c t . k e y s ( k e ) . l e n g t h > 0 ) { f o r ( v a r e i n W ( ` / S h a d i n g < < ` ) , k e ) k e . h a s O w n P r o p e r t y ( e ) & & k e [ e ] i n s t a n c e o f k p & & k e [ e ] . o b j e c t N u m b e r > = 0 & & W ( ` / ` + e + ` ` + k e [ e ] . o b j e c t N u m b e r + ` 0 R ` ) ; I e . p u b l i s h ( ` p u t S h a d i n g P a t t e r n D i c t ` ) , W ( ` > > ` ) } } ( ) , f u n c t i o n ( e ) { i f ( O b j e c t . k e y s ( k e ) . l e n g t h > 0 ) { f o r ( v a r t i n W ( ` / P a t t e r n < < ` ) , k e ) k e . h a s O w n P r o p e r t y ( t ) & & k e [ t ] i n s t a n c e o f p . T i l i n g P a t t e r n & & k e [ t ] . o b j e c t N u m b e r > = 0 & & k e [ t ] . o b j e c t N u m b e r < e & & W ( ` / ` + t + ` ` + k e [ t ] . o b j e c t N u m b e r + ` 0 R ` ) ; I e . p u b l i s h ( ` p u t T i l i n g P a t t e r n D i c t ` ) , W ( ` > > ` ) } } ( e . o b j e c t O i d ) , f u n c t i o n ( ) { i f ( O b j e c t . k e y s ( j e ) . l e n g t h > 0 ) { f o r ( v a r e i n W ( ` / E x t G S t a t e < < ` ) , j e ) j e . h a s O w n P r o p e r t y ( e ) & & j e [ e ] . o b j e c t N u m b e r > = 0 & & W ( ` / ` + e + ` ` + j e [ e ] . o b j e c t N u m b e r + ` 0 R ` ) ; I e . p u b l i s h ( ` p u t G S t a t e D i c t ` ) , W ( ` > > ` ) } } ( ) , f u n c t i o n ( ) { f o r ( v a r e i n W ( ` / X O b j e c t < < ` ) , R e ) R e . h a s O w n P r o p e r t y ( e ) & & R e [ e ] . o b j e c t N u m b e r > = 0 & & W ( ` / ` + e + ` ` + R e [ e ] . o b j e c t N u m b e r + ` 0 R ` ) ; I e . p u b l i s h ( ` p u t X o b j e c t D i c t ` ) , W ( ` > > ` ) } ( ) , W ( ` > > ` ) , W ( ` e n d o b j ` ) } , c t = f u n c t i o n ( e ) { D e [ e . f o n t N a m e ] = D e [ e . f o n t N a m e ] | | { } , D e [ e . f o n t N a m e ] [ e . f o n t S t y l e ] = e . i d } , l t = f u n c t i o n ( e , t , n , r , i ) { v a r a = { i d : ` F ` + ( O b j e c t . k e y s ( E e ) . l e n g t h + 1 ) . t o S t r i n g ( 1 0 ) , p o s t S c r i p t N a m e : e , f o n t N a m e : t , f o n t S t y l e : n , e n c o d i n g : r , i s S t a n d a r d F o n t : i | | ! 1 , m e t a d a t a : { } } ; r e t u r n I e . p u b l i s h ( ` a d d F o n t ` , { f o n t : a , i n s t a n c e : t h i s } ) , E e [ a . i d ] = a , c t ( a ) , a . i d } , u t = p . _ _ p r i v a t e _ _ . p d f E s c a p e = p . p d f E s c a p e = f u n c t i o n ( e , t ) { r e t u r n f u n c t i o n ( e , t ) { v a r n , r , i , a , o , s , c , l , u ; i f ( i = ( t | | = { } ) . s o u r c e E n c o d i n g | | ` U n i c o d e ` , o = t . o u t p u t E n c o d i n g , ( t . a u t o e n c o d e | | o ) & & E e [ x e ] . m e t a d a t a & & E e [ x e ] . m e t a d a t a [ i ] & & E e [ x e ] . m e t a d a t a [ i ] . e n c o d i n g & & ( a = E e [ x e ] . m e t a d a t a [ i ] . e n c o d i n g , ! o & & E e [ x e ] . e n c o d i n g & & ( o = E e [ x e ] . e n c o d i n g ) , ! o & & a . c o d e P a g e s & & ( o = a . c o d e P a g e s [ 0 ] ) , t y p e o f o = = ` s t r i n g ` & & ( o = a [ o ] ) , o ) ) { f o r ( c = ! 1 , s = [ ] , n = 0 , r = e . l e n g t h ; n < r ; n + + ) ( l = o [ e . c h a r C o d e A t ( n ) ] ) ? s . p u s h ( S t r i n g . f r o m C h a r C o d e ( l ) ) : s . p u s h ( e [ n ] ) , s [ n ] . c h a r C o d e A t ( 0 ) > > 8 & & ( c = ! 0 ) ; e = s . j o i n ( ` ` ) } f o r ( n = e . l e n g t h ; c = = = v o i d 0 & & n ! = = 0 ; ) e . c h a r C o d e A t ( n - 1 ) > > 8 & & ( c = ! 0 ) , n - - ; i f ( ! c ) r e t u r n e ; f o r ( s = t . n o B O M ? [ ] : [ 2 5 4 , 2 5 5 ] , n = 0 , r = e . l e n g t h ; n < r ; n + + ) { i f ( ( u = ( l = e . c h a r C o d e A t ( n ) ) > > 8 ) > > 8 ) t h r o w E r r o r ( ` C h a r a c t e r a t p o s i t i o n ` + n + ` o f s t r i n g ' ` + e + ` ' e x c e e d s 1 6 b i t s . C a n n o t b e e n c o d e d i n t o U C S - 2 B E ` ) ; s . p u s h ( u ) , s . p u s h ( l - ( u < < 8 ) ) } r e t u r n S t r i n g . f r o m C h a r C o d e . a p p l y ( v o i d 0 , s ) } ( e , t ) . r e p l a c e ( / \ \ / g , ` \ \ \ \ ` ) . r e p l a c e ( / \ ( / g , ` \ \ ( ` ) . r e p l a c e ( / \ ) / g , ` \ \ ) ` ) } , d t = p . _ _ p r i v a t e _ _ . b e g i n P a g e = f u n c t i o n ( e ) { i e [ + + P e ] = [ ] , F e [ P e ] = { o b j I d : 0 , c o n t e n t s O b j I d : 0 , u s e r U n i t : N u m b e r ( s ) , a r t B o x : n u l l , b l e e d B o x : n u l l , c r o p B o x : n u l l , t r i m B o x : n u l l , m e d i a B o x : { b o t t o m L e f t X : 0 , b o t t o m L e f t Y : 0 , t o p R i g h t X : N u m b e r ( e [ 0 ] ) , t o p R i g h t Y : N u m b e r ( e [ 1 ] ) } } , m t ( P e ) , s e ( i e [ B ] ) } , f t = f u n c t i o n ( e , t ) { v a r r , a , o ; s w i t c h ( n = t | | n , t y p e o f e = = ` s t r i n g ` & & ( r = _ ( e . t o L o w e r C a s e ( ) ) , A r r a y . i s A r r a y ( r ) & & ( a = r [ 0 ] , o = r [ Line truncated
` )},Ct=p.__private__.getBlob=function(e){return new Blob([le(e)],{type: ` application / pdf ` })},wt=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},Tt=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)),wt(i),wt(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}},Et=p.output=p.__private__.output=(K=function(e,t){switch(typeof(t||={})== ` string ` ?t={filename:t}:t.filename=t.filename|| ` generated . pdf ` ,e){case void 0:return St();case ` save ` :p.save(t.filename);break;case ` arraybuffer ` :return le(St());case ` blob ` :return Ct(St());case ` bloburi ` :case ` bloburl ` :if(Qf.URL!==void 0&&typeof Qf.URL.createObjectURL== ` function ` )return Qf.URL&&Qf.URL.createObjectURL(Ct(St()))||void 0;ep.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=St();try{n=sp(r)}catch{n=sp(unescape(encodeURIComponent(r)))}return ` data : application / pdf ; filename = ` +encodeURIComponent(t.filename)+ ` ; base64 , ` +n;case ` pdfobjectnewwindow ` :if(Object.prototype.toString.call(Qf)=== ` [ 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=Qf.open();if(o!==null){var s=Tt(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(Qf)===`[object Window]`){var u=t.pdfJsUrl||`examples/PDF.js/web/viewer.html`,d=Qf.open();if(d!==null){var f=Tt(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(Qf)!==`[object Window]`)throw Error(`The option dataurlnewwindow just works in a browser-environment.`);var g=Qf.open();if(g!==null){var _=Tt(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 Qf.document.location.href=this.output(`datauristring`,t);default:return null}},K.foo=function(){try{return K.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(!Qf.console)throw Error(t);Qf.console.error(t,n),Qf.alert&&alert(t)}},K.foo.bar=K,K.foo),Dt=function(e){return!0===Array.isArray(Le)&&Le.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=Dt( ` 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 q=null;R(),P();var Ot=p.__private__.getPageInfo=p.getPageInfo=function(e){if(isNaN(e)||e%1!=0)throw Error( ` Invalid argument passed to jsPDF . getPageInfo ` );return{objId:Fe[e].objId,pageNumber:e,pageContext:Fe[e]}},kt=p.__private__.getPageInfoByObjId=function(e){if(isNaN(e)||e%1!=0)throw Error( ` Invalid argument passed to jsPDF . getPageInfoByObjId ` );for(var t in Fe)if(Fe[t].objId===e)break;return Ot(t)},At=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Fe[B].objId,pageNumber:B,pageContext:Fe[B]}};p.addPage=function(){return ft.apply(this,arguments),this},p.setPage=function(){return mt.apply(this,arguments),se.call(this,ie[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=ie[e],r=Fe[e];for(var i=e;i>t;i--)ie[i]=ie[i-1],Fe[i]=Fe[i-1];ie[t]=n,Fe[t]=r,this.setPage(t)}else if(e<t){n=ie[e],r=Fe[e];for(var a=e;a<t;a++)ie[a]=ie[a+1],Fe[a]=Fe[a+1];ie[t]=n,Fe[t]=r,this.setPage(t)}return this},p.deletePage=function(){return pt.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 Be==0?(s=arguments[4],c=arguments[5],wi(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:Wt,S=h.internal.scaleFactor;function C(e){return e=e.split( ` ` ).join(Array(r.TabLen||9).join( ` ` )),ut(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:ut,activeFontKey:xe,fonts:Ee,activeFontSize:de}},Ie.publish( ` preProcessText ` ,a),e=a.text,s=(r=a.options).angle,m instanceof Be==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 Be(I,R,-R,I,0,0)}else s&&s instanceof Be&&(m=s);b!==y||m||(m=He),(l=r.charSpace||an)!==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 U,ee=de*x,te=h.internal.pageSize.getWidth(),ne=Ee[xe];l=r.charSpace||an,u=r.maxWidth||0,d=Object.assign({autoencode:!0,noBOM:!0},r.flags);var re=[],ie=function(e){return h.getStringUnitWidth(e,{font:ne,charSpace:l,fontSize:de,doKerning:!1})*de/S};if(Object.prototype.toString.call(e)=== ` [ object Array ] ` ){var ae;o=E(e),c!== ` left ` &&(U=o.map(ie));var oe,se=0;if(c=== ` right ` ){t-=U[0],e=[],N=o.length;for(var ce=0;ce<N;ce++)ce===0?(oe=Zt(t),ae=J(n)):(oe=k(se-U[ce]),ae=-ee),e.push([o[ce],oe,ae]),se=U[ce]}else if(c=== ` center ` ){t-=U[0]/2,e=[],N=o.length;for(var le=0;le<N;le++)le===0?(oe=Zt(t),ae=J(n)):(oe=k((se-U[le])/2),ae=-ee),e.push([o[le],oe,ae]),se=U[le]}else if(c=== ` left ` ){e=[],N=o.length;for(var ue=0;ue<N;ue++)e.push(o[ue])}else if(c=== ` justify ` &&ne.encoding=== ` Identity - H ` ){e=[],N=o.length,u=u===0?te:u;for(var fe=0,pe=0;pe<N;pe++)if(ae=pe===0?J(n):-ee,oe=pe===0?Zt(t):fe,pe<N-1){var he=k((u-U[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=(ie(ge[_e-1]+ ` ` +ge[_e])-ie(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?te:u,pe=0;pe<N;pe++){ae=pe===0?J(n):-ee,oe=pe===0?Zt(t):0;var ye=o[pe].split( ` ` ).length-1,be=ye>0?(u-U[pe])/ye:0;pe<N-1?re.push(w(k(be))):re.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:ut,activeFontKey:xe,fonts:Ee,activeFontSize:de}},Ie.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 Be?(n=typeof r.angle== ` number ` ?Ve(n,new Be(1,0,0,1,e,t)):Ve(new Be(1,0,0,1,e,t),n),b===y&&(n=Ve(new Be(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=Zt(t),we=J(n)}re!==void 0&&re[Ae]!==void 0&&(Oe=re[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 je= ` BT
/ ` ; r e t u r n j e + = x e + ` ` + d e + ` T f
` ,je+=w(de*x)+ ` TL
` ,je+=nn+ `
` ,je+=v,je+=e,W(je+= ` ET ` ),f[xe]=!0,h};var jt=p.__private__.clip=p.clip=function(e){return W(e=== ` evenodd ` ? ` W * ` : ` W ` ),this};p.clipEvenOdd=function(){return jt( ` evenodd ` )},p.__private__.discardPath=p.discardPath=function(){return W( ` n ` ),this};var Mt=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 Mt(e)&&(l=e),this};var Nt=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},Pt=p.close=function(){return W( ` h ` ),this};p.stroke=function(){return W( ` S ` ),this},p.fill=function(e){return Ft( ` f ` ,e),this},p.fillEvenOdd=function(e){return Ft( ` f * ` ,e),this},p.fillStroke=function(e){return Ft( ` B ` ,e),this},p.fillStrokeEvenOdd=function(e){return Ft( ` B * ` ,e),this};var Ft=function(e,t){wi(t)=== ` object ` ?Rt(t,e):W(e)},It=function(e){e===null||b===y&&e===void 0||(e=Nt(e),W(e))};function Lt(e,t,n,r,i){var a=new Ap(t||this.boundingBox,n||this.xStep,r||this.yStep,this.gState,i||this.matrix);return a.stream=this.stream,Ue(e+ ` $$ ` + this.cloneIndex+++ ` $$ ` ,a),a}var Rt=function(e,t){var n=Ae[e.key],r=ke[n];if(r instanceof kp)W( ` q ` ),W(zt(t)),r.gState&&p.setGState(r.gState),W(e.matrix.toString()+ ` cm ` ),W( ` / ` +n+ ` sh ` ),W( ` Q ` );else if(r instanceof Ap){var i=new Be(1,0,0,-1,0,xn());e.matrix&&(i=i.multiply(e.matrix||He),n=Lt.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 ` )}},zt=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 ` }},Bt=p.moveTo=function(e,t){return W(w(k(e))+ ` ` +w(A(t))+ ` m ` ),this},Vt=p.lineTo=function(e,t){return W(w(k(e))+ ` ` +w(A(t))+ ` l ` ),this},Ht=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)||!Mt(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)||!Mt(i)||typeof a!= ` boolean ` )throw Error( ` Invalid arguments passed to jsPDF . lines ` );for(Bt(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,Vt(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,Ht(d,f,p,m,h,g));return a&&Pt(),It(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 ` :Bt(r[0],r[1]);break;case ` l ` :Vt(r[0],r[1]);break;case ` c ` :Ht.apply(this,r);break;case ` h ` :Pt()}}return this},p.__private__.rect=p.rect=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!Mt(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( ` ` )),It(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)||!Mt(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)||!Mt(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)||!Mt(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 Bt(e+n,t),Ht(e+n,t-o,e+a,t-r,e,t-r),Ht(e-a,t-r,e-n,t-o,e-n,t),Ht(e-n,t+o,e-a,t+r,e,t+r),Ht(e+a,t+r,e+n,t+o,e+n,t),It(i),this},p.__private__.circle=p.circle=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||!Mt(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=gt(e,t,{disableWarning:!1}),this};var Ut=p.__private__.getFont=p.getFont=function(){return Ee[gt.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)),lt.call(this,e,t,n,i||= ` Id Line truncated
` ),i}},Xp=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?Zp(n+ ` ` +i[t+1][0],e,r).width<=s-4:!1};a++;t:for(;a>0;){t= ` ` ,a--;var l,u,d=Zp( ` 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 : ` +Zp(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=Zp(w,e,a).width,e.textAlign){case ` right ` :l=s-u-2;break;case ` center ` :l=(s-u)/2;break;default:l=2}t+=Lp(l)+ ` ` +Lp(p)+ ` Td
` ,t+= ` ( ` +Pp(w)+ ` ) Tj
` ,t+=-Lp(l)+ ` 0 Td
` ,p=-(a+2),u=0,m=b?h:h+1,v++,_= ` ` }break}return r.text=t,r.fontSize=a,r},Zp=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}},Qp={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1}, $ p=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)},em=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||!1===e.internal.acroformPlugin.isInitialized)){if(om.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(Qp)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw Error( ` Exception while creating AcroformDictionary ` );Np=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new am,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&& $ p(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&&=Jp(i.Rect,t),t.internal.newObjectDeferredBegin(i.objId,!0),i.DA=Z.createDefaultAppearanceStream(i),wi(i)=== ` object ` &&typeof i.getKeyValueListForStream== ` function ` &&(a=i.getKeyValueListForStream()),i.Rect=o,i.hasAppearanceStream&&!i.appearanceStreamContent){var s=Yp(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),wi(i)=== ` object ` &&typeof i.putStream== ` function ` &&i.putStream(),delete e[r]}}(t.internal.acroformPlugin.xForms,t)})(t,e)}),e.internal.acroformPlugin.isInitialized=!0}},tm=Mp.__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+= ` ` ),wi(e[a])){case ` boolean ` :case ` number ` :case ` object ` :i+=e[a].toString();break;case ` string ` :e[a].substr(0,1)=== ` / ` ?i+= ` / ` +Ip(e[a].substr(1)):(t!==void 0&&n&&(r=n.internal.getEncryptor(t)),i+= ` ( ` +Pp(r(e[a].toString()))+ ` ) ` )}return i+ ` ] ` }throw Error( ` Invalid argument passed to jsPDF . _ _acroform _ _ . arrayToPdfArray ` )},nm=function(e,t,n){var r=function(e){return e};return t!==void 0&&n&&(r=n.internal.getEncryptor(t)),(e||= ` ` ).toString(), ` ( ` +Pp(r(e))+ ` ) ` },rm=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})};rm.prototype.toString=function(){return this.objId+ ` 0 R ` },rm.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out( ` endobj ` )},rm.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:tm(i,this.objId,this.scope)}):i instanceof rm?(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 im=function(){rm.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}})};zp(im,rm);var am=function(){rm.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)), ` ( ` +Pp(t(e))+ ` ) ` }},set:function(t){e=t}})};zp(am,rm);var om=function e(){rm.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!!Gp(t,3)},set:function(e){!!e==1?this.F=Kp(t,3):this.F=qp(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 mm)return;a= ` FieldObject ` + e.FieldNum++}var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)), ` ( ` +Pp(t(a))+ ` ) ` },set:functio
Line truncated
` )}},set:function(e){wi(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= ` / ` +Ip(n)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e= ` / ` +Ip(t)}})};zp(dm,om);var fm=function(){dm.call(this),this.pushButton=!0};zp(fm,dm);var pm=function(){dm.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}})};zp(pm,dm);var mm=function(){var e,t;om.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+ ` ( ` +Pp(e(r[t]))+ ` ) ` );return n.push( ` >> ` ),n.join( `
` )},set:function(e){wi(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= ` / ` +Ip(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= ` / ` +Ip(t)}}),this.caption= ` l ` ,this.appearanceState= ` Off ` ,this._AppearanceType=Z.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};zp(mm,om),pm.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()}},pm.prototype.createOption=function(e){var t=new mm;return t.Parent=this,t.optionName=e,this.Kids.push(t),vm.call(this.scope,t),t};var hm=function(){dm.call(this),this.fontName= ` zapfdingbats ` ,this.caption= ` 3 ` ,this.appearanceState= ` On ` ,this.value= ` On ` ,this.textAlign= ` center ` ,this.appearanceStreamContent=Z.CheckBox.createAppearanceStream()};zp(hm,dm);var gm=function(){om.call(this),this.FT= ` / Tx ` ,Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Gp(this.Ff,13)},set:function(e){!!e==1?this.Ff=Kp(this.Ff,13):this.Ff=qp(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Gp(this.Ff,21)},set:function(e){!!e==1?this.Ff=Kp(this.Ff,21):this.Ff=qp(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Gp(this.Ff,23)},set:function(e){!!e==1?this.Ff=Kp(this.Ff,23):this.Ff=qp(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Gp(this.Ff,24)},set:function(e){!!e==1?this.Ff=Kp(this.Ff,24):this.Ff=qp(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Gp(this.Ff,25)},set:function(e){!!e==1?this.Ff=Kp(this.Ff,25):this.Ff=qp(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Gp(this.Ff,26)},set:function(e){!!e==1?this.Ff=Kp(this.Ff,26):this.Ff=qp(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}})};zp(gm,om);var _m=function(){gm.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Gp(this.Ff,14)},set:function(e){!!e==1?this.Ff=Kp(this.Ff,14):this.Ff=qp(this.Ff,14)}}),this.password=!0};zp(_m,gm);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=Vp(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=Xp(e,e.caption);return n.push( ` 0.749023 g ` ),n.push( ` 0 0 ` +Lp(Z.internal.getWidth(e))+ ` ` +Lp(Z.internal.getHeight(e))+ ` re ` ),n.push( ` f ` ),n.push( ` BMC ` ),n.push( ` q ` ),n.push( ` 0 0 1 rg ` ),n.push( ` / ` +r+ ` ` +Lp(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=Vp(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=Xp(e,e.caption);return i.push( ` 1 g ` ),i.push( ` 0 0 ` +Lp(o)+ ` ` +Lp(a)+ ` re ` ),i.push( ` f ` ),i.push( ` q ` ),i.push( ` 0 0 1 rg ` ),i.push( ` 0 0 ` +Lp(o-1)+ ` ` +Lp(a-1)+ ` re ` ),i.push( ` W ` ),i.push( ` n ` ),i.push( ` 0 g ` ),i.push( ` BT ` ),i.push( ` / ` +n+ ` ` +Lp(s.fontSize)+ ` Tf ` +r),i.push(s.text),i.push( ` ET ` ),i.push( ` Q ` ),t.stream=i.join( `
` ),t},OffPushDown:function(e){var t=Vp(e);t.scope=e.scope;var n=[];return n.push( ` 0.749023 g ` ),n.push( ` 0 0 ` +Lp(Z.internal.getWidth(e))+ ` ` +Lp(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=Vp(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 ` +Rp(Z.internal.getWidth(e)/2)+ ` ` +Rp(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=Vp(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 ` +Rp(Z.internal.getWidth(e)/2)+ ` ` +Rp(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 ` +Rp(Z.internal.getWidth(e)/2)+ ` ` +Rp(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=Vp(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 ` +Rp(Z.internal.getWidth(e)/2)+ ` ` +Rp(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=Vp(e);t.scope=e.scope;var n=[],r=Z.internal.calculateCross(e);return n.push( ` q ` ),n.push( ` 1 1 ` +Lp(Z.internal.getWidth(e)-2)+ ` ` +Lp(Z.internal.getHeight(e)-2)+ ` re ` ),n.push( ` W ` ),n.push( ` n ` ),n.push(Lp(r.x1.x)+ ` ` +Lp(r.x1.y)+ ` m ` ),n.push(Lp(r.x2.x)+ ` ` +Lp(r.x2.y)+ ` l ` ),n.push(Lp(r.x4.x)+ ` ` +Lp(r.x4.y)+ ` m ` ),n.push(Lp(r.x3.x)+ ` ` +Lp(r.x3.y)+ ` l ` ),n.push( ` s ` ),n.push( ` Q ` ),t.stream=n.join( `
` ),t},YesPushDown:function(e){var t=Vp(e);t.scope=e.scope;var n=Z.internal.calculateCross(e),r=[];return r.push( ` 0.749023 g ` ),r.push( ` 0 0 ` +Lp(Z.internal.getWidth(e))+ ` ` +Lp(Z.internal.getHeight(e))+ ` re ` ),r.push( ` f ` ),r.push( ` q ` ),r.push( ` 1 1 ` +Lp(Z.internal.getWidth(e)-2)+ ` ` +Lp(Z.internal.getHeight(e)-2)+ ` re ` ),r.push( ` W ` ),r.push( ` n ` ),r.push(Lp(n.x1.x)+ ` ` +Lp(n.x1.y)+ ` m ` ),r.push(Lp(n.x2.x)+ ` ` +Lp(n.x2.y)+ ` l ` ),r.push(Lp(n.x4.x)+ ` ` +Lp(n.x4.y)+ ` m ` ),r.push(Lp(n.x3.x)+ ` ` +Lp(n.x3.y)+ ` l ` ),r.push( ` s ` ),r.push( ` Q ` ),t.stream=r.join( `
` ),t},OffPushDown:function(e){var t=Vp(e);t.scope=e.scope;var n=[];return n.push( ` 0.749023 g ` ),n.push( ` 0 0 ` +Lp(Z.internal.getWidth(e))+ ` ` +Lp(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 wi(e)=== ` object ` &&(t=Bp(e.Rect[2])),t},Z.internal.getHeight=function(e){var t=0;return wi(e)=== ` object ` &&(t=Bp(e.Rect[3])),t};var vm=Mp.addField=function(e){if(em(this,e),!(e instanceof om))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};Mp.AcroFormChoiceField=sm,Mp.AcroFormListBox=cm,Mp.AcroFormComboBox=lm,Mp.AcroFormEditBox=um,Mp.AcroFormButton=dm,Mp.AcroFormPushButton=fm,Mp.AcroFormRadioButton=pm,Mp.AcroFormCheckBox=hm,Mp.AcroFormTextField=gm,Mp.AcroFormPasswordField=_m,Mp.AcroFormAppearance=Z,Mp.AcroForm={ChoiceField:sm,ListBox:cm,ComboBox:lm,EditBox:um,Button:dm,PushButton:fm,RadioButton:pm,CheckBox:hm,TextField:gm,PasswordField:_m,Appearance:Z},jp.AcroForm={ChoiceField:sm,ListBox:cm,ComboBox:lm,EditBox:um,Button:dm,PushButton:fm,RadioButton:pm,CheckBox:hm,TextField:gm,PasswordField:_m,Appearance:Z},jp.AcroForm;function ym(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: ` [ / I n d e x e d / D e v i c e R G B ` + ( t . p a l e t t e . l e n g t h / 3 - 1 ) + ` ` + ( ` s M a s k ` i n t & & t . s M a s k ! = = v o i d 0 ? t . o b j e c t I d + 2 : t . o b j e c t I d + 1 ) + ` 0 R ] ` } ) : ( a . p u s h ( { k e y : ` C o l o r S p a c e ` , v a l u e : ` / ` + t . c o l o r S p a c e } ) , t . c o l o r S p a c e = = = _ . D E V I C E _ C M Y K & & a . p u s h ( { k e y : ` D e c o d e ` , v a l u e : ` [ 1 0 1 0 1 0 1 0 ] ` } ) ) , a . p u s h ( { k e y : ` B i t s P e r C o m p o n e n t ` , v a l u e : t . b i t s P e r C o m p o n e n t } ) , ` d e c o d e P a r a m e t e r s ` i n t & & t . d e c o d e P a r a m e t e r s ! = = v o i d 0 & & a . p u s h ( { k e y : ` D e c o d e P a r m s ` , v a l u e : ` < < ` + t . d e c o d e P a r a m e t e r s + ` > > ` } ) , ` t r a n s p a r e n c y ` i n t & & A r r a y . i s A r r a y ( t . t r a n s p a r e n c y ) & & t . t r a n s p a r e n c y . l e n g t h > 0 ) { f o r ( v a r o = ` ` , s = 0 , c = t . t r a n s p a r e n c y . l e n g t h ; s < c ; s + + ) o + = t . t r a n s p a r e n c y [ s ] + ` ` + t . t r a n s p a r e n c y [ s ] + ` ` ; a . p u s h ( { k e y : ` M a s k ` , v a l u e : ` [ ` + o + ` ] ` } ) } t . s M a s k ! = = v o i d 0 & & a . p u s h ( { k e y : ` S M a s k ` , v a l u e : t . o b j e c t I d + 1 + ` 0 R ` } ) ; v a r l = t . f i l t e r = = = v o i d 0 ? v o i d 0 : [ ` / ` + t . f i l t e r ] ; i f ( r ( { d a t a : t . d a t a , a d d i t i o n a l K e y V a l u e s : a , a l r e a d y A p p l i e d F i l t e r s : l , o b j e c t I d : t . o b j e c t I d } ) , n ( ` e n d o b j ` ) , ` s M a s k ` i n t & & t . s M a s k ! = = v o i d 0 ) { v a r u = t . s M a s k B i t s P e r C o m p o n e n t ? ? t . b i t s P e r C o m p o n e n t , d = { w i d t h : t . w i d t h , h e i g h t : t . h e i g h t , c o l o r S p a c e : ` D e v i c e G r a y ` , b i t s P e r C o m p o n e n t : u , d a t a : t . s M a s k } ; ` f i l t e r ` i n t & & ( d . d e c o d e P a r a m e t e r s = ` / P r e d i c t o r $ { t . p r e d i c t o r } / C o l o r s 1 / B i t s P e r C o m p o n e n t $ { u } / C o l u m n s $ { t . w i d t h } ` , d . f i l t e r = t . f i l t e r ) , e . c a l l ( t h i s , d ) } i f ( t . c o l o r S p a c e = = = _ . I N D E X E D ) { v a r f = t h i s . i n t e r n a l . n e w O b j e c t ( ) ; r ( { d a t a : w ( n e w U i n t 8 A r r a y ( t . p a l e t t e ) ) , o b j e c t I d : f } ) , n ( ` e n d o b j ` ) } } , o = f u n c t i o n ( ) { v a r e = t h i s . i n t e r n a l . c o l l e c t i o n s [ t + ` i m a g e s ` ] ; f o r ( v a r n i n e ) a . c a l l ( t h i s , e [ n ] ) } , s = f u n c t i o n ( ) { v a r e , n = t h i s . i n t e r n a l . c o l l e c t i o n s [ t + ` i m a g e s ` ] , r = t h i s . i n t e r n a l . w r i t e ; f o r ( v a r i i n n ) r ( ` / I ` + ( e = n [ i ] ) . i n d e x , e . o b j e c t I d , ` 0 ` , ` R ` ) } , c = f u n c t i o n ( ) { t h i s . i n t e r n a l . c o l l e c t i o n s [ t + ` i m a g e s ` ] | | ( t h i s . i n t e r n a l . c o l l e c t i o n s [ t + ` i m a g e s ` ] = { } , t h i s . i n t e r n a l . e v e n t s . s u b s c r i b e ( ` p u t R e s o u r c e s ` , o ) , t h i s . i n t e r n a l . e v e n t s . s u b s c r i b e ( ` p u t X o b j e c t D i c t ` , s ) ) } , l = f u n c t i o n ( ) { v a r e = t h i s . i n t e r n a l . c o l l e c t i o n s [ t + ` i m a g e s ` ] ; r e t u r n c . c a l l ( t h i s ) , e } , u = f u n c t i o n ( ) { r e t u r n O b j e c t . k e y s ( t h i s . i n t e r n a l . c o l l e c t i o n s [ t + ` i m a g e s ` ] ) . Line 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}}])}(jp.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}}(jp.API),jp.API.processPNG=function(e,t,n,r){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var i,a=qf(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=is(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=is(i[qm(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++)Jm(_,qm(g,x+S,a),b*l+S,a);var C=qm(g,x+l,a);C<(1<<a)-1&&(y=!0),Jm(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!==jp.API.image_compression.NONE&&typeof $ o== ` function ` ?(C=function(e){var t;switch(e){case jp.API.image_compression.FAST:t=11;break;case jp.API.image_compression.MEDIUM:t=13;break;case jp.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=zm(v,Math.ceil(o*g*u/8),g,u,r),b&&(p=zm(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 Xm(t),o=a.width,s=a.height,c=[];a.decodeAndBlitFrameRGBA(0,c);var l={data:c,width:o,height:s},u=new Qm(100).encode(l,100);return e.processJPEG.call(this,u,n,r,i)},e.processGIF87A=e.processGIF89A}(jp.API), $ m.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=Fm.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=Pm.apply(this,[r,n])).reduce(function(e,t){return e+t},0))>t||y){if(m>t){for(s=Im.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)},Nm.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(Lm.apply(this,[r[s],o,a]));return l},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t= ` 0123456789 abcdef ` ,n= ` klmnopqrstuvwxyz ` ,r={},i={},a=0;a<16;a++)r[n[a]]=t[a],i[t[a]]=n[a];var o=function(e){return ` 0 x ` +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(wi(t)!== ` object ` )throw Error( ` Don 't know what to do with value type `+wi(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( ` { 19 m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y } ` )},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' 6 o } 'kerning' { 'fof' - 6 o } } ` ),"Times-BoldItalic":c( ` { 'widths' { k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t 'fof' 6 obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m } 'kerning' { cl { 4 qu5kt5qt5rs17ss5ts } 201 s { 201 ss } 201 t { cks4lscmscnscoscpscls2wu2yu201ts } 201 x { 2 wu2yu } 2 k { 201 ts } 2 w { 4 qx5kx5ou5qx5rs17su5tu } 2 x { 17 su5tu5ou } 2 y { 4 qx5kx5ou5qx5rs17ss5ts } 'fof' - 6 ofn { 17 sw5tw5ou5qw5rs } 7 t { cksclscmscnscoscps4ls } 3 u { 17 su5tu5os5qs } 3 v { 17 su5tu5os5qs } 7 p { 17 su5tu } ck { 4 qu5kt5qt5rs17ss5ts } 4 l { 4 qu5kt5qt5rs17ss5ts } cm { 4 qu5kt5qt5rs17ss5ts } cn { 4 qu5kt5qt5rs17ss5ts } co { 4 qu5kt5qt5rs17ss5ts } cp { 4 qu5kt5qt5rs17ss5ts } 6 l { 4 qu5ou5qw5rt17su5tu } 5 q { ckuclucmucnucoucpu4lu } 5 r { ckuclucmucnucoucpu4lu } 7 q { cksclscmscnscoscps4ls } 6 p { 4 qu5ou5qw5rt17sw5tw } ek { 4 qu5ou5qw5rt17su5tu } el { 4 qu5ou5qw5rt17su5tu } em { 4 qu5ou5qw5rt17su5tu } en { 4 qu5ou5qw5rt17su5tu } eo { 4 qu5ou5qw5rt17su5tu } ep { 4 qu5ou5qw5rt17su5tu } es { 17 ss5ts5qs4qu } et { 4 qu5ou5qw5rt17sw5tw } eu { 4 qu5ou5qw5rt17ss5ts } ev { 17 ss5ts5qs4qu } 6 z { 17 sw5tw5ou5qw5rs } fm { 17 sw5tw5ou5qw5rs } 7 n { 201 ts } fo { 17 sw5tw5ou5qw5rs } fp { 17 sw5tw5ou5qw5rs } fq { 17 sw5tw5ou5qw5rs } 7 r { cksclscmscnscoscps4ls } fs { 17 sw5tw5ou5qw5rs } ft { 17 su5tu } fu { 17 su5tu } fv { 17 su5tu } fw { 17 su5tu } fz { cksclscmscnscoscps4ls } } } ` ),"Helvetica-Bold":c( ` { 'widths' { k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6 Line truncated
<<
` +t.join( `
` )+ `
>> ` )}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},jp.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`,nh),this.internal.events.subscribe(`postPutResources`,th)),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
/ C I D S y s t e m I n f o < <
/ R e g i s t r y ( A d o b e )
/ O r d e r i n g ( U C S )
/ S u p p l e m e n t 0
>> def
/ C M a p N a m e / A d o b e - I d e n t i t y - U C S d e f
/ C M a p T y p e 2 d e f
1 begincodespacerange
< 0000 > < ffff >
endcodespacerange ` ,r=[],o=0,s=(n=Object.keys(e).sort(function(e,t){return e-t})).length;o<s;o++)t=n[o],r.length>=100&&(a+= `
` +r.length+ ` beginbfchar
` +r.join( `
` )+ `
endbfchar ` ,r=[]),e[t]!==void 0&&e[t]!==null&&typeof e[t].toString== ` function ` &&(i=( ` 0000 ` +e[t].toString(16)).slice(-4),t=( ` 0000 ` +(+t).toString(16)).slice(-4),r.push( ` < ` +t+ ` > < ` +i+ ` > ` ));return r.length&&(a+= `
` +r.length+ ` beginbfchar
` +r.join( `
` )+ `
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 / ` +Tp(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 / ` +Tp(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 / ` +Tp(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 / ` +Tp(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( ` << / S u b t y p e / T r u e T y p e / T y p e / F o n t / T o U n i c o d e ` + d + ` 0 R / B a s e F o n t / ` + T p ( n . f o n t N a m e ) + ` / F o n t D e s c r i p t o r ` + f + ` 0 R / E n c o d i n g / ` + n . e n c o d i n g + ` / F i r s t C h a r 2 9 / L a s t C h a r 2 5 5 / W i d t h s ` + e . A P I . P D F O b j e c t . c o n v e r t ( n . m e t a d a t a . h m t x . w i d t h s ) + ` > > ` ) , i ( ` e n d o b j ` ) , n . i s A l r e a d y P u t t e d = ! 0 } } ) ( t ) } ] ) ; v a r i = f u n c t i o n ( e ) { v a r t , r = e . t e x t | | ` ` , i = e . x , a = e . y , o = e . o p t i o n s | | { } , s = e . m u t e x | | { } , c = s . p d f E s c a p e , l = s . a c t i v e F o n t K e y , u = s . f o n t s , d = l , f = ` ` , p = 0 , m = ` ` , h = u [ d ] . e n c o d i n g ; i f ( u [ d ] . e n c o d i n g ! = = ` I d e n t i t y - H ` ) r e t u r n { t e x t : r , x : i , y : a , o p t i o n s : o , m u t e x : s } ; f o r ( m = r , d = l , A r r a y . i s A r r a y ( r ) & & ( m = r [ 0 ] ) , p = 0 ; p < m . l e n g t h ; p + = 1 ) u [ d ] . m e t a d a t a . h a s O w n P r o p e r t y ( ` c m a p ` ) & & ( t = u [ d ] . m e t a d a t a . c m a p . u n i c o d e . c o d e M a p [ m [ p ] . c h a r C o d e A t ( 0 ) ] ) , t | | m [ p ] . c h a r C o d e A t ( 0 ) < 2 5 6 & & u [ d ] . m e t a d a t a . h a s O w n P r o p e r t y ( ` U n i c o d e ` ) ? f + = m [ p ] : f + = ` ` ; v a r g = ` ` ; r e t u r n p a r s e I n t ( d . s l i c e ( 1 ) ) < 1 4 | | h = = = ` W i n A n s i E n c o d i n g ` ? g = c ( f , d ) . s p l i t ( ` ` ) . m a p ( f u n c t i o n ( e ) { r e t u r n e . c h a r C o d e A t ( 0 ) . t o S t r i n g ( 1 6 ) } ) . j o i n ( ` ` ) : h = = = ` I d e n t i t y - H ` & & ( g = n ( f , u [ d ] ) ) , s . i s H e x = ! 0 , { t e x t : g , x : i , y : a , o p t i o n s : o , m u t e x : s } } ; t . e v e n t s . p u s h ( [ ` p o s t P r o c e s s T e x t ` , f u n c t i o n ( e ) { v a r t = e . t e x t | | ` ` , n = [ ] , r = { t e x t : t , x : e . x , y : e . y , o p t i o n s : e . o p t i o n s , m u t e x : e . m u t e x } ; i f ( A r r a y . i s A r r a y ( t ) ) { v a r a = 0 ; f o r ( a = 0 ; a < t . l e n g t h ; a + = 1 ) A r r a y . i s A r r a y ( t [ a ] ) & & t [ a ] . l e n g t h = = = 3 ? n . p u s h ( [ i ( O b j e c t . a s s i g n ( { } , r , { t e x t : t [ a ] [ 0 ] } ) ) . t e x t , t [ a ] [ 1 ] , t [ a ] [ 2 ] ] ) : n . p u s h ( i ( O b j e c t . a s s i g n ( { } , r , { t e x t : t [ a ] } ) ) . t e x t ) ; e . t e x t = n } e l s e e . t e x t = i ( O b j e c t . a s s i g n ( { } , r , { t e x t : t } ) ) . t e x t } ] ) } ( j p ) , f u n c t i o n ( e ) { v a r t = f u n c t i o n ( ) { r e t u r n t h i s . i n t e r n a l . v F S = = = v o i d 0 & & ( t h i s . i n t e r n a l . v F S = { } ) , ! 0 } ; e . e x i s t s F i l e I n V F S = f u n c t i o n ( e ) { r e t u r n t . c a l l ( t h i s ) , t h i s . i n t e r n a l . v F S [ e ] ! = = v o i d 0 } , e . a d d F i l e T o V F S = f u n c t i o n ( e , n ) { r e t u r n t . c a l l ( t h i s ) , t h i s . i n t e r n a l . v F S [ e ] = n , t h i s } , e . g e t F i l e F r o m V F S = f u n c t i o n ( e ) { r e t u r n t . c a l l ( t h i s ) , t h i s . i n t e r n a l . v F S [ e ] = = = v o i d 0 ? n u l l : t h i s . i n t e r n a l . v F S [ e ] } } ( j p . A P I ) , f u n c t i o n ( e ) { e . _ _ b i d i E n g i n e _ _ = e . p r o t o t y p e . _ _ b i d i E n g i n e _ _ = f u n c t i o n ( e ) { v a r 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 , 1 7 , 2 , 0 , 1 ] , [ 0 , 3 , 5 , 5 , 4 , 1 , 0 ] , [ 0 , 3 , 2 1 , 2 1 , 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 , 3 3 , 3 , 1 , 1 ] ] , f = { L : 0 , R : 1 , E N : 2 , A N : 3 , N : 4 , B : 5 , S : 6 } , p = { 0 : 0 , 5 : 1 , 6 : 2 , 7 : 3 , 3 2 : 4 , 2 5 1 : 5 , 2 5 4 : 6 , 2 5 5 : 7 } , m = ` ( . ) . ( . < . > . < . [ . ] . [ . { . } . { . « . » . « . ‹ . › . ‹ . ⁅ . ⁆ . ⁅ . ⁽ . ⁾ . ⁽ . ₍ . ₎ . ₍ . ≤ . ≥ . ≤ . 〈 . 〉 . 〈 . ﹙ . ﹚ . ﹙ . ﹛ . ﹜ . ﹛ . ﹝ . ﹞ . ﹝ . ﹤ . ﹥ . ﹤ ` . s p l i t ( ` . ` ) , h = n e w R e g E x p ( / ^ ( [ 1 - 4 | 9 ] | 1 [ 0 - 9 ] | 2 [ 0 - 9 ] | 3 [ 0 1 6 8 ] | 4 [ 0 4 5 8 9 ] | 5 [ 0 1 2 ] | 7 [ 7 8 ] | 1 5 9 | 1 6 [ 0 - 9 ] | 1 7 [ 0 - 2 ] | 2 1 [ 5 6 9 ] | 2 2 [ 0 3 4 8 9 ] | 2 5 0 ) $ / ) , g = ! 1 , _ = 0 ; t h i s . _ _ b i d i E n g i n e _ _ = { } ; v a r v = f u n c t i o n ( e ) { v a r t = e . c h a r C o d e A t ( ) , n = t > > 8 , r = p [ n ] ; r e t u r n r = = = v o i d 0 ? n = = = 2 5 2 | | n = = = 2 5 3 ? ` A L ` : h . t e s t ( n ) ? ` L ` : n = = = 8 ? ` R ` : ` N ` : l [ 2 5 6 * r + ( 2 5 5 & t ) ] } , y = f u n c t i o n ( e ) { f o r ( v a r t , n = 0 ; n < e . l e n g t h ; n + + ) { i f ( ( t = v ( e . c h a r A t ( n ) ) ) = = = ` L ` ) r e t u r n ! 1 ; i f ( t = = = ` R ` ) r e t u r n ! 0 } r e t u r n ! 1 } , b = f u n c t i o n ( e , t , o , s ) { v a r c , l , u , d , f = t [ s ] ; s w i t Line truncated
` )}return ` ` +n},t}();function wh(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 Th={},Eh=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:Th=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 Th||{}},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}(),Dh=function(e,t){return Dh=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])},Dh(e,t)};function Oh(e,t){if(typeof t!= ` function ` &&t!==null)throw TypeError( ` Class extends value ` +String(t)+ ` is not a constructor or null ` );Dh(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var kh=function(e){Oh(t,e);function t(t){var n=e.call(this)||this;return n._element=t,n}return t}(Array);function Ah(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 jh(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 Mh(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 Nh(e,t,n,r){var i=t
Line truncated
` ),t.innerText||t.textContent|| ` ` }function Gh(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 Kh(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 qh(e,t){var n=new Eh(e),r=n.getDocumentOptions(),i=n.getGlobalOptions();Gh(i,r,t);var a=Kh({},i,r,t),o;typeof window< ` u ` &&(o=window);var s=Jh(i,r,t),c=Yh(i,r,t),l=Xh(n,a),u=Qh(n,a,o);return{id:t.tableId,content:u,hooks:c,styles:s,settings:l}}function Jh(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=Kh({},a,o,s)}else{var c=[e,t,n].map(function(e){return e[i]||{}});r[i]=Kh({},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 Yh(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 Xh(e,t){var n=Fh(t.margin,40/e.scaleFactor()),r=Zh(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 Zh(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 Qh(e,t,n){var r=t.head||[],i=t.body||[],a=t.foot||[];if(t.html){var o=t.includeHiddenHtml;if(n){var s=Hh(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|| $ h(r,i,a),head:r,body:i,foot:a}}function $ h(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 eg=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}(),tg=function(e){Oh(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}(eg),ng=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 tg(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 eg(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 eg(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}(),rg=function(){function e(e,t,n,r,i){i===void 0&&(i=!1),this.height=0,this.raw=e,e instanceof kh&&(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" > < / d i v >
<!-- Marker chính màu xanh -- >
< div class = "w-5 h-5 bg-blue-600 rounded-full border-2 border-white shadow-xl flex items-center justify-center z-10" >
<!-- Mũi tên chỉ hướng nhìn ( xoay theo heading ) -- >
< div style = "transform: rotate(${V}deg); transition: transform 0.2s ease-out;" class = "absolute inset-0 flex flex-col items-center" >
< div class = "w-0 h-0 border-l-[5px] border-l-transparent border-r-[5px] border-r-transparent border-b-[8px] border-b-white mt-[1px]" > < / d i v >
< / d i v >
< / d i v >
< / d i v >
` ,iconSize:[32,32],iconAnchor:[16,16]})}),[V]);(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[re,se]=(0,y.useState)(!1),[W,ce]=(0,y.useState)(!1),[le,me]=(0,y.useState)(null),[he,ge]=(0,y.useState)(null),[ye,xe]=(0,y.useState)(null),[we,Te]=(0,y.useState)(!1),[Ee,ke]=(0,y.useState)(null),Ae=(0,y.useMemo)(()=>{let e=localStorage.getItem( ` token ` );if(!e)return null;try{return JSON.parse(atob(e.split( ` . ` )[1])).sub}catch{return null}},[]),[je,Me]=(0,y.useState)([]),[Ne,Le]=(0,y.useState)(i?.title?? ` ` ),[Re,ze]=(0,y.useState)(i?.description?? ` ` ),[Be,Ve]=(0,y.useState)(i?.adultCount??0),[He,K]=(0,y.useState)(i?.childCount??0),[We,Ge]=(0,y.useState)(i?.childDiscount??0),[Ke,qe]=(0,y.useState)(i?.tags??[]),[Je,Ye]=(0,y.useState)( ` ` ),Xe=[ ` Văn hóa ` , ` Mạo hiểm ` , ` Nghỉ dưỡng ` , ` Thư giãn ` , ` Ẩm thực ` , ` Khám phá ` , ` Gia đình ` ],[Ze,Qe]=(0,y.useState)( ` all ` ), $ e=(0,y.useMemo)(()=>{if(!i?.photos)return[];let e=i.photos;if(Ze!== ` all ` ){let t=a.find(e=>e.id===Ze);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,Ze,a]);(0,y.useEffect)(()=>{ $ e.length>0&&!Ee?ke( $ e[0]):Ee&&! $ e.some(e=>e.id===Ee.id)&&ke( $ e.length>0? $ e[0]:null)},[ $ e,Ee]);let[et,tt]=(0,y.useState)(!1),[nt,rt]=(0,y.useState)( ` ` ),[it,at]=(0,y.useState)( ` ` ),[ot,st]=(0,y.useState)(null),[ct,lt]=(0,y.useState)( ` ` ),[ut,dt]=(0,y.useState)([]),[ft,pt]=(0,y.useState)(!1),[mt,ht]=(0,y.useState)(0),[gt,_t]=(0,y.useState)(!1),[vt,yt]=(0,y.useState)(!1),[bt,xt]=(0,y.useState)( ` driving ` ),[St,Ct]=(0,y.useState)([]),[wt,Tt]=(0,y.useState)(0),[Et,Dt]=(0,y.useState)(null),[q,Ot]=(0,y.useState)([]),[kt,At]=(0,y.useState)([]),jt=async e=>{if(lt(e),e.trim().length<2){dt([]);return}pt(!0);try{dt(await(await fetch( ` https : //nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(e)}&limit=5&addressdetails=1&namedetails=1&accept-language=vi`)).json())}catch(e){console.error(`Lỗi tìm kiếm:`,e)}finally{pt(!1)}},Mt=async e=>{if(await qt({title:`Xóa ảnh này?`,message:`Bạn có chắc chắn muốn xóa ảnh này khỏi chuyến đi? Hành động này không thể hoàn tác.`}))try{if(!(await fetch(`/api/v1/photos/${e}`,{method:`DELETE`,headers:{Authorization:`Bearer ${localStorage.getItem(`token`)}`}})).ok)throw Error(`Không thể xóa ảnh`);Jt({title:`Thành công`,message:`Đã xóa ảnh.`,type:`success`}),Nt(t),ke(null)}catch{Jt({title:`Lỗi`,message:`Không thể xóa ảnh. Vui lòng thử lại.`,type:`error`})}},Nt=Tn(e=>e.fetchTour),Pt=Tn(e=>e.fetchPublicTourDetails);(0,y.useEffect)(()=>{i&&qe(i.tags||[])},[i]);let Ft=e=>{let t=Tn.getState().legs.map(t=>({...t,locations:t.locations.map(t=>t.id===e?{...t,_count:{...t._count,comments:(t._count?.comments||0)+1}}:t)}));Tn.setState({legs:t})},It=e=>{let t=Tn.getState().legs.map(t=>({...t,locations:t.locations.map(t=>t.id===e?{...t,_count:{...t._count,comments:Math.max(0,(t._count?.comments||1)-1)}}:t)}));Tn.setState({legs:t})};Tn(e=>e.fetchPublicTours);let Lt=Tn(e=>e.setMapCenter),Rt=Tn(e=>e.updateTourStartPoint),zt=Tn(e=>e.updateTourEndPoint),Bt=Tn(e=>e.updateTourDetails);Tn(e=>e.initializeLegs);let Vt=Tn(e=>e.addLocation),Ht=Tn(e=>e.removeMember),Ut=Tn(e=>e.fetchJoinRequests),Wt=Tn(e=>e.acceptJoinRequest),Gt=Tn(e=>e.rejectJoinRequest),Kt=Tn(e=>e.deleteTour),qt=lo(),Jt=Ue(),[Yt]=(0,y.useState)(()=>{let e=localStorage.getItem(`map_view_state`);if(e)try{return JSON.parse(e)}catch{return null}return null}),Xt=n?!1:[`OWNER`,`MANAGER`].includes(o||``),Zt=n?!1:[`OWNER`,`MANAGER`,`MEMBER`].includes(o||``),Qt=n?!1:[`OWNER`,`MANAGER`,`MEMBER`,`MEMBER_NO_FINANCE`].includes(o||``),$t=n?!1:o===`OWNER`,on=n||[`OWNER`,`MANAGER`,`MEMBER`].includes(o||``);(0,y.useEffect)(()=>{n?Pt(t):i&&[`OWNER`,`MANAGER`].includes(o||``)&&Ut(i.id).then(Me).catch(()=>Me([])),t&&(n?Pt(t):Nt(t))},[t,n,o]),(0,y.useEffect)(()=>{if(i&&i.photos&&i.photos.length>0){if(Ze===`all`&&!Ee)ke(i.photos[0]);else if(Ze!==`all`){let e=a.find(e=>e.id===Ze);if(e){let t=e.locations.map(e=>e.id),n=i.photos.filter(e=>e.locationId&&t.includes(e.locationId));n.length>0&&!Ee?ke(n[0])
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 } < / s p a n >
< / d i v >
< p style = "margin: 0; color: #4b5563; font-size: 14px; line-height: 1.5;" > < strong > 📍 $ { e } : < / s t r o n g > $ { t } < / p >
< / d i v >
< 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 } < / s t r o n g > c ủ a b ạ n t ạ i đ â y . . . < / p > ` + d , c r e a t e d A t : n e w D a t e ( ) . t o I S O S t r i n g ( ) } ; l . u n s h i f t ( e ) } l o c a l S t o r a g e . s e t I t e m ( ` m y _ j o u r n e y _ n o t e s ` , J S O N . s t r i n g i f y ( l ) ) , J t ( { t i t l e : ` T h à n h c ô n g ` , m e s s a g e : ` Đ ã l ư u v à o g h i c h ú c h u n g ! ` , t y p e : ` s u c c e s s ` } ) } , g n = a s y n c ( ) = > { i f ( i & & a w a i t q t ( { t i t l e : ` X ó a T o u r v ĩ n h v i ễ n ? ` , m e s s a g e : ` T o à n b ộ d ữ l i ệ u v ề l ộ t r ì n h , c h i p h í v à h ì n h ả n h c ủ a c h u y ế n đ i n à y s ẽ b ị x ó a b ỏ h o à n t o à n . B ạ n c ó c h ắ c c h ắ n m u ố n t h ự c h i ệ n ? ` } ) ) t r y { a w a i t K t ( i . i d ) , J t ( { t i t l e : ` T h à n h c ô n g ` , m e s s a g e : ` H à n h t r ì n h đ ã đ ư ợ c x ó a . ` , t y p e : ` s u c c e s s ` } ) , e ( ) } c a t c h ( e ) { J t ( { t i t l e : ` L ỗ i ` , m e s s a g e : e . m e s s a g e | | ` K h ô n g t h ể x ó a h à n h t r ì n h . ` , t y p e : ` e r r o r ` } ) } } , _ n = y . u s e R e f ( n u l l ) ; ( 0 , y . u s e E f f e c t ) ( ( ) = > { E t & & _ n . c u r r e n t & & J . d e f a u l t . D o m E v e n t . d i s a b l e C l i c k P r o p a g a t i o n ( _ n . c u r r e n t ) } , [ E t ] ) , ( 0 , y . u s e E f f e c t ) ( ( ) = > { D t ( n u l l ) } , [ m , g ] ) ; l e t v n = ( 0 , y . u s e M e m o ) ( ( ) = > a . f l a t M a p ( e = > e . l o c a t i o n s ) . f i n d ( e = > e . p l a n n e d S t a r t & & n e w D a t e ( e . p l a n n e d S t a r t ) . g e t T i m e ( ) = = = 0 ) , [ a ] ) , y n = ( 0 , y . u s e M e m o ) ( ( ) = > a . f l a t M a p ( e = > e . l o c a t i o n s ) . f i n d ( e = > e . p l a n n e d E n d & & n e w D a t e ( e . p l a n n e d E n d ) . g e t T i m e ( ) = = = 0 ) , [ a ] ) , b n = [ { i d : ` p l a n ` , l a b e l : ` L ộ t r ì n h ` , i c o n : d e , v i s i b l e : ! 0 } , { i d : ` e x p e n s e ` , l a b e l : ` C h i p h í ` , i c o n : F e , v i s i b l e : [ ` O W N E R ` , ` M A N A G E R ` , ` M E M B E R ` ] . i n c l u d e s ( o | | ` ` ) } , { i d : ` p h o t o ` , l a b e l : ` Ả n h ` , i c o n : n e , v i s i b l e : ! 0 } , { i d : ` s e t t i n g s ` , l a b e l : ` C à i đ ặ t ` , i c o n : S e , v i s i b l e : o = = = ` O W N E R ` } ] . f i l t e r ( e = > e . v i s i b l e ) , x n = [ ` O W N E R ` , ` M A N A G E R ` , ` M E M B E R ` ] . i n c l u d e s ( o | | ` ` ) , S n = ( 0 , y . u s e M e m o ) ( ( ) = > { i f ( i ? . s t a r t D a t e & & i ? . e n d D a t e ) r e t u r n ` $ { n e w D a t e ( i . s t a r t D a t e ) . t o L o c a l e D a t e S t r i n g ( ` v i - V N ` ) } - $ { n e w D a t e ( i . e n d D a t e ) . t o L o c a l e D a t e S t r i n g ( ` v i - V N ` ) } ` ; l e t e = a [ 0 ] , t = a [ a . l e n g t h - 1 ] , n = e ? . s t a r t D a t e , r = t ? . e n d D a t e | | t ? . s t a r t D a t e ; r e t u r n n & & r ? ` $ { n e w D a t e ( n ) . t o L o c a l e D a t e S t r i n g ( ` v i - V N ` ) } - $ { n e w D a t e ( r ) . t o L o c a l e D a t e S t r i n g ( ` v i - V N ` ) } ` : n ? ` T ừ $ { n e w D a t e ( n ) . t o L o c a l e D a t e S t r i n g ( ` v i - V N ` ) } ` : ` C h ư a x á c đ ị n h n g à y ` } , [ i , a ] ) , C n = [ ` Đ ừ n g n g h e h ọ n ó i , h ã y t ự m ì n h đ i x e m . ` , ` T h ế g i ớ i l à m ộ t c u ố n s á c h , v à a i k h ô n g đ i d u l ị c h t h ì c h ỉ m ớ i đ ọ c đ ư ợ c m ộ t t r a n g . ` , ` H à n h t r ì n h n g à n d ặ m b ắ t đ ầ u t ừ m ộ t b ư ớ c c h â n . ` , ` Đ i l à đ ể t r ở v ề , n h ư n g v ớ i m ộ t t â m h ồ n m ớ i . ` ] , w n = ( 0 , y . u s e M e m o ) ( ( ) = > C n [ M a t h . f l o o r ( M a t h . r a n d o m ( ) * C n . l e n g t h ) ] , [ ] ) , E n = { t i t l e : i ? . t i t l e | | ` H à n h t r ì n h k h á m p h á T P . H C M ` , d a t e : S n , m e m b e r s C o u n t : i ? . p a r t i c i p a n t s ? . l e n g t h | | 0 , b u d g e t : i ? . t o t a l C o s t ? ` $ { N u m b e r ( i . t o t a l C o s t ) . t o L o c a l e S t r i n g ( ) } V N D ` : ` 0 V N D ` , c o v e r I m a g e : i ? . p h o t o s ? . [ 0 ] ? . i m a g e U r l | | ` h t t p s : / / i m a g e s . u n s p l a s h . c o m / p h o t o - 1 4 7 6 5 1 4 5 2 5 5 3 5 - 0 7 f b 3 b 4 a e 5 f 1 ? q = 8 0 & w = 2 0 7 0 & a u t o = f o r m a t & f i t = c r o p ` } ; r e t u r n ( 0 , G . j s x s ) ( ` d i v ` , { c l a s s N a m e : ` m i n - h - s c r e e n b g - g r a y - 5 0 p b - 2 0 ` , c h i l d r e n : [ ( 0 , G . j s x s ) ( ` d i v ` , { c l a s s N a m e : ` s t i c k y t o p - 0 z - 3 0 b g - w h i t e / 8 0 b a c k d r o p - b l u r - m d b o r d e r - b b o r d e r - g r a y - 1 0 0 p x - 4 p y - 3 f l e x i t e m s - c e n t e r j u s t i f y - b e t w e e n ` , c h i l d r e n : [ ( 0 , G . j s x ) ( ` b u t t o n ` , { o n C l i c k : e , c l a s s N a m e : ` p - 2 h o v e r : b g - g r a y - 1 0 0 r o u n d e d - f u l l t r a n s i t i o n - c o l o r s ` , c h i l d r e n : ( 0 , G . j s x ) ( I , { c l a s s N a m e : ` w - 6 h - 6 t e x t - g r a y - 6 0 0 ` } ) } ) , ( 0 , G . j s x ) ( ` h 1 ` , { c l a s s N a m e : ` t e x t - l g f o n t - b o l d t e x t - g r a y - 8 0 0 t r u n c a t e p x - 4 f l e x - 1 t e x t - c e n t e r ` , c h i l d r e n : E n . t i t l e } ) , ( 0 , G . j s x s ) ( ` d i v ` , { c l a s s N a m e : ` f l e x i t e m s - c e n t e r g a p - 1 ` , c h i l d r e n : [ ! n & & r & & ( 0 , G . j s x ) ( ` b u t t o n ` , { o n C l i c k : r , c l a s s N a m e : ` p - 2 h o v e r : b g - a m b e r - 5 0 t e x t - a m b e r - 6 0 0 r o u n d e d - f u l l t r a n s i t i o n - c o l o r s ` , t i t l e : ` G h i c h ú c ủ a t ô i ` , c h i l d r e n : ( 0 , G . j s x ) ( H , { c l a s s N a m e : ` w - 5 h - 5 ` } ) } ) , o n & & ( 0 , G . j s x ) ( ` b u t t o n ` , { o n C l i c k : f n , c l a s s N a m e : ` p - 2 h o v e r : b g - b l u e - 5 0 t e x t - b l u e - 6 0 0 r o u n d e d - f u l l t r a n s i t i o n - c o l o r s ` , t i t l e : ` C h i a s ẻ t o u r ` , c h i l d r e n : ( 0 , G . j s x ) ( C e , { c l a s s N a m e : ` w - 5 h - 5 ` } ) } ) ] } ) ] } ) , ( 0 , G . j s x s ) ( ` d i v ` , { c l a s s N a m e : ` r e l a t i v e m i n - h - [ 4 8 0 p x ] w - f u l l b g - b l u e - 9 0 0 f l e x f l e x - c o l j u s t i f y - e n d ` , c h i l d r e n : [ ( 0 , G . j s x ) ( ` i m g ` , { s r c : E n . c o v e r I m a g e , c l a s s N a m e : ` a b s o l u t e i n s e t - 0 w - f u l l h - f u l l o b j e c t - c o v e r o p a c i t y - 6 0 ` , a l t : ` T o u r C o v e r ` } ) , ( 0 , G . j s x ) ( ` d i v ` , { c l a s s N a m e : ` a b s o l u t e i n s e t - 0 b g - g r a d i e n t - t o - t f r o m - b l a c k / 8 0 v i a - b l a c k / 2 0 t o - t r a n s p a r e n t ` } ) , ( 0 , G . j s x ) ( ` d i v ` , { c l a s s N a m e : ` r e l a t i v e z - 1 0 p - 6 t e x t - w h i t e p t - 2 8 p b - 2 0 ` , c h i l d r e n : ( 0 , G . j s x s ) ( ` d i v ` , { c l a s s N a m e : ` m a x - w - 2 x l m x - a u t o s p a c e - y - 4 ` , c h i l d r e n : [ ( 0 , G . j s x ) ( ` h 2 ` , { c l a s s N a m e : ` t e x t - 3 x l f o n t - b l a c k t r a c k i n g - t i g h t d r o p - s h a d o w - m d ` , c h i l d r e n : E n . t i t l e } ) , i ? . t a g s & & i . t a g s . l e n g t h > 0 & & ( 0 , G . j s x ) ( ` d i v ` , { c l a s s N a m e : ` f l e x f l e x - w r a p g a p - 2 p t - 1 ` , c h i l d r e n : i . t a g s . m a p ( e = > ( 0 , G . j s x ) ( ` s p a n ` , { c l a s s N a m e : ` p x - 2 . 5 p y - 1 b g - w h i t e / 2 0 b a c k d r o p - b l u r - m d b o r d e r b o r d e r - w h i t e / 3 0 r o u n d e d - l g t e x t - [ 1 0 p x ] f o n t - b l a c k u p p e r c a s e t r a c k i n g - w i d e r ` , c h i l d r e n : e } , e ) ) } ) , i ? . d e s c r i p t i o n & & ( 0 , G . j s x s ) ( ` p ` , { c l a s s N a m e : ` t e x t - s m m d : t e x t - b a s e t e x t - w h i t e / 9 0 m a x - w - x l l i n e - c l a m p - 3 m d : l i n e - c l a m p - n o n e b g - b l a c k / 2 0 b a c k d r o p - b l u r - s m p - 4 r o u n d e d - 2 x l b o r d e r b o r d e r - w h i t e / 1 0 i t a l i c l e a d i n g - r e l a x e d ` , c h i l d r e n : [ ( 0 , G . j s x ) ( v e , { c l a s s N a m e : ` w - 4 h - 4 i n l i n e - b l o c k m r - 2 o p a c i t y - 5 0 ` } ) , i . d e s c r i p t i o n ] } ) , ( 0 , G . j s x s ) ( ` d i v ` , { c l a s s N a m e : ` m t - 3 t e x t - [ 1 1 p x ] s m : t e x t - s m f o n t - b o l d t e x t - w h i t e b g - b l a c k / 4 0 b a c k d r o p - b l u r - m d p x - 4 p y - 2 r o u n d e d - x l b o r d e r b o r d e r - w h i t e / 1 0 i n l i n e - f l e x i t e m s - c e n t e r m a x - w - f u l l ` , c h i l d r e n : [ ( 0 , G . j s x ) ( ` s p a n ` , { c l a s s N a m e : ` t e x t - w h i t e / 6 0 m r - 1 ` , c h i l d r Line 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),GC=class extends MC{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return ` ` }};GC.blotName= ` break ` ,GC.tagName= ` BR ` ;var KC=class extends RC{},qC={"&": ` & amp ; ` ,"<": ` & lt ; ` ,">": ` & gt ; ` ,'"': ` & quot ; ` ,"'": ` & # 39 ; ` };function JC(e){return e.replace(/[&<>"']/g,e=>qC[e])}var YC=class e extends DC{static allowedChildren=[e,GC,MC,KC];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,sC.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)}}},XC=1,ZC=class extends kC{cache={};delta(){return this.cache.delta??(this.cache.delta= $ C(this)),this.cache.delta}deleteAt(e,t){super.deleteAt(e,t),this.cache={}}formatAt(e,t,n,r){t<=0||(this.scroll.query(n,sC.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 GC&&n.remove(),this.cache={}}length(){return this.cache.length??(this.cache.length=super.length()+XC),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()-XC)){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}};ZC.blotName= ` block ` ,ZC.tagName= ` P ` ,ZC.defaultChild=GC,ZC.allowedChildren=[GC,YC,MC,KC];var QC=class extends MC{attach(){super.attach(),this.attributes=new gC(this.domNode)}delta(){return new Q.default().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){let n=this.scroll.query(e,sC.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(ZC.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)}};QC.scope=sC.BLOCK_BLOT;function $ C(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.descendants(bC).reduce((e,n)=>n.length()===0?e:e.insert(n.value(),ew(n,{},t)),new Q.default).insert( `
` ,ew(e))}function ew(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e==null||( ` formats ` in e&&typeof e.formats== ` function ` &&(t={...t,...e.formats()},n&&delete t[ ` code - token ` ]),e.parent==null||e.parent.statics.blotName=== ` scroll ` ||e.parent.statics.scope!==e.statics.scope)?t:ew(e.parent,t,n)}var tw=class e extends MC{static blotName= ` cursor ` ;static className= ` ql - cursor ` ;static tagName= ` span ` ;static CONTENTS= ` ` ;static value(){}constructor(t,n,r){super(t,n),this.selection=r,this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(t,n){if(this.savedLength!==0){super.format(t,n);return}let r=this,i=0;for(;r!=null&&r.statics.scope!==sC.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=e.CONTENTS.length,r.optimize(),r.formatAt(i,e.CONTENTS.length,t,n),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let t=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let n=this.prev instanceof KC?this.prev:null,r=n?n.length():0,i=this.next instanceof KC?this.next:null,a=i?i.text: ` ` ,{textNode:o}=this,s=o.data.split(e.CONTENTS).join( ` ` );o.data=e.CONTENTS;let c;if(n)c=n,(s||i)&&(n.insertAt(n.length(),s+a),i&&i.remove());else if(i)c=i,i.insertAt(0,s);else{let e=document.createTextNode(s);c=this.scroll.create(e),this.parent.insertBefore(c,this)}if(this.remove(),t){let e=(e,t)=>n&&e===n.domNode?t:e===o?r+t-1:i&&e===i.domNode?r+s.length+t:null,a=e(t.start.node,t.start.offset),l=e(t.end.node,t.end.offset);if(a!==null&&l!==null)return{startNode:c.domNode,startOffset:a,endNode:c.domNode,endOffset:l}}return null}update(e,t){if(e.some(e=>e.type=== ` characterData ` &&e.target===this.textNode)){let e=this.restore();e&&(t.range=e)}}optimize(t){super.optimize(t);let{parent:n}=this;for(;n;){if(n.domNode.tagName=== ` A ` ){this.savedLength=e.CONTENTS.length,n.isolate(this.offset(n),this.length()).unwrap(),this.savedLength=0;break}n=n.parent}}value(){return ` ` }},nw=u(s(((e,t)=>{var n=Object.prototype.hasOwnProperty,r= ` ~ ` ;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!= ` function ` )throw TypeError( ` The listener must be a function ` );var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this.
Line truncated
` )&&(t<=e||!!this.scroll.descendant(QC,e)[0]),this.scroll.insertAt(e,r);let[i,o]=this.scroll.line(e),c=aC({},ew(i));if(i instanceof ZC){let[e]=i.descendant(bC,o);e&&(c=aC(c,ew(e)))}a=Q.AttributeMap.diff(c,a)||{}}else if(typeof n.insert== ` object ` ){let r=Object.keys(n.insert)[0];if(r==null)return e;let i=this.scroll.query(r,sC.INLINE)!=null;if(i)(t<=e||this.scroll.descendant(QC,e)[0])&&(s=!0);else if(e>0){let[t,n]=this.scroll.descendant(bC,e-1);t instanceof KC?t.value()[n]!== `
` &&(o=!0):t instanceof MC&&t.statics.scope===sC.INLINE_BLOT&&(o=!0)}if(this.scroll.insertAt(e,r,n.insert[r]),i){let[t]=this.scroll.descendant(bC,e);if(t){let e=aC({},ew(t));a=Q.AttributeMap.diff(e,a)||{}}}}t+=i}else if(r.push(n),n.retain!==null&&typeof n.retain== ` object ` ){let t=Object.keys(n.retain)[0];if(t==null)return e;this.scroll.updateEmbedAt(e,t,n.retain[t])}Object.keys(a).forEach(t=>{this.scroll.formatAt(e,i,t,a[t])});let c=+!!o,l=+!!s;return t+=c+l,r.retain(c),r.delete(l),e+i+c+l},0),r.reduce((e,t)=>typeof t.delete== ` number ` ?(this.scroll.deleteAt(e,t.delete),e):e+Q.Op.length(t),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update(new Q.default().retain(e).delete(t))}formatLine(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach(r=>{this.scroll.lines(e,Math.max(t,1)).forEach(e=>{e.format(r,n[r])})}),this.scroll.optimize();let r=new Q.default().retain(e).retain(t,fS(n));return this.update(r)}formatText(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(n).forEach(r=>{this.scroll.formatAt(e,t,r,n[r])});let r=new Q.default().retain(e).retain(t,fS(n));return this.update(r)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce((e,t)=>e.concat(t.delta()),new Q.default)}getFormat(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=[],r=[];t===0?this.scroll.path(e).forEach(e=>{let[t]=e;t instanceof ZC?n.push(t):t instanceof bC&&r.push(t)}):(n=this.scroll.lines(e,t),r=this.scroll.descendants(bC,e,t));let[i,a]=[n,r].map(e=>{let t=e.shift();if(t==null)return{};let n=ew(t);for(;Object.keys(n).length>0;){let t=e.shift();if(t==null)return n;n=vw(ew(t),n)}return n});return{...i,...a}}getHTML(e,t){let[n,r]=this.scroll.line(e);if(n){let i=n.length();return n.length()>=r+t&&!(r===0&&t===i)?_w(n,r,t,!0):_w(this.scroll,e,t,!0)}return ` ` }getText(e,t){return this.getContents(e,t).filter(e=>typeof e.insert== ` string ` ).map(e=>e.insert).join( ` ` )}insertContents(e,t){let n=bw(t),r=new Q.default().retain(e).concat(n);return this.scroll.insertContents(e,n),this.update(r)}insertEmbed(e,t,n){return this.scroll.insertAt(e,t,n),this.update(new Q.default().retain(e).insert({[t]:n}))}insertText(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/ \r \n /g, `
` ).replace(/ \r /g, `
` ),this.scroll.insertAt(e,t),Object.keys(n).forEach(r=>{this.scroll.formatAt(e,t.length,r,n[r])}),this.update(new Q.default().retain(e).insert(t,fS(n)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;let e=this.scroll.children.head;if(e?.statics.blotName!==ZC.blotName)return!1;let t=e;return t.children.length>1?!1:t.children.head instanceof GC}removeFormat(e,t){let n=this.getText(e,t),[r,i]=this.scroll.line(e+t),a=0,o=new Q.default;r!=null&&(a=r.length()-i,o=r.delta().slice(i,i+a-1).insert( `
` ));let s=this.getContents(e,t+a).diff(new Q.default().insert(n).concat(o)),c=new Q.default().retain(e).concat(s);return this.applyDelta(c)}update(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,r=this.delta;if(t.length===1&&t[0].type=== ` characterData ` &&t[0].target.data.match(mw)&&this.scroll.find(t[0].target)){let i=this.scroll.find(t[0].target),a=ew(i),o=i.offset(this.scroll),s=t[0].oldValue.replace(tw.CONTENTS, ` ` ),c=new Q.default().insert(s),l=new Q.default().insert(i.value()),u=n&&{oldRange:xw(n.oldRange,-o),newRange:xw(n.newRange,-o)};e=new Q.default().retain(o).concat(c.diff(l,u)).reduce((e,t)=>t.insert?e.insert(t.insert,a):e.push(t),new Q.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),(!e||!iC(r.compose(e),this.delta))&&(e=r.diff(this.delta,n));return e}};function gw(e,t,n){if(e.length===0){let[e]=yw(n.pop());return t<=0? ` < /li></ $ { e } > ` : ` < /li></ $ { e } > $ { gw ( [ ] , t - 1 , n ) } ` }let[{child:r,offset:i,length:a,indent:o,type:s},...c]=e,[l,u]=yw(s);if(o>t)return n.push(s),o===t+1? ` < $ { l } > < li$ { u } > $ { _w ( r , i , a ) } $ { gw ( c , o , n ) } ` : ` < $ { l } > < li > $ { gw ( e , t + 1 , n ) } ` ;let d=n[n.length-1];if(o===t&&s===d)return ` < / l i > < l i $ { u } > $ { _ w ( r , i , a ) } $ { g w ( c , o , n ) } ` ; l e t [ f ] = y w ( n . p o p ( ) ) ; r e t u r n ` < / l i > < / $ { f } > $ { g w ( e , t - 1 , n ) } ` } f u n c t i o n _ w ( e , t , n ) { l e t r = a r g u m e n t s . l e n g t h > 3 & & a r g u m e n t s [ 3 ] ! = = v o i d 0 ? a r g u m e n t s [ 3 ] : ! 1 ; i f ( ` h t m l ` i n e & & t y p e o f e . h t m l = = ` f u n c t i o n ` ) r e t u r n e . h t m l ( t , n ) ; i f ( e i n s t a n c e o f K C ) r e t u r n J C ( e . v a l u e ( ) . s l i c e ( t , t + n ) ) . r e p l a c e A l l ( ` ` , ` & n b s p ; ` ) ; i f ( e i n s t a n c e o f w C ) { i f ( e . s t a t i c s . b l o t N a m e = = = ` l i s t - c o n t a i n e r ` ) { l e t r = [ ] ; r e t u r n e . c h i l d r e n . f o r E a c h A t ( t , n , ( e , t , n ) = > { l e t i = ` f o r m a t s ` i n e & & t y p e o f e . f o r m a t s = = ` f u n c t i o n ` ? e . f o r m a t s ( ) : { } ; r . p u s h ( { c h i l d : e , o f f s e t : t , l e n g t h : n , i n d e n t : i . i n d e n t | | 0 , t y p e : i . l i s t } ) } ) , g w ( r , - 1 , [ ] ) } l e t i = [ ] ; i f ( e . c h i l d r e n . f o r E a c h A t ( t , n , ( e , t , n ) = > { i . p u s h ( _ w ( e , t , n ) ) } ) , r | | e . s t a t i c s . b l o t N a m e = = = ` l i s t ` ) r e t u r n i . j o i n ( ` ` ) ; l e t { o u t e r H T M L : a , i n n e r H T M L : o } = e . d o m N o d e , [ s , c ] = a . s p l i t ( ` > $ { o } < ` ) ; r e t u r n s = = = ` < t a b l e ` ? ` < t a b l e s t y l e = " b o r d e r : 1 p x s o l i d # 0 0 0 ; " > $ { i . j o i n ( ` ` ) } < $ { c } ` : ` $ { s } > $ { i . j o i n ( ` ` ) } < $ { c } ` } r e t u r n e . d o m N o d e i n s t a n c e o f E l e m e n t ? e . d o m N o d e . o u t e r H T M L : ` ` } f u n c t i o n v w ( e , t ) { r e t u r n O b j e c t . k e y s ( t ) . r e d u c e ( ( n , r ) = > { i f ( e [ r ] = = n u l l ) r e t u r n n ; l e t i = t [ r ] ; r e t u r n i = = = e [ r ] ? n [ r ] = i : A r r a y . i s A r r a y ( i ) ? i . i n d e x O f ( e [ r ] ) < 0 ? n [ r ] = i . c o n c a t ( [ e [ r ] ] ) : n [ r ] = i : n [ r ] = [ i , e [ r ] ] , n } , { } ) } f u n c t i o n y w ( e ) { l e t t = e = = = ` o r d e r e d ` ? ` o l ` : ` u l ` ; s w i t c h ( e ) { c a s e ` c h e c k e d ` : r e t u r n [ t , ` d a t a - l i s t = " c h e c k e d " ` ] ; c a s e ` u n c h e c k e d ` : r e t u r n [ t , ` d a t a - l i s t = " u n c h e c k e d " ` ] ; d e f a u l t : r e t u r n [ t , ` ` ] } } f u n c t i o n b w ( e ) { r e t u r n e . r e d u c e ( ( e , t ) = > { i f ( t y p e o f t . i n s e r t = = ` s t r i n g ` ) { l e t n = t . i n s e r t . r e p l a c e ( / \ r \ n / g , `
` ).replace(/ \r /g, `
` );return e.insert(n,t.attributes)}return e.push(t)},new Q.default)}function xw(e,t){let{index:n,length:r}=e;return new dw(n+t,r)}function Sw(e){let t=[];return e.forEach(e=>{typeof e.insert== ` string ` ?e.insert.split( `
` ).forEach((n,r)=>{r&&t.push({insert: `
` ,attributes:e.attributes}),n&&t.push({insert:n,attributes:e.attributes})}):t.push(e)}),t}var Cw=class{static DEFAULTS={};constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=t}},ww= ` ` ,Tw=class extends MC{constructor(e,t){super(e,t),this.contentNode=document.createElement( ` span ` ),this.contentNode.setAttribute( ` contenteditable ` , ` false ` ),Array.from(this.domNode.childNodes).forEach(e=>{this.contentNode.appendChild(e)}),this.leftGuard=document.createTextNode(ww),this.rightGuard=document.createTextNode(ww),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t=null,n,r=e.data.split(ww).join( ` ` );if(e===this.leftGuard)if(this.prev instanceof KC){let e=this.prev.length();this.prev.insertAt(e,r),t={startNode:this.prev.domNode,startOffset:e+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(n),this),t={startNode:n,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof KC?(this.next.insertAt(0,r),t={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(n),this.next),t={startNode:n,startOffset:r.length}));return e.data=ww,t}update(e,t){e.forEach(e=>{if(e.type=== ` characterData ` &&(e.target===this.leftGuard||e.target===this.rightGuard)){let n=this.restore(e.target);n&&(t.range=n)}})}},Ew=class{isComposing=!1;constructor(e,t){this.scroll=e,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener( ` compositionstart ` ,e=>{this.isComposing||this.handleCompositionStart(e)}),this.scroll.domNode.addEventListener( ` compositionend ` ,e=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(e)})})}handleCompositionStart(e){let t=e.target instanceof Node?this.scroll.find(e.target,!0):null;t&&!(t instanceof Tw)&&(this.emitter.emit(lw.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(lw.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(lw.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(lw.events.COMPOSITION_END,e),this.isComposing=!1}},Dw=class e{static DEFAULTS={modules:{}};static themes={default:e};modules={};constructor(e,t){this.quill=e,this.options=t}init(){Object.keys(this.options.modules).forEach(e=>{this.modules[e]??this.addModule(e)})}addModule(e){let t=this.quill.constructor.import( ` modules / $ { e } ` );return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}},Ow=e=>e.parentElement||e.getRootNode().host||null,kw=e=>{let t=e.getBoundingClientRect(),n= ` offsetWidth ` in e&&Math.abs(t.width)/e.offsetWidth||1,r= ` offsetHeight ` in e&&Math.abs(t.height)/e.offsetHeight||1;return{top:t.top,right:t.left+e.clientWidth*n,bottom:t.top+e.clientHeight*r,left:t.left}},Aw=e=>{let t=parseInt(e,10);return Number.isNaN(t)?0:t},jw=(e,t,n,r,i,a)=>e<n&&t>r?0:e<n?-(n-e+i):t>r?t-e>r-n?e+i-n:t-r+a:0,Mw=(e,t)=>{let n=e.ownerDocument,r=t,i=e;for(;i;){let e=i===n.body,t=e?{top:0,right:window.visualViewport?.width??n.documentElement.clientWidth,bottom:window.visualViewport?.height??n.documentElement.clientHeight,left:0}:kw(i),a=getComputedStyle(i),o=jw(r.left,r.right,t.left,t.right,Aw(a.scrollPaddingLeft),Aw(a.scrollPaddingRight)),s=jw(r.top,r.bottom,t.top,t.bottom,Aw(a.scrollPaddingTop),Aw(a.scrollPaddingBottom));if(o||s)if(e)n.defaultView?.scrollBy(o,s);else{let{scrollLeft:e,scrollTop:t}=i;s&&(i.scrollTop+=s),o&&(i.scrollLeft+=o);let n=i.scrollLeft-e,a=i.scrollTop-t;r={left:r.left-n,top:r.top-a,right:r.right-n,bottom:r.bottom-a}}i=e||a.position=== ` fixed ` ?null:Ow(i)}},Nw=100,Pw=[ ` block ` , ` break ` , ` cursor ` , ` inline ` , ` scroll ` , ` text ` ],Fw=(e,t,n)=>{let r=new dC;return Pw.forEach(e=>{let n=t.query(e);n&&r.register(n)}),e.forEach(e=>{let i=t.query(e);i||n.error( ` Cannot register "${e}" specified in "formats" config . Are you sure it was registered ? ` );let a=0;for(;i;)if(r.register(i),i= ` blotName ` in i?i.requiredContainer??null:null,a+=1,a>Nw){n.error( ` Cycle detected in registering blot requiredContainer : "${e}" ` );break}}),r},Iw=sw( ` quill ` ),Lw=new dC;wC.uiClass= ` ql - ui ` ;var $ =class e{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder: ` ` ,readOnly:!1,registry:Lw,theme: ` default ` };static events=lw.events;static sources=lw.sources;static version= ` 2.0 . 3 ` ;static imports={delta:Q.default,parchment:oC,"core/module":Cw,"core/theme":Dw};static debug(e){e===!0&&(e= ` log ` ),sw.level(e)}static find(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return rw.get(e)||Lw.find(e,t)}static import(e){return this.imports[e]??Iw.error( ` Cannot import $ { e } . Are you sure it was registered ? ` ),this.imports[e]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!= ` string ` ){let e=arguments.length<=0?void 0:arguments[0],t=!!(!(arg
Line truncated
` });this.setContents(e)}this.history.clear(),this.options.placeholder&&this.root.setAttribute( ` data - placeholder ` ,this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e== ` string ` ){let t=e;e=document.createElement( ` div ` ),e.classList.add(t)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,n){return[e,t,,n]=Uw(e,t,n),Hw.call(this,()=>this.editor.deleteText(e,t),n,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;let t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle( ` ql - disabled ` ,!e)}focus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lw.sources.API;return Hw.call(this,()=>{let n=this.getSelection(!0),r=new Q.default;if(n==null)return r;if(this.scroll.query(e,sC.BLOCK))r=this.editor.formatLine(n.index,n.length,{[e]:t});else if(n.length===0)return this.selection.format(e,t),r;else r=this.editor.formatText(n.index,n.length,{[e]:t});return this.setSelection(n,lw.sources.SILENT),r},n)}formatLine(e,t,n,r,i){let a;return[e,t,a,i]=Uw(e,t,n,r,i),Hw.call(this,()=>this.editor.formatLine(e,t,a),i,e,0)}formatText(e,t,n,r,i){let a;return[e,t,a,i]=Uw(e,t,n,r,i),Hw.call(this,()=>this.editor.formatText(e,t,a),i,e,0)}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=null;if(n=typeof e== ` number ` ?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length),!n)return null;let r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}getContents(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e;return[e,t]=Uw(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e== ` number ` ?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e== ` number ` ?this.scroll.lines(e,t):this.scroll.lines(e.index,e.length)}getModule(e){return this.theme.modules[e]}getSelection(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e== ` number ` &&(t??=this.getLength()-e),[e,t]=Uw(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e== ` number ` &&(t??=this.getLength()-e),[e,t]=Uw(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:e.sources.API;return Hw.call(this,()=>this.editor.insertEmbed(t,n,r),i,t)}insertText(e,t,n,r,i){let a;return[e,,a,i]=Uw(e,0,n,r,i),Hw.call(this,()=>this.editor.insertText(e,t,a),i,e,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,t,n){return[e,t,,n]=Uw(e,t,n),Hw.call(this,()=>this.editor.removeFormat(e,t),n,e)}scrollRectIntoView(e){Mw(this.root,e)}scrollIntoView(){console.warn( ` Quill # scrollIntoView ( ) has been deprecated and will be removed in the near future . Please use Quill # scrollSelectionIntoView ( ) instead . ` ),this.scrollSelectionIntoView()}scrollSelectionIntoView(){let e=this.selection.lastRange,t=e&&this.selection.getBounds(e.index,e.length);t&&this.scrollRectIntoView(t)}setContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lw.sources.API;return Hw.call(this,()=>{e=new Q.default(e);let t=this.getLength(),n=this.editor.deleteText(0,t),r=this.editor.insertContents(0,e),i=this.editor.deleteText(this.getLength()-1,1);return n.compose(r).compose(i)},t)}setSelection(t,n,r){t==null?this.selection.setRange(null,n||e.sources.API):([t,n,,r]=Uw(t,n,r),this.selection.setRange(new dw(Math.max(0,t),n),r),r!==lw.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lw.sources.API,n=new Q.default().insert(e);return this.setContents(n,t)}up
Line truncated
` )?e.insertAt(0,t.slice(0,-1),n):e.insertAt(0,t,n)}else{let e=this.scroll.create(t,n);this.appendChild(e)}else super.insertAt(e,t,n);this.optimize()}insertBefore(e,t){if(e.statics.scope===sC.INLINE_BLOT){let n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(e),super.insertBefore(n,t)}else super.insertBefore(e,t)}insertContents(e,t){let n=this.deltaToRenderBlocks(t.concat(new Q.default().insert( `
` ))),r=n.pop();if(r==null)return;this.batchStart();let i=n.shift();if(i){let t=i.type=== ` block ` &&(i.delta.length()===0||!this.descendant(QC,e)[0]&&e<this.length()),n=i.type=== ` block ` ?i.delta:new Q.default().insert({[i.key]:i.value});Yw(this,e,n);let r=+(i.type=== ` block ` ),a=e+n.length()+r;t&&this.insertAt(a-1, `
` );let o=ew(this.line(e)[0]),s=Q.AttributeMap.diff(o,i.attributes)||{};Object.keys(s).forEach(e=>{this.formatAt(a-1,1,e,s[e])}),e=a}let[a,o]=this.children.find(e);if(n.length&&(a&&(a=a.split(o),o=0),n.forEach(e=>{if(e.type=== ` block ` )Yw(this.createBlock(e.attributes,a||void 0),0,e.delta);else{let t=this.create(e.key,e.value);this.insertBefore(t,a||void 0),Object.keys(e.attributes).forEach(n=>{t.format(n,e.attributes[n])})}})),r.type=== ` block ` &&r.delta.length()){let e=a?a.offset(a.scroll)+o:this.length();Yw(this,e,r.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute( ` contenteditable ` )=== ` true ` }leaf(e){let t=this.path(e).pop();if(!t)return[null,-1];let[n,r]=t;return n instanceof bC?[n,r]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(Kw,e)}lines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,n=(e,t,r)=>{let i=[],a=r;return e.children.forEachAt(t,r,(e,t,r)=>{Kw(e)?i.push(e):e instanceof jC&&(i=i.concat(n(e,t,a))),a-=r}),i};return n(this,e,t)}optimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(e,t),e.length>0&&this.emitter.emit(lw.events.SCROLL_OPTIMIZE,e,t))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch){Array.isArray(e)&&(this.batch=this.batch.concat(e));return}let t=lw.sources.USER;typeof e== ` string ` &&(t=e),Array.isArray(e)||(e=this.observer.takeRecords()),e=e.filter(e=>{let{target:t}=e,n=this.find(t,!0);return n&&!qw(n)}),e.length>0&&this.emitter.emit(lw.events.SCROLL_BEFORE_UPDATE,t,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(lw.events.SCROLL_UPDATE,t,e)}updateEmbedAt(e,t,n){let[r]=this.descendant(e=>e instanceof QC,e);r&&r.statics.blotName===t&&qw(r)&&r.updateContent(n)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){let t=[],n=new Q.default;return e.forEach(e=>{let r=e?.insert;if(r)if(typeof r== ` string ` ){let i=r.split( `
` );i.slice(0,-1).forEach(r=>{n.insert(r,e.attributes),t.push({type: ` block ` ,delta:n,attributes:e.attributes??{}}),n=new Q.default});let a=i[i.length-1];a&&n.insert(a,e.attributes)}else{let i=Object.keys(r)[0];if(!i)return;this.query(i,sC.INLINE)?n.push(e):(n.length()&&t.push({type: ` block ` ,delta:n,attributes:{}}),n=new Q.default,t.push({type: ` blockEmbed ` ,key:i,value:r[i],attributes:e.attributes??{}}))}}),n.length()&&t.push({type: ` block ` ,delta:n,attributes:{}}),t}createBlock(e,t){let n,r={};Object.entries(e).forEach(e=>{let[t,i]=e;this.query(t,sC.BLOCK&sC.BLOT)==null?r[t]=i:n=t});let i=this.create(n||this.statics.defaultChild.blotName,n?e[n]:void 0);this.insertBefore(i,t||void 0);let a=i.length();return Object.entries(r).forEach(e=>{let[t,n]=e;i.formatAt(0,a,t,n)}),i}};function Yw(e,t,n){n.reduce((t,n)=>{let r=Q.Op.length(n),i=n.attributes||{};if(n.insert!=null){if(typeof n.insert== ` string ` ){let r=n.insert;e.insertAt(t,r);let[a]=e.descendant(bC,t),o=ew(a);i=Q.AttributeMap.diff(o,i)||{}}else if(typeof n.insert== ` object ` ){let r=Object.keys(n.insert)[0];if(r==null)return t;if(e.insertAt(t,r,n.insert[r]),e.scroll.query(r,sC.INLINE)!=null){let[n]=e.descendant(bC,t),r=ew(n);i=Q.AttributeMap.diff(r,i)||{}}}}return Object.keys(i).forEach(n=>{e.formatAt(t,r,n,i[n])}),t+r},t)}var Xw={scope:sC.BLOCK,whitelist:[ ` right ` , ` center ` , ` justify ` ]},Zw=new cC( ` align ` , ` align ` ,Xw),Qw=new pC( ` align ` , ` ql - align ` ,Xw), $ w=new hC( ` align ` , ` text - align ` ,Xw),eT=class extends hC{value(e){let t=super.value(e);return t.startsWith( ` rgb ( ` )?(t=t.replace(/^[^ \d ]+/, ` ` ).replace(/[^ \d ]+ $ /, ` ` ), ` # $ { t . split ( ` , ` ) . map ( e => ` 00 ${ parseInt ( e , 10 ) . toString ( 16 ) } ` . slice ( - 2 ) ) . join ( ` ` ) } ` ):t}},tT=new pC( ` color ` , ` ql - color ` ,{scope:sC.INLINE}),nT=new eT( ` color ` , ` color ` ,{scope:sC.INLINE}),rT=new pC( ` background ` , ` ql - bg ` ,{scope:sC.INLINE}),iT=new eT( ` background ` , ` background - color ` ,{scope:sC.INLINE}),aT=class extends Gw{static create(e){let t=super.create(e);return t.setAttribute( ` spellcheck ` , ` false ` ),t}code(e,t){return this.children.map(e=>e.length()<=1? ` ` :e.domNode.innerText).join( `
` ).slice(e,e+t)}html(e,t){return ` < pre > \ n$ { JC ( this . code ( e , t ) ) } \ n < /pre>`}},oT=class extends ZC{static TAB=` `;static register(){$.register(aT)}},sT=class extends YC{};sT.blotName=`code`,sT.tagName=`CODE`,oT.blotName=`code-block`,oT.className=`ql-code-block`,oT.tagName=`DIV`,aT.blotName=`code-block-container`,aT.className=`ql-code-block-container`,aT.tagName=`DIV`,aT.allowedChildren=[oT],oT.allowedChildren=[KC,GC,tw],oT.requiredContainer=aT;var cT={scope:sC.BLOCK,whitelist:[`rtl`]},lT=new cC(`direction`,`dir`,cT),uT=new pC(`direction`,`ql-direction`,cT),dT=new hC(`direction`,`direction`,cT),fT={scope:sC.INLINE,whitelist:[`serif`,`monospace`]},pT=new pC(`font`,`ql-font`,fT),mT=new class extends hC{value(e){return super.value(e).replace(/ [ " ' ] / g , ` ` ) } } ( ` font ` , ` font-family ` , fT ) , hT = new pC ( ` size ` , ` ql-size ` , { scope : sC . INLINE , whitelist : [ ` small ` , ` large ` , ` huge ` ] } ) , gT = new hC ( ` size ` , ` font-size ` , { scope : sC . INLINE , whitelist : [ ` 10px ` , ` 18px ` , ` 32px ` ] } ) , _T = sw ( ` quill:keyboard ` ) , vT = /Mac/i . test ( navigator . platform ) ? ` metaKey ` : ` ctrlKey ` , yT = class e extends Cw { static match ( e , t ) { return [ ` altKey ` , ` ctrlKey ` , ` metaKey ` , ` shiftKey ` ] . some ( n => ! ! t [ n ] !== e [ n ] && t [ n ] !== null ) ? ! 1 : t . key === e . key || t . key === e . which } constructor ( e , t ) { super ( e , t ) , this . bindings = { } , Object . keys ( this . options . bindings ) . forEach ( e => { this . options . bindings [ e ] && this . addBinding ( this . options . bindings [ e ] ) } ) , this . addBinding ( { key : ` Enter ` , shiftKey : null } , this . handleEnter ) , this . addBinding ( { key : ` Enter ` , metaKey : null , ctrlKey : null , altKey : null } , ( ) => { } ) , /Firefox/i . test ( navigator . userAgent ) ? ( this . addBinding ( { key : ` Backspace ` } , { collapsed : ! 0 } , this . handleBackspace ) , this . addBinding ( { key : ` Delete ` } , { collapsed : ! 0 } , this . handleDelete ) ) : ( this . addBinding ( { key : ` Backspace ` } , { collapsed : ! 0 , prefix : /^.?$/ } , this . handleBackspace ) , this . addBinding ( { key : ` Delete ` } , { collapsed : ! 0 , suffix : /^.?$/ } , this . handleDelete ) ) , this . addBinding ( { key : ` Backspace ` } , { collapsed : ! 1 } , this . handleDeleteRange ) , this . addBinding ( { key : ` Delete ` } , { collapsed : ! 1 } , this . handleDeleteRange ) , this . addBinding ( { key : ` Backspace ` , altKey : null , ctrlKey : null , metaKey : null , shiftKey : null } , { collapsed : ! 0 , offset : 0 } , this . handleBackspace ) , this . listen ( ) } addBinding ( e ) { let t = arguments . length > 1 && arguments [ 1 ] !== void 0 ? arguments [ 1 ] : { } , n = arguments . length > 2 && arguments [ 2 ] !== void 0 ? arguments [ 2 ] : { } , r = wT ( e ) ; if ( r == null ) { _T . warn ( ` Attempted to add invalid keyboard binding ` , r ) ; return } typeof t == ` function ` && ( t = { handler : t } ) , typeof n == ` function ` && ( n = { handler : n } ) , ( Array . isArray ( r . key ) ? r . key : [ r . key ] ) . forEach ( e => { let i = { ... r , key : e , ... t , ... n } ; this . bindings [ i . key ] = this . bindings [ i . key ] || [ ] , this . bindings [ i . key ] . push ( i ) } ) } listen ( ) { this . quill . root . addEventListener ( ` keydown ` , t => { if ( t . defaultPrevented || t . isComposing || t . keyCode === 229 && ( t . key === ` Enter ` || t . key === ` Backspace ` ) ) return ; let n = ( this . bindings [ t . key ] || [ ] ) . concat ( this . bindings [ t . which ] || [ ] ) . filter ( n => e . match ( t , n ) ) ; if ( n . length === 0 ) return ; let r = $ . find ( t . target , ! 0 ) ; if ( r && r . scroll !== this . quill . scroll ) return ; let i = this . quill . getSelection ( ) ; if ( i == null || ! this . quill . hasFocus ( ) ) return ; let [ a , o ] = this . quill . getLine ( i . index ) , [ s , c ] = this . quill . getLeaf ( i . index ) , [ l , u ] = i . length === 0 ? [ s , c ] : this . quill . getLeaf ( i . index + i . length ) , d = s instanceof RC ? s . value ( ) . slice ( 0 , c ) : ` ` , f = l instanceof RC ? l . value ( ) . slice ( u ) : ` ` , p = { collapsed : i . length === 0 , empty : i . length === 0 && a . length ( ) <= 1 , format : this . quill . getFormat ( i ) , line : a , offset : o , prefix : d , suffix : f , event : t } ; n . some ( e => { if ( e . collapsed != null && e . collapsed !== p . collapsed || e . empty != null && e . empty !== p . empty || e . offset != null && e . offset !== p . offset ) return ! 1 ; if ( Array . isArray ( e . format ) ) { if ( e . format . every ( e => p . format [ e ] == null ) ) return ! 1 } else if ( typeof e . format == ` object ` && ! Object . keys ( e . format ) . every ( t => e . format [ t ] === ! 0 ? p . format [ t ] != null : e . format [ t ] === ! 1 ? p . format [ t ] == null : iC ( e . format [ t ] , p . format [ t ] ) ) ) return ! 1 ; return e . prefix != null && ! e . prefix . test ( p . prefix ) || e . suffix != null && ! e . suffix . test ( p . suffix ) ? ! 1 : e . handler . call ( this , i , p , e ) !== ! 0 } ) && t . preventDefault ( ) } ) } handleBackspace ( e , t ) { let n = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/ . test ( t . prefix ) ? 2 : 1 ; if ( e . index === 0 || this . quill . getLength ( ) <= 1 ) return ; let r = { } , [ i ] = this . quill . getLine ( e . index ) , a = new Q . default ( ) . retain ( e . index - n ) . delete ( n ) ; if ( t . offset === 0 ) { let [ t ] = this . quill . getLine ( e . index - 1 ) ; if ( t && ! ( t . statics . blotName === ` block ` && t . length ( ) <= 1 ) ) { let t = i . formats ( ) , n = this . quill . getFormat ( e . index - 1 , 1 ) ; if ( r = Q . AttributeMap . diff ( t , n ) || { } , Object . keys ( r ) . length > 0 ) { let t = new Q . default ( ) . retain ( e . index + i . length ( ) - 2 ) . retain ( 1 , r ) ; a = a . compose ( t ) } } } this . quill . updateContents ( a , $ . sources . USER ) , this . quill . focus ( ) } handleDelete ( e , t ) { let n = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/ . test ( t . suffix ) ? 2 : 1 ; if ( e . index >= this . quill . getLength ( ) - n ) return ; let r = { } , [ i ] = this . quill . getLine ( e . index ) , a = new Q . default ( ) . retain ( e . index ) . delete ( n ) ; if ( t . offset >= i . length ( ) - 1 ) { let [ t ] = this . quill . getLine ( e . index + 1 ) ; if ( t ) { let n = i . formats ( ) , o = this . quill . getFormat ( e . index , 1 ) ; r = Q . AttributeMap . diff ( n , o ) || { } , Object . keys ( r ) . length > 0 && ( a = a . retain ( t . length ( ) - 1 ) . retain ( 1 , r ) ) } } this . quill . updateContents ( a , $ . sources . USER ) , this . quill . focus ( ) } handleDeleteRange ( e ) { TT ( { range : e , quill : this . quill } ) , this . quill . focu Line truncated
` ,n);this.quill.updateContents(r, $ .sources.USER),this.quill.setSelection(e.index+1, $ .sources.SILENT),this.quill.focus()}};yT.DEFAULTS={bindings:{bold:ST( ` bold ` ),italic:ST( ` italic ` ),underline:ST( ` underline ` ),indent:{key: ` Tab ` ,format:[ ` blockquote ` , ` indent ` , ` list ` ],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format( ` indent ` , ` + 1 ` , $ .sources.USER),!1)}},outdent:{key: ` Tab ` ,shiftKey:!0,format:[ ` blockquote ` , ` indent ` , ` list ` ],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format( ` indent ` , ` - 1 ` , $ .sources.USER),!1)}},"outdent backspace":{key: ` Backspace ` ,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:[ ` indent ` , ` list ` ],offset:0,handler(e,t){t.format.indent==null?t.format.list!=null&&this.quill.format( ` list ` ,!1, $ .sources.USER):this.quill.format( ` indent ` , ` - 1 ` , $ .sources.USER)}},"indent code-block":bT(!0),"outdent code-block":bT(!1),"remove tab":{key: ` Tab ` ,shiftKey:!0,collapsed:!0,prefix:/ \t $ /,handler(e){this.quill.deleteText(e.index-1,1, $ .sources.USER)}},tab:{key: ` Tab ` ,handler(e,t){if(t.format.table)return!0;this.quill.history.cutoff();let n=new Q.default().retain(e.index).delete(e.length).insert( ` ` );return this.quill.updateContents(n, $ .sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1, $ .sources.SILENT),!1}},"blockquote empty enter":{key: ` Enter ` ,collapsed:!0,format:[ ` blockquote ` ],empty:!0,handler(){this.quill.format( ` blockquote ` ,!1, $ .sources.USER)}},"list empty enter":{key: ` Enter ` ,collapsed:!0,format:[ ` list ` ],empty:!0,handler(e,t){let n={list:!1};t.format.indent&&(n.indent=!1),this.quill.formatLine(e.index,e.length,n, $ .sources.USER)}},"checklist enter":{key: ` Enter ` ,collapsed:!0,format:{list: ` checked ` },handler(e){let[t,n]=this.quill.getLine(e.index),r={...t.formats(),list: ` checked ` },i=new Q.default().retain(e.index).insert( `
` ,r).retain(t.length()-n-1).retain(1,{list: ` unchecked ` });this.quill.updateContents(i, $ .sources.USER),this.quill.setSelection(e.index+1, $ .sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key: ` Enter ` ,collapsed:!0,format:[ ` header ` ],suffix:/^ $ /,handler(e,t){let[n,r]=this.quill.getLine(e.index),i=new Q.default().retain(e.index).insert( `
` ,t.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(i, $ .sources.USER),this.quill.setSelection(e.index+1, $ .sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key: ` Backspace ` ,format:[ ` table ` ],collapsed:!0,offset:0,handler(){}},"table delete":{key: ` Delete ` ,format:[ ` table ` ],collapsed:!0,suffix:/^ $ /,handler(){}},"table enter":{key: ` Enter ` ,shiftKey:null,format:[ ` table ` ],handler(e){let t=this.quill.getModule( ` table ` );if(t){let[n,r,i,a]=t.getTable(e),o=ET(n,r,i,a);if(o==null)return;let s=n.offset();if(o<0){let t=new Q.default().retain(s).insert( `
` );this.quill.updateContents(t, $ .sources.USER),this.quill.setSelection(e.index+1,e.length, $ .sources.SILENT)}else if(o>0){s+=n.length();let e=new Q.default().retain(s).insert( `
` );this.quill.updateContents(e, $ .sources.USER),this.quill.setSelection(s, $ .sources.USER)}}}},"table tab":{key: ` Tab ` ,shiftKey:null,format:[ ` table ` ],handler(e,t){let{event:n,line:r}=t,i=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(i-1, $ .sources.USER):this.quill.setSelection(i+r.length(), $ .sources.USER)}},"list autofill":{key: ` ` ,shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^ \s *?( \d + \. |-| \* | \[ ? \] | \[ x \] ) $ /,handler(e,t){if(this.quill.scroll.query( ` list ` )==null)return!0;let{length:n}=t.prefix,[r,i]=this.quill.getLine(e.index);if(i>n)return!0;let a;switch(t.prefix.trim()){case ` [ ] ` :case ` [ ] ` :a= ` unchecked ` ;break;case ` [ x ] ` :a= ` checked ` ;break;case ` - ` :case ` * ` :a= ` bullet ` ;break;default:a= ` ordered ` }this.quill.insertText(e.index, ` ` , $ .sources.USER),this.quill.history.cutoff();let o=new Q.default().retain(e.index-i).delete(n+1).retain(r.length()-2-i).retain(1,{list:a});return this.quill.updateContents(o, $ .sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n, $ .sources.SILENT),!1}},"code exit":{key: ` Enter ` ,collapsed:!0,format:[ ` code - block ` ],prefix:/^ $ /,suffix:/^ \s * $ /,handler(e){let[t,n]=this.quill.getLine(e.index),r=2,i=t;for(;i!=null&&i.length()<=1&&i.formats()[ ` code - block ` ];)if(i=i.prev,--r,r<=0){let r=new Q.default().retain(e.index+t.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(r, $ .sources.USER),this.quill.setSelection(e.index-1, $ .sources.SILENT),!1}return!0}},"embed left":xT( ` ArrowLeft ` ,!1),"embed left shift":xT( ` ArrowLeft ` ,!0),"embed right":xT( ` ArrowRight ` ,!1),"embed right shift":xT( ` ArrowRight ` ,!0),"table down":CT(!1),"table up":CT(!0)}};function bT(e){return{key: ` Tab ` ,shiftKey:!e,format:{"code-block":!0},handler(t,n){let{event:r}=n,{TAB:i}=this.quill.scroll.query( ` code - block ` );if(t.length===0&&!r.shiftKey){this.quill.insertText(t.index,i, $ .sources.USER),this.quill.setSelection(t.index+i.length, $ .sources.SILENT);return}let a=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t),{index:o,length:s}=t;a.forEach((t,n)=>{e?(t.insertAt(0,i),n===0?o+=i.length:s+=i.length):t.domNode.textContent.startsWith(i)&&(t.deleteAt(0,i.length),n===0?o-=i.length:s-=i.length)}),this.quill.update( $ .sources.USER),this.quill.setSelection(o,s, $ .sources.SILENT)}}}function xT(e,t){return{key:e,shiftKey:t,altKey:null,[e=== ` ArrowLeft ` ? ` prefix ` : ` suffix ` ]:/^ $ /,handler(n){let{index:r}=n;e=== ` ArrowRight ` &&(r+=n.length+1);let[i]=this.quill.getLeaf(r);return i instanceof MC?(e=== ` ArrowLeft ` ?t?this.quill.setSelection(n.index-1,n.length+1, $ .sources.USER):this.quill.setSelection(n.index-1, $ .sources.USER):t?this.quill.setSelection(n.index,n.length+1, $ .sources.USER):this.quill.setSelection(n.index+n.length+1, $ .sources.USER),!1):!0}}}function ST(e){return{key:e[0],shortKey:!0,handler(t,n){this.quill.format(e,!n.format[e], $ .sources.USER)}}}function CT(e){return{key:e? ` ArrowUp ` : ` ArrowDown ` ,collapsed:!0,format:[ ` table ` ],handler(t,n){let r=e? ` prev ` : ` next ` ,i=n.line,a=i.parent[r];if(a!=null){if(a.statics.blotName=== ` table - row ` ){let e=a.children.head,t=i;for(;t.prev!=null;)t=t.prev,e=e.next;let r=e.offset(this.quill.scroll)+Math.min(n.offset,e.length()-1);this.quill.setSelection(r,0, $ .sources.USER)}}else{let t=i.table()[r];t!=null&&(e?this.quill.setSelection(t.offset(this.quill.scroll)+t.length()-1,0, $ .sources.USER):this.quill.setSelection(t.offset(this.quill.scroll),0, $ .sources.USER))}return!1}}}function wT(e){if(typeof e== ` string ` ||typeof e== ` number ` )e={key:e};else if(typeof e== ` object ` )e=fS(e);else return null;return e.shortKey&&(e[vT]=e.shortKey,delete e.shortKey),e}function TT(e){let{quill:t,range:n}=e,r=t.getLines(n),i={};if(r.length>1){let e=r[0].formats(),t=r[r.length-1].formats();i=Q.AttributeMap.diff(t,e)||{}}t.deleteText(n, $ .sources.USER),Object.keys(i).length>0&&t.formatLine(n.index,1,i, $ .sources.USER),t.setSelection(n.index, $ .sources.SILENT)}function ET(e,t,n,r){return t.prev==null&&t.next==null?n.prev==null&&n.next==null?r===0?-1:1:n.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}var DT=/font-weight: \s *normal/,OT=[ ` P ` , ` OL ` , ` UL ` ],kT=e=>e&&OT.includes(e.tagName),AT=e=>{Array.from(e.querySelectorAll( ` br ` )).filter(e=>kT(e.previousElementSibling)&&kT(e.nextElementSibling)).forEach(e=>{e.parentNode?.removeChild(e)})},jT=e=>{Array.from(e.querySelectorAll( ` b [ style *= "font-weight" ] ` )).filter(e=>e.getAttribute( ` style ` )?.match(DT)).forEach(t=>{let n=e.createDocumentFragment();n.append(...t.childNodes),t.parentNode?.replaceChild(n,t)})};function MT(e){e.querySelector( ` [ id ^= "docs-internal-guid-" ] ` )&&(jT(e),AT(e))}var NT=/ \b mso-list:[^;]*ignore/i,PT=/ \b mso-list:[^;]* \b l( \d +)/i,FT=/ \b mso-list:[^;]* \b level( \d +)/i,IT=(e,t)=>{let n=e.getAttribute( ` style ` ),r=n?.match(PT);if(!r)return null;let i=Number(r[1]),a=n?.match(FT),o=a?Number(a[1]):1,s=RegExp( ` @ list l$ { i } : level$ { o } \ \ s * \ \ { [ ^ \ \ } ] * mso - level - number - format : \ \ s * ( [ \ \ w - ] + ) ` , ` i ` ),c=t.match(s);return{id:i,indent:o,type:c&&c[1]=== ` bullet ` ? ` bullet ` : ` ordered ` ,element:e}},LT=e=>{let t=Array.f
Line truncated
` )&&(i.ops[i.ops.length-1].attributes==null||r.table)?i.compose(new Q.default().retain(i.length()-1).delete(1)):i}normalizeHTML(e){BT(e)}convertHTML(e){let t=new DOMParser().parseFromString(e, ` text / html ` );this.normalizeHTML(t);let n=t.body,r=new WeakMap,[i,a]=this.prepareMatching(n,r);return QT(this.quill.scroll,n,i,a,r)}dangerouslyPasteHTML(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]: $ .sources.API;if(typeof e== ` string ` ){let n=this.convert({html:e,text: ` ` });this.quill.setContents(n,t),this.quill.setSelection(0, $ .sources.SILENT)}else{let r=this.convert({html:t,text: ` ` });this.quill.updateContents(new Q.default().retain(e).concat(r),n),this.quill.setSelection(e+r.length(), $ .sources.SILENT)}}onCaptureCopy(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.defaultPrevented)return;e.preventDefault();let[n]=this.quill.selection.getRange();if(n==null)return;let{html:r,text:i}=this.onCopy(n,t);e.clipboardData?.setData( ` text / plain ` ,i),e.clipboardData?.setData( ` text / html ` ,r),t&&TT({range:n,quill:this.quill})}normalizeURIList(e){return e.split(/ \r ? \n /).filter(e=>e[0]!== ` # ` ).join( `
` )}onCapturePaste(e){if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();let t=this.quill.getSelection(!0);if(t==null)return;let n=e.clipboardData?.getData( ` text / html ` ),r=e.clipboardData?.getData( ` text / plain ` );if(!n&&!r){let t=e.clipboardData?.getData( ` text / uri - list ` );t&&(r=this.normalizeURIList(t))}let i=Array.from(e.clipboardData?.files||[]);if(!n&&i.length>0){this.quill.uploader.upload(t,i);return}if(n&&i.length>0){let e=new DOMParser().parseFromString(n, ` text / html ` );if(e.body.childElementCount===1&&e.body.firstElementChild?.tagName=== ` IMG ` ){this.quill.uploader.upload(t,i);return}}this.onPaste(t,{html:n,text:r})}onCopy(e){let t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:n,html:r}=t,i=this.quill.getFormat(e.index),a=this.convert({text:n,html:r},i);VT.log( ` onPaste ` ,a,{text:n,html:r});let o=new Q.default().retain(e.index).delete(e.length).concat(a);this.quill.updateContents(o, $ .sources.USER),this.quill.setSelection(o.length()-e.length, $ .sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,t){let n=[],r=[];return this.matchers.forEach(i=>{let[a,o]=i;switch(a){case Node.TEXT_NODE:r.push(o);break;case Node.ELEMENT_NODE:n.push(o);break;default:Array.from(e.querySelectorAll(a)).forEach(e=>{t.has(e)?t.get(e)?.push(o):t.set(e,[o])});break}}),[n,r]}};function KT(e,t,n,r){return r.query(t)?e.reduce((e,r)=>{if(!r.insert)return e;if(r.attributes&&r.attributes[t])return e.push(r);let i=n?{[t]:n}:{};return e.insert(r.insert,{...i,...r.attributes})},new Q.default):e}function qT(e,t){let n= ` ` ;for(let r=e.ops.length-1;r>=0&&n.length<t.length;--r){let t=e.ops[r];if(typeof t.insert!= ` string ` )break;n=t.insert+n}return n.slice(-1*t.length)===t}function JT(e,t){if(!(e instanceof Element))return!1;let n=t.query(e);return n&&n.prototype instanceof MC?!1: ` address . article . blockquote . canvas . dd . div . dl . dt . fieldset . figcaption . figure . footer . form . h1 . h2 . h3 . h4 . h5 . h6 . header . iframe . li . main . nav . ol . output . p . pre . section . table . td . tr . ul . video ` .split( ` . ` ).includes(e.tagName.toLowerCase())}function YT(e,t){return e.previousElementSibling&&e.nextElementSibling&&!JT(e.previousElementSibling,t)&&!JT(e.nextElementSibling,t)}var XT=new WeakMap;function ZT(e){return e==null?!1:(XT.has(e)||(e.tagName=== ` PRE ` ?XT.set(e,!0):XT.set(e,ZT(e.parentNode))),XT.get(e))}function QT(e,t,n,r,i){return t.nodeType===t.TEXT_NODE?r.reduce((n,r)=>r(t,n,e),new Q.default):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((a,o)=>{let s=QT(e,o,n,r,i);return o.nodeType===t.ELEMENT_NODE&&(s=n.reduce((t,n)=>n(o,t,e),s),s=(i.get(o)||[]).reduce((t,n)=>n(o,t,e),s)),a.concat(s)},new Q.default):new Q.default}function $ T(e){return(t,n,r)=>KT(n,e,!0,r)}function eE(e,t,n){let r=cC.keys(e),i=pC.keys(e),a=hC.keys(e),o={};return r.concat(i).concat(a).forEach(t=>{let r=n.query(t,sC.ATTRIBUTE);r!=null&&(o[r.attrName]=r.value(e),o[r.attrName])||(r=UT[t],r!=null&&(r.attrName===t||r.keyName===t)&&(o[r.attrName]=r.value(e)||void 0),r=WT[t],r!=null&&(r.attrName===t||r.keyName===t)&&(r=WT[t],o[r.attrName]=r.value(e)||void 0))}),Object.entries(o).reduce((e,t)=>{let[r,i]=t;return KT(e,r,i,n)},t)}function tE(e,t,n){let r=n.query(e);if(r==null)return t;if(r.prototype instanceof MC){let t={},i=r.value(e);if(i!=null)return t[r.blotName]=i,new Q.default().insert(t,r.formats(e,n))}else if(r.prototype instanceof kC&&!qT(t, `
` )&&t.insert( `
` ), ` blotName ` in r&& ` formats ` in r&&typeof r.formats== ` function ` )return KT(t,r.blotName,r.formats(e,n),n);return t}function nE(e,t){return qT(t, `
` )||t.insert( `
` ),t}function rE(e,t,n){let r=n.query( ` code - block ` );return KT(t, ` code - block ` ,r&& ` formats ` in r&&typeof r.formats== ` function ` ?r.formats(e,n):!0,n)}function iE(){return new Q.default}function aE(e,t,n){let r=n.query(e);if(r==null||r.blotName!== ` list ` ||!qT(t, `
` ))return t;let i=-1,a=e.parentNode;for(;a!=null;)[ ` OL ` , ` UL ` ].includes(a.tagName)&&(i+=1),a=a.parentNode;return i<=0?t:t.reduce((e,t)=>t.insert?t.attributes&&typeof t.attributes.indent== ` number ` ?e.push(t):e.insert(t.insert,{indent:i,...t.attributes||{}}):e,new Q.default)}function oE(e,t,n){let r=e,i=r.tagName=== ` OL ` ? ` ordered ` : ` bullet ` ,a=r.getAttribute( ` data - checked ` );return a&&(i=a=== ` true ` ? ` checked ` : ` unchecked ` ),KT(t, ` list ` ,i,n)}function sE(e,t,n){if(!qT(t, `
` )){if(JT(e,n)&&(e.childNodes.length>0||e instanceof HTMLParagraphElement))return t.insert( `
` );if(t.length()>0&&e.nextSibling){let r=e.nextSibling;for(;r!=null;){if(JT(r,n))return t.insert( `
` );let e=n.query(r);if(e&&e.prototype instanceof QC)return t.insert( `
` );r=r.firstChild}}}return t}function cE(e,t,n){let r={},i=e.style||{};return i.fontStyle=== ` italic ` &&(r.italic=!0),i.textDecoration=== ` underline ` &&(r.underline=!0),i.textDecoration=== ` line - through ` &&(r.strike=!0),(i.fontWeight?.startsWith( ` bold ` )||parseInt(i.fontWeight,10)>=700)&&(r.bold=!0),t=Object.entries(r).reduce((e,t)=>{let[r,i]=t;return KT(e,r,i,n)},t),parseFloat(i.textIndent||0)>0?new Q.default().insert( ` ` ).concat(t):t}function lE(e,t,n){let r=e.parentElement?.tagName=== ` TABLE ` ?e.parentElement:e.parentElement?.parentElement;return r==null?t:KT(t, ` table ` ,Array.from(r.querySelectorAll( ` tr ` )).indexOf(e)+1,n)}function uE(e,t,n){let r=e.data;if(e.parentElement?.tagName=== ` O : P ` )return t.insert(r.trim());if(!ZT(e)){if(r.trim().length===0&&r.includes( `
` )&&!YT(e,n))return t;r=r.replace(/[^ \S \u 00a0]/g, ` ` ),r=r.replace(/ {2,}/g, ` ` ),(e.previousSibling==null&&e.parentElement!=null&&JT(e.parentElement,n)||e.previousSibling instanceof Element&&JT(e.previousSibling,n))&&(r=r.replace(/^ /, ` ` )),(e.nextSibling==null&&e.parentElement!=null&&JT(e.parentElement,n)||e.nextSibling instanceof Element&&JT(e.nextSibling,n))&&(r=r.replace(/ $ /, ` ` )),r=r.replaceAll( ` \ xA0 ` , ` ` )}return t.insert(r)}var dE=class extends Cw{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(e,t){super(e,t),this.quill.on( $ .events.EDITOR_CHANGE,(e,t,n,r)=>{e=== $ .events.SELECTION_CHANGE?t&&r!== $ .sources.SILENT&&(this.currentRange=t):e=== $ .events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||r=== $ .sources.USER?this.record(t,n):this.transform(t)),this.currentRange=hE(this.currentRange,t))}),this.quill.keyboard.addBinding({key: ` z ` ,shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:[ ` z ` , ` Z ` ],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key: ` y ` ,shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener( ` beforeinput ` ,e=>{e.inputType=== ` historyUndo ` ?(this.undo(),e.preventDefault()):e.inputType=== ` historyRedo ` &&(this.redo(),e.preventDefault())})}change(e,t){if(this.stack[e].length===0)return;let n=this.stack[e].pop();if(!n)return;let r=this.quill.getContents(),i=n.delta.invert(r);this.stack[t].push({delta:i,range:hE(n.range,i)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta, $ .sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(e,t){if(e.ops.length===0)return;this.stack.redo=[];let n=e.invert(t),r=this.currentRange,i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){let e=this.stack.undo.pop();e&&(n=n.compose(e.delta),r=e.range)}else this.lastRecorded=i;n.length()!==0&&(this.stack.undo.push({delta:n,range:r}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change( ` redo ` , ` undo ` )}transform(e){fE(this.stack.undo,e),fE(this.stack.redo,e)}undo(){this.change( ` undo ` , ` redo ` )}restoreSelection(e){if(e.range)this.quill.setSelection(e.range, $ .sources.USER);else{let t=mE(this.quill.scroll,e.delta);this.quill.setSelection(t, $ .sources.USER)}}};function fE(e,t){let n=t;for(let t=e.length-1;t>=0;--t){let r=e[t];e[t]={delta:n.transform(r.delta,!0),range:r.range&&hE(r.range,n)},n=r.delta.transform(n),e[t].delta.length()===0&&e.splice(t,1)}}function pE(e,t){let n=t.ops[t.ops.length-1];return n==null?!1:n.insert==null?n.attributes==null?!1:Object.keys(n.attributes).some(t=>e.query(t,sC.BLOCK)!=null):typeof n.insert== ` string ` &&n.insert.endsWith( `
` )}function mE(e,t){let n=t.reduce((e,t)=>e+(t.delete||0),0),r=t.length()-n;return pE(e,t)&&--r,r}function hE(e,t){if(!e)return e;let n=t.transformPosition(e.index);return{index:n,length:t.transformPosition(e.index+e.length)-n}}var gE=class extends Cw{constructor(e,t){super(e,t),e.root.addEventListener( ` drop ` ,t=>{t.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(t.clientX,t.clientY);else if(document.caretPositionFromPoint){let e=document.caretPositionFromPoint(t.clientX,t.clientY);n=document.createRange(),n.setStart(e.offsetNode,e.offset),n.setEnd(e.offsetNode,e.offset)}let r=n&&e.selection.normalizeNative(n);if(r){let n=e.selection.normalizedToRange(r);t.dataTransfer?.files&&this.upload(n,t.dataTransfer.files)}})}upload(e,t){let n=[];Array.from(t).forEach(e=>{e&&this.options.mimetypes?.includes(e.type)&&n.push(e)}),n.length>0&&this.options.handler.call(this,e,n)}};gE.DEFAULTS={mimetypes:[ ` image / png ` , ` image / jpeg ` ],handler(e,t){if(!this.quill.scroll.query( ` image ` ))return;let n=t.map(e=>new Promise(t=>{let n=new FileReader;n.onload=()=>{t(n.result)},n.readAsDataURL(e)}));Promise.all(n).then(t=>{let n=t.reduce((e,t)=>e.insert({image:t}),new Q.default().retain(e.index).delete(e.length));this.quill.updateContents(n,lw.sources.USER),this.quill.setSelection(e.index+t.length,lw.sources.SILENT)})}};var _E=[ ` insertText ` , ` insertReplacementText ` ],vE=class extends Cw{constructor(e,t){super(e,t),e.root.addEventListener( ` beforeinput ` ,e=>{this.handleBeforeInput(e)}),/Android/i.test(navigator.userAgent)||e.on( $ .events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){TT({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]: ` ` ;if(e.length===0)return!1;if(t){let n=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new Q.default().retain(e.index).insert(t,n), $ .sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0, $ .sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!_E.includes(e.inputType))return;let t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;let n=yE(e);if(n==null)return;let r=this.quill.selection.normalizeNative(t),i=r?this.quill.selection.normalizedToRange(r):null;i&&this.replaceText(i,n)&&e.preventDefault()}handleCompositionStart(){let e=this.quill.getSelection();e&&this.replaceText(e)}};function yE(e){return typeof e.data== ` string ` ?e.data:e.dataTransfer?.types.includes( ` text / plain ` )?e.dataTransfer.getData( ` text / plain ` ):null}var bE=/Mac/i.test(navigator.platform),xE=e=>!!(e.key=== ` ArrowLeft ` ||e.key=== ` ArrowRight ` ||e.key=== ` ArrowUp ` ||e.key=== ` ArrowDown ` ||e.key=== ` Home ` ||bE&&e.key=== ` a ` &&e.ctrlKey===!0),SE=class extends Cw{isListening=!1;selectionChangeDeadline=0;constructor(e,t){super(e,t),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:[ ` ArrowLeft ` , ` ArrowRight ` ],offset:0,shiftKey:null,handler(e,t){let{line:n,event:r}=t;if(!(n instanceof wC)||!n.uiNode)return!0;let i=getComputedStyle(n.domNode).direction=== ` rtl ` ;return i&&r.key!== ` ArrowRight ` ||!i&&r.key!== ` ArrowLeft ` ?!0:(this.quill.setSelection(e.index-1,e.length+ +!!r.shiftKey, $ .sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener( ` keydown ` ,e=>{!e.defaultPrevented&&xE(e)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){this.selectionChangeDeadline=Date.now()+100,!this.isListening&&(this.isListening=!0,document.addEventListener( ` selectionchange ` ,()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()},{once:!0}))}handleSelectionChange(){let e=document.getSelection();if(!e)return;let t=e.getRangeAt(0);if(t.collapsed!==!0||t.startOffset!==0)return;let n=this.quill.scroll.find(t.startContainer);if(!(n instanceof wC)||!n.uiNode)return;let r=document.createRange();r.setStartAfter(n.uiNode),r.setEndAfter(n.uiNode),e.removeAllRanges(),e.addRange(r)}}; $ .register({"blots/block":ZC,"blots/block/embed":QC,"blots/break":GC,"blots/container":Gw,"blots/cursor":tw,"blots/embed":Tw,"blots/inline":YC,"blots/scroll":Jw,"blots/text":KC,"modules/clipboard":GT,"modules/history":dE,"modules/keyboard":yT,"modules/uploader":gE,"modules/input":vE,"modules/uiNode":SE});var CE= $ ,wE=new class extends pC{add(e,t){let n=0;if(t=== ` + 1 ` ||t=== ` - 1 ` ){let r=this.value(e)||0;n=t=== ` + 1 ` ?r+1:r-1}else typeof t== ` number ` &&(n=t);return n===0?(this.remove(e),!0):super.add(e,n.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}( ` indent ` , ` ql - indent ` ,{scope:sC.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),TE=class extends ZC{static blotName= ` blockquote ` ;static tagName= ` blockquote ` },EE=class extends ZC{static blotName= ` header ` ;static tagName=[ ` H1 ` , ` H2 ` , ` H3 ` , ` H4 ` , ` H5 ` , ` H6 ` ];static formats(e){return this.tagName.indexOf(e.tagName)+
Line truncated
` )} \n ` , r = UE . formats ( this . children . head . domNode ) ; if ( t || this . forceNext || this . cachedText !== n ) { if ( n . trim ( ) . length > 0 || this . cachedText == null ) { let t = this . children . reduce ( ( e , t ) => e . concat ( $C ( t , ! 1 ) ) , new Q . default ) , i = e ( n , r ) ; t . diff ( i ) . reduce ( ( e , t ) => { let { retain : n , attributes : r } = t ; return n ? ( r && Object . keys ( r ) . forEach ( t => { [ UE . blotName , HE . blotName ] . includes ( t ) && this . formatAt ( e , n , t , r [ t ] ) } ) , e + n ) : e } , 0 ) } this . cachedText = n , this . forceNext = ! 1 } } html ( e , t ) { let [ n ] = this . children . find ( e ) ; return ` <pre data-language=" ${ n ? UE . formats ( n . domNode ) : ` plain ` } "> \n ${ JC ( this . code ( e , t ) ) } \n </pre> ` } optimize ( e ) { if ( super . optimize ( e ) , this . parent != null && this . children . head != null && this . uiNode != null ) { let e = UE . formats ( this . children . head . domNode ) ; e !== this . uiNode . value && ( this . uiNode . value = e ) } } } ; WE . allowedChildren = [ UE ] , UE . requiredContainer = WE , UE . allowedChildren = [ HE , tw , KC , GC ] ; var GE = ( e , t , n ) => { if ( typeof e . versionString == ` string ` ) { let r = e . versionString . split ( ` . ` ) [ 0 ] ; if ( parseInt ( r , 10 ) >= 11 ) return e . highlight ( n , { language : t } ) . value } return e . highlight ( t , n ) . value } , KE = class extends Cw { static register ( ) { $ . register ( HE , ! 0 ) , $ . register ( UE , ! 0 ) , $ . register ( WE , ! 0 ) } constructor ( e , t ) { if ( super ( e , t ) , this . options . hljs == null ) throw Error ( ` Syntax module requires highlight.js. Please include the library on the page before Quill. ` ) ; this . languages = this . options . languages . reduce ( ( e , t ) => { let { key : n } = t ; return e [ n ] = ! 0 , e } , { } ) , this . highlightBlot = this . highlightBlot . bind ( this ) , this . initListener ( ) , this . initTimer ( ) } initListener ( ) { this . quill . on ( $ . events . SCROLL _BLOT _MOUNT , e => { if ( ! ( e instanceof WE ) ) return ; let t = this . quill . root . ownerDocument . createElement ( ` select ` ) ; this . options . languages . forEach ( e => { let { key : n , label : r } = e , i = t . ownerDocument . createElement ( ` option ` ) ; i . textContent = r , i . setAttribute ( ` value ` , n ) , t . appendChild ( i ) } ) , t . addEventListener ( ` change ` , ( ) => { e . format ( UE . blotName , t . value ) , this . quill . root . focus ( ) , this . highlight ( e , ! 0 ) } ) , e . uiNode ? ? ( e . attachUI ( t ) , e . children . head && ( t . value = UE . formats ( e . children . head . domNode ) ) ) } ) } initTimer ( ) { let e = null ; this . quill . on ( $ . events . SCROLL _OPTIMIZE , ( ) => { e && clearTimeout ( e ) , e = setTimeout ( ( ) => { this . highlight ( ) , e = null } , this . options . interval ) } ) } highlight ( ) { let e = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : null , t = arguments . length > 1 && arguments [ 1 ] !== void 0 ? arguments [ 1 ] : ! 1 ; if ( this . quill . selection . composing ) return ; this . quill . update ( $ . sources . USER ) ; let n = this . quill . getSelection ( ) ; ( e == null ? this . quill . scroll . descendants ( WE ) : [ e ] ) . forEach ( e => { e . highlight ( this . highlightBlot , t ) } ) , this . quill . update ( $ . sources . SILENT ) , n != null && this . quill . setSelection ( n , $ . sources . SILENT ) } highlightBlot ( e ) { let t = arguments . length > 1 && arguments [ 1 ] !== void 0 ? arguments [ 1 ] : ` plain ` ; if ( t = this . languages [ t ] ? t : ` plain ` , t === ` plain ` ) return JC ( e ) . split ( `
` ).reduce((e,n,r)=>(r!==0&&e.insert( `
` ,{[oT.blotName]:t}),e.insert(n)),new Q.default);let n=this.quill.root.ownerDocument.createElement( ` div ` );return n.classList.add(oT.className),n.innerHTML=GE(this.options.hljs,t,e),QT(this.quill.scroll,n,[(e,t)=>{let n=VE.value(e);return n?t.compose(new Q.default().retain(t.length(),{[HE.blotName]:n})):t}],[(e,n)=>e.data.split( `
` ).reduce((e,n,r)=>(r!==0&&e.insert( `
` ,{[oT.blotName]:t}),e.insert(n)),n)],new WeakMap)}};KE.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 qE=class e extends ZC{static blotName= ` table ` ;static tagName= ` TD ` ;static create(e){let t=super.create();return e?t.setAttribute( ` data - row ` ,e):t.setAttribute( ` data - row ` ,ZE()),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()}},JE=class extends Gw{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}},YE=class extends Gw{static blotName= ` table - body ` ;static tagName= ` TBODY ` },XE=class extends Gw{static blotName= ` table - container ` ;static tagName= ` TABLE ` ;balanceCells(){let e=this.descendants(JE),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=qE.formats(e.children.head.domNode));let n=this.scroll.create(qE.blotName,t);e.appendChild(n),n.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){let[t]=this.descendant(YE);t==null||t.children.head==null||t.children.forEach(t=>{t.children.at(e)?.remove()})}insertColumn(e){let[t]=this.descendant(YE);t==null||t.children.head==null||t.children.forEach(t=>{let n=t.children.at(e),r=qE.formats(t.children.head.domNode),i=this.scroll.create(qE.blotName,r);t.insertBefore(i,n)})}insertRow(e){let[t]=this.descendant(YE);if(t==null||t.children.head==null)return;let n=ZE(),r=this.scroll.create(JE.blotName);t.children.head.children.forEach(()=>{let e=this.scroll.create(qE.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)}};XE.allowedChildren=[YE],YE.requiredContainer=XE,YE.allowedChildren=[JE],JE.requiredContainer=YE,JE.allowedChildren=[qE],qE.requiredContainer=JE;function ZE(){return ` row - $ { Math . random ( ) . toString ( 36 ) . slice ( 2 , 6 ) } ` }var QE=class extends Cw{static register(){ $ .register(qE), $ .register(JE), $ .register(YE), $ .register(XE)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(XE).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!==qE.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:ZE()})},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)})}}, $ E=sw( ` quill : toolbar ` ),eD=class extends Cw{constructor(e,t){if(super(e,t),Array.isArray(this.options.container)){let t=document.createElement( ` div ` );t.setAttribute( ` role ` , ` toolbar ` ),nD(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)){ $ E.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){ $ E.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 MC){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())}})}};eD.DEFAULTS={};function tD(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 nD(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 ` )tD(n,e);else{let t=Object.keys(e)[0],r=e[t];Array.isArray(r)?rD(n,t,r):tD(n,t,r)}}),e.appendChild(n)})}function rD(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)}eD.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,sC.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