@design-edito/tools 0.1.71 → 0.1.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agnostic/arrays/find-duplicates/index.js +1 -1
- package/agnostic/arrays/index.js +8 -8
- package/agnostic/arrays/is-array-of/index.js +1 -1
- package/agnostic/arrays/make/index.js +1 -1
- package/agnostic/arrays/random-pick/index.js +5 -5
- package/agnostic/arrays/shuffle/index.js +1 -1
- package/agnostic/booleans/index.js +1 -1
- package/agnostic/booleans/is-falsy/index.js +1 -1
- package/agnostic/colors/complement-color/index.js +1 -1
- package/agnostic/colors/hex-to-rgb/index.js +1 -1
- package/agnostic/colors/hsl-to-rgb/index.js +1 -1
- package/agnostic/colors/index.js +12 -12
- package/agnostic/colors/lighten-color/index.js +3 -3
- package/agnostic/colors/rgb-to-hex/index.js +1 -1
- package/agnostic/colors/rgb-to-hsl/index.js +1 -1
- package/agnostic/colors/saturate-color/index.js +3 -3
- package/agnostic/css/bem/index.js +1 -1
- package/agnostic/css/generate-nice-color/index.js +1 -1
- package/agnostic/css/index.js +12 -12
- package/agnostic/css/is-valid-css-class-name/index.js +1 -1
- package/agnostic/css/styles-set/index.js +5 -5
- package/agnostic/errors/index.js +1 -1
- package/agnostic/errors/register/index.js +1 -1
- package/agnostic/errors/unknown-to-string/index.js +1 -1
- package/agnostic/html/get-node-ancestors/index.js +1 -1
- package/agnostic/html/get-position-inside-parent/index.js +1 -1
- package/agnostic/html/hyper-json/cast/index.js +5 -5
- package/agnostic/html/hyper-json/index.js +6 -6
- package/agnostic/html/hyper-json/method/index.js +1 -1
- package/agnostic/html/hyper-json/serialize/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/any/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/array/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/null/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +5 -5
- package/agnostic/html/hyper-json/transformer/index.js +1 -1
- package/agnostic/html/hyper-json/tree/index.js +5 -5
- package/agnostic/html/hyper-json/types/index.js +1 -1
- package/agnostic/html/hyper-json/utils/index.js +5 -5
- package/agnostic/html/index.js +17 -17
- package/agnostic/html/insert-node/index.js +1 -1
- package/agnostic/html/placeholders/index.js +1 -1
- package/agnostic/html/replace-in-element/index.js +1 -1
- package/agnostic/html/sanitize/index.js +5 -5
- package/agnostic/html/selector-to-element/index.js +5 -5
- package/agnostic/html/string-to-nodes/index.js +6 -6
- package/agnostic/misc/assert/index.js +1 -1
- package/agnostic/misc/cast/index.js +1 -1
- package/agnostic/misc/crawler/index.js +1 -1
- package/agnostic/misc/crossenv/detect-runtime/index.js +1 -1
- package/agnostic/misc/crossenv/index.js +3 -3
- package/agnostic/misc/crossenv/types/index.js +1 -1
- package/agnostic/misc/crossenv/window/index.js +1 -1
- package/agnostic/misc/data-size/index.js +2 -2
- package/agnostic/misc/elo/index.js +1 -1
- package/agnostic/misc/get-current-downlink/index.js +1 -1
- package/agnostic/misc/index.js +17 -17
- package/agnostic/misc/is-constructor-function/index.js +1 -1
- package/agnostic/misc/is-nullish/index.js +1 -1
- package/agnostic/misc/logs/index.js +1 -1
- package/agnostic/misc/logs/logger/index.js +1 -1
- package/agnostic/misc/logs/make-text-block/index.js +1 -1
- package/agnostic/misc/logs/styles/index.js +1 -1
- package/agnostic/misc/lorem-ipsum/index.js +9 -9
- package/agnostic/misc/normalize-extension/index.js +1 -1
- package/agnostic/misc/outcome/index.js +1 -1
- package/agnostic/numbers/absolute-modulo/index.js +1 -1
- package/agnostic/numbers/clamp/index.js +1 -1
- package/agnostic/numbers/index.js +6 -6
- package/agnostic/numbers/interpolate/index.js +1 -1
- package/agnostic/numbers/responsive-harmonics/index.js +1 -1
- package/agnostic/numbers/round/index.js +1 -1
- package/agnostic/objects/deep-get-property/index.js +1 -1
- package/agnostic/objects/enums/index.js +1 -1
- package/agnostic/objects/enums/is-in-enum/index.js +1 -1
- package/agnostic/objects/flatten-getters/index.js +1 -1
- package/agnostic/objects/index.js +10 -10
- package/agnostic/objects/is-object/index.js +1 -1
- package/agnostic/objects/is-record/index.js +1 -1
- package/agnostic/objects/record-format/index.js +1 -1
- package/agnostic/objects/record-map/index.js +1 -1
- package/agnostic/objects/validation/index.js +1 -1
- package/agnostic/optim/index.js +4 -4
- package/agnostic/optim/memoize/index.js +1 -1
- package/agnostic/optim/throttle-debounce/index.js +1 -1
- package/agnostic/random/hex-char/index.js +1 -1
- package/agnostic/random/index.js +1 -1
- package/agnostic/random/random/index.js +1 -1
- package/agnostic/random/uuid/index.js +1 -1
- package/agnostic/regexps/index.js +1 -1
- package/agnostic/sanitization/index.js +4 -1280
- package/agnostic/strings/char-codes/index.js +1 -1
- package/agnostic/strings/index.js +8 -8
- package/agnostic/strings/matches/index.js +1 -1
- package/agnostic/strings/normalize-indent/index.js +1 -1
- package/agnostic/strings/replace-all/index.js +1 -1
- package/agnostic/strings/to-alphanum/index.js +1 -1
- package/agnostic/strings/trim/index.js +1 -1
- package/agnostic/time/dates/format-date/index.js +1 -1
- package/agnostic/time/dates/index.js +1 -1
- package/agnostic/time/duration/index.js +1 -1
- package/agnostic/time/index.js +9 -9
- package/agnostic/time/timeout/index.js +1 -1
- package/agnostic/time/transitions/index.js +1 -1
- package/agnostic/time/wait/index.js +1 -1
- package/chunks/chunk-24ZUWYIR.js +42 -0
- package/chunks/chunk-2JH4TCT2.js +34 -0
- package/chunks/chunk-2RUBEK4A.js +2456 -0
- package/chunks/chunk-2VJ4QISD.js +28 -0
- package/chunks/chunk-2VXYXVV2.js +164 -0
- package/chunks/chunk-32FNUJVW.js +31 -0
- package/chunks/chunk-36CTYZYA.js +28 -0
- package/chunks/chunk-37TRFYZT.js +35 -0
- package/chunks/chunk-3CGRUS5C.js +37 -0
- package/chunks/chunk-3CLGBOHN.js +29 -0
- package/chunks/chunk-3DL3U7UR.js +40 -0
- package/chunks/chunk-3G7KHSKB.js +60 -0
- package/chunks/chunk-3TKBCG7Y.js +40 -0
- package/chunks/chunk-42K3MQQ5.js +31 -0
- package/chunks/chunk-4A2IILES.js +16 -0
- package/chunks/chunk-4WM6K5IZ.js +30 -0
- package/chunks/chunk-4XBUJAQU.js +71 -0
- package/chunks/chunk-4XSDRT23.js +67 -0
- package/chunks/chunk-55EDDDIA.js +16 -0
- package/chunks/chunk-56OEXCBD.js +60 -0
- package/chunks/chunk-5YIC7NDS.js +18 -0
- package/chunks/chunk-5ZJ3KJPK.js +44 -0
- package/chunks/chunk-646R6BQZ.js +42 -0
- package/chunks/chunk-6ET4XJLF.js +40 -0
- package/chunks/chunk-6IYUA43Q.js +43 -0
- package/chunks/chunk-6NLNUGBI.js +42 -0
- package/chunks/chunk-6PIGLFM3.js +191 -0
- package/chunks/chunk-6SXCNPJ2.js +177 -0
- package/chunks/chunk-766BSKLU.js +2456 -0
- package/chunks/chunk-7J7CYOXU.js +36 -0
- package/chunks/chunk-A5XT7AXP.js +151 -0
- package/chunks/chunk-AHSYVIOF.js +18 -0
- package/chunks/chunk-ANPXBD2G.js +35 -0
- package/chunks/chunk-B446JIN3.js +29 -0
- package/chunks/chunk-BD56ZAYF.js +28 -0
- package/chunks/chunk-BE7OXZRK.js +42 -0
- package/chunks/chunk-BQMQIW77.js +69 -0
- package/chunks/chunk-BSUQNHAM.js +44 -0
- package/chunks/chunk-BWYH445G.js +43 -0
- package/chunks/chunk-C6QTHDDM.js +52 -0
- package/chunks/chunk-CA3UPHYO.js +42 -0
- package/chunks/chunk-CHUOCTRP.js +26 -0
- package/chunks/chunk-CNYSX2L2.js +38 -0
- package/chunks/chunk-CVDCTI7F.js +47 -0
- package/chunks/chunk-CWZFRUBS.js +41 -0
- package/chunks/chunk-DABLUUMY.js +24 -0
- package/chunks/chunk-DAOJPBZ6.js +18 -0
- package/chunks/chunk-DHCDZVLA.js +19 -0
- package/chunks/chunk-DPQRXSZH.js +42 -0
- package/chunks/chunk-DTETQT5O.js +15 -0
- package/chunks/chunk-E3F7QTXR.js +141 -0
- package/chunks/chunk-EOTOFHUR.js +42 -0
- package/chunks/chunk-F6CB5TEO.js +151 -0
- package/chunks/chunk-FB3GNE2B.js +48 -0
- package/chunks/chunk-FD5WR2A5.js +63 -0
- package/chunks/chunk-FE4DECBU.js +42 -0
- package/chunks/chunk-FF5NURFO.js +32 -0
- package/chunks/chunk-FJ3NTVCG.js +18 -0
- package/chunks/chunk-FNJX5BML.js +23 -0
- package/chunks/chunk-FS6LRTDK.js +42 -0
- package/chunks/chunk-G5RRNREY.js +37 -0
- package/chunks/chunk-GRDFCI63.js +21 -0
- package/chunks/chunk-H4LW6FP3.js +42 -0
- package/chunks/chunk-H5O26IRG.js +28 -0
- package/chunks/chunk-HFV7VACE.js +191 -0
- package/chunks/chunk-HGSQCJ55.js +65 -0
- package/chunks/chunk-HRNDUTZE.js +46 -0
- package/chunks/chunk-HWEGQVBQ.js +32 -0
- package/chunks/chunk-HWVEI3RH.js +31 -0
- package/chunks/chunk-IIMP6YT7.js +56 -0
- package/chunks/chunk-INGSSBWK.js +40 -0
- package/chunks/chunk-IPLOZP7L.js +20 -0
- package/chunks/chunk-IUURENUN.js +22 -0
- package/chunks/chunk-IV75M3KE.js +38 -0
- package/chunks/chunk-IWWAMCNR.js +16 -0
- package/chunks/chunk-IWZAUQGO.js +40 -0
- package/chunks/chunk-JUF5GSDE.js +37 -0
- package/chunks/chunk-JWF5EKM2.js +127 -0
- package/chunks/chunk-KBFSUJ57.js +40 -0
- package/chunks/chunk-KJAEVOIW.js +42 -0
- package/chunks/chunk-LFSYWGO5.js +31 -0
- package/chunks/chunk-LMPEBXSU.js +31 -0
- package/chunks/chunk-MAOVZE34.js +20 -0
- package/chunks/chunk-N2T672IG.js +62 -0
- package/chunks/chunk-N32W4UQ6.js +16 -0
- package/chunks/chunk-NMYVJJXV.js +47 -0
- package/chunks/chunk-NOLQR5RW.js +42 -0
- package/chunks/chunk-OA7Y2A5T.js +42 -0
- package/chunks/chunk-OD7GR6ZF.js +56 -0
- package/chunks/chunk-ON6LC3HE.js +84 -0
- package/chunks/chunk-PAIUCLVK.js +35 -0
- package/chunks/chunk-QCOO4PV5.js +54 -0
- package/chunks/chunk-QDVDHFMZ.js +39 -0
- package/chunks/chunk-QH64MYGA.js +45 -0
- package/chunks/chunk-QLDN574K.js +39 -0
- package/chunks/chunk-QLOMT4DL.js +21 -0
- package/chunks/chunk-QPHK5QI7.js +4072 -0
- package/chunks/chunk-QVPS2BCJ.js +29 -0
- package/chunks/chunk-QWFEYLHG.js +79 -0
- package/chunks/chunk-QWZ4ZNFA.js +63 -0
- package/chunks/chunk-RTUTFCLC.js +40 -0
- package/chunks/chunk-RWO53U4X.js +39 -0
- package/chunks/chunk-SA2IY5LN.js +35 -0
- package/chunks/chunk-SX4DSRPU.js +24 -0
- package/chunks/chunk-TGVYEQIA.js +38 -0
- package/chunks/chunk-UBCUVSEV.js +35 -0
- package/chunks/chunk-UK2F7CWI.js +29 -0
- package/chunks/chunk-UK4HNSEJ.js +42 -0
- package/chunks/chunk-V3GX7SIJ.js +28 -0
- package/chunks/chunk-V3L55I2S.js +43 -0
- package/chunks/chunk-VROZGPC5.js +45 -0
- package/chunks/chunk-W3RXHN5I.js +38 -0
- package/chunks/chunk-WAHPAZQS.js +60 -0
- package/chunks/chunk-WHAUJMMG.js +32 -0
- package/chunks/chunk-WJ3XV35I.js +28 -0
- package/chunks/chunk-WJYMX7SS.js +21 -0
- package/chunks/chunk-X33GT7VY.js +28 -0
- package/chunks/chunk-XFMKYZKH.js +164 -0
- package/chunks/chunk-XRUSQWPJ.js +173 -0
- package/chunks/chunk-YKPA3MQL.js +31 -0
- package/chunks/chunk-YY6DTDMO.js +177 -0
- package/chunks/chunk-ZEZCYPLQ.js +43 -0
- package/chunks/chunk-ZJTWDCNZ.js +34 -0
- package/chunks/chunk-ZSUG52DO.js +40 -0
- package/components/Comp/index.js +1 -1
- package/node/@aws-s3/index.js +15 -5
- package/node/@aws-s3/storage/directory/copy-dir/index.d.ts +35 -0
- package/node/@aws-s3/storage/directory/copy-dir/index.js +9 -0
- package/node/@aws-s3/storage/directory/index.d.ts +5 -0
- package/node/@aws-s3/storage/directory/index.js +22 -0
- package/node/@aws-s3/storage/directory/list/index.d.ts +17 -0
- package/node/@aws-s3/storage/directory/list/index.js +9 -0
- package/node/@aws-s3/storage/directory/move-dir/index.d.ts +33 -0
- package/node/@aws-s3/storage/directory/move-dir/index.js +9 -0
- package/node/@aws-s3/storage/directory/remove-dir/index.d.ts +31 -0
- package/node/@aws-s3/storage/directory/remove-dir/index.js +9 -0
- package/node/@aws-s3/storage/file/copy/index.d.ts +30 -0
- package/node/@aws-s3/storage/file/copy/index.js +9 -0
- package/node/@aws-s3/storage/file/download/index.d.ts +15 -15
- package/node/@aws-s3/storage/file/download/index.js +2 -2
- package/node/@aws-s3/storage/file/exists/index.d.ts +23 -0
- package/node/@aws-s3/storage/file/exists/index.js +9 -0
- package/node/@aws-s3/storage/file/index.d.ts +6 -1
- package/node/@aws-s3/storage/file/index.js +25 -5
- package/node/@aws-s3/storage/file/move/index.d.ts +33 -0
- package/node/@aws-s3/storage/file/move/index.js +9 -0
- package/node/@aws-s3/storage/file/remove/index.d.ts +17 -0
- package/node/@aws-s3/storage/file/remove/index.js +9 -0
- package/node/@aws-s3/storage/file/stat/index.d.ts +24 -0
- package/node/@aws-s3/storage/file/stat/index.js +9 -0
- package/node/@aws-s3/storage/file/upload/index.d.ts +13 -19
- package/node/@aws-s3/storage/file/upload/index.js +2 -2
- package/node/@aws-s3/storage/index.d.ts +2 -1
- package/node/@aws-s3/storage/index.js +18 -5
- package/node/@design-edito/index.js +1 -1
- package/node/@express/@multer/index.js +2 -2
- package/node/@express/index.js +2 -2
- package/node/@google-cloud/index.js +22 -17
- package/node/@google-cloud/storage/bucket/get-metadata/index.js +2 -2
- package/node/@google-cloud/storage/bucket/index.d.ts +4 -2
- package/node/@google-cloud/storage/bucket/index.js +15 -7
- package/node/@google-cloud/storage/directory/copy-dir/index.d.ts +22 -0
- package/node/@google-cloud/storage/directory/copy-dir/index.js +9 -0
- package/node/@google-cloud/storage/directory/index.d.ts +5 -0
- package/node/@google-cloud/storage/directory/index.js +22 -0
- package/node/@google-cloud/storage/directory/list/index.d.ts +17 -0
- package/node/@google-cloud/storage/directory/list/index.js +9 -0
- package/node/@google-cloud/storage/directory/move-dir/index.d.ts +31 -0
- package/node/@google-cloud/storage/directory/move-dir/index.js +9 -0
- package/node/@google-cloud/storage/directory/remove-dir/index.d.ts +31 -0
- package/node/@google-cloud/storage/directory/remove-dir/index.js +9 -0
- package/node/@google-cloud/storage/file/copy/index.d.ts +21 -10
- package/node/@google-cloud/storage/file/copy/index.js +2 -2
- package/node/@google-cloud/storage/file/download/index.d.ts +2 -2
- package/node/@google-cloud/storage/file/download/index.js +2 -2
- package/node/@google-cloud/storage/file/exists/index.js +2 -2
- package/node/@google-cloud/storage/file/generate-signed-url/index.d.ts +2 -2
- package/node/@google-cloud/storage/file/generate-signed-url/index.js +2 -2
- package/node/@google-cloud/storage/file/get-metadata/index.d.ts +2 -2
- package/node/@google-cloud/storage/file/get-metadata/index.js +2 -2
- package/node/@google-cloud/storage/file/get-permissions/index.d.ts +2 -2
- package/node/@google-cloud/storage/file/get-permissions/index.js +2 -2
- package/node/@google-cloud/storage/file/index.d.ts +3 -2
- package/node/@google-cloud/storage/file/index.js +26 -22
- package/node/@google-cloud/storage/file/move/index.d.ts +24 -12
- package/node/@google-cloud/storage/file/move/index.js +2 -2
- package/node/@google-cloud/storage/file/remove/index.d.ts +24 -0
- package/node/@google-cloud/storage/file/remove/index.js +9 -0
- package/node/@google-cloud/storage/file/revoke-signed-urls/index.d.ts +6 -6
- package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +5 -5
- package/node/@google-cloud/storage/file/stat/index.d.ts +25 -0
- package/node/@google-cloud/storage/file/stat/index.js +9 -0
- package/node/@google-cloud/storage/file/update-metadata/index.d.ts +3 -3
- package/node/@google-cloud/storage/file/update-metadata/index.js +2 -2
- package/node/@google-cloud/storage/file/upload/index.d.ts +5 -6
- package/node/@google-cloud/storage/file/upload/index.js +2 -2
- package/node/@google-cloud/storage/index.d.ts +2 -1
- package/node/@google-cloud/storage/index.js +25 -17
- package/node/cloud-storage/clients/index.d.ts +13 -0
- package/node/cloud-storage/clients/index.js +13 -0
- package/node/cloud-storage/index.d.ts +2 -4
- package/node/cloud-storage/index.js +60 -24
- package/node/cloud-storage/operations/copy-dir/index.d.ts +15 -0
- package/node/cloud-storage/operations/copy-dir/index.js +14 -0
- package/node/cloud-storage/operations/copy-file/index.d.ts +15 -0
- package/node/cloud-storage/operations/copy-file/index.js +14 -0
- package/node/cloud-storage/operations/download-file/index.d.ts +16 -0
- package/node/cloud-storage/operations/download-file/index.js +14 -0
- package/node/cloud-storage/operations/exists-file/index.d.ts +13 -0
- package/node/cloud-storage/operations/exists-file/index.js +14 -0
- package/node/cloud-storage/operations/index.d.ts +12 -3
- package/node/cloud-storage/operations/index.js +91 -19
- package/node/cloud-storage/operations/list-dir/index.d.ts +13 -0
- package/node/cloud-storage/operations/list-dir/index.js +14 -0
- package/node/cloud-storage/operations/move-dir/index.d.ts +15 -0
- package/node/cloud-storage/operations/move-dir/index.js +14 -0
- package/node/cloud-storage/operations/move-file/index.d.ts +15 -0
- package/node/cloud-storage/operations/move-file/index.js +14 -0
- package/node/cloud-storage/operations/remove-dir/index.d.ts +15 -0
- package/node/cloud-storage/operations/remove-dir/index.js +14 -0
- package/node/cloud-storage/operations/remove-file/index.d.ts +15 -0
- package/node/cloud-storage/operations/remove-file/index.js +14 -0
- package/node/cloud-storage/operations/stat-file/index.d.ts +15 -0
- package/node/cloud-storage/operations/stat-file/index.js +14 -0
- package/node/cloud-storage/operations/upload-file/index.d.ts +16 -0
- package/node/cloud-storage/operations/upload-file/index.js +14 -0
- package/node/encryption/@aes-256-gcm/buffer/index.js +3 -3
- package/node/encryption/@aes-256-gcm/index.js +4 -4
- package/node/encryption/@aes-256-gcm/uint8-array/index.js +2 -2
- package/node/encryption/index.js +7 -7
- package/node/encryption/key/index.js +2 -2
- package/node/files/index.js +4 -4
- package/node/files/is-in-directory/index.js +1 -1
- package/node/files/read-write/index.js +1 -1
- package/node/files/subpaths/index.js +1 -1
- package/node/ftps/directory/copy-dir/index.d.ts +28 -0
- package/node/ftps/directory/copy-dir/index.js +9 -0
- package/node/ftps/directory/index.d.ts +5 -0
- package/node/ftps/directory/index.js +22 -0
- package/node/ftps/directory/list/index.d.ts +12 -0
- package/node/ftps/directory/list/index.js +9 -0
- package/node/ftps/directory/move-dir/index.d.ts +26 -0
- package/node/ftps/directory/move-dir/index.js +9 -0
- package/node/ftps/directory/remove-dir/index.d.ts +25 -0
- package/node/ftps/directory/remove-dir/index.js +9 -0
- package/node/ftps/file/copy/index.d.ts +28 -0
- package/node/ftps/file/copy/index.js +9 -0
- package/node/ftps/file/download/index.d.ts +2 -2
- package/node/ftps/file/download/index.js +2 -2
- package/node/ftps/file/exists/index.d.ts +21 -0
- package/node/ftps/file/exists/index.js +9 -0
- package/node/ftps/file/index.d.ts +6 -1
- package/node/ftps/file/index.js +25 -5
- package/node/ftps/file/move/index.d.ts +38 -0
- package/node/ftps/file/move/index.js +9 -0
- package/node/ftps/file/remove/index.d.ts +20 -0
- package/node/ftps/file/remove/index.js +9 -0
- package/node/ftps/file/stat/index.d.ts +17 -0
- package/node/ftps/file/stat/index.js +9 -0
- package/node/ftps/file/upload/index.d.ts +3 -3
- package/node/ftps/file/upload/index.js +2 -2
- package/node/ftps/index.d.ts +2 -1
- package/node/ftps/index.js +17 -4
- package/node/images/format/index.js +3 -3
- package/node/images/index.js +38 -38
- package/node/images/prepare/index.js +38 -38
- package/node/images/transform/_utils/color-schema/index.js +3 -3
- package/node/images/transform/_utils/operation-names/index.js +1 -1
- package/node/images/transform/_utils/positions/index.js +3 -3
- package/node/images/transform/blur/index.js +3 -3
- package/node/images/transform/brighten/index.js +3 -3
- package/node/images/transform/compose/index.js +5 -5
- package/node/images/transform/extend/index.js +4 -4
- package/node/images/transform/extract/index.js +3 -3
- package/node/images/transform/flatten/index.js +4 -4
- package/node/images/transform/flip/index.js +3 -3
- package/node/images/transform/flop/index.js +3 -3
- package/node/images/transform/frame/backgrounds/create-line-background/index.d.ts +2 -2
- package/node/images/transform/frame/backgrounds/create-line-background/index.js +3 -3
- package/node/images/transform/frame/backgrounds/create-tile-background/index.d.ts +2 -2
- package/node/images/transform/frame/backgrounds/create-tile-background/index.js +3 -3
- package/node/images/transform/frame/index.js +7 -7
- package/node/images/transform/hue-rotate/index.js +3 -3
- package/node/images/transform/index.js +36 -36
- package/node/images/transform/lighten/index.js +3 -3
- package/node/images/transform/lineate-levels/index.js +3 -3
- package/node/images/transform/modulate/index.js +3 -3
- package/node/images/transform/normalize/index.js +3 -3
- package/node/images/transform/operations/_utils/compose/index.js +1 -1
- package/node/images/transform/operations/_utils/frame/backgrounds/create-line-background/index.js +5 -5
- package/node/images/transform/operations/_utils/frame/backgrounds/create-tile-background/index.js +1 -1
- package/node/images/transform/operations/_utils/frame/create-color-palette/index.js +6 -6
- package/node/images/transform/operations/_utils/frame/extract-colors-from-image/index.js +1 -1
- package/node/images/transform/operations/_utils/frame/index.js +10 -10
- package/node/images/transform/operations/_utils/positions/index.js +1 -1
- package/node/images/transform/operations/_utils/scale/index.js +1 -1
- package/node/images/transform/resize/index.js +4 -4
- package/node/images/transform/rotate/index.js +3 -3
- package/node/images/transform/saturate/index.js +3 -3
- package/node/images/transform/scale/index.js +4 -4
- package/node/process/index.js +1 -1
- package/node/process/on-exit/index.js +1 -1
- package/node/sftp/directory/copy-dir/index.d.ts +28 -0
- package/node/sftp/directory/copy-dir/index.js +9 -0
- package/node/sftp/directory/index.d.ts +5 -0
- package/node/sftp/directory/index.js +22 -0
- package/node/sftp/directory/list/index.d.ts +12 -0
- package/node/sftp/directory/list/index.js +9 -0
- package/node/sftp/directory/move-dir/index.d.ts +26 -0
- package/node/sftp/directory/move-dir/index.js +9 -0
- package/node/sftp/directory/remove-dir/index.d.ts +25 -0
- package/node/sftp/directory/remove-dir/index.js +9 -0
- package/node/sftp/file/copy/index.d.ts +28 -0
- package/node/sftp/file/copy/index.js +9 -0
- package/node/sftp/file/download/index.d.ts +2 -2
- package/node/sftp/file/download/index.js +2 -2
- package/node/sftp/file/exists/index.d.ts +21 -0
- package/node/sftp/file/exists/index.js +9 -0
- package/node/sftp/file/index.d.ts +6 -1
- package/node/sftp/file/index.js +25 -5
- package/node/sftp/file/move/index.d.ts +38 -0
- package/node/sftp/file/move/index.js +9 -0
- package/node/sftp/file/remove/index.d.ts +20 -0
- package/node/sftp/file/remove/index.js +9 -0
- package/node/sftp/file/stat/index.d.ts +18 -0
- package/node/sftp/file/stat/index.js +9 -0
- package/node/sftp/file/upload/index.d.ts +3 -3
- package/node/sftp/file/upload/index.js +2 -2
- package/node/sftp/index.d.ts +2 -1
- package/node/sftp/index.js +17 -4
- package/package.json +3 -2
@@ -1,1283 +1,7 @@
|
|
1
|
-
import
|
2
|
-
__commonJS,
|
3
|
-
__toESM
|
4
|
-
} from "../../chunks/chunk-NZLE2WMY.js";
|
5
|
-
|
6
|
-
// node_modules/cssfilter/lib/default.js
|
7
|
-
var require_default = __commonJS({
|
8
|
-
"node_modules/cssfilter/lib/default.js"(exports) {
|
9
|
-
function getDefaultWhiteList() {
|
10
|
-
var whiteList = {};
|
11
|
-
whiteList["align-content"] = false;
|
12
|
-
whiteList["align-items"] = false;
|
13
|
-
whiteList["align-self"] = false;
|
14
|
-
whiteList["alignment-adjust"] = false;
|
15
|
-
whiteList["alignment-baseline"] = false;
|
16
|
-
whiteList["all"] = false;
|
17
|
-
whiteList["anchor-point"] = false;
|
18
|
-
whiteList["animation"] = false;
|
19
|
-
whiteList["animation-delay"] = false;
|
20
|
-
whiteList["animation-direction"] = false;
|
21
|
-
whiteList["animation-duration"] = false;
|
22
|
-
whiteList["animation-fill-mode"] = false;
|
23
|
-
whiteList["animation-iteration-count"] = false;
|
24
|
-
whiteList["animation-name"] = false;
|
25
|
-
whiteList["animation-play-state"] = false;
|
26
|
-
whiteList["animation-timing-function"] = false;
|
27
|
-
whiteList["azimuth"] = false;
|
28
|
-
whiteList["backface-visibility"] = false;
|
29
|
-
whiteList["background"] = true;
|
30
|
-
whiteList["background-attachment"] = true;
|
31
|
-
whiteList["background-clip"] = true;
|
32
|
-
whiteList["background-color"] = true;
|
33
|
-
whiteList["background-image"] = true;
|
34
|
-
whiteList["background-origin"] = true;
|
35
|
-
whiteList["background-position"] = true;
|
36
|
-
whiteList["background-repeat"] = true;
|
37
|
-
whiteList["background-size"] = true;
|
38
|
-
whiteList["baseline-shift"] = false;
|
39
|
-
whiteList["binding"] = false;
|
40
|
-
whiteList["bleed"] = false;
|
41
|
-
whiteList["bookmark-label"] = false;
|
42
|
-
whiteList["bookmark-level"] = false;
|
43
|
-
whiteList["bookmark-state"] = false;
|
44
|
-
whiteList["border"] = true;
|
45
|
-
whiteList["border-bottom"] = true;
|
46
|
-
whiteList["border-bottom-color"] = true;
|
47
|
-
whiteList["border-bottom-left-radius"] = true;
|
48
|
-
whiteList["border-bottom-right-radius"] = true;
|
49
|
-
whiteList["border-bottom-style"] = true;
|
50
|
-
whiteList["border-bottom-width"] = true;
|
51
|
-
whiteList["border-collapse"] = true;
|
52
|
-
whiteList["border-color"] = true;
|
53
|
-
whiteList["border-image"] = true;
|
54
|
-
whiteList["border-image-outset"] = true;
|
55
|
-
whiteList["border-image-repeat"] = true;
|
56
|
-
whiteList["border-image-slice"] = true;
|
57
|
-
whiteList["border-image-source"] = true;
|
58
|
-
whiteList["border-image-width"] = true;
|
59
|
-
whiteList["border-left"] = true;
|
60
|
-
whiteList["border-left-color"] = true;
|
61
|
-
whiteList["border-left-style"] = true;
|
62
|
-
whiteList["border-left-width"] = true;
|
63
|
-
whiteList["border-radius"] = true;
|
64
|
-
whiteList["border-right"] = true;
|
65
|
-
whiteList["border-right-color"] = true;
|
66
|
-
whiteList["border-right-style"] = true;
|
67
|
-
whiteList["border-right-width"] = true;
|
68
|
-
whiteList["border-spacing"] = true;
|
69
|
-
whiteList["border-style"] = true;
|
70
|
-
whiteList["border-top"] = true;
|
71
|
-
whiteList["border-top-color"] = true;
|
72
|
-
whiteList["border-top-left-radius"] = true;
|
73
|
-
whiteList["border-top-right-radius"] = true;
|
74
|
-
whiteList["border-top-style"] = true;
|
75
|
-
whiteList["border-top-width"] = true;
|
76
|
-
whiteList["border-width"] = true;
|
77
|
-
whiteList["bottom"] = false;
|
78
|
-
whiteList["box-decoration-break"] = true;
|
79
|
-
whiteList["box-shadow"] = true;
|
80
|
-
whiteList["box-sizing"] = true;
|
81
|
-
whiteList["box-snap"] = true;
|
82
|
-
whiteList["box-suppress"] = true;
|
83
|
-
whiteList["break-after"] = true;
|
84
|
-
whiteList["break-before"] = true;
|
85
|
-
whiteList["break-inside"] = true;
|
86
|
-
whiteList["caption-side"] = false;
|
87
|
-
whiteList["chains"] = false;
|
88
|
-
whiteList["clear"] = true;
|
89
|
-
whiteList["clip"] = false;
|
90
|
-
whiteList["clip-path"] = false;
|
91
|
-
whiteList["clip-rule"] = false;
|
92
|
-
whiteList["color"] = true;
|
93
|
-
whiteList["color-interpolation-filters"] = true;
|
94
|
-
whiteList["column-count"] = false;
|
95
|
-
whiteList["column-fill"] = false;
|
96
|
-
whiteList["column-gap"] = false;
|
97
|
-
whiteList["column-rule"] = false;
|
98
|
-
whiteList["column-rule-color"] = false;
|
99
|
-
whiteList["column-rule-style"] = false;
|
100
|
-
whiteList["column-rule-width"] = false;
|
101
|
-
whiteList["column-span"] = false;
|
102
|
-
whiteList["column-width"] = false;
|
103
|
-
whiteList["columns"] = false;
|
104
|
-
whiteList["contain"] = false;
|
105
|
-
whiteList["content"] = false;
|
106
|
-
whiteList["counter-increment"] = false;
|
107
|
-
whiteList["counter-reset"] = false;
|
108
|
-
whiteList["counter-set"] = false;
|
109
|
-
whiteList["crop"] = false;
|
110
|
-
whiteList["cue"] = false;
|
111
|
-
whiteList["cue-after"] = false;
|
112
|
-
whiteList["cue-before"] = false;
|
113
|
-
whiteList["cursor"] = false;
|
114
|
-
whiteList["direction"] = false;
|
115
|
-
whiteList["display"] = true;
|
116
|
-
whiteList["display-inside"] = true;
|
117
|
-
whiteList["display-list"] = true;
|
118
|
-
whiteList["display-outside"] = true;
|
119
|
-
whiteList["dominant-baseline"] = false;
|
120
|
-
whiteList["elevation"] = false;
|
121
|
-
whiteList["empty-cells"] = false;
|
122
|
-
whiteList["filter"] = false;
|
123
|
-
whiteList["flex"] = false;
|
124
|
-
whiteList["flex-basis"] = false;
|
125
|
-
whiteList["flex-direction"] = false;
|
126
|
-
whiteList["flex-flow"] = false;
|
127
|
-
whiteList["flex-grow"] = false;
|
128
|
-
whiteList["flex-shrink"] = false;
|
129
|
-
whiteList["flex-wrap"] = false;
|
130
|
-
whiteList["float"] = false;
|
131
|
-
whiteList["float-offset"] = false;
|
132
|
-
whiteList["flood-color"] = false;
|
133
|
-
whiteList["flood-opacity"] = false;
|
134
|
-
whiteList["flow-from"] = false;
|
135
|
-
whiteList["flow-into"] = false;
|
136
|
-
whiteList["font"] = true;
|
137
|
-
whiteList["font-family"] = true;
|
138
|
-
whiteList["font-feature-settings"] = true;
|
139
|
-
whiteList["font-kerning"] = true;
|
140
|
-
whiteList["font-language-override"] = true;
|
141
|
-
whiteList["font-size"] = true;
|
142
|
-
whiteList["font-size-adjust"] = true;
|
143
|
-
whiteList["font-stretch"] = true;
|
144
|
-
whiteList["font-style"] = true;
|
145
|
-
whiteList["font-synthesis"] = true;
|
146
|
-
whiteList["font-variant"] = true;
|
147
|
-
whiteList["font-variant-alternates"] = true;
|
148
|
-
whiteList["font-variant-caps"] = true;
|
149
|
-
whiteList["font-variant-east-asian"] = true;
|
150
|
-
whiteList["font-variant-ligatures"] = true;
|
151
|
-
whiteList["font-variant-numeric"] = true;
|
152
|
-
whiteList["font-variant-position"] = true;
|
153
|
-
whiteList["font-weight"] = true;
|
154
|
-
whiteList["grid"] = false;
|
155
|
-
whiteList["grid-area"] = false;
|
156
|
-
whiteList["grid-auto-columns"] = false;
|
157
|
-
whiteList["grid-auto-flow"] = false;
|
158
|
-
whiteList["grid-auto-rows"] = false;
|
159
|
-
whiteList["grid-column"] = false;
|
160
|
-
whiteList["grid-column-end"] = false;
|
161
|
-
whiteList["grid-column-start"] = false;
|
162
|
-
whiteList["grid-row"] = false;
|
163
|
-
whiteList["grid-row-end"] = false;
|
164
|
-
whiteList["grid-row-start"] = false;
|
165
|
-
whiteList["grid-template"] = false;
|
166
|
-
whiteList["grid-template-areas"] = false;
|
167
|
-
whiteList["grid-template-columns"] = false;
|
168
|
-
whiteList["grid-template-rows"] = false;
|
169
|
-
whiteList["hanging-punctuation"] = false;
|
170
|
-
whiteList["height"] = true;
|
171
|
-
whiteList["hyphens"] = false;
|
172
|
-
whiteList["icon"] = false;
|
173
|
-
whiteList["image-orientation"] = false;
|
174
|
-
whiteList["image-resolution"] = false;
|
175
|
-
whiteList["ime-mode"] = false;
|
176
|
-
whiteList["initial-letters"] = false;
|
177
|
-
whiteList["inline-box-align"] = false;
|
178
|
-
whiteList["justify-content"] = false;
|
179
|
-
whiteList["justify-items"] = false;
|
180
|
-
whiteList["justify-self"] = false;
|
181
|
-
whiteList["left"] = false;
|
182
|
-
whiteList["letter-spacing"] = true;
|
183
|
-
whiteList["lighting-color"] = true;
|
184
|
-
whiteList["line-box-contain"] = false;
|
185
|
-
whiteList["line-break"] = false;
|
186
|
-
whiteList["line-grid"] = false;
|
187
|
-
whiteList["line-height"] = false;
|
188
|
-
whiteList["line-snap"] = false;
|
189
|
-
whiteList["line-stacking"] = false;
|
190
|
-
whiteList["line-stacking-ruby"] = false;
|
191
|
-
whiteList["line-stacking-shift"] = false;
|
192
|
-
whiteList["line-stacking-strategy"] = false;
|
193
|
-
whiteList["list-style"] = true;
|
194
|
-
whiteList["list-style-image"] = true;
|
195
|
-
whiteList["list-style-position"] = true;
|
196
|
-
whiteList["list-style-type"] = true;
|
197
|
-
whiteList["margin"] = true;
|
198
|
-
whiteList["margin-bottom"] = true;
|
199
|
-
whiteList["margin-left"] = true;
|
200
|
-
whiteList["margin-right"] = true;
|
201
|
-
whiteList["margin-top"] = true;
|
202
|
-
whiteList["marker-offset"] = false;
|
203
|
-
whiteList["marker-side"] = false;
|
204
|
-
whiteList["marks"] = false;
|
205
|
-
whiteList["mask"] = false;
|
206
|
-
whiteList["mask-box"] = false;
|
207
|
-
whiteList["mask-box-outset"] = false;
|
208
|
-
whiteList["mask-box-repeat"] = false;
|
209
|
-
whiteList["mask-box-slice"] = false;
|
210
|
-
whiteList["mask-box-source"] = false;
|
211
|
-
whiteList["mask-box-width"] = false;
|
212
|
-
whiteList["mask-clip"] = false;
|
213
|
-
whiteList["mask-image"] = false;
|
214
|
-
whiteList["mask-origin"] = false;
|
215
|
-
whiteList["mask-position"] = false;
|
216
|
-
whiteList["mask-repeat"] = false;
|
217
|
-
whiteList["mask-size"] = false;
|
218
|
-
whiteList["mask-source-type"] = false;
|
219
|
-
whiteList["mask-type"] = false;
|
220
|
-
whiteList["max-height"] = true;
|
221
|
-
whiteList["max-lines"] = false;
|
222
|
-
whiteList["max-width"] = true;
|
223
|
-
whiteList["min-height"] = true;
|
224
|
-
whiteList["min-width"] = true;
|
225
|
-
whiteList["move-to"] = false;
|
226
|
-
whiteList["nav-down"] = false;
|
227
|
-
whiteList["nav-index"] = false;
|
228
|
-
whiteList["nav-left"] = false;
|
229
|
-
whiteList["nav-right"] = false;
|
230
|
-
whiteList["nav-up"] = false;
|
231
|
-
whiteList["object-fit"] = false;
|
232
|
-
whiteList["object-position"] = false;
|
233
|
-
whiteList["opacity"] = false;
|
234
|
-
whiteList["order"] = false;
|
235
|
-
whiteList["orphans"] = false;
|
236
|
-
whiteList["outline"] = false;
|
237
|
-
whiteList["outline-color"] = false;
|
238
|
-
whiteList["outline-offset"] = false;
|
239
|
-
whiteList["outline-style"] = false;
|
240
|
-
whiteList["outline-width"] = false;
|
241
|
-
whiteList["overflow"] = false;
|
242
|
-
whiteList["overflow-wrap"] = false;
|
243
|
-
whiteList["overflow-x"] = false;
|
244
|
-
whiteList["overflow-y"] = false;
|
245
|
-
whiteList["padding"] = true;
|
246
|
-
whiteList["padding-bottom"] = true;
|
247
|
-
whiteList["padding-left"] = true;
|
248
|
-
whiteList["padding-right"] = true;
|
249
|
-
whiteList["padding-top"] = true;
|
250
|
-
whiteList["page"] = false;
|
251
|
-
whiteList["page-break-after"] = false;
|
252
|
-
whiteList["page-break-before"] = false;
|
253
|
-
whiteList["page-break-inside"] = false;
|
254
|
-
whiteList["page-policy"] = false;
|
255
|
-
whiteList["pause"] = false;
|
256
|
-
whiteList["pause-after"] = false;
|
257
|
-
whiteList["pause-before"] = false;
|
258
|
-
whiteList["perspective"] = false;
|
259
|
-
whiteList["perspective-origin"] = false;
|
260
|
-
whiteList["pitch"] = false;
|
261
|
-
whiteList["pitch-range"] = false;
|
262
|
-
whiteList["play-during"] = false;
|
263
|
-
whiteList["position"] = false;
|
264
|
-
whiteList["presentation-level"] = false;
|
265
|
-
whiteList["quotes"] = false;
|
266
|
-
whiteList["region-fragment"] = false;
|
267
|
-
whiteList["resize"] = false;
|
268
|
-
whiteList["rest"] = false;
|
269
|
-
whiteList["rest-after"] = false;
|
270
|
-
whiteList["rest-before"] = false;
|
271
|
-
whiteList["richness"] = false;
|
272
|
-
whiteList["right"] = false;
|
273
|
-
whiteList["rotation"] = false;
|
274
|
-
whiteList["rotation-point"] = false;
|
275
|
-
whiteList["ruby-align"] = false;
|
276
|
-
whiteList["ruby-merge"] = false;
|
277
|
-
whiteList["ruby-position"] = false;
|
278
|
-
whiteList["shape-image-threshold"] = false;
|
279
|
-
whiteList["shape-outside"] = false;
|
280
|
-
whiteList["shape-margin"] = false;
|
281
|
-
whiteList["size"] = false;
|
282
|
-
whiteList["speak"] = false;
|
283
|
-
whiteList["speak-as"] = false;
|
284
|
-
whiteList["speak-header"] = false;
|
285
|
-
whiteList["speak-numeral"] = false;
|
286
|
-
whiteList["speak-punctuation"] = false;
|
287
|
-
whiteList["speech-rate"] = false;
|
288
|
-
whiteList["stress"] = false;
|
289
|
-
whiteList["string-set"] = false;
|
290
|
-
whiteList["tab-size"] = false;
|
291
|
-
whiteList["table-layout"] = false;
|
292
|
-
whiteList["text-align"] = true;
|
293
|
-
whiteList["text-align-last"] = true;
|
294
|
-
whiteList["text-combine-upright"] = true;
|
295
|
-
whiteList["text-decoration"] = true;
|
296
|
-
whiteList["text-decoration-color"] = true;
|
297
|
-
whiteList["text-decoration-line"] = true;
|
298
|
-
whiteList["text-decoration-skip"] = true;
|
299
|
-
whiteList["text-decoration-style"] = true;
|
300
|
-
whiteList["text-emphasis"] = true;
|
301
|
-
whiteList["text-emphasis-color"] = true;
|
302
|
-
whiteList["text-emphasis-position"] = true;
|
303
|
-
whiteList["text-emphasis-style"] = true;
|
304
|
-
whiteList["text-height"] = true;
|
305
|
-
whiteList["text-indent"] = true;
|
306
|
-
whiteList["text-justify"] = true;
|
307
|
-
whiteList["text-orientation"] = true;
|
308
|
-
whiteList["text-overflow"] = true;
|
309
|
-
whiteList["text-shadow"] = true;
|
310
|
-
whiteList["text-space-collapse"] = true;
|
311
|
-
whiteList["text-transform"] = true;
|
312
|
-
whiteList["text-underline-position"] = true;
|
313
|
-
whiteList["text-wrap"] = true;
|
314
|
-
whiteList["top"] = false;
|
315
|
-
whiteList["transform"] = false;
|
316
|
-
whiteList["transform-origin"] = false;
|
317
|
-
whiteList["transform-style"] = false;
|
318
|
-
whiteList["transition"] = false;
|
319
|
-
whiteList["transition-delay"] = false;
|
320
|
-
whiteList["transition-duration"] = false;
|
321
|
-
whiteList["transition-property"] = false;
|
322
|
-
whiteList["transition-timing-function"] = false;
|
323
|
-
whiteList["unicode-bidi"] = false;
|
324
|
-
whiteList["vertical-align"] = false;
|
325
|
-
whiteList["visibility"] = false;
|
326
|
-
whiteList["voice-balance"] = false;
|
327
|
-
whiteList["voice-duration"] = false;
|
328
|
-
whiteList["voice-family"] = false;
|
329
|
-
whiteList["voice-pitch"] = false;
|
330
|
-
whiteList["voice-range"] = false;
|
331
|
-
whiteList["voice-rate"] = false;
|
332
|
-
whiteList["voice-stress"] = false;
|
333
|
-
whiteList["voice-volume"] = false;
|
334
|
-
whiteList["volume"] = false;
|
335
|
-
whiteList["white-space"] = false;
|
336
|
-
whiteList["widows"] = false;
|
337
|
-
whiteList["width"] = true;
|
338
|
-
whiteList["will-change"] = false;
|
339
|
-
whiteList["word-break"] = true;
|
340
|
-
whiteList["word-spacing"] = true;
|
341
|
-
whiteList["word-wrap"] = true;
|
342
|
-
whiteList["wrap-flow"] = false;
|
343
|
-
whiteList["wrap-through"] = false;
|
344
|
-
whiteList["writing-mode"] = false;
|
345
|
-
whiteList["z-index"] = false;
|
346
|
-
return whiteList;
|
347
|
-
}
|
348
|
-
function onAttr(name, value, options) {
|
349
|
-
}
|
350
|
-
function onIgnoreAttr(name, value, options) {
|
351
|
-
}
|
352
|
-
var REGEXP_URL_JAVASCRIPT = /javascript\s*\:/img;
|
353
|
-
function safeAttrValue(name, value) {
|
354
|
-
if (REGEXP_URL_JAVASCRIPT.test(value)) return "";
|
355
|
-
return value;
|
356
|
-
}
|
357
|
-
exports.whiteList = getDefaultWhiteList();
|
358
|
-
exports.getDefaultWhiteList = getDefaultWhiteList;
|
359
|
-
exports.onAttr = onAttr;
|
360
|
-
exports.onIgnoreAttr = onIgnoreAttr;
|
361
|
-
exports.safeAttrValue = safeAttrValue;
|
362
|
-
}
|
363
|
-
});
|
364
|
-
|
365
|
-
// node_modules/cssfilter/lib/util.js
|
366
|
-
var require_util = __commonJS({
|
367
|
-
"node_modules/cssfilter/lib/util.js"(exports, module) {
|
368
|
-
module.exports = {
|
369
|
-
indexOf: function(arr, item) {
|
370
|
-
var i, j;
|
371
|
-
if (Array.prototype.indexOf) {
|
372
|
-
return arr.indexOf(item);
|
373
|
-
}
|
374
|
-
for (i = 0, j = arr.length; i < j; i++) {
|
375
|
-
if (arr[i] === item) {
|
376
|
-
return i;
|
377
|
-
}
|
378
|
-
}
|
379
|
-
return -1;
|
380
|
-
},
|
381
|
-
forEach: function(arr, fn, scope) {
|
382
|
-
var i, j;
|
383
|
-
if (Array.prototype.forEach) {
|
384
|
-
return arr.forEach(fn, scope);
|
385
|
-
}
|
386
|
-
for (i = 0, j = arr.length; i < j; i++) {
|
387
|
-
fn.call(scope, arr[i], i, arr);
|
388
|
-
}
|
389
|
-
},
|
390
|
-
trim: function(str) {
|
391
|
-
if (String.prototype.trim) {
|
392
|
-
return str.trim();
|
393
|
-
}
|
394
|
-
return str.replace(/(^\s*)|(\s*$)/g, "");
|
395
|
-
},
|
396
|
-
trimRight: function(str) {
|
397
|
-
if (String.prototype.trimRight) {
|
398
|
-
return str.trimRight();
|
399
|
-
}
|
400
|
-
return str.replace(/(\s*$)/g, "");
|
401
|
-
}
|
402
|
-
};
|
403
|
-
}
|
404
|
-
});
|
405
|
-
|
406
|
-
// node_modules/cssfilter/lib/parser.js
|
407
|
-
var require_parser = __commonJS({
|
408
|
-
"node_modules/cssfilter/lib/parser.js"(exports, module) {
|
409
|
-
var _ = require_util();
|
410
|
-
function parseStyle(css, onAttr) {
|
411
|
-
css = _.trimRight(css);
|
412
|
-
if (css[css.length - 1] !== ";") css += ";";
|
413
|
-
var cssLength = css.length;
|
414
|
-
var isParenthesisOpen = false;
|
415
|
-
var lastPos = 0;
|
416
|
-
var i = 0;
|
417
|
-
var retCSS = "";
|
418
|
-
function addNewAttr() {
|
419
|
-
if (!isParenthesisOpen) {
|
420
|
-
var source = _.trim(css.slice(lastPos, i));
|
421
|
-
var j2 = source.indexOf(":");
|
422
|
-
if (j2 !== -1) {
|
423
|
-
var name = _.trim(source.slice(0, j2));
|
424
|
-
var value = _.trim(source.slice(j2 + 1));
|
425
|
-
if (name) {
|
426
|
-
var ret = onAttr(lastPos, retCSS.length, name, value, source);
|
427
|
-
if (ret) retCSS += ret + "; ";
|
428
|
-
}
|
429
|
-
}
|
430
|
-
}
|
431
|
-
lastPos = i + 1;
|
432
|
-
}
|
433
|
-
for (; i < cssLength; i++) {
|
434
|
-
var c = css[i];
|
435
|
-
if (c === "/" && css[i + 1] === "*") {
|
436
|
-
var j = css.indexOf("*/", i + 2);
|
437
|
-
if (j === -1) break;
|
438
|
-
i = j + 1;
|
439
|
-
lastPos = i + 1;
|
440
|
-
isParenthesisOpen = false;
|
441
|
-
} else if (c === "(") {
|
442
|
-
isParenthesisOpen = true;
|
443
|
-
} else if (c === ")") {
|
444
|
-
isParenthesisOpen = false;
|
445
|
-
} else if (c === ";") {
|
446
|
-
if (isParenthesisOpen) {
|
447
|
-
} else {
|
448
|
-
addNewAttr();
|
449
|
-
}
|
450
|
-
} else if (c === "\n") {
|
451
|
-
addNewAttr();
|
452
|
-
}
|
453
|
-
}
|
454
|
-
return _.trim(retCSS);
|
455
|
-
}
|
456
|
-
module.exports = parseStyle;
|
457
|
-
}
|
458
|
-
});
|
459
|
-
|
460
|
-
// node_modules/cssfilter/lib/css.js
|
461
|
-
var require_css = __commonJS({
|
462
|
-
"node_modules/cssfilter/lib/css.js"(exports, module) {
|
463
|
-
var DEFAULT = require_default();
|
464
|
-
var parseStyle = require_parser();
|
465
|
-
var _ = require_util();
|
466
|
-
function isNull(obj) {
|
467
|
-
return obj === void 0 || obj === null;
|
468
|
-
}
|
469
|
-
function shallowCopyObject(obj) {
|
470
|
-
var ret = {};
|
471
|
-
for (var i in obj) {
|
472
|
-
ret[i] = obj[i];
|
473
|
-
}
|
474
|
-
return ret;
|
475
|
-
}
|
476
|
-
function FilterCSS(options) {
|
477
|
-
options = shallowCopyObject(options || {});
|
478
|
-
options.whiteList = options.whiteList || DEFAULT.whiteList;
|
479
|
-
options.onAttr = options.onAttr || DEFAULT.onAttr;
|
480
|
-
options.onIgnoreAttr = options.onIgnoreAttr || DEFAULT.onIgnoreAttr;
|
481
|
-
options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;
|
482
|
-
this.options = options;
|
483
|
-
}
|
484
|
-
FilterCSS.prototype.process = function(css) {
|
485
|
-
css = css || "";
|
486
|
-
css = css.toString();
|
487
|
-
if (!css) return "";
|
488
|
-
var me = this;
|
489
|
-
var options = me.options;
|
490
|
-
var whiteList = options.whiteList;
|
491
|
-
var onAttr = options.onAttr;
|
492
|
-
var onIgnoreAttr = options.onIgnoreAttr;
|
493
|
-
var safeAttrValue = options.safeAttrValue;
|
494
|
-
var retCSS = parseStyle(css, function(sourcePosition, position, name, value, source) {
|
495
|
-
var check = whiteList[name];
|
496
|
-
var isWhite = false;
|
497
|
-
if (check === true) isWhite = check;
|
498
|
-
else if (typeof check === "function") isWhite = check(value);
|
499
|
-
else if (check instanceof RegExp) isWhite = check.test(value);
|
500
|
-
if (isWhite !== true) isWhite = false;
|
501
|
-
value = safeAttrValue(name, value);
|
502
|
-
if (!value) return;
|
503
|
-
var opts = {
|
504
|
-
position,
|
505
|
-
sourcePosition,
|
506
|
-
source,
|
507
|
-
isWhite
|
508
|
-
};
|
509
|
-
if (isWhite) {
|
510
|
-
var ret = onAttr(name, value, opts);
|
511
|
-
if (isNull(ret)) {
|
512
|
-
return name + ":" + value;
|
513
|
-
} else {
|
514
|
-
return ret;
|
515
|
-
}
|
516
|
-
} else {
|
517
|
-
var ret = onIgnoreAttr(name, value, opts);
|
518
|
-
if (!isNull(ret)) {
|
519
|
-
return ret;
|
520
|
-
}
|
521
|
-
}
|
522
|
-
});
|
523
|
-
return retCSS;
|
524
|
-
};
|
525
|
-
module.exports = FilterCSS;
|
526
|
-
}
|
527
|
-
});
|
528
|
-
|
529
|
-
// node_modules/cssfilter/lib/index.js
|
530
|
-
var require_lib = __commonJS({
|
531
|
-
"node_modules/cssfilter/lib/index.js"(exports, module) {
|
532
|
-
var DEFAULT = require_default();
|
533
|
-
var FilterCSS = require_css();
|
534
|
-
function filterCSS(html, options) {
|
535
|
-
var xss2 = new FilterCSS(options);
|
536
|
-
return xss2.process(html);
|
537
|
-
}
|
538
|
-
exports = module.exports = filterCSS;
|
539
|
-
exports.FilterCSS = FilterCSS;
|
540
|
-
for (i in DEFAULT) exports[i] = DEFAULT[i];
|
541
|
-
var i;
|
542
|
-
if (typeof window !== "undefined") {
|
543
|
-
window.filterCSS = module.exports;
|
544
|
-
}
|
545
|
-
}
|
546
|
-
});
|
547
|
-
|
548
|
-
// node_modules/xss/lib/util.js
|
549
|
-
var require_util2 = __commonJS({
|
550
|
-
"node_modules/xss/lib/util.js"(exports, module) {
|
551
|
-
module.exports = {
|
552
|
-
indexOf: function(arr, item) {
|
553
|
-
var i, j;
|
554
|
-
if (Array.prototype.indexOf) {
|
555
|
-
return arr.indexOf(item);
|
556
|
-
}
|
557
|
-
for (i = 0, j = arr.length; i < j; i++) {
|
558
|
-
if (arr[i] === item) {
|
559
|
-
return i;
|
560
|
-
}
|
561
|
-
}
|
562
|
-
return -1;
|
563
|
-
},
|
564
|
-
forEach: function(arr, fn, scope) {
|
565
|
-
var i, j;
|
566
|
-
if (Array.prototype.forEach) {
|
567
|
-
return arr.forEach(fn, scope);
|
568
|
-
}
|
569
|
-
for (i = 0, j = arr.length; i < j; i++) {
|
570
|
-
fn.call(scope, arr[i], i, arr);
|
571
|
-
}
|
572
|
-
},
|
573
|
-
trim: function(str) {
|
574
|
-
if (String.prototype.trim) {
|
575
|
-
return str.trim();
|
576
|
-
}
|
577
|
-
return str.replace(/(^\s*)|(\s*$)/g, "");
|
578
|
-
},
|
579
|
-
spaceIndex: function(str) {
|
580
|
-
var reg = /\s|\n|\t/;
|
581
|
-
var match = reg.exec(str);
|
582
|
-
return match ? match.index : -1;
|
583
|
-
}
|
584
|
-
};
|
585
|
-
}
|
586
|
-
});
|
587
|
-
|
588
|
-
// node_modules/xss/lib/default.js
|
589
|
-
var require_default2 = __commonJS({
|
590
|
-
"node_modules/xss/lib/default.js"(exports) {
|
591
|
-
var FilterCSS = require_lib().FilterCSS;
|
592
|
-
var getDefaultCSSWhiteList = require_lib().getDefaultWhiteList;
|
593
|
-
var _ = require_util2();
|
594
|
-
function getDefaultWhiteList() {
|
595
|
-
return {
|
596
|
-
a: ["target", "href", "title"],
|
597
|
-
abbr: ["title"],
|
598
|
-
address: [],
|
599
|
-
area: ["shape", "coords", "href", "alt"],
|
600
|
-
article: [],
|
601
|
-
aside: [],
|
602
|
-
audio: [
|
603
|
-
"autoplay",
|
604
|
-
"controls",
|
605
|
-
"crossorigin",
|
606
|
-
"loop",
|
607
|
-
"muted",
|
608
|
-
"preload",
|
609
|
-
"src"
|
610
|
-
],
|
611
|
-
b: [],
|
612
|
-
bdi: ["dir"],
|
613
|
-
bdo: ["dir"],
|
614
|
-
big: [],
|
615
|
-
blockquote: ["cite"],
|
616
|
-
br: [],
|
617
|
-
caption: [],
|
618
|
-
center: [],
|
619
|
-
cite: [],
|
620
|
-
code: [],
|
621
|
-
col: ["align", "valign", "span", "width"],
|
622
|
-
colgroup: ["align", "valign", "span", "width"],
|
623
|
-
dd: [],
|
624
|
-
del: ["datetime"],
|
625
|
-
details: ["open"],
|
626
|
-
div: [],
|
627
|
-
dl: [],
|
628
|
-
dt: [],
|
629
|
-
em: [],
|
630
|
-
figcaption: [],
|
631
|
-
figure: [],
|
632
|
-
font: ["color", "size", "face"],
|
633
|
-
footer: [],
|
634
|
-
h1: [],
|
635
|
-
h2: [],
|
636
|
-
h3: [],
|
637
|
-
h4: [],
|
638
|
-
h5: [],
|
639
|
-
h6: [],
|
640
|
-
header: [],
|
641
|
-
hr: [],
|
642
|
-
i: [],
|
643
|
-
img: ["src", "alt", "title", "width", "height", "loading"],
|
644
|
-
ins: ["datetime"],
|
645
|
-
kbd: [],
|
646
|
-
li: [],
|
647
|
-
mark: [],
|
648
|
-
nav: [],
|
649
|
-
ol: [],
|
650
|
-
p: [],
|
651
|
-
pre: [],
|
652
|
-
s: [],
|
653
|
-
section: [],
|
654
|
-
small: [],
|
655
|
-
span: [],
|
656
|
-
sub: [],
|
657
|
-
summary: [],
|
658
|
-
sup: [],
|
659
|
-
strong: [],
|
660
|
-
strike: [],
|
661
|
-
table: ["width", "border", "align", "valign"],
|
662
|
-
tbody: ["align", "valign"],
|
663
|
-
td: ["width", "rowspan", "colspan", "align", "valign"],
|
664
|
-
tfoot: ["align", "valign"],
|
665
|
-
th: ["width", "rowspan", "colspan", "align", "valign"],
|
666
|
-
thead: ["align", "valign"],
|
667
|
-
tr: ["rowspan", "align", "valign"],
|
668
|
-
tt: [],
|
669
|
-
u: [],
|
670
|
-
ul: [],
|
671
|
-
video: [
|
672
|
-
"autoplay",
|
673
|
-
"controls",
|
674
|
-
"crossorigin",
|
675
|
-
"loop",
|
676
|
-
"muted",
|
677
|
-
"playsinline",
|
678
|
-
"poster",
|
679
|
-
"preload",
|
680
|
-
"src",
|
681
|
-
"height",
|
682
|
-
"width"
|
683
|
-
]
|
684
|
-
};
|
685
|
-
}
|
686
|
-
var defaultCSSFilter = new FilterCSS();
|
687
|
-
function onTag(tag, html, options) {
|
688
|
-
}
|
689
|
-
function onIgnoreTag(tag, html, options) {
|
690
|
-
}
|
691
|
-
function onTagAttr(tag, name, value) {
|
692
|
-
}
|
693
|
-
function onIgnoreTagAttr(tag, name, value) {
|
694
|
-
}
|
695
|
-
function escapeHtml(html) {
|
696
|
-
return html.replace(REGEXP_LT, "<").replace(REGEXP_GT, ">");
|
697
|
-
}
|
698
|
-
function safeAttrValue(tag, name, value, cssFilter) {
|
699
|
-
value = friendlyAttrValue(value);
|
700
|
-
if (name === "href" || name === "src") {
|
701
|
-
value = _.trim(value);
|
702
|
-
if (value === "#") return "#";
|
703
|
-
if (!(value.substr(0, 7) === "http://" || value.substr(0, 8) === "https://" || value.substr(0, 7) === "mailto:" || value.substr(0, 4) === "tel:" || value.substr(0, 11) === "data:image/" || value.substr(0, 6) === "ftp://" || value.substr(0, 2) === "./" || value.substr(0, 3) === "../" || value[0] === "#" || value[0] === "/")) {
|
704
|
-
return "";
|
705
|
-
}
|
706
|
-
} else if (name === "background") {
|
707
|
-
REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
|
708
|
-
if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
|
709
|
-
return "";
|
710
|
-
}
|
711
|
-
} else if (name === "style") {
|
712
|
-
REGEXP_DEFAULT_ON_TAG_ATTR_7.lastIndex = 0;
|
713
|
-
if (REGEXP_DEFAULT_ON_TAG_ATTR_7.test(value)) {
|
714
|
-
return "";
|
715
|
-
}
|
716
|
-
REGEXP_DEFAULT_ON_TAG_ATTR_8.lastIndex = 0;
|
717
|
-
if (REGEXP_DEFAULT_ON_TAG_ATTR_8.test(value)) {
|
718
|
-
REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
|
719
|
-
if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
|
720
|
-
return "";
|
721
|
-
}
|
722
|
-
}
|
723
|
-
if (cssFilter !== false) {
|
724
|
-
cssFilter = cssFilter || defaultCSSFilter;
|
725
|
-
value = cssFilter.process(value);
|
726
|
-
}
|
727
|
-
}
|
728
|
-
value = escapeAttrValue(value);
|
729
|
-
return value;
|
730
|
-
}
|
731
|
-
var REGEXP_LT = /</g;
|
732
|
-
var REGEXP_GT = />/g;
|
733
|
-
var REGEXP_QUOTE = /"/g;
|
734
|
-
var REGEXP_QUOTE_2 = /"/g;
|
735
|
-
var REGEXP_ATTR_VALUE_1 = /&#([a-zA-Z0-9]*);?/gim;
|
736
|
-
var REGEXP_ATTR_VALUE_COLON = /:?/gim;
|
737
|
-
var REGEXP_ATTR_VALUE_NEWLINE = /&newline;?/gim;
|
738
|
-
var REGEXP_DEFAULT_ON_TAG_ATTR_4 = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi;
|
739
|
-
var REGEXP_DEFAULT_ON_TAG_ATTR_7 = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi;
|
740
|
-
var REGEXP_DEFAULT_ON_TAG_ATTR_8 = /u\s*r\s*l\s*\(.*/gi;
|
741
|
-
function escapeQuote(str) {
|
742
|
-
return str.replace(REGEXP_QUOTE, """);
|
743
|
-
}
|
744
|
-
function unescapeQuote(str) {
|
745
|
-
return str.replace(REGEXP_QUOTE_2, '"');
|
746
|
-
}
|
747
|
-
function escapeHtmlEntities(str) {
|
748
|
-
return str.replace(REGEXP_ATTR_VALUE_1, function replaceUnicode(str2, code) {
|
749
|
-
return code[0] === "x" || code[0] === "X" ? String.fromCharCode(parseInt(code.substr(1), 16)) : String.fromCharCode(parseInt(code, 10));
|
750
|
-
});
|
751
|
-
}
|
752
|
-
function escapeDangerHtml5Entities(str) {
|
753
|
-
return str.replace(REGEXP_ATTR_VALUE_COLON, ":").replace(REGEXP_ATTR_VALUE_NEWLINE, " ");
|
754
|
-
}
|
755
|
-
function clearNonPrintableCharacter(str) {
|
756
|
-
var str2 = "";
|
757
|
-
for (var i = 0, len = str.length; i < len; i++) {
|
758
|
-
str2 += str.charCodeAt(i) < 32 ? " " : str.charAt(i);
|
759
|
-
}
|
760
|
-
return _.trim(str2);
|
761
|
-
}
|
762
|
-
function friendlyAttrValue(str) {
|
763
|
-
str = unescapeQuote(str);
|
764
|
-
str = escapeHtmlEntities(str);
|
765
|
-
str = escapeDangerHtml5Entities(str);
|
766
|
-
str = clearNonPrintableCharacter(str);
|
767
|
-
return str;
|
768
|
-
}
|
769
|
-
function escapeAttrValue(str) {
|
770
|
-
str = escapeQuote(str);
|
771
|
-
str = escapeHtml(str);
|
772
|
-
return str;
|
773
|
-
}
|
774
|
-
function onIgnoreTagStripAll() {
|
775
|
-
return "";
|
776
|
-
}
|
777
|
-
function StripTagBody(tags, next) {
|
778
|
-
if (typeof next !== "function") {
|
779
|
-
next = function() {
|
780
|
-
};
|
781
|
-
}
|
782
|
-
var isRemoveAllTag = !Array.isArray(tags);
|
783
|
-
function isRemoveTag(tag) {
|
784
|
-
if (isRemoveAllTag) return true;
|
785
|
-
return _.indexOf(tags, tag) !== -1;
|
786
|
-
}
|
787
|
-
var removeList = [];
|
788
|
-
var posStart = false;
|
789
|
-
return {
|
790
|
-
onIgnoreTag: function(tag, html, options) {
|
791
|
-
if (isRemoveTag(tag)) {
|
792
|
-
if (options.isClosing) {
|
793
|
-
var ret = "[/removed]";
|
794
|
-
var end = options.position + ret.length;
|
795
|
-
removeList.push([
|
796
|
-
posStart !== false ? posStart : options.position,
|
797
|
-
end
|
798
|
-
]);
|
799
|
-
posStart = false;
|
800
|
-
return ret;
|
801
|
-
} else {
|
802
|
-
if (!posStart) {
|
803
|
-
posStart = options.position;
|
804
|
-
}
|
805
|
-
return "[removed]";
|
806
|
-
}
|
807
|
-
} else {
|
808
|
-
return next(tag, html, options);
|
809
|
-
}
|
810
|
-
},
|
811
|
-
remove: function(html) {
|
812
|
-
var rethtml = "";
|
813
|
-
var lastPos = 0;
|
814
|
-
_.forEach(removeList, function(pos) {
|
815
|
-
rethtml += html.slice(lastPos, pos[0]);
|
816
|
-
lastPos = pos[1];
|
817
|
-
});
|
818
|
-
rethtml += html.slice(lastPos);
|
819
|
-
return rethtml;
|
820
|
-
}
|
821
|
-
};
|
822
|
-
}
|
823
|
-
function stripCommentTag(html) {
|
824
|
-
var retHtml = "";
|
825
|
-
var lastPos = 0;
|
826
|
-
while (lastPos < html.length) {
|
827
|
-
var i = html.indexOf("<!--", lastPos);
|
828
|
-
if (i === -1) {
|
829
|
-
retHtml += html.slice(lastPos);
|
830
|
-
break;
|
831
|
-
}
|
832
|
-
retHtml += html.slice(lastPos, i);
|
833
|
-
var j = html.indexOf("-->", i);
|
834
|
-
if (j === -1) {
|
835
|
-
break;
|
836
|
-
}
|
837
|
-
lastPos = j + 3;
|
838
|
-
}
|
839
|
-
return retHtml;
|
840
|
-
}
|
841
|
-
function stripBlankChar(html) {
|
842
|
-
var chars = html.split("");
|
843
|
-
chars = chars.filter(function(char) {
|
844
|
-
var c = char.charCodeAt(0);
|
845
|
-
if (c === 127) return false;
|
846
|
-
if (c <= 31) {
|
847
|
-
if (c === 10 || c === 13) return true;
|
848
|
-
return false;
|
849
|
-
}
|
850
|
-
return true;
|
851
|
-
});
|
852
|
-
return chars.join("");
|
853
|
-
}
|
854
|
-
exports.whiteList = getDefaultWhiteList();
|
855
|
-
exports.getDefaultWhiteList = getDefaultWhiteList;
|
856
|
-
exports.onTag = onTag;
|
857
|
-
exports.onIgnoreTag = onIgnoreTag;
|
858
|
-
exports.onTagAttr = onTagAttr;
|
859
|
-
exports.onIgnoreTagAttr = onIgnoreTagAttr;
|
860
|
-
exports.safeAttrValue = safeAttrValue;
|
861
|
-
exports.escapeHtml = escapeHtml;
|
862
|
-
exports.escapeQuote = escapeQuote;
|
863
|
-
exports.unescapeQuote = unescapeQuote;
|
864
|
-
exports.escapeHtmlEntities = escapeHtmlEntities;
|
865
|
-
exports.escapeDangerHtml5Entities = escapeDangerHtml5Entities;
|
866
|
-
exports.clearNonPrintableCharacter = clearNonPrintableCharacter;
|
867
|
-
exports.friendlyAttrValue = friendlyAttrValue;
|
868
|
-
exports.escapeAttrValue = escapeAttrValue;
|
869
|
-
exports.onIgnoreTagStripAll = onIgnoreTagStripAll;
|
870
|
-
exports.StripTagBody = StripTagBody;
|
871
|
-
exports.stripCommentTag = stripCommentTag;
|
872
|
-
exports.stripBlankChar = stripBlankChar;
|
873
|
-
exports.attributeWrapSign = '"';
|
874
|
-
exports.cssFilter = defaultCSSFilter;
|
875
|
-
exports.getDefaultCSSWhiteList = getDefaultCSSWhiteList;
|
876
|
-
}
|
877
|
-
});
|
878
|
-
|
879
|
-
// node_modules/xss/lib/parser.js
|
880
|
-
var require_parser2 = __commonJS({
|
881
|
-
"node_modules/xss/lib/parser.js"(exports) {
|
882
|
-
var _ = require_util2();
|
883
|
-
function getTagName(html) {
|
884
|
-
var i = _.spaceIndex(html);
|
885
|
-
var tagName;
|
886
|
-
if (i === -1) {
|
887
|
-
tagName = html.slice(1, -1);
|
888
|
-
} else {
|
889
|
-
tagName = html.slice(1, i + 1);
|
890
|
-
}
|
891
|
-
tagName = _.trim(tagName).toLowerCase();
|
892
|
-
if (tagName.slice(0, 1) === "/") tagName = tagName.slice(1);
|
893
|
-
if (tagName.slice(-1) === "/") tagName = tagName.slice(0, -1);
|
894
|
-
return tagName;
|
895
|
-
}
|
896
|
-
function isClosing(html) {
|
897
|
-
return html.slice(0, 2) === "</";
|
898
|
-
}
|
899
|
-
function parseTag(html, onTag, escapeHtml) {
|
900
|
-
"use strict";
|
901
|
-
var rethtml = "";
|
902
|
-
var lastPos = 0;
|
903
|
-
var tagStart = false;
|
904
|
-
var quoteStart = false;
|
905
|
-
var currentPos = 0;
|
906
|
-
var len = html.length;
|
907
|
-
var currentTagName = "";
|
908
|
-
var currentHtml = "";
|
909
|
-
chariterator: for (currentPos = 0; currentPos < len; currentPos++) {
|
910
|
-
var c = html.charAt(currentPos);
|
911
|
-
if (tagStart === false) {
|
912
|
-
if (c === "<") {
|
913
|
-
tagStart = currentPos;
|
914
|
-
continue;
|
915
|
-
}
|
916
|
-
} else {
|
917
|
-
if (quoteStart === false) {
|
918
|
-
if (c === "<") {
|
919
|
-
rethtml += escapeHtml(html.slice(lastPos, currentPos));
|
920
|
-
tagStart = currentPos;
|
921
|
-
lastPos = currentPos;
|
922
|
-
continue;
|
923
|
-
}
|
924
|
-
if (c === ">" || currentPos === len - 1) {
|
925
|
-
rethtml += escapeHtml(html.slice(lastPos, tagStart));
|
926
|
-
currentHtml = html.slice(tagStart, currentPos + 1);
|
927
|
-
currentTagName = getTagName(currentHtml);
|
928
|
-
rethtml += onTag(
|
929
|
-
tagStart,
|
930
|
-
rethtml.length,
|
931
|
-
currentTagName,
|
932
|
-
currentHtml,
|
933
|
-
isClosing(currentHtml)
|
934
|
-
);
|
935
|
-
lastPos = currentPos + 1;
|
936
|
-
tagStart = false;
|
937
|
-
continue;
|
938
|
-
}
|
939
|
-
if (c === '"' || c === "'") {
|
940
|
-
var i = 1;
|
941
|
-
var ic = html.charAt(currentPos - i);
|
942
|
-
while (ic.trim() === "" || ic === "=") {
|
943
|
-
if (ic === "=") {
|
944
|
-
quoteStart = c;
|
945
|
-
continue chariterator;
|
946
|
-
}
|
947
|
-
ic = html.charAt(currentPos - ++i);
|
948
|
-
}
|
949
|
-
}
|
950
|
-
} else {
|
951
|
-
if (c === quoteStart) {
|
952
|
-
quoteStart = false;
|
953
|
-
continue;
|
954
|
-
}
|
955
|
-
}
|
956
|
-
}
|
957
|
-
}
|
958
|
-
if (lastPos < len) {
|
959
|
-
rethtml += escapeHtml(html.substr(lastPos));
|
960
|
-
}
|
961
|
-
return rethtml;
|
962
|
-
}
|
963
|
-
var REGEXP_ILLEGAL_ATTR_NAME = /[^a-zA-Z0-9\\_:.-]/gim;
|
964
|
-
function parseAttr(html, onAttr) {
|
965
|
-
"use strict";
|
966
|
-
var lastPos = 0;
|
967
|
-
var lastMarkPos = 0;
|
968
|
-
var retAttrs = [];
|
969
|
-
var tmpName = false;
|
970
|
-
var len = html.length;
|
971
|
-
function addAttr(name, value) {
|
972
|
-
name = _.trim(name);
|
973
|
-
name = name.replace(REGEXP_ILLEGAL_ATTR_NAME, "").toLowerCase();
|
974
|
-
if (name.length < 1) return;
|
975
|
-
var ret = onAttr(name, value || "");
|
976
|
-
if (ret) retAttrs.push(ret);
|
977
|
-
}
|
978
|
-
for (var i = 0; i < len; i++) {
|
979
|
-
var c = html.charAt(i);
|
980
|
-
var v, j;
|
981
|
-
if (tmpName === false && c === "=") {
|
982
|
-
tmpName = html.slice(lastPos, i);
|
983
|
-
lastPos = i + 1;
|
984
|
-
lastMarkPos = html.charAt(lastPos) === '"' || html.charAt(lastPos) === "'" ? lastPos : findNextQuotationMark(html, i + 1);
|
985
|
-
continue;
|
986
|
-
}
|
987
|
-
if (tmpName !== false) {
|
988
|
-
if (i === lastMarkPos) {
|
989
|
-
j = html.indexOf(c, i + 1);
|
990
|
-
if (j === -1) {
|
991
|
-
break;
|
992
|
-
} else {
|
993
|
-
v = _.trim(html.slice(lastMarkPos + 1, j));
|
994
|
-
addAttr(tmpName, v);
|
995
|
-
tmpName = false;
|
996
|
-
i = j;
|
997
|
-
lastPos = i + 1;
|
998
|
-
continue;
|
999
|
-
}
|
1000
|
-
}
|
1001
|
-
}
|
1002
|
-
if (/\s|\n|\t/.test(c)) {
|
1003
|
-
html = html.replace(/\s|\n|\t/g, " ");
|
1004
|
-
if (tmpName === false) {
|
1005
|
-
j = findNextEqual(html, i);
|
1006
|
-
if (j === -1) {
|
1007
|
-
v = _.trim(html.slice(lastPos, i));
|
1008
|
-
addAttr(v);
|
1009
|
-
tmpName = false;
|
1010
|
-
lastPos = i + 1;
|
1011
|
-
continue;
|
1012
|
-
} else {
|
1013
|
-
i = j - 1;
|
1014
|
-
continue;
|
1015
|
-
}
|
1016
|
-
} else {
|
1017
|
-
j = findBeforeEqual(html, i - 1);
|
1018
|
-
if (j === -1) {
|
1019
|
-
v = _.trim(html.slice(lastPos, i));
|
1020
|
-
v = stripQuoteWrap(v);
|
1021
|
-
addAttr(tmpName, v);
|
1022
|
-
tmpName = false;
|
1023
|
-
lastPos = i + 1;
|
1024
|
-
continue;
|
1025
|
-
} else {
|
1026
|
-
continue;
|
1027
|
-
}
|
1028
|
-
}
|
1029
|
-
}
|
1030
|
-
}
|
1031
|
-
if (lastPos < html.length) {
|
1032
|
-
if (tmpName === false) {
|
1033
|
-
addAttr(html.slice(lastPos));
|
1034
|
-
} else {
|
1035
|
-
addAttr(tmpName, stripQuoteWrap(_.trim(html.slice(lastPos))));
|
1036
|
-
}
|
1037
|
-
}
|
1038
|
-
return _.trim(retAttrs.join(" "));
|
1039
|
-
}
|
1040
|
-
function findNextEqual(str, i) {
|
1041
|
-
for (; i < str.length; i++) {
|
1042
|
-
var c = str[i];
|
1043
|
-
if (c === " ") continue;
|
1044
|
-
if (c === "=") return i;
|
1045
|
-
return -1;
|
1046
|
-
}
|
1047
|
-
}
|
1048
|
-
function findNextQuotationMark(str, i) {
|
1049
|
-
for (; i < str.length; i++) {
|
1050
|
-
var c = str[i];
|
1051
|
-
if (c === " ") continue;
|
1052
|
-
if (c === "'" || c === '"') return i;
|
1053
|
-
return -1;
|
1054
|
-
}
|
1055
|
-
}
|
1056
|
-
function findBeforeEqual(str, i) {
|
1057
|
-
for (; i > 0; i--) {
|
1058
|
-
var c = str[i];
|
1059
|
-
if (c === " ") continue;
|
1060
|
-
if (c === "=") return i;
|
1061
|
-
return -1;
|
1062
|
-
}
|
1063
|
-
}
|
1064
|
-
function isQuoteWrapString(text) {
|
1065
|
-
if (text[0] === '"' && text[text.length - 1] === '"' || text[0] === "'" && text[text.length - 1] === "'") {
|
1066
|
-
return true;
|
1067
|
-
} else {
|
1068
|
-
return false;
|
1069
|
-
}
|
1070
|
-
}
|
1071
|
-
function stripQuoteWrap(text) {
|
1072
|
-
if (isQuoteWrapString(text)) {
|
1073
|
-
return text.substr(1, text.length - 2);
|
1074
|
-
} else {
|
1075
|
-
return text;
|
1076
|
-
}
|
1077
|
-
}
|
1078
|
-
exports.parseTag = parseTag;
|
1079
|
-
exports.parseAttr = parseAttr;
|
1080
|
-
}
|
1081
|
-
});
|
1082
|
-
|
1083
|
-
// node_modules/xss/lib/xss.js
|
1084
|
-
var require_xss = __commonJS({
|
1085
|
-
"node_modules/xss/lib/xss.js"(exports, module) {
|
1086
|
-
var FilterCSS = require_lib().FilterCSS;
|
1087
|
-
var DEFAULT = require_default2();
|
1088
|
-
var parser = require_parser2();
|
1089
|
-
var parseTag = parser.parseTag;
|
1090
|
-
var parseAttr = parser.parseAttr;
|
1091
|
-
var _ = require_util2();
|
1092
|
-
function isNull(obj) {
|
1093
|
-
return obj === void 0 || obj === null;
|
1094
|
-
}
|
1095
|
-
function getAttrs(html) {
|
1096
|
-
var i = _.spaceIndex(html);
|
1097
|
-
if (i === -1) {
|
1098
|
-
return {
|
1099
|
-
html: "",
|
1100
|
-
closing: html[html.length - 2] === "/"
|
1101
|
-
};
|
1102
|
-
}
|
1103
|
-
html = _.trim(html.slice(i + 1, -1));
|
1104
|
-
var isClosing = html[html.length - 1] === "/";
|
1105
|
-
if (isClosing) html = _.trim(html.slice(0, -1));
|
1106
|
-
return {
|
1107
|
-
html,
|
1108
|
-
closing: isClosing
|
1109
|
-
};
|
1110
|
-
}
|
1111
|
-
function shallowCopyObject(obj) {
|
1112
|
-
var ret = {};
|
1113
|
-
for (var i in obj) {
|
1114
|
-
ret[i] = obj[i];
|
1115
|
-
}
|
1116
|
-
return ret;
|
1117
|
-
}
|
1118
|
-
function keysToLowerCase(obj) {
|
1119
|
-
var ret = {};
|
1120
|
-
for (var i in obj) {
|
1121
|
-
if (Array.isArray(obj[i])) {
|
1122
|
-
ret[i.toLowerCase()] = obj[i].map(function(item) {
|
1123
|
-
return item.toLowerCase();
|
1124
|
-
});
|
1125
|
-
} else {
|
1126
|
-
ret[i.toLowerCase()] = obj[i];
|
1127
|
-
}
|
1128
|
-
}
|
1129
|
-
return ret;
|
1130
|
-
}
|
1131
|
-
function FilterXSS(options) {
|
1132
|
-
options = shallowCopyObject(options || {});
|
1133
|
-
if (options.stripIgnoreTag) {
|
1134
|
-
if (options.onIgnoreTag) {
|
1135
|
-
console.error(
|
1136
|
-
'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'
|
1137
|
-
);
|
1138
|
-
}
|
1139
|
-
options.onIgnoreTag = DEFAULT.onIgnoreTagStripAll;
|
1140
|
-
}
|
1141
|
-
if (options.whiteList || options.allowList) {
|
1142
|
-
options.whiteList = keysToLowerCase(options.whiteList || options.allowList);
|
1143
|
-
} else {
|
1144
|
-
options.whiteList = DEFAULT.whiteList;
|
1145
|
-
}
|
1146
|
-
this.attributeWrapSign = options.singleQuotedAttributeValue === true ? "'" : DEFAULT.attributeWrapSign;
|
1147
|
-
options.onTag = options.onTag || DEFAULT.onTag;
|
1148
|
-
options.onTagAttr = options.onTagAttr || DEFAULT.onTagAttr;
|
1149
|
-
options.onIgnoreTag = options.onIgnoreTag || DEFAULT.onIgnoreTag;
|
1150
|
-
options.onIgnoreTagAttr = options.onIgnoreTagAttr || DEFAULT.onIgnoreTagAttr;
|
1151
|
-
options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;
|
1152
|
-
options.escapeHtml = options.escapeHtml || DEFAULT.escapeHtml;
|
1153
|
-
this.options = options;
|
1154
|
-
if (options.css === false) {
|
1155
|
-
this.cssFilter = false;
|
1156
|
-
} else {
|
1157
|
-
options.css = options.css || {};
|
1158
|
-
this.cssFilter = new FilterCSS(options.css);
|
1159
|
-
}
|
1160
|
-
}
|
1161
|
-
FilterXSS.prototype.process = function(html) {
|
1162
|
-
html = html || "";
|
1163
|
-
html = html.toString();
|
1164
|
-
if (!html) return "";
|
1165
|
-
var me = this;
|
1166
|
-
var options = me.options;
|
1167
|
-
var whiteList = options.whiteList;
|
1168
|
-
var onTag = options.onTag;
|
1169
|
-
var onIgnoreTag = options.onIgnoreTag;
|
1170
|
-
var onTagAttr = options.onTagAttr;
|
1171
|
-
var onIgnoreTagAttr = options.onIgnoreTagAttr;
|
1172
|
-
var safeAttrValue = options.safeAttrValue;
|
1173
|
-
var escapeHtml = options.escapeHtml;
|
1174
|
-
var attributeWrapSign = me.attributeWrapSign;
|
1175
|
-
var cssFilter = me.cssFilter;
|
1176
|
-
if (options.stripBlankChar) {
|
1177
|
-
html = DEFAULT.stripBlankChar(html);
|
1178
|
-
}
|
1179
|
-
if (!options.allowCommentTag) {
|
1180
|
-
html = DEFAULT.stripCommentTag(html);
|
1181
|
-
}
|
1182
|
-
var stripIgnoreTagBody = false;
|
1183
|
-
if (options.stripIgnoreTagBody) {
|
1184
|
-
stripIgnoreTagBody = DEFAULT.StripTagBody(
|
1185
|
-
options.stripIgnoreTagBody,
|
1186
|
-
onIgnoreTag
|
1187
|
-
);
|
1188
|
-
onIgnoreTag = stripIgnoreTagBody.onIgnoreTag;
|
1189
|
-
}
|
1190
|
-
var retHtml = parseTag(
|
1191
|
-
html,
|
1192
|
-
function(sourcePosition, position, tag, html2, isClosing) {
|
1193
|
-
var info = {
|
1194
|
-
sourcePosition,
|
1195
|
-
position,
|
1196
|
-
isClosing,
|
1197
|
-
isWhite: Object.prototype.hasOwnProperty.call(whiteList, tag)
|
1198
|
-
};
|
1199
|
-
var ret = onTag(tag, html2, info);
|
1200
|
-
if (!isNull(ret)) return ret;
|
1201
|
-
if (info.isWhite) {
|
1202
|
-
if (info.isClosing) {
|
1203
|
-
return "</" + tag + ">";
|
1204
|
-
}
|
1205
|
-
var attrs = getAttrs(html2);
|
1206
|
-
var whiteAttrList = whiteList[tag];
|
1207
|
-
var attrsHtml = parseAttr(attrs.html, function(name, value) {
|
1208
|
-
var isWhiteAttr = _.indexOf(whiteAttrList, name) !== -1;
|
1209
|
-
var ret2 = onTagAttr(tag, name, value, isWhiteAttr);
|
1210
|
-
if (!isNull(ret2)) return ret2;
|
1211
|
-
if (isWhiteAttr) {
|
1212
|
-
value = safeAttrValue(tag, name, value, cssFilter);
|
1213
|
-
if (value) {
|
1214
|
-
return name + "=" + attributeWrapSign + value + attributeWrapSign;
|
1215
|
-
} else {
|
1216
|
-
return name;
|
1217
|
-
}
|
1218
|
-
} else {
|
1219
|
-
ret2 = onIgnoreTagAttr(tag, name, value, isWhiteAttr);
|
1220
|
-
if (!isNull(ret2)) return ret2;
|
1221
|
-
return;
|
1222
|
-
}
|
1223
|
-
});
|
1224
|
-
html2 = "<" + tag;
|
1225
|
-
if (attrsHtml) html2 += " " + attrsHtml;
|
1226
|
-
if (attrs.closing) html2 += " /";
|
1227
|
-
html2 += ">";
|
1228
|
-
return html2;
|
1229
|
-
} else {
|
1230
|
-
ret = onIgnoreTag(tag, html2, info);
|
1231
|
-
if (!isNull(ret)) return ret;
|
1232
|
-
return escapeHtml(html2);
|
1233
|
-
}
|
1234
|
-
},
|
1235
|
-
escapeHtml
|
1236
|
-
);
|
1237
|
-
if (stripIgnoreTagBody) {
|
1238
|
-
retHtml = stripIgnoreTagBody.remove(retHtml);
|
1239
|
-
}
|
1240
|
-
return retHtml;
|
1241
|
-
};
|
1242
|
-
module.exports = FilterXSS;
|
1243
|
-
}
|
1244
|
-
});
|
1245
|
-
|
1246
|
-
// node_modules/xss/lib/index.js
|
1247
|
-
var require_lib2 = __commonJS({
|
1248
|
-
"node_modules/xss/lib/index.js"(exports, module) {
|
1249
|
-
var DEFAULT = require_default2();
|
1250
|
-
var parser = require_parser2();
|
1251
|
-
var FilterXSS = require_xss();
|
1252
|
-
function filterXSS(html, options) {
|
1253
|
-
var xss2 = new FilterXSS(options);
|
1254
|
-
return xss2.process(html);
|
1255
|
-
}
|
1256
|
-
exports = module.exports = filterXSS;
|
1257
|
-
exports.filterXSS = filterXSS;
|
1258
|
-
exports.FilterXSS = FilterXSS;
|
1259
|
-
(function() {
|
1260
|
-
for (var i in DEFAULT) {
|
1261
|
-
exports[i] = DEFAULT[i];
|
1262
|
-
}
|
1263
|
-
for (var j in parser) {
|
1264
|
-
exports[j] = parser[j];
|
1265
|
-
}
|
1266
|
-
})();
|
1267
|
-
if (typeof window !== "undefined") {
|
1268
|
-
window.filterXSS = module.exports;
|
1269
|
-
}
|
1270
|
-
function isWorkerEnv() {
|
1271
|
-
return typeof self !== "undefined" && typeof DedicatedWorkerGlobalScope !== "undefined" && self instanceof DedicatedWorkerGlobalScope;
|
1272
|
-
}
|
1273
|
-
if (isWorkerEnv()) {
|
1274
|
-
self.filterXSS = module.exports;
|
1275
|
-
}
|
1276
|
-
}
|
1277
|
-
});
|
1
|
+
import "../../chunks/chunk-WSFCRVEQ.js";
|
1278
2
|
|
1279
3
|
// src/agnostic/sanitization/index.ts
|
1280
|
-
|
4
|
+
import xss from "xss";
|
1281
5
|
function sanitizeFileName(input, maxLength = 255) {
|
1282
6
|
input = input.normalize("NFKC").replace(/[<>:"/\\|?*\x00-\x1F]/g, "").trim().replace(/\s+/g, " ").replace(/\.+/g, ".").replace(/^\.+|\.+$/g, "");
|
1283
7
|
if (input.length > maxLength) return null;
|
@@ -1289,7 +13,7 @@ function sanitizePath(targetPath) {
|
|
1289
13
|
return sanitized.startsWith("/") ? sanitized : `/${sanitized}`;
|
1290
14
|
}
|
1291
15
|
var sanitizeUserInput = (input, seen = /* @__PURE__ */ new WeakSet()) => {
|
1292
|
-
if (typeof input === "string") return (
|
16
|
+
if (typeof input === "string") return xss(input);
|
1293
17
|
if (Array.isArray(input)) {
|
1294
18
|
if (seen.has(input)) return input;
|
1295
19
|
seen.add(input);
|
@@ -1299,7 +23,7 @@ var sanitizeUserInput = (input, seen = /* @__PURE__ */ new WeakSet()) => {
|
|
1299
23
|
if (seen.has(input)) return input;
|
1300
24
|
seen.add(input);
|
1301
25
|
const entries = Object.entries(input);
|
1302
|
-
const sanitizedEntries = entries.map(([key, value]) => [(
|
26
|
+
const sanitizedEntries = entries.map(([key, value]) => [xss(key), sanitizeUserInput(value, seen)]);
|
1303
27
|
return Object.fromEntries(sanitizedEntries);
|
1304
28
|
}
|
1305
29
|
return input;
|