@acedatacloud/nexior 2.0.5 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +4 -4
  2. package/dist/assets/Auth.24285781.js +1 -0
  3. package/dist/assets/Buy.0599199b.js +1 -0
  4. package/dist/assets/Callback.d84026b2.js +1 -0
  5. package/dist/assets/{Chatdoc.8252e87e.js → Chatdoc.092d9b8f.js} +1 -1
  6. package/dist/assets/Console.51415b2a.js +1 -0
  7. package/dist/assets/Conversation.47bf5812.js +1 -0
  8. package/dist/assets/Conversation.570ddb9e.js +1 -0
  9. package/dist/assets/CopyToClipboard.7029206a.js +1 -0
  10. package/dist/assets/DarkSelector.a968d7ec.js +1 -0
  11. package/dist/assets/Detail.85af1d0d.js +1 -0
  12. package/dist/assets/History.7c474eab.js +1 -0
  13. package/dist/assets/Index.1080c911.js +1 -0
  14. package/dist/assets/Index.14642a4b.js +1 -0
  15. package/dist/assets/Index.24047ba8.js +1 -0
  16. package/dist/assets/Index.4b173a67.js +3 -0
  17. package/dist/assets/Index.d208a180.js +1 -0
  18. package/dist/assets/{Index.a9794552.js → Index.de69679e.js} +1 -1
  19. package/dist/assets/Index.e7176e93.js +1 -0
  20. package/dist/assets/Index.f5c2c30e.js +1 -0
  21. package/dist/assets/Index.fa66811d.js +1 -0
  22. package/dist/assets/InfoIcon.da279dde.js +1 -0
  23. package/dist/assets/Invitees.933581a0.js +1 -0
  24. package/dist/assets/List.26ef5775.js +1 -0
  25. package/dist/assets/List.65caf2cd.js +1 -0
  26. package/dist/assets/List.7f48e343.js +1 -0
  27. package/dist/assets/Login.5d109763.js +1 -0
  28. package/dist/assets/Main.d6cb32ae.js +1 -0
  29. package/dist/assets/Manage.37fd9e45.js +1 -0
  30. package/dist/assets/Navigator.67880be0.js +1 -0
  31. package/dist/assets/{Pagination.fcd91cad.js → Pagination.8c4ab71b.js} +1 -1
  32. package/dist/assets/Setting.89cdc8b6.js +1 -0
  33. package/dist/assets/{Status.783dce6a.js → Status.682924e3.js} +2 -2
  34. package/dist/assets/distribution.b88948cd.js +1 -0
  35. package/dist/assets/index.14170858.js +1 -0
  36. package/dist/assets/index.1f60bc66.js +1 -0
  37. package/dist/assets/index.6b9d5ecf.js +1 -0
  38. package/dist/assets/index.855c2d30.js +1 -0
  39. package/dist/assets/index.8688d47f.css +1 -0
  40. package/dist/assets/index.8efd735c.js +1 -0
  41. package/dist/assets/index.9c7322ff.js +1 -0
  42. package/dist/assets/{index.5b9e515e.js → index.a90daadd.js} +1 -1
  43. package/dist/assets/index.a9c9c79c.js +1 -0
  44. package/dist/assets/index.ad0fe8b9.js +1 -0
  45. package/dist/assets/index.ae9b8172.js +1 -0
  46. package/dist/assets/{index.58368632.js → index.b2031147.js} +1 -1
  47. package/dist/assets/index.c8e54e8b.js +1 -0
  48. package/dist/assets/index.c9cfe62b.js +1 -0
  49. package/dist/assets/index.d7afb3a1.js +1 -0
  50. package/dist/assets/index.ee7a1ec3.js +1 -0
  51. package/dist/assets/index.f0a4d852.js +1 -0
  52. package/dist/assets/index.f357c50b.js +3 -0
  53. package/dist/assets/index.f3f7084c.js +1 -0
  54. package/dist/assets/index.f512c03e.js +1 -0
  55. package/dist/assets/{order.67692924.js → order.9766448a.js} +1 -1
  56. package/dist/assets/{price.cf991d37.js → price.0b427681.js} +1 -1
  57. package/dist/assets/{vendor-@vue.31495dbd.js → vendor-@vue.b201070f.js} +1 -1
  58. package/dist/assets/{vendor-element-plus.eeef3ee7.js → vendor-element-plus.ec5f1739.js} +2 -2
  59. package/dist/assets/{vendor-fortawesome.35fae32b.js → vendor-fortawesome.7c293b44.js} +1 -1
  60. package/dist/assets/{vendor-markdown.95c097e3.js → vendor-markdown.59c24495.js} +1 -1
  61. package/dist/assets/vendor-others.ecc384b7.js +99 -0
  62. package/dist/assets/{vendor-qrcode.93be07bd.js → vendor-qrcode.1cdaa2c5.js} +6 -6
  63. package/dist/assets/{vendor-vue-dark-switch.81063cc1.js → vendor-vue-dark-switch.4b8d1916.js} +1 -1
  64. package/dist/index.html +7 -6
  65. package/package.json +11 -2
  66. package/dist/assets/Auth.e4903cd8.js +0 -1
  67. package/dist/assets/Buy.0d0f6438.js +0 -1
  68. package/dist/assets/Callback.36846e83.js +0 -1
  69. package/dist/assets/Console.3a90cb34.js +0 -1
  70. package/dist/assets/Conversation.65710e84.js +0 -1
  71. package/dist/assets/Conversation.a8cc6420.js +0 -1
  72. package/dist/assets/CopyToClipboard.3cfde0c6.js +0 -1
  73. package/dist/assets/DarkSelector.bf241a9d.js +0 -1
  74. package/dist/assets/Detail.61e2837f.js +0 -1
  75. package/dist/assets/History.5522cfc8.js +0 -1
  76. package/dist/assets/Index.4b0951fb.js +0 -1
  77. package/dist/assets/Index.550cdcb2.js +0 -1
  78. package/dist/assets/Index.750f3b63.js +0 -3
  79. package/dist/assets/Index.a8af8718.js +0 -1
  80. package/dist/assets/Index.acc3fa00.js +0 -1
  81. package/dist/assets/Index.b1aab4de.js +0 -1
  82. package/dist/assets/Index.cc3ddfd4.js +0 -1
  83. package/dist/assets/Index.e1f0b3e8.js +0 -1
  84. package/dist/assets/InfoIcon.d4740c2d.js +0 -1
  85. package/dist/assets/Invitees.d80043d7.js +0 -1
  86. package/dist/assets/List.25f5adaf.js +0 -1
  87. package/dist/assets/List.45507abc.js +0 -1
  88. package/dist/assets/List.f08e1bff.js +0 -1
  89. package/dist/assets/Login.a21e9ebd.js +0 -1
  90. package/dist/assets/Main.ffa68464.js +0 -1
  91. package/dist/assets/Manage.c708886e.js +0 -1
  92. package/dist/assets/Navigator.d24b810c.js +0 -1
  93. package/dist/assets/Setting.750628da.js +0 -1
  94. package/dist/assets/distribution.a80efa67.js +0 -1
  95. package/dist/assets/index.1ee8ef98.js +0 -1
  96. package/dist/assets/index.332f2a56.js +0 -1
  97. package/dist/assets/index.37aa4ee5.js +0 -1
  98. package/dist/assets/index.3eef99ee.js +0 -1
  99. package/dist/assets/index.424237c1.js +0 -1
  100. package/dist/assets/index.51362474.js +0 -1
  101. package/dist/assets/index.5776557e.js +0 -1
  102. package/dist/assets/index.62d00e03.css +0 -1
  103. package/dist/assets/index.6cf5b271.js +0 -1
  104. package/dist/assets/index.746cde97.js +0 -1
  105. package/dist/assets/index.a3f87627.js +0 -1
  106. package/dist/assets/index.b22b07a1.js +0 -1
  107. package/dist/assets/index.b7b7827f.js +0 -3
  108. package/dist/assets/index.bf2f2ede.js +0 -1
  109. package/dist/assets/index.c64aa4d3.js +0 -1
  110. package/dist/assets/index.e3a2de47.js +0 -1
  111. package/dist/assets/index.e902d4b4.js +0 -1
  112. package/dist/assets/index.fc03c45f.js +0 -1
  113. package/dist/assets/vendor-others.decd85ac.js +0 -99
  114. /package/dist/assets/{vendor-highlight.js.19da0c9f.js → vendor-highlight.js.6ee9ffbc.js} +0 -0
@@ -1,8 +1,8 @@
1
- import{o as Mt,q as Pt,_ as Rt}from"./vendor-others.decd85ac.js";import{H as Lt,r as Ut,s as Dt,ah as Ft}from"./vendor-@vue.31495dbd.js";var K={},kt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},dt={},I={};let it;const zt=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];I.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};I.getSymbolTotalCodewords=function(e){return zt[e]};I.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};I.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');it=e};I.isKanjiModeEnabled=function(){return typeof it!="undefined"};I.toSJIS=function(e){return it(e)};var $={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+i)}}t.isValid=function(r){return r&&typeof r.bit!="undefined"&&r.bit>=0&&r.bit<4},t.from=function(r,n){if(t.isValid(r))return r;try{return e(r)}catch{return n}}})($);function ht(){this.buffer=[],this.length=0}ht.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let i=0;i<e;i++)this.putBit((t>>>e-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Vt=ht;function J(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}J.prototype.set=function(t,e,i,r){const n=t*this.size+e;this.data[n]=i,r&&(this.reservedBit[n]=!0)};J.prototype.get=function(t,e){return this.data[t*this.size+e]};J.prototype.xor=function(t,e,i){this.data[t*this.size+e]^=i};J.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var Ht=J,mt={};(function(t){const e=I.getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const n=Math.floor(r/7)+2,o=e(r),s=o===145?26:Math.ceil((o-13)/(2*n-2))*2,a=[o-7];for(let u=1;u<n-1;u++)a[u]=a[u-1]-s;return a.push(6),a.reverse()},t.getPositions=function(r){const n=[],o=t.getRowColCoords(r),s=o.length;for(let a=0;a<s;a++)for(let u=0;u<s;u++)a===0&&u===0||a===0&&u===s-1||a===s-1&&u===0||n.push([o[a],o[u]]);return n}})(mt);var wt={};const Kt=I.getSymbolSize,lt=7;wt.getPositions=function(e){const i=Kt(e);return[[0,0],[i-lt,0],[0,i-lt]]};var yt={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(n){const o=n.size;let s=0,a=0,u=0,c=null,l=null;for(let p=0;p<o;p++){a=u=0,c=l=null;for(let m=0;m<o;m++){let g=n.get(p,m);g===c?a++:(a>=5&&(s+=e.N1+(a-5)),c=g,a=1),g=n.get(m,p),g===l?u++:(u>=5&&(s+=e.N1+(u-5)),l=g,u=1)}a>=5&&(s+=e.N1+(a-5)),u>=5&&(s+=e.N1+(u-5))}return s},t.getPenaltyN2=function(n){const o=n.size;let s=0;for(let a=0;a<o-1;a++)for(let u=0;u<o-1;u++){const c=n.get(a,u)+n.get(a,u+1)+n.get(a+1,u)+n.get(a+1,u+1);(c===4||c===0)&&s++}return s*e.N2},t.getPenaltyN3=function(n){const o=n.size;let s=0,a=0,u=0;for(let c=0;c<o;c++){a=u=0;for(let l=0;l<o;l++)a=a<<1&2047|n.get(c,l),l>=10&&(a===1488||a===93)&&s++,u=u<<1&2047|n.get(l,c),l>=10&&(u===1488||u===93)&&s++}return s*e.N3},t.getPenaltyN4=function(n){let o=0;const s=n.data.length;for(let u=0;u<s;u++)o+=n.data[u];return Math.abs(Math.ceil(o*100/s/5)-10)*e.N4};function i(r,n,o){switch(r){case t.Patterns.PATTERN000:return(n+o)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(n+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return n*o%2+n*o%3===0;case t.Patterns.PATTERN110:return(n*o%2+n*o%3)%2===0;case t.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(n,o){const s=o.size;for(let a=0;a<s;a++)for(let u=0;u<s;u++)o.isReserved(u,a)||o.xor(u,a,i(n,u,a))},t.getBestMask=function(n,o){const s=Object.keys(t.Patterns).length;let a=0,u=1/0;for(let c=0;c<s;c++){o(c),t.applyMask(c,n);const l=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(c,n),l<u&&(u=l,a=c)}return a}})(yt);var j={};const R=$,O=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],_=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];j.getBlocksCount=function(e,i){switch(i){case R.L:return O[(e-1)*4+0];case R.M:return O[(e-1)*4+1];case R.Q:return O[(e-1)*4+2];case R.H:return O[(e-1)*4+3];default:return}};j.getTotalCodewordsCount=function(e,i){switch(i){case R.L:return _[(e-1)*4+0];case R.M:return _[(e-1)*4+1];case R.Q:return _[(e-1)*4+2];case R.H:return _[(e-1)*4+3];default:return}};var Et={},G={};const V=new Uint8Array(512),v=new Uint8Array(256);(function(){let e=1;for(let i=0;i<255;i++)V[i]=e,v[e]=i,e<<=1,e&256&&(e^=285);for(let i=255;i<512;i++)V[i]=V[i-255]})();G.log=function(e){if(e<1)throw new Error("log("+e+")");return v[e]};G.exp=function(e){return V[e]};G.mul=function(e,i){return e===0||i===0?0:V[v[e]+v[i]]};(function(t){const e=G;t.mul=function(r,n){const o=new Uint8Array(r.length+n.length-1);for(let s=0;s<r.length;s++)for(let a=0;a<n.length;a++)o[s+a]^=e.mul(r[s],n[a]);return o},t.mod=function(r,n){let o=new Uint8Array(r);for(;o.length-n.length>=0;){const s=o[0];for(let u=0;u<n.length;u++)o[u]^=e.mul(n[u],s);let a=0;for(;a<o.length&&o[a]===0;)a++;o=o.slice(a)}return o},t.generateECPolynomial=function(r){let n=new Uint8Array([1]);for(let o=0;o<r;o++)n=t.mul(n,new Uint8Array([1,e.exp(o)]));return n}})(Et);const Ct=Et;function st(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}st.prototype.initialize=function(e){this.degree=e,this.genPoly=Ct.generateECPolynomial(this.degree)};st.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(e.length+this.degree);i.set(e);const r=Ct.mod(i,this.genPoly),n=this.degree-r.length;if(n>0){const o=new Uint8Array(this.degree);return o.set(r,n),o}return r};var Jt=st,Bt={},L={},ut={};ut.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var b={};const pt="[0-9]+",Ot="[A-Z $%*+\\-./:]+";let H="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";H=H.replace(/u/g,"\\u");const _t="(?:(?![A-Z0-9 $%*+\\-./:]|"+H+`)(?:.|[\r
2
- ]))+`;b.KANJI=new RegExp(H,"g");b.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");b.BYTE=new RegExp(_t,"g");b.NUMERIC=new RegExp(pt,"g");b.ALPHANUMERIC=new RegExp(Ot,"g");const vt=new RegExp("^"+H+"$"),Yt=new RegExp("^"+pt+"$"),$t=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");b.testKanji=function(e){return vt.test(e)};b.testNumeric=function(e){return Yt.test(e)};b.testAlphanumeric=function(e){return $t.test(e)};(function(t){const e=ut,i=b;t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,s){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?o.ccBits[0]:s<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return i.testNumeric(o)?t.NUMERIC:i.testAlphanumeric(o)?t.ALPHANUMERIC:i.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function r(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+n)}}t.from=function(o,s){if(t.isValid(o))return o;try{return r(o)}catch{return s}}})(L);(function(t){const e=I,i=j,r=$,n=L,o=ut,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,a=e.getBCHDigit(s);function u(m,g,y){for(let E=1;E<=40;E++)if(g<=t.getCapacity(E,y,m))return E}function c(m,g){return n.getCharCountIndicator(m,g)+4}function l(m,g){let y=0;return m.forEach(function(E){y+=c(E.mode,g)+E.getBitsLength()}),y}function p(m,g){for(let y=1;y<=40;y++)if(l(m,y)<=t.getCapacity(y,g,n.MIXED))return y}t.from=function(g,y){return o.isValid(g)?parseInt(g,10):y},t.getCapacity=function(g,y,E){if(!o.isValid(g))throw new Error("Invalid QR Code version");typeof E=="undefined"&&(E=n.BYTE);const N=e.getSymbolTotalCodewords(g),h=i.getTotalCodewordsCount(g,y),w=(N-h)*8;if(E===n.MIXED)return w;const d=w-c(E,g);switch(E){case n.NUMERIC:return Math.floor(d/10*3);case n.ALPHANUMERIC:return Math.floor(d/11*2);case n.KANJI:return Math.floor(d/13);case n.BYTE:default:return Math.floor(d/8)}},t.getBestVersionForData=function(g,y){let E;const N=r.from(y,r.M);if(Array.isArray(g)){if(g.length>1)return p(g,N);if(g.length===0)return 1;E=g[0]}else E=g;return u(E.mode,E.getLength(),N)},t.getEncodedBits=function(g){if(!o.isValid(g)||g<7)throw new Error("Invalid QR Code version");let y=g<<12;for(;e.getBCHDigit(y)-a>=0;)y^=s<<e.getBCHDigit(y)-a;return g<<12|y}})(Bt);var At={};const et=I,Nt=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,jt=1<<14|1<<12|1<<10|1<<4|1<<1,ft=et.getBCHDigit(Nt);At.getEncodedBits=function(e,i){const r=e.bit<<3|i;let n=r<<10;for(;et.getBCHDigit(n)-ft>=0;)n^=Nt<<et.getBCHDigit(n)-ft;return(r<<10|n)^jt};var It={};const Gt=L;function U(t){this.mode=Gt.NUMERIC,this.data=t.toString()}U.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};U.prototype.getLength=function(){return this.data.length};U.prototype.getBitsLength=function(){return U.getBitsLength(this.data.length)};U.prototype.write=function(e){let i,r,n;for(i=0;i+3<=this.data.length;i+=3)r=this.data.substr(i,3),n=parseInt(r,10),e.put(n,10);const o=this.data.length-i;o>0&&(r=this.data.substr(i),n=parseInt(r,10),e.put(n,o*3+1))};var Qt=U;const qt=L,W=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function D(t){this.mode=qt.ALPHANUMERIC,this.data=t}D.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(e){let i;for(i=0;i+2<=this.data.length;i+=2){let r=W.indexOf(this.data[i])*45;r+=W.indexOf(this.data[i+1]),e.put(r,11)}this.data.length%2&&e.put(W.indexOf(this.data[i]),6)};var Wt=D;const Xt=Mt,Zt=L;function F(t){this.mode=Zt.BYTE,typeof t=="string"&&(t=Xt(t)),this.data=new Uint8Array(t)}F.getBitsLength=function(e){return e*8};F.prototype.getLength=function(){return this.data.length};F.prototype.getBitsLength=function(){return F.getBitsLength(this.data.length)};F.prototype.write=function(t){for(let e=0,i=this.data.length;e<i;e++)t.put(this.data[e],8)};var xt=F;const te=L,ee=I;function k(t){this.mode=te.KANJI,this.data=t}k.getBitsLength=function(e){return e*13};k.prototype.getLength=function(){return this.data.length};k.prototype.getBitsLength=function(){return k.getBitsLength(this.data.length)};k.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let i=ee.toSJIS(this.data[e]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
3
- Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),t.put(i,13)}};var ne=k;(function(t){const e=L,i=Qt,r=Wt,n=xt,o=ne,s=b,a=I,u=Pt.exports;function c(h){return unescape(encodeURIComponent(h)).length}function l(h,w,d){const f=[];let C;for(;(C=h.exec(d))!==null;)f.push({data:C[0],index:C.index,mode:w,length:C[0].length});return f}function p(h){const w=l(s.NUMERIC,e.NUMERIC,h),d=l(s.ALPHANUMERIC,e.ALPHANUMERIC,h);let f,C;return a.isKanjiModeEnabled()?(f=l(s.BYTE,e.BYTE,h),C=l(s.KANJI,e.KANJI,h)):(f=l(s.BYTE_KANJI,e.BYTE,h),C=[]),w.concat(d,f,C).sort(function(A,S){return A.index-S.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function m(h,w){switch(w){case e.NUMERIC:return i.getBitsLength(h);case e.ALPHANUMERIC:return r.getBitsLength(h);case e.KANJI:return o.getBitsLength(h);case e.BYTE:return n.getBitsLength(h)}}function g(h){return h.reduce(function(w,d){const f=w.length-1>=0?w[w.length-1]:null;return f&&f.mode===d.mode?(w[w.length-1].data+=d.data,w):(w.push(d),w)},[])}function y(h){const w=[];for(let d=0;d<h.length;d++){const f=h[d];switch(f.mode){case e.NUMERIC:w.push([f,{data:f.data,mode:e.ALPHANUMERIC,length:f.length},{data:f.data,mode:e.BYTE,length:f.length}]);break;case e.ALPHANUMERIC:w.push([f,{data:f.data,mode:e.BYTE,length:f.length}]);break;case e.KANJI:w.push([f,{data:f.data,mode:e.BYTE,length:c(f.data)}]);break;case e.BYTE:w.push([{data:f.data,mode:e.BYTE,length:c(f.data)}])}}return w}function E(h,w){const d={},f={start:{}};let C=["start"];for(let B=0;B<h.length;B++){const A=h[B],S=[];for(let P=0;P<A.length;P++){const T=A[P],z=""+B+P;S.push(z),d[z]={node:T,lastCount:0},f[z]={};for(let q=0;q<C.length;q++){const M=C[q];d[M]&&d[M].node.mode===T.mode?(f[M][z]=m(d[M].lastCount+T.length,T.mode)-m(d[M].lastCount,T.mode),d[M].lastCount+=T.length):(d[M]&&(d[M].lastCount=T.length),f[M][z]=m(T.length,T.mode)+4+e.getCharCountIndicator(T.mode,w))}}C=S}for(let B=0;B<C.length;B++)f[C[B]].end=0;return{map:f,table:d}}function N(h,w){let d;const f=e.getBestModeForData(h);if(d=e.from(w,f),d!==e.BYTE&&d.bit<f.bit)throw new Error('"'+h+'" cannot be encoded with mode '+e.toString(d)+`.
4
- Suggested mode is: `+e.toString(f));switch(d===e.KANJI&&!a.isKanjiModeEnabled()&&(d=e.BYTE),d){case e.NUMERIC:return new i(h);case e.ALPHANUMERIC:return new r(h);case e.KANJI:return new o(h);case e.BYTE:return new n(h)}}t.fromArray=function(w){return w.reduce(function(d,f){return typeof f=="string"?d.push(N(f,null)):f.data&&d.push(N(f.data,f.mode)),d},[])},t.fromString=function(w,d){const f=p(w,a.isKanjiModeEnabled()),C=y(f),B=E(C,d),A=u.find_path(B.map,"start","end"),S=[];for(let P=1;P<A.length-1;P++)S.push(B.table[A[P]].node);return t.fromArray(g(S))},t.rawSplit=function(w){return t.fromArray(p(w,a.isKanjiModeEnabled()))}})(It);const Q=I,X=$,re=Vt,oe=Ht,ie=mt,se=wt,nt=yt,rt=j,ue=Jt,Y=Bt,ae=At,ce=L,Z=It;function le(t,e){const i=t.size,r=se.getPositions(e);for(let n=0;n<r.length;n++){const o=r[n][0],s=r[n][1];for(let a=-1;a<=7;a++)if(!(o+a<=-1||i<=o+a))for(let u=-1;u<=7;u++)s+u<=-1||i<=s+u||(a>=0&&a<=6&&(u===0||u===6)||u>=0&&u<=6&&(a===0||a===6)||a>=2&&a<=4&&u>=2&&u<=4?t.set(o+a,s+u,!0,!0):t.set(o+a,s+u,!1,!0))}}function fe(t){const e=t.size;for(let i=8;i<e-8;i++){const r=i%2===0;t.set(i,6,r,!0),t.set(6,i,r,!0)}}function ge(t,e){const i=ie.getPositions(e);for(let r=0;r<i.length;r++){const n=i[r][0],o=i[r][1];for(let s=-2;s<=2;s++)for(let a=-2;a<=2;a++)s===-2||s===2||a===-2||a===2||s===0&&a===0?t.set(n+s,o+a,!0,!0):t.set(n+s,o+a,!1,!0)}}function de(t,e){const i=t.size,r=Y.getEncodedBits(e);let n,o,s;for(let a=0;a<18;a++)n=Math.floor(a/3),o=a%3+i-8-3,s=(r>>a&1)===1,t.set(n,o,s,!0),t.set(o,n,s,!0)}function x(t,e,i){const r=t.size,n=ae.getEncodedBits(e,i);let o,s;for(o=0;o<15;o++)s=(n>>o&1)===1,o<6?t.set(o,8,s,!0):o<8?t.set(o+1,8,s,!0):t.set(r-15+o,8,s,!0),o<8?t.set(8,r-o-1,s,!0):o<9?t.set(8,15-o-1+1,s,!0):t.set(8,15-o-1,s,!0);t.set(r-8,8,1,!0)}function he(t,e){const i=t.size;let r=-1,n=i-1,o=7,s=0;for(let a=i-1;a>0;a-=2)for(a===6&&a--;;){for(let u=0;u<2;u++)if(!t.isReserved(n,a-u)){let c=!1;s<e.length&&(c=(e[s]>>>o&1)===1),t.set(n,a-u,c),o--,o===-1&&(s++,o=7)}if(n+=r,n<0||i<=n){n-=r,r=-r;break}}}function me(t,e,i){const r=new re;i.forEach(function(u){r.put(u.mode.bit,4),r.put(u.getLength(),ce.getCharCountIndicator(u.mode,t)),u.write(r)});const n=Q.getSymbolTotalCodewords(t),o=rt.getTotalCodewordsCount(t,e),s=(n-o)*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const a=(s-r.getLengthInBits())/8;for(let u=0;u<a;u++)r.put(u%2?17:236,8);return we(r,t,e)}function we(t,e,i){const r=Q.getSymbolTotalCodewords(e),n=rt.getTotalCodewordsCount(e,i),o=r-n,s=rt.getBlocksCount(e,i),a=r%s,u=s-a,c=Math.floor(r/s),l=Math.floor(o/s),p=l+1,m=c-l,g=new ue(m);let y=0;const E=new Array(s),N=new Array(s);let h=0;const w=new Uint8Array(t.buffer);for(let A=0;A<s;A++){const S=A<u?l:p;E[A]=w.slice(y,y+S),N[A]=g.encode(E[A]),y+=S,h=Math.max(h,S)}const d=new Uint8Array(r);let f=0,C,B;for(C=0;C<h;C++)for(B=0;B<s;B++)C<E[B].length&&(d[f++]=E[B][C]);for(C=0;C<m;C++)for(B=0;B<s;B++)d[f++]=N[B][C];return d}function ye(t,e,i,r){let n;if(Array.isArray(t))n=Z.fromArray(t);else if(typeof t=="string"){let c=e;if(!c){const l=Z.rawSplit(t);c=Y.getBestVersionForData(l,i)}n=Z.fromString(t,c||40)}else throw new Error("Invalid data");const o=Y.getBestVersionForData(n,i);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=o;else if(e<o)throw new Error(`
1
+ import{o as Mt,q as Pt}from"./vendor-others.ecc384b7.js";import{H as Rt,r as Lt,s as Ut,ah as Dt}from"./vendor-@vue.b201070f.js";function Ft(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(i[r[n]]=t[r[n]]);return i}var H={},kt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},dt={},b={};let it;const zt=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];b.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};b.getSymbolTotalCodewords=function(e){return zt[e]};b.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};b.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');it=e};b.isKanjiModeEnabled=function(){return typeof it!="undefined"};b.toSJIS=function(e){return it(e)};var Y={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+i)}}t.isValid=function(r){return r&&typeof r.bit!="undefined"&&r.bit>=0&&r.bit<4},t.from=function(r,n){if(t.isValid(r))return r;try{return e(r)}catch{return n}}})(Y);function ht(){this.buffer=[],this.length=0}ht.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let i=0;i<e;i++)this.putBit((t>>>e-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Ot=ht;function v(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}v.prototype.set=function(t,e,i,r){const n=t*this.size+e;this.data[n]=i,r&&(this.reservedBit[n]=!0)};v.prototype.get=function(t,e){return this.data[t*this.size+e]};v.prototype.xor=function(t,e,i){this.data[t*this.size+e]^=i};v.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var Vt=v,mt={};(function(t){const e=b.getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const n=Math.floor(r/7)+2,o=e(r),s=o===145?26:Math.ceil((o-13)/(2*n-2))*2,a=[o-7];for(let u=1;u<n-1;u++)a[u]=a[u-1]-s;return a.push(6),a.reverse()},t.getPositions=function(r){const n=[],o=t.getRowColCoords(r),s=o.length;for(let a=0;a<s;a++)for(let u=0;u<s;u++)a===0&&u===0||a===0&&u===s-1||a===s-1&&u===0||n.push([o[a],o[u]]);return n}})(mt);var wt={};const Ht=b.getSymbolSize,lt=7;wt.getPositions=function(e){const i=Ht(e);return[[0,0],[i-lt,0],[0,i-lt]]};var yt={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(n){const o=n.size;let s=0,a=0,u=0,c=null,l=null;for(let B=0;B<o;B++){a=u=0,c=l=null;for(let m=0;m<o;m++){let g=n.get(B,m);g===c?a++:(a>=5&&(s+=e.N1+(a-5)),c=g,a=1),g=n.get(m,B),g===l?u++:(u>=5&&(s+=e.N1+(u-5)),l=g,u=1)}a>=5&&(s+=e.N1+(a-5)),u>=5&&(s+=e.N1+(u-5))}return s},t.getPenaltyN2=function(n){const o=n.size;let s=0;for(let a=0;a<o-1;a++)for(let u=0;u<o-1;u++){const c=n.get(a,u)+n.get(a,u+1)+n.get(a+1,u)+n.get(a+1,u+1);(c===4||c===0)&&s++}return s*e.N2},t.getPenaltyN3=function(n){const o=n.size;let s=0,a=0,u=0;for(let c=0;c<o;c++){a=u=0;for(let l=0;l<o;l++)a=a<<1&2047|n.get(c,l),l>=10&&(a===1488||a===93)&&s++,u=u<<1&2047|n.get(l,c),l>=10&&(u===1488||u===93)&&s++}return s*e.N3},t.getPenaltyN4=function(n){let o=0;const s=n.data.length;for(let u=0;u<s;u++)o+=n.data[u];return Math.abs(Math.ceil(o*100/s/5)-10)*e.N4};function i(r,n,o){switch(r){case t.Patterns.PATTERN000:return(n+o)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(n+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return n*o%2+n*o%3===0;case t.Patterns.PATTERN110:return(n*o%2+n*o%3)%2===0;case t.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(n,o){const s=o.size;for(let a=0;a<s;a++)for(let u=0;u<s;u++)o.isReserved(u,a)||o.xor(u,a,i(n,u,a))},t.getBestMask=function(n,o){const s=Object.keys(t.Patterns).length;let a=0,u=1/0;for(let c=0;c<s;c++){o(c),t.applyMask(c,n);const l=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(c,n),l<u&&(u=l,a=c)}return a}})(yt);var $={};const R=Y,K=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],J=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];$.getBlocksCount=function(e,i){switch(i){case R.L:return K[(e-1)*4+0];case R.M:return K[(e-1)*4+1];case R.Q:return K[(e-1)*4+2];case R.H:return K[(e-1)*4+3];default:return}};$.getTotalCodewordsCount=function(e,i){switch(i){case R.L:return J[(e-1)*4+0];case R.M:return J[(e-1)*4+1];case R.Q:return J[(e-1)*4+2];case R.H:return J[(e-1)*4+3];default:return}};var Et={},G={};const O=new Uint8Array(512),_=new Uint8Array(256);(function(){let e=1;for(let i=0;i<255;i++)O[i]=e,_[e]=i,e<<=1,e&256&&(e^=285);for(let i=255;i<512;i++)O[i]=O[i-255]})();G.log=function(e){if(e<1)throw new Error("log("+e+")");return _[e]};G.exp=function(e){return O[e]};G.mul=function(e,i){return e===0||i===0?0:O[_[e]+_[i]]};(function(t){const e=G;t.mul=function(r,n){const o=new Uint8Array(r.length+n.length-1);for(let s=0;s<r.length;s++)for(let a=0;a<n.length;a++)o[s+a]^=e.mul(r[s],n[a]);return o},t.mod=function(r,n){let o=new Uint8Array(r);for(;o.length-n.length>=0;){const s=o[0];for(let u=0;u<n.length;u++)o[u]^=e.mul(n[u],s);let a=0;for(;a<o.length&&o[a]===0;)a++;o=o.slice(a)}return o},t.generateECPolynomial=function(r){let n=new Uint8Array([1]);for(let o=0;o<r;o++)n=t.mul(n,new Uint8Array([1,e.exp(o)]));return n}})(Et);const Ct=Et;function st(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}st.prototype.initialize=function(e){this.degree=e,this.genPoly=Ct.generateECPolynomial(this.degree)};st.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(e.length+this.degree);i.set(e);const r=Ct.mod(i,this.genPoly),n=this.degree-r.length;if(n>0){const o=new Uint8Array(this.degree);return o.set(r,n),o}return r};var vt=st,pt={},L={},ut={};ut.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var T={};const Bt="[0-9]+",Kt="[A-Z $%*+\\-./:]+";let V="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";V=V.replace(/u/g,"\\u");const Jt="(?:(?![A-Z0-9 $%*+\\-./:]|"+V+`)(?:.|[\r
2
+ ]))+`;T.KANJI=new RegExp(V,"g");T.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");T.BYTE=new RegExp(Jt,"g");T.NUMERIC=new RegExp(Bt,"g");T.ALPHANUMERIC=new RegExp(Kt,"g");const _t=new RegExp("^"+V+"$"),jt=new RegExp("^"+Bt+"$"),Yt=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");T.testKanji=function(e){return _t.test(e)};T.testNumeric=function(e){return jt.test(e)};T.testAlphanumeric=function(e){return Yt.test(e)};(function(t){const e=ut,i=T;t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,s){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?o.ccBits[0]:s<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return i.testNumeric(o)?t.NUMERIC:i.testAlphanumeric(o)?t.ALPHANUMERIC:i.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function r(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+n)}}t.from=function(o,s){if(t.isValid(o))return o;try{return r(o)}catch{return s}}})(L);(function(t){const e=b,i=$,r=Y,n=L,o=ut,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,a=e.getBCHDigit(s);function u(m,g,y){for(let E=1;E<=40;E++)if(g<=t.getCapacity(E,y,m))return E}function c(m,g){return n.getCharCountIndicator(m,g)+4}function l(m,g){let y=0;return m.forEach(function(E){y+=c(E.mode,g)+E.getBitsLength()}),y}function B(m,g){for(let y=1;y<=40;y++)if(l(m,y)<=t.getCapacity(y,g,n.MIXED))return y}t.from=function(g,y){return o.isValid(g)?parseInt(g,10):y},t.getCapacity=function(g,y,E){if(!o.isValid(g))throw new Error("Invalid QR Code version");typeof E=="undefined"&&(E=n.BYTE);const N=e.getSymbolTotalCodewords(g),h=i.getTotalCodewordsCount(g,y),w=(N-h)*8;if(E===n.MIXED)return w;const d=w-c(E,g);switch(E){case n.NUMERIC:return Math.floor(d/10*3);case n.ALPHANUMERIC:return Math.floor(d/11*2);case n.KANJI:return Math.floor(d/13);case n.BYTE:default:return Math.floor(d/8)}},t.getBestVersionForData=function(g,y){let E;const N=r.from(y,r.M);if(Array.isArray(g)){if(g.length>1)return B(g,N);if(g.length===0)return 1;E=g[0]}else E=g;return u(E.mode,E.getLength(),N)},t.getEncodedBits=function(g){if(!o.isValid(g)||g<7)throw new Error("Invalid QR Code version");let y=g<<12;for(;e.getBCHDigit(y)-a>=0;)y^=s<<e.getBCHDigit(y)-a;return g<<12|y}})(pt);var At={};const et=b,Nt=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,$t=1<<14|1<<12|1<<10|1<<4|1<<1,ft=et.getBCHDigit(Nt);At.getEncodedBits=function(e,i){const r=e.bit<<3|i;let n=r<<10;for(;et.getBCHDigit(n)-ft>=0;)n^=Nt<<et.getBCHDigit(n)-ft;return(r<<10|n)^$t};var bt={};const Gt=L;function U(t){this.mode=Gt.NUMERIC,this.data=t.toString()}U.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};U.prototype.getLength=function(){return this.data.length};U.prototype.getBitsLength=function(){return U.getBitsLength(this.data.length)};U.prototype.write=function(e){let i,r,n;for(i=0;i+3<=this.data.length;i+=3)r=this.data.substr(i,3),n=parseInt(r,10),e.put(n,10);const o=this.data.length-i;o>0&&(r=this.data.substr(i),n=parseInt(r,10),e.put(n,o*3+1))};var Qt=U;const qt=L,W=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function D(t){this.mode=qt.ALPHANUMERIC,this.data=t}D.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(e){let i;for(i=0;i+2<=this.data.length;i+=2){let r=W.indexOf(this.data[i])*45;r+=W.indexOf(this.data[i+1]),e.put(r,11)}this.data.length%2&&e.put(W.indexOf(this.data[i]),6)};var Wt=D;const Xt=Mt,Zt=L;function F(t){this.mode=Zt.BYTE,typeof t=="string"&&(t=Xt(t)),this.data=new Uint8Array(t)}F.getBitsLength=function(e){return e*8};F.prototype.getLength=function(){return this.data.length};F.prototype.getBitsLength=function(){return F.getBitsLength(this.data.length)};F.prototype.write=function(t){for(let e=0,i=this.data.length;e<i;e++)t.put(this.data[e],8)};var xt=F;const te=L,ee=b;function k(t){this.mode=te.KANJI,this.data=t}k.getBitsLength=function(e){return e*13};k.prototype.getLength=function(){return this.data.length};k.prototype.getBitsLength=function(){return k.getBitsLength(this.data.length)};k.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let i=ee.toSJIS(this.data[e]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
3
+ Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),t.put(i,13)}};var ne=k;(function(t){const e=L,i=Qt,r=Wt,n=xt,o=ne,s=T,a=b,u=Pt.exports;function c(h){return unescape(encodeURIComponent(h)).length}function l(h,w,d){const f=[];let C;for(;(C=h.exec(d))!==null;)f.push({data:C[0],index:C.index,mode:w,length:C[0].length});return f}function B(h){const w=l(s.NUMERIC,e.NUMERIC,h),d=l(s.ALPHANUMERIC,e.ALPHANUMERIC,h);let f,C;return a.isKanjiModeEnabled()?(f=l(s.BYTE,e.BYTE,h),C=l(s.KANJI,e.KANJI,h)):(f=l(s.BYTE_KANJI,e.BYTE,h),C=[]),w.concat(d,f,C).sort(function(A,S){return A.index-S.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function m(h,w){switch(w){case e.NUMERIC:return i.getBitsLength(h);case e.ALPHANUMERIC:return r.getBitsLength(h);case e.KANJI:return o.getBitsLength(h);case e.BYTE:return n.getBitsLength(h)}}function g(h){return h.reduce(function(w,d){const f=w.length-1>=0?w[w.length-1]:null;return f&&f.mode===d.mode?(w[w.length-1].data+=d.data,w):(w.push(d),w)},[])}function y(h){const w=[];for(let d=0;d<h.length;d++){const f=h[d];switch(f.mode){case e.NUMERIC:w.push([f,{data:f.data,mode:e.ALPHANUMERIC,length:f.length},{data:f.data,mode:e.BYTE,length:f.length}]);break;case e.ALPHANUMERIC:w.push([f,{data:f.data,mode:e.BYTE,length:f.length}]);break;case e.KANJI:w.push([f,{data:f.data,mode:e.BYTE,length:c(f.data)}]);break;case e.BYTE:w.push([{data:f.data,mode:e.BYTE,length:c(f.data)}])}}return w}function E(h,w){const d={},f={start:{}};let C=["start"];for(let p=0;p<h.length;p++){const A=h[p],S=[];for(let P=0;P<A.length;P++){const I=A[P],z=""+p+P;S.push(z),d[z]={node:I,lastCount:0},f[z]={};for(let q=0;q<C.length;q++){const M=C[q];d[M]&&d[M].node.mode===I.mode?(f[M][z]=m(d[M].lastCount+I.length,I.mode)-m(d[M].lastCount,I.mode),d[M].lastCount+=I.length):(d[M]&&(d[M].lastCount=I.length),f[M][z]=m(I.length,I.mode)+4+e.getCharCountIndicator(I.mode,w))}}C=S}for(let p=0;p<C.length;p++)f[C[p]].end=0;return{map:f,table:d}}function N(h,w){let d;const f=e.getBestModeForData(h);if(d=e.from(w,f),d!==e.BYTE&&d.bit<f.bit)throw new Error('"'+h+'" cannot be encoded with mode '+e.toString(d)+`.
4
+ Suggested mode is: `+e.toString(f));switch(d===e.KANJI&&!a.isKanjiModeEnabled()&&(d=e.BYTE),d){case e.NUMERIC:return new i(h);case e.ALPHANUMERIC:return new r(h);case e.KANJI:return new o(h);case e.BYTE:return new n(h)}}t.fromArray=function(w){return w.reduce(function(d,f){return typeof f=="string"?d.push(N(f,null)):f.data&&d.push(N(f.data,f.mode)),d},[])},t.fromString=function(w,d){const f=B(w,a.isKanjiModeEnabled()),C=y(f),p=E(C,d),A=u.find_path(p.map,"start","end"),S=[];for(let P=1;P<A.length-1;P++)S.push(p.table[A[P]].node);return t.fromArray(g(S))},t.rawSplit=function(w){return t.fromArray(B(w,a.isKanjiModeEnabled()))}})(bt);const Q=b,X=Y,re=Ot,oe=Vt,ie=mt,se=wt,nt=yt,rt=$,ue=vt,j=pt,ae=At,ce=L,Z=bt;function le(t,e){const i=t.size,r=se.getPositions(e);for(let n=0;n<r.length;n++){const o=r[n][0],s=r[n][1];for(let a=-1;a<=7;a++)if(!(o+a<=-1||i<=o+a))for(let u=-1;u<=7;u++)s+u<=-1||i<=s+u||(a>=0&&a<=6&&(u===0||u===6)||u>=0&&u<=6&&(a===0||a===6)||a>=2&&a<=4&&u>=2&&u<=4?t.set(o+a,s+u,!0,!0):t.set(o+a,s+u,!1,!0))}}function fe(t){const e=t.size;for(let i=8;i<e-8;i++){const r=i%2===0;t.set(i,6,r,!0),t.set(6,i,r,!0)}}function ge(t,e){const i=ie.getPositions(e);for(let r=0;r<i.length;r++){const n=i[r][0],o=i[r][1];for(let s=-2;s<=2;s++)for(let a=-2;a<=2;a++)s===-2||s===2||a===-2||a===2||s===0&&a===0?t.set(n+s,o+a,!0,!0):t.set(n+s,o+a,!1,!0)}}function de(t,e){const i=t.size,r=j.getEncodedBits(e);let n,o,s;for(let a=0;a<18;a++)n=Math.floor(a/3),o=a%3+i-8-3,s=(r>>a&1)===1,t.set(n,o,s,!0),t.set(o,n,s,!0)}function x(t,e,i){const r=t.size,n=ae.getEncodedBits(e,i);let o,s;for(o=0;o<15;o++)s=(n>>o&1)===1,o<6?t.set(o,8,s,!0):o<8?t.set(o+1,8,s,!0):t.set(r-15+o,8,s,!0),o<8?t.set(8,r-o-1,s,!0):o<9?t.set(8,15-o-1+1,s,!0):t.set(8,15-o-1,s,!0);t.set(r-8,8,1,!0)}function he(t,e){const i=t.size;let r=-1,n=i-1,o=7,s=0;for(let a=i-1;a>0;a-=2)for(a===6&&a--;;){for(let u=0;u<2;u++)if(!t.isReserved(n,a-u)){let c=!1;s<e.length&&(c=(e[s]>>>o&1)===1),t.set(n,a-u,c),o--,o===-1&&(s++,o=7)}if(n+=r,n<0||i<=n){n-=r,r=-r;break}}}function me(t,e,i){const r=new re;i.forEach(function(u){r.put(u.mode.bit,4),r.put(u.getLength(),ce.getCharCountIndicator(u.mode,t)),u.write(r)});const n=Q.getSymbolTotalCodewords(t),o=rt.getTotalCodewordsCount(t,e),s=(n-o)*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const a=(s-r.getLengthInBits())/8;for(let u=0;u<a;u++)r.put(u%2?17:236,8);return we(r,t,e)}function we(t,e,i){const r=Q.getSymbolTotalCodewords(e),n=rt.getTotalCodewordsCount(e,i),o=r-n,s=rt.getBlocksCount(e,i),a=r%s,u=s-a,c=Math.floor(r/s),l=Math.floor(o/s),B=l+1,m=c-l,g=new ue(m);let y=0;const E=new Array(s),N=new Array(s);let h=0;const w=new Uint8Array(t.buffer);for(let A=0;A<s;A++){const S=A<u?l:B;E[A]=w.slice(y,y+S),N[A]=g.encode(E[A]),y+=S,h=Math.max(h,S)}const d=new Uint8Array(r);let f=0,C,p;for(C=0;C<h;C++)for(p=0;p<s;p++)C<E[p].length&&(d[f++]=E[p][C]);for(C=0;C<m;C++)for(p=0;p<s;p++)d[f++]=N[p][C];return d}function ye(t,e,i,r){let n;if(Array.isArray(t))n=Z.fromArray(t);else if(typeof t=="string"){let c=e;if(!c){const l=Z.rawSplit(t);c=j.getBestVersionForData(l,i)}n=Z.fromString(t,c||40)}else throw new Error("Invalid data");const o=j.getBestVersionForData(n,i);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=o;else if(e<o)throw new Error(`
5
5
  The chosen QR Code version cannot contain this amount of data.
6
6
  Minimum version required to store current data is: `+o+`.
7
- `);const s=me(e,i,n),a=Q.getSymbolSize(e),u=new oe(a);return le(u,e),fe(u),ge(u,e),x(u,i,0),e>=7&&de(u,e),he(u,s),isNaN(r)&&(r=nt.getBestMask(u,x.bind(null,u,i))),nt.applyMask(r,u),x(u,i,r),{modules:u,version:e,errorCorrectionLevel:i,maskPattern:r,segments:n}}dt.create=function(e,i){if(typeof e=="undefined"||e==="")throw new Error("No input text");let r=X.M,n,o;return typeof i!="undefined"&&(r=X.from(i.errorCorrectionLevel,X.M),n=Y.from(i.version),o=nt.from(i.maskPattern),i.toSJISFunc&&Q.setToSJISFunction(i.toSJISFunc)),ye(e,n,r,o)};var St={},at={};(function(t){function e(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let r=i.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+i);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const n=parseInt(r.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const n=typeof r.margin=="undefined"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:o,scale:o?4:s,margin:n,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,n){return n.width&&n.width>=r+n.margin*2?n.width/(r+n.margin*2):n.scale},t.getImageWidth=function(r,n){const o=t.getScale(r,n);return Math.floor((r+n.margin*2)*o)},t.qrToImageData=function(r,n,o){const s=n.modules.size,a=n.modules.data,u=t.getScale(s,o),c=Math.floor((s+o.margin*2)*u),l=o.margin*u,p=[o.color.light,o.color.dark];for(let m=0;m<c;m++)for(let g=0;g<c;g++){let y=(m*c+g)*4,E=o.color.light;if(m>=l&&g>=l&&m<c-l&&g<c-l){const N=Math.floor((m-l)/u),h=Math.floor((g-l)/u);E=p[a[N*s+h]?1:0]}r[y++]=E.r,r[y++]=E.g,r[y++]=E.b,r[y]=E.a}}})(at);(function(t){const e=at;function i(n,o,s){n.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,s,a){let u=a,c=s;typeof u=="undefined"&&(!s||!s.getContext)&&(u=s,s=void 0),s||(c=r()),u=e.getOptions(u);const l=e.getImageWidth(o.modules.size,u),p=c.getContext("2d"),m=p.createImageData(l,l);return e.qrToImageData(m.data,o,u),i(p,c,l),p.putImageData(m,0,0),c},t.renderToDataURL=function(o,s,a){let u=a;typeof u=="undefined"&&(!s||!s.getContext)&&(u=s,s=void 0),u||(u={});const c=t.render(o,s,u),l=u.type||"image/png",p=u.rendererOpts||{};return c.toDataURL(l,p.quality)}})(St);var Tt={};const Ee=at;function gt(t,e){const i=t.a/255,r=e+'="'+t.hex+'"';return i<1?r+" "+e+'-opacity="'+i.toFixed(2).slice(1)+'"':r}function tt(t,e,i){let r=t+e;return typeof i!="undefined"&&(r+=" "+i),r}function Ce(t,e,i){let r="",n=0,o=!1,s=0;for(let a=0;a<t.length;a++){const u=Math.floor(a%e),c=Math.floor(a/e);!u&&!o&&(o=!0),t[a]?(s++,a>0&&u>0&&t[a-1]||(r+=o?tt("M",u+i,.5+c+i):tt("m",n,0),n=0,o=!1),u+1<e&&t[a+1]||(r+=tt("h",s),s=0)):n++}return r}Tt.render=function(e,i,r){const n=Ee.getOptions(i),o=e.modules.size,s=e.modules.data,a=o+n.margin*2,u=n.color.light.a?"<path "+gt(n.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+gt(n.color.dark,"stroke")+' d="'+Ce(s,o,n.margin)+'"/>',l='viewBox="0 0 '+a+" "+a+'"',p=n.width?'width="'+n.width+'" height="'+n.width+'" ':"",m='<svg xmlns="http://www.w3.org/2000/svg" '+p+l+' shape-rendering="crispEdges">'+u+c+`</svg>
8
- `;return typeof r=="function"&&r(null,m),m};const Be=kt,ot=dt,bt=St,pe=Tt;function ct(t,e,i,r,n){const o=[].slice.call(arguments,1),s=o.length,a=typeof o[s-1]=="function";if(!a&&!Be())throw new Error("Callback required as last argument");if(a){if(s<2)throw new Error("Too few arguments provided");s===2?(n=i,i=e,e=r=void 0):s===3&&(e.getContext&&typeof n=="undefined"?(n=r,r=void 0):(n=r,r=i,i=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(i=e,e=r=void 0):s===2&&!e.getContext&&(r=i,i=e,e=void 0),new Promise(function(u,c){try{const l=ot.create(i,r);u(t(l,e,r))}catch(l){c(l)}})}try{const u=ot.create(i,r);n(null,t(u,e,r))}catch(u){n(u)}}K.create=ot.create;K.toCanvas=ct.bind(null,bt.render);K.toDataURL=ct.bind(null,bt.renderToDataURL);K.toString=ct.bind(null,function(t,e,i){return pe.render(t,i)});const Ae=["low","medium","quartile","high","L","M","Q","H"],Ne=[0,1,2,3,4,5,6,7],Ie=["alphanumeric","numeric","kanji","byte"],Se=["image/png","image/jpeg","image/webp"],Te=40;var Pe=Lt({props:{version:{type:Number,validator:t=>t===Number.parseInt(String(t),10)&&t>=1&&t<=Te},errorCorrectionLevel:{type:String,validator:t=>Ae.includes(t)},maskPattern:{type:Number,validator:t=>Ne.includes(t)},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:t=>["dark","light"].every(e=>["string","undefined"].includes(typeof t[e])),required:!0},type:{type:String,validator:t=>Se.includes(t),required:!0},quality:{type:Number,validator:t=>t===Number.parseFloat(String(t))&&t>=0&&t<=1,required:!1},value:{type:[String,Array],required:!0,validator(t){return typeof t=="string"?!0:t.every(e=>typeof e.data=="string"&&"mode"in e&&Ie.includes(e.mode))}}},setup(t,{attrs:e,emit:i}){const r=Ut();return Dt(t,()=>{const{quality:o,value:s}=t,a=Rt(t,["quality","value"]);K.toDataURL(s,Object.assign(a,o==null||{renderOptions:{quality:o}})).then(u=>{r.value=u,i("change",u)}).catch(u=>i("error",u))},{immediate:!0}),()=>Ft("img",Object.assign(Object.assign({},e),{src:r.value}))}});export{Pe as Q};
7
+ `);const s=me(e,i,n),a=Q.getSymbolSize(e),u=new oe(a);return le(u,e),fe(u),ge(u,e),x(u,i,0),e>=7&&de(u,e),he(u,s),isNaN(r)&&(r=nt.getBestMask(u,x.bind(null,u,i))),nt.applyMask(r,u),x(u,i,r),{modules:u,version:e,errorCorrectionLevel:i,maskPattern:r,segments:n}}dt.create=function(e,i){if(typeof e=="undefined"||e==="")throw new Error("No input text");let r=X.M,n,o;return typeof i!="undefined"&&(r=X.from(i.errorCorrectionLevel,X.M),n=j.from(i.version),o=nt.from(i.maskPattern),i.toSJISFunc&&Q.setToSJISFunction(i.toSJISFunc)),ye(e,n,r,o)};var St={},at={};(function(t){function e(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let r=i.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+i);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const n=parseInt(r.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const n=typeof r.margin=="undefined"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:o,scale:o?4:s,margin:n,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,n){return n.width&&n.width>=r+n.margin*2?n.width/(r+n.margin*2):n.scale},t.getImageWidth=function(r,n){const o=t.getScale(r,n);return Math.floor((r+n.margin*2)*o)},t.qrToImageData=function(r,n,o){const s=n.modules.size,a=n.modules.data,u=t.getScale(s,o),c=Math.floor((s+o.margin*2)*u),l=o.margin*u,B=[o.color.light,o.color.dark];for(let m=0;m<c;m++)for(let g=0;g<c;g++){let y=(m*c+g)*4,E=o.color.light;if(m>=l&&g>=l&&m<c-l&&g<c-l){const N=Math.floor((m-l)/u),h=Math.floor((g-l)/u);E=B[a[N*s+h]?1:0]}r[y++]=E.r,r[y++]=E.g,r[y++]=E.b,r[y]=E.a}}})(at);(function(t){const e=at;function i(n,o,s){n.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,s,a){let u=a,c=s;typeof u=="undefined"&&(!s||!s.getContext)&&(u=s,s=void 0),s||(c=r()),u=e.getOptions(u);const l=e.getImageWidth(o.modules.size,u),B=c.getContext("2d"),m=B.createImageData(l,l);return e.qrToImageData(m.data,o,u),i(B,c,l),B.putImageData(m,0,0),c},t.renderToDataURL=function(o,s,a){let u=a;typeof u=="undefined"&&(!s||!s.getContext)&&(u=s,s=void 0),u||(u={});const c=t.render(o,s,u),l=u.type||"image/png",B=u.rendererOpts||{};return c.toDataURL(l,B.quality)}})(St);var It={};const Ee=at;function gt(t,e){const i=t.a/255,r=e+'="'+t.hex+'"';return i<1?r+" "+e+'-opacity="'+i.toFixed(2).slice(1)+'"':r}function tt(t,e,i){let r=t+e;return typeof i!="undefined"&&(r+=" "+i),r}function Ce(t,e,i){let r="",n=0,o=!1,s=0;for(let a=0;a<t.length;a++){const u=Math.floor(a%e),c=Math.floor(a/e);!u&&!o&&(o=!0),t[a]?(s++,a>0&&u>0&&t[a-1]||(r+=o?tt("M",u+i,.5+c+i):tt("m",n,0),n=0,o=!1),u+1<e&&t[a+1]||(r+=tt("h",s),s=0)):n++}return r}It.render=function(e,i,r){const n=Ee.getOptions(i),o=e.modules.size,s=e.modules.data,a=o+n.margin*2,u=n.color.light.a?"<path "+gt(n.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+gt(n.color.dark,"stroke")+' d="'+Ce(s,o,n.margin)+'"/>',l='viewBox="0 0 '+a+" "+a+'"',B=n.width?'width="'+n.width+'" height="'+n.width+'" ':"",m='<svg xmlns="http://www.w3.org/2000/svg" '+B+l+' shape-rendering="crispEdges">'+u+c+`</svg>
8
+ `;return typeof r=="function"&&r(null,m),m};const pe=kt,ot=dt,Tt=St,Be=It;function ct(t,e,i,r,n){const o=[].slice.call(arguments,1),s=o.length,a=typeof o[s-1]=="function";if(!a&&!pe())throw new Error("Callback required as last argument");if(a){if(s<2)throw new Error("Too few arguments provided");s===2?(n=i,i=e,e=r=void 0):s===3&&(e.getContext&&typeof n=="undefined"?(n=r,r=void 0):(n=r,r=i,i=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(i=e,e=r=void 0):s===2&&!e.getContext&&(r=i,i=e,e=void 0),new Promise(function(u,c){try{const l=ot.create(i,r);u(t(l,e,r))}catch(l){c(l)}})}try{const u=ot.create(i,r);n(null,t(u,e,r))}catch(u){n(u)}}H.create=ot.create;H.toCanvas=ct.bind(null,Tt.render);H.toDataURL=ct.bind(null,Tt.renderToDataURL);H.toString=ct.bind(null,function(t,e,i){return Be.render(t,i)});const Ae=["low","medium","quartile","high","L","M","Q","H"],Ne=[0,1,2,3,4,5,6,7],be=["alphanumeric","numeric","kanji","byte"],Se=["image/png","image/jpeg","image/webp"],Ie=40;var Pe=Rt({props:{version:{type:Number,validator:t=>t===Number.parseInt(String(t),10)&&t>=1&&t<=Ie},errorCorrectionLevel:{type:String,validator:t=>Ae.includes(t)},maskPattern:{type:Number,validator:t=>Ne.includes(t)},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:t=>["dark","light"].every(e=>["string","undefined"].includes(typeof t[e])),required:!0},type:{type:String,validator:t=>Se.includes(t),required:!0},quality:{type:Number,validator:t=>t===Number.parseFloat(String(t))&&t>=0&&t<=1,required:!1},value:{type:[String,Array],required:!0,validator(t){return typeof t=="string"?!0:t.every(e=>typeof e.data=="string"&&"mode"in e&&be.includes(e.mode))}}},setup(t,{attrs:e,emit:i}){const r=Lt();return Ut(t,()=>{const{quality:o,value:s}=t,a=Ft(t,["quality","value"]);H.toDataURL(s,Object.assign(a,o==null||{renderOptions:{quality:o}})).then(u=>{r.value=u,i("change",u)}).catch(u=>i("error",u))},{immediate:!0}),()=>Dt("img",Object.assign(Object.assign({},e),{src:r.value}))}});export{Pe as Q};
@@ -1,4 +1,4 @@
1
- import"./vendor-others.decd85ac.js";import{H as so,ah as M,X as Dt,y as xr,m as L,J as Ft,v as be,r as q,o as ve,e as mr,L as At,M as Lo,V as ko,I as Be,u as to,A as fr,s as $o,t as br,aa as vr,q as co,p as Ot,x as Wt,F as Sr,G as yr,l as Lt,a6 as kt,W as jt,n as Rt,_ as Hr,f as Pr,aJ as Et,C as _t}from"./vendor-@vue.31495dbd.js";function K(o){return typeof o=="string"?o.endsWith("px")?Number(o.slice(0,o.length-2)):Number(o):o}function ne(o){if(o!=null)return typeof o=="number"?`${o}px`:o.endsWith("px")?o:`${o}px`}const De={black:"#000",silver:"#C0C0C0",gray:"#808080",white:"#FFF",maroon:"#800000",red:"#F00",purple:"#800080",fuchsia:"#F0F",green:"#008000",lime:"#0F0",olive:"#808000",yellow:"#FF0",navy:"#000080",blue:"#00F",teal:"#008080",aqua:"#0FF",transparent:"#0000"},ho="^\\s*",xo="\\s*$",lo="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",no="([0-9A-Fa-f])",io="([0-9A-Fa-f]{2})",Gt=new RegExp(`${ho}rgb\\s*\\(${lo},${lo},${lo}\\)${xo}`),Nt=new RegExp(`${ho}rgba\\s*\\(${lo},${lo},${lo},${lo}\\)${xo}`),Vt=new RegExp(`${ho}#${no}${no}${no}${xo}`),Ut=new RegExp(`${ho}#${io}${io}${io}${xo}`),qt=new RegExp(`${ho}#${no}${no}${no}${no}${xo}`),Qt=new RegExp(`${ho}#${io}${io}${io}${io}${xo}`);function G(o){return parseInt(o,16)}function X(o){try{let e;if(e=Ut.exec(o))return[G(e[1]),G(e[2]),G(e[3]),1];if(e=Gt.exec(o))return[E(e[1]),E(e[5]),E(e[9]),1];if(e=Nt.exec(o))return[E(e[1]),E(e[5]),E(e[9]),Io(e[13])];if(e=Vt.exec(o))return[G(e[1]+e[1]),G(e[2]+e[2]),G(e[3]+e[3]),1];if(e=Qt.exec(o))return[G(e[1]),G(e[2]),G(e[3]),Io(G(e[4])/255)];if(e=qt.exec(o))return[G(e[1]+e[1]),G(e[2]+e[2]),G(e[3]+e[3]),Io(G(e[4]+e[4])/255)];if(o in De)return X(De[o]);throw new Error(`[seemly/rgba]: Invalid color value ${o}.`)}catch(e){throw e}}function Jt(o){return o>1?1:o<0?0:o}function de(o,e,r,t){return`rgba(${E(o)}, ${E(e)}, ${E(r)}, ${Jt(t)})`}function ie(o,e,r,t,l){return E((o*e*(1-t)+r*t)/l)}function H(o,e){Array.isArray(o)||(o=X(o)),Array.isArray(e)||(e=X(e));const r=o[3],t=e[3],l=Io(r+t-r*t);return de(ie(o[0],r,e[0],t,l),ie(o[1],r,e[1],t,l),ie(o[2],r,e[2],t,l),l)}function v(o,e){const[r,t,l,n=1]=Array.isArray(o)?o:X(o);return e.alpha?de(r,t,l,e.alpha):de(r,t,l,n)}function W(o,e){const[r,t,l,n=1]=Array.isArray(o)?o:X(o),{lightness:i=1,alpha:a=1}=e;return Yt([r*i,t*i,l*i,n*a])}function Io(o){const e=Math.round(Number(o)*100)/100;return e>1?1:e<0?0:e}function E(o){const e=Math.round(Number(o));return e>255?255:e<0?0:e}function Yt(o){const[e,r,t]=o;return 3 in o?`rgba(${E(e)}, ${E(r)}, ${E(t)}, ${Io(o[3])})`:`rgba(${E(e)}, ${E(r)}, ${E(t)}, 1)`}function _o(o,...e){if(Array.isArray(o))o.forEach(r=>_o(r,...e));else return o(...e)}const Fe=new Set;function Kt(o,e){const r=`[naive/${o}]: ${e}`;Fe.has(r)||(Fe.add(r),console.error(r))}function Xt(o,e){console.error(`[naive/${o}]: ${e}`)}function wr(o,e){throw new Error(`[naive/${o}]: ${e}`)}function Se(o){return o.some(e=>Lt(e)?!(e.type===kt||e.type===jt&&!Se(e.children)):!0)?o:null}function ro(o,e){const r=o&&Se(o());return e(r||null)}function ae(o){return!(o&&Se(o()))}const Zt=/^(\d|\.)+$/,Ae=/(\d|\.)+/;function ol(o,{c:e=1,offset:r=0,attachPx:t=!0}={}){if(typeof o=="number"){const l=(o+r)*e;return l===0?"0":`${l}px`}else if(typeof o=="string")if(Zt.test(o)){const l=(Number(o)+r)*e;return t?l===0?"0":`${l}px`:`${l}`}else{const l=Ae.exec(o);return l?o.replace(Ae,String((Number(l[0])+r)*e)):o}return o}function el(o){let e=0;for(let r=0;r<o.length;++r)o[r]==="&"&&++e;return e}const zr=/\s*,(?![^(]*\))\s*/g,rl=/\s+/g;function tl(o,e){const r=[];return e.split(zr).forEach(t=>{let l=el(t);if(l){if(l===1){o.forEach(i=>{r.push(t.replace("&",i))});return}}else{o.forEach(i=>{r.push((i&&i+" ")+t)});return}let n=[t];for(;l--;){const i=[];n.forEach(a=>{o.forEach(c=>{i.push(a.replace("&",c))})}),n=i}n.forEach(i=>r.push(i))}),r}function ll(o,e){const r=[];return e.split(zr).forEach(t=>{o.forEach(l=>{r.push((l&&l+" ")+t)})}),r}function nl(o){let e=[""];return o.forEach(r=>{r=r&&r.trim(),r&&(r.includes("&")?e=tl(e,r):e=ll(e,r))}),e.join(", ").replace(rl," ")}function Oe(o){if(!o)return;const e=o.parentElement;e&&e.removeChild(o)}function ye(o){return document.querySelector(`style[cssr-id="${o}"]`)}function il(o){const e=document.createElement("style");return e.setAttribute("cssr-id",o),e}function jo(o){return o?/^\s*@(s|m)/.test(o):!1}const al=/[A-Z]/g;function Ir(o){return o.replace(al,e=>"-"+e.toLowerCase())}function sl(o,e=" "){return typeof o=="object"&&o!==null?` {
1
+ import"./vendor-others.ecc384b7.js";import{H as so,ah as M,X as Dt,y as xr,m as L,J as Ft,v as be,r as q,o as ve,e as mr,L as At,M as Lo,V as ko,I as Be,u as to,A as fr,s as $o,t as br,aa as vr,q as co,p as Ot,x as Wt,F as Sr,G as yr,l as Lt,a6 as kt,W as jt,n as Rt,_ as Hr,f as Pr,aJ as Et,C as _t}from"./vendor-@vue.b201070f.js";function K(o){return typeof o=="string"?o.endsWith("px")?Number(o.slice(0,o.length-2)):Number(o):o}function ne(o){if(o!=null)return typeof o=="number"?`${o}px`:o.endsWith("px")?o:`${o}px`}const De={black:"#000",silver:"#C0C0C0",gray:"#808080",white:"#FFF",maroon:"#800000",red:"#F00",purple:"#800080",fuchsia:"#F0F",green:"#008000",lime:"#0F0",olive:"#808000",yellow:"#FF0",navy:"#000080",blue:"#00F",teal:"#008080",aqua:"#0FF",transparent:"#0000"},ho="^\\s*",xo="\\s*$",lo="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",no="([0-9A-Fa-f])",io="([0-9A-Fa-f]{2})",Gt=new RegExp(`${ho}rgb\\s*\\(${lo},${lo},${lo}\\)${xo}`),Nt=new RegExp(`${ho}rgba\\s*\\(${lo},${lo},${lo},${lo}\\)${xo}`),Vt=new RegExp(`${ho}#${no}${no}${no}${xo}`),Ut=new RegExp(`${ho}#${io}${io}${io}${xo}`),qt=new RegExp(`${ho}#${no}${no}${no}${no}${xo}`),Qt=new RegExp(`${ho}#${io}${io}${io}${io}${xo}`);function G(o){return parseInt(o,16)}function X(o){try{let e;if(e=Ut.exec(o))return[G(e[1]),G(e[2]),G(e[3]),1];if(e=Gt.exec(o))return[E(e[1]),E(e[5]),E(e[9]),1];if(e=Nt.exec(o))return[E(e[1]),E(e[5]),E(e[9]),Io(e[13])];if(e=Vt.exec(o))return[G(e[1]+e[1]),G(e[2]+e[2]),G(e[3]+e[3]),1];if(e=Qt.exec(o))return[G(e[1]),G(e[2]),G(e[3]),Io(G(e[4])/255)];if(e=qt.exec(o))return[G(e[1]+e[1]),G(e[2]+e[2]),G(e[3]+e[3]),Io(G(e[4]+e[4])/255)];if(o in De)return X(De[o]);throw new Error(`[seemly/rgba]: Invalid color value ${o}.`)}catch(e){throw e}}function Jt(o){return o>1?1:o<0?0:o}function de(o,e,r,t){return`rgba(${E(o)}, ${E(e)}, ${E(r)}, ${Jt(t)})`}function ie(o,e,r,t,l){return E((o*e*(1-t)+r*t)/l)}function H(o,e){Array.isArray(o)||(o=X(o)),Array.isArray(e)||(e=X(e));const r=o[3],t=e[3],l=Io(r+t-r*t);return de(ie(o[0],r,e[0],t,l),ie(o[1],r,e[1],t,l),ie(o[2],r,e[2],t,l),l)}function v(o,e){const[r,t,l,n=1]=Array.isArray(o)?o:X(o);return e.alpha?de(r,t,l,e.alpha):de(r,t,l,n)}function W(o,e){const[r,t,l,n=1]=Array.isArray(o)?o:X(o),{lightness:i=1,alpha:a=1}=e;return Yt([r*i,t*i,l*i,n*a])}function Io(o){const e=Math.round(Number(o)*100)/100;return e>1?1:e<0?0:e}function E(o){const e=Math.round(Number(o));return e>255?255:e<0?0:e}function Yt(o){const[e,r,t]=o;return 3 in o?`rgba(${E(e)}, ${E(r)}, ${E(t)}, ${Io(o[3])})`:`rgba(${E(e)}, ${E(r)}, ${E(t)}, 1)`}function _o(o,...e){if(Array.isArray(o))o.forEach(r=>_o(r,...e));else return o(...e)}const Fe=new Set;function Kt(o,e){const r=`[naive/${o}]: ${e}`;Fe.has(r)||(Fe.add(r),console.error(r))}function Xt(o,e){console.error(`[naive/${o}]: ${e}`)}function wr(o,e){throw new Error(`[naive/${o}]: ${e}`)}function Se(o){return o.some(e=>Lt(e)?!(e.type===kt||e.type===jt&&!Se(e.children)):!0)?o:null}function ro(o,e){const r=o&&Se(o());return e(r||null)}function ae(o){return!(o&&Se(o()))}const Zt=/^(\d|\.)+$/,Ae=/(\d|\.)+/;function ol(o,{c:e=1,offset:r=0,attachPx:t=!0}={}){if(typeof o=="number"){const l=(o+r)*e;return l===0?"0":`${l}px`}else if(typeof o=="string")if(Zt.test(o)){const l=(Number(o)+r)*e;return t?l===0?"0":`${l}px`:`${l}`}else{const l=Ae.exec(o);return l?o.replace(Ae,String((Number(l[0])+r)*e)):o}return o}function el(o){let e=0;for(let r=0;r<o.length;++r)o[r]==="&"&&++e;return e}const zr=/\s*,(?![^(]*\))\s*/g,rl=/\s+/g;function tl(o,e){const r=[];return e.split(zr).forEach(t=>{let l=el(t);if(l){if(l===1){o.forEach(i=>{r.push(t.replace("&",i))});return}}else{o.forEach(i=>{r.push((i&&i+" ")+t)});return}let n=[t];for(;l--;){const i=[];n.forEach(a=>{o.forEach(c=>{i.push(a.replace("&",c))})}),n=i}n.forEach(i=>r.push(i))}),r}function ll(o,e){const r=[];return e.split(zr).forEach(t=>{o.forEach(l=>{r.push((l&&l+" ")+t)})}),r}function nl(o){let e=[""];return o.forEach(r=>{r=r&&r.trim(),r&&(r.includes("&")?e=tl(e,r):e=ll(e,r))}),e.join(", ").replace(rl," ")}function Oe(o){if(!o)return;const e=o.parentElement;e&&e.removeChild(o)}function ye(o){return document.querySelector(`style[cssr-id="${o}"]`)}function il(o){const e=document.createElement("style");return e.setAttribute("cssr-id",o),e}function jo(o){return o?/^\s*@(s|m)/.test(o):!1}const al=/[A-Z]/g;function Ir(o){return o.replace(al,e=>"-"+e.toLowerCase())}function sl(o,e=" "){return typeof o=="object"&&o!==null?` {
2
2
  `+Object.entries(o).map(r=>e+` ${Ir(r[0])}: ${r[1]};`).join(`
3
3
  `)+`
4
4
  `+e+"}":`: ${o};`}function cl(o,e,r){return typeof o=="function"?o({context:e.context,props:r}):o}function We(o,e,r,t){if(!e)return"";const l=cl(e,r,t);if(!l)return"";if(typeof l=="string")return`${o} {
package/dist/index.html CHANGED
@@ -4,14 +4,15 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
6
6
  <title>Nexior</title>
7
- <script type="module" crossorigin src="/assets/index.b7b7827f.js"></script>
8
- <link rel="modulepreload" href="/assets/vendor-@vue.31495dbd.js">
9
- <link rel="modulepreload" href="/assets/vendor-element-plus.eeef3ee7.js">
10
- <link rel="modulepreload" href="/assets/vendor-others.decd85ac.js">
7
+ <script type="module" crossorigin src="/assets/index.f357c50b.js"></script>
8
+ <link rel="modulepreload" href="/assets/vendor-@vue.b201070f.js">
9
+ <link rel="modulepreload" href="/assets/vendor-element-plus.ec5f1739.js">
10
+ <link rel="modulepreload" href="/assets/vendor-others.ecc384b7.js">
11
11
  <link rel="modulepreload" href="/assets/vendor-axios.168e6950.js">
12
- <link rel="modulepreload" href="/assets/vendor-fortawesome.35fae32b.js">
12
+ <link rel="modulepreload" href="/assets/vendor-qrcode.1cdaa2c5.js">
13
+ <link rel="modulepreload" href="/assets/vendor-fortawesome.7c293b44.js">
13
14
  <link rel="stylesheet" href="/assets/vendor-others.bcdc6bd8.css">
14
- <link rel="stylesheet" href="/assets/index.62d00e03.css">
15
+ <link rel="stylesheet" href="/assets/index.8688d47f.css">
15
16
  </head>
16
17
  <body>
17
18
  <div id="app">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/nexior",
3
- "version": "2.0.5",
3
+ "version": "2.1.0",
4
4
  "author": "Germey Technology <dev@germey.tech>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,12 @@
11
11
  ],
12
12
  "scripts": {
13
13
  "start": "vite --host",
14
- "build": "vite build --mode=development",
14
+ "build": "yarn build:web",
15
+ "build:web": "cross-env VITE_SURFACE=web vite build --mode development",
16
+ "build:android": "cross-env VITE_SURFACE=android vite build --mode development",
17
+ "build:ios": "cross-env VITE_SURFACE=ios vite build --mode development",
18
+ "pack:android": "yarn build:android && npx cap copy android",
19
+ "pack:ios": "yarn build:ios && npx cap copy ios",
15
20
  "serve": "vite preview",
16
21
  "translate": "transmart",
17
22
  "lint": "eslint src --fix --ext .ts,.tsx,.vue,.js,.jsx",
@@ -62,6 +67,10 @@
62
67
  "vuex-persistedstate": "^4.0.0"
63
68
  },
64
69
  "devDependencies": {
70
+ "@capacitor/android": "^6.1.1",
71
+ "@capacitor/cli": "^6.1.1",
72
+ "@capacitor/core": "^6.1.1",
73
+ "@capacitor/ios": "^6.1.1",
65
74
  "@rollup/plugin-replace": "^3.0.0",
66
75
  "@transmart/cli": "^0.5.0",
67
76
  "@types/lodash": "^4.14.172",
@@ -1 +0,0 @@
1
- import"./vendor-others.decd85ac.js";import{_}from"./index.b7b7827f.js";import{j as s,k as c}from"./vendor-element-plus.eeef3ee7.js";import{H as i,al as e,L as p,M as o,o as l,V as t}from"./vendor-@vue.31495dbd.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.35fae32b.js";const u=i({name:"LayoutAuth",components:{ElContainer:s,ElMain:c}});function m(d,f,v,h,x,k){const n=e("router-view"),r=e("el-main"),a=e("el-container");return l(),p(a,null,{default:o(()=>[t(r,null,{default:o(()=>[t(n)]),_:1})]),_:1})}var B=_(u,[["render",m],["__scopeId","data-v-8e16c232"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Auth.vue"]]);export{B as default};
@@ -1 +0,0 @@
1
- var U=Object.defineProperty,z=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var N=(e,a,t)=>a in e?U(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,S=(e,a)=>{for(var t in a||(a={}))H.call(a,t)&&N(e,t,a[t]);if(P)for(var t of P(a))J.call(a,t)&&N(e,t,a[t]);return e},w=(e,a)=>z(e,G(a));import"./vendor-others.decd85ac.js";import{_ as O,w as K,x as Q}from"./index.b7b7827f.js";import{g as V}from"./price.cf991d37.js";import{H as A,o as r,e as g,U as p,al as l,L as k,M as i,V as o,f as W,T as E,ai as j,W as X,S as C,Q as F}from"./vendor-@vue.31495dbd.js";import{o as Y}from"./order.67692924.js";import{A as Z,b as x,a as ee,n as ae,G as te,H as ie,i as oe,B as re,I as se,J as ne,K as le}from"./vendor-element-plus.eeef3ee7.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.35fae32b.js";const pe=A({name:"ApiPrice",props:{price:{type:Number,required:!1,default:0},unit:{type:String,required:!1,default:void 0},start:{type:Boolean,required:!1,default:!1}},methods:{getPriceString:V}}),ce={class:"price-text"},de={key:0,class:"unfree"},ue={key:1,class:"free"};function me(e,a,t,c,u,v){return r(),g("div",ce,[e.price>0?(r(),g("span",de,p(e.getPriceString({value:e.price}))+" "+p(e.unit?` / ${e.unit}`:"")+p(e.start?e.$t("common.message.startPrice"):""),1)):(r(),g("span",ue,p(e.$t("common.message.free")),1))])}var fe=O(pe,[["render",me],["__scopeId","data-v-d195ccd6"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/Price.vue"]]);const _e=A({name:"ConsoleApplicationBuy",components:{ElSkeleton:Z,ElRow:x,ElCol:ee,ElCard:ae,ElForm:te,ElFormItem:ie,ElButton:oe,ElDivider:re,ElRadioGroup:se,ElRadioButton:ne,Price:fe},data(){return{application:void 0,loading:!1,form:{packageId:void 0,amount:void 0},creating:!1}},computed:{id(){var e,a;return(a=(e=this.$route.params)==null?void 0:e.id)==null?void 0:a.toString()},price(){var e,a,t;return((a=(e=this.application)==null?void 0:e.service)==null?void 0:a.price)&&this.form.amount?this.form.amount*((t=this.application.service)==null?void 0:t.price):0},package(){var e,a,t;if(((a=(e=this.application)==null?void 0:e.service)==null?void 0:a.packages)&&this.form.packageId){const c=(t=this.application.service)==null?void 0:t.packages.filter(u=>u.id===this.form.packageId);if(c.length>0)return c[0]}}},mounted(){this.onFetchApplication()},methods:{getPriceString:V,onFetchApplication(){this.loading=!0,K.get(this.id).then(({data:e})=>{var a,t,c,u;this.application=e,this.loading=!1,this.form.packageId=(u=(c=(t=(a=this.application)==null?void 0:a.service)==null?void 0:t.packages)==null?void 0:c[0])==null?void 0:u.id}).catch(()=>{this.loading=!1})},onCreateOrder(){var a,t,c,u,v,m,f,$;if(!((a=this.application)!=null&&a.id))return;this.creating=!0;const e=this.$t(`service.unit.${(c=(t=this.application)==null?void 0:t.service)==null?void 0:c.unit}s`);Y.create(w(S({application_id:(u=this.application)==null?void 0:u.id,amount:(v=this.package)==null?void 0:v.amount},this.form.packageId!=="custom"&&this.package?{package_id:this.package.id}:{}),{description:`${(f=(m=this.application)==null?void 0:m.service)==null?void 0:f.title} x ${($=this.package)==null?void 0:$.amount} ${e}`})).then(({data:_})=>{this.creating=!1;const b=_;this.$router.push({name:Q,params:{id:b.id}})}).catch(()=>{le.error(this.$t("order.message.createFailed")),this.creating=!1})}}}),ge={class:"title"},he={key:0,class:"ml-2"},ke={key:1,class:F({price:!0,free:!0})};function ve(e,a,t,c,u,v){const m=l("el-col"),f=l("el-row"),$=l("el-skeleton"),_=l("el-form-item"),b=l("el-radio-button"),R=l("el-radio-group"),D=l("price"),L=l("el-divider"),T=l("el-button"),q=l("el-form"),M=l("el-card");return r(),k(f,{class:"panel"},{default:i(()=>[o(m,{span:24},{default:i(()=>[o(f,null,{default:i(()=>[o(m,{span:24},{default:i(()=>[W("h2",ge,p(e.$t("common.title.buyMore")),1)]),_:1})]),_:1}),o(f,null,{default:i(()=>[o(m,{span:24},{default:i(()=>[o(M,{shadow:"hover"},{default:i(()=>[o(f,null,{default:i(()=>[o(m,{span:16,offset:4},{default:i(()=>[e.loading?(r(),k($,{key:0})):e.application?(r(),k(q,{key:1,"label-width":"100px"},{default:i(()=>[o(_,{label:e.$t("application.field.service")},{default:i(()=>{var s,n;return[E(p((n=(s=e.application)==null?void 0:s.service)==null?void 0:n.title),1)]}),_:1},8,["label"]),o(_,{label:e.$t("application.field.package")},{default:i(()=>{var s,n;return[(n=(s=e.application)==null?void 0:s.service)!=null&&n.packages?(r(),k(R,{key:0,modelValue:e.form.packageId,"onUpdate:modelValue":a[0]||(a[0]=d=>e.form.packageId=d)},{default:i(()=>{var d;return[(r(!0),g(X,null,j((d=e.application)==null?void 0:d.service.packages,(h,y)=>(r(),k(b,{key:y,label:h.id,class:"mb-2"},{default:i(()=>{var B,I;return[E(p(h.amount)+" "+p(e.$t(`service.unit.${(I=(B=e.application)==null?void 0:B.service)==null?void 0:I.unit}s`)),1)]}),_:2},1032,["label"]))),128))]}),_:1},8,["modelValue"])):C("v-if",!0)]}),_:1},8,["label"]),o(_,{label:e.$t("service.field.price")},{default:i(()=>{var s,n,d,h,y;return[o(D,{price:(s=e.package)==null?void 0:s.price},null,8,["price"]),e.package?(r(),g("span",he,"("+p(e.getPriceString({value:((n=e.package)==null?void 0:n.price)/((d=e.package)==null?void 0:d.amount)})+" / "+e.$t(`service.unit.${(y=(h=e.application)==null?void 0:h.service)==null?void 0:y.unit}`))+") ",1)):C("v-if",!0)]}),_:1},8,["label"]),o(L,{"border-style":"dashed"}),o(_,{label:e.$t("application.field.shouldPayPrice")},{default:i(()=>{var s,n,d;return[e.package?(r(),g("span",{key:0,class:F({price:!0,unfree:((s=e.package)==null?void 0:s.price)>0,free:((n=e.package)==null?void 0:n.price)===0})},p(e.getPriceString({value:(d=e.package)==null?void 0:d.price})),3)):(r(),g("span",ke," $ 0 "))]}),_:1},8,["label"]),o(_,null,{default:i(()=>[o(T,{type:"primary",size:"large",class:"btn-create",loading:e.creating,round:"",onClick:e.onCreateOrder},{default:i(()=>[E(p(e.$t("application.button.createOrder")),1)]),_:1},8,["loading","onClick"])]),_:1})]),_:1})):C("v-if",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}var Se=O(_e,[["render",ve],["__scopeId","data-v-5881dfca"],["__file","/home/runner/work/Nexior/Nexior/src/pages/console/application/Buy.vue"]]);export{Se as default};
@@ -1 +0,0 @@
1
- import"./vendor-others.decd85ac.js";import{_ as r}from"./index.b7b7827f.js";import{H as t}from"./vendor-@vue.31495dbd.js";import"./vendor-element-plus.eeef3ee7.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.35fae32b.js";const a=t({name:"AuthCallback",data(){var e;return{redirect:(e=this.$route.query.redirect)==null?void 0:e.toString()}},async mounted(){this.redirect?await this.$router.push(this.redirect):await this.$router.push("/")}});var p=r(a,[["__scopeId","data-v-4aa7f9d0"],["__file","/home/runner/work/Nexior/Nexior/src/pages/auth/Callback.vue"]]);export{p as default};
@@ -1 +0,0 @@
1
- import"./vendor-others.decd85ac.js";import{N as h}from"./Navigator.d24b810c.js";import{B as v,d as $,e as w,f as N,R as g,_}from"./index.b7b7827f.js";import{ai as L}from"./vendor-fortawesome.35fae32b.js";import{H as l,al as a,o as t,e as i,f as s,W as S,ai as x,Q as C,V as r,U as E,L as O,S as y,aK as I,aL as k}from"./vendor-@vue.31495dbd.js";import"./vendor-element-plus.eeef3ee7.js";import"./DarkSelector.bf241a9d.js";import"./vendor-vue-dark-switch.81063cc1.js";import"./vendor-axios.168e6950.js";const R=l({name:"Navigator",components:{FontAwesomeIcon:L},computed:{isOfficial(){return window.location.origin===v},active(){return this.$route.matched[0].path},user(){return this.$store.getters.user},links(){return[{key:"application-list",text:this.$t("console.menu.applicationList"),name:$,icon:"fa-solid fa-cube"},{key:"order-list",text:this.$t("console.menu.orderList"),name:w,icon:"fa-solid fa-store"},{key:"usage-list",text:this.$t("console.menu.usageList"),name:N,icon:"fa-solid fa-rotate-left"}]}},mounted(){},methods:{onHome(){this.$router.push({name:g})},onNavigate(e){e.name?this.$router.push({name:e.name}):e.href&&window.open(e.href,"_blank")}}}),T=e=>(I("data-v-3859f1b5"),e=e(),k(),e),U={class:"side-panel"},b={class:"links"},B=["onClick"],A={class:"icon"},P={class:"text"},V={class:"outer"},D=T(()=>s("span",{class:"suffix"},null,-1));function H(e,d,m,p,u,f){const n=a("font-awesome-icon");return t(),i("div",U,[s("div",b,[(t(!0),i(S,null,x(e.links,(o,c)=>(t(),i("a",{key:c,class:C({link:!0,active:e.$route.name===o.name}),onClick:K=>e.onNavigate(o)},[s("span",A,[r(n,{icon:o.icon,class:"text-sm"},null,8,["icon"])]),s("span",P,E(o.text),1),s("span",V,[!o.name&&o.href?(t(),O(n,{key:0,icon:"fa-solid fa-up-right-from-square",class:"text-sm ml-2"})):y("v-if",!0)]),D],10,B))),128))])])}var W=_(R,[["render",H],["__scopeId","data-v-3859f1b5"],["__file","/home/runner/work/Nexior/Nexior/src/components/console/SidePanel.vue"]]);const z=l({name:"LayoutConsole",components:{SidePanel:W,Navigator:h},data(){return{mobile:window.innerWidth<768}},mounted(){window.addEventListener("resize",()=>{this.mobile=window.innerWidth<768})}}),F={class:"wrapper"},q={class:"main"};function G(e,d,m,p,u,f){const n=a("side-panel"),o=a("router-view"),c=a("navigator");return t(),i("div",F,[s("div",q,[r(n,{class:"side"}),r(o,{class:"panel"})]),r(c,{class:"navigator",direction:e.mobile?"row":"column"},null,8,["direction"])])}var se=_(z,[["render",G],["__scopeId","data-v-44569c68"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Console.vue"]]);export{se as default};
@@ -1 +0,0 @@
1
- var se=Object.defineProperty;var B=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var P=(e,t,a)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,A=(e,t)=>{for(var a in t||(t={}))oe.call(t,a)&&P(e,a,t[a]);if(B)for(var a of B(t))ne.call(t,a)&&P(e,a,t[a]);return e};import{a as ae}from"./vendor-axios.168e6950.js";import{I as ie}from"./vendor-others.decd85ac.js";import{_ as E,I as N,y as T,v as re,z as le,A as U,D as H,E as W,F as z,G as F,H as G,i as Q,J as L,j as Y,K as j}from"./index.b7b7827f.js";import{H as S,o as n,e as d,al as i,f as l,L as f,S as v,W as I,ai as D,M as C,T as de,U as b,Q as q,V as g,O as ce,aw as ue,a0 as V,as as X,$ as O,I as K}from"./vendor-@vue.31495dbd.js";import{M as pe,E as Z,a as ee,b as he,c as me,d as _e,e as ge,f as fe,g as x,A as $e,h as ye}from"./Status.783dce6a.js";import{C as we}from"./CopyToClipboard.3cfde0c6.js";import{C as ke,i as te,o as ve,q as Ce,L as be,K as J,d as Ee,M as Se,h as Ie,b as Ne,a as De,N as Ae,A as Oe,O as Re}from"./vendor-element-plus.eeef3ee7.js";import{ai as R}from"./vendor-fortawesome.35fae32b.js";import{i as Te}from"./is.dd611415.js";import"./application.ea1e2a72.js";import"./vendor-markdown.95c097e3.js";import"./vendor-highlight.js.19da0c9f.js";const qe=S({name:"AnsweringMark",data(){return{}},computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.id)==null?void 0:t.toString()}}}),Me={class:"mark"};function Ue(e,t,a,m,k,o){return n(),d("div",Me)}var Ge=E(qe,[["render",Ue],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/AnsweringMark.vue"]]);const Le=S({name:"Message",components:{CopyToClipboard:we,AnsweringMark:Ge,MarkdownRenderer:pe,ElAlert:ke,ElButton:te,ElImage:ve},props:{message:{type:Object,required:!0},application:{type:Object,required:!0}},emits:["stop"],data(){return{copied:!1,messageState:N}},computed:{errorText(){var e,t;if(!(!this.message.error||!((e=this.message.error)!=null&&e.code)))switch((t=this.message.error)==null?void 0:t.code){case x:return this.$t("chat.message.errorUsedUp");case fe:return this.$t("chat.message.errorApiError");case ge:return this.$t("chat.message.errorBadRequest");case _e:return this.$t("chat.message.errorTimeout");case me:return this.$t("chat.message.errorTooManyRequests");case he:return this.$t("chat.message.errorContentTooLarge");case ee:return this.$t("chat.message.errorNotApplied");case Z:default:return this.$t("chat.message.errorUnknown")}},showBuyMore(){var e;return this.message.role===T&&((e=this.message.error)==null?void 0:e.code)===x}},methods:{onCopy(){ie(this.message.content.toString(),{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)},onBuyMore(){var e;this.$router.push({name:re,params:{id:(e=this.application)==null?void 0:e.id}})}}}),Ve=["role"],Be={class:"author"},Pe={key:0,class:"main"},He={class:"content"},We={key:1},ze=["src"],Fe={class:"operations"};function je(e,t,a,m,k,o){var w;const c=i("el-image"),u=i("markdown-renderer"),_=i("answering-mark"),r=i("copy-to-clipboard"),h=i("el-alert"),s=i("el-button");return n(),d("div",{class:q({message:!0,[e.message.role]:!0}),role:e.message.role},[l("div",Be,[e.message.role==="assistant"?(n(),f(c,{key:0,src:"https://cdn.acedata.cloud/7dljuv.png",fit:"cover",class:"avatar"})):v("v-if",!0)]),e.errorText?(n(),f(h,{key:1,class:"error",title:e.errorText,type:"error",closable:!1},null,8,["title"])):(n(),d("div",Pe,[l("div",He,[Array.isArray(e.message.content)?(n(),d("div",We,[(n(!0),d(I,null,D(e.message.content,($,p)=>{var y;return n(),d("div",{key:p},[$.type==="image_url"?(n(),d("img",{key:0,src:typeof($==null?void 0:$.image_url)=="string"?$.image_url:(y=$.image_url)==null?void 0:y.url,fit:"cover",class:"image"},null,8,ze)):v("v-if",!0),$.type==="text"?(n(),f(u,{key:p,content:$.text},null,8,["content"])):v("v-if",!0)])}),128))])):(n(),f(u,{key:0,content:(w=e.message)==null?void 0:w.content},null,8,["content"])),e.message.state===e.messageState.PENDING?(n(),f(_,{key:2})):v("v-if",!0)]),l("div",Fe,[Array.isArray(e.message.content)?v("v-if",!0):(n(),f(r,{key:0,content:e.message.content,class:"btn-copy"},null,8,["content"]))])])),e.showBuyMore?(n(),f(s,{key:2,round:"",type:"primary",class:"btn btn-buy",size:"small",onClick:e.onBuyMore},{default:C(()=>[de(b(e.$t("common.button.buyMore")),1)]),_:1},8,["onClick"])):v("v-if",!0)],10,Ve)}var Ke=E(Le,[["render",je],["__scopeId","data-v-f0476f80"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/Message.vue"]]);const xe=S({name:"InputBox",components:{ElTooltip:Ce,FontAwesomeIcon:R,ElUpload:be},props:{disabled:{type:Boolean,required:!1,default:!1},references:{type:Array,required:!1,default:()=>[]},question:{type:String,required:!0}},emits:["update:question","update:references","submit"],data(){return{inputHeight:"35px",questionValue:this.question,fileList:[],uploadUrl:le()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},canUpload(){return[U.name].includes(this.model.name)},model(){return this.$store.state.chat.model}},watch:{urls(e){this.$emit("update:references",e)},questionValue(e){this.$emit("update:question",e)},question(e){e!==this.questionValue&&(this.questionValue=e)},references(e){e.length===0&&(this.fileList=[])}},methods:{adjustTextareaHeight(){this.$nextTick(()=>{const e=this.$refs.textarea;e&&(e.style.height="35px",e.style.height=e.scrollHeight+"px")})},onSubmit(){!this.question||this.$emit("submit")},onExceed(){J.warning(this.$t("chat.message.uploadReferencesExceed"))},onError(){J.error(this.$t("chat.message.uploadReferencesError"))}}}),Je={class:"input-box"},Qe={class:"btn btn-upload"},Ye=["disabled","placeholder"],Xe={class:"info"};function Ze(e,t,a,m,k,o){const c=i("font-awesome-icon"),u=i("el-tooltip"),_=i("el-upload");return n(),d(I,null,[l("div",Je,[g(_,{"file-list":e.fileList,"onUpdate:file-list":t[0]||(t[0]=r=>e.fileList=r),class:q({upload:!0,disabled:!e.canUpload}),disabled:!e.canUpload,name:"file","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,headers:e.headers},{default:C(()=>[g(u,{class:"box-item",effect:"dark",content:e.$t("chat.message.uploadFile"),placement:"top"},{default:C(()=>[l("span",Qe,[g(c,{icon:"fa-solid fa-paperclip",class:"icon icon-attachment"})])]),_:1},8,["content"])]),_:1},8,["file-list","class","disabled","action","on-exceed","on-error","headers"]),l("span",{class:q({btn:!0,"btn-send":!0,disabled:!e.questionValue}),onClick:t[1]||(t[1]=(...r)=>e.onSubmit&&e.onSubmit(...r))},[g(c,{icon:"fa-solid fa-location-arrow",class:"icon icon-send"})],2),v(" add this textarea "),ce(l("textarea",{ref:"textarea","onUpdate:modelValue":t[2]||(t[2]=r=>e.questionValue=r),disabled:e.disabled,class:"input",placeholder:e.$t("chat.message.newMessagePlaceholder"),style:V({height:e.inputHeight}),onKeydown:t[3]||(t[3]=X(O((...r)=>e.onSubmit&&e.onSubmit(...r),["exact","prevent"]),["enter"])),onInput:t[4]||(t[4]=(...r)=>e.adjustTextareaHeight&&e.adjustTextareaHeight(...r))},null,44,Ye),[[ue,e.questionValue]])]),l("p",Xe,b(e.$t("chat.message.howToUse")),1)],64)}var et=E(xe,[["render",Ze],["__scopeId","data-v-020f4eb8"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/InputBox.vue"]]);const tt=S({name:"ModelSelector",components:{ElDropdown:Ee,ElDropdownMenu:Se,ElDropdownItem:Ie,FontAwesomeIcon:R},emits:["update:modelValue","select"],data(){return{options:[{icon:"fa-solid fa-bolt",color:"#ff9900",model:H},{icon:"fa-solid fa-bolt",color:"#ff9900",model:W},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:z},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:F},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:U}]}},computed:{model(){const e=this.$store.state.chat.model.name;return[H,W,z,F,U].find(a=>a.name===e)}},methods:{onCommandChange(e){this.$emit("select",e),this.$store.dispatch("chat/setModel",e)}}}),st={class:"selector"},ot={class:"name"},nt={class:"angle"},at={class:"item"},it={class:"info"},rt={class:"name"},lt={class:"description"};function dt(e,t,a,m,k,o){const c=i("font-awesome-icon"),u=i("el-dropdown-item"),_=i("el-dropdown-menu"),r=i("el-dropdown");return n(),d("div",st,[g(r,{trigger:"click","popper-class":"popper"},{dropdown:C(()=>[g(_,null,{default:C(()=>[(n(!0),d(I,null,D(e.options,(h,s)=>(n(),f(u,{key:s,onClick:w=>e.onCommandChange(h.model)},{default:C(()=>[l("div",at,[l("div",{class:"icon",style:V({color:h.color})},[g(c,{icon:h.icon},null,8,["icon"])],4),l("div",it,[l("p",rt,b(h.model.getDisplayName()),1),l("p",lt,b(h.model.getDescription()),1)])])]),_:2},1032,["onClick"]))),128))]),_:1})]),default:C(()=>{var h;return[l("div",null,[l("span",ot,b((h=e.model)==null?void 0:h.getDisplayName()),1),l("span",nt,[g(c,{icon:"fa-solid fa-angle-down"})])])]}),_:1})])}var ct=E(tt,[["render",dt],["__scopeId","data-v-358d65be"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/ModelSelector.vue"]]);const ut=S({name:"ConversationIntroductionItem",components:{FontAwesomeIcon:R},props:{content:{type:String,required:!0},icon:{type:String,required:!0},color:{type:String,default:"rgb(0, 0, 0)"}},data(){return{}},computed:{}}),pt={class:"item"},ht={class:"icon"},mt={class:"content"};function _t(e,t,a,m,k,o){const c=i("font-awesome-icon");return n(),d("div",pt,[l("div",ht,[g(c,{icon:e.icon,style:V({color:e.color})},null,8,["icon","style"])]),l("div",mt,b(e.content),1)])}var gt=E(ut,[["render",_t],["__scopeId","data-v-bc919b38"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/IntroductionItem.vue"]]);const ft=S({name:"ConversationIntroduction",components:{IntroductionItem:gt,ElRow:Ne,ElCol:De},emits:["draft"],data(){return{items:[{icon:"fa-solid fa-pen-nib",content:this.$t("chat.message.question1"),color:"rgb(226, 197, 65)"},{icon:"fa-solid fa-laptop-code",content:this.$t("chat.message.question2"),color:"rgb(203, 139, 208)"},{icon:"fa-solid fa-fan",content:this.$t("chat.message.question3"),color:"rgb(118, 208, 235)"},{icon:"fa-solid fa-plane-departure",content:this.$t("chat.message.question4"),color:"rgb(237, 98, 98)"}].sort(()=>Math.random()-.5)}},computed:{}}),$t={class:"introduction"};function yt(e,t,a,m,k,o){const c=i("introduction-item"),u=i("el-col"),_=i("el-row");return n(),d("div",$t,[g(_,{class:"items",justify:"center",gutter:15},{default:C(()=>[(n(!0),d(I,null,D(e.items,(r,h)=>(n(),f(u,{key:h,md:6,sm:12,xs:12},{default:C(()=>[g(c,{content:r.content,icon:r.icon,color:r.color,class:"cursor-pointer",onClick:s=>e.$emit("draft",r.content)},null,8,["content","icon","color","onClick"])]),_:2},1024))),128))]),_:1})])}var wt=E(ft,[["render",yt],["__scopeId","data-v-52040931"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/Introduction.vue"]]);const kt=S({name:"SidePanel",components:{ElInput:Ae,FontAwesomeIcon:R,ElSkeleton:Oe},props:{},emits:["click"],computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.id)==null?void 0:t.toString()},conversationGroups(){var c,u,_,r,h,s,w,$;const e=this.$store.state.chat.conversations,t=new Date;t.setHours(0,0,0,0);const a=new Date(t);a.setDate(a.getDate()-1);const m=new Date(t);m.setDate(m.getDate()-t.getDay());const k=new Date(m);k.setDate(k.getDate()-7);const o=e==null?void 0:e.reduce((p,y)=>{const M=new Date(y.updated_at*1e3);return M>=t?p.today.push(y):M>=a?p.yesterday.push(y):M>=m?p.thisWeek.push(y):p.earlier.push(y),p},{today:[],yesterday:[],thisWeek:[],earlier:[]});return A(A(A(A({},((c=o==null?void 0:o.today)==null?void 0:c.length)>0?{today:(u=o==null?void 0:o.today)==null?void 0:u.sort((p,y)=>y.updated_at-p.updated_at)}:{}),((_=o==null?void 0:o.yesterday)==null?void 0:_.length)>0?{yesterday:(r=o==null?void 0:o.yesterday)==null?void 0:r.sort((p,y)=>y.updated_at-p.updated_at)}:{}),((h=o==null?void 0:o.thisWeek)==null?void 0:h.length)>0?{thisWeek:(s=o==null?void 0:o.thisWeek)==null?void 0:s.sort((p,y)=>y.updated_at-p.updated_at)}:{}),((w=o==null?void 0:o.earlier)==null?void 0:w.length)>0?{earlier:($=o==null?void 0:o.earlier)==null?void 0:$.sort((p,y)=>y.updated_at-p.updated_at)}:{})},application(){return this.$store.state.chat.application},loading(){return this.$store.state.chat.status.getConversations===G.Request},token(){var e,t;return(t=(e=this.$store.state.chat)==null?void 0:e.credential)==null?void 0:t.token}},methods:{async onNewConversation(){this.$router.push({name:Q})},async onConfirm(e){const t=this.token;if(!t){console.error("Token is not found");return}e!=null&&e.deleting?(await L.deleteConversation(e.id,{token:t}),await this.$store.dispatch("chat/getConversations")):e!=null&&e.editing?(await L.updateConversation(e,{token:t}),await this.$store.dispatch("chat/getConversations")):e.editing=!0},onClick(e){!e||(this.$router.push({name:Y,params:{id:e}}),this.$emit("click",e))}}}),vt={class:"panel"},Ct={key:1,class:"conversations"},bt={class:"icons"},Et={class:"title"},St={class:"key"},It=["onClick"],Nt={class:"title"},Dt={key:0},At={key:1},Ot={key:2},Rt={class:"operations"};function Tt(e,t,a,m,k,o){const c=i("el-skeleton"),u=i("font-awesome-icon"),_=i("el-input");return n(),d("div",vt,[e.loading&&e.conversationGroups===void 0?(n(),f(c,{key:0})):(n(),d("div",Ct,[l("div",{class:"conversation",onClick:t[0]||(t[0]=(...r)=>e.onNewConversation&&e.onNewConversation(...r))},[l("div",bt,[g(u,{icon:"fa-solid fa-plus",class:"icon"})]),l("div",Et,b(e.$t("chat.message.startNewChat")),1)]),(n(!0),d(I,null,D(e.conversationGroups,(r,h)=>(n(),d("div",{key:h,class:"group"},[l("div",St,b(e.$t(`chat.group.${h}`)),1),(n(!0),d(I,null,D(r,(s,w)=>{var $;return n(),d("div",{key:w,class:q({conversation:!0,active:s.id===e.conversationId}),onClick:p=>e.onClick(s.id)},[l("div",Nt,[s!=null&&s.deleting?(n(),d("span",Dt,b(`${e.$t("chat.message.confirmDelete")}?`),1)):s!=null&&s.editing?(n(),d("span",At,[g(_,{modelValue:s.title,"onUpdate:modelValue":p=>s.title=p,onKeydown:X(p=>e.onConfirm(s),["enter"])},null,8,["modelValue","onUpdate:modelValue","onKeydown"])])):(s==null?void 0:s.title)||(s==null?void 0:s.messages)?(n(),d("span",Ot,b((s==null?void 0:s.title)||(($=s==null?void 0:s.messages[(s==null?void 0:s.messages.length)-1])==null?void 0:$.content)),1)):v("v-if",!0)]),l("div",Rt,[!(s!=null&&s.editing)&&!s.deleting?(n(),f(u,{key:0,icon:"fa-solid fa-edit",class:"icon icon-edit",onClick:O(p=>s.editing=!0,["stop"])},null,8,["onClick"])):v("v-if",!0),!(s!=null&&s.editing)&&!s.deleting?(n(),f(u,{key:1,icon:"fa-solid fa-trash",class:"icon icon-delete",onClick:O(p=>s.deleting=!0,["stop"])},null,8,["onClick"])):v("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(n(),f(u,{key:2,icon:"fa-solid fa-check",class:"icon icon-confirm",onClick:O(p=>e.onConfirm(s),["stop"])},null,8,["onClick"])):v("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(n(),f(u,{key:3,icon:"fa-solid fa-xmark",class:"icon icon-cancel",onClick:O(p=>{s.editing=!1,s.deleting=!1},["stop"])},null,8,["onClick"])):v("v-if",!0)])],10,It)}),128))]))),128))]))])}var qt=E(kt,[["render",Tt],["__scopeId","data-v-d866c834"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/SidePanel.vue"]]);const Mt=S({name:"LayoutChat",components:{SidePanel:qt,ElDrawer:Re,ElButton:te,FontAwesomeIcon:R},data(){return{drawer:!1}}}),Ut={class:"main"},Gt={class:"side"},Lt={class:"chat"};function Vt(e,t,a,m,k,o){const c=i("side-panel"),u=i("font-awesome-icon"),_=i("el-button"),r=i("el-drawer");return n(),d("div",Ut,[l("div",Gt,[K(e.$slots,"side",{},()=>[g(c)],!0)]),l("div",Lt,[K(e.$slots,"chat",{},void 0,!0)]),g(_,{round:"",class:"menu",onClick:t[0]||(t[0]=h=>e.drawer=!0)},{default:C(()=>[g(u,{icon:"fa-solid fa-bars",class:"icon-menu"})]),_:1}),g(r,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=h=>e.drawer=h),"with-header":!1,size:"290px",class:"drawer"},{default:C(()=>[g(c)]),_:1},8,["modelValue"])])}var Bt=E(Mt,[["render",Vt],["__scopeId","data-v-8d7a06d2"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Chat.vue"]]);const Pt=S({name:"ChatConversation",components:{InputBox:et,Introduction:wt,ModelSelector:ct,Message:Ke,ApplicationStatus:$e,Layout:Bt},data(){var e,t;return{question:"",references:[],answering:!1,messages:((t=(e=this.$store.state.chat.conversations)==null?void 0:e.find(a=>{var m;return a.id===((m=this.$route.params.id)==null?void 0:m.toString())}))==null?void 0:t.messages)||[]}},computed:{model(){return this.$store.state.chat.model},conversationId(){var e;return(e=this.$route.params.id)==null?void 0:e.toString()},conversation(){var e;return(e=this.$store.state.chat.conversations)==null?void 0:e.find(t=>t.id===this.conversationId)},service(){return this.$store.state.chat.service},application(){return this.$store.state.chat.application},credential(){var e;return(e=this.$store.state.chat)==null?void 0:e.credential},needApply(){return this.$store.state.chat.status.getApplication===G.Success&&!this.application},conversations(){return this.$store.state.chat.conversations},initializing(){return this.$store.state.chat.status.getApplication===G.Request}},watch:{model(e){e&&this.onModelChanged()},conversationId(e){var t,a;e?(this.messages=((a=(t=this.conversations)==null?void 0:t.find(m=>m.id===e))==null?void 0:a.messages)||[],this.onScrollDown()):this.messages=[]}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onGetConversations(),await this.onScrollDown()},methods:{async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("chat/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("chat/getApplication"),console.debug("end onGetApplication")},async onGetConversations(){console.debug("start onGetConversations"),await this.$store.dispatch("chat/getConversations"),console.debug("end onGetConversations")},async onDraft(e){this.question=e,this.onSubmit()},async onCreateNewConversation(){await this.$router.push({name:Q})},async onModelChanged(){await this.onCreateNewConversation(),await this.$store.dispatch("chat/getApplication")},async onSubmit(){if(this.references.length>0){let e=[];e.push({type:"text",text:this.question});for(let t=0;t<this.references.length;t++)e.push({type:"image_url",image_url:this.references[t]});this.messages.push({content:e,role:j})}else this.messages.push({content:this.question,role:j});console.debug("onSubmit",this.question,this.references),await this.onFetchAnswer()},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".dialogue");!e||!this.messages||this.messages.length===0||(e.scrollTop=e==null?void 0:e.scrollHeight)},0)},async onFetchAnswer(){var k;const e=(k=this.credential)==null?void 0:k.token,t=this.question,a=this.references;if(console.debug("validated",t,a),this.question="",this.references=[],!e||!t){console.error("no token or endpoint or question"),this.messages.push({error:{code:ee},role:T,state:N.FAILED});return}let m=this.conversationId;this.messages.push({content:"",role:T,state:N.PENDING}),console.debug("start to get answer",this.messages),this.onScrollDown(),this.answering=!0,L.chatConversation({question:t,model:this.model.name,references:a,id:this.conversationId,stateful:!0},{token:e,stream:o=>{console.debug("stream response",o),this.messages[this.messages.length-1]={role:T,content:o.answer,state:N.ANSWERING},m=o==null?void 0:o.id,this.onScrollDown()}}).then(async()=>{console.debug("finished fetch answer",this.messages),this.messages[this.messages.length-1].state=N.FINISHED,await this.$store.dispatch("chat/setConversation",{id:m,messages:this.messages}),this.answering=!1,this.conversationId||await this.$router.push({name:Y,params:{id:m}}),this.onScrollDown(),await this.$store.dispatch("chat/getConversations"),await this.$store.dispatch("chat/getApplication")}).catch(o=>{var c,u;if(this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].state=N.FAILED),console.error(o),ae.isCancel(o))this.messages[this.messages.length-1].error={code:ye};else if((c=o==null?void 0:o.response)!=null&&c.data){let _=(u=o==null?void 0:o.response)==null?void 0:u.data;Te(_)&&(_=JSON.parse(_)),console.debug("error",_),this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error=_.error)}else this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error={code:Z});this.answering=!1})}}}),Ht={class:"dialogue"},Wt={key:1,class:"messages"},zt={class:"bottom"};function Ft(e,t,a,m,k,o){const c=i("model-selector"),u=i("application-status"),_=i("introduction"),r=i("message"),h=i("input-box"),s=i("layout");return n(),f(s,null,{chat:C(()=>[g(c,{class:"selector"}),g(u,{initializing:e.initializing,application:e.application,"need-apply":e.needApply,service:e.service,onRefresh:t[0]||(t[0]=w=>e.$store.dispatch("chat/getApplication"))},null,8,["initializing","application","need-apply","service"]),l("div",Ht,[e.messages.length===0?(n(),f(_,{key:0,onDraft:e.onDraft},null,8,["onDraft"])):(n(),d("div",Wt,[(n(!0),d(I,null,D(e.messages,(w,$)=>(n(),f(r,{key:$,message:w,application:e.application,class:"message"},null,8,["message","application"]))),128))]))]),l("div",zt,[g(h,{disabled:e.answering,question:e.question,references:e.references,"onUpdate:question":t[1]||(t[1]=w=>e.question=w),"onUpdate:references":t[2]||(t[2]=w=>e.references=w),onSubmit:e.onSubmit},null,8,["disabled","question","references","onSubmit"])])]),_:1})}var as=E(Pt,[["render",Ft],["__scopeId","data-v-3ab2fb26"],["__file","/home/runner/work/Nexior/Nexior/src/pages/chat/Conversation.vue"]]);export{as as default};
@@ -1 +0,0 @@
1
- import{I as L}from"./vendor-others.decd85ac.js";import{L as F}from"./Chatdoc.8252e87e.js";import{$ as P,a0 as b,a1 as A,_ as k,y as N,H as v,K as H}from"./index.b7b7827f.js";import{a as K}from"./vendor-axios.168e6950.js";import{M as z,E as T,a as q,b as G,c as W,d as Q,e as J,f as j,g as O,A as Y,h as X}from"./Status.783dce6a.js";import{i as Z}from"./is.dd611415.js";import{ai as D}from"./vendor-fortawesome.35fae32b.js";import{N as V,A as x,C as ee,i as se}from"./vendor-element-plus.eeef3ee7.js";import{H as E,al as l,o,e as c,L as h,f as i,V as m,U as I,W as R,ai as M,Q as S,as as U,S as f,$ as w,M as B,T as te}from"./vendor-@vue.31495dbd.js";import{C as oe}from"./CopyToClipboard.3cfde0c6.js";import"./application.ea1e2a72.js";import"./vendor-markdown.95c097e3.js";import"./vendor-highlight.js.19da0c9f.js";var $=(e=>(e.PENDING="pending",e.ANSWERING="answering",e.FINISHED="finished",e.FAILED="failed",e))($||{});const ie=E({name:"SidePanel",components:{ElInput:V,FontAwesomeIcon:D,ElSkeleton:x},props:{},emits:["click"],computed:{repositoryId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.repositoryId)==null?void 0:t.toString()},conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.conversationId)==null?void 0:t.toString()},repository(){var e,t,n;return(n=(t=(e=this.$store.state)==null?void 0:e.chatdoc)==null?void 0:t.repositories)==null?void 0:n.find(d=>d.id===this.repositoryId)},conversations(){var e;return(e=this.repository)==null?void 0:e.conversations},application(){return this.$store.state.chatdoc.application}},methods:{async onNewConversation(){this.$router.push({name:P,params:{repositoryId:this.repositoryId}})},async onConfirm(e){e!=null&&e.deleting?(await b.deleteConversation(e.id),await this.$store.dispatch("chat/getConversations")):e!=null&&e.editing?(await b.updateConversation(e),await this.$store.dispatch("chat/getConversations")):e.editing=!0},onClick(e){!e||(this.$router.push({name:A,params:{repositoryId:this.repositoryId,conversationId:e}}),this.$emit("click",e))}}}),ne={class:"panel"},ae={key:1,class:"conversations"},re={class:"icons"},le={class:"title"},de=["onClick"],ce={class:"icons"},ue={class:"title"},pe={key:0},he={key:1},me={key:2},_e={class:"operations"};function ge(e,t,n,d,r,y){const u=l("el-skeleton"),a=l("font-awesome-icon"),_=l("el-input");return o(),c("div",ne,[e.conversations===void 0?(o(),h(u,{key:0})):(o(),c("div",ae,[i("div",{class:"conversation",onClick:t[0]||(t[0]=(...s)=>e.onNewConversation&&e.onNewConversation(...s))},[i("div",re,[m(a,{icon:"fa-solid fa-plus",class:"icon"})]),i("div",le,I(e.$t("chatdoc.message.startNewChat")),1)]),(o(!0),c(R,null,M(e.conversations,(s,C)=>{var p;return o(),c("div",{key:C,class:S({conversation:!0,active:s.id===e.conversationId}),onClick:g=>e.onClick(s.id)},[i("div",ce,[m(a,{icon:"fa-regular fa-comment",class:"icon"})]),i("div",ue,[s!=null&&s.deleting?(o(),c("span",pe,I(`${e.$t("chatdoc.message.confirmDelete")}?`),1)):s!=null&&s.editing?(o(),c("span",he,[m(_,{modelValue:s.title,"onUpdate:modelValue":g=>s.title=g,onKeydown:U(g=>e.onConfirm(s),["enter"])},null,8,["modelValue","onUpdate:modelValue","onKeydown"])])):(s==null?void 0:s.title)||(s==null?void 0:s.messages)?(o(),c("span",me,I((s==null?void 0:s.title)||((p=s==null?void 0:s.messages[(s==null?void 0:s.messages.length)-1])==null?void 0:p.content)),1)):f("v-if",!0)]),i("div",_e,[!(s!=null&&s.editing)&&!s.deleting?(o(),h(a,{key:0,icon:"fa-solid fa-edit",class:"icon icon-edit",onClick:w(g=>s.editing=!0,["stop"])},null,8,["onClick"])):f("v-if",!0),!(s!=null&&s.editing)&&!s.deleting?(o(),h(a,{key:1,icon:"fa-solid fa-trash",class:"icon icon-delete",onClick:w(g=>s.deleting=!0,["stop"])},null,8,["onClick"])):f("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(o(),h(a,{key:2,icon:"fa-solid fa-check",class:"icon icon-confirm",onClick:w(g=>e.onConfirm(s),["stop"])},null,8,["onClick"])):f("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(o(),h(a,{key:3,icon:"fa-solid fa-xmark",class:"icon icon-cancel",onClick:w(g=>{s.editing=!1,s.deleting=!1},["stop"])},null,8,["onClick"])):f("v-if",!0)])],10,de)}),128))]))])}var fe=k(ie,[["render",ge],["__scopeId","data-v-2282a6e1"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/Conversations.vue"]]);const ye=E({name:"AnsweringMark",data(){return{}},computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.conversationId)==null?void 0:t.toString()}}}),$e={class:"mark"};function Ce(e,t,n,d,r,y){return o(),c("div",$e)}var we=k(ye,[["render",Ce],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/AnsweringMark.vue"]]);const Ie=E({name:"Message",components:{CopyToClipboard:oe,AnsweringMark:we,MarkdownRenderer:z,ElAlert:ee,ElButton:se},props:{message:{type:Object,required:!0}},emits:["stop"],data(){return{copied:!1,messageState:$}},computed:{errorText(){var e,t;if(!(!this.message.error||!((e=this.message.error)!=null&&e.code)))switch((t=this.message.error)==null?void 0:t.code){case O:return this.$t("chatdoc.message.errorUsedUp");case j:return this.$t("chatdoc.message.errorApiError");case J:return this.$t("chatdoc.message.errorBadRequest");case Q:return this.$t("chatdoc.message.errorTimeout");case W:return this.$t("chatdoc.message.errorTooManyRequests");case G:return this.$t("chatdoc.message.errorContentTooLarge");case q:return this.$t("chatdoc.message.errorNotApplied");case T:default:return this.$t("chatdoc.message.errorUnknown")}},showBuyMore(){var e;return this.message.role===N&&((e=this.message.error)==null?void 0:e.code)===O}},methods:{onCopy(){L(this.message.content.toString(),{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)},onBuyMore(){}}}),ke=["role"],Ee={class:"content"},Ne={class:"operations"};function Re(e,t,n,d,r,y){var p;const u=l("markdown-renderer"),a=l("answering-mark"),_=l("copy-to-clipboard"),s=l("el-alert"),C=l("el-button");return o(),c(R,null,[i("div",{class:S({message:!0,[e.message.role]:!0,hidden:e.errorText&&e.message.role==="assistant"}),role:e.message.role},[i("div",Ee,[m(u,{content:(p=e.message)==null?void 0:p.content},null,8,["content"]),e.message.state===e.messageState.PENDING?(o(),h(a,{key:0})):f("v-if",!0)]),i("div",Ne,[m(_,{content:e.message.content,class:"btn-copy"},null,8,["content"])])],10,ke),e.errorText?(o(),h(s,{key:0,class:"error",title:e.errorText,type:"error",closable:!1},null,8,["title"])):f("v-if",!0),e.showBuyMore?(o(),h(C,{key:1,round:"",type:"primary",class:"btn btn-buy",size:"small",onClick:e.onBuyMore},{default:B(()=>[te(I(e.$t("common.button.buyMore")),1)]),_:1},8,["onClick"])):f("v-if",!0)],64)}var be=k(Ie,[["render",Re],["__scopeId","data-v-95a62450"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/Message.vue"]]);const Se=E({name:"InputBox",components:{ElInput:V,FontAwesomeIcon:D},props:{disabled:{type:Boolean,required:!1,default:!1},question:{type:String,required:!0}},emits:["update:question","submit"],data(){return{questionValue:this.question,fileList:[]}},computed:{model(){return this.$store.state.chat.model}},watch:{questionValue(e){this.$emit("update:question",e)},question(e){e!==this.questionValue&&(this.questionValue=e)},references(e){e.length===0&&(this.fileList=[])}},methods:{onSubmit(){!this.question||this.$emit("submit")}}}),ve={class:"input-box"},Oe={class:"info"};function Ae(e,t,n,d,r,y){const u=l("font-awesome-icon"),a=l("el-input");return o(),c(R,null,[i("div",ve,[i("span",{class:S({btn:!0,"btn-send":!0,disabled:!e.question}),onClick:t[0]||(t[0]=(..._)=>e.onSubmit&&e.onSubmit(..._))},[m(u,{icon:"fa-solid fa-location-arrow",class:"icon icon-send"})],2),m(a,{modelValue:e.questionValue,"onUpdate:modelValue":t[1]||(t[1]=_=>e.questionValue=_),disabled:e.disabled,class:"input",type:"textarea",placeholder:e.$t("chat.message.newMessagePlaceholder"),onKeydown:U(w(e.onSubmit,["exact","prevent"]),["enter"])},null,8,["modelValue","disabled","placeholder","onKeydown"])]),i("p",Oe,I(e.$t("chat.message.howToUse")),1)],64)}var Te=k(Se,[["render",Ae],["__scopeId","data-v-7ed35c20"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/InputBox.vue"]]);const qe=E({name:"ChatdocConversation",components:{Layout:F,Conversations:fe,Message:be,InputBox:Te,ApplicationStatus:Y},data(){return{loading:!1,repositoryId:this.$route.params.repositoryId.toString(),answering:!1,question:""}},computed:{messages:{get(){var e,t;return((t=(e=this.conversations)==null?void 0:e.find(n=>{var d;return n.id===((d=this.$route.params.conversationId)==null?void 0:d.toString())}))==null?void 0:t.messages)||[]},set(e){console.debug("set messages",e)}},repository(){var e,t,n;return(n=(t=(e=this.$store.state)==null?void 0:e.chatdoc)==null?void 0:t.repositories)==null?void 0:n.find(d=>d.id===this.repositoryId)},conversations(){var e;return(e=this.repository)==null?void 0:e.conversations},conversationId(){var e;return(e=this.$route.params.conversationId)==null?void 0:e.toString()},application(){return this.$store.state.chatdoc.application},credential(){return this.$store.state.chatdoc.credential},needApply(){return this.$store.state.chatdoc.status.getApplication===v.Success&&!this.application},initializing(){return this.$store.state.chatdoc.status.getApplication===v.Request},service(){return this.$store.state.chatdoc.service}},async mounted(){console.debug("start get conversations"),this.loading=!0,this.$store.dispatch("chatdoc/getConversations",{repositoryId:this.repositoryId}).finally(()=>{this.loading=!1})},methods:{async onSubmit(){this.messages.push({content:this.question,role:H}),await this.onFetchAnswer()},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".dialogue");!e||!this.messages||this.messages.length===0||(e.scrollTop=e==null?void 0:e.scrollHeight)},0)},async onFetchAnswer(){var d;const e=(d=this.credential)==null?void 0:d.token,t=this.question;if(console.debug(this.onFetchAnswer,"validated",t),this.question="",!e||!t){console.error("no token or endpoint or question"),this.messages.push({error:{code:q},role:N,state:$.FAILED});return}let n=this.conversationId;this.messages.push({content:"",role:N,state:$.PENDING}),console.debug("start to get answer",this.messages),this.onScrollDown(),this.answering=!0,b.chatConversation({repositoryId:this.repositoryId,question:t,id:this.conversationId},{token:e,stream:r=>{this.messages[this.messages.length-1]={role:N,content:r.answer,state:$.ANSWERING},n=r.id,this.onScrollDown()}}).then(async()=>{console.debug("finished fetch answer"),this.messages[this.messages.length-1].state=$.FINISHED,await this.$store.dispatch("chatdoc/setConversation",{id:n,messages:this.messages,repositoryId:this.repositoryId}),this.answering=!1,this.conversationId||(console.debug("push to conversation",n),await this.$router.push({name:A,params:{conversationId:n,repositoryId:this.repositoryId}})),this.onScrollDown(),await this.$store.dispatch("chatdoc/getConversations",{repositoryId:this.repositoryId})}).catch(r=>{var y,u;if(this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].state=$.FAILED),console.error(r),K.isCancel(r))this.messages[this.messages.length-1].error={code:X};else if((y=r==null?void 0:r.response)!=null&&y.data){let a=(u=r==null?void 0:r.response)==null?void 0:u.data;Z(a)&&(a=JSON.parse(a)),this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error=a.error)}else this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error={code:T});this.answering=!1})}}}),De={class:"wrapper"},Ve={class:"chat"},Me={class:"status"},Ue={class:"dialogue"},Be={class:"messages"},Le={class:"bottom"};function Fe(e,t,n,d,r,y){const u=l("conversations"),a=l("application-status"),_=l("message"),s=l("input-box"),C=l("layout");return o(),h(C,null,{chatdoc:B(()=>[i("div",De,[m(u,{class:"side"}),i("div",Ve,[i("div",Me,[m(a,{"show-price":!1,initializing:e.initializing,application:e.application,"need-apply":e.needApply,service:e.service,onRefresh:t[0]||(t[0]=p=>e.$store.dispatch("chatdoc/getApplication"))},null,8,["initializing","application","need-apply","service"])]),i("div",Ue,[i("div",Be,[(o(!0),c(R,null,M(e.messages,(p,g)=>(o(),h(_,{key:g,message:p,class:"message"},null,8,["message"]))),128))])]),i("div",Le,[m(s,{disabled:e.answering,question:e.question,"onUpdate:question":t[1]||(t[1]=p=>e.question=p),onSubmit:e.onSubmit},null,8,["disabled","question","onSubmit"])])])])]),_:1})}var es=k(qe,[["render",Fe],["__scopeId","data-v-24089614"],["__file","/home/runner/work/Nexior/Nexior/src/pages/chatdoc/Conversation.vue"]]);export{es as default};
@@ -1 +0,0 @@
1
- import{I as p}from"./vendor-others.decd85ac.js";import{ai as r}from"./vendor-fortawesome.35fae32b.js";import{_ as i}from"./index.b7b7827f.js";import{q as s}from"./vendor-element-plus.eeef3ee7.js";import{H as l,al as t,o as n,L as a,M as m,V as d}from"./vendor-@vue.31495dbd.js";const _=l({name:"CopyToClipboard",components:{FontAwesomeIcon:r,ElTooltip:s},props:{content:{type:String,required:!0}},data(){return{copied:!1}},methods:{onCopy(){p(this.content,{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)}}});function f(o,u,C,y,k,b){const e=t("font-awesome-icon"),c=t("el-tooltip");return o.copied?(n(),a(c,{key:1,visible:o.copied,effect:"dark",content:o.$t("common.message.copied"),placement:"top-start"},{default:m(()=>[d(e,{icon:"fa-solid fa-check",class:"icon-check"})]),_:1},8,["visible","content"])):(n(),a(e,{key:0,icon:"fa-regular fa-copy",class:"icon-copy",onClick:o.onCopy},null,8,["onClick"]))}var $=i(_,[["render",f],["__scopeId","data-v-1ba27772"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/CopyToClipboard.vue"]]);export{$ as C};
@@ -1 +0,0 @@
1
- var b=Object.defineProperty,y=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var m=(e,o,t)=>o in e?b(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,p=(e,o)=>{for(var t in o||(o={}))V.call(o,t)&&m(e,t,o[t]);if(u)for(var t of u(o))B.call(o,t)&&m(e,t,o[t]);return e},_=(e,o)=>y(e,D(o));import{B as v,z as x}from"./vendor-others.decd85ac.js";import{S as N,s as O,g as h,_ as f}from"./index.b7b7827f.js";import{r as g,s as H,t as M}from"./vendor-element-plus.eeef3ee7.js";import{H as C,al as l,o as s,L as i,M as c,V as L,e as T,ai as q,W as A}from"./vendor-@vue.31495dbd.js";import{h as I,C as P,a as k}from"./vendor-vue-dark-switch.81063cc1.js";const U=C({name:"LocaleSelector",components:{ElDialog:g,ElSelect:H,ElOption:M},props:{visible:{type:Boolean,default:!1}},emits:["close"],data(){return{value:this.$i18n.locale,locales:N}},methods:{async onSelectLocale(e){this.$router.push({query:_(p({},this.$route.query),{locale:void 0})}),await O(e),this.setCookie(e),window.location.reload()},setCookie(e){v("LOCALE",e,{path:"/",domain:h()})}}});function z(e,o,t,$,w,E){const n=l("el-option"),r=l("el-select"),d=l("el-dialog");return s(),i(d,{"model-value":e.visible,width:300,class:"text-center",onClose:o[1]||(o[1]=a=>e.$emit("close"))},{default:c(()=>[L(r,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=a=>e.value=a),onChange:e.onSelectLocale},{default:c(()=>[(s(!0),T(A,null,q(e.locales,(a,S)=>(s(),i(n,{key:S,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["model-value"])}var X=f(U,[["render",z],["__scopeId","data-v-32a102bd"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/LocaleSelector.vue"]]);const F=C({components:{DarkSwitch:I,ElDialog:g},props:{visible:{type:Boolean,default:!0}},emits:["update:dark","close"],computed:{dark(){return x("THEME")==="dark"},switchValue(){return P.value}},watch:{switchValue(e){this.setCookie(e)},dark(e){document.documentElement.classList.toggle("dark",e),this.setCookie(this.dark)}},mounted(){this.dark?(k(!0),document.documentElement.classList.add("dark")):(k(!1),document.documentElement.classList.remove("dark"))},methods:{setCookie(e){v("THEME",e?"dark":"light",{path:"/",domain:h()})}}});function R(e,o,t,$,w,E){const n=l("dark-switch"),r=l("el-dialog");return s(),i(r,{"model-value":e.visible,width:200,class:"text-center",onClose:o[0]||(o[0]=d=>e.$emit("close"))},{default:c(()=>[L(n,{class:"switch","dark-background":"#333","light-background":"#fff"})]),_:1},8,["model-value"])}var Y=f(F,[["render",R],["__file","/home/runner/work/Nexior/Nexior/src/components/common/DarkSelector.vue"]]);export{Y as D,X as L};
@@ -1 +0,0 @@
1
- import"./vendor-others.decd85ac.js";import{o as w}from"./order.67692924.js";import{_ as V}from"./index.b7b7827f.js";import{O as P}from"./order.1bf5c3a2.js";import{Q as Y}from"./vendor-qrcode.93be07bd.js";import{r as z,b as H,a as U,i as Z,n as x,A as ee,B as re,C as ae,D as te,F as oe}from"./vendor-element-plus.eeef3ee7.js";import{H as D,al as l,o as t,L as c,M as r,V as a,f as m,S as n,U as i,aK as L,aL as Q,e as p,W as se,T as v,Q as j}from"./vendor-@vue.31495dbd.js";import{I as ie}from"./application.ea1e2a72.js";import{g as le}from"./price.cf991d37.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.35fae32b.js";const de=D({name:"PayOrderDialog",components:{ElDialog:z,QrCode:Y,ElRow:H,ElCol:U},props:{modelValue:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:["hide","update:modelValue"],data(){return{refreshTimer:void 0}},mounted(){this.onRefresh()},unmounted(){this.refreshTimer&&clearTimeout(this.refreshTimer)},methods:{onRefresh(){if(!this.modelValue.id){console.error("id does not exist");return}w.refresh(this.modelValue.id).then(({data:e})=>{e.state!==P.PAID?setTimeout(()=>{this.onRefresh()},2e3):this.$emit("hide"),this.$emit("update:modelValue",e)}).catch(()=>{setTimeout(()=>{this.onRefresh()},2e3)})}}}),ne=e=>(L("data-v-875060be"),e=e(),Q(),e),pe={class:"paycode wechat"},ue={class:"help-text"},ye=ne(()=>m("div",{class:"help-img"},[m("img",{src:"https://midas.gtimg.cn/enterprise/images/ep_sys_wx_tip.jpg"})],-1));function ce(e,o,I,E,T,C){const u=l("qr-code"),f=l("el-col"),k=l("el-row"),W=l("el-dialog");return t(),c(W,{"model-value":e.visible,title:e.$t("application.title.buyService"),width:"500px",center:""},{default:r(()=>[a(k,{class:"paycodes"},{default:r(()=>[a(f,{span:12},{default:r(()=>{var h,g;return[m("div",pe,[(h=e.modelValue)!=null&&h.pay_url?(t(),c(u,{key:0,value:(g=e.modelValue)==null?void 0:g.pay_url,size:200,class:"qrcode m-auto"},null,8,["value"])):n("v-if",!0),m("p",ue,i(e.$t("order.message.wechatPayHelp")),1)])]}),_:1}),a(f,{span:12},{default:r(()=>[ye]),_:1})]),_:1})]),_:1},8,["model-value","title"])}var me=V(de,[["render",ce],["__scopeId","data-v-875060be"],["__file","/home/runner/work/Nexior/Nexior/src/components/order/WechatPay.vue"]]);const fe=D({name:"PayOrderDialog",components:{ElDialog:z},props:{modelValue:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:["hide","update:modelValue"],data(){return{refreshTimer:void 0}},watch:{visible:{handler(e){e&&this.modelValue.pay_url&&window.open(this.modelValue.pay_url,"_blank")}}},mounted(){this.onRefresh()},unmounted(){this.refreshTimer&&clearTimeout(this.refreshTimer)},methods:{onRefresh(){if(!this.modelValue.id){console.error("id does not exist");return}w.refresh(this.modelValue.id).then(({data:e})=>{e.state!==P.PAID?setTimeout(()=>{this.onRefresh()},2e3):this.$emit("hide"),this.$emit("update:modelValue",e)}).catch(()=>{setTimeout(()=>{this.onRefresh()},5e3)})}}}),he={class:"text-center"};function _e(e,o,I,E,T,C){const u=l("el-dialog");return t(),c(u,{"model-value":e.visible,title:e.$t("application.title.buyService"),width:"500px",center:""},{default:r(()=>[m("p",he,i(e.$t("order.message.buyInExternalUrl")),1)]),_:1},8,["model-value","title"])}var ve=V(fe,[["render",_e],["__scopeId","data-v-85959ecc"],["__file","/home/runner/work/Nexior/Nexior/src/components/order/StripePay.vue"]]);var G=(e=>(e.WechatPay="WechatPay",e.Stripe="Stripe",e.AliPay="AliPay",e))(G||{});const $e=D({name:"ConsoleOrderDetail",components:{ElButton:Z,ElRow:H,ElCard:x,ElCol:U,ElSkeleton:ee,ElDivider:re,ElAlert:ae,ElDescriptions:te,ElDescriptionsItem:oe,WechatPayOrder:me,StripePayOrder:ve},data(){return{PayWay:G,payWay:"WechatPay",OrderState:P,order:void 0,showPayWays:!0,loading:!1,paying:!1,prepaying:!1,applicationType:ie}},computed:{id(){var e,o;return(o=(e=this.$route.params)==null?void 0:e.id)==null?void 0:o.toString()},redirect(){var e;return(e=this.$route.query)==null?void 0:e.redirect}},watch:{order:{handler(e){if((e==null?void 0:e.state)===P.PAID){setTimeout(()=>{var o;this.redirect&&window.location.replace((o=this.redirect)==null?void 0:o.toString())},2e3);return}},deep:!0}},mounted(){this.onFetchData()},methods:{getPriceString:le,onFetchData(){this.loading=!0,w.refresh(this.id).then(({data:e})=>{this.order=e,e.pay_way&&(this.payWay=e.pay_way),this.loading=!1}).catch(()=>{this.loading=!1})},onRepay(){this.paying=!0},onPay(){this.prepaying=!0,w.pay(this.id,{pay_way:this.payWay}).then(({data:e})=>{this.prepaying=!1,this.order=e,this.order.price&&this.order.price>0&&(this.paying=!0)}).catch(()=>{this.prepaying=!1})}}}),K=e=>(L("data-v-2d1dc98e"),e=e(),Q(),e),ge={class:"title"},be={key:0,class:"pt-5"},we={key:1,class:"order"},Pe={key:0},ke={key:1},We={key:0,class:"price unfree"},Se={key:1,class:"price free"},Ve={key:0,class:"payways mb-6"},De=K(()=>m("span",{class:"payicon wechatpay"},null,-1)),Ie={class:"payname"},Ee=K(()=>m("span",{class:"payicon stripe"},null,-1)),Te={class:"payname"},Ce={key:1},Oe={key:2};function Ne(e,o,I,E,T,C){const u=l("el-col"),f=l("el-row"),k=l("el-skeleton"),W=l("copy-to-clipboard"),h=l("el-descriptions-item"),g=l("el-descriptions"),S=l("el-divider"),O=l("el-alert"),N=l("el-button"),M=l("el-card"),X=l("wechat-pay-order"),J=l("stripe-pay-order");return t(),p(se,null,[a(f,{class:"panel"},{default:r(()=>[a(u,{span:24},{default:r(()=>[a(f,null,{default:r(()=>[a(u,{span:24},{default:r(()=>[m("h2",ge,i(e.$t("order.title.info")),1)]),_:1})]),_:1}),a(f,null,{default:r(()=>[a(u,{span:24},{default:r(()=>[a(M,{shadow:"hover"},{default:r(()=>{var _,R,A,q;return[a(f,null,{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>[e.loading?(t(),p("div",be,[a(k,{animated:""})])):(t(),p("div",we,[a(g,{column:1},{default:r(()=>{var $,b,B;return[a(h,{label:e.$t("order.field.id")},{default:r(()=>{var s,d,y;return[m("span",null,i((s=e.order)==null?void 0:s.id),1),(d=e.order)!=null&&d.id?(t(),c(W,{key:0,content:(y=e.order)==null?void 0:y.id,class:"inline-block"},null,8,["content"])):n("v-if",!0)]}),_:1},8,["label"]),a(h,{label:e.$t("order.field.description")},{default:r(()=>{var s;return[v(i((s=e.order)==null?void 0:s.description),1)]}),_:1},8,["label"]),(b=($=e.order)==null?void 0:$.application)!=null&&b.service?(t(),c(h,{key:0,label:e.$t("order.field.api")},{default:r(()=>{var s,d,y;return[v(i((y=(d=(s=e.order)==null?void 0:s.application)==null?void 0:d.service)==null?void 0:y.title),1)]}),_:1},8,["label"])):n("v-if",!0),(B=e.order)!=null&&B.pay_way?(t(),c(h,{key:1,label:e.$t("order.field.payWay")},{default:r(()=>{var s,d;return[((s=e.order)==null?void 0:s.pay_way)===e.PayWay.WechatPay?(t(),p("span",Pe,i(e.$t("order.title.wechatPay")),1)):n("v-if",!0),((d=e.order)==null?void 0:d.pay_way)===e.PayWay.Stripe?(t(),p("span",ke,i(e.$t("order.title.stripe")),1)):n("v-if",!0)]}),_:1},8,["label"])):n("v-if",!0),a(h,{label:e.$t("order.field.amount")},{default:r(()=>{var s,d,y,F;return[v(i((s=e.order)==null?void 0:s.amount)+" "+i(e.$t(`service.unit.${(F=(y=(d=e.order)==null?void 0:d.application)==null?void 0:y.service)==null?void 0:F.unit}`)),1)]}),_:1},8,["label"]),a(h,{label:e.$t("order.field.createdAt")},{default:r(()=>{var s;return[v(i(e.$dayjs.format((s=e.order)==null?void 0:s.created_at)),1)]}),_:1},8,["label"]),a(h,{label:e.$t("order.field.price")},{default:r(()=>{var s,d,y;return[((s=e.order)==null?void 0:s.price)&&((d=e.order)==null?void 0:d.price)>0?(t(),p("span",We,i(e.getPriceString({value:(y=e.order)==null?void 0:y.price})),1)):(t(),p("span",Se,i(e.$t("order.message.free")),1))]}),_:1},8,["label"])]}),_:1})]))]),_:1})]),_:1}),((_=e.order)==null?void 0:_.state)===e.OrderState.PAID?(t(),c(f,{key:0,class:"mb-5"},{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>[a(S,{"border-style":"dashed"}),a(O,{title:e.$t("order.message.paidSuccessfully"),type:"success","show-icon":"",closable:!1},null,8,["title"])]),_:1})]),_:1})):n("v-if",!0),((R=e.order)==null?void 0:R.state)===e.OrderState.EXPIRED?(t(),c(f,{key:1,class:"mb-5"},{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>[a(S,{"border-style":"dashed"}),a(O,{title:e.$t("order.message.orderExpired"),type:"error","show-icon":"",closable:!1},null,8,["title"])]),_:1})]),_:1})):n("v-if",!0),((A=e.order)==null?void 0:A.state)===e.OrderState.PENDING||((q=e.order)==null?void 0:q.state)===e.OrderState.FAILED?(t(),c(f,{key:2},{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>{var $;return[a(S,{"border-style":"dashed"}),e.showPayWays&&e.order.price&&e.order.price>0&&!e.order.pay_way?(t(),p("div",Ve,[(t(),p("div",{key:0,class:j({payway:!0,wechatpay:!0,active:e.payWay===e.PayWay.WechatPay}),onClick:o[0]||(o[0]=b=>e.payWay=e.PayWay.WechatPay)},[De,m("span",Ie,i(e.$t("order.title.wechatPay")),1)],2)),n("v-if",!0),(t(),p("div",{key:2,class:j({payway:!0,stripe:!0,active:e.payWay===e.PayWay.Stripe}),onClick:o[2]||(o[2]=b=>e.payWay=e.PayWay.Stripe)},[Ee,m("span",Te,i(e.$t("order.title.stripe")),1)],2))])):n("v-if",!0),($=e.order)!=null&&$.pay_way?(t(),p("div",Oe,[a(N,{type:"primary",round:"",size:"large",class:"btn-repay",onClick:e.onRepay},{default:r(()=>[v(i(e.$t("common.button.repay")),1)]),_:1},8,["onClick"])])):(t(),p("div",Ce,[a(N,{loading:e.prepaying,round:"",type:"primary",size:"large",class:"btn-pay",onClick:e.onPay},{default:r(()=>[v(i(e.$t("common.button.pay")),1)]),_:1},8,["loading","onClick"])]))]}),_:1})]),_:1})):n("v-if",!0)]}),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e.order&&e.payWay===e.PayWay.WechatPay?(t(),c(X,{key:0,modelValue:e.order,"onUpdate:modelValue":o[3]||(o[3]=_=>e.order=_),visible:e.paying,onHide:o[4]||(o[4]=_=>e.paying=!1)},null,8,["modelValue","visible"])):n("v-if",!0),e.order&&e.payWay===e.PayWay.Stripe?(t(),c(J,{key:1,modelValue:e.order,"onUpdate:modelValue":o[5]||(o[5]=_=>e.order=_),visible:e.paying,onHide:o[6]||(o[6]=_=>e.paying=!1)},null,8,["modelValue","visible"])):n("v-if",!0)],64)}var Ge=V($e,[["render",Ne],["__scopeId","data-v-2d1dc98e"],["__file","/home/runner/work/Nexior/Nexior/src/pages/console/order/Detail.vue"]]);export{Ge as default};
@@ -1 +0,0 @@
1
- import"./vendor-others.decd85ac.js";import{P as w}from"./Pagination.fcd91cad.js";import{C as y}from"./CopyToClipboard.3cfde0c6.js";import{b as v}from"./distribution.a80efa67.js";import{_ as $}from"./index.b7b7827f.js";import{g as C}from"./price.cf991d37.js";import{b as H,a as D,u as P,w as S,n as k}from"./vendor-element-plus.eeef3ee7.js";import{H as E,al as s,av as F,L as _,M as o,o as h,V as e,f as a,U as n,O as N}from"./vendor-@vue.31495dbd.js";import"./vendor-fortawesome.35fae32b.js";import"./vendor-axios.168e6950.js";const q=E({name:"ConsoleDistributionList",components:{Pagination:w,CopyToClipboard:y,ElRow:H,ElCol:D,ElTable:P,ElTableColumn:S,ElCard:k},data(){return{distributionHistories:[],distributionStatus:void 0,loading:!1,total:void 0,limit:10}},computed:{redirect(){return this.$route.query.redirect},page(){var t;return parseInt(((t=this.$route.query.page)==null?void 0:t.toString())||"1")}},watch:{page:{handler(){this.onFetchData()}}},mounted(){this.onFetchData()},methods:{getPriceString:C,onPageChange(t){var p;this.$router.push({name:(p=this.$route.name)==null?void 0:p.toString(),query:{page:t}})},onFetchData(){this.loading=!0,Promise.all([this.onFetchDistributionHistory()]).finally(()=>{this.loading=!1})},async onFetchDistributionHistory(){const{data:t}=await v.getAll({user_id:this.$store.getters.user.id,ordering:"-created_at",limit:this.limit,offset:(this.page-1)*this.limit});this.distributionHistories=t.items,this.total=t.count}}}),B={class:"title"},I={class:"key"},T={class:"copy"},V={class:"key"},z={class:"copy"},A={class:"price"},L={class:"description"},O={class:"description"},j={class:"created-at"},M={class:"pagination m-v-lg"};function R(t,p,U,G,J,K){const d=s("el-col"),c=s("el-row"),u=s("copy-to-clipboard"),r=s("el-table-column"),m=s("el-table"),f=s("el-card"),g=s("pagination"),b=F("loading");return h(),_(c,{class:"panel"},{default:o(()=>[e(d,{span:24},{default:o(()=>[e(c,null,{default:o(()=>[e(d,{span:24},{default:o(()=>[a("h2",B,n(t.$t("common.title.distributionHistory")),1)]),_:1})]),_:1}),e(c,null,{default:o(()=>[e(d,{span:24},{default:o(()=>[e(f,{shadow:"hover"},{default:o(()=>[N((h(),_(m,{data:t.distributionHistories,stripe:""},{default:o(()=>[e(r,{prop:"id",label:t.$t("distribution.field.id"),"class-name":"text-center",width:"350px"},{default:o(i=>[a("span",I,n(i.row.id),1),a("span",T,[e(u,{content:i.row.id},null,8,["content"])])]),_:1},8,["label"]),e(r,{prop:"id",label:t.$t("distribution.field.userId"),"class-name":"text-center",width:"350px"},{default:o(i=>[a("span",V,n(i.row.user_id),1),a("span",z,[e(u,{content:i.row.user_id},null,8,["content"])])]),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.price"),width:"100px"},{default:o(i=>{var l;return[a("span",A,n(t.getPriceString({value:(l=i.row)==null?void 0:l.price})),1)]}),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.reward"),width:"100px"},{default:o(i=>{var l;return[a("span",L,n(t.getPriceString({value:(l=i.row)==null?void 0:l.reward})),1)]}),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.percentage"),width:"120px"},{default:o(i=>[a("span",O,n(i.row.percentage)+"%",1)]),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.createdAt"),width:"200px"},{default:o(i=>[a("span",j,n(t.$dayjs.format(i.row.created_at)),1)]),_:1},8,["label"])]),_:1},8,["data"])),[[b,t.loading]])]),_:1})]),_:1})]),_:1}),e(c,null,{default:o(()=>[e(d,{span:10,offset:14},{default:o(()=>[a("div",M,[e(g,{"current-page":t.page,"page-size":t.limit,total:t.total,onChange:t.onPageChange},null,8,["current-page","page-size","total","onChange"])])]),_:1})]),_:1})]),_:1})]),_:1})}var at=$(q,[["render",R],["__scopeId","data-v-63f0e9ed"],["__file","/home/runner/work/Nexior/Nexior/src/pages/distribution/History.vue"]]);export{at as default};
@@ -1 +0,0 @@
1
- import"./vendor-others.decd85ac.js";import{h as O,_ as T,c as A,d as R,e as P,f as B,r as H,z as V,R as M}from"./index.b7b7827f.js";import{ai as L}from"./vendor-fortawesome.35fae32b.js";import{L as q,D as z}from"./DarkSelector.bf241a9d.js";import{o as D,r as X,p as j,e as F,f as J}from"./vendor-element-plus.eeef3ee7.js";import{H as U,al as s,o as g,L as E,M as p,V as a,T as N,U as I,S,f as r,e as C,a0 as W,W as G,ai as Q,Q as K}from"./vendor-@vue.31495dbd.js";import"./vendor-axios.168e6950.js";import"./vendor-vue-dark-switch.81063cc1.js";const Y=U({name:"HelpEntry",components:{ElImage:D,ElDialog:X,ElPopover:j,ElMenu:F,ElMenuItem:J,FontAwesomeIcon:L},props:{visible:{type:Boolean,default:!0}},emits:["close"],computed:{site(){return this.$store.state.site}},methods:{onJoin(){var e,t,n,i;window.open((i=(n=(t=(e=this.$store.state.site)==null?void 0:e.features)==null?void 0:t.support)==null?void 0:n.discord)==null?void 0:i.url,"_blank")},onProfit(){this.$router.push({name:O})}}}),Z={class:"flex"},ee={class:"flex-1 text-center"};function te(e,t,n,i,u,x){const m=s("font-awesome-icon"),l=s("el-menu-item"),f=s("el-image"),_=s("el-popover"),h=s("el-menu"),o=s("el-dialog");return g(),E(o,{"model-value":e.visible,width:200,class:"text-center",onClose:t[0]||(t[0]=c=>e.$emit("close"))},{default:p(()=>[a(h,{collapse:!1,class:"menu"},{default:p(()=>{var c,v,$,k;return[(k=($=(v=(c=e.site)==null?void 0:c.features)==null?void 0:v.support)==null?void 0:$.discord)!=null&&k.enabled?(g(),E(l,{key:0,index:"1",onClick:e.onJoin},{title:p(()=>[N(I(e.$t("common.message.joinDiscord")),1)]),default:p(()=>[a(m,{icon:"fa-brands fa-discord",class:"mr-2"})]),_:1},8,["onClick"])):S("v-if",!0),a(_,{width:350,trigger:"hover"},{reference:p(()=>{var d,b,w,y;return[(y=(w=(b=(d=e.site)==null?void 0:d.features)==null?void 0:b.support)==null?void 0:w.wechat)!=null&&y.enabled?(g(),E(l,{key:0,index:"2"},{title:p(()=>[N(I(e.$t("common.message.addWeChat")),1)]),default:p(()=>[a(m,{icon:"fa-brands fa-weixin",class:"mr-2"})]),_:1})):S("v-if",!0)]}),default:p(()=>{var d,b,w,y;return[r("div",Z,[r("div",ee,[a(f,{src:(y=(w=(b=(d=e.site)==null?void 0:d.features)==null?void 0:b.support)==null?void 0:w.wechat)==null?void 0:y.qr},null,8,["src"])])])]}),_:1})]}),_:1})]),_:1},8,["model-value"])}var oe=T(Y,[["render",te],["__scopeId","data-v-2800d84d"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/HelpDialog.vue"]]);const se=U({name:"ProfileIndex",components:{ElImage:D,HelpDialog:oe,FontAwesomeIcon:L,LocaleSelector:q,DarkSelector:z},data(){return{operating:{locale:!1,dark:!1,help:!1}}},computed:{user(){return this.$store.getters.user},showSupport(){var e,t,n,i,u,x,m,l,f,_,h,o,c,v,$,k,d;return((u=(i=(n=(t=(e=this.$store)==null?void 0:e.state)==null?void 0:t.site)==null?void 0:n.features)==null?void 0:i.support)==null?void 0:u.enabled)&&(((h=(_=(f=(l=(m=(x=this.$store)==null?void 0:x.state)==null?void 0:m.site)==null?void 0:l.features)==null?void 0:f.support)==null?void 0:_.discord)==null?void 0:h.enabled)||((d=(k=($=(v=(c=(o=this.$store)==null?void 0:o.state)==null?void 0:c.site)==null?void 0:v.features)==null?void 0:$.support)==null?void 0:k.wechat)==null?void 0:d.enabled))},showSite(){var e,t,n,i,u;return(u=(n=(t=(e=this.$store)==null?void 0:e.state)==null?void 0:t.site)==null?void 0:n.admins)==null?void 0:u.includes((i=this.$store.getters.user)==null?void 0:i.id)},links(){return[{key:"profile",text:this.$t("console.menu.userProfile"),href:`${A()}/user/profile`,icon:"fa-regular fa-user"},{key:"application-list",text:this.$t("console.menu.applicationList"),name:R,icon:"fa-solid fa-cube"},{key:"order-list",text:this.$t("console.menu.orderList"),name:P,icon:"fa-solid fa-store"},{key:"usage-list",text:this.$t("console.menu.usageList"),name:B,icon:"fa-solid fa-rotate-left"},{key:"distribution-index",text:this.$t("console.menu.distributionIndex"),name:O,icon:"fa-solid fa-coins"},...this.showSite?[{key:"site-index",text:this.$t("common.nav.site"),name:H,icon:"fa-solid fa-gear"}]:[],{key:"dark-setting",text:this.$t("common.nav.darkMode"),icon:"fa-solid fa-moon",callback:()=>{this.operating.dark=!0}},{key:"locale-setting",text:this.$t("common.nav.locale"),icon:"fa-solid fa-language",callback:()=>{this.operating.locale=!0}},{key:"developerPlatform",text:this.$t("console.menu.developerPlatform"),href:V(),icon:"fa-solid fa-laptop-code"},...this.showSupport?[{key:"support",text:this.$t("common.nav.support"),callback:()=>{this.operating.help=!0},icon:"fa-solid fa-question"}]:[],{key:"logout",text:this.$t("common.nav.logOut"),icon:"fa-solid fa-arrow-right-from-bracket",callback:async()=>{await this.$store.dispatch("resetAll"),await this.$store.dispatch("chat/resetAll"),await this.$store.dispatch("midjourney/resetAll"),await this.$store.dispatch("chatdoc/resetAll"),await this.$store.dispatch("qrart/resetAll"),await this.$store.dispatch("login")}}]}},methods:{onHome(){this.$router.push({name:M})},onNavigate(e){e.name?this.$router.push({name:e.name}):e.href?window.open(e.href,"_blank"):e.callback&&e.callback()}}}),ae={class:"profile"},ne={class:"info"},ie={class:"links"},re=["onClick"],le={class:"icon"},ce={class:"text"},de={class:"suffix"};function pe(e,t,n,i,u,x){const m=s("el-image"),l=s("font-awesome-icon"),f=s("locale-selector"),_=s("dark-selector"),h=s("help-dialog");return g(),C("div",ae,[r("div",ne,[a(m,{src:e.user.avatar,fit:"cover",class:"avatar"},null,8,["src"]),r("h2",null,I(e.user.username),1),r("div",{style:W({backgroundImage:"url("+e.user.avatar+")"}),class:"background"},null,4)]),r("div",ie,[(g(!0),C(G,null,Q(e.links,(o,c)=>(g(),C("a",{key:c,class:K({link:!0,active:e.$route.name===o.name}),onClick:v=>e.onNavigate(o)},[r("span",le,[a(l,{icon:o.icon,class:"text-sm"},null,8,["icon"])]),r("span",ce,I(o.text),1),r("span",de,[a(l,{icon:"fa-solid fa-chevron-right",class:"text-sm"})])],10,re))),128))]),a(f,{visible:e.operating.locale==!0,onClose:t[0]||(t[0]=o=>e.operating.locale=!1)},null,8,["visible"]),a(_,{visible:e.operating.dark==!0,onClose:t[1]||(t[1]=o=>e.operating.dark=!1)},null,8,["visible"]),a(h,{visible:e.operating.help==!0,onClose:t[2]||(t[2]=o=>e.operating.help=!1)},null,8,["visible"])])}var ke=T(se,[["render",pe],["__scopeId","data-v-0a2212f8"],["__file","/home/runner/work/Nexior/Nexior/src/pages/profile/Index.vue"]]);export{ke as default};
@@ -1 +0,0 @@
1
- import"./vendor-others.decd85ac.js";import{ai as C}from"./vendor-fortawesome.35fae32b.js";import{_ as I}from"./index.b7b7827f.js";import{i as q,b as E,a as B,n as N,o as F}from"./vendor-element-plus.eeef3ee7.js";import{H as S,al as u,e as y,f as t,V as e,M as o,o as h,U as n,T as p,W as k,ai as w,L as j,aK as V,aL as L}from"./vendor-@vue.31495dbd.js";import"./vendor-axios.168e6950.js";const T=S({name:"Index",components:{ElButton:q,ElRow:E,ElCol:B,ElCard:N,ElImage:F,FontAwesomeIcon:C},data(){return{comments:[{avatar:"https://cdn.acedata.cloud/avatar1.png",name:this.$t("index.customers.name1"),job:this.$t("index.customers.job1"),content:this.$t("index.customers.comment1")},{avatar:"https://cdn.acedata.cloud/avatar2.png",name:this.$t("index.customers.name2"),job:this.$t("index.customers.job2"),content:this.$t("index.customers.comment2")},{avatar:"https://cdn.acedata.cloud/avatar3.png",name:this.$t("index.customers.name3"),job:this.$t("index.customers.job3"),content:this.$t("index.customers.comment3")}]}},computed:{site(){return this.$store.state.site},capabilities(){var s,d,v,$,g,x,c,i,_,l,f,m;return[...(v=(d=(s=this.site)==null?void 0:s.features)==null?void 0:d.chat)!=null&&v.enabled?[{title:this.$t("index.title.chat"),subtitle:this.$t("index.subtitle.chat"),icon:"fa-regular fa-comment"}]:[],...(x=(g=($=this.site)==null?void 0:$.features)==null?void 0:g.midjourney)!=null&&x.enabled?[{title:this.$t("index.title.midjourney"),subtitle:this.$t("index.subtitle.midjourney"),icon:"fa-solid fa-palette"}]:[],...(_=(i=(c=this.site)==null?void 0:c.features)==null?void 0:i.qrart)!=null&&_.enabled?[{title:this.$t("index.title.qrart"),subtitle:this.$t("index.subtitle.qrart"),icon:"fa-solid fa-qrcode"}]:[],...(m=(f=(l=this.site)==null?void 0:l.features)==null?void 0:f.suno)!=null&&m.enabled?[{title:this.$t("index.title.suno"),subtitle:this.$t("index.subtitle.suno"),icon:"fa-solid fa-music"}]:[]]}},mounted(){},methods:{}}),r=s=>(V("data-v-d9c0303e"),s=s(),L(),s),z={class:"wrapper"},A={id:"banner"},D={class:"container"},H={class:"info"},K={class:"title"},M={class:"subtitle"},R={class:"operations"},U={id:"introduction"},W={class:"container"},G={class:"title"},J={class:"subtitle"},O={class:"icon-wrapper"},P={class:"title"},Q={class:"subtitle"},X={id:"chat",class:"block"},Y={class:"container"},Z=r(()=>t("img",{src:"https://cdn.acedata.cloud/axynds.png",class:"image desktop"},null,-1)),tt=r(()=>t("img",{src:"https://cdn.acedata.cloud/vds4i3.png",class:"image mobile"},null,-1)),st={class:"title"},et={class:"subtitle"},ot={id:"midjourney",class:"block"},nt={class:"container"},it={class:"title"},at={class:"subtitle"},dt=r(()=>t("img",{src:"https://cdn.acedata.cloud/uk86mz.png",class:"image desktop"},null,-1)),lt=r(()=>t("img",{src:"https://cdn.acedata.cloud/rvelwm.png",class:"image mobile"},null,-1)),ct={class:"container"},rt=r(()=>t("img",{src:"https://cdn.acedata.cloud/gyogar.png",class:"image desktop"},null,-1)),ut=r(()=>t("img",{src:"https://cdn.acedata.cloud/5kunm0.png",class:"image mobile"},null,-1)),_t={class:"title"},mt={class:"subtitle"},ht={class:"container"},pt={class:"title"},ft={class:"subtitle"},bt=r(()=>t("img",{src:"https://cdn.acedata.cloud/2m8fn.png",class:"image desktop"},null,-1)),vt=r(()=>t("img",{src:"https://cdn.acedata.cloud/23knvs.png",class:"image mobile"},null,-1)),$t={id:"comments"},gt={class:"container"},xt={class:"title"},yt={class:"subtitle"},kt={class:"content"},wt={class:"info"},jt={class:"left"},Ct={class:"right"},It={class:"name"},qt={class:"job"};function Et(s,d,v,$,g,x){const c=u("el-button"),i=u("el-col"),_=u("el-image"),l=u("el-row"),f=u("font-awesome-icon"),m=u("el-card");return h(),y("div",z,[t("div",A,[t("div",D,[e(l,null,{default:o(()=>[e(i,{md:12,xs:24,class:"left"},{default:o(()=>{var a;return[t("div",H,[t("h1",K,n((a=s.site)==null?void 0:a.title),1),t("h3",M,n(s.$t("index.subtitle.banner")),1),t("div",R,[e(c,{type:"primary",round:"",class:"btn-apply",onClick:d[0]||(d[0]=b=>s.$router.push({path:"/chat"}))},{default:o(()=>[p(n(s.$t("common.button.startForFree")),1)]),_:1})])])]}),_:1}),e(i,{md:12,xs:24,class:"right"},{default:o(()=>[e(_,{src:"https://cdn.acedata.cloud/illustration1.png",class:"brand"})]),_:1})]),_:1})])]),t("div",U,[t("div",W,[e(l,{class:"mb-6"},{default:o(()=>[e(i,{span:24},{default:o(()=>[t("h2",G,n(s.$t("index.title.introduction")),1),t("h5",J,n(s.$t("index.subtitle.introduction")),1)]),_:1})]),_:1}),e(l,{gutter:15},{default:o(()=>[(h(!0),y(k,null,w(s.capabilities,(a,b)=>(h(),j(i,{key:b,md:24/s.capabilities.length,xs:24,class:"mb-4"},{default:o(()=>[e(m,{class:"info text-center",shadow:"hover"},{default:o(()=>[t("div",O,[e(f,{icon:a.icon,class:"icon"},null,8,["icon"])]),t("h2",P,n(a.title),1),t("p",Q,n(a.subtitle),1)]),_:2},1024)]),_:2},1032,["md"]))),128))]),_:1})])]),t("div",X,[t("div",Y,[e(l,null,{default:o(()=>[e(i,{md:16,xs:24,class:"preview"},{default:o(()=>[Z,tt]),_:1}),e(i,{md:8,xs:24,class:"info"},{default:o(()=>[t("h2",st,n(s.$t("index.title.chat")),1),t("p",et,n(s.$t("index.subtitle.chat")),1),e(c,{type:"primary",round:"",class:"btn-try",onClick:d[1]||(d[1]=a=>s.$router.push({path:"/chat"}))},{default:o(()=>[p(n(s.$t("index.button.try")),1)]),_:1})]),_:1})]),_:1})])]),t("div",ot,[t("div",nt,[e(l,null,{default:o(()=>[e(i,{md:8,xs:24,class:"info"},{default:o(()=>[t("h2",it,n(s.$t("index.title.midjourney")),1),t("p",at,n(s.$t("index.subtitle.midjourney")),1),e(c,{type:"primary",round:"",class:"btn-try",onClick:d[2]||(d[2]=a=>s.$router.push({path:"/midjourney"}))},{default:o(()=>[p(n(s.$t("index.button.try")),1)]),_:1})]),_:1}),e(i,{md:16,xs:24,class:"preview"},{default:o(()=>[dt,lt]),_:1})]),_:1})])]),t("div",{id:"qrart",class:"block",onClick:d[3]||(d[3]=a=>s.$router.push({path:"/qrart"}))},[t("div",ct,[e(l,null,{default:o(()=>[e(i,{md:16,xs:24,class:"preview"},{default:o(()=>[rt,ut]),_:1}),e(i,{md:8,xs:24,class:"info"},{default:o(()=>[t("h2",_t,n(s.$t("index.title.qrart")),1),t("p",mt,n(s.$t("index.subtitle.qrart")),1),e(c,{type:"primary",round:"",class:"btn-try"},{default:o(()=>[p(n(s.$t("index.button.try")),1)]),_:1})]),_:1})]),_:1})])]),t("div",{id:"suno",class:"block",onClick:d[4]||(d[4]=a=>s.$router.push({path:"/suno"}))},[t("div",ht,[e(l,null,{default:o(()=>[e(i,{md:8,xs:24,class:"info"},{default:o(()=>[t("h2",pt,n(s.$t("index.title.suno")),1),t("p",ft,n(s.$t("index.subtitle.suno")),1),e(c,{type:"primary",round:"",class:"btn-try"},{default:o(()=>[p(n(s.$t("index.button.try")),1)]),_:1})]),_:1}),e(i,{md:16,xs:24,class:"preview"},{default:o(()=>[bt,vt]),_:1})]),_:1})])]),t("div",$t,[t("div",gt,[e(l,{class:"mb-6"},{default:o(()=>[e(i,{span:24},{default:o(()=>[t("h2",xt,n(s.$t("index.title.comments")),1),t("h5",yt,n(s.$t("index.subtitle.comments")),1)]),_:1})]),_:1}),e(l,{gutter:20,class:"main"},{default:o(()=>[(h(!0),y(k,null,w(s.comments,(a,b)=>(h(),j(i,{key:b,md:8,xs:24},{default:o(()=>[e(m,{shadow:"hover",class:"service","body-style":{padding:0}},{default:o(()=>[t("p",kt,n(a.content),1),t("div",wt,[t("div",jt,[e(_,{class:"avatar",src:a.avatar},null,8,["src"])]),t("div",Ct,[t("div",It,n(a.name),1),t("div",qt,n(a.job),1)])])]),_:2},1024)]),_:2},1024))),128))]),_:1})])])])}var Tt=I(T,[["render",Et],["__scopeId","data-v-d9c0303e"],["__file","/home/runner/work/Nexior/Nexior/src/pages/index/Index.vue"]]);export{Tt as default};
@@ -1,3 +0,0 @@
1
- var me=Object.defineProperty,he=Object.defineProperties;var fe=Object.getOwnPropertyDescriptors;var oe=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var ne=(e,t,o)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,h=(e,t)=>{for(var o in t||(t={}))ve.call(t,o)&&ne(e,o,t[o]);if(oe)for(var o of oe(t))$e.call(t,o)&&ne(e,o,t[o]);return e},f=(e,t)=>he(e,fe(t));import{J as z,V as ge,K as re,P as ye,L as we}from"./vendor-others.decd85ac.js";import{ai as J}from"./vendor-fortawesome.35fae32b.js";import{_ as y,ah as ie,H,w as ke,ai as be}from"./index.b7b7827f.js";import{O as Pe,i as ae,s as Se,t as Ie,S as le,N as B,o as ce,W as ue,q as xe,Y as Ae,Z as Ce,R as pe,p as Ne,A as Te,Q as Ee,_ as je,$ as Ve,a0 as De,K as R}from"./vendor-element-plus.eeef3ee7.js";import{H as w,al as c,o as d,e as _,S as b,f as a,I as q,V as r,M as k,U as $,W as U,ai as M,L as A,T as Le,av as Fe,O as de,m as E,u as v,A as _e,s as Ge,R as Re,P as Ue}from"./vendor-@vue.31495dbd.js";import{A as ze,i as Oe}from"./Status.783dce6a.js";import{I as W}from"./InfoIcon.d4740c2d.js";import"./vendor-axios.168e6950.js";import"./application.ea1e2a72.js";import"./vendor-markdown.95c097e3.js";import"./vendor-highlight.js.19da0c9f.js";const qe=w({name:"LayoutSuno",components:{ElDrawer:Pe,ElButton:ae,FontAwesomeIcon:J},data(){return{drawer:!1,preview:!1}},computed:{isPlaying(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.player)==null?void 0:t.isPlaying}}}),Me={class:"main"},Be={class:"config"},We={class:"result"},He={class:"preview"};function Ke(e,t,o,s,l,u){const n=c("font-awesome-icon"),p=c("el-button"),m=c("el-drawer");return d(),_("div",Me,[b(" \u6700\u5DE6\u4FA7\u914D\u7F6E\u680F "),a("div",Be,[q(e.$slots,"config",{},void 0,!0)]),b(" \u4E2D\u95F4\u6B4C\u66F2\u5217\u8868\u680F "),a("div",We,[q(e.$slots,"result",{},void 0,!0)]),b(" \u6700\u53F3\u8FB9\u6B4C\u66F2\u9884\u89C8\u680F "),a("div",He,[q(e.$slots,"preview",{},void 0,!0)]),r(p,{round:"",class:"menu",onClick:t[0]||(t[0]=g=>e.drawer=!0)},{default:k(()=>[r(n,{icon:"fa-solid fa-gear",class:"icon-menu"})]),_:1}),r(m,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=g=>e.drawer=g),"with-header":!1,size:"340px",class:"drawer"},{default:k(()=>[q(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"]),b(` <el-drawer v-model="isPlaying" :with-header="false" size="340px" class="preview_drawer">
2
- <slot name="preview" />
3
- </el-drawer> `)])}var Ye=y(qe,[["render",Ke],["__scopeId","data-v-0621513c"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Suno.vue"]]);const Je=w({name:"VersionSelector",components:{ElSelect:Se,ElOption:Ie,ElSwitch:le},props:{modelValue:{type:String,default:void 0}},emits:["update:modelValue"],data(){return{options:[{label:this.$t("suno.model.model1"),value:"chirp-v2-xxl-alpha"},{label:this.$t("suno.model.model2"),value:"chirp-v3-0"},{label:this.$t("suno.model.model3"),value:"chirp-v3-5"}]}},computed:{custom:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.custom},set(e){var t;console.debug("set custom",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{custom:e}))}},model:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.model},set(e){var t;console.debug("set model",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{model:e}))}}},mounted(){this.model||(console.debug("set default type",ie),this.model=ie)}}),Qe={class:"field"},Ze={class:"title"};function Xe(e,t,o,s,l,u){const n=c("el-switch"),p=c("el-option"),m=c("el-select");return d(),_("div",Qe,[a("h2",Ze,$(e.$t("suno.name.type")),1),r(n,{modelValue:e.custom,"onUpdate:modelValue":t[0]||(t[0]=g=>e.custom=g),class:"value"},null,8,["modelValue"]),r(m,{modelValue:e.model,"onUpdate:modelValue":t[1]||(t[1]=g=>e.model=g),class:"value",placeholder:e.$t("suno.placeholder.select")},{default:k(()=>[(d(!0),_(U,null,M(e.options,g=>(d(),A(p,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}var et=y(Je,[["render",Xe],["__scopeId","data-v-6d5f21aa"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/TypeSelector.vue"]]);const tt="",st=w({name:"PromptInput",components:{ElInput:B,InfoIcon:W},data(){return{}},computed:{prompt:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.prompt},set(e){var t;console.debug("set prompt",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{prompt:e}))}}},mounted(){this.value||(this.value=tt)}}),ot={class:"field"},nt={class:"box"},it={class:"title"};function rt(e,t,o,s,l,u){const n=c("info-icon"),p=c("el-input");return d(),_("div",ot,[a("div",nt,[a("h2",it,$(e.$t("suno.name.prompt")),1),r(n,{content:e.$t("suno.description.prompt"),class:"info"},null,8,["content"])]),r(p,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=m=>e.prompt=m),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("suno.placeholder.prompt"),maxlength:300,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var at=y(st,[["render",rt],["__scopeId","data-v-11b65236"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/PromptInput.vue"]]);const lt="",ct=w({name:"LyricInput",components:{ElInput:B,InfoIcon:W},data(){return{}},computed:{lyric:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.lyric},set(e){var t;console.debug("set lyric",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{lyric:e}))}},config(){var e;return(e=this.$store.state.suno)==null?void 0:e.config}},mounted(){this.value||(this.value=lt)}}),ut={class:"field"},pt={class:"box"},dt={class:"title"};function _t(e,t,o,s,l,u){const n=c("info-icon"),p=c("el-input");return d(),_("div",ut,[a("div",pt,[a("h2",dt,$(e.$t("suno.name.lyrics")),1),r(n,{content:e.$t("suno.description.lyrics"),class:"info"},null,8,["content"])]),r(p,{modelValue:e.lyric,"onUpdate:modelValue":t[0]||(t[0]=m=>e.lyric=m),rows:3,type:"textarea",class:"lyrics",placeholder:e.$t("suno.placeholder.lyrics"),maxlength:3e3,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var mt=y(ct,[["render",_t],["__scopeId","data-v-b47f1748"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/LyricInput.vue"]]);const ht=w({name:"StyleInput",components:{ElInput:B,InfoIcon:W},data(){return{}},computed:{style:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.style},set(e){var t;console.debug("set style",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{style:e}))}},config(){var e;return(e=this.$store.state.suno)==null?void 0:e.config}}}),ft={class:"field"},vt={class:"title-container"},$t={class:"title"};function gt(e,t,o,s,l,u){const n=c("info-icon"),p=c("el-input");return d(),_("div",ft,[a("div",vt,[a("h2",$t,$(e.$t("suno.name.style")),1),r(n,{content:e.$t("suno.description.style"),class:"info"},null,8,["content"])]),r(p,{modelValue:e.style,"onUpdate:modelValue":t[0]||(t[0]=m=>e.style=m),rows:3,type:"textarea",class:"style",placeholder:e.$t("suno.placeholder.style"),maxlength:300,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var yt=y(ht,[["render",gt],["__scopeId","data-v-075e574a"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/StyleInput.vue"]]);const wt="",kt=w({name:"TitleInput",components:{ElInput:B,InfoIcon:W},data(){return{}},computed:{title:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.title},set(e){var t;console.debug("set title",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{title:e}))}},instrumental:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.instrumental},set(e){var t;console.debug("set instrumental",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{instrumental:e}))}}},mounted(){this.value||(this.value=wt)}}),bt={class:"field"},Pt={class:"title-container"},St={class:"title"};function It(e,t,o,s,l,u){const n=c("info-icon"),p=c("el-input");return d(),_("div",bt,[a("div",Pt,[a("h2",St,$(e.$t("suno.name.title")),1),r(n,{content:e.$t("suno.description.title"),class:"info"},null,8,["content"])]),r(p,{modelValue:e.title,"onUpdate:modelValue":t[0]||(t[0]=m=>e.title=m),rows:3,type:"textarea",class:"title",placeholder:e.$t("suno.placeholder.title"),maxlength:300,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var xt=y(kt,[["render",It],["__scopeId","data-v-f9bac2fa"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/TitleInput.vue"]]);const At=!1,Ct=w({name:"InstrumentSwitch",components:{ElSwitch:le},data(){return{}},computed:{instrumental:{get(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.config)==null?void 0:t.instrumental},set(e){var t;console.debug("set instrumental",e),this.$store.commit("suno/setConfig",f(h({},(t=this.$store.state.suno)==null?void 0:t.config),{instrumental:e}))}}},mounted(){this.instrumental===void 0&&(this.instrumental=At)}}),Nt={class:"field"},Tt={class:"title inline-block"};function Et(e,t,o,s,l,u){const n=c("el-switch");return d(),_("div",Nt,[r(n,{modelValue:e.instrumental,"onUpdate:modelValue":t[0]||(t[0]=p=>e.instrumental=p),class:"value mr-2"},null,8,["modelValue"]),a("h2",Tt,$(e.$t("suno.name.instrumental")),1)])}var jt=y(Ct,[["render",Et],["__scopeId","data-v-78764cec"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/config/InstrumentSwitch.vue"]]);const Vt=w({name:"PresetPanel",components:{TypeSelector:et,PromptInput:at,LyricInput:mt,InstrumentSwitch:jt,StyleInput:yt,TitleInput:xt,FontAwesomeIcon:J,ElButton:ae},emits:["generate"],computed:{config(){var e;return(e=this.$store.state.suno)==null?void 0:e.config}},methods:{onGenerate(){this.$emit("generate")}}}),Dt={class:"panel"},Lt={class:"config"},Ft={class:"actions"};function Gt(e,t,o,s,l,u){var N,S,I,x;const n=c("type-selector"),p=c("instrument-switch"),m=c("prompt-input"),g=c("lyric-input"),P=c("style-input"),C=c("title-input"),T=c("font-awesome-icon"),i=c("el-button");return d(),_("div",Dt,[a("div",Lt,[r(n,{class:"mb-4"}),r(p,{class:"mb-4 instrument"}),(N=e.config)!=null&&N.custom?b("v-if",!0):(d(),A(m,{key:0,class:"mb-4"})),((S=e.config)==null?void 0:S.custom)&&!e.config.instrumental?(d(),A(g,{key:1,class:"mb-4"})):b("v-if",!0),(I=e.config)!=null&&I.custom?(d(),A(P,{key:2,class:"mb-4"})):b("v-if",!0),(x=e.config)!=null&&x.custom?(d(),A(C,{key:3,class:"mb-4"})):b("v-if",!0),a("div",Ft,[r(i,{type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:k(()=>[r(T,{icon:"fa-solid fa-magic",class:"mr-2"}),Le(" "+$(e.$t("suno.button.generate")),1)]),_:1},8,["onClick"])])])])}var Rt=y(Vt,[["render",Gt],["__scopeId","data-v-38bb3c66"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/ConfigPanel.vue"]]);function K(e){const t=Math.floor(e)%60;e=Math.floor(e/60);const o=e%60,s=o<10?`0${o}`:o,l=t<10?`0${t}`:t;return s+":"+l}const Ut=w({name:"TaskPreview",components:{ElImage:ce,ElIcon:ue,ElTooltip:xe,FontAwesomeIcon:J,VideoPlay:Ae,VideoPause:Ce},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{task(){var e;return(e=this.$store.state.suno)==null?void 0:e.tasks},audios(){var t,o,s,l,u;let e=[];return Array.isArray((o=(t=this.modelValue)==null?void 0:t.response)==null?void 0:o.data)&&((u=(l=(s=this.modelValue)==null?void 0:s.response)==null?void 0:l.data)==null||u.forEach(n=>{let p=n;e.push(p)})),console.log("audios",e),e},application(){var e;return(e=this.$store.state.suno)==null?void 0:e.application},active(){var e,t;return(t=(e=this.$store.state.suno)==null?void 0:e.tasks)==null?void 0:t.active}},methods:{useFormatDuring:K,onPlay(e){this.$store.dispatch("suno/setAudio",f(h(h({},this.$store.state.suno.audio),e),{state:"playing"})),console.log("on play")},onPause(e){this.$store.dispatch("suno/setAudio",f(h(h({},this.$store.state.suno.audio),e),{state:"paused"})),console.log("on pause")},onClick(e){var t,o,s;((s=(o=(t=this.$store.state)==null?void 0:t.suno)==null?void 0:o.audio)==null?void 0:s.id)!==e.id&&this.onPlay(f(h({},e),{progress:0}))},onDownload(e,t){e.stopPropagation(),console.log("on download"),window.open(t,"_blank")},onPreview(e,t){e.stopPropagation(),console.log("on preview"),window.open(t,"_blank")}}}),zt={class:"task"},Ot=["onClick"],qt={class:"left"},Mt=["onClick"],Bt=["onClick"],Wt={key:2,class:"duration"},Ht={class:"info"},Kt={class:"title"},Yt={class:"style"},Jt={class:"right"};function Qt(e,t,o,s,l,u){const n=c("el-image"),p=c("video-pause"),m=c("el-icon"),g=c("video-play"),P=c("font-awesome-icon"),C=c("el-tooltip"),T=Fe("loading");return d(),_("div",zt,[(d(!0),_(U,null,M(e.audios,(i,N)=>{var S,I,x,D,L,F,G,j,O,Q,Z,X,ee,te,se;return d(),_("div",{key:N,class:"audio",onClick:V=>e.onClick(i)},[de((d(),_("div",qt,[r(n,{src:i==null?void 0:i.image_url,class:"cover",fit:"cover"},null,8,["src"]),(i==null?void 0:i.audio_url)&&((x=(I=(S=e.$store.state)==null?void 0:S.suno)==null?void 0:I.audio)==null?void 0:x.id)===i.id&&((F=(L=(D=e.$store.state)==null?void 0:D.suno)==null?void 0:L.audio)==null?void 0:F.state)==="playing"?(d(),_("div",{key:0,class:"overlay",onClick:V=>e.onPause(i)},[r(m,null,{default:k(()=>[r(p)]),_:1})],8,Mt)):b("v-if",!0),(i==null?void 0:i.audio_url)&&(((O=(j=(G=e.$store.state)==null?void 0:G.suno)==null?void 0:j.audio)==null?void 0:O.id)!==i.id||((X=(Z=(Q=e.$store.state)==null?void 0:Q.suno)==null?void 0:Z.audio)==null?void 0:X.id)===i.id&&((se=(te=(ee=e.$store.state)==null?void 0:ee.suno)==null?void 0:te.audio)==null?void 0:se.state)==="paused")?(d(),_("div",{key:1,class:"overlay",onClick:V=>e.onPlay(i)},[r(m,null,{default:k(()=>[r(g)]),_:1})],8,Bt)):b("v-if",!0),i!=null&&i.duration?(d(),_("div",Wt,$(e.useFormatDuring(i==null?void 0:i.duration)),1)):b("v-if",!0)])),[[T,!(i!=null&&i.audio_url)||!(i!=null&&i.video_url)]]),a("div",Ht,[a("h2",Kt,$(i==null?void 0:i.title),1),a("p",Yt,$(i==null?void 0:i.style),1)]),a("div",Jt,[r(C,{effect:"dark",content:e.$t("suno.button.download"),placement:"top"},{default:k(()=>[i!=null&&i.audio_url?(d(),A(P,{key:0,icon:"fa-solid fa-download",class:"icon icon-download",onClick:V=>e.onDownload(V,i==null?void 0:i.audio_url)},null,8,["onClick"])):b("v-if",!0)]),_:2},1032,["content"]),r(C,{effect:"dark",content:e.$t("suno.button.video"),placement:"top"},{default:k(()=>[i!=null&&i.video_url?(d(),A(P,{key:0,icon:"fa-solid fa-clapperboard",class:"icon icon-preview",onClick:V=>e.onPreview(V,i==null?void 0:i.video_url)},null,8,["onClick"])):b("v-if",!0)]),_:2},1032,["content"])])],8,Ot)}),128))])}var Zt=y(Ut,[["render",Qt],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/task/Preview.vue"]]);const Xt={class:"player-slider"},es=w({setup(e){const t=z(),o=E({get:()=>{var n,p;return(p=(n=t.state.suno)==null?void 0:n.audio)==null?void 0:p.progress},set:n=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{progress:n}))}),s=E({get:()=>{var n,p;return(p=(n=t.state.suno)==null?void 0:n.audio)==null?void 0:p.duration},set:n=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{duration:n}))}),l=()=>{},u=n=>t.dispatch("suno/setAudio",f(h({},t.state.suno.audio),{progress:n}));return(n,p)=>(d(),_("div",Xt,[r(v(pe),{modelValue:v(o),"onUpdate:modelValue":p[0]||(p[0]=m=>_e(o)?o.value=m:null),"show-tooltip":!1,min:0,max:v(s),onChange:u,onInput:l},null,8,["modelValue","max"])]))}});var ts=y(es,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerSlider.vue"]]),ss="/assets/disk.4907c891.png";const os={class:"flex player-song"},ns=["src"],is={class:"ml-2 text-xs flex flex-col justify-between"},rs={class:"w-52 2xl:w-96 cursor-pointer truncate"},as={class:"flex"},ls={class:"ml-2 text-dc"},cs=w({setup(e){const t=z(),o=E({get:()=>t.state.suno.audio,set:s=>t.commit("suno/setAudio",s)});return Ge(o,(s,l)=>{if((s==null?void 0:s.audio_url)!==(l==null?void 0:l.audio_url)){console.log("audio changed",s),s.object&&(console.log("111",s.object),s.object.pause(),delete s.object);const u=new Audio(s.audio_url);s.state==="playing"?u.play():u.pause(),u.addEventListener("loadedmetadata",()=>{u.currentTime=0,u.addEventListener("timeupdate",()=>{t.commit("suno/setAudio",f(h({},t.state.suno.audio),{progress:u.currentTime}))})}),t.commit("suno/setAudio",f(h({},t.state.suno.audio),{object:u}))}else if((s==null?void 0:s.progress)!==(l==null?void 0:l.progress)&&Math.abs(s.progress-s.object.currentTime)>2){console.log("progress changed",s.progress);const u=t.state.suno.audio;u.object&&(u.object.currentTime=u.progress)}else(s==null?void 0:s.state)!==(l==null?void 0:l.state)&&(console.log("state changed",s.state),s.object&&(s.state==="playing"?s.object.play():s.object.pause()));(s==null?void 0:s.volume)!==(l==null?void 0:l.volume)&&(console.log("volume changed",s.volume),s.object&&(s.object.volume=s.volume/100))}),(s,l)=>{var u,n,p;return d(),_("div",os,[a("img",{alt:"",class:"w-11 h-11 rounded",src:((u=v(o))==null?void 0:u.image_url)||v(ss)},null,8,ns),a("div",is,[a("div",rs,[a("div",as,[a("span",null,$(((n=v(o))==null?void 0:n.title)||"Music"),1),a("span",ls,"- "+$(((p=v(o))==null?void 0:p.style)||"SmallRuralDog"),1)])])])])}}});var us=y(cs,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerSong.vue"]]);const ps={class:"flex justify-end items-center gap-x-2.5"},ds={class:"text-xs"},_s=w({setup(e){const t=z(),o=E({get:()=>{var l,u;return(u=(l=t.state.suno)==null?void 0:l.audio)==null?void 0:u.progress},set:l=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{progress:l}))}),s=E({get:()=>{var l,u;return(u=(l=t.state.suno)==null?void 0:l.audio)==null?void 0:u.duration},set:l=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{duration:l}))});return(l,u)=>(d(),_("div",ps,[a("span",ds,$(v(K)(v(o)))+" / "+$(v(K)(v(s))),1)]))}});var ms=y(_s,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerAction.vue"]]);const hs=w({props:{icon:{type:null,required:!0},theme:{type:String,required:!1},size:{type:[Number,String],required:!1},spin:{type:Boolean,required:!1},fill:{type:[String,Array],required:!1},strokeLinecap:{type:String,required:!1},strokeLinejoin:{type:String,required:!1},strokeWidth:{type:Number,required:!1}},setup(e){return(t,o)=>(d(),A(Re(e.icon),{theme:e.theme,size:e.size,spin:e.spin,fill:e.fill,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin,"stroke-width":e.strokeWidth},null,8,["theme","size","spin","fill","stroke-linecap","stroke-linejoin","stroke-width"]))}});var Y=y(hs,[["__file","/home/runner/work/Nexior/Nexior/src/components/common/IconPark.vue"]]);const fs={class:"player-volume flex flex-col items-center pt-2"},vs={class:"text-sm mt-3"},$s={class:"mt-2"},gs=w({setup(e){const t=z(),o=E({get:()=>{var n;return(n=t.state.suno.audio)==null?void 0:n.volume},set:n=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{volume:n}))}),s=E({get:()=>{var n;return(n=t.state.suno.audio)==null?void 0:n.muted},set:n=>t.commit("suno/setAudio",f(h({},t.state.suno.audio),{muted:n}))}),l=()=>t.dispatch("suno/toggleMuted"),u=n=>t.dispatch("suno/setVolume",n);return(n,p)=>(d(),_("div",fs,[a("div",null,[r(v(pe),{modelValue:v(o),"onUpdate:modelValue":p[0]||(p[0]=m=>_e(o)?o.value=m:null),vertical:"",height:"100px","show-tooltip":!1,max:100,min:0,size:"small",disabled:v(s),onInput:u},null,8,["modelValue","disabled"])]),a("div",vs,$(v(o)),1),a("div",$s,[r(Y,{icon:v(s)?v(ge):v(re),size:"16",theme:"filled",class:"hover-text",onClick:l},null,8,["icon"])])]))}});var ys=y(gs,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerVolumeSlider.vue"]]);const ws={class:"flex items-center justify-center gap-x-3"},ks=w({setup(e){const t=z(),o=()=>t.dispatch("suno/setAudio",f(h({},t.state.suno.audio),{state:t.state.suno.audio.state==="playing"?"paused":"playing"})),s=E(()=>t.state.suno.audio);return(l,u)=>{var n;return d(),_("div",ws,[r(Y,{icon:((n=v(s))==null?void 0:n.state)==="playing"?v(ye):v(we),size:"45",theme:"filled",class:"control",onClick:o},null,8,["icon"]),r(v(Ne),{placement:"top",width:"50px"},{reference:k(()=>[r(Y,{icon:v(re),size:"20","stroke-width":3,class:"hover-text"},null,8,["icon"])]),default:k(()=>[r(ys)]),_:1})])}}});var bs=y(ks,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/PlayerController.vue"]]);const Ps={class:"flex flex-col items-stretch h-20"},Ss={class:"flex grow px-5 items-center"},Is={class:"flex-1"},xs={class:"flex-1"},As={class:"flex-1"},Cs=w({setup(e){return(t,o)=>(d(),_("div",Ps,[r(ts),a("div",Ss,[a("div",Is,[r(us)]),a("div",xs,[r(bs)]),a("div",As,[r(ms)])])]))}});var Ns=y(Cs,[["__file","/home/runner/work/Nexior/Nexior/src/components/suno/player/Player.vue"]]);const Ts=w({name:"RecentPanel",components:{TaskPreview:Zt,ElSkeleton:Te,ElSkeletonItem:Ee,Player:Ns},data(){return{job:0}},computed:{tasks(){var e,t,o,s;return f(h({},(e=this.$store.state.suno)==null?void 0:e.tasks),{items:(s=(o=(t=this.$store.state.suno)==null?void 0:t.tasks)==null?void 0:o.items)==null?void 0:s.slice().reverse()})}}}),Es={class:"panel recent"},js={key:0,class:"tasks"},Vs={class:"left"},Ds={class:"main"},Ls={key:1,class:"tasks"},Fs={key:2,class:"description"},Gs={class:"flex-1 flex flex-col"},Rs={class:"h-20"};function Us(e,t,o,s,l,u){var P,C,T,i,N,S,I,x,D,L,F,G;const n=c("el-skeleton-item"),p=c("el-skeleton"),m=c("task-preview"),g=c("player");return d(),_(U,null,[a("div",Es,[((P=e.tasks)==null?void 0:P.items)===void 0?(d(),_("div",js,[(d(),_(U,null,M(3,j=>a("div",{key:j,class:"task placeholder"},[a("div",Vs,[r(p,{animated:""},{template:k(()=>[r(n,{variant:"image",class:"avatar"})]),_:1})]),a("div",Ds,[r(p,{animated:""},{template:k(()=>[r(n,{variant:"p",class:"title"}),r(n,{variant:"text",style:{"margin-right":"16px"}}),r(n,{variant:"text",style:{width:"80%"}})]),_:1})])])),64))])):((T=(C=e.tasks)==null?void 0:C.items)==null?void 0:T.length)&&((N=(i=e.tasks)==null?void 0:i.items)==null?void 0:N.length)>0?(d(),_("div",Ls,[(d(!0),_(U,null,M((S=e.tasks)==null?void 0:S.items,(j,O)=>(d(),A(m,{key:O,"model-value":j,class:"preview"},null,8,["model-value"]))),128))])):b("v-if",!0),((x=(I=e.tasks)==null?void 0:I.items)==null?void 0:x.length)===0?(d(),_("p",Fs,$(e.$t("suno.message.noTasks")),1)):b("v-if",!0)]),de(a("div",Gs,[a("div",Rs,[r(g)])],512),[[Ue,!!((G=(F=(L=(D=e.$store)==null?void 0:D.state)==null?void 0:L.suno)==null?void 0:F.audio)!=null&&G.object)]])],64)}var zs=y(Ts,[["render",Us],["__scopeId","data-v-9a683526"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/RecentPanel.vue"]]);const Os=w({name:"TaskPreview",components:{ElScrollbar:je,IconPicture:Ve,ElImage:ce,ElAvatar:De,ElIcon:ue},data(){return{showCloseIcon:!0}},computed:{audio(){var e;return(e=this.$store.state.suno)==null?void 0:e.audio}},methods:{closeCard(){this.showCloseIcon=!this.showCloseIcon}}}),qs={key:0,class:"card"},Ms={class:"image-container"},Bs={class:"image-slot"},Ws={class:"title"},Hs={class:"content"},Ks={class:"artist"},Ys={class:"style"},Js={class:"time"},Qs={class:"lyrics"},Zs={key:1,class:"gradient-background"};function Xs(e,t,o,s,l,u){const n=c("icon-picture"),p=c("el-icon"),m=c("el-image"),g=c("el-avatar"),P=c("el-scrollbar");return d(),A(P,{class:"right-panel"},{default:k(()=>{var C,T,i,N,S,I,x;return[(C=e.audio)!=null&&C.object?(d(),_("div",qs,[a("div",Ms,[r(m,{src:e.audio.image_url,fit:"cover"},{error:k(()=>[a("div",Bs,[r(p,null,{default:k(()=>[r(n)]),_:1})])]),_:1},8,["src"]),a("h2",Ws,$((T=e.audio)==null?void 0:T.title),1)]),a("div",Hs,[a("div",Ks,[r(g,{size:30,src:(i=e.audio)==null?void 0:i.image_url},null,8,["src"]),a("span",null,$((N=e.audio)==null?void 0:N.prompt),1)]),a("p",Ys,$((S=e.audio)==null?void 0:S.style),1),a("p",Js,$(e.$dayjs.format((I=e.audio)==null?void 0:I.created_at)),1),a("div",Qs,[a("p",null,$((x=e.audio)==null?void 0:x.lyric),1)])])])):(d(),_("div",Zs))]}),_:1})}var eo=y(Os,[["render",Xs],["__scopeId","data-v-19e67a48"],["__file","/home/runner/work/Nexior/Nexior/src/components/suno/PreviewPanel.vue"]]);const to="https://webhook.acedata.cloud/suno",so=w({name:"SunoIndex",components:{Layout:Ye,ApplicationStatus:ze,ConfigPanel:Rt,RecentPanel:zs,PreviewPanel:eo},data(){return{task:void 0,job:0,timer:void 0}},computed:{loading(){var e,t;return((t=(e=this.$store.state.suno)==null?void 0:e.status)==null?void 0:t.getApplication)===H.Request},service(){return this.$store.state.suno.service},credential(){return this.$store.state.suno.credential},config(){return this.$store.state.suno.config},initializing(){return this.$store.state.suno.status.getApplication===H.Request},needApply(){return this.$store.state.suno.status.getApplication===H.Success&&!this.application},application(){return this.$store.state.suno.application},tasks(){return this.$store.state.suno.tasks}},watch:{tasks:{handler(e,t){var o,s;((o=e==null?void 0:e.items)==null?void 0:o.length)>((s=t==null?void 0:t.items)==null?void 0:s.length)&&(console.debug("new tasks detected"),this.onScrollDown())},deep:!0}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onScrollDown(),await this.onGetTasks(),await this.onScrollDown(),this.job=setInterval(()=>{this.onGetTasks()},5e3)},async unmounted(){clearInterval(this.job),clearInterval(this.timer)},methods:{async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("suno/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("suno/getApplication"),console.debug("end onGetApplication"),await this.onGetTasks()},onApply(){ke.create({application:this.application}).then(({data:e})=>{this.application=e,R.success(this.$t("application.message.applySuccessfully"))}).catch(e=>{var t,o;((o=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:o.code)===Oe&&R.error(this.$t("application.message.alreadyApplied"))})},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".recent");e&&(e.scrollTop=e.scrollHeight)},1e3)},async onGetTasks(){if(this.loading){console.debug("loading");return}await this.$store.dispatch("suno/getTasks",{limit:30,offset:0})},async onGenerateAudio(){var o;const e=f(h({},this.config),{callback_url:to}),t=(o=this.credential)==null?void 0:o.token;if(!t){console.error("no token specified");return}R.success(this.$t("suno.message.startingTask")),be.audio(e,{token:t}).then(()=>{R.success(this.$t("suno.message.startTaskSuccess"))}).catch(()=>{R.error(this.$t("suno.message.startTaskFailed"))}).finally(async()=>{await this.onGetTasks(),await this.onScrollDown()})}}});function oo(e,t,o,s,l,u){const n=c("config-panel"),p=c("application-status"),m=c("recent-panel"),g=c("preview-panel"),P=c("layout");return d(),A(P,null,{config:k(()=>[r(n,{onGenerate:e.onGenerateAudio},null,8,["onGenerate"])]),result:k(()=>[r(p,{initializing:e.initializing,application:e.application,service:e.service,"need-apply":e.needApply,class:"mb-4",onRefresh:e.onGetApplication},null,8,["initializing","application","service","need-apply","onRefresh"]),r(m,{class:"panel recent"})]),preview:k(()=>[r(g)]),_:1})}var vo=y(so,[["render",oo],["__scopeId","data-v-11d62c6c"],["__file","/home/runner/work/Nexior/Nexior/src/pages/suno/Index.vue"]]);export{vo as default};