ai-helper-agent 2.7.1 → 2.7.3
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.
- package/dist/assets/{chat-export-BZ5KC0qd.js → chat-export-BPasibDS.js} +1 -1
- package/dist/assets/{markdown-render-BVLp_kOz.js → markdown-render-LHYvFtnH.js} +2 -2
- package/dist/assets/options.js +1 -1
- package/dist/assets/side_panel.js +86 -86
- package/dist/assets/{version-B5_tcFNU.js → version-D7IEwuLh.js} +1 -1
- package/dist/manifest.json +1 -1
- package/dist/options.html +1 -1
- package/dist/side_panel.html +2 -2
- package/package.json +1 -1
- package/src/asr/detect.js +35 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,c as t,l as n}from"./i18n-DU8C0Dir.js";import{w as r}from"./utils-CbwqBtBF.js";import{f as i,h as a,m as o,s}from"./markdown-render-
|
|
1
|
+
import{a as e,c as t,l as n}from"./i18n-DU8C0Dir.js";import{w as r}from"./utils-CbwqBtBF.js";import{f as i,h as a,m as o,s}from"./markdown-render-LHYvFtnH.js";import{AlignmentType as c,BorderStyle as l,Document as u,ExternalHyperlink as d,HeadingLevel as f,ImageRun as p,LevelFormat as m,Packer as h,Paragraph as g,Table as ee,TableCell as te,TableRow as ne,TextRun as _,WidthType as v,convertInchesToTwip as y}from"./dist-BUuoW_84.js";var re=40,b=3e3,x=/^\s{0,3}(`{3,}|~{3,})/,S=/^\s{0,3}(#{1,6})[ \t]+(.*)$/,C=/^\s{0,3}=+\s*$/,w=/^\s{0,3}([-*_])(?:\s*\1){2,}\s*$/,T=/^\s*\|.*\|\s*$/,E=/^\s*(?:\d+(?:\.\d+)+[.、))]?\s*|\d+[.、))]\s*|[一二三四五六七八九十]+[、.]\s*|[((][一二三四五六七八九十\d]+[))]\s*)/,D=/[/\\:*?"<>|]/g,ie=/[\u0000-\u001f\u007f\u200b-\u200f\u2028\u2029\ufeff]/g,O=`
|
|
2
2
|
`;function ae(e){return typeof e==`string`?e.replace(/\r\n?/g,O).replace(/\n{3,}/g,`
|
|
3
3
|
|
|
4
4
|
`):``}function oe(e){return(e.length>b?e.slice(0,b):e).split(O).slice(0,re).join(O)}function se(e){return String(e).replace(/!\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/`+/g,``).replace(/(\*\*|__|\*|_|~~)/g,``).replace(/https?:\/\/\S+/gi,``).replace(/<[^>]+>/g,``)}function k(e){if(typeof e!=`string`||!e.trim())return``;let t=se(e);return t=t.replace(ie,``),t=t.replace(E,``),t=t.replace(D,`_`),t=t.replace(/\s+/g,`-`).replace(/-{2,}/g,`-`),t=t.replace(/^[-_.\s]+/,``).replace(/[-_.\s]+$/,``),t}function A(e,t=40){let n=Array.from(e);return(n.length>t?n.slice(0,t).join(``):e).replace(/[-_.,;:、,。;:\s]+$/u,``)}function ce(e){if(typeof e!=`string`||!e.trim())return``;let t=oe(e).split(O),n=[],r=``;for(let e=0;e<t.length;e++){let i=t[e],a=i.match(x);if(r){a&&a[1][0]===r&&(r=``);continue}if(a){r=a[1][0];continue}let o=i.match(S);if(o){let e=o[2].replace(/[ \t]+#+[ \t]*$/,``).trim();e&&n.push({level:o[1].length,text:e});continue}let s=t[e+1];s&&C.test(s)&&i.trim()&&!w.test(i)&&!T.test(i)&&(n.push({level:1,text:i.trim()}),e++)}return n.length===0?``:A(k((n.find(e=>e.level===1)||n[0]).text))}function le({title:e=``,kind:t,timestamp:n,ext:r}){let i=`${t}-${n}.${r}`,a=A(k(e));return a?`${a}-${i}`:i}function j(e,{kind:t,ext:n,timestamp:r=Date.now()}){return le({title:ce(e),kind:t,timestamp:r,ext:n})}e(`zh`,{chatExport:{exportFailed:`导出失败:{message}`,pdfLibNotLoaded:`PDF 库未加载,无法导出`,noContent:`没有可导出的内容`,imageLibNotLoaded:`图片库未加载,无法导出为图片`,imagePlaceholder:`[图片: {name}]`,canvasFailed:`Canvas 转 DataURL 失败:{message}`,svgLoadFailed:`SVG 图片加载失败`}}),e(`en`,{chatExport:{exportFailed:`Export failed: {message}`,pdfLibNotLoaded:`PDF library not loaded, cannot export`,noContent:`No content to export`,imageLibNotLoaded:`Image library not loaded, cannot export as image`,imagePlaceholder:`[Image: {name}]`,canvasFailed:`Canvas to DataURL failed: {message}`,svgLoadFailed:`SVG image loading failed`}});var M=new Map,N=/Mac|iPhone|iPad|iPod/i.test(typeof navigator<`u`?navigator.userAgent:``)?`Apple Color Emoji`:`Segoe UI Emoji`,P=RegExp(`(?:\\p{Regional_Indicator}{2})|(?:\\p{Emoji_Presentation}|\\p{Extended_Pictographic}\\uFE0F)(?:[\\u{1F3FB}-\\u{1F3FF}]|\\u200D(?:\\p{Emoji_Presentation}|\\p{Extended_Pictographic}\\uFE0F))*`,`gu`),F=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\uFFFE\uFFFF]/g,I=/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;function L(e){return e==null||e===``?e:String(e).replace(F,``).replace(I,`�`)}var R=0;function z(){return R+=1,R}var B=new Set([`png`,`jpg`,`jpeg`,`gif`,`bmp`]);function V(e){return B.has(String(e||``).toLowerCase())}function H(e,t={}){if(!e)return[];let n=[];return String(e).split(/\r?\n/).forEach((e,r)=>{r>0&&n.push(new _({...t,break:1}));let i=0;for(let r of e.matchAll(P))r.index>i&&n.push(new _({...t,text:e.slice(i,r.index)})),n.push(new _({...t,text:r[0],font:{name:N}})),i=r.index+r[0].length;i<e.length&&n.push(new _({...t,text:e.slice(i)}))}),n}function U(e){if(!e)return[];let r=/(\*\*(.+?)\*\*|(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)|__(.+?)__|(?<!_)_(?!_)(.+?)(?<!_)_(?!_)|`([^`]+)`|\[([^\]]+)\]\(([^)]+)\)|!\[([^\]]*)\]\(([^)]+)\))/,i=[],a=e;for(;a.length>0;){let e=a.match(r);if(!e){i.push(...H(a));break}let o=e.index;o>0&&i.push(...H(a.slice(0,o)));let s=e[1];if(e[2]!==void 0)i.push(...H(e[2],{bold:!0}));else if(e[3]!==void 0)i.push(...H(e[3],{italics:!0}));else if(e[4]!==void 0)i.push(...H(e[4],{bold:!0}));else if(e[5]!==void 0)i.push(...H(e[5],{italics:!0}));else if(e[6]!==void 0)i.push(new _({text:e[6],font:`Consolas`,size:20}));else if(e[7]!==void 0)i.push(new d({children:[new _({text:e[7],style:`Hyperlink`})],link:e[8]}));else if(e[9]!==void 0){let r=e[10];if(r.startsWith(`data:`))try{let[n,a]=r.split(`,`),o=n.match(/data:(image\/(\w+))/);if(o&&a&&V(o[2])){let t=atob(a),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);let r=o[2],s=ue(n,r),c=s.width,l=s.height;if(c>567){let e=567/c;c=Math.round(c*e),l=Math.round(l*e)}i.push(new p({data:n,transformation:{width:c,height:l},type:r,altText:{id:z(),name:e[9]||`image`}}))}else i.push(new _({text:t(`chatExport.imagePlaceholder`,{name:e[9]||`image`}),italics:!0,color:`999999`}))}catch(r){n.warn(`[ChatExport] ImageRun create failed:`,r.message),i.push(new _({text:t(`chatExport.imagePlaceholder`,{name:e[9]||`image`}),italics:!0,color:`999999`}))}else i.push(new _({text:t(`chatExport.imagePlaceholder`,{name:e[9]||r}),italics:!0,color:`999999`}))}a=a.slice(o+s.length)}return i}function ue(e,t){if(t===`png`&&e.length>24){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{width:t.getUint32(16),height:t.getUint32(20)}}if((t===`jpeg`||t===`jpg`)&&e.length>100){let t=2;for(;t<e.length-9;)if(e[t]===255){let n=e[t+1];if(n>=192&&n<=195){let n=new DataView(e.buffer,e.byteOffset,e.byteLength);return{height:n.getUint16(t+5),width:n.getUint16(t+7)}}t+=2+(e[t+2]<<8|e[t+3])}else t++}return{width:600,height:400}}async function W(e){if(!e||!e.trim())return[new g({children:[new _({text:``})]})];let t=[],n=L(e),r=[];n=n.replace(/```(\w*)\n([\s\S]*?)```/g,(e,t,n)=>{let i=r.length;return r.push({lang:t||``,code:n.trimEnd()}),`\n\n%%CODEBLOCK_${i}%%\n\n`});let i=[];n=n.replace(/<table[\s\S]*?<\/table>/gi,e=>{let t=i.length;return i.push(e),`\n\n%%HTMLTABLE_${t}%%\n\n`});let a=[];n=n.replace(/(?:^\|.+\|\s*$\n)+^\|[\s\-:|]+\|\s*$\n(?:^\|.+\|\s*$\n?)+/gm,e=>{let t=a.length;return a.push(e),`\n\n%%MDTABLE_${t}%%\n\n`});let o=n.split(/\n{2,}/).filter(e=>e.trim());for(let e of o){let n=e.trim(),o=n.match(/^%%CODEBLOCK_(\d+)%%$/);if(o){let{lang:e,code:n}=r[parseInt(o[1])],i=e?`${e} code`:`code`;t.push(new g({children:[new _({text:i,bold:!0,font:`Consolas`,size:18})]}));let a=n.split(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/workspace-manager-Dq1z6ENd.js","assets/chunk-CMxvf4Kt.js","assets/session-store-D93MJNgp.js","assets/model-profiles-Czl5eTZY.js","assets/i18n-DU8C0Dir.js","assets/side_panel.js","assets/version-
|
|
2
|
-
import{a as e,c as t,l as n}from"./i18n-DU8C0Dir.js";import{N as r}from"./session-store-D93MJNgp.js";import{l as i}from"./version-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/workspace-manager-Dq1z6ENd.js","assets/chunk-CMxvf4Kt.js","assets/session-store-D93MJNgp.js","assets/model-profiles-Czl5eTZY.js","assets/i18n-DU8C0Dir.js","assets/side_panel.js","assets/version-D7IEwuLh.js","assets/voice-shortcut-Dtt3nhkz.js","assets/agent-store-CrkBz4jI.js","assets/utils-CbwqBtBF.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,c as t,l as n}from"./i18n-DU8C0Dir.js";import{N as r}from"./session-store-D93MJNgp.js";import{l as i}from"./version-D7IEwuLh.js";import{a,c as o,w as s}from"./utils-CbwqBtBF.js";function c(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function l(e){if(Array.isArray(e))return e}function u(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function d(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(e,t){return l(e)||u(e,t)||ee(e,t)||d()}function ee(e,t){if(e){if(typeof e==`string`)return c(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}var te=Object.entries,ne=Object.setPrototypeOf,p=Object.isFrozen,m=Object.getPrototypeOf,re=Object.getOwnPropertyDescriptor,h=Object.freeze,g=Object.seal,ie=Object.create,ae=typeof Reflect<`u`&&Reflect,_=ae.apply,v=ae.construct;h||=function(e){return e},g||=function(e){return e},_||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},v||=function(e){return new e(...[...arguments].slice(1))};var oe=E(Array.prototype.forEach),se=E(Array.prototype.lastIndexOf),ce=E(Array.prototype.pop),le=E(Array.prototype.push),ue=E(Array.prototype.splice),y=Array.isArray,de=E(String.prototype.toLowerCase),fe=E(String.prototype.toString),pe=E(String.prototype.match),me=E(String.prototype.replace),he=E(String.prototype.indexOf),ge=E(String.prototype.trim),b=E(Number.prototype.toString),x=E(Boolean.prototype.toString),_e=typeof BigInt>`u`?null:E(BigInt.prototype.toString),ve=typeof Symbol>`u`?null:E(Symbol.prototype.toString),S=E(Object.prototype.hasOwnProperty),C=E(Object.prototype.toString),w=E(RegExp.prototype.test),T=D(TypeError);function E(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return _(e,t,n)}}function D(e){return function(){return v(e,[...arguments])}}function O(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:de;if(ne&&ne(e,null),!y(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(p(t)||(t[r]=e),i=e)}e[i]=!0}return e}function ye(e){for(let t=0;t<e.length;t++)S(e,t)||(e[t]=null);return e}function k(e){let t=ie(null);for(let r of te(e)){var n=f(r,2);let i=n[0],a=n[1];S(e,i)&&(y(a)?t[i]=ye(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=k(a):t[i]=a)}return t}function be(e){switch(typeof e){case`string`:return e;case`number`:return b(e);case`boolean`:return x(e);case`bigint`:return _e?_e(e):`0`;case`symbol`:return ve?ve(e):`Symbol()`;case`undefined`:return C(e);case`function`:case`object`:{if(e===null)return C(e);let t=e,n=A(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:C(e)}return C(e)}default:return C(e)}}function A(e,t){for(;e!==null;){let n=re(e,t);if(n){if(n.get)return E(n.get);if(typeof n.value==`function`)return E(n.value)}e=m(e)}function n(){return null}return n}function xe(e){try{return w(e,``),!0}catch{return!1}}var Se=h(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ce=h(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),we=h([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Te=h([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ee=h(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),De=h([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Oe=h([`#text`]),ke=h(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Ae=h(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),je=h(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Me=h([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ne=g(/{{[\w\W]*|^[\w\W]*}}/g),Pe=g(/<%[\w\W]*|^[\w\W]*%>/g),Fe=g(/\${[\w\W]*/g),Ie=g(/^data-[\-\w.\u00B7-\uFFFF]+$/),Le=g(/^aria-[\-\w]+$/),Re=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ze=g(/^(?:\w+script|data):/i),Be=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ve=g(/^html$/i),He=g(/^[a-z][.\w]*(-[.\w]+)+$/i),Ue=g(/<[/\w!]/g),We=g(/<[/\w]/g),Ge=g(/<\/no(script|embed|frames)/i),Ke=g(/\/>/i),j={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},qe=function(){return typeof window>`u`?null:window},Je=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Ye=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},M=function(e,t,n,r){return S(e,t)&&y(e[t])?O(r.base?k(r.base):{},e[t],r.transform):n};function Xe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qe(),t=e=>Xe(e);if(t.version=`3.4.12`,t.removed=[],!e||!e.document||e.document.nodeType!==j.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=A(d,`cloneNode`),ee=A(d,`remove`),ne=A(d,`nextSibling`),p=A(d,`childNodes`),m=A(d,`parentNode`),re=A(d,`shadowRoot`),ae=A(d,`attributes`),_=o&&o.prototype?A(o.prototype,`nodeType`):null,v=o&&o.prototype?A(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,_e,ve=!1,C=0,E=function(){if(C>0)throw T(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},D=function(e){E(),C++;try{return b.createHTML(e)}finally{C--}},ye=function(e){E(),C++;try{return b.createScriptURL(e)}finally{C--}},Ze=function(){return ve||=(_e=Je(u,i),!0),_e},N=n,Qe=N.implementation,$e=N.createNodeIterator,et=N.createDocumentFragment,tt=N.getElementsByTagName,nt=r.importNode,P=Ye();t.isSupported=typeof te==`function`&&typeof m==`function`&&Qe&&Qe.createHTMLDocument!==void 0;let rt=Ne,it=Pe,at=Fe,ot=Ie,st=Le,ct=ze,lt=Be,ut=He,dt=Re,F=null,ft=O({},[...Se,...Ce,...we,...Ee,...Oe]),I=null,L=O({},[...ke,...Ae,...je,...Me]),R=Object.seal(ie(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),z=null,pt=null,B=Object.seal(ie(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),mt=!0,ht=!0,gt=!1,_t=!0,V=!1,H=!0,U=!1,vt=!1,yt=null,bt=null,xt=!1,W=!1,St=!1,Ct=!1,wt=!0,Tt=!1,Et=`user-content-`,Dt=!0,Ot=!1,G={},K=null,kt=O({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),At=null,jt=O({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Mt=null,Nt=O({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Pt=`http://www.w3.org/1998/Math/MathML`,q=`http://www.w3.org/2000/svg`,J=`http://www.w3.org/1999/xhtml`,Y=J,Ft=!1,It=null,Lt=O({},[Pt,q,J],fe),Rt=h([`mi`,`mo`,`mn`,`ms`,`mtext`]),zt=O({},Rt),Bt=h([`annotation-xml`]),Vt=O({},Bt),Ht=O({},[`title`,`style`,`font`,`a`,`script`]),Ut=null,Wt=[`application/xhtml+xml`,`text/html`],X=null,Gt=null,Kt=n.createElement(`form`),qt=function(e){return e instanceof RegExp||e instanceof Function},Jt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Gt&&Gt===e)return;(!e||typeof e!=`object`)&&(e={}),e=k(e),Ut=Wt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,X=Ut===`application/xhtml+xml`?fe:de,F=M(e,`ALLOWED_TAGS`,ft,{transform:X}),I=M(e,`ALLOWED_ATTR`,L,{transform:X}),It=M(e,`ALLOWED_NAMESPACES`,Lt,{transform:fe}),Mt=M(e,`ADD_URI_SAFE_ATTR`,Nt,{transform:X,base:Nt}),At=M(e,`ADD_DATA_URI_TAGS`,jt,{transform:X,base:jt}),K=M(e,`FORBID_CONTENTS`,kt,{transform:X}),z=M(e,`FORBID_TAGS`,k({}),{transform:X}),pt=M(e,`FORBID_ATTR`,k({}),{transform:X}),G=S(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?k(e.USE_PROFILES):e.USE_PROFILES:!1,mt=e.ALLOW_ARIA_ATTR!==!1,ht=e.ALLOW_DATA_ATTR!==!1,gt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,_t=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,V=e.SAFE_FOR_TEMPLATES||!1,H=e.SAFE_FOR_XML!==!1,U=e.WHOLE_DOCUMENT||!1,W=e.RETURN_DOM||!1,St=e.RETURN_DOM_FRAGMENT||!1,Ct=e.RETURN_TRUSTED_TYPE||!1,xt=e.FORCE_BODY||!1,wt=e.SANITIZE_DOM!==!1,Tt=e.SANITIZE_NAMED_PROPS||!1,Dt=e.KEEP_CONTENT!==!1,Ot=e.IN_PLACE||!1,dt=xe(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Re,Y=typeof e.NAMESPACE==`string`?e.NAMESPACE:J,zt=S(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?k(e.MATHML_TEXT_INTEGRATION_POINTS):O({},Rt),Vt=S(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?k(e.HTML_INTEGRATION_POINTS):O({},Bt);let t=S(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?k(e.CUSTOM_ELEMENT_HANDLING):ie(null);if(R=ie(null),S(t,`tagNameCheck`)&&qt(t.tagNameCheck)&&(R.tagNameCheck=t.tagNameCheck),S(t,`attributeNameCheck`)&&qt(t.attributeNameCheck)&&(R.attributeNameCheck=t.attributeNameCheck),S(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(R.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),g(R),V&&(ht=!1),St&&(W=!0),G&&(F=O({},Oe),I=ie(null),G.html===!0&&(O(F,Se),O(I,ke)),G.svg===!0&&(O(F,Ce),O(I,Ae),O(I,Me)),G.svgFilters===!0&&(O(F,we),O(I,Ae),O(I,Me)),G.mathMl===!0&&(O(F,Ee),O(I,je),O(I,Me))),B.tagCheck=null,B.attributeCheck=null,S(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?B.tagCheck=e.ADD_TAGS:y(e.ADD_TAGS)&&(F===ft&&(F=k(F)),O(F,e.ADD_TAGS,X))),S(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?B.attributeCheck=e.ADD_ATTR:y(e.ADD_ATTR)&&(I===L&&(I=k(I)),O(I,e.ADD_ATTR,X))),S(e,`ADD_URI_SAFE_ATTR`)&&y(e.ADD_URI_SAFE_ATTR)&&O(Mt,e.ADD_URI_SAFE_ATTR,X),S(e,`FORBID_CONTENTS`)&&y(e.FORBID_CONTENTS)&&(K===kt&&(K=k(K)),O(K,e.FORBID_CONTENTS,X)),S(e,`ADD_FORBID_CONTENTS`)&&y(e.ADD_FORBID_CONTENTS)&&(K===kt&&(K=k(K)),O(K,e.ADD_FORBID_CONTENTS,X)),Dt&&(F[`#text`]=!0),U&&O(F,[`html`,`head`,`body`]),F.table&&(O(F,[`tbody`]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw T(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw T(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=b;b=e.TRUSTED_TYPES_POLICY;try{x=D(``)}catch(e){throw b=t,e}}else e.TRUSTED_TYPES_POLICY===null?(b=void 0,x=``):(b===void 0&&(b=Ze()),b&&typeof x==`string`&&(x=D(``)));h&&h(e),Gt=e},Yt=O({},[...Ce,...we,...Te]),Xt=O({},[...Ee,...De]),Zt=function(e,t,n){return t.namespaceURI===J?e===`svg`:t.namespaceURI===Pt?e===`svg`&&(n===`annotation-xml`||zt[n]):!!Yt[e]},Qt=function(e,t,n){return t.namespaceURI===J?e===`math`:t.namespaceURI===q?e===`math`&&Vt[n]:!!Xt[e]},$t=function(e,t,n){return t.namespaceURI===q&&!Vt[n]||t.namespaceURI===Pt&&!zt[n]?!1:!Xt[e]&&(Ht[e]||!Yt[e])},en=function(e){let t=m(e);(!t||!t.tagName)&&(t={namespaceURI:Y,tagName:`template`});let n=de(e.tagName),r=de(t.tagName);return It[e.namespaceURI]?e.namespaceURI===q?Zt(n,t,r):e.namespaceURI===Pt?Qt(n,t,r):e.namespaceURI===J?$t(n,t,r):!!(Ut===`application/xhtml+xml`&&It[e.namespaceURI]):!1},Z=function(e){le(t.removed,{element:e});try{m(e).removeChild(e)}catch{if(ee(e),!m(e))throw T(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},tn=function(e){rn(e);let t=p(e);if(t){let e=[];oe(t,t=>{le(e,t)}),oe(e,e=>{try{ee(e)}catch{}})}let n=ae(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},Q=function(e,n){try{le(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{le(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(W||St)try{Z(n)}catch{}else try{n.setAttribute(e,``)}catch{}},nn=function(e){let t=ae(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||I[X(i)]))try{e.removeAttribute(i)}catch{}}},rn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(_?_(e):e.nodeType)===j.element&&nn(e);let n=p(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},an=function(e){if(!H)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=_?_(e):e.nodeType;if(n===j.processingInstruction||n===j.comment&&w(We,e.data)){try{ee(e)}catch{}continue}if(n===j.element){let t=e,n=X(v?v(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&n!==`label`&&n!==`output`&&t.removeAttribute(`for`)}catch{}}let r=p(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},on=function(e){let t=null,r=null;if(xt)e=`<remove></remove>`+e;else{let t=pe(e,/^[\r\n\t ]+/);r=t&&t[0]}Ut===`application/xhtml+xml`&&Y===J&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?D(e):e;if(Y===J)try{t=new l().parseFromString(i,Ut)}catch{}if(!t||!t.documentElement){t=Qe.createDocument(Y,`template`,null);try{t.documentElement.innerHTML=Ft?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Y===J?tt.call(t,U?`html`:`body`)[0]:U?t.documentElement:a},sn=function(e){return $e.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},cn=function(e){return e=me(e,rt,` `),e=me(e,it,` `),e=me(e,at,` `),e},ln=function(e){e.normalize();let t=$e.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=cn(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&oe(r,e=>{dn(e.content)&&ln(e.content)})},un=function(e){let t=v?v(e):null;return typeof t!=`string`||X(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==ae(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==_(e)||e.childNodes!==p(e)},dn=function(e){if(!_||typeof e!=`object`||!e)return!1;try{return _(e)===j.documentFragment}catch{return!1}},fn=function(e){if(!_||typeof e!=`object`||!e)return!1;try{return typeof _(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&oe(e,e=>{e.call(t,n,r,Gt)})}let pn=function(e,t){return!!(H&&e.hasChildNodes()&&!fn(e.firstElementChild)&&w(Ue,e.textContent)&&w(Ue,e.innerHTML)||H&&e.namespaceURI===J&&t===`style`&&fn(e.firstElementChild)||e.nodeType===j.processingInstruction||H&&e.nodeType===j.comment&&w(We,e.data))},mn=function(e,t){if(!z[t]&&vn(t)&&(R.tagNameCheck instanceof RegExp&&w(R.tagNameCheck,t)||R.tagNameCheck instanceof Function&&R.tagNameCheck(t)))return!1;if(Dt&&!K[t]){let t=m(e),n=p(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=Ot?n[i]:f(n[i],!0);t.insertBefore(r,ne(e))}}}return Z(e),!0},hn=function(e,n){if($(P.beforeSanitizeElements,e,null),e!==n&&m(e)===null)return!0;if(un(e))return Z(e),!0;let r=X(v?v(e):e.nodeName);if($(P.uponSanitizeElement,e,{tagName:r,allowedTags:F}),e!==n&&m(e)===null)return!0;if(pn(e,r))return Z(e),!0;if(z[r]||!(B.tagCheck instanceof Function&&B.tagCheck(r))&&!F[r]){let t=mn(e,r);return t===!1&&$(P.afterSanitizeElements,e,null),t}if((_?_(e):e.nodeType)===j.element&&!en(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&w(Ge,e.innerHTML))return Z(e),!0;if(V&&e.nodeType===j.text){let n=cn(e.textContent);e.textContent!==n&&(le(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(P.afterSanitizeElements,e,null),!1},gn=function(e,t,r){if(pt[t]||H&&t===`patchsrc`||H&&t===`for`&&e!==`label`&&e!==`output`||wt&&(t===`id`||t===`name`)&&(r in n||r in Kt))return!1;let i=I[t]||B.attributeCheck instanceof Function&&B.attributeCheck(t,e);if(!(ht&&w(ot,t))&&!(mt&&w(st,t))){if(!i){if(!(vn(e)&&(R.tagNameCheck instanceof RegExp&&w(R.tagNameCheck,e)||R.tagNameCheck instanceof Function&&R.tagNameCheck(e))&&(R.attributeNameCheck instanceof RegExp&&w(R.attributeNameCheck,t)||R.attributeNameCheck instanceof Function&&R.attributeNameCheck(t,e))||t===`is`&&R.allowCustomizedBuiltInElements&&(R.tagNameCheck instanceof RegExp&&w(R.tagNameCheck,r)||R.tagNameCheck instanceof Function&&R.tagNameCheck(r))))return!1}else if(!Mt[t]&&!w(dt,me(r,lt,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&he(r,`data:`)===0&&At[e])&&!(gt&&!w(ct,me(r,lt,``)))&&r)return!1}return!0},_n=O({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),vn=function(e){return!_n[de(e)]&&w(ut,e)},yn=function(e,t,n,r){if(b&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return D(r);case`TrustedScriptURL`:return ye(r)}return r},bn=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),un(e)?Z(e):ce(t.removed)}catch{Q(n,e)}},xn=function(e){$(P.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||un(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:I,forceKeepAttr:void 0},r=t.length,i=X(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=X(o),u=c,d=o===`value`?u:ge(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,$(P.uponSanitizeAttribute,e,n),d=n.attrValue,Tt&&(l===`id`||l===`name`)&&he(d,Et)!==0&&(Q(o,e),d=Et+d),H&&w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Q(o,e);continue}if(l===`attributename`&&pe(d,`href`)){Q(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){Q(o,e);continue}if(!_t&&w(Ke,d)){Q(o,e);continue}if(V&&(d=cn(d)),!gn(i,l,d)){Q(o,e);continue}d=yn(i,l,s,d),d!==u&&bn(e,o,s,d)}}$(P.afterSanitizeAttributes,e,null)},Sn=function(e){let t=null,n=sn(e);for($(P.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(P.uponSanitizeShadowNode,t,null),hn(t,e),xn(t),dn(t.content)&&Sn(t.content),(_?_(t):t.nodeType)===j.element){let e=re(t);dn(e)&&(Cn(e),Sn(e))}$(P.afterSanitizeShadowDOM,e,null)},Cn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Sn(e.shadow);continue}let n=e.node,r=(_?_(n):n.nodeType)===j.element,i=p(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=v?v(n):null;if(typeof e==`string`&&X(e)===`template`){let e=n.content;dn(e)&&t.push({node:e,shadow:null})}}if(r){let e=re(n);dn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ft=!e,Ft&&(e=`<!-->`),typeof e!=`string`&&!fn(e)&&(e=be(e),typeof e!=`string`))throw T(`dirty is not a string, aborting`);if(!t.isSupported)return e;vt?(F=yt,I=bt):Jt(n),(P.uponSanitizeElement.length>0||P.uponSanitizeAttribute.length>0)&&(F=k(F)),P.uponSanitizeAttribute.length>0&&(I=k(I)),t.removed=[];let c=Ot&&typeof e!=`string`&&fn(e);if(c){an(e);let t=v?v(e):e.nodeName;if(typeof t==`string`){let n=X(t);if(!F[n]||z[n])throw tn(e),T(`root node is forbidden and cannot be sanitized in-place`)}if(un(e))throw tn(e),T(`root node is clobbered and cannot be sanitized in-place`);try{Cn(e)}catch(t){throw tn(e),t}}else if(fn(e))i=on(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===j.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Cn(a);else{if(!W&&!V&&!U&&e.indexOf(`<`)===-1)return b&&Ct?D(e):e;if(i=on(e),!i)return W?null:Ct?x:``}i&&xt&&Z(i.firstChild);let l=c?e:i,u=sn(l);try{for(;o=u.nextNode();)hn(o,l),xn(o),dn(o.content)&&Sn(o.content)}catch(n){throw c&&(tn(e),oe(t.removed,e=>{e.element&&rn(e.element)})),n}if(c)return oe(t.removed,e=>{e.element&&rn(e.element)}),V&&ln(e),e;if(W){if(V&&ln(i),St)for(s=et.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(I.shadowroot||I.shadowrootmode)&&(s=nt.call(r,s,!0)),s}let d=U?i.outerHTML:i.innerHTML;return U&&F[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&w(Ve,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
4
4
|
`+d),V&&(d=cn(d)),b&&Ct?D(d):d},t.setConfig=function(){Jt(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),vt=!0,yt=F,bt=I},t.clearConfig=function(){Gt=null,vt=!1,yt=null,bt=null,b=_e,x=``},t.isValidAttribute=function(e,t,n){return Gt||Jt({}),gn(X(e),X(t),n)},t.addHook=function(e,t){typeof t==`function`&&S(P,e)&&le(P[e],t)},t.removeHook=function(e,t){if(S(P,e)){if(t!==void 0){let n=se(P[e],t);return n===-1?void 0:ue(P[e],n,1)[0]}return ce(P[e])}},t.removeHooks=function(e){S(P,e)&&(P[e]=[])},t.removeAllHooks=function(){P=Ye()},t}var Ze=Xe(),N=null,Qe=null,$e=null;function et(e){return{startOnLoad:!1,theme:(e||i())===`dark`?`dark`:`default`,securityLevel:`loose`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`}}function tt(e){return new Promise((t,n)=>{if(document.querySelector(`script[src="${e}"]`)){t();return}let r=document.createElement(`script`);r.src=e,r.onload=t,r.onerror=()=>n(Error(`Failed to load script: ${e}`)),document.head.appendChild(r)})}function nt(){return window.mermaid===void 0?(N||=tt(`libs/mermaid.min.js`).then(()=>(window.mermaid!==void 0&&window.mermaid.initialize(et()),window.mermaid)).catch(e=>{throw N=null,e}),N):Promise.resolve(window.mermaid)}function P(){return window.jspdf&&window.jspdf.jsPDF?Promise.resolve(window.jspdf.jsPDF):(Qe||=tt(`libs/jspdf.min.js`).then(()=>{let e=window.jspdf&&window.jspdf.jsPDF;if(!e)throw Error(`jsPDF not available after loading`);return e}).catch(e=>{throw Qe=null,e}),Qe)}function rt(){return window.html2canvas?Promise.resolve(window.html2canvas):($e||=tt(`libs/html2canvas.min.js`).then(()=>{if(!window.html2canvas)throw Error(`html2canvas not available after loading`);return window.html2canvas}).catch(e=>{throw $e=null,e}),$e)}async function it(){let[e,t]=await Promise.all([P(),rt()]);return{jsPDF:e,html2canvas:t}}e(`zh`,{chat:{fileLinkTitle:`点击在工作目录中定位该文件`,fileLinkFailed:`定位文件失败`},markdown:{copyCode:`复制代码`,copyMdTableTitle:`复制 Markdown 表格
|
|
5
5
|
按住 Ctrl/⌘ 点击复制富文本表格`,downloadExcel:`下载 Excel`,exportTableImage:`导出表格为图片`,downloadFailed:`下载失败: {message}`,unknownError:`未知错误`,chartRenderFailed:`图表渲染失败: {detail}`,zoomIn:`放大`,zoomOut:`缩小`,reset:`重置`,copyToClipboard:`复制到剪贴板`,downloadImage:`下载图片`,viewSource:`查看源代码`,mermaidCopied:`Mermaid 图表已复制到剪贴板!`,autoDownloadChart:`已自动转为下载方式保存图表`,copyFailed:`复制失败: {message}`,copySourceTitle:`复制源代码`,backToChart:`返回图表`,codeBlockLabel:`代码块`,codeLabel:`代码`,copiedToClipboard:`{label}已复制到剪贴板`,codeCopied:`代码已复制到剪贴板`,copiedRichTable:`已复制富文本表格`,copyRichTableFailed:`复制富文本表格失败`,copyFailedShort:`复制失败`,copiedMdTable:`已复制 Markdown 表格`,imageExportLibMissing:`图片导出库未加载`,tableImageExported:`表格图片已导出`,exportImageFailed:`导出图片失败`,canvasExportFailed:`Canvas toDataURL 失败,无法导出图片`,svgLoadFailed:`SVG 图片加载失败: {message}`}}),e(`en`,{chat:{fileLinkTitle:`Click to locate this file in the working directory`,fileLinkFailed:`Failed to locate file`},markdown:{copyCode:`Copy code`,copyMdTableTitle:`Copy Markdown table
|
package/dist/assets/options.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./i18n-DU8C0Dir.js";import{$ as l,F as u,Y as d,Z as f,_ as p,a as m,b as h,c as g,d as _,et as v,g as y,h as b,i as ee,k as x,m as te,n as ne,o as re,p as S,r as C,s as w,t as ie,u as ae,v as T,x as oe}from"./model-profiles-Czl5eTZY.js";import{n as se}from"./network-scope-CNRYXk74.js";import{i as ce,r as le}from"./voice-shortcut-Dtt3nhkz.js";import{a as ue,c as E,d as D,f as de,i as fe,o as pe,p as me,r as he,s as ge,t as O,u as _e}from"./version-
|
|
1
|
+
import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./i18n-DU8C0Dir.js";import{$ as l,F as u,Y as d,Z as f,_ as p,a as m,b as h,c as g,d as _,et as v,g as y,h as b,i as ee,k as x,m as te,n as ne,o as re,p as S,r as C,s as w,t as ie,u as ae,v as T,x as oe}from"./model-profiles-Czl5eTZY.js";import{n as se}from"./network-scope-CNRYXk74.js";import{i as ce,r as le}from"./voice-shortcut-Dtt3nhkz.js";import{a as ue,c as E,d as D,f as de,i as fe,o as pe,p as me,r as he,s as ge,t as O,u as _e}from"./version-D7IEwuLh.js";e(`zh`,{optionsConst:{aiSearch:`AI搜索`,explain:`解释`,translate:`翻译`,summary:`总结`,copy:`复制`,defaultSystemPrompt:`AI Helper:IT技术助手。
|
|
2
2
|
|
|
3
3
|
## 能力
|
|
4
4
|
编程开发与调试(Java/Python/JavaScript/Go/C++)、架构优化、性能调优、代码审查、文档编写、浏览器工具调用
|