Files
deepdata/my_ops/markitdown_parser/index_files/spy-client_2d4ba77_g4-m.js
沃巴蒂 ff22ed3a8b feat(deepdata): 引入修改密码、文件预览组件与清洗算子增强,deepflow 改名为 deep-flow
本次同步 09-12 至 09-28 的代码变更,主要内容:

新增功能
- 修改密码:后端新增 ChangePasswordRequest DTO 与UserController/UserService
  对应接口,前端新增 ChangePasswordDialog 并在 Header 接入入口
- 文件预览组件重构:file-preview 目录拆分出 VideoPreview(支持 blobUrl 直传)、
  ImagePreview、AudioPreview,index.tsx 统一调度各类型预览器
- 新增 my_ops 算子模块:markitdown_parser、mineru_pdf_parser、text_quality_evaluator
- 新增 tools/minio-file-server MinIO 文件服务

功能增强
- 数据清洗:cleaning_task_service/scheduler/routes 重构,
  data_juicer_executor 与 wrapper 增强,OperatorTable/LogsTable/TaskDetail 同步调整
- 数据标注:annotation sync.py、project.py 接口与schema 更新
- 数据采集、算子市场、首页与菜单路由相关页面调整
- DataJuicer 算子接入(useOperatorOperations、dj_ops_schema)

结构调整
- deepflow/ 更名为 deep-flow/(419 个文件重命名)
- 新增 helm 部署编排、GitHub Actions 之外的自建镜像构建脚本

未纳入本次提交
- scripts-backup/、runtime/python-executor-backup/、components_backup/(备份目录)
- *.backup*、__pycache__ 产物
- zh_core_web_sm-3.8.0-py3-none-any.whl(46MB 构建产物)
- DataX/(内嵌独立仓库,远程亦未收录其源码)
2026-10-03 22:44:56 +08:00

15 lines
8.3 KiB
JavaScript

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("spy-client/dist/spy-local-cache",["require"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).SpyLocalCache=e()}(this,(function(){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},t(e,o)};function e(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}var o=function(){function t(t,e){this.data=t,this.weight=e}return t.prototype.preOrder=function(t){t.push(this),this.left&&this.left.preOrder(t),this.right&&this.right.preOrder(t)},t}();function r(t){var e=function(t){for(var e=[],r={},n=0,i=t;n<i.length;n++){var a=i[n];null==r[a]?r[a]=1:r[a]++}for(var s=0,u=Object.entries(r);s<u.length;s++){var c=u[s],h=c[0],l=c[1];e.push(new o(h,l))}return e}(t),r=function(t){for(var e=function(t,e){return t.weight-e.weight};t.length>1;){t.sort(e);var r=t.shift(),n=t.shift();if(r&&n){var i=new o(null,r.weight+n.weight);i.left=r,i.right=n,t.unshift(i)}}return t.shift()}(e),n=function(t){if(null==t)return null;var e={};return function o(t,r,n){var i=[].concat(n);i.push(r),null!=t&&(null==t.data?(o(t.left,"0",i),o(t.right,"1",i)):e[t.data]=i.join(""))}(t,"",[]),e}(r),i=function(t,e){for(var o=[],r=0,n=t;r<n.length;r++){var i=n[r];o.push(e[i])}return o}(t,n);return{result:function(t){for(var e=t.join(""),o=Math.ceil(e.length/8),r=new Array(o+1),n=0,i="",a=0;a<e.length;a+=8)i=e.substring(a,a+8),r[n]=parseInt(i,2),n++;return r[n]=i.length,r}(i),codes:n}}function n(t,e){t&&(e|=256);var o=Number(e).toString(2);return t?o.substring(o.length-8):o}function i(t){for(var e=[],o=0;o<t.length;o++)e.push(t.charCodeAt(o));return e}function a(t){for(var e="",o=0,r=t;o<r.length;o++){var n=r[o];e+=String.fromCharCode(n)}return e}function s(t,e){return a(function(t,e){for(var o=[],r=0;r<e.length-1;r++){var i=r!==e.length-2;o.push(n(i,e[r]))}var a=o[o.length-1],s=e[e.length-1];a="00000000".substring(8-(s-a.length))+a,o[o.length-1]=a;for(var u={},c=0,h=Object.entries(t);c<h.length;c++){var l=h[c],f=l[0];u[l[1]]=f}var p=o.join(""),d=[],g=p.length;for(r=0;r<g;){for(var v=1,y=(i=!0,null);i&&r+v<=g&&""!==(f=p.substring(r,r+v));)(y=u[f])?i=!1:v++;d.push(parseInt(y,10)),r+=v}return d}(t,i(e)))}var u=function(){function t(){}return t.prototype.set=function(t,e){},t.prototype.get=function(t,e){},t.prototype.rm=function(t){},t}(),c=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e(o,t),o.isSupport=function(){return!!window.localStorage},o.prototype.set=function(t,e){try{localStorage.setItem(t,e)}catch(o){console.error(o)}},o.prototype.get=function(t,e){var o=null;try{o=localStorage.getItem(t)}catch(r){console.error(r)}e&&e(o)},o.prototype.rm=function(t){try{localStorage.removeItem(t)}catch(e){console.error(e)}},o}(u),h=function(t){function o(){var e=t.call(this)||this;e.databaseName="spyLC",e.db=null,e.setQueue=[],e.getQueue=[];var o=window.indexedDB.open(e.databaseName);return o.onupgradeneeded=function(t){e.db=t.target&&t.target.result,e.db&&!e.db.objectStoreNames.contains(e.databaseName)&&e.db.createObjectStore(e.databaseName,{keyPath:"key"}),e.runQueueTask()},o.onsuccess=function(){e.db=o.result,e.runQueueTask()},e}return e(o,t),o.isSupport=function(){return!!window.indexedDB},o.prototype.set=function(t,e){this.db?this.db.transaction([this.databaseName],"readwrite").objectStore(this.databaseName).add({key:t,value:e}):this.setQueue.push({key:t,value:e})},o.prototype.get=function(t,e){if(this.db){var o=this.db.transaction([this.databaseName]).objectStore(this.databaseName).get(t);o.onsuccess=function(){var t=o.result?o.result:{value:""};e(t.value)}}else this.getQueue.push({key:t,cb:e})},o.prototype.runQueueTask=function(){var t=this;this.setQueue.forEach((function(e){t.set(e.key,e.value)})),this.getQueue.forEach((function(e){t.get(e.key,e.cb)}))},o}(u);function l(t,e){if(void 0===e&&(e=!1),!t)return"";e||(t=function(t){for(var e="",o=0;o<t.length;o++){var r=t.charCodeAt(o);r<128?e+=String.fromCharCode(r):r>127&&r<2048?(e+=String.fromCharCode(r>>6|192),e+=String.fromCharCode(63&r|128)):(e+=String.fromCharCode(r>>12|224),e+=String.fromCharCode(r>>6&63|128),e+=String.fromCharCode(63&r|128))}return e}(t));var o,r,n,i={},a=[],s=t.charAt(0),u=s,c=u,h=256,l=function(){a.push(s.length>1?String.fromCharCode(i[s]):s)};for(e&&a.push(s),o=1;o<t.length;o++)r=t.charAt(o),e?(n=t.charCodeAt(o),s=n<256?r:i[n]||s+u,a.push(s),u=s.charAt(0),i[h++]=c+u,c=s):i.hasOwnProperty(s+r)?s+=r:(l(),i[s+r]=h++,s=r);e||l();var f=a.join("");return e&&(f=function(t){for(var e="",o=0,r=0,n=0,i=0;o<t.length;)(r=t.charCodeAt(o))<128?(e+=String.fromCharCode(r),o++):r>191&&r<224?(n=t.charCodeAt(o+1),e+=String.fromCharCode((31&r)<<6|63&n),o+=2):(n=t.charCodeAt(o+1),i=t.charCodeAt(o+2),e+=String.fromCharCode((15&r)<<12|(63&n)<<6|63&i),o+=3);return e}(f)),f}var f=function(){function t(t){void 0===t&&(t={}),this.tmpList=[],this.option=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o=Object.assign||function(t){for(var e=void 0,o=1,r=arguments.length;o<r;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t};return o.apply(this,t)}({defaultTrigger:!0,compress:"lzw",key:"SpyLocalCache",interval:500,maxRecordLen:30,onFlush:function(){},onSave:function(){},onAdd:function(){return!0},storage:h.isSupport()?"indexedDB":c.isSupport()?"localstorage":"empty"},t),this.load=this.load.bind(this),this.init()}return t.prototype.init=function(){"indexedDB"===this.option.storage?this.storage=new h:"localstorage"===this.option.storage?this.storage=new c:this.storage=new u,"complete"===document.readyState?this.load():window.addEventListener("load",this.load)},t.prototype.load=function(){location.search.indexOf("_FlushLogLocalCache=1")>-1&&this.option.defaultTrigger&&this.flushLog()},t.prototype.addLog=function(t){var e=this;this.option.onAdd&&!this.option.onAdd(t)||(t=JSON.stringify(t),this.tmpList.push(t),this.timer&&clearTimeout(this.timer),this.timer=setTimeout((function(){e.save()}),this.option.interval))},t.prototype.getData=function(t){var e=this;try{this.storage.get(this.option.key,(function(o){o?e.storage.get(e.option.key+"Codes",(function(r){var n=[];try{r&&(r=JSON.parse(r)),n=e.unzip(o,r).split("\n")}catch(i){console.error(i)}t(n)})):t([])}))}catch(o){console.error(o),t([])}},t.prototype.save=function(){var t=this,e=Date.now();this.getData((function(o){var r=t.option.maxRecordLen-1,n=(o.length>r?o.slice(o.length-r,o.length):o).concat(t.tmpList),i=n.join("\n"),a=null,s=0;try{var u=t.zip(i),c="";u.codes?(c=JSON.stringify(u.codes),t.storage.set(t.option.key+"Codes",c)):t.storage.rm(t.option.key+"Codes"),t.storage.set(t.option.key,u.result),s=u.result.length}catch(h){a=h,console.error(h)}t.tmpList=[],t.option.onSave&&t.option.onSave({cost:Date.now()-e,length:s/1024,list:n,error:a})}))},t.prototype.flushLog=function(){var t=this;this.getData((function(e){try{for(var o=0;o<e.length;o++)e[o]=JSON.parse(e[o])}catch(r){e=[],t.storage.rm(t.option.key),console.error(r)}for(o=0;o<t.tmpList.length;o++)e.push(JSON.parse(t.tmpList[o]));t.option.onFlush&&t.option.onFlush(e)}))},t.prototype.zip=function(t){return"lzw"===this.option.compress?{codes:null,result:l(t)}:"huffman"===this.option.compress?function(t){var e=r(i(t)),o=e.result;return{codes:e.codes,result:a(o)}}(t):{codes:null,result:t}},t.prototype.unzip=function(t,e){return"lzw"===this.option.compress?l(t,!0):"huffman"===this.option.compress?s(e,t):t},t}();return f}));