"use strict";(self.webpackChunk_components_admin_1_1_41=self.webpackChunk_components_admin_1_1_41||[]).push([[437],{2818(e,t,n){n.r(t),n.d(t,{FontLoader:()=>f,default:()=>d,loadFont:()=>u});var r=n(13732),o=n.n(r),a=n(98139),s=n.n(a);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(null,arguments)}const l=["type","colorful","className","fontClassName","size","style","prefix"],i=e=>(/^[1-9]+[0-9]*]*$/.test(e.toString())&&(e+="px"),e),d=e=>{let t=e.type,n=e.colorful,r=void 0!==n&&n,a=e.className,d=e.fontClassName,u=void 0===d?"iconfont":d,f=e.size,m=e.style,p=e.prefix,h=void 0===p?"":p,v=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,l);const y=((e,t,n)=>"icon-"===t||""===t?(n?"icon-color-":"icon-")+e.replace(/^icon-(color-)?/,""):t+e)(t,h,r),E=s()(a,{[u]:!r,["".concat(u,"--color")]:r},y),w=Object.assign({},m,f?{fontSize:i(f)}:{});return r?o().createElement("svg",c({},v,{className:E,style:w}),o().createElement("use",{xlinkHref:"#".concat(y),style:{pointerEvents:"none"}})):o().createElement("i",c({},v,{className:E,style:w}))},u=async(e,t)=>{if(!document.head.querySelector('script[href*="'.concat(t||(e=>{const t=(e=e.replace(/\/+$/,"")).split("/").filter(e=>""!==e);return t[t.length-1]})(e),'"]'))){if(/.js$/.test(e)){const t=document.createElement("script");return t.src=e,await new Promise((e,n)=>{t.addEventListener("load",()=>{e()}),t.addEventListener("error",e=>{n(e)}),document.head.append(t)}),()=>{document.head.removeChild(t)}}if(/.css$/.test(e)){const t=document.createElement("link");return t.setAttribute("href",e),t.setAttribute("rel","stylesheet"),await new Promise((e,n)=>{t.addEventListener("load",()=>{e()}),t.addEventListener("error",e=>{n(e)}),document.head.append(t)}),()=>{document.head.removeChild(t)}}throw new Error("Unable to load font type")}},f=e=>{let t=e.path,n=e.name;return(0,r.useEffect)(()=>{const e=u(t,n);return()=>{e.then(e=>{e&&e()})}},[t,n]),null}}}]);
//# sourceMappingURL=437.ffcc107b.chunk.js.map