dune-react 0.0.1
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/README.md +49 -0
- package/dist/_virtual/_commonjsHelpers.js +8 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/sha1.js +4 -0
- package/dist/_virtual/util.js +4 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/ui-custom/background.d.ts +8 -0
- package/dist/components/ui-custom/background.js +51 -0
- package/dist/components/ui-custom/cover.d.ts +17 -0
- package/dist/components/ui-custom/cover.js +231 -0
- package/dist/components/ui-custom/sparkles.d.ts +13 -0
- package/dist/components/ui-custom/sparkles.js +418 -0
- package/dist/components/ui-custom/spotlight-new.d.ts +13 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +40 -0
- package/dist/node_modules/.pnpm/@fluid-tailwind_tailwind-merge@0.0.3_tailwind-merge@3.3.1/node_modules/@fluid-tailwind/tailwind-merge/dist/index.js +50 -0
- package/dist/node_modules/.pnpm/@tsparticles_basic@3.9.1/node_modules/@tsparticles/basic/browser/index.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Canvas.js +510 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Container.js +463 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Engine.js +293 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Particle.js +355 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Particles.js +326 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Retina.js +37 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Constants.js +105 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/EventListeners.js +309 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/ExternalInteractorBase.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/InteractionManager.js +64 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/ParticlesInteractorBase.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Point.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/QuadTree.js +60 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Ranges.js +57 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Vectors.js +120 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/AnimationStatus.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/MoveDirection.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/OutModeDirection.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/RotateDirection.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/InteractivityDetect.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/AnimationMode.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/CollisionMode.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/LimitMode.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/OutMode.js +11 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/PixelMode.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/ResponsiveMode.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/ThemeMode.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/AlterType.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/DestroyType.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/DivType.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/EasingType.js +33 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/EventType.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/GradientType.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/InteractorType.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/ParticleOutType.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/StartValueType.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/AnimatableColor.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/AnimationOptions.js +60 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Background/Background.js +39 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMask.js +27 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ColorAnimation.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/FullScreen/FullScreen.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/HslAnimation.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ClickEvent.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/DivEvent.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Events.js +33 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/HoverEvent.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Parallax.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ResizeEvent.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Interactivity.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Modes/Modes.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ManualParticle.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Options.js +163 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/OptionsColor.js +29 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/Collisions.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsAbsorb.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsOverlap.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Effect/Effect.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Move.js +95 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAngle.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAttract.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveCenter.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveGravity.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrail.js +26 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrailFill.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/OutModes.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Path/MovePath.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Spin.js +26 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesDensity.js +27 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumber.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumberLimit.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/Opacity.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ParticlesOptions.js +97 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shadow.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shape/Shape.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/Size.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/SizeAnimation.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Stroke.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ZIndex/ZIndex.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Responsive.js +31 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/Theme.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/ThemeDefault.js +26 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ValueWithRandom.js +46 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Types/RangeType.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/CanvasUtils.js +168 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/ColorUtils.js +316 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/EventDispatcher.js +47 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/NumberUtils.js +135 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/OptionsUtils.js +15 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/TypeUtils.js +26 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/Utils.js +475 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/index.js +82 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/init.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Attractor.js +81 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Options/Classes/Attract.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Utils.js +50 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Bouncer.js +45 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Options/Classes/Bounce.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Utils.js +47 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Bubbler.js +274 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Enums.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/Bubble.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/BubbleBase.js +39 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/BubbleDiv.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Utils.js +13 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Connector.js +59 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Options/Classes/Connect.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Options/Classes/ConnectLinks.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Utils.js +44 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Grabber.js +76 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Options/Classes/Grab.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Options/Classes/GrabLinks.js +29 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Utils.js +19 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-pause@3.9.1/node_modules/@tsparticles/interaction-external-pause/browser/Pauser.js +32 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-pause@3.9.1/node_modules/@tsparticles/interaction-external-pause/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/Options/Classes/Push.js +34 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/Pusher.js +47 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/Options/Classes/Remove.js +19 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/Remover.js +39 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/Repulse.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/RepulseBase.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/RepulseDiv.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Repulser.js +160 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/Options/Classes/Slow.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/Slower.js +53 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-attract@3.9.1/node_modules/@tsparticles/interaction-particles-attract/browser/Attractor.js +37 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-attract@3.9.1/node_modules/@tsparticles/interaction-particles-attract/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Absorb.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Bounce.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Collider.js +41 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Destroy.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/ResolveCollision.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/CircleWarp.js +33 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/LinkInstance.js +152 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Linker.js +109 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/LinksPlugin.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/Links.js +58 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/LinksShadow.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/LinksTriangle.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Utils.js +106 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/interaction.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/plugin.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/BaseMover.js +37 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/Utils.js +128 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-parallax@3.9.1/node_modules/@tsparticles/move-parallax/browser/ParallaxMover.js +31 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-parallax@3.9.1/node_modules/@tsparticles/move-parallax/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-easing-quad@3.9.1/node_modules/@tsparticles/plugin-easing-quad/browser/index.js +11 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-hex-color@3.9.1/node_modules/@tsparticles/plugin-hex-color/browser/HexColorManager.js +43 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-hex-color@3.9.1/node_modules/@tsparticles/plugin-hex-color/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-hsl-color@3.9.1/node_modules/@tsparticles/plugin-hsl-color/browser/HslColorManager.js +46 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-hsl-color@3.9.1/node_modules/@tsparticles/plugin-hsl-color/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-rgb-color@3.9.1/node_modules/@tsparticles/plugin-rgb-color/browser/RgbColorManager.js +45 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-rgb-color@3.9.1/node_modules/@tsparticles/plugin-rgb-color/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_react@3.0.0_@tsparticles_engine@3.9.1_react-dom@18.3.1_react@18.3.1/node_modules/@tsparticles/react/dist/Particles.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_react@3.0.0_@tsparticles_engine@3.9.1_react-dom@18.3.1_react@18.3.1/node_modules/@tsparticles/react/dist/index.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/CircleDrawer.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/Utils.js +12 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/EmojiDrawer.js +103 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/Utils.js +13 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/ByteStream.js +51 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Constants.js +6 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Enums/DisposalMethod.js +14 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Types/GIFDataHeaders.js +13 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Utils.js +419 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/ImageDrawer.js +130 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/ImagePreloader.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/Options/Classes/Preload.js +33 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/Utils.js +94 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/index.js +54 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/LineDrawer.js +16 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/Utils.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/PolygonDrawer.js +27 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/PolygonDrawerBase.js +16 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/TriangleDrawer.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/Utils.js +19 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/index.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/SquareDrawer.js +16 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/Utils.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/StarDrawer.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/Utils.js +14 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_slim@3.9.1/node_modules/@tsparticles/slim/browser/index.js +56 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-color@3.9.1/node_modules/@tsparticles/updater-color/browser/ColorUpdater.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-color@3.9.1/node_modules/@tsparticles/updater-color/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/LifeUpdater.js +52 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/Life.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/LifeDelay.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/LifeDuration.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Utils.js +58 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-opacity@3.9.1/node_modules/@tsparticles/updater-opacity/browser/OpacityUpdater.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-opacity@3.9.1/node_modules/@tsparticles/updater-opacity/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js +37 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js +45 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js +110 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/Utils.js +66 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/Rotate.js +29 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/RotateAnimation.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/RotateUpdater.js +77 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-size@3.9.1/node_modules/@tsparticles/updater-size/browser/SizeUpdater.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-size@3.9.1/node_modules/@tsparticles/updater-size/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-stroke-color@3.9.1/node_modules/@tsparticles/updater-stroke-color/browser/StrokeColorUpdater.js +35 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-stroke-color@3.9.1/node_modules/@tsparticles/updater-stroke-color/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/index.js +826 -0
- package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/supported.js +242 -0
- package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/util.js +64 -0
- package/dist/node_modules/.pnpm/js-sha1@0.6.0/node_modules/js-sha1/src/sha1.js +311 -0
- package/dist/node_modules/.pnpm/nanoid@5.1.5/node_modules/nanoid/index.browser.js +22 -0
- package/dist/node_modules/.pnpm/tailwind-merge@3.3.1/node_modules/tailwind-merge/dist/bundle-mjs.js +3007 -0
- package/dist/utils/css-utils.d.ts +10 -0
- package/dist/utils/css-utils.js +17 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/storage-qetag.d.ts +22 -0
- package/dist/utils/storage-qetag.js +3 -0
- package/dist/utils/utils-api.d.ts +17 -0
- package/dist/utils/utils-api.js +31 -0
- package/dist/utils/utils-canvas.d.ts +30 -0
- package/dist/utils/utils-canvas.js +54 -0
- package/dist/utils/utils-common.d.ts +6 -0
- package/dist/utils/utils-common.js +15 -0
- package/dist/utils/utils-image.d.ts +33 -0
- package/dist/utils/utils-image.js +57 -0
- package/dist/utils/utils-random.d.ts +1 -0
- package/dist/utils/utils-random.js +6 -0
- package/dist/utils/utils-time.d.ts +49 -0
- package/dist/utils/utils-time.js +112 -0
- package/package.json +81 -0
|
@@ -0,0 +1,826 @@
|
|
|
1
|
+
import { __module as fileType } from "../../../../../_virtual/index.js";
|
|
2
|
+
import "./util.js";
|
|
3
|
+
import { s as supported } from "./supported.js";
|
|
4
|
+
import { __exports as util } from "../../../../../_virtual/util.js";
|
|
5
|
+
(function(module) {
|
|
6
|
+
const {
|
|
7
|
+
multiByteIndexOf,
|
|
8
|
+
stringToBytes,
|
|
9
|
+
readUInt64LE,
|
|
10
|
+
tarHeaderChecksumMatches,
|
|
11
|
+
uint8ArrayUtf8ByteString
|
|
12
|
+
} = util;
|
|
13
|
+
const supported$1 = supported;
|
|
14
|
+
const xpiZipFilename = stringToBytes("META-INF/mozilla.rsa");
|
|
15
|
+
const oxmlContentTypes = stringToBytes("[Content_Types].xml");
|
|
16
|
+
const oxmlRels = stringToBytes("_rels/.rels");
|
|
17
|
+
const fileType = (input) => {
|
|
18
|
+
if (!(input instanceof Uint8Array || input instanceof ArrayBuffer || Buffer.isBuffer(input))) {
|
|
19
|
+
throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof input}\``);
|
|
20
|
+
}
|
|
21
|
+
const buffer = input instanceof Uint8Array ? input : new Uint8Array(input);
|
|
22
|
+
if (!(buffer && buffer.length > 1)) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const check = (header, options) => {
|
|
26
|
+
options = {
|
|
27
|
+
offset: 0,
|
|
28
|
+
...options
|
|
29
|
+
};
|
|
30
|
+
for (let i = 0; i < header.length; i++) {
|
|
31
|
+
if (options.mask) {
|
|
32
|
+
if (header[i] !== (options.mask[i] & buffer[i + options.offset])) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
} else if (header[i] !== buffer[i + options.offset]) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
40
|
+
};
|
|
41
|
+
const checkString = (header, options) => check(stringToBytes(header), options);
|
|
42
|
+
if (check([255, 216, 255])) {
|
|
43
|
+
return {
|
|
44
|
+
ext: "jpg",
|
|
45
|
+
mime: "image/jpeg"
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (check([137, 80, 78, 71, 13, 10, 26, 10])) {
|
|
49
|
+
const startIndex = 33;
|
|
50
|
+
const firstImageDataChunkIndex = buffer.findIndex((el, i) => i >= startIndex && buffer[i] === 73 && buffer[i + 1] === 68 && buffer[i + 2] === 65 && buffer[i + 3] === 84);
|
|
51
|
+
const sliced = buffer.subarray(startIndex, firstImageDataChunkIndex);
|
|
52
|
+
if (sliced.findIndex((el, i) => sliced[i] === 97 && sliced[i + 1] === 99 && sliced[i + 2] === 84 && sliced[i + 3] === 76) >= 0) {
|
|
53
|
+
return {
|
|
54
|
+
ext: "apng",
|
|
55
|
+
mime: "image/apng"
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
ext: "png",
|
|
60
|
+
mime: "image/png"
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
if (check([71, 73, 70])) {
|
|
64
|
+
return {
|
|
65
|
+
ext: "gif",
|
|
66
|
+
mime: "image/gif"
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
if (check([87, 69, 66, 80], { offset: 8 })) {
|
|
70
|
+
return {
|
|
71
|
+
ext: "webp",
|
|
72
|
+
mime: "image/webp"
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
if (check([70, 76, 73, 70])) {
|
|
76
|
+
return {
|
|
77
|
+
ext: "flif",
|
|
78
|
+
mime: "image/flif"
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
if ((check([73, 73, 42, 0]) || check([77, 77, 0, 42])) && check([67, 82], { offset: 8 })) {
|
|
82
|
+
return {
|
|
83
|
+
ext: "cr2",
|
|
84
|
+
mime: "image/x-canon-cr2"
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
if (check([73, 73, 82, 79, 8, 0, 0, 0, 24])) {
|
|
88
|
+
return {
|
|
89
|
+
ext: "orf",
|
|
90
|
+
mime: "image/x-olympus-orf"
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
if (check([73, 73, 42, 0]) && (check([16, 251, 134, 1], { offset: 4 }) || check([8, 0, 0, 0], { offset: 4 })) && // This pattern differentiates ARW from other TIFF-ish file types:
|
|
94
|
+
check([0, 254, 0, 4, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 1], { offset: 9 })) {
|
|
95
|
+
return {
|
|
96
|
+
ext: "arw",
|
|
97
|
+
mime: "image/x-sony-arw"
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
if (check([73, 73, 42, 0, 8, 0, 0, 0]) && (check([45, 0, 254, 0], { offset: 8 }) || check([39, 0, 254, 0], { offset: 8 }))) {
|
|
101
|
+
return {
|
|
102
|
+
ext: "dng",
|
|
103
|
+
mime: "image/x-adobe-dng"
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
if (check([73, 73, 42, 0]) && check([28, 0, 254, 0], { offset: 8 })) {
|
|
107
|
+
return {
|
|
108
|
+
ext: "nef",
|
|
109
|
+
mime: "image/x-nikon-nef"
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
if (check([73, 73, 85, 0, 24, 0, 0, 0, 136, 231, 116, 216])) {
|
|
113
|
+
return {
|
|
114
|
+
ext: "rw2",
|
|
115
|
+
mime: "image/x-panasonic-rw2"
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
if (checkString("FUJIFILMCCD-RAW")) {
|
|
119
|
+
return {
|
|
120
|
+
ext: "raf",
|
|
121
|
+
mime: "image/x-fujifilm-raf"
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
if (check([73, 73, 42, 0]) || check([77, 77, 0, 42])) {
|
|
125
|
+
return {
|
|
126
|
+
ext: "tif",
|
|
127
|
+
mime: "image/tiff"
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
if (check([66, 77])) {
|
|
131
|
+
return {
|
|
132
|
+
ext: "bmp",
|
|
133
|
+
mime: "image/bmp"
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
if (check([73, 73, 188])) {
|
|
137
|
+
return {
|
|
138
|
+
ext: "jxr",
|
|
139
|
+
mime: "image/vnd.ms-photo"
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
if (check([56, 66, 80, 83])) {
|
|
143
|
+
return {
|
|
144
|
+
ext: "psd",
|
|
145
|
+
mime: "image/vnd.adobe.photoshop"
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
const zipHeader = [80, 75, 3, 4];
|
|
149
|
+
if (check(zipHeader)) {
|
|
150
|
+
if (check([109, 105, 109, 101, 116, 121, 112, 101, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47, 101, 112, 117, 98, 43, 122, 105, 112], { offset: 30 })) {
|
|
151
|
+
return {
|
|
152
|
+
ext: "epub",
|
|
153
|
+
mime: "application/epub+zip"
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
if (check(xpiZipFilename, { offset: 30 })) {
|
|
157
|
+
return {
|
|
158
|
+
ext: "xpi",
|
|
159
|
+
mime: "application/x-xpinstall"
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
if (checkString("mimetypeapplication/vnd.oasis.opendocument.text", { offset: 30 })) {
|
|
163
|
+
return {
|
|
164
|
+
ext: "odt",
|
|
165
|
+
mime: "application/vnd.oasis.opendocument.text"
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
if (checkString("mimetypeapplication/vnd.oasis.opendocument.spreadsheet", { offset: 30 })) {
|
|
169
|
+
return {
|
|
170
|
+
ext: "ods",
|
|
171
|
+
mime: "application/vnd.oasis.opendocument.spreadsheet"
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
if (checkString("mimetypeapplication/vnd.oasis.opendocument.presentation", { offset: 30 })) {
|
|
175
|
+
return {
|
|
176
|
+
ext: "odp",
|
|
177
|
+
mime: "application/vnd.oasis.opendocument.presentation"
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
let zipHeaderIndex = 0;
|
|
181
|
+
let oxmlFound = false;
|
|
182
|
+
let type;
|
|
183
|
+
do {
|
|
184
|
+
const offset = zipHeaderIndex + 30;
|
|
185
|
+
if (!oxmlFound) {
|
|
186
|
+
oxmlFound = check(oxmlContentTypes, { offset }) || check(oxmlRels, { offset });
|
|
187
|
+
}
|
|
188
|
+
if (!type) {
|
|
189
|
+
if (checkString("word/", { offset })) {
|
|
190
|
+
type = {
|
|
191
|
+
ext: "docx",
|
|
192
|
+
mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
193
|
+
};
|
|
194
|
+
} else if (checkString("ppt/", { offset })) {
|
|
195
|
+
type = {
|
|
196
|
+
ext: "pptx",
|
|
197
|
+
mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
|
198
|
+
};
|
|
199
|
+
} else if (checkString("xl/", { offset })) {
|
|
200
|
+
type = {
|
|
201
|
+
ext: "xlsx",
|
|
202
|
+
mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (oxmlFound && type) {
|
|
207
|
+
return type;
|
|
208
|
+
}
|
|
209
|
+
zipHeaderIndex = multiByteIndexOf(buffer, zipHeader, offset);
|
|
210
|
+
} while (zipHeaderIndex >= 0);
|
|
211
|
+
if (type) {
|
|
212
|
+
return type;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
if (check([80, 75]) && (buffer[2] === 3 || buffer[2] === 5 || buffer[2] === 7) && (buffer[3] === 4 || buffer[3] === 6 || buffer[3] === 8)) {
|
|
216
|
+
return {
|
|
217
|
+
ext: "zip",
|
|
218
|
+
mime: "application/zip"
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
if (check([48, 48, 48, 48, 48, 48], { offset: 148, mask: [248, 248, 248, 248, 248, 248] }) && // Valid tar checksum
|
|
222
|
+
tarHeaderChecksumMatches(buffer)) {
|
|
223
|
+
return {
|
|
224
|
+
ext: "tar",
|
|
225
|
+
mime: "application/x-tar"
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
if (check([82, 97, 114, 33, 26, 7]) && (buffer[6] === 0 || buffer[6] === 1)) {
|
|
229
|
+
return {
|
|
230
|
+
ext: "rar",
|
|
231
|
+
mime: "application/x-rar-compressed"
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
if (check([31, 139, 8])) {
|
|
235
|
+
return {
|
|
236
|
+
ext: "gz",
|
|
237
|
+
mime: "application/gzip"
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
if (check([66, 90, 104])) {
|
|
241
|
+
return {
|
|
242
|
+
ext: "bz2",
|
|
243
|
+
mime: "application/x-bzip2"
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
if (check([55, 122, 188, 175, 39, 28])) {
|
|
247
|
+
return {
|
|
248
|
+
ext: "7z",
|
|
249
|
+
mime: "application/x-7z-compressed"
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
if (check([120, 1])) {
|
|
253
|
+
return {
|
|
254
|
+
ext: "dmg",
|
|
255
|
+
mime: "application/x-apple-diskimage"
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
if (check([102, 114, 101, 101], { offset: 4 }) || // `free`
|
|
259
|
+
check([109, 100, 97, 116], { offset: 4 }) || // `mdat` MJPEG
|
|
260
|
+
check([109, 111, 111, 118], { offset: 4 }) || // `moov`
|
|
261
|
+
check([119, 105, 100, 101], { offset: 4 })) {
|
|
262
|
+
return {
|
|
263
|
+
ext: "mov",
|
|
264
|
+
mime: "video/quicktime"
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
if (check([102, 116, 121, 112], { offset: 4 }) && // `ftyp`
|
|
268
|
+
(buffer[8] & 96) !== 0 && (buffer[9] & 96) !== 0 && (buffer[10] & 96) !== 0 && (buffer[11] & 96) !== 0) {
|
|
269
|
+
const brandMajor = uint8ArrayUtf8ByteString(buffer, 8, 12);
|
|
270
|
+
switch (brandMajor) {
|
|
271
|
+
case "mif1":
|
|
272
|
+
return { ext: "heic", mime: "image/heif" };
|
|
273
|
+
case "msf1":
|
|
274
|
+
return { ext: "heic", mime: "image/heif-sequence" };
|
|
275
|
+
case "heic":
|
|
276
|
+
case "heix":
|
|
277
|
+
return { ext: "heic", mime: "image/heic" };
|
|
278
|
+
case "hevc":
|
|
279
|
+
case "hevx":
|
|
280
|
+
return { ext: "heic", mime: "image/heic-sequence" };
|
|
281
|
+
case "qt ":
|
|
282
|
+
return { ext: "mov", mime: "video/quicktime" };
|
|
283
|
+
case "M4V ":
|
|
284
|
+
case "M4VH":
|
|
285
|
+
case "M4VP":
|
|
286
|
+
return { ext: "m4v", mime: "video/x-m4v" };
|
|
287
|
+
case "M4P ":
|
|
288
|
+
return { ext: "m4p", mime: "video/mp4" };
|
|
289
|
+
case "M4B ":
|
|
290
|
+
return { ext: "m4b", mime: "audio/mp4" };
|
|
291
|
+
case "M4A ":
|
|
292
|
+
return { ext: "m4a", mime: "audio/x-m4a" };
|
|
293
|
+
case "F4V ":
|
|
294
|
+
return { ext: "f4v", mime: "video/mp4" };
|
|
295
|
+
case "F4P ":
|
|
296
|
+
return { ext: "f4p", mime: "video/mp4" };
|
|
297
|
+
case "F4A ":
|
|
298
|
+
return { ext: "f4a", mime: "audio/mp4" };
|
|
299
|
+
case "F4B ":
|
|
300
|
+
return { ext: "f4b", mime: "audio/mp4" };
|
|
301
|
+
default:
|
|
302
|
+
if (brandMajor.startsWith("3g")) {
|
|
303
|
+
if (brandMajor.startsWith("3g2")) {
|
|
304
|
+
return { ext: "3g2", mime: "video/3gpp2" };
|
|
305
|
+
}
|
|
306
|
+
return { ext: "3gp", mime: "video/3gpp" };
|
|
307
|
+
}
|
|
308
|
+
return { ext: "mp4", mime: "video/mp4" };
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
if (check([77, 84, 104, 100])) {
|
|
312
|
+
return {
|
|
313
|
+
ext: "mid",
|
|
314
|
+
mime: "audio/midi"
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
if (check([26, 69, 223, 163])) {
|
|
318
|
+
const sliced = buffer.subarray(4, 4 + 4096);
|
|
319
|
+
const idPos = sliced.findIndex((el, i, arr) => arr[i] === 66 && arr[i + 1] === 130);
|
|
320
|
+
if (idPos !== -1) {
|
|
321
|
+
const docTypePos = idPos + 3;
|
|
322
|
+
const findDocType = (type) => [...type].every((c, i) => sliced[docTypePos + i] === c.charCodeAt(0));
|
|
323
|
+
if (findDocType("matroska")) {
|
|
324
|
+
return {
|
|
325
|
+
ext: "mkv",
|
|
326
|
+
mime: "video/x-matroska"
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
if (findDocType("webm")) {
|
|
330
|
+
return {
|
|
331
|
+
ext: "webm",
|
|
332
|
+
mime: "video/webm"
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (check([82, 73, 70, 70])) {
|
|
338
|
+
if (check([65, 86, 73], { offset: 8 })) {
|
|
339
|
+
return {
|
|
340
|
+
ext: "avi",
|
|
341
|
+
mime: "video/vnd.avi"
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
if (check([87, 65, 86, 69], { offset: 8 })) {
|
|
345
|
+
return {
|
|
346
|
+
ext: "wav",
|
|
347
|
+
mime: "audio/vnd.wave"
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
if (check([81, 76, 67, 77], { offset: 8 })) {
|
|
351
|
+
return {
|
|
352
|
+
ext: "qcp",
|
|
353
|
+
mime: "audio/qcelp"
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
if (check([48, 38, 178, 117, 142, 102, 207, 17, 166, 217])) {
|
|
358
|
+
let offset = 30;
|
|
359
|
+
do {
|
|
360
|
+
const objectSize = readUInt64LE(buffer, offset + 16);
|
|
361
|
+
if (check([145, 7, 220, 183, 183, 169, 207, 17, 142, 230, 0, 192, 12, 32, 83, 101], { offset })) {
|
|
362
|
+
if (check([64, 158, 105, 248, 77, 91, 207, 17, 168, 253, 0, 128, 95, 92, 68, 43], { offset: offset + 24 })) {
|
|
363
|
+
return {
|
|
364
|
+
ext: "wma",
|
|
365
|
+
mime: "audio/x-ms-wma"
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
if (check([192, 239, 25, 188, 77, 91, 207, 17, 168, 253, 0, 128, 95, 92, 68, 43], { offset: offset + 24 })) {
|
|
369
|
+
return {
|
|
370
|
+
ext: "wmv",
|
|
371
|
+
mime: "video/x-ms-asf"
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
offset += objectSize;
|
|
377
|
+
} while (offset + 24 <= buffer.length);
|
|
378
|
+
return {
|
|
379
|
+
ext: "asf",
|
|
380
|
+
mime: "application/vnd.ms-asf"
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
if (check([0, 0, 1, 186]) || check([0, 0, 1, 179])) {
|
|
384
|
+
return {
|
|
385
|
+
ext: "mpg",
|
|
386
|
+
mime: "video/mpeg"
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
for (let start = 0; start < 2 && start < buffer.length - 16; start++) {
|
|
390
|
+
if (check([73, 68, 51], { offset: start }) || // ID3 header
|
|
391
|
+
check([255, 226], { offset: start, mask: [255, 230] })) {
|
|
392
|
+
return {
|
|
393
|
+
ext: "mp3",
|
|
394
|
+
mime: "audio/mpeg"
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
if (check([255, 228], { offset: start, mask: [255, 230] })) {
|
|
398
|
+
return {
|
|
399
|
+
ext: "mp2",
|
|
400
|
+
mime: "audio/mpeg"
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
if (check([255, 248], { offset: start, mask: [255, 252] })) {
|
|
404
|
+
return {
|
|
405
|
+
ext: "mp2",
|
|
406
|
+
mime: "audio/mpeg"
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
if (check([255, 240], { offset: start, mask: [255, 252] })) {
|
|
410
|
+
return {
|
|
411
|
+
ext: "mp4",
|
|
412
|
+
mime: "audio/mpeg"
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
if (check([79, 112, 117, 115, 72, 101, 97, 100], { offset: 28 })) {
|
|
417
|
+
return {
|
|
418
|
+
ext: "opus",
|
|
419
|
+
mime: "audio/opus"
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
if (check([79, 103, 103, 83])) {
|
|
423
|
+
if (check([128, 116, 104, 101, 111, 114, 97], { offset: 28 })) {
|
|
424
|
+
return {
|
|
425
|
+
ext: "ogv",
|
|
426
|
+
mime: "video/ogg"
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
if (check([1, 118, 105, 100, 101, 111, 0], { offset: 28 })) {
|
|
430
|
+
return {
|
|
431
|
+
ext: "ogm",
|
|
432
|
+
mime: "video/ogg"
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
if (check([127, 70, 76, 65, 67], { offset: 28 })) {
|
|
436
|
+
return {
|
|
437
|
+
ext: "oga",
|
|
438
|
+
mime: "audio/ogg"
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
if (check([83, 112, 101, 101, 120, 32, 32], { offset: 28 })) {
|
|
442
|
+
return {
|
|
443
|
+
ext: "spx",
|
|
444
|
+
mime: "audio/ogg"
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
if (check([1, 118, 111, 114, 98, 105, 115], { offset: 28 })) {
|
|
448
|
+
return {
|
|
449
|
+
ext: "ogg",
|
|
450
|
+
mime: "audio/ogg"
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
return {
|
|
454
|
+
ext: "ogx",
|
|
455
|
+
mime: "application/ogg"
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
if (check([102, 76, 97, 67])) {
|
|
459
|
+
return {
|
|
460
|
+
ext: "flac",
|
|
461
|
+
mime: "audio/x-flac"
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
if (check([77, 65, 67, 32])) {
|
|
465
|
+
return {
|
|
466
|
+
ext: "ape",
|
|
467
|
+
mime: "audio/ape"
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
if (check([119, 118, 112, 107])) {
|
|
471
|
+
return {
|
|
472
|
+
ext: "wv",
|
|
473
|
+
mime: "audio/wavpack"
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
if (check([35, 33, 65, 77, 82, 10])) {
|
|
477
|
+
return {
|
|
478
|
+
ext: "amr",
|
|
479
|
+
mime: "audio/amr"
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
if (check([37, 80, 68, 70])) {
|
|
483
|
+
return {
|
|
484
|
+
ext: "pdf",
|
|
485
|
+
mime: "application/pdf"
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
if (check([77, 90])) {
|
|
489
|
+
return {
|
|
490
|
+
ext: "exe",
|
|
491
|
+
mime: "application/x-msdownload"
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
if ((buffer[0] === 67 || buffer[0] === 70) && check([87, 83], { offset: 1 })) {
|
|
495
|
+
return {
|
|
496
|
+
ext: "swf",
|
|
497
|
+
mime: "application/x-shockwave-flash"
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
if (check([123, 92, 114, 116, 102])) {
|
|
501
|
+
return {
|
|
502
|
+
ext: "rtf",
|
|
503
|
+
mime: "application/rtf"
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
if (check([0, 97, 115, 109])) {
|
|
507
|
+
return {
|
|
508
|
+
ext: "wasm",
|
|
509
|
+
mime: "application/wasm"
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
if (check([119, 79, 70, 70]) && (check([0, 1, 0, 0], { offset: 4 }) || check([79, 84, 84, 79], { offset: 4 }))) {
|
|
513
|
+
return {
|
|
514
|
+
ext: "woff",
|
|
515
|
+
mime: "font/woff"
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
if (check([119, 79, 70, 50]) && (check([0, 1, 0, 0], { offset: 4 }) || check([79, 84, 84, 79], { offset: 4 }))) {
|
|
519
|
+
return {
|
|
520
|
+
ext: "woff2",
|
|
521
|
+
mime: "font/woff2"
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
if (check([76, 80], { offset: 34 }) && (check([0, 0, 1], { offset: 8 }) || check([1, 0, 2], { offset: 8 }) || check([2, 0, 2], { offset: 8 }))) {
|
|
525
|
+
return {
|
|
526
|
+
ext: "eot",
|
|
527
|
+
mime: "application/vnd.ms-fontobject"
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
if (check([0, 1, 0, 0, 0])) {
|
|
531
|
+
return {
|
|
532
|
+
ext: "ttf",
|
|
533
|
+
mime: "font/ttf"
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
if (check([79, 84, 84, 79, 0])) {
|
|
537
|
+
return {
|
|
538
|
+
ext: "otf",
|
|
539
|
+
mime: "font/otf"
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
if (check([0, 0, 1, 0])) {
|
|
543
|
+
return {
|
|
544
|
+
ext: "ico",
|
|
545
|
+
mime: "image/x-icon"
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
if (check([0, 0, 2, 0])) {
|
|
549
|
+
return {
|
|
550
|
+
ext: "cur",
|
|
551
|
+
mime: "image/x-icon"
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
if (check([70, 76, 86, 1])) {
|
|
555
|
+
return {
|
|
556
|
+
ext: "flv",
|
|
557
|
+
mime: "video/x-flv"
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
if (check([37, 33])) {
|
|
561
|
+
return {
|
|
562
|
+
ext: "ps",
|
|
563
|
+
mime: "application/postscript"
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
if (check([253, 55, 122, 88, 90, 0])) {
|
|
567
|
+
return {
|
|
568
|
+
ext: "xz",
|
|
569
|
+
mime: "application/x-xz"
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
if (check([83, 81, 76, 105])) {
|
|
573
|
+
return {
|
|
574
|
+
ext: "sqlite",
|
|
575
|
+
mime: "application/x-sqlite3"
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
if (check([78, 69, 83, 26])) {
|
|
579
|
+
return {
|
|
580
|
+
ext: "nes",
|
|
581
|
+
mime: "application/x-nintendo-nes-rom"
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
if (check([67, 114, 50, 52])) {
|
|
585
|
+
return {
|
|
586
|
+
ext: "crx",
|
|
587
|
+
mime: "application/x-google-chrome-extension"
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
if (check([77, 83, 67, 70]) || check([73, 83, 99, 40])) {
|
|
591
|
+
return {
|
|
592
|
+
ext: "cab",
|
|
593
|
+
mime: "application/vnd.ms-cab-compressed"
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
if (check([33, 60, 97, 114, 99, 104, 62, 10, 100, 101, 98, 105, 97, 110, 45, 98, 105, 110, 97, 114, 121])) {
|
|
597
|
+
return {
|
|
598
|
+
ext: "deb",
|
|
599
|
+
mime: "application/x-deb"
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
if (check([33, 60, 97, 114, 99, 104, 62])) {
|
|
603
|
+
return {
|
|
604
|
+
ext: "ar",
|
|
605
|
+
mime: "application/x-unix-archive"
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
if (check([237, 171, 238, 219])) {
|
|
609
|
+
return {
|
|
610
|
+
ext: "rpm",
|
|
611
|
+
mime: "application/x-rpm"
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
if (check([31, 160]) || check([31, 157])) {
|
|
615
|
+
return {
|
|
616
|
+
ext: "Z",
|
|
617
|
+
mime: "application/x-compress"
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
if (check([76, 90, 73, 80])) {
|
|
621
|
+
return {
|
|
622
|
+
ext: "lz",
|
|
623
|
+
mime: "application/x-lzip"
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
if (check([208, 207, 17, 224, 161, 177, 26, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62])) {
|
|
627
|
+
return {
|
|
628
|
+
ext: "msi",
|
|
629
|
+
mime: "application/x-msi"
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
if (check([6, 14, 43, 52, 2, 5, 1, 1, 13, 1, 2, 1, 1, 2])) {
|
|
633
|
+
return {
|
|
634
|
+
ext: "mxf",
|
|
635
|
+
mime: "application/mxf"
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
if (check([71], { offset: 4 }) && (check([71], { offset: 192 }) || check([71], { offset: 196 }))) {
|
|
639
|
+
return {
|
|
640
|
+
ext: "mts",
|
|
641
|
+
mime: "video/mp2t"
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
if (check([66, 76, 69, 78, 68, 69, 82])) {
|
|
645
|
+
return {
|
|
646
|
+
ext: "blend",
|
|
647
|
+
mime: "application/x-blender"
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
if (check([66, 80, 71, 251])) {
|
|
651
|
+
return {
|
|
652
|
+
ext: "bpg",
|
|
653
|
+
mime: "image/bpg"
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
if (check([0, 0, 0, 12, 106, 80, 32, 32, 13, 10, 135, 10])) {
|
|
657
|
+
if (check([106, 112, 50, 32], { offset: 20 })) {
|
|
658
|
+
return {
|
|
659
|
+
ext: "jp2",
|
|
660
|
+
mime: "image/jp2"
|
|
661
|
+
};
|
|
662
|
+
}
|
|
663
|
+
if (check([106, 112, 120, 32], { offset: 20 })) {
|
|
664
|
+
return {
|
|
665
|
+
ext: "jpx",
|
|
666
|
+
mime: "image/jpx"
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
if (check([106, 112, 109, 32], { offset: 20 })) {
|
|
670
|
+
return {
|
|
671
|
+
ext: "jpm",
|
|
672
|
+
mime: "image/jpm"
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
if (check([109, 106, 112, 50], { offset: 20 })) {
|
|
676
|
+
return {
|
|
677
|
+
ext: "mj2",
|
|
678
|
+
mime: "image/mj2"
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
if (check([70, 79, 82, 77])) {
|
|
683
|
+
return {
|
|
684
|
+
ext: "aif",
|
|
685
|
+
mime: "audio/aiff"
|
|
686
|
+
};
|
|
687
|
+
}
|
|
688
|
+
if (checkString("<?xml ")) {
|
|
689
|
+
return {
|
|
690
|
+
ext: "xml",
|
|
691
|
+
mime: "application/xml"
|
|
692
|
+
};
|
|
693
|
+
}
|
|
694
|
+
if (check([66, 79, 79, 75, 77, 79, 66, 73], { offset: 60 })) {
|
|
695
|
+
return {
|
|
696
|
+
ext: "mobi",
|
|
697
|
+
mime: "application/x-mobipocket-ebook"
|
|
698
|
+
};
|
|
699
|
+
}
|
|
700
|
+
if (check([171, 75, 84, 88, 32, 49, 49, 187, 13, 10, 26, 10])) {
|
|
701
|
+
return {
|
|
702
|
+
ext: "ktx",
|
|
703
|
+
mime: "image/ktx"
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
if (check([68, 73, 67, 77], { offset: 128 })) {
|
|
707
|
+
return {
|
|
708
|
+
ext: "dcm",
|
|
709
|
+
mime: "application/dicom"
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
if (check([77, 80, 43])) {
|
|
713
|
+
return {
|
|
714
|
+
ext: "mpc",
|
|
715
|
+
mime: "audio/x-musepack"
|
|
716
|
+
};
|
|
717
|
+
}
|
|
718
|
+
if (check([77, 80, 67, 75])) {
|
|
719
|
+
return {
|
|
720
|
+
ext: "mpc",
|
|
721
|
+
mime: "audio/x-musepack"
|
|
722
|
+
};
|
|
723
|
+
}
|
|
724
|
+
if (check([66, 69, 71, 73, 78, 58])) {
|
|
725
|
+
return {
|
|
726
|
+
ext: "ics",
|
|
727
|
+
mime: "text/calendar"
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
if (check([103, 108, 84, 70, 2, 0, 0, 0])) {
|
|
731
|
+
return {
|
|
732
|
+
ext: "glb",
|
|
733
|
+
mime: "model/gltf-binary"
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
if (check([212, 195, 178, 161]) || check([161, 178, 195, 212])) {
|
|
737
|
+
return {
|
|
738
|
+
ext: "pcap",
|
|
739
|
+
mime: "application/vnd.tcpdump.pcap"
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
if (check([68, 83, 68, 32])) {
|
|
743
|
+
return {
|
|
744
|
+
ext: "dsf",
|
|
745
|
+
mime: "audio/x-dsf"
|
|
746
|
+
// Non-standard
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
if (check([76, 0, 0, 0, 1, 20, 2, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70])) {
|
|
750
|
+
return {
|
|
751
|
+
ext: "lnk",
|
|
752
|
+
mime: "application/x.ms.shortcut"
|
|
753
|
+
// Invented by us
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
if (check([98, 111, 111, 107, 0, 0, 0, 0, 109, 97, 114, 107, 0, 0, 0, 0])) {
|
|
757
|
+
return {
|
|
758
|
+
ext: "alias",
|
|
759
|
+
mime: "application/x.apple.alias"
|
|
760
|
+
// Invented by us
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
if (checkString("Creative Voice File")) {
|
|
764
|
+
return {
|
|
765
|
+
ext: "voc",
|
|
766
|
+
mime: "audio/x-voc"
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
if (check([11, 119])) {
|
|
770
|
+
return {
|
|
771
|
+
ext: "ac3",
|
|
772
|
+
mime: "audio/vnd.dolby.dd-raw"
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
if ((check([126, 16, 4]) || check([126, 24, 4])) && check([48, 77, 73, 69], { offset: 4 })) {
|
|
776
|
+
return {
|
|
777
|
+
ext: "mie",
|
|
778
|
+
mime: "application/x-mie"
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
if (check([65, 82, 82, 79, 87, 49, 0, 0])) {
|
|
782
|
+
return {
|
|
783
|
+
ext: "arrow",
|
|
784
|
+
mime: "application/x-apache-arrow"
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
if (check([39, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], { offset: 2 })) {
|
|
788
|
+
return {
|
|
789
|
+
ext: "shp",
|
|
790
|
+
mime: "application/x-esri-shape"
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
module.exports = fileType;
|
|
795
|
+
Object.defineProperty(fileType, "minimumBytes", { value: 4100 });
|
|
796
|
+
fileType.stream = (readableStream) => new Promise((resolve, reject) => {
|
|
797
|
+
const stream = eval("require")("stream");
|
|
798
|
+
readableStream.on("error", reject);
|
|
799
|
+
readableStream.once("readable", () => {
|
|
800
|
+
const pass = new stream.PassThrough();
|
|
801
|
+
const chunk = readableStream.read(module.exports.minimumBytes) || readableStream.read();
|
|
802
|
+
try {
|
|
803
|
+
pass.fileType = fileType(chunk);
|
|
804
|
+
} catch (error) {
|
|
805
|
+
reject(error);
|
|
806
|
+
}
|
|
807
|
+
readableStream.unshift(chunk);
|
|
808
|
+
if (stream.pipeline) {
|
|
809
|
+
resolve(stream.pipeline(readableStream, pass, () => {
|
|
810
|
+
}));
|
|
811
|
+
} else {
|
|
812
|
+
resolve(readableStream.pipe(pass));
|
|
813
|
+
}
|
|
814
|
+
});
|
|
815
|
+
});
|
|
816
|
+
Object.defineProperty(fileType, "extensions", {
|
|
817
|
+
get() {
|
|
818
|
+
return new Set(supported$1.extensions);
|
|
819
|
+
}
|
|
820
|
+
});
|
|
821
|
+
Object.defineProperty(fileType, "mimeTypes", {
|
|
822
|
+
get() {
|
|
823
|
+
return new Set(supported$1.mimeTypes);
|
|
824
|
+
}
|
|
825
|
+
});
|
|
826
|
+
})(fileType);
|