llm-testrunner-components 1.0.0 → 1.0.1

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 (103) hide show
  1. package/README.md +139 -81
  2. package/dist/cjs/{index-CCrH7f-W.js → index-CY2lQip_.js} +190 -33
  3. package/dist/cjs/index-CY2lQip_.js.map +1 -0
  4. package/dist/cjs/index.cjs.js +391 -5
  5. package/dist/cjs/index.cjs.js.map +1 -1
  6. package/dist/cjs/llm-test-runner.cjs.entry.js +9 -0
  7. package/dist/cjs/llm-test-runner.entry.cjs.js.map +1 -0
  8. package/dist/cjs/{llm-testrunner-components.cjs.js → llm-testrunner.cjs.js} +5 -7
  9. package/dist/cjs/llm-testrunner.cjs.js.map +1 -0
  10. package/dist/cjs/loader.cjs.js +2 -4
  11. package/dist/collection/collection-manifest.json +3 -4
  12. package/dist/collection/components/error-message/error-message.js +8 -0
  13. package/dist/collection/components/error-message/error-message.js.map +1 -0
  14. package/dist/collection/components/llm-test-runner/llm-test-runner.css +671 -0
  15. package/dist/collection/components/llm-test-runner/llm-test-runner.js +310 -0
  16. package/dist/collection/components/llm-test-runner/llm-test-runner.js.map +1 -0
  17. package/dist/collection/index.js +4 -10
  18. package/dist/collection/index.js.map +1 -1
  19. package/dist/collection/lib/evaluation/evaluation-engine.js +61 -0
  20. package/dist/collection/lib/evaluation/evaluation-engine.js.map +1 -0
  21. package/dist/collection/lib/evaluation/index.js +7 -0
  22. package/dist/collection/lib/evaluation/index.js.map +1 -0
  23. package/dist/collection/lib/evaluation/types.js +2 -0
  24. package/dist/collection/lib/evaluation/types.js.map +1 -0
  25. package/dist/components/index.js +1652 -4
  26. package/dist/components/index.js.map +1 -1
  27. package/dist/components/{current-time.d.ts → llm-test-runner.d.ts} +4 -4
  28. package/dist/components/llm-test-runner.js +9 -0
  29. package/dist/components/llm-test-runner.js.map +1 -0
  30. package/dist/esm/{index-0jlGA6MK.js → index-DBp-rMPb.js} +190 -33
  31. package/dist/esm/index-DBp-rMPb.js.map +1 -0
  32. package/dist/esm/index.js +391 -5
  33. package/dist/esm/index.js.map +1 -1
  34. package/dist/esm/llm-test-runner.entry.js +3 -0
  35. package/dist/esm/llm-test-runner.entry.js.map +1 -0
  36. package/dist/esm/{llm-testrunner-components.js → llm-testrunner.js} +5 -7
  37. package/dist/esm/llm-testrunner.js.map +1 -0
  38. package/dist/esm/loader.js +3 -5
  39. package/dist/llm-testrunner/index.esm.js +2 -0
  40. package/dist/llm-testrunner/index.esm.js.map +1 -0
  41. package/dist/llm-testrunner/llm-test-runner.entry.esm.js.map +1 -0
  42. package/dist/llm-testrunner/llm-testrunner.esm.js +2 -0
  43. package/dist/llm-testrunner/llm-testrunner.esm.js.map +1 -0
  44. package/dist/llm-testrunner/p-DBp-rMPb.js +3 -0
  45. package/dist/llm-testrunner/p-DBp-rMPb.js.map +1 -0
  46. package/dist/llm-testrunner/p-ed2ea423.entry.js +2 -0
  47. package/dist/llm-testrunner/p-ed2ea423.entry.js.map +1 -0
  48. package/dist/react/components.d.ts +9 -0
  49. package/dist/react/components.d.ts.map +1 -0
  50. package/dist/react/components.js +12 -0
  51. package/dist/react/index.d.ts +2 -0
  52. package/dist/react/index.d.ts.map +1 -0
  53. package/dist/react/index.js +2 -0
  54. package/dist/types/components/error-message/error-message.d.ts +7 -0
  55. package/dist/types/components/llm-test-runner/llm-test-runner.d.ts +42 -0
  56. package/dist/types/components.d.ts +11 -46
  57. package/dist/types/index.d.ts +2 -10
  58. package/dist/types/lib/evaluation/evaluation-engine.d.ts +8 -0
  59. package/dist/types/lib/evaluation/index.d.ts +5 -0
  60. package/dist/types/lib/evaluation/types.d.ts +23 -0
  61. package/dist/types/stencil-public-runtime.d.ts +41 -3
  62. package/package.json +33 -12
  63. package/dist/cjs/current-time.my-component.entry.cjs.js.map +0 -1
  64. package/dist/cjs/current-time_2.cjs.entry.js +0 -67
  65. package/dist/cjs/current-time_2.cjs.entry.js.map +0 -1
  66. package/dist/cjs/index-CCrH7f-W.js.map +0 -1
  67. package/dist/cjs/llm-testrunner-components.cjs.js.map +0 -1
  68. package/dist/collection/components/my-component/current-time.js +0 -35
  69. package/dist/collection/components/my-component/current-time.js.map +0 -1
  70. package/dist/collection/components/my-component/my-component.css +0 -3
  71. package/dist/collection/components/my-component/my-component.js +0 -96
  72. package/dist/collection/components/my-component/my-component.js.map +0 -1
  73. package/dist/collection/utils/utils.js +0 -4
  74. package/dist/collection/utils/utils.js.map +0 -1
  75. package/dist/components/current-time.js +0 -9
  76. package/dist/components/current-time.js.map +0 -1
  77. package/dist/components/my-component.d.ts +0 -11
  78. package/dist/components/my-component.js +0 -63
  79. package/dist/components/my-component.js.map +0 -1
  80. package/dist/components/p-CbvWSaCI.js +0 -53
  81. package/dist/components/p-CbvWSaCI.js.map +0 -1
  82. package/dist/components/p-DnDi6fKi.js +0 -1101
  83. package/dist/components/p-DnDi6fKi.js.map +0 -1
  84. package/dist/esm/current-time.my-component.entry.js.map +0 -1
  85. package/dist/esm/current-time_2.entry.js +0 -64
  86. package/dist/esm/current-time_2.entry.js.map +0 -1
  87. package/dist/esm/index-0jlGA6MK.js.map +0 -1
  88. package/dist/esm/llm-testrunner-components.js.map +0 -1
  89. package/dist/llm-testrunner-components/current-time.my-component.entry.esm.js.map +0 -1
  90. package/dist/llm-testrunner-components/index.esm.js +0 -2
  91. package/dist/llm-testrunner-components/index.esm.js.map +0 -1
  92. package/dist/llm-testrunner-components/llm-testrunner-components.esm.js +0 -2
  93. package/dist/llm-testrunner-components/llm-testrunner-components.esm.js.map +0 -1
  94. package/dist/llm-testrunner-components/p-0jlGA6MK.js +0 -3
  95. package/dist/llm-testrunner-components/p-0jlGA6MK.js.map +0 -1
  96. package/dist/llm-testrunner-components/p-15e5e0fe.entry.js +0 -2
  97. package/dist/llm-testrunner-components/p-15e5e0fe.entry.js.map +0 -1
  98. package/dist/types/components/my-component/current-time.d.ts +0 -7
  99. package/dist/types/components/my-component/my-component.d.ts +0 -16
  100. package/dist/types/utils/utils.d.ts +0 -1
  101. /package/dist/{llm-testrunner-components → llm-testrunner}/loader.esm.js.map +0 -0
  102. /package/dist/{llm-testrunner-components → llm-testrunner}/p-DQuL1Twl.js +0 -0
  103. /package/dist/{llm-testrunner-components → llm-testrunner}/p-DQuL1Twl.js.map +0 -0
@@ -0,0 +1,2 @@
1
+ import{h as n,r as e}from"./p-DBp-rMPb.js";class t{constructor(){}async evaluateResponse(n,e){try{console.log("🔍 Starting evaluation for test case:",n.testCaseId);const t=await this.performEvaluation(n);console.log("Evaluation completed for test case:",n.testCaseId);console.log("Result:",t);e(t)}catch(t){console.error("Evaluation failed:",t);const o={testCaseId:n.testCaseId,passed:false,keywordMatches:[],sourceLinkMatches:[],timestamp:(new Date).toISOString()};e(o)}}async performEvaluation(n){const{testCaseId:e,expectedKeywords:t,expectedSourceLinks:o,actualResponse:a}=n;const r=this.evaluateKeywords(t,a);const i=this.evaluateSourceLinks(o,a);const s=r.length+i.length;const d=r.filter((n=>n.found)).length+i.filter((n=>n.found)).length;const c=d===s;return{testCaseId:e,passed:c,keywordMatches:r,sourceLinkMatches:i,timestamp:(new Date).toISOString()}}evaluateKeywords(n,e){const t=e.toLowerCase();return n.map((n=>{const e=n.toLowerCase();const o=t.includes(e);return{keyword:n,found:o}}))}evaluateSourceLinks(n,e){return n.map((n=>{const t=e.includes(n);return{link:n,found:t}}))}}var o=[];for(var a=0;a<256;++a){o.push((a+256).toString(16).slice(1))}function r(n,e=0){return(o[n[e+0]]+o[n[e+1]]+o[n[e+2]]+o[n[e+3]]+"-"+o[n[e+4]]+o[n[e+5]]+"-"+o[n[e+6]]+o[n[e+7]]+"-"+o[n[e+8]]+o[n[e+9]]+"-"+o[n[e+10]]+o[n[e+11]]+o[n[e+12]]+o[n[e+13]]+o[n[e+14]]+o[n[e+15]]).toLowerCase()}var i;var s=new Uint8Array(16);function d(){if(!i){i=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto);if(!i){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return i(s)}var c=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var l={randomUUID:c};function p(n,e,t){if(l.randomUUID&&true&&!n){return l.randomUUID()}n=n||{};var o=n.random||(n.rng||d)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;return r(o)}const u=({message:e,onClear:t})=>{if(!e){return null}return n("div",{class:"error-message"},n("span",null,e),t&&n("button",{class:"error-close",title:"Close",onClick:t},"×"))};const b=":host {\n display: block;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;\n background-color: #f8fafc;\n min-height: 100vh;\n}\n\n.test-runner-container {\n padding: 20px;\n background: white;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n margin: 20px 0;\n}\n\n.simple-test {\n margin: 20px 0;\n padding: 20px;\n border: 1px solid #ddd;\n border-radius: 4px;\n}\n\n.test-cases {\n margin: 20px 0;\n}\n\n.test-case {\n margin: 20px 0;\n padding: 20px;\n border: 1px solid #eee;\n border-radius: 4px;\n background: #f9f9f9;\n}\n\n.test-case h3 {\n margin-top: 0;\n color: #333;\n}\n\n.test-case textarea {\n width: 100%;\n padding: 10px;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-family: inherit;\n margin: 10px 0;\n}\n\n.test-case button {\n background: #007bff;\n color: white;\n border: none;\n padding: 10px 20px;\n border-radius: 4px;\n cursor: pointer;\n margin: 10px 5px 10px 0;\n}\n\n.test-case button:disabled {\n background: #ccc;\n cursor: not-allowed;\n}\n\n.output, .error {\n margin: 10px 0;\n padding: 10px;\n border-radius: 4px;\n}\n\n.output {\n background: #d4edda;\n border: 1px solid #c3e6cb;\n color: #155724;\n}\n\n.error {\n background: #f8d7da;\n border: 1px solid #f5c6cb;\n color: #721c24;\n}\n\n.test-runner-container {\n max-width: 1400px;\n margin: 0 auto;\n background: white;\n box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);\n}\n\n/* Header Styles */\n.test-runner-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 20px 24px;\n background: /*linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/ white;\n color: white;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n}\n\n.header-left, .header-right {\n display: flex;\n gap: 12px;\n align-items: center;\n}\n\n.header-center {\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.api-status {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.api-status-text {\n color: #28a745;\n font-weight: 500;\n font-size: 0.9rem;\n}\n\n/* Button Styles */\n.btn {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 10px 16px;\n border: none;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n text-decoration: none;\n position: relative;\n}\n\n.btn:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n transform: none !important;\n}\n\n.btn-primary {\n color: black;\n box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);\n}\n\n.btn-primary:hover:not(:disabled) {\n transform: translateY(-1px);\n box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);\n}\n\n.btn-secondary {\n background: rgba(255, 255, 255, 0.2);\n color: blue;\n border: 1px solid rgba(255, 255, 255, 0.3);\n}\n\n.btn-secondary:hover:not(:disabled) {\n background: rgba(255, 255, 255, 0.3);\n transform: translateY(-1px);\n}\n\n.btn-outline {\n background: transparent;\n color: #6b7280;\n border: 2px solid #e5e7eb;\n}\n\n.btn-outline:hover {\n background: #f9fafb;\n border-color: #d1d5db;\n transform: translateY(-1px);\n}\n\n.btn-icon {\n padding: 8px;\n min-width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n}\n\n.btn-run {\n color: white;\n}\n\n.btn-run:hover:not(:disabled) {\n transform: translateY(-1px);\n}\n\n.btn-delete {\n color: white;\n}\n\n.btn-delete:hover:not(:disabled) {\n transform: translateY(-1px);\n}\n\n.icon {\n font-size: 16px;\n}\n\n/* Main Content */\n.test-runner-content {\n padding: 0;\n}\n\n/* Column Headers */\n.column-headers {\n display: grid;\n grid-template-columns: 1fr 1.5fr 0.5fr 120px;\n gap: 1px;\n background: #e5e7eb;\n border-bottom: 2px solid #d1d5db;\n}\n\n.column-header {\n background: #f8fafc;\n padding: 16px 20px;\n font-weight: 600;\n color: #374151;\n font-size: 14px;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n\n/* Test Cases */\n.test-cases {\n background: white;\n}\n\n.test-case-row {\n display: grid;\n grid-template-columns: 1fr 1.5fr 0.5fr 120px;\n gap: 1px;\n border-bottom: 1px solid #e5e7eb;\n min-height: 200px;\n}\n\n.test-case-row:hover {\n background: #f9fafb;\n}\n\n/* Input Column */\n.input-column {\n padding: 20px;\n background: white;\n border-right: 1px solid #e5e7eb;\n}\n\n.input-group {\n margin-bottom: 16px;\n}\n\n.input-group label {\n display: block;\n margin-bottom: 8px;\n font-weight: 500;\n color: #374151;\n font-size: 14px;\n}\n\n.input-group textarea {\n width: 95%;\n padding: 12px;\n border: 2px solid #e5e7eb;\n border-radius: 8px;\n font-size: 14px;\n resize: vertical;\n outline: none;\n transition: border-color 0.2s ease;\n font-family: inherit;\n}\n\n.input-group textarea:focus {\n border-color: #3b82f6;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n}\n\n/* Keywords and Links */\n.keywords-group, .links-group {\n margin-bottom: 16px;\n}\n\n.keywords-group label, .links-group label {\n display: block;\n margin-bottom: 8px;\n font-weight: 500;\n color: #374151;\n font-size: 14px;\n}\n\n.tags-container, .links-container {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n align-items: center;\n}\n\n.tag {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n background: #dbeafe;\n color: #1e40af;\n padding: 4px 8px;\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n}\n\n.tag-remove {\n background: none;\n border: none;\n color: #1e40af;\n cursor: pointer;\n font-size: 14px;\n padding: 0;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n}\n\n.tag-remove:hover {\n background: rgba(30, 64, 175, 0.1);\n}\n\n.link-item {\n display: flex;\n align-items: center;\n gap: 6px;\n background: #f0f9ff;\n padding: 4px 8px;\n border-radius: 6px;\n font-size: 12px;\n}\n\n.link-item a {\n color: #0369a1;\n text-decoration: none;\n max-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.link-item a:hover {\n text-decoration: underline;\n}\n\n.link-remove {\n background: none;\n border: none;\n color: #0369a1;\n cursor: pointer;\n font-size: 12px;\n padding: 0;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n}\n\n.link-remove:hover {\n background: rgba(3, 105, 161, 0.1);\n}\n\n.tags-container input, .links-container input {\n border: 1px solid #d1d5db;\n border-radius: 6px;\n padding: 6px 8px;\n font-size: 12px;\n outline: none;\n min-width: 120px;\n}\n\n.tags-container input:focus, .links-container input:focus {\n border-color: #3b82f6;\n box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);\n}\n\n/* Output Column */\n.output-column {\n padding: 20px;\n background: white;\n border-right: 1px solid #e5e7eb;\n display: flex;\n flex-direction: column;\n}\n\n.output-content {\n background: #f8fafc;\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n padding: 16px;\n font-size: 14px;\n line-height: 1.6;\n color: #374151;\n white-space: pre-wrap;\n word-wrap: break-word;\n flex: 1;\n overflow-y: auto;\n max-height: 250px;\n overflow-x: scroll;\n}\n\n.output-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n color: #9ca3af;\n font-style: italic;\n flex: 1;\n background: #f9fafb;\n border: 2px dashed #d1d5db;\n border-radius: 8px;\n}\n\n/* Evaluation Column */\n.evaluation-column {\n padding: 20px;\n background: white;\n border-right: 1px solid #e5e7eb;\n display: flex;\n flex-direction: column;\n}\n\n.evaluation-content {\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex: 1;\n}\n\n.score-display {\n text-align: center;\n}\n\n.score-number {\n font-size: 24px;\n font-weight: 700;\n color: #111827;\n display: block;\n margin-bottom: 8px;\n}\n\n.score-bar {\n width: 100%;\n height: 8px;\n background: #e5e7eb;\n border-radius: 4px;\n overflow: hidden;\n}\n\n.score-fill {\n height: 100%;\n background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);\n transition: width 0.3s ease;\n}\n\n.evaluation-details {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.detail-item {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n}\n\n.status {\n width: 20px;\n height: 20px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n font-weight: bold;\n}\n\n.status.pass {\n background: #dcfce7;\n color: #166534;\n}\n\n.status.fail {\n background: #fef2f2;\n color: #dc2626;\n}\n\n.evaluation-text {\n font-size: 12px;\n color: #6b7280;\n line-height: 1.4;\n background: #f9fafb;\n padding: 8px;\n border-radius: 6px;\n border: 1px solid #e5e7eb;\n}\n\n.evaluation-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n color: #9ca3af;\n font-style: italic;\n flex: 1;\n background: #f9fafb;\n border: 2px dashed #d1d5db;\n border-radius: 8px;\n}\n\n/* New evaluation result styles */\n.evaluation-result {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.evaluation-status {\n font-weight: 600;\n font-size: 14px;\n padding: 8px 12px;\n border-radius: 4px;\n text-align: center;\n}\n\n.evaluation-status.passed {\n background: #d4edda;\n color: #155724;\n border: 1px solid #c3e6cb;\n}\n\n.evaluation-status.failed {\n background: #f8d7da;\n color: #721c24;\n border: 1px solid #f5c6cb;\n}\n\n.evaluation-score {\n font-size: 12px;\n color: #495057;\n text-align: center;\n font-weight: 500;\n}\n\n.evaluation-feedback {\n font-size: 12px;\n color: #6c757d;\n background: #f8f9fa;\n padding: 8px;\n border-radius: 4px;\n border: 1px solid #dee2e6;\n}\n\n/* Actions Column */\n.actions-column {\n padding: 20px;\n background: white;\n display: flex;\n flex-direction: column;\n gap: 12px;\n align-items: center;\n justify-content: flex-start;\n align-self: flex-start;\n}\n\n/* Add Test Case */\n.add-test-case {\n padding: 24px;\n text-align: center;\n background: #f9fafb;\n border-top: 1px solid #e5e7eb;\n}\n\n.hidden {\n display: none;\n}\n\n.error-message {\n background: #ffeaea;\n color: #b71c1c;\n border: 1px solid #f44336;\n padding: 0.75em 2.5em 0.75em 1em;\n border-radius: 4px;\n margin: 1em 0;\n position: relative;\n font-size: 1em;\n display: flex;\n align-items: center;\n gap: 1em;\n}\n\n.error-close {\n background: none;\n border: none;\n color: #b71c1c;\n font-size: 1.25em;\n font-weight: bold;\n cursor: pointer;\n position: absolute;\n right: 0.75em;\n top: 50%;\n transform: translateY(-50%);\n line-height: 1;\n padding: 0;\n}\n\n/* Responsive Design */\n@media (max-width: 1200px) {\n .test-case-row {\n grid-template-columns: 1fr;\n gap: 0;\n }\n \n .column-headers {\n display: none;\n }\n \n .input-column, .output-column, .evaluation-column, .actions-column {\n border-right: none;\n border-bottom: 1px solid #e5e7eb;\n }\n \n .actions-column {\n flex-direction: row;\n justify-content: center;\n }\n}\n\n@media (max-width: 768px) {\n .test-runner-header {\n flex-direction: column;\n gap: 16px;\n padding: 16px;\n }\n \n .header-left, .header-right {\n flex-wrap: wrap;\n justify-content: center;\n }\n \n .btn {\n font-size: 12px;\n padding: 8px 12px;\n }\n \n .input-column, .output-column, .evaluation-column, .actions-column {\n padding: 16px;\n }\n \n .test-case-row {\n min-height: auto;\n }\n}";const f=class{constructor(n){e(this,n)}apiKey;testCases=[{id:"1",question:"",expectedKeywords:[],expectedSourceLinks:[],isRunning:false}];isRunningAll=false;error="";fileInput;isExportingTestSuite=false;evaluationEngine;apiUrl="https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent";async componentWillLoad(){this.evaluationEngine=new t;console.log("🔍 componentWillLoad - apiKey:",this.apiKey?"SET":"NOT SET");console.log("🔍 componentWillLoad - apiKey value:",this.apiKey);if(!this.apiKey){throw new Error('API key is required. Please provide the apiKey prop: <llm-test-runner apiKey="your-api-key" />')}}componentDidLoad(){}disconnectedCallback(){}addNewTestCase(){const n={id:this.generateId(),question:"",expectedKeywords:[],expectedSourceLinks:[],isRunning:false};this.testCases=[...this.testCases,n]}updateTestCase(n,e){this.testCases=this.testCases.map((t=>t.id===n?{...t,...e}:t))}async runSingleTest(n){console.log("🚀 Starting test for question:",n.question);this.updateTestCase(n.id,{isRunning:true});try{const e=await this.callGeminiAPI(n.question);console.log("✅ AI call completed for test case:",n.id);this.updateTestCase(n.id,{isRunning:false,output:e,error:null});await this.evaluateResponse({...n,output:e})}catch(e){console.error("❌ Error in runSingleTest:",e);this.updateTestCase(n.id,{isRunning:false,output:null,error:e instanceof Error?e.message:"Unknown error"})}}deleteTestCase(n){this.testCases=this.testCases.filter((e=>e.id!==n))}addKeyword(n,e){if(e.trim()){const t=this.testCases.find((e=>e.id===n));if(t){this.updateTestCase(n,{expectedKeywords:[...t.expectedKeywords,e.trim()]})}}}removeKeyword(n,e){const t=this.testCases.find((e=>e.id===n));if(t){const o=t.expectedKeywords.filter(((n,t)=>t!==e));this.updateTestCase(n,{expectedKeywords:o})}}addSourceLink(n,e){if(e.trim()){const t=this.testCases.find((e=>e.id===n));if(t){this.updateTestCase(n,{expectedSourceLinks:[...t.expectedSourceLinks,e.trim()]})}}}removeSourceLink(n,e){const t=this.testCases.find((e=>e.id===n));if(t){const o=t.expectedSourceLinks.filter(((n,t)=>t!==e));this.updateTestCase(n,{expectedSourceLinks:o})}}async callGeminiAPI(n){console.log("🔍 callGeminiAPI - apiKey:",this.apiKey?"SET":"NOT SET");console.log("🔍 callGeminiAPI - apiKey value:",this.apiKey?`${this.apiKey.substring(0,10)}...`:"undefined");if(!this.apiKey){throw new Error("API key is required. Please provide the apiKey prop.")}const e={contents:[{parts:[{text:n}]}]};const t=await fetch(`${this.apiUrl}?key=${this.apiKey}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.json().catch((()=>({})));throw new Error(n.error?.message||`HTTP error! status: ${t.status}`)}const o=await t.json();if(o.candidates&&o.candidates[0]&&o.candidates[0].content){return o.candidates[0].content.parts[0].text}else{throw new Error("Unexpected response format from Gemini API")}}async evaluateResponse(n){if(!n.output){console.warn("⚠️ No output to evaluate for test case:",n.id);return}const e={testCaseId:n.id,question:n.question,expectedKeywords:n.expectedKeywords,expectedSourceLinks:n.expectedSourceLinks,actualResponse:n.output};await this.evaluationEngine.evaluateResponse(e,(e=>{console.log("📊 Evaluation result received:",e);this.updateTestCase(n.id,{evaluationResult:e})}))}async runAllTests(){this.isRunningAll=true;for(const n of this.testCases){if(!n.isRunning&&n.question.trim()){await this.runSingleTest(n);await new Promise((n=>setTimeout(n,1e3)))}}this.isRunningAll=false}generateId(){return p()}handleFileSelect(){this.fileInput.click()}async handleFileChange(n){const e=n.target;const t=e.files?.[0];e.value="";if(!t){this.error="No file selected.";return}const o=t.type==="application/json";const a=t.name.toLowerCase().endsWith(".json");if(!o&&!a){this.error="Invalid file type. Please select a JSON file.";return}this.error="";try{const n=await this.readFileAsync(t);const e=JSON.parse(n);if(!Array.isArray(e)){throw new Error("Invalid JSON structure. Expected a JSON array.")}const o=e.map((n=>({id:this.generateId(),question:n.question||"",expectedKeywords:Array.isArray(n.expectedKeywords)?n.expectedKeywords:[],expectedSourceLinks:Array.isArray(n.expectedSourceLinks)?n.expectedSourceLinks:[],isRunning:false})));this.testCases=o}catch(n){this.error=n?.message||"Error processing file. Please ensure it is a valid JSON array.";console.error("File Processing Error:",n)}}readFileAsync(n){return new Promise(((e,t)=>{const o=new FileReader;o.onload=()=>e(o.result);o.onerror=()=>t(o.error);o.readAsText(n)}))}downloadFile(n,e,t){const o=new Blob([n],{type:t});const a=URL.createObjectURL(o);const r=document.createElement("a");r.href=a;r.download=e;document.body.appendChild(r);r.click();document.body.removeChild(r);URL.revokeObjectURL(a)}async handleExportTestSuite(){this.isExportingTestSuite=true;try{const n=this.testCases.map((n=>({id:n.id,question:n.question,expectedKeywords:n.expectedKeywords,expectedSourceLinks:n.expectedSourceLinks})));const e=JSON.stringify(n,null,2);await new Promise((n=>setTimeout(n,500)));this.downloadFile(e,"test-suite.json","application/json")}finally{this.isExportingTestSuite=false}}render(){return n("div",{key:"dc5b661334cb4d4bb9bf51fb25363fe08ad938e3",class:"test-runner-container"},n("header",{key:"eede0d7f00c0bf5ff794fe2e53bad7a239f2d4d4",class:"test-runner-header"},n("div",{key:"19327ae6f7408843110a10f791e00ffdf3da6d64",class:"header-left"},n("input",{key:"b24227b27dc0f562318a67ca9c38b8793b55c644",class:"hidden",type:"file",ref:n=>this.fileInput=n,onChange:n=>this.handleFileChange(n),accept:".json,application/json"}),n("button",{key:"65adec40d3787115546c9b59e8691bc89c55c688",class:"btn btn-secondary",onClick:()=>this.handleFileSelect()},n("span",{key:"6fd40e85b4c99232330242b41199df1c4f947351",class:"icon"},"↑"),"Import Test Suite"),n("button",{key:"d7c4d6b7e3e9bb6951395a3c2c10b964ef2d2fca",class:"btn btn-secondary",onClick:()=>this.handleExportTestSuite(),disabled:this.isExportingTestSuite},n("span",{key:"bab67984c37b2744f35b4b2c34bfa3a500d196fb",class:"icon"},this.isExportingTestSuite?"⏳":"↓"),this.isExportingTestSuite?"Exporting...":"Export Test Suite")),n("div",{key:"74a7d6e148311151de86a66d7b146bd0d01c215c",class:"header-right"},n("button",{key:"3e9c33ef795755ebdf11fafa68801294b61a03d1",class:"btn btn-secondary"},n("span",{key:"89b3582178782392cbea1309ba32b5edc57f9392",class:"icon"},"⚙️"),"Prompt Editor"),n("button",{key:"e68e8edd5f532c7a8ec87746fa6d393c4297bc36",class:"btn btn-secondary"},n("span",{key:"7298d968bbc108cf060a0c309c9a8b2bce88aa90",class:"icon"},"↓"),"Export Test Results"),n("button",{key:"fb7d10cf9abda9968a2502bd8b4bf8e4cade11e8",class:"btn btn-primary",onClick:()=>this.runAllTests(),disabled:this.isRunningAll},this.isRunningAll?"Running...":"Run All"))),n(u,{key:"71eb4e561018a176a8c944107d734c32cd74334b",message:this.error,onClear:()=>this.error=""}),n("div",{key:"c120a8e40c6c6721dacd400266d4cd6270057c66",class:"test-runner-content"},n("div",{key:"7b864c6e0671d8be117b001fd87047fabdc851c0",class:"column-headers"},n("div",{key:"fcd6ae26d7b98422d800c4e3a4bcec587187be2b",class:"column-header"},"Input"),n("div",{key:"2855a067b11f8f9ddaf489daffb8a9fd2a317a44",class:"column-header"},"Output"),n("div",{key:"8b6d75b16005d19bacd8fa6d2008fa64c268e1ef",class:"column-header"},"Evaluation"),n("div",{key:"d14ea8cecb426c9692b16044124f3d23ddae671d",class:"column-header"},"Actions")),n("div",{key:"958aaba85391f7aadabd86c0395d0fe18b942ed4",class:"test-cases"},this.testCases.map((e=>n("div",{class:"test-case-row",key:e.id},n("div",{class:"input-column"},n("div",{class:"input-group"},n("label",null,"Question"),n("textarea",{value:e.question,onInput:n=>this.updateTestCase(e.id,{question:n.target.value}),placeholder:"Enter your question here...",rows:3})),n("div",{class:"keywords-group"},n("label",null,"Expected keywords"),n("div",{class:"tags-container"},e.expectedKeywords.map(((t,o)=>n("span",{class:"tag",key:o},t,n("button",{class:"tag-remove",onClick:()=>this.removeKeyword(e.id,o)},"×")))),n("input",{type:"text",placeholder:"New item...",onKeyDown:n=>{if(n.key==="Enter"){this.addKeyword(e.id,n.target.value);n.target.value=""}}}))),n("div",{class:"links-group"},n("label",null,"Expected source links"),n("div",{class:"links-container"},e.expectedSourceLinks.map(((t,o)=>n("div",{class:"link-item",key:o},n("a",{href:t,target:"_blank",rel:"noopener noreferrer"},t),n("button",{class:"link-remove",onClick:()=>this.removeSourceLink(e.id,o)},"×")))),n("input",{type:"url",placeholder:"New item...",onKeyDown:n=>{if(n.key==="Enter"){this.addSourceLink(e.id,n.target.value);n.target.value=""}}})))),n("div",{class:"output-column"},e.output?n("div",{class:"output-content"},e.output):n("div",{class:"output-placeholder"},e.isRunning?"Running...":"")),n("div",{class:"evaluation-column"},e.evaluationResult?n("div",{class:"evaluation-result"},n("div",{class:`evaluation-status ${e.evaluationResult.passed?"passed":"failed"}`},e.evaluationResult.passed?"✅ PASSED":"❌ FAILED"),n("div",{class:"evaluation-details"},"Keywords: ",e.evaluationResult.keywordMatches.filter((n=>n.found)).length,"/",e.evaluationResult.keywordMatches.length," found")):n("div",{class:"evaluation-placeholder"},e.isRunning?"Evaluating...":"")),n("div",{class:"actions-column"},n("button",{class:"btn btn-icon btn-run",onClick:()=>this.runSingleTest(e),disabled:e.isRunning||!e.question.trim(),title:!e.question.trim()?"Enter a question first":"Run this test"},e.isRunning?"⏳":"▶️"),n("button",{class:"btn btn-icon btn-delete",onClick:()=>this.deleteTestCase(e.id),title:"Delete this test"},"🗑️")))))),n("div",{key:"678932d3554c7ef2c86373bc4c972eb0f9894916",class:"add-test-case"},n("button",{key:"7f8447a4681214320647c55e06d1cfc0fc87b3fb",class:"btn btn-outline",onClick:()=>this.addNewTestCase()},"+ Add Question"))))}};f.style=b;export{f as LLMTestRunner};
2
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["src/lib/evaluation/evaluation-engine.ts","../../node_modules/uuid/dist/esm-browser/stringify.js","../../node_modules/uuid/dist/esm-browser/rng.js","../../node_modules/uuid/dist/esm-browser/native.js","../../node_modules/uuid/dist/esm-browser/v4.js","src/components/error-message/error-message.tsx","src/components/llm-test-runner/llm-test-runner.css?tag=llm-test-runner&encapsulation=shadow","src/components/llm-test-runner/llm-test-runner.tsx"],"sourcesContent":["import {\n EvaluationRequest,\n EvaluationResult,\n KeywordMatch,\n SourceLinkMatch,\n EvaluationCallback\n} from './types';\n\nexport class LLMEvaluationEngine {\n constructor() { }\n\n async evaluateResponse(\n request: EvaluationRequest,\n callback: EvaluationCallback\n ): Promise<void> {\n try {\n console.log('🔍 Starting evaluation for test case:', request.testCaseId);\n\n const result = await this.performEvaluation(request);\n\n console.log('Evaluation completed for test case:', request.testCaseId);\n console.log('Result:', result);\n\n callback(result);\n\n } catch (error) {\n console.error('Evaluation failed:', error);\n\n const errorResult: EvaluationResult = {\n testCaseId: request.testCaseId,\n passed: false,\n keywordMatches: [],\n sourceLinkMatches: [],\n timestamp: new Date().toISOString()\n };\n\n callback(errorResult);\n }\n }\n\n private async performEvaluation(request: EvaluationRequest): Promise<EvaluationResult> {\n const { testCaseId, expectedKeywords, expectedSourceLinks, actualResponse } = request;\n\n const keywordMatches = this.evaluateKeywords(expectedKeywords, actualResponse);\n const sourceLinkMatches = this.evaluateSourceLinks(expectedSourceLinks, actualResponse);\n\n // Test passes only if ALL expected keywords and source links are found\n const totalItems = keywordMatches.length + sourceLinkMatches.length;\n const foundItems = keywordMatches.filter(m => m.found).length + sourceLinkMatches.filter(m => m.found).length;\n const passed = foundItems === totalItems;\n\n return {\n testCaseId,\n passed,\n keywordMatches,\n sourceLinkMatches,\n timestamp: new Date().toISOString()\n };\n }\n\n private evaluateKeywords(expectedKeywords: string[], actualResponse: string): KeywordMatch[] {\n // Case-insensitive keyword matching\n const response = actualResponse.toLowerCase();\n\n return expectedKeywords.map(keyword => {\n const keywordToMatch = keyword.toLowerCase();\n const found = response.includes(keywordToMatch);\n\n return {\n keyword,\n found\n };\n });\n }\n\n private evaluateSourceLinks(expectedSourceLinks: string[], actualResponse: string): SourceLinkMatch[] {\n return expectedSourceLinks.map(link => {\n const found = actualResponse.includes(link);\n\n return {\n link,\n found\n };\n });\n }\n\n\n\n}\n\n","import validate from './validate.js';\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n //\n // Note to future-self: No, you can't remove the `toLowerCase()` call.\n // REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351\n return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n var uuid = unsafeStringify(arr, offset);\n // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n return getRandomValues(rnds8);\n}","var randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n options = options || {};\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n offset = offset || 0;\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nexport default v4;","import { FunctionalComponent, h } from '@stencil/core';\n\ninterface ErrorMessageProps {\n message: string;\n onClear?: () => void;\n}\n\nexport const ErrorMessage: FunctionalComponent<ErrorMessageProps> = ({ message, onClear }) => {\n if (!message) {\n return null;\n }\n\n return (\n <div class=\"error-message\">\n <span>{message}</span>\n {onClear && (\n <button\n class=\"error-close\"\n title=\"Close\"\n onClick={onClear}\n >\n &times;\n </button>\n )}\n </div>\n );\n};\n",":host {\n display: block;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;\n background-color: #f8fafc;\n min-height: 100vh;\n}\n\n.test-runner-container {\n padding: 20px;\n background: white;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n margin: 20px 0;\n}\n\n.simple-test {\n margin: 20px 0;\n padding: 20px;\n border: 1px solid #ddd;\n border-radius: 4px;\n}\n\n.test-cases {\n margin: 20px 0;\n}\n\n.test-case {\n margin: 20px 0;\n padding: 20px;\n border: 1px solid #eee;\n border-radius: 4px;\n background: #f9f9f9;\n}\n\n.test-case h3 {\n margin-top: 0;\n color: #333;\n}\n\n.test-case textarea {\n width: 100%;\n padding: 10px;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-family: inherit;\n margin: 10px 0;\n}\n\n.test-case button {\n background: #007bff;\n color: white;\n border: none;\n padding: 10px 20px;\n border-radius: 4px;\n cursor: pointer;\n margin: 10px 5px 10px 0;\n}\n\n.test-case button:disabled {\n background: #ccc;\n cursor: not-allowed;\n}\n\n.output, .error {\n margin: 10px 0;\n padding: 10px;\n border-radius: 4px;\n}\n\n.output {\n background: #d4edda;\n border: 1px solid #c3e6cb;\n color: #155724;\n}\n\n.error {\n background: #f8d7da;\n border: 1px solid #f5c6cb;\n color: #721c24;\n}\n\n.test-runner-container {\n max-width: 1400px;\n margin: 0 auto;\n background: white;\n box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);\n}\n\n/* Header Styles */\n.test-runner-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 20px 24px;\n background: /*linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/ white;\n color: white;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n}\n\n.header-left, .header-right {\n display: flex;\n gap: 12px;\n align-items: center;\n}\n\n.header-center {\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.api-status {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.api-status-text {\n color: #28a745;\n font-weight: 500;\n font-size: 0.9rem;\n}\n\n/* Button Styles */\n.btn {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 10px 16px;\n border: none;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n text-decoration: none;\n position: relative;\n}\n\n.btn:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n transform: none !important;\n}\n\n.btn-primary {\n color: black;\n box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);\n}\n\n.btn-primary:hover:not(:disabled) {\n transform: translateY(-1px);\n box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);\n}\n\n.btn-secondary {\n background: rgba(255, 255, 255, 0.2);\n color: blue;\n border: 1px solid rgba(255, 255, 255, 0.3);\n}\n\n.btn-secondary:hover:not(:disabled) {\n background: rgba(255, 255, 255, 0.3);\n transform: translateY(-1px);\n}\n\n.btn-outline {\n background: transparent;\n color: #6b7280;\n border: 2px solid #e5e7eb;\n}\n\n.btn-outline:hover {\n background: #f9fafb;\n border-color: #d1d5db;\n transform: translateY(-1px);\n}\n\n.btn-icon {\n padding: 8px;\n min-width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n}\n\n.btn-run {\n color: white;\n}\n\n.btn-run:hover:not(:disabled) {\n transform: translateY(-1px);\n}\n\n.btn-delete {\n color: white;\n}\n\n.btn-delete:hover:not(:disabled) {\n transform: translateY(-1px);\n}\n\n.icon {\n font-size: 16px;\n}\n\n/* Main Content */\n.test-runner-content {\n padding: 0;\n}\n\n/* Column Headers */\n.column-headers {\n display: grid;\n grid-template-columns: 1fr 1.5fr 0.5fr 120px;\n gap: 1px;\n background: #e5e7eb;\n border-bottom: 2px solid #d1d5db;\n}\n\n.column-header {\n background: #f8fafc;\n padding: 16px 20px;\n font-weight: 600;\n color: #374151;\n font-size: 14px;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n\n/* Test Cases */\n.test-cases {\n background: white;\n}\n\n.test-case-row {\n display: grid;\n grid-template-columns: 1fr 1.5fr 0.5fr 120px;\n gap: 1px;\n border-bottom: 1px solid #e5e7eb;\n min-height: 200px;\n}\n\n.test-case-row:hover {\n background: #f9fafb;\n}\n\n/* Input Column */\n.input-column {\n padding: 20px;\n background: white;\n border-right: 1px solid #e5e7eb;\n}\n\n.input-group {\n margin-bottom: 16px;\n}\n\n.input-group label {\n display: block;\n margin-bottom: 8px;\n font-weight: 500;\n color: #374151;\n font-size: 14px;\n}\n\n.input-group textarea {\n width: 95%;\n padding: 12px;\n border: 2px solid #e5e7eb;\n border-radius: 8px;\n font-size: 14px;\n resize: vertical;\n outline: none;\n transition: border-color 0.2s ease;\n font-family: inherit;\n}\n\n.input-group textarea:focus {\n border-color: #3b82f6;\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n}\n\n/* Keywords and Links */\n.keywords-group, .links-group {\n margin-bottom: 16px;\n}\n\n.keywords-group label, .links-group label {\n display: block;\n margin-bottom: 8px;\n font-weight: 500;\n color: #374151;\n font-size: 14px;\n}\n\n.tags-container, .links-container {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n align-items: center;\n}\n\n.tag {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n background: #dbeafe;\n color: #1e40af;\n padding: 4px 8px;\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n}\n\n.tag-remove {\n background: none;\n border: none;\n color: #1e40af;\n cursor: pointer;\n font-size: 14px;\n padding: 0;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n}\n\n.tag-remove:hover {\n background: rgba(30, 64, 175, 0.1);\n}\n\n.link-item {\n display: flex;\n align-items: center;\n gap: 6px;\n background: #f0f9ff;\n padding: 4px 8px;\n border-radius: 6px;\n font-size: 12px;\n}\n\n.link-item a {\n color: #0369a1;\n text-decoration: none;\n max-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.link-item a:hover {\n text-decoration: underline;\n}\n\n.link-remove {\n background: none;\n border: none;\n color: #0369a1;\n cursor: pointer;\n font-size: 12px;\n padding: 0;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n}\n\n.link-remove:hover {\n background: rgba(3, 105, 161, 0.1);\n}\n\n.tags-container input, .links-container input {\n border: 1px solid #d1d5db;\n border-radius: 6px;\n padding: 6px 8px;\n font-size: 12px;\n outline: none;\n min-width: 120px;\n}\n\n.tags-container input:focus, .links-container input:focus {\n border-color: #3b82f6;\n box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);\n}\n\n/* Output Column */\n.output-column {\n padding: 20px;\n background: white;\n border-right: 1px solid #e5e7eb;\n display: flex;\n flex-direction: column;\n}\n\n.output-content {\n background: #f8fafc;\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n padding: 16px;\n font-size: 14px;\n line-height: 1.6;\n color: #374151;\n white-space: pre-wrap;\n word-wrap: break-word;\n flex: 1;\n overflow-y: auto;\n max-height: 250px;\n overflow-x: scroll;\n}\n\n.output-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n color: #9ca3af;\n font-style: italic;\n flex: 1;\n background: #f9fafb;\n border: 2px dashed #d1d5db;\n border-radius: 8px;\n}\n\n/* Evaluation Column */\n.evaluation-column {\n padding: 20px;\n background: white;\n border-right: 1px solid #e5e7eb;\n display: flex;\n flex-direction: column;\n}\n\n.evaluation-content {\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex: 1;\n}\n\n.score-display {\n text-align: center;\n}\n\n.score-number {\n font-size: 24px;\n font-weight: 700;\n color: #111827;\n display: block;\n margin-bottom: 8px;\n}\n\n.score-bar {\n width: 100%;\n height: 8px;\n background: #e5e7eb;\n border-radius: 4px;\n overflow: hidden;\n}\n\n.score-fill {\n height: 100%;\n background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);\n transition: width 0.3s ease;\n}\n\n.evaluation-details {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.detail-item {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n}\n\n.status {\n width: 20px;\n height: 20px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n font-weight: bold;\n}\n\n.status.pass {\n background: #dcfce7;\n color: #166534;\n}\n\n.status.fail {\n background: #fef2f2;\n color: #dc2626;\n}\n\n.evaluation-text {\n font-size: 12px;\n color: #6b7280;\n line-height: 1.4;\n background: #f9fafb;\n padding: 8px;\n border-radius: 6px;\n border: 1px solid #e5e7eb;\n}\n\n.evaluation-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n color: #9ca3af;\n font-style: italic;\n flex: 1;\n background: #f9fafb;\n border: 2px dashed #d1d5db;\n border-radius: 8px;\n}\n\n/* New evaluation result styles */\n.evaluation-result {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.evaluation-status {\n font-weight: 600;\n font-size: 14px;\n padding: 8px 12px;\n border-radius: 4px;\n text-align: center;\n}\n\n.evaluation-status.passed {\n background: #d4edda;\n color: #155724;\n border: 1px solid #c3e6cb;\n}\n\n.evaluation-status.failed {\n background: #f8d7da;\n color: #721c24;\n border: 1px solid #f5c6cb;\n}\n\n.evaluation-score {\n font-size: 12px;\n color: #495057;\n text-align: center;\n font-weight: 500;\n}\n\n.evaluation-feedback {\n font-size: 12px;\n color: #6c757d;\n background: #f8f9fa;\n padding: 8px;\n border-radius: 4px;\n border: 1px solid #dee2e6;\n}\n\n/* Actions Column */\n.actions-column {\n padding: 20px;\n background: white;\n display: flex;\n flex-direction: column;\n gap: 12px;\n align-items: center;\n justify-content: flex-start;\n align-self: flex-start;\n}\n\n/* Add Test Case */\n.add-test-case {\n padding: 24px;\n text-align: center;\n background: #f9fafb;\n border-top: 1px solid #e5e7eb;\n}\n\n.hidden {\n display: none;\n}\n\n.error-message {\n background: #ffeaea;\n color: #b71c1c;\n border: 1px solid #f44336;\n padding: 0.75em 2.5em 0.75em 1em;\n border-radius: 4px;\n margin: 1em 0;\n position: relative;\n font-size: 1em;\n display: flex;\n align-items: center;\n gap: 1em;\n}\n\n.error-close {\n background: none;\n border: none;\n color: #b71c1c;\n font-size: 1.25em;\n font-weight: bold;\n cursor: pointer;\n position: absolute;\n right: 0.75em;\n top: 50%;\n transform: translateY(-50%);\n line-height: 1;\n padding: 0;\n}\n\n/* Responsive Design */\n@media (max-width: 1200px) {\n .test-case-row {\n grid-template-columns: 1fr;\n gap: 0;\n }\n \n .column-headers {\n display: none;\n }\n \n .input-column, .output-column, .evaluation-column, .actions-column {\n border-right: none;\n border-bottom: 1px solid #e5e7eb;\n }\n \n .actions-column {\n flex-direction: row;\n justify-content: center;\n }\n}\n\n@media (max-width: 768px) {\n .test-runner-header {\n flex-direction: column;\n gap: 16px;\n padding: 16px;\n }\n \n .header-left, .header-right {\n flex-wrap: wrap;\n justify-content: center;\n }\n \n .btn {\n font-size: 12px;\n padding: 8px 12px;\n }\n \n .input-column, .output-column, .evaluation-column, .actions-column {\n padding: 16px;\n }\n \n .test-case-row {\n min-height: auto;\n }\n}","import { Component, State, Prop, h } from '@stencil/core';\nimport { LLMEvaluationEngine } from '../../lib/evaluation/evaluation-engine';\nimport { EvaluationRequest, EvaluationResult } from '../../lib/evaluation/types';\nimport { v4 as uuidv4 } from 'uuid';\nimport { ErrorMessage } from '../error-message/error-message';\n\nexport interface TestCase {\n id: string;\n question: string;\n expectedKeywords: string[];\n expectedSourceLinks: string[];\n output?: string;\n isRunning?: boolean;\n error?: string;\n evaluationResult?: EvaluationResult;\n}\n\n@Component({\n tag: 'llm-test-runner',\n styleUrl: 'llm-test-runner.css',\n shadow: true,\n})\nexport class LLMTestRunner {\n @Prop() apiKey: string;\n \n @State() testCases: TestCase[] = [\n {\n id: '1',\n question: '',\n expectedKeywords: [],\n expectedSourceLinks: [],\n isRunning: false\n }\n ];\n @State() isRunningAll: boolean = false;\n @State() error: string = '';\n\n private fileInput!: HTMLInputElement;\n @State() isExportingTestSuite: boolean = false;\n\n private evaluationEngine: LLMEvaluationEngine;\n private apiUrl: string = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent';\n\n async componentWillLoad() {\n this.evaluationEngine = new LLMEvaluationEngine();\n \n console.log('🔍 componentWillLoad - apiKey:', this.apiKey ? 'SET' : 'NOT SET');\n console.log('🔍 componentWillLoad - apiKey value:', this.apiKey);\n \n if (!this.apiKey) {\n throw new Error('API key is required. Please provide the apiKey prop: <llm-test-runner apiKey=\"your-api-key\" />');\n }\n }\n\n\n componentDidLoad() {\n }\n\n disconnectedCallback() {\n }\n\n private addNewTestCase() {\n const newTestCase: TestCase = {\n id: this.generateId(),\n question: '',\n expectedKeywords: [],\n expectedSourceLinks: [],\n isRunning: false\n };\n this.testCases = [...this.testCases, newTestCase];\n }\n\n private updateTestCase(id: string, updates: Partial<TestCase>) {\n this.testCases = this.testCases.map(tc => \n tc.id === id ? { ...tc, ...updates } : tc\n );\n }\n\n private async runSingleTest(testCase: TestCase) {\n console.log('🚀 Starting test for question:', testCase.question);\n \n this.updateTestCase(testCase.id, { isRunning: true });\n \n try {\n const aiResponse = await this.callGeminiAPI(testCase.question);\n console.log('✅ AI call completed for test case:', testCase.id);\n \n this.updateTestCase(testCase.id, {\n isRunning: false,\n output: aiResponse,\n error: null\n });\n \n await this.evaluateResponse({\n ...testCase,\n output: aiResponse\n });\n \n } catch (error) {\n console.error('❌ Error in runSingleTest:', error);\n this.updateTestCase(testCase.id, {\n isRunning: false,\n output: null,\n error: error instanceof Error ? error.message : 'Unknown error'\n });\n }\n }\n\n private deleteTestCase(id: string) {\n this.testCases = this.testCases.filter(tc => tc.id !== id);\n }\n\n private addKeyword(testCaseId: string, keyword: string) {\n if (keyword.trim()) {\n const testCase = this.testCases.find(tc => tc.id === testCaseId);\n if (testCase) {\n this.updateTestCase(testCaseId, {\n expectedKeywords: [...testCase.expectedKeywords, keyword.trim()]\n });\n }\n }\n }\n\n private removeKeyword(testCaseId: string, index: number) {\n const testCase = this.testCases.find(tc => tc.id === testCaseId);\n if (testCase) {\n const newKeywords = testCase.expectedKeywords.filter((_, i) => i !== index);\n this.updateTestCase(testCaseId, { expectedKeywords: newKeywords });\n }\n }\n\n private addSourceLink(testCaseId: string, link: string) {\n if (link.trim()) {\n const testCase = this.testCases.find(tc => tc.id === testCaseId);\n if (testCase) {\n this.updateTestCase(testCaseId, {\n expectedSourceLinks: [...testCase.expectedSourceLinks, link.trim()]\n });\n }\n }\n }\n\n private removeSourceLink(testCaseId: string, index: number) {\n const testCase = this.testCases.find(tc => tc.id === testCaseId);\n if (testCase) {\n const newLinks = testCase.expectedSourceLinks.filter((_, i) => i !== index);\n this.updateTestCase(testCaseId, { expectedSourceLinks: newLinks });\n }\n }\n\n private async callGeminiAPI(prompt: string): Promise<string> {\n console.log('🔍 callGeminiAPI - apiKey:', this.apiKey ? 'SET' : 'NOT SET');\n console.log('🔍 callGeminiAPI - apiKey value:', this.apiKey ? `${this.apiKey.substring(0, 10)}...` : 'undefined');\n \n if (!this.apiKey) {\n throw new Error('API key is required. Please provide the apiKey prop.');\n }\n\n const requestBody = {\n contents: [{\n parts: [{\n text: prompt\n }]\n }]\n };\n\n const response = await fetch(`${this.apiUrl}?key=${this.apiKey}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(requestBody)\n });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({}));\n throw new Error(errorData.error?.message || `HTTP error! status: ${response.status}`);\n }\n\n const data = await response.json();\n \n if (data.candidates && data.candidates[0] && data.candidates[0].content) {\n return data.candidates[0].content.parts[0].text;\n } else {\n throw new Error('Unexpected response format from Gemini API');\n }\n }\n\n private async evaluateResponse(testCase: TestCase): Promise<void> {\n if (!testCase.output) {\n console.warn('⚠️ No output to evaluate for test case:', testCase.id);\n return;\n }\n\n const evaluationRequest: EvaluationRequest = {\n testCaseId: testCase.id,\n question: testCase.question,\n expectedKeywords: testCase.expectedKeywords,\n expectedSourceLinks: testCase.expectedSourceLinks,\n actualResponse: testCase.output\n };\n\n await this.evaluationEngine.evaluateResponse(evaluationRequest, (result: EvaluationResult) => {\n console.log('📊 Evaluation result received:', result);\n \n this.updateTestCase(testCase.id, {\n evaluationResult: result\n });\n });\n }\n\n private async runAllTests() {\n this.isRunningAll = true;\n \n for (const testCase of this.testCases) {\n if (!testCase.isRunning && testCase.question.trim()) {\n await this.runSingleTest(testCase);\n // Delay between tests to avoid rate limiting\n await new Promise(resolve => setTimeout(resolve, 1000));\n }\n }\n this.isRunningAll = false;\n }\n\n private generateId(): string {\n return uuidv4();\n }\n\n private handleFileSelect(): void {\n this.fileInput.click();\n }\n\n private async handleFileChange(event: Event): Promise<void> {\n const target = event.target as HTMLInputElement;\n const file = target.files?.[0];\n\n // Immediately clear the input value to allow for a new upload.\n target.value = '';\n\n if (!file) {\n this.error = 'No file selected.';\n return;\n }\n\n const isJsonType = file.type === 'application/json';\n const isJsonExtension = file.name.toLowerCase().endsWith('.json');\n if (!isJsonType && !isJsonExtension) {\n this.error = 'Invalid file type. Please select a JSON file.';\n return;\n }\n\n this.error = '';\n\n try {\n const content = await this.readFileAsync(file);\n const fileContent = JSON.parse(content);\n\n if (!Array.isArray(fileContent)) {\n throw new Error(\"Invalid JSON structure. Expected a JSON array.\");\n } \n const importedTestCases: TestCase[] = fileContent.map((item) => ({\n id: this.generateId(),\n question: item.question || '',\n expectedKeywords: Array.isArray(item.expectedKeywords) ? item.expectedKeywords : [],\n expectedSourceLinks: Array.isArray(item.expectedSourceLinks) ? item.expectedSourceLinks : [],\n isRunning: false\n }));\n this.testCases = importedTestCases; \n } catch (err) {\n this.error = err?.message || 'Error processing file. Please ensure it is a valid JSON array.';\n console.error('File Processing Error:', err);\n }\n }\n\n private readFileAsync(file: File): Promise<string> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = () => reject(reader.error);\n reader.readAsText(file);\n });\n }\n\n private downloadFile(content: string, filename: string, mimeType: string) {\n const blob = new Blob([content], { type: mimeType });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = filename;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n URL.revokeObjectURL(url);\n }\n\n private async handleExportTestSuite() {\n this.isExportingTestSuite = true;\n try {\n // Exporting only input data (question, expected keywords, expected source links)\n const exportData = this.testCases.map(testCase => ({\n id: testCase.id,\n question: testCase.question,\n expectedKeywords: testCase.expectedKeywords,\n expectedSourceLinks: testCase.expectedSourceLinks\n }));\n\n const jsonContent = JSON.stringify(exportData, null, 2);\n\n // Added a small delay to show the loading state\n await new Promise(resolve => setTimeout(resolve, 500));\n\n this.downloadFile(jsonContent, 'test-suite.json', 'application/json');\n } finally {\n this.isExportingTestSuite = false;\n }\n }\n\n render() {\n return (\n <div class=\"test-runner-container\">\n <header class=\"test-runner-header\">\n <div class=\"header-left\">\n <input\n class=\"hidden\"\n type=\"file\"\n ref={(el) => (this.fileInput = el as HTMLInputElement)}\n onChange={(e) => this.handleFileChange(e)}\n accept=\".json,application/json\"\n />\n <button class=\"btn btn-secondary\" onClick={() => this.handleFileSelect()}>\n <span class=\"icon\">↑</span>\n Import Test Suite\n </button>\n <button\n class=\"btn btn-secondary\"\n onClick={() => this.handleExportTestSuite()}\n disabled={this.isExportingTestSuite}\n >\n <span class=\"icon\">\n {this.isExportingTestSuite ? '⏳' : '↓'}\n </span>\n {this.isExportingTestSuite ? 'Exporting...' : 'Export Test Suite'}\n </button>\n </div>\n \n <div class=\"header-right\">\n <button class=\"btn btn-secondary\">\n <span class=\"icon\">⚙️</span>\n Prompt Editor\n </button>\n <button class=\"btn btn-secondary\">\n <span class=\"icon\">↓</span>\n Export Test Results\n </button>\n <button \n class=\"btn btn-primary\" \n onClick={() => this.runAllTests()}\n disabled={this.isRunningAll}\n >\n {this.isRunningAll ? 'Running...' : 'Run All'}\n </button>\n </div>\n </header>\n <ErrorMessage\n message={this.error}\n onClear={() => (this.error = '')}\n />\n <div class=\"test-runner-content\">\n <div class=\"column-headers\">\n <div class=\"column-header\">Input</div>\n <div class=\"column-header\">Output</div>\n <div class=\"column-header\">Evaluation</div>\n <div class=\"column-header\">Actions</div>\n </div>\n\n <div class=\"test-cases\">\n {this.testCases.map((testCase) => (\n <div class=\"test-case-row\" key={testCase.id}>\n <div class=\"input-column\">\n <div class=\"input-group\">\n <label>Question</label>\n <textarea\n value={testCase.question}\n onInput={(e) => this.updateTestCase(testCase.id, { \n question: (e.target as HTMLTextAreaElement).value \n })}\n placeholder=\"Enter your question here...\"\n rows={3}\n ></textarea>\n </div>\n \n <div class=\"keywords-group\">\n <label>Expected keywords</label>\n <div class=\"tags-container\">\n {testCase.expectedKeywords.map((keyword, index) => (\n <span class=\"tag\" key={index}>\n {keyword}\n <button \n class=\"tag-remove\" \n onClick={() => this.removeKeyword(testCase.id, index)}\n >×</button>\n </span>\n ))}\n <input\n type=\"text\"\n placeholder=\"New item...\"\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n this.addKeyword(testCase.id, (e.target as HTMLInputElement).value);\n (e.target as HTMLInputElement).value = '';\n }\n }}\n />\n </div>\n </div>\n \n <div class=\"links-group\">\n <label>Expected source links</label>\n <div class=\"links-container\">\n {testCase.expectedSourceLinks.map((link, index) => (\n <div class=\"link-item\" key={index}>\n <a href={link} target=\"_blank\" rel=\"noopener noreferrer\">{link}</a>\n <button \n class=\"link-remove\" \n onClick={() => this.removeSourceLink(testCase.id, index)}\n >×</button>\n </div>\n ))}\n <input\n type=\"url\"\n placeholder=\"New item...\"\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n this.addSourceLink(testCase.id, (e.target as HTMLInputElement).value);\n (e.target as HTMLInputElement).value = '';\n }\n }}\n />\n </div>\n </div>\n </div>\n\n <div class=\"output-column\">\n {testCase.output ? (\n <div class=\"output-content\">\n {testCase.output}\n </div>\n ) : (\n <div class=\"output-placeholder\">\n {testCase.isRunning ? 'Running...' : ''}\n </div>\n )}\n </div>\n\n <div class=\"evaluation-column\">\n {testCase.evaluationResult ? (\n <div class=\"evaluation-result\">\n <div class={`evaluation-status ${testCase.evaluationResult.passed ? 'passed' : 'failed'}`}>\n {testCase.evaluationResult.passed ? '✅ PASSED' : '❌ FAILED'}\n </div>\n <div class=\"evaluation-details\">\n Keywords: {testCase.evaluationResult.keywordMatches.filter(m => m.found).length}/{testCase.evaluationResult.keywordMatches.length} found\n </div>\n </div>\n ) : (\n <div class=\"evaluation-placeholder\">\n {testCase.isRunning ? 'Evaluating...' : ''}\n </div>\n )}\n </div>\n\n <div class=\"actions-column\">\n <button \n class=\"btn btn-icon btn-run\"\n onClick={() => this.runSingleTest(testCase)}\n disabled={testCase.isRunning || !testCase.question.trim()}\n title={!testCase.question.trim() ? \"Enter a question first\" : \"Run this test\"}\n >\n {testCase.isRunning ? '⏳' : '▶️'}\n </button>\n <button \n class=\"btn btn-icon btn-delete\"\n onClick={() => this.deleteTestCase(testCase.id)}\n title=\"Delete this test\"\n >\n 🗑️\n </button>\n </div>\n </div>\n ))}\n </div>\n\n <div class=\"add-test-case\">\n <button class=\"btn btn-outline\" onClick={() => this.addNewTestCase()}>\n + Add Question\n </button>\n </div>\n </div>\n </div>\n );\n }\n}"],"names":["uuidv4"],"mappings":";;MAQa,mBAAmB,CAAA;AAC9B,IAAA,WAAA,GAAA;AAEA,IAAA,MAAM,gBAAgB,CACpB,OAA0B,EAC1B,QAA4B,EAAA;AAE5B,QAAA,IAAI;YACF,OAAO,CAAC,GAAG,CAAC,uCAAuC,EAAE,OAAO,CAAC,UAAU,CAAC;YAExE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;YAEpD,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,OAAO,CAAC,UAAU,CAAC;AACtE,YAAA,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC;YAE9B,QAAQ,CAAC,MAAM,CAAC;;QAEhB,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC;AAE1C,YAAA,MAAM,WAAW,GAAqB;gBACpC,UAAU,EAAE,OAAO,CAAC,UAAU;AAC9B,gBAAA,MAAM,EAAE,KAAK;AACb,gBAAA,cAAc,EAAE,EAAE;AAClB,gBAAA,iBAAiB,EAAE,EAAE;AACrB,gBAAA,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW;aAClC;YAED,QAAQ,CAAC,WAAW,CAAC;;;IAIjB,MAAM,iBAAiB,CAAC,OAA0B,EAAA;QACxD,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,cAAc,EAAE,GAAG,OAAO;QAErF,MAAM,cAAc,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xB,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,KAAK,EAAC,iBAAiB,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,cAAc,EAAE,EAAA,EAAA,gBAAA,CAE3D,CACL,CACF,CACF;;;;;;;","x_google_ignoreList":[1,2,3,4]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-test-runner.entry.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ import{p as r,b as e}from"./p-DBp-rMPb.js";export{s as setNonce}from"./p-DBp-rMPb.js";import{g as t}from"./p-DQuL1Twl.js";var p=()=>{const s=import.meta.url;const e={};if(s!==""){e.resourcesUrl=new URL(".",s).href}return r(e)};p().then((async r=>{await t();return e([["p-ed2ea423",[[257,"llm-test-runner",{apiKey:[1,"api-key"],testCases:[32],isRunningAll:[32],error:[32],isExportingTestSuite:[32]}]]]],r)}));
2
+ //# sourceMappingURL=llm-testrunner.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-testrunner.esm.js","sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.38.1 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;;AAKA,IAAI,YAAY,GAAG,MAAM;AAUzB,EAAE,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG;AACpC,EAAE,MAAM,IAAI,GAAiE,EAAE;AAC/E,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI;AACrD;AACA,EAAE,OAAO,cAAc,CAAC,IAAI,CAAC;AAC7B,CAAC;;ACnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAM,aAAa,EAAE;AACvB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7D,CAAC,CAAC","x_google_ignoreList":[0]}
@@ -0,0 +1,3 @@
1
+ const e="llm-testrunner";const t={hydratedSelectorName:"hydrated",lazyLoad:true,propChangeCallback:false,updatable:true};var n=Object.defineProperty;var r=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:true})};var i=(e,t)=>{var n;const r=t.t;const i=Object.entries((n=r.i)!=null?n:{});i.map((([n,[r]])=>{if(r&31||r&32){const r=e[n];const i=s(Object.getPrototypeOf(e),n)||Object.getOwnPropertyDescriptor(e,n);if(i){Object.defineProperty(e,n,{get(){return i.get.call(this)},set(e){i.set.call(this,e)},configurable:true,enumerable:true})}e[n]=t.o.has(n)?t.o.get(n):r}}))};function s(e,t){while(e){const n=Object.getOwnPropertyDescriptor(e,t);if(n==null?void 0:n.get)return n;e=Object.getPrototypeOf(e)}return void 0}var o=e=>{if(e.__stencil__getHostRef){return e.__stencil__getHostRef()}return void 0};var l=(e,t)=>{if(!t)return;e.__stencil__getHostRef=()=>t;t.l=e;{i(e,t)}};var f=(e,t)=>{const n={u:0,$hostElement$:e,t,o:new Map,v:new Map};{n.h=new Promise((e=>n.p=e));e["s-p"]=[];e["s-rc"]=[]}{n.m=[]}const r=n;e.__stencil__getHostRef=()=>r;return r};var a=(e,t)=>t in e;var c=(e,t)=>(0,console.error)(e,t);var u=new Map;var v=(e,t,n)=>{const r=e.$.replace(/-/g,"_");const i=e.S;if(!i){return void 0}const s=u.get(i);if(s){return s[r]}
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${i}.entry.js${""}`).then((e=>{{u.set(i,e)}return e[r]}),(e=>{c(e,t.$hostElement$)}))};var d=new Map;var h="{visibility:hidden}.hydrated{visibility:inherit}";var p="slot-fb{display:contents}slot-fb[hidden]{display:none}";var m=typeof window!=="undefined"?window:{};var y={u:0,j:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,r)=>e.addEventListener(t,n,r),rel:(e,t,n,r)=>e.removeEventListener(t,n,r),ce:(e,t)=>new CustomEvent(e,t)};var b=e=>Promise.resolve(e);var w=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false})();var $=w?(()=>!!m.document&&Object.getOwnPropertyDescriptor(m.document.adoptedStyleSheets,"length").writable)():false;var g=false;var S=[];var j=[];var O=(e,t)=>n=>{e.push(n);if(!g){g=true;if(t&&y.u&4){E(C)}else{y.raf(C)}}};var k=e=>{for(let t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){c(e)}}e.length=0};var C=()=>{k(S);{k(j);if(g=S.length>0){y.raf(C)}}};var E=e=>b().then(e);var M=O(j,true);var x=e=>{e=typeof e;return e==="object"||e==="function"};function P(e){var t,n,r;return(r=(n=(t=e.head)==null?void 0:t.querySelector('meta[name="csp-nonce"]'))==null?void 0:n.getAttribute("content"))!=null?r:void 0}var U=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var R={};r(R,{err:()=>N,map:()=>W,ok:()=>D,unwrap:()=>A,unwrapErr:()=>L});var D=e=>({isOk:true,isErr:false,value:e});var N=e=>({isOk:false,isErr:true,value:e});function W(e,t){if(e.isOk){const n=t(e.value);if(n instanceof Promise){return n.then((e=>D(e)))}else{return D(n)}}if(e.isErr){const t=e.value;return N(t)}throw"should never get here"}var A=e=>{if(e.isOk){return e.value}else{throw e.value}};var L=e=>{if(e.isErr){return e.value}else{throw e.value}};function z(e){return void 0}var T;function H(e){var t;const n=this.attachShadow({mode:"open"});if(T===void 0)T=(t=z())!=null?t:null;if(T){if($){n.adoptedStyleSheets.push(T)}else{n.adoptedStyleSheets=[...n.adoptedStyleSheets,T]}}}var V=(e,t="")=>{{return()=>{}}};var q=(e,t)=>{{return()=>{}}};var F=new WeakMap;var I=(e,t,n)=>{let r=d.get(e);if(w&&n){r=r||new CSSStyleSheet;if(typeof r==="string"){r=t}else{r.replaceSync(t)}}else{r=t}d.set(e,r)};var G=(e,t,n)=>{var r;const i=_(t);const s=d.get(i);if(!m.document){return i}e=e.nodeType===11?e:m.document;if(s){if(typeof s==="string"){e=e.head||e;let n=F.get(e);let o;if(!n){F.set(e,n=new Set)}if(!n.has(i)){{o=m.document.createElement("style");o.innerHTML=s;const n=(r=y.O)!=null?r:P(m.document);if(n!=null){o.setAttribute("nonce",n)}if(!(t.u&1)){if(e.nodeName==="HEAD"){const t=e.querySelectorAll("link[rel=preconnect]");const n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(o,(n==null?void 0:n.parentNode)===e?n:null)}else if("host"in e){if(w){const t=new CSSStyleSheet;t.replaceSync(s);if($){e.adoptedStyleSheets.unshift(t)}else{e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}}else{const t=e.querySelector("style");if(t){t.innerHTML=s+t.innerHTML}else{e.prepend(o)}}}else{e.append(o)}}if(t.u&1){e.insertBefore(o,null)}}if(t.u&4){o.innerHTML+=p}if(n){n.add(i)}}}else if(!e.adoptedStyleSheets.includes(s)){if($){e.adoptedStyleSheets.push(s)}else{e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]}}}return i};var Y=e=>{const t=e.t;const n=e.$hostElement$;const r=t.u;const i=V("attachStyles",t.$);const s=G(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);if(r&10){n["s-sc"]=s;n.classList.add(s+"-h")}i()};var _=(e,t)=>"sc-"+e.$;var B=(e,t,...n)=>{let r=null;let i=null;let s=false;let o=false;const l=[];const f=t=>{for(let n=0;n<t.length;n++){r=t[n];if(Array.isArray(r)){f(r)}else if(r!=null&&typeof r!=="boolean"){if(s=typeof e!=="function"&&!x(r)){r=String(r)}if(s&&o){l[l.length-1].k+=r}else{l.push(s?J(null,r):r)}o=s}}};f(n);if(t){if(t.key){i=t.key}{const e=t.className||t.class;if(e){t.class=typeof e!=="object"?e:Object.keys(e).filter((t=>e[t])).join(" ")}}}if(typeof e==="function"){return e(t===null?{}:t,l,X)}const a=J(e,null);a.C=t;if(l.length>0){a.M=l}{a.P=i}return a};var J=(e,t)=>{const n={u:0,U:e,k:t,R:null,M:null};{n.C=null}{n.P=null}return n};var K={};var Q=e=>e&&e.U===K;var X={forEach:(e,t)=>e.map(Z).forEach(t),map:(e,t)=>e.map(Z).map(t).map(ee)};var Z=e=>({vattrs:e.C,vchildren:e.M,vkey:e.P,vname:e.D,vtag:e.U,vtext:e.k});var ee=e=>{if(typeof e.vtag==="function"){const t={...e.vattrs};if(e.vkey){t.key=e.vkey}if(e.vname){t.name=e.vname}return B(e.vtag,t,...e.vchildren||[])}const t=J(e.vtag,e.vtext);t.C=e.vattrs;t.M=e.vchildren;t.P=e.vkey;t.D=e.vname;return t};var te=e=>{const t=U(e);return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,"g")};te("::slotted");te(":host");te(":host-context");var ne=(e,t,n)=>{if(e!=null&&!x(e)){if(t&1){return String(e)}return e}return e};var re=(e,t,n)=>{const r=y.ce(t,n);e.dispatchEvent(r);return r};var ie=(e,t,n,r,i,s,o)=>{if(n===r){return}let l=a(e,t);let f=t.toLowerCase();if(t==="class"){const t=e.classList;const i=oe(n);let s=oe(r);{t.remove(...i.filter((e=>e&&!s.includes(e))));t.add(...s.filter((e=>e&&!i.includes(e))))}}else if(t==="key");else if(t==="ref"){if(r){r(e)}}else if(!l&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(a(m,f)){t=f.slice(2)}else{t=f[2]+t.slice(3)}if(n||r){const i=t.endsWith(le);t=t.replace(fe,"");if(n){y.rel(e,t,n,i)}if(r){y.ael(e,t,r,i)}}}else{const o=x(r);if((l||o&&r!==null)&&true){try{if(!e.tagName.includes("-")){const i=r==null?"":r;if(t==="list"){l=false}else if(n==null||e[t]!=i){if(typeof e.__lookupSetter__(t)==="function"){e[t]=i}else{e.setAttribute(t,i)}}}else if(e[t]!==r){e[t]=r}}catch(e){}}if(r==null||r===false){if(r!==false||e.getAttribute(t)===""){{e.removeAttribute(t)}}}else if((!l||s&4||i)&&!o&&e.nodeType===1){r=r===true?"":r;{e.setAttribute(t,r)}}}};var se=/\s/;var oe=e=>{if(typeof e==="object"&&e&&"baseVal"in e){e=e.baseVal}if(!e||typeof e!=="string"){return[]}return e.split(se)};var le="Capture";var fe=new RegExp(le+"$");var ae=(e,t,n,r)=>{const i=t.R.nodeType===11&&t.R.host?t.R.host:t.R;const s=e&&e.C||{};const o=t.C||{};{for(const e of ce(Object.keys(s))){if(!(e in o)){ie(i,e,s[e],void 0,n,t.u)}}}for(const e of ce(Object.keys(o))){ie(i,e,s[e],o[e],n,t.u)}};function ce(e){return e.includes("ref")?[...e.filter((e=>e!=="ref")),"ref"]:e}var ue;var ve=false;var de=(e,t,n)=>{const r=t.M[n];let i=0;let s;let o;if(r.k!==null){s=r.R=m.document.createTextNode(r.k)}else{if(!m.document){throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.")}s=r.R=m.document.createElement(r.U);{ae(null,r,ve)}if(r.M){for(i=0;i<r.M.length;++i){o=de(e,r,i);if(o){s.appendChild(o)}}}}s["s-hn"]=ue;return s};var he=(e,t,n,r,i,s)=>{let o=e;let l;if(o.shadowRoot&&o.tagName===ue){o=o.shadowRoot}for(;i<=s;++i){if(r[i]){l=de(null,n,i);if(l){r[i].R=l;$e(o,l,t)}}}};var pe=(e,t,n)=>{for(let r=t;r<=n;++r){const t=e[r];if(t){const e=t.R;we(t);if(e){e.remove()}}}};var me=(e,t,n,r,i=false)=>{let s=0;let o=0;let l=0;let f=0;let a=t.length-1;let c=t[0];let u=t[a];let v=r.length-1;let d=r[0];let h=r[v];let p;let m;while(s<=a&&o<=v){if(c==null){c=t[++s]}else if(u==null){u=t[--a]}else if(d==null){d=r[++o]}else if(h==null){h=r[--v]}else if(ye(c,d,i)){be(c,d,i);c=t[++s];d=r[++o]}else if(ye(u,h,i)){be(u,h,i);u=t[--a];h=r[--v]}else if(ye(c,h,i)){be(c,h,i);$e(e,c.R,u.R.nextSibling);c=t[++s];h=r[--v]}else if(ye(u,d,i)){be(u,d,i);$e(e,u.R,c.R);u=t[--a];d=r[++o]}else{l=-1;{for(f=s;f<=a;++f){if(t[f]&&t[f].P!==null&&t[f].P===d.P){l=f;break}}}if(l>=0){m=t[l];if(m.U!==d.U){p=de(t&&t[o],n,l)}else{be(m,d,i);t[l]=void 0;p=m.R}d=r[++o]}else{p=de(t&&t[o],n,o);d=r[++o]}if(p){{$e(c.R.parentNode,p,c.R)}}}}if(s>a){he(e,r[v+1]==null?null:r[v+1].R,n,r,o,v)}else if(o>v){pe(t,s,a)}};var ye=(e,t,n=false)=>{if(e.U===t.U){if(!n){return e.P===t.P}if(n&&!e.P&&t.P){e.P=t.P}return true}return false};var be=(e,n,r=false)=>{const i=n.R=e.R;const s=e.M;const o=n.M;const l=n.k;if(l===null){{ae(e,n,ve)}if(s!==null&&o!==null){me(i,s,n,o,r)}else if(o!==null){if(e.k!==null){i.textContent=""}he(i,null,n,o,0,o.length-1)}else if(!r&&t.updatable&&s!==null){pe(s,0,s.length-1)}else;}else if(e.k!==l){i.data=l}};var we=e=>{{e.C&&e.C.ref&&e.C.ref(null);e.M&&e.M.map(we)}};var $e=(e,t,n)=>{{return e==null?void 0:e.insertBefore(t,n)}};var ge=(e,t,n=false)=>{const r=e.$hostElement$;const i=e.N||J(null,null);const s=Q(t);const o=s?t:B(null,null,t);ue=r.tagName;if(n&&o.C){for(const e of Object.keys(o.C)){if(r.hasAttribute(e)&&!["key","ref","style","class"].includes(e)){o.C[e]=r[e]}}}o.U=null;o.u|=4;e.N=o;o.R=i.R=r.shadowRoot||r;be(i,o,n)};var Se=(e,t)=>{if(t&&!e.W&&t["s-p"]){const n=t["s-p"].push(new Promise((r=>e.W=()=>{t["s-p"].splice(n-1,1);r()})))}};var je=(e,t)=>{{e.u|=16}if(e.u&4){e.u|=512;return}Se(e,e.A);const n=()=>Oe(e,t);if(t){queueMicrotask((()=>{n()}));return}return M(n)};var Oe=(e,t)=>{const n=e.$hostElement$;const r=V("scheduleUpdate",e.t.$);const i=e.l;if(!i){throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`)}let s;if(t){{if(e.m.length){e.m.forEach((e=>e(n)))}}s=Ue(i,"componentWillLoad",void 0,n)}else{s=Ue(i,"componentWillUpdate",void 0,n)}s=ke(s,(()=>Ue(i,"componentWillRender",void 0,n)));r();return ke(s,(()=>Ee(e,i,t)))};var ke=(e,t)=>Ce(e)?e.then(t).catch((e=>{console.error(e);t()})):t();var Ce=e=>e instanceof Promise||e&&e.then&&typeof e.then==="function";var Ee=async(e,t,n)=>{var r;const i=e.$hostElement$;const s=V("update",e.t.$);const o=i["s-rc"];if(n){Y(e)}const l=V("render",e.t.$);{Me(e,t,i,n)}if(o){o.map((e=>e()));i["s-rc"]=void 0}l();s();{const t=(r=i["s-p"])!=null?r:[];const n=()=>xe(e);if(t.length===0){n()}else{Promise.all(t).then(n);e.u|=4;t.length=0}}};var Me=(e,t,n,r)=>{try{t=t.render();{e.u&=-17}{e.u|=2}{{{ge(e,t,r)}}}}catch(t){c(t,e.$hostElement$)}return null};var xe=e=>{const t=e.t.$;const n=e.$hostElement$;const r=V("postUpdate",t);const i=e.l;const s=e.A;Ue(i,"componentDidRender",void 0,n);if(!(e.u&64)){e.u|=64;{Re(n)}Ue(i,"componentDidLoad",void 0,n);r();{e.p(n);if(!s){Pe()}}}else{Ue(i,"componentDidUpdate",void 0,n);r()}{if(e.W){e.W();e.W=void 0}if(e.u&512){E((()=>je(e,false)))}e.u&=-517}};var Pe=t=>{E((()=>re(m,"appload",{detail:{namespace:e}})))};var Ue=(e,t,n,r)=>{if(e&&e[t]){try{return e[t](n)}catch(e){c(e,r)}}return void 0};var Re=e=>{var n;return e.classList.add((n=t.hydratedSelectorName)!=null?n:"hydrated")};var De=(e,t)=>o(e).o.get(t);var Ne=(e,t,n,r)=>{const i=o(e);if(!i){return}if(!i){throw new Error(`Couldn't find host element for "${r.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`)}const s=i.o.get(t);const l=i.u;const f=i.l;n=ne(n,r.i[t][0]);const a=Number.isNaN(s)&&Number.isNaN(n);const c=n!==s&&!a;if((!(l&8)||s===void 0)&&c){i.o.set(t,n);if(f){if((l&(2|16))===2){if(f.componentShouldUpdate){if(f.componentShouldUpdate(n,s,t)===false){return}}je(i,false)}}}};var We=(e,n,r)=>{var i,s;const l=e.prototype;if(n.i||t.propChangeCallback){const f=Object.entries((i=n.i)!=null?i:{});f.map((([e,[t]])=>{if(t&31||r&2&&t&32){const{get:i,set:s}=Object.getOwnPropertyDescriptor(l,e)||{};if(i)n.i[e][0]|=2048;if(s)n.i[e][0]|=4096;if(r&1||!i){Object.defineProperty(l,e,{get(){{if((n.i[e][0]&2048)===0){return De(this,e)}const t=o(this);const r=t?t.l:l;if(!r)return;return r[e]}},configurable:true,enumerable:true})}Object.defineProperty(l,e,{set(i){const l=o(this);if(!l){return}if(s){const r=t&32?this[e]:l.$hostElement$[e];if(typeof r==="undefined"&&l.o.get(e)){i=l.o.get(e)}s.apply(this,[ne(i,t)]);i=t&32?this[e]:l.$hostElement$[e];Ne(this,e,i,n);return}{if((r&1)===0||(n.i[e][0]&4096)===0){Ne(this,e,i,n);if(r&1&&!l.l){l.m.push((()=>{if(n.i[e][0]&4096&&l.l[e]!==l.o.get(e)){l.l[e]=i}}))}return}const s=()=>{const r=l.l[e];if(!l.o.get(e)&&r){l.o.set(e,r)}l.l[e]=ne(i,t);Ne(this,e,l.l[e],n)};if(l.l){s()}else{l.m.push((()=>{s()}))}}}})}}));if(r&1){const r=new Map;l.attributeChangedCallback=function(e,i,s){y.jmp((()=>{var a;const c=r.get(e);const u=o(this);if(this.hasOwnProperty(c)&&t.lazyLoad){s=this[c];delete this[c]}if(l.hasOwnProperty(c)&&typeof this[c]==="number"&&this[c]==s){return}else if(c==null){const t=u==null?void 0:u.u;if(u&&t&&!(t&8)&&t&128&&s!==i){const t=u.l;const r=(a=n.L)==null?void 0:a[e];r==null?void 0:r.forEach((n=>{if(t[n]!=null){t[n].call(t,s,i,e)}}))}return}const v=f.find((([e])=>e===c));if(v&&v[1][0]&4){s=s===null||s==="false"?false:true}const d=Object.getOwnPropertyDescriptor(l,c);if(s!=this[c]&&(!d.get||!!d.set)){this[c]=s}}))};e.observedAttributes=Array.from(new Set([...Object.keys((s=n.L)!=null?s:{}),...f.filter((([e,t])=>t[0]&31)).map((([e,t])=>{const n=t[1]||e;r.set(n,e);return n}))]))}}return e};var Ae=async(e,t,n,r)=>{let i;if((t.u&32)===0){t.u|=32;const r=n.S;if(r){const r=v(n,t);if(r&&"then"in r){const e=q();i=await r;e()}else{i=r}if(!i){throw new Error(`Constructor for "${n.$}#${t.T}" was not found`)}if(!i.isProxied){We(i,n,2);i.isProxied=true}const s=V("createInstance",n.$);{t.u|=8}try{new i(t)}catch(t){c(t,e)}{t.u&=-9}s();Le(t.l,e)}else{i=e.constructor;const n=e.localName;customElements.whenDefined(n).then((()=>t.u|=128))}if(i&&i.style){let e;if(typeof i.style==="string"){e=i.style}const t=_(n);if(!d.has(t)){const r=V("registerStyles",n.$);I(t,e,!!(n.u&1));r()}}}const s=t.A;const o=()=>je(t,true);if(s&&s["s-rc"]){s["s-rc"].push(o)}else{o()}};var Le=(e,t)=>{{Ue(e,"connectedCallback",void 0,t)}};var ze=e=>{if((y.u&1)===0){const t=o(e);if(!t){return}const n=t.t;const r=V("connectedCallback",n.$);if(!(t.u&1)){t.u|=1;{let n=e;while(n=n.parentNode||n.host){if(n["s-p"]){Se(t,t.A=n);break}}}if(n.i){Object.entries(n.i).map((([t,[n]])=>{if(n&31&&t in e&&e[t]!==Object.prototype[t]){const n=e[t];delete e[t];e[t]=n}}))}{Ae(e,t,n)}}else{if(t==null?void 0:t.l){Le(t.l,e)}else if(t==null?void 0:t.h){t.h.then((()=>Le(t.l,e)))}}r()}};var Te=(e,t)=>{{Ue(e,"disconnectedCallback",void 0,t||e)}};var He=async e=>{if((y.u&1)===0){const t=o(e);if(t==null?void 0:t.l){Te(t.l,e)}else if(t==null?void 0:t.h){t.h.then((()=>Te(t.l,e)))}}if(F.has(e)){F.delete(e)}if(e.shadowRoot&&F.has(e.shadowRoot)){F.delete(e.shadowRoot)}};var Ve=(e,t={})=>{var n;if(!m.document){console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");return}const r=V();const i=[];const s=t.exclude||[];const l=m.customElements;const a=m.document.head;const c=a.querySelector("meta[charset]");const u=m.document.createElement("style");const v=[];let d;let b=true;Object.assign(y,t);y.j=new URL(t.resourcesUrl||"./",m.document.baseURI).href;let w=false;e.map((e=>{e[1].map((t=>{const n={u:t[0],$:t[1],i:t[2],H:t[3]};if(n.u&4){w=true}{n.i=t[2]}const r=n.$;const a=class extends HTMLElement{constructor(e){super(e);this.hasRegisteredEventListeners=false;e=this;f(e,n);if(n.u&1){{if(!e.shadowRoot){H.call(e,n)}else{if(e.shadowRoot.mode!=="open"){throw new Error(`Unable to re-use existing shadow root for ${n.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}}}}}connectedCallback(){const e=o(this);if(!e){return}if(!this.hasRegisteredEventListeners){this.hasRegisteredEventListeners=true}if(d){clearTimeout(d);d=null}if(b){v.push(this)}else{y.jmp((()=>ze(this)))}}disconnectedCallback(){y.jmp((()=>He(this)));y.raf((()=>{var e;const t=o(this);if(!t){return}const n=v.findIndex((e=>e===this));if(n>-1){v.splice(n,1)}if(((e=t==null?void 0:t.N)==null?void 0:e.R)instanceof Node&&!t.N.R.isConnected){delete t.N.R}}))}componentOnReady(){var e;return(e=o(this))==null?void 0:e.h}};n.S=e[0];if(!s.includes(r)&&!l.get(r)){i.push(r);l.define(r,We(a,n,1))}}))}));if(i.length>0){if(w){u.textContent+=p}{u.textContent+=i.sort()+h}if(u.innerHTML.length){u.setAttribute("data-styles","");const e=(n=y.O)!=null?n:P(m.document);if(e!=null){u.setAttribute("nonce",e)}a.insertBefore(u,c?c.nextSibling:a.firstChild)}}b=false;if(v.length){v.map((e=>e.connectedCallback()))}else{{y.jmp((()=>d=setTimeout(Pe,30)))}}r()};var qe=e=>y.O=e;export{Ve as b,B as h,b as p,l as r,qe as s};
3
+ //# sourceMappingURL=p-DBp-rMPb.js.map