You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
79 KiB
23 lines
79 KiB
import{k as e,f as t,a5 as n,j as o,r as a,w as i,E as r,m as s,x as u,a6 as l,o as c,y as d,b as p,c as v,d as _,A as f,F as m,z as h,C as g,B as y,D as w,e as k,H as A}from"./index-909bd241.js";import{h as b}from"./moment-6961f857.js";import{e as x,_ as S,a as T}from"./emoEnergyConverter-3c4902e7.js";import{m as I}from"./marketTemperature-7b8efb57.js";import{_ as P}from"./plugin-vue_export-helper-46f75680.js";import{u as D}from"./chat-822ca9b3.js";import{m as L}from"./marked.esm-cf4f21f5.js";import{u as E}from"./userPessionCode-0483d378.js";var O,C="/aixiaocaishen/static/images/思考-36f0ab2d.gif",M="/aixiaocaishen/static/images/解析-09c80e32.gif",H="/aixiaocaishen/static/images/生成-34d79152.gif",B={};
|
|
/*!
|
|
* howler.js v2.2.4
|
|
* howlerjs.com
|
|
*
|
|
* (c) 2013-2020, James Simpson of GoldFire Studios
|
|
* goldfirestudios.com
|
|
*
|
|
* MIT License
|
|
*/
|
|
O=B,function(){var t=function(){this.init()};t.prototype={init:function(){var e=this||n;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var t=this||n;if(e=parseFloat(e),t.ctx||c(),void 0!==e&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,n.ctx.currentTime);for(var o=0;o<t._howls.length;o++)if(!t._howls[o]._webAudio)for(var a=t._howls[o]._getSoundIds(),i=0;i<a.length;i++){var r=t._howls[o]._soundById(a[i]);r&&r._node&&(r._node.volume=r._volume*e)}return t}return t._volume},mute:function(e){var t=this||n;t.ctx||c(),t._muted=e,t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e?0:t._volume,n.ctx.currentTime);for(var o=0;o<t._howls.length;o++)if(!t._howls[o]._webAudio)for(var a=t._howls[o]._getSoundIds(),i=0;i<a.length;i++){var r=t._howls[o]._soundById(a[i]);r&&r._node&&(r._node.muted=!!e||r._muted)}return t},stop:function(){for(var e=this||n,t=0;t<e._howls.length;t++)e._howls[t].stop();return e},unload:function(){for(var e=this||n,t=e._howls.length-1;t>=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&void 0!==e.ctx.close&&(e.ctx.close(),e.ctx=null,c()),e},codecs:function(e){return(this||n)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||n;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio)if("undefined"!=typeof Audio)try{void 0===(new Audio).oncanplaythrough&&(e._canPlayEvent="canplay")}catch(t){e.noAudio=!0}else e.noAudio=!0;try{(new Audio).muted&&(e.noAudio=!0)}catch(t){}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||n,t=null;try{t="undefined"!=typeof Audio?new Audio:null}catch(c){return e}if(!t||"function"!=typeof t.canPlayType)return e;var o=t.canPlayType("audio/mpeg;").replace(/^no$/,""),a=e._navigator?e._navigator.userAgent:"",i=a.match(/OPR\/(\d+)/g),r=i&&parseInt(i[0].split("/")[1],10)<33,s=-1!==a.indexOf("Safari")&&-1===a.indexOf("Chrome"),u=a.match(/Version\/(.*?) /),l=s&&u&&parseInt(u[1],10)<15;return e._codecs={mp3:!(r||!o&&!t.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!o,opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(t.canPlayType('audio/wav; codecs="1"')||t.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!t.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!t.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(t.canPlayType("audio/x-m4b;")||t.canPlayType("audio/m4b;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(l||!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(l||!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(t.canPlayType("audio/x-flac;")||t.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||n;if(!e._audioUnlocked&&e.ctx){e._audioUnlocked=!1,e.autoUnlock=!1,e._mobileUnloaded||44100===e.ctx.sampleRate||(e._mobileUnloaded=!0,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var t=function(n){for(;e._html5AudioPool.length<e.html5PoolSize;)try{var o=new Audio;o._unlocked=!0,e._releaseHtml5Audio(o)}catch(l){e.noAudio=!0;break}for(var a=0;a<e._howls.length;a++)if(!e._howls[a]._webAudio)for(var i=e._howls[a]._getSoundIds(),r=0;r<i.length;r++){var s=e._howls[a]._soundById(i[r]);s&&s._node&&!s._node._unlocked&&(s._node._unlocked=!0,s._node.load())}e._autoResume();var u=e.ctx.createBufferSource();u.buffer=e._scratchBuffer,u.connect(e.ctx.destination),void 0===u.start?u.noteOn(0):u.start(0),"function"==typeof e.ctx.resume&&e.ctx.resume(),u.onended=function(){u.disconnect(0),e._audioUnlocked=!0,document.removeEventListener("touchstart",t,!0),document.removeEventListener("touchend",t,!0),document.removeEventListener("click",t,!0),document.removeEventListener("keydown",t,!0);for(var n=0;n<e._howls.length;n++)e._howls[n]._emit("unlock")}};return document.addEventListener("touchstart",t,!0),document.addEventListener("touchend",t,!0),document.addEventListener("click",t,!0),document.addEventListener("keydown",t,!0),e}},_obtainHtml5Audio:function(){var e=this||n;if(e._html5AudioPool.length)return e._html5AudioPool.pop();var t=(new Audio).play();return t&&"undefined"!=typeof Promise&&(t instanceof Promise||"function"==typeof t.then)&&t.catch((function(){})),new Audio},_releaseHtml5Audio:function(e){var t=this||n;return e._unlocked&&t._html5AudioPool.push(e),t},_autoSuspend:function(){var e=this;if(e.autoSuspend&&e.ctx&&void 0!==e.ctx.suspend&&n.usingWebAudio){for(var t=0;t<e._howls.length;t++)if(e._howls[t]._webAudio)for(var o=0;o<e._howls[t]._sounds.length;o++)if(!e._howls[t]._sounds[o]._paused)return e;return e._suspendTimer&&clearTimeout(e._suspendTimer),e._suspendTimer=setTimeout((function(){if(e.autoSuspend){e._suspendTimer=null,e.state="suspending";var t=function(){e.state="suspended",e._resumeAfterSuspend&&(delete e._resumeAfterSuspend,e._autoResume())};e.ctx.suspend().then(t,t)}}),3e4),e}},_autoResume:function(){var e=this;if(e.ctx&&void 0!==e.ctx.resume&&n.usingWebAudio)return"running"===e.state&&"interrupted"!==e.ctx.state&&e._suspendTimer?(clearTimeout(e._suspendTimer),e._suspendTimer=null):"suspended"===e.state||"running"===e.state&&"interrupted"===e.ctx.state?(e.ctx.resume().then((function(){e.state="running";for(var t=0;t<e._howls.length;t++)e._howls[t]._emit("resume")})),e._suspendTimer&&(clearTimeout(e._suspendTimer),e._suspendTimer=null)):"suspending"===e.state&&(e._resumeAfterSuspend=!0),e}};var n=new t,o=function(e){e.src&&0!==e.src.length&&this.init(e)};o.prototype={init:function(e){var t=this;return n.ctx||c(),t._autoplay=e.autoplay||!1,t._format="string"!=typeof e.format?e.format:[e.format],t._html5=e.html5||!1,t._muted=e.mute||!1,t._loop=e.loop||!1,t._pool=e.pool||5,t._preload="boolean"!=typeof e.preload&&"metadata"!==e.preload||e.preload,t._rate=e.rate||1,t._sprite=e.sprite||{},t._src="string"!=typeof e.src?e.src:[e.src],t._volume=void 0!==e.volume?e.volume:1,t._xhr={method:e.xhr&&e.xhr.method?e.xhr.method:"GET",headers:e.xhr&&e.xhr.headers?e.xhr.headers:null,withCredentials:!(!e.xhr||!e.xhr.withCredentials)&&e.xhr.withCredentials},t._duration=0,t._state="unloaded",t._sounds=[],t._endTimers={},t._queue=[],t._playLock=!1,t._onend=e.onend?[{fn:e.onend}]:[],t._onfade=e.onfade?[{fn:e.onfade}]:[],t._onload=e.onload?[{fn:e.onload}]:[],t._onloaderror=e.onloaderror?[{fn:e.onloaderror}]:[],t._onplayerror=e.onplayerror?[{fn:e.onplayerror}]:[],t._onpause=e.onpause?[{fn:e.onpause}]:[],t._onplay=e.onplay?[{fn:e.onplay}]:[],t._onstop=e.onstop?[{fn:e.onstop}]:[],t._onmute=e.onmute?[{fn:e.onmute}]:[],t._onvolume=e.onvolume?[{fn:e.onvolume}]:[],t._onrate=e.onrate?[{fn:e.onrate}]:[],t._onseek=e.onseek?[{fn:e.onseek}]:[],t._onunlock=e.onunlock?[{fn:e.onunlock}]:[],t._onresume=[],t._webAudio=n.usingWebAudio&&!t._html5,void 0!==n.ctx&&n.ctx&&n.autoUnlock&&n._unlockAudio(),n._howls.push(t),t._autoplay&&t._queue.push({event:"play",action:function(){t.play()}}),t._preload&&"none"!==t._preload&&t.load(),t},load:function(){var e=this,t=null;if(n.noAudio)e._emit("loaderror",null,"No audio support.");else{"string"==typeof e._src&&(e._src=[e._src]);for(var o=0;o<e._src.length;o++){var i,s;if(e._format&&e._format[o])i=e._format[o];else{if("string"!=typeof(s=e._src[o])){e._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(i=/^data:audio\/([^;,]+);/i.exec(s))||(i=/\.([^.]+)$/.exec(s.split("?",1)[0])),i&&(i=i[1].toLowerCase())}if(i&&n.codecs(i)){t=e._src[o];break}}if(t)return e._src=t,e._state="loading","https:"===window.location.protocol&&"http:"===t.slice(0,5)&&(e._html5=!0,e._webAudio=!1),new a(e),e._webAudio&&r(e),e;e._emit("loaderror",null,"No codec support for selected audio sources.")}},play:function(e,t){var o=this,a=null;if("number"==typeof e)a=e,e=null;else{if("string"==typeof e&&"loaded"===o._state&&!o._sprite[e])return null;if(void 0===e&&(e="__default",!o._playLock)){for(var i=0,r=0;r<o._sounds.length;r++)o._sounds[r]._paused&&!o._sounds[r]._ended&&(i++,a=o._sounds[r]._id);1===i?e=null:a=null}}var s=a?o._soundById(a):o._inactiveSound();if(!s)return null;if(a&&!e&&(e=s._sprite||"__default"),"loaded"!==o._state){s._sprite=e,s._ended=!1;var u=s._id;return o._queue.push({event:"play",action:function(){o.play(u)}}),u}if(a&&!s._paused)return t||o._loadQueue("play"),s._id;o._webAudio&&n._autoResume();var l=Math.max(0,s._seek>0?s._seek:o._sprite[e][0]/1e3),c=Math.max(0,(o._sprite[e][0]+o._sprite[e][1])/1e3-l),d=1e3*c/Math.abs(s._rate),p=o._sprite[e][0]/1e3,v=(o._sprite[e][0]+o._sprite[e][1])/1e3;s._sprite=e,s._ended=!1;var _=function(){s._paused=!1,s._seek=l,s._start=p,s._stop=v,s._loop=!(!s._loop&&!o._sprite[e][2])};if(!(l>=v)){var f=s._node;if(o._webAudio){var m=function(){o._playLock=!1,_(),o._refreshBuffer(s);var e=s._muted||o._muted?0:s._volume;f.gain.setValueAtTime(e,n.ctx.currentTime),s._playStart=n.ctx.currentTime,void 0===f.bufferSource.start?s._loop?f.bufferSource.noteGrainOn(0,l,86400):f.bufferSource.noteGrainOn(0,l,c):s._loop?f.bufferSource.start(0,l,86400):f.bufferSource.start(0,l,c),d!==1/0&&(o._endTimers[s._id]=setTimeout(o._ended.bind(o,s),d)),t||setTimeout((function(){o._emit("play",s._id),o._loadQueue()}),0)};"running"===n.state&&"interrupted"!==n.ctx.state?m():(o._playLock=!0,o.once("resume",m),o._clearTimer(s._id))}else{var h=function(){f.currentTime=l,f.muted=s._muted||o._muted||n._muted||f.muted,f.volume=s._volume*n.volume(),f.playbackRate=s._rate;try{var a=f.play();if(a&&"undefined"!=typeof Promise&&(a instanceof Promise||"function"==typeof a.then)?(o._playLock=!0,_(),a.then((function(){o._playLock=!1,f._unlocked=!0,t?o._loadQueue():o._emit("play",s._id)})).catch((function(){o._playLock=!1,o._emit("playerror",s._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),s._ended=!0,s._paused=!0}))):t||(o._playLock=!1,_(),o._emit("play",s._id)),f.playbackRate=s._rate,f.paused)return void o._emit("playerror",s._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==e||s._loop?o._endTimers[s._id]=setTimeout(o._ended.bind(o,s),d):(o._endTimers[s._id]=function(){o._ended(s),f.removeEventListener("ended",o._endTimers[s._id],!1)},f.addEventListener("ended",o._endTimers[s._id],!1))}catch(i){o._emit("playerror",s._id,i)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===f.src&&(f.src=o._src,f.load());var g=window&&window.ejecta||!f.readyState&&n._navigator.isCocoonJS;if(f.readyState>=3||g)h();else{o._playLock=!0,o._state="loading";var y=function(){o._state="loaded",h(),f.removeEventListener(n._canPlayEvent,y,!1)};f.addEventListener(n._canPlayEvent,y,!1),o._clearTimer(s._id)}}return s._id}o._ended(s)},pause:function(e){var t=this;if("loaded"!==t._state||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e)}}),t;for(var n=t._getSoundIds(e),o=0;o<n.length;o++){t._clearTimer(n[o]);var a=t._soundById(n[o]);if(a&&!a._paused&&(a._seek=t.seek(n[o]),a._rateSeek=0,a._paused=!0,t._stopFade(n[o]),a._node))if(t._webAudio){if(!a._node.bufferSource)continue;void 0===a._node.bufferSource.stop?a._node.bufferSource.noteOff(0):a._node.bufferSource.stop(0),t._cleanBuffer(a._node)}else isNaN(a._node.duration)&&a._node.duration!==1/0||a._node.pause();arguments[1]||t._emit("pause",a?a._id:null)}return t},stop:function(e,t){var n=this;if("loaded"!==n._state||n._playLock)return n._queue.push({event:"stop",action:function(){n.stop(e)}}),n;for(var o=n._getSoundIds(e),a=0;a<o.length;a++){n._clearTimer(o[a]);var i=n._soundById(o[a]);i&&(i._seek=i._start||0,i._rateSeek=0,i._paused=!0,i._ended=!0,n._stopFade(o[a]),i._node&&(n._webAudio?i._node.bufferSource&&(void 0===i._node.bufferSource.stop?i._node.bufferSource.noteOff(0):i._node.bufferSource.stop(0),n._cleanBuffer(i._node)):isNaN(i._node.duration)&&i._node.duration!==1/0||(i._node.currentTime=i._start||0,i._node.pause(),i._node.duration===1/0&&n._clearSound(i._node))),t||n._emit("stop",i._id))}return n},mute:function(e,t){var o=this;if("loaded"!==o._state||o._playLock)return o._queue.push({event:"mute",action:function(){o.mute(e,t)}}),o;if(void 0===t){if("boolean"!=typeof e)return o._muted;o._muted=e}for(var a=o._getSoundIds(t),i=0;i<a.length;i++){var r=o._soundById(a[i]);r&&(r._muted=e,r._interval&&o._stopFade(r._id),o._webAudio&&r._node?r._node.gain.setValueAtTime(e?0:r._volume,n.ctx.currentTime):r._node&&(r._node.muted=!!n._muted||e),o._emit("mute",r._id))}return o},volume:function(){var e,t,o,a=this,i=arguments;if(0===i.length)return a._volume;if(1===i.length||2===i.length&&void 0===i[1]){var r=a._getSoundIds(),s=r.indexOf(i[0]);s>=0?t=parseInt(i[0],10):e=parseFloat(i[0])}else i.length>=2&&(e=parseFloat(i[0]),t=parseInt(i[1],10));if(!(void 0!==e&&e>=0&&e<=1))return(o=t?a._soundById(t):a._sounds[0])?o._volume:0;if("loaded"!==a._state||a._playLock)return a._queue.push({event:"volume",action:function(){a.volume.apply(a,i)}}),a;void 0===t&&(a._volume=e),t=a._getSoundIds(t);for(var u=0;u<t.length;u++)(o=a._soundById(t[u]))&&(o._volume=e,i[2]||a._stopFade(t[u]),a._webAudio&&o._node&&!o._muted?o._node.gain.setValueAtTime(e,n.ctx.currentTime):o._node&&!o._muted&&(o._node.volume=e*n.volume()),a._emit("volume",o._id));return a},fade:function(e,t,o,a){var i=this;if("loaded"!==i._state||i._playLock)return i._queue.push({event:"fade",action:function(){i.fade(e,t,o,a)}}),i;e=Math.min(Math.max(0,parseFloat(e)),1),t=Math.min(Math.max(0,parseFloat(t)),1),o=parseFloat(o),i.volume(e,a);for(var r=i._getSoundIds(a),s=0;s<r.length;s++){var u=i._soundById(r[s]);if(u){if(a||i._stopFade(r[s]),i._webAudio&&!u._muted){var l=n.ctx.currentTime,c=l+o/1e3;u._volume=e,u._node.gain.setValueAtTime(e,l),u._node.gain.linearRampToValueAtTime(t,c)}i._startFadeInterval(u,e,t,o,r[s],void 0===a)}}return i},_startFadeInterval:function(e,t,n,o,a,i){var r=this,s=t,u=n-t,l=Math.abs(u/.01),c=Math.max(4,l>0?o/l:o),d=Date.now();e._fadeTo=n,e._interval=setInterval((function(){var a=(Date.now()-d)/o;d=Date.now(),s+=u*a,s=Math.round(100*s)/100,s=u<0?Math.max(n,s):Math.min(n,s),r._webAudio?e._volume=s:r.volume(s,e._id,!0),i&&(r._volume=s),(n<t&&s<=n||n>t&&s>=n)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,r.volume(n,e._id),r._emit("fade",e._id))}),c)},_stopFade:function(e){var t=this,o=t._soundById(e);return o&&o._interval&&(t._webAudio&&o._node.gain.cancelScheduledValues(n.ctx.currentTime),clearInterval(o._interval),o._interval=null,t.volume(o._fadeTo,e),o._fadeTo=null,t._emit("fade",e)),t},loop:function(){var e,t,n,o=this,a=arguments;if(0===a.length)return o._loop;if(1===a.length){if("boolean"!=typeof a[0])return!!(n=o._soundById(parseInt(a[0],10)))&&n._loop;e=a[0],o._loop=e}else 2===a.length&&(e=a[0],t=parseInt(a[1],10));for(var i=o._getSoundIds(t),r=0;r<i.length;r++)(n=o._soundById(i[r]))&&(n._loop=e,o._webAudio&&n._node&&n._node.bufferSource&&(n._node.bufferSource.loop=e,e&&(n._node.bufferSource.loopStart=n._start||0,n._node.bufferSource.loopEnd=n._stop,o.playing(i[r])&&(o.pause(i[r],!0),o.play(i[r],!0)))));return o},rate:function(){var e,t,o,a=this,i=arguments;if(0===i.length)t=a._sounds[0]._id;else if(1===i.length){var r=a._getSoundIds(),s=r.indexOf(i[0]);s>=0?t=parseInt(i[0],10):e=parseFloat(i[0])}else 2===i.length&&(e=parseFloat(i[0]),t=parseInt(i[1],10));if("number"!=typeof e)return(o=a._soundById(t))?o._rate:a._rate;if("loaded"!==a._state||a._playLock)return a._queue.push({event:"rate",action:function(){a.rate.apply(a,i)}}),a;void 0===t&&(a._rate=e),t=a._getSoundIds(t);for(var u=0;u<t.length;u++)if(o=a._soundById(t[u])){a.playing(t[u])&&(o._rateSeek=a.seek(t[u]),o._playStart=a._webAudio?n.ctx.currentTime:o._playStart),o._rate=e,a._webAudio&&o._node&&o._node.bufferSource?o._node.bufferSource.playbackRate.setValueAtTime(e,n.ctx.currentTime):o._node&&(o._node.playbackRate=e);var l=a.seek(t[u]),c=(a._sprite[o._sprite][0]+a._sprite[o._sprite][1])/1e3-l,d=1e3*c/Math.abs(o._rate);!a._endTimers[t[u]]&&o._paused||(a._clearTimer(t[u]),a._endTimers[t[u]]=setTimeout(a._ended.bind(a,o),d)),a._emit("rate",o._id)}return a},seek:function(){var e,t,o=this,a=arguments;if(0===a.length)o._sounds.length&&(t=o._sounds[0]._id);else if(1===a.length){var i=o._getSoundIds(),r=i.indexOf(a[0]);r>=0?t=parseInt(a[0],10):o._sounds.length&&(t=o._sounds[0]._id,e=parseFloat(a[0]))}else 2===a.length&&(e=parseFloat(a[0]),t=parseInt(a[1],10));if(void 0===t)return 0;if("number"==typeof e&&("loaded"!==o._state||o._playLock))return o._queue.push({event:"seek",action:function(){o.seek.apply(o,a)}}),o;var s=o._soundById(t);if(s){if(!("number"==typeof e&&e>=0)){if(o._webAudio){var u=o.playing(t)?n.ctx.currentTime-s._playStart:0,l=s._rateSeek?s._rateSeek-s._seek:0;return s._seek+(l+u*Math.abs(s._rate))}return s._node.currentTime}var c=o.playing(t);c&&o.pause(t,!0),s._seek=e,s._ended=!1,o._clearTimer(t),o._webAudio||!s._node||isNaN(s._node.duration)||(s._node.currentTime=e);var d=function(){c&&o.play(t,!0),o._emit("seek",t)};if(c&&!o._webAudio){var p=function(){o._playLock?setTimeout(p,0):d()};setTimeout(p,0)}else d()}return o},playing:function(e){var t=this;if("number"==typeof e){var n=t._soundById(e);return!!n&&!n._paused}for(var o=0;o<t._sounds.length;o++)if(!t._sounds[o]._paused)return!0;return!1},duration:function(e){var t=this,n=t._duration,o=t._soundById(e);return o&&(n=t._sprite[o._sprite][1]/1e3),n},state:function(){return this._state},unload:function(){for(var e=this,t=e._sounds,o=0;o<t.length;o++)t[o]._paused||e.stop(t[o]._id),e._webAudio||(e._clearSound(t[o]._node),t[o]._node.removeEventListener("error",t[o]._errorFn,!1),t[o]._node.removeEventListener(n._canPlayEvent,t[o]._loadFn,!1),t[o]._node.removeEventListener("ended",t[o]._endFn,!1),n._releaseHtml5Audio(t[o]._node)),delete t[o]._node,e._clearTimer(t[o]._id);var a=n._howls.indexOf(e);a>=0&&n._howls.splice(a,1);var r=!0;for(o=0;o<n._howls.length;o++)if(n._howls[o]._src===e._src||e._src.indexOf(n._howls[o]._src)>=0){r=!1;break}return i&&r&&delete i[e._src],n.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,n,o){var a=this["_on"+e];return"function"==typeof t&&a.push(o?{id:n,fn:t,once:o}:{id:n,fn:t}),this},off:function(e,t,n){var o=this,a=o["_on"+e],i=0;if("number"==typeof t&&(n=t,t=null),t||n)for(i=0;i<a.length;i++){var r=n===a[i].id;if(t===a[i].fn&&r||!t&&r){a.splice(i,1);break}}else if(e)o["_on"+e]=[];else{var s=Object.keys(o);for(i=0;i<s.length;i++)0===s[i].indexOf("_on")&&Array.isArray(o[s[i]])&&(o[s[i]]=[])}return o},once:function(e,t,n){return this.on(e,t,n,1),this},_emit:function(e,t,n){for(var o=this,a=o["_on"+e],i=a.length-1;i>=0;i--)a[i].id&&a[i].id!==t&&"load"!==e||(setTimeout(function(e){e.call(this,t,n)}.bind(o,a[i].fn),0),a[i].once&&o.off(e,a[i].fn,a[i].id));return o._loadQueue(e),o},_loadQueue:function(e){var t=this;if(t._queue.length>0){var n=t._queue[0];n.event===e&&(t._queue.shift(),t._loadQueue()),e||n.action()}return t},_ended:function(e){var t=this,o=e._sprite;if(!t._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime<e._stop)return setTimeout(t._ended.bind(t,e),100),t;var a=!(!e._loop&&!t._sprite[o][2]);if(t._emit("end",e._id),!t._webAudio&&a&&t.stop(e._id,!0).play(e._id),t._webAudio&&a){t._emit("play",e._id),e._seek=e._start||0,e._rateSeek=0,e._playStart=n.ctx.currentTime;var i=1e3*(e._stop-e._start)/Math.abs(e._rate);t._endTimers[e._id]=setTimeout(t._ended.bind(t,e),i)}return t._webAudio&&!a&&(e._paused=!0,e._ended=!0,e._seek=e._start||0,e._rateSeek=0,t._clearTimer(e._id),t._cleanBuffer(e._node),n._autoSuspend()),t._webAudio||a||t.stop(e._id,!0),t},_clearTimer:function(e){var t=this;if(t._endTimers[e]){if("function"!=typeof t._endTimers[e])clearTimeout(t._endTimers[e]);else{var n=t._soundById(e);n&&n._node&&n._node.removeEventListener("ended",t._endTimers[e],!1)}delete t._endTimers[e]}return t},_soundById:function(e){for(var t=this,n=0;n<t._sounds.length;n++)if(e===t._sounds[n]._id)return t._sounds[n];return null},_inactiveSound:function(){var e=this;e._drain();for(var t=0;t<e._sounds.length;t++)if(e._sounds[t]._ended)return e._sounds[t].reset();return new a(e)},_drain:function(){var e=this,t=e._pool,n=0,o=0;if(!(e._sounds.length<t)){for(o=0;o<e._sounds.length;o++)e._sounds[o]._ended&&n++;for(o=e._sounds.length-1;o>=0;o--){if(n<=t)return;e._sounds[o]._ended&&(e._webAudio&&e._sounds[o]._node&&e._sounds[o]._node.disconnect(0),e._sounds.splice(o,1),n--)}}},_getSoundIds:function(e){if(void 0===e){for(var t=[],n=0;n<this._sounds.length;n++)t.push(this._sounds[n]._id);return t}return[e]},_refreshBuffer:function(e){return e._node.bufferSource=n.ctx.createBufferSource(),e._node.bufferSource.buffer=i[this._src],e._panner?e._node.bufferSource.connect(e._panner):e._node.bufferSource.connect(e._node),e._node.bufferSource.loop=e._loop,e._loop&&(e._node.bufferSource.loopStart=e._start||0,e._node.bufferSource.loopEnd=e._stop||0),e._node.bufferSource.playbackRate.setValueAtTime(e._rate,n.ctx.currentTime),this},_cleanBuffer:function(e){var t=n._navigator&&n._navigator.vendor.indexOf("Apple")>=0;if(!e.bufferSource)return this;if(n._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),t))try{e.bufferSource.buffer=n._scratchBuffer}catch(o){}return e.bufferSource=null,this},_clearSound:function(e){/MSIE |Trident\//.test(n._navigator&&n._navigator.userAgent)||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var a=function(e){this._parent=e,this.init()};a.prototype={init:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++n._counter,t._sounds.push(e),e.create(),e},create:function(){var e=this,t=e._parent,o=n._muted||e._muted||e._parent._muted?0:e._volume;return t._webAudio?(e._node=void 0===n.ctx.createGain?n.ctx.createGainNode():n.ctx.createGain(),e._node.gain.setValueAtTime(o,n.ctx.currentTime),e._node.paused=!0,e._node.connect(n.masterGain)):n.noAudio||(e._node=n._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,!1),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(n._canPlayEvent,e._loadFn,!1),e._endFn=e._endListener.bind(e),e._node.addEventListener("ended",e._endFn,!1),e._node.src=t._src,e._node.preload=!0===t._preload?"auto":t._preload,e._node.volume=o*n.volume(),e._node.load()),e},reset:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._rateSeek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++n._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,!1)},_loadListener:function(){var e=this,t=e._parent;t._duration=Math.ceil(10*e._node.duration)/10,0===Object.keys(t._sprite).length&&(t._sprite={__default:[0,1e3*t._duration]}),"loaded"!==t._state&&(t._state="loaded",t._emit("load"),t._loadQueue()),e._node.removeEventListener(n._canPlayEvent,e._loadFn,!1)},_endListener:function(){var e=this,t=e._parent;t._duration===1/0&&(t._duration=Math.ceil(10*e._node.duration)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=1e3*t._duration),t._ended(e)),e._node.removeEventListener("ended",e._endFn,!1)}};var i={},r=function(e){var t=e._src;if(i[t])return e._duration=i[t].duration,void l(e);if(/^data:[^;]+;base64,/.test(t)){for(var n=atob(t.split(",")[1]),o=new Uint8Array(n.length),a=0;a<n.length;++a)o[a]=n.charCodeAt(a);u(o.buffer,e)}else{var r=new XMLHttpRequest;r.open(e._xhr.method,t,!0),r.withCredentials=e._xhr.withCredentials,r.responseType="arraybuffer",e._xhr.headers&&Object.keys(e._xhr.headers).forEach((function(t){r.setRequestHeader(t,e._xhr.headers[t])})),r.onload=function(){var t=(r.status+"")[0];"0"===t||"2"===t||"3"===t?u(r.response,e):e._emit("loaderror",null,"Failed loading audio file with status: "+r.status+".")},r.onerror=function(){e._webAudio&&(e._html5=!0,e._webAudio=!1,e._sounds=[],delete i[t],e.load())},s(r)}},s=function(e){try{e.send()}catch(t){e.onerror()}},u=function(e,t){var o=function(){t._emit("loaderror",null,"Decoding audio data failed.")},a=function(e){e&&t._sounds.length>0?(i[t._src]=e,l(t,e)):o()};"undefined"!=typeof Promise&&1===n.ctx.decodeAudioData.length?n.ctx.decodeAudioData(e).then(a).catch(o):n.ctx.decodeAudioData(e,a,o)},l=function(e,t){t&&!e._duration&&(e._duration=t.duration),0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue())},c=function(){if(n.usingWebAudio){try{"undefined"!=typeof AudioContext?n.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?n.ctx=new webkitAudioContext:n.usingWebAudio=!1}catch(i){n.usingWebAudio=!1}n.ctx||(n.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(n._navigator&&n._navigator.platform),t=n._navigator&&n._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),o=t?parseInt(t[1],10):null;if(e&&o&&o<9){var a=/safari/.test(n._navigator&&n._navigator.userAgent.toLowerCase());n._navigator&&!a&&(n.usingWebAudio=!1)}n.usingWebAudio&&(n.masterGain=void 0===n.ctx.createGain?n.ctx.createGainNode():n.ctx.createGain(),n.masterGain.gain.setValueAtTime(n._muted?0:n._volume,n.ctx.currentTime),n.masterGain.connect(n.ctx.destination)),n._setup()}};O.Howler=n,O.Howl=o,void 0!==e?(e.HowlerGlobal=t,e.Howler=n,e.Howl=o,e.Sound=a):"undefined"!=typeof window&&(window.HowlerGlobal=t,window.Howler=n,window.Howl=o,window.Sound=a)}(),
|
|
/*!
|
|
* Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
|
|
*
|
|
* howler.js v2.2.4
|
|
* howlerjs.com
|
|
*
|
|
* (c) 2013-2020, James Simpson of GoldFire Studios
|
|
* goldfirestudios.com
|
|
*
|
|
* MIT License
|
|
*/
|
|
function(){var e;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){var t=this;if(!t.ctx||!t.ctx.listener)return t;for(var n=t._howls.length-1;n>=0;n--)t._howls[n].stereo(e);return t},HowlerGlobal.prototype.pos=function(e,t,n){var o=this;return o.ctx&&o.ctx.listener?(t="number"!=typeof t?o._pos[1]:t,n="number"!=typeof n?o._pos[2]:n,"number"!=typeof e?o._pos:(o._pos=[e,t,n],void 0!==o.ctx.listener.positionX?(o.ctx.listener.positionX.setTargetAtTime(o._pos[0],Howler.ctx.currentTime,.1),o.ctx.listener.positionY.setTargetAtTime(o._pos[1],Howler.ctx.currentTime,.1),o.ctx.listener.positionZ.setTargetAtTime(o._pos[2],Howler.ctx.currentTime,.1)):o.ctx.listener.setPosition(o._pos[0],o._pos[1],o._pos[2]),o)):o},HowlerGlobal.prototype.orientation=function(e,t,n,o,a,i){var r=this;if(!r.ctx||!r.ctx.listener)return r;var s=r._orientation;return t="number"!=typeof t?s[1]:t,n="number"!=typeof n?s[2]:n,o="number"!=typeof o?s[3]:o,a="number"!=typeof a?s[4]:a,i="number"!=typeof i?s[5]:i,"number"!=typeof e?s:(r._orientation=[e,t,n,o,a,i],void 0!==r.ctx.listener.forwardX?(r.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),r.ctx.listener.forwardY.setTargetAtTime(t,Howler.ctx.currentTime,.1),r.ctx.listener.forwardZ.setTargetAtTime(n,Howler.ctx.currentTime,.1),r.ctx.listener.upX.setTargetAtTime(o,Howler.ctx.currentTime,.1),r.ctx.listener.upY.setTargetAtTime(a,Howler.ctx.currentTime,.1),r.ctx.listener.upZ.setTargetAtTime(i,Howler.ctx.currentTime,.1)):r.ctx.listener.setOrientation(e,t,n,o,a,i),r)},Howl.prototype.init=(e=Howl.prototype.init,function(t){var n=this;return n._orientation=t.orientation||[1,0,0],n._stereo=t.stereo||null,n._pos=t.pos||null,n._pannerAttr={coneInnerAngle:void 0!==t.coneInnerAngle?t.coneInnerAngle:360,coneOuterAngle:void 0!==t.coneOuterAngle?t.coneOuterAngle:360,coneOuterGain:void 0!==t.coneOuterGain?t.coneOuterGain:0,distanceModel:void 0!==t.distanceModel?t.distanceModel:"inverse",maxDistance:void 0!==t.maxDistance?t.maxDistance:1e4,panningModel:void 0!==t.panningModel?t.panningModel:"HRTF",refDistance:void 0!==t.refDistance?t.refDistance:1,rolloffFactor:void 0!==t.rolloffFactor?t.rolloffFactor:1},n._onstereo=t.onstereo?[{fn:t.onstereo}]:[],n._onpos=t.onpos?[{fn:t.onpos}]:[],n._onorientation=t.onorientation?[{fn:t.onorientation}]:[],e.call(this,t)}),Howl.prototype.stereo=function(e,n){var o=this;if(!o._webAudio)return o;if("loaded"!==o._state)return o._queue.push({event:"stereo",action:function(){o.stereo(e,n)}}),o;var a=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===n){if("number"!=typeof e)return o._stereo;o._stereo=e,o._pos=[e,0,0]}for(var i=o._getSoundIds(n),r=0;r<i.length;r++){var s=o._soundById(i[r]);if(s){if("number"!=typeof e)return s._stereo;s._stereo=e,s._pos=[e,0,0],s._node&&(s._pannerAttr.panningModel="equalpower",s._panner&&s._panner.pan||t(s,a),"spatial"===a?void 0!==s._panner.positionX?(s._panner.positionX.setValueAtTime(e,Howler.ctx.currentTime),s._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),s._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):s._panner.setPosition(e,0,0):s._panner.pan.setValueAtTime(e,Howler.ctx.currentTime)),o._emit("stereo",s._id)}}return o},Howl.prototype.pos=function(e,n,o,a){var i=this;if(!i._webAudio)return i;if("loaded"!==i._state)return i._queue.push({event:"pos",action:function(){i.pos(e,n,o,a)}}),i;if(n="number"!=typeof n?0:n,o="number"!=typeof o?-.5:o,void 0===a){if("number"!=typeof e)return i._pos;i._pos=[e,n,o]}for(var r=i._getSoundIds(a),s=0;s<r.length;s++){var u=i._soundById(r[s]);if(u){if("number"!=typeof e)return u._pos;u._pos=[e,n,o],u._node&&(u._panner&&!u._panner.pan||t(u,"spatial"),void 0!==u._panner.positionX?(u._panner.positionX.setValueAtTime(e,Howler.ctx.currentTime),u._panner.positionY.setValueAtTime(n,Howler.ctx.currentTime),u._panner.positionZ.setValueAtTime(o,Howler.ctx.currentTime)):u._panner.setPosition(e,n,o)),i._emit("pos",u._id)}}return i},Howl.prototype.orientation=function(e,n,o,a){var i=this;if(!i._webAudio)return i;if("loaded"!==i._state)return i._queue.push({event:"orientation",action:function(){i.orientation(e,n,o,a)}}),i;if(n="number"!=typeof n?i._orientation[1]:n,o="number"!=typeof o?i._orientation[2]:o,void 0===a){if("number"!=typeof e)return i._orientation;i._orientation=[e,n,o]}for(var r=i._getSoundIds(a),s=0;s<r.length;s++){var u=i._soundById(r[s]);if(u){if("number"!=typeof e)return u._orientation;u._orientation=[e,n,o],u._node&&(u._panner||(u._pos||(u._pos=i._pos||[0,0,-.5]),t(u,"spatial")),void 0!==u._panner.orientationX?(u._panner.orientationX.setValueAtTime(e,Howler.ctx.currentTime),u._panner.orientationY.setValueAtTime(n,Howler.ctx.currentTime),u._panner.orientationZ.setValueAtTime(o,Howler.ctx.currentTime)):u._panner.setOrientation(e,n,o)),i._emit("orientation",u._id)}}return i},Howl.prototype.pannerAttr=function(){var e,n,o,a=this,i=arguments;if(!a._webAudio)return a;if(0===i.length)return a._pannerAttr;if(1===i.length){if("object"!=typeof i[0])return(o=a._soundById(parseInt(i[0],10)))?o._pannerAttr:a._pannerAttr;e=i[0],void 0===n&&(e.pannerAttr||(e.pannerAttr={coneInnerAngle:e.coneInnerAngle,coneOuterAngle:e.coneOuterAngle,coneOuterGain:e.coneOuterGain,distanceModel:e.distanceModel,maxDistance:e.maxDistance,refDistance:e.refDistance,rolloffFactor:e.rolloffFactor,panningModel:e.panningModel}),a._pannerAttr={coneInnerAngle:void 0!==e.pannerAttr.coneInnerAngle?e.pannerAttr.coneInnerAngle:a._coneInnerAngle,coneOuterAngle:void 0!==e.pannerAttr.coneOuterAngle?e.pannerAttr.coneOuterAngle:a._coneOuterAngle,coneOuterGain:void 0!==e.pannerAttr.coneOuterGain?e.pannerAttr.coneOuterGain:a._coneOuterGain,distanceModel:void 0!==e.pannerAttr.distanceModel?e.pannerAttr.distanceModel:a._distanceModel,maxDistance:void 0!==e.pannerAttr.maxDistance?e.pannerAttr.maxDistance:a._maxDistance,refDistance:void 0!==e.pannerAttr.refDistance?e.pannerAttr.refDistance:a._refDistance,rolloffFactor:void 0!==e.pannerAttr.rolloffFactor?e.pannerAttr.rolloffFactor:a._rolloffFactor,panningModel:void 0!==e.pannerAttr.panningModel?e.pannerAttr.panningModel:a._panningModel})}else 2===i.length&&(e=i[0],n=parseInt(i[1],10));for(var r=a._getSoundIds(n),s=0;s<r.length;s++)if(o=a._soundById(r[s])){var u=o._pannerAttr;u={coneInnerAngle:void 0!==e.coneInnerAngle?e.coneInnerAngle:u.coneInnerAngle,coneOuterAngle:void 0!==e.coneOuterAngle?e.coneOuterAngle:u.coneOuterAngle,coneOuterGain:void 0!==e.coneOuterGain?e.coneOuterGain:u.coneOuterGain,distanceModel:void 0!==e.distanceModel?e.distanceModel:u.distanceModel,maxDistance:void 0!==e.maxDistance?e.maxDistance:u.maxDistance,refDistance:void 0!==e.refDistance?e.refDistance:u.refDistance,rolloffFactor:void 0!==e.rolloffFactor?e.rolloffFactor:u.rolloffFactor,panningModel:void 0!==e.panningModel?e.panningModel:u.panningModel};var l=o._panner;l||(o._pos||(o._pos=a._pos||[0,0,-.5]),t(o,"spatial"),l=o._panner),l.coneInnerAngle=u.coneInnerAngle,l.coneOuterAngle=u.coneOuterAngle,l.coneOuterGain=u.coneOuterGain,l.distanceModel=u.distanceModel,l.maxDistance=u.maxDistance,l.refDistance=u.refDistance,l.rolloffFactor=u.rolloffFactor,l.panningModel=u.panningModel}return a},Sound.prototype.init=function(e){return function(){var t=this,n=t._parent;t._orientation=n._orientation,t._stereo=n._stereo,t._pos=n._pos,t._pannerAttr=n._pannerAttr,e.call(this),t._stereo?n.stereo(t._stereo):t._pos&&n.pos(t._pos[0],t._pos[1],t._pos[2],t._id)}}(Sound.prototype.init),Sound.prototype.reset=function(e){return function(){var t=this,n=t._parent;return t._orientation=n._orientation,t._stereo=n._stereo,t._pos=n._pos,t._pannerAttr=n._pannerAttr,t._stereo?n.stereo(t._stereo):t._pos?n.pos(t._pos[0],t._pos[1],t._pos[2],t._id):t._panner&&(t._panner.disconnect(0),t._panner=void 0,n._refreshBuffer(t)),e.call(this)}}(Sound.prototype.reset);var t=function(e,t){"spatial"===(t=t||"spatial")?(e._panner=Howler.ctx.createPanner(),e._panner.coneInnerAngle=e._pannerAttr.coneInnerAngle,e._panner.coneOuterAngle=e._pannerAttr.coneOuterAngle,e._panner.coneOuterGain=e._pannerAttr.coneOuterGain,e._panner.distanceModel=e._pannerAttr.distanceModel,e._panner.maxDistance=e._pannerAttr.maxDistance,e._panner.refDistance=e._pannerAttr.refDistance,e._panner.rolloffFactor=e._pannerAttr.rolloffFactor,e._panner.panningModel=e._pannerAttr.panningModel,void 0!==e._panner.positionX?(e._panner.positionX.setValueAtTime(e._pos[0],Howler.ctx.currentTime),e._panner.positionY.setValueAtTime(e._pos[1],Howler.ctx.currentTime),e._panner.positionZ.setValueAtTime(e._pos[2],Howler.ctx.currentTime)):e._panner.setPosition(e._pos[0],e._pos[1],e._pos[2]),void 0!==e._panner.orientationX?(e._panner.orientationX.setValueAtTime(e._orientation[0],Howler.ctx.currentTime),e._panner.orientationY.setValueAtTime(e._orientation[1],Howler.ctx.currentTime),e._panner.orientationZ.setValueAtTime(e._orientation[2],Howler.ctx.currentTime)):e._panner.setOrientation(e._orientation[0],e._orientation[1],e._orientation[2])):(e._panner=Howler.ctx.createStereoPanner(),e._panner.pan.setValueAtTime(e._stereo,Howler.ctx.currentTime)),e._panner.connect(e._node),e._paused||e._parent.pause(e._id,!0).play(e._id,!0)}}();var V="/aixiaocaishen/static/images/voice-ae78c34c.png",F="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAA9CAYAAAAeYmHpAAAACXBIWXMAAAsTAAALEwEAmpwYAAAH9ElEQVRogd2bW2wbWRnHf544tpM6oUmjuq3txE3axEHphbRNeWiponZBhWcWVsCutFqttMAi4GEBUVhpWRbBA+K6ywOsBGhZQdVXUAkPaWkTqVJTNWrjtKWOUket3YvbJK7dxnbNwxlPZpyxPRdPtPCTLJ2ZOZfvP3Mu3zk+x3Xq1CkcJAp8CtgD7AC6gS6gA2gCisBD4D5wC/gPcBn4NxBzyih3g/NrAj4DfAF4DthqIH6X/IsCn1Y9uwOMAX8FTiNeUENolOgA8G3gRWBLg/LcKuf3IpAE/gT8HEjZzViymX4r8CtgDniDxgmuZIuc/xzwa+rXoJpYFe2WjbgOvA602DHCBC3A1+Vy38BiTbUiug+YAH4K+K0U2gD8cvkTiA7SFGZFfx6YAg6YLcghDgAXEXYZxqhoF/AW8Deg3ZxdjtOOsOtHCDvrYkS0BPwO+IF1u9aFEwg7m+pFNCL6N8Crdi1aJ15F9O41qSf6u8BrDTFn/XgN+F6tCLVEfxH4SUPNWT/eAV6o9rCa6CjwB0fMWT9+j9CxBj3RTcCfgVYnLVoHWhE61nRseqK/Cux32qJ1Yj9Cj4ZKN24LYrxzjGAwyJ49e5AkiXg8zszMjJPFAbwNnERMWoC1X/oE8DGnSg+Hwxw8eBCfz4fH4yEajdLe7riv047QpaAWvQV42amSQ6EQBw6s9V5bWozNVdxuW7Pgl1HNANWiv4lDs6Wenh5GRkZ0nz179qxm2ubmZo4cOcLx48cJhUJWTWgBvlW+KIt2Ay9ZzbEW3d3d7Nu3T3OvWDS+CNLT08OmTZtobm5mZGSEpqa6XmY1XkLuw8qin8OBBYBIJML+/dqB4OLFi6ysrBjO4+7du5rrXbt2WTUngLwcVRZd1XuxSiQSYXh4WHNvfHyc+fl5fD6fbpq2tjb27t1LOBxW7i0tLTE/P69c9/b22mnfL8DqkHXMSg5+v59QKITP58PlclEqlQDR6XR3d2viTk5Okk6n8Xq9uFz6M8BDhw7R0tJCb28vDx8+JJPJADA9PU04HEaSxDcKh8PMzc1ZMfmzgOQGBrGw5jQ0NER/f7+huOfOnVOqafnlVAp3uVya9jo8PMzZs2cByOfz3Lt3j0AgAMDAwIBV0Z3ALgk4ZDZlf3+/IcGlUonz58+vaZfV4qodla6uLvz+1dWomzdvKuHW1lbDQ50OI26qOOXVaG1tZWhoSLkuFouk02mlaoMQcP/+fW7dukUulzOcdzweZ+fOnWzYsAEQPX/5RSSTSVZWVvB4PAB0dHSYyltF1LRodSdTKpU4c+YMjx49slK4LolEgmhUmBSJRDRfP5PJ0NnZCcDmzZu5ffu2lSKiEmJ10zDqapXL5RoqGCCdTithn8+nqeLLy8tK2Ib72isBm8ykqKzGjebBgwcaL039khcXF5WwjWGrXcLk6qZaaLWhxw75fF4ZqkArTt2GbXhmbRLgsZraKQqFghIuj82V92288DYJMO4TrhPqr6iuWTa+rpplCVhqRE6NQpIkZcgC7ddVu69mJi0VLEvAA7NGlXGiI+vs7NS04ydPnihhdY+tfhkmWZKAm3Wjqcjn80rY5/Ph9XqtFq5LeRwGIUzdqbW1tSnhx48fWy0i7gZmEY64IRYWFhgYGABEGxsdHSWRSGiGmVKpRDqdNuR+VhIMBpVwZb5q0Vbylpl1A9fMpFhcXGRubo7t27cDwi0tv4RKMpkMExMTmq9Vi0AgQEdHh3KtnlJu3LhR06bVToxJZiXgnNlUly5dIplM1o3n9/s5duyY5gtVw+VyaRYIstmsRtiOHat/QxcKBTvV+4IbmEFsajE1vZyYmCAUChEIBJQ5crlj83g8StuUJImjR48yPj6uuKzVxli1yzk1NaV5tm3bNiV848YNq51oGrhS7ib/BXzFbA4LCwssLCzoPtu9e7fydSRJYnR0lNOnT5PNZnXjl0olJicn6evrY3FxUdNmBwcHNT16PB43a2qZfwDFck4fYkF0Laanp3G5XPT1ifmMy+VidHSUCxcukMvldOfDqVSKVEq7ecjr9Wr6jFQqxdOnT62a9RdYXSMbQ/UPQKO4fPky166t9pNer5fDhw+bmiwEg0GNb1BZ7U2QAv4Jq6ILwB+t5laLq1evcv36dc295uZmw+mTyaQy0YjFYlYXDkDoK4D2v6xfAN/AgQX/K1euUCwWGRwcXPNM/RX1yGazjI2N4fP5DA99OuQQ+kSZqgdJ4H2rudYjFosxOzu75r7aw6tGpWdmgfcRIxSw9g+8t3FwAjIzM0MsFiOfz1MoFEgkEnacDKMsIXQpVPYoScQuol86ZUEsFiMWc2yDrx4/pKKT1mtQv0VsSPt/YAqxO0qDnugi8GVA34v43yELfAmdLdPVus5Z4BUnLVoHXkHoWEOt8eJD4PuOmOM8JxD261Jv89w7wHsNNcd53gN+XCuCkW2SrwPvNsQc53kXYW9NjIguAl8D3rRrkcO8ibCz7oqhmf3ebwHP8xFbPUXY8zzCPkOY3eR+ErEh7aMyjk8h7DlpJpGV4ww3gE8C3wFsOcQ2yMjlH5TtMYXVgysF4GdAP8KDszzfM8kTubx+uXxLi992jyjdQZye2S4bYfvMVBVScv4Rubw7NWPXwa7oMilEdQsCnwM+wKZhcvoP5PyCcv4NeamNPnZYBP4u/wA+jtjT8gnEUaIw4ojhRlbPWj5CnLVMIM5aXkIsSzu2U/a/pbRZtQnDy5wAAAAASUVORK5CYII=";const G=t("emotionAudio",{state:()=>({soundInstance:null,isPlaying:!1,isVoiceEnabled:!0,playbackPosition:0,lastVoiceState:null,ttsUrl:"",isNewInstance:!1,nowSound:"",currentAudioUrl:"",isPaused:!1,duration:0}),actions:{setAudioInstance(e){this.soundInstance=e},play(){!this.soundInstance&&this.currentAudioUrl&&this.createAudioInstance(this.currentAudioUrl),this.soundInstance&&(this.isPaused&&this.playbackPosition>0&&this.soundInstance.seek(this.playbackPosition),this.soundInstance.play(),this.isPlaying=!0,this.isPaused=!1)},pause(){this.soundInstance&&this.isPlaying&&(this.playbackPosition=this.soundInstance.seek()||0,this.soundInstance.pause(),this.isPlaying=!1,this.isPaused=!0)},stop(){this.soundInstance&&(this.soundInstance.stop(),this.isPlaying=!1,this.isPaused=!1,this.playbackPosition=0)},togglePlayPause(){this.isPlaying?this.pause():this.play()},setCurrentAudioUrl(e){this.currentAudioUrl!==e&&(this.stop(),this.currentAudioUrl=e,this.playbackPosition=0,this.isPaused=!1)},toggleVoice(){this.isVoiceEnabled=!this.isVoiceEnabled,this.isVoiceEnabled||this.stop()},resetAudioState(){this.stop(),this.currentAudioUrl="",this.ttsUrl="",this.soundInstance=null,this.nowSound=""},createAudioInstance(e){this.soundInstance&&this.soundInstance.stop();const t=new B.Howl({src:[e],html5:!0,format:["mp3","wav"],onplay:()=>{this.isPlaying=!0},onend:()=>{this.isPlaying=!1,this.isPaused=!1,this.playbackPosition=0},onstop:()=>{this.isPlaying=!1},onpause:()=>{this.isPlaying=!1},onerror:e=>{this.isPlaying=!1},onload:()=>{this.duration=t.duration()}});this.soundInstance=t,this.nowSound=t}}});const R="https://api.homilychart.com/link",W=function(e){return n({url:`${R}/api/workflow/aiGodSecond`,method:"post",data:{language:"cn",parentId:e.parentId,recordId:e.recordId,stockId:e.stockId,token:localStorage.getItem("localToken")}})},q=t("emotion",{state:()=>({history:[],stockList:[],activeStockIndex:0,conversations:[]}),persist:{key:"emotion-store",storage:sessionStorage,paths:["history","stockList","activeStockIndex","conversations"]},getters:{activeStock:e=>e.stockList[e.activeStockIndex]||null,stockCount:e=>e.stockList.length,conversationCount:e=>e.conversations.length,recentConversations:e=>e.conversations.slice(-20)},actions:{addHistory(e){this.history.unshift(e)},clearHistory(){this.history=[]},addStock(e){var t,n;if(!(null==(t=e.stockInfo)?void 0:t.code)||!(null==(n=e.stockInfo)?void 0:n.market)||!e.timestamp)return!1;const o=this.generateStockUniqueId(e),a=this.stockList.find((e=>this.generateStockUniqueId(e)===o));if(a){const e=this.stockList.indexOf(a);return this.switchStock(e),!1}const i={...e,uniqueId:o};return this.stockList.push(i),this.activeStockIndex=this.stockList.length-1,!0},switchStock(e){e>=0&&e<this.stockList.length&&(this.activeStockIndex=e)},removeStock(e){e>=0&&e<this.stockList.length&&(this.stockList.splice(e,1),this.activeStockIndex>=this.stockList.length?this.activeStockIndex=Math.max(0,this.stockList.length-1):this.activeStockIndex>e&&this.activeStockIndex--)},updateStockData(e,t){e>=0&&e<this.stockList.length&&(this.stockList[e].apiData=t,this.stockList[e].timestamp=(new Date).toISOString())},clearAllStocks(){this.stockList=[],this.activeStockIndex=0},restoreFromHistory(e){const t={queryText:e.queryText,stockInfo:e.stockInfo,apiData:e.apiData,conclusionData:e.conclusionData,timestamp:e.timestamp};this.addStock(t)},updateStockConclusion(e,t){e>=0&&e<this.stockList.length&&(this.stockList[e].conclusionData=t,this.stockList[e].timestamp=(new Date).toISOString())},updateActiveStockConclusion(e){this.updateStockConclusion(this.activeStockIndex,e)},addConversation(e){this.conversations.push({...e,timestamp:e.timestamp||(new Date).toISOString()})},addConversations(e){e.forEach((e=>{this.addConversation(e)}))},clearConversations(){this.conversations=[]},getConversations(){return this.conversations},removeConversation(e){e>=0&&e<this.conversations.length&&this.conversations.splice(e,1)},updateConversation(e,t){e>=0&&e<this.conversations.length&&(this.conversations[e]={...this.conversations[e],...t,timestamp:(new Date).toISOString()})},generateStockUniqueId(e){var t,n;if(!(null==(t=e.stockInfo)?void 0:t.code)||!(null==(n=e.stockInfo)?void 0:n.market))throw new Error("股票代码和市场信息不能为空");return`${e.stockInfo.code}_${e.stockInfo.market}_${e.timestamp}`}}});const X={class:"page-container"},j={class:"golden-wheel"},N={key:0,class:"conversation-area"},Q={class:"message-list"},U={key:0,class:"user-message-wrapper"},Z={class:"message-bubble user-message"},Y={key:1,class:"ai-message-wrapper"},z={class:"ai-message-container"},J=["src"],K={class:"message-bubble ai-message"},$={key:0},ee={key:1},te=["innerHTML"],ne={key:1},oe={key:0,class:"loading-container"},ae={class:"user-input-display"},ie={class:"message-container"},re={class:"user-message-container"},se={class:"user-content"},ue=["src","onClick"],le={class:"message-bubble user-message"},ce={key:0,class:"user-sendTime"},de={class:"main"},pe={class:"main-content-wrapper"},ve={class:"matrix-header"},_e={class:"market-temperature-label"},fe={class:"market-temperature-value"},me={key:0,class:"market-temperature-icon"},he={key:1,class:"market-temperature-section"},ge={class:"temperature-content"},ye={class:"temperature-display"},we={class:"temperature-cold"},ke={class:"temperature-hot"},Ae={key:0,class:"emotion-decoder-icon"},be={key:1,class:"emotion-decoder-section"},xe={class:"emotion-decoder-content"},Se={key:2,class:"bottom-radar-icon"},Te={key:3,class:"bottom-radar-section"},Ie={class:"bottom-radar-content"},Pe={key:4,class:"energy-converter-icon"},De={key:5,class:"energy-converter-section"},Le={class:"energy-converter-content"},Ee={class:"bk-image"},Oe={key:0,class:"conclusion-container"},Ce={key:0,class:"conclusion-item"},Me={key:0,class:"conclusion-text"},He={key:1,class:"conclusion-text"},Be={key:2,class:"conclusion-text"},Ve={key:3,class:"conclusion-text"},Fe={key:1,class:"conclusion-item"},Ge={key:0,class:"conclusion-text"},Re={key:1,class:"conclusion-text"},We={key:2,class:"conclusion-item"},qe={key:0,class:"conclusion-text"},Xe={key:1,class:"conclusion-text"},je={key:3,class:"conclusion-item"},Ne={key:0,class:"conclusion-text"},Qe={key:1,class:"conclusion-text"},Ue={key:1,class:"conclusion-placeholder"},Ze={key:2,class:"conclusion-placeholder"},Ye={key:0,class:"disclaimer-item"},ze={key:0,class:"disclaimer-text"},Je={key:1,class:"disclaimer-text"};var Ke=P({__name:"AiEmotion",emits:["updateMessage","sendMessage","ensureAIchat","enableInput","scrollToBottom","showCount"],setup(e,{expose:t,emit:P}){const O=q(),Ke=G(),$e=o((()=>Ke.isVoiceEnabled)),et=D();function tt(e){if(!e)return"未知错误";try{L.setOptions({breaks:!0,gfm:!0,sanitize:!1,smartLists:!0,smartypants:!0,xhtml:!1});const t=L(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||e}catch(t){return e}}E();const nt=a([]),ot=a([]),at=a([]),it=a([]),rt=a(null),st=a([]),ut=a(new Set),lt=()=>{pt.value||O.stockList.forEach((e=>{var t;if(!(null==(t=null==e?void 0:e.stockInfo)?void 0:t.code)||!(null==e?void 0:e.timestamp)||!(null==e?void 0:e.queryText))return;const n=Dt(e);if(n&&!ut.value.has(n)){st.value.find((t=>"user"===t.sender&&t.text===e.queryText));O.getConversations().find((t=>"user"===t.sender&&t.text===e.queryText)),ut.value.add(n)}}))};t({handleSendMessage:async function(e,t){if(gt.value=!0,dt.value=!1,!e||!e.trim())return r.warning("输入内容不能为空"),void(t&&"function"==typeof t&&(t(),Lt.value=null));ct.value=!1,pt.value=!0;const o=[...st.value];st.value=[];const a=s({sender:"user",text:e});st.value.push(a),O.addConversation({sender:"user",text:e,timestamp:(new Date).toISOString()});const i=await async function(e=null){const t=s({sender:"ai",text:"AI情绪大模型正在思考",gif:C,flag:!0});st.value.push(t),await new Promise((e=>setTimeout(e,1500))),st.value.pop();const n=s({sender:"ai",text:"正在解析关键数据",gif:M,flag:!0});if(st.value.push(n),!e)return n;await new Promise((e=>setTimeout(e,1500))),st.value.pop();const o=s({sender:"ai",text:`正在生成${e}量子四维矩阵图`,gif:H,flag:!0});st.value.push(o),await new Promise((e=>setTimeout(e,1500))),st.value.pop();const a=s({sender:"ai",text:"报告已生成!"});return st.value.push(a),await new Promise((e=>setTimeout(e,1500))),st.value.pop(),null}();let l=null;try{const r=await(c={token:localStorage.getItem("localToken"),language:"cn",marketList:"hk,cn,usa,my,sg,vi,in,gb",content:a.text},n({url:`${R}/api/workflow/aiGodFirst`,method:"post",data:{token:localStorage.getItem("localToken"),language:"cn",marketList:"hk,cn,usa,my,sg,vi,in,gb",content:c.content}})),p=r.data;if(400===r.code){if(i){const e=st.value.indexOf(i);e>-1&&st.value.splice(e,1)}ct.value=!1;const e=r.msg||"用户输入内容不合法,请重新输入",n=s({sender:"ai",text:tt(e)});return st.value.push(n),O.addConversation({sender:"ai",text:tt(e),timestamp:(new Date).toISOString()}),pt.value=!1,st.value=[...o,...st.value],u((()=>{mn()})),void(t&&"function"==typeof t&&(t(),Lt.value=null))}if(406===r.code){if(i){const e=st.value.indexOf(i);e>-1&&st.value.splice(e,1)}ct.value=!1;const e=tt(r.msg||"您的使用次数已用完,请联系客服或购买服务包").replace(/获取token次数/g,'<span class="token-link" style="color: blue; cursor: pointer; text-decoration: underline;" onclick="window.handleTokenClick()">获取token次数</span>'),n=s({sender:"ai",text:e,isHtml:!0});return st.value.push(n),O.addConversation({sender:"ai",text:e,isHtml:!0,timestamp:(new Date).toISOString()}),pt.value=!1,st.value=[...o,...st.value],u((()=>{mn()})),void(t&&"function"==typeof t&&(t(),Lt.value=null))}if(200!==r.code){if(i){const e=st.value.indexOf(i);e>-1&&st.value.splice(e,1)}ct.value=!1;const e=r.msg||"系统异常,请稍后再试",n=s({sender:"ai",text:tt(e)});return st.value.push(n),O.addConversation({sender:"ai",text:tt(e),timestamp:(new Date).toISOString()}),pt.value=!1,st.value=[...o,...st.value],u((()=>{mn()})),void(t&&"function"==typeof t&&(t(),Lt.value=null))}if(!p||!p.market||!p.code){if(i){const e=st.value.indexOf(i);e>-1&&st.value.splice(e,1)}ct.value=!1;const e=r&&r.msg?r.msg:"系统正在为您努力加载中,请稍后再试",n=s({sender:"ai",text:tt(e)});return st.value.push(n),O.addConversation({sender:"ai",text:tt(e),timestamp:(new Date).toISOString()}),pt.value=!1,st.value=[...o,...st.value],u((()=>{mn()})),void(t&&"function"==typeof t&&(t(),Lt.value=null))}i&&p.name&&(l=await async function(e,t){if(!e||!t)return;await new Promise((e=>setTimeout(e,1500)));const n=st.value.indexOf(e);n>-1&&st.value.splice(n,1);const o=s({sender:"ai",text:`正在生成${t}量子四维矩阵图`,gif:H,flag:!0});return st.value.push(o),o}(i,p.name)),ct.value=!1;const v={recordId:p.recordId,parentId:p.parentId,stockId:p.stockId,token:localStorage.getItem("localToken"),language:"cn"},_=`${p.code}_${p.market}_${(new Date).toISOString()}`,f=!xt.value.has(_);f&>.value?(St.value.set(_,{one1:"",one2:"",two:"",three:"",four:"",disclaimer:""}),Tt.value.set(_,{one:!1,two:!1,three:!1,four:!1,disclaimer:!1})):(St.value.delete(_),Tt.value.delete(_),f&&(xt.value.set(_,!0),It.value.set(_,!0)));const[m,h]=await Promise.all([W(v),an(p.code,p.market,p.name||"未知股票",e.trim(),p.stockId,_)]),g=m;if(g&&200!==g.code){if(l){const e=st.value.indexOf(l);e>-1&&st.value.splice(e,1)}const e=g.msg||"系统正在为您努力加载中,请稍后再试",n=s({sender:"ai",text:e});return st.value.push(n),pt.value=!1,st.value=[...o,...st.value],void(t&&"function"==typeof t&&(t(),Lt.value=null))}if(!(g&&g.data&&h)){if(l){const e=st.value.indexOf(l);e>-1&&st.value.splice(e,1)}if(!g||!g.data){const e=s({sender:"ai",text:"系统正在为您努力加载中,请稍后再试"});st.value.push(e)}return pt.value=!1,st.value=[...o,...st.value],ct.value&&O.activeStock&&O.activeStock.apiData&&u((()=>{un(O.activeStock.apiData)})),void(t&&"function"==typeof t&&(t(),Lt.value=null))}l&&await async function(e){if(!e)return;await new Promise((e=>setTimeout(e,1500)));const t=st.value.indexOf(e);t>-1&&st.value.splice(t,1);const n=s({sender:"ai",text:"报告已生成!"});st.value.push(n),await new Promise((e=>setTimeout(e,1500))),st.value.pop()}(l),vt.value=g.data,O.updateActiveStockConclusion(g.data);Dt(p)&&u((()=>{})),ct.value=!0,u((()=>{st.value=[],ut.value.clear(),yt.value=!1,mn()}));try{await et.getUserCount()}catch(d){}try{et.searchRecord=!0}catch(d){}u((()=>{if(Vt.value&&Vt.value.apiData){if(un(Vt.value.apiData),gt.value&&Gt.value&&Et.value){const e=Dt(Vt.value);e&&!xt.value.has(e)?(It.value.has(e)?Zt(Gt.value,e,t):(It.value.set(e,!0),nn(Gt.value,!0,t)),xt.value.set(e,!0)):t&&"function"==typeof t&&(t(),Lt.value=null)}gt.value=!1}}))}catch(d){if(l){const e=st.value.indexOf(l);e>-1&&st.value.splice(e,1)}return O.stockList.length>0&&O.activeStock?(ct.value=!0,u((()=>{st.value=[],yt.value=!1,mn()})),u((()=>{un(O.activeStock.apiData)}))):ct.value=!1,pt.value=!1,st.value=[...o,...st.value],ct.value&&O.activeStock&&O.activeStock.apiData&&u((()=>{un(O.activeStock.apiData)})),void(t&&"function"==typeof t&&(t(),Lt.value=null))}finally{pt.value&&(pt.value=!1)}var c},clearConversations:()=>{st.value=[],O.clearConversations(),ut.value.clear()},addStock:e=>{if(e&&e.stockInfo&&e.stockInfo.code){if(dt.value=!0,gt.value=!1,yt.value=!1,ct.value=!1,O.clearAllStocks(),O.clearConversations(),st.value=[],ut.value.clear(),on(),Et.value="",Ke.resetAudioState(),Yt(),ft.value=!1,mt.value=!1,xt.value.clear(),It.value.clear(),At.value={marketTemperature:!1,emotionDecod:!1,emotionalBottomRadar:!1,emoEnergyConverter:!1},O.addStock(e),ct.value=!0,e.conclusionData){const t=Dt(e);t&&(xt.value.set(t,!0),It.value.set(t,!0))}u((()=>{yn("enableInput")}))}else yn("enableInput")}});const ct=a(!1),dt=a(!1),pt=a(!1);a(1);const vt=a("");a(!1),a(0),a([]);const _t=a(null),ft=a(!1),mt=a(!1),ht=a(null),gt=a(!1),yt=a(!1),wt=a(!1),kt=a(null),At=a({marketTemperature:!0,emotionDecod:!0,emotionalBottomRadar:!0,emoEnergyConverter:!0}),bt=a([]),xt=a(new Map),St=a(new Map),Tt=a(new Map),It=a(new Map),Pt=a(new Map),Dt=e=>{var t,n;if(!e||"object"!=typeof e)return null;if(e.uniqueId)return e.uniqueId;const o=(null==(t=e.stockInfo)?void 0:t.code)||(null==(n=e.stockInfo)?void 0:n.symbol),a=e.timestamp;return o&&a?`${o}_${a}`:null},Lt=a(null),Et=a(""),Ot=a(!1),Ct=e=>{const t=Dt(e);return t&&Pt.value.get(t)||{isPlaying:!1,isPaused:!1}},Mt=(e,t)=>{const n=Dt(e);n&&t&&"object"==typeof t&&Pt.value.set(n,{...t})},Ht=()=>{for(const[e,t]of Pt.value.entries())Pt.value.set(e,{isPlaying:!1,isPaused:!1})},Bt=a(!1),Vt=o((()=>O.activeStock));o((()=>{var e;return(null==(e=Vt.value)?void 0:e.stockInfo.name)||""})),o((()=>{var e,t;return(null==(e=Vt.value)?void 0:e.stockInfo.code)||(null==(t=Vt.value)?void 0:t.stockInfo.symbol)||""})),o((()=>Vt.value?Dt(Vt.value):"")),o((()=>{var e,t;if(!(null==(e=Vt.value)?void 0:e.apiData))return"";const n=null==(t=Vt.value.apiData.GSWDJ)?void 0:t.at(-1);if(!n||!n[0])return"";const o=n[0],a=o.match(/(\d{4})[\-\/](\d{1,2})[\-\/](\d{1,2})/);if(a){const[,e,t,n]=a;return`更新时间:${n.padStart(2,"0")}/${t.padStart(2,"0")}/${e}`}return o})),o((()=>{var e,t;if(!(null==(e=Vt.value)?void 0:e.apiData))return null;const n=null==(t=Vt.value.apiData.GSWDJ)?void 0:t.at(-1);return n?Math.round(n[1]):null})),o((()=>{var e,t;if(!(null==(e=Vt.value)?void 0:e.apiData))return null;const n=null==(t=Vt.value.apiData.GSWDJ)?void 0:t.at(-1);return n?Math.round(n[2]):null}));const Ft=o((()=>{var e;return(null==(e=Vt.value)?void 0:e.conclusionData)||""})),Gt=o((()=>{if(!Ft.value)return null;if("object"==typeof Ft.value)return Ft.value;try{return JSON.parse(Ft.value)}catch(e){return null}})),Rt=o((()=>O.stockList.filter((e=>{var t;return(null==(t=e.stockInfo)?void 0:t.name)&&e.apiData&&e.queryText})).sort(((e,t)=>new Date(e.timestamp)-new Date(t.timestamp))))),Wt=e=>{var t;if(!(null==e?void 0:e.apiData))return"";const n=null==(t=e.apiData.GSWDJ)?void 0:t.at(-1);if(!n||!n[0])return"";const o=n[0],a=o.match(/(\d{4})[\-\/](\d{1,2})[\-\/](\d{1,2})/);if(a){const[,e,t,n]=a;return`更新时间:${n.padStart(2,"0")}/${t.padStart(2,"0")}/${e}`}return o},qt=e=>{var t;if(!(null==e?void 0:e.apiData))return null;const n=null==(t=e.apiData.GSWDJ)?void 0:t.at(-1);return n?Math.round(n[1]):null},Xt=e=>{var t;if(!(null==e?void 0:e.apiData))return null;const n=null==(t=e.apiData.GSWDJ)?void 0:t.at(-1);return n?Math.round(n[2]):null},jt=e=>{if(!(null==e?void 0:e.conclusionData))return null;if("object"==typeof e.conclusionData)return e.conclusionData;try{return JSON.parse(e.conclusionData)}catch(t){return null}},Nt=e=>{const t=Dt(e);if(!t)return null;return St.value.get(t)||null},Qt=e=>{const t=Dt(e);return t&&Tt.value.get(t)||null},Ut=e=>{const t=Dt(e);if(!t)return!1;if(!jt(e))return!1;return!!xt.value.has(t)||!gt.value||(St.value.has(t)||St.value.set(t,{one1:"",one2:"",two:"",three:"",four:"",disclaimer:""}),Tt.value.has(t)||Tt.value.set(t,{one:!1,two:!1,three:!1,four:!1,disclaimer:!1}),!0)};function Zt(e,t,n){if(!t&&O.activeStock&&(t=Dt(O.activeStock)),!t)return;Lt.value=n,bt.value.forEach((e=>clearTimeout(e))),bt.value=[],St.value.has(t)||St.value.set(t,{one1:"",one2:"",two:"",three:"",four:"",disclaimer:""}),Tt.value.has(t)||Tt.value.set(t,{one:!1,two:!1,three:!1,four:!1,disclaimer:!1}),St.value.set(t,{one1:"",one2:"",two:"",three:"",four:"",disclaimer:""}),Tt.value.set(t,{one:!1,two:!1,three:!1,four:!1,disclaimer:!1});let o=0;[{key:"one",title:"L1: 情绪监控",contents:[{key:"one1",text:e.one1},{key:"one2",text:e.one2}]},{key:"two",title:"L2: 情绪解码",contents:[{key:"two",text:e.two}]},{key:"three",title:"L3: 情绪推演",contents:[{key:"three",text:e.three}]},{key:"four",title:"L4: 情绪套利",contents:[{key:"four",text:e.four}]}].forEach((e=>{if(!e.contents.some((e=>e.text&&e.text.trim())))return;const n=setTimeout((()=>{const n=Tt.value.get(t);n&&(n[e.key]=!0,Tt.value.set(t,{...n}))}),o);bt.value.push(n),o+=100,e.contents.forEach((e=>{if(e.text&&e.text.trim()){for(let n=0;n<=e.text.length;n++){const a=setTimeout((()=>{const o=St.value.get(t);o&&(o[e.key]=e.text.substring(0,n),St.value.set(t,{...o}))}),o+200*n);bt.value.push(a)}o+=200*e.text.length+200}})),o+=800}));const a="该内容由AI生成,请注意甄别",i=setTimeout((()=>{const e=Tt.value.get(t);e&&(e.disclaimer=!0,Tt.value.set(t,{...e}))}),o);bt.value.push(i),o+=100;for(let r=0;r<=a.length;r++){const e=setTimeout((()=>{const e=St.value.get(t);e&&(e.disclaimer=a.substring(0,r),St.value.set(t,{...e})),r===a.length&&n&&"function"==typeof n&&(n(),Lt.value=null)}),o+200*r);bt.value.push(e)}}function Yt(){bt.value.forEach((e=>clearTimeout(e))),bt.value=[]}i((()=>O.stockList),(e=>{0===e.length?(ct.value=!1,on(),Et.value="",Ke.resetAudioState(),Yt(),ft.value=!1,mt.value=!1,xt.value.clear(),It.value.clear(),ut.value.clear(),At.value={marketTemperature:!1,emotionDecod:!1,emotionalBottomRadar:!1,emoEnergyConverter:!1}):lt()}),{deep:!0}),i(Vt,(e=>{if(e&&e.apiData){on(),Et.value="",Ke.resetAudioState(),Yt(),ft.value=!1,mt.value=!1;const n=Dt(e);if(e.conclusionData)try{const t="object"==typeof e.conclusionData?e.conclusionData:JSON.parse(e.conclusionData);if(!(n&&St.value.has(n))){let e=null;t.one1_url?e=t.one1_url.toString().trim().replace(/[`\s]/g,""):t.one2_url?e=t.one2_url.toString().trim().replace(/[`\s]/g,""):t.two_url?e=t.two_url.toString().trim().replace(/[`\s]/g,""):t.three_url?e=t.three_url.toString().trim().replace(/[`\s]/g,""):t.four_url?e=t.four_url.toString().trim().replace(/[`\s]/g,""):t.url?e=t.url.toString().trim().replace(/[`\s]/g,""):t.audioUrl?e=t.audioUrl.toString().trim().replace(/[`\s]/g,""):t.voice_url?e=t.voice_url.toString().trim().replace(/[`\s]/g,""):t.audio?e=t.audio.toString().trim().replace(/[`\s]/g,""):t.tts_url&&(e=t.tts_url.toString().trim().replace(/[`\s]/g,"")),e&&e.startsWith("http")&&(Et.value=e,Ke.setCurrentAudioUrl(e))}}catch(t){}else Et.value="",Ke.resetAudioState();ct.value&&u((()=>{un(e.apiData),setTimeout((()=>{if(_t.value&&_t.value instanceof Element&&Gt.value){if(n&&xt.value.has(n))return;const e=_t.value.getBoundingClientRect();if(e.top<window.innerHeight&&e.bottom>0&&n)if(xt.value.has(n)){const e=Gt.value;displayedTexts.value={one1:e.one1||"",one2:e.one2||"",two:e.two||"",three:e.three||"",four:e.four||"",disclaimer:"该内容由AI生成,请注意甄别"},displayedTitles.value={one:"L1: 情绪监控",two:"L2: 情绪解码",three:"L3: 情绪推演",four:"L4: 情绪套利"},moduleVisibility.value={one:!(!e.one1&&!e.one2),two:!!e.two,three:!!e.three,four:!!e.four,disclaimer:!0}}else if(gt.value&&Et.value)mt.value=!0,ft.value=!0,It.value.has(n)?Zt(Gt.value,n):(It.value.set(n,!0),nn(Gt.value,!0)),xt.value.set(n,!0);else{if(gt.value&&!Et.value)return;Gt.value,xt.value.set(n,!0),It.value.set(n,!0)}}}),500)}))}else At.value={marketTemperature:!1,emotionDecod:!1,emotionalBottomRadar:!1,emoEnergyConverter:!1}}),{immediate:!0}),i(Gt,(e=>{if(e){let t=null;e.one1_url?t=e.one1_url.toString().trim().replace(/[`\s]/g,""):e.one2_url?t=e.one2_url.toString().trim().replace(/[`\s]/g,""):e.two_url?t=e.two_url.toString().trim().replace(/[`\s]/g,""):e.three_url?t=e.three_url.toString().trim().replace(/[`\s]/g,""):e.four_url?t=e.four_url.toString().trim().replace(/[`\s]/g,""):e.url?t=e.url.toString().trim().replace(/[`\s]/g,""):e.audioUrl?t=e.audioUrl.toString().trim().replace(/[`\s]/g,""):e.voice_url?t=e.voice_url.toString().trim().replace(/[`\s]/g,""):e.audio?t=e.audio.toString().trim().replace(/[`\s]/g,""):e.tts_url&&(t=e.tts_url.toString().trim().replace(/[`\s]/g,"")),t&&t.startsWith("http")&&(Et.value=t,Ke.setCurrentAudioUrl(t))}}),{immediate:!0});const zt=a([]),Jt=a(!1);let Kt=0,$t=!1;const en={one1_url:1,one2_url:2,two_url:3,three_url:4,four_url:5,url:6,audioUrl:7,voice_url:8,audio:9,tts_url:10},tn=()=>{if(0===zt.value.length||Jt.value||$t)return;Kt>=zt.value.length&&zt.value.length>0&&(Kt=0,$t=!1),$t=!0,Jt.value=!0;const e=zt.value[Kt];Ke.nowSound&&Ke.nowSound.playing()&&Ke.nowSound.stop();const t=new B.Howl({src:[e.url],html5:!1,format:["mp3","wav"],onplay:()=>{Ot.value=!0,Jt.value=!0,Ke.isPlaying=!0;const t=O.activeStock;if(t&&Mt(t,{isPlaying:!0,isPaused:!1}),0===Kt&&e.shouldStartTypewriter&&Gt.value&&!Ke.isPaused&&0===Ke.playbackPosition){const n=t?Dt(t):null;Zt(Gt.value,n,e.onComplete)}else 0===Kt&&e.shouldStartTypewriter},onpause:()=>{Ke.isPlaying=!1,Ke.isPaused=!0,t&&t.seek&&(Ke.playbackPosition=t.seek()||0);const e=O.activeStock;e&&Mt(e,{isPlaying:!1,isPaused:!0})},onresume:()=>{Ke.isPlaying=!0,Ke.isPaused=!1,Ke.playbackPosition>0&&t&&t.seek&&t.seek(Ke.playbackPosition);const e=O.activeStock;e&&Mt(e,{isPlaying:!0,isPaused:!1})},onend:()=>{if(Ke.isPaused=!1,Ke.playbackPosition=0,Kt++,Kt<zt.value.length)setTimeout((()=>{$t=!1,Jt.value=!1,Ke.isPlaying=!0;const e=zt.value[Kt];e&&e.url&&Ke.setCurrentAudioUrl(e.url),tn()}),500);else{Ke.nowSound=null,$t=!1,Ke.isPlaying=!1,Ke.isPaused=!1,Ke.playbackPosition=0,Ot.value=!1,Jt.value=!1;const t=O.activeStock;t&&Mt(t,{isPlaying:!1,isPaused:!1}),e.onComplete&&"function"==typeof e.onComplete&&e.onComplete()}},onstop:()=>{Ke.isPlaying=!1,Ke.isPaused=!1,Ke.playbackPosition=0,Ot.value=!1,Jt.value=!1;const e=O.activeStock;e&&Mt(e,{isPlaying:!1,isPaused:!1})},onerror:e=>{Ot.value=!1,Jt.value=!1,$t=!1,setTimeout((()=>{tn()}),100)},onload:()=>{Ke.duration=t.duration()}});Ke.setCurrentAudioUrl(e.url),Ke.nowSound=t,Ke.setAudioInstance(t),t.play()};function nn(e,t=!1,n=null){if(e&&Ke.isVoiceEnabled)try{const o="object"==typeof e?e:JSON.parse(e);zt.value=[],Kt=0,$t=!1,Jt.value=!1;if([{key:"one1_url",name:"one1_url"},{key:"one2_url",name:"one2_url"},{key:"two_url",name:"two_url"},{key:"three_url",name:"three_url"},{key:"four_url",name:"four_url"},{key:"url",name:"url"},{key:"audioUrl",name:"audioUrl"},{key:"voice_url",name:"voice_url"},{key:"audio",name:"audio"},{key:"tts_url",name:"tts_url"}].forEach((e=>{if(o[e.key]){const a=o[e.key].toString().trim().replace(/[`\s]/g,"");a&&a.startsWith("http")&&((e,t,n=!1,o=null)=>{if(e&&Ke.isVoiceEnabled){const a={url:e,name:t,order:en[t]||999,shouldStartTypewriter:n,onComplete:o};zt.value.push(a),zt.value.sort(((e,t)=>e.order-t.order)),Jt.value||Ke.isPlaying||1!==zt.value.length||tn()}})(a,e.name,t&&0===zt.value.length,n)}})),0===zt.value.length){if(t){const e=O.activeStock,t=e?Dt(e):null;Zt(o,t,n)}}else{const e=O.activeStock;e&&Mt(e,{isPlaying:!0,isPaused:!1})}}catch(o){}}function on(){Ke.nowSound&&Ke.nowSound.stop(),Ot.value=!1}async function an(e,t,n,o,a,i=null){try{const r={stockId:a},c=(await l.post("https://api.homilychart.com/link/api/workflow/getStockData",r,{headers:{"Content-Type":"application/json"}})).data;if(200===c.code&&c.data){if(!rn(c.data).isValid){O.stockList.length>0&&O.activeStock?(ct.value=!0,u((()=>{st.value=[],yt.value=!1,mn()})),u((()=>{un(O.activeStock.apiData)}))):ct.value=!1;const e=s({sender:"ai",text:"系统正在为您努力加载中,请稍后再试"});return st.value.push(e),O.addConversation({sender:"ai",text:"系统正在为您努力加载中,请稍后再试",timestamp:(new Date).toISOString()}),!1}const a={queryText:o,stockInfo:{name:n,code:e,market:t},apiData:c.data,conclusionData:vt.value,timestamp:(new Date).toISOString(),uniqueId:i||`${e}_${t}_${(new Date).toISOString()}`};return O.addStock(a),!0}{O.stockList.length>0&&O.activeStock?(ct.value=!0,u((()=>{st.value=[],yt.value=!1,mn()})),u((()=>{un(O.activeStock.apiData)}))):ct.value=!1;const e=s({sender:"ai",text:"系统正在为您努力加载中,请稍后再试"});return st.value.push(e),O.addConversation({sender:"ai",text:"系统正在为您努力加载中,请稍后再试",timestamp:(new Date).toISOString()}),!1}}catch(r){O.stockList.length>0&&O.activeStock?(ct.value=!0,u((()=>{st.value=[],yt.value=!1,mn()})),u((()=>{un(O.activeStock.apiData)}))):ct.value=!1;const e=s({sender:"ai",text:"系统正在为您努力加载中,请稍后再试"});return st.value.push(e),O.addConversation({sender:"ai",text:"系统正在为您努力加载中,请稍后再试",timestamp:(new Date).toISOString()}),!1}}function rn(e){const t=["GSWDJ","KLine20","QXJMQ","QXTDLD","WDRL"],n=[];for(const o of t)(!e[o]||Array.isArray(e[o])&&0===e[o].length||"object"==typeof e[o]&&!sn(e[o]))&&n.push(o);return{isValid:0===n.length,missingFields:n}}function sn(e){if(!e||"object"!=typeof e)return!1;for(const t in e)if(e.hasOwnProperty(t)){const n=e[t];if("string"==typeof n){if(""!==n.trim())return!0}else if(Array.isArray(n)){if(n.length>0)return!0}else{if("number"==typeof n&&0!==n)return!0;if("boolean"==typeof n&&!0===n)return!0;if("object"==typeof n&&null!==n&&sn(n))return!0}}return!1}function un(e){const t=JSON.parse(JSON.stringify(e)),n=rn(t);if(!n.isValid){const e=s({sender:"ai",text:`数据不完整,缺少以下关键数据:${n.missingFields.join("、")}。请稍后重试或联系客服。`});return st.value.push(e),O.addConversation({sender:"ai",text:`数据不完整,缺少以下关键数据:${n.missingFields.join("、")}。请稍后重试或联系客服。`,timestamp:(new Date).toISOString()}),void(ct.value=!1)}At.value={marketTemperature:!!(t.GSWDJ&&t.GSWDJ.length>0),emotionDecod:!!(t.QXJMQ&&t.QXJMQ.length>0),emotionalBottomRadar:!!(t.QXTDLD&&t.QXTDLD.length>0),emoEnergyConverter:!(!t.QXNLZHQ||!(Array.isArray(t.QXNLZHQ)?t.QXNLZHQ.length>0:sn(t.QXNLZHQ)))},u((()=>{setTimeout((()=>{try{document.querySelector("emo-energy-converter");setTimeout((()=>{ot.value}),1e3),O.stockList.forEach(((e,t)=>{e.apiData&&async function(e,t=0){const n=[{name:"股市温度计",ref:nt.value[t],visibility:At.value.marketTemperature,method:"initChart",params:[e.GSWDJ,e.KLine20,e.WDRL]},{name:"情绪解码器",ref:at.value[t],visibility:At.value.emotionDecod,method:"initQXNLZHEcharts",params:[e.KLine20,e.QXJMQ]},{name:"情绪探底雷达",ref:it.value[t],visibility:At.value.emotionalBottomRadar,method:"initEmotionalBottomRadar",params:[e.KLine20,e.QXTDLD]},{name:"情绪能量转化器",ref:ot.value[t],visibility:At.value.emoEnergyConverter,method:"initQXNLZHEcharts",params:[e.KLine20,e.QXNLZHQ]}];for(const a of n)if(a.ref&&a.visibility&&"function"==typeof a.ref[a.method])try{const e=0===t?100:300+100*t;await new Promise((t=>setTimeout(t,e))),a.ref[a.method](...a.params),await new Promise((e=>setTimeout(e,800)))}catch(o){}}(e.apiData,t)}))}catch(e){const t=s({sender:"ai",text:"图表渲染失败,请重试"});st.value.push(t),O.addConversation({sender:"ai",text:"系统正在为您努力加载中,请稍后再试",timestamp:(new Date).toISOString()})}}),500)}))}const ln=()=>{wt.value=!0,kt.value&&clearTimeout(kt.value),kt.value=setTimeout((()=>{wt.value=!1}),2e3)},cn=e=>{ln()},dn=e=>{ln()};function pn(){if(!(_t.value&&_t.value instanceof Element))return;const e=new IntersectionObserver((e=>{e.forEach((e=>{if(e.isIntersecting){const e=Vt.value?Dt(Vt.value):null;Gt.value&&e&&(xt.value.has(e)||(gt.value&&Et.value?(It.value.set(e,!0),nn(Gt.value,!0),xt.value.set(e,!0)):(xt.value.set(e,!0),It.value.set(e,!0))))}}))}),{threshold:.3,rootMargin:"0px 0px -100px 0px"});e.observe(_t.value),ht.value=e}const vn=()=>{const e=document.getElementById("top-anchor");e?e.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}):window.scrollTo({top:0,behavior:"smooth"}),setTimeout((()=>{(window.pageYOffset||document.documentElement.scrollTop)>50&&(document.documentElement.scrollTop=0,document.body.scrollTop=0)}),1e3)},_n=a(null),fn=a(!1),mn=()=>{u((()=>{yn("scrollToBottom")}))},hn=()=>{const e=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;Bt.value=e>200},gn=()=>{const e=rt.value;if(e){e.scrollTop>200&&(Bt.value=!0)}};c((async()=>{window.handleTokenClick=()=>{yn("showCount")},(()=>{const e=O.getConversations();st.value=e.map((e=>({sender:e.sender,text:e.text,isHtml:e.isHtml||!1})))})(),lt();const e=function(e,t){let n;return function(...o){clearTimeout(n),n=setTimeout((()=>{clearTimeout(n),e(...o)}),t)}}((()=>{const e=document.querySelector(".main");e&&(e.style.display="none",e.offsetHeight,e.style.display="");const t=[window.emoEnergyConverterResizeHandler,window.marketTempResizeHandler,window.emotionalBottomRadarResizeHandler,window.emotionDecodResizeHandler];t.forEach((e=>{if("function"==typeof e)try{e()}catch(t){}})),setTimeout((()=>{t.forEach((e=>{if("function"==typeof e)try{e()}catch(t){}}))}),100)}),150);window.aiEmotionGlobalResizeHandler&&window.removeEventListener("resize",window.aiEmotionGlobalResizeHandler),window.addEventListener("resize",e),window.aiEmotionGlobalResizeHandler=e;const t=rt.value;t&&(t.addEventListener("wheel",cn,{passive:!0}),t.addEventListener("touchmove",dn,{passive:!0}),t.addEventListener("scroll",ln,{passive:!0}),t.addEventListener("scroll",gn,{passive:!0})),window.addEventListener("scroll",hn,{passive:!0}),document.addEventListener("scroll",hn,{passive:!0}),pt.value=!0,setTimeout((()=>{pt.value=!1}),5e3),O.stockList.length>0&&O.activeStock?(ct.value=!0,u((()=>{st.value=[],yt.value=!1})),u((()=>{const e=O.activeStock;if(e&&e.apiData&&(un(e.apiData),e.conclusionData)){vt.value=e.conclusionData,vt.value=e.conclusionData;const t=Dt(e);t&&(xt.value.set(t,!0),It.value.set(t,!0))}pn()}))):u((()=>{pn()}))})),d((()=>{Yt(),Lt.value&&"function"==typeof Lt.value&&(Lt.value(),Lt.value=null),on(),ft.value=!1,mt.value=!1,fn.value=!1,_n.value&&(_n.value.disconnect(),_n.value.mutationObserver&&(_n.value.mutationObserver.disconnect(),_n.value.mutationObserver=null),_n.value=null),kt.value&&(clearTimeout(kt.value),kt.value=null),ht.value&&(ht.value.disconnect(),ht.value=null),window.aiEmotionGlobalResizeHandler&&(window.removeEventListener("resize",window.aiEmotionGlobalResizeHandler),window.aiEmotionGlobalResizeHandler=null);const e=rt.value;e&&(e.removeEventListener("wheel",cn),e.removeEventListener("touchmove",dn),e.removeEventListener("scroll",ln),e.removeEventListener("scroll",gn)),window.removeEventListener("scroll",hn),document.removeEventListener("scroll",hn)}));const yn=P;return(e,t)=>(p(),v(m,null,[t[19]||(t[19]=_("div",{id:"top-anchor",class:"top-anchor"},null,-1)),_("div",X,[_("div",{class:"ai-emotion-container",ref_key:"userInputDisplayRef",ref:rt},[_("div",j,[_("img",{src:"/aixiaocaishen/static/images/金轮-858e9d26.png",class:f(["golden-wheel-img",{"rotating-image":pt.value}]),alt:"金轮图标"},null,2)]),st.value.length>0&&!dt.value?(p(),v("div",N,[_("div",Q,[(p(!0),v(m,null,h(st.value,((e,n)=>(p(),v("div",{key:n,class:f(["message-item",{"user-message-item":"user"===e.sender,"ai-message-item":"ai"===e.sender}])},["user"===e.sender?(p(),v("div",U,[_("div",Z,y(e.text),1)])):(p(),v("div",Y,[_("div",z,[e.gif?(p(),v("img",{key:0,src:e.gif,alt:"思考过程",class:"thinking-gif"},null,8,J)):g("",!0),_("div",K,[e.flag?(p(),v("div",$,[_("span",null,y(e.text),1),t[0]||(t[0]=w('<span class="loading-dots" data-v-6bf18334><span class="dot" data-v-6bf18334>.</span><span class="dot" data-v-6bf18334>.</span><span class="dot" data-v-6bf18334>.</span><span class="dot" data-v-6bf18334>.</span><span class="dot" data-v-6bf18334>.</span><span class="dot" data-v-6bf18334>.</span></span>',1))])):(p(),v("div",ee,[e.isHtml?(p(),v("div",{key:0,innerHTML:e.text},null,8,te)):(p(),v("div",ne,y(e.text),1))]))])])]))],2)))),128))])])):g("",!0)],512),e.isLoading?(p(),v("div",oe,t[1]||(t[1]=[_("div",{class:"loading-content"},[_("div",{class:"loading-spinner"}),_("div",{class:"loading-text"},"AI情绪大模型正在努力为您加载,请稍候...")],-1)]))):g("",!0),ct.value?(p(!0),v(m,{key:1},h(Rt.value,((e,n)=>{var o;return p(),v("div",{class:"master",key:`stock-${n}-${e.timestamp}`},[_("div",ae,[_("div",ie,[_("div",re,[_("div",se,[_("img",{src:$e.value&&Ct(e).isPlaying?k(V):k(F),class:f(["user-message-speaker",{"speaker-active":$e.value&&Ct(e).isPlaying}]),onClick:()=>(e=>{if(Ke.isVoiceEnabled){const t=jt(e),n=Ct(e),o=Ke.isPlaying||n.isPlaying;n.isPlaying?(Ke.nowSound&&Ke.nowSound.playing()&&(Ke.nowSound.pause(),Ke.isPaused=!0,Ke.isPlaying=!1),Mt(e,{isPlaying:!1,isPaused:!0})):n.isPaused?(Ke.nowSound&&(Ke.playbackPosition>0&&Ke.nowSound.seek(Ke.playbackPosition),Ke.nowSound.play(),Ke.isPaused=!1,Ke.isPlaying=!0),Mt(e,{isPlaying:!0,isPaused:!1})):(o&&(on(),Ke.resetAudioState()),Ht(),t&&(t.one1_url||t.two_url||t.three_url||t.four_url)&&(Mt(e,{isPlaying:!0,isPaused:!1}),nn(t,!1,(()=>{Mt(e,{isPlaying:!1,isPaused:!1})}))))}else Ke.toggleVoice()})(e),alt:"喇叭"},null,10,ue),_("div",le,y(e.queryText),1)]),dt.value?(p(),v("div",ce,y(k(b)(e.timestamp).format("YYYY-MM-DD HH:mm:ss")),1)):g("",!0)])])]),_("div",de,[_("div",pe,[_("div",ve,[_("div",_e,y(e.stockInfo.name)+y(e.stockInfo.name?"量子四维矩阵图":""),1),_("div",fe,y(Wt(e)),1)]),At.value.marketTemperature?(p(),v("div",me,t[2]||(t[2]=[_("img",{src:"/aixiaocaishen/static/images/L1-bf15f913.png",alt:"情绪监控图标"},null,-1)]))):g("",!0),At.value.marketTemperature?(p(),v("div",he,[_("div",ge,[t[3]||(t[3]=_("div",{class:"content1"},[_("img",{src:"/aixiaocaishen/static/images/温度计-7ba6b126.png",alt:"温度计图标"}),_("span",{class:"matrix-main-title"},"股市温度计")],-1)),_("div",ye,[_("div",we," 股票温度:"+y(null!=(o=Xt(e))?o:"NA"),1),_("div",ke," 市场温度:"+y(qt(e)),1)])]),A(I,{ref_for:!0,ref:e=>nt.value[n]=e,companyName:e.stockInfo.name,stockCode:e.stockInfo.code},null,8,["companyName","stockCode"])])):g("",!0)]),At.value.emotionDecod?(p(),v("div",Ae,t[4]||(t[4]=[_("img",{src:"/aixiaocaishen/static/images/L2-c8e914de.png",alt:"情绪解码图标"},null,-1)]))):g("",!0),At.value.emotionDecod?(p(),v("div",be,[t[5]||(t[5]=_("div",{class:"emotion-decoder-header"},[_("img",{src:"/aixiaocaishen/static/images/emotionDecod-ea6f54b2.png",alt:"情绪解码器图标"}),_("span",{class:"emotion-decoder-text"},"情绪解码器")],-1)),_("div",xe,[A(x,{ref_for:!0,ref:e=>at.value[n]=e},null,512)])])):g("",!0),At.value.emotionalBottomRadar?(p(),v("div",Se,t[6]||(t[6]=[_("img",{src:"/aixiaocaishen/static/images/L3-6a18856c.png",alt:"情绪推演图标"},null,-1)]))):g("",!0),At.value.emotionalBottomRadar?(p(),v("div",Te,[t[7]||(t[7]=_("div",{class:"bottom-radar-header"},[_("img",{src:"/aixiaocaishen/static/images/探底雷达-7ca9f208.png",alt:"探底雷达图表"}),_("span",{class:"bottom-radar-text"},"情绪探底雷达")],-1)),_("div",Ie,[A(S,{ref_for:!0,ref:e=>it.value[n]=e},null,512)])])):g("",!0),At.value.emoEnergyConverter?(p(),v("div",Pe,t[8]||(t[8]=[_("img",{src:"/aixiaocaishen/static/images/L4-62e261b3.png",alt:"情绪套利"},null,-1)]))):g("",!0),At.value.emoEnergyConverter?(p(),v("div",De,[t[9]||(t[9]=_("div",{class:"energy-converter-header"},[_("img",{src:"/aixiaocaishen/static/images/能量转化器-3a087b39.png",alt:"能量转化器图标"}),_("span",{class:"energy-converter-text"},"情绪能量转化器")],-1)),_("div",Le,[A(T,{ref_for:!0,ref:e=>ot.value[n]=e},null,512)])])):g("",!0),t[17]||(t[17]=w('<div class="core-highlights-header" data-v-6bf18334><img src="/aixiaocaishen/static/images/核心看点-c7dc13e5.png" alt="核心看点字样" data-v-6bf18334></div><div class="bk-image" data-v-6bf18334><div class="text-container" data-v-6bf18334><p data-v-6bf18334><span class="title" data-v-6bf18334>情绪监控-金融宇宙的【量子检测网络】</span><span class="content" data-v-6bf18334>核心任务:构建全市场情绪引力场雷达,实时监测资金流向和情绪波动</span></p><p data-v-6bf18334><span class="title" data-v-6bf18334>情绪解码-主力思维的【神经破译矩阵】</span><span class="content" data-v-6bf18334>核心任务:解构资金行为的量子密码,破译主力操盘意图和策略布局</span></p><p data-v-6bf18334><span class="title" data-v-6bf18334>情绪推演-未来战争的【时空推演舱】</span><span class="content" data-v-6bf18334>核心任务:基于情绪数据推演未来走势,预测市场转折点和机会窗口</span></p><p data-v-6bf18334><span class="title" data-v-6bf18334>情绪套利-财富裂变的【粒子对撞机】</span><span class="content" data-v-6bf18334>核心任务:将情绪差转化为收益粒子流,实现情绪能量的价值转换</span></p></div></div><div class="core-logic-header" data-v-6bf18334><img src="/aixiaocaishen/static/images/核心逻辑-cc2bd4b6.png" alt="核心逻辑字样" data-v-6bf18334></div><div class="decision-tree-section" data-v-6bf18334><div class="lz-img" data-v-6bf18334><img src="/aixiaocaishen/static/images/量子神经决策树-84a86152.png" alt="树标题" data-v-6bf18334></div><div class="scaled-img" data-v-6bf18334></div></div>',4)),_("div",{class:"scenario-application-section",ref_for:!0,ref_key:"scenarioApplicationRef",ref:_t},[t[16]||(t[16]=_("img",{src:"/aixiaocaishen/static/images/场景应用-d0ed55f3.png",alt:"场景应用标题"},null,-1)),_("div",Ee,[Ut(e)?(p(),v("div",Oe,[Qt(e)&&Qt(e).one||jt(e)&&!Nt(e)&&(jt(e).one1||jt(e).one2)?(p(),v("div",Ce,[t[10]||(t[10]=_("h4",{class:"conclusion-title"},"L1: 情绪监控",-1)),Nt(e)&&Nt(e).one1?(p(),v("p",Me,y(Nt(e).one1),1)):g("",!0),Nt(e)&&Nt(e).one2?(p(),v("p",He,y(Nt(e).one2),1)):g("",!0),!Nt(e)&&jt(e)&&jt(e).one1?(p(),v("p",Be,y(jt(e).one1),1)):g("",!0),!Nt(e)&&jt(e)&&jt(e).one2?(p(),v("p",Ve,y(jt(e).one2),1)):g("",!0)])):g("",!0),Qt(e)&&Qt(e).two||jt(e)&&!Nt(e)&&jt(e).two?(p(),v("div",Fe,[t[11]||(t[11]=_("h4",{class:"conclusion-title"},"L2: 情绪解码",-1)),Nt(e)&&Nt(e).two?(p(),v("p",Ge,y(Nt(e).two),1)):g("",!0),!Nt(e)&&jt(e)&&jt(e).two?(p(),v("p",Re,y(jt(e).two),1)):g("",!0)])):g("",!0),Qt(e)&&Qt(e).three||jt(e)&&!Nt(e)&&jt(e).three?(p(),v("div",We,[t[12]||(t[12]=_("h4",{class:"conclusion-title"},"L3: 情绪推演",-1)),Nt(e)&&Nt(e).three?(p(),v("p",qe,y(Nt(e).three),1)):g("",!0),!Nt(e)&&jt(e)&&jt(e).three?(p(),v("p",Xe,y(jt(e).three),1)):g("",!0)])):g("",!0),Qt(e)&&Qt(e).four||jt(e)&&!Nt(e)&&jt(e).four?(p(),v("div",je,[t[13]||(t[13]=_("h4",{class:"conclusion-title"},"L4: 情绪套利",-1)),Nt(e)&&Nt(e).four?(p(),v("p",Ne,y(Nt(e).four),1)):g("",!0),!Nt(e)&&jt(e)&&jt(e).four?(p(),v("p",Qe,y(jt(e).four),1)):g("",!0)])):g("",!0)])):g("",!0),!Ut(e)&&jt(e)?(p(),v("div",Ue,t[14]||(t[14]=[_("p",null,"请稍候...",-1)]))):g("",!0),jt(e)&&(jt(e).one1||jt(e).one2||jt(e).two||jt(e).three||jt(e).four)?g("",!0):(p(),v("div",Ze,t[15]||(t[15]=[_("p",null,"等待股票分析结论...",-1)])))]),Qt(e)&&Qt(e).disclaimer||jt(e)&&!Nt(e)?(p(),v("div",Ye,[Nt(e)&&Nt(e).disclaimer?(p(),v("p",ze,y(Nt(e).disclaimer),1)):g("",!0),!Nt(e)&&jt(e)?(p(),v("p",Je," 该内容由AI生成,请注意甄别 ")):g("",!0)])):g("",!0)],512)])])})),128)):g("",!0),Rt.value.length>0||st.value.length>0?(p(),v("div",{key:2,class:"back-to-top",onClick:vn},t[18]||(t[18]=[_("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_("path",{d:"M12 4L12 20M12 4L6 10M12 4L18 10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):g("",!0)])],64))}},[["__scopeId","data-v-6bf18334"]]),$e=Object.freeze(Object.defineProperty({__proto__:null,default:Ke},Symbol.toStringTag,{value:"Module"}));export{Ke as A,F as a,M as b,$e as c,H as g,B as h,C as t,G as u,V as v};
|