pcm-agents 1.0.18 → 1.0.19

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 (214) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/app-globals-BIO4q6tX.js.map +1 -1
  3. package/dist/cjs/components-chat-message_33.cjs.entry.js +54 -2317
  4. package/dist/cjs/components-chat-message_33.cjs.entry.js.map +1 -1
  5. package/dist/cjs/components-oem-virtual-chat-modal.cjs.entry.js +2 -2
  6. package/dist/cjs/{conversation-utils-BmxHPKOt.js → conversation-utils-CKlwCDRf.js} +4 -4
  7. package/dist/cjs/{conversation-utils-BmxHPKOt.js.map → conversation-utils-CKlwCDRf.js.map} +1 -1
  8. package/dist/cjs/{index-BivNZVuE.js → index-DLbq5wiz.js} +3 -3
  9. package/dist/cjs/{index-BivNZVuE.js.map → index-DLbq5wiz.js.map} +1 -1
  10. package/dist/cjs/index.cjs.js +1 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/markdown-C0QWZi9Q.js +2674 -0
  13. package/dist/cjs/{markdown-D3_atg0b.js.map → markdown-C0QWZi9Q.js.map} +1 -1
  14. package/dist/cjs/oem-cast-modal.cjs.entry.js +1 -1
  15. package/dist/cjs/oem-htws-modal.cjs.entry.js +1 -1
  16. package/dist/cjs/oem-jd-modal.cjs.entry.js +2 -2
  17. package/dist/cjs/oem-jlpp-modal.cjs.entry.js +1 -1
  18. package/dist/cjs/oem-jlzz-modal.cjs.entry.js +1 -1
  19. package/dist/cjs/oem-mnct-modal.cjs.entry.js +1 -1
  20. package/dist/cjs/oem-mnms-modal.cjs.entry.js +1 -1
  21. package/dist/cjs/oem-qgqjl-modal.cjs.entry.js +3 -3
  22. package/dist/cjs/pcm-agents.cjs.js +1 -1
  23. package/dist/cjs/pcm-hr-chat-modal.cjs.entry.js +2 -2
  24. package/dist/cjs/pcm-jlsx-modal.cjs.entry.js +3 -3
  25. package/dist/cjs/{sentry-reporter-Ck3EoJAs.js → sentry-reporter-BmrqhSKs.js} +3 -3
  26. package/dist/cjs/{sentry-reporter-Ck3EoJAs.js.map → sentry-reporter-BmrqhSKs.js.map} +1 -1
  27. package/dist/collection/components/components-upload/components-upload.js +1 -1
  28. package/dist/collection/components/components-voice-input-btn/components-voice-input-btn.css +67 -67
  29. package/dist/collection/components/components-voice-input-btn/components-voice-input-btn.js +2 -2
  30. package/dist/collection/components/components-voice-input-btn/components-voice-input-btn.js.map +1 -1
  31. package/dist/collection/components/oem-cast-modal/oem-cast-modal.js +1 -1
  32. package/dist/collection/components/oem-zygh-modal/oem-zygh-modal.js +1 -1
  33. package/dist/collection/components/pcm-htws-modal/pcm-htws-modal.js +26 -1
  34. package/dist/collection/components/pcm-htws-modal/pcm-htws-modal.js.map +1 -1
  35. package/dist/collection/components/pcm-hyzj-modal/pcm-hyzj-modal.js +26 -1
  36. package/dist/collection/components/pcm-hyzj-modal/pcm-hyzj-modal.js.map +1 -1
  37. package/dist/collection/components/pcm-jd-modal/pcm-jd-modal.js +26 -1
  38. package/dist/collection/components/pcm-jd-modal/pcm-jd-modal.js.map +1 -1
  39. package/dist/collection/components/pcm-mnct-modal/pcm-mnct-modal.js +26 -1
  40. package/dist/collection/components/pcm-mnct-modal/pcm-mnct-modal.js.map +1 -1
  41. package/dist/collection/components/pcm-msbg-modal/pcm-msbg-modal.js +26 -1
  42. package/dist/collection/components/pcm-msbg-modal/pcm-msbg-modal.js.map +1 -1
  43. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js +26 -1
  44. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js.map +1 -1
  45. package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.js +27 -2
  46. package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.js.map +1 -1
  47. package/dist/collection/components/pcm-zygh-v2-modal/pcm-zygh-v2-modal.js +27 -2
  48. package/dist/collection/components/pcm-zygh-v2-modal/pcm-zygh-v2-modal.js.map +1 -1
  49. package/dist/components/components-chat-message.js +1 -1
  50. package/dist/components/components-digital-human.js +1 -1
  51. package/dist/components/components-export-records-modal.js +1 -1
  52. package/dist/components/components-mobile-input-btn.js +1 -1
  53. package/dist/components/components-mobile-upload-btn.js +1 -1
  54. package/dist/components/components-oem-virtual-chat-modal.js +1 -1
  55. package/dist/components/components-position-selector.js +1 -1
  56. package/dist/components/components-thousand-resume-wrapper.js +1 -1
  57. package/dist/components/components-upload.js +1 -1
  58. package/dist/components/components-voice-input-btn.js +1 -1
  59. package/dist/components/index.js +1 -1
  60. package/dist/components/index.js.map +1 -1
  61. package/dist/components/oem-cast-modal.js +1 -1
  62. package/dist/components/oem-htws-modal.js +5 -5
  63. package/dist/components/oem-jd-modal.js +5 -5
  64. package/dist/components/oem-jlpp-modal.js +7 -7
  65. package/dist/components/oem-jlsx-modal.js +6 -6
  66. package/dist/components/oem-jlzz-modal.js +5 -5
  67. package/dist/components/oem-mnct-modal.js +7 -7
  68. package/dist/components/oem-mnms-modal.js +8 -8
  69. package/dist/components/oem-qgqjl-modal.js +9 -9
  70. package/dist/components/oem-zygh-modal.js +5 -5
  71. package/dist/components/{p-BYD6-WNq.js → p-BFBILVHb.js} +3 -3
  72. package/dist/components/{p-BYD6-WNq.js.map → p-BFBILVHb.js.map} +1 -1
  73. package/dist/components/{p-CyUWH4Mj.js → p-BM8LfA-I.js} +4 -4
  74. package/dist/components/{p-CyUWH4Mj.js.map → p-BM8LfA-I.js.map} +1 -1
  75. package/dist/components/{p-ssn_a1iK.js → p-BMyYj4Nh.js} +3 -3
  76. package/dist/components/{p-ssn_a1iK.js.map → p-BMyYj4Nh.js.map} +1 -1
  77. package/dist/components/{p-BWUzAm4p.js → p-BbgkkZ8z.js} +3 -3
  78. package/dist/components/{p-BWUzAm4p.js.map → p-BbgkkZ8z.js.map} +1 -1
  79. package/dist/components/{p-BG6NTTpT.js → p-BsVthfPT.js} +4 -4
  80. package/dist/components/{p-BG6NTTpT.js.map → p-BsVthfPT.js.map} +1 -1
  81. package/dist/components/{p-A3F6YFmx.js → p-C5cxtSmw.js} +3 -3
  82. package/dist/components/{p-A3F6YFmx.js.map → p-C5cxtSmw.js.map} +1 -1
  83. package/dist/components/{p-Bry80jQE.js → p-CRuYvhDS.js} +3 -3
  84. package/dist/components/{p-Bry80jQE.js.map → p-CRuYvhDS.js.map} +1 -1
  85. package/dist/components/{p-CXalGxO1.js → p-CUgq8UDs.js} +4 -4
  86. package/dist/components/p-CUgq8UDs.js.map +1 -0
  87. package/dist/components/{p-CNf8b_lT.js → p-ChHHPVqa.js} +6 -6
  88. package/dist/components/{p-CNf8b_lT.js.map → p-ChHHPVqa.js.map} +1 -1
  89. package/dist/components/p-CnhOGURu.js +2671 -0
  90. package/dist/components/p-CnhOGURu.js.map +1 -0
  91. package/dist/components/{p-nhuWyXIB.js → p-DMxCytIw.js} +3 -3
  92. package/dist/components/{p-nhuWyXIB.js.map → p-DMxCytIw.js.map} +1 -1
  93. package/dist/components/{p-DLLeEB9s.js → p-DW7If7Qd.js} +4 -5
  94. package/dist/components/p-DW7If7Qd.js.map +1 -0
  95. package/dist/components/{p-0BR5lZiC.js → p-OFgPkEGL.js} +4 -4
  96. package/dist/components/{p-0BR5lZiC.js.map → p-OFgPkEGL.js.map} +1 -1
  97. package/dist/components/{p-CdHCR-Rr.js → p-aK_x2dmu.js} +3 -3
  98. package/dist/components/{p-CdHCR-Rr.js.map → p-aK_x2dmu.js.map} +1 -1
  99. package/dist/components/{p-C-x5thNz.js → p-sXNEbeK0.js} +3 -3
  100. package/dist/components/{p-C-x5thNz.js.map → p-sXNEbeK0.js.map} +1 -1
  101. package/dist/components/pcm-1zhanshi-mnms-modal.js +5 -5
  102. package/dist/components/pcm-app-chat-modal.js +1 -1
  103. package/dist/components/pcm-ats-mnms-modal.js +5 -5
  104. package/dist/components/pcm-card.js +1 -1
  105. package/dist/components/pcm-hr-chat-modal.js +2 -2
  106. package/dist/components/pcm-htws-modal.js +15 -9
  107. package/dist/components/pcm-htws-modal.js.map +1 -1
  108. package/dist/components/pcm-hyzj-modal.js +12 -6
  109. package/dist/components/pcm-hyzj-modal.js.map +1 -1
  110. package/dist/components/pcm-jd-modal.js +13 -7
  111. package/dist/components/pcm-jd-modal.js.map +1 -1
  112. package/dist/components/pcm-jlpp-modal.js +8 -8
  113. package/dist/components/pcm-jlsx-modal.js +6 -6
  114. package/dist/components/pcm-jlzz-modal.js +6 -6
  115. package/dist/components/pcm-mnct-modal.js +14 -8
  116. package/dist/components/pcm-mnct-modal.js.map +1 -1
  117. package/dist/components/pcm-mnms-modal.js +8 -8
  118. package/dist/components/pcm-mnms-zp-modal.js +8 -8
  119. package/dist/components/pcm-msbg-modal.js +12 -6
  120. package/dist/components/pcm-msbg-modal.js.map +1 -1
  121. package/dist/components/pcm-qgqjl-modal.js +16 -10
  122. package/dist/components/pcm-qgqjl-modal.js.map +1 -1
  123. package/dist/components/pcm-virtual-chat-modal.js +1 -1
  124. package/dist/components/pcm-zsk-chat-modal.js +3 -3
  125. package/dist/components/pcm-zygh-modal.js +14 -8
  126. package/dist/components/pcm-zygh-modal.js.map +1 -1
  127. package/dist/components/pcm-zygh-v2-modal.js +14 -8
  128. package/dist/components/pcm-zygh-v2-modal.js.map +1 -1
  129. package/dist/esm/app-globals-Chti62re.js.map +1 -1
  130. package/dist/esm/components-chat-message_33.entry.js +54 -2317
  131. package/dist/esm/components-chat-message_33.entry.js.map +1 -1
  132. package/dist/esm/components-oem-virtual-chat-modal.entry.js +2 -2
  133. package/dist/esm/{conversation-utils-fCK0sgM1.js → conversation-utils-BGcxaSyr.js} +4 -4
  134. package/dist/esm/{conversation-utils-fCK0sgM1.js.map → conversation-utils-BGcxaSyr.js.map} +1 -1
  135. package/dist/esm/{index-D7qB8ZCs.js → index-BaYctFVD.js} +3 -3
  136. package/dist/esm/{index-D7qB8ZCs.js.map → index-BaYctFVD.js.map} +1 -1
  137. package/dist/esm/index.js +1 -1
  138. package/dist/esm/loader.js +1 -1
  139. package/dist/esm/markdown-CnhOGURu.js +2671 -0
  140. package/dist/esm/{markdown-DcmYnk0q.js.map → markdown-CnhOGURu.js.map} +1 -1
  141. package/dist/esm/oem-cast-modal.entry.js +1 -1
  142. package/dist/esm/oem-htws-modal.entry.js +1 -1
  143. package/dist/esm/oem-jd-modal.entry.js +2 -2
  144. package/dist/esm/oem-jlpp-modal.entry.js +1 -1
  145. package/dist/esm/oem-jlzz-modal.entry.js +1 -1
  146. package/dist/esm/oem-mnct-modal.entry.js +1 -1
  147. package/dist/esm/oem-mnms-modal.entry.js +1 -1
  148. package/dist/esm/oem-qgqjl-modal.entry.js +3 -3
  149. package/dist/esm/pcm-agents.js +1 -1
  150. package/dist/esm/pcm-hr-chat-modal.entry.js +2 -2
  151. package/dist/esm/pcm-jlsx-modal.entry.js +3 -3
  152. package/dist/esm/{sentry-reporter-CAPKrssw.js → sentry-reporter-CQ8bX8AM.js} +3 -3
  153. package/dist/esm/{sentry-reporter-CAPKrssw.js.map → sentry-reporter-CQ8bX8AM.js.map} +1 -1
  154. package/dist/pcm-agents/index.esm.js +1 -1
  155. package/dist/pcm-agents/{p-ae9f3219.entry.js → p-07d0bfa5.entry.js} +2 -2
  156. package/dist/pcm-agents/{p-e908843d.entry.js → p-415d021b.entry.js} +2 -2
  157. package/dist/pcm-agents/{p-4a3091a0.entry.js → p-52b8396f.entry.js} +2 -2
  158. package/dist/pcm-agents/{p-713ee0b3.entry.js → p-85b37d21.entry.js} +2 -2
  159. package/dist/pcm-agents/{p-2acf8d44.entry.js → p-86c15766.entry.js} +2 -2
  160. package/dist/pcm-agents/{p-b45645c2.entry.js → p-900ade9f.entry.js} +2 -2
  161. package/dist/pcm-agents/{p-C1T6GEE8.js → p-BUe4kiCQ.js} +2 -2
  162. package/dist/pcm-agents/{p-C1T6GEE8.js.map → p-BUe4kiCQ.js.map} +1 -1
  163. package/dist/pcm-agents/p-CeRTfvY9.js.map +1 -1
  164. package/dist/pcm-agents/p-CnhOGURu.js +2 -0
  165. package/dist/pcm-agents/{p-DcmYnk0q.js.map → p-CnhOGURu.js.map} +1 -1
  166. package/dist/pcm-agents/{p-Cgydfo3f.js → p-DpK1mBu7.js} +2 -2
  167. package/dist/pcm-agents/{p-Cgydfo3f.js.map → p-DpK1mBu7.js.map} +1 -1
  168. package/dist/pcm-agents/{p-MWaXn7-C.js → p-DzZpAxqF.js} +2 -2
  169. package/dist/pcm-agents/{p-MWaXn7-C.js.map → p-DzZpAxqF.js.map} +1 -1
  170. package/dist/pcm-agents/{p-e18cbbc1.entry.js → p-a33ebff7.entry.js} +2 -2
  171. package/dist/pcm-agents/{p-081b9fcf.entry.js → p-be640465.entry.js} +2 -2
  172. package/dist/pcm-agents/{p-19e22dee.entry.js → p-c95e6896.entry.js} +2 -2
  173. package/dist/pcm-agents/{p-50af907f.entry.js → p-cd2844d8.entry.js} +2 -2
  174. package/dist/pcm-agents/{p-08b41c0c.entry.js → p-d25b1c70.entry.js} +2 -2
  175. package/dist/pcm-agents/p-f2445cbd.entry.js +8 -0
  176. package/dist/pcm-agents/p-f2445cbd.entry.js.map +1 -0
  177. package/dist/pcm-agents/pcm-agents.esm.js +1 -1
  178. package/dist/types/components/pcm-htws-modal/pcm-htws-modal.d.ts +5 -0
  179. package/dist/types/components/pcm-hyzj-modal/pcm-hyzj-modal.d.ts +5 -0
  180. package/dist/types/components/pcm-jd-modal/pcm-jd-modal.d.ts +5 -0
  181. package/dist/types/components/pcm-mnct-modal/pcm-mnct-modal.d.ts +5 -0
  182. package/dist/types/components/pcm-msbg-modal/pcm-msbg-modal.d.ts +5 -0
  183. package/dist/types/components/pcm-qgqjl-modal/pcm-qgqjl-modal.d.ts +5 -0
  184. package/dist/types/components/pcm-zygh-modal/pcm-zygh-modal.d.ts +5 -0
  185. package/dist/types/components/pcm-zygh-v2-modal/pcm-zygh-v2-modal.d.ts +5 -0
  186. package/dist/types/components.d.ts +64 -0
  187. package/package.json +1 -1
  188. package/readme.md +307 -307
  189. package/dist/cjs/markdown-D3_atg0b.js +0 -2564
  190. package/dist/components/p-B85MJLTf.js +0 -8
  191. package/dist/components/p-B85MJLTf.js.map +0 -1
  192. package/dist/components/p-CXalGxO1.js.map +0 -1
  193. package/dist/components/p-D483moFs.js +0 -2310
  194. package/dist/components/p-D483moFs.js.map +0 -1
  195. package/dist/components/p-DLLeEB9s.js.map +0 -1
  196. package/dist/components/p-DuXrU5Qi.js +0 -2559
  197. package/dist/components/p-DuXrU5Qi.js.map +0 -1
  198. package/dist/esm/markdown-DcmYnk0q.js +0 -2561
  199. package/dist/pcm-agents/p-4c6e5c43.entry.js +0 -8
  200. package/dist/pcm-agents/p-4c6e5c43.entry.js.map +0 -1
  201. package/dist/pcm-agents/p-DcmYnk0q.js +0 -2
  202. /package/dist/pcm-agents/{p-ae9f3219.entry.js.map → p-07d0bfa5.entry.js.map} +0 -0
  203. /package/dist/pcm-agents/{p-e908843d.entry.js.map → p-415d021b.entry.js.map} +0 -0
  204. /package/dist/pcm-agents/{p-4a3091a0.entry.js.map → p-52b8396f.entry.js.map} +0 -0
  205. /package/dist/pcm-agents/{p-713ee0b3.entry.js.map → p-85b37d21.entry.js.map} +0 -0
  206. /package/dist/pcm-agents/{p-2acf8d44.entry.js.map → p-86c15766.entry.js.map} +0 -0
  207. /package/dist/pcm-agents/{p-b45645c2.entry.js.map → p-900ade9f.entry.js.map} +0 -0
  208. /package/dist/pcm-agents/{p-e18cbbc1.entry.js.map → p-a33ebff7.entry.js.map} +0 -0
  209. /package/dist/pcm-agents/{p-081b9fcf.entry.js.map → p-be640465.entry.js.map} +0 -0
  210. /package/dist/pcm-agents/{p-19e22dee.entry.js.map → p-c95e6896.entry.js.map} +0 -0
  211. /package/dist/pcm-agents/{p-50af907f.entry.js.map → p-cd2844d8.entry.js.map} +0 -0
  212. /package/dist/pcm-agents/{p-08b41c0c.entry.js.map → p-d25b1c70.entry.js.map} +0 -0
  213. /package/dist/types/code/{agents-sdk → sdk}/packages/pcm-agents/.stencil/store/auth.store.d.ts +0 -0
  214. /package/dist/types/code/{agents-sdk → sdk}/packages/pcm-agents/.stencil/store/config.store.d.ts +0 -0
@@ -1,13 +1,14 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-C_qhED9Z.js');
4
- var markdown = require('./markdown-D3_atg0b.js');
5
- var index$1 = require('./index-BivNZVuE.js');
4
+ var markdown = require('./markdown-C0QWZi9Q.js');
5
+ var index$1 = require('./index-DLbq5wiz.js');
6
6
  var errorEvent = require('./error-event-J_ZWIqWF.js');
7
- var sentryReporter = require('./sentry-reporter-Ck3EoJAs.js');
7
+ var sentryReporter = require('./sentry-reporter-BmrqhSKs.js');
8
8
  var message_service = require('./message.service-BLgUOl2N.js');
9
+ var qrcode = require('qrcode-generator');
9
10
  var messageUtils = require('./message-utils-C8eJnzLy.js');
10
- var conversationUtils = require('./conversation-utils-BmxHPKOt.js');
11
+ var conversationUtils = require('./conversation-utils-CKlwCDRf.js');
11
12
  require('./exports-Dc-pQh4A.js');
12
13
 
13
14
  var clipboard$1 = {exports: {}};
@@ -2266,2310 +2267,6 @@ const ComponentsMessage = class {
2266
2267
  };
2267
2268
  ComponentsMessage.style = componentsMessageCss + hostCss$p;
2268
2269
 
2269
- var qrcode$1 = {exports: {}};
2270
-
2271
- var hasRequiredQrcode;
2272
-
2273
- function requireQrcode () {
2274
- if (hasRequiredQrcode) return qrcode$1.exports;
2275
- hasRequiredQrcode = 1;
2276
- (function (module, exports) {
2277
- //---------------------------------------------------------------------
2278
- //
2279
- // QR Code Generator for JavaScript
2280
- //
2281
- // Copyright (c) 2009 Kazuhiko Arase
2282
- //
2283
- // URL: http://www.d-project.com/
2284
- //
2285
- // Licensed under the MIT license:
2286
- // http://www.opensource.org/licenses/mit-license.php
2287
- //
2288
- // The word 'QR Code' is registered trademark of
2289
- // DENSO WAVE INCORPORATED
2290
- // http://www.denso-wave.com/qrcode/faqpatent-e.html
2291
- //
2292
- //---------------------------------------------------------------------
2293
-
2294
- var qrcode = function() {
2295
-
2296
- //---------------------------------------------------------------------
2297
- // qrcode
2298
- //---------------------------------------------------------------------
2299
-
2300
- /**
2301
- * qrcode
2302
- * @param typeNumber 1 to 40
2303
- * @param errorCorrectionLevel 'L','M','Q','H'
2304
- */
2305
- var qrcode = function(typeNumber, errorCorrectionLevel) {
2306
-
2307
- var PAD0 = 0xEC;
2308
- var PAD1 = 0x11;
2309
-
2310
- var _typeNumber = typeNumber;
2311
- var _errorCorrectionLevel = QRErrorCorrectionLevel[errorCorrectionLevel];
2312
- var _modules = null;
2313
- var _moduleCount = 0;
2314
- var _dataCache = null;
2315
- var _dataList = [];
2316
-
2317
- var _this = {};
2318
-
2319
- var makeImpl = function(test, maskPattern) {
2320
-
2321
- _moduleCount = _typeNumber * 4 + 17;
2322
- _modules = function(moduleCount) {
2323
- var modules = new Array(moduleCount);
2324
- for (var row = 0; row < moduleCount; row += 1) {
2325
- modules[row] = new Array(moduleCount);
2326
- for (var col = 0; col < moduleCount; col += 1) {
2327
- modules[row][col] = null;
2328
- }
2329
- }
2330
- return modules;
2331
- }(_moduleCount);
2332
-
2333
- setupPositionProbePattern(0, 0);
2334
- setupPositionProbePattern(_moduleCount - 7, 0);
2335
- setupPositionProbePattern(0, _moduleCount - 7);
2336
- setupPositionAdjustPattern();
2337
- setupTimingPattern();
2338
- setupTypeInfo(test, maskPattern);
2339
-
2340
- if (_typeNumber >= 7) {
2341
- setupTypeNumber(test);
2342
- }
2343
-
2344
- if (_dataCache == null) {
2345
- _dataCache = createData(_typeNumber, _errorCorrectionLevel, _dataList);
2346
- }
2347
-
2348
- mapData(_dataCache, maskPattern);
2349
- };
2350
-
2351
- var setupPositionProbePattern = function(row, col) {
2352
-
2353
- for (var r = -1; r <= 7; r += 1) {
2354
-
2355
- if (row + r <= -1 || _moduleCount <= row + r) continue;
2356
-
2357
- for (var c = -1; c <= 7; c += 1) {
2358
-
2359
- if (col + c <= -1 || _moduleCount <= col + c) continue;
2360
-
2361
- if ( (0 <= r && r <= 6 && (c == 0 || c == 6) )
2362
- || (0 <= c && c <= 6 && (r == 0 || r == 6) )
2363
- || (2 <= r && r <= 4 && 2 <= c && c <= 4) ) {
2364
- _modules[row + r][col + c] = true;
2365
- } else {
2366
- _modules[row + r][col + c] = false;
2367
- }
2368
- }
2369
- }
2370
- };
2371
-
2372
- var getBestMaskPattern = function() {
2373
-
2374
- var minLostPoint = 0;
2375
- var pattern = 0;
2376
-
2377
- for (var i = 0; i < 8; i += 1) {
2378
-
2379
- makeImpl(true, i);
2380
-
2381
- var lostPoint = QRUtil.getLostPoint(_this);
2382
-
2383
- if (i == 0 || minLostPoint > lostPoint) {
2384
- minLostPoint = lostPoint;
2385
- pattern = i;
2386
- }
2387
- }
2388
-
2389
- return pattern;
2390
- };
2391
-
2392
- var setupTimingPattern = function() {
2393
-
2394
- for (var r = 8; r < _moduleCount - 8; r += 1) {
2395
- if (_modules[r][6] != null) {
2396
- continue;
2397
- }
2398
- _modules[r][6] = (r % 2 == 0);
2399
- }
2400
-
2401
- for (var c = 8; c < _moduleCount - 8; c += 1) {
2402
- if (_modules[6][c] != null) {
2403
- continue;
2404
- }
2405
- _modules[6][c] = (c % 2 == 0);
2406
- }
2407
- };
2408
-
2409
- var setupPositionAdjustPattern = function() {
2410
-
2411
- var pos = QRUtil.getPatternPosition(_typeNumber);
2412
-
2413
- for (var i = 0; i < pos.length; i += 1) {
2414
-
2415
- for (var j = 0; j < pos.length; j += 1) {
2416
-
2417
- var row = pos[i];
2418
- var col = pos[j];
2419
-
2420
- if (_modules[row][col] != null) {
2421
- continue;
2422
- }
2423
-
2424
- for (var r = -2; r <= 2; r += 1) {
2425
-
2426
- for (var c = -2; c <= 2; c += 1) {
2427
-
2428
- if (r == -2 || r == 2 || c == -2 || c == 2
2429
- || (r == 0 && c == 0) ) {
2430
- _modules[row + r][col + c] = true;
2431
- } else {
2432
- _modules[row + r][col + c] = false;
2433
- }
2434
- }
2435
- }
2436
- }
2437
- }
2438
- };
2439
-
2440
- var setupTypeNumber = function(test) {
2441
-
2442
- var bits = QRUtil.getBCHTypeNumber(_typeNumber);
2443
-
2444
- for (var i = 0; i < 18; i += 1) {
2445
- var mod = (!test && ( (bits >> i) & 1) == 1);
2446
- _modules[Math.floor(i / 3)][i % 3 + _moduleCount - 8 - 3] = mod;
2447
- }
2448
-
2449
- for (var i = 0; i < 18; i += 1) {
2450
- var mod = (!test && ( (bits >> i) & 1) == 1);
2451
- _modules[i % 3 + _moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
2452
- }
2453
- };
2454
-
2455
- var setupTypeInfo = function(test, maskPattern) {
2456
-
2457
- var data = (_errorCorrectionLevel << 3) | maskPattern;
2458
- var bits = QRUtil.getBCHTypeInfo(data);
2459
-
2460
- // vertical
2461
- for (var i = 0; i < 15; i += 1) {
2462
-
2463
- var mod = (!test && ( (bits >> i) & 1) == 1);
2464
-
2465
- if (i < 6) {
2466
- _modules[i][8] = mod;
2467
- } else if (i < 8) {
2468
- _modules[i + 1][8] = mod;
2469
- } else {
2470
- _modules[_moduleCount - 15 + i][8] = mod;
2471
- }
2472
- }
2473
-
2474
- // horizontal
2475
- for (var i = 0; i < 15; i += 1) {
2476
-
2477
- var mod = (!test && ( (bits >> i) & 1) == 1);
2478
-
2479
- if (i < 8) {
2480
- _modules[8][_moduleCount - i - 1] = mod;
2481
- } else if (i < 9) {
2482
- _modules[8][15 - i - 1 + 1] = mod;
2483
- } else {
2484
- _modules[8][15 - i - 1] = mod;
2485
- }
2486
- }
2487
-
2488
- // fixed module
2489
- _modules[_moduleCount - 8][8] = (!test);
2490
- };
2491
-
2492
- var mapData = function(data, maskPattern) {
2493
-
2494
- var inc = -1;
2495
- var row = _moduleCount - 1;
2496
- var bitIndex = 7;
2497
- var byteIndex = 0;
2498
- var maskFunc = QRUtil.getMaskFunction(maskPattern);
2499
-
2500
- for (var col = _moduleCount - 1; col > 0; col -= 2) {
2501
-
2502
- if (col == 6) col -= 1;
2503
-
2504
- while (true) {
2505
-
2506
- for (var c = 0; c < 2; c += 1) {
2507
-
2508
- if (_modules[row][col - c] == null) {
2509
-
2510
- var dark = false;
2511
-
2512
- if (byteIndex < data.length) {
2513
- dark = ( ( (data[byteIndex] >>> bitIndex) & 1) == 1);
2514
- }
2515
-
2516
- var mask = maskFunc(row, col - c);
2517
-
2518
- if (mask) {
2519
- dark = !dark;
2520
- }
2521
-
2522
- _modules[row][col - c] = dark;
2523
- bitIndex -= 1;
2524
-
2525
- if (bitIndex == -1) {
2526
- byteIndex += 1;
2527
- bitIndex = 7;
2528
- }
2529
- }
2530
- }
2531
-
2532
- row += inc;
2533
-
2534
- if (row < 0 || _moduleCount <= row) {
2535
- row -= inc;
2536
- inc = -inc;
2537
- break;
2538
- }
2539
- }
2540
- }
2541
- };
2542
-
2543
- var createBytes = function(buffer, rsBlocks) {
2544
-
2545
- var offset = 0;
2546
-
2547
- var maxDcCount = 0;
2548
- var maxEcCount = 0;
2549
-
2550
- var dcdata = new Array(rsBlocks.length);
2551
- var ecdata = new Array(rsBlocks.length);
2552
-
2553
- for (var r = 0; r < rsBlocks.length; r += 1) {
2554
-
2555
- var dcCount = rsBlocks[r].dataCount;
2556
- var ecCount = rsBlocks[r].totalCount - dcCount;
2557
-
2558
- maxDcCount = Math.max(maxDcCount, dcCount);
2559
- maxEcCount = Math.max(maxEcCount, ecCount);
2560
-
2561
- dcdata[r] = new Array(dcCount);
2562
-
2563
- for (var i = 0; i < dcdata[r].length; i += 1) {
2564
- dcdata[r][i] = 0xff & buffer.getBuffer()[i + offset];
2565
- }
2566
- offset += dcCount;
2567
-
2568
- var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
2569
- var rawPoly = qrPolynomial(dcdata[r], rsPoly.getLength() - 1);
2570
-
2571
- var modPoly = rawPoly.mod(rsPoly);
2572
- ecdata[r] = new Array(rsPoly.getLength() - 1);
2573
- for (var i = 0; i < ecdata[r].length; i += 1) {
2574
- var modIndex = i + modPoly.getLength() - ecdata[r].length;
2575
- ecdata[r][i] = (modIndex >= 0)? modPoly.getAt(modIndex) : 0;
2576
- }
2577
- }
2578
-
2579
- var totalCodeCount = 0;
2580
- for (var i = 0; i < rsBlocks.length; i += 1) {
2581
- totalCodeCount += rsBlocks[i].totalCount;
2582
- }
2583
-
2584
- var data = new Array(totalCodeCount);
2585
- var index = 0;
2586
-
2587
- for (var i = 0; i < maxDcCount; i += 1) {
2588
- for (var r = 0; r < rsBlocks.length; r += 1) {
2589
- if (i < dcdata[r].length) {
2590
- data[index] = dcdata[r][i];
2591
- index += 1;
2592
- }
2593
- }
2594
- }
2595
-
2596
- for (var i = 0; i < maxEcCount; i += 1) {
2597
- for (var r = 0; r < rsBlocks.length; r += 1) {
2598
- if (i < ecdata[r].length) {
2599
- data[index] = ecdata[r][i];
2600
- index += 1;
2601
- }
2602
- }
2603
- }
2604
-
2605
- return data;
2606
- };
2607
-
2608
- var createData = function(typeNumber, errorCorrectionLevel, dataList) {
2609
-
2610
- var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectionLevel);
2611
-
2612
- var buffer = qrBitBuffer();
2613
-
2614
- for (var i = 0; i < dataList.length; i += 1) {
2615
- var data = dataList[i];
2616
- buffer.put(data.getMode(), 4);
2617
- buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber) );
2618
- data.write(buffer);
2619
- }
2620
-
2621
- // calc num max data.
2622
- var totalDataCount = 0;
2623
- for (var i = 0; i < rsBlocks.length; i += 1) {
2624
- totalDataCount += rsBlocks[i].dataCount;
2625
- }
2626
-
2627
- if (buffer.getLengthInBits() > totalDataCount * 8) {
2628
- throw 'code length overflow. ('
2629
- + buffer.getLengthInBits()
2630
- + '>'
2631
- + totalDataCount * 8
2632
- + ')';
2633
- }
2634
-
2635
- // end code
2636
- if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {
2637
- buffer.put(0, 4);
2638
- }
2639
-
2640
- // padding
2641
- while (buffer.getLengthInBits() % 8 != 0) {
2642
- buffer.putBit(false);
2643
- }
2644
-
2645
- // padding
2646
- while (true) {
2647
-
2648
- if (buffer.getLengthInBits() >= totalDataCount * 8) {
2649
- break;
2650
- }
2651
- buffer.put(PAD0, 8);
2652
-
2653
- if (buffer.getLengthInBits() >= totalDataCount * 8) {
2654
- break;
2655
- }
2656
- buffer.put(PAD1, 8);
2657
- }
2658
-
2659
- return createBytes(buffer, rsBlocks);
2660
- };
2661
-
2662
- _this.addData = function(data, mode) {
2663
-
2664
- mode = mode || 'Byte';
2665
-
2666
- var newData = null;
2667
-
2668
- switch(mode) {
2669
- case 'Numeric' :
2670
- newData = qrNumber(data);
2671
- break;
2672
- case 'Alphanumeric' :
2673
- newData = qrAlphaNum(data);
2674
- break;
2675
- case 'Byte' :
2676
- newData = qr8BitByte(data);
2677
- break;
2678
- case 'Kanji' :
2679
- newData = qrKanji(data);
2680
- break;
2681
- default :
2682
- throw 'mode:' + mode;
2683
- }
2684
-
2685
- _dataList.push(newData);
2686
- _dataCache = null;
2687
- };
2688
-
2689
- _this.isDark = function(row, col) {
2690
- if (row < 0 || _moduleCount <= row || col < 0 || _moduleCount <= col) {
2691
- throw row + ',' + col;
2692
- }
2693
- return _modules[row][col];
2694
- };
2695
-
2696
- _this.getModuleCount = function() {
2697
- return _moduleCount;
2698
- };
2699
-
2700
- _this.make = function() {
2701
- if (_typeNumber < 1) {
2702
- var typeNumber = 1;
2703
-
2704
- for (; typeNumber < 40; typeNumber++) {
2705
- var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, _errorCorrectionLevel);
2706
- var buffer = qrBitBuffer();
2707
-
2708
- for (var i = 0; i < _dataList.length; i++) {
2709
- var data = _dataList[i];
2710
- buffer.put(data.getMode(), 4);
2711
- buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber) );
2712
- data.write(buffer);
2713
- }
2714
-
2715
- var totalDataCount = 0;
2716
- for (var i = 0; i < rsBlocks.length; i++) {
2717
- totalDataCount += rsBlocks[i].dataCount;
2718
- }
2719
-
2720
- if (buffer.getLengthInBits() <= totalDataCount * 8) {
2721
- break;
2722
- }
2723
- }
2724
-
2725
- _typeNumber = typeNumber;
2726
- }
2727
-
2728
- makeImpl(false, getBestMaskPattern() );
2729
- };
2730
-
2731
- _this.createTableTag = function(cellSize, margin) {
2732
-
2733
- cellSize = cellSize || 2;
2734
- margin = (typeof margin == 'undefined')? cellSize * 4 : margin;
2735
-
2736
- var qrHtml = '';
2737
-
2738
- qrHtml += '<table style="';
2739
- qrHtml += ' border-width: 0px; border-style: none;';
2740
- qrHtml += ' border-collapse: collapse;';
2741
- qrHtml += ' padding: 0px; margin: ' + margin + 'px;';
2742
- qrHtml += '">';
2743
- qrHtml += '<tbody>';
2744
-
2745
- for (var r = 0; r < _this.getModuleCount(); r += 1) {
2746
-
2747
- qrHtml += '<tr>';
2748
-
2749
- for (var c = 0; c < _this.getModuleCount(); c += 1) {
2750
- qrHtml += '<td style="';
2751
- qrHtml += ' border-width: 0px; border-style: none;';
2752
- qrHtml += ' border-collapse: collapse;';
2753
- qrHtml += ' padding: 0px; margin: 0px;';
2754
- qrHtml += ' width: ' + cellSize + 'px;';
2755
- qrHtml += ' height: ' + cellSize + 'px;';
2756
- qrHtml += ' background-color: ';
2757
- qrHtml += _this.isDark(r, c)? '#000000' : '#ffffff';
2758
- qrHtml += ';';
2759
- qrHtml += '"/>';
2760
- }
2761
-
2762
- qrHtml += '</tr>';
2763
- }
2764
-
2765
- qrHtml += '</tbody>';
2766
- qrHtml += '</table>';
2767
-
2768
- return qrHtml;
2769
- };
2770
-
2771
- _this.createSvgTag = function(cellSize, margin, alt, title) {
2772
-
2773
- var opts = {};
2774
- if (typeof arguments[0] == 'object') {
2775
- // Called by options.
2776
- opts = arguments[0];
2777
- // overwrite cellSize and margin.
2778
- cellSize = opts.cellSize;
2779
- margin = opts.margin;
2780
- alt = opts.alt;
2781
- title = opts.title;
2782
- }
2783
-
2784
- cellSize = cellSize || 2;
2785
- margin = (typeof margin == 'undefined')? cellSize * 4 : margin;
2786
-
2787
- // Compose alt property surrogate
2788
- alt = (typeof alt === 'string') ? {text: alt} : alt || {};
2789
- alt.text = alt.text || null;
2790
- alt.id = (alt.text) ? alt.id || 'qrcode-description' : null;
2791
-
2792
- // Compose title property surrogate
2793
- title = (typeof title === 'string') ? {text: title} : title || {};
2794
- title.text = title.text || null;
2795
- title.id = (title.text) ? title.id || 'qrcode-title' : null;
2796
-
2797
- var size = _this.getModuleCount() * cellSize + margin * 2;
2798
- var c, mc, r, mr, qrSvg='', rect;
2799
-
2800
- rect = 'l' + cellSize + ',0 0,' + cellSize +
2801
- ' -' + cellSize + ',0 0,-' + cellSize + 'z ';
2802
-
2803
- qrSvg += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"';
2804
- qrSvg += !opts.scalable ? ' width="' + size + 'px" height="' + size + 'px"' : '';
2805
- qrSvg += ' viewBox="0 0 ' + size + ' ' + size + '" ';
2806
- qrSvg += ' preserveAspectRatio="xMinYMin meet"';
2807
- qrSvg += (title.text || alt.text) ? ' role="img" aria-labelledby="' +
2808
- escapeXml([title.id, alt.id].join(' ').trim() ) + '"' : '';
2809
- qrSvg += '>';
2810
- qrSvg += (title.text) ? '<title id="' + escapeXml(title.id) + '">' +
2811
- escapeXml(title.text) + '</title>' : '';
2812
- qrSvg += (alt.text) ? '<description id="' + escapeXml(alt.id) + '">' +
2813
- escapeXml(alt.text) + '</description>' : '';
2814
- qrSvg += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>';
2815
- qrSvg += '<path d="';
2816
-
2817
- for (r = 0; r < _this.getModuleCount(); r += 1) {
2818
- mr = r * cellSize + margin;
2819
- for (c = 0; c < _this.getModuleCount(); c += 1) {
2820
- if (_this.isDark(r, c) ) {
2821
- mc = c*cellSize+margin;
2822
- qrSvg += 'M' + mc + ',' + mr + rect;
2823
- }
2824
- }
2825
- }
2826
-
2827
- qrSvg += '" stroke="transparent" fill="black"/>';
2828
- qrSvg += '</svg>';
2829
-
2830
- return qrSvg;
2831
- };
2832
-
2833
- _this.createDataURL = function(cellSize, margin) {
2834
-
2835
- cellSize = cellSize || 2;
2836
- margin = (typeof margin == 'undefined')? cellSize * 4 : margin;
2837
-
2838
- var size = _this.getModuleCount() * cellSize + margin * 2;
2839
- var min = margin;
2840
- var max = size - margin;
2841
-
2842
- return createDataURL(size, size, function(x, y) {
2843
- if (min <= x && x < max && min <= y && y < max) {
2844
- var c = Math.floor( (x - min) / cellSize);
2845
- var r = Math.floor( (y - min) / cellSize);
2846
- return _this.isDark(r, c)? 0 : 1;
2847
- } else {
2848
- return 1;
2849
- }
2850
- } );
2851
- };
2852
-
2853
- _this.createImgTag = function(cellSize, margin, alt) {
2854
-
2855
- cellSize = cellSize || 2;
2856
- margin = (typeof margin == 'undefined')? cellSize * 4 : margin;
2857
-
2858
- var size = _this.getModuleCount() * cellSize + margin * 2;
2859
-
2860
- var img = '';
2861
- img += '<img';
2862
- img += '\u0020src="';
2863
- img += _this.createDataURL(cellSize, margin);
2864
- img += '"';
2865
- img += '\u0020width="';
2866
- img += size;
2867
- img += '"';
2868
- img += '\u0020height="';
2869
- img += size;
2870
- img += '"';
2871
- if (alt) {
2872
- img += '\u0020alt="';
2873
- img += escapeXml(alt);
2874
- img += '"';
2875
- }
2876
- img += '/>';
2877
-
2878
- return img;
2879
- };
2880
-
2881
- var escapeXml = function(s) {
2882
- var escaped = '';
2883
- for (var i = 0; i < s.length; i += 1) {
2884
- var c = s.charAt(i);
2885
- switch(c) {
2886
- case '<': escaped += '&lt;'; break;
2887
- case '>': escaped += '&gt;'; break;
2888
- case '&': escaped += '&amp;'; break;
2889
- case '"': escaped += '&quot;'; break;
2890
- default : escaped += c; break;
2891
- }
2892
- }
2893
- return escaped;
2894
- };
2895
-
2896
- var _createHalfASCII = function(margin) {
2897
- var cellSize = 1;
2898
- margin = (typeof margin == 'undefined')? cellSize * 2 : margin;
2899
-
2900
- var size = _this.getModuleCount() * cellSize + margin * 2;
2901
- var min = margin;
2902
- var max = size - margin;
2903
-
2904
- var y, x, r1, r2, p;
2905
-
2906
- var blocks = {
2907
- '██': '█',
2908
- '█ ': '▀',
2909
- ' █': '▄',
2910
- ' ': ' '
2911
- };
2912
-
2913
- var blocksLastLineNoMargin = {
2914
- '██': '▀',
2915
- '█ ': '▀',
2916
- ' █': ' ',
2917
- ' ': ' '
2918
- };
2919
-
2920
- var ascii = '';
2921
- for (y = 0; y < size; y += 2) {
2922
- r1 = Math.floor((y - min) / cellSize);
2923
- r2 = Math.floor((y + 1 - min) / cellSize);
2924
- for (x = 0; x < size; x += 1) {
2925
- p = '█';
2926
-
2927
- if (min <= x && x < max && min <= y && y < max && _this.isDark(r1, Math.floor((x - min) / cellSize))) {
2928
- p = ' ';
2929
- }
2930
-
2931
- if (min <= x && x < max && min <= y+1 && y+1 < max && _this.isDark(r2, Math.floor((x - min) / cellSize))) {
2932
- p += ' ';
2933
- }
2934
- else {
2935
- p += '█';
2936
- }
2937
-
2938
- // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square.
2939
- ascii += (margin < 1 && y+1 >= max) ? blocksLastLineNoMargin[p] : blocks[p];
2940
- }
2941
-
2942
- ascii += '\n';
2943
- }
2944
-
2945
- if (size % 2 && margin > 0) {
2946
- return ascii.substring(0, ascii.length - size - 1) + Array(size+1).join('▀');
2947
- }
2948
-
2949
- return ascii.substring(0, ascii.length-1);
2950
- };
2951
-
2952
- _this.createASCII = function(cellSize, margin) {
2953
- cellSize = cellSize || 1;
2954
-
2955
- if (cellSize < 2) {
2956
- return _createHalfASCII(margin);
2957
- }
2958
-
2959
- cellSize -= 1;
2960
- margin = (typeof margin == 'undefined')? cellSize * 2 : margin;
2961
-
2962
- var size = _this.getModuleCount() * cellSize + margin * 2;
2963
- var min = margin;
2964
- var max = size - margin;
2965
-
2966
- var y, x, r, p;
2967
-
2968
- var white = Array(cellSize+1).join('██');
2969
- var black = Array(cellSize+1).join(' ');
2970
-
2971
- var ascii = '';
2972
- var line = '';
2973
- for (y = 0; y < size; y += 1) {
2974
- r = Math.floor( (y - min) / cellSize);
2975
- line = '';
2976
- for (x = 0; x < size; x += 1) {
2977
- p = 1;
2978
-
2979
- if (min <= x && x < max && min <= y && y < max && _this.isDark(r, Math.floor((x - min) / cellSize))) {
2980
- p = 0;
2981
- }
2982
-
2983
- // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square.
2984
- line += p ? white : black;
2985
- }
2986
-
2987
- for (r = 0; r < cellSize; r += 1) {
2988
- ascii += line + '\n';
2989
- }
2990
- }
2991
-
2992
- return ascii.substring(0, ascii.length-1);
2993
- };
2994
-
2995
- _this.renderTo2dContext = function(context, cellSize) {
2996
- cellSize = cellSize || 2;
2997
- var length = _this.getModuleCount();
2998
- for (var row = 0; row < length; row++) {
2999
- for (var col = 0; col < length; col++) {
3000
- context.fillStyle = _this.isDark(row, col) ? 'black' : 'white';
3001
- context.fillRect(col * cellSize, row * cellSize, cellSize, cellSize);
3002
- }
3003
- }
3004
- };
3005
-
3006
- return _this;
3007
- };
3008
-
3009
- //---------------------------------------------------------------------
3010
- // qrcode.stringToBytes
3011
- //---------------------------------------------------------------------
3012
-
3013
- qrcode.stringToBytesFuncs = {
3014
- 'default' : function(s) {
3015
- var bytes = [];
3016
- for (var i = 0; i < s.length; i += 1) {
3017
- var c = s.charCodeAt(i);
3018
- bytes.push(c & 0xff);
3019
- }
3020
- return bytes;
3021
- }
3022
- };
3023
-
3024
- qrcode.stringToBytes = qrcode.stringToBytesFuncs['default'];
3025
-
3026
- //---------------------------------------------------------------------
3027
- // qrcode.createStringToBytes
3028
- //---------------------------------------------------------------------
3029
-
3030
- /**
3031
- * @param unicodeData base64 string of byte array.
3032
- * [16bit Unicode],[16bit Bytes], ...
3033
- * @param numChars
3034
- */
3035
- qrcode.createStringToBytes = function(unicodeData, numChars) {
3036
-
3037
- // create conversion map.
3038
-
3039
- var unicodeMap = function() {
3040
-
3041
- var bin = base64DecodeInputStream(unicodeData);
3042
- var read = function() {
3043
- var b = bin.read();
3044
- if (b == -1) throw 'eof';
3045
- return b;
3046
- };
3047
-
3048
- var count = 0;
3049
- var unicodeMap = {};
3050
- while (true) {
3051
- var b0 = bin.read();
3052
- if (b0 == -1) break;
3053
- var b1 = read();
3054
- var b2 = read();
3055
- var b3 = read();
3056
- var k = String.fromCharCode( (b0 << 8) | b1);
3057
- var v = (b2 << 8) | b3;
3058
- unicodeMap[k] = v;
3059
- count += 1;
3060
- }
3061
- if (count != numChars) {
3062
- throw count + ' != ' + numChars;
3063
- }
3064
-
3065
- return unicodeMap;
3066
- }();
3067
-
3068
- var unknownChar = '?'.charCodeAt(0);
3069
-
3070
- return function(s) {
3071
- var bytes = [];
3072
- for (var i = 0; i < s.length; i += 1) {
3073
- var c = s.charCodeAt(i);
3074
- if (c < 128) {
3075
- bytes.push(c);
3076
- } else {
3077
- var b = unicodeMap[s.charAt(i)];
3078
- if (typeof b == 'number') {
3079
- if ( (b & 0xff) == b) {
3080
- // 1byte
3081
- bytes.push(b);
3082
- } else {
3083
- // 2bytes
3084
- bytes.push(b >>> 8);
3085
- bytes.push(b & 0xff);
3086
- }
3087
- } else {
3088
- bytes.push(unknownChar);
3089
- }
3090
- }
3091
- }
3092
- return bytes;
3093
- };
3094
- };
3095
-
3096
- //---------------------------------------------------------------------
3097
- // QRMode
3098
- //---------------------------------------------------------------------
3099
-
3100
- var QRMode = {
3101
- MODE_NUMBER : 1 << 0,
3102
- MODE_ALPHA_NUM : 1 << 1,
3103
- MODE_8BIT_BYTE : 1 << 2,
3104
- MODE_KANJI : 1 << 3
3105
- };
3106
-
3107
- //---------------------------------------------------------------------
3108
- // QRErrorCorrectionLevel
3109
- //---------------------------------------------------------------------
3110
-
3111
- var QRErrorCorrectionLevel = {
3112
- L : 1,
3113
- M : 0,
3114
- Q : 3,
3115
- H : 2
3116
- };
3117
-
3118
- //---------------------------------------------------------------------
3119
- // QRMaskPattern
3120
- //---------------------------------------------------------------------
3121
-
3122
- var QRMaskPattern = {
3123
- PATTERN000 : 0,
3124
- PATTERN001 : 1,
3125
- PATTERN010 : 2,
3126
- PATTERN011 : 3,
3127
- PATTERN100 : 4,
3128
- PATTERN101 : 5,
3129
- PATTERN110 : 6,
3130
- PATTERN111 : 7
3131
- };
3132
-
3133
- //---------------------------------------------------------------------
3134
- // QRUtil
3135
- //---------------------------------------------------------------------
3136
-
3137
- var QRUtil = function() {
3138
-
3139
- var PATTERN_POSITION_TABLE = [
3140
- [],
3141
- [6, 18],
3142
- [6, 22],
3143
- [6, 26],
3144
- [6, 30],
3145
- [6, 34],
3146
- [6, 22, 38],
3147
- [6, 24, 42],
3148
- [6, 26, 46],
3149
- [6, 28, 50],
3150
- [6, 30, 54],
3151
- [6, 32, 58],
3152
- [6, 34, 62],
3153
- [6, 26, 46, 66],
3154
- [6, 26, 48, 70],
3155
- [6, 26, 50, 74],
3156
- [6, 30, 54, 78],
3157
- [6, 30, 56, 82],
3158
- [6, 30, 58, 86],
3159
- [6, 34, 62, 90],
3160
- [6, 28, 50, 72, 94],
3161
- [6, 26, 50, 74, 98],
3162
- [6, 30, 54, 78, 102],
3163
- [6, 28, 54, 80, 106],
3164
- [6, 32, 58, 84, 110],
3165
- [6, 30, 58, 86, 114],
3166
- [6, 34, 62, 90, 118],
3167
- [6, 26, 50, 74, 98, 122],
3168
- [6, 30, 54, 78, 102, 126],
3169
- [6, 26, 52, 78, 104, 130],
3170
- [6, 30, 56, 82, 108, 134],
3171
- [6, 34, 60, 86, 112, 138],
3172
- [6, 30, 58, 86, 114, 142],
3173
- [6, 34, 62, 90, 118, 146],
3174
- [6, 30, 54, 78, 102, 126, 150],
3175
- [6, 24, 50, 76, 102, 128, 154],
3176
- [6, 28, 54, 80, 106, 132, 158],
3177
- [6, 32, 58, 84, 110, 136, 162],
3178
- [6, 26, 54, 82, 110, 138, 166],
3179
- [6, 30, 58, 86, 114, 142, 170]
3180
- ];
3181
- var G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0);
3182
- var G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0);
3183
- var G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1);
3184
-
3185
- var _this = {};
3186
-
3187
- var getBCHDigit = function(data) {
3188
- var digit = 0;
3189
- while (data != 0) {
3190
- digit += 1;
3191
- data >>>= 1;
3192
- }
3193
- return digit;
3194
- };
3195
-
3196
- _this.getBCHTypeInfo = function(data) {
3197
- var d = data << 10;
3198
- while (getBCHDigit(d) - getBCHDigit(G15) >= 0) {
3199
- d ^= (G15 << (getBCHDigit(d) - getBCHDigit(G15) ) );
3200
- }
3201
- return ( (data << 10) | d) ^ G15_MASK;
3202
- };
3203
-
3204
- _this.getBCHTypeNumber = function(data) {
3205
- var d = data << 12;
3206
- while (getBCHDigit(d) - getBCHDigit(G18) >= 0) {
3207
- d ^= (G18 << (getBCHDigit(d) - getBCHDigit(G18) ) );
3208
- }
3209
- return (data << 12) | d;
3210
- };
3211
-
3212
- _this.getPatternPosition = function(typeNumber) {
3213
- return PATTERN_POSITION_TABLE[typeNumber - 1];
3214
- };
3215
-
3216
- _this.getMaskFunction = function(maskPattern) {
3217
-
3218
- switch (maskPattern) {
3219
-
3220
- case QRMaskPattern.PATTERN000 :
3221
- return function(i, j) { return (i + j) % 2 == 0; };
3222
- case QRMaskPattern.PATTERN001 :
3223
- return function(i, j) { return i % 2 == 0; };
3224
- case QRMaskPattern.PATTERN010 :
3225
- return function(i, j) { return j % 3 == 0; };
3226
- case QRMaskPattern.PATTERN011 :
3227
- return function(i, j) { return (i + j) % 3 == 0; };
3228
- case QRMaskPattern.PATTERN100 :
3229
- return function(i, j) { return (Math.floor(i / 2) + Math.floor(j / 3) ) % 2 == 0; };
3230
- case QRMaskPattern.PATTERN101 :
3231
- return function(i, j) { return (i * j) % 2 + (i * j) % 3 == 0; };
3232
- case QRMaskPattern.PATTERN110 :
3233
- return function(i, j) { return ( (i * j) % 2 + (i * j) % 3) % 2 == 0; };
3234
- case QRMaskPattern.PATTERN111 :
3235
- return function(i, j) { return ( (i * j) % 3 + (i + j) % 2) % 2 == 0; };
3236
-
3237
- default :
3238
- throw 'bad maskPattern:' + maskPattern;
3239
- }
3240
- };
3241
-
3242
- _this.getErrorCorrectPolynomial = function(errorCorrectLength) {
3243
- var a = qrPolynomial([1], 0);
3244
- for (var i = 0; i < errorCorrectLength; i += 1) {
3245
- a = a.multiply(qrPolynomial([1, QRMath.gexp(i)], 0) );
3246
- }
3247
- return a;
3248
- };
3249
-
3250
- _this.getLengthInBits = function(mode, type) {
3251
-
3252
- if (1 <= type && type < 10) {
3253
-
3254
- // 1 - 9
3255
-
3256
- switch(mode) {
3257
- case QRMode.MODE_NUMBER : return 10;
3258
- case QRMode.MODE_ALPHA_NUM : return 9;
3259
- case QRMode.MODE_8BIT_BYTE : return 8;
3260
- case QRMode.MODE_KANJI : return 8;
3261
- default :
3262
- throw 'mode:' + mode;
3263
- }
3264
-
3265
- } else if (type < 27) {
3266
-
3267
- // 10 - 26
3268
-
3269
- switch(mode) {
3270
- case QRMode.MODE_NUMBER : return 12;
3271
- case QRMode.MODE_ALPHA_NUM : return 11;
3272
- case QRMode.MODE_8BIT_BYTE : return 16;
3273
- case QRMode.MODE_KANJI : return 10;
3274
- default :
3275
- throw 'mode:' + mode;
3276
- }
3277
-
3278
- } else if (type < 41) {
3279
-
3280
- // 27 - 40
3281
-
3282
- switch(mode) {
3283
- case QRMode.MODE_NUMBER : return 14;
3284
- case QRMode.MODE_ALPHA_NUM : return 13;
3285
- case QRMode.MODE_8BIT_BYTE : return 16;
3286
- case QRMode.MODE_KANJI : return 12;
3287
- default :
3288
- throw 'mode:' + mode;
3289
- }
3290
-
3291
- } else {
3292
- throw 'type:' + type;
3293
- }
3294
- };
3295
-
3296
- _this.getLostPoint = function(qrcode) {
3297
-
3298
- var moduleCount = qrcode.getModuleCount();
3299
-
3300
- var lostPoint = 0;
3301
-
3302
- // LEVEL1
3303
-
3304
- for (var row = 0; row < moduleCount; row += 1) {
3305
- for (var col = 0; col < moduleCount; col += 1) {
3306
-
3307
- var sameCount = 0;
3308
- var dark = qrcode.isDark(row, col);
3309
-
3310
- for (var r = -1; r <= 1; r += 1) {
3311
-
3312
- if (row + r < 0 || moduleCount <= row + r) {
3313
- continue;
3314
- }
3315
-
3316
- for (var c = -1; c <= 1; c += 1) {
3317
-
3318
- if (col + c < 0 || moduleCount <= col + c) {
3319
- continue;
3320
- }
3321
-
3322
- if (r == 0 && c == 0) {
3323
- continue;
3324
- }
3325
-
3326
- if (dark == qrcode.isDark(row + r, col + c) ) {
3327
- sameCount += 1;
3328
- }
3329
- }
3330
- }
3331
-
3332
- if (sameCount > 5) {
3333
- lostPoint += (3 + sameCount - 5);
3334
- }
3335
- }
3336
- }
3337
- // LEVEL2
3338
-
3339
- for (var row = 0; row < moduleCount - 1; row += 1) {
3340
- for (var col = 0; col < moduleCount - 1; col += 1) {
3341
- var count = 0;
3342
- if (qrcode.isDark(row, col) ) count += 1;
3343
- if (qrcode.isDark(row + 1, col) ) count += 1;
3344
- if (qrcode.isDark(row, col + 1) ) count += 1;
3345
- if (qrcode.isDark(row + 1, col + 1) ) count += 1;
3346
- if (count == 0 || count == 4) {
3347
- lostPoint += 3;
3348
- }
3349
- }
3350
- }
3351
-
3352
- // LEVEL3
3353
-
3354
- for (var row = 0; row < moduleCount; row += 1) {
3355
- for (var col = 0; col < moduleCount - 6; col += 1) {
3356
- if (qrcode.isDark(row, col)
3357
- && !qrcode.isDark(row, col + 1)
3358
- && qrcode.isDark(row, col + 2)
3359
- && qrcode.isDark(row, col + 3)
3360
- && qrcode.isDark(row, col + 4)
3361
- && !qrcode.isDark(row, col + 5)
3362
- && qrcode.isDark(row, col + 6) ) {
3363
- lostPoint += 40;
3364
- }
3365
- }
3366
- }
3367
-
3368
- for (var col = 0; col < moduleCount; col += 1) {
3369
- for (var row = 0; row < moduleCount - 6; row += 1) {
3370
- if (qrcode.isDark(row, col)
3371
- && !qrcode.isDark(row + 1, col)
3372
- && qrcode.isDark(row + 2, col)
3373
- && qrcode.isDark(row + 3, col)
3374
- && qrcode.isDark(row + 4, col)
3375
- && !qrcode.isDark(row + 5, col)
3376
- && qrcode.isDark(row + 6, col) ) {
3377
- lostPoint += 40;
3378
- }
3379
- }
3380
- }
3381
-
3382
- // LEVEL4
3383
-
3384
- var darkCount = 0;
3385
-
3386
- for (var col = 0; col < moduleCount; col += 1) {
3387
- for (var row = 0; row < moduleCount; row += 1) {
3388
- if (qrcode.isDark(row, col) ) {
3389
- darkCount += 1;
3390
- }
3391
- }
3392
- }
3393
-
3394
- var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
3395
- lostPoint += ratio * 10;
3396
-
3397
- return lostPoint;
3398
- };
3399
-
3400
- return _this;
3401
- }();
3402
-
3403
- //---------------------------------------------------------------------
3404
- // QRMath
3405
- //---------------------------------------------------------------------
3406
-
3407
- var QRMath = function() {
3408
-
3409
- var EXP_TABLE = new Array(256);
3410
- var LOG_TABLE = new Array(256);
3411
-
3412
- // initialize tables
3413
- for (var i = 0; i < 8; i += 1) {
3414
- EXP_TABLE[i] = 1 << i;
3415
- }
3416
- for (var i = 8; i < 256; i += 1) {
3417
- EXP_TABLE[i] = EXP_TABLE[i - 4]
3418
- ^ EXP_TABLE[i - 5]
3419
- ^ EXP_TABLE[i - 6]
3420
- ^ EXP_TABLE[i - 8];
3421
- }
3422
- for (var i = 0; i < 255; i += 1) {
3423
- LOG_TABLE[EXP_TABLE[i] ] = i;
3424
- }
3425
-
3426
- var _this = {};
3427
-
3428
- _this.glog = function(n) {
3429
-
3430
- if (n < 1) {
3431
- throw 'glog(' + n + ')';
3432
- }
3433
-
3434
- return LOG_TABLE[n];
3435
- };
3436
-
3437
- _this.gexp = function(n) {
3438
-
3439
- while (n < 0) {
3440
- n += 255;
3441
- }
3442
-
3443
- while (n >= 256) {
3444
- n -= 255;
3445
- }
3446
-
3447
- return EXP_TABLE[n];
3448
- };
3449
-
3450
- return _this;
3451
- }();
3452
-
3453
- //---------------------------------------------------------------------
3454
- // qrPolynomial
3455
- //---------------------------------------------------------------------
3456
-
3457
- function qrPolynomial(num, shift) {
3458
-
3459
- if (typeof num.length == 'undefined') {
3460
- throw num.length + '/' + shift;
3461
- }
3462
-
3463
- var _num = function() {
3464
- var offset = 0;
3465
- while (offset < num.length && num[offset] == 0) {
3466
- offset += 1;
3467
- }
3468
- var _num = new Array(num.length - offset + shift);
3469
- for (var i = 0; i < num.length - offset; i += 1) {
3470
- _num[i] = num[i + offset];
3471
- }
3472
- return _num;
3473
- }();
3474
-
3475
- var _this = {};
3476
-
3477
- _this.getAt = function(index) {
3478
- return _num[index];
3479
- };
3480
-
3481
- _this.getLength = function() {
3482
- return _num.length;
3483
- };
3484
-
3485
- _this.multiply = function(e) {
3486
-
3487
- var num = new Array(_this.getLength() + e.getLength() - 1);
3488
-
3489
- for (var i = 0; i < _this.getLength(); i += 1) {
3490
- for (var j = 0; j < e.getLength(); j += 1) {
3491
- num[i + j] ^= QRMath.gexp(QRMath.glog(_this.getAt(i) ) + QRMath.glog(e.getAt(j) ) );
3492
- }
3493
- }
3494
-
3495
- return qrPolynomial(num, 0);
3496
- };
3497
-
3498
- _this.mod = function(e) {
3499
-
3500
- if (_this.getLength() - e.getLength() < 0) {
3501
- return _this;
3502
- }
3503
-
3504
- var ratio = QRMath.glog(_this.getAt(0) ) - QRMath.glog(e.getAt(0) );
3505
-
3506
- var num = new Array(_this.getLength() );
3507
- for (var i = 0; i < _this.getLength(); i += 1) {
3508
- num[i] = _this.getAt(i);
3509
- }
3510
-
3511
- for (var i = 0; i < e.getLength(); i += 1) {
3512
- num[i] ^= QRMath.gexp(QRMath.glog(e.getAt(i) ) + ratio);
3513
- }
3514
-
3515
- // recursive call
3516
- return qrPolynomial(num, 0).mod(e);
3517
- };
3518
-
3519
- return _this;
3520
- }
3521
- //---------------------------------------------------------------------
3522
- // QRRSBlock
3523
- //---------------------------------------------------------------------
3524
-
3525
- var QRRSBlock = function() {
3526
-
3527
- var RS_BLOCK_TABLE = [
3528
-
3529
- // L
3530
- // M
3531
- // Q
3532
- // H
3533
-
3534
- // 1
3535
- [1, 26, 19],
3536
- [1, 26, 16],
3537
- [1, 26, 13],
3538
- [1, 26, 9],
3539
-
3540
- // 2
3541
- [1, 44, 34],
3542
- [1, 44, 28],
3543
- [1, 44, 22],
3544
- [1, 44, 16],
3545
-
3546
- // 3
3547
- [1, 70, 55],
3548
- [1, 70, 44],
3549
- [2, 35, 17],
3550
- [2, 35, 13],
3551
-
3552
- // 4
3553
- [1, 100, 80],
3554
- [2, 50, 32],
3555
- [2, 50, 24],
3556
- [4, 25, 9],
3557
-
3558
- // 5
3559
- [1, 134, 108],
3560
- [2, 67, 43],
3561
- [2, 33, 15, 2, 34, 16],
3562
- [2, 33, 11, 2, 34, 12],
3563
-
3564
- // 6
3565
- [2, 86, 68],
3566
- [4, 43, 27],
3567
- [4, 43, 19],
3568
- [4, 43, 15],
3569
-
3570
- // 7
3571
- [2, 98, 78],
3572
- [4, 49, 31],
3573
- [2, 32, 14, 4, 33, 15],
3574
- [4, 39, 13, 1, 40, 14],
3575
-
3576
- // 8
3577
- [2, 121, 97],
3578
- [2, 60, 38, 2, 61, 39],
3579
- [4, 40, 18, 2, 41, 19],
3580
- [4, 40, 14, 2, 41, 15],
3581
-
3582
- // 9
3583
- [2, 146, 116],
3584
- [3, 58, 36, 2, 59, 37],
3585
- [4, 36, 16, 4, 37, 17],
3586
- [4, 36, 12, 4, 37, 13],
3587
-
3588
- // 10
3589
- [2, 86, 68, 2, 87, 69],
3590
- [4, 69, 43, 1, 70, 44],
3591
- [6, 43, 19, 2, 44, 20],
3592
- [6, 43, 15, 2, 44, 16],
3593
-
3594
- // 11
3595
- [4, 101, 81],
3596
- [1, 80, 50, 4, 81, 51],
3597
- [4, 50, 22, 4, 51, 23],
3598
- [3, 36, 12, 8, 37, 13],
3599
-
3600
- // 12
3601
- [2, 116, 92, 2, 117, 93],
3602
- [6, 58, 36, 2, 59, 37],
3603
- [4, 46, 20, 6, 47, 21],
3604
- [7, 42, 14, 4, 43, 15],
3605
-
3606
- // 13
3607
- [4, 133, 107],
3608
- [8, 59, 37, 1, 60, 38],
3609
- [8, 44, 20, 4, 45, 21],
3610
- [12, 33, 11, 4, 34, 12],
3611
-
3612
- // 14
3613
- [3, 145, 115, 1, 146, 116],
3614
- [4, 64, 40, 5, 65, 41],
3615
- [11, 36, 16, 5, 37, 17],
3616
- [11, 36, 12, 5, 37, 13],
3617
-
3618
- // 15
3619
- [5, 109, 87, 1, 110, 88],
3620
- [5, 65, 41, 5, 66, 42],
3621
- [5, 54, 24, 7, 55, 25],
3622
- [11, 36, 12, 7, 37, 13],
3623
-
3624
- // 16
3625
- [5, 122, 98, 1, 123, 99],
3626
- [7, 73, 45, 3, 74, 46],
3627
- [15, 43, 19, 2, 44, 20],
3628
- [3, 45, 15, 13, 46, 16],
3629
-
3630
- // 17
3631
- [1, 135, 107, 5, 136, 108],
3632
- [10, 74, 46, 1, 75, 47],
3633
- [1, 50, 22, 15, 51, 23],
3634
- [2, 42, 14, 17, 43, 15],
3635
-
3636
- // 18
3637
- [5, 150, 120, 1, 151, 121],
3638
- [9, 69, 43, 4, 70, 44],
3639
- [17, 50, 22, 1, 51, 23],
3640
- [2, 42, 14, 19, 43, 15],
3641
-
3642
- // 19
3643
- [3, 141, 113, 4, 142, 114],
3644
- [3, 70, 44, 11, 71, 45],
3645
- [17, 47, 21, 4, 48, 22],
3646
- [9, 39, 13, 16, 40, 14],
3647
-
3648
- // 20
3649
- [3, 135, 107, 5, 136, 108],
3650
- [3, 67, 41, 13, 68, 42],
3651
- [15, 54, 24, 5, 55, 25],
3652
- [15, 43, 15, 10, 44, 16],
3653
-
3654
- // 21
3655
- [4, 144, 116, 4, 145, 117],
3656
- [17, 68, 42],
3657
- [17, 50, 22, 6, 51, 23],
3658
- [19, 46, 16, 6, 47, 17],
3659
-
3660
- // 22
3661
- [2, 139, 111, 7, 140, 112],
3662
- [17, 74, 46],
3663
- [7, 54, 24, 16, 55, 25],
3664
- [34, 37, 13],
3665
-
3666
- // 23
3667
- [4, 151, 121, 5, 152, 122],
3668
- [4, 75, 47, 14, 76, 48],
3669
- [11, 54, 24, 14, 55, 25],
3670
- [16, 45, 15, 14, 46, 16],
3671
-
3672
- // 24
3673
- [6, 147, 117, 4, 148, 118],
3674
- [6, 73, 45, 14, 74, 46],
3675
- [11, 54, 24, 16, 55, 25],
3676
- [30, 46, 16, 2, 47, 17],
3677
-
3678
- // 25
3679
- [8, 132, 106, 4, 133, 107],
3680
- [8, 75, 47, 13, 76, 48],
3681
- [7, 54, 24, 22, 55, 25],
3682
- [22, 45, 15, 13, 46, 16],
3683
-
3684
- // 26
3685
- [10, 142, 114, 2, 143, 115],
3686
- [19, 74, 46, 4, 75, 47],
3687
- [28, 50, 22, 6, 51, 23],
3688
- [33, 46, 16, 4, 47, 17],
3689
-
3690
- // 27
3691
- [8, 152, 122, 4, 153, 123],
3692
- [22, 73, 45, 3, 74, 46],
3693
- [8, 53, 23, 26, 54, 24],
3694
- [12, 45, 15, 28, 46, 16],
3695
-
3696
- // 28
3697
- [3, 147, 117, 10, 148, 118],
3698
- [3, 73, 45, 23, 74, 46],
3699
- [4, 54, 24, 31, 55, 25],
3700
- [11, 45, 15, 31, 46, 16],
3701
-
3702
- // 29
3703
- [7, 146, 116, 7, 147, 117],
3704
- [21, 73, 45, 7, 74, 46],
3705
- [1, 53, 23, 37, 54, 24],
3706
- [19, 45, 15, 26, 46, 16],
3707
-
3708
- // 30
3709
- [5, 145, 115, 10, 146, 116],
3710
- [19, 75, 47, 10, 76, 48],
3711
- [15, 54, 24, 25, 55, 25],
3712
- [23, 45, 15, 25, 46, 16],
3713
-
3714
- // 31
3715
- [13, 145, 115, 3, 146, 116],
3716
- [2, 74, 46, 29, 75, 47],
3717
- [42, 54, 24, 1, 55, 25],
3718
- [23, 45, 15, 28, 46, 16],
3719
-
3720
- // 32
3721
- [17, 145, 115],
3722
- [10, 74, 46, 23, 75, 47],
3723
- [10, 54, 24, 35, 55, 25],
3724
- [19, 45, 15, 35, 46, 16],
3725
-
3726
- // 33
3727
- [17, 145, 115, 1, 146, 116],
3728
- [14, 74, 46, 21, 75, 47],
3729
- [29, 54, 24, 19, 55, 25],
3730
- [11, 45, 15, 46, 46, 16],
3731
-
3732
- // 34
3733
- [13, 145, 115, 6, 146, 116],
3734
- [14, 74, 46, 23, 75, 47],
3735
- [44, 54, 24, 7, 55, 25],
3736
- [59, 46, 16, 1, 47, 17],
3737
-
3738
- // 35
3739
- [12, 151, 121, 7, 152, 122],
3740
- [12, 75, 47, 26, 76, 48],
3741
- [39, 54, 24, 14, 55, 25],
3742
- [22, 45, 15, 41, 46, 16],
3743
-
3744
- // 36
3745
- [6, 151, 121, 14, 152, 122],
3746
- [6, 75, 47, 34, 76, 48],
3747
- [46, 54, 24, 10, 55, 25],
3748
- [2, 45, 15, 64, 46, 16],
3749
-
3750
- // 37
3751
- [17, 152, 122, 4, 153, 123],
3752
- [29, 74, 46, 14, 75, 47],
3753
- [49, 54, 24, 10, 55, 25],
3754
- [24, 45, 15, 46, 46, 16],
3755
-
3756
- // 38
3757
- [4, 152, 122, 18, 153, 123],
3758
- [13, 74, 46, 32, 75, 47],
3759
- [48, 54, 24, 14, 55, 25],
3760
- [42, 45, 15, 32, 46, 16],
3761
-
3762
- // 39
3763
- [20, 147, 117, 4, 148, 118],
3764
- [40, 75, 47, 7, 76, 48],
3765
- [43, 54, 24, 22, 55, 25],
3766
- [10, 45, 15, 67, 46, 16],
3767
-
3768
- // 40
3769
- [19, 148, 118, 6, 149, 119],
3770
- [18, 75, 47, 31, 76, 48],
3771
- [34, 54, 24, 34, 55, 25],
3772
- [20, 45, 15, 61, 46, 16]
3773
- ];
3774
-
3775
- var qrRSBlock = function(totalCount, dataCount) {
3776
- var _this = {};
3777
- _this.totalCount = totalCount;
3778
- _this.dataCount = dataCount;
3779
- return _this;
3780
- };
3781
-
3782
- var _this = {};
3783
-
3784
- var getRsBlockTable = function(typeNumber, errorCorrectionLevel) {
3785
-
3786
- switch(errorCorrectionLevel) {
3787
- case QRErrorCorrectionLevel.L :
3788
- return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];
3789
- case QRErrorCorrectionLevel.M :
3790
- return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];
3791
- case QRErrorCorrectionLevel.Q :
3792
- return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];
3793
- case QRErrorCorrectionLevel.H :
3794
- return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];
3795
- default :
3796
- return undefined;
3797
- }
3798
- };
3799
-
3800
- _this.getRSBlocks = function(typeNumber, errorCorrectionLevel) {
3801
-
3802
- var rsBlock = getRsBlockTable(typeNumber, errorCorrectionLevel);
3803
-
3804
- if (typeof rsBlock == 'undefined') {
3805
- throw 'bad rs block @ typeNumber:' + typeNumber +
3806
- '/errorCorrectionLevel:' + errorCorrectionLevel;
3807
- }
3808
-
3809
- var length = rsBlock.length / 3;
3810
-
3811
- var list = [];
3812
-
3813
- for (var i = 0; i < length; i += 1) {
3814
-
3815
- var count = rsBlock[i * 3 + 0];
3816
- var totalCount = rsBlock[i * 3 + 1];
3817
- var dataCount = rsBlock[i * 3 + 2];
3818
-
3819
- for (var j = 0; j < count; j += 1) {
3820
- list.push(qrRSBlock(totalCount, dataCount) );
3821
- }
3822
- }
3823
-
3824
- return list;
3825
- };
3826
-
3827
- return _this;
3828
- }();
3829
-
3830
- //---------------------------------------------------------------------
3831
- // qrBitBuffer
3832
- //---------------------------------------------------------------------
3833
-
3834
- var qrBitBuffer = function() {
3835
-
3836
- var _buffer = [];
3837
- var _length = 0;
3838
-
3839
- var _this = {};
3840
-
3841
- _this.getBuffer = function() {
3842
- return _buffer;
3843
- };
3844
-
3845
- _this.getAt = function(index) {
3846
- var bufIndex = Math.floor(index / 8);
3847
- return ( (_buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1;
3848
- };
3849
-
3850
- _this.put = function(num, length) {
3851
- for (var i = 0; i < length; i += 1) {
3852
- _this.putBit( ( (num >>> (length - i - 1) ) & 1) == 1);
3853
- }
3854
- };
3855
-
3856
- _this.getLengthInBits = function() {
3857
- return _length;
3858
- };
3859
-
3860
- _this.putBit = function(bit) {
3861
-
3862
- var bufIndex = Math.floor(_length / 8);
3863
- if (_buffer.length <= bufIndex) {
3864
- _buffer.push(0);
3865
- }
3866
-
3867
- if (bit) {
3868
- _buffer[bufIndex] |= (0x80 >>> (_length % 8) );
3869
- }
3870
-
3871
- _length += 1;
3872
- };
3873
-
3874
- return _this;
3875
- };
3876
-
3877
- //---------------------------------------------------------------------
3878
- // qrNumber
3879
- //---------------------------------------------------------------------
3880
-
3881
- var qrNumber = function(data) {
3882
-
3883
- var _mode = QRMode.MODE_NUMBER;
3884
- var _data = data;
3885
-
3886
- var _this = {};
3887
-
3888
- _this.getMode = function() {
3889
- return _mode;
3890
- };
3891
-
3892
- _this.getLength = function(buffer) {
3893
- return _data.length;
3894
- };
3895
-
3896
- _this.write = function(buffer) {
3897
-
3898
- var data = _data;
3899
-
3900
- var i = 0;
3901
-
3902
- while (i + 2 < data.length) {
3903
- buffer.put(strToNum(data.substring(i, i + 3) ), 10);
3904
- i += 3;
3905
- }
3906
-
3907
- if (i < data.length) {
3908
- if (data.length - i == 1) {
3909
- buffer.put(strToNum(data.substring(i, i + 1) ), 4);
3910
- } else if (data.length - i == 2) {
3911
- buffer.put(strToNum(data.substring(i, i + 2) ), 7);
3912
- }
3913
- }
3914
- };
3915
-
3916
- var strToNum = function(s) {
3917
- var num = 0;
3918
- for (var i = 0; i < s.length; i += 1) {
3919
- num = num * 10 + chatToNum(s.charAt(i) );
3920
- }
3921
- return num;
3922
- };
3923
-
3924
- var chatToNum = function(c) {
3925
- if ('0' <= c && c <= '9') {
3926
- return c.charCodeAt(0) - '0'.charCodeAt(0);
3927
- }
3928
- throw 'illegal char :' + c;
3929
- };
3930
-
3931
- return _this;
3932
- };
3933
-
3934
- //---------------------------------------------------------------------
3935
- // qrAlphaNum
3936
- //---------------------------------------------------------------------
3937
-
3938
- var qrAlphaNum = function(data) {
3939
-
3940
- var _mode = QRMode.MODE_ALPHA_NUM;
3941
- var _data = data;
3942
-
3943
- var _this = {};
3944
-
3945
- _this.getMode = function() {
3946
- return _mode;
3947
- };
3948
-
3949
- _this.getLength = function(buffer) {
3950
- return _data.length;
3951
- };
3952
-
3953
- _this.write = function(buffer) {
3954
-
3955
- var s = _data;
3956
-
3957
- var i = 0;
3958
-
3959
- while (i + 1 < s.length) {
3960
- buffer.put(
3961
- getCode(s.charAt(i) ) * 45 +
3962
- getCode(s.charAt(i + 1) ), 11);
3963
- i += 2;
3964
- }
3965
-
3966
- if (i < s.length) {
3967
- buffer.put(getCode(s.charAt(i) ), 6);
3968
- }
3969
- };
3970
-
3971
- var getCode = function(c) {
3972
-
3973
- if ('0' <= c && c <= '9') {
3974
- return c.charCodeAt(0) - '0'.charCodeAt(0);
3975
- } else if ('A' <= c && c <= 'Z') {
3976
- return c.charCodeAt(0) - 'A'.charCodeAt(0) + 10;
3977
- } else {
3978
- switch (c) {
3979
- case ' ' : return 36;
3980
- case '$' : return 37;
3981
- case '%' : return 38;
3982
- case '*' : return 39;
3983
- case '+' : return 40;
3984
- case '-' : return 41;
3985
- case '.' : return 42;
3986
- case '/' : return 43;
3987
- case ':' : return 44;
3988
- default :
3989
- throw 'illegal char :' + c;
3990
- }
3991
- }
3992
- };
3993
-
3994
- return _this;
3995
- };
3996
-
3997
- //---------------------------------------------------------------------
3998
- // qr8BitByte
3999
- //---------------------------------------------------------------------
4000
-
4001
- var qr8BitByte = function(data) {
4002
-
4003
- var _mode = QRMode.MODE_8BIT_BYTE;
4004
- var _bytes = qrcode.stringToBytes(data);
4005
-
4006
- var _this = {};
4007
-
4008
- _this.getMode = function() {
4009
- return _mode;
4010
- };
4011
-
4012
- _this.getLength = function(buffer) {
4013
- return _bytes.length;
4014
- };
4015
-
4016
- _this.write = function(buffer) {
4017
- for (var i = 0; i < _bytes.length; i += 1) {
4018
- buffer.put(_bytes[i], 8);
4019
- }
4020
- };
4021
-
4022
- return _this;
4023
- };
4024
-
4025
- //---------------------------------------------------------------------
4026
- // qrKanji
4027
- //---------------------------------------------------------------------
4028
-
4029
- var qrKanji = function(data) {
4030
-
4031
- var _mode = QRMode.MODE_KANJI;
4032
-
4033
- var stringToBytes = qrcode.stringToBytesFuncs['SJIS'];
4034
- if (!stringToBytes) {
4035
- throw 'sjis not supported.';
4036
- }
4037
- !function(c, code) {
4038
- // self test for sjis support.
4039
- var test = stringToBytes(c);
4040
- if (test.length != 2 || ( (test[0] << 8) | test[1]) != code) {
4041
- throw 'sjis not supported.';
4042
- }
4043
- }('\u53cb', 0x9746);
4044
-
4045
- var _bytes = stringToBytes(data);
4046
-
4047
- var _this = {};
4048
-
4049
- _this.getMode = function() {
4050
- return _mode;
4051
- };
4052
-
4053
- _this.getLength = function(buffer) {
4054
- return ~~(_bytes.length / 2);
4055
- };
4056
-
4057
- _this.write = function(buffer) {
4058
-
4059
- var data = _bytes;
4060
-
4061
- var i = 0;
4062
-
4063
- while (i + 1 < data.length) {
4064
-
4065
- var c = ( (0xff & data[i]) << 8) | (0xff & data[i + 1]);
4066
-
4067
- if (0x8140 <= c && c <= 0x9FFC) {
4068
- c -= 0x8140;
4069
- } else if (0xE040 <= c && c <= 0xEBBF) {
4070
- c -= 0xC140;
4071
- } else {
4072
- throw 'illegal char at ' + (i + 1) + '/' + c;
4073
- }
4074
-
4075
- c = ( (c >>> 8) & 0xff) * 0xC0 + (c & 0xff);
4076
-
4077
- buffer.put(c, 13);
4078
-
4079
- i += 2;
4080
- }
4081
-
4082
- if (i < data.length) {
4083
- throw 'illegal char at ' + (i + 1);
4084
- }
4085
- };
4086
-
4087
- return _this;
4088
- };
4089
-
4090
- //=====================================================================
4091
- // GIF Support etc.
4092
- //
4093
-
4094
- //---------------------------------------------------------------------
4095
- // byteArrayOutputStream
4096
- //---------------------------------------------------------------------
4097
-
4098
- var byteArrayOutputStream = function() {
4099
-
4100
- var _bytes = [];
4101
-
4102
- var _this = {};
4103
-
4104
- _this.writeByte = function(b) {
4105
- _bytes.push(b & 0xff);
4106
- };
4107
-
4108
- _this.writeShort = function(i) {
4109
- _this.writeByte(i);
4110
- _this.writeByte(i >>> 8);
4111
- };
4112
-
4113
- _this.writeBytes = function(b, off, len) {
4114
- off = off || 0;
4115
- len = len || b.length;
4116
- for (var i = 0; i < len; i += 1) {
4117
- _this.writeByte(b[i + off]);
4118
- }
4119
- };
4120
-
4121
- _this.writeString = function(s) {
4122
- for (var i = 0; i < s.length; i += 1) {
4123
- _this.writeByte(s.charCodeAt(i) );
4124
- }
4125
- };
4126
-
4127
- _this.toByteArray = function() {
4128
- return _bytes;
4129
- };
4130
-
4131
- _this.toString = function() {
4132
- var s = '';
4133
- s += '[';
4134
- for (var i = 0; i < _bytes.length; i += 1) {
4135
- if (i > 0) {
4136
- s += ',';
4137
- }
4138
- s += _bytes[i];
4139
- }
4140
- s += ']';
4141
- return s;
4142
- };
4143
-
4144
- return _this;
4145
- };
4146
-
4147
- //---------------------------------------------------------------------
4148
- // base64EncodeOutputStream
4149
- //---------------------------------------------------------------------
4150
-
4151
- var base64EncodeOutputStream = function() {
4152
-
4153
- var _buffer = 0;
4154
- var _buflen = 0;
4155
- var _length = 0;
4156
- var _base64 = '';
4157
-
4158
- var _this = {};
4159
-
4160
- var writeEncoded = function(b) {
4161
- _base64 += String.fromCharCode(encode(b & 0x3f) );
4162
- };
4163
-
4164
- var encode = function(n) {
4165
- if (n < 0) ; else if (n < 26) {
4166
- return 0x41 + n;
4167
- } else if (n < 52) {
4168
- return 0x61 + (n - 26);
4169
- } else if (n < 62) {
4170
- return 0x30 + (n - 52);
4171
- } else if (n == 62) {
4172
- return 0x2b;
4173
- } else if (n == 63) {
4174
- return 0x2f;
4175
- }
4176
- throw 'n:' + n;
4177
- };
4178
-
4179
- _this.writeByte = function(n) {
4180
-
4181
- _buffer = (_buffer << 8) | (n & 0xff);
4182
- _buflen += 8;
4183
- _length += 1;
4184
-
4185
- while (_buflen >= 6) {
4186
- writeEncoded(_buffer >>> (_buflen - 6) );
4187
- _buflen -= 6;
4188
- }
4189
- };
4190
-
4191
- _this.flush = function() {
4192
-
4193
- if (_buflen > 0) {
4194
- writeEncoded(_buffer << (6 - _buflen) );
4195
- _buffer = 0;
4196
- _buflen = 0;
4197
- }
4198
-
4199
- if (_length % 3 != 0) {
4200
- // padding
4201
- var padlen = 3 - _length % 3;
4202
- for (var i = 0; i < padlen; i += 1) {
4203
- _base64 += '=';
4204
- }
4205
- }
4206
- };
4207
-
4208
- _this.toString = function() {
4209
- return _base64;
4210
- };
4211
-
4212
- return _this;
4213
- };
4214
-
4215
- //---------------------------------------------------------------------
4216
- // base64DecodeInputStream
4217
- //---------------------------------------------------------------------
4218
-
4219
- var base64DecodeInputStream = function(str) {
4220
-
4221
- var _str = str;
4222
- var _pos = 0;
4223
- var _buffer = 0;
4224
- var _buflen = 0;
4225
-
4226
- var _this = {};
4227
-
4228
- _this.read = function() {
4229
-
4230
- while (_buflen < 8) {
4231
-
4232
- if (_pos >= _str.length) {
4233
- if (_buflen == 0) {
4234
- return -1;
4235
- }
4236
- throw 'unexpected end of file./' + _buflen;
4237
- }
4238
-
4239
- var c = _str.charAt(_pos);
4240
- _pos += 1;
4241
-
4242
- if (c == '=') {
4243
- _buflen = 0;
4244
- return -1;
4245
- } else if (c.match(/^\s$/) ) {
4246
- // ignore if whitespace.
4247
- continue;
4248
- }
4249
-
4250
- _buffer = (_buffer << 6) | decode(c.charCodeAt(0) );
4251
- _buflen += 6;
4252
- }
4253
-
4254
- var n = (_buffer >>> (_buflen - 8) ) & 0xff;
4255
- _buflen -= 8;
4256
- return n;
4257
- };
4258
-
4259
- var decode = function(c) {
4260
- if (0x41 <= c && c <= 0x5a) {
4261
- return c - 0x41;
4262
- } else if (0x61 <= c && c <= 0x7a) {
4263
- return c - 0x61 + 26;
4264
- } else if (0x30 <= c && c <= 0x39) {
4265
- return c - 0x30 + 52;
4266
- } else if (c == 0x2b) {
4267
- return 62;
4268
- } else if (c == 0x2f) {
4269
- return 63;
4270
- } else {
4271
- throw 'c:' + c;
4272
- }
4273
- };
4274
-
4275
- return _this;
4276
- };
4277
-
4278
- //---------------------------------------------------------------------
4279
- // gifImage (B/W)
4280
- //---------------------------------------------------------------------
4281
-
4282
- var gifImage = function(width, height) {
4283
-
4284
- var _width = width;
4285
- var _height = height;
4286
- var _data = new Array(width * height);
4287
-
4288
- var _this = {};
4289
-
4290
- _this.setPixel = function(x, y, pixel) {
4291
- _data[y * _width + x] = pixel;
4292
- };
4293
-
4294
- _this.write = function(out) {
4295
-
4296
- //---------------------------------
4297
- // GIF Signature
4298
-
4299
- out.writeString('GIF87a');
4300
-
4301
- //---------------------------------
4302
- // Screen Descriptor
4303
-
4304
- out.writeShort(_width);
4305
- out.writeShort(_height);
4306
-
4307
- out.writeByte(0x80); // 2bit
4308
- out.writeByte(0);
4309
- out.writeByte(0);
4310
-
4311
- //---------------------------------
4312
- // Global Color Map
4313
-
4314
- // black
4315
- out.writeByte(0x00);
4316
- out.writeByte(0x00);
4317
- out.writeByte(0x00);
4318
-
4319
- // white
4320
- out.writeByte(0xff);
4321
- out.writeByte(0xff);
4322
- out.writeByte(0xff);
4323
-
4324
- //---------------------------------
4325
- // Image Descriptor
4326
-
4327
- out.writeString(',');
4328
- out.writeShort(0);
4329
- out.writeShort(0);
4330
- out.writeShort(_width);
4331
- out.writeShort(_height);
4332
- out.writeByte(0);
4333
-
4334
- //---------------------------------
4335
- // Local Color Map
4336
-
4337
- //---------------------------------
4338
- // Raster Data
4339
-
4340
- var lzwMinCodeSize = 2;
4341
- var raster = getLZWRaster(lzwMinCodeSize);
4342
-
4343
- out.writeByte(lzwMinCodeSize);
4344
-
4345
- var offset = 0;
4346
-
4347
- while (raster.length - offset > 255) {
4348
- out.writeByte(255);
4349
- out.writeBytes(raster, offset, 255);
4350
- offset += 255;
4351
- }
4352
-
4353
- out.writeByte(raster.length - offset);
4354
- out.writeBytes(raster, offset, raster.length - offset);
4355
- out.writeByte(0x00);
4356
-
4357
- //---------------------------------
4358
- // GIF Terminator
4359
- out.writeString(';');
4360
- };
4361
-
4362
- var bitOutputStream = function(out) {
4363
-
4364
- var _out = out;
4365
- var _bitLength = 0;
4366
- var _bitBuffer = 0;
4367
-
4368
- var _this = {};
4369
-
4370
- _this.write = function(data, length) {
4371
-
4372
- if ( (data >>> length) != 0) {
4373
- throw 'length over';
4374
- }
4375
-
4376
- while (_bitLength + length >= 8) {
4377
- _out.writeByte(0xff & ( (data << _bitLength) | _bitBuffer) );
4378
- length -= (8 - _bitLength);
4379
- data >>>= (8 - _bitLength);
4380
- _bitBuffer = 0;
4381
- _bitLength = 0;
4382
- }
4383
-
4384
- _bitBuffer = (data << _bitLength) | _bitBuffer;
4385
- _bitLength = _bitLength + length;
4386
- };
4387
-
4388
- _this.flush = function() {
4389
- if (_bitLength > 0) {
4390
- _out.writeByte(_bitBuffer);
4391
- }
4392
- };
4393
-
4394
- return _this;
4395
- };
4396
-
4397
- var getLZWRaster = function(lzwMinCodeSize) {
4398
-
4399
- var clearCode = 1 << lzwMinCodeSize;
4400
- var endCode = (1 << lzwMinCodeSize) + 1;
4401
- var bitLength = lzwMinCodeSize + 1;
4402
-
4403
- // Setup LZWTable
4404
- var table = lzwTable();
4405
-
4406
- for (var i = 0; i < clearCode; i += 1) {
4407
- table.add(String.fromCharCode(i) );
4408
- }
4409
- table.add(String.fromCharCode(clearCode) );
4410
- table.add(String.fromCharCode(endCode) );
4411
-
4412
- var byteOut = byteArrayOutputStream();
4413
- var bitOut = bitOutputStream(byteOut);
4414
-
4415
- // clear code
4416
- bitOut.write(clearCode, bitLength);
4417
-
4418
- var dataIndex = 0;
4419
-
4420
- var s = String.fromCharCode(_data[dataIndex]);
4421
- dataIndex += 1;
4422
-
4423
- while (dataIndex < _data.length) {
4424
-
4425
- var c = String.fromCharCode(_data[dataIndex]);
4426
- dataIndex += 1;
4427
-
4428
- if (table.contains(s + c) ) {
4429
-
4430
- s = s + c;
4431
-
4432
- } else {
4433
-
4434
- bitOut.write(table.indexOf(s), bitLength);
4435
-
4436
- if (table.size() < 0xfff) {
4437
-
4438
- if (table.size() == (1 << bitLength) ) {
4439
- bitLength += 1;
4440
- }
4441
-
4442
- table.add(s + c);
4443
- }
4444
-
4445
- s = c;
4446
- }
4447
- }
4448
-
4449
- bitOut.write(table.indexOf(s), bitLength);
4450
-
4451
- // end code
4452
- bitOut.write(endCode, bitLength);
4453
-
4454
- bitOut.flush();
4455
-
4456
- return byteOut.toByteArray();
4457
- };
4458
-
4459
- var lzwTable = function() {
4460
-
4461
- var _map = {};
4462
- var _size = 0;
4463
-
4464
- var _this = {};
4465
-
4466
- _this.add = function(key) {
4467
- if (_this.contains(key) ) {
4468
- throw 'dup key:' + key;
4469
- }
4470
- _map[key] = _size;
4471
- _size += 1;
4472
- };
4473
-
4474
- _this.size = function() {
4475
- return _size;
4476
- };
4477
-
4478
- _this.indexOf = function(key) {
4479
- return _map[key];
4480
- };
4481
-
4482
- _this.contains = function(key) {
4483
- return typeof _map[key] != 'undefined';
4484
- };
4485
-
4486
- return _this;
4487
- };
4488
-
4489
- return _this;
4490
- };
4491
-
4492
- var createDataURL = function(width, height, getPixel) {
4493
- var gif = gifImage(width, height);
4494
- for (var y = 0; y < height; y += 1) {
4495
- for (var x = 0; x < width; x += 1) {
4496
- gif.setPixel(x, y, getPixel(x, y) );
4497
- }
4498
- }
4499
-
4500
- var b = byteArrayOutputStream();
4501
- gif.write(b);
4502
-
4503
- var base64 = base64EncodeOutputStream();
4504
- var bytes = b.toByteArray();
4505
- for (var i = 0; i < bytes.length; i += 1) {
4506
- base64.writeByte(bytes[i]);
4507
- }
4508
- base64.flush();
4509
-
4510
- return 'data:image/gif;base64,' + base64;
4511
- };
4512
-
4513
- //---------------------------------------------------------------------
4514
- // returns qrcode function.
4515
-
4516
- return qrcode;
4517
- }();
4518
-
4519
- // multibyte support
4520
- !function() {
4521
-
4522
- qrcode.stringToBytesFuncs['UTF-8'] = function(s) {
4523
- // http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array
4524
- function toUTF8Array(str) {
4525
- var utf8 = [];
4526
- for (var i=0; i < str.length; i++) {
4527
- var charcode = str.charCodeAt(i);
4528
- if (charcode < 0x80) utf8.push(charcode);
4529
- else if (charcode < 0x800) {
4530
- utf8.push(0xc0 | (charcode >> 6),
4531
- 0x80 | (charcode & 0x3f));
4532
- }
4533
- else if (charcode < 0xd800 || charcode >= 0xe000) {
4534
- utf8.push(0xe0 | (charcode >> 12),
4535
- 0x80 | ((charcode>>6) & 0x3f),
4536
- 0x80 | (charcode & 0x3f));
4537
- }
4538
- // surrogate pair
4539
- else {
4540
- i++;
4541
- // UTF-16 encodes 0x10000-0x10FFFF by
4542
- // subtracting 0x10000 and splitting the
4543
- // 20 bits of 0x0-0xFFFFF into two halves
4544
- charcode = 0x10000 + (((charcode & 0x3ff)<<10)
4545
- | (str.charCodeAt(i) & 0x3ff));
4546
- utf8.push(0xf0 | (charcode >>18),
4547
- 0x80 | ((charcode>>12) & 0x3f),
4548
- 0x80 | ((charcode>>6) & 0x3f),
4549
- 0x80 | (charcode & 0x3f));
4550
- }
4551
- }
4552
- return utf8;
4553
- }
4554
- return toUTF8Array(s);
4555
- };
4556
-
4557
- }();
4558
-
4559
- (function (factory) {
4560
- {
4561
- module.exports = factory();
4562
- }
4563
- }(function () {
4564
- return qrcode;
4565
- }));
4566
- } (qrcode$1));
4567
- return qrcode$1.exports;
4568
- }
4569
-
4570
- var qrcodeExports = requireQrcode();
4571
- var qrcode = /*@__PURE__*/markdown.getDefaultExportFromCjs(qrcodeExports);
4572
-
4573
2270
  // 文件上传流水号SDK
4574
2271
  const uploadNumberSDK$1 = {
4575
2272
  number: '',
@@ -5976,7 +3673,7 @@ const ComponentsVoiceInputBtn = class {
5976
3673
  : isConverting
5977
3674
  ? this._getText('正在识别语音...', 'Recognizing speech...')
5978
3675
  : this._getText('语音输入', 'Voice input');
5979
- return (index.h("button", { key: '61026d7314566e475e9a0ba2102e504d7a276b9e', type: "button", class: {
3676
+ return (index.h("button", { key: 'dc6874de2dfc7b9f5a5b65bc001fe8f580738231', type: "button", class: {
5980
3677
  'voice-input-button': true,
5981
3678
  'recording': isRecording,
5982
3679
  'converting': isConverting,
@@ -10789,6 +8486,11 @@ const HtwsModal = class {
10789
8486
  * 是否显示工作区历史会话按钮
10790
8487
  */
10791
8488
  showWorkspaceHistory = false;
8489
+ /**
8490
+ * 是否显示分析后的聊天输入区,默认显示,不影响初始表单。
8491
+ * 可通过 JS 动态设置 element.showChatInput = false 隐藏文字输入、语音和发送按钮,设为 true 恢复。
8492
+ */
8493
+ showChatInput = true;
10792
8494
  /**
10793
8495
  * 是否展示 SSE 节点 title 状态,默认开启。
10794
8496
  */
@@ -11008,7 +8710,7 @@ const HtwsModal = class {
11008
8710
  } })), index.h("div", { class: "textarea-container" }, index.h("textarea", { id: "free-input-text", placeholder: "\u8BF7\u8F93\u5165\u5408\u540C\u5185\u5BB9", rows: 8, value: this.freeInputText, onInput: this.handleFreeInputChange })), index.h("div", { class: "input-guide" }, index.h("div", { class: "guide-title" }, "\u8F93\u5165\u63D0\u793A\uFF1A"), index.h("div", { class: "guide-content" }, index.h("div", null, "\u2022 \u8BF7\u8F93\u5165\u5B8C\u6574\u7684\u52B3\u52A8\u5408\u540C\u5185\u5BB9"), index.h("div", null, "\u2022 \u5305\u62EC\u7532\u65B9\uFF08\u516C\u53F8\uFF09\u3001\u4E59\u65B9\uFF08\u5458\u5DE5\uFF09\u4FE1\u606F"), index.h("div", null, "\u2022 \u5408\u540C\u671F\u9650\u3001\u5DE5\u4F5C\u5185\u5BB9\u3001\u5DE5\u4F5C\u5730\u70B9"), index.h("div", null, "\u2022 \u5DE5\u4F5C\u65F6\u95F4\u3001\u4F11\u606F\u4F11\u5047\u3001\u52B3\u52A8\u62A5\u916C"), index.h("div", null, "\u2022 \u793E\u4F1A\u4FDD\u9669\u3001\u52B3\u52A8\u4FDD\u62A4\u3001\u52B3\u52A8\u6761\u4EF6"), index.h("div", null, "\u2022 \u5408\u540C\u53D8\u66F4\u3001\u89E3\u9664\u548C\u7EC8\u6B62\u6761\u4EF6\u7B49"))))), index.h("button", { class: "submit-button", disabled: (this.inputMode === 'upload' && !this.uploadedFileInfo?.length) ||
11009
8711
  (this.inputMode === 'free' && !this.freeInputText.trim()) ||
11010
8712
  this.isUploading ||
11011
- this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, showNodeStatus: this.showNodeStatus, botId: "3022316191018882", conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
8713
+ this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, showChatInput: this.showChatInput, showNodeStatus: this.showNodeStatus, botId: "3022316191018882", conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
11012
8714
  ...this.customInputs,
11013
8715
  file_url: this.inputMode === 'upload' ? this.uploadedFileInfo?.map?.((item) => item.cos_key)?.join(",") : undefined,
11014
8716
  file_name: this.uploadedFileInfo?.map?.((item) => item.file_name)?.join(","),
@@ -11092,6 +8794,11 @@ const HyzjModal = class {
11092
8794
  * 是否显示工作区历史会话按钮
11093
8795
  */
11094
8796
  showWorkspaceHistory = false;
8797
+ /**
8798
+ * 是否显示分析后的聊天输入区,默认显示,不影响初始表单。
8799
+ * 可通过 JS 动态设置 element.showChatInput = false 隐藏文字输入、语音和发送按钮,设为 true 恢复。
8800
+ */
8801
+ showChatInput = true;
11095
8802
  /**
11096
8803
  * 是否在上传界面显示历史会话按钮
11097
8804
  */
@@ -11341,7 +9048,7 @@ const HyzjModal = class {
11341
9048
  } }, conversation.status))))))))), !this.isLoadingConversations && (this.historyConversationPageIndex > 0 || this.hasMoreHistoryConversations) && (index.h("div", { class: "history-pagination" }, index.h("button", { type: "button", class: "history-pagination-button", disabled: this.historyConversationPageIndex === 0, onClick: () => this.handleHistoryConversationPageChange('prev') }, "\u4E0A\u4E00\u9875"), index.h("span", { class: "history-pagination-info" }, "\u7B2C ", this.historyConversationPageIndex + 1, " \u9875"), index.h("button", { type: "button", class: "history-pagination-button", disabled: !this.hasMoreHistoryConversations, onClick: () => this.handleHistoryConversationPageChange('next') }, "\u4E0B\u4E00\u9875")))))), !this.showChatModal && !this.conversationId && !hideFileUpload && (index.h("div", { class: "input-container" }, index.h("div", { class: "resume-upload-section" }, index.h("label", null, "\u4E0A\u4F20\u4F1A\u8BAE\u7EAA\u8981"), index.h("div", { class: "upload-area", onClick: this.handleUploadClick }, this.selectedFile ? (index.h("div", { class: "file-item" }, index.h("div", { class: "file-item-content" }, index.h("span", { class: "file-icon" }, "\uD83D\uDCDD"), index.h("span", { class: "file-name" }, this.selectedFile.name)), index.h("button", { class: "remove-file", onClick: (e) => {
11342
9049
  e.stopPropagation();
11343
9050
  this.clearSelectedFile();
11344
- } }, "\u00D7"))) : (index.h("div", { class: "upload-placeholder" }, index.h("img", { src: 'https://pub.pincaimao.com/static/web/images/home/i_upload.png' }), index.h("p", { class: 'upload-text' }, "\u70B9\u51FB\u4E0A\u4F20\u4F1A\u8BAE\u7EAA\u8981"), index.h("p", { class: "upload-hint" }, "\u652F\u6301 mp3\u3001markdown\u3001pdf\u3001docx\u3001doc\u3001md \u683C\u5F0F"))))), index.h("button", { class: "submit-button", disabled: !this.selectedFile || this.isUploading || this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))), index.h("input", { type: "file", class: "file-input", onChange: this.handleFileChange }))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, botId: "3022316191018885", conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
9051
+ } }, "\u00D7"))) : (index.h("div", { class: "upload-placeholder" }, index.h("img", { src: 'https://pub.pincaimao.com/static/web/images/home/i_upload.png' }), index.h("p", { class: 'upload-text' }, "\u70B9\u51FB\u4E0A\u4F20\u4F1A\u8BAE\u7EAA\u8981"), index.h("p", { class: "upload-hint" }, "\u652F\u6301 mp3\u3001markdown\u3001pdf\u3001docx\u3001doc\u3001md \u683C\u5F0F"))))), index.h("button", { class: "submit-button", disabled: !this.selectedFile || this.isUploading || this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))), index.h("input", { type: "file", class: "file-input", onChange: this.handleFileChange }))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, showChatInput: this.showChatInput, botId: "3022316191018885", conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
11345
9052
  ...this.customInputs,
11346
9053
  file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,
11347
9054
  file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name
@@ -11636,6 +9343,11 @@ const PcmJdModal = class {
11636
9343
  * 是否显示工作区历史会话按钮
11637
9344
  */
11638
9345
  showWorkspaceHistory = false;
9346
+ /**
9347
+ * 是否显示分析后的聊天输入区,默认显示,不影响初始表单。
9348
+ * 可通过 JS 动态设置 element.showChatInput = false 隐藏文字输入、语音和发送按钮,设为 true 恢复。
9349
+ */
9350
+ showChatInput = true;
11639
9351
  /**
11640
9352
  * 是否在上传界面显示历史会话按钮
11641
9353
  */
@@ -12147,7 +9859,7 @@ const PcmJdModal = class {
12147
9859
  'conversation-status': true,
12148
9860
  'completed': conversation.status === '结束',
12149
9861
  'running': conversation.status === '进行中',
12150
- } }, conversation.status))))))))), !this.isLoadingConversations && (this.historyConversationPageIndex > 0 || this.hasMoreHistoryConversations) && (index.h("div", { class: "history-pagination" }, index.h("button", { type: "button", class: "history-pagination-button", disabled: this.historyConversationPageIndex === 0, onClick: () => this.handleHistoryConversationPageChange('prev') }, "\u4E0A\u4E00\u9875"), index.h("span", { class: "history-pagination-info" }, "\u7B2C ", this.historyConversationPageIndex + 1, " \u9875"), index.h("button", { type: "button", class: "history-pagination-button", disabled: !this.hasMoreHistoryConversations, onClick: () => this.handleHistoryConversationPageChange('next') }, "\u4E0B\u4E00\u9875")))))), !this.showChatModal && !this.conversationId && true && (index.h("div", { class: "input-container" }, index.h("div", { class: "input-mode-toggle" }, index.h("span", null, this.strings.jobRequirementInfo), index.h("button", { class: "toggle-button", onClick: this.handleToggleInput, disabled: this.isLoading || this.isVoiceInputActive }, index.h("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M4 6h16M4 12h16M4 18h16" })), this.strings.toggleInput)), this.inputMode === 'structured' && (index.h("div", { class: "structured-input" }, this.step === 'input' && (index.h("div", { class: "job-name-input" }, index.h("label", { htmlFor: "job-name" }, this.strings.jobName, " ", index.h("span", { class: "required" }, this.strings.required)), index.h("input", { id: "job-name", type: "text", placeholder: this.strings.jobNamePlaceholder, value: this.jobName, onInput: this.handleJobNameChange, disabled: this.isLoading }), index.h("div", { class: "button-container" }, index.h("button", { class: "submit-button next-button", onClick: this.handleNextStep, disabled: !this.jobName.trim() || this.isLoading }, this.strings.nextStep)))), this.step === 'review' && (index.h("div", { class: "tag-selection" }, this.isLoading ? (this.renderLoadingState()) : (index.h("div", { class: "tag-selection-content" }, this.tagGroups.length > 0 && (index.h("div", { class: "ai-tags-section" }, index.h("div", { class: "section-title" }, this.strings.aiRecommendedTags), this.renderAITagGroups())), this.tagGroups.length > 0 && (index.h("div", { class: "basic-tags-section" }, this.renderTagGroup(this.strings.salaryRange, this.getSalaryRanges(), 'salary'), this.renderTagGroup(this.strings.benefits, this.getBenefits(), 'benefits'), this.renderTagGroup(this.strings.education, this.getEducationRequirements(), 'education'))), index.h("div", { class: "button-container" }, index.h("button", { class: "submit-button prev-button", onClick: this.handlePrevStep }, this.strings.prevStep), index.h("button", { class: "submit-button", onClick: this.handleSubmitStructured, disabled: this.isSubmitting }, this.isSubmitting ? this.strings.processing : this.strings.generateJD)))))))), this.inputMode === 'free' && (index.h("div", { class: "free-input" }, index.h("div", { class: "textarea-container" }, index.h("label", { htmlFor: "free-input-text" }, this.strings.jdInfo, " ", index.h("span", { class: "required" }, this.strings.required)), index.h("div", { class: "voice-textarea-wrapper" }, index.h("textarea", { id: "free-input-text", placeholder: this.strings.jdInfoPlaceholder, rows: 8, value: this.freeInputText, onInput: this.handleFreeInputChange, disabled: this.isVoiceInputActive }), index.h("div", { class: "voice-input-entry" }, index.h("components-voice-input-btn", { locale: this.locale === 'en' ? 'en' : 'zh', disabled: this.isSubmitting, onVoiceRecognized: this.handleVoiceRecognized, onVoiceStatusChange: this.handleVoiceStatusChange, onSomeErrorEvent: this.handleVoiceInputError })))), index.h("div", { class: "input-guide" }, index.h("div", { class: "guide-title" }, this.strings.inputGuideTitle), index.h("div", { class: "guide-content" }, index.h("div", null, this.strings.inputGuide.jobTitle), index.h("div", null, this.strings.inputGuide.salary), index.h("div", null, this.strings.inputGuide.benefits), index.h("div", null, this.strings.inputGuide.responsibilities), index.h("div", null, this.strings.inputGuide.qualifications), index.h("div", null, this.strings.inputGuide.location))), index.h("div", { class: "button-container" }, index.h("button", { class: "submit-button", onClick: this.handleSubmitFree, disabled: !this.freeInputText.trim() || this.isSubmitting || this.isVoiceInputActive }, this.isSubmitting ? this.strings.processing : this.strings.generateJD)))), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, this.strings.aiDisclaimer), index.h("p", { class: "beian-info" }, index.h("span", null, this.strings.beianLabel), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, this.strings.beianNumber))))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, this.strings.loadingConversation))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { locale: this.locale, isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, botId: this.getBotId(), conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
9862
+ } }, conversation.status))))))))), !this.isLoadingConversations && (this.historyConversationPageIndex > 0 || this.hasMoreHistoryConversations) && (index.h("div", { class: "history-pagination" }, index.h("button", { type: "button", class: "history-pagination-button", disabled: this.historyConversationPageIndex === 0, onClick: () => this.handleHistoryConversationPageChange('prev') }, "\u4E0A\u4E00\u9875"), index.h("span", { class: "history-pagination-info" }, "\u7B2C ", this.historyConversationPageIndex + 1, " \u9875"), index.h("button", { type: "button", class: "history-pagination-button", disabled: !this.hasMoreHistoryConversations, onClick: () => this.handleHistoryConversationPageChange('next') }, "\u4E0B\u4E00\u9875")))))), !this.showChatModal && !this.conversationId && true && (index.h("div", { class: "input-container" }, index.h("div", { class: "input-mode-toggle" }, index.h("span", null, this.strings.jobRequirementInfo), index.h("button", { class: "toggle-button", onClick: this.handleToggleInput, disabled: this.isLoading || this.isVoiceInputActive }, index.h("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M4 6h16M4 12h16M4 18h16" })), this.strings.toggleInput)), this.inputMode === 'structured' && (index.h("div", { class: "structured-input" }, this.step === 'input' && (index.h("div", { class: "job-name-input" }, index.h("label", { htmlFor: "job-name" }, this.strings.jobName, " ", index.h("span", { class: "required" }, this.strings.required)), index.h("input", { id: "job-name", type: "text", placeholder: this.strings.jobNamePlaceholder, value: this.jobName, onInput: this.handleJobNameChange, disabled: this.isLoading }), index.h("div", { class: "button-container" }, index.h("button", { class: "submit-button next-button", onClick: this.handleNextStep, disabled: !this.jobName.trim() || this.isLoading }, this.strings.nextStep)))), this.step === 'review' && (index.h("div", { class: "tag-selection" }, this.isLoading ? (this.renderLoadingState()) : (index.h("div", { class: "tag-selection-content" }, this.tagGroups.length > 0 && (index.h("div", { class: "ai-tags-section" }, index.h("div", { class: "section-title" }, this.strings.aiRecommendedTags), this.renderAITagGroups())), this.tagGroups.length > 0 && (index.h("div", { class: "basic-tags-section" }, this.renderTagGroup(this.strings.salaryRange, this.getSalaryRanges(), 'salary'), this.renderTagGroup(this.strings.benefits, this.getBenefits(), 'benefits'), this.renderTagGroup(this.strings.education, this.getEducationRequirements(), 'education'))), index.h("div", { class: "button-container" }, index.h("button", { class: "submit-button prev-button", onClick: this.handlePrevStep }, this.strings.prevStep), index.h("button", { class: "submit-button", onClick: this.handleSubmitStructured, disabled: this.isSubmitting }, this.isSubmitting ? this.strings.processing : this.strings.generateJD)))))))), this.inputMode === 'free' && (index.h("div", { class: "free-input" }, index.h("div", { class: "textarea-container" }, index.h("label", { htmlFor: "free-input-text" }, this.strings.jdInfo, " ", index.h("span", { class: "required" }, this.strings.required)), index.h("div", { class: "voice-textarea-wrapper" }, index.h("textarea", { id: "free-input-text", placeholder: this.strings.jdInfoPlaceholder, rows: 8, value: this.freeInputText, onInput: this.handleFreeInputChange, disabled: this.isVoiceInputActive }), index.h("div", { class: "voice-input-entry" }, index.h("components-voice-input-btn", { locale: this.locale === 'en' ? 'en' : 'zh', disabled: this.isSubmitting, onVoiceRecognized: this.handleVoiceRecognized, onVoiceStatusChange: this.handleVoiceStatusChange, onSomeErrorEvent: this.handleVoiceInputError })))), index.h("div", { class: "input-guide" }, index.h("div", { class: "guide-title" }, this.strings.inputGuideTitle), index.h("div", { class: "guide-content" }, index.h("div", null, this.strings.inputGuide.jobTitle), index.h("div", null, this.strings.inputGuide.salary), index.h("div", null, this.strings.inputGuide.benefits), index.h("div", null, this.strings.inputGuide.responsibilities), index.h("div", null, this.strings.inputGuide.qualifications), index.h("div", null, this.strings.inputGuide.location))), index.h("div", { class: "button-container" }, index.h("button", { class: "submit-button", onClick: this.handleSubmitFree, disabled: !this.freeInputText.trim() || this.isSubmitting || this.isVoiceInputActive }, this.isSubmitting ? this.strings.processing : this.strings.generateJD)))), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, this.strings.aiDisclaimer), index.h("p", { class: "beian-info" }, index.h("span", null, this.strings.beianLabel), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, this.strings.beianNumber))))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, this.strings.loadingConversation))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { locale: this.locale, isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, showChatInput: this.showChatInput, botId: this.getBotId(), conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
12151
9863
  ...this.customInputs,
12152
9864
  job_info: this.customInputs?.job_info || this.jobDescription
12153
9865
  }, interviewMode: "text", showSaveJdButton: this.showSaveJdButton, saveJdButtonText: this.saveJdButtonText }))))));
@@ -13167,6 +10879,11 @@ const MnctModal = class {
13167
10879
  * 是否显示工作区历史会话按钮
13168
10880
  */
13169
10881
  showWorkspaceHistory = false;
10882
+ /**
10883
+ * 是否显示分析后的聊天输入区,默认显示,不影响初始表单。
10884
+ * 可通过 JS 动态设置 element.showChatInput = false 隐藏文字输入、语音和发送按钮,设为 true 恢复。
10885
+ */
10886
+ showChatInput = true;
13170
10887
  /**
13171
10888
  * 是否在上传界面显示历史会话按钮
13172
10889
  */
@@ -13403,7 +11120,7 @@ const MnctModal = class {
13403
11120
  'conversation-status': true,
13404
11121
  'completed': conversation.status === '结束',
13405
11122
  'running': conversation.status === '进行中',
13406
- } }, conversation.status))))))))), !this.isLoadingConversations && (this.historyConversationPageIndex > 0 || this.hasMoreHistoryConversations) && (index.h("div", { class: "history-pagination" }, index.h("button", { type: "button", class: "history-pagination-button", disabled: this.historyConversationPageIndex === 0, onClick: () => this.handleHistoryConversationPageChange('prev') }, "\u4E0A\u4E00\u9875"), index.h("span", { class: "history-pagination-info" }, "\u7B2C ", this.historyConversationPageIndex + 1, " \u9875"), index.h("button", { type: "button", class: "history-pagination-button", disabled: !this.hasMoreHistoryConversations, onClick: () => this.handleHistoryConversationPageChange('next') }, "\u4E0B\u4E00\u9875")))))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, this.strings.loadingConversation))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { locale: this.locale, isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, botId: this.getBotId(), conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
11123
+ } }, conversation.status))))))))), !this.isLoadingConversations && (this.historyConversationPageIndex > 0 || this.hasMoreHistoryConversations) && (index.h("div", { class: "history-pagination" }, index.h("button", { type: "button", class: "history-pagination-button", disabled: this.historyConversationPageIndex === 0, onClick: () => this.handleHistoryConversationPageChange('prev') }, "\u4E0A\u4E00\u9875"), index.h("span", { class: "history-pagination-info" }, "\u7B2C ", this.historyConversationPageIndex + 1, " \u9875"), index.h("button", { type: "button", class: "history-pagination-button", disabled: !this.hasMoreHistoryConversations, onClick: () => this.handleHistoryConversationPageChange('next') }, "\u4E0B\u4E00\u9875")))))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, this.strings.loadingConversation))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { locale: this.locale, isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, showChatInput: this.showChatInput, botId: this.getBotId(), conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
13407
11124
  ...this.customInputs,
13408
11125
  file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,
13409
11126
  file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,
@@ -14114,6 +11831,11 @@ const MsbgModal = class {
14114
11831
  * 是否显示工作区历史会话按钮
14115
11832
  */
14116
11833
  showWorkspaceHistory = false;
11834
+ /**
11835
+ * 是否显示分析后的聊天输入区,默认显示,不影响初始表单。
11836
+ * 可通过 JS 动态设置 element.showChatInput = false 隐藏文字输入、语音和发送按钮,设为 true 恢复。
11837
+ */
11838
+ showChatInput = true;
14117
11839
  /**
14118
11840
  * 是否在上传界面显示历史会话按钮
14119
11841
  */
@@ -14381,7 +12103,7 @@ const MsbgModal = class {
14381
12103
  } }, conversation.status))))))))), !this.isLoadingConversations && (this.historyConversationPageIndex > 0 || this.hasMoreHistoryConversations) && (index.h("div", { class: "history-pagination" }, index.h("button", { type: "button", class: "history-pagination-button", disabled: this.historyConversationPageIndex === 0, onClick: () => this.handleHistoryConversationPageChange('prev') }, "\u4E0A\u4E00\u9875"), index.h("span", { class: "history-pagination-info" }, "\u7B2C ", this.historyConversationPageIndex + 1, " \u9875"), index.h("button", { type: "button", class: "history-pagination-button", disabled: !this.hasMoreHistoryConversations, onClick: () => this.handleHistoryConversationPageChange('next') }, "\u4E0B\u4E00\u9875")))))), !this.showChatModal && !this.conversationId && !hasFileAndJob && (index.h("div", { class: "input-container" }, !hideJdInput && (index.h("div", { class: "jd-input-section" }, index.h("label", { htmlFor: "job-description" }, "\u8BF7\u8F93\u5165\u804C\u4F4D\u63CF\u8FF0 (JD)"), index.h("textarea", { id: "job-description", class: "job-description-textarea", placeholder: "\u8BF7\u8F93\u5165\u804C\u4F4D\u63CF\u8FF0\uFF0C\u5305\u62EC\u804C\u8D23\u3001\u8981\u6C42\u7B49\u4FE1\u606F...", rows: 6, value: this.jobDescription, onInput: this.handleJobDescriptionChange }))), !hideFileUpload && (index.h("div", { class: "resume-upload-section" }, index.h("label", null, "\u4E0A\u4F20\u9762\u8BD5\u5185\u5BB9"), index.h("div", { class: "upload-area", onClick: this.handleUploadClick }, this.selectedFile ? (index.h("div", { class: "file-item" }, index.h("div", { class: "file-item-content" }, index.h("span", { class: "file-icon" }, "\uD83D\uDCDD"), index.h("span", { class: "file-name" }, this.selectedFile.name)), index.h("button", { class: "remove-file", onClick: (e) => {
14382
12104
  e.stopPropagation();
14383
12105
  this.clearSelectedFile();
14384
- } }, "\u00D7"))) : (index.h("div", { class: "upload-placeholder" }, index.h("img", { src: 'https://pub.pincaimao.com/static/web/images/home/i_upload.png' }), index.h("p", { class: 'upload-text' }, "\u70B9\u51FB\u4E0A\u4F20\u9762\u8BD5\u5185\u5BB9"), index.h("p", { class: "upload-hint" }, "\u652F\u6301 mp3\u3001markdown\u3001pdf\u3001docx\u3001doc\u3001md \u683C\u5F0F")))))), index.h("button", { class: "submit-button", disabled: (!hideFileUpload && !this.selectedFile) || (!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))), index.h("input", { type: "file", class: "file-input", onChange: this.handleFileChange }))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, botId: "3022316191018877", conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
12106
+ } }, "\u00D7"))) : (index.h("div", { class: "upload-placeholder" }, index.h("img", { src: 'https://pub.pincaimao.com/static/web/images/home/i_upload.png' }), index.h("p", { class: 'upload-text' }, "\u70B9\u51FB\u4E0A\u4F20\u9762\u8BD5\u5185\u5BB9"), index.h("p", { class: "upload-hint" }, "\u652F\u6301 mp3\u3001markdown\u3001pdf\u3001docx\u3001doc\u3001md \u683C\u5F0F")))))), index.h("button", { class: "submit-button", disabled: (!hideFileUpload && !this.selectedFile) || (!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))), index.h("input", { type: "file", class: "file-input", onChange: this.handleFileChange }))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, showChatInput: this.showChatInput, botId: "3022316191018877", conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
14385
12107
  ...this.customInputs,
14386
12108
  file_urls: this.customInputs?.file_urls || this.uploadedFileInfo?.cos_key,
14387
12109
  file_names: this.customInputs?.file_names || this.uploadedFileInfo?.file_name,
@@ -14480,6 +12202,11 @@ const QgqjlModal = class {
14480
12202
  * 是否显示工作区历史会话按钮
14481
12203
  */
14482
12204
  showWorkspaceHistory = false;
12205
+ /**
12206
+ * 是否显示分析后的聊天输入区,默认显示,仅对聊天分支生效,不影响初始表单及 optimizationType 为 1 或 2 的简历优化流程。
12207
+ * 可通过 JS 动态设置 element.showChatInput = false 隐藏文字输入、语音和发送按钮,设为 true 恢复。
12208
+ */
12209
+ showChatInput = true;
14483
12210
  /**
14484
12211
  * 是否在上传界面显示历史会话按钮
14485
12212
  */
@@ -14905,7 +12632,7 @@ const QgqjlModal = class {
14905
12632
  job_info: this.customInputs?.job_info || (this.selectedOptimizationMode === 'targeted' ? this.jobDescription : ''),
14906
12633
  job_title: this.customInputs?.job_title || '',
14907
12634
  optimization_type: this.getEffectiveOptimizationType(),
14908
- }, defaultQuery: this.defaultQuery, modalTitle: this.modalTitle, icon: this.icon, fullscreen: this.fullscreen, zIndex: this.zIndex, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, onModalClosed: this.handleClose, onConversationStart: (e) => this.handleStreamComplete(e), onStreamComplete: (e) => this.handleStreamComplete(e), onInterviewComplete: (e) => this.handleStreamComplete(e) })) : (index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, botId: "45444431062634496", conversationId: this.currentConversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, closeResume: this.closeResumeChat, customInputs: {
12635
+ }, defaultQuery: this.defaultQuery, modalTitle: this.modalTitle, icon: this.icon, fullscreen: this.fullscreen, zIndex: this.zIndex, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, onModalClosed: this.handleClose, onConversationStart: (e) => this.handleStreamComplete(e), onStreamComplete: (e) => this.handleStreamComplete(e), onInterviewComplete: (e) => this.handleStreamComplete(e) })) : (index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, showChatInput: this.showChatInput, botId: "45444431062634496", conversationId: this.currentConversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, closeResume: this.closeResumeChat, customInputs: {
14909
12636
  ...this.customInputs,
14910
12637
  file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,
14911
12638
  file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,
@@ -17809,6 +15536,11 @@ const ZyghModal = class {
17809
15536
  * 是否显示工作区历史会话按钮
17810
15537
  */
17811
15538
  showWorkspaceHistory = false;
15539
+ /**
15540
+ * 是否显示分析后的聊天输入区,默认显示,不影响初始表单。
15541
+ * 可通过 JS 动态设置 element.showChatInput = false 隐藏文字输入、语音和发送按钮,设为 true 恢复。
15542
+ */
15543
+ showChatInput = true;
17812
15544
  /**
17813
15545
  * 是否在上传界面显示历史会话按钮
17814
15546
  */
@@ -18018,7 +15750,7 @@ const ZyghModal = class {
18018
15750
  const result = e.detail ?? [];
18019
15751
  this.uploadedFileInfo = result[0];
18020
15752
  this.uploadSuccess.emit(this.uploadedFileInfo);
18021
- } }))), index.h("button", { class: "submit-button", disabled: (!this.customInputs?.file_url && !this.customInputs?.resume_content && !this.uploadedFileInfo) || this.isUploading || this.isSubmitting, onClick: this.handleStartPlanning }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始规划'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, showWorkspaceHistory: this.showWorkspaceHistory, botId: "3022316191018898", fullscreen: this.fullscreen, conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
15753
+ } }))), index.h("button", { class: "submit-button", disabled: (!this.customInputs?.file_url && !this.customInputs?.resume_content && !this.uploadedFileInfo) || this.isUploading || this.isSubmitting, onClick: this.handleStartPlanning }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始规划'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, showWorkspaceHistory: this.showWorkspaceHistory, showChatInput: this.showChatInput, botId: "3022316191018898", fullscreen: this.fullscreen, conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
18022
15754
  ...this.customInputs,
18023
15755
  file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,
18024
15756
  file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,
@@ -18104,6 +15836,11 @@ const ZyghV2Modal = class {
18104
15836
  * 是否显示工作区历史会话按钮
18105
15837
  */
18106
15838
  showWorkspaceHistory = false;
15839
+ /**
15840
+ * 是否显示分析后的聊天输入区,默认显示,不影响初始表单。
15841
+ * 可通过 JS 动态设置 element.showChatInput = false 隐藏文字输入、语音和发送按钮,设为 true 恢复。
15842
+ */
15843
+ showChatInput = true;
18107
15844
  /**
18108
15845
  * 是否在上传界面显示历史会话按钮
18109
15846
  */
@@ -18332,7 +16069,7 @@ const ZyghV2Modal = class {
18332
16069
  const result = e.detail ?? [];
18333
16070
  this.uploadedFileInfo = result[0];
18334
16071
  this.uploadSuccess.emit(this.uploadedFileInfo);
18335
- } }))), index.h("button", { class: "submit-button", disabled: (!this.customInputs?.file_url && !this.customInputs?.resume_content && !this.uploadedFileInfo) || this.isUploading || this.isSubmitting, onClick: this.handleStartPlanning }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始规划'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, showWorkspaceHistory: this.showWorkspaceHistory, botId: "121182005294690304", fullscreen: this.fullscreen, conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
16072
+ } }))), index.h("button", { class: "submit-button", disabled: (!this.customInputs?.file_url && !this.customInputs?.resume_content && !this.uploadedFileInfo) || this.isUploading || this.isSubmitting, onClick: this.handleStartPlanning }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始规划'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isNeedClose, showWorkspaceHistory: this.showWorkspaceHistory, showChatInput: this.showChatInput, botId: "121182005294690304", fullscreen: this.fullscreen, conversationId: this.conversationId, defaultQuery: this.defaultQuery, filePreviewMode: this.filePreviewMode, customInputs: {
18336
16073
  ...this.customInputs,
18337
16074
  file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,
18338
16075
  file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,