global.pluginNodeModulesPath=Editor.url("packages://mini_font/node_modules"),global.pluginDistPath="packages://mini_font/dist";var t=Editor.url("packages://mini_font/libs/fixrequire.js");t&&""!==t&&require(t);var e=require("fs"),n=require("path");function i(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var s=i(e),a=i(n),r=require("fontmin"),o=function(){this.input_path="",this.out_path="",this.text_content="",this.text_content2="",this.switch_number=!0,this.switch_lowercase_letters=!0,this.switch_capital_letters=!0,this.switch_symbol_letters=!0,this.switch_find_ts=!0,this.switch_find_js=!0,this.switch_find_json=!0},_=["0","1","2","3","4","5","6","7","8","9"],c=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],l=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],h=['!@#$%^&*()_+;.,<>:"{}[]=-|`'],u=function(){function t(){}return t.init=function(t){var e=this;this.panel_context=t,this.cfg_path=Editor.Project.path+"/settings/font_cfg.json",s.existsSync(this.cfg_path)?this.setting_data=JSON.parse(s.readFileSync(this.cfg_path,"utf-8").toString()):this.setting_data=new o,this.read_path(),this.panel_context.$btn_find.addEventListener("confirm",(function(){e.panel_context.$text_content2.value="";var t="";e.dir(Editor.Project.path+"/assets",(function(n){var i=function(n){s.readFile(n,(function(n,i){if(n)Editor.error(n);else for(var s=i.toString(),a=0;a=0){var s=Editor.remote.assetdb.fspathToUrl(i.path);Editor.remote.assetdb.refresh(s)}e.save()}}))}else Editor.warn("\u8f93\u51fa\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a!");else Editor.warn("\u8f93\u5165\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a!");else Editor.warn("\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a!")}))},t.save=function(){this.setting_data.text_content=this.panel_context.$text_content.value,this.setting_data.text_content2=this.panel_context.$text_content2.value,this.setting_data.switch_number=this.panel_context.$switch_number.value,this.setting_data.switch_symbol_letters=this.panel_context.$switch_symbol_letters.value,this.setting_data.switch_capital_letters=this.panel_context.$switch_capital_letters.value,this.setting_data.switch_lowercase_letters=this.panel_context.$switch_lowercase_letters.value,this.setting_data.switch_find_js=this.panel_context.$switch_find_js.value,this.setting_data.switch_find_json=this.panel_context.$switch_find_json.value,this.setting_data.switch_find_ts=this.panel_context.$switch_find_ts.value,s.writeFile(this.cfg_path,JSON.stringify(this.setting_data),(function(t){t&&Editor.error(t)}))},t.read_path=function(){this.panel_context.$input_path.value=this.setting_data.input_path,this.panel_context.$out_path.value=this.setting_data.out_path,this.panel_context.$text_content.value=this.setting_data.text_content,this.panel_context.$text_content2.value=this.setting_data.text_content2,this.panel_context.$switch_number.value=this.setting_data.switch_number,this.panel_context.$switch_symbol_letters.value=this.setting_data.switch_symbol_letters,this.panel_context.$switch_capital_letters.value=this.setting_data.switch_capital_letters,this.panel_context.$switch_lowercase_letters.value=this.setting_data.switch_lowercase_letters,this.panel_context.$switch_find_js.value=this.setting_data.switch_find_js,this.panel_context.$switch_find_json.value=this.setting_data.switch_find_json,this.panel_context.$switch_find_ts.value=this.setting_data.switch_find_ts},t.check_number=function(t){for(var e=0;e<_.length;e++){var n=_[e];this.panel_context.$switch_number.value&&-1===t.indexOf(n)&&(t+=n)}return t},t.check_lowercase_letters=function(t){for(var e=0;e\r\n\r\n\r\n \r\n \u5b57\u4f53\u7626\u8eab\u5de5\u5177\r\n\r\n\r\n
\r\n
\u8f93\u5165\u8def\u5f84
\r\n \r\n \u9009\u62e9\r\n
\r\n\r\n
\r\n
\u8f93\u51fa\u8def\u5f84
\r\n \r\n \u9009\u62e9\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\u67e5\u627e\u5f53\u524d\u9879\u76ee\u4e2d\u6240\u6709\u6c49\u5b57
\r\n
\r\n json\r\n ts\r\n js\r\n \u67e5\u627e\r\n
\r\n
\r\n
\r\n
\r\n\x3c!--clear both\u89e3\u51b3float\u7684\u9519\u4e71\u95ee\u9898--\x3e\r\n
\r\n
\r\n \u6570\u5b57\r\n \u5927\u5199\u5b57\u6bcd\r\n \u5c0f\u5199\u5b57\u6bcd\r\n \u7b26\u53f7\r\n
\r\n
\r\n \u751f\u6210\r\n
\r\n\r\n\r\n\r\n',$:{input_path:"#input_path",out_path:"#out_path",btn_input_path:"#btn_input_path",btn_out_path:"#btn_out_path",text_content:"#text_content",text_content2:"#text_content2",btn_ok:"#btn_ok",btn_find:"#btn_find",switch_number:"#switch_number",switch_lowercase_letters:"#switch_lowercase_letters",switch_capital_letters:"#switch_capital_letters",switch_symbol_letters:"#switch_symbol_letters",switch_find_js:"#switch_find_js",switch_find_ts:"#switch_find_ts",switch_find_json:"#switch_find_json"},ready:function(){u.init(this)},messages:{}});