create-basicjs 0.1.5 → 0.1.6

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 (94) hide show
  1. package/README.md +10 -0
  2. package/bin/create-basicjs.js +27 -1
  3. package/package.json +1 -1
  4. package/payload/projects/tauri/.github/workflows/build.yml +86 -0
  5. package/payload/projects/tauri/.github/workflows/tests.yml +87 -0
  6. package/payload/projects/tauri/AGENTS.md +128 -0
  7. package/payload/projects/tauri/CLAUDE.md +1 -0
  8. package/payload/projects/tauri/LICENSE +201 -0
  9. package/payload/projects/tauri/NOTICE +8 -0
  10. package/payload/projects/tauri/README.md +269 -0
  11. package/payload/projects/tauri/checks/window-check.js +189 -0
  12. package/payload/projects/tauri/gitignore +8 -0
  13. package/payload/projects/tauri/handbook/01-getting-started.md +188 -0
  14. package/payload/projects/tauri/handbook/02-the-project.md +264 -0
  15. package/payload/projects/tauri/handbook/03-the-page.md +260 -0
  16. package/payload/projects/tauri/handbook/04-commands.md +265 -0
  17. package/payload/projects/tauri/handbook/05-events-and-state.md +275 -0
  18. package/payload/projects/tauri/handbook/06-plugins.md +282 -0
  19. package/payload/projects/tauri/handbook/07-the-window-and-the-app.md +431 -0
  20. package/payload/projects/tauri/handbook/08-security.md +374 -0
  21. package/payload/projects/tauri/handbook/09-tests-and-checks.md +266 -0
  22. package/payload/projects/tauri/handbook/10-building-and-releasing.md +238 -0
  23. package/payload/projects/tauri/handbook/11-troubleshooting.md +259 -0
  24. package/payload/projects/tauri/handbook/README.md +125 -0
  25. package/payload/projects/tauri/handbook/turkce/01-getting-started.md +193 -0
  26. package/payload/projects/tauri/handbook/turkce/02-the-project.md +272 -0
  27. package/payload/projects/tauri/handbook/turkce/03-the-page.md +272 -0
  28. package/payload/projects/tauri/handbook/turkce/04-commands.md +271 -0
  29. package/payload/projects/tauri/handbook/turkce/05-events-and-state.md +284 -0
  30. package/payload/projects/tauri/handbook/turkce/06-plugins.md +286 -0
  31. package/payload/projects/tauri/handbook/turkce/07-the-window-and-the-app.md +433 -0
  32. package/payload/projects/tauri/handbook/turkce/08-security.md +384 -0
  33. package/payload/projects/tauri/handbook/turkce/09-tests-and-checks.md +275 -0
  34. package/payload/projects/tauri/handbook/turkce/10-building-and-releasing.md +241 -0
  35. package/payload/projects/tauri/handbook/turkce/11-troubleshooting.md +264 -0
  36. package/payload/projects/tauri/handbook/turkce/README.md +128 -0
  37. package/payload/projects/tauri/images/app.png +0 -0
  38. package/payload/projects/tauri/src-tauri/Cargo.lock +4389 -0
  39. package/payload/projects/tauri/src-tauri/Cargo.toml +31 -0
  40. package/payload/projects/tauri/src-tauri/app-icon.svg +16 -0
  41. package/payload/projects/tauri/src-tauri/build.rs +15 -0
  42. package/payload/projects/tauri/src-tauri/capabilities/default.json +7 -0
  43. package/payload/projects/tauri/src-tauri/gitignore +5 -0
  44. package/payload/projects/tauri/src-tauri/icons/128x128.png +0 -0
  45. package/payload/projects/tauri/src-tauri/icons/128x128@2x.png +0 -0
  46. package/payload/projects/tauri/src-tauri/icons/32x32.png +0 -0
  47. package/payload/projects/tauri/src-tauri/icons/icon.icns +0 -0
  48. package/payload/projects/tauri/src-tauri/icons/icon.ico +0 -0
  49. package/payload/projects/tauri/src-tauri/src/check.rs +144 -0
  50. package/payload/projects/tauri/src-tauri/src/files.rs +255 -0
  51. package/payload/projects/tauri/src-tauri/src/main.rs +45 -0
  52. package/payload/projects/tauri/src-tauri/src/sizes.rs +214 -0
  53. package/payload/projects/tauri/src-tauri/tauri.conf.json +44 -0
  54. package/payload/projects/tauri/src-tauri/tests/project.rs +243 -0
  55. package/payload/projects/tauri/ui/app.js +459 -0
  56. package/payload/projects/tauri/ui/backend.js +196 -0
  57. package/payload/projects/tauri/ui/basic/LICENSE +14 -0
  58. package/payload/projects/tauri/ui/basic/basic.min.css +1 -0
  59. package/payload/projects/tauri/ui/basic/basic.min.js +78 -0
  60. package/payload/projects/tauri/ui/basic/font/open-sans/LICENSE.txt +206 -0
  61. package/payload/projects/tauri/ui/basic/font/open-sans/OpenSans-Bold.ttf +0 -0
  62. package/payload/projects/tauri/ui/basic/font/open-sans/OpenSans-Regular.ttf +0 -0
  63. package/payload/projects/tauri/ui/basic/scroll-bar.min.js +3 -0
  64. package/payload/projects/tauri/ui/comp/_sources.txt +9 -0
  65. package/payload/projects/tauri/ui/comp/components.min.js +21 -0
  66. package/payload/projects/tauri/ui/index.html +28 -0
  67. package/payload/projects/tauri/ui/sizes.js +104 -0
  68. package/payload/starter/_basic/VERSION +1 -1
  69. package/payload/starter/_basic/comp/bottom-bar.js +31 -3
  70. package/payload/starter/_basic/comp/code-editor.js +219 -1
  71. package/payload/starter/_basic/comp/context-menu.js +6 -1
  72. package/payload/starter/_basic/comp/markdown-view.js +4 -2
  73. package/payload/starter/_basic/comp/property-panel.js +1 -1
  74. package/payload/starter/_basic/comp/slider.js +27 -12
  75. package/payload/starter/_basic/comp/smart-button.js +5 -1
  76. package/payload/starter/_basic/comp/smart-table.js +8 -1
  77. package/payload/starter/_basic/comp/stepper.js +29 -3
  78. package/payload/starter/_basic/comp/toggle.js +2 -1
  79. package/payload/starter/_basic/docs/component-index.md +53 -53
  80. package/payload/starter/_basic/examples/code-editor.htm +48 -1
  81. package/payload/starter/_basic/examples/gallery-styled.htm +896 -0
  82. package/payload/starter/_basic/examples/search-input.htm +1 -1
  83. package/payload/starter/_basic/examples/select-box-2-item-view.htm +304 -0
  84. package/payload/starter/_basic/examples/{slider-2-classic.htm → slider-2-split.htm} +36 -2
  85. package/payload/starter/_basic/examples/stepper-2.htm +22 -6
  86. package/payload/starter/_basic/min/bottom-bar.min.js +1 -1
  87. package/payload/starter/_basic/min/code-editor.min.js +1 -1
  88. package/payload/starter/_basic/min/context-menu.min.js +1 -1
  89. package/payload/starter/_basic/min/markdown-view.min.js +1 -1
  90. package/payload/starter/_basic/min/slider.min.js +1 -1
  91. package/payload/starter/_basic/min/smart-button.min.js +1 -1
  92. package/payload/starter/_basic/min/smart-table.min.js +1 -1
  93. package/payload/starter/_basic/min/stepper.min.js +1 -1
  94. package/payload/starter/_basic/min/toggle.min.js +1 -1
@@ -1,2 +1,2 @@
1
1
  /* Bismillah */
2
- "use strict";const ContextMenuDefaults={key:"0",items:[],target:null,trigger:"contextmenu",minWidth:180,maxWidth:320,enabled:1,ariaLabel:"Menu",onClick:function(e,t,n){},onOpen:function(e){},onClose:function(e){},onSideKey:function(e,t){},parentMenu:null,styleName:"light",style:{menu:{color:"white",border:1,borderColor:Black(.12),round:8,padding:4,shadow:"0px 8px 24px "+Black(.14),zIndex:1e3},item:{height:32,fontSize:14,textColor:Black(.85),color:"transparent",round:5,padding:10,gap:10,border:0,borderColor:"transparent"},itemHover:{textColor:Black(.9),color:Black(.06),borderColor:""},disabled:{textColor:Black(.35),opacity:.4},icon:{width:16,height:16,opacity:.85},submenu:{arrowOpacity:.55,overlap:4},shortcut:{fontSize:12,opacity:.6,space:24},separator:{color:Black(.1),space:4}}},ContextMenu=function(e={}){basic.applyStylePackage(e,ContextMenu.styles,ContextMenuDefaults),mergeIntoIfMissing(e,ContextMenuDefaults);const t=e.style.menu;e.width="auto",e.height="auto",e.color=t.color,e.border=t.border,e.borderColor=t.borderColor,e.round=t.round,e.padding=t.padding,e.zIndex=t.zIndex,e.boxShadow=t.shadow;const n=getDefaultContainerBox();setDefaultContainerBox(page);let o=startObject(e);const i=o.style;let r=[],c=[],a=0,l=-1,s=null,u=0,m="";let d=-1;o.items=[],o.source=null;const h=function(e){return basic.isOn(e)?1:0},f=function(e){if("-"===e||e&&"separator"==e.type)return{type:"separator"};if("string"==typeof e||"number"==typeof e)return{type:"item",text:String(e),enabled:1};const t=Object.assign({text:"",enabled:1},e);return t.type="item",t.enabled=h(t.enabled),t},p=function(e){return!!(e&&"item"==e.type&&Array.isArray(e.items)&&e.items.length)},g=function(e){return"item"==e.type&&void 0!==e.checked&&null!==e.checked},b=function(){const e=r[d];return e&&e.submenu&&e.submenu.isOpen()?e.submenu:null},x=function(e){if(!o||!e)return!1;if(o.elem.contains(e))return!0;const t=b();return!(!t||!t.containsElement(e))},y=function(){let e=o;for(;e.parentMenu;)e=e.parentMenu;return e},w=function(e){const t=o.items[e];return!(!t||"item"!=t.type||1!=t.enabled)},C=function(e){if(l==e)return;e>=0&&e!=d&&o.closeSubmenu();const t=r[l],n=l==d&&b();t&&t.label&&!n&&v(t,0),l=e;const i=r[l];i&&i.label&&v(i,1)},v=function(e,t){const n=t?i.itemHover:i.item,o=1==e.item.enabled?n.textColor:i.disabled.textColor;e.color=n.color,i.item.border&&(e.borderColor=t&&i.itemHover.borderColor?i.itemHover.borderColor:i.item.borderColor),e.label.textColor=o,e.icon&&e.icon.isSvg&&(e.icon.textColor=o),e.arrow&&(e.arrow.textColor=o),e.lblShortcut&&(e.lblShortcut.textColor=o)},k=function(e){const t=1==e.item.enabled;if(e.cursor=t?"pointer":"default",e.aria={disabled:t?"false":"true"},e.icon){const n=e.icon.isSvg?i.icon.opacity:1,o=e.item.iconFile||e.item.icon;e.icon.opacity=t||!o?n:i.disabled.opacity}p(e.item)&&(e.aria={haspopup:"menu"}),v(e,0)},M=function(e){const t=o.items.length;if(0==t)return;let n=l<0&&e<0?t:l;for(let o=0;o<t;o++)if(n=(n+e+t)%t,w(n))return void C(n)},S=function(e){const t=basic.isOn(e.item.checked);e.icon.text=t?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3.5 8.5l3 3 6-7"/></svg>':"",e.aria={checked:t?"true":"false"}},I=function(){B(),r.forEach(function(e){e.remove()}),r=[],l=-1;const e=o.items.some(function(e){return"item"==e.type&&(e.iconFile||e.icon||g(e))});o.items.forEach(function(t,n){createIn(o.content,function(){r.push("separator"==t.type?function(){const e=Box({width:"auto",height:1,color:i.separator.color,shrink:0});return e.css.margin=i.separator.space+"px "+i.item.padding+"px",e.role="separator",e}():function(e,t,n){const r=HGroup({width:"auto",height:i.item.height,align:"left center",gap:i.item.gap,padding:[i.item.padding,0],round:i.item.round});return i.item.border&&r.props({border:i.item.border,borderColor:i.item.borderColor}),r.role="menuitem",r.item=e,n&&(g(e)?(r.icon=Label({width:i.icon.width,height:i.icon.height,shrink:0}),r.icon.elem.classList.add("context-menu-svg"),r.icon.isSvg=1,r.role="menuitemcheckbox",S(r)):e.icon?(r.icon=Label({width:i.icon.width,height:i.icon.height,shrink:0}),r.icon.text=e.icon,r.icon.elem.classList.add("context-menu-svg"),r.icon.isSvg=1):e.iconFile?(r.icon=Icon({width:i.icon.width,height:i.icon.height,shrink:0}),r.icon.load(e.iconFile),r.icon.elem.alt=""):r.icon=Box({width:i.icon.width,height:i.icon.height,color:"transparent",shrink:0})),r.label=Label({plainText:e.text,fontSize:i.item.fontSize,ellipsis:1,shrink:1}),r.label.css.minWidth="0",r.label.grow=1,e.shortcut&&(r.lblShortcut=Label({plainText:e.shortcut,fontSize:i.shortcut.fontSize,opacity:i.shortcut.opacity,shrink:0,css:{marginLeft:i.shortcut.space-i.item.gap+"px",whiteSpace:"nowrap"}})),p(e)&&(r.arrow=Label({width:14,height:i.icon.height,shrink:0,opacity:i.submenu.arrowOpacity}),r.arrow.text='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M6.5 4l4 4-4 4"/></svg>',r.arrow.elem.classList.add("context-menu-svg")),endGroup(),k(r),r.on("mouseenter",function(){C(1==e.enabled?t:-1),1==e.enabled&&p(e)&&A(t,0)}),r.on("click",function(){p(e)?1==e.enabled&&A(t,0):o.clickItem(t)}),r}(t,n,e))})})},B=function(){d=-1,r.forEach(function(e){e.submenu&&e.submenu.remove(),e.submenu=null})},A=function(e,t){const n=r[e],c=o.items[e];n&&p(c)&&(d==e&&b()||(o.closeSubmenu(),n.submenu||(n.submenu=ContextMenu({items:c.items,styleName:o.styleName,style:i,minWidth:o.minWidth,maxWidth:o.maxWidth,ariaLabel:c.text,parentMenu:o,onClick:function(e,t,n){o.onClick(e,t,n)}})),d=e,v(n,1),n.submenu.openBeside(n.elem.getBoundingClientRect())),t&&n.submenu.activateFirst())},L=function(e){if(!x(e.target)){if(0===e.button&&o.source&&o.source.elem.contains(e.target)){const e=c.find(function(e){return e.obj==o.source});e&&"click"==e.trigger&&(s=o.source,u=Date.now())}o.close()}},O=function(e){const t=b();if(t&&t.hasActive())return void t.handleKey(e);const n=o.items[l],i="ArrowRight"===e.key||"Enter"===e.key||" "===e.key;if("Escape"===e.key||"ArrowLeft"===e.key&&o.parentMenu)e.preventDefault(),"Escape"===e.key&&e.stopPropagation(),o.parentMenu?o.parentMenu.closeSubmenu():o.close();else if(i&&p(n)&&1==n.enabled)e.preventDefault(),A(l,1);else if("ArrowDown"===e.key)e.preventDefault(),M(1);else if("ArrowUp"===e.key)e.preventDefault(),M(-1);else if("Enter"===e.key||" "===e.key){if(l<0)return;e.preventDefault(),o.clickItem(l)}else if("Tab"===e.key)y().close();else if("ArrowLeft"===e.key||"ArrowRight"===e.key){e.preventDefault();const t=y();t.onSideKey(t,"ArrowRight"===e.key?1:-1)}},D=function(e){x(e.target)||o.close()},E=function(){o.close()},W=function(){a&&page.width+"x"+page.height!=m&&o.close()},z=function(e){const t=e?"addEventListener":"removeEventListener";document[t]("pointerdown",L,!0),document[t]("keydown",O,!0),document[t]("wheel",D,!0),window[t]("blur",E),e?page.onResize(W):page.remove_onResize(W)};o.setItems=function(e){o.items=(e||[]).map(f),I(),a&&o.close()},o.getItems=function(){return o.items.slice()},o.getItemByKey=function(e){return o.items.find(function(t){return t.key==e})||null},o.setItemEnabled=function(e,t){const n=o.getItemByKey(e);if(!n)return;n.enabled=h(t);const i=o.items.indexOf(n);1!=n.enabled&&l==i&&C(-1),k(r[i]),l==i&&v(r[i],1)},o.setItemChecked=function(e,t){const n=o.getItemByKey(e);n&&g(n)&&(n.checked=h(t),S(r[o.items.indexOf(n)]))};const H=function(e){a=1,m=page.width+"x"+page.height,o.zIndex=basic.zIndexAbove(o.parentMenu||o.source,t.zIndex),o.setMotion("none"),o.opacity=0,o.css.transform="scale(0.97)",o.visible=1,e(),requestAnimationFrame(function(){o&&a&&(o.setMotion("opacity 0.12s, transform 0.12s"),o.opacity=1,o.css.transform="scale(1)")}),o.parentMenu||(o.elem.focus({preventScroll:!0}),z(1)),o.onOpen(o)};o.openAt=function(e,t,n=null){1==o.enabled&&0!=o.items.length&&(a&&o.close(),o.source=n,H(function(){!function(e,t){const n=o.elem.offsetWidth,i=o.elem.offsetHeight;let r=e,c=t,a="left",l="top";r+n>page.width-8&&(r=e-n,a="right"),c+i>page.height-8&&(c=t-i,l="bottom"),r=Math.max(8,Math.min(r,page.width-n-8)),c=Math.max(8,Math.min(c,page.height-i-8)),o.left=r,o.top=c,o.css.transformOrigin=a+" "+l}(withPageZoom(e),withPageZoom(t))}))},o.openWithEvent=function(e,t=null){o.openAt(e.clientX,e.clientY,t)},o.openBelow=function(e){1==o.enabled&&0!=o.items.length&&(a&&o.close(),o.source=e,H(function(){!function(e){const t=o.elem.offsetWidth,n=o.elem.offsetHeight,i=withPageZoom(e.left),r=withPageZoom(e.bottom),c=withPageZoom(e.top),a=!(r+n<=page.height-8)&&c-n>=8;o.left=Math.max(8,Math.min(i,page.width-t-8)),o.top=a?c-n:Math.max(8,Math.min(r,page.height-n-8)),o.css.transformOrigin="left "+(a?"bottom":"top")}(e.elem.getBoundingClientRect())}))},o.close=function(){a&&(a=0,o.closeSubmenu(),o.parentMenu||z(0),C(-1),o.setMotion("none"),o.visible=0,o.onClose(o))},o.isOpen=function(){return a},o.clickItem=function(e){if(!w(e))return;const t=o.items[e];p(t)?A(e,1):(y().close(),"function"==typeof t.onClick&&t.onClick(o,t,e),o.onClick(o,t,e))},o.attachTo=function(e,t){t=t||o.trigger;const n=e.on(t,function(t,n){n.preventDefault();const i=s==e&&Date.now()-u<1e3;s=null,i||1==o.enabled&&o.openWithEvent(n,e)});return c.push({obj:e,trigger:t,removeEvent:n}),function(){o.detach(e)}},o.detach=function(e){c=c.filter(function(t){return t.obj!=e||("function"==typeof t.removeEvent&&t.removeEvent(),!1)})},o.setEnabled=function(e){o.enabled=h(e),1!=o.enabled&&o.close()},o.refresh=I,o.closeSubmenu=function(){const e=b(),t=r[d],n=d;d=-1,e&&e.close(),t&&t.label&&l!=n&&v(t,0)},o.openBeside=function(e){0!=o.items.length&&(a&&o.close(),o.source=o.parentMenu?o.parentMenu.source:null,H(function(){!function(e){const t=o.elem.offsetWidth,n=o.elem.offsetHeight,r=i.submenu.overlap,c=i.menu.padding+i.menu.border;let a=withPageZoom(e.right)-r,l="left";a+t>page.width-8&&(a=withPageZoom(e.left)-t+r,l="right");const s=withPageZoom(e.top)-c;o.left=Math.max(8,Math.min(a,page.width-t-8)),o.top=Math.max(8,Math.min(s,page.height-n-8)),o.css.transformOrigin=l+" top"}(e)}))},o.containsElement=x,o.handleKey=O,o.hasActive=function(){return l>=0?1:0},o.activateFirst=function(){C(-1),M(1)};const R=o.remove;if(o.superRemove=R,o.remove=function(){o&&(o.close(),c.slice().forEach(function(e){o.detach(e.obj)}),B(),R.call(o),o=null)},basic.addCss("context-menu-svg",".context-menu-svg { display: flex; align-items: center; justify-content: center; } .context-menu-svg svg { display: block; width: 100%; height: 100%; }"),o.css={position:"fixed",boxSizing:"border-box",minWidth:o.minWidth+"px",outline:"none",userSelect:"none"},o.maxWidth>0&&(o.css.maxWidth=o.maxWidth+"px"),o.tabIndex=-1,o.role="menu",o.aria={label:o.ariaLabel},o.content=VGroup({width:"auto",height:"auto",align:"left top",gap:0,position:"relative"}),o.content.css.alignItems="stretch",endGroup(),o.on("mousedown",function(e,t){t.preventDefault()}),o.on("contextmenu",function(e,t){t.preventDefault()}),o.on("mouseleave",function(){C(-1)}),o.setEnabled(o.enabled),o.setItems(e.items),o.visible=0,o.target){(Array.isArray(o.target)?o.target:[o.target]).forEach(function(e){o.attachTo(e,o.trigger)})}return endObject(o),setDefaultContainerBox(n),o};ContextMenu.escapeHtml=basic.escapeHtml,ContextMenu.styles={light:ContextMenuDefaults.style,dark:{menu:{color:"#232322",borderColor:"rgba(255, 255, 255, 0.12)",shadow:"0px 8px 24px rgba(0, 0, 0, 0.5)"},item:{textColor:"rgba(255, 255, 255, 0.85)"},itemHover:{textColor:"rgba(255, 255, 255, 0.95)",color:"rgba(255, 255, 255, 0.08)"},disabled:{textColor:"rgba(255, 255, 255, 0.35)"},separator:{color:"rgba(255, 255, 255, 0.10)"}}},ContextMenu.styles.classic=ContextMenu.styles.light,ContextMenu.createMinimalStyle=function(e){return{menu:{color:e.ground,border:1,borderColor:e.line,round:4,padding:4,shadow:"none"},item:{height:28,fontSize:13,textColor:e.text,color:"transparent",round:3,padding:8,gap:8,border:1,borderColor:"transparent"},itemHover:{textColor:e.text,color:"transparent",borderColor:e.lineHover},disabled:{textColor:e.faintText,opacity:.4},icon:{width:14,height:14,opacity:.85},shortcut:{fontSize:12,opacity:.5,space:20},separator:{color:e.line,space:4}}},ContextMenu.MINIMAL_COLORS={ground:"#FFFFFF",text:Black(.85),faintText:Black(.54),line:Black(.2),lineHover:Black(.45)},ContextMenu.styles.minimal=ContextMenu.createMinimalStyle(ContextMenu.MINIMAL_COLORS),ContextMenu.MINIMAL_DARK_COLORS={ground:"#1A1A19",text:White(.88),faintText:White(.48),line:White(.18),lineHover:White(.42)},ContextMenu.styles.minimalDark=ContextMenu.createMinimalStyle(ContextMenu.MINIMAL_DARK_COLORS);
2
+ "use strict";const ContextMenuDefaults={key:"0",items:[],target:null,trigger:"contextmenu",minWidth:180,maxWidth:320,enabled:1,ariaLabel:"Menu",onClick:function(e,t,n){},onOpen:function(e){},onClose:function(e){},onSideKey:function(e,t){},parentMenu:null,styleName:"light",style:{menu:{color:"white",border:1,borderColor:Black(.12),round:8,padding:4,shadow:"0px 8px 24px "+Black(.14),zIndex:1e3},item:{height:32,fontSize:14,textColor:Black(.85),color:"transparent",round:5,padding:10,gap:10,border:0,borderColor:"transparent"},itemHover:{textColor:Black(.9),color:Black(.06),borderColor:""},disabled:{textColor:Black(.35),opacity:.4},icon:{width:16,height:16,opacity:.85},submenu:{arrowOpacity:.55,overlap:4},shortcut:{fontSize:12,opacity:.6,space:24},separator:{color:Black(.1),space:4}}},ContextMenu=function(e={}){basic.applyStylePackage(e,ContextMenu.styles,ContextMenuDefaults),mergeIntoIfMissing(e,ContextMenuDefaults);const t=e.style.menu;e.width="auto",e.height="auto",e.color=t.color,e.border=t.border,e.borderColor=t.borderColor,e.round=t.round,e.padding=t.padding,e.zIndex=t.zIndex,e.boxShadow=t.shadow;const n=getDefaultContainerBox();setDefaultContainerBox(page);let o=startObject(e);const i=o.style;let r=[],a=[],c=0,l=-1,s=null,u=0,m="";let d=-1;o.items=[],o.source=null;const h=function(e){return basic.isOn(e)?1:0},f=function(e){if("-"===e||e&&"separator"==e.type)return{type:"separator"};if("string"==typeof e||"number"==typeof e)return{type:"item",text:String(e),enabled:1};const t=Object.assign({text:"",enabled:1},e);return t.type="item",t.enabled=h(t.enabled),t},p=function(e){return!!(e&&"item"==e.type&&Array.isArray(e.items)&&e.items.length)},g=function(e){return"item"==e.type&&void 0!==e.checked&&null!==e.checked},b=function(){const e=r[d];return e&&e.submenu&&e.submenu.isOpen()?e.submenu:null},x=function(e){if(!o||!e)return!1;if(o.elem.contains(e))return!0;const t=b();return!(!t||!t.containsElement(e))},y=function(){let e=o;for(;e.parentMenu;)e=e.parentMenu;return e},w=function(e){const t=o.items[e];return!(!t||"item"!=t.type||1!=t.enabled)},C=function(e){if(l==e)return;e>=0&&e!=d&&o.closeSubmenu();const t=r[l],n=l==d&&b();t&&t.label&&!n&&v(t,0),l=e;const i=r[l];i&&i.label&&v(i,1)},v=function(e,t){const n=t?i.itemHover:i.item,o=1==e.item.enabled?n.textColor:i.disabled.textColor;e.color=n.color,i.item.border&&(e.borderColor=t&&i.itemHover.borderColor?i.itemHover.borderColor:i.item.borderColor),e.label.textColor=o,e.icon&&e.icon.isSvg&&(e.icon.textColor=o),e.arrow&&(e.arrow.textColor=o),e.lblShortcut&&(e.lblShortcut.textColor=o)},k=function(e){const t=1==e.item.enabled;if(e.cursor=t?"pointer":"default",e.aria={disabled:t?"false":"true"},e.icon){const n=e.icon.isSvg?i.icon.opacity:1,o=e.item.iconFile||e.item.icon;e.icon.opacity=t||!o?n:i.disabled.opacity}p(e.item)&&(e.aria={haspopup:"menu"}),v(e,0)},M=function(e){const t=o.items.length;if(0==t)return;let n=l<0&&e<0?t:l;for(let o=0;o<t;o++)if(n=(n+e+t)%t,w(n))return void C(n)},S=function(e){const t=basic.isOn(e.item.checked);e.icon.text=t?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3.5 8.5l3 3 6-7"/></svg>':"",e.aria={checked:t?"true":"false"}},I=function(){A(),r.forEach(function(e){e.remove()}),r=[],l=-1;const e=o.items.some(function(e){return"item"==e.type&&(e.iconFile||e.icon||g(e))});o.items.forEach(function(t,n){createIn(o.content,function(){r.push("separator"==t.type?function(){const e=Box({width:"auto",height:1,color:i.separator.color,shrink:0});return e.css.margin=i.separator.space+"px "+i.item.padding+"px",e.role="separator",e}():function(e,t,n){const r=HGroup({width:"auto",height:i.item.height,align:"left center",gap:i.item.gap,padding:[i.item.padding,0],round:i.item.round});return i.item.border&&r.props({border:i.item.border,borderColor:i.item.borderColor}),r.role="menuitem",r.item=e,n&&(g(e)?(r.icon=Label({width:i.icon.width,height:i.icon.height,shrink:0}),r.icon.elem.classList.add("context-menu-svg"),r.icon.isSvg=1,r.role="menuitemcheckbox",S(r)):e.icon?(r.icon=Label({width:i.icon.width,height:i.icon.height,shrink:0}),r.icon.text=e.icon,r.icon.elem.classList.add("context-menu-svg"),r.icon.isSvg=1):e.iconFile?(r.icon=Icon({width:i.icon.width,height:i.icon.height,shrink:0}),r.icon.load(e.iconFile),r.icon.elem.alt=""):r.icon=Box({width:i.icon.width,height:i.icon.height,color:"transparent",shrink:0})),r.label=Label({plainText:e.text,fontSize:i.item.fontSize,ellipsis:1,shrink:1}),r.label.css.minWidth="0",r.label.grow=1,e.shortcut&&(r.lblShortcut=Label({plainText:e.shortcut,fontSize:i.shortcut.fontSize,opacity:i.shortcut.opacity,shrink:0,css:{marginLeft:i.shortcut.space-i.item.gap+"px",whiteSpace:"nowrap"}})),p(e)&&(r.arrow=Label({width:14,height:i.icon.height,shrink:0,opacity:i.submenu.arrowOpacity}),r.arrow.text='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M6.5 4l4 4-4 4"/></svg>',r.arrow.elem.classList.add("context-menu-svg")),endGroup(),k(r),r.on("mouseenter",function(){C(1==e.enabled?t:-1),1==e.enabled&&p(e)&&B(t,0)}),r.on("click",function(){p(e)?1==e.enabled&&B(t,0):o.clickItem(t)}),r}(t,n,e))})})},A=function(){d=-1,r.forEach(function(e){e.submenu&&e.submenu.remove(),e.submenu=null})},B=function(e,t){const n=r[e],a=o.items[e];n&&p(a)&&(d==e&&b()||(o.closeSubmenu(),n.submenu||(n.submenu=ContextMenu({items:a.items,styleName:o.styleName,style:i,minWidth:o.minWidth,maxWidth:o.maxWidth,ariaLabel:a.text,parentMenu:o,onClick:function(e,t,n){o.onClick(e,t,n)}})),d=e,v(n,1),n.submenu.openBeside(n.elem.getBoundingClientRect())),t&&n.submenu.activateFirst())},L=function(e){if(!x(e.target)){if(0===e.button&&o.source&&o.source.elem.contains(e.target)){const e=a.find(function(e){return e.obj==o.source});e&&"click"==e.trigger&&(s=o.source,u=Date.now())}o.close()}},O=function(e){const t=b();if(t&&t.hasActive())return void t.handleKey(e);const n=o.items[l],i="ArrowRight"===e.key||"Enter"===e.key||" "===e.key;if("Escape"===e.key||"ArrowLeft"===e.key&&o.parentMenu)e.preventDefault(),"Escape"===e.key&&e.stopPropagation(),o.parentMenu?o.parentMenu.closeSubmenu():o.close();else if(i&&p(n)&&1==n.enabled)e.preventDefault(),B(l,1);else if("ArrowDown"===e.key)e.preventDefault(),M(1);else if("ArrowUp"===e.key)e.preventDefault(),M(-1);else if("Enter"===e.key||" "===e.key){if(l<0)return;e.preventDefault(),o.clickItem(l)}else if("Tab"===e.key)y().close();else if("ArrowLeft"===e.key||"ArrowRight"===e.key){e.preventDefault();const t=y();t.onSideKey(t,"ArrowRight"===e.key?1:-1)}},D=function(e){x(e.target)||o.close()},E=function(){o.close()},W=function(){c&&page.width+"x"+page.height!=m&&o.close()},z=function(e){const t=e?"addEventListener":"removeEventListener";document[t]("pointerdown",L,!0),document[t]("keydown",O,!0),document[t]("wheel",D,!0),window[t]("blur",E),e?page.onResize(W):page.remove_onResize(W)};o.setItems=function(e){o.items=(e||[]).map(f),I(),c&&o.close()},o.getItems=function(){return o.items.slice()},o.getItemByKey=function(e){return o.items.find(function(t){return t.key==e})||null},o.setItemEnabled=function(e,t){const n=o.getItemByKey(e);if(!n)return;n.enabled=h(t);const i=o.items.indexOf(n);1!=n.enabled&&l==i&&C(-1),k(r[i]),l==i&&v(r[i],1)},o.setItemChecked=function(e,t){const n=o.getItemByKey(e);n&&g(n)&&(n.checked=h(t),S(r[o.items.indexOf(n)]))};const H=function(e){c=1,m=page.width+"x"+page.height,o.zIndex=basic.zIndexAbove(o.parentMenu||o.source,t.zIndex),o.setMotion("none"),o.opacity=0,o.css.transform="scale(0.97)",o.visible=1,e(),requestAnimationFrame(function(){o&&c&&(o.setMotion("opacity 0.12s, transform 0.12s"),o.opacity=1,o.css.transform="scale(1)")}),o.parentMenu||(o.elem.focus({preventScroll:!0}),z(1)),o.onOpen(o)};o.openAt=function(e,t,n=null){1==o.enabled&&0!=o.items.length&&(c&&o.close(),o.source=n,H(function(){!function(e,t){const n=o.elem.offsetWidth,i=o.elem.offsetHeight;let r=e,a=t,c="left",l="top";r+n>page.width-8&&(r=e-n,c="right"),a+i>page.height-8&&(a=t-i,l="bottom"),r=Math.max(8,Math.min(r,page.width-n-8)),a=Math.max(8,Math.min(a,page.height-i-8)),o.left=r,o.top=a,o.css.transformOrigin=c+" "+l}(withPageZoom(e),withPageZoom(t))}))},o.openWithEvent=function(e,t=null){o.openAt(e.clientX,e.clientY,t)},o.openBelow=function(e){1==o.enabled&&0!=o.items.length&&(c&&o.close(),o.source=e,H(function(){!function(e){const t=o.elem.offsetWidth,n=o.elem.offsetHeight,i=withPageZoom(e.left),r=withPageZoom(e.bottom),a=withPageZoom(e.top),c=!(r+n<=page.height-8)&&a-n>=8;o.left=Math.max(8,Math.min(i,page.width-t-8)),o.top=c?a-n:Math.max(8,Math.min(r,page.height-n-8)),o.css.transformOrigin="left "+(c?"bottom":"top")}(e.elem.getBoundingClientRect())}))},o.close=function(){c&&(c=0,o.closeSubmenu(),o.parentMenu||z(0),C(-1),o.setMotion("none"),o.visible=0,o.onClose(o))},o.isOpen=function(){return c},o.clickItem=function(e){if(!w(e))return;const t=o.items[e];p(t)?B(e,1):(y().close(),"function"==typeof t.onClick&&t.onClick(o,t,e),o.onClick(o,t,e))},o.attachTo=function(e,t){t=t||o.trigger;const n=e.on(t,function(t,n){n.preventDefault();const i=s==e&&Date.now()-u<1e3;s=null,i||1==o.enabled&&o.openWithEvent(n,e)});return a.push({obj:e,trigger:t,removeEvent:n}),function(){o.detach(e)}},o.detach=function(e){a=a.filter(function(t){return t.obj!=e||("function"==typeof t.removeEvent&&t.removeEvent(),!1)})},o.setEnabled=function(e){o.enabled=h(e),1!=o.enabled&&o.close()},o.refresh=I,o.closeSubmenu=function(){const e=b(),t=r[d],n=d;d=-1,e&&e.close(),t&&t.label&&l!=n&&v(t,0)},o.openBeside=function(e){0!=o.items.length&&(c&&o.close(),o.source=o.parentMenu?o.parentMenu.source:null,H(function(){!function(e){const t=o.elem.offsetWidth,n=o.elem.offsetHeight,r=i.submenu.overlap,a=i.menu.padding+i.menu.border;let c=withPageZoom(e.right)-r,l="left";c+t>page.width-8&&(c=withPageZoom(e.left)-t+r,l="right");const s=withPageZoom(e.top)-a;o.left=Math.max(8,Math.min(c,page.width-t-8)),o.top=Math.max(8,Math.min(s,page.height-n-8)),o.css.transformOrigin=l+" top"}(e)}))},o.containsElement=x,o.handleKey=O,o.hasActive=function(){return l>=0?1:0},o.activateFirst=function(){C(-1),M(1)};const R=o.remove;if(o.superRemove=R,o.remove=function(){o&&(o.close(),a.slice().forEach(function(e){o.detach(e.obj)}),A(),R.call(o),o=null)},basic.addCss("context-menu-svg",".context-menu-svg { display: flex; align-items: center; justify-content: center; } .context-menu-svg svg { display: block; width: 100%; height: 100%; }"),o.css={position:"fixed",boxSizing:"border-box",minWidth:o.minWidth+"px",outline:"none",userSelect:"none"},o.maxWidth>0&&(o.css.maxWidth=o.maxWidth+"px"),o.tabIndex=-1,o.role="menu",o.aria={label:o.ariaLabel},o.content=VGroup({width:"auto",height:"auto",align:"left top",gap:0,position:"relative"}),o.content.css.alignItems="stretch",endGroup(),o.on("mousedown",function(e,t){t.preventDefault()}),o.on("contextmenu",function(e,t){t.preventDefault()}),o.on("mouseleave",function(){C(-1)}),o.setEnabled(o.enabled),o.setItems(e.items),o.visible=0,o.target){(Array.isArray(o.target)?o.target:[o.target]).forEach(function(e){o.attachTo(e,o.trigger)}),Array.isArray(o.target)||o.target.own(o)}return endObject(o),setDefaultContainerBox(n),o};ContextMenu.escapeHtml=basic.escapeHtml,ContextMenu.styles={light:ContextMenuDefaults.style,dark:{menu:{color:"#232322",borderColor:"rgba(255, 255, 255, 0.12)",shadow:"0px 8px 24px rgba(0, 0, 0, 0.5)"},item:{textColor:"rgba(255, 255, 255, 0.85)"},itemHover:{textColor:"rgba(255, 255, 255, 0.95)",color:"rgba(255, 255, 255, 0.08)"},disabled:{textColor:"rgba(255, 255, 255, 0.35)"},separator:{color:"rgba(255, 255, 255, 0.10)"}}},ContextMenu.styles.classic=ContextMenu.styles.light,ContextMenu.createMinimalStyle=function(e){return{menu:{color:e.ground,border:1,borderColor:e.line,round:4,padding:4,shadow:"none"},item:{height:28,fontSize:13,textColor:e.text,color:"transparent",round:3,padding:8,gap:8,border:1,borderColor:"transparent"},itemHover:{textColor:e.text,color:"transparent",borderColor:e.lineHover},disabled:{textColor:e.faintText,opacity:.4},icon:{width:14,height:14,opacity:.85},shortcut:{fontSize:12,opacity:.5,space:20},separator:{color:e.line,space:4}}},ContextMenu.MINIMAL_COLORS={ground:"#FFFFFF",text:Black(.85),faintText:Black(.54),line:Black(.2),lineHover:Black(.45)},ContextMenu.styles.minimal=ContextMenu.createMinimalStyle(ContextMenu.MINIMAL_COLORS),ContextMenu.MINIMAL_DARK_COLORS={ground:"#1A1A19",text:White(.88),faintText:White(.48),line:White(.18),lineHover:White(.42)},ContextMenu.styles.minimalDark=ContextMenu.createMinimalStyle(ContextMenu.MINIMAL_DARK_COLORS);
@@ -1,2 +1,2 @@
1
1
  /* Bismillah */
2
- "use strict";const MarkdownViewDefaults={key:"0",left:0,top:0,width:"100%",height:"100%",markdownText:"",emptyText:"",autoScroll:1,remotePictures:0,useScrollBar:1,ariaLabel:"Document",copyText:"Copy",copiedText:"Copied",onLinkClick:null,styleName:"light",style:{box:{color:"white"},page:{padding:[22,18],gap:12,maxWidth:820},text:{fontSize:15,lineRatio:1.6,textColor:Black(.8),softColor:Black(.5),strongColor:Black(.92)},heading:{fontSizes:[27,22,18,16,15,14],spaces:[16,14,10,8,6,6],lineRatio:1.3,textColor:Black(.92),lineColor:Black(.1),linePadding:6},link:{color:"#1F7A83",lineColor:"rgba(31, 122, 131, 0.35)"},inlineCode:{color:Black(.06)},quote:{textColor:Black(.62),lineColor:Black(.16),lineSize:3,padding:14},table:{lineColor:Black(.14),headColor:Black(.04)},line:{color:Black(.12),space:6},check:{color:Black(.3),onColor:"#1F7A83",markColor:"white"},code:{color:"#F6F6F4",border:1,borderColor:Black(.08),round:8,fontSize:13,lineHeight:20,fontFamily:'ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace',textColor:"#2B2B2A",padding:[14,2],bottomPadding:12,bar:{height:34,paddingRight:6,fontSize:12,textColor:Black(.5)},button:{height:26,padding:8,gap:5,round:6,fontSize:12,iconSize:14,textColor:Black(.6),hoverColor:Black(.07)}},codeStyleName:"light",empty:{fontSize:14,textColor:Black(.45)},focus:{ringColor:"rgba(63, 141, 148, 0.8)"},scrollBar:{bar_color:"#9A9A98",bar_mouseOverColor:"#6A6A68",bar_width:4,bar_round:3}}},MarkdownView=function(e={}){const o=e.style;basic.applyStylePackage(e,MarkdownView.styles,MarkdownViewDefaults),mergeIntoIfMissing(e,MarkdownViewDefaults);const t="auto"===String(e.height),n=startObject(e);let r=n.style,i=[];const a=new Map;let l=null,s=1,c=0;const d=function(){return MarkdownView.parse(n.markdownText,{remotePictures:n.remotePictures})},w=function(e,o){const t=Label(Object.assign({width:"100%",text:e,selectable:1},o));return t.elem.classList.add("markdown-view-text"),t},k=function(e,o){const t=o?n.copiedText:n.copyText;e.text=MarkdownView.copyButtonHtml(t,o),e.aria={label:t}},u=function(e){const o=r.code.button,t=Button({width:"auto",height:o.height,color:"transparent",round:o.round,fontSize:o.fontSize,textColor:o.textColor,shrink:0,css:{display:"flex",alignItems:"center",gap:o.gap+"px",padding:"0 "+o.padding+"px",whiteSpace:"nowrap"}});return t.minimal=1,t.elem.style.setProperty("--markdown-view-copy-icon",o.iconSize+"px"),t.setFocusRing(r.focus.ringColor),k(t,0),t.onHoverChange(function(e,t){e.color=t?o.hoverColor:"transparent"}),t.on("click",function(){!function(e,o){MarkdownView.copyToClipboard(o).then(function(){e.isRemoved||(k(e,1),n.after(1500,function(){e.isRemoved||k(e,0)}))}).catch(function(e){console.warn("MarkdownView: The code could not be copied. "+e)})}(t,e)}),t},p=function(e,o,t){return"heading"===e.type?function(e,o){const t=r.heading,n=t.fontSizes[e.level-1],i=w(e.html,{fontSize:n,lineHeight:Math.round(n*t.lineRatio),bold:1,textColor:t.textColor,role:"heading",aria:{level:e.level}});return o>0&&(i.css.marginTop=t.spaces[e.level-1]+"px"),e.level<=2&&(i.css.borderBottom="1px solid "+t.lineColor,i.css.paddingBottom=t.linePadding+"px"),a.set(e.id,i),i}(e,o):"quote"===e.type?function(e){const o=r.quote,t=VGroup({width:"100%",height:"auto",align:"left top",gap:r.page.gap,clipContent:0});return t.css.borderLeft=o.lineSize+"px solid "+o.lineColor,t.css.paddingLeft=o.padding+"px",t.css.boxSizing="border-box",e.blocks.forEach(function(e,t){p(e,t,o.textColor)}),endGroup(),t}(e):"code"===e.type?function(e){const o=r.code,t=VGroup({width:"100%",height:"auto",align:"left top",color:o.color,border:o.border,borderColor:o.borderColor,round:o.round}),n=HGroup({width:"100%",height:o.bar.height,align:"left center",shrink:0});n.css.padding="0 "+o.bar.paddingRight+"px 0 "+o.padding[0]+"px",n.css.boxSizing="border-box",Label({plainText:e.language,fontSize:o.bar.fontSize,textColor:o.bar.textColor,grow:1,ellipsis:1}),u(e.code),endGroup();const i=VGroup({width:"100%",height:"auto",align:"left top",padding:o.padding,clipContent:0});return i.scrollX=1,i.css.paddingBottom=o.bottomPadding+"px",Label({text:MarkdownView.codeHtml(e.code,e.language),fontSize:o.fontSize,lineHeight:o.lineHeight,textColor:o.textColor,selectable:1,css:{fontFamily:o.fontFamily,whiteSpace:"pre",width:"max-content",minWidth:"100%",overflow:"visible"}}).elem.classList.add("markdown-view-code"),endGroup(),endGroup(),t}(e):"line"===e.type?function(){const e=Box({width:"100%",height:1,color:r.line.color});return e.css.margin=r.line.space+"px 0",e}():function(e,o,t){return w(e.html,{fontSize:r.text.fontSize,lineHeight:Math.round(r.text.fontSize*r.text.lineRatio),textColor:t})}(e,0,t)},m=function(){l=null;const e=d().blocks,o=e.map(function(e){return JSON.stringify(e)});let t=0;for(;t<i.length&&i[t].key===o[t];)t++;i.splice(t).forEach(function(e){e.object.remove()}),createIn(n.blockGroup,function(){for(let n=t;n<e.length;n++)i.push({key:o[n],object:p(e[n],n,r.text.textColor)})}),g()},g=function(){const e=0===i.length&&""!==n.emptyText;n.lblEmpty.plainText=n.emptyText,n.lblEmpty.visible=e?1:0},h=function(){if(!n.scrollArea)return!0;const e=n.scrollArea.elem;return e.scrollHeight-e.scrollTop-e.clientHeight<=30},f=function(){const e=n.scrollArea.elem;e.scrollTop=e.scrollHeight,c=e.scrollTop},b=function(){n.scrollArea&&1==n.autoScroll&&s&&!function(){const e=window.getSelection();return!(!e||e.isCollapsed||!n.elem.contains(e.anchorNode))}()&&f()},x=function(){m(),b()},M=function(){const e=n.scrollArea.elem.scrollTop;e!==c&&(c=e,s=h()?1:0)},V=function(){n.scrollBar&&n.scrollBar.refreshScroll&&n.scrollBar.refreshScroll()},v=function(){n.props(r.box),n.blockGroup.gap=r.page.gap,n.blockGroup.padding=r.page.padding,n.blockGroup.css.maxWidth=r.page.maxWidth+"px",n.lblEmpty.props({fontSize:r.empty.fontSize,textColor:r.empty.textColor}),n.scrollArea&&n.scrollArea.setFocusRing(r.focus.ringColor),function(){const e={"--markdown-view-soft":r.text.softColor,"--markdown-view-strong":r.text.strongColor,"--markdown-view-link":r.link.color,"--markdown-view-link-line":r.link.lineColor,"--markdown-view-inline-code":r.inlineCode.color,"--markdown-view-table-line":r.table.lineColor,"--markdown-view-table-head":r.table.headColor,"--markdown-view-check":r.check.color,"--markdown-view-check-on":r.check.onColor,"--markdown-view-check-mark":r.check.markColor,"--markdown-view-ring":r.focus.ringColor,"--markdown-view-mono":r.code.fontFamily};Object.assign(e,MarkdownView.codeColors(r.codeStyleName)),Object.keys(e).forEach(function(o){n.elem.style.setProperty(o,e[o])})}(),n.scrollBar&&(Object.assign(n.scrollBar,r.scrollBar),n.scrollBar.boxScrollBarTop.color=r.scrollBar.bar_color,n.scrollBar.boxScrollBarLeft.color=r.scrollBar.bar_color)};n.setMarkdownText=function(e){n.markdownText=null==e?"":String(e),m(),s=h()?1:0},n.appendText=function(e){null!=e&&(n.markdownText+=String(e),l||(l=n.after(33,x)))},n.getMarkdownText=function(){return n.markdownText},n.clear=function(){n.setMarkdownText("")},n.setEmptyText=function(e){n.emptyText=null==e?"":String(e),g()},n.setAutoScroll=function(e){n.autoScroll=basic.isOn(e)?1:0,1==n.autoScroll&&n.scrollToEnd()},n.getHeadings=function(){return MarkdownView.headingsOf(d().blocks)},n.scrollToHeading=function(e){const o=a.get(MarkdownView.slug(e));if(!o||o.isRemoved)return;if(!n.scrollArea)return void o.elem.scrollIntoView({block:"start"});const t=n.scrollArea.elem,r=o.elem.getBoundingClientRect().top-t.getBoundingClientRect().top;t.scrollTop=Math.max(0,t.scrollTop+r-12)},n.scrollToTop=function(){n.scrollArea&&(n.scrollArea.elem.scrollTop=0)},n.scrollToEnd=function(){n.scrollArea&&(s=1,f())},n.setTheme=function(e){n.styleName=e,r=function(e){const t={styleName:e,style:o};return basic.applyStylePackage(t,MarkdownView.styles,MarkdownViewDefaults),mergeIntoIfMissing(t,MarkdownViewDefaults),t.style}(e),n.style=r,v(),function(){const e=n.scrollArea?n.scrollArea.elem.scrollTop:0;i.forEach(function(e){e.object.remove()}),i=[],m(),n.scrollArea&&(n.scrollArea.elem.scrollTop=e)}()};const C=function(){n.blockGroup=VGroup({width:"100%",height:"auto",align:"left top",position:"relative",clipContent:0}),n.blockGroup.css.margin="0 auto",n.blockGroup.css.boxSizing="border-box",n.lblEmpty=Label({width:"100%",textAlign:"center",visible:0}),endGroup()};return t?C():(n.scrollArea=startBox({left:0,top:0,width:"100%",height:"100%",color:"transparent"}),n.scrollArea.scrollY=1,n.scrollArea.role="document",n.scrollArea.aria={label:n.ariaLabel},n.scrollArea.tabIndex=0,C(),endBox(),1==n.useScrollBar&&"undefined"!=typeof ScrollBar&&(n.scrollBar=ScrollBar(Object.assign({scrollableBox:n.scrollArea,neverHide:0,showDots:0},r.scrollBar)))),MarkdownView.addCss(),v(),n.listenTo(n.blockGroup.elem,"click",function(e,o){const t=o.target.closest("a");if(!t)return;const r=t.getAttribute("href");if("#"===r.charAt(0))return o.preventDefault(),void n.scrollToHeading(r.slice(1));"function"==typeof n.onLinkClick&&(o.preventDefault(),n.onLinkClick(n,r))}),n.scrollArea&&(n.scrollArea.on("scroll",M),n.blockGroup.onResize(V)),n.setMarkdownText(n.markdownText),endObject(n)};MarkdownView.addCss=function(){basic.addCss("markdown-view",".markdown-view-text { overflow-wrap: break-word; }.markdown-view-text strong { font-family: opensans-bold; font-weight: normal; color: var(--markdown-view-strong); }.markdown-view-text[role=\"heading\"] strong { color: inherit; }.markdown-view-text em { font-style: italic; }.markdown-view-text del { opacity: 0.7; }.markdown-view-text code { font-family: var(--markdown-view-mono); font-size: 0.87em; padding: 0.12em 0.36em; border-radius: 4px; background: var(--markdown-view-inline-code); }.markdown-view-text a { color: var(--markdown-view-link); text-decoration: none; border-bottom: 1px solid var(--markdown-view-link-line); }.markdown-view-text a:hover { border-bottom-color: var(--markdown-view-link); }.markdown-view-text a:focus-visible { outline: 2px solid var(--markdown-view-ring); outline-offset: 2px; border-radius: 2px; }.markdown-view-text img { max-width: 100%; height: auto; border-radius: 6px; vertical-align: top; }.markdown-view-text ul, .markdown-view-text ol { margin: 0; padding-left: 24px; }.markdown-view-text li { margin: 4px 0; padding-left: 2px; }.markdown-view-text li::marker { color: var(--markdown-view-soft); }.markdown-view-text li.markdown-view-task { list-style: none; margin-left: -20px; }.markdown-view-check { display: inline-block; box-sizing: border-box; width: 15px; height: 15px; margin-right: 8px; vertical-align: -2px; border: 1.5px solid var(--markdown-view-check); border-radius: 4px; }.markdown-view-check-on { background: var(--markdown-view-check-on); border-color: var(--markdown-view-check-on); position: relative; }.markdown-view-check-on::after { content: ''; position: absolute; left: 3.5px; top: 0.5px; width: 3px; height: 7px; border: solid var(--markdown-view-check-mark); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }.markdown-view-table { overflow-x: auto; }.markdown-view-table table { border-collapse: collapse; font-size: 0.93em; }.markdown-view-table th, .markdown-view-table td { border: 1px solid var(--markdown-view-table-line); padding: 7px 10px; text-align: left; vertical-align: top; }.markdown-view-table th { font-family: opensans-bold; font-weight: normal; background: var(--markdown-view-table-head); }.markdown-view-copy-icon { display: block; flex-shrink: 0; width: var(--markdown-view-copy-icon); height: var(--markdown-view-copy-icon); pointer-events: none; }.markdown-view-copy-icon svg { display: block; width: 100%; height: 100%; }"+MarkdownView.CODE_KINDS.map(function(e){return".markdown-view-code .code-editor-"+e+" { color: var(--markdown-view-kind-"+e+"); }"}).join(""))},MarkdownView.CODE_KINDS=["keyword","string","number","comment","builtin","function","property","tag","attribute","variable"],MarkdownView.codeColors=function(e){const o={};if("undefined"==typeof CodeEditor)return o;const t=Object.assign({},CodeEditor.styles.light.kinds,(CodeEditor.styles[e]||{}).kinds);return MarkdownView.CODE_KINDS.forEach(function(e){o["--markdown-view-kind-"+e]=t[e]}),o},MarkdownView.ICONS={copy:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="12" height="12" rx="2"/><path d="M5 15h-.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5"/></svg>',check:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13l4.5 4.5L19 7"/></svg>'},MarkdownView.copyButtonHtml=function(e,o){return'<span class="markdown-view-copy-icon">'+(o?MarkdownView.ICONS.check:MarkdownView.ICONS.copy)+"</span><span>"+basic.escapeHtml(e)+"</span>"},MarkdownView.copyToClipboard=function(e){if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(e);const o=document.createElement("textarea");o.value=e,o.style.cssText="position: fixed; left: -9999px; top: 0;",document.body.appendChild(o),o.select();const t=document.execCommand("copy");return o.remove(),t?Promise.resolve():Promise.reject(new Error("The browser refused it."))},MarkdownView.LANGUAGE_NAMES={py:"python",python3:"python",js:"javascript",jsx:"javascript",ts:"javascript",tsx:"javascript",typescript:"javascript",node:"javascript",sh:"bash",shell:"bash",zsh:"bash",console:"bash",htm:"html",xml:"html",svg:"html"},MarkdownView.MAX_COLORED_LETTERS=2e5,MarkdownView.codeHtml=function(e,o){const t=MarkdownView.LANGUAGE_NAMES[o]||o,n="undefined"!=typeof CodeEditor?CodeEditor.languages[t]:null;if(!n||e.length>MarkdownView.MAX_COLORED_LETTERS)return basic.escapeHtml(e);let r=null;return e.split("\n").map(function(e){const o=CodeEditor.tokenizeLine(e,r,n);return r=o.state,o.parts.map(CodeEditor.partHtml).join("")}).join("\n")},MarkdownView.parse=function(e,o={}){const t={usedIds:Object.create(null),remotePictures:basic.isOn(o.remotePictures)},n=String(null==e?"":e).replace(/\r\n?/g,"\n").split("\n"),r=MarkdownView.parseBlocks(n,t),i=MarkdownView.headingsOf(r).find(function(e){return 1===e.level});return{blocks:r,title:i?i.text:""}},MarkdownView.headingsOf=function(e){const o=[];return e.forEach(function(e){"heading"===e.type&&o.push({id:e.id,level:e.level,text:e.text}),"quote"===e.type&&o.push.apply(o,MarkdownView.headingsOf(e.blocks))}),o},MarkdownView.RE={fence:/^(\s*)(`{3,}|~{3,})\s*([^\s`]*)[^`]*$/,heading:/^\s{0,3}(#{1,6})\s+(.*?)\s*#*\s*$/,underline:/^\s{0,3}(=+|-{2,})\s*$/,line:/^\s{0,3}(?:(?:\*\s*){3,}|(?:-\s*){3,}|(?:_\s*){3,})$/,quote:/^\s*>/,listItem:/^(\s*)([-*+]|\d+[.)])\s+(.*)$/,listNextLine:/^\s{2,}\S/,task:/^\[( |x|X)\]\s+(.*)$/,tableDivider:/^\s*\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?\s*$/,hardBreak:/ {2,}$|\\$/},MarkdownView.parseBlocks=function(e,o){const t={lines:e,at:0,blocks:[],context:o};for(;t.at<e.length;)e[t.at].trim()?MarkdownView.BLOCK_READERS.find(function(e){return e(t)}):t.at++;return t.blocks},MarkdownView.isTableStart=function(e,o){return!(-1===e[o].indexOf("|")||o+1>=e.length)&&(!!MarkdownView.RE.tableDivider.test(e[o+1])&&MarkdownView.tableCells(e[o]).length===MarkdownView.tableCells(e[o+1]).length)},MarkdownView.isBlockStart=function(e,o){const t=MarkdownView.RE,n=e[o];return t.fence.test(n)||t.heading.test(n)||t.line.test(n)||t.quote.test(n)||t.listItem.test(n)||MarkdownView.isTableStart(e,o)},MarkdownView.uniqueId=function(e,o){const t=MarkdownView.slug(e)||"section";return o[t]=(o[t]||0)+1,o[t]>1?t+"-"+o[t]:t},MarkdownView.headingBlock=function(e,o,t){const n=MarkdownView.plainText(o);return{type:"heading",level:e,html:MarkdownView.inlineHtml(o,t),text:n,id:MarkdownView.uniqueId(n,t.usedIds)}},MarkdownView.readCode=function(e){const o=MarkdownView.RE.fence.exec(e.lines[e.at]);if(!o)return!1;const t=new RegExp("^ {0,"+o[1].length+"}"),n=new RegExp("^\\s*"+o[2].charAt(0)+"{"+o[2].length+",}\\s*$"),r=[];for(e.at++;e.at<e.lines.length&&!n.test(e.lines[e.at]);)r.push(e.lines[e.at].replace(t,"")),e.at++;return e.at++,e.blocks.push({type:"code",language:o[3].toLowerCase(),code:r.join("\n")}),!0},MarkdownView.readHeading=function(e){const o=MarkdownView.RE.heading.exec(e.lines[e.at]);return!!o&&(e.blocks.push(MarkdownView.headingBlock(o[1].length,o[2],e.context)),e.at++,!0)},MarkdownView.readUnderlinedHeading=function(e){const o=e.lines[e.at+1],t=void 0===o?null:MarkdownView.RE.underline.exec(o);if(!t||MarkdownView.isBlockStart(e.lines,e.at))return!1;const n="="===t[1].charAt(0)?1:2;return e.blocks.push(MarkdownView.headingBlock(n,e.lines[e.at].trim(),e.context)),e.at+=2,!0},MarkdownView.readLine=function(e){return!!MarkdownView.RE.line.test(e.lines[e.at])&&(e.blocks.push({type:"line"}),e.at++,!0)},MarkdownView.readQuote=function(e){const o=MarkdownView.RE;if(!o.quote.test(e.lines[e.at]))return!1;const t=[];for(;e.at<e.lines.length&&o.quote.test(e.lines[e.at]);)t.push(e.lines[e.at].replace(/^\s*>\s?/,"")),e.at++;return e.blocks.push({type:"quote",blocks:MarkdownView.parseBlocks(t,e.context)}),!0},MarkdownView.isLineOfList=function(e){const o=MarkdownView.RE;return!(!e.trim()||o.fence.test(e)||o.line.test(e))&&(o.listItem.test(e)||o.listNextLine.test(e))},MarkdownView.readList=function(e){if(!MarkdownView.RE.listItem.test(e.lines[e.at]))return!1;const o=[];for(;e.at<e.lines.length&&MarkdownView.isLineOfList(e.lines[e.at]);)o.push(e.lines[e.at]),e.at++;return e.blocks.push({type:"list",html:MarkdownView.listHtml(o,e.context)}),!0},MarkdownView.readTable=function(e){if(!MarkdownView.isTableStart(e.lines,e.at))return!1;const o=e.lines[e.at],t=e.lines[e.at+1],n=[];for(e.at+=2;e.at<e.lines.length&&e.lines[e.at].indexOf("|")>-1&&e.lines[e.at].trim();)n.push(e.lines[e.at]),e.at++;return e.blocks.push({type:"table",html:MarkdownView.tableHtml(o,t,n,e.context)}),!0},MarkdownView.readParagraph=function(e){const o=[];for(;e.at<e.lines.length&&e.lines[e.at].trim()&&(!o.length||!MarkdownView.isBlockStart(e.lines,e.at));)o.push(e.lines[e.at]),e.at++;const t=o.map(function(t,n){const r=MarkdownView.RE.hardBreak.test(t)&&n<o.length-1,i=t.trim().replace(/\\$/,"");return MarkdownView.inlineHtml(i,e.context)+(r?"<br>":" ")}).join("");return e.blocks.push({type:"p",html:t.trim()}),!0},MarkdownView.BLOCK_READERS=[MarkdownView.readCode,MarkdownView.readHeading,MarkdownView.readUnderlinedHeading,MarkdownView.readLine,MarkdownView.readQuote,MarkdownView.readList,MarkdownView.readTable,MarkdownView.readParagraph],MarkdownView.readListItems=function(e){const o=[];return e.forEach(function(e){const t=MarkdownView.RE.listItem.exec(e);if(t){const e=/\d/.test(t[2]);o.push({indent:t[1].replace(/\t/g," ").length,isOrdered:e,start:parseInt(t[2],10),text:t[3]})}else o.length&&(o[o.length-1].text+=" "+e.trim())}),o},MarkdownView.listItemHtml=function(e,o){const t=MarkdownView.RE.task.exec(e.text);if(!t)return"<li>"+MarkdownView.inlineHtml(e.text,o);return'<li class="markdown-view-task"><span class="'+(" "===t[1]?"markdown-view-check":"markdown-view-check markdown-view-check-on")+'"></span>'+MarkdownView.inlineHtml(t[2],o)},MarkdownView.listStartHtml=function(e){return e.isOrdered?1===e.start?"<ol>":'<ol start="'+e.start+'">':"<ul>"},MarkdownView.listHtml=function(e,o){const t=MarkdownView.readListItems(e);let n=0;const r=function(e){const i=t[n];let a=MarkdownView.listStartHtml(i);for(;n<t.length&&t[n].indent===e;)a+=MarkdownView.listItemHtml(t[n],o),n++,n<t.length&&t[n].indent>e&&(a+=r(t[n].indent)),a+="</li>";return a+(i.isOrdered?"</ol>":"</ul>")};let i="";for(;n<t.length;)i+=r(t[n].indent);return i},MarkdownView.tableCells=function(e){return e.trim().replace(/\\\|/g,"").replace(/^\|/,"").replace(/\|$/,"").split("|").map(function(e){return e.split("").join("|").trim()})},MarkdownView.tableAlign=function(e){const o=e.startsWith(":"),t=e.endsWith(":");return o&&t?"center":t?"right":""},MarkdownView.tableRowHtml=function(e,o,t,n){let r="<tr>";return t.forEach(function(t,i){const a=t?' style="text-align: '+t+'"':"",l=i<e.length?e[i]:"";r+="<"+o+a+">"+MarkdownView.inlineHtml(l,n)+"</"+o+">"}),r+"</tr>"},MarkdownView.tableHtml=function(e,o,t,n){const r=MarkdownView.tableCells(o).map(MarkdownView.tableAlign),i=t.map(function(e){return MarkdownView.tableRowHtml(MarkdownView.tableCells(e),"td",r,n)}).join("");return'<div class="markdown-view-table"><table><thead>'+MarkdownView.tableRowHtml(MarkdownView.tableCells(e),"th",r,n)+"</thead><tbody>"+i+"</tbody></table></div>"},MarkdownView.KEEP_MARK="\0",MarkdownView.INLINE_RE={code:/(`+)\s?([^`]|[^`].*?[^`])\s?\1(?!`)/g,letter:/\\([!-/:-@[-`{-~])/g,picture:/!\[((?:\\.|[^\]\\])*)\]\(\s*<?((?:[^()\s<>]|\([^()\s]*\))+)>?(?:\s+"[^"]*")?\s*\)/g,link:/\[((?:\\.|[^[\]\\]|\[[^\]]*\])*)\]\(\s*<?((?:[^()\s<>]|\([^()\s]*\))+)>?(?:\s+"[^"]*")?\s*\)/g,bareAddress:/(^|[\s(*_~])(https?:\/\/[^\s<>]+[^\s<>.,;:)!?'"*_~])/g,lineBreak:/&lt;br\s*\/?&gt;/gi,strong:/\*\*([^\s*](?:.*?[^\s*])?)\*\*/g,strongLine:/(^|[^\w])__([^\s_](?:.*?[^\s_])?)__(?!\w)/g,emphasis:/(^|[^*\w])\*([^\s*](?:.*?[^\s*])?)\*(?!\*)/g,emphasisLine:/(^|[^\w])_([^\s_](?:.*?[^\s_])?)_(?!\w)/g,deleted:/~~([^\s~](?:.*?[^\s~])?)~~/g},MarkdownView.inlineHtml=function(e,o){const t=[],n=MarkdownView.formatLine(String(e).split(MarkdownView.KEEP_MARK).join(""),function(e){return t.push(e),MarkdownView.KEEP_MARK+(t.length-1)+MarkdownView.KEEP_MARK},o);return MarkdownView.putKeptParts(n,t)},MarkdownView.putKeptParts=function(e,o){const t=new RegExp(MarkdownView.KEEP_MARK+"(\\d+)"+MarkdownView.KEEP_MARK,"g");let n=e;for(;n.indexOf(MarkdownView.KEEP_MARK)>-1;)n=n.replace(t,function(e,t){return o[Number(t)]});return n},MarkdownView.formatLine=function(e,o,t){const n=MarkdownView.INLINE_RE;let r=e.replace(n.code,function(e,t,n){return o("<code>"+basic.escapeHtml(n)+"</code>")});return r=r.replace(n.picture,function(e,n,r){return o(MarkdownView.pictureHtml(MarkdownView.removeEscapes(r),MarkdownView.removeEscapes(n),t))}),r=r.replace(n.link,function(e,n,r){return o(MarkdownView.linkHtml(MarkdownView.removeEscapes(r),MarkdownView.formatLine(n,o,t)))}),r=r.replace(n.letter,function(e,t){return o(basic.escapeHtml(t))}),r=r.replace(n.bareAddress,function(e,t,n){return t+o(MarkdownView.linkHtml(n,basic.escapeHtml(n)))}),MarkdownView.formatWords(basic.escapeHtml(r))},MarkdownView.removeEscapes=function(e){return e.replace(MarkdownView.INLINE_RE.letter,"$1")},MarkdownView.formatWords=function(e){const o=MarkdownView.INLINE_RE;return e.replace(o.lineBreak,"<br>").replace(o.strong,"<strong>$1</strong>").replace(o.strongLine,"$1<strong>$2</strong>").replace(o.emphasis,"$1<em>$2</em>").replace(o.emphasisLine,"$1<em>$2</em>").replace(o.deleted,"<del>$1</del>")},MarkdownView.LINK_SCHEMES=/^(https?|mailto|tel):/i,MarkdownView.PICTURE_SCHEMES=/^(https?:|data:image\/)/i,MarkdownView.REMOTE_ADDRESS=/^(https?:)?\/\//i,MarkdownView.ANY_SCHEME=/^[a-z][a-z0-9+.-]*:/i,MarkdownView.isSafeAddress=function(e,o){if(e.indexOf(MarkdownView.KEEP_MARK)>-1)return!1;const t=e.replace(/[\p{C}\p{Z}]/gu,"");return!MarkdownView.ANY_SCHEME.test(t)||o.test(t)},MarkdownView.linkHtml=function(e,o){if(!MarkdownView.isSafeAddress(e,MarkdownView.LINK_SCHEMES))return o;const t="#"===e.charAt(0)?"":' target="_blank" rel="noopener noreferrer"';return'<a href="'+basic.escapeHtml(e)+'"'+t+">"+o+"</a>"},MarkdownView.pictureHtml=function(e,o,t){const n=basic.escapeHtml(o);return MarkdownView.isSafeAddress(e,MarkdownView.PICTURE_SCHEMES)?!t.remotePictures&&MarkdownView.REMOTE_ADDRESS.test(e)?MarkdownView.linkHtml(e,n||basic.escapeHtml(e)):'<img src="'+basic.escapeHtml(e)+'" alt="'+n+'">':n},MarkdownView.plainText=function(e){return String(e).replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/[`*~]/g,"").replace(/(^|\s)_+|_+(\s|$)/g,"$1$2").replace(/\s+/g," ").trim()},MarkdownView.slug=function(e){return String(e).replace(/[ıİ]/g,"i").normalize("NFD").replace(/\p{M}/gu,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60)},MarkdownView.styles={light:MarkdownViewDefaults.style,dark:{box:{color:"#1C1C1B"},text:{textColor:White(.8),softColor:White(.5),strongColor:White(.94)},heading:{textColor:White(.94),lineColor:White(.12)},link:{color:"#6FC6CD",lineColor:"rgba(111, 198, 205, 0.35)"},inlineCode:{color:White(.1)},quote:{textColor:White(.62),lineColor:White(.2)},table:{lineColor:White(.16),headColor:White(.06)},line:{color:White(.14)},check:{color:White(.35),onColor:"#6FC6CD",markColor:"#1C1C1B"},code:{color:"#232322",borderColor:White(.08),textColor:"#E6E6E3",bar:{textColor:White(.5)},button:{textColor:White(.65),hoverColor:White(.09)}},codeStyleName:"dark",empty:{textColor:White(.5)},focus:{ringColor:"rgba(111, 198, 205, 0.8)"},scrollBar:{bar_color:"#8A8A88",bar_mouseOverColor:"#BFBFBD"}}};
2
+ "use strict";const MarkdownViewDefaults={key:"0",left:0,top:0,width:"100%",height:"100%",markdownText:"",emptyText:"",autoScroll:1,remotePictures:0,useScrollBar:1,ariaLabel:"Document",copyText:"Copy",copiedText:"Copied",onLinkClick:null,styleName:"light",style:{box:{color:"white"},page:{padding:[22,18],gap:12,maxWidth:820},text:{fontSize:15,lineRatio:1.6,textColor:Black(.8),softColor:Black(.5),strongColor:Black(.92)},heading:{fontSizes:[27,22,18,16,15,14],spaces:[16,14,10,8,6,6],lineRatio:1.3,textColor:Black(.92),lineColor:Black(.1),linePadding:6},link:{color:"#1F7A83",lineColor:"rgba(31, 122, 131, 0.35)"},inlineCode:{color:Black(.06)},quote:{textColor:Black(.62),lineColor:Black(.16),lineSize:3,padding:14},table:{lineColor:Black(.14),headColor:Black(.04)},line:{color:Black(.12),space:6},check:{color:Black(.3),onColor:"#1F7A83",markColor:"white"},code:{color:"#F6F6F4",border:1,borderColor:Black(.08),round:8,fontSize:13,lineHeight:20,fontFamily:'ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace',textColor:"#2B2B2A",padding:[14,2],bottomPadding:12,bar:{height:34,paddingRight:6,fontSize:12,textColor:Black(.5)},button:{height:26,padding:8,gap:5,round:6,fontSize:12,iconSize:14,textColor:Black(.6),hoverColor:Black(.07)}},codeStyleName:"light",empty:{fontSize:14,textColor:Black(.45)},focus:{ringColor:"rgba(63, 141, 148, 0.8)"},scrollBar:{bar_color:"#9A9A98",bar_mouseOverColor:"#6A6A68",bar_width:4,bar_round:3}}},MarkdownView=function(e={}){const o=e.style;basic.applyStylePackage(e,MarkdownView.styles,MarkdownViewDefaults),mergeIntoIfMissing(e,MarkdownViewDefaults);const t="auto"===String(e.height),n=startObject(e);let r=n.style,i=[];const a=new Map;let l=null,s=1,c=0;const d=function(){return MarkdownView.parse(n.markdownText,{remotePictures:n.remotePictures})},w=function(e,o){const t=Label(Object.assign({width:"100%",text:e,selectable:1},o));return t.elem.classList.add("markdown-view-text"),t},k=function(e,o){const t=o?n.copiedText:n.copyText;e.text=MarkdownView.copyButtonHtml(t,o),e.aria={label:t}},u=function(e){const o=r.code.button,t=Button({width:"auto",height:o.height,color:"transparent",round:o.round,fontSize:o.fontSize,textColor:o.textColor,shrink:0,css:{display:"flex",alignItems:"center",gap:o.gap+"px",padding:"0 "+o.padding+"px",whiteSpace:"nowrap"}});return t.minimal=1,t.elem.style.setProperty("--markdown-view-copy-icon",o.iconSize+"px"),t.setFocusRing(r.focus.ringColor),k(t,0),t.onHoverChange(function(e,t){e.color=t?o.hoverColor:"transparent"}),t.on("click",function(){!function(e,o){MarkdownView.copyToClipboard(o).then(function(){e.isRemoved||(k(e,1),n.after(1500,function(){e.isRemoved||k(e,0)}))}).catch(function(e){console.warn("MarkdownView: The code could not be copied. "+e)})}(t,e)}),t},p=function(e,o,t){return"heading"===e.type?function(e,o){const t=r.heading,n=t.fontSizes[e.level-1],i=w(e.html,{fontSize:n,lineHeight:Math.round(n*t.lineRatio),bold:1,textColor:t.textColor,role:"heading",aria:{level:e.level}});return o>0&&(i.css.marginTop=t.spaces[e.level-1]+"px"),e.level<=2&&(i.css.borderBottom="1px solid "+t.lineColor,i.css.paddingBottom=t.linePadding+"px"),a.set(e.id,i),i}(e,o):"quote"===e.type?function(e){const o=r.quote,t=VGroup({width:"100%",height:"auto",align:"left top",gap:r.page.gap,clipContent:0});return t.css.borderLeft=o.lineSize+"px solid "+o.lineColor,t.css.paddingLeft=o.padding+"px",t.css.boxSizing="border-box",e.blocks.forEach(function(e,t){p(e,t,o.textColor)}),endGroup(),t}(e):"code"===e.type?function(e){const o=r.code,t=VGroup({width:"100%",height:"auto",align:"left top",color:o.color,border:o.border,borderColor:o.borderColor,round:o.round}),n=HGroup({width:"100%",height:o.bar.height,align:"left center",shrink:0});n.css.padding="0 "+o.bar.paddingRight+"px 0 "+o.padding[0]+"px",n.css.boxSizing="border-box",Label({plainText:e.language,fontSize:o.bar.fontSize,textColor:o.bar.textColor,grow:1,ellipsis:1}),u(e.code),endGroup();const i=VGroup({width:"100%",height:"auto",align:"left top",padding:o.padding,clipContent:0});return i.scrollX=1,i.css.paddingBottom=o.bottomPadding+"px",Label({text:MarkdownView.codeHtml(e.code,e.language),fontSize:o.fontSize,lineHeight:o.lineHeight,textColor:o.textColor,selectable:1,css:{fontFamily:o.fontFamily,whiteSpace:"pre",width:"max-content",minWidth:"100%",overflow:"visible"}}).elem.classList.add("markdown-view-code"),endGroup(),endGroup(),t}(e):"line"===e.type?function(){const e=Box({width:"100%",height:1,color:r.line.color});return e.css.margin=r.line.space+"px 0",e}():function(e,o,t){return w(e.html,{fontSize:r.text.fontSize,lineHeight:Math.round(r.text.fontSize*r.text.lineRatio),textColor:t})}(e,0,t)},m=function(){l=null;const e=d().blocks,o=e.map(function(e){return JSON.stringify(e)});let t=0;for(;t<i.length&&i[t].key===o[t];)t++;i.splice(t).forEach(function(e){e.object.remove()}),createIn(n.blockGroup,function(){for(let n=t;n<e.length;n++)i.push({key:o[n],object:p(e[n],n,r.text.textColor)})}),g()},g=function(){const e=0===i.length&&""!==n.emptyText;n.lblEmpty.plainText=n.emptyText,n.lblEmpty.visible=e?1:0},h=function(){if(!n.scrollArea)return!0;const e=n.scrollArea.elem;return e.scrollHeight-e.scrollTop-e.clientHeight<=30},f=function(){const e=n.scrollArea.elem;e.scrollTop=e.scrollHeight,c=e.scrollTop},b=function(){n.scrollArea&&1==n.autoScroll&&s&&!function(){const e=window.getSelection();return!(!e||e.isCollapsed||!n.elem.contains(e.anchorNode))}()&&f()},x=function(){m(),b()},M=function(){const e=n.scrollArea.elem.scrollTop;e!==c&&(c=e,s=h()?1:0)},V=function(){n.scrollBar&&n.scrollBar.refreshScroll&&n.scrollBar.refreshScroll()},v=function(){n.props(r.box),n.blockGroup.gap=r.page.gap,n.blockGroup.padding=r.page.padding,n.blockGroup.css.maxWidth=r.page.maxWidth+"px",n.lblEmpty.props({fontSize:r.empty.fontSize,textColor:r.empty.textColor}),n.scrollArea&&n.scrollArea.setFocusRing(r.focus.ringColor),function(){const e={"--markdown-view-soft":r.text.softColor,"--markdown-view-strong":r.text.strongColor,"--markdown-view-link":r.link.color,"--markdown-view-link-line":r.link.lineColor,"--markdown-view-inline-code":r.inlineCode.color,"--markdown-view-table-line":r.table.lineColor,"--markdown-view-table-head":r.table.headColor,"--markdown-view-check":r.check.color,"--markdown-view-check-on":r.check.onColor,"--markdown-view-check-mark":r.check.markColor,"--markdown-view-ring":r.focus.ringColor,"--markdown-view-mono":r.code.fontFamily};Object.assign(e,MarkdownView.codeColors(r.codeStyleName)),Object.keys(e).forEach(function(o){n.elem.style.setProperty(o,e[o])})}(),n.scrollBar&&(Object.assign(n.scrollBar,r.scrollBar),n.scrollBar.boxScrollBarTop.color=r.scrollBar.bar_color,n.scrollBar.boxScrollBarLeft.color=r.scrollBar.bar_color)};n.setMarkdownText=function(e){n.markdownText=null==e?"":String(e),m(),s=h()?1:0},n.appendText=function(e){null!=e&&(n.markdownText+=String(e),l||(l=n.after(33,x)))},n.getMarkdownText=function(){return n.markdownText},n.clear=function(){n.setMarkdownText("")},n.setEmptyText=function(e){n.emptyText=null==e?"":String(e),g()},n.setAutoScroll=function(e){n.autoScroll=basic.isOn(e)?1:0,1==n.autoScroll&&n.scrollToEnd()},n.getHeadings=function(){return MarkdownView.headingsOf(d().blocks)},n.scrollToHeading=function(e){const o=a.get(MarkdownView.slug(e));if(!o||o.isRemoved)return;if(!n.scrollArea)return void o.elem.scrollIntoView({block:"start"});const t=n.scrollArea.elem,r=o.elem.getBoundingClientRect().top-t.getBoundingClientRect().top;t.scrollTop=Math.max(0,t.scrollTop+r-12)},n.scrollToTop=function(){n.scrollArea&&(n.scrollArea.elem.scrollTop=0)},n.scrollToEnd=function(){n.scrollArea&&(s=1,f())},n.setTheme=function(e){n.styleName=e,r=function(e){const t={styleName:e,style:o};return basic.applyStylePackage(t,MarkdownView.styles,MarkdownViewDefaults),mergeIntoIfMissing(t,MarkdownViewDefaults),t.style}(e),n.style=r,v(),function(){const e=n.scrollArea?n.scrollArea.elem.scrollTop:0;i.forEach(function(e){e.object.remove()}),i=[],m(),n.scrollArea&&(n.scrollArea.elem.scrollTop=e)}()};const C=function(){n.blockGroup=VGroup({width:"100%",height:"auto",align:"left top",position:"relative",clipContent:0}),n.blockGroup.css.margin="0 auto",n.blockGroup.css.boxSizing="border-box",n.lblEmpty=Label({width:"100%",textAlign:"center",visible:0}),endGroup()};return t?C():(n.scrollArea=startBox({left:0,top:0,width:"100%",height:"100%",color:"transparent"}),n.scrollArea.scrollY=1,n.scrollArea.role="document",n.scrollArea.aria={label:n.ariaLabel},n.scrollArea.tabIndex=0,C(),endBox(),1==n.useScrollBar&&"undefined"!=typeof ScrollBar&&(n.scrollBar=ScrollBar(Object.assign({scrollableBox:n.scrollArea,neverHide:0,showDots:0},r.scrollBar)))),MarkdownView.addCss(),v(),n.listenTo(n.blockGroup.elem,"click",function(e,o){const t=o.target.closest("a");if(!t)return;const r=t.getAttribute("href");if("#"===r.charAt(0))return o.preventDefault(),void n.scrollToHeading(r.slice(1));"function"==typeof n.onLinkClick&&(o.preventDefault(),n.onLinkClick(n,r))}),n.scrollArea&&(n.scrollArea.on("scroll",M),n.blockGroup.onResize(V)),n.setMarkdownText(n.markdownText),endObject(n)};MarkdownView.addCss=function(){basic.addCss("markdown-view",".markdown-view-text { overflow-wrap: break-word; }.markdown-view-text strong { font-family: opensans-bold; font-weight: normal; color: var(--markdown-view-strong); }.markdown-view-text[role=\"heading\"] strong { color: inherit; }.markdown-view-text em { font-style: italic; }.markdown-view-text del { opacity: 0.7; }.markdown-view-text code { font-family: var(--markdown-view-mono); font-size: 0.87em; padding: 0.12em 0.36em; border-radius: 4px; background: var(--markdown-view-inline-code); }.markdown-view-text a { color: var(--markdown-view-link); text-decoration: none; border-bottom: 1px solid var(--markdown-view-link-line); }.markdown-view-text a:hover { border-bottom-color: var(--markdown-view-link); }.markdown-view-text a:focus-visible { outline: 2px solid var(--markdown-view-ring); outline-offset: 2px; border-radius: 2px; }.markdown-view-text img { max-width: 100%; height: auto; border-radius: 6px; vertical-align: top; }.markdown-view-text ul, .markdown-view-text ol { margin: 0; padding-left: 24px; }.markdown-view-text li { margin: 4px 0; padding-left: 2px; }.markdown-view-text li::marker { color: var(--markdown-view-soft); }.markdown-view-text li.markdown-view-task { list-style: none; margin-left: -20px; }.markdown-view-check { display: inline-block; box-sizing: border-box; width: 15px; height: 15px; margin-right: 8px; vertical-align: -2px; border: 1.5px solid var(--markdown-view-check); border-radius: 4px; }.markdown-view-check-on { background: var(--markdown-view-check-on); border-color: var(--markdown-view-check-on); position: relative; }.markdown-view-check-on::after { content: ''; position: absolute; left: 3.5px; top: 0.5px; width: 3px; height: 7px; border: solid var(--markdown-view-check-mark); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }.markdown-view-table { overflow-x: auto; }.markdown-view-table table { border-collapse: collapse; font-size: 0.93em; }.markdown-view-table th, .markdown-view-table td { border: 1px solid var(--markdown-view-table-line); padding: 7px 10px; text-align: left; vertical-align: top; }.markdown-view-table th { font-family: opensans-bold; font-weight: normal; background: var(--markdown-view-table-head); }.markdown-view-copy-icon { display: block; flex-shrink: 0; width: var(--markdown-view-copy-icon); height: var(--markdown-view-copy-icon); pointer-events: none; }.markdown-view-copy-icon svg { display: block; width: 100%; height: 100%; }"+MarkdownView.CODE_KINDS.map(function(e){return".markdown-view-code .code-editor-"+e+" { color: var(--markdown-view-kind-"+e+"); }"}).join(""))},MarkdownView.CODE_KINDS=["keyword","string","number","comment","builtin","function","property","tag","attribute","variable"],MarkdownView.codeColors=function(e){const o={};if("undefined"==typeof CodeEditor)return o;const t=Object.assign({},CodeEditor.styles.light.kinds,(CodeEditor.styles[e]||{}).kinds);return MarkdownView.CODE_KINDS.forEach(function(e){o["--markdown-view-kind-"+e]=t[e]}),o},MarkdownView.ICONS={copy:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="12" height="12" rx="2"/><path d="M5 15h-.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5"/></svg>',check:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13l4.5 4.5L19 7"/></svg>'},MarkdownView.copyButtonHtml=function(e,o){return'<span class="markdown-view-copy-icon">'+(o?MarkdownView.ICONS.check:MarkdownView.ICONS.copy)+"</span><span>"+basic.escapeHtml(e)+"</span>"},MarkdownView.copyToClipboard=function(e){if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(e);const o=document.createElement("textarea");o.value=e,o.style.cssText="position: fixed; left: -9999px; top: 0;",document.body.appendChild(o),o.select();const t=document.execCommand("copy");return o.remove(),t?Promise.resolve():Promise.reject(new Error("The browser refused it."))},MarkdownView.LANGUAGE_NAMES={py:"python",python3:"python",js:"javascript",jsx:"javascript",ts:"javascript",tsx:"javascript",typescript:"javascript",node:"javascript",sh:"bash",shell:"bash",zsh:"bash",console:"bash",golang:"go",rb:"ruby",htm:"html",xml:"html",svg:"html"},MarkdownView.MAX_COLORED_LETTERS=2e5,MarkdownView.codeHtml=function(e,o){const t=MarkdownView.LANGUAGE_NAMES[o]||o,n="undefined"!=typeof CodeEditor?CodeEditor.languages[t]:null;if(!n||e.length>MarkdownView.MAX_COLORED_LETTERS)return basic.escapeHtml(e);let r=null;return e.split("\n").map(function(e){const o=CodeEditor.tokenizeLine(e,r,n);return r=o.state,o.parts.map(CodeEditor.partHtml).join("")}).join("\n")},MarkdownView.parse=function(e,o={}){const t={usedIds:Object.create(null),remotePictures:basic.isOn(o.remotePictures)},n=String(null==e?"":e).replace(/\r\n?/g,"\n").split("\n"),r=MarkdownView.parseBlocks(n,t),i=MarkdownView.headingsOf(r).find(function(e){return 1===e.level});return{blocks:r,title:i?i.text:""}},MarkdownView.headingsOf=function(e){const o=[];return e.forEach(function(e){"heading"===e.type&&o.push({id:e.id,level:e.level,text:e.text}),"quote"===e.type&&o.push.apply(o,MarkdownView.headingsOf(e.blocks))}),o},MarkdownView.RE={fence:/^(\s*)(`{3,}|~{3,})\s*([^\s`]*)[^`]*$/,heading:/^\s{0,3}(#{1,6})\s+(.*?)\s*#*\s*$/,underline:/^\s{0,3}(=+|-{2,})\s*$/,line:/^\s{0,3}(?:(?:\*\s*){3,}|(?:-\s*){3,}|(?:_\s*){3,})$/,quote:/^\s*>/,listItem:/^(\s*)([-*+]|\d+[.)])\s+(.*)$/,listNextLine:/^\s{2,}\S/,task:/^\[( |x|X)\]\s+(.*)$/,tableDivider:/^\s*\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?\s*$/,hardBreak:/ {2,}$|\\$/},MarkdownView.parseBlocks=function(e,o){const t={lines:e,at:0,blocks:[],context:o};for(;t.at<e.length;)e[t.at].trim()?MarkdownView.BLOCK_READERS.find(function(e){return e(t)}):t.at++;return t.blocks},MarkdownView.isTableStart=function(e,o){return!(-1===e[o].indexOf("|")||o+1>=e.length)&&(!!MarkdownView.RE.tableDivider.test(e[o+1])&&MarkdownView.tableCells(e[o]).length===MarkdownView.tableCells(e[o+1]).length)},MarkdownView.isBlockStart=function(e,o){const t=MarkdownView.RE,n=e[o];return t.fence.test(n)||t.heading.test(n)||t.line.test(n)||t.quote.test(n)||t.listItem.test(n)||MarkdownView.isTableStart(e,o)},MarkdownView.uniqueId=function(e,o){const t=MarkdownView.slug(e)||"section";return o[t]=(o[t]||0)+1,o[t]>1?t+"-"+o[t]:t},MarkdownView.headingBlock=function(e,o,t){const n=MarkdownView.plainText(o);return{type:"heading",level:e,html:MarkdownView.inlineHtml(o,t),text:n,id:MarkdownView.uniqueId(n,t.usedIds)}},MarkdownView.readCode=function(e){const o=MarkdownView.RE.fence.exec(e.lines[e.at]);if(!o)return!1;const t=new RegExp("^ {0,"+o[1].length+"}"),n=new RegExp("^\\s*"+o[2].charAt(0)+"{"+o[2].length+",}\\s*$"),r=[];for(e.at++;e.at<e.lines.length&&!n.test(e.lines[e.at]);)r.push(e.lines[e.at].replace(t,"")),e.at++;return e.at++,e.blocks.push({type:"code",language:o[3].toLowerCase(),code:r.join("\n")}),!0},MarkdownView.readHeading=function(e){const o=MarkdownView.RE.heading.exec(e.lines[e.at]);return!!o&&(e.blocks.push(MarkdownView.headingBlock(o[1].length,o[2],e.context)),e.at++,!0)},MarkdownView.readUnderlinedHeading=function(e){const o=e.lines[e.at+1],t=void 0===o?null:MarkdownView.RE.underline.exec(o);if(!t||MarkdownView.isBlockStart(e.lines,e.at))return!1;const n="="===t[1].charAt(0)?1:2;return e.blocks.push(MarkdownView.headingBlock(n,e.lines[e.at].trim(),e.context)),e.at+=2,!0},MarkdownView.readLine=function(e){return!!MarkdownView.RE.line.test(e.lines[e.at])&&(e.blocks.push({type:"line"}),e.at++,!0)},MarkdownView.readQuote=function(e){const o=MarkdownView.RE;if(!o.quote.test(e.lines[e.at]))return!1;const t=[];for(;e.at<e.lines.length&&o.quote.test(e.lines[e.at]);)t.push(e.lines[e.at].replace(/^\s*>\s?/,"")),e.at++;return e.blocks.push({type:"quote",blocks:MarkdownView.parseBlocks(t,e.context)}),!0},MarkdownView.isLineOfList=function(e){const o=MarkdownView.RE;return!(!e.trim()||o.fence.test(e)||o.line.test(e))&&(o.listItem.test(e)||o.listNextLine.test(e))},MarkdownView.readList=function(e){if(!MarkdownView.RE.listItem.test(e.lines[e.at]))return!1;const o=[];for(;e.at<e.lines.length&&MarkdownView.isLineOfList(e.lines[e.at]);)o.push(e.lines[e.at]),e.at++;return e.blocks.push({type:"list",html:MarkdownView.listHtml(o,e.context)}),!0},MarkdownView.readTable=function(e){if(!MarkdownView.isTableStart(e.lines,e.at))return!1;const o=e.lines[e.at],t=e.lines[e.at+1],n=[];for(e.at+=2;e.at<e.lines.length&&e.lines[e.at].indexOf("|")>-1&&e.lines[e.at].trim();)n.push(e.lines[e.at]),e.at++;return e.blocks.push({type:"table",html:MarkdownView.tableHtml(o,t,n,e.context)}),!0},MarkdownView.readParagraph=function(e){const o=[];for(;e.at<e.lines.length&&e.lines[e.at].trim()&&(!o.length||!MarkdownView.isBlockStart(e.lines,e.at));)o.push(e.lines[e.at]),e.at++;const t=o.map(function(t,n){const r=MarkdownView.RE.hardBreak.test(t)&&n<o.length-1,i=t.trim().replace(/\\$/,"");return MarkdownView.inlineHtml(i,e.context)+(r?"<br>":" ")}).join("");return e.blocks.push({type:"p",html:t.trim()}),!0},MarkdownView.BLOCK_READERS=[MarkdownView.readCode,MarkdownView.readHeading,MarkdownView.readUnderlinedHeading,MarkdownView.readLine,MarkdownView.readQuote,MarkdownView.readList,MarkdownView.readTable,MarkdownView.readParagraph],MarkdownView.readListItems=function(e){const o=[];return e.forEach(function(e){const t=MarkdownView.RE.listItem.exec(e);if(t){const e=/\d/.test(t[2]);o.push({indent:t[1].replace(/\t/g," ").length,isOrdered:e,start:parseInt(t[2],10),text:t[3]})}else o.length&&(o[o.length-1].text+=" "+e.trim())}),o},MarkdownView.listItemHtml=function(e,o){const t=MarkdownView.RE.task.exec(e.text);if(!t)return"<li>"+MarkdownView.inlineHtml(e.text,o);return'<li class="markdown-view-task"><span class="'+(" "===t[1]?"markdown-view-check":"markdown-view-check markdown-view-check-on")+'"></span>'+MarkdownView.inlineHtml(t[2],o)},MarkdownView.listStartHtml=function(e){return e.isOrdered?1===e.start?"<ol>":'<ol start="'+e.start+'">':"<ul>"},MarkdownView.listHtml=function(e,o){const t=MarkdownView.readListItems(e);let n=0;const r=function(e){const i=t[n];let a=MarkdownView.listStartHtml(i);for(;n<t.length&&t[n].indent===e;)a+=MarkdownView.listItemHtml(t[n],o),n++,n<t.length&&t[n].indent>e&&(a+=r(t[n].indent)),a+="</li>";return a+(i.isOrdered?"</ol>":"</ul>")};let i="";for(;n<t.length;)i+=r(t[n].indent);return i},MarkdownView.tableCells=function(e){return e.trim().replace(/\\\|/g,"").replace(/^\|/,"").replace(/\|$/,"").split("|").map(function(e){return e.split("").join("|").trim()})},MarkdownView.tableAlign=function(e){const o=e.startsWith(":"),t=e.endsWith(":");return o&&t?"center":t?"right":""},MarkdownView.tableRowHtml=function(e,o,t,n){let r="<tr>";return t.forEach(function(t,i){const a=t?' style="text-align: '+t+'"':"",l=i<e.length?e[i]:"";r+="<"+o+a+">"+MarkdownView.inlineHtml(l,n)+"</"+o+">"}),r+"</tr>"},MarkdownView.tableHtml=function(e,o,t,n){const r=MarkdownView.tableCells(o).map(MarkdownView.tableAlign),i=t.map(function(e){return MarkdownView.tableRowHtml(MarkdownView.tableCells(e),"td",r,n)}).join("");return'<div class="markdown-view-table"><table><thead>'+MarkdownView.tableRowHtml(MarkdownView.tableCells(e),"th",r,n)+"</thead><tbody>"+i+"</tbody></table></div>"},MarkdownView.KEEP_MARK="\0",MarkdownView.INLINE_RE={code:/(`+)\s?([^`]|[^`].*?[^`])\s?\1(?!`)/g,letter:/\\([!-/:-@[-`{-~])/g,picture:/!\[((?:\\.|[^\]\\])*)\]\(\s*<?((?:[^()\s<>]|\([^()\s]*\))+)>?(?:\s+"[^"]*")?\s*\)/g,link:/\[((?:\\.|[^[\]\\]|\[[^\]]*\])*)\]\(\s*<?((?:[^()\s<>]|\([^()\s]*\))+)>?(?:\s+"[^"]*")?\s*\)/g,bareAddress:/(^|[\s(*_~])(https?:\/\/[^\s<>]+[^\s<>.,;:)!?'"*_~])/g,lineBreak:/&lt;br\s*\/?&gt;/gi,strong:/\*\*([^\s*](?:.*?[^\s*])?)\*\*/g,strongLine:/(^|[^\w])__([^\s_](?:.*?[^\s_])?)__(?!\w)/g,emphasis:/(^|[^*\w])\*([^\s*](?:.*?[^\s*])?)\*(?!\*)/g,emphasisLine:/(^|[^\w])_([^\s_](?:.*?[^\s_])?)_(?!\w)/g,deleted:/~~([^\s~](?:.*?[^\s~])?)~~/g},MarkdownView.inlineHtml=function(e,o){const t=[],n=MarkdownView.formatLine(String(e).split(MarkdownView.KEEP_MARK).join(""),function(e){return t.push(e),MarkdownView.KEEP_MARK+(t.length-1)+MarkdownView.KEEP_MARK},o);return MarkdownView.putKeptParts(n,t)},MarkdownView.putKeptParts=function(e,o){const t=new RegExp(MarkdownView.KEEP_MARK+"(\\d+)"+MarkdownView.KEEP_MARK,"g");let n=e;for(;n.indexOf(MarkdownView.KEEP_MARK)>-1;)n=n.replace(t,function(e,t){return o[Number(t)]});return n},MarkdownView.formatLine=function(e,o,t){const n=MarkdownView.INLINE_RE;let r=e.replace(n.code,function(e,t,n){return o("<code>"+basic.escapeHtml(n)+"</code>")});return r=r.replace(n.picture,function(e,n,r){return o(MarkdownView.pictureHtml(MarkdownView.removeEscapes(r),MarkdownView.removeEscapes(n),t))}),r=r.replace(n.link,function(e,n,r){return o(MarkdownView.linkHtml(MarkdownView.removeEscapes(r),MarkdownView.formatLine(n,o,t)))}),r=r.replace(n.letter,function(e,t){return o(basic.escapeHtml(t))}),r=r.replace(n.bareAddress,function(e,t,n){return t+o(MarkdownView.linkHtml(n,basic.escapeHtml(n)))}),MarkdownView.formatWords(basic.escapeHtml(r))},MarkdownView.removeEscapes=function(e){return e.replace(MarkdownView.INLINE_RE.letter,"$1")},MarkdownView.formatWords=function(e){const o=MarkdownView.INLINE_RE;return e.replace(o.lineBreak,"<br>").replace(o.strong,"<strong>$1</strong>").replace(o.strongLine,"$1<strong>$2</strong>").replace(o.emphasis,"$1<em>$2</em>").replace(o.emphasisLine,"$1<em>$2</em>").replace(o.deleted,"<del>$1</del>")},MarkdownView.LINK_SCHEMES=/^(https?|mailto|tel):/i,MarkdownView.PICTURE_SCHEMES=/^(https?:|data:image\/)/i,MarkdownView.REMOTE_ADDRESS=/^(https?:)?\/\//i,MarkdownView.ANY_SCHEME=/^[a-z][a-z0-9+.-]*:/i,MarkdownView.isSafeAddress=function(e,o){if(e.indexOf(MarkdownView.KEEP_MARK)>-1)return!1;const t=e.replace(/[\p{C}\p{Z}]/gu,"");return!MarkdownView.ANY_SCHEME.test(t)||o.test(t)},MarkdownView.linkHtml=function(e,o){if(!MarkdownView.isSafeAddress(e,MarkdownView.LINK_SCHEMES))return o;const t="#"===e.charAt(0)?"":' target="_blank" rel="noopener noreferrer"';return'<a href="'+basic.escapeHtml(e)+'"'+t+">"+o+"</a>"},MarkdownView.pictureHtml=function(e,o,t){const n=basic.escapeHtml(o);return MarkdownView.isSafeAddress(e,MarkdownView.PICTURE_SCHEMES)?!t.remotePictures&&MarkdownView.REMOTE_ADDRESS.test(e)?MarkdownView.linkHtml(e,n||basic.escapeHtml(e)):'<img src="'+basic.escapeHtml(e)+'" alt="'+n+'">':n},MarkdownView.plainText=function(e){return String(e).replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/[`*~]/g,"").replace(/(^|\s)_+|_+(\s|$)/g,"$1$2").replace(/\s+/g," ").trim()},MarkdownView.slug=function(e){return String(e).replace(/[ıİ]/g,"i").normalize("NFD").replace(/\p{M}/gu,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60)},MarkdownView.styles={light:MarkdownViewDefaults.style,dark:{box:{color:"#1C1C1B"},text:{textColor:White(.8),softColor:White(.5),strongColor:White(.94)},heading:{textColor:White(.94),lineColor:White(.12)},link:{color:"#6FC6CD",lineColor:"rgba(111, 198, 205, 0.35)"},inlineCode:{color:White(.1)},quote:{textColor:White(.62),lineColor:White(.2)},table:{lineColor:White(.16),headColor:White(.06)},line:{color:White(.14)},check:{color:White(.35),onColor:"#6FC6CD",markColor:"#1C1C1B"},code:{color:"#232322",borderColor:White(.08),textColor:"#E6E6E3",bar:{textColor:White(.5)},button:{textColor:White(.65),hoverColor:White(.09)}},codeStyleName:"dark",empty:{textColor:White(.5)},focus:{ringColor:"rgba(111, 198, 205, 0.8)"},scrollBar:{bar_color:"#8A8A88",bar_mouseOverColor:"#BFBFBD"}}};
@@ -1,2 +1,2 @@
1
1
  /* Bismillah */
2
- "use strict";const SliderDefaults={key:0,width:250,value:0,minValue:0,maxValue:100,step:1,minThumbHeight:44,thumbColor:"rgba(0,0,0,0.7)",trackHeight:16,trackColor:"cadetblue",trackBackgroundColor:"rgba(0,0,0,0.05)",onChangeStart:function(t){},onChange:function(t){},onChangeEnd:function(t){},showValueAtStart:0,showValueOnSet:1,showValueOnDrag:1,ariaLabel:"",styleName:"classic",style:{thumb:{areaWidth:20,width:4,height:0,round:2,boxShadow:""},dragging:{width:2,trackSpace:3,ringSize:0,ringOpacity:.2},track:{space:6,outerRound:16,innerRound:4},trackDot:{size:4,right:4},value:{color:"rgba(0,0,0,0.9)",textColor:"white",fontSize:14,padding:[11,9],round:16,space:6},focus:{ringColor:"",ringWidth:2,ringSpace:2}}},Slider=function(t={}){basic.applyStylePackage(t,Slider.styles,SliderDefaults),mergeIntoIfMissing(t,SliderDefaults);const e=startObject(t),o=e.style;e.minValue=Number(e.minValue),e.maxValue=Number(e.maxValue),e.step=Number(e.step);const n=e.minThumbHeight>e.trackHeight?e.minThumbHeight:e.trackHeight;e.height=n,e.clipContent=0;let a=!1,r=0,i=!1,u=null,l=0,c=0,s=1,h=null;let d=o.track.space,g=1;const p=function(){const t=e.width-L.width;return t>0?t:0},f=function(){const t=e.maxValue-e.minValue;return t>0?t:1},m=function(){return e.step>0?e.step:1},k=function(t){t=Number(t),isFinite(t)||(t=e.minValue);const o=m(),n=Math.round((t-e.minValue)/o);let a=Number((e.minValue+n*o).toFixed(function(){const t=String(e.step),o=t.indexOf(".");return o<0?0:t.length-o-1}()));return a<e.minValue&&(a=e.minValue),a>e.maxValue&&(a=e.maxValue),a},b=function(t){return(t-e.minValue)*(p()/f())},w=function(){return e.elem.offsetWidth<=0?1:e.elem.getBoundingClientRect().width/e.elem.offsetWidth||1},S=function(t){e.value=t,H.text=t,e.aria={valuenow:String(t),valuemin:String(e.minValue),valuemax:String(e.maxValue)}},x=function(t=0){0==t&&z.dontMotion(),z.width=L.left+I.left-d,0==t&&A.dontMotion(),A.width=e.width-(L.left+L.width)+I.left-d},C=function(){H.css.transform="translateY(0px) scale(1)",H.opacity=1},V=function(){H.css.transform="translateY(25px) scale(0.1)",H.opacity=0},v=function(){H.aline(L,"top",o.value.space-I.top,"center")},y=function(t,o=0){const n=p();(t<0||!isFinite(t))&&(t=0),t>n&&(t=n);let a=e.value;n>0&&(a=k(t/n*f()+e.minValue),t=b(a)),0==o&&L.dontMotion(),L.left=t,x(o),0==o&&H.dontMotion(),S(a),v()},R=function(t,e){B(t,e),y(b(t),e),S(t)},D=function(t){const n=[];if(o.thumb.boxShadow&&n.push(o.thumb.boxShadow),t&&o.dragging.ringSize){const t=Alpha(e.trackColor,o.dragging.ringOpacity);n.push("0 0 0 "+o.dragging.ringSize+"px "+t)}return n.join(", ")},M=function(t,n=!1){a=t,d=function(t){return t&&""!==o.dragging.trackSpace?o.dragging.trackSpace:o.track.space}(a),I.withMotion(function(){I.width=function(t){return t&&""!==o.dragging.width?o.dragging.width:o.thumb.width}(t),I.boxShadow=D(t),I.center("left"),x(1),e.showValueClean(),t||!n?t?e.showValueOnDrag&&C():V():e.showValue()})},O=function(){const t=o.focus.ringColor||Alpha(e.trackColor,.8);I.css.outline=r?o.focus.ringWidth+"px solid "+t:"",I.css.outlineOffset=o.focus.ringSpace+"px"},B=function(t,o){0==o&&(z.dontMotion(),A.dontMotion()),z.opacity=t<=e.minValue?0:1,A.opacity=t>=e.maxValue?0:1};e.setValue=function(t){if(R(k(t),1),g)return g=0,void(e.showValueAtStart&&e.showValueOnSet&&e.showValue());e.showValueOnSet&&e.showValue()},e.getValue=function(){return e.value},e.showValue=function(){e.showValueClean(),C(),h=e.after(1200,V)},e.showValueClean=function(){h&&h(),h=null};const F=function(){R(k(e.value),0)};e.setMinValue=function(t){e.minValue=Number(t),F()},e.setMaxValue=function(t){e.maxValue=Number(t),F()},e.setStep=function(t){e.step=Number(t),F()},e.setTrackColor=function(t){e.trackColor=t,z.color=t,T.color=t},e.setTrackBackgroundColor=function(t){e.trackBackgroundColor=t,A.color=t},e.setThumbColor=function(t){e.thumbColor=t,I.color=t};const z=Box({height:e.trackHeight,width:0,left:0,top:0,color:e.trackColor,borderColor:"rgba(0, 0, 0, 0.4)"});that.css={borderTopRightRadius:o.track.innerRound+"px",borderTopLeftRadius:o.track.outerRound+"px",borderBottomRightRadius:o.track.innerRound+"px",borderBottomLeftRadius:o.track.outerRound+"px"},that.setMotion("width 0.2s, opacity 0.2s"),that.center("top");const A=Box({height:e.trackHeight,width:0,right:0,top:0,color:e.trackBackgroundColor});that.css={borderTopRightRadius:o.track.outerRound+"px",borderTopLeftRadius:o.track.innerRound+"px",borderBottomRightRadius:o.track.outerRound+"px",borderBottomLeftRadius:o.track.innerRound+"px"},that.setMotion("width 0.2s, opacity 0.2s"),that.center("top");const T=Box({color:e.trackColor,width:o.trackDot.size,height:o.trackDot.size,round:o.trackDot.size});A.add(that),that.center("top"),that.right=o.trackDot.right;const L=startBox({width:o.thumb.areaWidth,height:n,top:0,left:0,color:"transparent",clickable:1,clipContent:0});that.cursor="pointer",that.setMotion("left 0.2s");const I=Box({top:0,width:o.thumb.width,height:o.thumb.height||n,color:e.thumbColor,round:o.thumb.round,borderColor:"rgba(0, 0, 0, 0.4)",boxShadow:D(!1)});that.setMotion("width 0.2s, left 0.2s, box-shadow 0.2s"),that.center("left"),that.center("top"),endBox();const H=Label({text:"67",color:o.value.color,textColor:o.value.textColor,fontSize:o.value.fontSize,padding:o.value.padding,round:o.value.round});v(),V(),H.setMotion("transform 0.2s, opacity 0.2s, left 0.2s");const N=t=>t.touches&&t.touches.length?t.touches[0].clientX:t.clientX,W=t=>t.touches&&t.touches.length?t.touches[0].clientY:t.clientY;let E=[];const _=()=>{E.forEach(t=>t()),E=[]},j=t=>{M(!0),l=t,c=parseFloat(L.left)||0,s=w(),_(),E=[e.listenTo(document,"mousemove",G),e.listenTo(document,"mouseup",J),e.listenTo(document,"touchmove",G,{passive:!1}),e.listenTo(document,"touchend",J),e.listenTo(document,"touchcancel",J)],e.onChangeStart(e)},P=(t,o)=>{const n=function(t){const o=p();if(o<=0)return e.value;const n=(t-e.elem.getBoundingClientRect().left)/w(),a=Math.min(Math.max(n-L.width/2,0),o);return k(a/o*f()+e.minValue)}(t);n!==e.value&&(R(n,o),e.onChange(e))},Y=(t,e)=>{if("mousedown"===e.type&&0!==e.button)return;r=0,O();const o=L.elem.contains(e.target);o||"touchstart"!==e.type?("touchstart"===e.type&&e.preventDefault(),o?j(N(e)):(i=!0,j(N(e)),P(N(e),1),c=parseFloat(L.left)||0)):K(e)},K=t=>{u={x:N(t),y:W(t)},_(),E=[e.listenTo(document,"touchmove",X,{passive:!1}),e.listenTo(document,"touchend",q),e.listenTo(document,"touchcancel",U)]},U=()=>{u=null,_()},X=(t,e)=>{const o=N(e)-u.x,n=W(e)-u.y;Math.abs(o)<6&&Math.abs(n)<6||(Math.abs(n)>=Math.abs(o)?U():(e.preventDefault(),u=null,j(N(e)),P(N(e),0),c=parseFloat(L.left)||0))},q=(t,o)=>{o.preventDefault();const n=u.x;U(),e.onChangeStart(e),P(n,1),e.onChangeEnd(e),e.showValueOnDrag&&e.showValue()},G=(t,o)=>{if(!a)return;o.preventDefault(),i=!1;const n=N(o),r=p();let u=c+(n-l)/s;u<0&&(u=0),u>r&&(u=r),y(u),B(e.value,0),e.onChange(e)},J=()=>{_(),M(!1,i&&e.showValueOnDrag),i=!1,e.onChangeEnd(e)},Q={ArrowRight:()=>e.value+m(),ArrowUp:()=>e.value+m(),ArrowLeft:()=>e.value-m(),ArrowDown:()=>e.value-m(),PageUp:()=>e.value+10*m(),PageDown:()=>e.value-10*m(),Home:()=>e.minValue,End:()=>e.maxValue};return e.role="slider",e.tabIndex=0,e.aria={label:e.ariaLabel},e.cursor="pointer",e.css={touchAction:"pan-y",outline:"none"},e.on("mousedown",Y),e.on("touchstart",Y,{passive:!1}),e.on("keydown",(t,o)=>{if(!Object.prototype.hasOwnProperty.call(Q,o.key))return;o.preventDefault(),r=1,O();const n=k(Q[o.key]());n!==e.value&&(e.onChangeStart(e),R(n,1),e.showValueOnDrag&&e.showValue(),e.onChange(e),e.onChangeEnd(e))}),e.on("focus",()=>{r=function(){try{return e.elem.matches(":focus-visible")?1:0}catch(t){return 0}}(),O()}),e.on("blur",()=>{r=0,O()}),e.onResize(function(){a||R(e.value,0)}),e.setValue(e.value),endObject(e)};Slider.styles={classic:SliderDefaults.style,round:{trackHeight:6,trackBackgroundColor:"rgba(0, 0, 0, 0.12)",thumbColor:"white",style:{thumb:{areaWidth:24,width:24,height:24,round:12,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.04)"},dragging:{width:"",trackSpace:"",ringSize:6,ringOpacity:.2},track:{space:-12,outerRound:3,innerRound:3},trackDot:{size:0},value:{color:"#232323",fontSize:13,padding:[9,5],round:8,space:10}}},roundDark:{trackHeight:6,trackColor:"#5BBAC1",trackBackgroundColor:White(.16),thumbColor:"white",style:{thumb:{areaWidth:24,width:24,height:24,round:12,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.5)"},dragging:{width:"",trackSpace:"",ringSize:6,ringOpacity:.3},track:{space:-12,outerRound:3,innerRound:3},trackDot:{size:0},value:{color:"#F2F2F2",textColor:"#232323",fontSize:13,padding:[9,5],round:8,space:10}}}},Slider.createMinimalStyle=function(t){return{minThumbHeight:20,trackHeight:2,trackColor:t.ink,trackBackgroundColor:t.track,thumbColor:t.ground,style:{thumb:{areaWidth:12,width:12,height:12,round:6,boxShadow:"0 0 0 1px "+t.ink},dragging:{width:"",trackSpace:"",ringSize:0,ringOpacity:0},track:{space:-6,outerRound:1,innerRound:1},trackDot:{size:0},value:{color:t.ink,textColor:t.onInk,fontSize:11,padding:[6,2],round:3,space:6},focus:{ringColor:t.focus,ringWidth:2,ringSpace:2}}}},Slider.MINIMAL_COLORS={ground:"#FFFFFF",ink:"#1F1F1F",onInk:"#FFFFFF",track:Black(.12),focus:"#3D8BD9"},Slider.styles.minimal=Slider.createMinimalStyle(Slider.MINIMAL_COLORS),Slider.MINIMAL_DARK_COLORS={ground:"#1A1A19",ink:"#EDEDEB",onInk:"#1A1A19",track:White(.14),focus:"#7FB6DE"},Slider.styles.minimalDark=Slider.createMinimalStyle(Slider.MINIMAL_DARK_COLORS);
2
+ "use strict";const SliderDefaults={key:0,width:250,value:0,minValue:0,maxValue:100,step:1,minThumbHeight:44,thumbColor:"rgba(0,0,0,0.7)",trackHeight:16,trackColor:"cadetblue",trackBackgroundColor:"rgba(0,0,0,0.05)",onChangeStart:function(t){},onChange:function(t){},onChangeEnd:function(t){},showValueAtStart:0,showValueOnSet:1,showValueOnDrag:1,ariaLabel:"",styleName:"split",style:{thumb:{areaWidth:20,width:4,height:0,round:2,boxShadow:""},dragging:{width:2,trackSpace:3,ringSize:0,ringOpacity:.2},track:{space:6,outerRound:16,innerRound:4},trackDot:{size:4,right:4},value:{color:"rgba(0,0,0,0.9)",textColor:"white",fontSize:14,padding:[11,9],round:16,space:6},focus:{ringColor:"",ringWidth:2,ringSpace:2}}},Slider=function(t={}){basic.applyStylePackage(t,Slider.styles,SliderDefaults),mergeIntoIfMissing(t,SliderDefaults);const e=startObject(t),o=e.style;e.minValue=Number(e.minValue),e.maxValue=Number(e.maxValue),e.step=Number(e.step);const n=e.minThumbHeight>e.trackHeight?e.minThumbHeight:e.trackHeight;e.height=n,e.clipContent=0;let a=!1,r=0,i=!1,u=null,l=0,c=0,s=1,h=null;let d=o.track.space,g=1;const p=function(){const t=e.width-L.width;return t>0?t:0},f=function(){const t=e.maxValue-e.minValue;return t>0?t:1},m=function(){return e.step>0?e.step:1},k=function(t){t=Number(t),isFinite(t)||(t=e.minValue);const o=m(),n=Math.round((t-e.minValue)/o);let a=Number((e.minValue+n*o).toFixed(function(){const t=String(e.step),o=t.indexOf(".");return o<0?0:t.length-o-1}()));return a<e.minValue&&(a=e.minValue),a>e.maxValue&&(a=e.maxValue),a},b=function(t){return(t-e.minValue)*(p()/f())},w=function(){return e.elem.offsetWidth<=0?1:e.elem.getBoundingClientRect().width/e.elem.offsetWidth||1},S=function(t){e.value=t,W.text=t,e.aria={valuenow:String(t),valuemin:String(e.minValue),valuemax:String(e.maxValue)}},C=function(t=0){0==t&&A.dontMotion(),A.width=L.left+I.left-d,0==t&&z.dontMotion(),z.width=e.width-(L.left+L.width)+I.left-d},x=function(){W.css.transform="translateY(0px) scale(1)",W.opacity=1},V=function(){W.css.transform="translateY(25px) scale(0.1)",W.opacity=0},v=function(){W.aline(L,"top",o.value.space-I.top,"center")},y=function(t,o=0){const n=p();(t<0||!isFinite(t))&&(t=0),t>n&&(t=n);let a=e.value;n>0&&(a=k(t/n*f()+e.minValue),t=b(a)),0==o&&L.dontMotion(),L.left=t,C(o),0==o&&W.dontMotion(),S(a),v()},R=function(t,e){F(t,e),y(b(t),e),S(t)},D=function(t){const n=[];if(o.thumb.boxShadow&&n.push(o.thumb.boxShadow),t&&o.dragging.ringSize){const t=Alpha(e.trackColor,o.dragging.ringOpacity);n.push("0 0 0 "+o.dragging.ringSize+"px "+t)}return n.join(", ")},M=function(t,n=!1){a=t,d=function(t){return t&&""!==o.dragging.trackSpace?o.dragging.trackSpace:o.track.space}(a),I.withMotion(function(){I.width=function(t){return t&&""!==o.dragging.width?o.dragging.width:o.thumb.width}(t),I.boxShadow=D(t),I.center("left"),C(1),e.showValueClean(),t||!n?t?e.showValueOnDrag&&x():V():e.showValue()})},B=function(){const t=o.focus.ringColor||Alpha(e.trackColor,.8);I.css.outline=r?o.focus.ringWidth+"px solid "+t:"",I.css.outlineOffset=o.focus.ringSpace+"px"},F=function(t,o){0==o&&(A.dontMotion(),z.dontMotion()),A.opacity=t<=e.minValue?0:1,z.opacity=t>=e.maxValue?0:1};e.setValue=function(t){if(R(k(t),1),g)return g=0,void(e.showValueAtStart&&e.showValueOnSet&&e.showValue());e.showValueOnSet&&e.showValue()},e.getValue=function(){return e.value},e.showValue=function(){e.showValueClean(),x(),h=e.after(1200,V)},e.showValueClean=function(){h&&h(),h=null};const O=function(){R(k(e.value),0)};e.setMinValue=function(t){e.minValue=Number(t),O()},e.setMaxValue=function(t){e.maxValue=Number(t),O()},e.setStep=function(t){e.step=Number(t),O()},e.setTrackColor=function(t){e.trackColor=t,A.color=t,T.color=t},e.setTrackBackgroundColor=function(t){e.trackBackgroundColor=t,z.color=t},e.setThumbColor=function(t){e.thumbColor=t,I.color=t};const A=Box({height:e.trackHeight,width:0,left:0,top:0,color:e.trackColor,borderColor:"rgba(0, 0, 0, 0.4)"});that.css={borderTopRightRadius:o.track.innerRound+"px",borderTopLeftRadius:o.track.outerRound+"px",borderBottomRightRadius:o.track.innerRound+"px",borderBottomLeftRadius:o.track.outerRound+"px"},that.setMotion("width 0.2s, opacity 0.2s"),that.center("top");const z=Box({height:e.trackHeight,width:0,right:0,top:0,color:e.trackBackgroundColor});that.css={borderTopRightRadius:o.track.outerRound+"px",borderTopLeftRadius:o.track.innerRound+"px",borderBottomRightRadius:o.track.outerRound+"px",borderBottomLeftRadius:o.track.innerRound+"px"},that.setMotion("width 0.2s, opacity 0.2s"),that.center("top");const T=Box({color:e.trackColor,width:o.trackDot.size,height:o.trackDot.size,round:o.trackDot.size});z.add(that),that.center("top"),that.right=o.trackDot.right;const L=startBox({width:o.thumb.areaWidth,height:n,top:0,left:0,color:"transparent",clickable:1,clipContent:0});that.cursor="pointer",that.setMotion("left 0.2s");const I=Box({top:0,width:o.thumb.width,height:o.thumb.height||n,color:e.thumbColor,round:o.thumb.round,borderColor:"rgba(0, 0, 0, 0.4)",boxShadow:D(!1)});that.setMotion("width 0.2s, left 0.2s, box-shadow 0.2s"),that.center("left"),that.center("top"),endBox();const W=Label({text:"67",color:o.value.color,textColor:o.value.textColor,fontSize:o.value.fontSize,padding:o.value.padding,round:o.value.round});v(),V(),W.setMotion("transform 0.2s, opacity 0.2s, left 0.2s");const H=t=>t.touches&&t.touches.length?t.touches[0].clientX:t.clientX,N=t=>t.touches&&t.touches.length?t.touches[0].clientY:t.clientY;let E=[];const _=()=>{E.forEach(t=>t()),E=[]},j=t=>{M(!0),l=t,c=parseFloat(L.left)||0,s=w(),_(),E=[e.listenTo(document,"mousemove",G),e.listenTo(document,"mouseup",J),e.listenTo(document,"touchmove",G,{passive:!1}),e.listenTo(document,"touchend",J),e.listenTo(document,"touchcancel",J)],e.onChangeStart(e)},P=(t,o)=>{const n=function(t){const o=p();if(o<=0)return e.value;const n=(t-e.elem.getBoundingClientRect().left)/w(),a=Math.min(Math.max(n-L.width/2,0),o);return k(a/o*f()+e.minValue)}(t);n!==e.value&&(R(n,o),e.onChange(e))},Y=(t,e)=>{if("mousedown"===e.type&&0!==e.button)return;r=0,B();const o=L.elem.contains(e.target);o||"touchstart"!==e.type?("touchstart"===e.type&&e.preventDefault(),o?j(H(e)):(i=!0,j(H(e)),P(H(e),1),c=parseFloat(L.left)||0)):K(e)},K=t=>{u={x:H(t),y:N(t)},_(),E=[e.listenTo(document,"touchmove",X,{passive:!1}),e.listenTo(document,"touchend",q),e.listenTo(document,"touchcancel",U)]},U=()=>{u=null,_()},X=(t,e)=>{const o=H(e)-u.x,n=N(e)-u.y;Math.abs(o)<6&&Math.abs(n)<6||(Math.abs(n)>=Math.abs(o)?U():(e.preventDefault(),u=null,j(H(e)),P(H(e),0),c=parseFloat(L.left)||0))},q=(t,o)=>{o.preventDefault();const n=u.x;U(),e.onChangeStart(e),P(n,1),e.onChangeEnd(e),e.showValueOnDrag&&e.showValue()},G=(t,o)=>{if(!a)return;o.preventDefault(),i=!1;const n=H(o),r=p();let u=c+(n-l)/s;u<0&&(u=0),u>r&&(u=r),y(u),F(e.value,0),e.onChange(e)},J=()=>{_(),M(!1,i&&e.showValueOnDrag),i=!1,e.onChangeEnd(e)},Q={ArrowRight:()=>e.value+m(),ArrowUp:()=>e.value+m(),ArrowLeft:()=>e.value-m(),ArrowDown:()=>e.value-m(),PageUp:()=>e.value+10*m(),PageDown:()=>e.value-10*m(),Home:()=>e.minValue,End:()=>e.maxValue};return e.role="slider",e.tabIndex=0,e.aria={label:e.ariaLabel},e.cursor="pointer",e.css={touchAction:"pan-y",outline:"none"},e.on("mousedown",Y),e.on("touchstart",Y,{passive:!1}),e.on("keydown",(t,o)=>{if(!Object.prototype.hasOwnProperty.call(Q,o.key))return;o.preventDefault(),r=1,B();const n=k(Q[o.key]());n!==e.value&&(e.onChangeStart(e),R(n,1),e.showValueOnDrag&&e.showValue(),e.onChange(e),e.onChangeEnd(e))}),e.on("focus",()=>{r=function(){try{return e.elem.matches(":focus-visible")?1:0}catch(t){return 0}}(),B()}),e.on("blur",()=>{r=0,B()}),e.onResize(function(){a||R(e.value,0)}),e.setValue(e.value),endObject(e)};Slider.styles={split:SliderDefaults.style,splitDark:{trackColor:"#5BBAC1",trackBackgroundColor:White(.12),thumbColor:White(.85),style:{value:{color:"#F2F2F2",textColor:"#232323"}}},round:{trackHeight:6,trackBackgroundColor:"rgba(0, 0, 0, 0.12)",thumbColor:"white",style:{thumb:{areaWidth:24,width:24,height:24,round:12,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.04)"},dragging:{width:"",trackSpace:"",ringSize:6,ringOpacity:.2},track:{space:-12,outerRound:3,innerRound:3},trackDot:{size:0},value:{color:"#232323",fontSize:13,padding:[9,5],round:8,space:10}}},roundDark:{trackHeight:6,trackColor:"#5BBAC1",trackBackgroundColor:White(.16),thumbColor:"white",style:{thumb:{areaWidth:24,width:24,height:24,round:12,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.5)"},dragging:{width:"",trackSpace:"",ringSize:6,ringOpacity:.3},track:{space:-12,outerRound:3,innerRound:3},trackDot:{size:0},value:{color:"#F2F2F2",textColor:"#232323",fontSize:13,padding:[9,5],round:8,space:10}}}},Slider.createMinimalStyle=function(t){return{minThumbHeight:20,trackHeight:2,trackColor:t.ink,trackBackgroundColor:t.track,thumbColor:t.ground,style:{thumb:{areaWidth:12,width:12,height:12,round:6,boxShadow:"0 0 0 1px "+t.ink},dragging:{width:"",trackSpace:"",ringSize:0,ringOpacity:0},track:{space:-6,outerRound:1,innerRound:1},trackDot:{size:0},value:{color:t.ink,textColor:t.onInk,fontSize:11,padding:[6,2],round:3,space:6},focus:{ringColor:t.focus,ringWidth:2,ringSpace:2}}}},Slider.MINIMAL_COLORS={ground:"#FFFFFF",ink:"#1F1F1F",onInk:"#FFFFFF",track:Black(.12),focus:"#3D8BD9"},Slider.styles.minimal=Slider.createMinimalStyle(Slider.MINIMAL_COLORS),Slider.MINIMAL_DARK_COLORS={ground:"#1A1A19",ink:"#EDEDEB",onInk:"#1A1A19",track:White(.14),focus:"#7FB6DE"},Slider.styles.minimalDark=Slider.createMinimalStyle(Slider.MINIMAL_DARK_COLORS);
@@ -1,2 +1,2 @@
1
1
  /* Bismillah */
2
- "use strict";const SmartButtonDefaults={key:"0",styleName:"ozden",tone:"",width:"auto",height:44,labelText:"Button",allowHtml:0,iconFile:"",iconPosition:"left",enabled:1,ariaLabel:"",waiting:0,waitingType:"clock",animated:1,ripple:0,ask:"",onBeforeClick:null,onClick:function(t){},onWaitingEnd:function(t){},style:{layout:{gap:8,padding:[16,0],align:"center center",iconSideTrim:2},icon:{width:24,height:24,opacity:.8,filter:"none"},label:{fontSize:20,textColor:Black(.7),fontFamily:"opensans"},box:{color:"#E3E3E3",border:1,borderColor:Black(.35),round:4,boxShadow:"inset 0 -2px 0 rgba(0, 0, 0, 0.25)"},hover:{color:"#D9D9D9",borderColor:""},ask:{button:{color:"#DE815B",borderColor:"#DE815B",boxShadow:"none",textColor:"white",iconFilter:"brightness(0) invert(1)"},bubble:{color:"#DE815B",textColor:"white",fontSize:13,bold:1,round:8,padding:[12,7],border:0,borderColor:"",shadow:"0 6px 16px rgba(0, 0, 0, 0.18)",arrow:12,gap:6,edge:8,grow:1},time:5e3},focus:{ringColor:"rgba(95, 158, 160, 0.6)"},disabled:{color:"#EBEBEA",borderColor:"rgba(0, 0, 0, 0.1)",textColor:"rgba(0, 0, 0, 0.3)",iconOpacity:.25},press:{scale:.94,brightness:.92,time:.15},ripple:{color:"",lightColor:White(.45),darkColor:Black(.12),time:.6},waiting:{clock:"ozden",contentOpacity:.18,clockSize:30,space:14,dots:{size:6,gap:4,color:"indianred"}}}},SmartButton=function(t={}){SmartButton.applyLook(t);const o=""!==t.labelText;"top"===t.iconPosition&&o&&void 0===t.height&&(t.height="auto"),mergeIntoIfMissing(t,SmartButtonDefaults);const e=!o&&"number"==typeof t.height;e&&"auto"===t.width&&(t.width=t.height);const n=startObject(t);let r=null,i=null,a=null,l=0,c=0,s=0,u=0,d=0;const m=function(t,o){const e=null==o?"":String(o);1==n.allowHtml?t.text=e:t.plainText=e},b=function(){return 1==n.enabled&&1!=n.waiting},h=function(){return SmartButton.isReducedMotion()},g=function(){return 1==n.animated&&!h()},f=function(){const t=1==n.enabled,o=function(){const t=n.style,o={color:t.box.color,border:t.box.border,borderColor:t.box.borderColor,boxShadow:t.box.boxShadow,textColor:t.label.textColor,iconOpacity:t.icon.opacity,iconFilter:t.icon.filter};return 1!=n.enabled?Object.assign(o,t.disabled,{boxShadow:"none"}):1==n.isAsking?Object.assign(o,t.ask.button):(c&&1!=n.waiting&&(o.color=t.hover.color,t.hover.borderColor&&(o.borderColor=t.hover.borderColor)),o)}();n.color=o.color,n.border=o.border,n.borderColor=o.borderColor,n.boxShadow=o.boxShadow,n.css=function(){const t=s&&b()&&g();return{transform:t?"scale("+n.style.press.scale+")":"none",filter:t?"brightness("+n.style.press.brightness+")":"none"}}(),n.label&&(n.label.textColor=o.textColor),n.icon&&(n.icon.opacity=o.iconOpacity,n.icon.css={filter:o.iconFilter}),n.layout.css={filter:t?"none":"grayscale(1)"},n.layout.opacity=1==n.waiting?n.style.waiting.contentOpacity:1,n.cursor=t?"pointer":"default",n.tabIndex=t?0:-1,n.aria={disabled:!t,label:n.ariaLabel||n.labelText||""}},p=function(){const t=n.style;n.props(t.box),n.layout.props(t.layout),function(){if(e)return void(n.layout.padding=0);const t=n.style.layout,o=n.icon&&n.label&&"top"!==n.iconPosition,r=Array.isArray(t.padding)?t.padding[0]:t.padding,i=o?t.iconSideTrim:0;n.layout.css={paddingLeft:Math.max(0,r-i)+"px"}}(),n.icon&&n.icon.props(t.icon),n.label&&n.label.props(t.label),n.setFocusRing(t.focus.ringColor),f()},B=function(t){b()&&(1==n.isAsking&&function(t){return!!(t&&t.detail>1)||Date.now()-l<400}(t)||"function"==typeof n.onBeforeClick&&!1===n.onBeforeClick(n)||(n.ask&&1!=n.isAsking?S():(n.cancelAsk(),n.onClick&&n.onClick(n,t))))},S=function(){SmartButton.askingButton&&SmartButton.askingButton.cancelAsk(),SmartButton.askingButton=n,n.isAsking=1,l=Date.now(),f(),"undefined"!=typeof Tooltip&&(a=Tooltip.show(n,n.ask,n.style.ask.bubble)),i=n.after(n.style.ask.time,n.cancelAsk)},y=function(t){if(1!=n.ripple||!b()||h())return;const o=n.elem,e=function(t){const o=n.elem;if(!t||void 0===t.clientX)return{x:o.clientWidth/2,y:o.clientHeight/2};const e=o.getBoundingClientRect(),r=e.width?o.offsetWidth/e.width:1,i=e.height?o.offsetHeight/e.height:1;return{x:(t.clientX-e.left)*r-o.clientLeft,y:(t.clientY-e.top)*i-o.clientTop}}(t),r=Math.hypot(Math.max(e.x,o.clientWidth-e.x),Math.max(e.y,o.clientHeight-e.y)),i=document.createElement("span");i.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; border-radius: inherit; pointer-events: none;";const a=document.createElement("span");a.style.cssText="position: absolute; border-radius: 50%; pointer-events: none; background: "+function(){const t=n.style.ripple;return t.color?t.color:SmartButton.isDarkColor(getComputedStyle(n.elem).backgroundColor)?t.lightColor:t.darkColor}()+"; left: "+(e.x-r)+"px; top: "+(e.y-r)+"px; width: "+2*r+"px; height: "+2*r+"px;",i.appendChild(a),o.insertBefore(i,n.waitingCover?n.waitingCover.elem:null);a.animate([{transform:"scale(0)",opacity:1},{transform:"scale(1)",opacity:.7,offset:.6},{transform:"scale(1)",opacity:0}],{duration:1e3*n.style.ripple.time,easing:"cubic-bezier(0.2, 0.6, 0.35, 1)"}).onfinish=function(){i.remove()}},k=function(){if(!d)return;const t=n.style.press.time+"s",o=g()?"transform "+t+", filter "+t+", box-shadow "+t+", ":"";n.setMotionNow(o+"background-color 0.2s")},C=function(){const t=n.waitingCover.icon;if("clock"==n.waitingType){const o=n.style.waiting,e=Math.min(n.width,n.height)-o.space,r=basic.clamp(e,0,o.clockSize);t.setSize(r,r)}t.center()},x=function(){n.cancelAsk(),n.waiting=1,n.aria={busy:!0},n.waitingCover||(saveCurrentThat(),n.waitingCover=createIn(n,function(){const t=startBox(0,0,"100%","100%",{color:"transparent",clickable:1,cursor:"progress"});if("dots"==n.waitingType)t.icon=SmartButton.createDots(n.style.waiting.dots);else{const o=SmartButton.clocks[n.style.waiting.clock]||SmartButton.clocks.ozden;t.icon=Box(0,0,0,0,{color:"transparent",html:SmartButton.createClockSvg(o)})}return endBox(),t}),restoreThatFromSaved(),n.onResize(function(){1==n.waiting&&C()})),n.waitingCover.visible=1,C(),f()},T=function(){n.waiting=0,n.aria={busy:!1},n.waitingCover.visible=0,f(),"function"==typeof n.onWaitingEnd&&n.onWaitingEnd(n)};n.isAsking=0,n.setLabelText=function(t){n.labelText=t,n.label&&m(n.label,t),f()},n.setIcon=function(t){n.iconFile=t,n.icon&&n.icon.load(t)},n.setAnimated=function(t){n.animated=basic.isOn(t)?1:0,k(),f()},n.setRipple=function(t){n.ripple=basic.isOn(t)?1:0},n.setEnabled=function(t){n.enabled=basic.isOn(t)?1:0,1!=n.enabled&&(n.cancelAsk(),s=0,u=0),f()},n.cancelAsk=function(){1==n.isAsking&&(n.isAsking=0,i&&i(),i=null,a&&a.remove(),a=null,SmartButton.askingButton===n&&(SmartButton.askingButton=null),f())},n.setAsk=function(t){n.ask=t||"",n.ask||n.cancelAsk()},n.press=function(){B(null)};const w=n.remove;return n.superRemove=w,n.remove=function(){n.isRemoved||(n.cancelAsk(),w.call(n))},n.setStyle=function(t){Object.keys(t||{}).forEach(function(o){const e={};mergeIntoIfMissing(e,t[o]),mergeIntoIfMissing(e,n.style[o]),n.style[o]=e}),p(),k()},n.setTone=function(t){n.tone=t||"",n.setStyle(SmartButton.getToneStyle(n.tone,n.styleName))},n.setWaiting=function(t,o=0){r&&r(),r=null,basic.isOn(t)?x():1==n.waiting&&(o<=0?T():r=n.after(o,T))},n.clickable=1,n.role="button",n.layout=AutoLayout({flow:"top"===n.iconPosition?"vertical":"horizontal",width:"auto"===t.width?"auto":"100%",height:"auto"===t.height?"auto":"100%",position:"relative",...n.style.layout}),n.iconFile&&(n.icon=Icon(0,0,n.style.icon),n.icon.load(n.iconFile)),n.labelText&&(n.label=Label(0,0,n.style.label),m(n.label,n.labelText),n.label.css.whiteSpace="nowrap"),endAutoLayout(),p(),requestAnimationFrame(function(){n._isRemoved||(n.elem.offsetWidth,d=1,n.layout.setMotionNow("opacity 0.2s"),k())}),n.on("click",function(t,o){B(o)}),n.on("keydown",function(t,o){if("Enter"==o.key){if(o.preventDefault(),o.repeat)return;y(null),B(o)}" "==o.key&&(o.preventDefault(),u=1)}),n.on("keyup",function(t,o){" "==o.key&&u&&(u=0,y(null),B(o))}),n.on("blur",function(){u=0}),n.onHoverChange(function(t,o){c=o,o||(s=0),f()}),n.on("mousedown",function(t,o){b()&&0===o.button&&(s=1,f(),y(o))}),n.on("mouseup",function(){s=0,f()}),1==n.waiting&&n.setWaiting(1),endObject(n)};SmartButton.askingButton=null,SmartButton.isReducedMotion=function(){return!!window.matchMedia&&(SmartButton.reducedMotionQuery||(SmartButton.reducedMotionQuery=window.matchMedia("(prefers-reduced-motion: reduce)")),SmartButton.reducedMotionQuery.matches)},SmartButton.DARK_LIMIT=.45,SmartButton.isDarkColor=function(t){const o=String(t).trim(),e=/^color\(srgb\s/.test(o);if(!e&&!/^rgba?\(/.test(o))return 0;const n=e?255:1,r=(e?o.slice(11):o).match(/[\d.]+/g);if(!r||r.length<3)return 0;if((r.length>3?parseFloat(r[3]):1)<.5)return 0;for(let t=0;t<3;t++)r[t]=parseFloat(r[t])*n;return(.299*r[0]+.587*r[1]+.114*r[2])/255<SmartButton.DARK_LIMIT?1:0},SmartButton.injectCss=function(){basic.addCss("smart-button-css","@keyframes smart-button-turn { to { transform: rotate(360deg); } }@keyframes smart-button-dot { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; } 40% { transform: scale(1); opacity: 1; } }.smart-button-hand { transform-box: view-box; transform-origin: 50% 50%; animation-name: smart-button-turn; animation-timing-function: linear; animation-iteration-count: infinite; }@media (prefers-reduced-motion: reduce) { .smart-button-hand, .smart-button-dot { animation: none !important; } }")},SmartButton.WHITE_ICON="brightness(0) invert(1)",SmartButton.ROUND=100,SmartButton.EDGE_WIDTH=2,SmartButton.styles={ozden:SmartButtonDefaults.style,ozden2:{box:{boxShadow:"none"}},ozden3:{box:{borderColor:Black(.1),boxShadow:"none"}},ozden4:{box:{color:White(0),border:0,borderColor:"transparent",boxShadow:"none"}},pill:{layout:{gap:10,padding:[18,0]},icon:{width:26,height:26,opacity:1},label:{fontSize:18,fontFamily:"opensans-bold"},box:{border:0,borderColor:"transparent",round:SmartButton.ROUND,boxShadow:"none"}},outlined:{layout:{gap:8,padding:[14,0]},icon:{width:26,height:26,opacity:1},label:{fontSize:18},box:{border:SmartButton.EDGE_WIDTH,round:SmartButton.ROUND,boxShadow:"inset 0 -"+SmartButton.EDGE_WIDTH+"px 0 "+Black(.35)}}},SmartButton.DARK_EDGE=White(.2),SmartButton.DARK_BOTTOM_LINE="inset 0 -2px 0 "+White(.12),SmartButton.createDarkTemplate=function(t,o="#383835"){return{box:Object.assign({color:"#2E2E2C",borderColor:SmartButton.DARK_EDGE,boxShadow:SmartButton.DARK_BOTTOM_LINE},t),hover:{color:o},label:{textColor:White(.85)},icon:{opacity:.85,filter:SmartButton.WHITE_ICON},focus:{ringColor:"rgba(101, 162, 147, 0.75)"},disabled:{color:"#232322",borderColor:White(.06),textColor:White(.28),iconOpacity:.25},press:{brightness:.88},waiting:{clock:"ozdenDark",dots:{color:"#F1C74A"}}}},SmartButton.styles.ozdenDark=SmartButton.createDarkTemplate({}),SmartButton.styles.ozden2Dark=SmartButton.createDarkTemplate({boxShadow:"none"}),SmartButton.styles.ozden3Dark=SmartButton.createDarkTemplate({borderColor:White(.1),boxShadow:"none"}),SmartButton.styles.ozden4Dark=SmartButton.createDarkTemplate({color:White(0),border:0,borderColor:"transparent",boxShadow:"none"},White(.08)),SmartButton.MINIMAL_DANGER="#C24A36",SmartButton.createMinimalTemplate=function(t){const o=SmartButton.MINIMAL_DANGER;return{height:28,style:{layout:{gap:6,padding:[10,0],iconSideTrim:0},icon:{width:14,height:14,opacity:1,filter:t.iconFilter},label:{fontSize:13,textColor:t.text},box:{color:"transparent",border:1,borderColor:t.line,round:4,boxShadow:"none"},hover:{color:"transparent",borderColor:t.lineHover},focus:{ringColor:t.focus},disabled:{color:"transparent",borderColor:t.disabledLine,textColor:t.disabledText,iconOpacity:.4},press:{scale:.97,brightness:1},waiting:{clock:t.clock,contentOpacity:.12,clockSize:16,space:6},ask:{button:{color:o,borderColor:o,boxShadow:"none",textColor:"white",iconFilter:SmartButton.WHITE_ICON},bubble:{color:o,textColor:"white",fontSize:12,bold:0,round:4,padding:[8,4],border:0,borderColor:"",shadow:"none",arrow:8,gap:4,edge:6}}}}},SmartButton.styles.minimal=SmartButton.createMinimalTemplate({text:Black(.85),line:Black(.2),lineHover:Black(.45),focus:"#3D8BD9",disabledLine:Black(.08),disabledText:Black(.34),iconFilter:"none",clock:"minimal"}),SmartButton.styles.minimalDark=SmartButton.createMinimalTemplate({text:White(.88),line:White(.18),lineHover:White(.42),focus:"#7FB6DE",disabledLine:White(.07),disabledText:White(.35),iconFilter:SmartButton.WHITE_ICON,clock:"minimalDark"}),SmartButton.styles.minimalDanger=SmartButton.createMinimalTemplate({text:"#C24A36",line:"rgba(194, 74, 54, 0.5)",lineHover:"#C24A36",focus:"#3D8BD9",disabledLine:Black(.08),disabledText:Black(.34),iconFilter:"none",clock:"minimal"}),SmartButton.styles.minimalDangerDark=SmartButton.createMinimalTemplate({text:"#FF9F93",line:"rgba(255, 159, 147, 0.5)",lineHover:"#FF9F93",focus:"#7FB6DE",disabledLine:White(.07),disabledText:White(.35),iconFilter:"none",clock:"minimalDark"}),SmartButton.DARK_TEXT=Black(.75),SmartButton.LIGHT_TEXT=White(.9),SmartButton.tones={white:{color:"white",hover:"whitesmoke",text:SmartButton.DARK_TEXT},cyan:{color:"#5BBAC1",hover:"#50AEB5",text:SmartButton.DARK_TEXT},orange:{color:"#DE815B",hover:"#D4724B",text:SmartButton.DARK_TEXT},yellow:{color:"#F1C74A",hover:"#E6BB3C",text:SmartButton.DARK_TEXT},green:{color:"#7BC362",hover:"#70B756",text:SmartButton.DARK_TEXT},blue:{color:"#52A8D0",hover:"#479CC4",text:SmartButton.DARK_TEXT},cyanDark:{color:"#376265",hover:"#3C6F72",text:SmartButton.LIGHT_TEXT},orangeDark:{color:"#724837",hover:"#82513C",text:SmartButton.LIGHT_TEXT},yellowDark:{color:"#7B682F",hover:"#8C7633",text:SmartButton.LIGHT_TEXT},greenDark:{color:"#46663A",hover:"#4D7440",text:SmartButton.LIGHT_TEXT},blueDark:{color:"#335A6B",hover:"#38657A",text:SmartButton.LIGHT_TEXT},ink:{color:"#1F1F1F",hover:"#3A3A3A",text:SmartButton.LIGHT_TEXT,edge:"#1F1F1F",hoverEdge:"#3A3A3A"},inkDark:{color:"#EDEDEB",hover:"#FFFFFF",text:"#1A1A19",edge:"#EDEDEB",hoverEdge:"#FFFFFF"}},SmartButton.applyLook=function(t){return SmartButton.applyTone(t),basic.applyStylePackage(t,SmartButton.styles,SmartButtonDefaults),mergeIntoIfMissing(t.style,SmartButtonDefaults.style),t},SmartButton.getToneStyle=function(t,o){if(!t)return SmartButton.getTemplateColors(o);const e=SmartButton.tones[t];if(!e)return console.warn("SmartButton: tone not found: "+t),{};const n=e.text===SmartButton.LIGHT_TEXT,r={box:{color:e.color},hover:{color:e.hover},label:{textColor:e.text},icon:{filter:n?SmartButton.WHITE_ICON:"none"}};return e.edge&&(r.box.borderColor=e.edge,r.hover.borderColor=e.hoverEdge||e.edge),r},SmartButton.getTemplateColors=function(t){const o=SmartButton.applyLook({styleName:t}).style;return{box:{color:o.box.color},hover:{color:o.hover.color},label:{textColor:o.label.textColor},icon:{filter:o.icon.filter}}},SmartButton.applyTone=function(t){if(!t.tone)return;const o={};mergeIntoIfMissing(o,t.style||{}),mergeIntoIfMissing(o,SmartButton.getToneStyle(t.tone)),t.style=o},SmartButton.clocks={ozden:{faceColor:"#FFFFFF",lineColor:"#141414",edgeWidth:2,hourWidth:2,hourLength:7.5,minuteWidth:2,minuteLength:10,minuteColor:"indianred",centerColor:"indianred",centerSize:4,minuteTurn:1.6,hourTurn:19.2}},SmartButton.clocks.ozdenDark=Object.assign({},SmartButton.clocks.ozden,{faceColor:"#2A2A2A",lineColor:"rgba(255, 255, 255, 0.9)",hourColor:"rgba(255, 255, 255, 0.6)",minuteColor:"#F1C74A",centerColor:"#F1C74A"}),SmartButton.clocks.minimal={isRing:1,lineColor:Black(.85),edgeWidth:3,trackOpacity:.2,turnTime:.8},SmartButton.clocks.minimalDark=Object.assign({},SmartButton.clocks.minimal,{lineColor:White(.88)}),SmartButton.CLOCK_SIZE=30,SmartButton.createClockSvg=function(t){if(SmartButton.injectCss(),t.isRing)return SmartButton.createRingSvg(t);const o=t,e=SmartButton.CLOCK_SIZE,n=e/2,r=n-o.edgeWidth/2,i=function(t,o,e,r,i){return'<line class="smart-button-hand" x1="'+n+'" y1="'+n+'" x2="'+t+'" y2="'+o+'" stroke="'+r+'" stroke-width="'+e+'" stroke-linecap="round" style="animation-duration: '+i+'s"/>'};return'<svg viewBox="0 0 '+e+" "+e+'" width="100%" height="100%" aria-hidden="true" style="display: block"><circle cx="'+n+'" cy="'+n+'" r="'+r+'" fill="'+o.faceColor+'" stroke="'+o.lineColor+'" stroke-width="'+o.edgeWidth+'"/>'+i(n+o.hourLength,n,o.hourWidth,o.hourColor||o.lineColor,o.hourTurn)+i(n,n-o.minuteLength,o.minuteWidth,o.minuteColor,o.minuteTurn)+'<circle cx="'+n+'" cy="'+n+'" r="'+o.centerSize/2+'" fill="'+o.centerColor+'"/></svg>'},SmartButton.createRingSvg=function(t){const o=SmartButton.CLOCK_SIZE,e=o/2,n=e-t.edgeWidth/2,r="M"+e+" "+(e-n)+" A"+n+" "+n+" 0 0 1 "+(e+n)+" "+e;return'<svg viewBox="0 0 '+o+" "+o+'" width="100%" height="100%" aria-hidden="true" style="display: block"><circle cx="'+e+'" cy="'+e+'" r="'+n+'" fill="none" stroke="'+t.lineColor+'" stroke-opacity="'+t.trackOpacity+'" stroke-width="'+t.edgeWidth+'"/><path class="smart-button-hand" d="'+r+'" fill="none" stroke="'+t.lineColor+'" stroke-width="'+t.edgeWidth+'" stroke-linecap="round" style="animation-duration: '+t.turnTime+'s"/></svg>'},SmartButton.DOT_COUNT=3,SmartButton.DOT_TIME=1.2,SmartButton.DOT_DELAY=.16,SmartButton.createDots=function(t){SmartButton.injectCss();const o=HGroup({hug:1,align:"center center",gap:t.gap});for(let o=0;o<SmartButton.DOT_COUNT;o++){const e=Box({width:t.size,height:t.size,color:t.color,round:100});e.elem.classList.add("smart-button-dot"),e.css={animation:"smart-button-dot "+SmartButton.DOT_TIME+"s ease-in-out "+o*SmartButton.DOT_DELAY+"s infinite"}}return endGroup(),o};
2
+ "use strict";const SmartButtonDefaults={key:"0",styleName:"ozden",tone:"",width:"auto",height:44,labelText:"Button",allowHtml:0,iconFile:"",iconPosition:"left",enabled:1,ariaLabel:"",waiting:0,waitingType:"clock",animated:1,ripple:0,ask:"",onBeforeClick:null,onClick:function(t){},onWaitingEnd:function(t){},style:{layout:{gap:8,padding:[16,0],align:"center center",iconSideTrim:2},icon:{width:24,height:24,opacity:.8,filter:"none"},label:{fontSize:20,textColor:Black(.7),fontFamily:"opensans"},box:{color:"#E3E3E3",border:1,borderColor:Black(.35),round:4,boxShadow:"inset 0 -2px 0 rgba(0, 0, 0, 0.25)"},hover:{color:"#D9D9D9",borderColor:""},ask:{button:{color:"#DE815B",borderColor:"#DE815B",boxShadow:"none",textColor:"white",iconFilter:"brightness(0) invert(1)"},bubble:{color:"#DE815B",textColor:"white",fontSize:13,bold:1,round:8,padding:[12,7],border:0,borderColor:"",shadow:"0 6px 16px rgba(0, 0, 0, 0.18)",arrow:12,gap:6,edge:8,grow:1},time:5e3},focus:{ringColor:"rgba(95, 158, 160, 0.6)"},disabled:{color:"#EBEBEA",borderColor:"rgba(0, 0, 0, 0.1)",textColor:"rgba(0, 0, 0, 0.3)",iconOpacity:.25},press:{scale:.94,brightness:.92,time:.15},ripple:{color:"",lightColor:White(.45),darkColor:Black(.12),time:.6},waiting:{clock:"ozden",contentOpacity:.18,clockSize:30,space:14,dots:{size:6,gap:4,color:"indianred"}}}},SmartButton=function(t={}){SmartButton.applyLook(t);const o=""!==t.labelText;"top"===t.iconPosition&&o&&void 0===t.height&&(t.height="auto"),mergeIntoIfMissing(t,SmartButtonDefaults);const e=!o&&"number"==typeof t.height;e&&"auto"===t.width&&(t.width=t.height);const n=startObject(t);let r=null,i=null,a=null,l=0,c=0,s=0,u=0,d=0;const m=function(t,o){const e=null==o?"":String(o);1==n.allowHtml?t.text=e:t.plainText=e},b=function(){return 1==n.enabled&&1!=n.waiting},h=function(){return SmartButton.isReducedMotion()},g=function(){return 1==n.animated&&!h()},f=function(){const t=1==n.enabled,o=function(){const t=n.style,o={color:t.box.color,border:t.box.border,borderColor:t.box.borderColor,boxShadow:t.box.boxShadow,textColor:t.label.textColor,iconOpacity:t.icon.opacity,iconFilter:t.icon.filter};return 1!=n.enabled?Object.assign(o,t.disabled,{boxShadow:"none"}):1==n.isAsking?Object.assign(o,t.ask.button):(c&&1!=n.waiting&&(o.color=t.hover.color,t.hover.borderColor&&(o.borderColor=t.hover.borderColor)),o)}();n.color=o.color,n.border=o.border,n.borderColor=o.borderColor,n.boxShadow=o.boxShadow,n.css=function(){const t=s&&b()&&g();return{transform:t?"scale("+n.style.press.scale+")":"none",filter:t?"brightness("+n.style.press.brightness+")":"none"}}(),n.label&&(n.label.textColor=o.textColor),n.icon&&(n.icon.opacity=o.iconOpacity,n.icon.css={filter:o.iconFilter}),n.layout.css={filter:t?"none":"grayscale(1)"},n.layout.opacity=1==n.waiting?n.style.waiting.contentOpacity:1,n.cursor=t?"pointer":"default",n.tabIndex=t?0:-1,n.aria={disabled:!t,label:n.ariaLabel||n.labelText||""}},p=function(){const t=n.style;n.props(t.box),n.layout.props(t.layout),function(){if(e)return void(n.layout.padding=0);const t=n.style.layout,o=n.icon&&n.label&&"top"!==n.iconPosition,r=Array.isArray(t.padding)?t.padding[0]:t.padding,i=o?t.iconSideTrim:0;n.layout.css={paddingLeft:Math.max(0,r-i)+"px"}}(),n.icon&&n.icon.props(t.icon),n.label&&n.label.props(t.label),n.setFocusRing(t.focus.ringColor),f()},B=function(t){b()&&(1==n.isAsking&&function(t){return!!(t&&t.detail>1)||Date.now()-l<400}(t)||"function"==typeof n.onBeforeClick&&!1===n.onBeforeClick(n)||(n.ask&&1!=n.isAsking?S():(n.cancelAsk(),n.onClick&&n.onClick(n,t))))},S=function(){SmartButton.askingButton&&SmartButton.askingButton.cancelAsk(),SmartButton.askingButton=n,n.isAsking=1,l=Date.now(),f(),"undefined"!=typeof Tooltip&&(a=Tooltip.show(n,n.ask,n.style.ask.bubble)),i=n.after(n.style.ask.time,n.cancelAsk)},y=function(t){if(1!=n.ripple||!b()||h())return;const o=n.elem,e=function(t){const o=n.elem;if(!t||void 0===t.clientX)return{x:o.clientWidth/2,y:o.clientHeight/2};const e=o.getBoundingClientRect(),r=e.width?o.offsetWidth/e.width:1,i=e.height?o.offsetHeight/e.height:1;return{x:(t.clientX-e.left)*r-o.clientLeft,y:(t.clientY-e.top)*i-o.clientTop}}(t),r=Math.hypot(Math.max(e.x,o.clientWidth-e.x),Math.max(e.y,o.clientHeight-e.y)),i=document.createElement("span");i.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; border-radius: inherit; pointer-events: none;";const a=document.createElement("span");a.style.cssText="position: absolute; border-radius: 50%; pointer-events: none; background: "+function(){const t=n.style.ripple;return t.color?t.color:SmartButton.isDarkColor(getComputedStyle(n.elem).backgroundColor)?t.lightColor:t.darkColor}()+"; left: "+(e.x-r)+"px; top: "+(e.y-r)+"px; width: "+2*r+"px; height: "+2*r+"px;",i.appendChild(a),o.insertBefore(i,n.waitingCover?n.waitingCover.elem:null);a.animate([{transform:"scale(0)",opacity:1},{transform:"scale(1)",opacity:.7,offset:.6},{transform:"scale(1)",opacity:0}],{duration:1e3*n.style.ripple.time,easing:"cubic-bezier(0.2, 0.6, 0.35, 1)"}).onfinish=function(){i.remove()}},k=function(){if(!d)return;const t=n.style.press.time+"s",o=g()?"transform "+t+", filter "+t+", box-shadow "+t+", ":"";n.setMotionNow(o+"background-color 0.2s")},C=function(){const t=n.waitingCover.icon;if("clock"==n.waitingType){const o=n.style.waiting,e=Math.min(n.width,n.height)-o.space,r=basic.clamp(e,0,o.clockSize);t.setSize(r,r)}t.center()},x=function(){n.cancelAsk(),n.waiting=1,n.aria={busy:!0},n.waitingCover||(saveCurrentThat(),n.waitingCover=createIn(n,function(){const t=startBox(0,0,"100%","100%",{color:"transparent",clickable:1,cursor:"progress"});if("dots"==n.waitingType)t.icon=SmartButton.createDots(n.style.waiting.dots);else{const o=SmartButton.clocks[n.style.waiting.clock]||SmartButton.clocks.ozden;t.icon=Box(0,0,0,0,{color:"transparent",html:SmartButton.createClockSvg(o)})}return endBox(),t}),restoreThatFromSaved(),n.onResize(function(){1==n.waiting&&C()})),n.waitingCover.visible=1,C(),f()},T=function(){n.waiting=0,n.aria={busy:!1},n.waitingCover.visible=0,f(),"function"==typeof n.onWaitingEnd&&n.onWaitingEnd(n)};n.isAsking=0,n.setLabelText=function(t){n.labelText=t,n.label&&m(n.label,t),f()},n.setIcon=function(t){n.iconFile=t,n.icon&&n.icon.load(t)},n.setAnimated=function(t){n.animated=basic.isOn(t)?1:0,k(),f()},n.setRipple=function(t){n.ripple=basic.isOn(t)?1:0},n.setEnabled=function(t){n.enabled=basic.isOn(t)?1:0,1!=n.enabled&&(n.cancelAsk(),s=0,u=0),f()},n.cancelAsk=function(){1==n.isAsking&&(n.isAsking=0,i&&i(),i=null,a&&a.remove(),a=null,SmartButton.askingButton===n&&(SmartButton.askingButton=null),f())},n.setAsk=function(t){n.ask=t||"",n.ask||n.cancelAsk()},n.press=function(){B(null)};const w=n.remove;return n.superRemove=w,n.remove=function(){n.isRemoved||(n.cancelAsk(),w.call(n))},n.setStyle=function(t){Object.keys(t||{}).forEach(function(o){const e={};mergeIntoIfMissing(e,t[o]),mergeIntoIfMissing(e,n.style[o]),n.style[o]=e}),p(),k()},n.setTone=function(t){n.tone=t||"",n.setStyle(SmartButton.getToneStyle(n.tone,n.styleName))},n.setWaiting=function(t,o=0){r&&r(),r=null,basic.isOn(t)?x():1==n.waiting&&(o<=0?T():r=n.after(o,T))},n.clickable=1,n.role="button",n.layout=AutoLayout({flow:"top"===n.iconPosition?"vertical":"horizontal",width:"auto"===t.width?"auto":"100%",height:"auto"===t.height?"auto":"100%",position:"relative",...n.style.layout}),n.iconFile&&(n.icon=Icon(0,0,n.style.icon),n.icon.load(n.iconFile)),n.labelText&&(n.label=Label(0,0,n.style.label),m(n.label,n.labelText),n.label.css.whiteSpace="nowrap"),endAutoLayout(),p(),requestAnimationFrame(function(){n._isRemoved||(n.elem.offsetWidth,d=1,n.layout.setMotionNow("opacity 0.2s"),k())}),n.on("click",function(t,o){B(o)}),n.on("keydown",function(t,o){if("Enter"==o.key){if(o.preventDefault(),o.repeat)return;y(null),B(o)}" "==o.key&&(o.preventDefault(),u=1)}),n.on("keyup",function(t,o){" "==o.key&&u&&(u=0,y(null),B(o))}),n.on("blur",function(){u=0}),n.onHoverChange(function(t,o){c=o,o||(s=0),f()}),n.on("mousedown",function(t,o){o.preventDefault(),b()&&0===o.button&&(s=1,f(),y(o))}),n.on("mouseup",function(){s=0,f()}),1==n.waiting&&n.setWaiting(1),endObject(n)};SmartButton.askingButton=null,SmartButton.isReducedMotion=function(){return!!window.matchMedia&&(SmartButton.reducedMotionQuery||(SmartButton.reducedMotionQuery=window.matchMedia("(prefers-reduced-motion: reduce)")),SmartButton.reducedMotionQuery.matches)},SmartButton.DARK_LIMIT=.45,SmartButton.isDarkColor=function(t){const o=String(t).trim(),e=/^color\(srgb\s/.test(o);if(!e&&!/^rgba?\(/.test(o))return 0;const n=e?255:1,r=(e?o.slice(11):o).match(/[\d.]+/g);if(!r||r.length<3)return 0;if((r.length>3?parseFloat(r[3]):1)<.5)return 0;for(let t=0;t<3;t++)r[t]=parseFloat(r[t])*n;return(.299*r[0]+.587*r[1]+.114*r[2])/255<SmartButton.DARK_LIMIT?1:0},SmartButton.injectCss=function(){basic.addCss("smart-button-css","@keyframes smart-button-turn { to { transform: rotate(360deg); } }@keyframes smart-button-dot { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; } 40% { transform: scale(1); opacity: 1; } }.smart-button-hand { transform-box: view-box; transform-origin: 50% 50%; animation-name: smart-button-turn; animation-timing-function: linear; animation-iteration-count: infinite; }@media (prefers-reduced-motion: reduce) { .smart-button-hand, .smart-button-dot { animation: none !important; } }")},SmartButton.WHITE_ICON="brightness(0) invert(1)",SmartButton.ROUND=100,SmartButton.EDGE_WIDTH=2,SmartButton.styles={ozden:SmartButtonDefaults.style,ozden2:{box:{boxShadow:"none"}},ozden3:{box:{borderColor:Black(.1),boxShadow:"none"}},ozden4:{box:{color:White(0),border:0,borderColor:"transparent",boxShadow:"none"}},pill:{layout:{gap:10,padding:[18,0]},icon:{width:26,height:26,opacity:1},label:{fontSize:18,fontFamily:"opensans-bold"},box:{border:0,borderColor:"transparent",round:SmartButton.ROUND,boxShadow:"none"}},outlined:{layout:{gap:8,padding:[14,0]},icon:{width:26,height:26,opacity:1},label:{fontSize:18},box:{border:SmartButton.EDGE_WIDTH,round:SmartButton.ROUND,boxShadow:"inset 0 -"+SmartButton.EDGE_WIDTH+"px 0 "+Black(.35)}}},SmartButton.DARK_EDGE=White(.2),SmartButton.DARK_BOTTOM_LINE="inset 0 -2px 0 "+White(.12),SmartButton.createDarkTemplate=function(t,o="#383835"){return{box:Object.assign({color:"#2E2E2C",borderColor:SmartButton.DARK_EDGE,boxShadow:SmartButton.DARK_BOTTOM_LINE},t),hover:{color:o},label:{textColor:White(.85)},icon:{opacity:.85,filter:SmartButton.WHITE_ICON},focus:{ringColor:"rgba(101, 162, 147, 0.75)"},disabled:{color:"#232322",borderColor:White(.06),textColor:White(.28),iconOpacity:.25},press:{brightness:.88},waiting:{clock:"ozdenDark",dots:{color:"#F1C74A"}}}},SmartButton.styles.ozdenDark=SmartButton.createDarkTemplate({}),SmartButton.styles.ozden2Dark=SmartButton.createDarkTemplate({boxShadow:"none"}),SmartButton.styles.ozden3Dark=SmartButton.createDarkTemplate({borderColor:White(.1),boxShadow:"none"}),SmartButton.styles.ozden4Dark=SmartButton.createDarkTemplate({color:White(0),border:0,borderColor:"transparent",boxShadow:"none"},White(.08)),SmartButton.MINIMAL_DANGER="#C24A36",SmartButton.createMinimalTemplate=function(t){const o=SmartButton.MINIMAL_DANGER;return{height:28,style:{layout:{gap:6,padding:[10,0],iconSideTrim:0},icon:{width:14,height:14,opacity:1,filter:t.iconFilter},label:{fontSize:13,textColor:t.text},box:{color:"transparent",border:1,borderColor:t.line,round:4,boxShadow:"none"},hover:{color:"transparent",borderColor:t.lineHover},focus:{ringColor:t.focus},disabled:{color:"transparent",borderColor:t.disabledLine,textColor:t.disabledText,iconOpacity:.4},press:{scale:.97,brightness:1},waiting:{clock:t.clock,contentOpacity:.12,clockSize:16,space:6},ask:{button:{color:o,borderColor:o,boxShadow:"none",textColor:"white",iconFilter:SmartButton.WHITE_ICON},bubble:{color:o,textColor:"white",fontSize:12,bold:0,round:4,padding:[8,4],border:0,borderColor:"",shadow:"none",arrow:8,gap:4,edge:6}}}}},SmartButton.styles.minimal=SmartButton.createMinimalTemplate({text:Black(.85),line:Black(.2),lineHover:Black(.45),focus:"#3D8BD9",disabledLine:Black(.08),disabledText:Black(.34),iconFilter:"none",clock:"minimal"}),SmartButton.styles.minimalDark=SmartButton.createMinimalTemplate({text:White(.88),line:White(.18),lineHover:White(.42),focus:"#7FB6DE",disabledLine:White(.07),disabledText:White(.35),iconFilter:SmartButton.WHITE_ICON,clock:"minimalDark"}),SmartButton.styles.minimalDanger=SmartButton.createMinimalTemplate({text:"#C24A36",line:"rgba(194, 74, 54, 0.5)",lineHover:"#C24A36",focus:"#3D8BD9",disabledLine:Black(.08),disabledText:Black(.34),iconFilter:"none",clock:"minimal"}),SmartButton.styles.minimalDangerDark=SmartButton.createMinimalTemplate({text:"#FF9F93",line:"rgba(255, 159, 147, 0.5)",lineHover:"#FF9F93",focus:"#7FB6DE",disabledLine:White(.07),disabledText:White(.35),iconFilter:"none",clock:"minimalDark"}),SmartButton.DARK_TEXT=Black(.75),SmartButton.LIGHT_TEXT=White(.9),SmartButton.tones={white:{color:"white",hover:"whitesmoke",text:SmartButton.DARK_TEXT},cyan:{color:"#5BBAC1",hover:"#50AEB5",text:SmartButton.DARK_TEXT},orange:{color:"#DE815B",hover:"#D4724B",text:SmartButton.DARK_TEXT},yellow:{color:"#F1C74A",hover:"#E6BB3C",text:SmartButton.DARK_TEXT},green:{color:"#7BC362",hover:"#70B756",text:SmartButton.DARK_TEXT},blue:{color:"#52A8D0",hover:"#479CC4",text:SmartButton.DARK_TEXT},cyanDark:{color:"#376265",hover:"#3C6F72",text:SmartButton.LIGHT_TEXT},orangeDark:{color:"#724837",hover:"#82513C",text:SmartButton.LIGHT_TEXT},yellowDark:{color:"#7B682F",hover:"#8C7633",text:SmartButton.LIGHT_TEXT},greenDark:{color:"#46663A",hover:"#4D7440",text:SmartButton.LIGHT_TEXT},blueDark:{color:"#335A6B",hover:"#38657A",text:SmartButton.LIGHT_TEXT},ink:{color:"#1F1F1F",hover:"#3A3A3A",text:SmartButton.LIGHT_TEXT,edge:"#1F1F1F",hoverEdge:"#3A3A3A"},inkDark:{color:"#EDEDEB",hover:"#FFFFFF",text:"#1A1A19",edge:"#EDEDEB",hoverEdge:"#FFFFFF"}},SmartButton.applyLook=function(t){return SmartButton.applyTone(t),basic.applyStylePackage(t,SmartButton.styles,SmartButtonDefaults),mergeIntoIfMissing(t.style,SmartButtonDefaults.style),t},SmartButton.getToneStyle=function(t,o){if(!t)return SmartButton.getTemplateColors(o);const e=SmartButton.tones[t];if(!e)return console.warn("SmartButton: tone not found: "+t),{};const n=e.text===SmartButton.LIGHT_TEXT,r={box:{color:e.color},hover:{color:e.hover},label:{textColor:e.text},icon:{filter:n?SmartButton.WHITE_ICON:"none"}};return e.edge&&(r.box.borderColor=e.edge,r.hover.borderColor=e.hoverEdge||e.edge),r},SmartButton.getTemplateColors=function(t){const o=SmartButton.applyLook({styleName:t}).style;return{box:{color:o.box.color},hover:{color:o.hover.color},label:{textColor:o.label.textColor},icon:{filter:o.icon.filter}}},SmartButton.applyTone=function(t){if(!t.tone)return;const o={};mergeIntoIfMissing(o,t.style||{}),mergeIntoIfMissing(o,SmartButton.getToneStyle(t.tone)),t.style=o},SmartButton.clocks={ozden:{faceColor:"#FFFFFF",lineColor:"#141414",edgeWidth:2,hourWidth:2,hourLength:7.5,minuteWidth:2,minuteLength:10,minuteColor:"indianred",centerColor:"indianred",centerSize:4,minuteTurn:1.6,hourTurn:19.2}},SmartButton.clocks.ozdenDark=Object.assign({},SmartButton.clocks.ozden,{faceColor:"#2A2A2A",lineColor:"rgba(255, 255, 255, 0.9)",hourColor:"rgba(255, 255, 255, 0.6)",minuteColor:"#F1C74A",centerColor:"#F1C74A"}),SmartButton.clocks.minimal={isRing:1,lineColor:Black(.85),edgeWidth:3,trackOpacity:.2,turnTime:.8},SmartButton.clocks.minimalDark=Object.assign({},SmartButton.clocks.minimal,{lineColor:White(.88)}),SmartButton.CLOCK_SIZE=30,SmartButton.createClockSvg=function(t){if(SmartButton.injectCss(),t.isRing)return SmartButton.createRingSvg(t);const o=t,e=SmartButton.CLOCK_SIZE,n=e/2,r=n-o.edgeWidth/2,i=function(t,o,e,r,i){return'<line class="smart-button-hand" x1="'+n+'" y1="'+n+'" x2="'+t+'" y2="'+o+'" stroke="'+r+'" stroke-width="'+e+'" stroke-linecap="round" style="animation-duration: '+i+'s"/>'};return'<svg viewBox="0 0 '+e+" "+e+'" width="100%" height="100%" aria-hidden="true" style="display: block"><circle cx="'+n+'" cy="'+n+'" r="'+r+'" fill="'+o.faceColor+'" stroke="'+o.lineColor+'" stroke-width="'+o.edgeWidth+'"/>'+i(n+o.hourLength,n,o.hourWidth,o.hourColor||o.lineColor,o.hourTurn)+i(n,n-o.minuteLength,o.minuteWidth,o.minuteColor,o.minuteTurn)+'<circle cx="'+n+'" cy="'+n+'" r="'+o.centerSize/2+'" fill="'+o.centerColor+'"/></svg>'},SmartButton.createRingSvg=function(t){const o=SmartButton.CLOCK_SIZE,e=o/2,n=e-t.edgeWidth/2,r="M"+e+" "+(e-n)+" A"+n+" "+n+" 0 0 1 "+(e+n)+" "+e;return'<svg viewBox="0 0 '+o+" "+o+'" width="100%" height="100%" aria-hidden="true" style="display: block"><circle cx="'+e+'" cy="'+e+'" r="'+n+'" fill="none" stroke="'+t.lineColor+'" stroke-opacity="'+t.trackOpacity+'" stroke-width="'+t.edgeWidth+'"/><path class="smart-button-hand" d="'+r+'" fill="none" stroke="'+t.lineColor+'" stroke-width="'+t.edgeWidth+'" stroke-linecap="round" style="animation-duration: '+t.turnTime+'s"/></svg>'},SmartButton.DOT_COUNT=3,SmartButton.DOT_TIME=1.2,SmartButton.DOT_DELAY=.16,SmartButton.createDots=function(t){SmartButton.injectCss();const o=HGroup({hug:1,align:"center center",gap:t.gap});for(let o=0;o<SmartButton.DOT_COUNT;o++){const e=Box({width:t.size,height:t.size,color:t.color,round:100});e.elem.classList.add("smart-button-dot"),e.css={animation:"smart-button-dot "+SmartButton.DOT_TIME+"s ease-in-out "+o*SmartButton.DOT_DELAY+"s infinite"}}return endGroup(),o};
@@ -1,2 +1,2 @@
1
1
  /* Bismillah */
2
- "use strict";const SmartTableDefaults={key:"0",titleHeight:50,itemHeight:40,infoHeight:50,itemLineCount:16,highlightTitle:!0,highlightLine:!0,invertColor:0,noDataFoundAlert:"No data found!",searchKeyword:"",searchTitleIndex:-1,showSearchTitleSelect:1,wheelScroll:0,allowHtml:0,showCellTooltip:1,allTitlesText:"ALL",canSelect:1,fitLineCount:0,locale:"",sortByTitleIndex:0,sortDirection:"A-Z",fillTestData:0,onSelect:function(t,e){},createCellView:null,updateCellView:null,titleDataList:[{name:"ID",dataTitle:"id",dataType:"integer",width:100,sortable:1},{name:"NAME",dataTitle:"name",dataType:"string",width:100,sortable:1},{name:"EMAIL",dataTitle:"email",dataType:"string",width:290,sortable:0},{name:"",dataTitle:"active",dataType:"boolean",width:40,sortable:0}],itemDataList:[{id:1,name:"Bugra",desc:"about",email:"emainil",active:1},{id:2,name:"Alper",desc:"about",email:"emainil",active:1},{id:3,name:"Murat",desc:"about",email:"emainil-3",active:1},{id:4,name:"Deniz",desc:"about",email:"emainil",active:1},{id:5,name:"Nilüfer",desc:"about",email:"emainil-7",active:1},{id:6,name:"Frank",desc:"about",email:"emainil",active:1},{id:7,name:"Dany",desc:"about",email:"emainil-45",active:1},{id:8,name:"Duygu",desc:"about",email:"emainil",active:1},{id:9,name:"Filiz",desc:"about",email:"emainil-356",active:1},{id:10,name:"Anka",desc:"about",email:"emainil",active:1}],scrollBarParams:{bar_border:0,bar_round:3,bar_borderColor:"rgba(0, 0, 0, 1)",bar_width:4,bar_mouseOverWidth:4,bar_mouseOverColor:"#373836",bar_opacity:.4,bar_mouseOverOpacity:.9,bar_padding:2,bar_color:"#373836",neverHide:0,showDots:0},searchTitleMenuParams:{},searchInputParams:{styleName:"ozden",width:"50%",height:36,fontSize:15,searchIconSize:16,searchIconOpacity:.5,placeholder:"Filter",searchIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" preserveAspectRatio="none" fill="#000000"><rect x="0" y="85" width="512" height="57"/><rect x="85" y="227" width="342" height="56"/><rect x="199" y="370" width="114" height="57"/></svg>'),clearIconMinTextWidth:80,clearOnEscape:1},styleName:"light",style:{width:"auto",height:"auto",round:6,line1Color:"white",line2Color:"#F7F7F7",highlightItemCellColor:"#FFFAEB",selectedItemCellColor:"#FFF4D3",selectedBar:{width:0,color:"rgba(95, 158, 160, 0.9)"},focusRingColor:"rgba(95, 158, 160, 0.6)",highlightTitleCellColor:"white",titleUppercase:1,verticalScrollWidth:20,verticalScrollMargin:2,btnScrollDownIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 200" preserveAspectRatio="none" fill="none" stroke="#141414" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M40 84V116M27 103L40 116L53 103"/></svg>'),btnScrollUpIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 200" preserveAspectRatio="none" fill="none" stroke="#141414" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M40 116V84M27 97L40 84L53 97"/></svg>'),btnScrollCenterIconFile:"data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 50" fill="none" stroke="#000000" stroke-opacity="0.4" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M10 17.5v15M6.5 21 10 17.5 13.5 21M6.5 29 10 32.5 13.5 29"/></svg>'),sortIconFile:"data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.71,9.88l-4.3-4.29a2,2,0,0,0-2.82,0L6.29,9.88a1,1,0,0,0,0,1.41,1,1,0,0,0,1.42,0L11,8V19a1,1,0,0,0,2,0V8l3.29,3.29a1,1,0,1,0,1.42-1.41Z"/></svg>'),loadingIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" preserveAspectRatio="none"><circle cx="256" cy="256" r="206" fill="#FFFFFF" stroke="#141414" stroke-width="20"/><path d="M256 113V256H358" fill="none" stroke="#141414" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/></svg>'),searchTitleCheckIconFile:"data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#373836" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5 10 17.5 19 7"/></svg>'),invertIconColor:0,sortIcon:{size:16,opacity:.25,activeOpacity:1},cellTooltip:{fontSize:14,color:"white",textColor:Black(.8),round:6,border:1,borderColor:Black(.15),shadow:"0 6px 16px "+Black(.12),arrow:10,padding:[12,8],maxWidth:360},box:{color:"white"},boxBorder:{border:1,borderColor:Black(.15)},boxTitleLine:{color:"whitesmoke"},boxTitleCell:{padding:[10,0],borderRight:"1px solid "+Black(.08),borderBottom:"1px solid "+Black(.2)},lblTitleCell:{fontSize:15,fontFamily:"opensans-bold",textColor:Black(.8)},boxItemCell:{borderBottom:"1px solid "+Black(.08),borderRight:"none",padding:[10,0]},lblItemCell:{fontSize:15,textColor:Black(.7),fontFamily:"opensans"},boxInfoLine:{color:"white",borderTop:"1px solid "+Black(.2)},lblBoxInfoLine:{fontSize:14,textColor:Black(.5)},lblNoDataFound:{color:"transparent",textColor:Black(.45),padding:[8,2],fontSize:15,round:8,border:0,borderColor:"transparent"},lblSearchTitle:{color:"white",textColor:Black(.6),padding:[8,2],fontSize:12,round:50,border:1,borderColor:Black(.12)},btnScrollCenter:{color:"white",round:100,border:1,borderColor:Black(.2)},btnScrollUp:{color:"whitesmoke",round:100,border:1,borderColor:Black(.15)},btnScrollDown:{color:"whitesmoke",round:100,border:1,borderColor:Black(.15)},boxSort:{color:"transparent"}}},SmartTable=function(t={}){basic.applyStylePackage(t,SmartTable.styles,SmartTableDefaults),mergeIntoIfMissing(t,SmartTableDefaults);let e=startObject(t);e.titleDataList=e.titleDataList.map(t=>({...t})),e.itemDataList=[...e.itemDataList];const o=100,l="tr-TR",r=e.itemHeight;let i=0,n=null,a=null,c=null;const s=function(t,o){const l=null==o?"":String(o);1==e.allowHtml?t.text=l:t.plainText=l},d=function(){return Math.max(0,e.visibleItemDataList.length-e.itemLineCount)},h=function(t){return t<0?0:Math.min(t,d())},u=function(t){return"number"==typeof t?t:"string"==typeof t&&""!==t.trim()?Number(t):NaN};e.state="normal",e.visibleItemDataList=[...e.itemDataList],e.searchInput=null,e.selectedItemData=null,e.titleCellList=[],e.titleCellCount=0,e.itemLineList=[],e.startedItemIndexForScrolling=0,e.scrollVars={},e.recalcItemHeight=0,e.resizeTimer=null,e.refreshTimer=null,e.filterTimer=null,e.setState=function(t){e.state=t};const m=function(){};e.refresh=function(t=3){e.refreshTimer=waitAndRun(e.refreshTimer,m,t)};const b=e.remove;e.superRemove=b,e.remove=function(){e&&(clearTimeout(e.resizeTimer),clearTimeout(e.refreshTimer),clearTimeout(e.filterTimer),e.searchTitleMenu&&e.searchTitleMenu.remove(),D(),b.call(e),e=null)};const g=function(t){t.opacity=0,t.clickable=0,t.cursor="",t.itemData=null,S(t)},f=function(t,o){t.opacity=1,t.clickable=1,t.cursor="pointer",t.itemData=o,S(t);for(let l=0;l<e.titleCellCount;l++){const r=e.titleDataList[l],i=t["itemCell"+l],n=o[r.dataTitle]??"";"lastValue"in i&&i.lastValue===n||(i.lastValue=n,s(i.label,n)),e.updateCellView&&e.updateCellView(i,l,n,e)}};e.refreshData=function(){const t=e.startedItemIndexForScrolling,o=e.visibleItemDataList,l=e.itemLineCount;for(let r=0;r<l;r++){const l=e.itemLineList[r],i=o[t+r];i?f(l,i):g(l)}e.setVerticalScrollEnabled(o.length>l),e.updateInfoLabel(),k()};const p=function(t,e,o){t.opacity=e,t.clickable=o};e.setVerticalScrollEnabled=function(t){if(t&&e.visibleItemDataList.length>e.itemLineCount)return p(e.btnScrollCenter,1,1),p(e.btnScrollUp,1,1),void p(e.btnScrollDown,1,1);p(e.btnScrollCenter,0,0),p(e.btnScrollUp,.5,0),p(e.btnScrollDown,.5,0)},e.setTitleCellWidth=function(t,o){t<0||t>=e.titleCellCount||(e.titleCellList[t].width=o,e.titleDataList[t].width=o,e.itemLineList.forEach(function(e){e["itemCell"+t].width=o}))},e.createTitleLine=function(){e.titleCellList=[],e.boxTitleLine.html="",e.titleDataList.forEach(function(t,o){const l=e.createTitleCell(t,o);e.titleCellList.push(l),e.boxTitleLine.add(l)}),e.titleCellCount=e.titleCellList.length},e.setTitleDataList=function(t){e.titleDataList=t.map(t=>({...t})),e.createTitleLine(),e.createItemLines(),e.recalcItemHeight&&e.setItemHeight(e.itemHeight),e.stretchLastCell(e.calcLastCellWidth()),e.titleDataList[e.sortByTitleIndex]||(e.sortByTitleIndex=0),e.updateSortIcon(),e.updateSearchTitleSelect(),e.filterAndSortData()},e.createSortIcon=function(t){const o=e.style.sortIcon.size;startBox({align:"right center",color:e.style.boxSort.color,round:100,border:0,borderColor:"rgba(0,0,0,0.1)",width:o,height:o,right:2,padding:[4,0],position:"absolute"}),0==t.sortable&&(that.opacity=0),t.add(that),that.center("top"),t.icon=Icon({width:o,height:o,left:0,top:0,opacity:e.style.sortIcon.opacity}),that.setMotion("opacity 0.3s, transform 0.3s"),that.load(e.style.sortIconFile),1==e.style.invertIconColor&&(that.css.filter="invert(100%)"),that.center(),endBox()},e.resetSortIcons=function(t){e.titleCellList.forEach(function(o,l){l!=t.titleCellIndex&&(o.icon.rotate=0,o.icon.opacity=e.style.sortIcon.opacity,o.sortDirection="")})},e.createTitleCell=function(t,l){const r=AutoLayout({flow:"horizontal",align:"center left",width:t.width||o,padding:e.style.boxTitleCell.padding,height:e.titleHeight,color:"transparent",border:0,position:"relative"});return that.css={borderRight:e.style.boxTitleCell.borderRight,borderBottom:e.style.boxTitleCell.borderBottom},that.cursor="pointer",that.titleCellIndex=l,that.titleDataTitle=t.dataTitle,that.sortable=t.sortable,r.label=Label({...e.style.lblTitleCell}),s(r.label,t.name),that.css.fontFamily=e.style.lblTitleCell.fontFamily,1==e.style.titleUppercase&&(that.css.textTransform="uppercase"),endAutoLayout(),e.createSortIcon(r),r.on("click",function(t,o){1==t.sortable&&(e.resetSortIcons(t),e.sortByTitleIndex=t.titleCellIndex,e.sortDirection="A-Z"!=t.sortDirection?"A-Z":"Z-A",e.updateSortIcon(),e.filterAndSortData())}),r.on("mouseover",function(t,o){e.applyColumnHighlight(t)}),r.on("mouseout",function(t,o){e.clearColumnHighlight(t)}),r},e.updateSortIcon=function(){const t=e.titleCellList[e.sortByTitleIndex];t&&("A-Z"==e.sortDirection?(t.sortDirection="A-Z",t.icon.rotate=0):(t.sortDirection="Z-A",t.icon.rotate=180),t.icon.opacity=e.style.sortIcon.activeOpacity)};const C=function(t,o,l){t.color=o,e.itemLineList.forEach(function(e){e["itemCell"+t.titleCellIndex].color=l})};e.clearColumnHighlight=function(t){e.highlightTitle&&(C(t,"transparent","transparent"),e.itemLineList.forEach(S))},e.applyColumnHighlight=function(t){e.highlightTitle&&C(t,e.style.highlightTitleCellColor,e.style.highlightItemCellColor)},e.createItemLines=function(){T(null),e.itemLineList.forEach(function(t){t.remove()}),e.itemLineList=[];for(let t=0;t<e.itemLineCount;t++){const o=t,l=e.createItemLine(e.itemDataList[t],o);e.itemLineList.push(l),e.boxItemLineGroup.add(l)}},e.createItemLine=function(t,o){const l=HGroup({height:e.itemHeight||100,width:"auto",align:"top left",padding:[0,0],gap:0,color:o%2?e.style.line2Color:e.style.line1Color,position:"relative"});return e.titleDataList.forEach(function(t,o){l["itemCell"+o]=e.createItemCell(t.width,o,l)}),endGroup(),l.on("click",function(t){t.itemData&&(1==e.canSelect&&(e.selectItem(t.itemData),e.elem.focus({preventScroll:!0})),e.onSelect(e,t.itemData))}),"auto"!=e.style.height&&(l.visible=0),l};const S=function(t){const o=Boolean(t.itemData)&&t.itemData===e.selectedItemData;let l="transparent";t.isHover&&e.highlightLine&&(l=e.style.highlightItemCellColor),o&&(l=I()),function(t,o){for(let l=0;l<e.titleCellCount;l++)t["itemCell"+l].color=o}(t,l);const r=t.itemCell0;r&&(r.boxShadow=o?x():"none")},x=function(){if(!e.style.selectedBar.width)return"none";return"inset "+((basic.num(e.style.boxBorder.border)||0)+e.style.selectedBar.width)+"px 0 0 "+e.style.selectedBar.color},I=function(){return e.style.selectedItemCellColor||e.style.highlightItemCellColor},T=function(t){n=t,w()},w=function(){D(),n&&1==e.showCellTooltip&&(c=e.after(300,L))},L=function(){c=null;const t=y(n);"undefined"!=typeof Tooltip?t&&(a=Tooltip.show(n,t,e.style.cellTooltip,"top",function(e){v(t,e.look)}),a.cellText=t):n.elem.title=t},y=function(t){if(!t.itemLine.itemData)return"";const e=t.label.elem;return e.scrollWidth<=e.clientWidth?"":e.textContent},v=function(t,e){Label({plainText:t,fontSize:e.fontSize,textColor:e.textColor,css:{whiteSpace:"normal",overflowWrap:"anywhere",width:"max-content",maxWidth:e.maxWidth+"px"}})},D=function(){c&&c(),c=null,a&&a.remove(),a=null},k=function(){n&&(a&&a.cellText===n.label.elem.textContent||w())};e.setShowCellTooltip=function(t){e.showCellTooltip=basic.isOn(t)?1:0,w()},e.createItemCell=function(t,l,r){let i=AutoLayout({align:"center left",width:t||o,padding:e.style.boxItemCell.padding,height:"100%",color:"transparent",border:0});return that.css={borderBottom:e.style.boxItemCell.borderBottom,borderRight:e.style.boxItemCell.borderRight},i.label=Label({text:"",...e.style.lblItemCell}),that.css={whiteSpace:"nowrap",textOverflow:"ellipsis",fontFamily:e.style.lblItemCell.fontFamily},endAutoLayout(),i.on("mouseover",function(t,e){r.isHover=1,S(r)}),i.on("mouseout",function(t,e){r.isHover=0,S(r)}),i.itemLine=r,i.onHoverChange(function(t,e){!function(t,e){e?T(t):n===t&&T(null)}(i,e)}),e.createCellView&&createIn(i,function(){e.createCellView(i,l,e)}),i},e.initScrollMetrics=function(){e.scrollVars.minY=e.titleHeight,e.scrollVars.scrollAreaHeight=e.height-e.titleHeight-e.infoHeight,e.scrollVars.scrollIconHeight=e.btnScrollCenter.height,e.scrollVars.maxY=e.scrollVars.minY+e.scrollVars.scrollAreaHeight-e.scrollVars.scrollIconHeight,e.scrollVars.totalPath=e.scrollVars.maxY-e.scrollVars.minY,e.scrollVars.isDragging=!1,e.scrollVars.startY=0,e.scrollVars.startTop=0},e.syncScrollPosition=function(){const t=d();if(0===t)return;const o=e.startedItemIndexForScrolling/t;e.btnScrollCenter.top=e.scrollVars.minY+o*e.scrollVars.totalPath},e.createScrollEvents=function(){e.btnScrollCenter.clickable=1,e.btnScrollCenter.elem.setAttribute("draggable","false"),e.btnScrollCenter.cursor="grab",e.initScrollMetrics(),e.on("wheel",function(t,o){if(1!=e.wheelScroll)return;if(Math.abs(o.deltaX)>Math.abs(o.deltaY))return;o.preventDefault();const l=o.deltaY>0?1:-1,r=h(e.startedItemIndexForScrolling+l);r!==e.startedItemIndexForScrolling&&(e.startedItemIndexForScrolling=r,e.syncScrollPosition(),e.refreshData())},{passive:!1}),e.btnScrollCenter.on("mousedown",function(t,o){e.scrollVars.isDragging=!0,e.scrollVars.startY=o.clientY,e.scrollVars.startTop=e.btnScrollCenter.top,e.btnScrollCenter.cursor="grabbing",document.body.style.userSelect="none"}),e.listenTo(window,"mousemove",function(t,e){B(e)}),e.listenTo(window,"mouseup",function(){F()})};const B=function(t){if(!e||!e.scrollVars.isDragging)return;const o=t.clientY-e.scrollVars.startY;let l=e.scrollVars.startTop+o;if(l<e.scrollVars.minY&&(l=e.scrollVars.minY),l>e.scrollVars.maxY&&(l=e.scrollVars.maxY),e.btnScrollCenter.top=l,e.scrollVars.totalPath<=0)return;const r=(l-e.scrollVars.minY)/e.scrollVars.totalPath,i=Math.round(r*d());i!==e.startedItemIndexForScrolling&&(e.startedItemIndexForScrolling=i,e.refreshData())},F=function(){e&&e.scrollVars.isDragging&&(e.scrollVars.isDragging=!1,e.btnScrollCenter.cursor="grab",document.body.style.userSelect="auto")};e.getSelectedIndex=function(){return e.selectedItemData?e.visibleItemDataList.indexOf(e.selectedItemData):-1},e.selectItem=function(t){1==e.canSelect&&(e.selectedItemData=t||null,R(),e.refreshData())},e.clearSelection=function(){e.selectItem(null)},e.setCanSelect=function(t){e.canSelect=basic.isOn(t)?1:0,1!=e.canSelect&&(e.selectedItemData=null),M(),e.refreshData()};const M=function(){e.tabIndex=1==e.canSelect?0:null,1!=e.canSelect&&e.elem.blur()},A=function(){const t=e.elem.matches(":focus-visible");e.boxBorder.css.outline=t?"2px solid "+e.style.focusRingColor:"none",e.boxBorder.css.outlineOffset="-2px"},R=function(){const t=e.getSelectedIndex();if(-1==t)return;let o=e.startedItemIndexForScrolling;t<o&&(o=t),t>=o+e.itemLineCount&&(o=t-e.itemLineCount+1),e.startedItemIndexForScrolling=h(o),e.syncScrollPosition()};e.scrollPage=function(t){const o=h(e.startedItemIndexForScrolling+t*e.itemLineCount);o!==e.startedItemIndexForScrolling&&(e.startedItemIndexForScrolling=o,e.refreshData(),e.syncScrollPosition())},e.updateInfoLabel=function(){const t=e.visibleItemDataList.length;if(0==t)return e.boxInfoLine.label.text="0 - 0 / 0",void(e.lblNoDataFound.opacity=1);e.lblNoDataFound.opacity=0;const o=e.startedItemIndexForScrolling+1;let l=e.startedItemIndexForScrolling+e.itemLineCount;l>t&&(l=t),e.boxInfoLine.label.text=`${H(o)} - ${H(l)} / ${H(t)}`};const H=function(t){try{return t.toLocaleString(e.locale||document.documentElement.lang||l)}catch(e){return t.toLocaleString(l)}};e.setLocale=function(t){e.locale=t,e.updateInfoLabel()},e.setScrollToTop=function(){e.startedItemIndexForScrolling=0,e.btnScrollCenter.top=e.scrollVars.minY},e.setItemDataList=function(t){e.itemDataList=[...t],e.filterAndSortData()};const V=function(t,o){if(""===o)return t;const l=e.titleDataList[e.searchTitleIndex],r=l?[l]:e.titleDataList;return t.filter(t=>r.some(e=>function(t,e){return null!=t&&SmartTable.toSearchText(t).includes(e)}(t[e.dataTitle],o)))},z=function(t,o,l){const r=e.titleDataList[o];if(!r||0===r.sortable)return;const i=r.dataTitle;t.sort((t,e)=>{const o=function(t,e){const o=u(t),l=u(e);return Number.isFinite(o)&&Number.isFinite(l)?o-l:String(t).localeCompare(String(e),"tr")}(t[i]??"",e[i]??"");return"A-Z"===l?o:-o})};e.filterAndSortData=function(){e.itemDataList.length>1e3&&e.showLoading(1),e.filterTimer=waitAndRun(e.filterTimer,function(){e.filterTimer=null;const t=SmartTable.toSearchText(e.searchKeyword??"").trim(),o=V([...e.itemDataList],t);z(o,e.sortByTitleIndex,e.sortDirection),e.visibleItemDataList=o,e.setScrollToTop(),-1==e.getSelectedIndex()&&(e.selectedItemData=null),R(),e.refreshData(),e.showLoading(0)},50)},e.generateTestData=function(){let t=[];for(let o=0;o<1e5;o++){const o=e.itemDataList.map(e=>({...e,id:t.length+e.id}));t.push(...o)}e.itemDataList=t,e.visibleItemDataList=t,console.log("Yeni veri sayısı:",e.visibleItemDataList.length)},e.createVerticalScroll=function(){const t=e.style.verticalScrollWidth,o=-1*(t+e.style.verticalScrollMargin);e.btnScrollCenter=startBox(0,0,t,50,{right:o,top:e.titleHeight,opacity:0,clickable:0,...e.style.btnScrollCenter}),Icon(0,0,"100%","100%"),that.load(e.style.btnScrollCenterIconFile),endBox(),e.btnScrollUp=Box(0,0,t,e.titleHeight,{right:o,...e.style.btnScrollUp}),that.cursor="pointer",that.on("click",function(t,o){e.scrollPage(-1)}),Icon(0,0,"100%","100%"),e.btnScrollUp.add(that),that.load(e.style.btnScrollUpIconFile),1==e.style.invertIconColor&&(that.css.filter="invert(100%)"),e.btnScrollDown=Box(0,0,t,e.infoHeight,{right:o,bottom:0,...e.style.btnScrollDown}),that.cursor="pointer",that.on("click",function(t,o){e.scrollPage(1)}),Icon(0,0,"100%","100%"),e.btnScrollDown.add(that),that.load(e.style.btnScrollDownIconFile),1==e.style.invertIconColor&&(that.css.filter="invert(100%)")};const N=function(){const t=e.lblSelectedSortKey.elem.offsetWidth,o=t>0;e.searchInput.setClearIconRight(o?6+t+6:i)};e.createToolbar=function(){HGroup({align:"left center",gap:12,padding:[8,0]}),e.boxInfoLine.add(that),e.searchInput=SearchInput(e.searchInputParams),that.setValue(e.searchKeyword,1),that.onEnter=function(t){e.searchKeyword=t.getSearchText(),e.filterAndSortData()},i=that.clearIconRight,function(){const t=String(e.searchInputParams.width);e.searchInput.css.minWidth="0px",t.endsWith("%")&&(e.searchInput.css.flexGrow="1",e.searchInput.css.maxWidth="max("+t+", 240px)")}(),e.boxInfoLine.label=Label({text:"0 - 0 / 0",...e.style.lblBoxInfoLine}),that.css={marginLeft:"auto",marginRight:"6px",flexShrink:"0"},endGroup(),e.lblSelectedSortKey=createIn(e.searchInput,function(){return Label({right:6,opacity:1,clickable:1,...e.style.lblNoDataFound,...e.style.lblSearchTitle})}),s(e.lblSelectedSortKey,e.allTitlesText),that.cursor="pointer",that.ellipsis=1,that.css.maxWidth="160px",that.css.top="50%",that.css.transform="translateY(-50%)",that.setMotion("opacity 0.2s"),that.onResize(N),"function"==typeof ContextMenu?(e.searchTitleMenu=ContextMenu({minWidth:160,...e.searchTitleMenuParams,onClick:function(t,o){e.setSearchTitleIndex(o.data)}}),e.searchTitleMenu.attachTo(e.lblSelectedSortKey,"click")):e.lblSelectedSortKey.on("click",function(){e.selectNextSearchTitle()})},e.stretchLastCell=function(t){if(!(t>0)||0==e.titleCellCount)return;const o=e.titleCellCount-1;e.itemLineList.forEach(function(e){e["itemCell"+o].width=t}),e.titleCellList[o].width=t},e.calcLastCellWidth=function(){const t=e.titleDataList,l=e.width;if(0==t.length)return 0;let r=0;t.forEach(function(t){r+=basic.num(t.width||o)});const i=basic.num(t[t.length-1].width||o);return l>r?l-r+i:i},e.setItemHeight=function(t){e.itemHeight=t,e.itemLineList.forEach(function(t){t.height=e.itemHeight,t.visible=1})},e.setHeight=function(t){e.recalcItemHeight="auto"!=t?1:0,e.height=t},e.setWidth=function(t){"string"==typeof t&&t.includes("%")?e.width="calc("+t+" - "+e.getVerticalScrollWidth()+"px)":e.width=t},e.getTotalWidth=function(){return e.width+e.getVerticalScrollWidth()},e.getVerticalScrollWidth=function(){return e.style.verticalScrollWidth+e.style.verticalScrollMargin},e.createLoading=function(){e.boxLoading=VGroup({color:Black(.3),clickable:1,round:e.style.round}),e.add(e.boxLoading),Icon({width:32,height:32}),that.load(e.style.loadingIconFile),endGroup()},e.showLoading=function(t){t?(e.boxLoading.visible=1,e.setVerticalScrollEnabled(!1)):(e.boxLoading.visible=0,e.setVerticalScrollEnabled(!0))},e.createNoDataFoundLabel=function(){HGroup(),e.lblNoDataFound=Label({opacity:0,...e.style.lblNoDataFound}),s(e.lblNoDataFound,e.noDataFoundAlert),that.setMotion("opacity 0.2s"),endGroup()};const E=function(t){return String(t.name??"").replace(/<[^>]*>/g,"").trim()||String(t.dataTitle??"")};e.updateSearchTitleSelect=function(){e.titleDataList[e.searchTitleIndex]||(e.searchTitleIndex=-1);const t=e.titleDataList[e.searchTitleIndex];if(s(e.lblSelectedSortKey,t?E(t):e.allTitlesText),e.lblSelectedSortKey.visible=1==e.showSearchTitleSelect?1:0,!e.searchTitleMenu)return;const o=function(t){return e.searchTitleIndex==t?e.style.searchTitleCheckIconFile:""},l=[{text:e.allTitlesText,data:-1,iconFile:o(-1)},"-"];e.titleDataList.forEach(function(t,e){l.push({text:E(t),data:e,iconFile:o(e)})}),e.searchTitleMenu.setItems(l),1!=e.showSearchTitleSelect&&e.searchTitleMenu.close()},e.setSearchTitleIndex=function(t){e.searchTitleIndex=e.titleDataList[t]?t:-1,e.updateSearchTitleSelect(),""!==String(e.searchKeyword??"").trim()&&e.filterAndSortData()},e.selectNextSearchTitle=function(){const t=e.searchTitleIndex+1;e.setSearchTitleIndex(t<e.titleDataList.length?t:-1)},e.setShowSearchTitleSelect=function(t){e.showSearchTitleSelect=basic.isOn(t)?1:0,e.updateSearchTitleSelect()},e.setWheelScroll=function(t){e.wheelScroll=basic.isOn(t)?1:0};const W=function(){return e.height-e.titleHeight-e.infoHeight},O=function(){if(e.recalcItemHeight&&1==e.fitLineCount)P();else if(e.recalcItemHeight){const t=W()/e.itemLineCount;(e.itemHeight!=t||e.itemLineList[0]&&!e.itemLineList[0].visible)&&e.setItemHeight(t)}e.stretchLastCell(e.calcLastCellWidth()),e.initScrollMetrics(),e.syncScrollPosition(),e.scrollBar.refreshScroll(),e.refreshData()},P=function(){const t=W();if(t<=0)return;const o=Math.max(1,Math.round(t/r));o==e.itemLineList.length?e.setItemHeight(t/o):e.setItemLineCount(o)};return e.setItemLineCount=function(t){e.itemLineCount=Math.max(1,Math.round(t)),e.createItemLines();const o=W(),l=e.recalcItemHeight&&o>0;e.setItemHeight(l?o/e.itemLineCount:e.itemHeight),e.stretchLastCell(e.calcLastCellWidth()),e.startedItemIndexForScrolling=h(e.startedItemIndexForScrolling),R(),e.initScrollMetrics(),e.syncScrollPosition(),e.refreshData()},e.setFitLineCount=function(t){e.fitLineCount=basic.isOn(t)?1:0,O()},e.createResizeEvent=function(){e.onResize(function(t){e.resizeTimer=waitAndRun(e.resizeTimer,O,3)})},e.init=function(){e.clickable=1,e.clipContent=0,e.color=e.style.box.color,e.round=e.style.round,1==e.invertColor&&(e.css.filter="invert(100%)"),e.setWidth(e.style.width),e.setHeight(e.style.height),e.boxHorizontalScrollable=VGroup({align:"top left",width:"auto",height:"auto",padding:[0,0],gap:0,position:"relative",clipContent:0,scrollX:1}),that.css={borderTopLeftRadius:e.style.round+"px",borderTopRightRadius:e.style.round+"px",borderBottomRightRadius:"0px",borderBottomLeftRadius:"0px",marginBottom:e.infoHeight+"px"},e.boxTitleLine=HGroup({height:"auto",width:"auto",align:"top left",padding:[0,0],gap:0,color:e.style.boxTitleLine.color}),endGroup(),e.boxItemLineGroup=VGroup({align:"top left",width:"auto",height:"auto",padding:[0,0],gap:0}),endGroup(),endGroup(),e.boxInfoLine=HGroup({bottom:0,left:0,height:e.infoHeight,width:"100%",align:"top left",padding:[0,0],gap:0,...e.style.boxInfoLine}),endGroup(),that.css={borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomRightRadius:e.style.round+"px",borderBottomLeftRadius:e.style.round+"px",borderTop:e.style.boxInfoLine.borderTop},that.clickable=0,e.createToolbar(),e.createNoDataFoundLabel(),e.boxBorder=Box(0,0,"100%","100%",e.style.boxBorder),that.round=e.style.round,that.color="transparent",e.createVerticalScroll(),e.scrollBar=ScrollBar({scrollableBox:e.boxHorizontalScrollable,...e.scrollBarParams}),e.createResizeEvent(),e.createLoading()},e.init(),e.createTitleLine(),e.createItemLines(),e.createScrollEvents(),e.on("keydown",function(t,o){if(1!=e.canSelect||o.target!=e.elem)return;if(o.metaKey||o.ctrlKey||o.altKey)return;if("Enter"==o.key)return void(e.selectedItemData&&e.onSelect(e,e.selectedItemData));const l=function(t){const o=e.itemLineCount,l=e.visibleItemDataList.length;return{ArrowDown:1,ArrowUp:-1,PageDown:o,PageUp:-o,Home:-l,End:l}[t]||0}(o.key);0!=l&&(o.preventDefault(),function(t){const o=e.visibleItemDataList.length;if(0==o)return;let l=e.getSelectedIndex();-1==l&&(l=t>0?-1:o),e.selectItem(e.visibleItemDataList[basic.clamp(l+t,0,o-1)])}(l),A())}),e.on("focus",A),e.on("blur",A),M(),e.stretchLastCell(e.calcLastCellWidth()),e.updateSortIcon(),e.updateSearchTitleSelect(),e.fillTestData&&e.generateTestData(),e.filterAndSortData(),endObject(e)};SmartTable.toSearchText=function(t){const e=String(t).toLocaleLowerCase("tr");return SmartTable.NOT_ASCII.test(e)?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/ı/g,"i"):e},SmartTable.NOT_ASCII=/[^\u0000-\u007f]/,SmartTable.styles={light:{style:{}},dark:{style:{line1Color:"#232428",line2Color:"#27292D",highlightItemCellColor:"#2E3035",selectedItemCellColor:"#24383A",focusRingColor:"rgba(95, 179, 181, 0.7)",highlightTitleCellColor:"#33353A",btnScrollCenterIconFile:"data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 50" fill="none" stroke="#FFFFFF" stroke-opacity="0.5" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M10 17.5v15M6.5 21 10 17.5 13.5 21M6.5 29 10 32.5 13.5 29"/></svg>'),searchTitleCheckIconFile:"data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#E6E6E6" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5 10 17.5 19 7"/></svg>'),invertIconColor:1,sortIcon:{size:16,opacity:.3,activeOpacity:1},cellTooltip:{color:"#2B2D31",textColor:"rgba(255, 255, 255, 0.88)",borderColor:"rgba(255, 255, 255, 0.14)",shadow:"0 8px 24px rgba(0, 0, 0, 0.5)"},box:{color:"#232428"},boxBorder:{border:1,borderColor:"rgba(255, 255, 255, 0.12)"},boxTitleLine:{color:"#2B2D31"},boxTitleCell:{borderRight:"1px solid rgba(255, 255, 255, 0.08)",borderBottom:"1px solid rgba(255, 255, 255, 0.14)"},lblTitleCell:{textColor:"rgba(255, 255, 255, 0.85)"},boxItemCell:{borderBottom:"1px solid rgba(255, 255, 255, 0.06)"},lblItemCell:{textColor:"rgba(255, 255, 255, 0.75)"},boxInfoLine:{color:"#232428",borderTop:"1px solid rgba(255, 255, 255, 0.14)"},lblBoxInfoLine:{textColor:"rgba(255, 255, 255, 0.5)"},lblNoDataFound:{textColor:"rgba(255, 255, 255, 0.45)"},lblSearchTitle:{color:"#33353A",textColor:"rgba(255, 255, 255, 0.7)",borderColor:"rgba(255, 255, 255, 0.14)"},btnScrollCenter:{color:"#2B2D31",borderColor:"rgba(255, 255, 255, 0.2)"},btnScrollUp:{color:"#2B2D31",borderColor:"rgba(255, 255, 255, 0.14)"},btnScrollDown:{color:"#2B2D31",borderColor:"rgba(255, 255, 255, 0.14)"}},searchInputParams:{styleName:"ozdenDark"},scrollBarParams:{bar_color:"#A0A0A0",bar_mouseOverColor:"#D0D0D0"},searchTitleMenuParams:{styleName:"dark"}},green:{style:{width:"auto",height:"auto",round:6,line1Color:"white",line2Color:"whitesmoke",highlightItemCellColor:"#F3E7C2",selectedItemCellColor:null,selectedBar:{width:3,color:"rgba(95, 158, 160, 0.9)"},focusRingColor:"rgba(95, 158, 160, 0.6)",highlightTitleCellColor:White(.2),titleUppercase:0,verticalScrollWidth:20,verticalScrollMargin:2,btnScrollDownIconFile:SmartTableDefaults.style.btnScrollDownIconFile,btnScrollUpIconFile:SmartTableDefaults.style.btnScrollUpIconFile,btnScrollCenterIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 200" preserveAspectRatio="none" fill="none" stroke="#D96450" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M40 28V172M27 41L40 28L53 41M27 159L40 172L53 159"/></svg>'),sortIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80" preserveAspectRatio="none" fill="none" stroke="#141414" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M40 24V56M27 43L40 56L53 43"/></svg>'),loadingIconFile:SmartTableDefaults.style.loadingIconFile,searchTitleCheckIconFile:"data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#373836" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5 10 17.5 19 7"/></svg>'),invertIconColor:0,sortIcon:{size:22,opacity:.5,activeOpacity:1},box:{color:"white"},boxBorder:{border:2,borderColor:Black(.8)},boxTitleLine:{color:"#65A293"},boxTitleCell:{padding:[8,0],borderRight:"1px solid rgba(0, 0, 0, 0.5)",borderBottom:"2px solid #141414"},lblTitleCell:{fontSize:20,fontFamily:"opensans",textColor:Black(.8)},boxItemCell:{borderBottom:"1px solid darkgray",borderRight:"1px solid rgba(0, 0, 0, 0.05)",padding:[8,0]},lblItemCell:{fontSize:20,textColor:Black(.75),fontFamily:"opensans"},boxInfoLine:{color:"#E4E4E4",borderTop:"1px solid rgba(0, 0, 0, 0)"},lblBoxInfoLine:{fontSize:16,textColor:Black(.85)},lblNoDataFound:{color:"lightgray",textColor:Black(.8),padding:[8,2],fontSize:14,round:8,border:1,borderColor:Black(.4)},lblSearchTitle:{color:"whitesmoke",textColor:Black(.8),padding:[8,2],fontSize:14,round:8,border:1,borderColor:Black(.15)},btnScrollCenter:{color:"white",round:100,border:1,borderColor:"rgba(0,0,0,0.4)"},btnScrollUp:{color:"lightgray",round:100,border:1,borderColor:"rgba(0, 0, 0, 0.6)"},btnScrollDown:{color:"lightgray",round:100,border:1,borderColor:"rgba(0, 0, 0, 0.6)"},boxSort:{color:"#65A293"}},searchInputParams:{styleName:"original",width:"50%",height:36,border:1,round:8,color:"white",searchIconSize:16,placeholder:"Filter",fontSize:16,borderColor:Black(.15),borderBottomStyle:"1px solid "+Black(.15),searchIconFile:SmartTableDefaults.searchInputParams.searchIconFile,searchIconOpacity:.8}}},SmartTable.styles.classic=SmartTable.styles.light,SmartTable.createMinimalStyle=function(t){return{titleHeight:30,itemHeight:28,infoHeight:28,style:Object.assign({round:4,line1Color:t.ground,line2Color:t.ground,highlightItemCellColor:t.hover,selectedItemCellColor:t.selected,selectedBar:{width:2,color:t.ink},focusRingColor:t.focus,highlightTitleCellColor:t.ground,titleUppercase:0,invertIconColor:t.invertIcons,sortIcon:{size:14,opacity:.3,activeOpacity:1},cellTooltip:{fontSize:12,color:t.ground,textColor:t.text,round:4,border:1,borderColor:t.line,shadow:"none"},box:{color:t.ground},boxBorder:{border:1,borderColor:t.line},boxTitleLine:{color:t.ground},boxTitleCell:{padding:[10,0],borderRight:"none",borderBottom:"1px solid "+t.line},lblTitleCell:{fontSize:12,fontFamily:"opensans-bold",textColor:t.softText},boxItemCell:{borderBottom:"1px solid "+t.track,borderRight:"none",padding:[10,0]},lblItemCell:{fontSize:13,textColor:t.text,fontFamily:"opensans"},boxInfoLine:{color:t.ground,borderTop:"1px solid "+t.line},lblBoxInfoLine:{fontSize:12,textColor:t.softText},lblNoDataFound:{color:"transparent",textColor:t.softText,fontSize:12},lblSearchTitle:{color:"transparent",textColor:t.softText,fontSize:11,border:0,borderColor:"transparent"},btnScrollCenter:{color:t.ground,borderColor:t.line},btnScrollUp:{color:t.ground,borderColor:t.line},btnScrollDown:{color:t.ground,borderColor:t.line}},t.icons),searchInputParams:{styleName:t.minimalName,height:22,fontSize:12,searchIconSize:12,searchIconLeft:8},scrollBarParams:{bar_color:t.scrollBar,bar_mouseOverColor:t.scrollBar,bar_width:3},searchTitleMenuParams:{styleName:t.minimalName}}},SmartTable.MINIMAL_COLORS={ground:"#FFFFFF",text:Black(.85),softText:Black(.55),line:Black(.2),track:Black(.08),hover:Black(.03),selected:Black(.06),ink:"#1F1F1F",focus:"#3D8BD9",scrollBar:"#9A9A98",invertIcons:0,minimalName:"minimal",icons:{}},SmartTable.styles.minimal=SmartTable.createMinimalStyle(SmartTable.MINIMAL_COLORS),SmartTable.MINIMAL_DARK_COLORS={ground:"#1A1A19",text:White(.88),softText:White(.55),line:White(.18),track:White(.08),hover:White(.04),selected:White(.08),ink:"#EDEDEB",focus:"#7FB6DE",scrollBar:"#A0A0A0",invertIcons:1,minimalName:"minimalDark",icons:{btnScrollCenterIconFile:SmartTable.styles.dark.style.btnScrollCenterIconFile,searchTitleCheckIconFile:SmartTable.styles.dark.style.searchTitleCheckIconFile}},SmartTable.styles.minimalDark=SmartTable.createMinimalStyle(SmartTable.MINIMAL_DARK_COLORS);
2
+ "use strict";const SmartTableDefaults={key:"0",titleHeight:50,itemHeight:40,infoHeight:50,itemLineCount:16,highlightTitle:!0,highlightLine:!0,invertColor:0,noDataFoundAlert:"No data found!",searchKeyword:"",searchTitleIndex:-1,showSearchTitleSelect:1,wheelScroll:0,allowHtml:0,showCellTooltip:1,allTitlesText:"ALL",canSelect:1,fitLineCount:0,locale:"",sortByTitleIndex:0,sortDirection:"A-Z",fillTestData:0,onSelect:function(t,e){},createCellView:null,updateCellView:null,titleDataList:[{name:"ID",dataTitle:"id",dataType:"integer",width:100,sortable:1},{name:"NAME",dataTitle:"name",dataType:"string",width:100,sortable:1},{name:"EMAIL",dataTitle:"email",dataType:"string",width:290,sortable:0},{name:"",dataTitle:"active",dataType:"boolean",width:40,sortable:0}],itemDataList:[{id:1,name:"Bugra",desc:"about",email:"emainil",active:1},{id:2,name:"Alper",desc:"about",email:"emainil",active:1},{id:3,name:"Murat",desc:"about",email:"emainil-3",active:1},{id:4,name:"Deniz",desc:"about",email:"emainil",active:1},{id:5,name:"Nilüfer",desc:"about",email:"emainil-7",active:1},{id:6,name:"Frank",desc:"about",email:"emainil",active:1},{id:7,name:"Dany",desc:"about",email:"emainil-45",active:1},{id:8,name:"Duygu",desc:"about",email:"emainil",active:1},{id:9,name:"Filiz",desc:"about",email:"emainil-356",active:1},{id:10,name:"Anka",desc:"about",email:"emainil",active:1}],scrollBarParams:{bar_border:0,bar_round:3,bar_borderColor:"rgba(0, 0, 0, 1)",bar_width:4,bar_mouseOverWidth:4,bar_mouseOverColor:"#373836",bar_opacity:.4,bar_mouseOverOpacity:.9,bar_padding:2,bar_color:"#373836",neverHide:0,showDots:0},searchTitleMenuParams:{},searchInputParams:{styleName:"ozden",width:"50%",height:36,fontSize:15,searchIconSize:16,searchIconOpacity:.5,placeholder:"Filter",searchIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" preserveAspectRatio="none" fill="#000000"><rect x="0" y="85" width="512" height="57"/><rect x="85" y="227" width="342" height="56"/><rect x="199" y="370" width="114" height="57"/></svg>'),clearIconMinTextWidth:80,clearOnEscape:1},styleName:"light",style:{width:"auto",height:"auto",round:6,line1Color:"white",line2Color:"#F7F7F7",highlightItemCellColor:"#FFFAEB",selectedItemCellColor:"#FFF4D3",selectedBar:{width:0,color:"rgba(95, 158, 160, 0.9)"},focusRingColor:"rgba(95, 158, 160, 0.6)",highlightTitleCellColor:"white",titleUppercase:1,verticalScrollWidth:20,verticalScrollMargin:2,btnScrollDownIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 200" preserveAspectRatio="none" fill="none" stroke="#141414" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M40 84V116M27 103L40 116L53 103"/></svg>'),btnScrollUpIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 200" preserveAspectRatio="none" fill="none" stroke="#141414" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M40 116V84M27 97L40 84L53 97"/></svg>'),btnScrollCenterIconFile:"data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 50" fill="none" stroke="#000000" stroke-opacity="0.4" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M10 17.5v15M6.5 21 10 17.5 13.5 21M6.5 29 10 32.5 13.5 29"/></svg>'),sortIconFile:"data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.71,9.88l-4.3-4.29a2,2,0,0,0-2.82,0L6.29,9.88a1,1,0,0,0,0,1.41,1,1,0,0,0,1.42,0L11,8V19a1,1,0,0,0,2,0V8l3.29,3.29a1,1,0,1,0,1.42-1.41Z"/></svg>'),loadingIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" preserveAspectRatio="none"><circle cx="256" cy="256" r="206" fill="#FFFFFF" stroke="#141414" stroke-width="20"/><path d="M256 113V256H358" fill="none" stroke="#141414" stroke-width="20" stroke-linecap="round" stroke-linejoin="round"/></svg>'),searchTitleCheckIconFile:"data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#373836" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5 10 17.5 19 7"/></svg>'),invertIconColor:0,sortIcon:{size:16,opacity:.25,activeOpacity:1},cellTooltip:{fontSize:14,color:"white",textColor:Black(.8),round:6,border:1,borderColor:Black(.15),shadow:"0 6px 16px "+Black(.12),arrow:10,padding:[12,8],maxWidth:360},box:{color:"white"},boxBorder:{border:1,borderColor:Black(.15)},boxTitleLine:{color:"whitesmoke"},boxTitleCell:{padding:[10,0],borderRight:"1px solid "+Black(.08),borderBottom:"1px solid "+Black(.2)},lblTitleCell:{fontSize:15,fontFamily:"opensans-bold",textColor:Black(.8)},boxItemCell:{borderBottom:"1px solid "+Black(.08),borderRight:"none",padding:[10,0]},lblItemCell:{fontSize:15,textColor:Black(.7),fontFamily:"opensans"},boxInfoLine:{color:"white",borderTop:"1px solid "+Black(.2)},lblBoxInfoLine:{fontSize:14,textColor:Black(.5)},lblNoDataFound:{color:"transparent",textColor:Black(.45),padding:[8,2],fontSize:15,round:8,border:0,borderColor:"transparent"},lblSearchTitle:{color:"white",textColor:Black(.6),padding:[8,2],fontSize:12,round:50,border:1,borderColor:Black(.12)},btnScrollCenter:{color:"white",round:100,border:1,borderColor:Black(.2)},btnScrollUp:{color:"whitesmoke",round:100,border:1,borderColor:Black(.15)},btnScrollDown:{color:"whitesmoke",round:100,border:1,borderColor:Black(.15)},boxSort:{color:"transparent"}}},SmartTable=function(t={}){basic.applyStylePackage(t,SmartTable.styles,SmartTableDefaults),mergeIntoIfMissing(t,SmartTableDefaults);let e=startObject(t);e.titleDataList=e.titleDataList.map(t=>({...t})),e.itemDataList=[...e.itemDataList];const o=100,l="tr-TR",r=e.itemHeight;let i=0,n=null,a=null,c=null;const s=function(t,o){const l=null==o?"":String(o);1==e.allowHtml?t.text=l:t.plainText=l},d=function(){return Math.max(0,e.visibleItemDataList.length-e.itemLineCount)},h=function(t){return t<0?0:Math.min(t,d())},u=function(t){return"number"==typeof t?t:"string"==typeof t&&""!==t.trim()?Number(t):NaN};e.state="normal",e.visibleItemDataList=[...e.itemDataList],e.searchInput=null,e.selectedItemData=null,e.titleCellList=[],e.titleCellCount=0,e.itemLineList=[],e.startedItemIndexForScrolling=0,e.scrollVars={},e.recalcItemHeight=0,e.resizeTimer=null,e.refreshTimer=null,e.filterTimer=null,e.setState=function(t){e.state=t};const m=function(){};e.refresh=function(t=3){e.refreshTimer=waitAndRun(e.refreshTimer,m,t)};const g=e.remove;e.superRemove=g,e.remove=function(){e&&(clearTimeout(e.resizeTimer),clearTimeout(e.refreshTimer),clearTimeout(e.filterTimer),e.searchTitleMenu&&e.searchTitleMenu.remove(),D(),g.call(e),e=null)};const b=function(t){t.opacity=0,t.clickable=0,t.cursor="",t.itemData=null,S(t)},f=function(t,o){t.opacity=1,t.clickable=1,t.cursor="pointer",t.itemData=o,S(t);for(let l=0;l<e.titleCellCount;l++){const r=e.titleDataList[l],i=t["itemCell"+l],n=o[r.dataTitle]??"";"lastValue"in i&&i.lastValue===n||(i.lastValue=n,s(i.label,n)),e.updateCellView&&e.updateCellView(i,l,n,e)}};e.refreshData=function(){const t=e.startedItemIndexForScrolling,o=e.visibleItemDataList,l=e.itemLineCount;for(let r=0;r<l;r++){const l=e.itemLineList[r],i=o[t+r];i?f(l,i):b(l)}e.setVerticalScrollEnabled(o.length>l),e.updateInfoLabel(),k()};const p=function(t,e,o){t.opacity=e,t.clickable=o};e.setVerticalScrollEnabled=function(t){if(t&&e.visibleItemDataList.length>e.itemLineCount)return p(e.btnScrollCenter,1,1),p(e.btnScrollUp,1,1),void p(e.btnScrollDown,1,1);p(e.btnScrollCenter,0,0),p(e.btnScrollUp,.5,0),p(e.btnScrollDown,.5,0)},e.setTitleCellWidth=function(t,o){t<0||t>=e.titleCellCount||(e.titleCellList[t].width=o,e.titleDataList[t].width=o,e.itemLineList.forEach(function(e){e["itemCell"+t].width=o}))},e.createTitleLine=function(){e.titleCellList=[],e.boxTitleLine.html="",e.titleDataList.forEach(function(t,o){const l=e.createTitleCell(t,o);e.titleCellList.push(l),e.boxTitleLine.add(l)}),e.titleCellCount=e.titleCellList.length},e.setTitleDataList=function(t){e.titleDataList=t.map(t=>({...t})),e.createTitleLine(),e.createItemLines(),e.recalcItemHeight&&e.setItemHeight(e.itemHeight),e.stretchLastCell(e.calcLastCellWidth()),e.titleDataList[e.sortByTitleIndex]||(e.sortByTitleIndex=0),e.updateSortIcon(),e.updateSearchTitleSelect(),e.filterAndSortData()},e.createSortIcon=function(t){const o=e.style.sortIcon.size;startBox({align:"right center",color:e.style.boxSort.color,round:100,border:0,borderColor:"rgba(0,0,0,0.1)",width:o,height:o,right:2,padding:[4,0],position:"absolute"}),0==t.sortable&&(that.opacity=0),t.add(that),that.center("top"),t.icon=Icon({width:o,height:o,left:0,top:0,opacity:e.style.sortIcon.opacity}),that.setMotion("opacity 0.3s, transform 0.3s"),that.load(e.style.sortIconFile),1==e.style.invertIconColor&&(that.css.filter="invert(100%)"),that.center(),endBox()},e.resetSortIcons=function(t){e.titleCellList.forEach(function(o,l){l!=t.titleCellIndex&&(o.icon.rotate=0,o.icon.opacity=e.style.sortIcon.opacity,o.sortDirection="")})},e.createTitleCell=function(t,l){const r=AutoLayout({flow:"horizontal",align:"center left",width:t.width||o,padding:e.style.boxTitleCell.padding,height:e.titleHeight,color:"transparent",border:0,position:"relative"});return that.css={borderRight:e.style.boxTitleCell.borderRight,borderBottom:e.style.boxTitleCell.borderBottom},that.cursor="pointer",that.titleCellIndex=l,that.titleDataTitle=t.dataTitle,that.sortable=t.sortable,r.label=Label({...e.style.lblTitleCell}),s(r.label,t.name),that.css.fontFamily=e.style.lblTitleCell.fontFamily,1==e.style.titleUppercase&&(that.css.textTransform="uppercase"),endAutoLayout(),e.createSortIcon(r),r.on("click",function(t,o){1==t.sortable&&(e.resetSortIcons(t),e.sortByTitleIndex=t.titleCellIndex,e.sortDirection="A-Z"!=t.sortDirection?"A-Z":"Z-A",e.updateSortIcon(),e.filterAndSortData())}),r.on("mouseover",function(t,o){e.applyColumnHighlight(t)}),r.on("mouseout",function(t,o){e.clearColumnHighlight(t)}),r},e.updateSortIcon=function(){const t=e.titleCellList[e.sortByTitleIndex];t&&("A-Z"==e.sortDirection?(t.sortDirection="A-Z",t.icon.rotate=0):(t.sortDirection="Z-A",t.icon.rotate=180),t.icon.opacity=e.style.sortIcon.activeOpacity)};const C=function(t,o,l){t.color=o,e.itemLineList.forEach(function(e){e["itemCell"+t.titleCellIndex].color=l})};e.clearColumnHighlight=function(t){e.highlightTitle&&(C(t,"transparent","transparent"),e.itemLineList.forEach(S))},e.applyColumnHighlight=function(t){e.highlightTitle&&C(t,e.style.highlightTitleCellColor,e.style.highlightItemCellColor)},e.createItemLines=function(){T(null),e.itemLineList.forEach(function(t){t.remove()}),e.itemLineList=[];for(let t=0;t<e.itemLineCount;t++){const o=t,l=e.createItemLine(e.itemDataList[t],o);e.itemLineList.push(l),e.boxItemLineGroup.add(l)}},e.createItemLine=function(t,o){const l=HGroup({height:e.itemHeight||100,width:"auto",align:"top left",padding:[0,0],gap:0,color:o%2?e.style.line2Color:e.style.line1Color,position:"relative"});return e.titleDataList.forEach(function(t,o){l["itemCell"+o]=e.createItemCell(t.width,o,l)}),endGroup(),l.on("click",function(t){t.itemData&&(1==e.canSelect&&(e.selectItem(t.itemData),e.elem.focus({preventScroll:!0})),e.onSelect(e,t.itemData))}),"auto"!=e.style.height&&(l.visible=0),l};const S=function(t){const o=Boolean(t.itemData)&&t.itemData===e.selectedItemData;let l="transparent";t.isHover&&e.highlightLine&&(l=e.style.highlightItemCellColor),o&&(l=I()),function(t,o){for(let l=0;l<e.titleCellCount;l++)t["itemCell"+l].color=o}(t,l);const r=t.itemCell0;r&&(r.boxShadow=o?x():"none")},x=function(){if(!e.style.selectedBar.width)return"none";return"inset "+((basic.num(e.style.boxBorder.border)||0)+e.style.selectedBar.width)+"px 0 0 "+e.style.selectedBar.color},I=function(){return e.style.selectedItemCellColor||e.style.highlightItemCellColor},T=function(t){n=t,w()},w=function(){D(),n&&1==e.showCellTooltip&&(c=e.after(300,L))},L=function(){c=null;const t=y(n);"undefined"!=typeof Tooltip?t&&(a=Tooltip.show(n,t,e.style.cellTooltip,"top",function(e){v(t,e.look)}),a.cellText=t):n.elem.title=t},y=function(t){if(!t.itemLine.itemData)return"";const e=t.label.elem;return e.scrollWidth<=e.clientWidth?"":e.textContent},v=function(t,e){Label({plainText:t,fontSize:e.fontSize,textColor:e.textColor,css:{whiteSpace:"normal",overflowWrap:"anywhere",width:"max-content",maxWidth:e.maxWidth+"px"}})},D=function(){c&&c(),c=null,a&&a.remove(),a=null},k=function(){n&&(a&&a.cellText===n.label.elem.textContent||w())};e.setShowCellTooltip=function(t){e.showCellTooltip=basic.isOn(t)?1:0,w()},e.createItemCell=function(t,l,r){let i=AutoLayout({align:"center left",width:t||o,padding:e.style.boxItemCell.padding,height:"100%",color:"transparent",border:0});return that.css={borderBottom:e.style.boxItemCell.borderBottom,borderRight:e.style.boxItemCell.borderRight},i.label=Label({text:"",...e.style.lblItemCell}),that.css={whiteSpace:"nowrap",textOverflow:"ellipsis",fontFamily:e.style.lblItemCell.fontFamily},endAutoLayout(),i.on("mouseover",function(t,e){r.isHover=1,S(r)}),i.on("mouseout",function(t,e){r.isHover=0,S(r)}),i.itemLine=r,i.onHoverChange(function(t,e){!function(t,e){e?T(t):n===t&&T(null)}(i,e)}),e.createCellView&&createIn(i,function(){e.createCellView(i,l,e)}),i},e.initScrollMetrics=function(){e.scrollVars.minY=e.titleHeight,e.scrollVars.scrollAreaHeight=e.height-e.titleHeight-e.infoHeight,e.scrollVars.scrollIconHeight=e.btnScrollCenter.height,e.scrollVars.maxY=e.scrollVars.minY+e.scrollVars.scrollAreaHeight-e.scrollVars.scrollIconHeight,e.scrollVars.totalPath=e.scrollVars.maxY-e.scrollVars.minY,e.scrollVars.isDragging=!1,e.scrollVars.startY=0,e.scrollVars.startTop=0},e.syncScrollPosition=function(){const t=d();if(0===t)return;const o=e.startedItemIndexForScrolling/t;e.btnScrollCenter.top=e.scrollVars.minY+o*e.scrollVars.totalPath},e.createScrollEvents=function(){e.btnScrollCenter.clickable=1,e.btnScrollCenter.elem.setAttribute("draggable","false"),e.btnScrollCenter.cursor="grab",e.initScrollMetrics(),e.on("wheel",function(t,o){if(1!=e.wheelScroll)return;if(Math.abs(o.deltaX)>Math.abs(o.deltaY))return;o.preventDefault();const l=o.deltaY>0?1:-1,r=h(e.startedItemIndexForScrolling+l);r!==e.startedItemIndexForScrolling&&(e.startedItemIndexForScrolling=r,e.syncScrollPosition(),e.refreshData())},{passive:!1}),e.btnScrollCenter.on("mousedown",function(t,o){e.scrollVars.isDragging=!0,e.scrollVars.startY=o.clientY,e.scrollVars.startTop=e.btnScrollCenter.top,e.btnScrollCenter.cursor="grabbing",document.body.style.userSelect="none"}),e.listenTo(window,"mousemove",function(t,e){B(e)}),e.listenTo(window,"mouseup",function(){F()})};const B=function(t){if(!e||!e.scrollVars.isDragging)return;const o=t.clientY-e.scrollVars.startY;let l=e.scrollVars.startTop+o;if(l<e.scrollVars.minY&&(l=e.scrollVars.minY),l>e.scrollVars.maxY&&(l=e.scrollVars.maxY),e.btnScrollCenter.top=l,e.scrollVars.totalPath<=0)return;const r=(l-e.scrollVars.minY)/e.scrollVars.totalPath,i=Math.round(r*d());i!==e.startedItemIndexForScrolling&&(e.startedItemIndexForScrolling=i,e.refreshData())},F=function(){e&&e.scrollVars.isDragging&&(e.scrollVars.isDragging=!1,e.btnScrollCenter.cursor="grab",document.body.style.userSelect="auto")};e.getSelectedIndex=function(){return e.selectedItemData?e.visibleItemDataList.indexOf(e.selectedItemData):-1},e.selectItem=function(t){1==e.canSelect&&(e.selectedItemData=t||null,A(),e.refreshData())},e.clearSelection=function(){e.selectItem(null)},e.setCanSelect=function(t){e.canSelect=basic.isOn(t)?1:0,1!=e.canSelect&&(e.selectedItemData=null),M(),e.refreshData()};const M=function(){e.tabIndex=1==e.canSelect?0:null,1!=e.canSelect&&e.elem.blur()},R=function(){const t=e.elem.matches(":focus-visible");e.boxBorder.css.outline=t?"2px solid "+e.style.focusRingColor:"none",e.boxBorder.css.outlineOffset="-2px"},A=function(){const t=e.getSelectedIndex();if(-1==t)return;let o=e.startedItemIndexForScrolling;t<o&&(o=t),t>=o+e.itemLineCount&&(o=t-e.itemLineCount+1),e.startedItemIndexForScrolling=h(o),e.syncScrollPosition()};e.scrollPage=function(t){const o=h(e.startedItemIndexForScrolling+t*e.itemLineCount);o!==e.startedItemIndexForScrolling&&(e.startedItemIndexForScrolling=o,e.refreshData(),e.syncScrollPosition())},e.updateInfoLabel=function(){const t=e.visibleItemDataList.length;if(0==t)return e.boxInfoLine.label.text="0 - 0 / 0",void(e.lblNoDataFound.opacity=1);e.lblNoDataFound.opacity=0;const o=e.startedItemIndexForScrolling+1;let l=e.startedItemIndexForScrolling+e.itemLineCount;l>t&&(l=t),e.boxInfoLine.label.text=`${V(o)} - ${V(l)} / ${V(t)}`};const V=function(t){try{return t.toLocaleString(e.locale||document.documentElement.lang||l)}catch(e){return t.toLocaleString(l)}};e.setLocale=function(t){e.locale=t,e.updateInfoLabel()},e.setScrollToTop=function(){e.startedItemIndexForScrolling=0,e.btnScrollCenter.top=e.scrollVars.minY},e.setItemDataList=function(t){e.itemDataList=[...t],e.filterAndSortData()};const H=function(t,o){if(""===o)return t;const l=e.titleDataList[e.searchTitleIndex],r=l?[l]:e.titleDataList;return t.filter(t=>r.some(e=>function(t,e){return null!=t&&SmartTable.toSearchText(t).includes(e)}(t[e.dataTitle],o)))},z=function(t,o,l){const r=e.titleDataList[o];if(!r||0===r.sortable)return;const i=r.dataTitle;t.sort((t,e)=>{const o=function(t,e){const o=u(t),l=u(e);return Number.isFinite(o)&&Number.isFinite(l)?o-l:String(t).localeCompare(String(e),"tr")}(t[i]??"",e[i]??"");return"A-Z"===l?o:-o})};e.filterAndSortData=function(){e.itemDataList.length>1e3&&e.showLoading(1),e.filterTimer=waitAndRun(e.filterTimer,function(){e.filterTimer=null;const t=SmartTable.toSearchText(e.searchKeyword??"").trim(),o=H([...e.itemDataList],t);z(o,e.sortByTitleIndex,e.sortDirection),e.visibleItemDataList=o,e.setScrollToTop(),-1==e.getSelectedIndex()&&(e.selectedItemData=null),A(),e.refreshData(),e.showLoading(0)},50)},e.generateTestData=function(){let t=[];for(let o=0;o<1e5;o++){const o=e.itemDataList.map(e=>({...e,id:t.length+e.id}));t.push(...o)}e.itemDataList=t,e.visibleItemDataList=t,console.log("Yeni veri sayısı:",e.visibleItemDataList.length)},e.createVerticalScroll=function(){const t=e.style.verticalScrollWidth,o=-1*(t+e.style.verticalScrollMargin);e.btnScrollCenter=startBox(0,0,t,50,{right:o,top:e.titleHeight,opacity:0,clickable:0,...e.style.btnScrollCenter}),Icon(0,0,"100%","100%"),that.load(e.style.btnScrollCenterIconFile),endBox(),e.btnScrollUp=Box(0,0,t,e.titleHeight,{right:o,...e.style.btnScrollUp}),that.cursor="pointer",that.on("click",function(t,o){e.scrollPage(-1)}),Icon(0,0,"100%","100%"),e.btnScrollUp.add(that),that.load(e.style.btnScrollUpIconFile),1==e.style.invertIconColor&&(that.css.filter="invert(100%)"),e.btnScrollDown=Box(0,0,t,e.infoHeight,{right:o,bottom:0,...e.style.btnScrollDown}),that.cursor="pointer",that.on("click",function(t,o){e.scrollPage(1)}),Icon(0,0,"100%","100%"),e.btnScrollDown.add(that),that.load(e.style.btnScrollDownIconFile),1==e.style.invertIconColor&&(that.css.filter="invert(100%)")};const N=function(){const t=e.lblSelectedSortKey.elem.offsetWidth,o=t>0;e.searchInput.setClearIconRight(o?6+t+6:i)};e.createToolbar=function(){HGroup({align:"left center",gap:12,padding:[8,0]}),e.boxInfoLine.add(that),e.searchInput=SearchInput(e.searchInputParams),that.setValue(e.searchKeyword,1),that.onEnter=function(t){e.searchKeyword=t.getSearchText(),e.filterAndSortData()},i=that.clearIconRight,function(){const t=String(e.searchInputParams.width);e.searchInput.css.minWidth="0px",t.endsWith("%")&&(e.searchInput.css.flexGrow="1",e.searchInput.css.maxWidth="max("+t+", 240px)")}(),e.boxInfoLine.label=Label({text:"0 - 0 / 0",...e.style.lblBoxInfoLine}),that.css={marginLeft:"auto",marginRight:"6px",flexShrink:"0"},endGroup(),e.lblSelectedSortKey=createIn(e.searchInput,function(){return Label({right:6,opacity:1,clickable:1,...e.style.lblNoDataFound,...e.style.lblSearchTitle})}),s(e.lblSelectedSortKey,e.allTitlesText),that.cursor="pointer",that.ellipsis=1,that.css.maxWidth="160px",that.css.top="50%",that.css.transform="translateY(-50%)",that.setMotion("opacity 0.2s"),that.onResize(N),"function"==typeof ContextMenu?(e.searchTitleMenu=ContextMenu({minWidth:160,...e.searchTitleMenuParams,onClick:function(t,o){e.setSearchTitleIndex(o.data)}}),e.searchTitleMenu.attachTo(e.lblSelectedSortKey,"click")):e.lblSelectedSortKey.on("click",function(){e.selectNextSearchTitle()})},e.stretchLastCell=function(t){if(!(t>0)||0==e.titleCellCount)return;const o=e.titleCellCount-1;e.itemLineList.forEach(function(e){e["itemCell"+o].width=t}),e.titleCellList[o].width=t},e.calcLastCellWidth=function(){const t=e.titleDataList,l=e.width;if(0==t.length)return 0;let r=0;t.forEach(function(t){r+=basic.num(t.width||o)});const i=basic.num(t[t.length-1].width||o);return l>r?l-r+i:i},e.setItemHeight=function(t){e.itemHeight=t,e.itemLineList.forEach(function(t){t.height=e.itemHeight,t.visible=1})},e.setHeight=function(t){e.recalcItemHeight="auto"!=t?1:0,e.height=t},e.setWidth=function(t){if(!("string"==typeof t&&t.includes("%")))return e.width=t,void(e.css={marginRight:e.getVerticalScrollWidth()+"px"});e.css.marginRight&&(e.css={marginRight:""}),e.width="calc("+t+" - "+e.getVerticalScrollWidth()+"px)"},e.getTotalWidth=function(){return e.width+e.getVerticalScrollWidth()},e.getVerticalScrollWidth=function(){return e.style.verticalScrollWidth+e.style.verticalScrollMargin},e.createLoading=function(){e.boxLoading=VGroup({color:Black(.3),clickable:1,round:e.style.round}),e.add(e.boxLoading),Icon({width:32,height:32}),that.load(e.style.loadingIconFile),endGroup()},e.showLoading=function(t){t?(e.boxLoading.visible=1,e.setVerticalScrollEnabled(!1)):(e.boxLoading.visible=0,e.setVerticalScrollEnabled(!0))},e.createNoDataFoundLabel=function(){HGroup(),e.lblNoDataFound=Label({opacity:0,...e.style.lblNoDataFound}),s(e.lblNoDataFound,e.noDataFoundAlert),that.setMotion("opacity 0.2s"),endGroup()};const E=function(t){return String(t.name??"").replace(/<[^>]*>/g,"").trim()||String(t.dataTitle??"")};e.updateSearchTitleSelect=function(){e.titleDataList[e.searchTitleIndex]||(e.searchTitleIndex=-1);const t=e.titleDataList[e.searchTitleIndex];if(s(e.lblSelectedSortKey,t?E(t):e.allTitlesText),e.lblSelectedSortKey.visible=1==e.showSearchTitleSelect?1:0,!e.searchTitleMenu)return;const o=function(t){return e.searchTitleIndex==t?e.style.searchTitleCheckIconFile:""},l=[{text:e.allTitlesText,data:-1,iconFile:o(-1)},"-"];e.titleDataList.forEach(function(t,e){l.push({text:E(t),data:e,iconFile:o(e)})}),e.searchTitleMenu.setItems(l),1!=e.showSearchTitleSelect&&e.searchTitleMenu.close()},e.setSearchTitleIndex=function(t){e.searchTitleIndex=e.titleDataList[t]?t:-1,e.updateSearchTitleSelect(),""!==String(e.searchKeyword??"").trim()&&e.filterAndSortData()},e.selectNextSearchTitle=function(){const t=e.searchTitleIndex+1;e.setSearchTitleIndex(t<e.titleDataList.length?t:-1)},e.setShowSearchTitleSelect=function(t){e.showSearchTitleSelect=basic.isOn(t)?1:0,e.updateSearchTitleSelect()},e.setWheelScroll=function(t){e.wheelScroll=basic.isOn(t)?1:0};const W=function(){return e.height-e.titleHeight-e.infoHeight},O=function(){if(e.recalcItemHeight&&1==e.fitLineCount)P();else if(e.recalcItemHeight){const t=W()/e.itemLineCount;(e.itemHeight!=t||e.itemLineList[0]&&!e.itemLineList[0].visible)&&e.setItemHeight(t)}e.stretchLastCell(e.calcLastCellWidth()),e.initScrollMetrics(),e.syncScrollPosition(),e.scrollBar.refreshScroll(),e.refreshData()},P=function(){const t=W();if(t<=0)return;const o=Math.max(1,Math.round(t/r));o==e.itemLineList.length?e.setItemHeight(t/o):e.setItemLineCount(o)};return e.setItemLineCount=function(t){e.itemLineCount=Math.max(1,Math.round(t)),e.createItemLines();const o=W(),l=e.recalcItemHeight&&o>0;e.setItemHeight(l?o/e.itemLineCount:e.itemHeight),e.stretchLastCell(e.calcLastCellWidth()),e.startedItemIndexForScrolling=h(e.startedItemIndexForScrolling),A(),e.initScrollMetrics(),e.syncScrollPosition(),e.refreshData()},e.setFitLineCount=function(t){e.fitLineCount=basic.isOn(t)?1:0,O()},e.createResizeEvent=function(){e.onResize(function(t){e.resizeTimer=waitAndRun(e.resizeTimer,O,3)})},e.init=function(){e.clickable=1,e.clipContent=0,e.color=e.style.box.color,e.round=e.style.round,1==e.invertColor&&(e.css.filter="invert(100%)"),e.setWidth(e.style.width),e.setHeight(e.style.height),e.boxHorizontalScrollable=VGroup({align:"top left",width:"auto",height:"auto",padding:[0,0],gap:0,position:"relative",clipContent:0,scrollX:1}),that.css={borderTopLeftRadius:e.style.round+"px",borderTopRightRadius:e.style.round+"px",borderBottomRightRadius:"0px",borderBottomLeftRadius:"0px",marginBottom:e.infoHeight+"px"},e.boxTitleLine=HGroup({height:"auto",width:"auto",align:"top left",padding:[0,0],gap:0,color:e.style.boxTitleLine.color}),endGroup(),e.boxItemLineGroup=VGroup({align:"top left",width:"auto",height:"auto",padding:[0,0],gap:0}),endGroup(),endGroup(),e.boxInfoLine=HGroup({bottom:0,left:0,height:e.infoHeight,width:"100%",align:"top left",padding:[0,0],gap:0,...e.style.boxInfoLine}),endGroup(),that.css={borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderBottomRightRadius:e.style.round+"px",borderBottomLeftRadius:e.style.round+"px",borderTop:e.style.boxInfoLine.borderTop},that.clickable=0,e.createToolbar(),e.createNoDataFoundLabel(),e.boxBorder=Box(0,0,"100%","100%",e.style.boxBorder),that.round=e.style.round,that.color="transparent",e.createVerticalScroll(),e.scrollBar=ScrollBar({scrollableBox:e.boxHorizontalScrollable,...e.scrollBarParams}),e.createResizeEvent(),e.createLoading()},e.init(),e.createTitleLine(),e.createItemLines(),e.createScrollEvents(),e.on("keydown",function(t,o){if(1!=e.canSelect||o.target!=e.elem)return;if(o.metaKey||o.ctrlKey||o.altKey)return;if("Enter"==o.key)return void(e.selectedItemData&&e.onSelect(e,e.selectedItemData));const l=function(t){const o=e.itemLineCount,l=e.visibleItemDataList.length;return{ArrowDown:1,ArrowUp:-1,PageDown:o,PageUp:-o,Home:-l,End:l}[t]||0}(o.key);0!=l&&(o.preventDefault(),function(t){const o=e.visibleItemDataList.length;if(0==o)return;let l=e.getSelectedIndex();-1==l&&(l=t>0?-1:o),e.selectItem(e.visibleItemDataList[basic.clamp(l+t,0,o-1)])}(l),R())}),e.on("focus",R),e.on("blur",R),M(),e.stretchLastCell(e.calcLastCellWidth()),e.updateSortIcon(),e.updateSearchTitleSelect(),e.fillTestData&&e.generateTestData(),e.filterAndSortData(),endObject(e)};SmartTable.toSearchText=function(t){const e=String(t).toLocaleLowerCase("tr");return SmartTable.NOT_ASCII.test(e)?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/ı/g,"i"):e},SmartTable.NOT_ASCII=/[^\u0000-\u007f]/,SmartTable.styles={light:{style:{}},dark:{style:{line1Color:"#232428",line2Color:"#27292D",highlightItemCellColor:"#2E3035",selectedItemCellColor:"#24383A",focusRingColor:"rgba(95, 179, 181, 0.7)",highlightTitleCellColor:"#33353A",btnScrollCenterIconFile:"data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 50" fill="none" stroke="#FFFFFF" stroke-opacity="0.5" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M10 17.5v15M6.5 21 10 17.5 13.5 21M6.5 29 10 32.5 13.5 29"/></svg>'),searchTitleCheckIconFile:"data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#E6E6E6" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5 10 17.5 19 7"/></svg>'),invertIconColor:1,sortIcon:{size:16,opacity:.3,activeOpacity:1},cellTooltip:{color:"#2B2D31",textColor:"rgba(255, 255, 255, 0.88)",borderColor:"rgba(255, 255, 255, 0.14)",shadow:"0 8px 24px rgba(0, 0, 0, 0.5)"},box:{color:"#232428"},boxBorder:{border:1,borderColor:"rgba(255, 255, 255, 0.12)"},boxTitleLine:{color:"#2B2D31"},boxTitleCell:{borderRight:"1px solid rgba(255, 255, 255, 0.08)",borderBottom:"1px solid rgba(255, 255, 255, 0.14)"},lblTitleCell:{textColor:"rgba(255, 255, 255, 0.85)"},boxItemCell:{borderBottom:"1px solid rgba(255, 255, 255, 0.06)"},lblItemCell:{textColor:"rgba(255, 255, 255, 0.75)"},boxInfoLine:{color:"#232428",borderTop:"1px solid rgba(255, 255, 255, 0.14)"},lblBoxInfoLine:{textColor:"rgba(255, 255, 255, 0.5)"},lblNoDataFound:{textColor:"rgba(255, 255, 255, 0.45)"},lblSearchTitle:{color:"#33353A",textColor:"rgba(255, 255, 255, 0.7)",borderColor:"rgba(255, 255, 255, 0.14)"},btnScrollCenter:{color:"#2B2D31",borderColor:"rgba(255, 255, 255, 0.2)"},btnScrollUp:{color:"#2B2D31",borderColor:"rgba(255, 255, 255, 0.14)"},btnScrollDown:{color:"#2B2D31",borderColor:"rgba(255, 255, 255, 0.14)"}},searchInputParams:{styleName:"ozdenDark"},scrollBarParams:{bar_color:"#A0A0A0",bar_mouseOverColor:"#D0D0D0"},searchTitleMenuParams:{styleName:"dark"}},green:{style:{width:"auto",height:"auto",round:6,line1Color:"white",line2Color:"whitesmoke",highlightItemCellColor:"#F3E7C2",selectedItemCellColor:null,selectedBar:{width:3,color:"rgba(95, 158, 160, 0.9)"},focusRingColor:"rgba(95, 158, 160, 0.6)",highlightTitleCellColor:White(.2),titleUppercase:0,verticalScrollWidth:20,verticalScrollMargin:2,btnScrollDownIconFile:SmartTableDefaults.style.btnScrollDownIconFile,btnScrollUpIconFile:SmartTableDefaults.style.btnScrollUpIconFile,btnScrollCenterIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 200" preserveAspectRatio="none" fill="none" stroke="#D96450" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M40 28V172M27 41L40 28L53 41M27 159L40 172L53 159"/></svg>'),sortIconFile:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80" preserveAspectRatio="none" fill="none" stroke="#141414" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M40 24V56M27 43L40 56L53 43"/></svg>'),loadingIconFile:SmartTableDefaults.style.loadingIconFile,searchTitleCheckIconFile:"data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#373836" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5 10 17.5 19 7"/></svg>'),invertIconColor:0,sortIcon:{size:22,opacity:.5,activeOpacity:1},box:{color:"white"},boxBorder:{border:2,borderColor:Black(.8)},boxTitleLine:{color:"#65A293"},boxTitleCell:{padding:[8,0],borderRight:"1px solid rgba(0, 0, 0, 0.5)",borderBottom:"2px solid #141414"},lblTitleCell:{fontSize:20,fontFamily:"opensans",textColor:Black(.8)},boxItemCell:{borderBottom:"1px solid darkgray",borderRight:"1px solid rgba(0, 0, 0, 0.05)",padding:[8,0]},lblItemCell:{fontSize:20,textColor:Black(.75),fontFamily:"opensans"},boxInfoLine:{color:"#E4E4E4",borderTop:"1px solid rgba(0, 0, 0, 0)"},lblBoxInfoLine:{fontSize:16,textColor:Black(.85)},lblNoDataFound:{color:"lightgray",textColor:Black(.8),padding:[8,2],fontSize:14,round:8,border:1,borderColor:Black(.4)},lblSearchTitle:{color:"whitesmoke",textColor:Black(.8),padding:[8,2],fontSize:14,round:8,border:1,borderColor:Black(.15)},btnScrollCenter:{color:"white",round:100,border:1,borderColor:"rgba(0,0,0,0.4)"},btnScrollUp:{color:"lightgray",round:100,border:1,borderColor:"rgba(0, 0, 0, 0.6)"},btnScrollDown:{color:"lightgray",round:100,border:1,borderColor:"rgba(0, 0, 0, 0.6)"},boxSort:{color:"#65A293"}},searchInputParams:{styleName:"original",width:"50%",height:36,border:1,round:8,color:"white",searchIconSize:16,placeholder:"Filter",fontSize:16,borderColor:Black(.15),borderBottomStyle:"1px solid "+Black(.15),searchIconFile:SmartTableDefaults.searchInputParams.searchIconFile,searchIconOpacity:.8}}},SmartTable.styles.classic=SmartTable.styles.light,SmartTable.createMinimalStyle=function(t){return{titleHeight:30,itemHeight:28,infoHeight:28,style:Object.assign({round:4,line1Color:t.ground,line2Color:t.ground,highlightItemCellColor:t.hover,selectedItemCellColor:t.selected,selectedBar:{width:2,color:t.ink},focusRingColor:t.focus,highlightTitleCellColor:t.ground,titleUppercase:0,invertIconColor:t.invertIcons,sortIcon:{size:14,opacity:.3,activeOpacity:1},cellTooltip:{fontSize:12,color:t.ground,textColor:t.text,round:4,border:1,borderColor:t.line,shadow:"none"},box:{color:t.ground},boxBorder:{border:1,borderColor:t.line},boxTitleLine:{color:t.ground},boxTitleCell:{padding:[10,0],borderRight:"none",borderBottom:"1px solid "+t.line},lblTitleCell:{fontSize:12,fontFamily:"opensans-bold",textColor:t.softText},boxItemCell:{borderBottom:"1px solid "+t.track,borderRight:"none",padding:[10,0]},lblItemCell:{fontSize:13,textColor:t.text,fontFamily:"opensans"},boxInfoLine:{color:t.ground,borderTop:"1px solid "+t.line},lblBoxInfoLine:{fontSize:12,textColor:t.softText},lblNoDataFound:{color:"transparent",textColor:t.softText,fontSize:12},lblSearchTitle:{color:"transparent",textColor:t.softText,fontSize:11,border:0,borderColor:"transparent"},btnScrollCenter:{color:t.ground,borderColor:t.line},btnScrollUp:{color:t.ground,borderColor:t.line},btnScrollDown:{color:t.ground,borderColor:t.line}},t.icons),searchInputParams:{styleName:t.minimalName,height:22,fontSize:12,searchIconSize:12,searchIconLeft:8},scrollBarParams:{bar_color:t.scrollBar,bar_mouseOverColor:t.scrollBar,bar_width:3},searchTitleMenuParams:{styleName:t.minimalName}}},SmartTable.MINIMAL_COLORS={ground:"#FFFFFF",text:Black(.85),softText:Black(.55),line:Black(.2),track:Black(.08),hover:Black(.03),selected:Black(.06),ink:"#1F1F1F",focus:"#3D8BD9",scrollBar:"#9A9A98",invertIcons:0,minimalName:"minimal",icons:{}},SmartTable.styles.minimal=SmartTable.createMinimalStyle(SmartTable.MINIMAL_COLORS),SmartTable.MINIMAL_DARK_COLORS={ground:"#1A1A19",text:White(.88),softText:White(.55),line:White(.18),track:White(.08),hover:White(.04),selected:White(.08),ink:"#EDEDEB",focus:"#7FB6DE",scrollBar:"#A0A0A0",invertIcons:1,minimalName:"minimalDark",icons:{btnScrollCenterIconFile:SmartTable.styles.dark.style.btnScrollCenterIconFile,searchTitleCheckIconFile:SmartTable.styles.dark.style.searchTitleCheckIconFile}},SmartTable.styles.minimalDark=SmartTable.createMinimalStyle(SmartTable.MINIMAL_DARK_COLORS);