Files
aibuddytool/public/build/assets/bundle-7ca97fea.js
2023-11-29 21:16:13 +08:00

55 lines
14 KiB
JavaScript

import{g as N}from"./app-front-d6902e40.js";function P(x,H){for(var g=0;g<H.length;g++){const b=H[g];if(typeof b!="string"&&!Array.isArray(b)){for(const l in b)if(l!=="default"&&!(l in x)){const n=Object.getOwnPropertyDescriptor(b,l);n&&Object.defineProperty(x,l,n.get?n:{enumerable:!0,get:()=>b[l]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}};(function(x,H){(function(g,b){x.exports=b()})(window,function(){return function(g){var b={};function l(n){if(b[n])return b[n].exports;var i=b[n]={i:n,l:!1,exports:{}};return g[n].call(i.exports,i,i.exports,l),i.l=!0,i.exports}return l.m=g,l.c=b,l.d=function(n,i,h){l.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:h})},l.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},l.t=function(n,i){if(1&i&&(n=l(n)),8&i||4&i&&typeof n=="object"&&n&&n.__esModule)return n;var h=Object.create(null);if(l.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:n}),2&i&&typeof n!="string")for(var m in n)l.d(h,m,(function(f){return n[f]}).bind(null,m));return h},l.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return l.d(i,"a",i),i},l.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},l.p="/",l(l.s=5)}([function(g,b,l){var n=l(1);typeof n=="string"&&(n=[[g.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};l(3)(n,i),n.locals&&(g.exports=n.locals)},function(g,b,l){(g.exports=l(2)(!1)).push([g.i,`/**
* Plugin styles
*/
.ce-header {
padding: 0.6em 0 3px;
margin: 0;
line-height: 1.25em;
outline: none;
}
.ce-header p,
.ce-header div{
padding: 0 !important;
margin: 0 !important;
}
/**
* Styles for Plugin icon in Toolbar
*/
.ce-header__icon {}
.ce-header[contentEditable=true][data-placeholder]::before{
position: absolute;
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
display: none;
cursor: text;
}
.ce-header[contentEditable=true][data-placeholder]:empty::before {
display: block;
}
.ce-header[contentEditable=true][data-placeholder]:empty:focus::before {
display: none;
}
`,""])},function(g,b){g.exports=function(l){var n=[];return n.toString=function(){return this.map(function(i){var h=function(m,f){var y=m[1]||"",u=m[3];if(!u)return y;if(f&&typeof btoa=="function"){var o=(v=u,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(v))))+" */"),s=u.sources.map(function(k){return"/*# sourceURL="+u.sourceRoot+k+" */"});return[y].concat(s).concat([o]).join(`
`)}var v;return[y].join(`
`)}(i,l);return i[2]?"@media "+i[2]+"{"+h+"}":h}).join("")},n.i=function(i,h){typeof i=="string"&&(i=[[null,i,""]]);for(var m={},f=0;f<this.length;f++){var y=this[f][0];typeof y=="number"&&(m[y]=!0)}for(f=0;f<i.length;f++){var u=i[f];typeof u[0]=="number"&&m[u[0]]||(h&&!u[2]?u[2]=h:h&&(u[2]="("+u[2]+") and ("+h+")"),n.push(u))}},n}},function(g,b,l){var n,i,h={},m=(n=function(){return window&&document&&document.all&&!window.atob},function(){return i===void 0&&(i=n.apply(this,arguments)),i}),f=function(t){return document.querySelector(t)},y=function(t){var e={};return function(r){if(typeof r=="function")return r();if(e[r]===void 0){var a=f.call(this,r);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch{a=null}e[r]=a}return e[r]}}(),u=null,o=0,s=[],v=l(4);function k(t,e){for(var r=0;r<t.length;r++){var a=t[r],d=h[a.id];if(d){d.refs++;for(var c=0;c<d.parts.length;c++)d.parts[c](a.parts[c]);for(;c<a.parts.length;c++)d.parts.push(T(a.parts[c],e))}else{var w=[];for(c=0;c<a.parts.length;c++)w.push(T(a.parts[c],e));h[a.id]={id:a.id,refs:1,parts:w}}}}function L(t,e){for(var r=[],a={},d=0;d<t.length;d++){var c=t[d],w=e.base?c[0]+e.base:c[0],p={css:c[1],media:c[2],sourceMap:c[3]};a[w]?a[w].parts.push(p):r.push(a[w]={id:w,parts:[p]})}return r}function C(t,e){var r=y(t.insertInto);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var a=s[s.length-1];if(t.insertAt==="top")a?a.nextSibling?r.insertBefore(e,a.nextSibling):r.appendChild(e):r.insertBefore(e,r.firstChild),s.push(e);else if(t.insertAt==="bottom")r.appendChild(e);else{if(typeof t.insertAt!="object"||!t.insertAt.before)throw new Error(`[Style Loader]
Invalid value for parameter 'insertAt' ('options.insertAt') found.
Must be 'top', 'bottom', or Object.
(https://github.com/webpack-contrib/style-loader#insertat)
`);var d=y(t.insertInto+" "+t.insertAt.before);r.insertBefore(e,d)}}function _(t){if(t.parentNode===null)return!1;t.parentNode.removeChild(t);var e=s.indexOf(t);e>=0&&s.splice(e,1)}function S(t){var e=document.createElement("style");return t.attrs.type===void 0&&(t.attrs.type="text/css"),j(e,t.attrs),C(t,e),e}function j(t,e){Object.keys(e).forEach(function(r){t.setAttribute(r,e[r])})}function T(t,e){var r,a,d,c;if(e.transform&&t.css){if(!(c=e.transform(t.css)))return function(){};t.css=c}if(e.singleton){var w=o++;r=u||(u=S(e)),a=U.bind(null,r,w,!1),d=U.bind(null,r,w,!0)}else t.sourceMap&&typeof URL=="function"&&typeof URL.createObjectURL=="function"&&typeof URL.revokeObjectURL=="function"&&typeof Blob=="function"&&typeof btoa=="function"?(r=function(p){var M=document.createElement("link");return p.attrs.type===void 0&&(p.attrs.type="text/css"),p.attrs.rel="stylesheet",j(M,p.attrs),C(p,M),M}(e),a=I.bind(null,r,e),d=function(){_(r),r.href&&URL.revokeObjectURL(r.href)}):(r=S(e),a=B.bind(null,r),d=function(){_(r)});return a(t),function(p){if(p){if(p.css===t.css&&p.media===t.media&&p.sourceMap===t.sourceMap)return;a(t=p)}else d()}}g.exports=function(t,e){if(typeof DEBUG<"u"&&DEBUG&&typeof document!="object")throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs=typeof e.attrs=="object"?e.attrs:{},e.singleton||typeof e.singleton=="boolean"||(e.singleton=m()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var r=L(t,e);return k(r,e),function(a){for(var d=[],c=0;c<r.length;c++){var w=r[c];(p=h[w.id]).refs--,d.push(p)}for(a&&k(L(a,e),e),c=0;c<d.length;c++){var p;if((p=d[c]).refs===0){for(var M=0;M<p.parts.length;M++)p.parts[M]();delete h[p.id]}}}};var O,R=(O=[],function(t,e){return O[t]=e,O.filter(Boolean).join(`
`)});function U(t,e,r,a){var d=r?"":a.css;if(t.styleSheet)t.styleSheet.cssText=R(e,d);else{var c=document.createTextNode(d),w=t.childNodes;w[e]&&t.removeChild(w[e]),w.length?t.insertBefore(c,w[e]):t.appendChild(c)}}function B(t,e){var r=e.css,a=e.media;if(a&&t.setAttribute("media",a),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}function I(t,e,r){var a=r.css,d=r.sourceMap,c=e.convertToAbsoluteUrls===void 0&&d;(e.convertToAbsoluteUrls||c)&&(a=v(a)),d&&(a+=`
/*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(d))))+" */");var w=new Blob([a],{type:"text/css"}),p=t.href;t.href=URL.createObjectURL(w),p&&URL.revokeObjectURL(p)}},function(g,b){g.exports=function(l){var n=typeof window<"u"&&window.location;if(!n)throw new Error("fixUrls requires window.location");if(!l||typeof l!="string")return l;var i=n.protocol+"//"+n.host,h=i+n.pathname.replace(/\/[^\/]*$/,"/");return l.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(m,f){var y,u=f.trim().replace(/^"(.*)"$/,function(o,s){return s}).replace(/^'(.*)'$/,function(o,s){return s});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(u)?m:(y=u.indexOf("//")===0?u:u.indexOf("/")===0?i+u:h+u.replace(/^\.\//,""),"url("+JSON.stringify(y)+")")})}},function(g,b,l){l.r(b),l.d(b,"default",function(){return h}),l(0);function n(m){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(m)}function i(m,f){for(var y=0;y<f.length;y++){var u=f[y];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(m,u.key,u)}}/**
* Header block for the Editor.js.
*
* @author CodeX (team@ifmo.su)
* @copyright CodeX 2018
* @license MIT
* @version 2.0.0
*/var h=function(){function m(o){var s=o.data,v=o.config,k=o.api,L=o.readOnly;(function(C,_){if(!(C instanceof _))throw new TypeError("Cannot call a class as a function")})(this,m),this.api=k,this.readOnly=L,this._CSS={block:this.api.styles.block,wrapper:"ce-header"},this._settings=v,this._data=this.normalizeData(s),this._element=this.getTag()}var f,y,u;return f=m,u=[{key:"conversionConfig",get:function(){return{export:"text",import:"text"}}},{key:"sanitize",get:function(){return{level:!1,text:{}}}},{key:"isReadOnlySupported",get:function(){return!0}},{key:"pasteConfig",get:function(){return{tags:["H1","H2","H3","H4","H5","H6"]}}},{key:"toolbox",get:function(){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M9 7L9 12M9 17V12M9 12L15 12M15 7V12M15 17L15 12"/></svg>',title:"Heading"}}}],(y=[{key:"normalizeData",value:function(o){var s={};return n(o)!=="object"&&(o={}),s.text=o.text||"",s.level=parseInt(o.level)||this.defaultLevel.number,s}},{key:"render",value:function(){return this._element}},{key:"renderSettings",value:function(){var o=this;return this.levels.map(function(s){return{icon:s.svg,label:o.api.i18n.t("Heading ".concat(s.number)),onActivate:function(){return o.setLevel(s.number)},closeOnActivate:!0,isActive:o.currentLevel.number===s.number}})}},{key:"setLevel",value:function(o){this.data={level:o,text:this.data.text}}},{key:"merge",value:function(o){var s={text:this.data.text+o.text,level:this.data.level};this.data=s}},{key:"validate",value:function(o){return o.text.trim()!==""}},{key:"save",value:function(o){return{text:o.innerHTML,level:this.currentLevel.number}}},{key:"getTag",value:function(){var o=document.createElement(this.currentLevel.tag);return o.innerHTML=this._data.text||"",o.classList.add(this._CSS.wrapper),o.contentEditable=this.readOnly?"false":"true",o.dataset.placeholder=this.api.i18n.t(this._settings.placeholder||""),o}},{key:"onPaste",value:function(o){var s=o.detail.data,v=this.defaultLevel.number;switch(s.tagName){case"H1":v=1;break;case"H2":v=2;break;case"H3":v=3;break;case"H4":v=4;break;case"H5":v=5;break;case"H6":v=6}this._settings.levels&&(v=this._settings.levels.reduce(function(k,L){return Math.abs(L-v)<Math.abs(k-v)?L:k})),this.data={level:v,text:s.innerHTML}}},{key:"data",get:function(){return this._data.text=this._element.innerHTML,this._data.level=this.currentLevel.number,this._data},set:function(o){if(this._data=this.normalizeData(o),o.level!==void 0&&this._element.parentNode){var s=this.getTag();s.innerHTML=this._element.innerHTML,this._element.parentNode.replaceChild(s,this._element),this._element=s}o.text!==void 0&&(this._element.innerHTML=this._data.text||"")}},{key:"currentLevel",get:function(){var o=this,s=this.levels.find(function(v){return v.number===o._data.level});return s||(s=this.defaultLevel),s}},{key:"defaultLevel",get:function(){var o=this;if(this._settings.defaultLevel){var s=this.levels.find(function(v){return v.number===o._settings.defaultLevel});if(s)return s;console.warn("(ง'̀-'́)ง Heading Tool: the default level specified was not found in available levels")}return this.levels[1]}},{key:"levels",get:function(){var o=this,s=[{number:1,tag:"H1",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M19 17V10.2135C19 10.1287 18.9011 10.0824 18.836 10.1367L16 12.5"/></svg>'},{number:2,tag:"H2",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 11C16 10 19 9.5 19 12C19 13.9771 16.0684 13.9997 16.0012 16.8981C15.9999 16.9533 16.0448 17 16.1 17L19.3 17"/></svg>'},{number:3,tag:"H3",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 11C16 10.5 16.8323 10 17.6 10C18.3677 10 19.5 10.311 19.5 11.5C19.5 12.5315 18.7474 12.9022 18.548 12.9823C18.5378 12.9864 18.5395 13.0047 18.5503 13.0063C18.8115 13.0456 20 13.3065 20 14.8C20 16 19.5 17 17.8 17C17.8 17 16 17 16 16.3"/></svg>'},{number:4,tag:"H4",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M18 10L15.2834 14.8511C15.246 14.9178 15.294 15 15.3704 15C16.8489 15 18.7561 15 20.2 15M19 17C19 15.7187 19 14.8813 19 13.6"/></svg>'},{number:5,tag:"H5",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16 15.9C16 15.9 16.3768 17 17.8 17C19.5 17 20 15.6199 20 14.7C20 12.7323 17.6745 12.0486 16.1635 12.9894C16.094 13.0327 16 12.9846 16 12.9027V10.1C16 10.0448 16.0448 10 16.1 10H19.8"/></svg>'},{number:6,tag:"H6",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6 7L6 12M6 17L6 12M6 12L12 12M12 7V12M12 17L12 12"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M19.5 10C16.5 10.5 16 13.3285 16 15M16 15V15C16 16.1046 16.8954 17 18 17H18.3246C19.3251 17 20.3191 16.3492 20.2522 15.3509C20.0612 12.4958 16 12.6611 16 15Z"/></svg>'}];return this._settings.levels?s.filter(function(v){return o._settings.levels.includes(v.number)}):s}}])&&i(f.prototype,y),u&&i(f,u),m}()}]).default})})(E);var A=E.exports;const V=N(A),z=P({__proto__:null,default:V},[A]);export{V as H,z as b};