@aitmed/aitmed-document-template 1.32.0 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -48,18 +48,18 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
48
48
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...o){const a=new this(r);return o.forEach(l=>a.set(l)),a}static accessor(r){const a=(this[jp]=this[jp]={accessors:{}}).accessors,l=this.prototype;function c(u){const f=pi(u);a[f]||(gI(l,u),a[f]=!0)}return X.isArray(r)?r.forEach(c):c(r),this}}jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(jt.prototype,({value:e},r)=>{let o=r[0].toUpperCase()+r.slice(1);return{get:()=>e,set(a){this[o]=a}}}),X.freezeMethods(jt);function zl(e,r){const o=this||di,a=r||o,l=jt.from(a.headers);let c=a.data;return X.forEach(e,function(f){c=f.call(o,c,l.normalize(),r?r.status:void 0)}),l.normalize(),c}function Up(e){return!!(e&&e.__CANCEL__)}function ko(e,r,o){Be.call(this,e??"canceled",Be.ERR_CANCELED,r,o),this.name="CanceledError"}X.inherits(ko,Be,{__CANCEL__:!0});function Wp(e,r,o){const a=o.config.validateStatus;!o.status||!a||a(o.status)?e(o):r(new Be("Request failed with status code "+o.status,[Be.ERR_BAD_REQUEST,Be.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function yI(e){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}function bI(e,r){e=e||10;const o=new Array(e),a=new Array(e);let l=0,c=0,u;return r=r!==void 0?r:1e3,function(m){const y=Date.now(),g=a[c];u||(u=y),o[l]=m,a[l]=y;let w=c,b=0;for(;w!==l;)b+=o[w++],w=w%e;if(l=(l+1)%e,l===c&&(c=(c+1)%e),y-u<r)return;const M=g&&y-g;return M?Math.round(b*1e3/M):void 0}}function wI(e,r){let o=0;const a=1e3/r;let l=null;return function(){const u=this===!0,f=Date.now();if(u||f-o>a)return l&&(clearTimeout(l),l=null),o=f,e.apply(null,arguments);l||(l=setTimeout(()=>(l=null,o=Date.now(),e.apply(null,arguments)),a-(f-o)))}}const Sa=(e,r,o=3)=>{let a=0;const l=bI(50,250);return wI(c=>{const u=c.loaded,f=c.lengthComputable?c.total:void 0,m=u-a,y=l(m),g=u<=f;a=u;const w={loaded:u,total:f,progress:f?u/f:void 0,bytes:m,rate:y||void 0,estimated:y&&f&&g?(f-u)/y:void 0,event:c,lengthComputable:f!=null};w[r?"download":"upload"]=!0,e(w)},o)},EI=In.hasStandardBrowserEnv?function(){const r=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");let a;function l(c){let u=c;return r&&(o.setAttribute("href",u),u=o.href),o.setAttribute("href",u),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:o.pathname.charAt(0)==="/"?o.pathname:"/"+o.pathname}}return a=l(window.location.href),function(u){const f=X.isString(u)?l(u):u;return f.protocol===a.protocol&&f.host===a.host}}():function(){return function(){return!0}}(),CI=In.hasStandardBrowserEnv?{write(e,r,o,a,l,c){const u=[e+"="+encodeURIComponent(r)];X.isNumber(o)&&u.push("expires="+new Date(o).toGMTString()),X.isString(a)&&u.push("path="+a),X.isString(l)&&u.push("domain="+l),c===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){const r=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function SI(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _I(e,r){return r?e.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):e}function Hp(e,r){return e&&!SI(r)?_I(e,r):r}const Yp=e=>e instanceof jt?{...e}:e;function Kr(e,r){r=r||{};const o={};function a(y,g,w){return X.isPlainObject(y)&&X.isPlainObject(g)?X.merge.call({caseless:w},y,g):X.isPlainObject(g)?X.merge({},g):X.isArray(g)?g.slice():g}function l(y,g,w){if(X.isUndefined(g)){if(!X.isUndefined(y))return a(void 0,y,w)}else return a(y,g,w)}function c(y,g){if(!X.isUndefined(g))return a(void 0,g)}function u(y,g){if(X.isUndefined(g)){if(!X.isUndefined(y))return a(void 0,y)}else return a(void 0,g)}function f(y,g,w){if(w in r)return a(y,g);if(w in e)return a(void 0,y)}const m={url:c,method:c,data:c,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f,headers:(y,g)=>l(Yp(y),Yp(g),!0)};return X.forEach(Object.keys(Object.assign({},e,r)),function(g){const w=m[g]||l,b=w(e[g],r[g],g);X.isUndefined(b)&&w!==f||(o[g]=b)}),o}const Gp=e=>{const r=Kr({},e);let{data:o,withXSRFToken:a,xsrfHeaderName:l,xsrfCookieName:c,headers:u,auth:f}=r;r.headers=u=jt.from(u),r.url=zp(Hp(r.baseURL,r.url),e.params,e.paramsSerializer),f&&u.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):"")));let m;if(X.isFormData(o)){if(In.hasStandardBrowserEnv||In.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if((m=u.getContentType())!==!1){const[y,...g]=m?m.split(";").map(w=>w.trim()).filter(Boolean):[];u.setContentType([y||"multipart/form-data",...g].join("; "))}}if(In.hasStandardBrowserEnv&&(a&&X.isFunction(a)&&(a=a(r)),a||a!==!1&&EI(r.url))){const y=l&&c&&CI.read(c);y&&u.set(l,y)}return r},xI=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,a){const l=Gp(e);let c=l.data;const u=jt.from(l.headers).normalize();let{responseType:f}=l,m;function y(){l.cancelToken&&l.cancelToken.unsubscribe(m),l.signal&&l.signal.removeEventListener("abort",m)}let g=new XMLHttpRequest;g.open(l.method.toUpperCase(),l.url,!0),g.timeout=l.timeout;function w(){if(!g)return;const M=jt.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),S={data:!f||f==="text"||f==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:M,config:e,request:g};Wp(function(k){o(k),y()},function(k){a(k),y()},S),g=null}"onloadend"in g?g.onloadend=w:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(w)},g.onabort=function(){g&&(a(new Be("Request aborted",Be.ECONNABORTED,l,g)),g=null)},g.onerror=function(){a(new Be("Network Error",Be.ERR_NETWORK,l,g)),g=null},g.ontimeout=function(){let E=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const S=l.transitional||$p;l.timeoutErrorMessage&&(E=l.timeoutErrorMessage),a(new Be(E,S.clarifyTimeoutError?Be.ETIMEDOUT:Be.ECONNABORTED,l,g)),g=null},c===void 0&&u.setContentType(null),"setRequestHeader"in g&&X.forEach(u.toJSON(),function(E,S){g.setRequestHeader(S,E)}),X.isUndefined(l.withCredentials)||(g.withCredentials=!!l.withCredentials),f&&f!=="json"&&(g.responseType=l.responseType),typeof l.onDownloadProgress=="function"&&g.addEventListener("progress",Sa(l.onDownloadProgress,!0)),typeof l.onUploadProgress=="function"&&g.upload&&g.upload.addEventListener("progress",Sa(l.onUploadProgress)),(l.cancelToken||l.signal)&&(m=M=>{g&&(a(!M||M.type?new ko(null,e,g):M),g.abort(),g=null)},l.cancelToken&&l.cancelToken.subscribe(m),l.signal&&(l.signal.aborted?m():l.signal.addEventListener("abort",m)));const b=yI(l.url);if(b&&In.protocols.indexOf(b)===-1){a(new Be("Unsupported protocol "+b+":",Be.ERR_BAD_REQUEST,e));return}g.send(c||null)})},II=(e,r)=>{let o=new AbortController,a;const l=function(m){if(!a){a=!0,u();const y=m instanceof Error?m:this.reason;o.abort(y instanceof Be?y:new ko(y instanceof Error?y.message:y))}};let c=r&&setTimeout(()=>{l(new Be(`timeout ${r} of ms exceeded`,Be.ETIMEDOUT))},r);const u=()=>{e&&(c&&clearTimeout(c),c=null,e.forEach(m=>{m&&(m.removeEventListener?m.removeEventListener("abort",l):m.unsubscribe(l))}),e=null)};e.forEach(m=>m&&m.addEventListener&&m.addEventListener("abort",l));const{signal:f}=o;return f.unsubscribe=u,[f,()=>{c&&clearTimeout(c),c=null}]},kI=function*(e,r){let o=e.byteLength;if(!r||o<r){yield e;return}let a=0,l;for(;a<o;)l=a+r,yield e.slice(a,l),a=l},MI=async function*(e,r,o){for await(const a of e)yield*kI(ArrayBuffer.isView(a)?a:await o(String(a)),r)},Kp=(e,r,o,a,l)=>{const c=MI(e,r,l);let u=0;return new ReadableStream({type:"bytes",async pull(f){const{done:m,value:y}=await c.next();if(m){f.close(),a();return}let g=y.byteLength;o&&o(u+=g),f.enqueue(new Uint8Array(y))},cancel(f){return a(f),c.return()}},{highWaterMark:2})},qp=(e,r)=>{const o=e!=null;return a=>setTimeout(()=>r({lengthComputable:o,total:e,loaded:a}))},_a=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Qp=_a&&typeof ReadableStream=="function",Pl=_a&&(typeof TextEncoder=="function"?(e=>r=>e.encode(r))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),TI=Qp&&(()=>{let e=!1;const r=new Request(In.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!r})(),Zp=64*1024,$l=Qp&&!!(()=>{try{return X.isReadableStream(new Response("").body)}catch{}})(),xa={stream:$l&&(e=>e.body)};_a&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(r=>{!xa[r]&&(xa[r]=X.isFunction(e[r])?o=>o[r]():(o,a)=>{throw new Be(`Response type '${r}' is not supported`,Be.ERR_NOT_SUPPORT,a)})})})(new Response);const AI=async e=>{if(e==null)return 0;if(X.isBlob(e))return e.size;if(X.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(X.isArrayBufferView(e))return e.byteLength;if(X.isURLSearchParams(e)&&(e=e+""),X.isString(e))return(await Pl(e)).byteLength},NI=async(e,r)=>{const o=X.toFiniteNumber(e.getContentLength());return o??AI(r)},Fl={http:Jx,xhr:xI,fetch:_a&&(async e=>{let{url:r,method:o,data:a,signal:l,cancelToken:c,timeout:u,onDownloadProgress:f,onUploadProgress:m,responseType:y,headers:g,withCredentials:w="same-origin",fetchOptions:b}=Gp(e);y=y?(y+"").toLowerCase():"text";let[M,E]=l||c||u?II([l,c],u):[],S,N;const k=()=>{!S&&setTimeout(()=>{M&&M.unsubscribe()}),S=!0};let A;try{if(m&&TI&&o!=="get"&&o!=="head"&&(A=await NI(g,a))!==0){let Q=new Request(r,{method:"POST",body:a,duplex:"half"}),H;X.isFormData(a)&&(H=Q.headers.get("content-type"))&&g.setContentType(H),Q.body&&(a=Kp(Q.body,Zp,qp(A,Sa(m)),null,Pl))}X.isString(w)||(w=w?"cors":"omit"),N=new Request(r,{...b,signal:M,method:o.toUpperCase(),headers:g.normalize().toJSON(),body:a,duplex:"half",withCredentials:w});let B=await fetch(N);const Y=$l&&(y==="stream"||y==="response");if($l&&(f||Y)){const Q={};["status","statusText","headers"].forEach(ne=>{Q[ne]=B[ne]});const H=X.toFiniteNumber(B.headers.get("content-length"));B=new Response(Kp(B.body,Zp,f&&qp(H,Sa(f,!0)),Y&&k,Pl),Q)}y=y||"text";let D=await xa[X.findKey(xa,y)||"text"](B,e);return!Y&&k(),E&&E(),await new Promise((Q,H)=>{Wp(Q,H,{data:D,headers:jt.from(B.headers),status:B.status,statusText:B.statusText,config:e,request:N})})}catch(B){throw k(),B&&B.name==="TypeError"&&/fetch/i.test(B.message)?Object.assign(new Be("Network Error",Be.ERR_NETWORK,e,N),{cause:B.cause||B}):Be.from(B,B&&B.code,e,N)}})};X.forEach(Fl,(e,r)=>{if(e){try{Object.defineProperty(e,"name",{value:r})}catch{}Object.defineProperty(e,"adapterName",{value:r})}});const Xp=e=>`- ${e}`,vI=e=>X.isFunction(e)||e===null||e===!1,Jp={getAdapter:e=>{e=X.isArray(e)?e:[e];const{length:r}=e;let o,a;const l={};for(let c=0;c<r;c++){o=e[c];let u;if(a=o,!vI(o)&&(a=Fl[(u=String(o)).toLowerCase()],a===void 0))throw new Be(`Unknown adapter '${u}'`);if(a)break;l[u||"#"+c]=a}if(!a){const c=Object.entries(l).map(([f,m])=>`adapter ${f} `+(m===!1?"is not supported by the environment":"is not available in the build"));let u=r?c.length>1?`since :
|
|
49
49
|
`+c.map(Xp).join(`
|
|
50
50
|
`):" "+Xp(c[0]):"as no adapter specified";throw new Be("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return a},adapters:Fl};function jl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ko(null,e)}function eh(e){return jl(e),e.headers=jt.from(e.headers),e.data=zl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Jp.getAdapter(e.adapter||di.adapter)(e).then(function(a){return jl(e),a.data=zl.call(e,e.transformResponse,a),a.headers=jt.from(a.headers),a},function(a){return Up(a)||(jl(e),a&&a.response&&(a.response.data=zl.call(e,e.transformResponse,a.response),a.response.headers=jt.from(a.response.headers))),Promise.reject(a)})}const th="1.7.2",Ul={};["object","boolean","number","function","string","symbol"].forEach((e,r)=>{Ul[e]=function(a){return typeof a===e||"a"+(r<1?"n ":" ")+e}});const nh={};Ul.transitional=function(r,o,a){function l(c,u){return"[Axios v"+th+"] Transitional option '"+c+"'"+u+(a?". "+a:"")}return(c,u,f)=>{if(r===!1)throw new Be(l(u," has been removed"+(o?" in "+o:"")),Be.ERR_DEPRECATED);return o&&!nh[u]&&(nh[u]=!0,console.warn(l(u," has been deprecated since v"+o+" and will be removed in the near future"))),r?r(c,u,f):!0}};function BI(e,r,o){if(typeof e!="object")throw new Be("options must be an object",Be.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let l=a.length;for(;l-- >0;){const c=a[l],u=r[c];if(u){const f=e[c],m=f===void 0||u(f,c,e);if(m!==!0)throw new Be("option "+c+" must be "+m,Be.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Be("Unknown option "+c,Be.ERR_BAD_OPTION)}}const Wl={assertOptions:BI,validators:Ul},Cr=Wl.validators;class qr{constructor(r){this.defaults=r,this.interceptors={request:new Pp,response:new Pp}}async request(r,o){try{return await this._request(r,o)}catch(a){if(a instanceof Error){let l;Error.captureStackTrace?Error.captureStackTrace(l={}):l=new Error;const c=l.stack?l.stack.replace(/^.+\n/,""):"";try{a.stack?c&&!String(a.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(a.stack+=`
|
|
51
|
-
`+c):a.stack=c}catch{}}throw a}}_request(r,o){typeof r=="string"?(o=o||{},o.url=r):o=r||{},o=Kr(this.defaults,o);const{transitional:a,paramsSerializer:l,headers:c}=o;a!==void 0&&Wl.assertOptions(a,{silentJSONParsing:Cr.transitional(Cr.boolean),forcedJSONParsing:Cr.transitional(Cr.boolean),clarifyTimeoutError:Cr.transitional(Cr.boolean)},!1),l!=null&&(X.isFunction(l)?o.paramsSerializer={serialize:l}:Wl.assertOptions(l,{encode:Cr.function,serialize:Cr.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let u=c&&X.merge(c.common,c[o.method]);c&&X.forEach(["delete","get","head","post","put","patch","common"],E=>{delete c[E]}),o.headers=jt.concat(u,c);const f=[];let m=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(o)===!1||(m=m&&S.synchronous,f.unshift(S.fulfilled,S.rejected))});const y=[];this.interceptors.response.forEach(function(S){y.push(S.fulfilled,S.rejected)});let g,w=0,b;if(!m){const E=[eh.bind(this),void 0];for(E.unshift.apply(E,f),E.push.apply(E,y),b=E.length,g=Promise.resolve(o);w<b;)g=g.then(E[w++],E[w++]);return g}b=f.length;let M=o;for(w=0;w<b;){const E=f[w++],S=f[w++];try{M=E(M)}catch(N){S.call(this,N);break}}try{g=eh.call(this,M)}catch(E){return Promise.reject(E)}for(w=0,b=y.length;w<b;)g=g.then(y[w++],y[w++]);return g}getUri(r){r=Kr(this.defaults,r);const o=Hp(r.baseURL,r.url);return zp(o,r.params,r.paramsSerializer)}}X.forEach(["delete","get","head","options"],function(r){qr.prototype[r]=function(o,a){return this.request(Kr(a||{},{method:r,url:o,data:(a||{}).data}))}}),X.forEach(["post","put","patch"],function(r){function o(a){return function(c,u,f){return this.request(Kr(f||{},{method:r,headers:a?{"Content-Type":"multipart/form-data"}:{},url:c,data:u}))}}qr.prototype[r]=o(),qr.prototype[r+"Form"]=o(!0)});class Hl{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(c){o=c});const a=this;this.promise.then(l=>{if(!a._listeners)return;let c=a._listeners.length;for(;c-- >0;)a._listeners[c](l);a._listeners=null}),this.promise.then=l=>{let c;const u=new Promise(f=>{a.subscribe(f),c=f}).then(l);return u.cancel=function(){a.unsubscribe(c)},u},r(function(c,u,f){a.reason||(a.reason=new ko(c,u,f),o(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const o=this._listeners.indexOf(r);o!==-1&&this._listeners.splice(o,1)}static source(){let r;return{token:new Hl(function(l){r=l}),cancel:r}}}function DI(e){return function(o){return e.apply(null,o)}}function LI(e){return X.isObject(e)&&e.isAxiosError===!0}const Yl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Yl).forEach(([e,r])=>{Yl[r]=e});function rh(e){const r=new qr(e),o=Sp(qr.prototype.request,r);return X.extend(o,qr.prototype,r,{allOwnKeys:!0}),X.extend(o,r,null,{allOwnKeys:!0}),o.create=function(l){return rh(Kr(e,l))},o}const St=rh(di);St.Axios=qr,St.CanceledError=ko,St.CancelToken=Hl,St.isCancel=Up,St.VERSION=th,St.toFormData=Ea,St.AxiosError=Be,St.Cancel=St.CanceledError,St.all=function(r){return Promise.all(r)},St.spread=DI,St.isAxiosError=LI,St.mergeConfig=Kr,St.AxiosHeaders=jt,St.formToJSON=e=>Fp(X.isHTMLForm(e)?new FormData(e):e),St.getAdapter=Jp.getAdapter,St.HttpStatusCode=Yl,St.default=St;const OI=/#[\w*]+\|-\|((?!\|-\|).)+\|-\|((?!\|-\|).)+\|-\|/,RI=/#[\w *\&]+\|-\|((?!\|-\|).)+\|-\|/,VI=/\|-\|/g,zI=/\|-\|/;function hi(){var e=navigator.userAgent||navigator.vendor||window.opera;return!!(/android/i.test(e)||/iPad|iPhone|iPod/.test(e)&&!window.MSStream)}const mi=e=>(t.pushScopeId("data-v-5b593701"),e=e(),t.popScopeId(),e),PI={class:"RecursiveComponent"},$I={key:0},FI={key:0,class:"basetype"},jI={key:1},UI={key:0},WI={class:"label textsharp-title"},HI={key:0,style:{color:"red"}},YI={key:1},GI={class:"label choice-title"},KI={key:0,style:{color:"red"}},qI={key:2,class:"vertical-checkbox-group"},QI={key:3,class:"vertical-checkbox-group"},ZI={key:5,class:"dropdownbox-block"},XI={class:"label dropdownbox-label"},JI=["onClick"],e4={key:7,class:"date-block"},t4={class:"label date-label"},n4={key:8,class:"time-box"},r4={key:9,class:"time-block"},o4={class:"label time-label"},i4=["onClick"],a4={class:"time-box"},s4={key:11,class:"date-time-block"},l4={class:"label date-bolck-label"},c4=mi(()=>t.createElementVNode("div",{class:"label date-time-blank-label"}," ",-1)),u4={class:"label time-bolck-label"},f4={key:2},d4=["src"],p4={key:3},h4=["src"],m4={class:"signature-guardian"},g4=mi(()=>t.createElementVNode("div",{class:"label signature-check-label"}," Click here if you are a parent or legal guardian or caregiver on behalf of the patient(you need to give your own signature). ",-1)),y4={key:4},b4={class:"diagnosis-title"},w4=mi(()=>t.createElementVNode("div",{class:"label diagnosis-title-label"},"Diagnoses",-1)),E4={key:0,class:"diagnosis-editable"},C4={class:"diagnosis-searchbox"},S4={key:0,class:"diagnosis-suggestion"},_4=["onClick"],x4=mi(()=>t.createElementVNode("br",null,null,-1)),I4={key:1,class:"diagnosis-list"},k4={class:"diagnosis-item"},M4={class:"diagnosis-item-code"},T4={class:"diagnosis-item-comment"},A4={key:0},N4={key:5},v4=mi(()=>t.createElementVNode("div",{class:"vital-sign-title"},[t.createElementVNode("div",{class:"label vital-sign-title-label"},"Vital Sign")],-1)),B4={class:"vital-sign-box"},D4={class:"vital-sign-block"},L4={class:"vital-sign-item"},O4={class:"vital-sign-item-title"},R4={key:0},V4={class:"vital-sign-item"},z4={class:"vital-sign-item-title"},P4={key:0},$4={class:"vital-sign-block"},F4={class:"vital-sign-item"},j4={class:"vital-sign-item-title"},U4={key:0},W4={class:"vital-sign-item"},H4={class:"vital-sign-item-title"},Y4={key:0},G4={class:"vital-sign-box"},K4={class:"vital-sign-block"},q4={class:"vital-sign-item"},Q4={class:"vital-sign-item-title"},Z4={key:0},X4={class:"vital-sign-item"},J4={class:"vital-sign-item-title"},ek={key:0},tk={class:"vital-sign-block"},nk={class:"vital-sign-item"},rk={class:"vital-sign-item-title"},ok={key:0},ik={class:"vital-sign-item"},ak={class:"vital-sign-item-title"},sk={key:0},lk={key:6},ck={class:"label default-label"},uk={key:1,class:"default-textarea-block"},fk=["src","onClick"],dk={key:1},pk={key:0,class:"text"},oh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsSAAALEgHS3X78AAAAV0lEQVRYR+3SsQ0AMAgEMdh/aYZwQ3HpT0LO7zx/+/y+6UD9oQQTVAHt22CCKqB9G0xQBbRvgwmqgPZtMEEV0L4NJqgC2rfBBFVA+zaYoApo3wYTVAHtDxz6ACmSkz/0AAAAAElFTkSuQmCC",hk=t.defineComponent({__name:"RecursiveComponent",props:{formData:{type:Object,require:!0},node:{type:Array,required:!0},otherData:{type:Object,required:!0},otherTableInfo:{type:Object,required:!0},isEditable:{type:Boolean,default:!0},providerEditability:{type:Boolean,default:!0},patientEditability:{type:Boolean,default:!1}},setup(e){t.useCssVars(ue=>({"7ed2953f":t.unref(r).fullWidth,a6096efe:t.unref(r).defaultStyle.marginTop,"4509dbf3":t.unref(r).alignItems,"10baaf65":t.unref(r).text,"65ab4673":t.unref(r).lineHeight,"366e8004":t.unref(r).atBlockWidth,"6e7c79b8":t.unref(r).doubleLineHeight,fb6199ec:t.unref(r).defaultStyle.paddingTop,"70d9361c":t.unref(r).defaultStyle.paddingLeft,"4b597036":t.unref(r).DateAndTime.width,"0e74cbd8":t.unref(r).signature.width,b3549556:t.unref(r).signature.height,"682a5726":t.unref(r).signature.label.top,"0144f1e2":t.unref(r).signature.label.height,"7caedade":t.unref(r).signature.label.width,"9d282022":t.unref(r).signature.label.left,"1b2c034a":t.unref(r).defaultStyle.marginLeft,"1b24705e":t.unref(r).defaultStyle.marginTop2,"59f3414a":t.unref(r).tableMinWidth,"1e18141a":t.unref(r).diagnosis.titleFontSize,"602c0517":t.unref(r).diagnosis.buttonFontSize,"38b2162a":t.unref(r).vitalSign.titleFontSize,f0e36ad4:t.unref(r).vitalSign.blockWidth,f5828272:t.unref(r).vitalSign.title2FontSize,"99538e9e":t.unref(r).vitalSign.unitFontSize}));let r;const o=t.ref(hi());o.value?r=t.reactive(mx):r=t.reactive(Cp);const l=xs().getCalendarPciker(),u=Is().getSignaturePad(),m=ks().getImageEditor(),g=Ms().getRecommendDiagnosis(),w=t.reactive({code:"",description:"",comment:"",searchResult:Array()}),b=new Set(["header1","header2","header3","header4","header5"]),M=new Set([...Array.from(b)]),E=new Set([...Array.from(b),"paragraph","divider"]),S=new Set(["table","table-row","table-cell"]),N=new Set(["atblock","sharpblock","image",...Array.from(S)]);[...Array.from(E),...Array.from(N)];const k=new Set(["DateOrDateOfService","SignersName","SignersSpecialty","SignersLicNumber","SignersNpiNumber","SignersDeaNumber","SignersEmail","FaxNumber","FacilityMainNumber","FacilityAddressInfo"]),A=ue=>{ue=ue.replace(/#/,"");const fe=ue.split(VI);return{required:fe[0].endsWith("*"),type:fe[0].replace("*","").replace("$",""),title:fe[1],placeholder:fe[2]}},B=ue=>{const fe=ue.split(zI);fe.shift(),fe.pop();const ye={};let be=fe.length;for(let ke=0;ke<be/2;ke++)ye[fe[2*ke]]=fe[2*ke+1]==="checked";return ye},Y=e,D=t.reactive(Y.formData),Q=ue=>OI.test(ue)?"textSharp":RI.test(ue)?"choiceSharp":ue==="#Signature"||ue==="#Provider Signature"?"providerSignature":ue==="#Patient/Guardian Signature"?"patientSignature":"default",H=/[^\w ]/g,ne=ue=>{const fe=ue.replace(H," ").split(/ /);let ye="";return fe.forEach(be=>{be!==""&&(be=be.toLowerCase(),be=be.replace(be[0],be[0].toUpperCase()),ye+=be)}),ye},q=ue=>{switch(ue){case"Diagnosis":return"Diagnosis";case"Vital Sign":return"Vital Sign";default:return"default"}},G=(ue,fe)=>{const ye=D[ue].valueList.filter(be=>be.key===fe);return(ye==null?void 0:ye[0])||null},U=(ue,fe)=>{var be;((be=G(ue,fe))==null?void 0:be.value)===D[ue].dataList[fe].value?D[ue].valueList=D[ue].valueList.filter(ke=>ke.key!==fe):D[ue].valueList.push({key:fe,value:D[ue].dataList[fe].value})},te=ue=>{l.open({formData:D,dataKey:ue})},he=(ue,fe,ye,be=!1)=>{u.open({dataKey:ue,formData:D,value:fe,type:ye,isGuardian:be})},ae=ue=>{px.prompt("Title Text","Signature",{confirmButtonText:"Confirm",cancelButtonText:"Cancel",cancelButtonClass:"cancel-btn"}).then(({value:fe})=>{fe&&Rn.set(D,ue,fe)})},R=({isHeader:ue,textAlign:fe})=>{let ye=ue?"#f5f2f0":"#ffffff",be=ue?"600":"normal",ke=ue?"center":"start",Ve=ue?"center":"start";return ke=fe||ke,Ve=fe||Ve,`
|
|
51
|
+
`+c):a.stack=c}catch{}}throw a}}_request(r,o){typeof r=="string"?(o=o||{},o.url=r):o=r||{},o=Kr(this.defaults,o);const{transitional:a,paramsSerializer:l,headers:c}=o;a!==void 0&&Wl.assertOptions(a,{silentJSONParsing:Cr.transitional(Cr.boolean),forcedJSONParsing:Cr.transitional(Cr.boolean),clarifyTimeoutError:Cr.transitional(Cr.boolean)},!1),l!=null&&(X.isFunction(l)?o.paramsSerializer={serialize:l}:Wl.assertOptions(l,{encode:Cr.function,serialize:Cr.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let u=c&&X.merge(c.common,c[o.method]);c&&X.forEach(["delete","get","head","post","put","patch","common"],E=>{delete c[E]}),o.headers=jt.concat(u,c);const f=[];let m=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(o)===!1||(m=m&&S.synchronous,f.unshift(S.fulfilled,S.rejected))});const y=[];this.interceptors.response.forEach(function(S){y.push(S.fulfilled,S.rejected)});let g,w=0,b;if(!m){const E=[eh.bind(this),void 0];for(E.unshift.apply(E,f),E.push.apply(E,y),b=E.length,g=Promise.resolve(o);w<b;)g=g.then(E[w++],E[w++]);return g}b=f.length;let M=o;for(w=0;w<b;){const E=f[w++],S=f[w++];try{M=E(M)}catch(N){S.call(this,N);break}}try{g=eh.call(this,M)}catch(E){return Promise.reject(E)}for(w=0,b=y.length;w<b;)g=g.then(y[w++],y[w++]);return g}getUri(r){r=Kr(this.defaults,r);const o=Hp(r.baseURL,r.url);return zp(o,r.params,r.paramsSerializer)}}X.forEach(["delete","get","head","options"],function(r){qr.prototype[r]=function(o,a){return this.request(Kr(a||{},{method:r,url:o,data:(a||{}).data}))}}),X.forEach(["post","put","patch"],function(r){function o(a){return function(c,u,f){return this.request(Kr(f||{},{method:r,headers:a?{"Content-Type":"multipart/form-data"}:{},url:c,data:u}))}}qr.prototype[r]=o(),qr.prototype[r+"Form"]=o(!0)});class Hl{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(c){o=c});const a=this;this.promise.then(l=>{if(!a._listeners)return;let c=a._listeners.length;for(;c-- >0;)a._listeners[c](l);a._listeners=null}),this.promise.then=l=>{let c;const u=new Promise(f=>{a.subscribe(f),c=f}).then(l);return u.cancel=function(){a.unsubscribe(c)},u},r(function(c,u,f){a.reason||(a.reason=new ko(c,u,f),o(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const o=this._listeners.indexOf(r);o!==-1&&this._listeners.splice(o,1)}static source(){let r;return{token:new Hl(function(l){r=l}),cancel:r}}}function DI(e){return function(o){return e.apply(null,o)}}function LI(e){return X.isObject(e)&&e.isAxiosError===!0}const Yl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Yl).forEach(([e,r])=>{Yl[r]=e});function rh(e){const r=new qr(e),o=Sp(qr.prototype.request,r);return X.extend(o,qr.prototype,r,{allOwnKeys:!0}),X.extend(o,r,null,{allOwnKeys:!0}),o.create=function(l){return rh(Kr(e,l))},o}const St=rh(di);St.Axios=qr,St.CanceledError=ko,St.CancelToken=Hl,St.isCancel=Up,St.VERSION=th,St.toFormData=Ea,St.AxiosError=Be,St.Cancel=St.CanceledError,St.all=function(r){return Promise.all(r)},St.spread=DI,St.isAxiosError=LI,St.mergeConfig=Kr,St.AxiosHeaders=jt,St.formToJSON=e=>Fp(X.isHTMLForm(e)?new FormData(e):e),St.getAdapter=Jp.getAdapter,St.HttpStatusCode=Yl,St.default=St;const OI=/#[\w*]+\|-\|((?!\|-\|).)+\|-\|((?!\|-\|).)+\|-\|/,RI=/#[\w *\&]+\|-\|((?!\|-\|).)+\|-\|/,VI=/\|-\|/g,zI=/\|-\|/;function hi(){var e=navigator.userAgent||navigator.vendor||window.opera;return!!(/android/i.test(e)||/iPad|iPhone|iPod/.test(e)&&!window.MSStream)}const mi=e=>(t.pushScopeId("data-v-94fb1bed"),e=e(),t.popScopeId(),e),PI={class:"RecursiveComponent"},$I={key:0},FI={key:0,class:"basetype"},jI={key:1},UI={key:0},WI={class:"label textsharp-title"},HI={key:0,style:{color:"red"}},YI={key:1},GI={class:"label choice-title"},KI={key:0,style:{color:"red"}},qI={key:2,class:"vertical-checkbox-group"},QI={key:3,class:"vertical-checkbox-group"},ZI={key:5,class:"dropdownbox-block"},XI={class:"label dropdownbox-label"},JI=["onClick"],ek={key:7,class:"date-block"},tk={class:"label date-label"},nk={key:8,class:"time-box"},rk={key:9,class:"time-block"},ok={class:"label time-label"},ik=["onClick"],ak={class:"time-box"},sk={key:11,class:"date-time-block"},lk={class:"label date-bolck-label"},ck=mi(()=>t.createElementVNode("div",{class:"label date-time-blank-label"}," ",-1)),uk={class:"label time-bolck-label"},fk={key:2},dk=["src"],pk={key:3},hk=["src"],mk={class:"signature-guardian"},gk=mi(()=>t.createElementVNode("div",{class:"label signature-check-label"}," Click here if you are a parent or legal guardian or caregiver on behalf of the patient(you need to give your own signature). ",-1)),yk={key:4},bk={class:"diagnosis-title"},wk=mi(()=>t.createElementVNode("div",{class:"label diagnosis-title-label"},"Diagnoses",-1)),Ek={key:0,class:"diagnosis-editable"},Ck={class:"diagnosis-searchbox"},Sk={key:0,class:"diagnosis-suggestion"},_k=["onClick"],xk=mi(()=>t.createElementVNode("br",null,null,-1)),Ik={key:1,class:"diagnosis-list"},kk={class:"diagnosis-item"},Mk={class:"diagnosis-item-code"},Tk={class:"diagnosis-item-comment"},Ak={key:0},Nk={key:5},vk=mi(()=>t.createElementVNode("div",{class:"vital-sign-title"},[t.createElementVNode("div",{class:"label vital-sign-title-label"},"Vital Sign")],-1)),Bk={class:"vital-sign-box"},Dk={class:"vital-sign-block"},Lk={class:"vital-sign-item"},Ok={class:"vital-sign-item-title"},Rk={key:0},Vk={class:"vital-sign-item"},zk={class:"vital-sign-item-title"},Pk={key:0},$k={class:"vital-sign-block"},Fk={class:"vital-sign-item"},jk={class:"vital-sign-item-title"},Uk={key:0},Wk={class:"vital-sign-item"},Hk={class:"vital-sign-item-title"},Yk={key:0},Gk={class:"vital-sign-box"},Kk={class:"vital-sign-block"},qk={class:"vital-sign-item"},Qk={class:"vital-sign-item-title"},Zk={key:0},Xk={class:"vital-sign-item"},Jk={class:"vital-sign-item-title"},e4={key:0},t4={class:"vital-sign-block"},n4={class:"vital-sign-item"},r4={class:"vital-sign-item-title"},o4={key:0},i4={class:"vital-sign-item"},a4={class:"vital-sign-item-title"},s4={key:0},l4={key:6},c4={class:"label default-label"},u4={key:1,class:"default-textarea-block"},f4=["src","onClick"],d4={key:1},p4={key:0,class:"text"},oh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsSAAALEgHS3X78AAAAV0lEQVRYR+3SsQ0AMAgEMdh/aYZwQ3HpT0LO7zx/+/y+6UD9oQQTVAHt22CCKqB9G0xQBbRvgwmqgPZtMEEV0L4NJqgC2rfBBFVA+zaYoApo3wYTVAHtDxz6ACmSkz/0AAAAAElFTkSuQmCC",h4=t.defineComponent({__name:"RecursiveComponent",props:{formData:{type:Object,require:!0},node:{type:Array,required:!0},otherData:{type:Object,required:!0},otherTableInfo:{type:Object,required:!0},isEditable:{type:Boolean,default:!0},providerEditability:{type:Boolean,default:!0},patientEditability:{type:Boolean,default:!1}},setup(e){t.useCssVars(ue=>({"38feb2b0":t.unref(r).fullWidth,a5e76aa0:t.unref(r).defaultStyle.marginTop,"5f3d26bc":t.unref(r).alignItems,"167c2f54":t.unref(r).text,"1dfa51bc":t.unref(r).lineHeight,"4a24a0f3":t.unref(r).atBlockWidth,"3ce056da":t.unref(r).doubleLineHeight,f743128a:t.unref(r).defaultStyle.paddingTop,"076c9761":t.unref(r).defaultStyle.paddingLeft,"4c4d8ca7":t.unref(r).DateAndTime.width,"34115eee":t.unref(r).signature.width,"81b87278":t.unref(r).signature.height,"6049989e":t.unref(r).signature.label.top,"0122ed84":t.unref(r).signature.label.height,"746d56cf":t.unref(r).signature.label.width,ae349c44:t.unref(r).signature.label.left,"170d7be8":t.unref(r).defaultStyle.marginLeft,"1705e8fc":t.unref(r).defaultStyle.marginTop2,"85fd838a":t.unref(r).tableMinWidth,"19f98cb8":t.unref(r).diagnosis.titleFontSize,bff590f4:t.unref(r).diagnosis.buttonFontSize,"34938ec8":t.unref(r).vitalSign.titleFontSize,"7f080c85":t.unref(r).vitalSign.blockWidth,"75d01d94":t.unref(r).vitalSign.title2FontSize,"99318a40":t.unref(r).vitalSign.unitFontSize}));let r;const o=t.ref(hi());o.value?r=t.reactive(mx):r=t.reactive(Cp);const l=xs().getCalendarPciker(),u=Is().getSignaturePad(),m=ks().getImageEditor(),g=Ms().getRecommendDiagnosis(),w=t.reactive({code:"",description:"",comment:"",searchResult:Array()}),b=new Set(["header1","header2","header3","header4","header5"]),M=new Set([...Array.from(b)]),E=new Set([...Array.from(b),"paragraph","divider"]),S=new Set(["table","table-row","table-cell"]),N=new Set(["atblock","sharpblock","image",...Array.from(S)]);[...Array.from(E),...Array.from(N)];const k=new Set(["DateOrDateOfService","SignersName","SignersSpecialty","SignersLicNumber","SignersNpiNumber","SignersDeaNumber","SignersEmail","FaxNumber","FacilityMainNumber","FacilityAddressInfo"]),A=ue=>{ue=ue.replace(/#/,"");const fe=ue.split(VI);return{required:fe[0].endsWith("*"),type:fe[0].replace("*","").replace("$",""),title:fe[1],placeholder:fe[2]}},B=ue=>{const fe=ue.split(zI);fe.shift(),fe.pop();const ye={};let be=fe.length;for(let ke=0;ke<be/2;ke++)ye[fe[2*ke]]=fe[2*ke+1]==="checked";return ye},Y=e,D=t.reactive(Y.formData),Q=ue=>OI.test(ue)?"textSharp":RI.test(ue)?"choiceSharp":ue==="#Signature"||ue==="#Provider Signature"?"providerSignature":ue==="#Patient/Guardian Signature"?"patientSignature":"default",H=/[^\w ]/g,ne=ue=>{const fe=ue.replace(H," ").split(/ /);let ye="";return fe.forEach(be=>{be!==""&&(be=be.toLowerCase(),be=be.replace(be[0],be[0].toUpperCase()),ye+=be)}),ye},q=ue=>{switch(ue){case"Diagnosis":return"Diagnosis";case"Vital Sign":return"Vital Sign";default:return"default"}},G=(ue,fe)=>{const ye=D[ue].valueList.filter(be=>be.key===fe);return(ye==null?void 0:ye[0])||null},U=(ue,fe)=>{var be;((be=G(ue,fe))==null?void 0:be.value)===D[ue].dataList[fe].value?D[ue].valueList=D[ue].valueList.filter(ke=>ke.key!==fe):D[ue].valueList.push({key:fe,value:D[ue].dataList[fe].value})},te=ue=>{l.open({formData:D,dataKey:ue})},he=(ue,fe,ye,be=!1)=>{u.open({dataKey:ue,formData:D,value:fe,type:ye,isGuardian:be})},ae=ue=>{px.prompt("Title Text","Signature",{confirmButtonText:"Confirm",cancelButtonText:"Cancel",cancelButtonClass:"cancel-btn"}).then(({value:fe})=>{fe&&Rn.set(D,ue,fe)})},R=({isHeader:ue,textAlign:fe})=>{let ye=ue?"#f5f2f0":"#ffffff",be=ue?"600":"normal",ke=ue?"center":"start",Ve=ue?"center":"start";return ke=fe||ke,Ve=fe||Ve,`
|
|
52
52
|
justify-content: ${Ve};
|
|
53
53
|
background-color: ${ye};
|
|
54
54
|
text-align: ${ke};
|
|
55
55
|
font-weight: ${be};
|
|
56
|
-
`},L=(ue,fe,ye)=>{m.open({dataKey:ue,formData:D,src:fe,markable:ye})},V=ue=>new Promise((ye,be)=>{let ke="/api/icd10cm/v3/search?sf=code,name&df=code,name&maxList=20&terms="+ue,Ve={host:"clinicaltables.nlm.nih.gov",path:ke};St.get(`https://${Ve.host}${ke}`).then(Pe=>ye({center:Pe.data})).catch(be)}),j=async ue=>{let fe=[],ye=[];return ue?(await V(ue).then(be=>{fe[0]=be.center[3];for(let ke=0;ke<fe[0].length;ke++)ye.push([]);for(let ke=0;ke<fe[0].length;ke++){let Ve=fe[0][ke][0]+fe[0][ke][1],Pe=Rn.concat(fe[0][ke],Ve);ye[ke].push(Pe)}},be=>{console.error("query error",be instanceof Error?be:new Error(String(be)))}),ye):[]},se=async()=>{const ue=await j(w.code);w.searchResult=[],ue.forEach(fe=>{const ye=fe[0];w.searchResult.push({code:ye[0],description:ye[1],codeAndDescription:ye[2]})})},me=ue=>{w.code=ue.code,w.description=ue.description,w.searchResult=[]},pe=({diagnosisList:ue,diagnosis:fe})=>{let ye=!1;return ue.forEach(be=>{be.code===fe.code&&(ye=!0)}),ye},Ee=()=>{if(w.code&&w.description){const ue=D.Diagnosis,fe={code:w.code,description:w.description,comment:w.comment};pe({diagnosisList:ue,diagnosis:fe})||(ue.push(fe),w.code="",w.description="",w.comment="")}},Te=ue=>{D.Diagnosis.splice(ue,1)},Se=async()=>{g.open({formData:D})};return(ue,fe)=>{const ye=ul,be=f_,ke=d_,Ve=sp,Pe=W_,lt=U_,tt=br,nt=sn,it=q_;return t.openBlock(),t.createElementBlock("div",PI,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.node,F=>(t.openBlock(),t.createElementBlock("div",null,["type"in F?(t.openBlock(),t.createElementBlock("div",$I,[t.unref(M).has(F.type)&&F.children&&F.children.length>0?(t.openBlock(),t.createElementBlock("div",FI,[t.createVNode(Gl,{node:F.children,formData:D,otherData:e.otherData,isEditable:e.isEditable,providerEditability:e.providerEditability,patientEditability:e.patientEditability,otherTableInfo:e.otherTableInfo},null,8,["node","formData","otherData","isEditable","providerEditability","patientEditability","otherTableInfo"])])):t.createCommentVNode("",!0),F.type==="paragraph"&&F.children&&F.children.length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(F.type)},[t.createVNode(Gl,{node:F.children,formData:D,otherData:e.otherData,isEditable:e.isEditable,providerEditability:e.providerEditability,patientEditability:e.patientEditability,otherTableInfo:e.otherTableInfo},null,8,["node","formData","otherData","isEditable","providerEditability","patientEditability","otherTableInfo"])],2)):t.createCommentVNode("",!0),F.type==="atblock"?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(F.type)},[t.unref(k).has(F.key)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(`label ${F.type}-label`)},t.toDisplayString(D[F.key]),3)):t.createCommentVNode("",!0),t.unref(k).has(F.key)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",jI,[e.isEditable?(t.openBlock(),t.createBlock(ye,{key:0,class:t.normalizeClass(`${F.type}-input`),placeholder:"Enter here",modelValue:D[F.key],"onUpdate:modelValue":le=>D[F.key]=le},null,8,["class","modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),e.isEditable?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(`label ${F.type}-label`)},t.toDisplayString(D[F.key]),3))]))],2)):t.createCommentVNode("",!0),F.type==="sharpblock"?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(F.type)},[Q(F.value)==="textSharp"?(t.openBlock(),t.createElementBlock("div",UI,[t.createElementVNode("div",WI,[t.createTextVNode(t.toDisplayString(A(F.value).title),1),A(F.value).required?(t.openBlock(),t.createElementBlock("span",HI," *")):t.createCommentVNode("",!0)]),e.isEditable&&A(F.value).type==="TextField"?(t.openBlock(),t.createBlock(ye,{key:0,class:t.normalizeClass(`${F.type}-input`),placeholder:A(F.value).placeholder||"Enter here",modelValue:D[F.key],"onUpdate:modelValue":le=>D[F.key]=le},null,8,["class","placeholder","modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),e.isEditable&&A(F.value).type==="TextView"?(t.openBlock(),t.createBlock(ye,{key:1,class:t.normalizeClass(`${F.type}-textarea`),placeholder:A(F.value).placeholder||"Enter here",modelValue:D[F.key],"onUpdate:modelValue":le=>D[F.key]=le,resize:"none",autosize:{minRows:2,maxRows:5},type:"textarea"},null,8,["class","placeholder","modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),e.isEditable?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(A(F.value).type==="TextField"?"sharpblock-textfield-block":"sharpblock-textview-block")},t.toDisplayString(D[F.key]||"No Content"),3))])):t.createCommentVNode("",!0),Q(F.value)==="choiceSharp"?(t.openBlock(),t.createElementBlock("div",YI,[t.createElementVNode("div",GI,[t.createTextVNode(t.toDisplayString(A(F.value).title),1),A(F.value).required?(t.openBlock(),t.createElementBlock("span",KI," *")):t.createCommentVNode("",!0)]),e.isEditable&&A(F.value).type==="Radio"?(t.openBlock(),t.createBlock(ke,{key:0,modelValue:D[F.key].value,"onUpdate:modelValue":le=>D[F.key].value=le,class:"vertical-radio-group"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(B(F.choiceStr),(le,je)=>(t.openBlock(),t.createBlock(be,{value:je},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(je),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),!e.isEditable&&A(F.value).type==="Radio"?(t.openBlock(),t.createBlock(ke,{key:1,modelValue:D[F.key].value,"onUpdate:modelValue":le=>D[F.key].value=le,disabled:"",class:"vertical-radio-group"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D[F.key].dataList,le=>(t.openBlock(),t.createBlock(be,{value:le},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(le),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),e.isEditable&&A(F.value).type==="Checkbox"?(t.openBlock(),t.createElementBlock("div",qI,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D[F.key].dataList,le=>{var je;return t.openBlock(),t.createBlock(Ve,{checked:((je=G(F.key,le.index))==null?void 0:je.value)===le.value,onClick:bt=>U(F.key,le.index)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(le.value),1)]),_:2},1032,["checked","onClick"])}),256))])):t.createCommentVNode("",!0),!e.isEditable&&A(F.value).type==="Checkbox"?(t.openBlock(),t.createElementBlock("div",QI,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D[F.key].dataList,le=>{var je;return t.openBlock(),t.createBlock(Ve,{checked:((je=G(F.key,le.index))==null?void 0:je.value)===le.value,onClick:bt=>U(F.key,le.index),disabled:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(le.value),1)]),_:2},1032,["checked","onClick"])}),256))])):t.createCommentVNode("",!0),e.isEditable&&A(F.value).type==="Drop Down Box"?(t.openBlock(),t.createBlock(lt,{key:4,class:"dropdown-select",modelValue:D[F.key].value,"onUpdate:modelValue":le=>D[F.key].value=le,clearable:"",placeholder:"Select"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D[F.key].dataList,(le,je)=>(t.openBlock(),t.createBlock(Pe,{key:je,label:le.value,value:le.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),!e.isEditable&&A(F.value).type==="Drop Down Box"?(t.openBlock(),t.createElementBlock("div",ZI,[t.createElementVNode("div",XI,t.toDisplayString(D[F.key].value||"No Content"),1)])):t.createCommentVNode("",!0),e.isEditable&&A(F.value).type==="Date"?(t.openBlock(),t.createElementBlock("div",{key:6,class:"date-box",style:t.normalizeStyle(`width: ${t.unref(r).DateAndTime.width}`),onClick:le=>te(`${F.key}.Date`)},[t.createVNode(ye,{class:"date-input","suffix-icon":t.unref(xf),modelValue:D[F.key].Date,"onUpdate:modelValue":le=>D[F.key].Date=le,placeholder:"Select"},null,8,["suffix-icon","modelValue","onUpdate:modelValue"])],12,JI)):t.createCommentVNode("",!0),!e.isEditable&&A(F.value).type==="Date"?(t.openBlock(),t.createElementBlock("div",e4,[t.createElementVNode("div",t4,t.toDisplayString(D[F.key].Date||"No Content"),1)])):t.createCommentVNode("",!0),e.isEditable&&A(F.value).type==="Time"?(t.openBlock(),t.createElementBlock("div",n4,[t.createVNode(lt,{class:"aitmed-editor-custom-select time-select","suffix-icon":t.unref(If),size:"large",modelValue:D[F.key].Time,"onUpdate:modelValue":le=>D[F.key].Time=le,clearable:""},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D[F.key].list,(le,je)=>(t.openBlock(),t.createBlock(Pe,{key:je,label:le.value,value:le.value},null,8,["label","value"]))),128))]),_:2},1032,["suffix-icon","modelValue","onUpdate:modelValue"])])):t.createCommentVNode("",!0),!e.isEditable&&A(F.value).type==="Time"?(t.openBlock(),t.createElementBlock("div",r4,[t.createElementVNode("div",o4,t.toDisplayString(D[F.key].Tate||"No Content"),1)])):t.createCommentVNode("",!0),e.isEditable&&A(F.value).type==="Date&Time"?(t.openBlock(),t.createElementBlock("div",{key:10,class:"date-time-box",style:t.normalizeStyle(`${o.value?"flex-direction: column; gap: 0;":""}`)},[t.createElementVNode("div",{class:"date-box",style:t.normalizeStyle(`${o.value?"":"width: "+t.unref(r).DateAndTime.width}`),onClick:le=>te(`${F.key}.Date`)},[t.createVNode(ye,{class:"date-input","suffix-icon":t.unref(xf),modelValue:D[F.key].Date,"onUpdate:modelValue":le=>D[F.key].Date=le,placeholder:"Select"},null,8,["suffix-icon","modelValue","onUpdate:modelValue"])],12,i4),t.createElementVNode("div",a4,[t.createVNode(lt,{class:"aitmed-editor-custom-select time-select","suffix-icon":t.unref(If),size:"large",modelValue:D[F.key].Time,"onUpdate:modelValue":le=>D[F.key].Time=le,clearable:""},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D[F.key].list,(le,je)=>(t.openBlock(),t.createBlock(Pe,{key:je,label:le.value,value:le.value},null,8,["label","value"]))),128))]),_:2},1032,["suffix-icon","modelValue","onUpdate:modelValue"])])],4)):t.createCommentVNode("",!0),!e.isEditable&&A(F.value).type==="Date&Time"?(t.openBlock(),t.createElementBlock("div",s4,[t.createElementVNode("div",l4,t.toDisplayString(D[F.key].Date||"--"),1),c4,t.createElementVNode("div",u4,t.toDisplayString(D[F.key].Time||"--"),1)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),Q(F.value)==="providerSignature"?(t.openBlock(),t.createElementBlock("div",f4,[t.createElementVNode("div",{class:"label signature-title-label",style:t.normalizeStyle(`${o.value?"font-size: 1.98vh":""}`)},[t.createTextVNode(t.toDisplayString(D.signatureProviderName||"Signature")+" ",1),e.providerEditability?(t.openBlock(),t.createElementBlock("img",{key:0,class:"signature-edit",src:hx,onClick:fe[0]||(fe[0]=le=>ae("signatureProviderName"))})):t.createCommentVNode("",!0)],4),t.createElementVNode("div",{class:t.normalizeClass(`
|
|
56
|
+
`},L=(ue,fe,ye)=>{m.open({dataKey:ue,formData:D,src:fe,markable:ye})},V=ue=>new Promise((ye,be)=>{let ke="/api/icd10cm/v3/search?sf=code,name&df=code,name&maxList=20&terms="+ue,Ve={host:"clinicaltables.nlm.nih.gov",path:ke};St.get(`https://${Ve.host}${ke}`).then(Pe=>ye({center:Pe.data})).catch(be)}),j=async ue=>{let fe=[],ye=[];return ue?(await V(ue).then(be=>{fe[0]=be.center[3];for(let ke=0;ke<fe[0].length;ke++)ye.push([]);for(let ke=0;ke<fe[0].length;ke++){let Ve=fe[0][ke][0]+fe[0][ke][1],Pe=Rn.concat(fe[0][ke],Ve);ye[ke].push(Pe)}},be=>{console.error("query error",be instanceof Error?be:new Error(String(be)))}),ye):[]},se=async()=>{const ue=await j(w.code);w.searchResult=[],ue.forEach(fe=>{const ye=fe[0];w.searchResult.push({code:ye[0],description:ye[1],codeAndDescription:ye[2]})})},me=ue=>{w.code=ue.code,w.description=ue.description,w.searchResult=[]},pe=({diagnosisList:ue,diagnosis:fe})=>{let ye=!1;return ue.forEach(be=>{be.code===fe.code&&(ye=!0)}),ye},Ee=()=>{if(w.code&&w.description){const ue=D.Diagnosis,fe={code:w.code,description:w.description,comment:w.comment};pe({diagnosisList:ue,diagnosis:fe})||(ue.push(fe),w.code="",w.description="",w.comment="")}},Te=ue=>{D.Diagnosis.splice(ue,1)},Se=async()=>{g.open({formData:D})};return(ue,fe)=>{const ye=ul,be=f_,ke=d_,Ve=sp,Pe=W_,lt=U_,tt=br,nt=sn,it=q_;return t.openBlock(),t.createElementBlock("div",PI,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.node,F=>(t.openBlock(),t.createElementBlock("div",null,["type"in F?(t.openBlock(),t.createElementBlock("div",$I,[t.unref(M).has(F.type)&&F.children&&F.children.length>0?(t.openBlock(),t.createElementBlock("div",FI,[t.createVNode(Gl,{node:F.children,formData:D,otherData:e.otherData,isEditable:e.isEditable,providerEditability:e.providerEditability,patientEditability:e.patientEditability,otherTableInfo:e.otherTableInfo},null,8,["node","formData","otherData","isEditable","providerEditability","patientEditability","otherTableInfo"])])):t.createCommentVNode("",!0),F.type==="paragraph"&&F.children&&F.children.length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(F.type)},[t.createVNode(Gl,{node:F.children,formData:D,otherData:e.otherData,isEditable:e.isEditable,providerEditability:e.providerEditability,patientEditability:e.patientEditability,otherTableInfo:e.otherTableInfo},null,8,["node","formData","otherData","isEditable","providerEditability","patientEditability","otherTableInfo"])],2)):t.createCommentVNode("",!0),F.type==="atblock"?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(F.type)},[t.unref(k).has(F.key)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(`label ${F.type}-label`)},t.toDisplayString(D[F.key]),3)):t.createCommentVNode("",!0),t.unref(k).has(F.key)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",jI,[e.isEditable?(t.openBlock(),t.createBlock(ye,{key:0,class:t.normalizeClass(`${F.type}-input`),placeholder:"Enter here",modelValue:D[F.key],"onUpdate:modelValue":le=>D[F.key]=le},null,8,["class","modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),e.isEditable?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(`label ${F.type}-label`)},t.toDisplayString(D[F.key]),3))]))],2)):t.createCommentVNode("",!0),F.type==="sharpblock"?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(F.type)},[Q(F.value)==="textSharp"?(t.openBlock(),t.createElementBlock("div",UI,[t.createElementVNode("div",WI,[t.createTextVNode(t.toDisplayString(A(F.value).title),1),A(F.value).required?(t.openBlock(),t.createElementBlock("span",HI," *")):t.createCommentVNode("",!0)]),e.isEditable&&A(F.value).type==="TextField"?(t.openBlock(),t.createBlock(ye,{key:0,class:t.normalizeClass(`${F.type}-input`),placeholder:A(F.value).placeholder||"Enter here",modelValue:D[F.key],"onUpdate:modelValue":le=>D[F.key]=le},null,8,["class","placeholder","modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),e.isEditable&&A(F.value).type==="TextView"?(t.openBlock(),t.createBlock(ye,{key:1,class:t.normalizeClass(`${F.type}-textarea`),placeholder:A(F.value).placeholder||"Enter here",modelValue:D[F.key],"onUpdate:modelValue":le=>D[F.key]=le,resize:"none",autosize:{minRows:2,maxRows:5},type:"textarea"},null,8,["class","placeholder","modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),e.isEditable?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(A(F.value).type==="TextField"?"sharpblock-textfield-block":"sharpblock-textview-block")},t.toDisplayString(D[F.key]||"No Content"),3))])):t.createCommentVNode("",!0),Q(F.value)==="choiceSharp"?(t.openBlock(),t.createElementBlock("div",YI,[t.createElementVNode("div",GI,[t.createTextVNode(t.toDisplayString(A(F.value).title),1),A(F.value).required?(t.openBlock(),t.createElementBlock("span",KI," *")):t.createCommentVNode("",!0)]),e.isEditable&&A(F.value).type==="Radio"?(t.openBlock(),t.createBlock(ke,{key:0,modelValue:D[F.key].value,"onUpdate:modelValue":le=>D[F.key].value=le,class:"vertical-radio-group"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(B(F.choiceStr),(le,je)=>(t.openBlock(),t.createBlock(be,{value:je},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(je),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),!e.isEditable&&A(F.value).type==="Radio"?(t.openBlock(),t.createBlock(ke,{key:1,modelValue:D[F.key].value,"onUpdate:modelValue":le=>D[F.key].value=le,disabled:"",class:"vertical-radio-group"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D[F.key].dataList,le=>(t.openBlock(),t.createBlock(be,{value:le},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(le),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),e.isEditable&&A(F.value).type==="Checkbox"?(t.openBlock(),t.createElementBlock("div",qI,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D[F.key].dataList,le=>{var je;return t.openBlock(),t.createBlock(Ve,{checked:((je=G(F.key,le.index))==null?void 0:je.value)===le.value,onClick:bt=>U(F.key,le.index)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(le.value),1)]),_:2},1032,["checked","onClick"])}),256))])):t.createCommentVNode("",!0),!e.isEditable&&A(F.value).type==="Checkbox"?(t.openBlock(),t.createElementBlock("div",QI,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D[F.key].dataList,le=>{var je;return t.openBlock(),t.createBlock(Ve,{checked:((je=G(F.key,le.index))==null?void 0:je.value)===le.value,onClick:bt=>U(F.key,le.index),disabled:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(le.value),1)]),_:2},1032,["checked","onClick"])}),256))])):t.createCommentVNode("",!0),e.isEditable&&A(F.value).type==="Drop Down Box"?(t.openBlock(),t.createBlock(lt,{key:4,class:"dropdown-select",modelValue:D[F.key].value,"onUpdate:modelValue":le=>D[F.key].value=le,clearable:"",placeholder:"Select"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D[F.key].dataList,(le,je)=>(t.openBlock(),t.createBlock(Pe,{key:je,label:le.value,value:le.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),!e.isEditable&&A(F.value).type==="Drop Down Box"?(t.openBlock(),t.createElementBlock("div",ZI,[t.createElementVNode("div",XI,t.toDisplayString(D[F.key].value||"No Content"),1)])):t.createCommentVNode("",!0),e.isEditable&&A(F.value).type==="Date"?(t.openBlock(),t.createElementBlock("div",{key:6,class:"date-box",style:t.normalizeStyle(`width: ${t.unref(r).DateAndTime.width}`),onClick:le=>te(`${F.key}.Date`)},[t.createVNode(ye,{class:"date-input","suffix-icon":t.unref(xf),modelValue:D[F.key].Date,"onUpdate:modelValue":le=>D[F.key].Date=le,placeholder:"Select"},null,8,["suffix-icon","modelValue","onUpdate:modelValue"])],12,JI)):t.createCommentVNode("",!0),!e.isEditable&&A(F.value).type==="Date"?(t.openBlock(),t.createElementBlock("div",ek,[t.createElementVNode("div",tk,t.toDisplayString(D[F.key].Date||"No Content"),1)])):t.createCommentVNode("",!0),e.isEditable&&A(F.value).type==="Time"?(t.openBlock(),t.createElementBlock("div",nk,[t.createVNode(lt,{class:"aitmed-editor-custom-select time-select","suffix-icon":t.unref(If),size:"large",modelValue:D[F.key].Time,"onUpdate:modelValue":le=>D[F.key].Time=le,clearable:""},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D[F.key].list,(le,je)=>(t.openBlock(),t.createBlock(Pe,{key:je,label:le.value,value:le.value},null,8,["label","value"]))),128))]),_:2},1032,["suffix-icon","modelValue","onUpdate:modelValue"])])):t.createCommentVNode("",!0),!e.isEditable&&A(F.value).type==="Time"?(t.openBlock(),t.createElementBlock("div",rk,[t.createElementVNode("div",ok,t.toDisplayString(D[F.key].Tate||"No Content"),1)])):t.createCommentVNode("",!0),e.isEditable&&A(F.value).type==="Date&Time"?(t.openBlock(),t.createElementBlock("div",{key:10,class:"date-time-box",style:t.normalizeStyle(`${o.value?"flex-direction: column; gap: 0;":""}`)},[t.createElementVNode("div",{class:"date-box",style:t.normalizeStyle(`${o.value?"":"width: "+t.unref(r).DateAndTime.width}`),onClick:le=>te(`${F.key}.Date`)},[t.createVNode(ye,{class:"date-input","suffix-icon":t.unref(xf),modelValue:D[F.key].Date,"onUpdate:modelValue":le=>D[F.key].Date=le,placeholder:"Select"},null,8,["suffix-icon","modelValue","onUpdate:modelValue"])],12,ik),t.createElementVNode("div",ak,[t.createVNode(lt,{class:"aitmed-editor-custom-select time-select","suffix-icon":t.unref(If),size:"large",modelValue:D[F.key].Time,"onUpdate:modelValue":le=>D[F.key].Time=le,clearable:""},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D[F.key].list,(le,je)=>(t.openBlock(),t.createBlock(Pe,{key:je,label:le.value,value:le.value},null,8,["label","value"]))),128))]),_:2},1032,["suffix-icon","modelValue","onUpdate:modelValue"])])],4)):t.createCommentVNode("",!0),!e.isEditable&&A(F.value).type==="Date&Time"?(t.openBlock(),t.createElementBlock("div",sk,[t.createElementVNode("div",lk,t.toDisplayString(D[F.key].Date||"--"),1),ck,t.createElementVNode("div",uk,t.toDisplayString(D[F.key].Time||"--"),1)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),Q(F.value)==="providerSignature"?(t.openBlock(),t.createElementBlock("div",fk,[t.createElementVNode("div",{class:"label signature-title-label",style:t.normalizeStyle(`${o.value?"font-size: 1.98vh":""}`)},[t.createTextVNode(t.toDisplayString(D.signatureProviderName||"Signature")+" ",1),e.providerEditability?(t.openBlock(),t.createElementBlock("img",{key:0,class:"signature-edit",src:hx,onClick:fe[0]||(fe[0]=le=>ae("signatureProviderName"))})):t.createCommentVNode("",!0)],4),t.createElementVNode("div",{class:t.normalizeClass(`
|
|
57
57
|
signature-view
|
|
58
58
|
${e.providerEditability?"signature-editable":"signature-diseditable"}
|
|
59
|
-
`),onClick:fe[1]||(fe[1]=le=>e.providerEditability&&he("signatureId",e.otherData.providerSignature,t.unref(wn).provider,!1))},[t.createElementVNode("img",{class:"signature-img",src:e.otherData.providerSignature||oh},null,8,
|
|
59
|
+
`),onClick:fe[1]||(fe[1]=le=>e.providerEditability&&he("signatureId",e.otherData.providerSignature,t.unref(wn).provider,!1))},[t.createElementVNode("img",{class:"signature-img",src:e.otherData.providerSignature||oh},null,8,dk),t.createElementVNode("div",{class:"signature-x",style:t.normalizeStyle(`${o.value?"font-size: 2.98vh":""}`)},"X",4)],2)])):t.createCommentVNode("",!0),Q(F.value)==="patientSignature"?(t.openBlock(),t.createElementBlock("div",pk,[t.createElementVNode("div",{class:"label signature-title-label",style:t.normalizeStyle(`${o.value?"font-size: 1.98vh":""}`)}," Patient/Guardian Signature ",4),t.createElementVNode("div",{class:t.normalizeClass(`
|
|
60
60
|
signature-view
|
|
61
61
|
${e.patientEditability?"signature-editable":"signature-diseditable"}
|
|
62
|
-
`),onClick:fe[2]||(fe[2]=le=>e.patientEditability&&he("patdSignatureId",e.otherData.patientSignature,t.unref(wn).patient,D.needGuardianSignature))},[t.createElementVNode("img",{class:"signature-img",src:e.otherData.patientSignature||oh},null,8,
|
|
62
|
+
`),onClick:fe[2]||(fe[2]=le=>e.patientEditability&&he("patdSignatureId",e.otherData.patientSignature,t.unref(wn).patient,D.needGuardianSignature))},[t.createElementVNode("img",{class:"signature-img",src:e.otherData.patientSignature||oh},null,8,hk),t.createElementVNode("div",{class:"signature-x",style:t.normalizeStyle(`${o.value?"font-size: 2.98vh":""}`)},"X",4)],2),t.createElementVNode("div",mk,[t.createVNode(Ve,{modelValue:D.needGuardianSignature,"onUpdate:modelValue":fe[3]||(fe[3]=le=>D.needGuardianSignature=le),disabled:!e.patientEditability},null,8,["modelValue","disabled"]),gk])])):t.createCommentVNode("",!0),Q(F.value)==="default"&&q(F.value.replace(/#/,""))==="Diagnosis"?(t.openBlock(),t.createElementBlock("div",yk,[t.createElementVNode("div",bk,[wk,e.isEditable?(t.openBlock(),t.createElementBlock("div",{key:0,class:"label diagnosis-recommend-label",onClick:Se},"Recommend Diagnoses")):t.createCommentVNode("",!0)]),e.isEditable?(t.openBlock(),t.createElementBlock("div",Ek,[t.createElementVNode("div",Ck,[t.createVNode(ye,{class:"diagnosis-search","suffix-icon":t.unref(xw),placeholder:"Search",modelValue:w.code,"onUpdate:modelValue":fe[4]||(fe[4]=le=>w.code=le),onInput:se},null,8,["suffix-icon","modelValue"]),w.searchResult.length>0?(t.openBlock(),t.createElementBlock("div",Sk,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.searchResult,le=>(t.openBlock(),t.createElementBlock("div",{class:"diagnosis-suggestion-item",onClick:je=>me(le)},t.toDisplayString(le.codeAndDescription),9,_k))),256))])):t.createCommentVNode("",!0),t.createVNode(ye,{class:"diagnosis-description",placeholder:"Description",modelValue:w.description,"onUpdate:modelValue":fe[5]||(fe[5]=le=>w.description=le)},null,8,["modelValue"])]),t.createVNode(ye,{class:"diagnosis-comment",placeholder:"Enter here",resize:"none",autosize:{minRows:2,maxRows:5},type:"textarea",modelValue:w.comment,"onUpdate:modelValue":fe[6]||(fe[6]=le=>w.comment=le)},null,8,["modelValue"]),xk,t.createVNode(tt,{class:"diagnosis-button",icon:t.unref(gw),onClick:Ee},{default:t.withCtx(()=>[t.createTextVNode("Add More")]),_:1},8,["icon"])])):t.createCommentVNode("",!0),e.isEditable&&D.Diagnosis.length||!e.isEditable?(t.openBlock(),t.createElementBlock("div",Ik,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.Diagnosis,(le,je)=>(t.openBlock(),t.createElementBlock("div",kk,[t.createElementVNode("div",Mk,[e.isEditable?(t.openBlock(),t.createBlock(nt,{key:0,class:"diagnosis-delete",size:"16px",color:"#d81e06",onClick:bt=>Te(je)},{default:t.withCtx(()=>[t.createVNode(t.unref(Gs))]),_:2},1032,["onClick"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(le.code)+" - "+t.toDisplayString(le.description),1)]),t.createElementVNode("div",Tk,t.toDisplayString(le.comment),1)]))),256)),!e.isEditable&&!D.Diagnosis.length?(t.openBlock(),t.createElementBlock("span",Ak,"No Content")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),Q(F.value)==="default"&&q(F.value.replace(/#/,""))==="Vital Sign"?(t.openBlock(),t.createElementBlock("div",Nk,[vk,t.createElementVNode("div",Bk,[t.createElementVNode("div",Dk,[t.createElementVNode("div",Lk,[t.createElementVNode("div",Ok,[t.createTextVNode("Blood Pressure"),o.value?(t.openBlock(),t.createElementBlock("span",Rk," (mmHg)")):t.createCommentVNode("",!0)]),t.createVNode(ye,{modelValue:D.VitalSignBlock[F.key].bp,"onUpdate:modelValue":le=>D.VitalSignBlock[F.key].bp=le,class:"vital-sign-item-input",readonly:!e.isEditable},t.createSlots({_:2},[o.value?void 0:{name:"suffix",fn:t.withCtx(()=>[t.createVNode(it,{class:"vital-sign-item-input-suffix"},{default:t.withCtx(()=>[t.createTextVNode("mmHg")]),_:1})]),key:"0"}]),1032,["modelValue","onUpdate:modelValue","readonly"])]),t.createElementVNode("div",Vk,[t.createElementVNode("div",zk,[t.createTextVNode("Heart Rate"),o.value?(t.openBlock(),t.createElementBlock("span",Pk," (bpm)")):t.createCommentVNode("",!0)]),t.createVNode(ye,{modelValue:D.VitalSignBlock[F.key].hr,"onUpdate:modelValue":le=>D.VitalSignBlock[F.key].hr=le,class:"vital-sign-item-input",readonly:!e.isEditable},t.createSlots({_:2},[o.value?void 0:{name:"suffix",fn:t.withCtx(()=>[t.createVNode(it,{class:"vital-sign-item-input-suffix"},{default:t.withCtx(()=>[t.createTextVNode("bpm")]),_:1})]),key:"0"}]),1032,["modelValue","onUpdate:modelValue","readonly"])])]),t.createElementVNode("div",$k,[t.createElementVNode("div",Fk,[t.createElementVNode("div",jk,[t.createTextVNode("Respiratory Rate"),o.value?(t.openBlock(),t.createElementBlock("span",Uk," (breaths/min)")):t.createCommentVNode("",!0)]),t.createVNode(ye,{modelValue:D.VitalSignBlock[F.key].rr,"onUpdate:modelValue":le=>D.VitalSignBlock[F.key].rr=le,class:"vital-sign-item-input",readonly:!e.isEditable},t.createSlots({_:2},[o.value?void 0:{name:"suffix",fn:t.withCtx(()=>[t.createVNode(it,{class:"vital-sign-item-input-suffix"})]),key:"0"}]),1032,["modelValue","onUpdate:modelValue","readonly"])]),t.createElementVNode("div",Wk,[t.createElementVNode("div",Hk,[t.createTextVNode("Pulse Oximetry"),o.value?(t.openBlock(),t.createElementBlock("span",Yk," (O₂ %)")):t.createCommentVNode("",!0)]),t.createVNode(ye,{modelValue:D.VitalSignBlock[F.key].po,"onUpdate:modelValue":le=>D.VitalSignBlock[F.key].po=le,class:"vital-sign-item-input",readonly:!e.isEditable},t.createSlots({_:2},[o.value?void 0:{name:"suffix",fn:t.withCtx(()=>[t.createVNode(it,{class:"vital-sign-item-input-suffix"},{default:t.withCtx(()=>[t.createTextVNode("O₂ %")]),_:1})]),key:"0"}]),1032,["modelValue","onUpdate:modelValue","readonly"])])])]),t.createElementVNode("div",Gk,[t.createElementVNode("div",Kk,[t.createElementVNode("div",qk,[t.createElementVNode("div",Qk,[t.createTextVNode("Temperature"),o.value?(t.openBlock(),t.createElementBlock("span",Zk," (°F/°C)")):t.createCommentVNode("",!0)]),t.createVNode(ye,{modelValue:D.VitalSignBlock[F.key].temp,"onUpdate:modelValue":le=>D.VitalSignBlock[F.key].temp=le,class:"vital-sign-item-input",readonly:!e.isEditable},t.createSlots({_:2},[o.value?void 0:{name:"suffix",fn:t.withCtx(()=>[t.createVNode(it,{class:"vital-sign-item-input-suffix"},{default:t.withCtx(()=>[t.createTextVNode("°F/°C")]),_:1})]),key:"0"}]),1032,["modelValue","onUpdate:modelValue","readonly"])]),t.createElementVNode("div",Xk,[t.createElementVNode("div",Jk,[t.createTextVNode("Height"),o.value?(t.openBlock(),t.createElementBlock("span",e4," (ft/in)")):t.createCommentVNode("",!0)]),t.createVNode(ye,{modelValue:D.VitalSignBlock[F.key].height,"onUpdate:modelValue":le=>D.VitalSignBlock[F.key].height=le,class:"vital-sign-item-input",readonly:!e.isEditable},t.createSlots({_:2},[o.value?void 0:{name:"suffix",fn:t.withCtx(()=>[t.createVNode(it,{class:"vital-sign-item-input-suffix"},{default:t.withCtx(()=>[t.createTextVNode("ft/in")]),_:1})]),key:"0"}]),1032,["modelValue","onUpdate:modelValue","readonly"])])]),t.createElementVNode("div",t4,[t.createElementVNode("div",n4,[t.createElementVNode("div",r4,[t.createTextVNode("Weight"),o.value?(t.openBlock(),t.createElementBlock("span",o4," (lb)")):t.createCommentVNode("",!0)]),t.createVNode(ye,{modelValue:D.VitalSignBlock[F.key].weight,"onUpdate:modelValue":le=>D.VitalSignBlock[F.key].weight=le,class:"vital-sign-item-input",readonly:!e.isEditable},t.createSlots({_:2},[o.value?void 0:{name:"suffix",fn:t.withCtx(()=>[t.createVNode(it,{class:"vital-sign-item-input-suffix"},{default:t.withCtx(()=>[t.createTextVNode("lb")]),_:1})]),key:"0"}]),1032,["modelValue","onUpdate:modelValue","readonly"])]),t.createElementVNode("div",i4,[t.createElementVNode("div",a4,[t.createTextVNode("BMI"),o.value?(t.openBlock(),t.createElementBlock("span",s4," (kg/m²)")):t.createCommentVNode("",!0)]),t.createVNode(ye,{modelValue:D.VitalSignBlock[F.key].bmi,"onUpdate:modelValue":le=>D.VitalSignBlock[F.key].bmi=le,class:"vital-sign-item-input",readonly:!e.isEditable},t.createSlots({_:2},[o.value?void 0:{name:"suffix",fn:t.withCtx(()=>[t.createVNode(it,{class:"vital-sign-item-input-suffix"},{default:t.withCtx(()=>[t.createTextVNode("kg/m²")]),_:1})]),key:"0"}]),1032,["modelValue","onUpdate:modelValue","readonly"])])])])])):t.createCommentVNode("",!0),Q(F.value)==="default"&&q(F.value.replace(/#/,""))==="default"?(t.openBlock(),t.createElementBlock("div",l4,[t.createElementVNode("div",c4,t.toDisplayString(F.value.replace(/#/,"")),1),e.isEditable?(t.openBlock(),t.createBlock(ye,{key:0,class:"default-textarea",placeholder:A(F.value).placeholder||"Enter here",modelValue:D[ne(F.value.replace(/#/,""))],"onUpdate:modelValue":le=>D[ne(F.value.replace(/#/,""))]=le,resize:"none",autosize:{minRows:2,maxRows:5},type:"textarea"},null,8,["placeholder","modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),e.isEditable?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",u4,t.toDisplayString(D[ne(F.value.replace(/#/,""))]||"No Content"),1))])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),F.type==="table"?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(F.type),style:t.normalizeStyle(F.width==="auto"?`width: ${F.width};`:`width: ${t.unref(r).fullWidth}`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(F.children,(le,je)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(le.type),style:t.normalizeStyle(F.width==="auto"?`width: ${F.width};`:`width: ${t.unref(r).fullWidth}`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(le.children,(bt,rt)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(bt.type),style:t.normalizeStyle(R({isHeader:bt.isHeader,textAlign:bt.textAlign,key:F.key,index:rt})+`
|
|
63
63
|
width: ${Y.otherTableInfo[F.key].tableWidthArray[rt]};
|
|
64
64
|
flex-shrink: ${Y.otherTableInfo[F.key].flexShrinks[rt]};
|
|
65
65
|
`)},[e.isEditable?(t.openBlock(),t.createBlock(ye,{key:0,class:"table-input aitmed-editor-custom-input",style:t.normalizeStyle(R({isHeader:bt.isHeader,textAlign:bt.textAlign})),modelValue:D[F.key][je][rt],"onUpdate:modelValue":Qe=>D[F.key][je][rt]=Qe,placeholder:""},null,8,["style","modelValue","onUpdate:modelValue"])):t.createCommentVNode("",!0),e.isEditable?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:1,class:"label table-label",style:t.normalizeStyle(`
|
|
@@ -68,12 +68,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
68
68
|
`)},t.toDisplayString(D[F.key][je][rt]),5))],6))),256))],6))),256))],6)):t.createCommentVNode("",!0),F.type==="image"?(t.openBlock(),t.createElementBlock("img",{key:5,class:t.normalizeClass(F.type),style:t.normalizeStyle(F.style?`
|
|
69
69
|
width: ${F.style.width};
|
|
70
70
|
height: ${F.style.height};
|
|
71
|
-
`:""),src:e.otherData[F.alt]?e.otherData[F.alt]:F.src,onClick:le=>L(F.alt,e.otherData[F.alt]?e.otherData[F.alt]:F.src,F.href==="markable"||F.href==="markeable")},null,14,
|
|
71
|
+
`:""),src:e.otherData[F.alt]?e.otherData[F.alt]:F.src,onClick:le=>L(F.alt,e.otherData[F.alt]?e.otherData[F.alt]:F.src,F.href==="markable"||F.href==="markeable")},null,14,f4)):t.createCommentVNode("",!0),F.type==="divider"?(t.openBlock(),t.createElementBlock("hr",{key:6,class:t.normalizeClass(F.type)},null,2)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),"text"in F?(t.openBlock(),t.createElementBlock("div",d4,[F.text?(t.openBlock(),t.createElementBlock("div",p4,t.toDisplayString(F.text),1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)]))),256))])}}}),gi=(e,r)=>{const o=e.__vccOpts||e;for(const[a,l]of r)o[a]=l;return o},Gl=gi(h4,[["__scopeId","data-v-94fb1bed"]]),ih="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='21'%20height='21'%20viewBox='0%200%2021%2021'%3e%3cpath%20id='calendarCancel'%20d='M28.5,9.615,26.385,7.5,18,15.885,9.615,7.5,7.5,9.615,15.885,18,7.5,26.385,9.615,28.5,18,20.115,26.385,28.5,28.5,26.385,20.115,18Z'%20transform='translate(-7.5%20-7.5)'/%3e%3c/svg%3e",m4={class:"calendar_box"},g4={class:"date"},y4={class:"calendar_chioce"},b4=gi(t.defineComponent({__name:"CalendarPicker",setup(e){t.useCssVars(N=>({"97c49548":S.width,"946c075e":S.height,"75aa366b":S.top,"3f98cdb1":S.left}));const r=t.ref(hi()),o=t.ref(null),a=t.ref(),c=xs().getCalendarPciker(),u=N=>{a.value&&a.value.selectDate(N)},f=t.reactive({status:!1,value:new Date}),m=N=>N.startsWith("0")?parseInt(N).toString():N,y=()=>{c.close()},g=N=>{N.target===o.value&&c.close()},w=N=>{const k=N.getMonth()+1,A=N.getDate(),B=N.getFullYear(),Y=k>=10?`${k}`:`0${k}`,D=A>=10?`${A}`:`0${A}`;return`${Y}/${D}/${B}`},b=N=>{if(/(0[1-9]|1[0-2])\/(0[1-9]|[1-2][0-9]|3[0-1])\/[0-9]{4}/.test(N)){const k=N.split("/"),A=parseInt(k[0])-1,B=parseInt(k[1]),Y=parseInt(k[2]);return new Date(Y,A,B)}else throw Error("The string format error!")},M=()=>{Rn.set(c.options.formData,c.options.dataKey,w(f.value)),y()},E=()=>{y()},S=t.reactive({top:"",left:"",width:"",height:""});return t.onMounted(()=>{if(a.value){const A=Rn.get(c.options.formData,c.options.dataKey);if(A){const B=b(A);f.value=B}}const k=Br().getDocumentTemplate();r.value?(S.top="0",S.left="0",S.width="100vw",S.height="100vh"):k.relatedDom?(S.top=`${k.relatedDom.offsetTop}px`,S.left=`${k.relatedDom.offsetLeft}px`,S.width=`${k.relatedDom.clientWidth}px`,S.height=`${k.relatedDom.clientHeight}px`):(S.top="0",S.left="0",S.width="100vw",S.height="100vh")}),(N,k)=>{const A=br,B=Kd,Y=DS;return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{ref_key:"pickerView",ref:o,class:t.normalizeClass(r.value?"calendar_view calendar_view-mobile":"calendar_view calendar_view-ps"),onClick:g},[t.createElementVNode("div",m4,[t.createElementVNode("div",{class:"calendar_close"},[t.createElementVNode("img",{class:"image-editor-close_icon",src:ih,onClick:y})]),t.createVNode(Y,{ref_key:"calendar",ref:a,modelValue:f.value,"onUpdate:modelValue":k[5]||(k[5]=D=>f.value=D),class:"calendar"},{header:t.withCtx(({date:D})=>[t.createVNode(B,null,{default:t.withCtx(()=>[t.createVNode(A,{size:"small",onClick:k[0]||(k[0]=Q=>u("prev-year"))},{default:t.withCtx(()=>[t.createTextVNode(" << ")]),_:1}),t.createVNode(A,{size:"small",onClick:k[1]||(k[1]=Q=>u("prev-month"))},{default:t.withCtx(()=>[t.createTextVNode(" < ")]),_:1})]),_:1}),t.createElementVNode("span",null,t.toDisplayString(D),1),t.createVNode(B,null,{default:t.withCtx(()=>[t.createVNode(A,{size:"small",onClick:k[2]||(k[2]=Q=>u("today"))},{default:t.withCtx(()=>[t.createTextVNode("Today")]),_:1}),t.createVNode(A,{size:"small",onClick:k[3]||(k[3]=Q=>u("next-month"))},{default:t.withCtx(()=>[t.createTextVNode(" > ")]),_:1}),t.createVNode(A,{size:"small",onClick:k[4]||(k[4]=Q=>u("next-year"))},{default:t.withCtx(()=>[t.createTextVNode(" >> ")]),_:1})]),_:1})]),"date-cell":t.withCtx(({data:D})=>[t.createElementVNode("div",g4,[t.createElementVNode("p",{class:t.normalizeClass(D.isSelected?"is-selected":"")},t.toDisplayString(m(D.day.split("-")[2])),3)])]),_:1},8,["modelValue"]),t.createElementVNode("div",y4,[t.createVNode(A,{class:"calendar_chioce_button calendar_cancel",onClick:E},{default:t.withCtx(()=>[t.createTextVNode("Cancel")]),_:1}),t.createVNode(A,{class:"calendar_chioce_button calendar_confirm",onClick:M},{default:t.withCtx(()=>[t.createTextVNode("Confirm")]),_:1})])])],2)])}}}),[["__scopeId","data-v-31c0f145"]]);var Ia={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */Ia.exports,function(e,r){(function(o){var a=r,l=e&&e.exports==a&&e,c=typeof On=="object"&&On;(c.global===c||c.window===c)&&(o=c);var u=function(E){this.message=E};u.prototype=new Error,u.prototype.name="InvalidCharacterError";var f=function(E){throw new u(E)},m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=/[\t\n\f\r ]/g,g=function(E){E=String(E).replace(y,"");var S=E.length;S%4==0&&(E=E.replace(/==?$/,""),S=E.length),(S%4==1||/[^+a-zA-Z0-9/]/.test(E))&&f("Invalid character: the string to be decoded is not correctly encoded.");for(var N=0,k,A,B="",Y=-1;++Y<S;)A=m.indexOf(E.charAt(Y)),k=N%4?k*64+A:A,N++%4&&(B+=String.fromCharCode(255&k>>(-2*N&6)));return B},w=function(E){E=String(E),/[^\0-\xFF]/.test(E)&&f("The string to be encoded contains characters outside of the Latin1 range.");for(var S=E.length%3,N="",k=-1,A,B,Y,D,Q=E.length-S;++k<Q;)A=E.charCodeAt(k)<<16,B=E.charCodeAt(++k)<<8,Y=E.charCodeAt(++k),D=A+B+Y,N+=m.charAt(D>>18&63)+m.charAt(D>>12&63)+m.charAt(D>>6&63)+m.charAt(D&63);return S==2?(A=E.charCodeAt(k)<<8,B=E.charCodeAt(++k),D=A+B,N+=m.charAt(D>>10)+m.charAt(D>>4&63)+m.charAt(D<<2&63)+"="):S==1&&(D=E.charCodeAt(k),N+=m.charAt(D>>2)+m.charAt(D<<4&63)+"=="),N},b={encode:w,decode:g,version:"1.0.0"};if(a&&!a.nodeType)if(l)l.exports=b;else for(var M in b)b.hasOwnProperty(M)&&(a[M]=b[M]);else o.base64=b})(On)}(Ia,Ia.exports),Ia.exports;var ah={},ka={};ka.byteLength=C4,ka.toByteArray=_4,ka.fromByteArray=k4;for(var Vn=[],cn=[],w4=typeof Uint8Array<"u"?Uint8Array:Array,Kl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mo=0,E4=Kl.length;Mo<E4;++Mo)Vn[Mo]=Kl[Mo],cn[Kl.charCodeAt(Mo)]=Mo;cn[45]=62,cn[95]=63;function sh(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var o=e.indexOf("=");o===-1&&(o=r);var a=o===r?0:4-o%4;return[o,a]}function C4(e){var r=sh(e),o=r[0],a=r[1];return(o+a)*3/4-a}function S4(e,r,o){return(r+o)*3/4-o}function _4(e){var r,o=sh(e),a=o[0],l=o[1],c=new w4(S4(e,a,l)),u=0,f=l>0?a-4:a,m;for(m=0;m<f;m+=4)r=cn[e.charCodeAt(m)]<<18|cn[e.charCodeAt(m+1)]<<12|cn[e.charCodeAt(m+2)]<<6|cn[e.charCodeAt(m+3)],c[u++]=r>>16&255,c[u++]=r>>8&255,c[u++]=r&255;return l===2&&(r=cn[e.charCodeAt(m)]<<2|cn[e.charCodeAt(m+1)]>>4,c[u++]=r&255),l===1&&(r=cn[e.charCodeAt(m)]<<10|cn[e.charCodeAt(m+1)]<<4|cn[e.charCodeAt(m+2)]>>2,c[u++]=r>>8&255,c[u++]=r&255),c}function x4(e){return Vn[e>>18&63]+Vn[e>>12&63]+Vn[e>>6&63]+Vn[e&63]}function I4(e,r,o){for(var a,l=[],c=r;c<o;c+=3)a=(e[c]<<16&16711680)+(e[c+1]<<8&65280)+(e[c+2]&255),l.push(x4(a));return l.join("")}function k4(e){for(var r,o=e.length,a=o%3,l=[],c=16383,u=0,f=o-a;u<f;u+=c)l.push(I4(e,u,u+c>f?f:u+c));return a===1?(r=e[o-1],l.push(Vn[r>>2]+Vn[r<<4&63]+"==")):a===2&&(r=(e[o-2]<<8)+e[o-1],l.push(Vn[r>>10]+Vn[r>>4&63]+Vn[r<<2&63]+"=")),l.join("")}var ql={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ql.read=function(e,r,o,a,l){var c,u,f=l*8-a-1,m=(1<<f)-1,y=m>>1,g=-7,w=o?l-1:0,b=o?-1:1,M=e[r+w];for(w+=b,c=M&(1<<-g)-1,M>>=-g,g+=f;g>0;c=c*256+e[r+w],w+=b,g-=8);for(u=c&(1<<-g)-1,c>>=-g,g+=a;g>0;u=u*256+e[r+w],w+=b,g-=8);if(c===0)c=1-y;else{if(c===m)return u?NaN:(M?-1:1)*(1/0);u=u+Math.pow(2,a),c=c-y}return(M?-1:1)*u*Math.pow(2,c-a)},ql.write=function(e,r,o,a,l,c){var u,f,m,y=c*8-l-1,g=(1<<y)-1,w=g>>1,b=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=a?0:c-1,E=a?1:-1,S=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,u=g):(u=Math.floor(Math.log(r)/Math.LN2),r*(m=Math.pow(2,-u))<1&&(u--,m*=2),u+w>=1?r+=b/m:r+=b*Math.pow(2,1-w),r*m>=2&&(u++,m/=2),u+w>=g?(f=0,u=g):u+w>=1?(f=(r*m-1)*Math.pow(2,l),u=u+w):(f=r*Math.pow(2,w-1)*Math.pow(2,l),u=0));l>=8;e[o+M]=f&255,M+=E,f/=256,l-=8);for(u=u<<l|f,y+=l;y>0;e[o+M]=u&255,M+=E,u/=256,y-=8);e[o+M-E]|=S*128};/*!
|
|
72
72
|
* The buffer module from node.js, for the browser.
|
|
73
73
|
*
|
|
74
74
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
75
75
|
* @license MIT
|
|
76
|
-
*/(function(e){const r=ka,o=ql,a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=f,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;const l=2147483647;e.kMaxLength=l,f.TYPED_ARRAY_SUPPORT=c(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const _=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(_,p),_.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function u(_){if(_>l)throw new RangeError('The value "'+_+'" is invalid for option "size"');const p=new Uint8Array(_);return Object.setPrototypeOf(p,f.prototype),p}function f(_,p,h){if(typeof _=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(_)}return m(_,p,h)}f.poolSize=8192;function m(_,p,h){if(typeof _=="string")return b(_,p);if(ArrayBuffer.isView(_))return E(_);if(_==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _);if(ct(_,ArrayBuffer)||_&&ct(_.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ct(_,SharedArrayBuffer)||_&&ct(_.buffer,SharedArrayBuffer)))return S(_,p,h);if(typeof _=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const T=_.valueOf&&_.valueOf();if(T!=null&&T!==_)return f.from(T,p,h);const z=N(_);if(z)return z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof _[Symbol.toPrimitive]=="function")return f.from(_[Symbol.toPrimitive]("string"),p,h);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _)}f.from=function(_,p,h){return m(_,p,h)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array);function y(_){if(typeof _!="number")throw new TypeError('"size" argument must be of type number');if(_<0)throw new RangeError('The value "'+_+'" is invalid for option "size"')}function g(_,p,h){return y(_),_<=0?u(_):p!==void 0?typeof h=="string"?u(_).fill(p,h):u(_).fill(p):u(_)}f.alloc=function(_,p,h){return g(_,p,h)};function w(_){return y(_),u(_<0?0:k(_)|0)}f.allocUnsafe=function(_){return w(_)},f.allocUnsafeSlow=function(_){return w(_)};function b(_,p){if((typeof p!="string"||p==="")&&(p="utf8"),!f.isEncoding(p))throw new TypeError("Unknown encoding: "+p);const h=B(_,p)|0;let T=u(h);const z=T.write(_,p);return z!==h&&(T=T.slice(0,z)),T}function M(_){const p=_.length<0?0:k(_.length)|0,h=u(p);for(let T=0;T<p;T+=1)h[T]=_[T]&255;return h}function E(_){if(ct(_,Uint8Array)){const p=new Uint8Array(_);return S(p.buffer,p.byteOffset,p.byteLength)}return M(_)}function S(_,p,h){if(p<0||_.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(_.byteLength<p+(h||0))throw new RangeError('"length" is outside of buffer bounds');let T;return p===void 0&&h===void 0?T=new Uint8Array(_):h===void 0?T=new Uint8Array(_,p):T=new Uint8Array(_,p,h),Object.setPrototypeOf(T,f.prototype),T}function N(_){if(f.isBuffer(_)){const p=k(_.length)|0,h=u(p);return h.length===0||_.copy(h,0,0,p),h}if(_.length!==void 0)return typeof _.length!="number"||Lt(_.length)?u(0):M(_);if(_.type==="Buffer"&&Array.isArray(_.data))return M(_.data)}function k(_){if(_>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return _|0}function A(_){return+_!=_&&(_=0),f.alloc(+_)}f.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==f.prototype},f.compare=function(p,h){if(ct(p,Uint8Array)&&(p=f.from(p,p.offset,p.byteLength)),ct(h,Uint8Array)&&(h=f.from(h,h.offset,h.byteLength)),!f.isBuffer(p)||!f.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===h)return 0;let T=p.length,z=h.length;for(let W=0,ee=Math.min(T,z);W<ee;++W)if(p[W]!==h[W]){T=p[W],z=h[W];break}return T<z?-1:z<T?1:0},f.isEncoding=function(p){switch(String(p).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(p,h){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return f.alloc(0);let T;if(h===void 0)for(h=0,T=0;T<p.length;++T)h+=p[T].length;const z=f.allocUnsafe(h);let W=0;for(T=0;T<p.length;++T){let ee=p[T];if(ct(ee,Uint8Array))W+ee.length>z.length?(f.isBuffer(ee)||(ee=f.from(ee)),ee.copy(z,W)):Uint8Array.prototype.set.call(z,ee,W);else if(f.isBuffer(ee))ee.copy(z,W);else throw new TypeError('"list" argument must be an Array of Buffers');W+=ee.length}return z};function B(_,p){if(f.isBuffer(_))return _.length;if(ArrayBuffer.isView(_)||ct(_,ArrayBuffer))return _.byteLength;if(typeof _!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _);const h=_.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&h===0)return 0;let z=!1;for(;;)switch(p){case"ascii":case"latin1":case"binary":return h;case"utf8":case"utf-8":return le(_).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h*2;case"hex":return h>>>1;case"base64":return rt(_).length;default:if(z)return T?-1:le(_).length;p=(""+p).toLowerCase(),z=!0}}f.byteLength=B;function Y(_,p,h){let T=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((h===void 0||h>this.length)&&(h=this.length),h<=0)||(h>>>=0,p>>>=0,h<=p))return"";for(_||(_="utf8");;)switch(_){case"hex":return se(this,p,h);case"utf8":case"utf-8":return ae(this,p,h);case"ascii":return V(this,p,h);case"latin1":case"binary":return j(this,p,h);case"base64":return he(this,p,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,p,h);default:if(T)throw new TypeError("Unknown encoding: "+_);_=(_+"").toLowerCase(),T=!0}}f.prototype._isBuffer=!0;function D(_,p,h){const T=_[p];_[p]=_[h],_[h]=T}f.prototype.swap16=function(){const p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let h=0;h<p;h+=2)D(this,h,h+1);return this},f.prototype.swap32=function(){const p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let h=0;h<p;h+=4)D(this,h,h+3),D(this,h+1,h+2);return this},f.prototype.swap64=function(){const p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let h=0;h<p;h+=8)D(this,h,h+7),D(this,h+1,h+6),D(this,h+2,h+5),D(this,h+3,h+4);return this},f.prototype.toString=function(){const p=this.length;return p===0?"":arguments.length===0?ae(this,0,p):Y.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(p){if(!f.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:f.compare(this,p)===0},f.prototype.inspect=function(){let p="";const h=e.INSPECT_MAX_BYTES;return p=this.toString("hex",0,h).replace(/(.{2})/g,"$1 ").trim(),this.length>h&&(p+=" ... "),"<Buffer "+p+">"},a&&(f.prototype[a]=f.prototype.inspect),f.prototype.compare=function(p,h,T,z,W){if(ct(p,Uint8Array)&&(p=f.from(p,p.offset,p.byteLength)),!f.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(h===void 0&&(h=0),T===void 0&&(T=p?p.length:0),z===void 0&&(z=0),W===void 0&&(W=this.length),h<0||T>p.length||z<0||W>this.length)throw new RangeError("out of range index");if(z>=W&&h>=T)return 0;if(z>=W)return-1;if(h>=T)return 1;if(h>>>=0,T>>>=0,z>>>=0,W>>>=0,this===p)return 0;let ee=W-z,Ne=T-h;const Je=Math.min(ee,Ne),Ke=this.slice(z,W),et=p.slice(h,T);for(let He=0;He<Je;++He)if(Ke[He]!==et[He]){ee=Ke[He],Ne=et[He];break}return ee<Ne?-1:Ne<ee?1:0};function Q(_,p,h,T,z){if(_.length===0)return-1;if(typeof h=="string"?(T=h,h=0):h>2147483647?h=2147483647:h<-2147483648&&(h=-2147483648),h=+h,Lt(h)&&(h=z?0:_.length-1),h<0&&(h=_.length+h),h>=_.length){if(z)return-1;h=_.length-1}else if(h<0)if(z)h=0;else return-1;if(typeof p=="string"&&(p=f.from(p,T)),f.isBuffer(p))return p.length===0?-1:H(_,p,h,T,z);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?z?Uint8Array.prototype.indexOf.call(_,p,h):Uint8Array.prototype.lastIndexOf.call(_,p,h):H(_,[p],h,T,z);throw new TypeError("val must be string, number or Buffer")}function H(_,p,h,T,z){let W=1,ee=_.length,Ne=p.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(_.length<2||p.length<2)return-1;W=2,ee/=2,Ne/=2,h/=2}function Je(et,He){return W===1?et[He]:et.readUInt16BE(He*W)}let Ke;if(z){let et=-1;for(Ke=h;Ke<ee;Ke++)if(Je(_,Ke)===Je(p,et===-1?0:Ke-et)){if(et===-1&&(et=Ke),Ke-et+1===Ne)return et*W}else et!==-1&&(Ke-=Ke-et),et=-1}else for(h+Ne>ee&&(h=ee-Ne),Ke=h;Ke>=0;Ke--){let et=!0;for(let He=0;He<Ne;He++)if(Je(_,Ke+He)!==Je(p,He)){et=!1;break}if(et)return Ke}return-1}f.prototype.includes=function(p,h,T){return this.indexOf(p,h,T)!==-1},f.prototype.indexOf=function(p,h,T){return Q(this,p,h,T,!0)},f.prototype.lastIndexOf=function(p,h,T){return Q(this,p,h,T,!1)};function ne(_,p,h,T){h=Number(h)||0;const z=_.length-h;T?(T=Number(T),T>z&&(T=z)):T=z;const W=p.length;T>W/2&&(T=W/2);let ee;for(ee=0;ee<T;++ee){const Ne=parseInt(p.substr(ee*2,2),16);if(Lt(Ne))return ee;_[h+ee]=Ne}return ee}function q(_,p,h,T){return Qe(le(p,_.length-h),_,h,T)}function G(_,p,h,T){return Qe(je(p),_,h,T)}function U(_,p,h,T){return Qe(rt(p),_,h,T)}function te(_,p,h,T){return Qe(bt(p,_.length-h),_,h,T)}f.prototype.write=function(p,h,T,z){if(h===void 0)z="utf8",T=this.length,h=0;else if(T===void 0&&typeof h=="string")z=h,T=this.length,h=0;else if(isFinite(h))h=h>>>0,isFinite(T)?(T=T>>>0,z===void 0&&(z="utf8")):(z=T,T=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const W=this.length-h;if((T===void 0||T>W)&&(T=W),p.length>0&&(T<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");z||(z="utf8");let ee=!1;for(;;)switch(z){case"hex":return ne(this,p,h,T);case"utf8":case"utf-8":return q(this,p,h,T);case"ascii":case"latin1":case"binary":return G(this,p,h,T);case"base64":return U(this,p,h,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,p,h,T);default:if(ee)throw new TypeError("Unknown encoding: "+z);z=(""+z).toLowerCase(),ee=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function he(_,p,h){return p===0&&h===_.length?r.fromByteArray(_):r.fromByteArray(_.slice(p,h))}function ae(_,p,h){h=Math.min(_.length,h);const T=[];let z=p;for(;z<h;){const W=_[z];let ee=null,Ne=W>239?4:W>223?3:W>191?2:1;if(z+Ne<=h){let Je,Ke,et,He;switch(Ne){case 1:W<128&&(ee=W);break;case 2:Je=_[z+1],(Je&192)===128&&(He=(W&31)<<6|Je&63,He>127&&(ee=He));break;case 3:Je=_[z+1],Ke=_[z+2],(Je&192)===128&&(Ke&192)===128&&(He=(W&15)<<12|(Je&63)<<6|Ke&63,He>2047&&(He<55296||He>57343)&&(ee=He));break;case 4:Je=_[z+1],Ke=_[z+2],et=_[z+3],(Je&192)===128&&(Ke&192)===128&&(et&192)===128&&(He=(W&15)<<18|(Je&63)<<12|(Ke&63)<<6|et&63,He>65535&&He<1114112&&(ee=He))}}ee===null?(ee=65533,Ne=1):ee>65535&&(ee-=65536,T.push(ee>>>10&1023|55296),ee=56320|ee&1023),T.push(ee),z+=Ne}return L(T)}const R=4096;function L(_){const p=_.length;if(p<=R)return String.fromCharCode.apply(String,_);let h="",T=0;for(;T<p;)h+=String.fromCharCode.apply(String,_.slice(T,T+=R));return h}function V(_,p,h){let T="";h=Math.min(_.length,h);for(let z=p;z<h;++z)T+=String.fromCharCode(_[z]&127);return T}function j(_,p,h){let T="";h=Math.min(_.length,h);for(let z=p;z<h;++z)T+=String.fromCharCode(_[z]);return T}function se(_,p,h){const T=_.length;(!p||p<0)&&(p=0),(!h||h<0||h>T)&&(h=T);let z="";for(let W=p;W<h;++W)z+=qt[_[W]];return z}function me(_,p,h){const T=_.slice(p,h);let z="";for(let W=0;W<T.length-1;W+=2)z+=String.fromCharCode(T[W]+T[W+1]*256);return z}f.prototype.slice=function(p,h){const T=this.length;p=~~p,h=h===void 0?T:~~h,p<0?(p+=T,p<0&&(p=0)):p>T&&(p=T),h<0?(h+=T,h<0&&(h=0)):h>T&&(h=T),h<p&&(h=p);const z=this.subarray(p,h);return Object.setPrototypeOf(z,f.prototype),z};function pe(_,p,h){if(_%1!==0||_<0)throw new RangeError("offset is not uint");if(_+p>h)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(p,h,T){p=p>>>0,h=h>>>0,T||pe(p,h,this.length);let z=this[p],W=1,ee=0;for(;++ee<h&&(W*=256);)z+=this[p+ee]*W;return z},f.prototype.readUintBE=f.prototype.readUIntBE=function(p,h,T){p=p>>>0,h=h>>>0,T||pe(p,h,this.length);let z=this[p+--h],W=1;for(;h>0&&(W*=256);)z+=this[p+--h]*W;return z},f.prototype.readUint8=f.prototype.readUInt8=function(p,h){return p=p>>>0,h||pe(p,1,this.length),this[p]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(p,h){return p=p>>>0,h||pe(p,2,this.length),this[p]|this[p+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(p,h){return p=p>>>0,h||pe(p,2,this.length),this[p]<<8|this[p+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(p,h){return p=p>>>0,h||pe(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(p,h){return p=p>>>0,h||pe(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},f.prototype.readBigUInt64LE=ie(function(p){p=p>>>0,tt(p,"offset");const h=this[p],T=this[p+7];(h===void 0||T===void 0)&&nt(p,this.length-8);const z=h+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24,W=this[++p]+this[++p]*2**8+this[++p]*2**16+T*2**24;return BigInt(z)+(BigInt(W)<<BigInt(32))}),f.prototype.readBigUInt64BE=ie(function(p){p=p>>>0,tt(p,"offset");const h=this[p],T=this[p+7];(h===void 0||T===void 0)&&nt(p,this.length-8);const z=h*2**24+this[++p]*2**16+this[++p]*2**8+this[++p],W=this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+T;return(BigInt(z)<<BigInt(32))+BigInt(W)}),f.prototype.readIntLE=function(p,h,T){p=p>>>0,h=h>>>0,T||pe(p,h,this.length);let z=this[p],W=1,ee=0;for(;++ee<h&&(W*=256);)z+=this[p+ee]*W;return W*=128,z>=W&&(z-=Math.pow(2,8*h)),z},f.prototype.readIntBE=function(p,h,T){p=p>>>0,h=h>>>0,T||pe(p,h,this.length);let z=h,W=1,ee=this[p+--z];for(;z>0&&(W*=256);)ee+=this[p+--z]*W;return W*=128,ee>=W&&(ee-=Math.pow(2,8*h)),ee},f.prototype.readInt8=function(p,h){return p=p>>>0,h||pe(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},f.prototype.readInt16LE=function(p,h){p=p>>>0,h||pe(p,2,this.length);const T=this[p]|this[p+1]<<8;return T&32768?T|4294901760:T},f.prototype.readInt16BE=function(p,h){p=p>>>0,h||pe(p,2,this.length);const T=this[p+1]|this[p]<<8;return T&32768?T|4294901760:T},f.prototype.readInt32LE=function(p,h){return p=p>>>0,h||pe(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},f.prototype.readInt32BE=function(p,h){return p=p>>>0,h||pe(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},f.prototype.readBigInt64LE=ie(function(p){p=p>>>0,tt(p,"offset");const h=this[p],T=this[p+7];(h===void 0||T===void 0)&&nt(p,this.length-8);const z=this[p+4]+this[p+5]*2**8+this[p+6]*2**16+(T<<24);return(BigInt(z)<<BigInt(32))+BigInt(h+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24)}),f.prototype.readBigInt64BE=ie(function(p){p=p>>>0,tt(p,"offset");const h=this[p],T=this[p+7];(h===void 0||T===void 0)&&nt(p,this.length-8);const z=(h<<24)+this[++p]*2**16+this[++p]*2**8+this[++p];return(BigInt(z)<<BigInt(32))+BigInt(this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+T)}),f.prototype.readFloatLE=function(p,h){return p=p>>>0,h||pe(p,4,this.length),o.read(this,p,!0,23,4)},f.prototype.readFloatBE=function(p,h){return p=p>>>0,h||pe(p,4,this.length),o.read(this,p,!1,23,4)},f.prototype.readDoubleLE=function(p,h){return p=p>>>0,h||pe(p,8,this.length),o.read(this,p,!0,52,8)},f.prototype.readDoubleBE=function(p,h){return p=p>>>0,h||pe(p,8,this.length),o.read(this,p,!1,52,8)};function Ee(_,p,h,T,z,W){if(!f.isBuffer(_))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>z||p<W)throw new RangeError('"value" argument is out of bounds');if(h+T>_.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(p,h,T,z){if(p=+p,h=h>>>0,T=T>>>0,!z){const Ne=Math.pow(2,8*T)-1;Ee(this,p,h,T,Ne,0)}let W=1,ee=0;for(this[h]=p&255;++ee<T&&(W*=256);)this[h+ee]=p/W&255;return h+T},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(p,h,T,z){if(p=+p,h=h>>>0,T=T>>>0,!z){const Ne=Math.pow(2,8*T)-1;Ee(this,p,h,T,Ne,0)}let W=T-1,ee=1;for(this[h+W]=p&255;--W>=0&&(ee*=256);)this[h+W]=p/ee&255;return h+T},f.prototype.writeUint8=f.prototype.writeUInt8=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,1,255,0),this[h]=p&255,h+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,2,65535,0),this[h]=p&255,this[h+1]=p>>>8,h+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,2,65535,0),this[h]=p>>>8,this[h+1]=p&255,h+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,4,4294967295,0),this[h+3]=p>>>24,this[h+2]=p>>>16,this[h+1]=p>>>8,this[h]=p&255,h+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,4,4294967295,0),this[h]=p>>>24,this[h+1]=p>>>16,this[h+2]=p>>>8,this[h+3]=p&255,h+4};function Te(_,p,h,T,z){lt(p,T,z,_,h,7);let W=Number(p&BigInt(4294967295));_[h++]=W,W=W>>8,_[h++]=W,W=W>>8,_[h++]=W,W=W>>8,_[h++]=W;let ee=Number(p>>BigInt(32)&BigInt(4294967295));return _[h++]=ee,ee=ee>>8,_[h++]=ee,ee=ee>>8,_[h++]=ee,ee=ee>>8,_[h++]=ee,h}function Se(_,p,h,T,z){lt(p,T,z,_,h,7);let W=Number(p&BigInt(4294967295));_[h+7]=W,W=W>>8,_[h+6]=W,W=W>>8,_[h+5]=W,W=W>>8,_[h+4]=W;let ee=Number(p>>BigInt(32)&BigInt(4294967295));return _[h+3]=ee,ee=ee>>8,_[h+2]=ee,ee=ee>>8,_[h+1]=ee,ee=ee>>8,_[h]=ee,h+8}f.prototype.writeBigUInt64LE=ie(function(p,h=0){return Te(this,p,h,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=ie(function(p,h=0){return Se(this,p,h,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(p,h,T,z){if(p=+p,h=h>>>0,!z){const Je=Math.pow(2,8*T-1);Ee(this,p,h,T,Je-1,-Je)}let W=0,ee=1,Ne=0;for(this[h]=p&255;++W<T&&(ee*=256);)p<0&&Ne===0&&this[h+W-1]!==0&&(Ne=1),this[h+W]=(p/ee>>0)-Ne&255;return h+T},f.prototype.writeIntBE=function(p,h,T,z){if(p=+p,h=h>>>0,!z){const Je=Math.pow(2,8*T-1);Ee(this,p,h,T,Je-1,-Je)}let W=T-1,ee=1,Ne=0;for(this[h+W]=p&255;--W>=0&&(ee*=256);)p<0&&Ne===0&&this[h+W+1]!==0&&(Ne=1),this[h+W]=(p/ee>>0)-Ne&255;return h+T},f.prototype.writeInt8=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,1,127,-128),p<0&&(p=255+p+1),this[h]=p&255,h+1},f.prototype.writeInt16LE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,2,32767,-32768),this[h]=p&255,this[h+1]=p>>>8,h+2},f.prototype.writeInt16BE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,2,32767,-32768),this[h]=p>>>8,this[h+1]=p&255,h+2},f.prototype.writeInt32LE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,4,2147483647,-2147483648),this[h]=p&255,this[h+1]=p>>>8,this[h+2]=p>>>16,this[h+3]=p>>>24,h+4},f.prototype.writeInt32BE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[h]=p>>>24,this[h+1]=p>>>16,this[h+2]=p>>>8,this[h+3]=p&255,h+4},f.prototype.writeBigInt64LE=ie(function(p,h=0){return Te(this,p,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=ie(function(p,h=0){return Se(this,p,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ue(_,p,h,T,z,W){if(h+T>_.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("Index out of range")}function fe(_,p,h,T,z){return p=+p,h=h>>>0,z||ue(_,p,h,4),o.write(_,p,h,T,23,4),h+4}f.prototype.writeFloatLE=function(p,h,T){return fe(this,p,h,!0,T)},f.prototype.writeFloatBE=function(p,h,T){return fe(this,p,h,!1,T)};function ye(_,p,h,T,z){return p=+p,h=h>>>0,z||ue(_,p,h,8),o.write(_,p,h,T,52,8),h+8}f.prototype.writeDoubleLE=function(p,h,T){return ye(this,p,h,!0,T)},f.prototype.writeDoubleBE=function(p,h,T){return ye(this,p,h,!1,T)},f.prototype.copy=function(p,h,T,z){if(!f.isBuffer(p))throw new TypeError("argument should be a Buffer");if(T||(T=0),!z&&z!==0&&(z=this.length),h>=p.length&&(h=p.length),h||(h=0),z>0&&z<T&&(z=T),z===T||p.length===0||this.length===0)return 0;if(h<0)throw new RangeError("targetStart out of bounds");if(T<0||T>=this.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("sourceEnd out of bounds");z>this.length&&(z=this.length),p.length-h<z-T&&(z=p.length-h+T);const W=z-T;return this===p&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(h,T,z):Uint8Array.prototype.set.call(p,this.subarray(T,z),h),W},f.prototype.fill=function(p,h,T,z){if(typeof p=="string"){if(typeof h=="string"?(z=h,h=0,T=this.length):typeof T=="string"&&(z=T,T=this.length),z!==void 0&&typeof z!="string")throw new TypeError("encoding must be a string");if(typeof z=="string"&&!f.isEncoding(z))throw new TypeError("Unknown encoding: "+z);if(p.length===1){const ee=p.charCodeAt(0);(z==="utf8"&&ee<128||z==="latin1")&&(p=ee)}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(h<0||this.length<h||this.length<T)throw new RangeError("Out of range index");if(T<=h)return this;h=h>>>0,T=T===void 0?this.length:T>>>0,p||(p=0);let W;if(typeof p=="number")for(W=h;W<T;++W)this[W]=p;else{const ee=f.isBuffer(p)?p:f.from(p,z),Ne=ee.length;if(Ne===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for(W=0;W<T-h;++W)this[W+h]=ee[W%Ne]}return this};const be={};function ke(_,p,h){be[_]=class extends h{constructor(){super(),Object.defineProperty(this,"message",{value:p.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${_}]`,this.stack,delete this.name}get code(){return _}set code(z){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:z,writable:!0})}toString(){return`${this.name} [${_}]: ${this.message}`}}}ke("ERR_BUFFER_OUT_OF_BOUNDS",function(_){return _?`${_} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ke("ERR_INVALID_ARG_TYPE",function(_,p){return`The "${_}" argument must be of type number. Received type ${typeof p}`},TypeError),ke("ERR_OUT_OF_RANGE",function(_,p,h){let T=`The value of "${_}" is out of range.`,z=h;return Number.isInteger(h)&&Math.abs(h)>2**32?z=Ve(String(h)):typeof h=="bigint"&&(z=String(h),(h>BigInt(2)**BigInt(32)||h<-(BigInt(2)**BigInt(32)))&&(z=Ve(z)),z+="n"),T+=` It must be ${p}. Received ${z}`,T},RangeError);function Ve(_){let p="",h=_.length;const T=_[0]==="-"?1:0;for(;h>=T+4;h-=3)p=`_${_.slice(h-3,h)}${p}`;return`${_.slice(0,h)}${p}`}function Pe(_,p,h){tt(p,"offset"),(_[p]===void 0||_[p+h]===void 0)&&nt(p,_.length-(h+1))}function lt(_,p,h,T,z,W){if(_>h||_<p){const ee=typeof p=="bigint"?"n":"";let Ne;throw p===0||p===BigInt(0)?Ne=`>= 0${ee} and < 2${ee} ** ${(W+1)*8}${ee}`:Ne=`>= -(2${ee} ** ${(W+1)*8-1}${ee}) and < 2 ** ${(W+1)*8-1}${ee}`,new be.ERR_OUT_OF_RANGE("value",Ne,_)}Pe(T,z,W)}function tt(_,p){if(typeof _!="number")throw new be.ERR_INVALID_ARG_TYPE(p,"number",_)}function nt(_,p,h){throw Math.floor(_)!==_?(tt(_,h),new be.ERR_OUT_OF_RANGE("offset","an integer",_)):p<0?new be.ERR_BUFFER_OUT_OF_BOUNDS:new be.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${p}`,_)}const it=/[^+/0-9A-Za-z-_]/g;function F(_){if(_=_.split("=")[0],_=_.trim().replace(it,""),_.length<2)return"";for(;_.length%4!==0;)_=_+"=";return _}function le(_,p){p=p||1/0;let h;const T=_.length;let z=null;const W=[];for(let ee=0;ee<T;++ee){if(h=_.charCodeAt(ee),h>55295&&h<57344){if(!z){if(h>56319){(p-=3)>-1&&W.push(239,191,189);continue}else if(ee+1===T){(p-=3)>-1&&W.push(239,191,189);continue}z=h;continue}if(h<56320){(p-=3)>-1&&W.push(239,191,189),z=h;continue}h=(z-55296<<10|h-56320)+65536}else z&&(p-=3)>-1&&W.push(239,191,189);if(z=null,h<128){if((p-=1)<0)break;W.push(h)}else if(h<2048){if((p-=2)<0)break;W.push(h>>6|192,h&63|128)}else if(h<65536){if((p-=3)<0)break;W.push(h>>12|224,h>>6&63|128,h&63|128)}else if(h<1114112){if((p-=4)<0)break;W.push(h>>18|240,h>>12&63|128,h>>6&63|128,h&63|128)}else throw new Error("Invalid code point")}return W}function je(_){const p=[];for(let h=0;h<_.length;++h)p.push(_.charCodeAt(h)&255);return p}function bt(_,p){let h,T,z;const W=[];for(let ee=0;ee<_.length&&!((p-=2)<0);++ee)h=_.charCodeAt(ee),T=h>>8,z=h%256,W.push(z),W.push(T);return W}function rt(_){return r.toByteArray(F(_))}function Qe(_,p,h,T){let z;for(z=0;z<T&&!(z+h>=p.length||z>=_.length);++z)p[z+h]=_[z];return z}function ct(_,p){return _ instanceof p||_!=null&&_.constructor!=null&&_.constructor.name!=null&&_.constructor.name===p.name}function Lt(_){return _!==_}const qt=function(){const _="0123456789abcdef",p=new Array(256);for(let h=0;h<16;++h){const T=h*16;for(let z=0;z<16;++z)p[T+z]=_[h]+_[z]}return p}();function ie(_){return typeof BigInt>"u"?Me:_}function Me(){throw new Error("BigInt not supported")}})(ah);const Mk=e=>{const r=atob(e),o=r.length,a=new Uint8Array(o);for(let l=0;l<o;l++)a[l]=r.charCodeAt(l);return a},Tk=({type:e,data:r})=>`data:${e};base64,${r}`,Ak=e=>Mk(e),lh=(e,r)=>{const o=Ak(e),a=ah.Buffer.from(o.buffer);return new Blob([a.buffer],{type:r})},ch="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16.828'%20height='16.828'%20viewBox='0%200%2016.828%2016.828'%3e%3cg%20id='组_10025'%20data-name='组%2010025'%20transform='translate(0.914%201.414)'%3e%3cline%20id='直线_1370'%20data-name='直线%201370'%20x2='14'%20y2='14'%20transform='translate(0.5)'%20fill='none'%20stroke='%23c1c1c1'%20stroke-linecap='round'%20stroke-width='2'/%3e%3cline%20id='直线_1371'%20data-name='直线%201371'%20x1='14'%20y2='14'%20transform='translate(0.5)'%20fill='none'%20stroke='%23c1c1c1'%20stroke-linecap='round'%20stroke-width='2'/%3e%3c/g%3e%3c/svg%3e",Nk="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cg%20id='组_11460'%20data-name='组%2011460'%20transform='translate(-1070%20-577)'%3e%3cpath%20id='路径_9629'%20data-name='路径%209629'%20d='M8,14.625A6.625,6.625,0,1,0,1.375,8,6.625,6.625,0,0,0,8,14.625ZM8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16Z'%20transform='translate(1070%20577)'%20fill='%23999'/%3e%3cpath%20id='路径_9630'%20data-name='路径%209630'%20d='M449.688,212.688a.687.687,0,1,0-1.375,0v5.3a.687.687,0,1,0,1.375,0ZM449,219.375a1,1,0,1,0,1,1A1,1,0,0,0,449,219.375Z'%20transform='translate(629%20368.313)'%20fill='%23999'/%3e%3c/g%3e%3c/svg%3e",Ma=e=>(t.pushScopeId("data-v-50a3cf13"),e=e(),t.popScopeId(),e),vk={class:"signature_box"},Bk=Ma(()=>t.createElementVNode("div",{class:"signature_tilte"},"Signature",-1)),Dk=Ma(()=>t.createElementVNode("div",{class:"subtitle"},"Click on the signature box below to finger sign",-1)),Lk=Ma(()=>t.createElementVNode("div",{class:"label"},"X",-1)),Ok=Ma(()=>t.createElementVNode("div",{class:"signature_tips"},[t.createElementVNode("img",{class:"signature_icon",src:Nk}),t.createElementVNode("div",{class:"tips"},"The signature is saved for later use.")],-1)),Rk={class:"signature_operate"},Vk=gi(t.defineComponent({__name:"SignaturePad",setup(e){t.useCssVars(q=>({"68ae9541":ne.width,d955cde8:ne.height,"4c4bcb90":ne.top,"3d29dd2c":ne.left}));const r=t.ref(hi()),a=Br().getDocumentTemplate(),l=t.ref(null),c=t.ref(null),u=t.ref(null),m=Is().getSignaturePad(),y=m.confirm,g=t.reactive({status:!1,ctx:null,originSignature:"",saveSignature:"",points:new Array,beginPoint:null}),w=t.reactive({x:0,y:0}),b=q=>{let[G,U]=[q.offsetLeft,q.offsetTop];const te=he=>{U+=he.offsetTop,G+=he.offsetLeft,he.offsetParent&&te(he.offsetParent)};return q.offsetParent&&te(q.offsetParent),{left:G,top:U}},M=q=>{let{left:G,top:U}=q.getBoundingClientRect();return{left:G,top:U}},E=q=>{const G=document.createElement("canvas");G.width=q.width,G.height=q.height;const U=G.getContext("2d");return U==null||U.putImageData(q,0,0),G.toDataURL().split(",")[1]},S=q=>{if(c.value)if(q.preventDefault(),q.stopPropagation(),g.status=!0,r.value){const{left:G,top:U}=M(c.value);q=q,w.x=q.targetTouches[0].clientX-G,w.y=q.targetTouches[0].clientY-U,g.points.push({x:w.x,y:w.y})}else{const{left:G,top:U}=b(c.value);q=q,w.x=q.clientX-G,w.y=q.clientY-U,g.points.push({x:w.x,y:w.y})}},N=(q,G,U)=>{const te=g.ctx;te.beginPath(),te.moveTo(q.x,q.y),te.quadraticCurveTo(G.x,G.y,U.x,U.y),te.stroke(),te.closePath()},k=q=>{if(c.value&&(q.preventDefault(),q.stopPropagation(),g.status&&g.ctx)){if(r.value){const{left:G,top:U}=M(c.value);q=q;const te=q.targetTouches[0].clientX-G,he=q.targetTouches[0].clientY-U;g.points.push({x:te,y:he})}else{const{left:G,top:U}=b(c.value);q=q;const te=q.clientX-G,he=q.clientY-U;g.points.push({x:te,y:he})}if(g.points.length>3){const G=g.points.slice(-2),U=G[0],te={x:(G[0].x+G[1].x)/2,y:(G[0].y+G[1].y)/2};g.beginPoint&&N(g.beginPoint,U,te),g.beginPoint=te}}},A=q=>{if(c.value){q.preventDefault(),q.stopPropagation();const G=c.value;if(G.style.cursor="auto",g.status){if(r.value){const{left:he,top:ae}=M(c.value);q=q;const R=q.changedTouches[0].clientX-he,L=q.changedTouches[0].clientY-ae;g.points.push({x:R,y:L})}else{const{left:he,top:ae}=b(c.value);q=q;const R=q.clientX-he,L=q.clientY-ae;g.points.push({x:R,y:L})}if(g.points.length>3){const he=g.points.slice(-2),ae=he[0],R=he[1];g.beginPoint&&N(g.beginPoint,ae,R)}g.beginPoint=null,g.points=[];const U=g.ctx;U==null||U.closePath();const te=U==null?void 0:U.getImageData(0,0,G.width,G.height);g.saveSignature=E(te)}}g.status=!1},B=()=>{m.close()},Y=()=>{g.ctx&&(r.value?g.ctx.clearRect(0,0,g.ctx.canvas.height,g.ctx.canvas.width):g.ctx.clearRect(0,0,g.ctx.canvas.width,g.ctx.canvas.height),g.saveSignature="")},D=q=>{q.target===u.value&&m.close()},Q=async()=>{if(g.saveSignature!==g.originSignature){const q=ha.service({target:a.relatedDom||document.body});await y(m.options.dataKey,g.saveSignature,m.options.isGuardian?465921:345601,m.options.type),q.close(),m.close()}},H=()=>{B()},ne=t.reactive({top:"",left:"",width:"",height:""});return t.onMounted(async()=>{var G;r.value?(ne.top="calc((100vh - 100vw) / 2)",ne.left="calc((100vw - 100vh) / 2)",ne.width="100vh",ne.height="100vw"):a.relatedDom?(ne.top=`${a.relatedDom.offsetTop}px`,ne.left=`${a.relatedDom.offsetLeft}px`,ne.width=`${a.relatedDom.clientWidth}px`,ne.height=`${a.relatedDom.clientHeight}px`):(ne.top="0",ne.left="0",ne.width="100vw",ne.height="100vh");const q=ha.service({target:a.relatedDom||document.body});if(c.value&&l.value){const U=c.value,te=U.getContext("2d",{willReadFrequently:!0});g.ctx=te,r.value?t.nextTick(()=>{var ae,R;U.width=((ae=l.value)==null?void 0:ae.clientWidth)||0,U.height=((R=l.value)==null?void 0:R.clientHeight)||0,te.translate(U.width/2,U.height/2),te.rotate(-Math.PI/2),te.translate(-U.height/2,-U.width/2),te.lineWidth=5}):(U.width=l.value.clientWidth,U.height=l.value.clientHeight,te.lineWidth=3),te.lineJoin="round",te.lineCap="round";const he=m.options;if(he.dataKey)if(Rn.get(he.formData,he.dataKey)){const R=((G=m.options)==null?void 0:G.value)||"";if(R){const L=new Image;L.src=R,L.onload=()=>{te.drawImage(L,0,0,L.width,L.height);const V=te==null?void 0:te.getImageData(0,0,U.width,U.height);g.originSignature=E(V),g.saveSignature=g.originSignature}}else g.originSignature="",g.saveSignature=""}else g.originSignature="",g.saveSignature=""}q.close()}),(q,G)=>{const U=br;return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{ref_key:"signatureView",ref:u,class:t.normalizeClass(r.value?"signature_view signature_view_mobile":"signature_view signature_view_ps"),onClick:D},[t.createElementVNode("div",vk,[t.createElementVNode("img",{class:"signature_close",src:ch,onClick:B}),Bk,t.createElementVNode("div",{class:"signature_subtitle"},[Dk,t.createElementVNode("div",{class:"signature_clear",onClick:Y},"Clear")]),t.createElementVNode("div",{class:"signature_pad",ref_key:"signatureBox",ref:l},[t.createElementVNode("canvas",{class:"pad",ref_key:"signaturePad",ref:c,onMousedown:G[0]||(G[0]=te=>!r.value&&S(te)),onMouseup:G[1]||(G[1]=te=>!r.value&&A(te)),onMousemoveCapture:G[2]||(G[2]=te=>!r.value&&k(te)),onMouseleave:G[3]||(G[3]=te=>!r.value&&A(te)),onTouchstart:G[4]||(G[4]=te=>S(te)),onTouchend:G[5]||(G[5]=te=>A(te)),onTouchmoveCapture:G[6]||(G[6]=te=>k(te)),onTouchcancel:G[7]||(G[7]=te=>A(te))},null,544),Lk],512),Ok,t.createElementVNode("div",Rk,[t.createVNode(U,{class:"signature_chioce_button signature_cancel",onClick:H},{default:t.withCtx(()=>[t.createTextVNode("Cancel")]),_:1}),t.createVNode(U,{class:"signature_chioce_button signature_confirm",onClick:Q},{default:t.withCtx(()=>[t.createTextVNode("Confirm")]),_:1})])])],2)])}}}),[["__scopeId","data-v-50a3cf13"]]),zk="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='20.002'%20viewBox='0%200%2020%2020.002'%3e%3cg%20id='组_22313'%20data-name='组%2022313'%20transform='translate(-106.404%20-80.254)'%3e%3cpath%20id='路径_23519'%20data-name='路径%2023519'%20d='M209.607,82.221a1.53,1.53,0,0,1,2.154.006l1.077,1.077a1.533,1.533,0,0,1,.006,2.154L201.509,96.794h1.079l-4.316-4.316v1.079l11.335-11.335Zm-1.079-1.079L197.193,92.477a.763.763,0,0,0,0,1.079l4.316,4.316a.763.763,0,0,0,1.079,0l11.335-11.335a3.059,3.059,0,0,0-.006-4.312l-1.077-1.077a3.056,3.056,0,0,0-4.312-.006Zm-1.623,2.7,4.316,4.316,1.079-1.079-4.316-4.316L206.9,83.845Z'%20transform='translate(-88.406)'%20fill='%23333'/%3e%3cpath%20id='路径_23520'%20data-name='路径%2023520'%20d='M108.6,583.993l-2.158,6.475a.763.763,0,0,0,.965.965l6.474-2.158a.763.763,0,0,0,.3-1.263l-4.316-4.316a.763.763,0,0,0-1.263.3Zm1.448.483-1.263.3,4.316,4.316.3-1.263-6.474,2.158.965.965,2.158-6.474Z'%20transform='translate(0%20-491.217)'%20fill='%23333'/%3e%3c/g%3e%3c/svg%3e",Pk={clearIcon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMC4yMDEiIHZpZXdCb3g9IjAgMCAyMCAyMC4yMDEiPjxnIGRhdGEtbmFtZT0i57uEIDIyMzYzIj48ZyBkYXRhLW5hbWU9Iue7hCAyMjM2MiIgZmlsbD0iIzMzMyIgc3Ryb2tlPSIjMzMzIiBzdHJva2Utd2lkdGg9Ii40Ij48cGF0aCBkYXRhLW5hbWU9Iui3r+W+hCAyMzUzNyIgZD0iTTE4LjM4NCAxMC45MDRoLS4zNTd2NS40NDFhMTIuOTUyIDEyLjk1MiAwIDAgMCAuMzU3IDIuOTQzLjcxNi43MTYgMCAwIDEtLjcxNC43MTRIMi4zM2EuNzE2LjcxNiAwIDAgMS0uNzEzLS43MTQgMTIuMTI4IDEyLjEyOCAwIDAgMCAuMzU3LTIuODcydi01LjUxMmgtLjM1N2EuNzE2LjcxNiAwIDAgMS0uNzE0LS43MTRWNi42MjNhLjcxNi43MTYgMCAwIDEgLjcxNC0uNzE0aDYuMDY1VjEuOTg1QTEuNzg5IDEuNzg5IDAgMCAxIDkuNDY2LjIwMWgxLjA3YTEuNzg5IDEuNzg5IDAgMCAxIDEuNzg0IDEuNzg0djMuOTI0aDYuMDY1YS43MTYuNzE2IDAgMCAxIC43MTQuNzE0djMuNTY4YS43MTYuNzE2IDAgMCAxLS43MTQuNzE0em0tMTIuMzEgOC4zODR2LTQuNzI3YS4yNzQuMjc0IDAgMCAxIC4yNjgtLjI2N2guMTc4YS4yNzQuMjc0IDAgMCAxIC4yNjguMjY3djQuNzI3SDkuODJ2LTQuNzI3YS4yNzQuMjc0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wIDAgMSAuMjc2LjU1Ni44Ni44NiAwIDAgMS0uMjc2LjU1NkwxMi44MyA4LjQ2NGMtLjA2OS4xMzktLjIwNy4xMzktLjM0NS4xMzlhLjg0OS44NDkgMCAwIDEtLjU1Mi0uMjc4LjY4Ni42ODYgMCAwIDEgLjIwNy0uOTcybDIuMjc2LTEuNTI4SDYuOWE1LjU1NiA1LjU1NiAwIDAgMCAwIDExLjExMmgxMi40MWEuNjk1LjY5NSAwIDAgMSAwIDEuMzg5SDYuOWE2Ljk0NSA2Ljk0NSAwIDAgMSAwLTEzLjg5eiIgZmlsbD0iI2MxYzFjMSIvPjxwYXRoIGRhdGEtbmFtZT0i55+p5b2iIDIzMTQ5IiBmaWxsPSJub25lIiBkPSJNMCAwaDIwdjIwSDB6Ii8+PC9zdmc+"},Kt=e=>Pk[e],$k=e=>(t.pushScopeId("data-v-516516a5"),e=e(),t.popScopeId(),e),Fk={class:"image-editor-box"},jk={key:0,class:"image-editor-controler"},Uk={key:0,class:"image-editor-no_edit"},Wk={key:1,class:"image-editor-editing"},Hk={class:"left"},Yk=["src"],Gk=["src"],Kk=["src"],qk=[$k(()=>t.createElementVNode("div",null,"Confirm",-1))],Qk=gi(t.defineComponent({__name:"ImageEditor",setup(e){t.useCssVars(R=>({"455fdd5f":N.width,"4cccd4ae":N.height,b366f9a4:N.top,"2340194e":N.left}));const r=t.ref(hi()),a=ks().getImageEditor(),c=Br().getDocumentTemplate(),u=a.confirm,f=t.ref(null),m=t.ref(null),y=t.ref(null),g=t.reactive({x:0,y:0,width:0,height:0}),w=t.reactive({x:0,y:0}),b=t.reactive({isEditable:!1,clearIcon:Kt("clearDisableIcon"),undoIcon:Kt("undoDisableIcon"),redoIcon:Kt("redoDisableIcon"),ctx:null,isDrawing:!1,color:"#ff0000",stroke:"2",originImg:void 0,index:0,operateList:new Array,redoList:new Array,originImage:"",currentImage:"",saveImage:"",type:"",points:new Array,beginPoint:null}),M=R=>{let[L,V]=[R.offsetLeft,R.offsetTop];const j=se=>{V+=se.offsetTop,L+=se.offsetLeft,se.offsetParent&&j(se.offsetParent)};return R.offsetParent&&j(R.offsetParent),{left:L,top:V}},E=R=>{let{left:L,top:V}=R.getBoundingClientRect();return{left:L,top:V}},S=({i_width:R,i_height:L,c_width:V,c_height:j})=>{const se=R/L,me=V/j;switch(!0){case se>me:R=V,L=R/se;break;case se<me:L=j,R=L*se;break;case se==me:R=V,L=j;break}return{width:R,height:L}},N=t.reactive({top:"",left:"",width:"",height:""});t.onMounted(async()=>{let R=a.options.src;const L=R.split(/[:;]/);if(L.length===3?b.type=L[1]:b.type="image/png",r.value?(N.top="0",N.left="0",N.width="100vw",N.height="100vh"):c.relatedDom?(N.top=`${c.relatedDom.offsetTop}px`,N.left=`${c.relatedDom.offsetLeft}px`,N.width=`${c.relatedDom.clientWidth}px`,N.height=`${c.relatedDom.clientHeight}px`):(N.top="0",N.left="0",N.width="100vw",N.height="100vh"),f.value&&y.value){const V=f.value,j=V.getContext("2d",{willReadFrequently:!0});b.ctx=j,V.width=y.value.clientWidth,V.height=y.value.clientHeight;const se=V.width,me=V.height,pe=new Image;pe.src=R,pe.onload=()=>{j.clearRect(0,0,V.width,V.height);const Ee=pe.width,Te=pe.height,Se=S({i_width:Ee,i_height:Te,c_width:se,c_height:me});g.width=Se.width,g.height=Se.height,V.width=g.width,V.height=g.height,g.x=(V.width-g.width)/2,g.y=(V.height-g.height)/2,j==null||j.drawImage(pe,g.x,g.y,g.width,g.height);const ue=j==null?void 0:j.getImageData(0,0,V.width,V.height);ue&&(b.originImg=ue,b.operateList.push(ue),b.originImage=D(ue),b.currentImage=b.originImage,b.saveImage=b.originImage)}}});const k=async()=>{if(b.saveImage!==b.originImage){const R=ha.service({target:c.relatedDom||document.body});await u(a.options.dataKey,b.saveImage,b.type),R.close()}a.close()},A=R=>{R.target===m.value&&a.close()},B=()=>{b.operateList[b.index]!==b.originImg?b.clearIcon=Kt("clearIcon"):b.clearIcon=Kt("clearDisableIcon"),b.index>0?b.undoIcon=Kt("undoIcon"):b.undoIcon=Kt("undoDisableIcon"),b.redoList.length>0?b.redoIcon=Kt("redoIcon"):b.redoIcon=Kt("redoDisableIcon")},Y=()=>{var L;const R=(L=b.ctx)==null?void 0:L.getImageData(g.x,g.y,g.width,g.height);b.currentImage=D(R),B()},D=R=>{const L=document.createElement("canvas");L.width=R.width,L.height=R.height;const V=L.getContext("2d");return V==null||V.putImageData(R,0,0),L.toDataURL().split(",")[1]},Q=R=>{if(f.value){R.preventDefault(),R.stopPropagation();const L=b.ctx;if(L.strokeStyle=b.color,L.lineWidth=parseInt(b.stroke),b.isDrawing=!0,r.value){const{left:V,top:j}=E(f.value);R=R,w.x=R.targetTouches[0].clientX-V,w.y=R.targetTouches[0].clientY-j,b.points.push({x:w.x,y:w.y})}else{const{left:V,top:j}=M(f.value);R=R,w.x=R.clientX-V,w.y=R.clientY-j,b.points.push({x:w.x,y:w.y})}}},H=(R,L,V)=>{const j=b.ctx;j.beginPath(),j.moveTo(R.x,R.y),j.quadraticCurveTo(L.x,L.y,V.x,V.y),j.stroke(),j.closePath()},ne=R=>{var L;if(f.value&&(R.preventDefault(),R.stopPropagation(),f.value.style.cursor="auto",b.isDrawing)){if(r.value){const{left:se,top:me}=E(f.value);R=R;const pe=R.changedTouches[0].clientX-se,Ee=R.changedTouches[0].clientY-me;b.points.push({x:pe,y:Ee})}else{const{left:se,top:me}=M(f.value);R=R;const pe=R.clientX-se,Ee=R.clientY-me;b.points.push({x:pe,y:Ee})}if(b.points.length>3){const se=b.points.slice(-2),me=se[0],pe=se[1];b.beginPoint&&H(b.beginPoint,me,pe)}b.beginPoint=null,b.points=[];const V=b.ctx;V==null||V.closePath();const j=(L=b.ctx)==null?void 0:L.getImageData(g.x,g.y,g.width,g.height);b.operateList.push(j),b.redoList=new Array,b.index++}b.isDrawing=!1,Y()},q=R=>{if(f.value&&(R.preventDefault(),R.stopPropagation(),b.isDrawing)){if(r.value){const{left:L,top:V}=E(f.value);R=R;const j=R.targetTouches[0].clientX-L,se=R.targetTouches[0].clientY-V;b.points.push({x:j,y:se})}else{const{left:L,top:V}=M(f.value);R=R;const j=R.clientX-L,se=R.clientY-V;b.points.push({x:j,y:se})}if(b.points.length>3){const L=b.points.slice(-2),V=L[0],j={x:(L[0].x+L[1].x)/2,y:(L[0].y+L[1].y)/2};b.beginPoint&&H(b.beginPoint,V,j),b.beginPoint=j}}},G=()=>{if(f.value){const R=f.value;r.value?(R.addEventListener("touchstart",Q),R.addEventListener("touchend",ne),R.addEventListener("touchcancel",ne),R.addEventListener("touchmove",q)):(R.addEventListener("mousedown",Q),R.addEventListener("mouseup",ne),R.addEventListener("mouseleave",ne),R.addEventListener("mousemove",q)),b.isEditable=!0}},U=()=>{if(f.value){const R=f.value;R.removeEventListener("mousedown",Q),R.removeEventListener("mouseup",ne),R.removeEventListener("mouseleave",ne),R.removeEventListener("mousemove",q),b.isEditable=!1,b.saveImage=b.currentImage}},te=()=>{const R=b.ctx;R&&b.originImg&&(b.index++,b.operateList.push(b.originImg),b.redoList=new Array,R.putImageData(b.originImg,g.x,g.y),Y())},he=()=>{var L;const R=b.operateList.pop();b.redoList.push(R),b.index--,b.redoIcon=Kt("redoIcon"),(L=b.ctx)==null||L.putImageData(b.operateList[b.index],g.x,g.y),Y()},ae=()=>{var L;const R=b.redoList.pop();b.operateList.push(R),b.index++,(L=b.ctx)==null||L.putImageData(R,g.x,g.y),Y()};return(R,L)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{ref_key:"editorView",ref:m,class:t.normalizeClass(r.value?"image-editor-view image-editor-view-mobile":"image-editor-view image-editor-view-ps"),onClick:A},[t.createElementVNode("div",Fk,[t.createElementVNode("img",{class:"image-editor-close_icon",src:ih,onClick:k}),t.createElementVNode("div",{ref_key:"editorBox",ref:y,class:"image-editor-console-box"},[t.createElementVNode("canvas",{class:"image-editor-console",ref_key:"editorDom",ref:f},null,512)],512),t.unref(a).options.markable?(t.openBlock(),t.createElementBlock("div",jk,[b.isEditable?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Uk,[t.createElementVNode("img",{src:zk,class:"image-editor-editImg",onClick:G})])),b.isEditable?(t.openBlock(),t.createElementBlock("div",Wk,[t.createElementVNode("div",Hk,[t.withDirectives(t.createElementVNode("input",{class:"image-editor-color",type:"color","onUpdate:modelValue":L[0]||(L[0]=V=>b.color=V)},null,512),[[t.vModelText,b.color]]),t.withDirectives(t.createElementVNode("input",{class:"image-editor-stroke",type:"range",min:"1",max:"15","onUpdate:modelValue":L[1]||(L[1]=V=>b.stroke=V)},null,512),[[t.vModelText,b.stroke]]),t.createElementVNode("img",{class:"image-editor-clear",src:b.clearIcon,onClick:L[2]||(L[2]=V=>b.clearIcon==t.unref(Kt)("clearIcon")&&te())},null,8,Yk),t.createElementVNode("img",{class:"image-editor-undo",src:b.undoIcon,onClick:L[3]||(L[3]=V=>b.undoIcon==t.unref(Kt)("undoIcon")&&he())},null,8,Gk),t.createElementVNode("img",{class:"image-editor-redo",src:b.redoIcon,onClick:L[4]||(L[4]=V=>b.redoIcon==t.unref(Kt)("redoIcon")&&ae())},null,8,Kk)]),t.createElementVNode("div",{class:"right"},[t.createElementVNode("div",{class:"image-editor-comfirm",onClick:U},qk)])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])],2)]))}}),[["__scopeId","data-v-516516a5"]]),Zk="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='6'%20height='6'%20viewBox='0%200%206%206'%3e%3ccircle%20id='椭圆_711'%20data-name='椭圆%20711'%20cx='3'%20cy='3'%20r='3'%20fill='%23005795'/%3e%3c/svg%3e",uh=e=>(t.pushScopeId("data-v-5ee3d8d8"),e=e(),t.popScopeId(),e),Xk={class:"recommend-diagnoses"},Jk=uh(()=>t.createElementVNode("div",{class:"header"},null,-1)),eM=uh(()=>t.createElementVNode("div",{class:"recommend-diagnoses-title"},[t.createElementVNode("img",{class:"recommend-diagnoses-title_icon",src:Zk}),t.createElementVNode("span",{class:"recommend-diagnoses-title_text"},"Recommend Diagnoses")],-1)),tM={class:"recommend-diagnoses-list"},nM={class:"recommend-diagnoses-item"},rM={class:"recommend-diagnoses-item-code"},oM={class:"recommend-diagnosis-item-comment"},iM={class:"recommend-diagnoses-confirm"},aM=gi(t.defineComponent({__name:"RecommendDiagnosis",setup(e){t.useCssVars(A=>({"67c4d826":E.width,c4742040:E.height,"6282853c":E.top,"246b4e00":E.left}));const r=t.ref(hi()),a=Br().getDocumentTemplate(),l=a.ecos,c=a.info,f=Ms().getRecommendDiagnosis(),m=t.reactive([]),y=t.reactive(f.options.formData),g=t.ref(!1),w=t.ref(null),b=f.cache;let M="";const E=t.reactive({top:"",left:"",width:"",height:""});t.onMounted(async()=>{const B=Br().getDocumentTemplate();B.relatedDom?(E.top=`${B.relatedDom.offsetTop}px`,E.left=`${B.relatedDom.offsetLeft}px`,E.width=`${B.relatedDom.clientWidth}px`,E.height=`${B.relatedDom.clientHeight}px`):(E.top="0",E.left="0",E.width="100vw",E.height="100vh");const Y=ha.service({target:B.relatedDom||document.body}),D=y.Diagnosis,Q=new Set(D.map(q=>q.code));let H=[];if(b.hasCache)H=b.list;else{const q=await l.retrieveDocument({idList:[c.facilityId,...c.locationIds,c.patientId],options:{ObjType:28,sfname:'{"result":"D.*", "join": "INNER JOIN Edge E on E.id=D.reid INNER JOIN Edge E2 on E.refid=E2.id"}',xfname:"(E.bvid,E2.Bvid) | (E.evid,E2.Bvid)",scondition:"E.type=40000 AND E.subtype&0xff=6 AND E2.type=40000 AND E2.subtype&0xff in(1,9) AND D.type=186881",asc:!1,obfname:"D.ctime",maxcount:100}});if(q.code===0){let G=[];q.document.forEach(U=>{const te=U.name.data.diagnosis.descriptiveList;G=G.concat(te)}),b.hasCache=!0,b.list=Rn.cloneDeep(G),H=G}else b.hasCache=!0,b.list=[],H=[]}H.forEach(q=>{Q.has(q.code)?q.isChecked=!0:q.isChecked=!1});let ne=new Set;H=H.filter(q=>ne.has(q.code)?!1:(ne.add(q.code),!0)),H.forEach(q=>{q.isChecked?M+="1":M+="0",m.push(q)}),Y.close()}),t.watch(m,()=>{let A="";m.forEach(B=>{B.isChecked?A+="1":A+="0"}),g.value=M!==A});const S=()=>{f.close()},N=A=>{A.target===w.value&&f.close()},k=async()=>{};return(A,B)=>{const Y=sp,D=br;return t.openBlock(),t.createElementBlock("div",{ref_key:"diagnosisView",ref:w,class:t.normalizeClass(r.value?"recommend-diagnoses-view recommend-diagnoses-mobile":"recommend-diagnoses-view"),onClick:N},[t.createElementVNode("div",Xk,[Jk,t.createElementVNode("div",{class:"recommend-diagnoses-close"},[t.createElementVNode("img",{class:"recommend-diagnoses-close_icon",src:ch,onClick:S})]),eM,t.createElementVNode("div",tM,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m,Q=>(t.openBlock(),t.createElementBlock("div",nM,[t.createElementVNode("div",rM,[t.createVNode(Y,{modelValue:Q.isChecked,"onUpdate:modelValue":H=>Q.isChecked=H},null,8,["modelValue","onUpdate:modelValue"]),t.createTextVNode(" "+t.toDisplayString(Q.code)+" - "+t.toDisplayString(Q.description),1)]),t.createElementVNode("div",oM,t.toDisplayString(Q.comment),1)]))),256))]),t.createElementVNode("div",iM,[t.createVNode(D,{class:t.normalizeClass(`
|
|
76
|
+
*/(function(e){const r=ka,o=ql,a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=f,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;const l=2147483647;e.kMaxLength=l,f.TYPED_ARRAY_SUPPORT=c(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const _=new Uint8Array(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,Uint8Array.prototype),Object.setPrototypeOf(_,p),_.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function u(_){if(_>l)throw new RangeError('The value "'+_+'" is invalid for option "size"');const p=new Uint8Array(_);return Object.setPrototypeOf(p,f.prototype),p}function f(_,p,h){if(typeof _=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(_)}return m(_,p,h)}f.poolSize=8192;function m(_,p,h){if(typeof _=="string")return b(_,p);if(ArrayBuffer.isView(_))return E(_);if(_==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _);if(ct(_,ArrayBuffer)||_&&ct(_.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ct(_,SharedArrayBuffer)||_&&ct(_.buffer,SharedArrayBuffer)))return S(_,p,h);if(typeof _=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const T=_.valueOf&&_.valueOf();if(T!=null&&T!==_)return f.from(T,p,h);const z=N(_);if(z)return z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof _[Symbol.toPrimitive]=="function")return f.from(_[Symbol.toPrimitive]("string"),p,h);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _)}f.from=function(_,p,h){return m(_,p,h)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array);function y(_){if(typeof _!="number")throw new TypeError('"size" argument must be of type number');if(_<0)throw new RangeError('The value "'+_+'" is invalid for option "size"')}function g(_,p,h){return y(_),_<=0?u(_):p!==void 0?typeof h=="string"?u(_).fill(p,h):u(_).fill(p):u(_)}f.alloc=function(_,p,h){return g(_,p,h)};function w(_){return y(_),u(_<0?0:k(_)|0)}f.allocUnsafe=function(_){return w(_)},f.allocUnsafeSlow=function(_){return w(_)};function b(_,p){if((typeof p!="string"||p==="")&&(p="utf8"),!f.isEncoding(p))throw new TypeError("Unknown encoding: "+p);const h=B(_,p)|0;let T=u(h);const z=T.write(_,p);return z!==h&&(T=T.slice(0,z)),T}function M(_){const p=_.length<0?0:k(_.length)|0,h=u(p);for(let T=0;T<p;T+=1)h[T]=_[T]&255;return h}function E(_){if(ct(_,Uint8Array)){const p=new Uint8Array(_);return S(p.buffer,p.byteOffset,p.byteLength)}return M(_)}function S(_,p,h){if(p<0||_.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(_.byteLength<p+(h||0))throw new RangeError('"length" is outside of buffer bounds');let T;return p===void 0&&h===void 0?T=new Uint8Array(_):h===void 0?T=new Uint8Array(_,p):T=new Uint8Array(_,p,h),Object.setPrototypeOf(T,f.prototype),T}function N(_){if(f.isBuffer(_)){const p=k(_.length)|0,h=u(p);return h.length===0||_.copy(h,0,0,p),h}if(_.length!==void 0)return typeof _.length!="number"||Lt(_.length)?u(0):M(_);if(_.type==="Buffer"&&Array.isArray(_.data))return M(_.data)}function k(_){if(_>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return _|0}function A(_){return+_!=_&&(_=0),f.alloc(+_)}f.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==f.prototype},f.compare=function(p,h){if(ct(p,Uint8Array)&&(p=f.from(p,p.offset,p.byteLength)),ct(h,Uint8Array)&&(h=f.from(h,h.offset,h.byteLength)),!f.isBuffer(p)||!f.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===h)return 0;let T=p.length,z=h.length;for(let W=0,ee=Math.min(T,z);W<ee;++W)if(p[W]!==h[W]){T=p[W],z=h[W];break}return T<z?-1:z<T?1:0},f.isEncoding=function(p){switch(String(p).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(p,h){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return f.alloc(0);let T;if(h===void 0)for(h=0,T=0;T<p.length;++T)h+=p[T].length;const z=f.allocUnsafe(h);let W=0;for(T=0;T<p.length;++T){let ee=p[T];if(ct(ee,Uint8Array))W+ee.length>z.length?(f.isBuffer(ee)||(ee=f.from(ee)),ee.copy(z,W)):Uint8Array.prototype.set.call(z,ee,W);else if(f.isBuffer(ee))ee.copy(z,W);else throw new TypeError('"list" argument must be an Array of Buffers');W+=ee.length}return z};function B(_,p){if(f.isBuffer(_))return _.length;if(ArrayBuffer.isView(_)||ct(_,ArrayBuffer))return _.byteLength;if(typeof _!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _);const h=_.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&h===0)return 0;let z=!1;for(;;)switch(p){case"ascii":case"latin1":case"binary":return h;case"utf8":case"utf-8":return le(_).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h*2;case"hex":return h>>>1;case"base64":return rt(_).length;default:if(z)return T?-1:le(_).length;p=(""+p).toLowerCase(),z=!0}}f.byteLength=B;function Y(_,p,h){let T=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((h===void 0||h>this.length)&&(h=this.length),h<=0)||(h>>>=0,p>>>=0,h<=p))return"";for(_||(_="utf8");;)switch(_){case"hex":return se(this,p,h);case"utf8":case"utf-8":return ae(this,p,h);case"ascii":return V(this,p,h);case"latin1":case"binary":return j(this,p,h);case"base64":return he(this,p,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,p,h);default:if(T)throw new TypeError("Unknown encoding: "+_);_=(_+"").toLowerCase(),T=!0}}f.prototype._isBuffer=!0;function D(_,p,h){const T=_[p];_[p]=_[h],_[h]=T}f.prototype.swap16=function(){const p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let h=0;h<p;h+=2)D(this,h,h+1);return this},f.prototype.swap32=function(){const p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let h=0;h<p;h+=4)D(this,h,h+3),D(this,h+1,h+2);return this},f.prototype.swap64=function(){const p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let h=0;h<p;h+=8)D(this,h,h+7),D(this,h+1,h+6),D(this,h+2,h+5),D(this,h+3,h+4);return this},f.prototype.toString=function(){const p=this.length;return p===0?"":arguments.length===0?ae(this,0,p):Y.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(p){if(!f.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:f.compare(this,p)===0},f.prototype.inspect=function(){let p="";const h=e.INSPECT_MAX_BYTES;return p=this.toString("hex",0,h).replace(/(.{2})/g,"$1 ").trim(),this.length>h&&(p+=" ... "),"<Buffer "+p+">"},a&&(f.prototype[a]=f.prototype.inspect),f.prototype.compare=function(p,h,T,z,W){if(ct(p,Uint8Array)&&(p=f.from(p,p.offset,p.byteLength)),!f.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(h===void 0&&(h=0),T===void 0&&(T=p?p.length:0),z===void 0&&(z=0),W===void 0&&(W=this.length),h<0||T>p.length||z<0||W>this.length)throw new RangeError("out of range index");if(z>=W&&h>=T)return 0;if(z>=W)return-1;if(h>=T)return 1;if(h>>>=0,T>>>=0,z>>>=0,W>>>=0,this===p)return 0;let ee=W-z,Ne=T-h;const Je=Math.min(ee,Ne),Ke=this.slice(z,W),et=p.slice(h,T);for(let He=0;He<Je;++He)if(Ke[He]!==et[He]){ee=Ke[He],Ne=et[He];break}return ee<Ne?-1:Ne<ee?1:0};function Q(_,p,h,T,z){if(_.length===0)return-1;if(typeof h=="string"?(T=h,h=0):h>2147483647?h=2147483647:h<-2147483648&&(h=-2147483648),h=+h,Lt(h)&&(h=z?0:_.length-1),h<0&&(h=_.length+h),h>=_.length){if(z)return-1;h=_.length-1}else if(h<0)if(z)h=0;else return-1;if(typeof p=="string"&&(p=f.from(p,T)),f.isBuffer(p))return p.length===0?-1:H(_,p,h,T,z);if(typeof p=="number")return p=p&255,typeof Uint8Array.prototype.indexOf=="function"?z?Uint8Array.prototype.indexOf.call(_,p,h):Uint8Array.prototype.lastIndexOf.call(_,p,h):H(_,[p],h,T,z);throw new TypeError("val must be string, number or Buffer")}function H(_,p,h,T,z){let W=1,ee=_.length,Ne=p.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(_.length<2||p.length<2)return-1;W=2,ee/=2,Ne/=2,h/=2}function Je(et,He){return W===1?et[He]:et.readUInt16BE(He*W)}let Ke;if(z){let et=-1;for(Ke=h;Ke<ee;Ke++)if(Je(_,Ke)===Je(p,et===-1?0:Ke-et)){if(et===-1&&(et=Ke),Ke-et+1===Ne)return et*W}else et!==-1&&(Ke-=Ke-et),et=-1}else for(h+Ne>ee&&(h=ee-Ne),Ke=h;Ke>=0;Ke--){let et=!0;for(let He=0;He<Ne;He++)if(Je(_,Ke+He)!==Je(p,He)){et=!1;break}if(et)return Ke}return-1}f.prototype.includes=function(p,h,T){return this.indexOf(p,h,T)!==-1},f.prototype.indexOf=function(p,h,T){return Q(this,p,h,T,!0)},f.prototype.lastIndexOf=function(p,h,T){return Q(this,p,h,T,!1)};function ne(_,p,h,T){h=Number(h)||0;const z=_.length-h;T?(T=Number(T),T>z&&(T=z)):T=z;const W=p.length;T>W/2&&(T=W/2);let ee;for(ee=0;ee<T;++ee){const Ne=parseInt(p.substr(ee*2,2),16);if(Lt(Ne))return ee;_[h+ee]=Ne}return ee}function q(_,p,h,T){return Qe(le(p,_.length-h),_,h,T)}function G(_,p,h,T){return Qe(je(p),_,h,T)}function U(_,p,h,T){return Qe(rt(p),_,h,T)}function te(_,p,h,T){return Qe(bt(p,_.length-h),_,h,T)}f.prototype.write=function(p,h,T,z){if(h===void 0)z="utf8",T=this.length,h=0;else if(T===void 0&&typeof h=="string")z=h,T=this.length,h=0;else if(isFinite(h))h=h>>>0,isFinite(T)?(T=T>>>0,z===void 0&&(z="utf8")):(z=T,T=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const W=this.length-h;if((T===void 0||T>W)&&(T=W),p.length>0&&(T<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");z||(z="utf8");let ee=!1;for(;;)switch(z){case"hex":return ne(this,p,h,T);case"utf8":case"utf-8":return q(this,p,h,T);case"ascii":case"latin1":case"binary":return G(this,p,h,T);case"base64":return U(this,p,h,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,p,h,T);default:if(ee)throw new TypeError("Unknown encoding: "+z);z=(""+z).toLowerCase(),ee=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function he(_,p,h){return p===0&&h===_.length?r.fromByteArray(_):r.fromByteArray(_.slice(p,h))}function ae(_,p,h){h=Math.min(_.length,h);const T=[];let z=p;for(;z<h;){const W=_[z];let ee=null,Ne=W>239?4:W>223?3:W>191?2:1;if(z+Ne<=h){let Je,Ke,et,He;switch(Ne){case 1:W<128&&(ee=W);break;case 2:Je=_[z+1],(Je&192)===128&&(He=(W&31)<<6|Je&63,He>127&&(ee=He));break;case 3:Je=_[z+1],Ke=_[z+2],(Je&192)===128&&(Ke&192)===128&&(He=(W&15)<<12|(Je&63)<<6|Ke&63,He>2047&&(He<55296||He>57343)&&(ee=He));break;case 4:Je=_[z+1],Ke=_[z+2],et=_[z+3],(Je&192)===128&&(Ke&192)===128&&(et&192)===128&&(He=(W&15)<<18|(Je&63)<<12|(Ke&63)<<6|et&63,He>65535&&He<1114112&&(ee=He))}}ee===null?(ee=65533,Ne=1):ee>65535&&(ee-=65536,T.push(ee>>>10&1023|55296),ee=56320|ee&1023),T.push(ee),z+=Ne}return L(T)}const R=4096;function L(_){const p=_.length;if(p<=R)return String.fromCharCode.apply(String,_);let h="",T=0;for(;T<p;)h+=String.fromCharCode.apply(String,_.slice(T,T+=R));return h}function V(_,p,h){let T="";h=Math.min(_.length,h);for(let z=p;z<h;++z)T+=String.fromCharCode(_[z]&127);return T}function j(_,p,h){let T="";h=Math.min(_.length,h);for(let z=p;z<h;++z)T+=String.fromCharCode(_[z]);return T}function se(_,p,h){const T=_.length;(!p||p<0)&&(p=0),(!h||h<0||h>T)&&(h=T);let z="";for(let W=p;W<h;++W)z+=qt[_[W]];return z}function me(_,p,h){const T=_.slice(p,h);let z="";for(let W=0;W<T.length-1;W+=2)z+=String.fromCharCode(T[W]+T[W+1]*256);return z}f.prototype.slice=function(p,h){const T=this.length;p=~~p,h=h===void 0?T:~~h,p<0?(p+=T,p<0&&(p=0)):p>T&&(p=T),h<0?(h+=T,h<0&&(h=0)):h>T&&(h=T),h<p&&(h=p);const z=this.subarray(p,h);return Object.setPrototypeOf(z,f.prototype),z};function pe(_,p,h){if(_%1!==0||_<0)throw new RangeError("offset is not uint");if(_+p>h)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(p,h,T){p=p>>>0,h=h>>>0,T||pe(p,h,this.length);let z=this[p],W=1,ee=0;for(;++ee<h&&(W*=256);)z+=this[p+ee]*W;return z},f.prototype.readUintBE=f.prototype.readUIntBE=function(p,h,T){p=p>>>0,h=h>>>0,T||pe(p,h,this.length);let z=this[p+--h],W=1;for(;h>0&&(W*=256);)z+=this[p+--h]*W;return z},f.prototype.readUint8=f.prototype.readUInt8=function(p,h){return p=p>>>0,h||pe(p,1,this.length),this[p]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(p,h){return p=p>>>0,h||pe(p,2,this.length),this[p]|this[p+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(p,h){return p=p>>>0,h||pe(p,2,this.length),this[p]<<8|this[p+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(p,h){return p=p>>>0,h||pe(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(p,h){return p=p>>>0,h||pe(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},f.prototype.readBigUInt64LE=ie(function(p){p=p>>>0,tt(p,"offset");const h=this[p],T=this[p+7];(h===void 0||T===void 0)&&nt(p,this.length-8);const z=h+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24,W=this[++p]+this[++p]*2**8+this[++p]*2**16+T*2**24;return BigInt(z)+(BigInt(W)<<BigInt(32))}),f.prototype.readBigUInt64BE=ie(function(p){p=p>>>0,tt(p,"offset");const h=this[p],T=this[p+7];(h===void 0||T===void 0)&&nt(p,this.length-8);const z=h*2**24+this[++p]*2**16+this[++p]*2**8+this[++p],W=this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+T;return(BigInt(z)<<BigInt(32))+BigInt(W)}),f.prototype.readIntLE=function(p,h,T){p=p>>>0,h=h>>>0,T||pe(p,h,this.length);let z=this[p],W=1,ee=0;for(;++ee<h&&(W*=256);)z+=this[p+ee]*W;return W*=128,z>=W&&(z-=Math.pow(2,8*h)),z},f.prototype.readIntBE=function(p,h,T){p=p>>>0,h=h>>>0,T||pe(p,h,this.length);let z=h,W=1,ee=this[p+--z];for(;z>0&&(W*=256);)ee+=this[p+--z]*W;return W*=128,ee>=W&&(ee-=Math.pow(2,8*h)),ee},f.prototype.readInt8=function(p,h){return p=p>>>0,h||pe(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},f.prototype.readInt16LE=function(p,h){p=p>>>0,h||pe(p,2,this.length);const T=this[p]|this[p+1]<<8;return T&32768?T|4294901760:T},f.prototype.readInt16BE=function(p,h){p=p>>>0,h||pe(p,2,this.length);const T=this[p+1]|this[p]<<8;return T&32768?T|4294901760:T},f.prototype.readInt32LE=function(p,h){return p=p>>>0,h||pe(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},f.prototype.readInt32BE=function(p,h){return p=p>>>0,h||pe(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},f.prototype.readBigInt64LE=ie(function(p){p=p>>>0,tt(p,"offset");const h=this[p],T=this[p+7];(h===void 0||T===void 0)&&nt(p,this.length-8);const z=this[p+4]+this[p+5]*2**8+this[p+6]*2**16+(T<<24);return(BigInt(z)<<BigInt(32))+BigInt(h+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24)}),f.prototype.readBigInt64BE=ie(function(p){p=p>>>0,tt(p,"offset");const h=this[p],T=this[p+7];(h===void 0||T===void 0)&&nt(p,this.length-8);const z=(h<<24)+this[++p]*2**16+this[++p]*2**8+this[++p];return(BigInt(z)<<BigInt(32))+BigInt(this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+T)}),f.prototype.readFloatLE=function(p,h){return p=p>>>0,h||pe(p,4,this.length),o.read(this,p,!0,23,4)},f.prototype.readFloatBE=function(p,h){return p=p>>>0,h||pe(p,4,this.length),o.read(this,p,!1,23,4)},f.prototype.readDoubleLE=function(p,h){return p=p>>>0,h||pe(p,8,this.length),o.read(this,p,!0,52,8)},f.prototype.readDoubleBE=function(p,h){return p=p>>>0,h||pe(p,8,this.length),o.read(this,p,!1,52,8)};function Ee(_,p,h,T,z,W){if(!f.isBuffer(_))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>z||p<W)throw new RangeError('"value" argument is out of bounds');if(h+T>_.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(p,h,T,z){if(p=+p,h=h>>>0,T=T>>>0,!z){const Ne=Math.pow(2,8*T)-1;Ee(this,p,h,T,Ne,0)}let W=1,ee=0;for(this[h]=p&255;++ee<T&&(W*=256);)this[h+ee]=p/W&255;return h+T},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(p,h,T,z){if(p=+p,h=h>>>0,T=T>>>0,!z){const Ne=Math.pow(2,8*T)-1;Ee(this,p,h,T,Ne,0)}let W=T-1,ee=1;for(this[h+W]=p&255;--W>=0&&(ee*=256);)this[h+W]=p/ee&255;return h+T},f.prototype.writeUint8=f.prototype.writeUInt8=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,1,255,0),this[h]=p&255,h+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,2,65535,0),this[h]=p&255,this[h+1]=p>>>8,h+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,2,65535,0),this[h]=p>>>8,this[h+1]=p&255,h+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,4,4294967295,0),this[h+3]=p>>>24,this[h+2]=p>>>16,this[h+1]=p>>>8,this[h]=p&255,h+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,4,4294967295,0),this[h]=p>>>24,this[h+1]=p>>>16,this[h+2]=p>>>8,this[h+3]=p&255,h+4};function Te(_,p,h,T,z){lt(p,T,z,_,h,7);let W=Number(p&BigInt(4294967295));_[h++]=W,W=W>>8,_[h++]=W,W=W>>8,_[h++]=W,W=W>>8,_[h++]=W;let ee=Number(p>>BigInt(32)&BigInt(4294967295));return _[h++]=ee,ee=ee>>8,_[h++]=ee,ee=ee>>8,_[h++]=ee,ee=ee>>8,_[h++]=ee,h}function Se(_,p,h,T,z){lt(p,T,z,_,h,7);let W=Number(p&BigInt(4294967295));_[h+7]=W,W=W>>8,_[h+6]=W,W=W>>8,_[h+5]=W,W=W>>8,_[h+4]=W;let ee=Number(p>>BigInt(32)&BigInt(4294967295));return _[h+3]=ee,ee=ee>>8,_[h+2]=ee,ee=ee>>8,_[h+1]=ee,ee=ee>>8,_[h]=ee,h+8}f.prototype.writeBigUInt64LE=ie(function(p,h=0){return Te(this,p,h,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=ie(function(p,h=0){return Se(this,p,h,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(p,h,T,z){if(p=+p,h=h>>>0,!z){const Je=Math.pow(2,8*T-1);Ee(this,p,h,T,Je-1,-Je)}let W=0,ee=1,Ne=0;for(this[h]=p&255;++W<T&&(ee*=256);)p<0&&Ne===0&&this[h+W-1]!==0&&(Ne=1),this[h+W]=(p/ee>>0)-Ne&255;return h+T},f.prototype.writeIntBE=function(p,h,T,z){if(p=+p,h=h>>>0,!z){const Je=Math.pow(2,8*T-1);Ee(this,p,h,T,Je-1,-Je)}let W=T-1,ee=1,Ne=0;for(this[h+W]=p&255;--W>=0&&(ee*=256);)p<0&&Ne===0&&this[h+W+1]!==0&&(Ne=1),this[h+W]=(p/ee>>0)-Ne&255;return h+T},f.prototype.writeInt8=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,1,127,-128),p<0&&(p=255+p+1),this[h]=p&255,h+1},f.prototype.writeInt16LE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,2,32767,-32768),this[h]=p&255,this[h+1]=p>>>8,h+2},f.prototype.writeInt16BE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,2,32767,-32768),this[h]=p>>>8,this[h+1]=p&255,h+2},f.prototype.writeInt32LE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,4,2147483647,-2147483648),this[h]=p&255,this[h+1]=p>>>8,this[h+2]=p>>>16,this[h+3]=p>>>24,h+4},f.prototype.writeInt32BE=function(p,h,T){return p=+p,h=h>>>0,T||Ee(this,p,h,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[h]=p>>>24,this[h+1]=p>>>16,this[h+2]=p>>>8,this[h+3]=p&255,h+4},f.prototype.writeBigInt64LE=ie(function(p,h=0){return Te(this,p,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=ie(function(p,h=0){return Se(this,p,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ue(_,p,h,T,z,W){if(h+T>_.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("Index out of range")}function fe(_,p,h,T,z){return p=+p,h=h>>>0,z||ue(_,p,h,4),o.write(_,p,h,T,23,4),h+4}f.prototype.writeFloatLE=function(p,h,T){return fe(this,p,h,!0,T)},f.prototype.writeFloatBE=function(p,h,T){return fe(this,p,h,!1,T)};function ye(_,p,h,T,z){return p=+p,h=h>>>0,z||ue(_,p,h,8),o.write(_,p,h,T,52,8),h+8}f.prototype.writeDoubleLE=function(p,h,T){return ye(this,p,h,!0,T)},f.prototype.writeDoubleBE=function(p,h,T){return ye(this,p,h,!1,T)},f.prototype.copy=function(p,h,T,z){if(!f.isBuffer(p))throw new TypeError("argument should be a Buffer");if(T||(T=0),!z&&z!==0&&(z=this.length),h>=p.length&&(h=p.length),h||(h=0),z>0&&z<T&&(z=T),z===T||p.length===0||this.length===0)return 0;if(h<0)throw new RangeError("targetStart out of bounds");if(T<0||T>=this.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("sourceEnd out of bounds");z>this.length&&(z=this.length),p.length-h<z-T&&(z=p.length-h+T);const W=z-T;return this===p&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(h,T,z):Uint8Array.prototype.set.call(p,this.subarray(T,z),h),W},f.prototype.fill=function(p,h,T,z){if(typeof p=="string"){if(typeof h=="string"?(z=h,h=0,T=this.length):typeof T=="string"&&(z=T,T=this.length),z!==void 0&&typeof z!="string")throw new TypeError("encoding must be a string");if(typeof z=="string"&&!f.isEncoding(z))throw new TypeError("Unknown encoding: "+z);if(p.length===1){const ee=p.charCodeAt(0);(z==="utf8"&&ee<128||z==="latin1")&&(p=ee)}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(h<0||this.length<h||this.length<T)throw new RangeError("Out of range index");if(T<=h)return this;h=h>>>0,T=T===void 0?this.length:T>>>0,p||(p=0);let W;if(typeof p=="number")for(W=h;W<T;++W)this[W]=p;else{const ee=f.isBuffer(p)?p:f.from(p,z),Ne=ee.length;if(Ne===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for(W=0;W<T-h;++W)this[W+h]=ee[W%Ne]}return this};const be={};function ke(_,p,h){be[_]=class extends h{constructor(){super(),Object.defineProperty(this,"message",{value:p.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${_}]`,this.stack,delete this.name}get code(){return _}set code(z){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:z,writable:!0})}toString(){return`${this.name} [${_}]: ${this.message}`}}}ke("ERR_BUFFER_OUT_OF_BOUNDS",function(_){return _?`${_} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ke("ERR_INVALID_ARG_TYPE",function(_,p){return`The "${_}" argument must be of type number. Received type ${typeof p}`},TypeError),ke("ERR_OUT_OF_RANGE",function(_,p,h){let T=`The value of "${_}" is out of range.`,z=h;return Number.isInteger(h)&&Math.abs(h)>2**32?z=Ve(String(h)):typeof h=="bigint"&&(z=String(h),(h>BigInt(2)**BigInt(32)||h<-(BigInt(2)**BigInt(32)))&&(z=Ve(z)),z+="n"),T+=` It must be ${p}. Received ${z}`,T},RangeError);function Ve(_){let p="",h=_.length;const T=_[0]==="-"?1:0;for(;h>=T+4;h-=3)p=`_${_.slice(h-3,h)}${p}`;return`${_.slice(0,h)}${p}`}function Pe(_,p,h){tt(p,"offset"),(_[p]===void 0||_[p+h]===void 0)&&nt(p,_.length-(h+1))}function lt(_,p,h,T,z,W){if(_>h||_<p){const ee=typeof p=="bigint"?"n":"";let Ne;throw p===0||p===BigInt(0)?Ne=`>= 0${ee} and < 2${ee} ** ${(W+1)*8}${ee}`:Ne=`>= -(2${ee} ** ${(W+1)*8-1}${ee}) and < 2 ** ${(W+1)*8-1}${ee}`,new be.ERR_OUT_OF_RANGE("value",Ne,_)}Pe(T,z,W)}function tt(_,p){if(typeof _!="number")throw new be.ERR_INVALID_ARG_TYPE(p,"number",_)}function nt(_,p,h){throw Math.floor(_)!==_?(tt(_,h),new be.ERR_OUT_OF_RANGE("offset","an integer",_)):p<0?new be.ERR_BUFFER_OUT_OF_BOUNDS:new be.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${p}`,_)}const it=/[^+/0-9A-Za-z-_]/g;function F(_){if(_=_.split("=")[0],_=_.trim().replace(it,""),_.length<2)return"";for(;_.length%4!==0;)_=_+"=";return _}function le(_,p){p=p||1/0;let h;const T=_.length;let z=null;const W=[];for(let ee=0;ee<T;++ee){if(h=_.charCodeAt(ee),h>55295&&h<57344){if(!z){if(h>56319){(p-=3)>-1&&W.push(239,191,189);continue}else if(ee+1===T){(p-=3)>-1&&W.push(239,191,189);continue}z=h;continue}if(h<56320){(p-=3)>-1&&W.push(239,191,189),z=h;continue}h=(z-55296<<10|h-56320)+65536}else z&&(p-=3)>-1&&W.push(239,191,189);if(z=null,h<128){if((p-=1)<0)break;W.push(h)}else if(h<2048){if((p-=2)<0)break;W.push(h>>6|192,h&63|128)}else if(h<65536){if((p-=3)<0)break;W.push(h>>12|224,h>>6&63|128,h&63|128)}else if(h<1114112){if((p-=4)<0)break;W.push(h>>18|240,h>>12&63|128,h>>6&63|128,h&63|128)}else throw new Error("Invalid code point")}return W}function je(_){const p=[];for(let h=0;h<_.length;++h)p.push(_.charCodeAt(h)&255);return p}function bt(_,p){let h,T,z;const W=[];for(let ee=0;ee<_.length&&!((p-=2)<0);++ee)h=_.charCodeAt(ee),T=h>>8,z=h%256,W.push(z),W.push(T);return W}function rt(_){return r.toByteArray(F(_))}function Qe(_,p,h,T){let z;for(z=0;z<T&&!(z+h>=p.length||z>=_.length);++z)p[z+h]=_[z];return z}function ct(_,p){return _ instanceof p||_!=null&&_.constructor!=null&&_.constructor.name!=null&&_.constructor.name===p.name}function Lt(_){return _!==_}const qt=function(){const _="0123456789abcdef",p=new Array(256);for(let h=0;h<16;++h){const T=h*16;for(let z=0;z<16;++z)p[T+z]=_[h]+_[z]}return p}();function ie(_){return typeof BigInt>"u"?Me:_}function Me(){throw new Error("BigInt not supported")}})(ah);const M4=e=>{const r=atob(e),o=r.length,a=new Uint8Array(o);for(let l=0;l<o;l++)a[l]=r.charCodeAt(l);return a},T4=({type:e,data:r})=>`data:${e};base64,${r}`,A4=e=>M4(e),lh=(e,r)=>{const o=A4(e),a=ah.Buffer.from(o.buffer);return new Blob([a.buffer],{type:r})},ch="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16.828'%20height='16.828'%20viewBox='0%200%2016.828%2016.828'%3e%3cg%20id='组_10025'%20data-name='组%2010025'%20transform='translate(0.914%201.414)'%3e%3cline%20id='直线_1370'%20data-name='直线%201370'%20x2='14'%20y2='14'%20transform='translate(0.5)'%20fill='none'%20stroke='%23c1c1c1'%20stroke-linecap='round'%20stroke-width='2'/%3e%3cline%20id='直线_1371'%20data-name='直线%201371'%20x1='14'%20y2='14'%20transform='translate(0.5)'%20fill='none'%20stroke='%23c1c1c1'%20stroke-linecap='round'%20stroke-width='2'/%3e%3c/g%3e%3c/svg%3e",N4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cg%20id='组_11460'%20data-name='组%2011460'%20transform='translate(-1070%20-577)'%3e%3cpath%20id='路径_9629'%20data-name='路径%209629'%20d='M8,14.625A6.625,6.625,0,1,0,1.375,8,6.625,6.625,0,0,0,8,14.625ZM8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16Z'%20transform='translate(1070%20577)'%20fill='%23999'/%3e%3cpath%20id='路径_9630'%20data-name='路径%209630'%20d='M449.688,212.688a.687.687,0,1,0-1.375,0v5.3a.687.687,0,1,0,1.375,0ZM449,219.375a1,1,0,1,0,1,1A1,1,0,0,0,449,219.375Z'%20transform='translate(629%20368.313)'%20fill='%23999'/%3e%3c/g%3e%3c/svg%3e",Ma=e=>(t.pushScopeId("data-v-50a3cf13"),e=e(),t.popScopeId(),e),v4={class:"signature_box"},B4=Ma(()=>t.createElementVNode("div",{class:"signature_tilte"},"Signature",-1)),D4=Ma(()=>t.createElementVNode("div",{class:"subtitle"},"Click on the signature box below to finger sign",-1)),L4=Ma(()=>t.createElementVNode("div",{class:"label"},"X",-1)),O4=Ma(()=>t.createElementVNode("div",{class:"signature_tips"},[t.createElementVNode("img",{class:"signature_icon",src:N4}),t.createElementVNode("div",{class:"tips"},"The signature is saved for later use.")],-1)),R4={class:"signature_operate"},V4=gi(t.defineComponent({__name:"SignaturePad",setup(e){t.useCssVars(q=>({"68ae9541":ne.width,d955cde8:ne.height,"4c4bcb90":ne.top,"3d29dd2c":ne.left}));const r=t.ref(hi()),a=Br().getDocumentTemplate(),l=t.ref(null),c=t.ref(null),u=t.ref(null),m=Is().getSignaturePad(),y=m.confirm,g=t.reactive({status:!1,ctx:null,originSignature:"",saveSignature:"",points:new Array,beginPoint:null}),w=t.reactive({x:0,y:0}),b=q=>{let[G,U]=[q.offsetLeft,q.offsetTop];const te=he=>{U+=he.offsetTop,G+=he.offsetLeft,he.offsetParent&&te(he.offsetParent)};return q.offsetParent&&te(q.offsetParent),{left:G,top:U}},M=q=>{let{left:G,top:U}=q.getBoundingClientRect();return{left:G,top:U}},E=q=>{const G=document.createElement("canvas");G.width=q.width,G.height=q.height;const U=G.getContext("2d");return U==null||U.putImageData(q,0,0),G.toDataURL().split(",")[1]},S=q=>{if(c.value)if(q.preventDefault(),q.stopPropagation(),g.status=!0,r.value){const{left:G,top:U}=M(c.value);q=q,w.x=q.targetTouches[0].clientX-G,w.y=q.targetTouches[0].clientY-U,g.points.push({x:w.x,y:w.y})}else{const{left:G,top:U}=b(c.value);q=q,w.x=q.clientX-G,w.y=q.clientY-U,g.points.push({x:w.x,y:w.y})}},N=(q,G,U)=>{const te=g.ctx;te.beginPath(),te.moveTo(q.x,q.y),te.quadraticCurveTo(G.x,G.y,U.x,U.y),te.stroke(),te.closePath()},k=q=>{if(c.value&&(q.preventDefault(),q.stopPropagation(),g.status&&g.ctx)){if(r.value){const{left:G,top:U}=M(c.value);q=q;const te=q.targetTouches[0].clientX-G,he=q.targetTouches[0].clientY-U;g.points.push({x:te,y:he})}else{const{left:G,top:U}=b(c.value);q=q;const te=q.clientX-G,he=q.clientY-U;g.points.push({x:te,y:he})}if(g.points.length>3){const G=g.points.slice(-2),U=G[0],te={x:(G[0].x+G[1].x)/2,y:(G[0].y+G[1].y)/2};g.beginPoint&&N(g.beginPoint,U,te),g.beginPoint=te}}},A=q=>{if(c.value){q.preventDefault(),q.stopPropagation();const G=c.value;if(G.style.cursor="auto",g.status){if(r.value){const{left:he,top:ae}=M(c.value);q=q;const R=q.changedTouches[0].clientX-he,L=q.changedTouches[0].clientY-ae;g.points.push({x:R,y:L})}else{const{left:he,top:ae}=b(c.value);q=q;const R=q.clientX-he,L=q.clientY-ae;g.points.push({x:R,y:L})}if(g.points.length>3){const he=g.points.slice(-2),ae=he[0],R=he[1];g.beginPoint&&N(g.beginPoint,ae,R)}g.beginPoint=null,g.points=[];const U=g.ctx;U==null||U.closePath();const te=U==null?void 0:U.getImageData(0,0,G.width,G.height);g.saveSignature=E(te)}}g.status=!1},B=()=>{m.close()},Y=()=>{g.ctx&&(r.value?g.ctx.clearRect(0,0,g.ctx.canvas.height,g.ctx.canvas.width):g.ctx.clearRect(0,0,g.ctx.canvas.width,g.ctx.canvas.height),g.saveSignature="")},D=q=>{q.target===u.value&&m.close()},Q=async()=>{if(g.saveSignature!==g.originSignature){const q=ha.service({target:a.relatedDom||document.body});await y(m.options.dataKey,g.saveSignature,m.options.isGuardian?465921:345601,m.options.type),q.close(),m.close()}},H=()=>{B()},ne=t.reactive({top:"",left:"",width:"",height:""});return t.onMounted(async()=>{var G;r.value?(ne.top="calc((100vh - 100vw) / 2)",ne.left="calc((100vw - 100vh) / 2)",ne.width="100vh",ne.height="100vw"):a.relatedDom?(ne.top=`${a.relatedDom.offsetTop}px`,ne.left=`${a.relatedDom.offsetLeft}px`,ne.width=`${a.relatedDom.clientWidth}px`,ne.height=`${a.relatedDom.clientHeight}px`):(ne.top="0",ne.left="0",ne.width="100vw",ne.height="100vh");const q=ha.service({target:a.relatedDom||document.body});if(c.value&&l.value){const U=c.value,te=U.getContext("2d",{willReadFrequently:!0});g.ctx=te,r.value?t.nextTick(()=>{var ae,R;U.width=((ae=l.value)==null?void 0:ae.clientWidth)||0,U.height=((R=l.value)==null?void 0:R.clientHeight)||0,te.translate(U.width/2,U.height/2),te.rotate(-Math.PI/2),te.translate(-U.height/2,-U.width/2),te.lineWidth=5}):(U.width=l.value.clientWidth,U.height=l.value.clientHeight,te.lineWidth=3),te.lineJoin="round",te.lineCap="round";const he=m.options;if(he.dataKey)if(Rn.get(he.formData,he.dataKey)){const R=((G=m.options)==null?void 0:G.value)||"";if(R){const L=new Image;L.src=R,L.onload=()=>{te.drawImage(L,0,0,L.width,L.height);const V=te==null?void 0:te.getImageData(0,0,U.width,U.height);g.originSignature=E(V),g.saveSignature=g.originSignature}}else g.originSignature="",g.saveSignature=""}else g.originSignature="",g.saveSignature=""}q.close()}),(q,G)=>{const U=br;return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{ref_key:"signatureView",ref:u,class:t.normalizeClass(r.value?"signature_view signature_view_mobile":"signature_view signature_view_ps"),onClick:D},[t.createElementVNode("div",v4,[t.createElementVNode("img",{class:"signature_close",src:ch,onClick:B}),B4,t.createElementVNode("div",{class:"signature_subtitle"},[D4,t.createElementVNode("div",{class:"signature_clear",onClick:Y},"Clear")]),t.createElementVNode("div",{class:"signature_pad",ref_key:"signatureBox",ref:l},[t.createElementVNode("canvas",{class:"pad",ref_key:"signaturePad",ref:c,onMousedown:G[0]||(G[0]=te=>!r.value&&S(te)),onMouseup:G[1]||(G[1]=te=>!r.value&&A(te)),onMousemoveCapture:G[2]||(G[2]=te=>!r.value&&k(te)),onMouseleave:G[3]||(G[3]=te=>!r.value&&A(te)),onTouchstart:G[4]||(G[4]=te=>S(te)),onTouchend:G[5]||(G[5]=te=>A(te)),onTouchmoveCapture:G[6]||(G[6]=te=>k(te)),onTouchcancel:G[7]||(G[7]=te=>A(te))},null,544),L4],512),O4,t.createElementVNode("div",R4,[t.createVNode(U,{class:"signature_chioce_button signature_cancel",onClick:H},{default:t.withCtx(()=>[t.createTextVNode("Cancel")]),_:1}),t.createVNode(U,{class:"signature_chioce_button signature_confirm",onClick:Q},{default:t.withCtx(()=>[t.createTextVNode("Confirm")]),_:1})])])],2)])}}}),[["__scopeId","data-v-50a3cf13"]]),z4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='20.002'%20viewBox='0%200%2020%2020.002'%3e%3cg%20id='组_22313'%20data-name='组%2022313'%20transform='translate(-106.404%20-80.254)'%3e%3cpath%20id='路径_23519'%20data-name='路径%2023519'%20d='M209.607,82.221a1.53,1.53,0,0,1,2.154.006l1.077,1.077a1.533,1.533,0,0,1,.006,2.154L201.509,96.794h1.079l-4.316-4.316v1.079l11.335-11.335Zm-1.079-1.079L197.193,92.477a.763.763,0,0,0,0,1.079l4.316,4.316a.763.763,0,0,0,1.079,0l11.335-11.335a3.059,3.059,0,0,0-.006-4.312l-1.077-1.077a3.056,3.056,0,0,0-4.312-.006Zm-1.623,2.7,4.316,4.316,1.079-1.079-4.316-4.316L206.9,83.845Z'%20transform='translate(-88.406)'%20fill='%23333'/%3e%3cpath%20id='路径_23520'%20data-name='路径%2023520'%20d='M108.6,583.993l-2.158,6.475a.763.763,0,0,0,.965.965l6.474-2.158a.763.763,0,0,0,.3-1.263l-4.316-4.316a.763.763,0,0,0-1.263.3Zm1.448.483-1.263.3,4.316,4.316.3-1.263-6.474,2.158.965.965,2.158-6.474Z'%20transform='translate(0%20-491.217)'%20fill='%23333'/%3e%3c/g%3e%3c/svg%3e",P4={clearIcon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMC4yM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SAwIDAgMSAwIDEuMzg5SDYuOWE2Ljk0NSA2Ljk0NSAwIDAgMSAwLTEzLjg5eiIgZmlsbD0iI2MxYzFjMSIvPjxwYXRoIGRhdGEtbmFtZT0i55+p5b2iIDIzMTQ5IiBmaWxsPSJub25lIiBkPSJNMCAwaDIwdjIwSDB6Ii8+PC9zdmc+"},Kt=e=>P4[e],$4=e=>(t.pushScopeId("data-v-516516a5"),e=e(),t.popScopeId(),e),F4={class:"image-editor-box"},j4={key:0,class:"image-editor-controler"},U4={key:0,class:"image-editor-no_edit"},W4={key:1,class:"image-editor-editing"},H4={class:"left"},Y4=["src"],G4=["src"],K4=["src"],q4=[$4(()=>t.createElementVNode("div",null,"Confirm",-1))],Q4=gi(t.defineComponent({__name:"ImageEditor",setup(e){t.useCssVars(R=>({"455fdd5f":N.width,"4cccd4ae":N.height,b366f9a4:N.top,"2340194e":N.left}));const r=t.ref(hi()),a=ks().getImageEditor(),c=Br().getDocumentTemplate(),u=a.confirm,f=t.ref(null),m=t.ref(null),y=t.ref(null),g=t.reactive({x:0,y:0,width:0,height:0}),w=t.reactive({x:0,y:0}),b=t.reactive({isEditable:!1,clearIcon:Kt("clearDisableIcon"),undoIcon:Kt("undoDisableIcon"),redoIcon:Kt("redoDisableIcon"),ctx:null,isDrawing:!1,color:"#ff0000",stroke:"2",originImg:void 0,index:0,operateList:new Array,redoList:new Array,originImage:"",currentImage:"",saveImage:"",type:"",points:new Array,beginPoint:null}),M=R=>{let[L,V]=[R.offsetLeft,R.offsetTop];const j=se=>{V+=se.offsetTop,L+=se.offsetLeft,se.offsetParent&&j(se.offsetParent)};return R.offsetParent&&j(R.offsetParent),{left:L,top:V}},E=R=>{let{left:L,top:V}=R.getBoundingClientRect();return{left:L,top:V}},S=({i_width:R,i_height:L,c_width:V,c_height:j})=>{const se=R/L,me=V/j;switch(!0){case se>me:R=V,L=R/se;break;case se<me:L=j,R=L*se;break;case se==me:R=V,L=j;break}return{width:R,height:L}},N=t.reactive({top:"",left:"",width:"",height:""});t.onMounted(async()=>{let R=a.options.src;const L=R.split(/[:;]/);if(L.length===3?b.type=L[1]:b.type="image/png",r.value?(N.top="0",N.left="0",N.width="100vw",N.height="100vh"):c.relatedDom?(N.top=`${c.relatedDom.offsetTop}px`,N.left=`${c.relatedDom.offsetLeft}px`,N.width=`${c.relatedDom.clientWidth}px`,N.height=`${c.relatedDom.clientHeight}px`):(N.top="0",N.left="0",N.width="100vw",N.height="100vh"),f.value&&y.value){const V=f.value,j=V.getContext("2d",{willReadFrequently:!0});b.ctx=j,V.width=y.value.clientWidth,V.height=y.value.clientHeight;const se=V.width,me=V.height,pe=new Image;pe.src=R,pe.onload=()=>{j.clearRect(0,0,V.width,V.height);const Ee=pe.width,Te=pe.height,Se=S({i_width:Ee,i_height:Te,c_width:se,c_height:me});g.width=Se.width,g.height=Se.height,V.width=g.width,V.height=g.height,g.x=(V.width-g.width)/2,g.y=(V.height-g.height)/2,j==null||j.drawImage(pe,g.x,g.y,g.width,g.height);const ue=j==null?void 0:j.getImageData(0,0,V.width,V.height);ue&&(b.originImg=ue,b.operateList.push(ue),b.originImage=D(ue),b.currentImage=b.originImage,b.saveImage=b.originImage)}}});const k=async()=>{if(b.saveImage!==b.originImage){const R=ha.service({target:c.relatedDom||document.body});await u(a.options.dataKey,b.saveImage,b.type),R.close()}a.close()},A=R=>{R.target===m.value&&a.close()},B=()=>{b.operateList[b.index]!==b.originImg?b.clearIcon=Kt("clearIcon"):b.clearIcon=Kt("clearDisableIcon"),b.index>0?b.undoIcon=Kt("undoIcon"):b.undoIcon=Kt("undoDisableIcon"),b.redoList.length>0?b.redoIcon=Kt("redoIcon"):b.redoIcon=Kt("redoDisableIcon")},Y=()=>{var L;const R=(L=b.ctx)==null?void 0:L.getImageData(g.x,g.y,g.width,g.height);b.currentImage=D(R),B()},D=R=>{const L=document.createElement("canvas");L.width=R.width,L.height=R.height;const V=L.getContext("2d");return V==null||V.putImageData(R,0,0),L.toDataURL().split(",")[1]},Q=R=>{if(f.value){R.preventDefault(),R.stopPropagation();const L=b.ctx;if(L.strokeStyle=b.color,L.lineWidth=parseInt(b.stroke),b.isDrawing=!0,r.value){const{left:V,top:j}=E(f.value);R=R,w.x=R.targetTouches[0].clientX-V,w.y=R.targetTouches[0].clientY-j,b.points.push({x:w.x,y:w.y})}else{const{left:V,top:j}=M(f.value);R=R,w.x=R.clientX-V,w.y=R.clientY-j,b.points.push({x:w.x,y:w.y})}}},H=(R,L,V)=>{const j=b.ctx;j.beginPath(),j.moveTo(R.x,R.y),j.quadraticCurveTo(L.x,L.y,V.x,V.y),j.stroke(),j.closePath()},ne=R=>{var L;if(f.value&&(R.preventDefault(),R.stopPropagation(),f.value.style.cursor="auto",b.isDrawing)){if(r.value){const{left:se,top:me}=E(f.value);R=R;const pe=R.changedTouches[0].clientX-se,Ee=R.changedTouches[0].clientY-me;b.points.push({x:pe,y:Ee})}else{const{left:se,top:me}=M(f.value);R=R;const pe=R.clientX-se,Ee=R.clientY-me;b.points.push({x:pe,y:Ee})}if(b.points.length>3){const se=b.points.slice(-2),me=se[0],pe=se[1];b.beginPoint&&H(b.beginPoint,me,pe)}b.beginPoint=null,b.points=[];const V=b.ctx;V==null||V.closePath();const j=(L=b.ctx)==null?void 0:L.getImageData(g.x,g.y,g.width,g.height);b.operateList.push(j),b.redoList=new Array,b.index++}b.isDrawing=!1,Y()},q=R=>{if(f.value&&(R.preventDefault(),R.stopPropagation(),b.isDrawing)){if(r.value){const{left:L,top:V}=E(f.value);R=R;const j=R.targetTouches[0].clientX-L,se=R.targetTouches[0].clientY-V;b.points.push({x:j,y:se})}else{const{left:L,top:V}=M(f.value);R=R;const j=R.clientX-L,se=R.clientY-V;b.points.push({x:j,y:se})}if(b.points.length>3){const L=b.points.slice(-2),V=L[0],j={x:(L[0].x+L[1].x)/2,y:(L[0].y+L[1].y)/2};b.beginPoint&&H(b.beginPoint,V,j),b.beginPoint=j}}},G=()=>{if(f.value){const R=f.value;r.value?(R.addEventListener("touchstart",Q),R.addEventListener("touchend",ne),R.addEventListener("touchcancel",ne),R.addEventListener("touchmove",q)):(R.addEventListener("mousedown",Q),R.addEventListener("mouseup",ne),R.addEventListener("mouseleave",ne),R.addEventListener("mousemove",q)),b.isEditable=!0}},U=()=>{if(f.value){const R=f.value;R.removeEventListener("mousedown",Q),R.removeEventListener("mouseup",ne),R.removeEventListener("mouseleave",ne),R.removeEventListener("mousemove",q),b.isEditable=!1,b.saveImage=b.currentImage}},te=()=>{const R=b.ctx;R&&b.originImg&&(b.index++,b.operateList.push(b.originImg),b.redoList=new Array,R.putImageData(b.originImg,g.x,g.y),Y())},he=()=>{var L;const R=b.operateList.pop();b.redoList.push(R),b.index--,b.redoIcon=Kt("redoIcon"),(L=b.ctx)==null||L.putImageData(b.operateList[b.index],g.x,g.y),Y()},ae=()=>{var L;const R=b.redoList.pop();b.operateList.push(R),b.index++,(L=b.ctx)==null||L.putImageData(R,g.x,g.y),Y()};return(R,L)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{ref_key:"editorView",ref:m,class:t.normalizeClass(r.value?"image-editor-view image-editor-view-mobile":"image-editor-view image-editor-view-ps"),onClick:A},[t.createElementVNode("div",F4,[t.createElementVNode("img",{class:"image-editor-close_icon",src:ih,onClick:k}),t.createElementVNode("div",{ref_key:"editorBox",ref:y,class:"image-editor-console-box"},[t.createElementVNode("canvas",{class:"image-editor-console",ref_key:"editorDom",ref:f},null,512)],512),t.unref(a).options.markable?(t.openBlock(),t.createElementBlock("div",j4,[b.isEditable?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",U4,[t.createElementVNode("img",{src:z4,class:"image-editor-editImg",onClick:G})])),b.isEditable?(t.openBlock(),t.createElementBlock("div",W4,[t.createElementVNode("div",H4,[t.withDirectives(t.createElementVNode("input",{class:"image-editor-color",type:"color","onUpdate:modelValue":L[0]||(L[0]=V=>b.color=V)},null,512),[[t.vModelText,b.color]]),t.withDirectives(t.createElementVNode("input",{class:"image-editor-stroke",type:"range",min:"1",max:"15","onUpdate:modelValue":L[1]||(L[1]=V=>b.stroke=V)},null,512),[[t.vModelText,b.stroke]]),t.createElementVNode("img",{class:"image-editor-clear",src:b.clearIcon,onClick:L[2]||(L[2]=V=>b.clearIcon==t.unref(Kt)("clearIcon")&&te())},null,8,Y4),t.createElementVNode("img",{class:"image-editor-undo",src:b.undoIcon,onClick:L[3]||(L[3]=V=>b.undoIcon==t.unref(Kt)("undoIcon")&&he())},null,8,G4),t.createElementVNode("img",{class:"image-editor-redo",src:b.redoIcon,onClick:L[4]||(L[4]=V=>b.redoIcon==t.unref(Kt)("redoIcon")&&ae())},null,8,K4)]),t.createElementVNode("div",{class:"right"},[t.createElementVNode("div",{class:"image-editor-comfirm",onClick:U},q4)])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])],2)]))}}),[["__scopeId","data-v-516516a5"]]),Z4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='6'%20height='6'%20viewBox='0%200%206%206'%3e%3ccircle%20id='椭圆_711'%20data-name='椭圆%20711'%20cx='3'%20cy='3'%20r='3'%20fill='%23005795'/%3e%3c/svg%3e",uh=e=>(t.pushScopeId("data-v-5ee3d8d8"),e=e(),t.popScopeId(),e),X4={class:"recommend-diagnoses"},J4=uh(()=>t.createElementVNode("div",{class:"header"},null,-1)),eM=uh(()=>t.createElementVNode("div",{class:"recommend-diagnoses-title"},[t.createElementVNode("img",{class:"recommend-diagnoses-title_icon",src:Z4}),t.createElementVNode("span",{class:"recommend-diagnoses-title_text"},"Recommend Diagnoses")],-1)),tM={class:"recommend-diagnoses-list"},nM={class:"recommend-diagnoses-item"},rM={class:"recommend-diagnoses-item-code"},oM={class:"recommend-diagnosis-item-comment"},iM={class:"recommend-diagnoses-confirm"},aM=gi(t.defineComponent({__name:"RecommendDiagnosis",setup(e){t.useCssVars(A=>({"67c4d826":E.width,c4742040:E.height,"6282853c":E.top,"246b4e00":E.left}));const r=t.ref(hi()),a=Br().getDocumentTemplate(),l=a.ecos,c=a.info,f=Ms().getRecommendDiagnosis(),m=t.reactive([]),y=t.reactive(f.options.formData),g=t.ref(!1),w=t.ref(null),b=f.cache;let M="";const E=t.reactive({top:"",left:"",width:"",height:""});t.onMounted(async()=>{const B=Br().getDocumentTemplate();B.relatedDom?(E.top=`${B.relatedDom.offsetTop}px`,E.left=`${B.relatedDom.offsetLeft}px`,E.width=`${B.relatedDom.clientWidth}px`,E.height=`${B.relatedDom.clientHeight}px`):(E.top="0",E.left="0",E.width="100vw",E.height="100vh");const Y=ha.service({target:B.relatedDom||document.body}),D=y.Diagnosis,Q=new Set(D.map(q=>q.code));let H=[];if(b.hasCache)H=b.list;else{const q=await l.retrieveDocument({idList:[c.facilityId,...c.locationIds,c.patientId],options:{ObjType:28,sfname:'{"result":"D.*", "join": "INNER JOIN Edge E on E.id=D.reid INNER JOIN Edge E2 on E.refid=E2.id"}',xfname:"(E.bvid,E2.Bvid) | (E.evid,E2.Bvid)",scondition:"E.type=40000 AND E.subtype&0xff=6 AND E2.type=40000 AND E2.subtype&0xff in(1,9) AND D.type=186881",asc:!1,obfname:"D.ctime",maxcount:100}});if(q.code===0){let G=[];q.document.forEach(U=>{const te=U.name.data.diagnosis.descriptiveList;G=G.concat(te)}),b.hasCache=!0,b.list=Rn.cloneDeep(G),H=G}else b.hasCache=!0,b.list=[],H=[]}H.forEach(q=>{Q.has(q.code)?q.isChecked=!0:q.isChecked=!1});let ne=new Set;H=H.filter(q=>ne.has(q.code)?!1:(ne.add(q.code),!0)),H.forEach(q=>{q.isChecked?M+="1":M+="0",m.push(q)}),Y.close()}),t.watch(m,()=>{let A="";m.forEach(B=>{B.isChecked?A+="1":A+="0"}),g.value=M!==A});const S=()=>{f.close()},N=A=>{A.target===w.value&&f.close()},k=async()=>{};return(A,B)=>{const Y=sp,D=br;return t.openBlock(),t.createElementBlock("div",{ref_key:"diagnosisView",ref:w,class:t.normalizeClass(r.value?"recommend-diagnoses-view recommend-diagnoses-mobile":"recommend-diagnoses-view"),onClick:N},[t.createElementVNode("div",X4,[J4,t.createElementVNode("div",{class:"recommend-diagnoses-close"},[t.createElementVNode("img",{class:"recommend-diagnoses-close_icon",src:ch,onClick:S})]),eM,t.createElementVNode("div",tM,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m,Q=>(t.openBlock(),t.createElementBlock("div",nM,[t.createElementVNode("div",rM,[t.createVNode(Y,{modelValue:Q.isChecked,"onUpdate:modelValue":H=>Q.isChecked=H},null,8,["modelValue","onUpdate:modelValue"]),t.createTextVNode(" "+t.toDisplayString(Q.code)+" - "+t.toDisplayString(Q.description),1)]),t.createElementVNode("div",oM,t.toDisplayString(Q.comment),1)]))),256))]),t.createElementVNode("div",iM,[t.createVNode(D,{class:t.normalizeClass(`
|
|
77
77
|
recommend-diagnoses-button
|
|
78
78
|
${g.value?"recommend-diagnoses-button-able":"recommend-diagnoses-button-disable"}
|
|
79
|
-
`),onClick:k},{default:t.withCtx(()=>[t.createTextVNode("Confirm")]),_:1},8,["class"])])])],2)}}}),[["__scopeId","data-v-5ee3d8d8"]]),fh=t.defineComponent({__name:"DocumentTemplate",props:{json:{type:Array,required:!0,default:{}},formData:{type:Object,require:!0,default:{}},isEditable:{type:Boolean,default:!0,required:!0}},setup(e){const o=Br().getDocumentTemplate(),l=xs().getCalendarPciker(),u=Is().getSignaturePad(),m=ks().getImageEditor(),g=Ms().getRecommendDiagnosis(),w=e,b=w.formData,M=w.json,E=w.isEditable,S=o.ecos,N=o.role,k=o.docType,A=o.info;u.confirm=async(q,G,U=345601,te)=>{var me,pe,Ee,Te,Se,ue;const ae=lh(G,"image/png");let R="",L="",V="",j="";if(te===wn.provider){R=((me=A.providerSignatureInfo)==null?void 0:me.eid)||"",V=((pe=A.providerSignatureInfo)==null?void 0:pe.fid)||"",L=Rn.get(b,q);const fe=await S.retrieveDocument({idList:[L]});fe.code===0&&fe.document.length&&(j=fe.document[0].name.title),await S.createEdge({bvid:(Ee=A.providerSignatureInfo)==null?void 0:Ee.vid,type:1030})}else te===wn.patient&&(R=((Te=A.patientSignatureInfo)==null?void 0:Te.eid)||"",V=((Se=A.patientSignatureInfo)==null?void 0:Se.fid)||"",await S.createEdge({bvid:(ue=A.patientSignatureInfo)==null?void 0:ue.vid,type:1030}));const se=await S.createDocument({atimes:-10,id:L,eid:R,type:U,name:{data:ae,title:j}});if(se.code===0){const fe=se.document;Rn.set(b,q,fe.id),te===wn.provider?(await S.createEdge({bvid:V,type:1030}),B.otherData.providerSignature=await H(fe.id)):te===wn.patient&&(B.otherData.patientSignature=await H(fe.id))}},m.confirm=async(q,G,U)=>{const te=lh(G,U),he=await S.createDocument({atimes:-10,eid:A.rootNotebookID,type:430081,name:{data:te,type:U},subtype:{isEditable:!0}});if(he.code===0){const ae=he.document;Rn.set(b,q,ae.id)}};const B=t.reactive({formData:b,json:M,isEditable:E,role:N,docType:k,otherData:{providerSignature:"",patientSignature:""},otherTableInfo:{}});zg(B.formData);const Y=t.ref(B.role.toString()===B.docType.toString()),D=t.ref(B.role===wn.provider),Q=t.ref(B.role===wn.patient),H=async q=>{if(S){const G=await S.retrieveDocument({idList:[q]});if(G.code===0&&G.document.length>0){const U=G.document[0];return
|
|
79
|
+
`),onClick:k},{default:t.withCtx(()=>[t.createTextVNode("Confirm")]),_:1},8,["class"])])])],2)}}}),[["__scopeId","data-v-5ee3d8d8"]]),fh=t.defineComponent({__name:"DocumentTemplate",props:{json:{type:Array,required:!0,default:{}},formData:{type:Object,require:!0,default:{}},isEditable:{type:Boolean,default:!0,required:!0}},setup(e){const o=Br().getDocumentTemplate(),l=xs().getCalendarPciker(),u=Is().getSignaturePad(),m=ks().getImageEditor(),g=Ms().getRecommendDiagnosis(),w=e,b=w.formData,M=w.json,E=w.isEditable,S=o.ecos,N=o.role,k=o.docType,A=o.info;u.confirm=async(q,G,U=345601,te)=>{var me,pe,Ee,Te,Se,ue;const ae=lh(G,"image/png");let R="",L="",V="",j="";if(te===wn.provider){R=((me=A.providerSignatureInfo)==null?void 0:me.eid)||"",V=((pe=A.providerSignatureInfo)==null?void 0:pe.fid)||"",L=Rn.get(b,q);const fe=await S.retrieveDocument({idList:[L]});fe.code===0&&fe.document.length&&(j=fe.document[0].name.title),await S.createEdge({bvid:(Ee=A.providerSignatureInfo)==null?void 0:Ee.vid,type:1030})}else te===wn.patient&&(R=((Te=A.patientSignatureInfo)==null?void 0:Te.eid)||"",V=((Se=A.patientSignatureInfo)==null?void 0:Se.fid)||"",await S.createEdge({bvid:(ue=A.patientSignatureInfo)==null?void 0:ue.vid,type:1030}));const se=await S.createDocument({atimes:-10,id:L,eid:R,type:U,name:{data:ae,title:j}});if(se.code===0){const fe=se.document;Rn.set(b,q,fe.id),te===wn.provider?(await S.createEdge({bvid:V,type:1030}),B.otherData.providerSignature=await H(fe.id)):te===wn.patient&&(B.otherData.patientSignature=await H(fe.id))}},m.confirm=async(q,G,U)=>{const te=lh(G,U),he=await S.createDocument({atimes:-10,eid:A.rootNotebookID,type:430081,name:{data:te,type:U},subtype:{isEditable:!0}});if(he.code===0){const ae=he.document;Rn.set(b,q,ae.id)}};const B=t.reactive({formData:b,json:M,isEditable:E,role:N,docType:k,otherData:{providerSignature:"",patientSignature:""},otherTableInfo:{}});zg(B.formData);const Y=t.ref(B.role.toString()===B.docType.toString()),D=t.ref(B.role===wn.provider),Q=t.ref(B.role===wn.patient),H=async q=>{if(S){const G=await S.retrieveDocument({idList:[q]});if(G.code===0&&G.document.length>0){const U=G.document[0];return T4({type:U.name.type,data:U.name.data})}else return""}else return""},ne=(q,G)=>{const U=new Array,te=he=>{if(Nl.isArray(he))he.forEach(ae=>{te(ae)});else if(Nl.isObject(he)&&"type"in he){switch(he.type){case"atblock":case"sharpblock":case"table":case"image":break;case"paragraph":default:te(he.children)}he.type===G&&U.push(he)}};return te(q),U};return t.onBeforeMount(()=>{ne(B.json,"image").forEach(async U=>{B.otherData[U.alt]=await H(B.formData[U.alt]),t.watch(()=>B.formData[U.alt],async te=>{B.otherData[U.alt]=await H(te)})}),ne(B.json,"table").forEach(U=>{const he=(U.width==="auto"?U.width:Cp.fullWidth)==="auto"?0:100,ae=new Array,R=U.children[0].children;if(B.otherTableInfo[U.key]={tableWidthArray:new Array,flexShrinks:new Array},R.forEach(L=>{he===0?ae.push(L!=null&&L.width&&(L==null?void 0:L.width)!=="auto"?parseFloat(L.width):30):ae.push(L!=null&&L.width&&(L==null?void 0:L.width)!=="auto"?parseFloat(L.width):Math.floor(1e4/R.length)/100)}),he===0){let L=0;ae.forEach(V=>{L+=V}),ae.forEach((V,j)=>{V===30?(B.otherTableInfo[U.key].tableWidthArray[j]=`${b.atrribute.noodl_font.tableMinWidth}`,B.otherTableInfo[U.key].flexShrinks[j]=0):(B.otherTableInfo[U.key].tableWidthArray[j]=`${100*Math.floor(100*V/L)/100}%`,B.otherTableInfo[U.key].flexShrinks[j]=1)})}else{let L=0,V=1;ae.forEach(j=>{j===Math.floor(1e4/R.length)/100?V-=j/100:L+=j}),ae.forEach((j,se)=>{j===Math.floor(1e4/R.length)/100?(B.otherTableInfo[U.key].tableWidthArray[se]=`calc(${j}%)`,B.otherTableInfo[U.key].flexShrinks[se]=0):(B.otherTableInfo[U.key].tableWidthArray[se]=`calc(${Math.floor(1e4*V*j/L)/100}%)`,B.otherTableInfo[U.key].flexShrinks[se]=1)})}}),Nl.isArray(B.formData.Diagnosis)||(B.formData.Diagnosis=[])}),t.onMounted(async()=>{B.otherData.providerSignature=await H(B.formData.signatureId),B.otherData.patientSignature=await H(B.formData.patdSignatureId)}),(q,G)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(Gl,{node:t.unref(M),formData:t.unref(b),isEditable:B.isEditable&&Y.value,providerEditability:B.isEditable&&D.value,patientEditability:B.isEditable&&Q.value,otherData:B.otherData,otherTableInfo:B.otherTableInfo},null,8,["node","formData","isEditable","providerEditability","patientEditability","otherData","otherTableInfo"]),t.unref(l).status?(t.openBlock(),t.createBlock(b4,{key:0})):t.createCommentVNode("",!0),t.unref(u).status?(t.openBlock(),t.createBlock(V4,{key:1})):t.createCommentVNode("",!0),t.unref(m).status?(t.openBlock(),t.createBlock(Q4,{key:2})):t.createCommentVNode("",!0),t.unref(g).status?(t.openBlock(),t.createBlock(aM,{key:3})):t.createCommentVNode("",!0)]))}}),sM=Nn.createPinia(),dh=e=>{e.use(sM),e.component("DocumentTemplate",fh)},lM={install:dh};yt.DocumentTemplate=fh,yt.aitmedTemplateRole=wn,yt.aitmedTemplateType=mu,yt.default=lM,yt.install=dh,yt.useDocumentTemplateStore=Br,Object.defineProperties(yt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|