daiquiri-ui 2025.12.1__py3-none-any.whl → 2026.2.0__py3-none-any.whl

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.
Files changed (143) hide show
  1. daiquiri_ui/__init__.py +0 -1
  2. daiquiri_ui/static/assets/Anchor-0b4a3d33.js +1 -0
  3. daiquiri_ui/static/assets/AutoscaleOption-3cb99678.js +1 -0
  4. daiquiri_ui/static/assets/{BPMVideoStream-7dfae0bb.js → BPMVideoStream-c3e09e8b.js} +1 -1
  5. daiquiri_ui/static/assets/{CanvasEnhancer-16124b1e.js → CanvasEnhancer-dd82c090.js} +1 -1
  6. daiquiri_ui/static/assets/ColorMap-be59ad21.js +1 -0
  7. daiquiri_ui/static/assets/CompositeMap-c93f5466.js +1 -0
  8. daiquiri_ui/static/assets/{ConnectUtils-b8bfa186.js → ConnectUtils-3923fa2f.js} +1 -1
  9. daiquiri_ui/static/assets/{Console-42bf9fd1.js → Console-d0028912.js} +1 -1
  10. daiquiri_ui/static/assets/{Cross-d0a1a410.js → Cross-d5df0df3.js} +1 -1
  11. daiquiri_ui/static/assets/{CrossMarker-2285e102.js → CrossMarker-71cd11cf.js} +2 -2
  12. daiquiri_ui/static/assets/DraggableRect-25d91c7d.js +1 -0
  13. daiquiri_ui/static/assets/DropdownButton-29cc265b.js +1 -0
  14. daiquiri_ui/static/assets/DropdownDetector-5016908a.js +1 -0
  15. daiquiri_ui/static/assets/{Editor-8c26c281.js → Editor-7b500b85.js} +9 -9
  16. daiquiri_ui/static/assets/EditorTree-7fc000d8.js +1 -0
  17. daiquiri_ui/static/assets/H5Viewer-d1305c58.js +1 -0
  18. daiquiri_ui/static/assets/{H5WebCurvePlot-136dfa6f.js → H5WebCurvePlot-61b08211.js} +1 -1
  19. daiquiri_ui/static/assets/HSegment-8d2c001e.js +43 -0
  20. daiquiri_ui/static/assets/HardwareButton-af41c610.js +1 -0
  21. daiquiri_ui/static/assets/Hdf5Plot-bbffc65f.js +1 -0
  22. daiquiri_ui/static/assets/{HistogramDomainSlider-5572e533.js → HistogramDomainSlider-304bdab4.js} +1 -1
  23. daiquiri_ui/static/assets/Image-ee61818a.js +1 -0
  24. daiquiri_ui/static/assets/Label-9d8979b3.js +1 -0
  25. daiquiri_ui/static/assets/{LoadingMessage-e1e479c5.js → LoadingMessage-03b4fa4f.js} +1 -1
  26. daiquiri_ui/static/assets/NewScanButton-0051d220.js +1 -0
  27. daiquiri_ui/static/assets/NewScanButton-57cf0c17.js +1 -0
  28. daiquiri_ui/static/assets/OptionsProcess-da629bfb.js +1 -0
  29. daiquiri_ui/static/assets/ParametersList-2d01832f.js +1 -0
  30. daiquiri_ui/static/assets/RectRoi-3693cc65.js +1 -0
  31. daiquiri_ui/static/assets/RectRuler-1fee3fd8.js +543 -0
  32. daiquiri_ui/static/assets/RulerButton-a95a6035.js +139 -0
  33. daiquiri_ui/static/assets/SampleDCList-dce0bd2b.js +1 -0
  34. daiquiri_ui/static/assets/SampleRegistration-544aa4bd.js +1 -0
  35. daiquiri_ui/static/assets/SavingButton-c3efc92c.js +1 -0
  36. daiquiri_ui/static/assets/ScanDataService-16f29ecd.js +1 -0
  37. daiquiri_ui/static/assets/ScanPlot0d-67c76bfe.js +1 -0
  38. daiquiri_ui/static/assets/ScanPlot0dValue-c0dd01b5.js +1 -0
  39. daiquiri_ui/static/assets/ScanPlot1d-3c930b95.js +1 -0
  40. daiquiri_ui/static/assets/ScanPlot1d-ee33c98b.js +1 -0
  41. daiquiri_ui/static/assets/{ScanPlot2d-c49ba2bc.js → ScanPlot2d-af57d8ad.js} +1 -1
  42. daiquiri_ui/static/assets/{ScanTable-4e677d2b.js → ScanTable-bc13760e.js} +1 -1
  43. daiquiri_ui/static/assets/ScanValue-00aab91b.js +1 -0
  44. daiquiri_ui/static/assets/SceneScale-e2a42af2.js +1 -0
  45. daiquiri_ui/static/assets/SchemaForm-7d897a32.js +1 -0
  46. daiquiri_ui/static/assets/{ScreenScale-ae820d30.js → ScreenScale-b2417934.js} +1 -1
  47. daiquiri_ui/static/assets/{SelectionPoint-d30865f3.js → SelectionPoint-a2cb4dfc.js} +1 -1
  48. daiquiri_ui/static/assets/{StackedNameState-3f198174.js → StackedNameState-4e8dc742.js} +1 -1
  49. daiquiri_ui/static/assets/Statistics.worker-54a0d965.js +46 -0
  50. daiquiri_ui/static/assets/{Synoptic-0f3dac61.js → Synoptic-8a3c67f3.js} +5 -5
  51. daiquiri_ui/static/assets/TomoAlign-b80a68c3.js +7 -0
  52. daiquiri_ui/static/assets/TomoBeamShaping-65a115e9.js +1 -0
  53. daiquiri_ui/static/assets/TomoDetector-500d46af.js +1 -0
  54. daiquiri_ui/static/assets/TomoDetector-e04a5a8b.js +1 -0
  55. daiquiri_ui/static/assets/TomoDetectorView-952499e6.js +64 -0
  56. daiquiri_ui/static/assets/TomoHolo-db2c8449.js +1 -0
  57. daiquiri_ui/static/assets/TomoPusherView-a50e2acd.js +1 -0
  58. daiquiri_ui/static/assets/TomoReconstructedSinogram-deee0779.js +191 -0
  59. daiquiri_ui/static/assets/TomoScanInfo-972a690b.js +1 -0
  60. daiquiri_ui/static/assets/{TomoScanList-d9bea762.js → TomoScanList-ede05c2a.js} +1 -1
  61. daiquiri_ui/static/assets/TomoService-e9741d6a.js +1 -0
  62. daiquiri_ui/static/assets/TomoSinogram-dce5808e.js +1 -0
  63. daiquiri_ui/static/assets/TomoTiling-04701bb7.js +69 -0
  64. daiquiri_ui/static/assets/TwoD-fee9523f.js +3 -0
  65. daiquiri_ui/static/assets/TwoDObject-2f30deac.js +1 -0
  66. daiquiri_ui/static/assets/TwoDObjectList-458e4824.js +1 -0
  67. daiquiri_ui/static/assets/{UseMouseModeInteraction-fc86164b.js → UseMouseModeInteraction-51c6269c.js} +1 -1
  68. daiquiri_ui/static/assets/VLineRoi-b38fe841.js +1 -0
  69. daiquiri_ui/static/assets/{VSegment-cf1ceafc.js → VSegment-f0d42c9a.js} +2 -2
  70. daiquiri_ui/static/assets/VSegmentRoi-d5e035cc.js +1 -0
  71. daiquiri_ui/static/assets/{VideoStream-4b855f43.js → VideoStream-a5200b21.js} +1 -1
  72. daiquiri_ui/static/assets/{VisViewpointRestore-097e2edf.js → VisViewpointRestore-4aa338ea.js} +3 -3
  73. daiquiri_ui/static/assets/{WorldScale-6e6ac5b5.js → WorldScale-23bd1dfb.js} +1 -1
  74. daiquiri_ui/static/assets/{ZoomPanCanvas-8f437b75.js → ZoomPanCanvas-23b61dbb.js} +1 -1
  75. daiquiri_ui/static/assets/{colormap-344855f8.js → colormap-6e43299c.js} +1 -1
  76. daiquiri_ui/static/assets/fontawesomemore-webfont-6ae56ae3.woff2 +0 -0
  77. daiquiri_ui/static/assets/{geometry-1fc3c1a0.js → geometry-cd448ec1.js} +1 -1
  78. daiquiri_ui/static/assets/hooks-171c0765.js +1 -0
  79. daiquiri_ui/static/assets/{hooks-cf59b64f.js → hooks-e0d9229c.js} +1 -1
  80. daiquiri_ui/static/assets/index-779a56ef.css +9 -0
  81. daiquiri_ui/static/assets/{index-a0f7b98c.js → index-a9bb7636.js} +7 -7
  82. daiquiri_ui/static/assets/index-b3c0133a.js +3576 -0
  83. daiquiri_ui/static/assets/{plotly-basic-889d4727.js → plotly-basic-ccc5794d.js} +2 -2
  84. daiquiri_ui/static/assets/{plotly-gl2d-e2e89493.js → plotly-gl2d-345cb34a.js} +2 -2
  85. daiquiri_ui/static/assets/store-5d136a2c.js +1 -0
  86. daiquiri_ui/static/assets/{types-46afffa0.js → types-c366a377.js} +1 -1
  87. daiquiri_ui/static/index.html +2 -2
  88. daiquiri_ui/static/meta.json +1 -1
  89. {daiquiri_ui-2025.12.1.dist-info → daiquiri_ui-2026.2.0.dist-info}/METADATA +1 -1
  90. daiquiri_ui-2026.2.0.dist-info/RECORD +134 -0
  91. {daiquiri_ui-2025.12.1.dist-info → daiquiri_ui-2026.2.0.dist-info}/WHEEL +1 -1
  92. daiquiri_ui/static/assets/Anchor-3fa6d19c.js +0 -1
  93. daiquiri_ui/static/assets/AutoscaleOption-d8d0ca8d.js +0 -1
  94. daiquiri_ui/static/assets/DraggableRect-db33e02e.js +0 -1
  95. daiquiri_ui/static/assets/DropdownButton-d066ece0.js +0 -1
  96. daiquiri_ui/static/assets/DropdownDetector-4ddfa946.js +0 -1
  97. daiquiri_ui/static/assets/EditorTree-b390ece1.js +0 -1
  98. daiquiri_ui/static/assets/H5Viewer-bbcf29f5.js +0 -1
  99. daiquiri_ui/static/assets/HSegment-8966b13f.js +0 -43
  100. daiquiri_ui/static/assets/HardwareButton-2e65150e.js +0 -1
  101. daiquiri_ui/static/assets/Hdf5Plot-3b35de75.js +0 -1
  102. daiquiri_ui/static/assets/Image-1ff7dca9.js +0 -1
  103. daiquiri_ui/static/assets/Label-3c95fb14.js +0 -1
  104. daiquiri_ui/static/assets/NewScanButton-25f65a41.js +0 -1
  105. daiquiri_ui/static/assets/NewScanButton-f40700e9.js +0 -1
  106. daiquiri_ui/static/assets/OptionsProcess-6fd11ce7.js +0 -1
  107. daiquiri_ui/static/assets/ParametersList-c91938bf.js +0 -1
  108. daiquiri_ui/static/assets/RectRoi-19381507.js +0 -1
  109. daiquiri_ui/static/assets/RulerButton-5c2020aa.js +0 -139
  110. daiquiri_ui/static/assets/SampleDCList-64bd9100.js +0 -1
  111. daiquiri_ui/static/assets/SampleRegistration-a354b270.js +0 -1
  112. daiquiri_ui/static/assets/SavingButton-c1839199.js +0 -1
  113. daiquiri_ui/static/assets/ScanPlot0d-d180ecd3.js +0 -1
  114. daiquiri_ui/static/assets/ScanPlot0dValue-0e33cb2c.js +0 -1
  115. daiquiri_ui/static/assets/ScanPlot1d-38bddb23.js +0 -1
  116. daiquiri_ui/static/assets/ScanPlot1d-543e4ac4.js +0 -1
  117. daiquiri_ui/static/assets/ScanValue-a303a86d.js +0 -1
  118. daiquiri_ui/static/assets/SceneScale-33094e68.js +0 -1
  119. daiquiri_ui/static/assets/SchemaForm-b27ccd55.js +0 -1
  120. daiquiri_ui/static/assets/TomoAlign-03e37551.js +0 -4
  121. daiquiri_ui/static/assets/TomoBeamShaping-6ec15838.js +0 -1
  122. daiquiri_ui/static/assets/TomoDetector-aead72a5.js +0 -1
  123. daiquiri_ui/static/assets/TomoDetectorView-aadf1539.js +0 -64
  124. daiquiri_ui/static/assets/TomoHolo-7eb20a1e.js +0 -1
  125. daiquiri_ui/static/assets/TomoReconstructedSinogram-53bbfb3b.js +0 -191
  126. daiquiri_ui/static/assets/TomoScanInfo-5ca06333.js +0 -1
  127. daiquiri_ui/static/assets/TomoSinogram-ecd9dca2.js +0 -1
  128. daiquiri_ui/static/assets/TomoTiling-1b9f4bf4.js +0 -69
  129. daiquiri_ui/static/assets/TwoD-ca5cd677.js +0 -3
  130. daiquiri_ui/static/assets/TwoDObject-86b91ffb.js +0 -1
  131. daiquiri_ui/static/assets/TwoDObjectList-143af6e7.js +0 -1
  132. daiquiri_ui/static/assets/VLineRoi-5130fa5a.js +0 -1
  133. daiquiri_ui/static/assets/colors-2395de5a.js +0 -1
  134. daiquiri_ui/static/assets/fontawesomemore-webfont-97d0220a.woff2 +0 -0
  135. daiquiri_ui/static/assets/hooks-457bfe32.js +0 -1
  136. daiquiri_ui/static/assets/index-0751d893.js +0 -3576
  137. daiquiri_ui/static/assets/index-f085dfca.css +0 -9
  138. daiquiri_ui/static/assets/store-c3eddf46.js +0 -1
  139. daiquiri_ui/static/resources/shaders/compare.frag.glsl +0 -386
  140. daiquiri_ui/static/resources/shaders/compare.vert.glsl +0 -11
  141. daiquiri_ui-2025.12.1.dist-info/RECORD +0 -128
  142. {daiquiri_ui-2025.12.1.dist-info → daiquiri_ui-2026.2.0.dist-info}/licenses/LICENSE +0 -0
  143. {daiquiri_ui-2025.12.1.dist-info → daiquiri_ui-2026.2.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ import{aK as R,r as lt,al as ft,j as C,aG as K}from"./index-b3c0133a.js";import{u as dt}from"./UseMouseModeInteraction-51c6269c.js";import{b as pt}from"./index-a9bb7636.js";const Ce=10,Pe=3.5,Me=10,Le=.03,Re=.02,Ke=.01,Ve=40;function mt(s,t,e){return Math.max(t,Math.min(s,e))}const l={toVector(s,t){return s===void 0&&(s=t),Array.isArray(s)?s:[s,s]},add(s,t){return[s[0]+t[0],s[1]+t[1]]},sub(s,t){return[s[0]-t[0],s[1]-t[1]]},addTo(s,t){s[0]+=t[0],s[1]+=t[1]},subTo(s,t){s[0]-=t[0],s[1]-=t[1]}};function N(s,t,e){return t===0||Math.abs(t)===1/0?Math.pow(s,e*5):s*t*e/(t+e*s)}function U(s,t,e,i=.15){return i===0?mt(s,t,e):s<t?-N(t-s,e-t,i)+t:s>e?+N(s-e,e-t,i)+e:s}function gt(s,[t,e],[i,n]){const[[r,o],[a,u]]=s;return[U(t,r,o,i),U(e,a,u,n)]}function _t(s,t){if(typeof s!="object"||s===null)return s;var e=s[Symbol.toPrimitive];if(e!==void 0){var i=e.call(s,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(s)}function vt(s){var t=_t(s,"string");return typeof t=="symbol"?t:String(t)}function p(s,t,e){return t=vt(t),t in s?Object.defineProperty(s,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):s[t]=e,s}function Y(s,t){var e=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable})),e.push.apply(e,i)}return e}function d(s){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Y(Object(e),!0).forEach(function(i){p(s,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(e)):Y(Object(e)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(e,i))})}return s}const Q={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function G(s){return s?s[0].toUpperCase()+s.slice(1):""}const yt=["enter","leave"];function bt(s=!1,t){return s&&!yt.includes(t)}function Et(s,t="",e=!1){const i=Q[s],n=i&&i[t]||t;return"on"+G(s)+G(n)+(bt(e,n)?"Capture":"")}const wt=["gotpointercapture","lostpointercapture"];function It(s){let t=s.substring(2).toLowerCase();const e=!!~t.indexOf("passive");e&&(t=t.replace("passive",""));const i=wt.includes(t)?"capturecapture":"capture",n=!!~t.indexOf(i);return n&&(t=t.replace("capture","")),{device:t,capture:n,passive:e}}function Tt(s,t=""){const e=Q[s],i=e&&e[t]||t;return s+i}function L(s){return"touches"in s}function tt(s){return L(s)?"touch":"pointerType"in s?s.pointerType:"mouse"}function St(s){return Array.from(s.touches).filter(t=>{var e,i;return t.target===s.currentTarget||((e=s.currentTarget)===null||e===void 0||(i=e.contains)===null||i===void 0?void 0:i.call(e,t.target))})}function At(s){return s.type==="touchend"||s.type==="touchcancel"?s.changedTouches:s.targetTouches}function et(s){return L(s)?At(s)[0]:s}function j(s,t){try{const e=t.clientX-s.clientX,i=t.clientY-s.clientY,n=(t.clientX+s.clientX)/2,r=(t.clientY+s.clientY)/2,o=Math.hypot(e,i);return{angle:-(Math.atan2(e,i)*180)/Math.PI,distance:o,origin:[n,r]}}catch{}return null}function Dt(s){return St(s).map(t=>t.identifier)}function X(s,t){const[e,i]=Array.from(s.touches).filter(n=>t.includes(n.identifier));return j(e,i)}function V(s){const t=et(s);return L(s)?t.identifier:t.pointerId}function S(s){const t=et(s);return[t.clientX,t.clientY]}const W=40,z=800;function st(s){let{deltaX:t,deltaY:e,deltaMode:i}=s;return i===1?(t*=W,e*=W):i===2&&(t*=z,e*=z),[t,e]}function Ot(s){var t,e;const{scrollX:i,scrollY:n,scrollLeft:r,scrollTop:o}=s.currentTarget;return[(t=i??r)!==null&&t!==void 0?t:0,(e=n??o)!==null&&e!==void 0?e:0]}function kt(s){const t={};if("buttons"in s&&(t.buttons=s.buttons),"shiftKey"in s){const{shiftKey:e,altKey:i,metaKey:n,ctrlKey:r}=s;Object.assign(t,{shiftKey:e,altKey:i,metaKey:n,ctrlKey:r})}return t}function M(s,...t){return typeof s=="function"?s(...t):s}function xt(){}function Ct(...s){return s.length===0?xt:s.length===1?s[0]:function(){let t;for(const e of s)t=e.apply(this,arguments)||t;return t}}function Z(s,t){return Object.assign({},t,s||{})}const Pt=32;class it{constructor(t,e,i){this.ctrl=t,this.args=e,this.key=i,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(t){this.ctrl.state[this.key]=t}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:t,shared:e,ingKey:i,args:n}=this;e[i]=t._active=t.active=t._blocked=t._force=!1,t._step=[!1,!1],t.intentional=!1,t._movement=[0,0],t._distance=[0,0],t._direction=[0,0],t._delta=[0,0],t._bounds=[[-1/0,1/0],[-1/0,1/0]],t.args=n,t.axis=void 0,t.memo=void 0,t.elapsedTime=t.timeDelta=0,t.direction=[0,0],t.distance=[0,0],t.overflow=[0,0],t._movementBound=[!1,!1],t.velocity=[0,0],t.movement=[0,0],t.delta=[0,0],t.timeStamp=0}start(t){const e=this.state,i=this.config;e._active||(this.reset(),this.computeInitial(),e._active=!0,e.target=t.target,e.currentTarget=t.currentTarget,e.lastOffset=i.from?M(i.from,e):e.offset,e.offset=e.lastOffset,e.startTime=e.timeStamp=t.timeStamp)}computeValues(t){const e=this.state;e._values=t,e.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:e,config:i,shared:n}=this;e.args=this.args;let r=0;if(t&&(e.event=t,i.preventDefault&&t.cancelable&&e.event.preventDefault(),e.type=t.type,n.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,n.locked=!!document.pointerLockElement,Object.assign(n,kt(t)),n.down=n.pressed=n.buttons%2===1||n.touches>0,r=t.timeStamp-e.timeStamp,e.timeStamp=t.timeStamp,e.elapsedTime=e.timeStamp-e.startTime),e._active){const E=e._delta.map(Math.abs);l.addTo(e._distance,E)}this.axisIntent&&this.axisIntent(t);const[o,a]=e._movement,[u,h]=i.threshold,{_step:c,values:_}=e;if(i.hasCustomTransform?(c[0]===!1&&(c[0]=Math.abs(o)>=u&&_[0]),c[1]===!1&&(c[1]=Math.abs(a)>=h&&_[1])):(c[0]===!1&&(c[0]=Math.abs(o)>=u&&Math.sign(o)*u),c[1]===!1&&(c[1]=Math.abs(a)>=h&&Math.sign(a)*h)),e.intentional=c[0]!==!1||c[1]!==!1,!e.intentional)return;const f=[0,0];if(i.hasCustomTransform){const[E,ht]=_;f[0]=c[0]!==!1?E-c[0]:0,f[1]=c[1]!==!1?ht-c[1]:0}else f[0]=c[0]!==!1?o-c[0]:0,f[1]=c[1]!==!1?a-c[1]:0;this.restrictToAxis&&!e._blocked&&this.restrictToAxis(f);const m=e.offset,g=e._active&&!e._blocked||e.active;g&&(e.first=e._active&&!e.active,e.last=!e._active&&e.active,e.active=n[this.ingKey]=e._active,t&&(e.first&&("bounds"in i&&(e._bounds=M(i.bounds,e)),this.setup&&this.setup()),e.movement=f,this.computeOffset()));const[b,y]=e.offset,[[A,k],[x,ct]]=e._bounds;e.overflow=[b<A?-1:b>k?1:0,y<x?-1:y>ct?1:0],e._movementBound[0]=e.overflow[0]?e._movementBound[0]===!1?e._movement[0]:e._movementBound[0]:!1,e._movementBound[1]=e.overflow[1]?e._movementBound[1]===!1?e._movement[1]:e._movementBound[1]:!1;const ut=e._active?i.rubberband||[0,0]:[0,0];if(e.offset=gt(e._bounds,e.offset,ut),e.delta=l.sub(e.offset,m),this.computeMovement(),g&&(!e.last||r>Pt)){e.delta=l.sub(e.offset,m);const E=e.delta.map(Math.abs);l.addTo(e.distance,E),e.direction=e.delta.map(Math.sign),e._direction=e._delta.map(Math.sign),!e.first&&r>0&&(e.velocity=[E[0]/r,E[1]/r],e.timeDelta=r)}}emit(){const t=this.state,e=this.shared,i=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!i.triggerAllEvents)return;const n=this.handler(d(d(d({},e),t),{},{[this.aliasKey]:t.values}));n!==void 0&&(t.memo=n)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function Mt([s,t],e){const i=Math.abs(s),n=Math.abs(t);if(i>n&&i>e)return"x";if(n>i&&n>e)return"y"}class D extends it{constructor(...t){super(...t),p(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=l.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=l.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const e=this.state,i=this.config;if(!e.axis&&t){const n=typeof i.axisThreshold=="object"?i.axisThreshold[tt(t)]:i.axisThreshold;e.axis=Mt(e._movement,n)}e._blocked=(i.lockDirection||!!i.axis)&&!e.axis||!!i.axis&&i.axis!==e.axis}restrictToAxis(t){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":t[1]=0;break;case"y":t[0]=0;break}}}const Lt=s=>s,$=.15,nt={enabled(s=!0){return s},eventOptions(s,t,e){return d(d({},e.shared.eventOptions),s)},preventDefault(s=!1){return s},triggerAllEvents(s=!1){return s},rubberband(s=0){switch(s){case!0:return[$,$];case!1:return[0,0];default:return l.toVector(s)}},from(s){if(typeof s=="function")return s;if(s!=null)return l.toVector(s)},transform(s,t,e){const i=s||e.shared.transform;return this.hasCustomTransform=!!i,i||Lt},threshold(s){return l.toVector(s,0)}},Rt=0,w=d(d({},nt),{},{axis(s,t,{axis:e}){if(this.lockDirection=e==="lock",!this.lockDirection)return e},axisThreshold(s=Rt){return s},bounds(s={}){if(typeof s=="function")return r=>w.bounds(s(r));if("current"in s)return()=>s.current;if(typeof HTMLElement=="function"&&s instanceof HTMLElement)return s;const{left:t=-1/0,right:e=1/0,top:i=-1/0,bottom:n=1/0}=s;return[[t,e],[i,n]]}}),F={ArrowRight:(s,t=1)=>[s*t,0],ArrowLeft:(s,t=1)=>[-1*s*t,0],ArrowUp:(s,t=1)=>[0,-1*s*t],ArrowDown:(s,t=1)=>[0,s*t]};class Kt extends D{constructor(...t){super(...t),p(this,"ingKey","dragging")}reset(){super.reset();const t=this.state;t._pointerId=void 0,t._pointerActive=!1,t._keyboardActive=!1,t._preventScroll=!1,t._delayed=!1,t.swipe=[0,0],t.tap=!1,t.canceled=!1,t.cancel=this.cancel.bind(this)}setup(){const t=this.state;if(t._bounds instanceof HTMLElement){const e=t._bounds.getBoundingClientRect(),i=t.currentTarget.getBoundingClientRect(),n={left:e.left-i.left+t.offset[0],right:e.right-i.right+t.offset[0],top:e.top-i.top+t.offset[1],bottom:e.bottom-i.bottom+t.offset[1]};t._bounds=w.bounds(n)}}cancel(){const t=this.state;t.canceled||(t.canceled=!0,t._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(t){const e=this.config,i=this.state;if(t.buttons!=null&&(Array.isArray(e.pointerButtons)?!e.pointerButtons.includes(t.buttons):e.pointerButtons!==-1&&e.pointerButtons!==t.buttons))return;const n=this.ctrl.setEventIds(t);e.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(n&&n.size>1&&i._pointerActive)&&(this.start(t),this.setupPointer(t),i._pointerId=V(t),i._pointerActive=!0,this.computeValues(S(t)),this.computeInitial(),e.preventScrollAxis&&tt(t)!=="mouse"?(i._active=!1,this.setupScrollPrevention(t)):e.delay>0?(this.setupDelayTrigger(t),e.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const e=this.state;e._active=!0,e._preventScroll=!0,e._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const e=this.state,i=this.config;if(!e._pointerActive)return;const n=V(t);if(e._pointerId!==void 0&&n!==e._pointerId)return;const r=S(t);if(document.pointerLockElement===t.target?e._delta=[t.movementX,t.movementY]:(e._delta=l.sub(r,e._values),this.computeValues(r)),l.addTo(e._movement,e._delta),this.compute(t),e._delayed&&e.intentional){this.timeoutStore.remove("dragDelay"),e.active=!1,this.startPointerDrag(t);return}if(i.preventScrollAxis&&!e._preventScroll)if(e.axis)if(e.axis===i.preventScrollAxis||i.preventScrollAxis==="xy"){e._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(t);return}else return;this.emit()}pointerUp(t){this.ctrl.setEventIds(t);try{this.config.pointerCapture&&t.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId)}catch{}const e=this.state,i=this.config;if(!e._active||!e._pointerActive)return;const n=V(t);if(e._pointerId!==void 0&&n!==e._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[r,o]=e._distance;if(e.tap=r<=i.tapsThreshold&&o<=i.tapsThreshold,e.tap&&i.filterTaps)e._force=!0;else{const[a,u]=e._delta,[h,c]=e._movement,[_,f]=i.swipe.velocity,[m,g]=i.swipe.distance,b=i.swipe.duration;if(e.elapsedTime<b){const y=Math.abs(a/e.timeDelta),A=Math.abs(u/e.timeDelta);y>_&&Math.abs(h)>m&&(e.swipe[0]=Math.sign(a)),A>f&&Math.abs(c)>g&&(e.swipe[1]=Math.sign(u))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const e=this.config,i=e.device;e.pointerLock&&t.currentTarget.requestPointerLock(),e.pointerCapture||(this.eventStore.add(this.sharedConfig.window,i,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(t){this.state._preventScroll&&t.cancelable&&t.preventDefault()}setupScrollPrevention(t){this.state._preventScroll=!1,Vt(t);const e=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",e),this.eventStore.add(this.sharedConfig.window,"touch","cancel",e),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,t)}setupDelayTrigger(t){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(t)},this.config.delay)}keyDown(t){const e=F[t.key];if(e){const i=this.state,n=t.shiftKey?10:t.altKey?.1:1;this.start(t),i._delta=e(this.config.keyboardDisplacement,n),i._keyboardActive=!0,l.addTo(i._movement,i._delta),this.compute(t),this.emit()}}keyUp(t){t.key in F&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const e=this.config.device;t(e,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(e,"change",this.pointerMove.bind(this)),t(e,"end",this.pointerUp.bind(this)),t(e,"cancel",this.pointerUp.bind(this)),t("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(t("key","down",this.keyDown.bind(this)),t("key","up",this.keyUp.bind(this))),this.config.filterTaps&&t("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function Vt(s){"persist"in s&&typeof s.persist=="function"&&s.persist()}const O=typeof window<"u"&&window.document&&window.document.createElement;function rt(){return O&&"ontouchstart"in window}function jt(){return rt()||O&&window.navigator.maxTouchPoints>1}function Ht(){return O&&"onpointerdown"in window}function Bt(){return O&&"exitPointerLock"in window.document}function Nt(){try{return"constructor"in GestureEvent}catch{return!1}}const v={isBrowser:O,gesture:Nt(),touch:rt(),touchscreen:jt(),pointer:Ht(),pointerLock:Bt()},Ut=250,Yt=180,Gt=.5,Xt=50,Wt=250,zt=10,q={mouse:0,touch:0,pen:8},Zt=d(d({},w),{},{device(s,t,{pointer:{touch:e=!1,lock:i=!1,mouse:n=!1}={}}){return this.pointerLock=i&&v.pointerLock,v.touch&&e?"touch":this.pointerLock?"mouse":v.pointer&&!n?"pointer":v.touch?"touch":"mouse"},preventScrollAxis(s,t,{preventScroll:e}){if(this.preventScrollDelay=typeof e=="number"?e:e||e===void 0&&s?Ut:void 0,!(!v.touchscreen||e===!1))return s||(e!==void 0?"y":void 0)},pointerCapture(s,t,{pointer:{capture:e=!0,buttons:i=1,keys:n=!0}={}}){return this.pointerButtons=i,this.keys=n,!this.pointerLock&&this.device==="pointer"&&e},threshold(s,t,{filterTaps:e=!1,tapsThreshold:i=3,axis:n=void 0}){const r=l.toVector(s,e?i:n?1:0);return this.filterTaps=e,this.tapsThreshold=i,r},swipe({velocity:s=Gt,distance:t=Xt,duration:e=Wt}={}){return{velocity:this.transform(l.toVector(s)),distance:this.transform(l.toVector(t)),duration:e}},delay(s=0){switch(s){case!0:return Yt;case!1:return 0;default:return s}},axisThreshold(s){return s?d(d({},q),s):q},keyboardDisplacement(s=zt){return s}});function ot(s){const[t,e]=s.overflow,[i,n]=s._delta,[r,o]=s._direction;(t<0&&i>0&&r<0||t>0&&i<0&&r>0)&&(s._movement[0]=s._movementBound[0]),(e<0&&n>0&&o<0||e>0&&n<0&&o>0)&&(s._movement[1]=s._movementBound[1])}const $t=30,Ft=100;class qt extends it{constructor(...t){super(...t),p(this,"ingKey","pinching"),p(this,"aliasKey","da")}init(){this.state.offset=[1,0],this.state.lastOffset=[1,0],this.state._pointerEvents=new Map}reset(){super.reset();const t=this.state;t._touchIds=[],t.canceled=!1,t.cancel=this.cancel.bind(this),t.turns=0}computeOffset(){const{type:t,movement:e,lastOffset:i}=this.state;t==="wheel"?this.state.offset=l.add(e,i):this.state.offset=[(1+e[0])*i[0],e[1]+i[1]]}computeMovement(){const{offset:t,lastOffset:e}=this.state;this.state.movement=[t[0]/e[0],t[1]-e[1]]}axisIntent(){const t=this.state,[e,i]=t._movement;if(!t.axis){const n=Math.abs(e)*$t-Math.abs(i);n<0?t.axis="angle":n>0&&(t.axis="scale")}}restrictToAxis(t){this.config.lockDirection&&(this.state.axis==="scale"?t[1]=0:this.state.axis==="angle"&&(t[0]=0))}cancel(){const t=this.state;t.canceled||setTimeout(()=>{t.canceled=!0,t._active=!1,this.compute(),this.emit()},0)}touchStart(t){this.ctrl.setEventIds(t);const e=this.state,i=this.ctrl.touchIds;if(e._active&&e._touchIds.every(r=>i.has(r))||i.size<2)return;this.start(t),e._touchIds=Array.from(i).slice(0,2);const n=X(t,e._touchIds);n&&this.pinchStart(t,n)}pointerStart(t){if(t.buttons!=null&&t.buttons%2!==1)return;this.ctrl.setEventIds(t),t.target.setPointerCapture(t.pointerId);const e=this.state,i=e._pointerEvents,n=this.ctrl.pointerIds;if(e._active&&Array.from(i.keys()).every(o=>n.has(o))||(i.size<2&&i.set(t.pointerId,t),e._pointerEvents.size<2))return;this.start(t);const r=j(...Array.from(i.values()));r&&this.pinchStart(t,r)}pinchStart(t,e){const i=this.state;i.origin=e.origin,this.computeValues([e.distance,e.angle]),this.computeInitial(),this.compute(t),this.emit()}touchMove(t){if(!this.state._active)return;const e=X(t,this.state._touchIds);e&&this.pinchMove(t,e)}pointerMove(t){const e=this.state._pointerEvents;if(e.has(t.pointerId)&&e.set(t.pointerId,t),!this.state._active)return;const i=j(...Array.from(e.values()));i&&this.pinchMove(t,i)}pinchMove(t,e){const i=this.state,n=i._values[1],r=e.angle-n;let o=0;Math.abs(r)>270&&(o+=Math.sign(r)),this.computeValues([e.distance,e.angle-360*o]),i.origin=e.origin,i.turns=o,i._movement=[i._values[0]/i._initial[0]-1,i._values[1]-i._initial[1]],this.compute(t),this.emit()}touchEnd(t){this.ctrl.setEventIds(t),this.state._active&&this.state._touchIds.some(e=>!this.ctrl.touchIds.has(e))&&(this.state._active=!1,this.compute(t),this.emit())}pointerEnd(t){const e=this.state;this.ctrl.setEventIds(t);try{t.target.releasePointerCapture(t.pointerId)}catch{}e._pointerEvents.has(t.pointerId)&&e._pointerEvents.delete(t.pointerId),e._active&&e._pointerEvents.size<2&&(e._active=!1,this.compute(t),this.emit())}gestureStart(t){t.cancelable&&t.preventDefault();const e=this.state;e._active||(this.start(t),this.computeValues([t.scale,t.rotation]),e.origin=[t.clientX,t.clientY],this.compute(t),this.emit())}gestureMove(t){if(t.cancelable&&t.preventDefault(),!this.state._active)return;const e=this.state;this.computeValues([t.scale,t.rotation]),e.origin=[t.clientX,t.clientY];const i=e._movement;e._movement=[t.scale-1,t.rotation],e._delta=l.sub(e._movement,i),this.compute(t),this.emit()}gestureEnd(t){this.state._active&&(this.state._active=!1,this.compute(t),this.emit())}wheel(t){const e=this.config.modifierKey;e&&(Array.isArray(e)?!e.find(i=>t[i]):!t[e])||(this.state._active?this.wheelChange(t):this.wheelStart(t),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this)))}wheelStart(t){this.start(t),this.wheelChange(t)}wheelChange(t){"uv"in t||t.cancelable&&t.preventDefault();const i=this.state;i._delta=[-st(t)[1]/Ft*i.offset[0],0],l.addTo(i._movement,i._delta),ot(i),this.state.origin=[t.clientX,t.clientY],this.compute(t),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(t){const e=this.config.device;e&&(t(e,"start",this[e+"Start"].bind(this)),t(e,"change",this[e+"Move"].bind(this)),t(e,"end",this[e+"End"].bind(this)),t(e,"cancel",this[e+"End"].bind(this)),t("lostPointerCapture","",this[e+"End"].bind(this))),this.config.pinchOnWheel&&t("wheel","",this.wheel.bind(this),{passive:!1})}}const Jt=d(d({},nt),{},{device(s,t,{shared:e,pointer:{touch:i=!1}={}}){if(e.target&&!v.touch&&v.gesture)return"gesture";if(v.touch&&i)return"touch";if(v.touchscreen){if(v.pointer)return"pointer";if(v.touch)return"touch"}},bounds(s,t,{scaleBounds:e={},angleBounds:i={}}){const n=o=>{const a=Z(M(e,o),{min:-1/0,max:1/0});return[a.min,a.max]},r=o=>{const a=Z(M(i,o),{min:-1/0,max:1/0});return[a.min,a.max]};return typeof e!="function"&&typeof i!="function"?[n(),r()]:o=>[n(o),r(o)]},threshold(s,t,e){return this.lockDirection=e.axis==="lock",l.toVector(s,this.lockDirection?[.1,3]:0)},modifierKey(s){return s===void 0?"ctrlKey":s},pinchOnWheel(s=!0){return s}});class Qt extends D{constructor(...t){super(...t),p(this,"ingKey","moving")}move(t){this.config.mouseOnly&&t.pointerType!=="mouse"||(this.state._active?this.moveChange(t):this.moveStart(t),this.timeoutStore.add("moveEnd",this.moveEnd.bind(this)))}moveStart(t){this.start(t),this.computeValues(S(t)),this.compute(t),this.computeInitial(),this.emit()}moveChange(t){if(!this.state._active)return;const e=S(t),i=this.state;i._delta=l.sub(e,i._values),l.addTo(i._movement,i._delta),this.computeValues(e),this.compute(t),this.emit()}moveEnd(t){this.state._active&&(this.state._active=!1,this.compute(t),this.emit())}bind(t){t("pointer","change",this.move.bind(this)),t("pointer","leave",this.moveEnd.bind(this))}}const te=d(d({},w),{},{mouseOnly:(s=!0)=>s});class ee extends D{constructor(...t){super(...t),p(this,"ingKey","scrolling")}scroll(t){this.state._active||this.start(t),this.scrollChange(t),this.timeoutStore.add("scrollEnd",this.scrollEnd.bind(this))}scrollChange(t){t.cancelable&&t.preventDefault();const e=this.state,i=Ot(t);e._delta=l.sub(i,e._values),l.addTo(e._movement,e._delta),this.computeValues(i),this.compute(t),this.emit()}scrollEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(t){t("scroll","",this.scroll.bind(this))}}const se=w;class ie extends D{constructor(...t){super(...t),p(this,"ingKey","wheeling")}wheel(t){this.state._active||this.start(t),this.wheelChange(t),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this))}wheelChange(t){const e=this.state;e._delta=st(t),l.addTo(e._movement,e._delta),ot(e),this.compute(t),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(t){t("wheel","",this.wheel.bind(this))}}const ne=w;class re extends D{constructor(...t){super(...t),p(this,"ingKey","hovering")}enter(t){this.config.mouseOnly&&t.pointerType!=="mouse"||(this.start(t),this.computeValues(S(t)),this.compute(t),this.emit())}leave(t){if(this.config.mouseOnly&&t.pointerType!=="mouse")return;const e=this.state;if(!e._active)return;e._active=!1;const i=S(t);e._movement=e._delta=l.sub(i,e._values),this.computeValues(i),this.compute(t),e.delta=e.movement,this.emit()}bind(t){t("pointer","enter",this.enter.bind(this)),t("pointer","leave",this.leave.bind(this))}}const oe=d(d({},w),{},{mouseOnly:(s=!0)=>s}),B=new Map,H=new Map;function ae(s){B.set(s.key,s.engine),H.set(s.key,s.resolver)}const ce={key:"drag",engine:Kt,resolver:Zt},ue={key:"hover",engine:re,resolver:oe},he={key:"move",engine:Qt,resolver:te},le={key:"pinch",engine:qt,resolver:Jt},fe={key:"scroll",engine:ee,resolver:se},de={key:"wheel",engine:ie,resolver:ne};function pe(s,t){if(s==null)return{};var e={},i=Object.keys(s),n,r;for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&(e[n]=s[n]);return e}function me(s,t){if(s==null)return{};var e=pe(s,t),i,n;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(s);for(n=0;n<r.length;n++)i=r[n],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(s,i)&&(e[i]=s[i])}return e}const ge={target(s){if(s)return()=>"current"in s?s.current:s},enabled(s=!0){return s},window(s=v.isBrowser?window:void 0){return s},eventOptions({passive:s=!0,capture:t=!1}={}){return{passive:s,capture:t}},transform(s){return s}},_e=["target","eventOptions","window","enabled","transform"];function P(s={},t){const e={};for(const[i,n]of Object.entries(t))switch(typeof n){case"function":e[i]=n.call(e,s[i],i,s);break;case"object":e[i]=P(s[i],n);break;case"boolean":n&&(e[i]=s[i]);break}return e}function ve(s,t,e={}){const i=s,{target:n,eventOptions:r,window:o,enabled:a,transform:u}=i,h=me(i,_e);if(e.shared=P({target:n,eventOptions:r,window:o,enabled:a,transform:u},ge),t){const c=H.get(t);e[t]=P(d({shared:e.shared},h),c)}else for(const c in h){const _=H.get(c);_&&(e[c]=P(d({shared:e.shared},h[c]),_))}return e}class at{constructor(t,e){p(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=e}add(t,e,i,n,r){const o=this._listeners,a=Tt(e,i),u=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},h=d(d({},u),r);t.addEventListener(a,n,h);const c=()=>{t.removeEventListener(a,n,h),o.delete(c)};return o.add(c),c}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class ye{constructor(){p(this,"_timeouts",new Map)}add(t,e,i=140,...n){this.remove(t),this._timeouts.set(t,window.setTimeout(e,i,...n))}remove(t){const e=this._timeouts.get(t);e&&window.clearTimeout(e)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}class be{constructor(t){p(this,"gestures",new Set),p(this,"_targetEventStore",new at(this)),p(this,"gestureEventStores",{}),p(this,"gestureTimeoutStores",{}),p(this,"handlers",{}),p(this,"config",{}),p(this,"pointerIds",new Set),p(this,"touchIds",new Set),p(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Ee(this,t)}setEventIds(t){if(L(t))return this.touchIds=new Set(Dt(t)),this.touchIds;if("pointerId"in t)return t.type==="pointerup"||t.type==="pointercancel"?this.pointerIds.delete(t.pointerId):t.type==="pointerdown"&&this.pointerIds.add(t.pointerId),this.pointerIds}applyHandlers(t,e){this.handlers=t,this.nativeHandlers=e}applyConfig(t,e){this.config=ve(t,e,this.config)}clean(){this._targetEventStore.clean();for(const t of this.gestures)this.gestureEventStores[t].clean(),this.gestureTimeoutStores[t].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...t){const e=this.config.shared,i={};let n;if(!(e.target&&(n=e.target(),!n))){if(e.enabled){for(const o of this.gestures){const a=this.config[o],u=J(i,a.eventOptions,!!n);if(a.enabled){const h=B.get(o);new h(this,t,o).bind(u)}}const r=J(i,e.eventOptions,!!n);for(const o in this.nativeHandlers)r(o,"",a=>this.nativeHandlers[o](d(d({},this.state.shared),{},{event:a,args:t})),void 0,!0)}for(const r in i)i[r]=Ct(...i[r]);if(!n)return i;for(const r in i){const{device:o,capture:a,passive:u}=It(r);this._targetEventStore.add(n,o,"",i[r],{capture:a,passive:u})}}}}function I(s,t){s.gestures.add(t),s.gestureEventStores[t]=new at(s,t),s.gestureTimeoutStores[t]=new ye}function Ee(s,t){t.drag&&I(s,"drag"),t.wheel&&I(s,"wheel"),t.scroll&&I(s,"scroll"),t.move&&I(s,"move"),t.pinch&&I(s,"pinch"),t.hover&&I(s,"hover")}const J=(s,t,e)=>(i,n,r,o={},a=!1)=>{var u,h;const c=(u=o.capture)!==null&&u!==void 0?u:t.capture,_=(h=o.passive)!==null&&h!==void 0?h:t.passive;let f=a?i:Et(i,n,c);e&&_&&(f+="Passive"),s[f]=s[f]||[],s[f].push(r)},we=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function Ie(s){const t={},e={},i=new Set;for(let n in s)we.test(n)?(i.add(RegExp.lastMatch),e[n]=s[n]):t[n]=s[n];return[e,t,i]}function T(s,t,e,i,n,r){if(!s.has(e)||!B.has(i))return;const o=e+"Start",a=e+"End",u=h=>{let c;return h.first&&o in t&&t[o](h),e in t&&(c=t[e](h)),h.last&&a in t&&t[a](h),c};n[i]=u,r[i]=r[i]||{}}function Te(s,t){const[e,i,n]=Ie(s),r={};return T(n,e,"onDrag","drag",r,t),T(n,e,"onWheel","wheel",r,t),T(n,e,"onScroll","scroll",r,t),T(n,e,"onPinch","pinch",r,t),T(n,e,"onMove","move",r,t),T(n,e,"onHover","hover",r,t),{handlers:r,config:t,nativeHandlers:i}}function Se(s,t={},e,i){const n=R.useMemo(()=>new be(s),[]);if(n.applyHandlers(s,i),n.applyConfig(t,e),R.useEffect(n.effect.bind(n)),R.useEffect(()=>n.clean.bind(n),[]),t.target===void 0)return n.bind.bind(n)}function Ae(s){return s.forEach(ae),function(e,i){const{handlers:n,nativeHandlers:r,config:o}=Te(e,i||{});return Se(n,o,void 0,r)}}function De(s,t){return Ae([ce,le,fe,de,he,ue])(s,t||{})}function je(s){const{pos:t,size:e,zIndex:i,pointer:n="pointer",enabled:r=!0,displayPos:o=[0,0]}=s,a=dt(),u=lt.useRef(void 0),{htmlToData:h}=pt(),{camera:c}=ft(),_=De({onHover:({hovering:f})=>{var m;if(a){if(f){if((m=u.current)!=null&&m.uid)return;u.current={uid:a.mouseInteractionOverlay.register(i,n,s.onEnter,s.onLeave),dataOffset:[0,0]}}else if(u.current){const g=u.current.uid;a.mouseInteractionOverlay.isCurrent(g)||(u.current=void 0,a.mouseInteractionOverlay.unregister(g))}}},onDragStart:({cancel:f,xy:m})=>{if(!a)return;if(!u.current){f();return}const g=u.current.uid;if(!a.mouseInteractionOverlay.capture(g)){f();return}const y=h(c,new K(m[0],m[1],0));u.current.dataOffset=[t[0]-y.x,t[1]-y.y]},onDrag:({cancel:f,xy:m,offset:[g,b],intentional:y})=>{var x;if(!a)return;if(!u.current){f();return}const A=u.current.uid;if(!a.mouseInteractionOverlay.isCurrent(A)){f();return}const k=h(c,new K(m[0],m[1],0));(x=s.onPositionChanged)==null||x.call(s,[k.x+u.current.dataOffset[0],k.y+u.current.dataOffset[1]],!0)},onDragEnd:({cancel:f,xy:m})=>{var y;if(!a)return;const g=u.current;if(!g){f();return}if(!a.mouseInteractionOverlay.isCurrent(g.uid)){f();return}a.mouseInteractionOverlay.release(g.uid);const b=h(c,new K(m[0],m[1],0));(y=s.onPositionChanged)==null||y.call(s,[b.x+g.dataOffset[0],b.y+g.dataOffset[1]],!1)}},{drag:{pointer:{capture:!0,buttons:[1]}}});return C.jsxs("mesh",{position:[o[0],o[1],i],...r?_():{},children:[C.jsx("ambientLight",{}),C.jsx("planeGeometry",{attach:"geometry",args:[e[0],e[1],1,1]}),C.jsx("meshBasicMaterial",{attach:"material",transparent:!0,color:void 0,opacity:0})]})}export{Ve as A,je as D,Ce as S,Ke as Z,Pe as a,Re as b,Me as c,Le as d};
@@ -0,0 +1 @@
1
+ import{P as o,r as D,j as r,aH as b,c0 as h,c1 as j}from"./index-b3c0133a.js";import{a as v}from"./types-c366a377.js";const y={id:o.string,href:o.string,onClick:o.func,title:o.node.isRequired,disabled:o.bool,align:v,menuRole:o.string,renderMenuOnMount:o.bool,rootCloseEvent:o.string,menuVariant:o.oneOf(["dark"]),flip:o.bool,bsPrefix:o.string,variant:o.string,size:o.string},n=D.forwardRef(({title:e,children:s,bsPrefix:i,rootCloseEvent:t,variant:a,size:p,menuRole:d,renderMenuOnMount:l,disabled:f,href:c,id:u,menuVariant:g,flip:x,...m},w)=>r.jsxs(b,{ref:w,...m,children:[r.jsx(h,{id:u,href:c,size:p,variant:a,disabled:f,childBsPrefix:i,children:e}),r.jsx(j,{role:d,renderOnMount:l,rootCloseEvent:t,variant:g,flip:x,children:s})]}));n.displayName="DropdownButton";n.propTypes=y;const B=n;export{B as D};
@@ -0,0 +1 @@
1
+ import{j as e,aH as v,i as L,R as r,as as l,C as c,B as o}from"./index-b3c0133a.js";import{a as w}from"./index-a9bb7636.js";import{I as N}from"./ColorMap-be59ad21.js";import{A as x}from"./colormap-6e43299c.js";import{L as I,S as C,a as M}from"./AutoscaleOption-3cb99678.js";function b(a){if(!a.array||!a.array.info)return e.jsx(e.Fragment,{});function h(t){return t<1e3?`${t} B`:t<1e5?`${(t/1e3).toFixed(1)} KB`:`${(t/1e6).toFixed(1)} MB`}function j(t){return t.map(f=>`${f}`).join(" × ")}const s=a.array.info;return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx("h6",{className:"flex-grow-1 text-center",children:"Info"})}),e.jsxs(r,{children:[e.jsx(c,{children:e.jsx("h6",{children:"Shape"})}),e.jsx(c,{children:j(a.array.array.shape)})]}),e.jsxs(r,{children:[e.jsx(c,{children:e.jsx("h6",{children:"Profile"})}),e.jsx(c,{children:s.profile})]}),e.jsxs(r,{children:[e.jsx(c,{children:e.jsx("h6",{children:"Size"})}),e.jsx(c,{children:h(s.byteLength)})]}),e.jsxs(r,{children:[e.jsx(c,{children:e.jsx("h6",{title:"Data type of the source",children:"Type"})}),e.jsx(c,{children:s.dtype})]})]})}function B(a){const{as:h=void 0,showDisplayed:j=!0}=a;function s(n,i){const m=a.lut===n?"primary":"secondary";return e.jsx(o,{variant:m,onClick:()=>{a.onSelectLut(n)},className:"text-nowrap",title:i,size:"sm",children:e.jsx(I,{name:n})})}function t(n){const i=a.autoscaleMode===n,d=i&&a.autoscale?"primary":i?"warning":"secondary",y={[x.Minmax]:"Minmax",[x.StdDev3]:"3×std",[x.None]:"Manual"}[n];return e.jsx(o,{variant:d,onClick:()=>{a.onSelectAutoscaleMode(n),a.onSelectAutoscale(!0)},size:"sm",children:y})}function f(){const n=a.autoscale?"primary":"secondary";return e.jsxs(o,{variant:n,onClick:()=>{a.onSelectAutoscale(!a.autoscale)},size:"sm",children:[e.jsx("i",{className:"fa-solid fa-circle-half-stroke fa-fw fa-lg"})," Auto scale enabled"]})}function S(){const n=a.isInverted?"primary":"secondary";return e.jsxs(o,{variant:n,onClick:()=>{a.onSelectInvertion(!a.isInverted)},size:"sm",children:[e.jsx("i",{className:"fa fa-fw fa-arrows-alt-v"})," Inverted LUT"]})}function u(n,i){const m=a.norm===n?"primary":"secondary";return e.jsx(o,{variant:m,onClick:()=>{a.onSelectNorm(n)},size:"sm",children:i})}function D(){const n=a.isDisplayed?"primary":"secondary";return e.jsx(o,{variant:n,onClick:()=>{a.onSelectDisplayed(!a.isDisplayed)},size:"sm",children:"Display detector data"})}function g(n,i,d){const y=a.profile===n?"primary":"secondary";return e.jsx(o,{variant:y,onClick:()=>{a.onSelectProfile(n)},size:"sm",title:d,children:i})}return e.jsxs(v,{as:h,className:`${a.dropDirection==="up"?"dropup":""}`,children:[e.jsxs(v.Toggle,{id:"dropdown-basic",variant:a.variant,className:"d-flex align-items-center",children:[e.jsx("i",{className:"fa fam-hardware-camera fa-lg me-1"}),a.isDisplayed&&e.jsxs(e.Fragment,{children:[e.jsx(I,{name:a.lut}),e.jsx(C,{scale:a.norm}),a.autoscale&&e.jsx(M,{autoscale:a.autoscaleMode})]})]}),e.jsx(v.Menu,{className:"dropdown-menu-center",children:e.jsx("div",{className:"ms-1 me-1",children:e.jsxs(L,{children:[j&&e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx("h6",{className:"flex-grow-1 text-center",children:"Detector"})}),e.jsx(r,{children:e.jsx(l,{className:"flex-grow-1 mt-1 mb-2",children:D()})})]}),e.jsx(r,{children:e.jsx("h6",{className:"flex-grow-1 text-center",children:"Lookup table"})}),e.jsx(r,{children:e.jsxs(l,{className:"flex-grow-1",children:[s("Greys","Gray"),s("Viridis","Viridis"),s("Cividis","Cividis"),s("Magma","Magma"),s("Inferno","Inferno"),s("Plasma","Plasma")]})}),e.jsx(r,{children:e.jsx(l,{className:"flex-grow-1 mt-1 mb-2",children:S()})}),e.jsx(r,{children:e.jsx("h6",{className:"flex-grow-1 text-center",children:"Auto scale"})}),e.jsx(r,{children:e.jsxs(l,{className:"flex-grow-1 mt-1",children:[t(x.Minmax),t(x.StdDev3)]})}),e.jsx(r,{children:e.jsx(l,{className:"flex-grow-1 mt-1 mb-2",children:f()})}),e.jsx(r,{children:e.jsx("h6",{className:"flex-grow-1 text-center",children:"Normalization"})}),e.jsx(r,{children:e.jsxs(l,{className:"flex-grow-1 mt-1 mb-2",children:[u(w.Linear,"Linear"),u(w.Log,"Log"),u(w.SymLog,"SymLog")]})}),e.jsx(r,{children:e.jsx("h6",{className:"flex-grow-1 text-center",title:"How to transfer the data",children:"Profile"})}),e.jsx(r,{children:e.jsxs(l,{className:"flex-grow-1 mt-1 mb-2",children:[g(N.Raw,"Raw","Transfer data as it is provided by the detector or the processing"),g(N.F16,"Float 16b","Transfer data as float 16-bits"),g(N.U8,"8-bits","Transfer data as 8-bits")]})}),e.jsx(b,{array:a.array})]})})})]})}export{B as D};