1import{c4 as mt,r as f,U as Z,h as E,p as C,e as y,o as v,f as s,t as S,x as gt,V as K,b as wt,F as tt,i as et,n as N,k as yt,j as vt,E as H,Q as pt,w as Q,c as bt,g as Y,aL as xt}from"./NFnIG1Q0.js";import{a as $,v as kt}from"./DchqYG3-.js";const I=mt("viewportChatId",()=>{const t=f(""),e=f(""),n=f(""),a=f(!1);let r;function o(g){a.value=g}function c(g){t.value=g}function l(g){e.value=g}function h(g){n.value=g}return{lockTimeout:r,lockChatId:e,tempLock:a,navigateToChatId:n,chatId:t,changeChatInViewport:c,pageScrollChangeTo:h,changeTempLock:o,lockScrollChangeTo:l}}),qt=["id"],Tt={class:"py-4 font-bold first-letter: text-2xl text-gray-600"},Mt={__name:"ChatQuestion",props:{question:String,chatId:String},setup(t){const e=f(null),n=t,a=I();Z(()=>a.navigateToChatId,async(o,c)=>{if(o===n.chatId){const l=document.getElementById("answer-chat-id-"+o),h=l.offsetTop;l.getBoundingClientRect(),window.scrollTo({top:h,behavior:"smooth"})}});async function r(o){o===!0&&await a.changeChatInViewport(n.chatId)}return(o,c)=>E((v(),y("div",{id:"answer-chat-id-"+t.chatId,ref_key:"target",ref:e},[s("h1",Tt,S(t.question),1)],8,qt)),[[C($),[r,{scrollTarget:C(e)}]]])}};function p(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function q(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const nt=6048e5,Ct=864e5;let Ot={};function L(){return Ot}function _(t,e){const n=L(),a=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=p(t),o=r.getDay(),c=(o<a?7:0)+o-a;return r.setDate(r.getDate()-c),r.setHours(0,0,0,0),r}function F(t){return _(t,{weekStartsOn:1})}function at(t){const e=p(t),n=e.getFullYear(),a=q(t,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const r=F(a),o=q(t,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const c=F(o);return e.getTime()>=r.getTime()?n+1:e.getTime()>=c.getTime()?n:n-1}function R(t){const e=p(t);return e.setHours(0,0,0,0),e}function A(t){const e=p(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function Pt(t,e){const n=R(t),a=R(e),r=+n-A(n),o=+a-A(a);return Math.round((r-o)/Ct)}function St(t){const e=at(t),n=q(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),F(n)}function _t(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Dt(t){if(!_t(t)&&typeof t!="number")return!1;const e=p(t);return!isNaN(Number(e))}function Wt(t){const e=p(t),n=q(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Yt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Et=(t,e,n)=>{let a;const r=Yt[t];return typeof r=="string"?a=r:e===1?a=r.one:a=r.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function B(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Ft={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},It={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Lt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Nt={date:B({formats:Ft,defaultWidth:"full"}),time:B({formats:It,defaultWidth:"full"}),dateTime:B({formats:Lt,defaultWidth:"full"})},Bt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ht=(t,e,n,a)=>Bt[t];function O(t){return(e,n)=>{const a=n?.context?String(n.context):"standalone";let r;if(a==="formatting"&&t.formattingValues){const c=t.defaultFormattingWidth||t.defaultWidth,l=n?.width?String(n.width):c;r=t.formattingValues[l]||t.formattingValues[c]}else{const c=t.defaultWidth,l=n?.width?String(n.width):t.defaultWidth;r=t.values[l]||t.values[c]}const o=t.argumentCallback?t.argumentCallback(e):e;return r[o]}}const $t={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Vt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},jt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},zt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"]},Qt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Rt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},At=(t,e)=>{const n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Xt={ordinalNumber:At,era:O({values:$t,defaultWidth:"wide"}),quarter:O({values:Vt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:jt,defaultWidth:"wide"}),day:O({values:zt,defaultWidth:"wide"}),dayPeriod:O({values:Qt,defaultWidth:"wide",formattingValues:Rt,defaultFormattingWidth:"wide"})};function P(t){return(e,n={})=>{const a=n.width,r=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],o=e.match(r);if(!o)return null;const c=o[0],l=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth],h=Array.isArray(l)?Jt(l,u=>u.test(c)):Gt(l,u=>u.test(c));let g;g=t.valueCallback?t.valueCallback(h):h,g=n.valueCallback?n.valueCallback(g):g;const m=e.slice(c.length);return{value:g,rest:m}}}function Gt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Jt(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Ut(t){return(e,n={})=>{const a=e.match(t.matchPattern);if(!a)return null;const r=a[0],o=e.match(t.parsePattern);if(!o)return null;let c=t.valueCallback?t.valueCallback(o[0]):o[0];c=n.valueCallback?n.valueCallback(c):c;const l=e.slice(r.length);return{value:c,rest:l}}}const Zt=/^(\d+)(th|st|nd|rd)?/i,Kt=/\d+/i,te={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ee={any:[/^b/i,/^(a|c)/i]},ne={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ae={any:[/1/i,/2/i,/3/i,/4/i]},re={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},oe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},se={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ie={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ce={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ue={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},de={ordinalNumber:Ut({matchPattern:Zt,parsePattern:Kt,valueCallback:t=>parseInt(t,10)}),era:P({matchPatterns:te,defaultMatchWidth:"wide",parsePatterns:ee,defaultParseWidth:"any"}),quarter:P({matchPatterns:ne,defaultMatchWidth:"wide",parsePatterns:ae,defaultParseWidth:"any",valueCallback:t=>t+1}),month:P({matchPatterns:re,defaultMatchWidth:"wide",parsePatterns:oe,defaultParseWidth:"any"}),day:P({matchPatterns:se,defaultMatchWidth:"wide",parsePatterns:ie,defaultParseWidth:"any"}),dayPeriod:P({matchPatterns:ce,defaultMatchWidth:"any",parsePatterns:ue,defaultParseWidth:"any"})},le={code:"en-US",formatDistance:Et,formatLong:Nt,formatRelative:Ht,localize:Xt,match:de,options:{weekStartsOn:0,firstWeekContainsDate:1}};function he(t){const e=p(t);return Pt(e,Wt(e))+1}function fe(t){const e=p(t),n=+F(e)-+St(e);return Math.round(n/nt)+1}function rt(t,e){const n=p(t),a=n.getFullYear(),r=L(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,c=q(t,0);c.setFullYear(a+1,0,o),c.setHours(0,0,0,0);const l=_(c,e),h=q(t,0);h.setFullYear(a,0,o),h.setHours(0,0,0,0);const g=_(h,e);return n.getTime()>=l.getTime()?a+1:n.getTime()>=g.getTime()?a:a-1}function me(t,e){const n=L(),a=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=rt(t,e),o=q(t,0);return o.setFullYear(r,0,a),o.setHours(0,0,0,0),_(o,e)}function ge(t,e){const n=p(t),a=+_(n,e)-+me(n,e);return Math.round(a/nt)+1}function d(t,e){const n=t<0?"-":"",a=Math.abs(t).toString().padStart(e,"0");return n+a}const x={y(t,e){const n=t.getFullYear(),a=n>0?n:1-n;return d(e==="yy"?a%100:a,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):d(n+1,2)},d(t,e){return d(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(t,e){return d(t.getHours()%12||12,e.length)},H(t,e){return d(t.getHours(),e.length)},m(t,e){return d(t.getMinutes(),e.length)},s(t,e){return d(t.getSeconds(),e.length)},S(t,e){const n=e.length,a=t.getMilliseconds(),r=Math.trunc(a*Math.pow(10,n-3));return d(r,e.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}
1,X={G:function(t,e,n){const a=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});default:return n.era(a,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const a=t.getFullYear(),r=a>0?a:1-a;return n.ordinalNumber(r,{unit:"year"})}return x.y(t,e)},Y:function(t,e,n,a){const r=rt(t,a),o=r>0?r:1-r;if(e==="YY"){const c=o%100;return d(c,2)}return e==="Yo"?n.ordinalNumber(o,{unit:"year"}):d(o,e.length)},R:function(t,e){const n=at(t);return d(n,e.length)},u:function(t,e){const n=t.getFullYear();return d(n,e.length)},Q:function(t,e,n){const a=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(a);case"QQ":return d(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,e,n){const a=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(a);case"qq":return d(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,e,n){const a=t.getMonth();switch(e){case"M":case"MM":return x.M(t,e);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,e,n){const a=t.getMonth();switch(e){case"L":return String(a+1);case"LL":return d(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,e,n,a){const r=ge(t,a);return e==="wo"?n.ordinalNumber(r,{unit:"week"}):d(r,e.length)},I:function(t,e,n){const a=fe(t);return e==="Io"?n.ordinalNumber(a,{unit:"week"}):d(a,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):x.d(t,e)},D:function(t,e,n){const a=he(t);return e==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):d(a,e.length)},E:function(t,e,n){const a=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,e,n,a){const r=t.getDay(),o=(r-a.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return d(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,n,a){const r=t.getDay(),o=(r-a.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return d(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,n){const a=t.getDay(),r=a===0?7:a;switch(e){case"i":return String(r);case"ii":return d(r,e.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,e,n){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const a=t.getHours();let r;switch(a===12?r=M.noon:a===0?r=M.midnight:r=a/12>
1=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){const a=t.getHours();let r;switch(a>=17?r=M.evening:a>=12?r=M.afternoon:a>=4?r=M.morning:r=M.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let a=t.getHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return x.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):x.H(t,e)},K:function(t,e,n){const a=t.getHours()%12;return e==="Ko"?n.ordinalNumber(a,{unit:"hour"}):d(a,e.length)},k:function(t,e,n){let a=t.getHours();return a===0&&(a=24),e==="ko"?n.ordinalNumber(a,{unit:"hour"}):d(a,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):x.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):x.s(t,e)},S:function(t,e){return x.S(t,e)},X:function(t,e,n){const a=t.getTimezoneOffset();if(a===0)return"Z";switch(e){case"X":return J(a);case"XXXX":case"XX":return k(a);default:return k(a,":")}},x:function(t,e,n){const a=t.getTimezoneOffset();switch(e){case"x":return J(a);case"xxxx":case"xx":return k(a);default:return k(a,":")}},O:function(t,e,n){const a=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+G(a,":");default:return"GMT"+k(a,":")}},z:function(t,e,n){const a=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+G(a,":");default:return"GMT"+k(a,":")}},t:function(t,e,n){const a=Math.trunc(t.getTime()/1e3);return d(a,e.length)},T:function(t,e,n){const a=t.getTime();return d(a,e.length)}};function G(t,e=""){const n=t>0?"-":"+",a=Math.abs(t),r=Math.trunc(a/60),o=a%60;return o===0?n+String(r):n+String(r)+e+d(o,2)}function J(t,e){return t%60===0?(t>0?"-":"+")+d(Math.abs(t)/60,2):k(t,e)}function k(t,e=""){const n=t>0?"-":"+",a=Math.abs(t),r=d(Math.trunc(a/60),2),o=d(a%60,2);return n+r+e+o}const U=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},ot=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},we=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],a=n[1],r=n[2];if(!r)return U(t,e);let o;switch(a){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",U(a,e)).replace("{{time}}",ot(r,e))},ye={p:ot,P:we},ve=/^D+$/,pe=/^Y+$/,be=["D","DD","YY","YYYY"];function xe(t){return ve.test(t)}function ke(t){return pe.test(t)}function qe(t,e,n){const a=Te(t,e,n);if(console.warn(a),be.includes(t))throw new RangeError(a)}function Te(t,e,n){const a=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${a} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Me=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ce=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Oe=/^'([^]*?)'?$/,Pe=/''/g,Se=/[a-zA-Z]/;function _e(t,e,n){const a=L(),r=n?.locale??a.locale??le,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,c=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,l=p(t);if(!Dt(l))throw new RangeError("Invalid time value");let h=e.match(Ce).map(m=>{const u=m[0];if(u==="p"||u==="P"){const i=ye[u];return i(m,r.formatLong)}return m}).join("").match(Me).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const u=m[0];if(u==="'")return{isToken:!1,value:De(m)};if(X[u])return{isToken:!0,value:m};
1if(u.match(Se))throw new RangeError("Format string contains an unescaped latin alphabet character `"+u+"`");return{isToken:!1,value:m}});r.localize.preprocessor&&(h=r.localize.preprocessor(l,h));const g={firstWeekContainsDate:o,weekStartsOn:c,locale:r};return h.map(m=>{if(!m.isToken)return m.value;const u=m.value;(!n?.useAdditionalWeekYearTokens&&ke(u)||!n?.useAdditionalDayOfYearTokens&&xe(u))&&qe(u,e,String(t));const i=X[u[0]];return i(l,u,r.localize,g)}).join("")}function De(t){const e=t.match(Oe);return e?e[1].replace(Pe,"'"):t}const We={class:"relative"},Ye=["innerHTML"],Ee={class:"w-full flex text-gray-600 py-4 px-2"},Fe={class:"text-left flex-1"},Ie={class:"text-right justify-end"},Le=["href"],Ne=["src"],Be={__name:"ChatAnswer",props:{answer:String,question:String,questionDate:String,chatDomain:String,chatUrl:String,chatId:String},setup(t){const e=f(null),n=f(null),a=t,r=f("");Intl.DateTimeFormat().resolvedOptions().timeZone;const o=I();async function c(l){l===!0&&await o.changeChatInViewport(a.chatId)}return r.value=_e(a.questionDate,"dd MMMM yyyy hh:mm aaaa",{}),(l,h)=>(v(),y("div",We,[E(s("div",{style:{position:"absolute",top:"50%",width:"1px",height:"1px"},ref_key:"target",ref:e},null,512),[[C($),[c,{scrollTarget:e.value}]]]),E(s("div",{style:{position:"absolute",top:"75%",width:"1px",height:"1px"},ref_key:"target2",ref:n},null,512),[[C($),[c,{scrollTarget:n.value}]]]),s("div",{innerHTML:t.answer,class:"answer-content py-4 text-2xl text-gray-400 border border-gray-200 dark:border-gray-600 rounded-lg"},null,8,Ye),s("div",Ee,[s("div",Fe,S(r.value),1),s("div",Ie,[s("a",{href:t.chatUrl+"#:~:text="+t.question.trim(),class:"flex underline"},[gt("continue chat on "+S(t.chatDomain)+" ",1),s("img",{class:"block ml-2",style:{height:"20px"},src:"https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://"+t.chatDomain+"&size=20"},null,8,Ne)],8,Le)])])]))}},He={class:"sticky top-0",style:{position:"sticky",top:"16px","z-index":"1"}},$e={class:"border-gray-200 bg-white dark:border-gray-600 rounded-lg border sticky top-0"},Ve={class:"w-full flex bg-slate-200 text-gray-600 p-2"},je={class:"text-left flex-1 flex"},ze={class:"ml-2"},Qe=["id","onClick"],Re=["href"],Ae={class:"flex items-center justify-center mr-1 text-gray-300"},Xe=["onClick"],Ge={class:"flex-1 question text-sm"},Je={class:"flex"},Ue={key:0,class:"bg-zinc-100 py-2 px-1 text-zinc-700 flex items-center justify-center"},Ze=["href"],Ke={style:{transform:"rotate(-90deg)"},xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24"},tn={class:"bg-zinc-100 py-2 px-1 text-zinc-700 flex items-center justify-center"},en={key:0},nn={key:1},an={__name:"ChatSessionChats",props:{chatId:String,conversationTitle:String,conversationId:String,conversationSession:Number,chatDomain:String,sessionChats:Array,viewType:String,sessionOrderBy:String},setup(t){const e=t,n=f(null),a=f(null);K(async()=>{a.value=!0,o(e.chatId)});const r=I();function o(u){const i=document.getElementById("chat-id-"+u);if(n.value&&i){const w=i.offsetTop,T=i.getBoundingClientRect();n.value.scrollTo({top:w-T.height,behavior:"smooth"})}}Z(()=>r.chatId,async(u,i)=>{o(u)});const c=wt(()=>r.lockChatId!==""?r.lockChatId:e.viewType==="session"?r.chatId:e.chatId);function l(u,i){e.viewType==="session"&&(r.pageScrollChangeTo(i),r.lockScrollChangeTo(i),r.changeTempLock(!0),clearTimeout(r.lockTimeout),r.lockTimeout=setTimeout(()=>{r.changeTempLock(!1)},1e3),u.stopPropagation(),u.preventDefault())}const h=f(!1);function g(){h.value=!1}async function m(u){await H(`/api/v1/sessionListSortBy?sortBy=${u}`,"$RiwmdwyPtd"),location.reload()}return(u,i)=>(v(),y("div",He,[s("div",$e,[s("div",Ve,[s("div",je,[i[3]||(i[3]=s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",height:"27",viewBox:"0 -960 960 960",width:"27"},[s("path",{d:"M280-240q-17 0-28.5-11.5T240-280v-80h520v-360h80q17 0 28.5 11.5T880-680v600L720-240H280ZM80-280v-560q0-17 11.5-28.5T120-880h520q17 0 28.5 11.5T680-840v360q0 17-11.5 28.5T640-440H240L80-280Zm520-240v-280H160v280h440Zm-440 0v-280 280Z"}
1)],-1)),s("b",ze,S(t.conversationTitle),1)])]),s("div",{ref_key:"outerContainer",ref:n,class:"py-4 px-4 text-2xl text-gray-400 overflow-auto scrollbar-thin",style:{"max-height":"calc(100vh - 160px)"}},[(v(!0),y(tt,null,et(t.sessionChats,(w,T)=>(v(),y("div",{key:"q-"+T,id:"chat-id-"+w.chat_id,onClick:D=>l(D,w.chat_id)},[s("a",{class:N(["cursor-pointer flex items-center px-4 py-2 mb-2 text-gray-600 transition-colors duration-200 transform rounded-md dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 dark:hover:text-gray-200 hover:text-gray-700",{"active-chat":w.chat_id===c.value}]),href:"/chat/"+w.chat_id},[s("span",Ae,[(v(),y("svg",{class:N([{"text-blue-400":w.favorite},"cursor-pointer hover:text-blue-400 dark:text-white"]),onClick:yt(D=>u.favoriteChat(u.chat.conversation_session,w.chat_id,w.favorite),["prevent","stop"]),style:{transform:"translateX(-5px)"},height:"20","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[...i[4]||(i[4]=[s("path",{d:"M13.8 4.2a2 2 0 0 0-3.6 0L8.4 8.4l-4.6.3a2 2 0 0 0-1.1 3.5l3.5 3-1 4.4c-.5 1.7 1.4 3 2.9 2.1l3.9-2.3 3.9 2.3c1.5 1 3.4-.4 3-2.1l-1-4.4 3.4-3a2 2 0 0 0-1.1-3.5l-4.6-.3-1.8-4.2Z"},null,-1)])],10,Xe))]),s("span",Ge,S(w.question),1)],10,Re)],8,Qe))),128))],512)]),s("div",Je,[t.viewType==="chat"?(v(),y("main",Ue,[s("a",{href:"/chat/conversation/"+t.conversationId+"?session="+t.conversationSession,class:"rounded-lg border border-zinc-200 max p-2 flex flex-row items-center justify-center bg-white gap-2"},[(v(),y("svg",Ke,[...i[5]||(i[5]=[s("path",{fill:"currentColor",d:"m12 10.8l-3.9 3.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275z"},null,-1)])])),i[6]||(i[6]=s("span",null,"All Chats",-1))],8,Ze)])):vt("",!0),E((v(),y("main",tn,[s("div",{onClick:i[2]||(i[2]=w=>
1h.value=!h.value),class:"cursor-pointer relative group transition-all duration-200 w-36 h-max p-2 flex flex-row items-center justify-center bg-white gap-2 rounded-lg border border-zinc-200"},[i[10]||(i[10]=s("svg",{height:"12",viewBox:"0 0 1024 1408",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[s("path",{d:"M1024 896q0 26-19 45l-448 448q-19 19-45 19t-45-19L19 941Q0 922 0 896t19-45t45-19h896q26 0 45 19t19 45zm0-384q0 26-19 45t-45 19H64q-26 0-45-19T0 512t19-45L467 19q19-19 45-19t45 19l448 448q19 19 19 45z",fill:"currentColor"})],-1)),t.sessionOrderBy==="desc"?(v(),y("span",en," Last Chat ")):(v(),y("span",nn,"First Chat")),i[11]||(i[11]=s("svg",{class:"rotate-90 group-focus:rotate-180",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24"},[s("path",{fill:"currentColor",d:"m12 10.8l-3.9 3.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275z"})],-1)),s("div",{class:N([{block:h.value,hidden:!h.value},"absolute shadow-lg bottom-12 left-0 w-full h-max p-2 bg-white border border-zinc-200 rounded-lg flex-col gap-2"])},[i[9]||(i[9]=s("span",{class:"flex flex-row gap-0 items-center bg-zinc-300 p-2 rounded-lg"},[s("p",null,"Order Chats By")],-1)),s("span",{onClick:i[0]||(i[0]=w=>m("asc")),class:"flex flex-row gap-2 items-center hover:bg-zinc-100 p-2 rounded-lg"},[...i[7]||(i[7]=[s("svg",{width:"20",viewBox:"0 0 1472 1792",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[s("path",{d:"M1314 1313q0-63-44-116t-103-53q-52 0-83 37t-31 94t36.5 95t104.5 38q50 0 85-27t35-68zm-610 127q0 12-10 24l-319 319q-10 9-23 9q-12 0-23-9L9 1463q-15-16-7-35q8-20 30-20h192V32q0-14 9-23t23-9h192q14 0 23 9t9 23v1376h192q14 0 23 9t9 23zm750-69q0 62-13 121.5t-41 114t-68 95.5t-98.5 65.5T1106 1792q-62 0-108-16q-24-8-42-15l39-113q15 7 31 11q37 13 75 13q84 0 134.5-58.5T1302 1468h-2q-21 23-61.5 37t-84.5 14q-106 0-173-71.5T914 1275q0-105 72-178t181-73q123 0 205 94.5t82 252.5zm-30-717v114H955V654h167V222q0-7 .5-19t.5-17v-16h-2l-7 12q-8 13-26 31l-62 58l-82-86L1136 0h123v654h165z",fill:"currentColor"})],-1),s("p",null,"First Chat",-1)])]),s("span",{onClick:i[1]||(i[1]=w=>m("desc")),class:"flex flex-row gap-2 items-center hover:bg-zinc-100 p-2 rounded-lg"},[...i[8]||(i[8]=[s("svg",{width:"20",viewBox:"0 0 1472 1792",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[s("path",{d:"M1314 289q0-63-44-116t-103-53q-52 0-83 37t-31 94t36.5 95t104.5 38q50 0 85-27t35-68zM704 1440q0 12-10 24l-319 319q-10 9-23 9q-12 0-23-9L9 1463q-15-16-7-35q8-20 30-20h192V32q0-14 9-23t23-9h192q14 0 23 9t9 23v1376h192q14 0 23 9t9 23zm720 238v114H955v-114h167v-432q0-7 .5-19t.5-17v-16h-2l-7 12q-8 13-26 31l-62 58l-82-86l192-185h123v654h165zm30-1331q0 62-13 121.5t-41 114t-68 95.5t-98.5 65.5T1106 768q-62 0-108-16q-24-8-42-15l39-113q15 7 31 11q37 13 75 13q84 0 134.5-58.5T1302 444h-2q-21 23-61.5 37t-84.5 14q-106 0-173-71.5T914 251q0-105 72-178t181-73q123 0 205 94.5t82 252.5z",fill:"
1currentColor"})],-1),s("p",null,"Last Chat",-1)])])],2)])])),[[C(kt),g]])])]))}},rn={class:"min-h-screen bg-slate-100"},on={class:"p-10"},sn={class:"flex flex-col md:flex-row"},cn={class:"md:w-[70%]"},un={class:"md:w-[30%] flex-grow-0 pl-5 relative"},fn={__name:"[id]",async setup(t){let e,n;f("hello"),f("world");const a=f(""),r=f(""),o=f("");f("");const c=f(0),l=f(""),h=pt(),m=h.query.session,u=h.params.id,i=f([]),w=([e,n]=Q(()=>H(`/api/v1/chat/session/session-chats?conversation_id=${u}&conversation_session=${m}`,"$ZHmg7MjnKb")),e=await e,n(),e);i.value=w.data.value.chats;const T=f(w.data.value.sessionOrderBy);let D=200,st=0;const{data:W}=([e,n]=Q(()=>H("/api/v1/chats-html",{method:"post",body:{conversation_session:m,conversation_id:u,limit:D,offset:st,order_by:T}},"$mh4kn_cFyO")),e=await e,n(),e);if(W.value.statusCode>=400)throw bt({statusCode:W.value.statusCode,statusMessage:W.value.message});const V=f([]);V.value=W.value.chats,l.value=i.value[0].conversation_title;const it=f("session"),j=I();function ct(){j.tempLock===!1&&j.lockScrollChangeTo("")}return K(async()=>{window.addEventListener("scroll",ct)}),(dn,z)=>{const ut=xt,dt=Mt,lt=Be,ht=an;return v(),y("div",rn,[Y(ut,{isFixed:!0}),s("div",on,[s("div",sn,[s("div",cn,[(v(!0),y(tt,null,et(V.value,(b,ft)=>(v(),y("div",{key:ft},[Y(dt,{"chat-id":b.chat_id,question:b.question},null,8,["chat-id","question"]),Y(lt,{"chat-url":b.chat_url,question:b.question,"chat-id":b.chat_id,answer:b.answer_html,"chat-domain":b.chat_domain,"question-date":b.question_date},null,8,["chat-url","question","chat-id","answer","chat-domain","question-date"]),z[0]||(z[0]=s("hr",null,null,-1))]))),128))]),s("div",un,[Y(ht,{"chat-id":a.value,"chat-url":o.value,"session-chats":i.value,"conversation-title":l.value,"conversation-session":c.value,"conversation-id":C(u),"view-type":it.value,"session-order-by":T.value,"chat-domain":r.value},null,8,["chat-id","chat-url","session-chats","conversation-title","conversation-session","conversation-id","view-type","session-order-by","chat-domain"])])])])])}}};export{fn as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.