Files
supplier-dispatch-h5/node_modules/.cache/babel-loader/1e428deac7ba07c32fb83f26fd2b50e4735b8d7039a2590714baeac22595b331.json
2023-08-11 10:45:20 +08:00

1 line
16 KiB
JSON

{"ast":null,"code":"import { createNamespace, isObject, addUnit } from '../utils';\nimport { raf, cancelRaf } from '../utils/dom/raf';\nvar _createNamespace = createNamespace('circle'),\n createComponent = _createNamespace[0],\n bem = _createNamespace[1];\nvar PERIMETER = 3140;\nvar uid = 0;\nfunction format(rate) {\n return Math.min(Math.max(rate, 0), 100);\n}\nfunction getPath(clockwise, viewBoxSize) {\n var sweepFlag = clockwise ? 1 : 0;\n return \"M \" + viewBoxSize / 2 + \" \" + viewBoxSize / 2 + \" m 0, -500 a 500, 500 0 1, \" + sweepFlag + \" 0, 1000 a 500, 500 0 1, \" + sweepFlag + \" 0, -1000\";\n}\nexport default createComponent({\n props: {\n text: String,\n size: [Number, String],\n color: [String, Object],\n layerColor: String,\n strokeLinecap: String,\n value: {\n type: Number,\n default: 0\n },\n speed: {\n type: [Number, String],\n default: 0\n },\n fill: {\n type: String,\n default: 'none'\n },\n rate: {\n type: [Number, String],\n default: 100\n },\n strokeWidth: {\n type: [Number, String],\n default: 40\n },\n clockwise: {\n type: Boolean,\n default: true\n }\n },\n beforeCreate: function beforeCreate() {\n this.uid = \"van-circle-gradient-\" + uid++;\n },\n computed: {\n style: function style() {\n var size = addUnit(this.size);\n return {\n width: size,\n height: size\n };\n },\n path: function path() {\n return getPath(this.clockwise, this.viewBoxSize);\n },\n viewBoxSize: function viewBoxSize() {\n return +this.strokeWidth + 1000;\n },\n layerStyle: function layerStyle() {\n return {\n fill: \"\" + this.fill,\n stroke: \"\" + this.layerColor,\n strokeWidth: this.strokeWidth + \"px\"\n };\n },\n hoverStyle: function hoverStyle() {\n var offset = PERIMETER * this.value / 100;\n return {\n stroke: \"\" + (this.gradient ? \"url(#\" + this.uid + \")\" : this.color),\n strokeWidth: +this.strokeWidth + 1 + \"px\",\n strokeLinecap: this.strokeLinecap,\n strokeDasharray: offset + \"px \" + PERIMETER + \"px\"\n };\n },\n gradient: function gradient() {\n return isObject(this.color);\n },\n LinearGradient: function LinearGradient() {\n var _this = this;\n var h = this.$createElement;\n if (!this.gradient) {\n return;\n }\n var Stops = Object.keys(this.color).sort(function (a, b) {\n return parseFloat(a) - parseFloat(b);\n }).map(function (key, index) {\n return h(\"stop\", {\n \"key\": index,\n \"attrs\": {\n \"offset\": key,\n \"stop-color\": _this.color[key]\n }\n });\n });\n return h(\"defs\", [h(\"linearGradient\", {\n \"attrs\": {\n \"id\": this.uid,\n \"x1\": \"100%\",\n \"y1\": \"0%\",\n \"x2\": \"0%\",\n \"y2\": \"0%\"\n }\n }, [Stops])]);\n }\n },\n watch: {\n rate: {\n handler: function handler(rate) {\n this.startTime = Date.now();\n this.startRate = this.value;\n this.endRate = format(rate);\n this.increase = this.endRate > this.startRate;\n this.duration = Math.abs((this.startRate - this.endRate) * 1000 / this.speed);\n if (this.speed) {\n cancelRaf(this.rafId);\n this.rafId = raf(this.animate);\n } else {\n this.$emit('input', this.endRate);\n }\n },\n immediate: true\n }\n },\n methods: {\n animate: function animate() {\n var now = Date.now();\n var progress = Math.min((now - this.startTime) / this.duration, 1);\n var rate = progress * (this.endRate - this.startRate) + this.startRate;\n this.$emit('input', format(parseFloat(rate.toFixed(1))));\n if (this.increase ? rate < this.endRate : rate > this.endRate) {\n this.rafId = raf(this.animate);\n }\n }\n },\n render: function render() {\n var h = arguments[0];\n return h(\"div\", {\n \"class\": bem(),\n \"style\": this.style\n }, [h(\"svg\", {\n \"attrs\": {\n \"viewBox\": \"0 0 \" + this.viewBoxSize + \" \" + this.viewBoxSize\n }\n }, [this.LinearGradient, h(\"path\", {\n \"class\": bem('layer'),\n \"style\": this.layerStyle,\n \"attrs\": {\n \"d\": this.path\n }\n }), h(\"path\", {\n \"attrs\": {\n \"d\": this.path\n },\n \"class\": bem('hover'),\n \"style\": this.hoverStyle\n })]), this.slots() || this.text && h(\"div\", {\n \"class\": bem('text')\n }, [this.text])]);\n }\n});","map":{"version":3,"names":["createNamespace","isObject","addUnit","raf","cancelRaf","_createNamespace","createComponent","bem","PERIMETER","uid","format","rate","Math","min","max","getPath","clockwise","viewBoxSize","sweepFlag","props","text","String","size","Number","color","Object","layerColor","strokeLinecap","value","type","default","speed","fill","strokeWidth","Boolean","beforeCreate","computed","style","width","height","path","layerStyle","stroke","hoverStyle","offset","gradient","strokeDasharray","LinearGradient","_this","h","$createElement","Stops","keys","sort","a","b","parseFloat","map","key","index","watch","handler","startTime","Date","now","startRate","endRate","increase","duration","abs","rafId","animate","$emit","immediate","methods","progress","toFixed","render","arguments","slots"],"sources":["C:/Users/zhouxueli/Desktop/scheduling-app/node_modules/vant/es/circle/index.js"],"sourcesContent":["import { createNamespace, isObject, addUnit } from '../utils';\nimport { raf, cancelRaf } from '../utils/dom/raf';\n\nvar _createNamespace = createNamespace('circle'),\n createComponent = _createNamespace[0],\n bem = _createNamespace[1];\n\nvar PERIMETER = 3140;\nvar uid = 0;\n\nfunction format(rate) {\n return Math.min(Math.max(rate, 0), 100);\n}\n\nfunction getPath(clockwise, viewBoxSize) {\n var sweepFlag = clockwise ? 1 : 0;\n return \"M \" + viewBoxSize / 2 + \" \" + viewBoxSize / 2 + \" m 0, -500 a 500, 500 0 1, \" + sweepFlag + \" 0, 1000 a 500, 500 0 1, \" + sweepFlag + \" 0, -1000\";\n}\n\nexport default createComponent({\n props: {\n text: String,\n size: [Number, String],\n color: [String, Object],\n layerColor: String,\n strokeLinecap: String,\n value: {\n type: Number,\n default: 0\n },\n speed: {\n type: [Number, String],\n default: 0\n },\n fill: {\n type: String,\n default: 'none'\n },\n rate: {\n type: [Number, String],\n default: 100\n },\n strokeWidth: {\n type: [Number, String],\n default: 40\n },\n clockwise: {\n type: Boolean,\n default: true\n }\n },\n beforeCreate: function beforeCreate() {\n this.uid = \"van-circle-gradient-\" + uid++;\n },\n computed: {\n style: function style() {\n var size = addUnit(this.size);\n return {\n width: size,\n height: size\n };\n },\n path: function path() {\n return getPath(this.clockwise, this.viewBoxSize);\n },\n viewBoxSize: function viewBoxSize() {\n return +this.strokeWidth + 1000;\n },\n layerStyle: function layerStyle() {\n return {\n fill: \"\" + this.fill,\n stroke: \"\" + this.layerColor,\n strokeWidth: this.strokeWidth + \"px\"\n };\n },\n hoverStyle: function hoverStyle() {\n var offset = PERIMETER * this.value / 100;\n return {\n stroke: \"\" + (this.gradient ? \"url(#\" + this.uid + \")\" : this.color),\n strokeWidth: +this.strokeWidth + 1 + \"px\",\n strokeLinecap: this.strokeLinecap,\n strokeDasharray: offset + \"px \" + PERIMETER + \"px\"\n };\n },\n gradient: function gradient() {\n return isObject(this.color);\n },\n LinearGradient: function LinearGradient() {\n var _this = this;\n\n var h = this.$createElement;\n\n if (!this.gradient) {\n return;\n }\n\n var Stops = Object.keys(this.color).sort(function (a, b) {\n return parseFloat(a) - parseFloat(b);\n }).map(function (key, index) {\n return h(\"stop\", {\n \"key\": index,\n \"attrs\": {\n \"offset\": key,\n \"stop-color\": _this.color[key]\n }\n });\n });\n return h(\"defs\", [h(\"linearGradient\", {\n \"attrs\": {\n \"id\": this.uid,\n \"x1\": \"100%\",\n \"y1\": \"0%\",\n \"x2\": \"0%\",\n \"y2\": \"0%\"\n }\n }, [Stops])]);\n }\n },\n watch: {\n rate: {\n handler: function handler(rate) {\n this.startTime = Date.now();\n this.startRate = this.value;\n this.endRate = format(rate);\n this.increase = this.endRate > this.startRate;\n this.duration = Math.abs((this.startRate - this.endRate) * 1000 / this.speed);\n\n if (this.speed) {\n cancelRaf(this.rafId);\n this.rafId = raf(this.animate);\n } else {\n this.$emit('input', this.endRate);\n }\n },\n immediate: true\n }\n },\n methods: {\n animate: function animate() {\n var now = Date.now();\n var progress = Math.min((now - this.startTime) / this.duration, 1);\n var rate = progress * (this.endRate - this.startRate) + this.startRate;\n this.$emit('input', format(parseFloat(rate.toFixed(1))));\n\n if (this.increase ? rate < this.endRate : rate > this.endRate) {\n this.rafId = raf(this.animate);\n }\n }\n },\n render: function render() {\n var h = arguments[0];\n return h(\"div\", {\n \"class\": bem(),\n \"style\": this.style\n }, [h(\"svg\", {\n \"attrs\": {\n \"viewBox\": \"0 0 \" + this.viewBoxSize + \" \" + this.viewBoxSize\n }\n }, [this.LinearGradient, h(\"path\", {\n \"class\": bem('layer'),\n \"style\": this.layerStyle,\n \"attrs\": {\n \"d\": this.path\n }\n }), h(\"path\", {\n \"attrs\": {\n \"d\": this.path\n },\n \"class\": bem('hover'),\n \"style\": this.hoverStyle\n })]), this.slots() || this.text && h(\"div\", {\n \"class\": bem('text')\n }, [this.text])]);\n }\n});"],"mappings":"AAAA,SAASA,eAAe,EAAEC,QAAQ,EAAEC,OAAO,QAAQ,UAAU;AAC7D,SAASC,GAAG,EAAEC,SAAS,QAAQ,kBAAkB;AAEjD,IAAIC,gBAAgB,GAAGL,eAAe,CAAC,QAAQ,CAAC;EAC5CM,eAAe,GAAGD,gBAAgB,CAAC,CAAC,CAAC;EACrCE,GAAG,GAAGF,gBAAgB,CAAC,CAAC,CAAC;AAE7B,IAAIG,SAAS,GAAG,IAAI;AACpB,IAAIC,GAAG,GAAG,CAAC;AAEX,SAASC,MAAMA,CAACC,IAAI,EAAE;EACpB,OAAOC,IAAI,CAACC,GAAG,CAACD,IAAI,CAACE,GAAG,CAACH,IAAI,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC;AACzC;AAEA,SAASI,OAAOA,CAACC,SAAS,EAAEC,WAAW,EAAE;EACvC,IAAIC,SAAS,GAAGF,SAAS,GAAG,CAAC,GAAG,CAAC;EACjC,OAAO,IAAI,GAAGC,WAAW,GAAG,CAAC,GAAG,GAAG,GAAGA,WAAW,GAAG,CAAC,GAAG,6BAA6B,GAAGC,SAAS,GAAG,2BAA2B,GAAGA,SAAS,GAAG,WAAW;AAC3J;AAEA,eAAeZ,eAAe,CAAC;EAC7Ba,KAAK,EAAE;IACLC,IAAI,EAAEC,MAAM;IACZC,IAAI,EAAE,CAAC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