smoothly 0.1.112 → 0.1.115

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 (246) hide show
  1. package/dist/cjs/{Notice-9c2b52b7.js → Notice-839702d8.js} +34 -26
  2. package/dist/cjs/{Trigger-74bd1ee8.js → Trigger-cf376531.js} +55 -146
  3. package/dist/cjs/{index-41a36ce2.js → index-1c61bdd3.js} +27 -1
  4. package/dist/cjs/index.cjs.js +20 -8
  5. package/dist/cjs/loader.cjs.js +3 -19
  6. package/dist/cjs/{smoothly-accordion_50.cjs.entry.js → smoothly-accordion_51.cjs.entry.js} +7694 -1487
  7. package/dist/cjs/smoothly-google-font.cjs.entry.js +2 -2
  8. package/dist/cjs/smoothly-radio-group.cjs.entry.js +2 -2
  9. package/dist/cjs/smoothly-reorder.cjs.entry.js +2 -2
  10. package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +5 -5
  11. package/dist/cjs/smoothly-trigger-source.cjs.entry.js +5 -5
  12. package/dist/cjs/smoothly.cjs.js +5 -113
  13. package/dist/collection/collection-manifest.json +3 -2
  14. package/dist/collection/components/app-demo/index.js +6 -1
  15. package/dist/collection/components/button/index.js +168 -0
  16. package/dist/collection/components/button/style.css +49 -0
  17. package/dist/collection/components/input/style.css +2 -2
  18. package/dist/collection/components/picker/index.js +10 -6
  19. package/dist/collection/components/trigger/style.css +3 -3
  20. package/dist/custom-elements/index.d.ts +6 -0
  21. package/dist/custom-elements/index.js +7781 -2970
  22. package/dist/esm/{Notice-4131b4e0.js → Notice-608b552c.js} +34 -26
  23. package/dist/esm/{Trigger-d7b181ec.js → Trigger-365408f0.js} +55 -146
  24. package/dist/esm/{index-dcb2b612.js → index-a3737440.js} +27 -1
  25. package/dist/esm/index.js +17 -4
  26. package/dist/esm/loader.js +3 -19
  27. package/dist/esm/polyfills/css-shim.js +1 -1
  28. package/dist/esm/{smoothly-accordion_50.entry.js → smoothly-accordion_51.entry.js} +7694 -1488
  29. package/dist/esm/smoothly-google-font.entry.js +2 -2
  30. package/dist/esm/smoothly-radio-group.entry.js +2 -2
  31. package/dist/esm/smoothly-reorder.entry.js +2 -2
  32. package/dist/esm/smoothly-trigger-sink.entry.js +3 -3
  33. package/dist/esm/smoothly-trigger-source.entry.js +3 -3
  34. package/dist/esm/smoothly.js +5 -113
  35. package/dist/smoothly/index.esm.js +1 -376
  36. package/dist/smoothly/p-0215b4da.entry.js +1 -0
  37. package/dist/smoothly/{p-074a0448.js → p-0cba3e3d.js} +1 -1
  38. package/dist/smoothly/p-18a1063c.entry.js +1 -0
  39. package/dist/smoothly/p-6ca0d36c.js +1 -0
  40. package/dist/smoothly/p-6f009ac9.entry.js +1 -0
  41. package/dist/smoothly/p-7a30d9b8.js +1 -0
  42. package/dist/smoothly/p-8ae38136.entry.js +1 -0
  43. package/dist/smoothly/p-993534fa.entry.js +1 -0
  44. package/dist/smoothly/p-eec1c703.entry.js +1 -0
  45. package/dist/smoothly/smoothly.esm.js +1 -125
  46. package/dist/types/components/button/index.d.ts +11 -0
  47. package/dist/types/components.d.ts +27 -0
  48. package/dist/types/stencil-public-runtime.d.ts +6 -4
  49. package/package.json +18 -18
  50. package/dist/cjs/App-339acc9b.js +0 -647
  51. package/dist/cjs/_commonjsHelpers-10109b76.js +0 -48
  52. package/dist/cjs/app-globals-3a1e7e63.js +0 -5
  53. package/dist/cjs/css-shim-88cc6900.js +0 -6
  54. package/dist/cjs/dom-95afd968.js +0 -75
  55. package/dist/cjs/generate-f9a36f25.js +0 -66
  56. package/dist/cjs/index-138c41c2.js +0 -3066
  57. package/dist/cjs/index-40d009d5.js +0 -1354
  58. package/dist/cjs/index-ac32385c.js +0 -18850
  59. package/dist/cjs/index-d66869d7.js +0 -1672
  60. package/dist/cjs/shadow-css-71d0f821.js +0 -391
  61. package/dist/cjs/smoothly-accordion-item.cjs.entry.js +0 -54
  62. package/dist/cjs/smoothly-accordion.cjs.entry.js +0 -55
  63. package/dist/cjs/smoothly-app-demo.cjs.entry.js +0 -29
  64. package/dist/cjs/smoothly-app.cjs.entry.js +0 -19
  65. package/dist/cjs/smoothly-backtotop.cjs.entry.js +0 -37
  66. package/dist/cjs/smoothly-calendar.cjs.entry.js +0 -95
  67. package/dist/cjs/smoothly-checkbox.cjs.entry.js +0 -18671
  68. package/dist/cjs/smoothly-dialog-demo.cjs.entry.js +0 -16
  69. package/dist/cjs/smoothly-dialog.cjs.entry.js +0 -38
  70. package/dist/cjs/smoothly-display-amount.cjs.entry.js +0 -59
  71. package/dist/cjs/smoothly-display-date-time.cjs.entry.js +0 -20
  72. package/dist/cjs/smoothly-display-demo.cjs.entry.js +0 -25
  73. package/dist/cjs/smoothly-display.cjs.entry.js +0 -41
  74. package/dist/cjs/smoothly-frame.cjs.entry.js +0 -50
  75. package/dist/cjs/smoothly-icon-demo.cjs.entry.js +0 -491
  76. package/dist/cjs/smoothly-icon.cjs.entry.js +0 -52
  77. package/dist/cjs/smoothly-input-date-range.cjs.entry.js +0 -50
  78. package/dist/cjs/smoothly-input-date.cjs.entry.js +0 -44
  79. package/dist/cjs/smoothly-input-demo.cjs.entry.js +0 -19
  80. package/dist/cjs/smoothly-input-month.cjs.entry.js +0 -41
  81. package/dist/cjs/smoothly-input.cjs.entry.js +0 -202
  82. package/dist/cjs/smoothly-item.cjs.entry.js +0 -43
  83. package/dist/cjs/smoothly-menu-options.cjs.entry.js +0 -108
  84. package/dist/cjs/smoothly-notification.cjs.entry.js +0 -67
  85. package/dist/cjs/smoothly-notifier.cjs.entry.js +0 -29
  86. package/dist/cjs/smoothly-option.cjs.entry.js +0 -33
  87. package/dist/cjs/smoothly-picker.cjs.entry.js +0 -151
  88. package/dist/cjs/smoothly-popup.cjs.entry.js +0 -38
  89. package/dist/cjs/smoothly-quiet.cjs.entry.js +0 -19
  90. package/dist/cjs/smoothly-radio.cjs.entry.js +0 -28
  91. package/dist/cjs/smoothly-room.cjs.entry.js +0 -16
  92. package/dist/cjs/smoothly-select-demo.cjs.entry.js +0 -86
  93. package/dist/cjs/smoothly-select.cjs.entry.js +0 -31
  94. package/dist/cjs/smoothly-selector.cjs.entry.js +0 -119
  95. package/dist/cjs/smoothly-skeleton.cjs.entry.js +0 -27
  96. package/dist/cjs/smoothly-spinner.cjs.entry.js +0 -24
  97. package/dist/cjs/smoothly-submit.cjs.entry.js +0 -60
  98. package/dist/cjs/smoothly-svg.cjs.entry.js +0 -41
  99. package/dist/cjs/smoothly-tab-switch.cjs.entry.js +0 -32
  100. package/dist/cjs/smoothly-tab.cjs.entry.js +0 -37
  101. package/dist/cjs/smoothly-table-cell.cjs.entry.js +0 -19
  102. package/dist/cjs/smoothly-table-demo.cjs.entry.js +0 -22
  103. package/dist/cjs/smoothly-table-expandable-cell.cjs.entry.js +0 -45
  104. package/dist/cjs/smoothly-table-expandable-row.cjs.entry.js +0 -32
  105. package/dist/cjs/smoothly-table-header.cjs.entry.js +0 -41
  106. package/dist/cjs/smoothly-table-row.cjs.entry.js +0 -38
  107. package/dist/cjs/smoothly-table.cjs.entry.js +0 -26
  108. package/dist/cjs/smoothly-trigger.cjs.entry.js +0 -36
  109. package/dist/cjs/smoothly-tuple.cjs.entry.js +0 -16
  110. package/dist/cjs/smoothly-urlencoded.cjs.entry.js +0 -19
  111. package/dist/esm/App-22187759.js +0 -645
  112. package/dist/esm/_commonjsHelpers-8fe71198.js +0 -44
  113. package/dist/esm/app-globals-0f993ce5.js +0 -3
  114. package/dist/esm/css-shim-c64026cd.js +0 -4
  115. package/dist/esm/dom-a712b575.js +0 -73
  116. package/dist/esm/generate-50b98474.js +0 -61
  117. package/dist/esm/index-02a70ac1.js +0 -3027
  118. package/dist/esm/index-401c6ce3.js +0 -1670
  119. package/dist/esm/index-a5a08f46.js +0 -18848
  120. package/dist/esm/index-c8b5d468.js +0 -1349
  121. package/dist/esm/shadow-css-1e16431b.js +0 -389
  122. package/dist/esm/smoothly-accordion-item.entry.js +0 -50
  123. package/dist/esm/smoothly-accordion.entry.js +0 -51
  124. package/dist/esm/smoothly-app-demo.entry.js +0 -25
  125. package/dist/esm/smoothly-app.entry.js +0 -15
  126. package/dist/esm/smoothly-backtotop.entry.js +0 -33
  127. package/dist/esm/smoothly-calendar.entry.js +0 -91
  128. package/dist/esm/smoothly-checkbox.entry.js +0 -18667
  129. package/dist/esm/smoothly-dialog-demo.entry.js +0 -12
  130. package/dist/esm/smoothly-dialog.entry.js +0 -34
  131. package/dist/esm/smoothly-display-amount.entry.js +0 -55
  132. package/dist/esm/smoothly-display-date-time.entry.js +0 -16
  133. package/dist/esm/smoothly-display-demo.entry.js +0 -21
  134. package/dist/esm/smoothly-display.entry.js +0 -37
  135. package/dist/esm/smoothly-frame.entry.js +0 -46
  136. package/dist/esm/smoothly-icon-demo.entry.js +0 -487
  137. package/dist/esm/smoothly-icon.entry.js +0 -48
  138. package/dist/esm/smoothly-input-date-range.entry.js +0 -46
  139. package/dist/esm/smoothly-input-date.entry.js +0 -40
  140. package/dist/esm/smoothly-input-demo.entry.js +0 -15
  141. package/dist/esm/smoothly-input-month.entry.js +0 -37
  142. package/dist/esm/smoothly-input.entry.js +0 -198
  143. package/dist/esm/smoothly-item.entry.js +0 -39
  144. package/dist/esm/smoothly-menu-options.entry.js +0 -104
  145. package/dist/esm/smoothly-notification.entry.js +0 -63
  146. package/dist/esm/smoothly-notifier.entry.js +0 -25
  147. package/dist/esm/smoothly-option.entry.js +0 -29
  148. package/dist/esm/smoothly-picker.entry.js +0 -147
  149. package/dist/esm/smoothly-popup.entry.js +0 -34
  150. package/dist/esm/smoothly-quiet.entry.js +0 -15
  151. package/dist/esm/smoothly-radio.entry.js +0 -24
  152. package/dist/esm/smoothly-room.entry.js +0 -12
  153. package/dist/esm/smoothly-select-demo.entry.js +0 -82
  154. package/dist/esm/smoothly-select.entry.js +0 -27
  155. package/dist/esm/smoothly-selector.entry.js +0 -115
  156. package/dist/esm/smoothly-skeleton.entry.js +0 -23
  157. package/dist/esm/smoothly-spinner.entry.js +0 -20
  158. package/dist/esm/smoothly-submit.entry.js +0 -56
  159. package/dist/esm/smoothly-svg.entry.js +0 -37
  160. package/dist/esm/smoothly-tab-switch.entry.js +0 -28
  161. package/dist/esm/smoothly-tab.entry.js +0 -33
  162. package/dist/esm/smoothly-table-cell.entry.js +0 -15
  163. package/dist/esm/smoothly-table-demo.entry.js +0 -18
  164. package/dist/esm/smoothly-table-expandable-cell.entry.js +0 -41
  165. package/dist/esm/smoothly-table-expandable-row.entry.js +0 -28
  166. package/dist/esm/smoothly-table-header.entry.js +0 -37
  167. package/dist/esm/smoothly-table-row.entry.js +0 -34
  168. package/dist/esm/smoothly-table.entry.js +0 -22
  169. package/dist/esm/smoothly-trigger.entry.js +0 -32
  170. package/dist/esm/smoothly-tuple.entry.js +0 -12
  171. package/dist/esm/smoothly-urlencoded.entry.js +0 -15
  172. package/dist/smoothly/App-22187759.js +0 -645
  173. package/dist/smoothly/GoogleFont-8474516b.js +0 -21
  174. package/dist/smoothly/_commonjsHelpers-8fe71198.js +0 -44
  175. package/dist/smoothly/app-globals-0f993ce5.js +0 -3
  176. package/dist/smoothly/css-shim-c64026cd.js +0 -4
  177. package/dist/smoothly/dom-a712b575.js +0 -73
  178. package/dist/smoothly/generate-50b98474.js +0 -61
  179. package/dist/smoothly/index-02a70ac1.js +0 -3027
  180. package/dist/smoothly/index-401c6ce3.js +0 -1670
  181. package/dist/smoothly/index-a5a08f46.js +0 -18848
  182. package/dist/smoothly/index-c8b5d468.js +0 -1349
  183. package/dist/smoothly/p-0c1e9588.entry.js +0 -1
  184. package/dist/smoothly/p-14232157.entry.js +0 -1
  185. package/dist/smoothly/p-19518931.js +0 -1
  186. package/dist/smoothly/p-22d4d5a7.entry.js +0 -1
  187. package/dist/smoothly/p-2cda1784.js +0 -1
  188. package/dist/smoothly/p-436cd558.entry.js +0 -1
  189. package/dist/smoothly/p-9fa3ab06.entry.js +0 -1
  190. package/dist/smoothly/p-b8a3e273.entry.js +0 -1
  191. package/dist/smoothly/shadow-css-1e16431b.js +0 -389
  192. package/dist/smoothly/smoothly-accordion-item.entry.js +0 -50
  193. package/dist/smoothly/smoothly-accordion.entry.js +0 -51
  194. package/dist/smoothly/smoothly-app-demo.entry.js +0 -25
  195. package/dist/smoothly/smoothly-app.entry.js +0 -15
  196. package/dist/smoothly/smoothly-backtotop.entry.js +0 -33
  197. package/dist/smoothly/smoothly-calendar.entry.js +0 -91
  198. package/dist/smoothly/smoothly-checkbox.entry.js +0 -18667
  199. package/dist/smoothly/smoothly-dialog-demo.entry.js +0 -12
  200. package/dist/smoothly/smoothly-dialog.entry.js +0 -34
  201. package/dist/smoothly/smoothly-display-amount.entry.js +0 -55
  202. package/dist/smoothly/smoothly-display-date-time.entry.js +0 -16
  203. package/dist/smoothly/smoothly-display-demo.entry.js +0 -21
  204. package/dist/smoothly/smoothly-display.entry.js +0 -37
  205. package/dist/smoothly/smoothly-frame.entry.js +0 -46
  206. package/dist/smoothly/smoothly-google-font.entry.js +0 -13
  207. package/dist/smoothly/smoothly-icon-demo.entry.js +0 -487
  208. package/dist/smoothly/smoothly-icon.entry.js +0 -48
  209. package/dist/smoothly/smoothly-input-date-range.entry.js +0 -46
  210. package/dist/smoothly/smoothly-input-date.entry.js +0 -40
  211. package/dist/smoothly/smoothly-input-demo.entry.js +0 -15
  212. package/dist/smoothly/smoothly-input-month.entry.js +0 -37
  213. package/dist/smoothly/smoothly-input.entry.js +0 -198
  214. package/dist/smoothly/smoothly-item.entry.js +0 -39
  215. package/dist/smoothly/smoothly-menu-options.entry.js +0 -104
  216. package/dist/smoothly/smoothly-notification.entry.js +0 -63
  217. package/dist/smoothly/smoothly-notifier.entry.js +0 -25
  218. package/dist/smoothly/smoothly-option.entry.js +0 -29
  219. package/dist/smoothly/smoothly-picker.entry.js +0 -147
  220. package/dist/smoothly/smoothly-popup.entry.js +0 -34
  221. package/dist/smoothly/smoothly-quiet.entry.js +0 -15
  222. package/dist/smoothly/smoothly-radio-group.entry.js +0 -16
  223. package/dist/smoothly/smoothly-radio.entry.js +0 -24
  224. package/dist/smoothly/smoothly-reorder.entry.js +0 -99
  225. package/dist/smoothly/smoothly-room.entry.js +0 -12
  226. package/dist/smoothly/smoothly-select-demo.entry.js +0 -82
  227. package/dist/smoothly/smoothly-select.entry.js +0 -27
  228. package/dist/smoothly/smoothly-selector.entry.js +0 -115
  229. package/dist/smoothly/smoothly-skeleton.entry.js +0 -23
  230. package/dist/smoothly/smoothly-spinner.entry.js +0 -20
  231. package/dist/smoothly/smoothly-submit.entry.js +0 -56
  232. package/dist/smoothly/smoothly-svg.entry.js +0 -37
  233. package/dist/smoothly/smoothly-tab-switch.entry.js +0 -28
  234. package/dist/smoothly/smoothly-tab.entry.js +0 -33
  235. package/dist/smoothly/smoothly-table-cell.entry.js +0 -15
  236. package/dist/smoothly/smoothly-table-demo.entry.js +0 -18
  237. package/dist/smoothly/smoothly-table-expandable-cell.entry.js +0 -41
  238. package/dist/smoothly/smoothly-table-expandable-row.entry.js +0 -28
  239. package/dist/smoothly/smoothly-table-header.entry.js +0 -37
  240. package/dist/smoothly/smoothly-table-row.entry.js +0 -34
  241. package/dist/smoothly/smoothly-table.entry.js +0 -22
  242. package/dist/smoothly/smoothly-trigger-sink.entry.js +0 -29
  243. package/dist/smoothly/smoothly-trigger-source.entry.js +0 -28
  244. package/dist/smoothly/smoothly-trigger.entry.js +0 -32
  245. package/dist/smoothly/smoothly-tuple.entry.js +0 -12
  246. package/dist/smoothly/smoothly-urlencoded.entry.js +0 -15
@@ -1 +0,0 @@
1
- import{r as t,c as s,a as i}from"./p-074a0448.js";let h=class{constructor(i){t(this,i),this.reorder=s(this,"reorder",7)}get children(){let t=[];if(this.childrenCache)t=this.childrenCache;else{for(let s=0;s<this.element.children.length;s++){const i=this.element.children[s];if(i instanceof HTMLElement){const s=i.getBoundingClientRect();t.push({top:s.top,middle:s.top+s.height/2,bottom:s.bottom,element:i})}}this.childrenCache=t}return t}onMouseDown(t){if(!this.move&&this.element.children.length>1){this.bounds=this.element.getBoundingClientRect(),this.childrenCache=void 0;const s=this.getCurrentIndex(t.clientY);this.dragged=Object.assign(Object.assign({},this.children[s]),{startY:t.clientY,offsetY:t.clientY-this.children[s].middle,index:s,height:s<this.children.length-1?this.children[s+1].top-this.children[s].top:this.children[s].bottom-this.children[s-1].bottom}),this.dragged.element.className+=" dragging"}}onMouseMove(t){if(this.dragged&&this.bounds&&t.clientY>=this.bounds.top&&t.clientY<=this.bounds.bottom){const s=this.getCurrentIndex(t.clientY-this.dragged.offsetY);this.translate(this.dragged.index,s,t.clientY-this.dragged.startY)}}onMouseUp(t){if(this.dragged){this.dragged.element.className=this.dragged.element.className.replace(" dragging","");const s=this.getCurrentIndex(t.clientY-this.dragged.offsetY);this.translate(this.dragged.index,s,this.children[s].top-this.dragged.top),this.move={from:this.dragged.index,to:s},this.dragged=void 0,window.setTimeout((()=>{if(this.move){const t=[...this.children.map((t=>t.element))],s=t.splice(this.move.from,1);t.splice(this.move.to,0,...s),t.forEach((t=>this.element.removeChild(t))),t.forEach((t=>{t.style.transform="",this.element.appendChild(t)})),this.reorder.emit([this.move.from,this.move.to]),this.move=void 0}}),500)}}translate(t,s,i){for(let h=0;h<this.children.length;h++){let o;this.dragged&&(o=t<s&&h>t&&h<=s?-this.dragged.height:t>s&&h<t&&h>=s?this.dragged.height:h==t?i:0,this.children[h].element.style.transform=`translateY(${o}px)`)}}getCurrentIndex(t){return this.children.findIndex((s=>t<s.bottom))}componentDidLoad(){this.element.childNodes.forEach((t=>{t.addEventListener("mousedown",(t=>this.onMouseDown(t))),t.addEventListener("mousemove",(t=>this.onMouseMove(t))),t.addEventListener("mouseup",(t=>this.onMouseUp(t)))}))}get element(){return i(this)}};h.style="smoothly-reorder>*{cursor:move;transition:transform 0.3s}smoothly-reorder>*.dragging{transition:none;box-shadow:0 0 10px rgba(var(--smoothly-dark-color));z-index:1;user-select:none}";export{h as smoothly_reorder}
@@ -1 +0,0 @@
1
- import{r as s,c as t,h as o,a as r}from"./p-074a0448.js";import{M as e,T as i}from"./p-2cda1784.js";import"./p-bd478a53.js";let a=class{constructor(o){s(this,o),this.trigger=t(this,"trigger",7),this.message=t(this,"message",7)}componentDidLoad(){e.listen(this.listen,((s,t)=>{i.is(t)?this.trigger.emit(t):this.message.emit({destination:s,content:t})}),window)}render(){return o("slot",null)}get element(){return r(this)}};a.style=".sc-smoothly-trigger-source-h{display:block}[hidden].sc-smoothly-trigger-source-h{display:none}";export{a as smoothly_trigger_source}
@@ -1 +0,0 @@
1
- import{g as t,f as e,h as n}from"./p-074a0448.js";const i=t=>!("isConnected"in t)||t.isConnected,s=(()=>{let t;return(...e)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let e of t.keys())t.set(e,t.get(e).filter(i))})(...e)}),2e3)}})();let o;const r=(t,e)=>{var n;return"to"in t?{path:t.path,to:t.to}:{path:t.path,id:t.id,jsx:null!==(n=t.render)&&void 0!==n?n:e}},l=(t,e=o)=>({href:t,onClick:n=>{n.metaKey||n.ctrlKey||2!=n.which&&1!=n.button&&(n.preventDefault(),e.push(t))}}),u=(t,e)=>{if("string"==typeof e){if(e===t)return{}}else if("function"==typeof e){const n=e(t);if(n)return!0===n?{}:{...n}}else{const n=e.exec(t);if(n)return e.lastIndex=0,{...n}}},c=t=>t.pathname.toLowerCase(),a=(()=>{const n=window,i=new URL(n.location.href),r=(void 0,c),{state:l,onChange:a,dispose:d}=((n,i)=>{const o=((t,e=((t,e)=>t!==e))=>{let n=new Map(Object.entries(null!=t?t:{}));const i={dispose:[],get:[],set:[],reset:[]},s=()=>{n=new Map(Object.entries(null!=t?t:{})),i.reset.forEach((t=>t()))},o=t=>(i.get.forEach((e=>e(t))),n.get(t)),r=(t,s)=>{const o=n.get(t);e(s,o,t)&&(n.set(t,s),i.set.forEach((e=>e(t,s,o))))},l="undefined"==typeof Proxy?{}:new Proxy(t,{get:(t,e)=>o(e),ownKeys:()=>Array.from(n.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,e)=>n.has(e),set:(t,e,n)=>(r(e,n),!0)}),u=(t,e)=>(i[t].push(e),()=>{((t,e)=>{const n=t.indexOf(e);n>=0&&(t[n]=t[t.length-1],t.length--)})(i[t],e)});return{state:l,get:o,set:r,on:u,onChange:(e,n)=>{const i=u("set",((t,i)=>{t===e&&n(i)})),s=u("reset",(()=>n(t[e])));return()=>{i(),s()}},use:(...t)=>t.forEach((t=>{t.set&&u("set",t.set),t.get&&u("get",t.get),t.reset&&u("reset",t.reset)})),dispose:()=>{i.dispose.forEach((t=>t())),s()},reset:s,forceUpdate:t=>{const e=n.get(t);i.set.forEach((n=>n(t,e,e)))}}})(n,i);return(({on:n})=>{const i=new Map;"function"==typeof t&&(n("dispose",(()=>{i.clear()})),n("get",(e=>{const n=t();n&&((t,e,n)=>{const i=t.get(e);i?i.includes(n)||i.push(n):t.set(e,[n])})(i,e,n)})),n("set",(t=>{const n=i.get(t);n&&i.set(t,n.filter(e)),s(i)})),n("reset",(()=>{i.forEach((t=>t.forEach(e))),s(i)})))})(o),o})({url:i,activePath:r(i)},((t,e,n)=>"url"===n?t.href!==e.href:t!==e)),v=t=>{history.pushState(null,null,t);const e=new URL(t,document.baseURI);l.url=e,l.activePath=r(e)},h=t=>{const{activePath:e}=l;for(let n of t){const i=u(e,n.path);if(i){if(null!=n.to){const i="string"==typeof n.to?n.to:n.to(e);return v(i),h(t)}return{params:i,route:n}}}},f=()=>{const t=new URL(n.location.href);l.url=t,l.activePath=r(t)},p=o={Switch:(t,e)=>{const n=h(e);if(n)return"function"==typeof n.route.jsx?n.route.jsx(n.params):n.route.jsx},get url(){return l.url},get activePath(){return l.activePath},push:v,onChange:a,dispose:()=>{o=void 0,n.removeEventListener("popstate",f),d()}};return f(),n.addEventListener("popstate",f),p})(),d=(t,e,i)=>{var s;const o=Object.entries(e[0]).reduce(((t,e)=>(t[e[0]]=null,t)),{}),u=c(o);function c(t){let e;return i.forEach([t],(t=>e=t)),null!=e?e:u}function d(t){return i.map([o],(e=>Object.assign(Object.assign({},e),t)))[0]}const h=e.map((t=>Object.assign(Object.assign({},c(t)),{node:t})));return n("smoothly-app",null,n("header",null,n("h1",null,n("a",Object.assign({},l(null!==(s=v(""))&&void 0!==s?s:"/")),t.label)),n("nav",null,n("ul",null,i.map([...h.filter((t=>{var e;return"nav-start"==(null===(e=t.vattrs)||void 0===e?void 0:e.slot)})),...h.filter((t=>{var e,n;return(null===(e=t.vattrs)||void 0===e?void 0:e.label)&&(null===(n=t.vattrs)||void 0===n?void 0:n.path)})),...h.filter((t=>{var e;return"nav-end"==(null===(e=t.vattrs)||void 0===e?void 0:e.slot)}))].map((t=>t.node)),(t=>{var e,n,i,s,o,r,l,c,h;(null===(e=t.vattrs)||void 0===e?void 0:e.label)&&(null===(n=t.vattrs)||void 0===n?void 0:n.path)&&(t=Object.assign(Object.assign({},u),{vtag:"a",vattrs:{href:null===(i=t.vattrs)||void 0===i?void 0:i.path},vchildren:[(null===(s=t.vattrs)||void 0===s?void 0:s.icon)?d({vtag:"smoothly-icon",vattrs:{toolTip:null===(o=t.vattrs)||void 0===o?void 0:o.label,name:null===(r=t.vattrs)||void 0===r?void 0:r.icon,size:"medium"}}):d({vtext:null===(l=t.vattrs)||void 0===l?void 0:l.label})]}));const f=v(null===(c=t.vattrs)||void 0===c?void 0:c.href);return"a"!=t.vtag?t:Object.assign(Object.assign({},t),f?{vattrs:Object.assign(Object.assign({},t.vattrs),{class:[null===(h=t.vattrs)||void 0===h?void 0:h.class,a.activePath==f?"active":""].join(" ")||void 0,href:f})}:{vattrs:Object.assign(Object.assign({},t.vattrs),{target:"new"})})})).map((t=>{var e,i;const s=c(t);return"a"!=s.vtag||(null===(e=s.vattrs)||void 0===e?void 0:e.target)?t:n("a",Object.assign({},s.vattrs,l(null===(i=s.vattrs)||void 0===i?void 0:i.href)),s.vchildren)})).map((t=>n("li",null,t))))),h.filter((t=>{var e;return"header"==(null===(e=t.vattrs)||void 0===e?void 0:e.slot)})).map((t=>t.node))),n("main",null,n(a.Switch,null,h.filter((t=>{var e;return null!=(null===(e=t.vattrs)||void 0===e?void 0:e.path)})).map((t=>{var e,i,s,o,l,u,c,a;return(null===(e=t.vattrs)||void 0===e?void 0:e.to)?n(r,{path:null!==(s=v(null===(i=t.vattrs)||void 0===i?void 0:i.path))&&void 0!==s?s:null===(o=t.vattrs)||void 0===o?void 0:o.path,to:null===(l=t.vattrs)||void 0===l?void 0:l.to}):n(r,{path:null!==(c=v(null===(u=t.vattrs)||void 0===u?void 0:u.path))&&void 0!==c?c:null===(a=t.vattrs)||void 0===a?void 0:a.path},t.node)})))))};function v(t){const e=new URL(t,document.baseURI);return""==t?new URL(document.baseURI).pathname:e.toString().startsWith(document.baseURI)?e.pathname:void 0}class h{constructor(t,e,n){switch(this.stateValue=t,this.messageValue=e,this.task=n,this.listeners=[],t){case"delayed":this.timer=window.setTimeout((()=>this.execute()),5e3);break;case"executing":this.execute();break;case"success":case"warning":case"failed":this.startCloseTimer()}}get state(){return this.stateValue}set state(t){this.stateValue!=t&&(this.stateValue=t,this.emit())}get message(){return this.messageValue}set message(t){this.messageValue!=t&&(this.messageValue=t,this.emit())}listen(t){this.listeners.push(t)}unlisten(t){this.listeners.filter((e=>e!=t))}emit(){this.listeners.forEach((t=>t(this)))}execute(){this.clearTimer(),this.task?(this.state="executing",this.task(this).then((t=>{this.messageValue=t[1],this.state=t[0]?"success":"failed",this.startCloseTimer()}))):this.state="failed"}startCloseTimer(){this.timer=window.setTimeout((()=>this.close()),15e3)}close(){this.clearTimer(),this.state="closed"}clearTimer(){this.timer&&(window.clearTimeout(this.timer),this.timer=void 0)}static delay(t,e){return new h("delayed",t,e)}static execute(t,e){return new h("executing",t,e)}static succeded(t){return new h("success",t)}static failed(t){return new h("failed",t)}static warn(t){return new h("warning",t)}}export{d as A,h as N}
@@ -1 +0,0 @@
1
- import{r as s,h as t}from"./p-074a0448.js";import{T as i,M as r}from"./p-2cda1784.js";import"./p-bd478a53.js";let o=class{constructor(t){s(this,t)}get filters(){return this.filtersValue||(this.filtersValue=this.filter?this.filter.split(" "):[]),this.filtersValue}TriggerListener(s){i.is(s.detail)&&this.filters.some((t=>t==s.detail.name))&&(r.send(this.destination,s.detail,this.context||window),s.preventDefault(),s.stopPropagation())}render(){return t("slot",null)}};o.style=".sc-smoothly-trigger-sink-h{display:block}[hidden].sc-smoothly-trigger-sink-h{display:none}";export{o as smoothly_trigger_sink}
@@ -1 +0,0 @@
1
- class n{constructor(){this.encoding="utf-8"}encode(n){return Uint8Array.from(unescape(encodeURIComponent(n)).split(""),(n=>n.charCodeAt(0)))}}const t={standard:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",url:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function r(r,e="standard",i=""){"string"==typeof r&&(r=(new n).encode(r));const o=t[e],c=[];for(let n=0;n<r.length;n+=3){const t=r[n],e=n+1<r.length?r[n+1]:0,i=n+2<r.length?r[n+2]:0;c.push(o[t>>>2]),c.push(o[(3&t)<<4|e>>>4]),c.push(o[(15&e)<<2|i>>>6]),c.push(o[63&i])}const u=Math.ceil(r.length/3*4);return c.join("").substr(0,u)+i.repeat(c.length-u)}function e(n,r="standard"){for(;n.endsWith("=")&&n.length>0;)n=n.substr(0,n.length-1);const e=t[r],i=n.split("").map((n=>e.indexOf(n))),o=new Uint8Array(Math.floor(i.length/4*3));for(let n=0;n<o.length;n+=3){const t=i.shift()||0,r=i.shift()||0,e=i.shift()||0,c=i.shift()||0;o[n]=t<<2|r>>>4,o[n+1]=(15&r)<<4|e>>>2,o[n+2]=(3&e)<<6|c}return o}const i="undefined"!=typeof window?window.crypto||window.msCrypto:self.crypto||self.msCrypto;var o,c;!function(n){n.is=function(n){return"object"==typeof n&&(null==n.key||"string"==typeof n.key)&&"string"==typeof n.value&&"string"==typeof n.salt},n.stringify=function(n){return n.key=n.key&&4!=n.key.length?n.key.slice(-2):n.key,[n.key,n.salt,n.value].join(".")},n.parse=function(t){const r=t.split("."),e={key:r[0],salt:r[1],value:r[2]};return n.is(e)?e:void 0}}(o||(o={})),function(n){function t(n){return r(n,"url")}function o(n){n.length%2==1&&(n+="0");const r=new Uint8Array(n.length/2);for(let t=0;t<r.length;t++)r[t]=16*Number.parseInt(n[2*t],16)+Number.parseInt(n[2*t+1],16);return t(r)}function c(n,t){const r=e(n,"url");let i=[];for(const n of r)i.push(Math.floor(n/16).toString(16),(n%16).toString(16));return t&&(i=i.slice(0,t)),i.join("")}n.is=function(n,t){return"string"==typeof n&&(null==t||n.length==t)&&Array.from(n).every((n=>n>="0"&&n<="9"||n>="A"&&n<="Z"||n>="a"&&n<="z"||"-"==n||"_"==n))},n.fromUint24=function(n){return o(n.toString(16).padStart(6,"0"))},n.toUint24=function(n){return Number.parseInt(c(n,6),16)},n.fromUint48=function(n){return o(n.toString(16).padStart(12,"0"))},n.toUint48=function(n){return Number.parseInt(c(n,12),16)},n.fromBinary=t,n.toBinary=function(n){return e(n,"url")},n.generate=function(n){return t(i.getRandomValues(new Uint8Array(n/4*3)))},n.fromHexadecimal=o,n.toHexadecimal=c,n.length=[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128],(n.Length||(n.Length={})).is=function(n){return"number"==typeof n&&n>=4&&n<=128&&(252&n)==n}}(c||(c={}));var u,s,f,a=function(n,t,r,e){return new(r||(r=Promise))((function(i,o){function c(n){try{s(e.next(n))}catch(n){o(n)}}function u(n){try{s(e.throw(n))}catch(n){o(n)}}function s(n){var t;n.done?i(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(c,u)}s((e=e.apply(n,t||[])).next())}))};!function(n){n.is=function(n){return"string"==typeof n||"object"==typeof n&&"string"==typeof n.hash&&"string"==typeof n.salt},n.hash=function(n,t,e){return a(this,void 0,void 0,(function*(){return e||(e=r(i.getRandomValues(new Uint8Array(64)))),{hash:yield n.sign(e+t),salt:e}}))},n.verify=function(t,r,e){return a(this,void 0,void 0,(function*(){return(yield n.hash(t,e,r.salt)).hash==r.hash}))},(n.Hashed||(n.Hashed={})).is=function(n){return"object"==typeof n&&"string"==typeof n.hash&&"string"==typeof n.salt}}(u||(u={})),function(n){n.generate=function(n){return i.getRandomValues(n)}}(s||(s={})),(f||(f={})).is=function(n){return"HMAC"==n||"RSA"==n||"ECDSA"==n||"RSA-PSS"==n};class S{sign(t){return e=this,i=void 0,c=function*(){return"string"==typeof t?r(yield this.signBinary((new n).encode(t)),"url"):this.signBinary(t)},new((o=void 0)||(o=Promise))((function(n,t){function r(n){try{s(c.next(n))}catch(n){t(n)}}function u(n){try{s(c.throw(n))}catch(n){t(n)}}function s(t){var e;t.done?n(t.value):(e=t.value,e instanceof o?e:new o((function(n){n(e)}))).then(r,u)}s((c=c.apply(e,i||[])).next())}));var e,i,o,c}verify(t,r){return"string"==typeof r&&(r=e(r,"url")),this.verifyBinary("string"==typeof t?(new n).encode(t):t,r)}}var y,h=function(n,t,r,e){return new(r||(r=Promise))((function(i,o){function c(n){try{s(e.next(n))}catch(n){o(n)}}function u(n){try{s(e.throw(n))}catch(n){o(n)}}function s(n){var t;n.done?i(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(c,u)}s((e=e.apply(n,t||[])).next())}))};class A extends S{constructor(n,t,r){super(),this.hash=n,t&&("string"==typeof t&&(t=e(t)),this.publicKey=i.subtle.importKey("spki",t,{name:"ECDSA",namedCurve:"P-512"==n.replace("SHA","P")?"P-521":n.replace("SHA","P")},!1,["verify"])),r&&("string"==typeof r&&(r=e(r)),this.privateKey=i.subtle.importKey("pkcs8",r,{name:"ECDSA",namedCurve:"P-512"==n.replace("SHA","P")?"P-521":n.replace("SHA","P")},!0,["sign","verify"]))}signBinary(n){return h(this,void 0,void 0,(function*(){return new Uint8Array(yield i.subtle.sign({name:"ECDSA",hash:{name:this.hash}},yield this.privateKey,n))}))}verifyBinary(n,t){return h(this,void 0,void 0,(function*(){return i.subtle.verify({name:"ECDSA",hash:{name:this.hash}},yield this.publicKey,t,n)}))}}!function(n){n.is=function(n){return"SHA-1"==n||"SHA-256"==n||"SHA-384"==n||"SHA-512"==n}}(y||(y={}));class l extends S{verifyBinary(n,t){return e=this,i=void 0,c=function*(){return r(yield this.signBinary(n),"url")==r(t,"url")},new((o=void 0)||(o=Promise))((function(n,t){function r(n){try{s(c.next(n))}catch(n){t(n)}}function u(n){try{s(c.throw(n))}catch(n){t(n)}}function s(t){var e;t.done?n(t.value):(e=t.value,e instanceof o?e:new o((function(n){n(e)}))).then(r,u)}s((c=c.apply(e,i||[])).next())}));var e,i,o,c}}class d extends l{constructor(n,t){super(),this.hash=n,"string"==typeof t&&(t=e(t,"url")),this.key=i.subtle.importKey("raw",t,{name:"HMAC",hash:{name:n}},!1,["sign","verify"])}signBinary(n){return t=this,r=void 0,o=function*(){return new Uint8Array(yield i.subtle.sign("HMAC",yield this.key,n))},new((e=void 0)||(e=Promise))((function(n,i){function c(n){try{s(o.next(n))}catch(n){i(n)}}function u(n){try{s(o.throw(n))}catch(n){i(n)}}function s(t){var r;t.done?n(t.value):(r=t.value,r instanceof e?r:new e((function(n){n(r)}))).then(c,u)}s((o=o.apply(t,r||[])).next())}));var t,r,e,o}}class v extends l{signBinary(n){return Promise.resolve(new Uint8Array(0))}}var p=function(n,t,r,e){return new(r||(r=Promise))((function(i,o){function c(n){try{s(e.next(n))}catch(n){o(n)}}function u(n){try{s(e.throw(n))}catch(n){o(n)}}function s(n){var t;n.done?i(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(c,u)}s((e=e.apply(n,t||[])).next())}))};class w extends S{constructor(n,t,r){super(),this.hash=n,t&&("string"==typeof t&&(t=e(t)),this.publicKey=i.subtle.importKey("spki",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:n}},!1,["verify"])),r&&("string"==typeof r&&(r=e(r)),this.privateKey=i.subtle.importKey("pkcs8",r,{name:"RSASSA-PKCS1-v1_5",hash:{name:n}},!0,["sign"]))}signBinary(n){return p(this,void 0,void 0,(function*(){return new Uint8Array(yield i.subtle.sign("RSASSA-PKCS1-v1_5",yield this.privateKey,n))}))}verifyBinary(n,t){return p(this,void 0,void 0,(function*(){return i.subtle.verify("RSASSA-PKCS1-v1_5",yield this.publicKey,t,n)}))}}var g,P,H,m,b,R,E,k,C,U=function(n,t,r,e){return new(r||(r=Promise))((function(i,o){function c(n){try{s(e.next(n))}catch(n){o(n)}}function u(n){try{s(e.throw(n))}catch(n){o(n)}}function s(n){var t;n.done?i(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(c,u)}s((e=e.apply(n,t||[])).next())}))};class j extends S{constructor(n,t,r){super(),this.hash=n,t&&("string"==typeof t&&(t=e(t)),this.publicKey=i.subtle.importKey("spki",t,{name:"RSA-PSS",hash:{name:n}},!1,["verify"])),r&&("string"==typeof r&&(r=e(r)),this.privateKey=i.subtle.importKey("pkcs8",r,{name:"RSA-PSS",hash:{name:n}},!0,["sign","verify"]))}signBinary(n){return U(this,void 0,void 0,(function*(){return new Uint8Array(yield i.subtle.sign({name:"RSA-PSS",saltLength:128},yield this.privateKey,n))}))}verifyBinary(n,t){return U(this,void 0,void 0,(function*(){return i.subtle.verify({name:"RSA-PSS",saltLength:128},yield this.publicKey,t,n)}))}}!function(n){!function(n){n.is=f.is}(n.Algorithm||(n.Algorithm={})),(n.Hash||(n.Hash={})).is=y.is,n.create=function(n,t,...r){let e;switch(n){case"HMAC":null!=t&&(e=new d(t,r[0]));break;case"RSA":null!=t&&(e=new w(t,r[0],r[1]));break;case"RSA-PSS":null!=t&&(e=new j(t,r[0],r[1]));break;case"ECDSA":null!=t&&(e=new A(t,r[0],r[1]));break;case"None":e=new v}return e}}(g||(g={})),Uint8Array.__proto__.from||(Uint8Array.__proto__.from=function(n,t,r){const e=Uint8Array.__proto__;if("function"!=typeof this)throw new TypeError("# is not a constructor");if(this.__proto__!==e)throw new TypeError("this is not a typed array.");if("function"!=typeof(t=t||(n=>n)))throw new TypeError("specified argument is not a function");if(!(n=Object(n)).length)return new this(0);let i=[];for(const n of i)i.push(n);i=i.map(t,r);const o=new this(i.length);for(let n=0;n<o.length;n++)o[n]=i[n];return o}),function(n){n.is=function(n){return"object"==typeof n&&Object.entries(n).every((n=>"function"==typeof n))}}(P||(P={})),function(n){n.is=function(n){return Array.isArray(n)&&n.every((n=>"string"==typeof n))}}(H||(H={})),function(n){n.is=function(n){return"object"==typeof n&&Object.entries(n).every((n=>"string"==typeof n[1]))}}(m||(m={})),function(n){n.is=function(n){return H.is(n)||P.is(n)||m.is(n)},(n.Converter||(n.Converter={})).is=P.is,(n.Crypto||(n.Crypto={})).is=H.is,(n.Renamer||(n.Renamer={})).is=m.is}(b||(b={})),function(n){n.is=function(n){return"object"==typeof n&&"function"==typeof n.apply&&"function"==typeof n.reverse},n.create=function(n){return{apply:n.apply?n.apply:n=>n,reverse:n.reverse?n.reverse:n=>n}}}(R||(R={})),function(n){n.is=function(n){return"RS256"==n||"RS384"==n||"RS512"==n||"ES256"==n||"ES384"==n||"ES512"==n||"PS256"==n||"PS384"==n||"PS512"==n}}(E||(E={})),function(n){n.is=function(n){return"HS256"==n||"HS384"==n||"HS512"==n}}(k||(k={})),function(n){n.is=function(n){return"none"==n||k.is(n)||E.is(n)},function(n){n.is=k.is}(n.Symmetric||(n.Symmetric={})),(n.Asymmetric||(n.Asymmetric={})).is=E.is}(C||(C={}));var M;class B{constructor(n,t){this.name=n,this.signer=t}sign(n){return t=this,r=void 0,i=function*(){return this.signer.sign(n)},new((e=void 0)||(e=Promise))((function(n,o){function c(n){try{s(i.next(n))}catch(n){o(n)}}function u(n){try{s(i.throw(n))}catch(n){o(n)}}function s(t){var r;t.done?n(t.value):(r=t.value,r instanceof e?r:new e((function(n){n(r)}))).then(c,u)}s((i=i.apply(t,r||[])).next())}));var t,r,e,i}verify(n,t){return this.signer.verify(n,t)}static create(n,...t){let r;switch(n){case"ES256":r=g.create("ECDSA","SHA-256",t[0],t[1]);break;case"ES384":r=g.create("ECDSA","SHA-384",t[0],t[1]);break;case"ES512":r=g.create("ECDSA","SHA-512",t[0],t[1]);break;case"PS256":r=g.create("RSA-PSS","SHA-256",t[0],t[1]);break;case"PS384":r=g.create("RSA-PSS","SHA-384",t[0],t[1]);break;case"PS512":r=g.create("RSA-PSS","SHA-512",t[0],t[1]);break;case"HS256":r=g.create("HMAC","SHA-256",t[0]);break;case"HS384":r=g.create("HMAC","SHA-384",t[0]);break;case"HS512":r=g.create("HMAC","SHA-512",t[0]);break;case"RS256":r=g.create("RSA","SHA-256",t[0],t[1]);break;case"RS384":r=g.create("RSA","SHA-384",t[0],t[1]);break;case"RS512":r=g.create("RSA","SHA-512",t[0],t[1]);break;case"none":r=g.create("None")}return r&&new B(n,r)}static none(){return B.create("none")}static HS256(n){return B.create("HS256",n)}static HS384(n){return B.create("HS384",n)}static HS512(n){return B.create("HS512",n)}static RS256(n,t){return B.create("RS256",n,t)}static RS384(n,t){return B.create("RS384",n,t)}static RS512(n,t){return B.create("RS512",n,t)}static ES256(n,t){return B.create("ES256",n,t)}static ES384(n,t){return B.create("ES384",n,t)}static ES512(n,t){return B.create("ES512",n,t)}static PS256(n,t){return B.create("PS256",n,t)}static PS384(n,t){return B.create("PS384",n,t)}static PS512(n,t){return B.create("PS512",n,t)}}!function(n){var t;(t=n.Name||(n.Name={})).is=C.is,function(n){n.is=C.Symmetric.is}(t.Symmetric||(t.Symmetric={})),function(n){n.is=C.Asymmetric.is}(t.Asymmetric||(t.Asymmetric={}))}(B||(B={})),function(n){n.is=function(n){return"string"==typeof n&&/^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$/.test(n)}}(M||(M={}));class D{static is(n){return"object"==typeof n&&"string"==typeof n.destination&&null!=n.content}static send(n,t,r){if(D.is(n)&&null==r){(r=t)||(r=window);const e=n.destination.split("#",2);r.postMessage(n={destination:e[1],content:n.content},e[0])}else"string"!=typeof r&&(r||(r=window),"string"==typeof n&&D.send({destination:n,content:t},r))}static listen(n,t,r){const e=n.split("#",2);let i="";2==e.length&&(n=e[0],i=e[1]),(r||window).addEventListener("message",(r=>{const e=r.data;!D.is(e)||"*"!=n&&r.origin!=n||""!=i&&e.destination!=i||t(e.destination,e.content)}))}}class x{static is(n){return"object"==typeof n&&"string"==typeof n.name}}export{c as I,D as M,x as T}