@kedem/okdb 1.0.0 → 1.0.3

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 (188) hide show
  1. package/README.md +1 -1
  2. package/bin/okdb.js +1 -1
  3. package/keys/public.pem +3 -0
  4. package/okdb.js +1 -1
  5. package/package.json +2 -2
  6. package/public/admin-app.js +1 -1
  7. package/public/components/admin-route-host.ok.js +1 -1
  8. package/public/components/env-picker.ok.js +1 -1
  9. package/public/components/field-path-input.ok.js +1 -1
  10. package/public/components/geo-map.ok.js +1 -1
  11. package/public/components/ok-cron-input.ok.js +1 -1
  12. package/public/components/ok-dropzone.ok.js +1 -1
  13. package/public/components/ok-js-input.ok.js +1 -1
  14. package/public/components/ok-json-input.ok.js +1 -1
  15. package/public/components/ok-text-monaco-input.ok.js +1 -1
  16. package/public/components/theme-toggle.ok.js +1 -1
  17. package/public/login-app.js +1 -1
  18. package/public/modules/ok.js +1 -1
  19. package/public/sections/api/parts/api-endpoint.ok.js +1 -1
  20. package/public/sections/auth/modals/create-token-modal.ok.js +1 -1
  21. package/public/sections/auth/modals/edit-token-modal.ok.js +1 -1
  22. package/public/sections/auth/modals/perm-info-popover.ok.js +1 -1
  23. package/public/sections/auth/parts/token-detail.ok.js +1 -1
  24. package/public/sections/auth/parts/token-list.ok.js +1 -1
  25. package/public/sections/db/modals/add-item-modal.ok.js +1 -1
  26. package/public/sections/db/modals/create-env-modal.ok.js +1 -1
  27. package/public/sections/db/modals/create-fts-modal.ok.js +1 -1
  28. package/public/sections/db/modals/create-index-modal.ok.js +1 -1
  29. package/public/sections/db/modals/create-pipeline-modal.ok.js +1 -1
  30. package/public/sections/db/modals/demo-env-modal.ok.js +1 -1
  31. package/public/sections/db/modals/remove-env-modal.ok.js +1 -1
  32. package/public/sections/db/modals/schema-edit-modal.ok.js +1 -1
  33. package/public/sections/db/parts/db-overview.ok.js +1 -1
  34. package/public/sections/db/parts/db-pipelines-panel.ok.js +1 -1
  35. package/public/sections/db/parts/edit-row.ok.js +1 -1
  36. package/public/sections/db/parts/tm-timeline.ok.js +1 -1
  37. package/public/sections/db/parts/type-changelog.ok.js +1 -1
  38. package/public/sections/db/parts/type-list.ok.js +1 -1
  39. package/public/sections/db/parts/type-pipelines-tab.ok.js +1 -1
  40. package/public/sections/db/parts/type-schema-tab.ok.js +1 -1
  41. package/public/sections/db/parts/type-viewer.ok.js +1 -1
  42. package/public/sections/db/parts/type-violations-tab.ok.js +1 -1
  43. package/public/sections/embeddings/modals/register-model-modal.ok.js +1 -1
  44. package/public/sections/embeddings/parts/embed-create-panel.ok.js +1 -1
  45. package/public/sections/embeddings/parts/embed-embedder-panel.ok.js +1 -1
  46. package/public/sections/embeddings/parts/embed-engine-declaration-editor.ok.js +1 -1
  47. package/public/sections/embeddings/parts/embed-engine-list.ok.js +1 -1
  48. package/public/sections/embeddings/parts/embed-indexer-panel.ok.js +1 -1
  49. package/public/sections/embeddings/parts/embed-lifecycle-bar.ok.js +1 -1
  50. package/public/sections/embeddings/parts/embed-model-catalog.ok.js +1 -1
  51. package/public/sections/embeddings/parts/embed-overview.ok.js +1 -1
  52. package/public/sections/embeddings/parts/embed-search-panel.ok.js +1 -1
  53. package/public/sections/embeddings/parts/embed-worker-panel.ok.js +1 -1
  54. package/public/sections/embeddings/parts/embeddings-engine-panel.ok.js +1 -1
  55. package/public/sections/embeddings/parts/engines-overview.ok.js +1 -1
  56. package/public/sections/embeddings/parts/pipeline-create-panel.ok.js +1 -1
  57. package/public/sections/engines/engine-panel-shared-style.js +1 -1
  58. package/public/sections/engines/engine-ui-utils.js +1 -1
  59. package/public/sections/engines/modals/engine-modal.ok.js +1 -1
  60. package/public/sections/engines/parts/engine-declaration-editor.ok.js +1 -1
  61. package/public/sections/engines/parts/engine-lifecycle-actions.ok.js +1 -1
  62. package/public/sections/engines/parts/engine-panel-shell.ok.js +1 -1
  63. package/public/sections/engines/parts/engine-resource-card.ok.js +1 -1
  64. package/public/sections/engines/parts/engine-row-item.ok.js +1 -1
  65. package/public/sections/engines/parts/generic-engine-panel.ok.js +1 -1
  66. package/public/sections/files/parts/files-blob-status.ok.js +1 -1
  67. package/public/sections/files/parts/files-collection-list.ok.js +1 -1
  68. package/public/sections/files/parts/files-collection-panel.ok.js +1 -1
  69. package/public/sections/files/parts/files-file-list.ok.js +1 -1
  70. package/public/sections/files/parts/files-overview.ok.js +1 -1
  71. package/public/sections/files/parts/files-path-browser.ok.js +1 -1
  72. package/public/sections/files/parts/files-upload-panel.ok.js +1 -1
  73. package/public/sections/functions/modals/function-modal.ok.js +1 -1
  74. package/public/sections/functions/parts/function-detail.ok.js +1 -1
  75. package/public/sections/functions/parts/function-logs.ok.js +1 -1
  76. package/public/sections/functions/parts/function-runner.ok.js +1 -1
  77. package/public/sections/functions/parts/functions-list.ok.js +1 -1
  78. package/public/sections/license/parts/license-panel.ok.js +1 -1
  79. package/public/sections/queue/modals/create-bucket-modal.ok.js +1 -1
  80. package/public/sections/queue/modals/edit-bucket-modal.ok.js +1 -1
  81. package/public/sections/queue/modals/edit-job-modal.ok.js +1 -1
  82. package/public/sections/queue/modals/enqueue-job-modal.ok.js +1 -1
  83. package/public/sections/queue/modals/job-type-modal.ok.js +1 -1
  84. package/public/sections/queue/parts/ok-job-form.ok.js +1 -1
  85. package/public/sections/queue/parts/queue-buckets.ok.js +1 -1
  86. package/public/sections/queue/parts/queue-job-types.ok.js +1 -1
  87. package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
  88. package/public/sections/queue/parts/queue-types.ok.js +1 -1
  89. package/public/sections/queue/parts/queue-workers.ok.js +1 -1
  90. package/public/sections/sync/parts/sync-node-detail.ok.js +1 -1
  91. package/public/sections/sync/parts/sync-retention.ok.js +1 -1
  92. package/public/sections/sync/parts/sync-topology.ok.js +1 -1
  93. package/public/sections/system/modals/data-ops-modal.ok.js +1 -1
  94. package/public/sections/system/parts/system-api-panel.ok.js +1 -1
  95. package/public/sections/system/parts/system-auth-panel.ok.js +1 -1
  96. package/public/sections/system/parts/system-log-history.ok.js +1 -1
  97. package/public/sections/system/parts/system-log.ok.js +1 -1
  98. package/public/sections/system/parts/system-status.ok.js +1 -1
  99. package/public/sections/system/parts/system-sync-panel.ok.js +1 -1
  100. package/public/sections/views/modals/create-view-modal.ok.js +1 -1
  101. package/public/sections/views/parts/view-detail.ok.js +1 -1
  102. package/public/sections/views/parts/views-list.ok.js +1 -1
  103. package/public/sections/views/parts/views-overview.ok.js +1 -1
  104. package/public/setup-app.js +1 -1
  105. package/public/stores/auth-store.js +1 -1
  106. package/public/stores/events-store.js +1 -1
  107. package/public/stores/functions-store.js +1 -1
  108. package/public/stores/okdb-store.js +1 -1
  109. package/public/stores/theme-store.js +1 -1
  110. package/public/util/permissions.js +1 -1
  111. package/public/util/sift-schema.js +1 -1
  112. package/public/vendor/okjs/ok.esm.min.js +1 -2
  113. package/public/vendor/okjs/toolkit/behavior/async.ok.js +1 -1
  114. package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -1
  115. package/public/vendor/okjs/toolkit/components/ok-doc-viewer.ok.js +1 -1
  116. package/public/vendor/okjs/toolkit/components/ok-marked.ok.js +1 -1
  117. package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
  118. package/public/vendor/okjs/toolkit/core/ok-layer-service.ok.js +1 -1
  119. package/public/vendor/okjs/toolkit/core/ok-layer.ok.js +1 -1
  120. package/public/vendor/okjs/toolkit/core/ok-overlay.ok.js +1 -1
  121. package/public/vendor/okjs/toolkit/core/ok-sandbox.ok.js +1 -1
  122. package/public/vendor/okjs/toolkit/core/transition.ok.js +1 -1
  123. package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -1
  124. package/public/vendor/okjs/toolkit/devtools/ok-console-service.ok.js +1 -1
  125. package/public/vendor/okjs/toolkit/devtools/ok-console.ok.js +1 -1
  126. package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor-service.ok.js +1 -1
  127. package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor.ok.js +1 -1
  128. package/public/vendor/okjs/toolkit/devtools/ok-inspector-service.ok.js +1 -1
  129. package/public/vendor/okjs/toolkit/devtools/ok-inspector.ok.js +1 -1
  130. package/public/vendor/okjs/toolkit/devtools/ok-js-tree.ok.js +1 -1
  131. package/public/vendor/okjs/toolkit/devtools/ok-timeline-service.ok.js +1 -1
  132. package/public/vendor/okjs/toolkit/devtools/ok-timeline.ok.js +1 -1
  133. package/public/vendor/okjs/toolkit/docs/doc-viewer.ok.js +1 -1
  134. package/public/vendor/okjs/toolkit/editor/ok-live-component.ok.js +1 -1
  135. package/public/vendor/okjs/toolkit/editor/ok-live-example.ok.js +1 -1
  136. package/public/vendor/okjs/toolkit/editor/ok-live-shell.ok.js +1 -1
  137. package/public/vendor/okjs/toolkit/elements/ok-dropdown.ok.js +1 -1
  138. package/public/vendor/okjs/toolkit/elements/ok-icon.ok.js +1 -1
  139. package/public/vendor/okjs/toolkit/elements/ok-select.ok.js +1 -1
  140. package/public/vendor/okjs/toolkit/elements/ok-table.ok.js +1 -1
  141. package/public/vendor/okjs/toolkit/errors/ok-crash-boundary.ok.js +1 -1
  142. package/public/vendor/okjs/toolkit/errors/ok-crash-info.ok.js +1 -1
  143. package/public/vendor/okjs/toolkit/i18n/i18n-editor-examples.ok.js +1 -1
  144. package/public/vendor/okjs/toolkit/i18n/i18n-editor.ok.js +1 -1
  145. package/public/vendor/okjs/toolkit/i18n/i18n-key-editor-tips.ok.js +1 -1
  146. package/public/vendor/okjs/toolkit/i18n/i18n-key-editor.ok.js +1 -1
  147. package/public/vendor/okjs/toolkit/i18n/i18n-service.ok.js +1 -1
  148. package/public/vendor/okjs/toolkit/i18n/ok-i18n.js +1 -1
  149. package/public/vendor/okjs/toolkit/interaction/ok-contextmenu.ok.js +1 -1
  150. package/public/vendor/okjs/toolkit/interaction/ok-dismiss-service.ok.js +1 -1
  151. package/public/vendor/okjs/toolkit/interaction/ok-draggable.ok.js +1 -1
  152. package/public/vendor/okjs/toolkit/interaction/ok-flyover-panel.ok.js +1 -1
  153. package/public/vendor/okjs/toolkit/interaction/ok-flyover.ok.js +1 -1
  154. package/public/vendor/okjs/toolkit/interaction/ok-highlight-service.ok.js +1 -1
  155. package/public/vendor/okjs/toolkit/interaction/ok-highlight.ok.js +1 -1
  156. package/public/vendor/okjs/toolkit/interaction/ok-hotkeys-service.ok.js +1 -1
  157. package/public/vendor/okjs/toolkit/interaction/ok-picker-service.ok.js +1 -1
  158. package/public/vendor/okjs/toolkit/interaction/ok-popout-service.ok.js +1 -1
  159. package/public/vendor/okjs/toolkit/interaction/ok-popout.ok.js +1 -1
  160. package/public/vendor/okjs/toolkit/interaction/ok-portal-service.ok.js +1 -1
  161. package/public/vendor/okjs/toolkit/interaction/ok-submenu.ok.js +1 -1
  162. package/public/vendor/okjs/toolkit/layout/ok-resizer.ok.js +1 -1
  163. package/public/vendor/okjs/toolkit/manifest.js +1 -1
  164. package/public/vendor/okjs/toolkit/modals/ok-modal-service.ok.js +1 -1
  165. package/public/vendor/okjs/toolkit/modals/ok-modal.ok.js +1 -1
  166. package/public/vendor/okjs/toolkit/modals/ok-toast-service.ok.js +1 -1
  167. package/public/vendor/okjs/toolkit/modals/ok-window.ok.js +1 -1
  168. package/public/vendor/okjs/toolkit/navigation/hash-router.ok.js +1 -1
  169. package/public/vendor/okjs/toolkit/navigation/history-router.ok.js +1 -1
  170. package/public/vendor/okjs/toolkit/navigation/router.ok.js +1 -1
  171. package/public/vendor/okjs/toolkit/sync/reactive-sync-service.ok.js +1 -1
  172. package/public/vendor/okjs/toolkit/sync/reactive-sync.js +1 -1
  173. package/public/vendor/okjs/toolkit/theming/blocks/ok-design-button.css.js +1 -1
  174. package/public/vendor/okjs/toolkit/theming/blocks/ok-design-input.css.js +1 -1
  175. package/public/vendor/okjs/toolkit/theming/ok-design-style.js +1 -1
  176. package/public/vendor/okjs/toolkit/theming/ok-design-vars.js +1 -1
  177. package/public/vendor/okjs/toolkit/theming/ok-design.ok.js +1 -1
  178. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-input.ok.js +1 -1
  179. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-service.ok.js +1 -1
  180. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-style.js +1 -1
  181. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-utils.js +1 -1
  182. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-variable.ok.js +1 -1
  183. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-vm.js +1 -1
  184. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor.ok.js +1 -1
  185. package/public/vendor/okjs/toolkit/theming/ok-theme.ok.js +1 -1
  186. package/public/view-models/type-query-vm.js +1 -1
  187. package/public/images/logo.png +0 -0
  188. package/public/images/logo.svg +0 -333
@@ -1 +1 @@
1
- function e(e={}){const t={},r={},n={includeBase:!0,fallbacks:[],missing:"placeholder",placeholder:e=>`#${e}#`,coerceNumbers:!0,currencyDefault:"USD",warnOnMissingOther:!1,onWarn:null,onMissingKey:null,onMissingVar:null},l=t=>({...n,...e,...t}),i=(e,t)=>t.split(".").reduce((e,t)=>e?.[t],e);function o(e,t,r){return(e=(e=e.replace(/{{{{/g,"").replace(/}}}}/g,"")).replace(/{{\s*([^{}]+?)\s*}}/g,(e,n)=>{const l=n.trim(),o=r.onMissingVar?.(l,t);if(null!=o)return String(o);const a=i(t,l);if(null==a){if("placeholder"===r.missing)return r.placeholder(l);if("throw"===r.missing)throw new Error(`i18n: missing "${l}"`);return""}return String(a)})).replaceAll("","{{").replaceAll("","}}")}const a=e=>!e||0===Object.keys(e).length;function s(e,t,r,n){if(null==e)return"";if("string"==typeof e)return e.includes("{{")?o(e,t,n):e;if(Array.isArray(e))return e.map(e=>s(e,t,r,n)).join("");if(!("var"in e))return n.onWarn?.("bad_segment",{node:e}),"";const{var:l,format:u,options:c={}}=e,m=i(t??{},l),y=(e=>{if(!e)return{type:"raw"};const[t,r]=String(e).split(":");return"currency"===t?{type:"number",style:"currency",currency:r}:"percent"===t?{type:"number",style:"percent"}:"number"===t?{type:"number",style:r||"default"}:"date"===t?{type:"date",style:r||"medium"}:"time"===t?{type:"time",style:r||"short"}:"select"===t||"switch"===t?{type:"select"}:"plural"===t?{type:"plural"}:"ordinal"===t?{type:"ordinal"}:{type:"raw"}})(u);switch(!n.warnOnMissingOther||"select"!==y.type&&"plural"!==y.type&&"ordinal"!==y.type||"other"in c||n.onWarn?.("missing_other",{path:l,lang:r.locale}),y.type){case"raw":if(null==m){if("throw"===n.missing)throw new Error(`i18n: missing "${l}"`);return"placeholder"===n.missing?n.placeholder(l):""}return String(m);case"number":if("integer"===y.style)return r.numberInt.format(m);if("percent"===y.style)return r.numberPct.format(m);if("currency"===y.style){const e=c.currency??y.currency??t?.currency??n.currencyDefault;return r.currency(e,c).format(m)}return new Intl.NumberFormat(r.locale,c).format(m);case"date":return a(c)?r.date[y.style].format(m):new Intl.DateTimeFormat(r.locale,{dateStyle:y.style,...c}).format(m);case"time":return a(c)?r.time[y.style].format(m):new Intl.DateTimeFormat(r.locale,{timeStyle:y.style,...c}).format(m);case"select":{const e=null==m?void 0:String(m),r=e&&c[e]||c.other||"";return"string"!=typeof r?(n.onWarn?.("invalid_option_type",{path:l,key:e,type:typeof r}),""):r.includes("{{")?o(r,t,n):r}case"plural":{let e="number"==typeof m?m:n.coerceNumbers?Number(m):NaN;if(!Number.isFinite(e)){const e=c.other??"";return"string"!=typeof e?(n.onWarn?.("invalid_option_type",{path:l,key:"other",type:typeof e}),""):e.includes("{{")?o(e,t,n):e}const i=c[`=${e}`];if(i)return"string"!=typeof i?(n.onWarn?.("invalid_option_type",{path:l,key:`=${e}`,type:typeof i}),""):i.includes("{{")?o(i,t,n):i;const a=r.cardinal.select(e),s=c[a]??c.other??"";return"string"!=typeof s?(n.onWarn?.("invalid_option_type",{path:l,key:a,type:typeof s}),""):s.includes("{{")?o(s,t,n):s}case"ordinal":{let e="number"==typeof m?m:n.coerceNumbers?Number(m):NaN;if(!Number.isFinite(e)){const e=c.other??"";return"string"!=typeof e?(n.onWarn?.("invalid_option_type",{path:l,key:"other",type:typeof e}),""):e.includes("{{")?o(e,t,n):e}const i=r.ordinal.select(e),a=c[i]??c.other??"";return"string"!=typeof a?(n.onWarn?.("invalid_option_type",{path:l,key:i,type:typeof a}),""):a.includes("{{")?o(a,t,n):a}default:return n.onWarn?.("bad_format",{format:u}),""}}return{register(e,r,n){t[r]??={},t[r][e]={...t[r][e]||{},...n}},t(e,r={},n={}){const i=l(n),{lang:o,ns:a="default"}=i;if(!o)throw new Error("i18n: lang is required.");let s=function(e,r,n,l){const i=l.includeBase&&e?.includes("-")?e.split("-")[0]:e,o=[...new Set([e,l.includeBase?i:null,...l.fallbacks].filter(Boolean))];for(const e of o){const l=t[e]?.[r]?.[n];if(null!=l)return l}return null}(o,a,e,i);if(null==s&&i.onMissingKey&&(s=i.onMissingKey(e,{lang:o,ns:a})??null),null==s){if("placeholder"===i.missing)return i.placeholder(e);if("throw"===i.missing)throw new Error(`i18n: missing key "${e}" for ${o}/${a}`);return""}return this.renderMessage(s,r,i)},renderMessage(e,t={},n={}){const i=l(n),{lang:o}=i;if(!o)throw new Error("i18n: lang is required.");return s(e,t,function(e){if(r[e])return r[e];const t={short:new Intl.DateTimeFormat(e,{dateStyle:"short"}),medium:new Intl.DateTimeFormat(e,{dateStyle:"medium"}),long:new Intl.DateTimeFormat(e,{dateStyle:"long"}),full:new Intl.DateTimeFormat(e,{dateStyle:"full"})},n={short:new Intl.DateTimeFormat(e,{timeStyle:"short"}),medium:new Intl.DateTimeFormat(e,{timeStyle:"medium"}),long:new Intl.DateTimeFormat(e,{timeStyle:"long"}),full:new Intl.DateTimeFormat(e,{timeStyle:"full"})},l=Object.create(null),i={locale:e,numberDefault:new Intl.NumberFormat(e),numberInt:new Intl.NumberFormat(e,{maximumFractionDigits:0}),numberPct:new Intl.NumberFormat(e,{style:"percent"}),currency:(t,r)=>r&&Object.keys(r).length?new Intl.NumberFormat(e,{style:"currency",currency:t,...r}):l[t]??=new Intl.NumberFormat(e,{style:"currency",currency:t}),date:t,time:n,cardinal:new Intl.PluralRules(e),ordinal:new Intl.PluralRules(e,{type:"ordinal"})};return r[e]=i,i}(o),i)},_catalogs:t,_fmtCache:r}}export{e as createI18n};
1
+ function e(e,n){return e-=441,t()[e]}function t(){const e=["643854ezXjTp","currencyDefault","8aaFFuk","throw","default","671315pmVyzS","missing","renderMessage","5677227VKWcjm","3868600hEJGRZ","locale","type","ordinal","930139xWSsat","placeholder","i18n: lang is required.","currency","date","12mOEhhE","string","integer","numberInt","medium","numberPct","join","160934IBNINY","create","percent","NumberFormat","length","onWarn","split","select","trim","coerceNumbers","filter","full",'i18n: missing "',"replace","USD","keys","bad_format","isArray","4076541BGNjDG","includeBase","warnOnMissingOther","PluralRules","format","includes","long","short","missing_other","isFinite","switch","invalid_option_type","replaceAll","var","time","reduce","DateTimeFormat","other","onMissingVar","plural","raw","style","number"];return(t=function(){return e})()}function n(t={}){const n=e,r={},l={},i={includeBase:!0,fallbacks:[],missing:"placeholder",placeholder:e=>"#"+e+"#",coerceNumbers:!0,currencyDefault:n(497),warnOnMissingOther:!1,onWarn:null,onMissingKey:null,onMissingVar:null},o=e=>({...i,...t,...e}),s=(e,t)=>t.split(".")[n(450)]((e,t)=>e?.[t],e);function a(e,t,r){const l=n;return(e=(e=e[l(496)](/{{{{/g,"")[l(496)](/}}}}/g,""))[l(496)](/{{\s*([^{}]+?)\s*}}/g,(e,n)=>{const i=l,o=n[i(491)](),a=r[i(453)]?.(o,t);if(null!=a)return String(a);const u=s(t,o);if(null==u){if(r[i(464)]===i(472))return r.placeholder(o);if(r[i(464)]===i(461))throw new Error(i(495)+o+'"');return""}return String(u)}))[l(447)]("","{{")[l(447)]("","}}")}const u=e=>!e||0===Object[n(498)](e)[n(487)];function c(e,t,r,l){const i=n;if(null==e)return"";if("string"==typeof e)return e[i(506)]("{{")?a(e,t,l):e;if(Array[i(500)](e))return e.map(e=>c(e,t,r,l))[i(482)]("");if(!(i(448)in e))return l[i(488)]?.("bad_segment",{node:e}),"";const{var:o,format:y,options:p={}}=e,f=s(t??{},o),m=(e=>{const t=n;if(!e)return{type:"raw"};const[r,l]=String(e)[t(489)](":");return r===t(474)?{type:t(457),style:t(474),currency:l}:r===t(485)?{type:"number",style:t(485)}:r===t(457)?{type:t(457),style:l||t(462)}:r===t(475)?{type:"date",style:l||t(480)}:r===t(449)?{type:t(449),style:l||t(442)}:r===t(490)||r===t(445)?{type:t(490)}:"plural"===r?{type:"plural"}:"ordinal"===r?{type:t(470)}:{type:t(455)}})(y);switch(l[i(503)]&&("select"===m.type||m[i(469)]===i(454)||"ordinal"===m[i(469)])&&!(i(452)in p)&&l[i(488)]?.(i(443),{path:o,lang:r[i(468)]}),m[i(469)]){case"raw":if(null==f){if(l[i(464)]===i(461))throw new Error('i18n: missing "'+o+'"');return l[i(464)]===i(472)?l[i(472)](o):""}return String(f);case i(457):if(m[i(456)]===i(478))return r[i(479)][i(505)](f);if(m[i(456)]===i(485))return r[i(481)][i(505)](f);if(m[i(456)]===i(474)){const e=p.currency??m[i(474)]??t?.[i(474)]??l[i(459)];return r[i(474)](e,p)[i(505)](f)}return new(Intl[i(486)])(r[i(468)],p)[i(505)](f);case i(475):return u(p)?r.date[m[i(456)]][i(505)](f):new(Intl[i(451)])(r[i(468)],{dateStyle:m[i(456)],...p})[i(505)](f);case i(449):return u(p)?r[i(449)][m[i(456)]][i(505)](f):new(Intl[i(451)])(r.locale,{timeStyle:m[i(456)],...p})[i(505)](f);case"select":{const e=null==f?void 0:String(f),n=e&&p[e]||p.other||"";return typeof n!==i(477)?(l[i(488)]?.("invalid_option_type",{path:o,key:e,type:typeof n}),""):n.includes("{{")?a(n,t,l):n}case i(454):{let e="number"==typeof f?f:l[i(492)]?Number(f):NaN;if(!Number[i(444)](e)){const e=p.other??"";return typeof e!==i(477)?(l[i(488)]?.("invalid_option_type",{path:o,key:i(452),type:typeof e}),""):e[i(506)]("{{")?a(e,t,l):e}const n=p["="+e];if(n)return"string"!=typeof n?(l[i(488)]?.(i(446),{path:o,key:"="+e,type:typeof n}),""):n.includes("{{")?a(n,t,l):n;const s=r.cardinal[i(490)](e),u=p[s]??p.other??"";return typeof u!==i(477)?(l[i(488)]?.(i(446),{path:o,key:s,type:typeof u}),""):u.includes("{{")?a(u,t,l):u}case i(470):{let e=typeof f===i(457)?f:l.coerceNumbers?Number(f):NaN;if(!Number[i(444)](e)){const e=p[i(452)]??"";return typeof e!==i(477)?(l.onWarn?.(i(446),{path:o,key:"other",type:typeof e}),""):e[i(506)]("{{")?a(e,t,l):e}const n=r[i(470)][i(490)](e),s=p[n]??p[i(452)]??"";return typeof s!==i(477)?(l[i(488)]?.(i(446),{path:o,key:n,type:typeof s}),""):s[i(506)]("{{")?a(s,t,l):s}default:return l[i(488)]?.(i(499),{format:y}),""}}return{register(e,t,n){r[t]??={},r[t][e]={...r[t][e]||{},...n}},t(e,t={},l={}){const i=n,s=o(l),{lang:a,ns:u="default"}=s;if(!a)throw new Error(i(473));let c=function(e,t,l,i){const o=n,s=i[o(502)]&&e?.[o(506)]("-")?e[o(489)]("-")[0]:e,a=[...new Set([e,i[o(502)]?s:null,...i.fallbacks][o(493)](Boolean))];for(const e of a){const n=r[e]?.[t]?.[l];if(null!=n)return n}return null}(a,u,e,s);if(null==c&&s.onMissingKey&&(c=s.onMissingKey(e,{lang:a,ns:u})??null),null==c){if("placeholder"===s[i(464)])return s[i(472)](e);if("throw"===s[i(464)])throw new Error('i18n: missing key "'+e+'" for '+a+"/"+u);return""}return this[i(465)](c,t,s)},renderMessage(e,t={},r={}){const i=n,s=o(r),{lang:a}=s;if(!a)throw new Error(i(473));return c(e,t,function(e){const t=n;if(l[e])return l[e];const r={short:new(Intl[t(451)])(e,{dateStyle:t(442)}),medium:new(Intl[t(451)])(e,{dateStyle:"medium"}),long:new(Intl[t(451)])(e,{dateStyle:t(441)}),full:new Intl.DateTimeFormat(e,{dateStyle:t(494)})},i={short:new(Intl[t(451)])(e,{timeStyle:"short"}),medium:new(Intl[t(451)])(e,{timeStyle:t(480)}),long:new(Intl[t(451)])(e,{timeStyle:"long"}),full:new Intl.DateTimeFormat(e,{timeStyle:t(494)})},o=Object[t(484)](null),s={locale:e,numberDefault:new(Intl[t(486)])(e),numberInt:new Intl.NumberFormat(e,{maximumFractionDigits:0}),numberPct:new(Intl[t(486)])(e,{style:"percent"}),currency:(n,r)=>{const l=t;return r&&Object[l(498)](r)[l(487)]?new(Intl[l(486)])(e,{style:l(474),currency:n,...r}):o[n]??=new(Intl[l(486)])(e,{style:l(474),currency:n})},date:r,time:i,cardinal:new(Intl[t(504)])(e),ordinal:new Intl.PluralRules(e,{type:"ordinal"})};return l[e]=s,s}(a),s)},_catalogs:r,_fmtCache:l}}!function(){const n=e,r=t();for(;;)try{if(587045==parseInt(n(471))/1+-parseInt(n(483))/2+parseInt(n(458))/3*(-parseInt(n(460))/4)+parseInt(n(463))/5*(-parseInt(n(476))/6)+parseInt(n(501))/7+parseInt(n(467))/8+-parseInt(n(466))/9)break;r.push(r.shift())}catch(e){r.push(r.shift())}}();export{n as createI18n};
@@ -1 +1 @@
1
- import e from"../core/ok-overlay.ok.js";import t from"../core/ok-layer-service.ok.js";import o from"./ok-dismiss-service.ok.js";var n={tag:"ok-contextmenu",dependencies:[e,t,o],register(e,t){let o=null;e.shared.contextmenu=e.proxy({visible:!1,x:0,y:0,zIndex:3200,options:null,async show(n){this.visible&&await this.close();const r=e.shared.layer,s=n.anchor||n.target?.currentTarget||n.target?.target||n.target;this.zIndex=r?.resolveLocalZ?.(n.layer??"contextmenu")??3200,await r.toggle("ok-contextmenu",!0,{registration:t,layer:n.layer??"contextmenu",owner:s}),this.x=n.target.clientX,this.y=n.target.clientY,this.options=n,this.visible=!0,o?.stop(),o=e.shared.dismiss.register({surfaces:()=>document.querySelector("ok-contextmenu"),outsideAction:"close",onDismiss:()=>{e.shared.contextmenu.close()}}),document.addEventListener("wheel",this.swallowScroll,{passive:!1})},swallowScroll(e){e.preventDefault(),e.stopPropagation()},async close(){this.visible=!1,this.template="",this.context={},this.x=0,this.y=0,this.zIndex=e.shared.layer?.resolveLocalZ("contextmenu")??3200,this.nodes=[],this.options?.close?.(),o?.stop(),o=null,document.removeEventListener("wheel",this.swallowScroll),await e.shared.layer.toggle("ok-contextmenu",!1)},async passthroughContextmenu(t){t.stopPropagation();const{clientX:o,clientY:n}=t,r=t.target,s=(document.elementsFromPoint(o,n)||[]).find(e=>!r||!r.contains(e));if(s){await this.close(),await e.awaitFrame();const o=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,composed:!0,clientX:t.clientX,clientY:t.clientY,screenX:t.screenX,screenY:t.screenY,button:t.button,buttons:t.buttons,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,pointerId:t.pointerId,pointerType:t.pointerType,isPrimary:t.isPrimary,pressure:t.pressure,tiltX:t.tiltX,tiltY:t.tiltY,view:window});o._okPassthrough=!0,s.dispatchEvent(o)}}})},context(e){const t=e.$ok.shared.contextmenu;return e.$watch(()=>t.zIndex,t=>{e.$el.style.zIndex=String(t||e.$ok.shared.layer?.resolveLocalZ("contextmenu")||3200)}),e.$ok.shared.contextmenu},template:'<if :="visible"><ok-overlay :style="{ \'--ok-overlay_bg\': \'var(--ok-contextmenu_overlay-bg)\', \'--ok-overlay_z\': \'var(--ok-contextmenu_overlay-z)\'}" @request-close="close" @contextmenu="passthroughContextmenu"><div class="ok-contextmenu" role="menu" :style="{ left: x + \'px\', top: y + \'px\' }" @contextmenu="()=>{}"><fragment :nodes="$ok.createNodes(options.template)" :context="options.context || {}"/></div></ok-overlay></if>',style:"[tag]{position:fixed;inset:0;z-index:var(--ok-contextmenu_z, 3200);pointer-events:auto;--ok-overlay_bg:var(--ok-contextmenu_overlay-bg, transparent)}.ok-contextmenu{position:fixed;left:0;top:0;min-width:max-content;max-width:90vw;max-height:80vh;overflow:auto;border:var(--ok-contextmenu_border, 0);border-radius:var(--ok-contextmenu_radius, 0);box-shadow:var(--ok-contextmenu_shadow)}",plugins:{theme:{expose:{"--ok-contextmenu_overlay-bg":{default:"transparent",type:"color",category:"Overlay",description:"Backdrop bg"},"--ok-contextmenu_border":{type:"border",category:"Overlay"},"--ok-contextmenu_radius":{type:"length",category:"Overlay"},"--ok-contextmenu_shadow":{default:"var(--ok_shadow)",type:"box-shadow",category:"Overlay"},"--ok-contextmenu_z":{type:"number",category:"Layout",description:"z-index token"}}}}};export{n as default};
1
+ import e from"../core/ok-overlay.ok.js";import t from"../core/ok-layer-service.ok.js";import o from"./ok-dismiss-service.ok.js";const n=s;function s(e,t){return e-=239,r()[e]}function r(){const e=["style","isPrimary","querySelector","context","close","var(--ok_shadow)","$watch","Layout","10895660fGXCrb","screenX","layer","117099wWYRtZ","$el","target",'<if :="visible"><ok-overlay :style="{ \'--ok-overlay_bg\': \'var(--ok-contextmenu_overlay-bg)\', \'--ok-overlay_z\': \'var(--ok-contextmenu_overlay-z)\'}" @request-close="close" @contextmenu="passthroughContextmenu"><div class="ok-contextmenu" role="menu" :style="{ left: x + \'px\', top: y + \'px\' }" @contextmenu="()=>{}"><fragment :nodes="$ok.createNodes(options.template)" :context="options.context || {}"/></div></ok-overlay></if>',"Overlay","nodes","preventDefault","11LtAWQB","178278EHYeHD","ok-contextmenu","ctrlKey","1848216FMUvbh","visible","stopPropagation","transparent","contains","dismiss","swallowScroll","71156aGKnbi","Backdrop bg","resolveLocalZ","stop","addEventListener","clientY","color","pointerType","proxy","dispatchEvent","metaKey","buttons","3361204VoZTJL","[tag]{position:fixed;inset:0;z-index:var(--ok-contextmenu_z, 3200);pointer-events:auto;--ok-overlay_bg:var(--ok-contextmenu_overlay-bg, transparent)}.ok-contextmenu{position:fixed;left:0;top:0;min-width:max-content;max-width:90vw;max-height:80vh;overflow:auto;border:var(--ok-contextmenu_border, 0);border-radius:var(--ok-contextmenu_radius, 0);box-shadow:var(--ok-contextmenu_shadow)}","_okPassthrough","25uNSxZU","register","tiltX","zIndex","pointerId","border","clientX","shared","wheel","951411iUtPCf","296dSgLyf","$ok","currentTarget","contextmenu","tiltY","options","number","altKey","pressure"];return(r=function(){return e})()}!function(){const e=s,t=r();for(;;)try{if(367255==parseInt(e(256))/1*(-parseInt(e(267))/2)+parseInt(e(291))/3+parseInt(e(260))/4+parseInt(e(282))/5*(-parseInt(e(257))/6)+-parseInt(e(279))/7+parseInt(e(292))/8*(-parseInt(e(249))/9)+parseInt(e(246))/10)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();var a={tag:"ok-contextmenu",dependencies:[e,t,o],register(e,t){const o=s;let n=null;e.shared.contextmenu=e[o(275)]({visible:!1,x:0,y:0,zIndex:3200,options:null,async show(s){const r=o;this[r(261)]&&await this.close();const a=e.shared[r(248)],i=s.anchor||s[r(251)]?.[r(294)]||s[r(251)]?.[r(251)]||s[r(251)];this[r(285)]=a?.resolveLocalZ?.(s[r(248)]??r(295))??3200,await a.toggle(r(258),!0,{registration:t,layer:s[r(248)]??"contextmenu",owner:i}),this.x=s[r(251)][r(288)],this.y=s[r(251)][r(272)],this.options=s,this.visible=!0,n?.stop(),n=e[r(289)][r(265)][r(283)]({surfaces:()=>document[r(240)](r(258)),outsideAction:r(242),onDismiss:()=>{const t=r;e[t(289)].contextmenu[t(242)]()}}),document[r(271)](r(290),this[r(266)],{passive:!1})},swallowScroll(e){e[o(255)](),e.stopPropagation()},async close(){const t=o;this[t(261)]=!1,this.template="",this[t(241)]={},this.x=0,this.y=0,this[t(285)]=e[t(289)].layer?.[t(269)]("contextmenu")??3200,this[t(254)]=[],this[t(297)]?.close?.(),n?.[t(270)](),n=null,document.removeEventListener("wheel",this.swallowScroll),await e[t(289)][t(248)].toggle(t(258),!1)},async passthroughContextmenu(t){const n=o;t[n(262)]();const{clientX:s,clientY:r}=t,a=t[n(251)],i=(document.elementsFromPoint(s,r)||[]).find(e=>!a||!a[n(264)](e));if(i){await this.close(),await e.awaitFrame();const o=new MouseEvent(n(295),{bubbles:!0,cancelable:!0,composed:!0,clientX:t[n(288)],clientY:t[n(272)],screenX:t[n(247)],screenY:t.screenY,button:t.button,buttons:t[n(278)],ctrlKey:t[n(259)],shiftKey:t.shiftKey,altKey:t[n(299)],metaKey:t[n(277)],pointerId:t[n(286)],pointerType:t[n(274)],isPrimary:t[n(239)],pressure:t[n(300)],tiltX:t[n(284)],tiltY:t[n(296)],view:window});o[n(281)]=!0,i[n(276)](o)}}})},context(e){const t=s,o=e[t(293)][t(289)][t(295)];return e[t(244)](()=>o[t(285)],o=>{const n=t;e[n(250)][n(301)][n(285)]=String(o||e[n(293)][n(289)][n(248)]?.[n(269)](n(295))||3200)}),e[t(293)][t(289)].contextmenu},template:n(252),style:n(280),plugins:{theme:{expose:{"--ok-contextmenu_overlay-bg":{default:n(263),type:n(273),category:"Overlay",description:n(268)},"--ok-contextmenu_border":{type:n(287),category:"Overlay"},"--ok-contextmenu_radius":{type:"length",category:n(253)},"--ok-contextmenu_shadow":{default:n(243),type:"box-shadow",category:n(253)},"--ok-contextmenu_z":{type:n(298),category:n(245),description:"z-index token"}}}}};export{a as default};
@@ -1 +1 @@
1
- var e={tag:"ok-dismiss-service",register(e){if(e.shared.dismiss?.__okDismissService)return;const n=[];let t=!1,s=null;const o=e=>{const n="function"==typeof e?e():e;return null==n?[]:Array.isArray(n)?n:[n]},i=(e,n)=>{const t=(s=e)?s instanceof Element?s:s.currentTarget instanceof Element?s.currentTarget:s.target instanceof Element?s.target:null:null;var s;return!!t&&!!n&&(t===n||t.contains?.(n))},r=(e,n=void 0)=>("function"==typeof e?e():e)??n,c=e=>{e.preventDefault?.(),e.stopPropagation?.(),e.stopImmediatePropagation?.()},l=()=>{for(let e=n.length-1;e>=0;e--)!1===n[e].active&&n.splice(e,1);f()},a=(e,n)=>{const t=(e=>e.composedPath?.()[0]??e.target)(n);return o(e.surfaces).some(e=>i(e,t))||o(e.anchors).some(e=>i(e,t))||i(e.owner,t)},u=e=>{l();for(let t=n.length-1;t>=0;t--){const o=n[t];if(!1===o.active||!1===r(o.enabled,!0))continue;if(a(o,e))return;const i=r(o.outsideAction,"close");if("pass-through"!==i&&"click-through"!==i){if("close"===i){const n=o.onDismiss?.(e,o);if(!1===n)return}return o.swallowing=!0,s=o,void c(e)}}},d=e=>{const t=s??n.find(e=>e.swallowing);t&&(c(e),"click"===e.type&&(t.swallowing=!1,s=null,f()))};function f(){const e=!!s||n.some(e=>!1!==e.active);if(e===t)return;const o=e?"addEventListener":"removeEventListener";document[o]("pointerdown",u,!0),document[o]("mousedown",u,!0),document[o]("pointerup",d,!0),document[o]("mouseup",d,!0),document[o]("click",d,!0),t=e}e.shared.dismiss=e.proxy({__okDismissService:!0,register(e={}){const t={active:!0,swallowing:!1,owner:e.owner??null,surfaces:e.surfaces??e.surface??null,anchors:e.anchors??e.anchor??null,outsideAction:e.outsideAction??"close",enabled:e.enabled??!0,onDismiss:e.onDismiss??null};return n.push(t),f(),{get entry(){return t},update(e={}){Object.assign(t,e)},bringToFront(){const e=n.indexOf(t);-1!==e&&n.splice(e,1),n.push(t)},stop(){t.active=!1;const e=n.indexOf(t);-1!==e&&n.splice(e,1),f()}}},dispose(){n.splice(0),s=null,f()},get stack(){return l(),n.slice()}})}};export{e as default};
1
+ !function(){const n=t,s=e();for(;;)try{if(653865==parseInt(n(161))/1*(-parseInt(n(128))/2)+parseInt(n(141))/3+-parseInt(n(150))/4*(parseInt(n(120))/5)+parseInt(n(129))/6+-parseInt(n(134))/7+parseInt(n(138))/8*(parseInt(n(145))/9)+parseInt(n(139))/10)break;s.push(s.shift())}catch(n){s.push(s.shift())}}();var n={tag:"ok-dismiss-service",register(n){const e=t;if(n[e(162)][e(143)]?.[e(126)])return;const s=[];let o=!1,r=null;const i=n=>{const t=e,s=typeof n===t(156)?n():n;return null==s?[]:Array[t(131)](s)?s:[s]},c=(n,t)=>{const s=e,o=(n=>{const t=e;return n?n instanceof Element?n:n[t(146)]instanceof Element?n[t(146)]:n[t(160)]instanceof Element?n.target:null:null})(n);return!!o&&!!t&&(o===t||o[s(153)]?.(t))},u=(n,t=void 0)=>("function"==typeof n?n():n)??t,a=n=>{const t=e;n[t(140)]?.(),n[t(125)]?.(),n[t(136)]?.()},l=()=>{const n=e;for(let t=s[n(116)]-1;t>=0;t--)!1===s[t][n(154)]&&s[n(142)](t,1);m()},p=(n,t)=>{const s=e,o=(r=t,r[e(127)]?.()[0]??r[e(160)]);var r;return i(n[s(132)])[s(147)](n=>c(n,o))||i(n[s(124)]).some(n=>c(n,o))||c(n[s(159)],o)},f=n=>{const t=e;l();for(let e=s[t(116)]-1;e>=0;e--){const o=s[e];if(!1===o[t(154)]||!1===u(o.enabled,!0))continue;if(p(o,n))return;const i=u(o[t(148)],t(155));if(i!==t(157)&&i!==t(151)){if(i===t(155)){const t=o.onDismiss?.(n,o);if(!1===t)return}return o[t(133)]=!0,r=o,void a(n)}}},d=n=>{const t=e,o=r??s[t(144)](n=>n[t(133)]);o&&(a(n),"click"===n[t(152)]&&(o[t(133)]=!1,r=null,m()))};function m(){const n=e,t=!!r||s[n(147)](t=>!1!==t[n(154)]);if(t===o)return;const i=t?n(137):"removeEventListener";document[i](n(118),f,!0),document[i](n(119),f,!0),document[i](n(121),d,!0),document[i]("mouseup",d,!0),document[i](n(158),d,!0),o=t}n[e(162)].dismiss=n.proxy({__okDismissService:!0,register(n={}){const t=e,o={active:!0,swallowing:!1,owner:n[t(159)]??null,surfaces:n[t(132)]??n[t(130)]??null,anchors:n[t(124)]??n.anchor??null,outsideAction:n[t(148)]??t(155),enabled:n[t(117)]??!0,onDismiss:n[t(115)]??null};return s.push(o),m(),{get entry(){return o},update(n={}){Object[t(149)](o,n)},bringToFront(){const n=t,e=s.indexOf(o);-1!==e&&s[n(142)](e,1),s[n(123)](o)},stop(){const n=t;o[n(154)]=!1;const e=s[n(122)](o);-1!==e&&s.splice(e,1),m()}}},dispose(){s[e(142)](0),r=null,m()},get stack(){const n=e;return l(),s[n(135)]()}})}};function t(n,t){return n-=115,e()[n]}function e(){const n=["close","function","pass-through","click","owner","target","1034819AYAiJh","shared","onDismiss","length","enabled","pointerdown","mousedown","60CZMjGc","pointerup","indexOf","push","anchors","stopPropagation","__okDismissService","composedPath","2bxSztL","4008924TryDTh","surface","isArray","surfaces","swallowing","6151964HDpFIo","slice","stopImmediatePropagation","addEventListener","384OlMZkk","17421810HJUwrw","preventDefault","3037647usrZNx","splice","dismiss","find","84033kbmVKD","currentTarget","some","outsideAction","assign","434508FCAfqr","click-through","type","contains","active"];return(e=function(){return n})()}export{n as default};
@@ -1 +1 @@
1
- var e={tag:"ok-draggable",template:"<slot/>",attr:{handle:{default:"[data-drag-handle]"},noDrag:{empty:!1}},style:"[tag]{display:contents}",context:e=>({isDragging:!1,initialX:0,initialY:0,offsetX:0,offsetY:0,draggableElement:null,onDragStart(t){if(e.$attr.noDrag||0!==t.button)return;if(t.preventDefault(),this.draggableElement=e.$el.firstElementChild,!this.draggableElement)return;this.isDragging=!0,this.initialX=t.clientX,this.initialY=t.clientY;const n=this.draggableElement.getBoundingClientRect();this.offsetX=n.left,this.offsetY=n.top;const a=e.$el.querySelector(e.$attr.handle)||e.$el.firstElementChild;a&&(a.style.cursor="grabbing"),this.draggableElement.style.position="fixed",this.draggableElement.style.margin="0",this.draggableElement.style.boxSizing="border-box",this.draggableElement.style.width=`${n.width}px`,this.draggableElement.style.left=`${this.offsetX}px`,this.draggableElement.style.top=`${this.offsetY}px`,this.draggableElement.style.transform="none",document.addEventListener("mousemove",e.$cache.onDragMove),document.addEventListener("mouseup",e.$cache.onDragEnd)},onDragMove(e){if(!this.isDragging)return;const t=e.clientX-(this.initialX-this.offsetX),n=e.clientY-(this.initialY-this.offsetY);this.draggableElement.style.left=`${t}px`,this.draggableElement.style.top=`${n}px`},onDragEnd(){this.isDragging=!1;const t=e.$el.querySelector(e.$attr.handle)||e.$el.firstElementChild;t&&(t.style.cursor="grab"),document.removeEventListener("mousemove",e.$cache.onDragMove),document.removeEventListener("mouseup",e.$cache.onDragEnd),this.draggableElement=null}}),mounted(e){e.$cache.onDragStart=this.onDragStart.bind(this),e.$cache.onDragMove=this.onDragMove.bind(this),e.$cache.onDragEnd=this.onDragEnd.bind(this);const t=e.$el.querySelector(e.$attr.handle)||e.$el.firstElementChild;t&&(t.style.cursor="grab",t.addEventListener("mousedown",e.$cache.onDragStart))},unmounted(e){const t=e.$el.querySelector(e.$attr.handle)||e.$el.firstElementChild;t&&t.removeEventListener("mousedown",e.$cache.onDragStart),document.removeEventListener("mousemove",e.$cache.onDragMove),document.removeEventListener("mouseup",e.$cache.onDragEnd)}};export{e as default};
1
+ function t(t,n){return t-=317,e()[t]}function e(){const t=["style","<slot/>","draggableElement","onDragStart","14194950hTOpre","querySelector","729082AcImQY","boxSizing","$cache","$attr","removeEventListener","margin","bind","cursor","grabbing","10mQIddo","onDragMove","3335632tidtGk","fixed","left","clientX","clientY","top","border-box","12czzzTR","initialX","isDragging","2515233RjYTLH","$el","getBoundingClientRect","[tag]{display:contents}","position","width","firstElementChild","noDrag","mousemove","grab","transform","[data-drag-handle]","2498328GGfDfQ","button","none","initialY","handle","preventDefault","addEventListener","ok-draggable","mouseup","616893CfiKvI","offsetY","15VExOJO","onDragEnd","offsetX","1uRUTSG","524540iqDcfm"];return(e=function(){return t})()}const n=t;!function(){const n=t,i=e();for(;;)try{if(476679==parseInt(n(319))/1*(parseInt(n(327))/2)+-parseInt(n(369))/3+-parseInt(n(320))/4*(parseInt(n(371))/5)+parseInt(n(345))/6*(-parseInt(n(348))/7)+parseInt(n(338))/8+parseInt(n(360))/9*(-parseInt(n(336))/10)+parseInt(n(325))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var i={tag:n(367),template:n(322),attr:{handle:{default:n(359)},noDrag:{empty:!1}},style:n(351),context:e=>({isDragging:!1,initialX:0,initialY:0,offsetX:0,offsetY:0,draggableElement:null,onDragStart(n){const i=t;if(e[i(330)][i(355)]||0!==n[i(361)])return;if(n[i(365)](),this[i(323)]=e[i(349)].firstElementChild,!this.draggableElement)return;this[i(347)]=!0,this[i(346)]=n[i(341)],this[i(363)]=n[i(342)];const s=this[i(323)][i(350)]();this[i(318)]=s[i(340)],this[i(370)]=s[i(343)];const r=e[i(349)][i(326)](e[i(330)].handle)||e[i(349)].firstElementChild;r&&(r[i(321)][i(334)]=i(335)),this[i(323)].style[i(352)]=i(339),this[i(323)].style[i(332)]="0",this[i(323)][i(321)][i(328)]=i(344),this.draggableElement[i(321)][i(353)]=s[i(353)]+"px",this[i(323)].style[i(340)]=this[i(318)]+"px",this.draggableElement[i(321)][i(343)]=this[i(370)]+"px",this[i(323)][i(321)][i(358)]=i(362),document.addEventListener(i(356),e.$cache[i(337)]),document[i(366)](i(368),e[i(329)][i(317)])},onDragMove(e){const n=t;if(!this.isDragging)return;const i=e.clientX-(this[n(346)]-this[n(318)]),s=e[n(342)]-(this[n(363)]-this[n(370)]);this[n(323)][n(321)][n(340)]=i+"px",this[n(323)][n(321)][n(343)]=s+"px"},onDragEnd(){const n=t;this.isDragging=!1;const i=e[n(349)][n(326)](e.$attr[n(364)])||e[n(349)][n(354)];i&&(i[n(321)][n(334)]=n(357)),document[n(331)](n(356),e[n(329)][n(337)]),document[n(331)](n(368),e[n(329)][n(317)]),this[n(323)]=null}}),mounted(t){const e=n;t.$cache[e(324)]=this.onDragStart[e(333)](this),t[e(329)][e(337)]=this[e(337)][e(333)](this),t[e(329)][e(317)]=this.onDragEnd.bind(this);const i=t[e(349)][e(326)](t[e(330)][e(364)])||t[e(349)].firstElementChild;i&&(i.style[e(334)]=e(357),i[e(366)]("mousedown",t[e(329)][e(324)]))},unmounted(t){const e=n,i=t[e(349)][e(326)](t[e(330)][e(364)])||t[e(349)].firstElementChild;i&&i[e(331)]("mousedown",t[e(329)][e(324)]),document[e(331)](e(356),t[e(329)].onDragMove),document[e(331)](e(368),t[e(329)][e(317)])}};export{i as default};
@@ -1 +1 @@
1
- import t from"../core/ok-layer-service.ok.js";import e from"./ok-portal-service.ok.js";var r={tag:"ok-flyover-panel",dependencies:[t,e],attr:{anchor:{},placement:{default:"right-start"},gap:{default:0},portal:{default:!0,empty:!0},layer:{default:"flyover"}},context(t){let e=null,r=null,o=null,a=null,n=!1;const l=()=>t.$ok.shared.layer?.resolveLocalZ?.(t.$attr.layer)??2e3,i=()=>{const e=(o=t.$attr.anchor)?o instanceof MouseEvent?{left:o.clientX,right:o.clientX,top:o.clientY,bottom:o.clientY,width:0,height:0}:"x"in o&&"y"in o?{left:o.x,right:o.x,top:o.y,bottom:o.y,width:0,height:0}:o.getBoundingClientRect?o.getBoundingClientRect():null:null,r=t.$el;var o;if(!e||!r)return;const a=r.offsetWidth,n=r.offsetHeight;let i=0,s=0;t.$attr.placement.startsWith("right")?(i=e.right+t.$attr.gap,s=t.$attr.placement.endsWith("start")?e.top:e.bottom-n,i+a>innerWidth&&(i=e.left-t.$attr.gap-a)):(i=e.left,s=e.bottom+t.$attr.gap,s+n>innerHeight&&(s=e.top-t.$attr.gap-n));const d=((t,e,r,o)=>(t+r>innerWidth&&(t=Math.max(4,innerWidth-r-4)),e+o>innerHeight&&(e=Math.max(4,innerHeight-o-4)),{x:t,y:e}))(i,s,a,n);r.style.position="fixed",r.style.left=`${d.x}px`,r.style.top=`${d.y}px`,r.style.zIndex=String(l())},s=()=>{e?.disconnect(),e=null,r&&(window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r,!0),r=null),o&&(document.removeEventListener("ok-layer-owner-change",o),o=null),a&&(window.removeEventListener("pointermove",a),a=null)},d=async()=>{if(!1===t.$attr.portal)return t.$el.style.pointerEvents="auto",void(n=!1);const e=t.$ok.shared.portal;if(!e)return t.$el.style.pointerEvents="auto",void(n=!1);const r=t.$ok.shared.layer,o=l(),a=r?.ownerOf?.(t.$attr.anchor)?t.$attr.anchor:t.$el,i=r?await r.containerFor(a,t.$attr.layer):document.body;i&&!t.$__unmount__$&&(e.to(t.$el,i),t.$el.style.zIndex=String(o),t.$el.style.pointerEvents="auto",n=!0)},c=()=>{n&&(t.$ok.shared.portal?.back(t.$el),n=!1)};return t.$watch(()=>[t.$attr.anchor,t.$attr.placement,t.$attr.gap],i),t.$watch(()=>t.$attr.portal,async()=>{t.$__unmount__$||(!1===t.$attr.portal?c():(await d(),i()))}),{attachPortal:d,restorePortal:c,attachObservers:()=>{s(),e=new ResizeObserver(()=>i()),e.observe(document.documentElement),r=()=>i(),window.addEventListener("scroll",r,!0),window.addEventListener("resize",r,!0),o=e=>{const r=t.$el?.closest?.("[data-ok-layer-owner]");r&&e.target===r&&requestAnimationFrame(async()=>{await d(),i()})},document.addEventListener("ok-layer-owner-change",o);let n=!1;a=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1,i()}))},window.addEventListener("pointermove",a)},detachObservers:s,place:i}},mounted(t){t.$el.classList.add("ok-flyover"),t.$el.dispatchEvent(new CustomEvent("ok-flyover-panel-mounted",{bubbles:!0,detail:t.$el})),t.$ok.nextFrame(async()=>{t.$__unmount__$||(await this.attachPortal(),this.place(),this.attachObservers())})},unmounted(t){this.detachObservers(),this.restorePortal()},template:"<slot/>",style:"[tag]{position:fixed;background:var(--ok-flyover-bg, var(--ok_bg, #fff));color:var(--ok-flyover-color, var(--ok_fg, #111));border:var(--ok-flyover-border, 1px solid color-mix(in srgb, #000 10%, transparent));box-shadow:var(--ok-flyover-shadow, 0 6px 30px rgba(0,0,0,.15));border-radius:var(--ok-flyover-radius, 6px);min-width:160px}"};export{r as default};
1
+ import t from"../core/ok-layer-service.ok.js";import e from"./ok-portal-service.ok.js";const n=r;function r(t,e){return t-=154,a()[t]}!function(){const t=r,e=a();for(;;)try{if(738900==-parseInt(t(159))/1+-parseInt(t(204))/2*(parseInt(t(205))/3)+parseInt(t(175))/4*(-parseInt(t(177))/5)+parseInt(t(198))/6*(-parseInt(t(157))/7)+parseInt(t(211))/8+-parseInt(t(154))/9+parseInt(t(191))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();var o={tag:n(206),dependencies:[t,e],attr:{anchor:{},placement:{default:n(180)},gap:{default:0},portal:{default:!0,empty:!0},layer:{default:n(194)}},context(t){const e=n;let o=null,a=null,s=null,i=null,l=!1;const c=()=>{const e=r;return t[e(181)].shared.layer?.[e(199)]?.(t[e(210)].layer)??2e3},d=()=>{const e=r,n=(t=>{const e=r;return t?t instanceof MouseEvent?{left:t.clientX,right:t.clientX,top:t[e(168)],bottom:t[e(168)],width:0,height:0}:"x"in t&&"y"in t?{left:t.x,right:t.x,top:t.y,bottom:t.y,width:0,height:0}:t[e(182)]?t[e(182)]():null:null})(t[e(210)][e(179)]),o=t[e(197)];if(!n||!o)return;const a=o[e(207)],s=o.offsetHeight;let i=0,l=0;t.$attr[e(195)][e(171)](e(163))?(i=n[e(163)]+t[e(210)][e(188)],l=t[e(210)][e(195)].endsWith("start")?n[e(173)]:n[e(161)]-s,i+a>innerWidth&&(i=n[e(183)]-t.$attr[e(188)]-a)):(i=n.left,l=n[e(161)]+t[e(210)].gap,l+s>innerHeight&&(l=n[e(173)]-t[e(210)][e(188)]-s));const d=((t,e,n,o)=>{const a=r;return t+n>innerWidth&&(t=Math.max(4,innerWidth-n-4)),e+o>innerHeight&&(e=Math[a(186)](4,innerHeight-o-4)),{x:t,y:e}})(i,l,a,s);o[e(215)][e(214)]=e(170),o[e(215)][e(183)]=d.x+"px",o[e(215)][e(173)]=d.y+"px",o.style[e(213)]=String(c())},u=()=>{const t=r;o?.[t(201)](),o=null,a&&(window[t(156)](t(155),a,!0),window.removeEventListener("resize",a,!0),a=null),s&&(document[t(156)](t(174),s),s=null),i&&(window[t(156)]("pointermove",i),i=null)},p=async()=>{const e=r;if(!1===t[e(210)].portal)return t[e(197)][e(215)][e(203)]=e(208),void(l=!1);const n=t[e(181)][e(209)][e(158)];if(!n)return t[e(197)][e(215)].pointerEvents=e(208),void(l=!1);const o=t.$ok[e(209)][e(185)],a=c(),s=o?.[e(202)]?.(t[e(210)].anchor)?t[e(210)][e(179)]:t[e(197)],i=o?await o[e(167)](s,t.$attr[e(185)]):document[e(166)];i&&!t[e(172)]&&(n.to(t[e(197)],i),t[e(197)].style[e(213)]=String(a),t[e(197)][e(215)][e(203)]=e(208),l=!0)},h=()=>{const e=r;l&&(t[e(181)].shared[e(158)]?.back(t[e(197)]),l=!1)};return t[e(164)](()=>[t[e(210)][e(179)],t[e(210)].placement,t.$attr[e(188)]],d),t[e(164)](()=>t[e(210)].portal,async()=>{const n=e;t[n(172)]||(!1===t[n(210)][n(158)]?h():(await p(),d()))}),{attachPortal:p,restorePortal:h,attachObservers:()=>{const e=r;u(),o=new ResizeObserver(()=>d()),o[e(212)](document[e(196)]),a=()=>d(),window.addEventListener(e(155),a,!0),window[e(178)](e(187),a,!0),s=n=>{const r=e,o=t.$el?.[r(176)]?.(r(192));o&&n[r(200)]===o&&requestAnimationFrame(async()=>{await p(),d()})},document[e(178)]("ok-layer-owner-change",s);let n=!1;i=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1,d()}))},window[e(178)](e(169),i)},detachObservers:u,place:d}},mounted(t){const e=n;t[e(197)][e(190)][e(165)](e(160)),t[e(197)][e(162)](new CustomEvent("ok-flyover-panel-mounted",{bubbles:!0,detail:t[e(197)]})),t.$ok.nextFrame(async()=>{const n=e;t[n(172)]||(await this[n(193)](),this[n(184)](),this[n(189)]())})},unmounted(t){this.detachObservers(),this.restorePortal()},template:"<slot/>",style:"[tag]{position:fixed;background:var(--ok-flyover-bg, var(--ok_bg, #fff));color:var(--ok-flyover-color, var(--ok_fg, #111));border:var(--ok-flyover-border, 1px solid color-mix(in srgb, #000 10%, transparent));box-shadow:var(--ok-flyover-shadow, 0 6px 30px rgba(0,0,0,.15));border-radius:var(--ok-flyover-radius, 6px);min-width:160px}"};function a(){const t=["pointerEvents","2MIFWMn","2003676QRCMbd","ok-flyover-panel","offsetWidth","auto","shared","$attr","894688FORoZC","observe","zIndex","position","style","7502778NleYul","scroll","removeEventListener","63gXukFW","portal","1340427svoBgZ","ok-flyover","bottom","dispatchEvent","right","$watch","add","body","containerFor","clientY","pointermove","fixed","startsWith","$__unmount__$","top","ok-layer-owner-change","212ZRncQd","closest","24775OwUjzO","addEventListener","anchor","right-start","$ok","getBoundingClientRect","left","place","layer","max","resize","gap","attachObservers","classList","48264990amjfeV","[data-ok-layer-owner]","attachPortal","flyover","placement","documentElement","$el","729906KyMplk","resolveLocalZ","target","disconnect","ownerOf"];return(a=function(){return t})()}export{o as default};
@@ -1 +1 @@
1
- import e from"../core/ok-layer-service.ok.js";import o from"./ok-dismiss-service.ok.js";import t from"./ok-portal-service.ok.js";import r from"./ok-flyover-panel.ok.js";var a={tag:"ok-flyover",dependencies:[e,t,o,r],attr:{open:{default:!1},anchor:{},placement:{default:"right-start"},gap:{default:0},portal:{default:!0,empty:!0},outsideAction:{default:"pass-through"},layer:{default:"flyover"}},context(e){let o=null,t=null;const r=e=>{t=e.detail};e.$el.addEventListener("ok-flyover-panel-mounted",r);const a=()=>{o?.stop(),o=e.$ok.shared.dismiss?.register({owner:e.$el,surfaces:()=>t,anchors:()=>e.$attr.anchor instanceof MouseEvent?[]:[e.$attr.anchor],outsideAction:()=>e.$attr.outsideAction,enabled:()=>e.$attr.open,onDismiss(o){e.$attr.open=!1;const t={sourceEvent:o,reason:"outside"};e.$dispatch("request-close",t),e.$dispatch("close",t)}})};return e.$watch(()=>e.$attr.open,e=>{e?a():(t=null,o?.stop(),o=null)}),e.$attr.open&&a(),e.$ext("unmount",()=>{e.$el.removeEventListener("ok-flyover-panel-mounted",r),o?.stop(),o=null}),{}},template:'<if :="$props.open"><ok-flyover-panel :anchor="$props.anchor" :placement="$props.placement" :gap="$props.gap" :portal="$props.portal" :layer="$props.layer"><slot/></ok-flyover-panel></if>'};export{a as default};
1
+ import t from"../core/ok-layer-service.ok.js";import e from"./ok-dismiss-service.ok.js";import o from"./ok-portal-service.ok.js";import r from"./ok-flyover-panel.ok.js";const s=n;function n(t,e){return t-=313,p()[t]}!function(){const t=n,e=p();for(;;)try{if(935593==-parseInt(t(315))/1+parseInt(t(327))/2+parseInt(t(316))/3+parseInt(t(321))/4+parseInt(t(322))/5*(-parseInt(t(326))/6)+parseInt(t(325))/7+parseInt(t(338))/8*(-parseInt(t(337))/9))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();var a={tag:s(333),dependencies:[t,o,e,r],attr:{open:{default:!1},anchor:{},placement:{default:s(336)},gap:{default:0},portal:{default:!0,empty:!0},outsideAction:{default:"pass-through"},layer:{default:"flyover"}},context(t){const e=s;let o=null,r=null;const a=t=>{r=t[n(314)]};t[e(319)].addEventListener(e(328),a);const p=()=>{const s=e;o?.stop(),o=t[s(324)][s(331)].dismiss?.register({owner:t[s(319)],surfaces:()=>r,anchors:()=>t.$attr[s(335)]instanceof MouseEvent?[]:[t.$attr[s(335)]],outsideAction:()=>t.$attr[s(329)],enabled:()=>t[s(340)][s(334)],onDismiss(e){const o=s;t[o(340)][o(334)]=!1;const r={sourceEvent:e,reason:o(330)};t.$dispatch(o(332),r),t[o(313)](o(320),r)}})};return t[e(317)](()=>t[e(340)][e(334)],t=>{const s=e;t?p():(r=null,o?.[s(323)](),o=null)}),t.$attr[e(334)]&&p(),t.$ext(e(339),()=>{const r=e;t[r(319)][r(318)](r(328),a),o?.stop(),o=null}),{}},template:'<if :="$props.open"><ok-flyover-panel :anchor="$props.anchor" :placement="$props.placement" :gap="$props.gap" :portal="$props.portal" :layer="$props.layer"><slot/></ok-flyover-panel></if>'};function p(){const t=["3056jIPDSv","unmount","$attr","$dispatch","detail","1673803XdpmzZ","3761004cHnLhE","$watch","removeEventListener","$el","close","4230992ihQQHV","5aqxvTD","stop","$ok","7277606gExTEp","7859046Elyvao","1268498HauXcH","ok-flyover-panel-mounted","outsideAction","outside","shared","request-close","ok-flyover","open","anchor","right-start","1557XjXaDr"];return(p=function(){return t})()}export{a as default};
@@ -1 +1 @@
1
- import i from"../core/ok-layer-service.ok.js";import t from"./ok-highlight.ok.js";var e={tag:"ok-highlight-service",dependencies:[t,i],register(i,t){i.shared.highlight=i.proxy({highlights:[],async show(e,h={}){if(!(e instanceof Element))return;await i.shared.layer.toggle("ok-highlight-service",!0,{registration:t,layer:"highlight"});const s=e.getBoundingClientRect(),g={active:!0,target:e,mask:!!h.mask,persistent:!!h.persistent,duration:h.duration??1e3,speed:h.speed??300,animation:h.animation??"pulse",class:h.class??"default",onClick:h.onClick??null,top:s.top+window.scrollY,left:s.left+window.scrollX,width:s.width,height:s.height,close(){i.shared.highlight.hide(g)}};return this.highlights.push(g),g},async hide(t){if(!t)return;const e=this.highlights.indexOf(i.proxy(t));e>=0&&this.highlights.splice(e,1),this.highlights.length||await i.shared.layer.toggle("ok-highlight-service",!1)}})},context:i=>({highlights:i.$ok.shared.highlight.highlights}),template:'<each :="highlights" let:item><ok-highlight :options="item"/></each>',style:"[tag]{position:fixed;inset:0;z-index:var(--ok-z-highlight, 3500);pointer-events:none}"};export{e as default};
1
+ import t from"../core/ok-layer-service.ok.js";import i from"./ok-highlight.ok.js";const e=n;function n(t,i){return t-=462,s()[t]}function s(){const t=["pulse","588762OLUoiW","left","layer","highlight","scrollY","499683CbBcBF","highlights","687965xuuDfZ","12cFTsnT","length","1564563dHtANB","onClick","duration","$ok","top","height","mask","ok-highlight-service","speed","indexOf","shared","animation","210875MtIeLr","width","proxy","persistent","622334SnpDbw",'<each :="highlights" let:item><ok-highlight :options="item"/></each>',"6531200MzJESn","push","splice","class","toggle","scrollX"];return(s=function(){return t})()}!function(){const t=n,i=s();for(;;)try{if(262150==parseInt(t(492))/1+-parseInt(t(496))/2+-parseInt(t(475))/3+parseInt(t(478))/4*(-parseInt(t(477))/5)+-parseInt(t(470))/6+parseInt(t(480))/7+parseInt(t(463))/8)break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var h={tag:e(487),dependencies:[i,t],register(t,i){const n=e;t.shared.highlight=t[n(494)]({highlights:[],async show(e,s={}){const h=n;if(!(e instanceof Element))return;await t[h(490)].layer[h(467)](h(487),!0,{registration:i,layer:h(473)});const o=e.getBoundingClientRect(),r={active:!0,target:e,mask:!!s[h(486)],persistent:!!s[h(495)],duration:s[h(482)]??1e3,speed:s[h(488)]??300,animation:s[h(491)]??h(469),class:s[h(466)]??"default",onClick:s[h(481)]??null,top:o[h(484)]+window[h(474)],left:o[h(471)]+window[h(468)],width:o[h(493)],height:o[h(485)],close(){t[h(490)].highlight.hide(r)}};return this[h(476)][h(464)](r),r},async hide(i){const e=n;if(!i)return;const s=this.highlights[e(489)](t[e(494)](i));s>=0&&this[e(476)][e(465)](s,1),!this[e(476)][e(479)]&&await t[e(490)][e(472)].toggle(e(487),!1)}})},context(t){const i=e;return{highlights:t[i(483)][i(490)].highlight.highlights}},template:e(462),style:"[tag]{position:fixed;inset:0;z-index:var(--ok-z-highlight, 3500);pointer-events:none}"};export{h as default};
@@ -1 +1 @@
1
- var t={tag:"ok-highlight",attr:{options:{type:"any"}},context:t=>({get opts(){return t.$attr.options||{}},close(){t.opts?.onClick?.(),t.$ok.shared.highlight.hide(t.opts)},reset(){const e=t.$el,i=this.opts,{top:s,left:o,width:a,height:n,speed:p=300}=i;if(Object.assign(e.style,{left:"0px",top:"0px",width:window.innerWidth+"px",height:window.innerHeight+"px",transformOrigin:"center center",transition:`all ${p}ms ease`}),requestAnimationFrame(()=>{Object.assign(e.style,{left:`${o}px`,top:`${s}px`,width:`${a}px`,height:`${n}px`}),e.classList.add("shrink-in")}),i.persistent||setTimeout(()=>{e.classList.add("fade-out"),e.addEventListener("transitionend",()=>t.$destroy(),{once:!0})},i.duration??1e3),i.mask){const i=o+a,p=s+n,h=document.createElement("div");h.className="ok-highlight__mask",h.style.clipPath=`polygon(\n 0 0, 100vw 0, 100vw 100vh, 0 100vh,\n 0 ${s}px, ${o}px ${s}px, ${o}px ${p}px,\n ${i}px ${p}px, ${i}px ${s}px, 0 ${s}px\n )`,h.style.webkitClipPath=h.style.clipPath,h.addEventListener("click",t=>t.stopPropagation()),(t.$el.parentNode||document.body).appendChild(h),e._mask=h}}}),mounted(t){this.reset(),t.$el.addEventListener("click",this.close)},unmounted(t){t.$el._mask?.remove(),this.opts.close()},template:'<div class="ok-highlight" :class="[opts.class, opts.animation]"/>',style:"@keyframes ok-highlight-pulse{0%{box-shadow:0 0 0#0f0;opacity:.2}50%{box-shadow:0 0 10px #0f0;opacity:1}to{box-shadow:0 0 4px #0f0;opacity:.7}}.ok-highlight__mask,[tag]{position:fixed;pointer-events:auto}[tag]{border:2px solid var(--ok_fg-accent, #0f0);border-radius:6px;box-shadow:0 0 10px var(--ok_fg-accent, #0f0);z-index:1;transition:all 300ms ease}[tag].shrink-in{transition:all 500ms ease}[tag].fade-out{opacity:0;transition:opacity 300ms ease}.ok-highlight.pulse{animation:ok-highlight-pulse 1s ease-out}.ok-highlight__mask{inset:0;background:rgba(0,0,0,.6);z-index:0;clip-rule:evenodd;-webkit-clip-path:inherit;clip-path:inherit}",plugins:{theme:{let:{"--ok_fg-accent":"#0f0"}}}};export{t as default};
1
+ function t(t,s){return t-=467,e()[t]}function e(){const t=["any","body","32129260dTDMcQ","2177120SiyDaj","center center","onClick","1448253YVffDh","7895fNcTBP","hide","div","20mgTNHv","assign","reset","classList","ms ease","parentNode","_mask","click","@keyframes ok-highlight-pulse{0%{box-shadow:0 0 0#0f0;opacity:.2}50%{box-shadow:0 0 10px #0f0;opacity:1}to{box-shadow:0 0 4px #0f0;opacity:.7}}.ok-highlight__mask,[tag]{position:fixed;pointer-events:auto}[tag]{border:2px solid var(--ok_fg-accent, #0f0);border-radius:6px;box-shadow:0 0 10px var(--ok_fg-accent, #0f0);z-index:1;transition:all 300ms ease}[tag].shrink-in{transition:all 500ms ease}[tag].fade-out{opacity:0;transition:opacity 300ms ease}.ok-highlight.pulse{animation:ok-highlight-pulse 1s ease-out}.ok-highlight__mask{inset:0;background:rgba(0,0,0,.6);z-index:0;clip-rule:evenodd;-webkit-clip-path:inherit;clip-path:inherit}","#0f0","options","px, ","11SuHKeI","48PnZVHC","persistent","$ok","$destroy","style","mask","px ","all ","highlight","webkitClipPath","addEventListener","transitionend","812874LMqfCx","shared","1794eJpIrL","$el","remove","shrink-in","19029MvKxHF","createElement","0px","clipPath","px\n )","close","px,\n ","2036433tVWDpC","px, 0 ","add","opts"];return(e=function(){return t})()}const s=t;!function(){const s=t,i=e();for(;;)try{if(558907==-parseInt(s(487))/1+-parseInt(s(507))/2+parseInt(s(493))/3*(parseInt(s(514))/4)+-parseInt(s(511))/5*(-parseInt(s(489))/6)+-parseInt(s(500))/7+parseInt(s(475))/8*(-parseInt(s(510))/9)+-parseInt(s(506))/10*(-parseInt(s(474))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}();var i={tag:"ok-highlight",attr:{options:{type:s(504)}},context:e=>({get opts(){const s=t;return e.$attr[s(472)]||{}},close(){const s=t;e[s(503)]?.[s(509)]?.(),e[s(477)][s(488)][s(483)][s(512)](e.opts)},reset(){const s=t,i=e[s(490)],n=this[s(503)],{top:o,left:a,width:p,height:r,speed:h=300}=n;if(Object.assign(i[s(479)],{left:s(495),top:s(495),width:window.innerWidth+"px",height:window.innerHeight+"px",transformOrigin:s(508),transition:s(482)+h+s(518)}),requestAnimationFrame(()=>{const t=s;Object[t(515)](i[t(479)],{left:a+"px",top:o+"px",width:p+"px",height:r+"px"}),i[t(517)][t(502)](t(492))}),!n[s(476)]&&setTimeout(()=>{const t=s;i.classList[t(502)]("fade-out"),i[t(485)](t(486),()=>e[t(478)](),{once:!0})},n.duration??1e3),n[s(480)]){const t=a+p,n=o+r,h=document[s(494)](s(513));h.className="ok-highlight__mask",h[s(479)][s(496)]="polygon(\n 0 0, 100vw 0, 100vw 100vh, 0 100vh,\n 0 "+o+s(473)+a+s(481)+o+s(473)+a+"px "+n+s(499)+t+s(481)+n+"px, "+t+s(481)+o+s(501)+o+s(497),h.style[s(484)]=h[s(479)][s(496)],h.addEventListener(s(469),t=>t.stopPropagation()),(e.$el[s(467)]||document[s(505)]).appendChild(h),i[s(468)]=h}}}),mounted(t){const e=s;this[e(516)](),t[e(490)][e(485)](e(469),this[e(498)])},unmounted(t){const e=s;t[e(490)][e(468)]?.[e(491)](),this.opts[e(498)]()},template:'<div class="ok-highlight" :class="[opts.class, opts.animation]"/>',style:s(470),plugins:{theme:{let:{"--ok_fg-accent":s(471)}}}};export{i as default};
@@ -1 +1 @@
1
- import e from"../modals/ok-window.ok.js";var o={tag:"ok-hotkeys-service",dependencies:[e],context:e=>({get registrations(){return e.$ok.shared.hotkeys.registrations}}),register(e,o){e.shared.hotkeys=e.proxy({registrations:[],activeCombos:new Set,downKeys:new Set,_normalize(e){const o=[];e.ctrlKey&&o.push("ctrl"),e.altKey&&o.push("alt"),e.shiftKey&&o.push("shift"),e.metaKey&&o.push("meta");const t=e.key.toLowerCase();return["control","alt","shift","meta"].includes(t)||o.push(t),o},_match:(e,o)=>e.length===o.size&&e.every(e=>o.has(e)),_handleDown(e){this._normalize(e).forEach(e=>this.downKeys.add(e));for(const o of this.registrations){if(!o.enabled)continue;const t=Array.isArray(o.keyCombo)?o.keyCombo:[o.keyCombo];new Set(t.map(e=>e.toLowerCase()));const s=t.join("+");if(this._match(t.map(e=>e.toLowerCase()),this.downKeys)){if(this.activeCombos.has(s))continue;this.activeCombos.add(s),!1!==o.preventDefault&&e.preventDefault(),!0===o.stopPropagation&&e.stopPropagation(),o.keydown?.(e)}}},_handleUp(e){const o=e.key.toLowerCase();this.downKeys.delete(o);for(const o of this.registrations){const t=Array.isArray(o.keyCombo)?o.keyCombo:[o.keyCombo],s=t.join("+");this.activeCombos.has(s)&&(t.map(e=>e.toLowerCase()).every(e=>this.downKeys.has(e))||(this.activeCombos.delete(s),o.keyup?.(e)))}},register(o,t={}){const s={keyCombo:Array.isArray(o)?o:[o],keydown:t.keydown,keyup:t.keyup,description:t.description||"",enabled:!1!==t.enabled,preventDefault:!1!==t.preventDefault,stopPropagation:!0===t.stopPropagation};return this.registrations.push(s),1===this.registrations.length&&(e.config.window.addEventListener("keydown",this._handleDown.bind(this)),e.config.window.addEventListener("keyup",this._handleUp.bind(this))),s},unregister(o){const t=this.registrations.indexOf(o);-1!==t&&this.registrations.splice(t,1),this.registrations.length||(e.config.window.removeEventListener("keydown",this._handleDown),e.config.window.removeEventListener("keyup",this._handleUp),this.downKeys.clear(),this.activeCombos.clear())},async toggle(t=null){await e.shared.layer.toggle("ok-hotkeys-service",t,{registration:o,tier:"window"})}}),"dev"===e.config.env&&e.shared.hotkeys.register(["ctrl","alt","f10"],{description:"Toggle hotkeys window",keydown(){e.shared.hotkeys.toggle()}})},template:'<ok-window no-portal title="Hotkeys" @close="$ok.shared.hotkeys.toggle(false)"><div class="ok-hotkeys-service__list"><each :="registrations" let:item><div class="ok-hotkeys-service__item"><code class="ok-hotkeys-service__combo"><each :="Array.isArray(item.keyCombo) ? item.keyCombo : [item.keyCombo]" let:item let:index let:items><span class="ok-hotkeys-service__key">{{ item }}</span><if :="items.length - 1 === index"><span class="ok-hotkeys-service__sep">+</span></if></each></code> <span class="ok-hotkeys-service__desc">{{ item.description }}</span></div></each></div></ok-window>',style:"[tag]{display:contents}.ok-hotkeys-service__list{padding:1em;font-family:monospace}.ok-hotkeys-service__item{display:flex;align-items:center;margin-bottom:.5em}.ok-hotkeys-service__combo{margin-right:1em;color:#ccc}.ok-hotkeys-service__key{background:#333;color:#fff;padding:2px 6px;border-radius:3px;margin:0 2px}.ok-hotkeys-service__sep{color:#888}.ok-hotkeys-service__desc{flex:1}"};export{o as default};
1
+ import e from"../modals/ok-window.ok.js";const t=o;function s(){const e=["alt","330RENZYl","enabled","hotkeys","_handleDown","bind","activeCombos","21486LkLXUI","keyCombo","delete","1eCJyZe","ctrl","shift","152647kePxpE","_handleUp","description","ok-hotkeys-service","register","shiftKey","key","indexOf","_match","56324OCUthR","1030595CRliup","proxy","control","join","addEventListener","length","layer","config","toggle","altKey","dev","meta","isArray","removeEventListener","add","[tag]{display:contents}.ok-hotkeys-service__list{padding:1em;font-family:monospace}.ok-hotkeys-service__item{display:flex;align-items:center;margin-bottom:.5em}.ok-hotkeys-service__combo{margin-right:1em;color:#ccc}.ok-hotkeys-service__key{background:#333;color:#fff;padding:2px 6px;border-radius:3px;margin:0 2px}.ok-hotkeys-service__sep{color:#888}.ok-hotkeys-service__desc{flex:1}","registrations","419610lfYdUH","metaKey","stopPropagation","76pyhsJp","push","has","env","f10","toLowerCase","3699DlwVqz",'<ok-window no-portal title="Hotkeys" @close="$ok.shared.hotkeys.toggle(false)"><div class="ok-hotkeys-service__list"><each :="registrations" let:item><div class="ok-hotkeys-service__item"><code class="ok-hotkeys-service__combo"><each :="Array.isArray(item.keyCombo) ? item.keyCombo : [item.keyCombo]" let:item let:index let:items><span class="ok-hotkeys-service__key">{{ item }}</span><if :="items.length - 1 === index"><span class="ok-hotkeys-service__sep">+</span></if></each></code> <span class="ok-hotkeys-service__desc">{{ item.description }}</span></div></each></div></ok-window>',"shared","keyup","includes","downKeys","1347570IAfPob","window","1392Ngfxms","map","keydown","_normalize","preventDefault","every","clear"];return(s=function(){return e})()}function o(e,t){return e-=186,s()[e]}!function(){const e=o,t=s();for(;;)try{if(138643==-parseInt(e(204))/1*(parseInt(e(216))/2)+-parseInt(e(201))/3*(parseInt(e(237))/4)+-parseInt(e(217))/5+-parseInt(e(234))/6+parseInt(e(249))/7+-parseInt(e(187))/8*(parseInt(e(243))/9)+-parseInt(e(195))/10*(-parseInt(e(207))/11))break;t.push(t.shift())}catch(e){t.push(t.shift())}}();var i={tag:t(210),dependencies:[e],context:e=>({get registrations(){const t=o;return e.$ok[t(245)][t(197)][t(233)]}}),register(e,s){const o=t;e.shared[o(197)]=e[o(218)]({registrations:[],activeCombos:new Set,downKeys:new Set,_normalize(e){const t=o,s=[];e.ctrlKey&&s[t(238)](t(205)),e[t(226)]&&s.push(t(194)),e[t(212)]&&s.push("shift"),e[t(235)]&&s[t(238)](t(228));const i=e[t(213)].toLowerCase();return![t(219),t(194),t(206),t(228)][t(247)](i)&&s.push(i),s},_match(e,t){const s=o;return e.length===t.size&&e[s(192)](e=>t[s(239)](e))},_handleDown(e){const t=o;this[t(190)](e).forEach(e=>this[t(248)][t(231)](e));for(const s of this.registrations){if(!s.enabled)continue;const o=Array[t(229)](s[t(202)])?s[t(202)]:[s[t(202)]];new Set(o[t(188)](e=>e.toLowerCase()));const i=o.join("+");if(this[t(215)](o[t(188)](e=>e[t(242)]()),this[t(248)])){if(this[t(200)][t(239)](i))continue;this[t(200)].add(i),!1!==s.preventDefault&&e.preventDefault(),!0===s.stopPropagation&&e[t(236)](),s[t(189)]?.(e)}}},_handleUp(e){const t=o,s=e.key[t(242)]();this[t(248)][t(203)](s);for(const s of this[t(233)]){const o=Array[t(229)](s[t(202)])?s[t(202)]:[s.keyCombo],i=o[t(220)]("+");this[t(200)].has(i)&&(!o[t(188)](e=>e[t(242)]())[t(192)](e=>this[t(248)][t(239)](e))&&(this[t(200)][t(203)](i),s[t(246)]?.(e)))}},register(t,s={}){const i=o,n={keyCombo:Array[i(229)](t)?t:[t],keydown:s[i(189)],keyup:s[i(246)],description:s[i(209)]||"",enabled:!1!==s[i(196)],preventDefault:!1!==s[i(191)],stopPropagation:!0===s[i(236)]};return this[i(233)][i(238)](n),1===this[i(233)].length&&(e[i(224)][i(186)][i(221)]("keydown",this[i(198)][i(199)](this)),e[i(224)][i(186)][i(221)]("keyup",this[i(208)][i(199)](this))),n},unregister(t){const s=o,i=this[s(233)][s(214)](t);-1!==i&&this[s(233)].splice(i,1),!this[s(233)][s(222)]&&(e[s(224)][s(186)].removeEventListener(s(189),this._handleDown),e[s(224)][s(186)][s(230)](s(246),this[s(208)]),this[s(248)][s(193)](),this[s(200)].clear())},async toggle(t=null){const i=o;await e[i(245)][i(223)][i(225)](i(210),t,{registration:s,tier:"window"})}}),e.config[o(240)]===o(227)&&e[o(245)][o(197)][o(211)]([o(205),o(194),o(241)],{description:"Toggle hotkeys window",keydown(){const t=o;e[t(245)].hotkeys[t(225)]()}})},template:t(244),style:t(232)};export{i as default};
@@ -1 +1 @@
1
- import e from"../core/ok-layer-service.ok.js";var t={tag:"ok-picker-service",dependencies:[e],register(e,t){e.shared.picker=e.proxy({picking:!1,hoverElement:null,selectedElement:null,labelElement:null,labelContainer:null,config:null,onHover(t){t!==this.hoverElement&&(this.clearHover(),this.hoverElement=t,this.config?.hoverClass&&t.classList.add(this.config.hoverClass),this.config?.showLabel&&(this.labelElement||(this.labelElement=document.createElement("div"),this.labelElement.className="ok-picker__label",this.labelElement.style.zIndex=String(e.shared.layer?.resolveLayerZ("tooltip")??5e3),(this.labelContainer||document.body).appendChild(this.labelElement)),this.labelElement.textContent=this.config.labelTemplate(t),this.labelElement.style.display="block"))},onSelect(e){this.clearSelect(),this.selectedElement=e,this.config?.selectedClass&&e.classList.add(this.config.selectedClass),this.config?.onPick&&this.config.onPick(e),this.stop()},clearHover(){this.hoverElement&&this.config?.hoverClass&&this.hoverElement.classList.remove(this.config.hoverClass),this.hoverElement=null,this.labelElement&&(this.labelElement.style.display="none")},clearSelect(){this.selectedElement&&this.config?.selectedClass&&this.selectedElement.classList.remove(this.config.selectedClass),this.selectedElement=null},async start(i={}){this.picking&&await this.stop();const l=await e.shared.layer.toggle("ok-picker-service",!0,{registration:t});this.labelContainer=l?.parentNode||e.shared.layer.container||document.body,this.config={hoverClass:"ok-picker__hover",selectedClass:"ok-picker__selected",filter:()=>!0,onPick:()=>{throw new Error("onPick not defined")},cancelOnEsc:!0,root:e.config.body||document,showLabel:!0,labelTemplate:e=>e.tagName.toLowerCase()+(e.id?`#${e.id}`:""),labelOffset:{x:10,y:10},...i},this.picking=!0,this.config.root.addEventListener("pointermove",this._onPointerMove),this.config.root.addEventListener("click",this._onClick,!0),this.config.root.addEventListener("keydown",this._onKeyDown)},async stop(){this.picking&&(this.clearHover(),this.clearSelect(),this.labelElement&&(this.labelElement.remove(),this.labelElement=null),this.config.root.removeEventListener("pointermove",this._onPointerMove),this.config.root.removeEventListener("click",this._onClick,!0),this.config.root.removeEventListener("keydown",this._onKeyDown),this.picking=!1,this.labelContainer=null,this.config=null,await e.shared.layer.toggle("ok-picker-service",!1))},_onPointerMove(t){const i=t.target.closest("*");if(i&&e.shared.picker.config?.filter(i)&&(e.shared.picker.onHover(i),e.shared.picker.labelElement)){const{x:i,y:l}=e.shared.picker.config.labelOffset;e.shared.picker.labelElement.style.left=`${t.clientX+i}px`,e.shared.picker.labelElement.style.top=`${t.clientY+l}px`}},_onClick(t){const i=t.target.closest("*");i&&e.shared.picker.config?.filter(i)&&(t.preventDefault(),t.stopPropagation(),e.shared.picker.onSelect(i))},_onKeyDown(t){"Escape"===t.key&&e.shared.picker.config?.cancelOnEsc&&e.shared.picker.stop()}})},style:".ok-picker__hover{outline:2px dotted #0f0;outline-offset:-2px;cursor:crosshair!important}.ok-picker__selected{outline:2px solid #0f0;outline-offset:-2px}.ok-picker__label{position:fixed;background:rgba(0,255,0,.9);color:#000;padding:4px 8px;border-radius:3px;font-size:12px;font-family:monospace;pointer-events:none;z-index:5000;white-space:nowrap;display:none}"};export{t as default};
1
+ import e from"../core/ok-layer-service.ok.js";function t(e,t){return e-=164,n()[e]}const s=t;function n(){const e=["tagName","hoverElement","labelElement","labelOffset","2680690ABdvIL","onPick","appendChild","textContent","none","76740zFErxH","56FTLMKE","block","16277088nCSxAS","filter","cancelOnEsc",".ok-picker__hover{outline:2px dotted #0f0;outline-offset:-2px;cursor:crosshair!important}.ok-picker__selected{outline:2px solid #0f0;outline-offset:-2px}.ok-picker__label{position:fixed;background:rgba(0,255,0,.9);color:#000;padding:4px 8px;border-radius:3px;font-size:12px;font-family:monospace;pointer-events:none;z-index:5000;white-space:nowrap;display:none}","clearHover","root","shared","_onKeyDown","_onClick","tooltip","2590191OiNMvL","hoverClass","className","style","click","config","clearSelect","classList","clientY","div","stop","Escape","picker","_onPointerMove","labelContainer","2474968NrSzft","442813ekLKKr","key","keydown","ok-picker-service","layer","onHover","display","toLowerCase","top","pointermove","15772HhvjYv","removeEventListener","target","clientX","onSelect","toggle","resolveLayerZ","selectedElement","remove","selectedClass","labelTemplate","showLabel","body","preventDefault","picking","addEventListener","onPick not defined","parentNode","add","zIndex"];return(n=function(){return e})()}!function(){const e=t,s=n();for(;;)try{if(475726==-parseInt(e(196))/1*(-parseInt(e(166))/2)+parseInt(e(208))/3+parseInt(e(223))/4+parseInt(e(190))/5+-parseInt(e(195))/6+parseInt(e(224))/7+-parseInt(e(198))/8)break;s.push(s.shift())}catch(e){s.push(s.shift())}}();var i={tag:s(227),dependencies:[e],register(e,t){const n=s;e[n(204)][n(220)]=e.proxy({picking:!1,hoverElement:null,selectedElement:null,labelElement:null,labelContainer:null,config:null,onHover(t){const s=n;t!==this[s(187)]&&(this[s(202)](),this[s(187)]=t,this[s(213)]?.hoverClass&&t[s(215)][s(184)](this[s(213)][s(209)]),this.config?.[s(177)]&&(!this[s(188)]&&(this.labelElement=document.createElement(s(217)),this.labelElement[s(210)]="ok-picker__label",this[s(188)].style[s(185)]=String(e[s(204)][s(228)]?.[s(172)](s(207))??5e3),(this.labelContainer||document[s(178)])[s(192)](this[s(188)])),this[s(188)][s(193)]=this[s(213)][s(176)](t),this[s(188)].style[s(230)]=s(197)))},onSelect(e){const t=n;this[t(214)](),this[t(173)]=e,this[t(213)]?.[t(175)]&&e.classList[t(184)](this.config.selectedClass),this[t(213)]?.[t(191)]&&this[t(213)].onPick(e),this[t(218)]()},clearHover(){const e=n;this[e(187)]&&this[e(213)]?.[e(209)]&&this[e(187)][e(215)][e(174)](this[e(213)][e(209)]),this[e(187)]=null,this.labelElement&&(this.labelElement[e(211)][e(230)]=e(194))},clearSelect(){const e=n;this[e(173)]&&this[e(213)]?.[e(175)]&&this.selectedElement[e(215)][e(174)](this[e(213)][e(175)]),this.selectedElement=null},async start(s={}){const i=n;this[i(180)]&&await this[i(218)]();const o=await e.shared[i(228)].toggle(i(227),!0,{registration:t});this[i(222)]=o?.[i(183)]||e.shared[i(228)].container||document[i(178)],this[i(213)]={hoverClass:"ok-picker__hover",selectedClass:"ok-picker__selected",filter:()=>!0,onPick:()=>{throw new Error(i(182))},cancelOnEsc:!0,root:e[i(213)].body||document,showLabel:!0,labelTemplate:e=>{const t=i;return e[t(186)][t(231)]()+(e.id?"#"+e.id:"")},labelOffset:{x:10,y:10},...s},this[i(180)]=!0,this.config[i(203)].addEventListener(i(165),this[i(221)]),this.config[i(203)][i(181)]("click",this._onClick,!0),this[i(213)].root[i(181)](i(226),this._onKeyDown)},async stop(){const t=n;this[t(180)]&&(this.clearHover(),this[t(214)](),this[t(188)]&&(this.labelElement.remove(),this[t(188)]=null),this[t(213)][t(203)].removeEventListener(t(165),this._onPointerMove),this[t(213)][t(203)].removeEventListener(t(212),this[t(206)],!0),this.config[t(203)][t(167)](t(226),this[t(205)]),this.picking=!1,this.labelContainer=null,this.config=null,await e.shared[t(228)][t(171)]("ok-picker-service",!1))},_onPointerMove(t){const s=n,i=t[s(168)].closest("*");if(i&&e[s(204)][s(220)][s(213)]?.[s(199)](i)&&(e[s(204)][s(220)][s(229)](i),e[s(204)][s(220)][s(188)])){const{x:n,y:i}=e[s(204)][s(220)][s(213)][s(189)];e[s(204)].picker[s(188)][s(211)].left=t[s(169)]+n+"px",e[s(204)][s(220)].labelElement.style[s(164)]=t[s(216)]+i+"px"}},_onClick(t){const s=n,i=t.target.closest("*");i&&e[s(204)][s(220)].config?.[s(199)](i)&&(t[s(179)](),t.stopPropagation(),e[s(204)][s(220)][s(170)](i))},_onKeyDown(t){const s=n;t[s(225)]===s(219)&&e[s(204)][s(220)][s(213)]?.[s(200)]&&e[s(204)][s(220)].stop()}})},style:s(201)};export{i as default};
@@ -1 +1 @@
1
- import n from"../sync/reactive-sync-service.ok.js";var t={tag:"ok-popout-service",dependencies:[n],register(n){function t(n,e=null){if(null===n)return"null";if("string"==typeof n)return JSON.stringify(n);if("number"==typeof n||"boolean"==typeof n)return String(n);if("function"==typeof n){const t=n.toString().trim();if(e&&/^[a-zA-Z_$][\w$]*$/.test(e)){const n=/^function\s*\w*\s*\(([^)]*)\)\s*\{/.exec(t);if(n)return`${e}(${n[1]})${t.slice(t.indexOf("{"))}`}return t}if(n instanceof HTMLTemplateElement)return JSON.stringify(n.content.innerHTML);if(n instanceof HTMLStyleElement)return JSON.stringify(n.innerHTML);if(Array.isArray(n))return`[${n.map(n=>t(n)).join(", ")}]`;if("object"==typeof n)return`{${Object.entries(n).map(([n,e])=>{const o=/^[a-zA-Z_$][\w$]*$/.test(n);return o&&"function"==typeof e?t(e,n):`${o?n:JSON.stringify(n)}: ${t(e)}`}).join(", ")}}`;throw new Error("Cannot serialize value: "+n)}n.shared.popout={async pop(e,{context:o,deps:r=[],title:i="Popout",width:s=600,height:c=800}={}){const a=function(){const t=[];return n.componentRegistry.cache.keys().forEach(e=>{const o=n.componentRegistry.cache.get(e);o.raw?._primitive||"import"===o.type&&(o.parent||t.push({config:o.config,options:{base:o.base||document.baseURI||window.location.href}}))}),t}(),p=(y=o)&&"object"==typeof y&&y[n.OK.OKProxy.SYM_OKPROXY_INSTANCE];var y;const f="ok-sync-"+Math.random().toString(36).slice(2);let u="";u=void 0===o?"\n await ok.init(document.body);\n ":p?`\n const ctx = ok.proxy({});\n const sync = ok.shared.sync.createReactiveSync(\n ctx,\n { transport: ok.shared.sync.createBroadcastTransport("${f}") }\n );\n await sync.fetch();\n await ok.init(document.body, ctx);\n `:`\n const ctx = ok.proxy(${t(o)});\n await ok.init(document.body, ctx);\n `;const l=`<!DOCTYPE html>\n<html>\n<head>\n <title>${i}</title>\n <style> body { margin: 0; font-family: sans-serif; } </style>\n</head>\n<body>\n${n.createNodes(e).map(n=>n.outerHTML).join("\n")}\n\n<script type="module">\n import OK from "${n.OK.url}";\n const ok = OK();\n\n ${a.map(n=>`ok.register(${t(n.config)}, ${t(n.options)});`).join("\n")}\n ${r.map(n=>`ok.register(${t(n)}, null, { override: true });`).join("\n")}\n\n (async () => {\n await ok.componentRegistry.initPendingRegistrations();\n ${u}\n })();\n<\/script>\n</body>\n</html>`,d=new Blob([l],{type:"text/html"}),m=URL.createObjectURL(d),$=window.open(m,"",`width=${s},height=${c}`);if($)return p&&n.shared.sync.createReactiveSync(n.proxy(o),{transport:n.shared.sync.createBroadcastTransport(f)}),{stop(){$.close()}};alert("Popup blocked")}}}};export{t as default};
1
+ import t from"../sync/reactive-sync-service.ok.js";const n=r;function e(){const t=["width=","Cannot serialize value: ","205IBfouk","type","test","location","createReactiveSync","toString","11547UDqqYu","parent","270rUZoze",", null, { override: true });","SYM_OKPROXY_INSTANCE","ok.register(","ok-popout-service","object","exec","314fAsnCt","base","trim","\n })();\n<\/script>\n</body>\n</html>","\n ","1562980ZFWkIf","Popup blocked","keys","function","indexOf","random","number","224791HUfZQj","string","raw","entries","\n\n (async () => {\n await ok.componentRegistry.initPendingRegistrations();\n ","isArray","cache","forEach","boolean",'\n\n<script type="module">\n import OK from "',"join","stringify","config","135616YsHIvu","\n const ctx = ok.proxy(","createObjectURL","127010PJuCNY","options",'\n const ctx = ok.proxy({});\n const sync = ok.shared.sync.createReactiveSync(\n ctx,\n { transport: ok.shared.sync.createBroadcastTransport("',"sync",'";\n const ok = OK();\n\n ',"_primitive","1276253vdMZYz","open","proxy","createNodes","shared","baseURI","6utSHpw","text/html","createBroadcastTransport","Popout","componentRegistry","push","<!DOCTYPE html>\n<html>\n<head>\n <title>","</title>\n <style> body { margin: 0; font-family: sans-serif; } </style>\n</head>\n<body>\n","70364JSUYhW","map"];return(e=function(){return t})()}function r(t,n){return t-=114,e()[t]}!function(){const t=r,n=e();for(;;)try{if(504820==-parseInt(t(143))/1+parseInt(t(115))/2*(parseInt(t(173))/3)+parseInt(t(163))/4*(-parseInt(t(167))/5)+-parseInt(t(155))/6*(parseInt(t(127))/7)+parseInt(t(140))/8*(parseInt(t(175))/9)+parseInt(t(120))/10+parseInt(t(149))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();var o={tag:n(179),dependencies:[t],register(t){const e=n;function r(t,n=null){const o=e;if(null===t)return"null";if(typeof t===o(128))return JSON[o(138)](t);if(typeof t===o(126)||typeof t===o(135))return String(t);if(typeof t===o(123)){const e=t[o(172)]()[o(117)]();if(n&&/^[a-zA-Z_$][\w$]*$/[o(169)](n)){const t=/^function\s*\w*\s*\(([^)]*)\)\s*\{/[o(114)](e);if(t)return n+"("+t[1]+")"+e.slice(e[o(124)]("{"))}return e}if(t instanceof HTMLTemplateElement)return JSON.stringify(t.content.innerHTML);if(t instanceof HTMLStyleElement)return JSON[o(138)](t.innerHTML);if(Array[o(132)](t))return"["+t[o(164)](t=>r(t))[o(137)](", ")+"]";if(typeof t===o(180))return"{"+Object[o(130)](t).map(([t,n])=>{const e=o,i=/^[a-zA-Z_$][\w$]*$/[e(169)](t);return i&&typeof n===e(123)?r(n,t):(i?t:JSON[e(138)](t))+": "+r(n)}).join(", ")+"}";throw new Error(o(166)+t)}t.shared.popout={async pop(n,{context:o,deps:i=[],title:s=e(158),width:c=600,height:a=800}={}){const p=e,f=function(){const n=e,r=[];return t[n(159)].cache[n(122)]()[n(134)](e=>{const o=n,i=t[o(159)][o(133)].get(e);i[o(129)]?.[o(148)]||"import"===i[o(168)]&&(i[o(174)]||r[o(160)]({config:i[o(139)],options:{base:i[o(116)]||document[o(154)]||window[o(170)].href}}))}),r}(),u=(d=o)&&typeof d===e(180)&&d[t.OK.OKProxy[e(177)]],y="ok-sync-"+Math[p(125)]()[p(172)](36).slice(2);var d;let l="";l=void 0===o?"\n await ok.init(document.body);\n ":u?p(145)+y+'") }\n );\n await sync.fetch();\n await ok.init(document.body, ctx);\n ':p(141)+r(o)+");\n await ok.init(document.body, ctx);\n ";const h=p(161)+s+p(162)+t[p(152)](n)[p(164)](t=>t.outerHTML)[p(137)]("\n")+p(136)+t.OK.url+p(147)+f[p(164)](t=>"ok.register("+r(t[p(139)])+", "+r(t[p(144)])+");").join("\n")+p(119)+i[p(164)](t=>p(178)+r(t)+p(176))[p(137)]("\n")+p(131)+l+p(118),m=new Blob([h],{type:p(156)}),g=URL[p(142)](m),k=window[p(150)](g,"",p(165)+c+",height="+a);if(k)return u&&t.shared[p(146)][p(171)](t[p(151)](o),{transport:t[p(153)][p(146)][p(157)](y)}),{stop(){k.close()}};alert(p(121))}}}};export{o as default};
@@ -1 +1 @@
1
- import o from"./ok-popout-service.ok.js";var t={tag:"ok-popout",dependencies:[o],attr:{noConfirm:{default:!1,empty:!0},confirmText:{default:"Confirm popout"},noRemove:{default:!1,empty:!0}},context:o=>({show:!1,async pop(){const t=await o.$ok.shared.popout.pop(o,o.$cache.cmp.templates.default,o.$context);o.$once("unmount",()=>t.stop()),o.$listen(window,"close",()=>{t.stop()})}}),mount(o){o.$el.pop=this.pop,o.$attr.noConfirm?this.pop():o.$ok.shared.modal.confirm(o.$attr.confirmText).then(o=>{o&&this.pop()}),o.$attr.noRemove?this.show=!0:o.$destroy()},template:'<if :="show"><slot/></if>'};export{t as default};
1
+ import t from"./ok-popout-service.ok.js";const o=e;function e(t,o){return t-=453,n()[t]}function n(){const t=["$ok","show","pop","noConfirm","noRemove","2289141PUyYVb","Confirm popout","4656096fLsWiC","close","140PYwAVC","37589ZJbXEd","$once","1503761NhsGuz","cmp","34rVobWq","templates","ok-popout","confirmText","$context","2417264iAROYg","35199mbqroa","$attr","$el","1632300QnryAe","then","stop","shared","$destroy","popout","12YHmgrw"];return(n=function(){return t})()}!function(){const t=e,o=n();for(;;)try{if(640796==-parseInt(t(477))/1*(-parseInt(t(481))/2)+-parseInt(t(472))/3+parseInt(t(474))/4+-parseInt(t(460))/5+-parseInt(t(466))/6*(parseInt(t(479))/7)+parseInt(t(456))/8+parseInt(t(457))/9*(parseInt(t(476))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}();var s={tag:o(453),dependencies:[t],attr:{noConfirm:{default:!1,empty:!0},confirmText:{default:o(473)},noRemove:{default:!1,empty:!0}},context:t=>({show:!1,async pop(){const o=e,n=await t.$ok.shared[o(465)][o(469)](t,t.$cache[o(480)][o(482)].default,t[o(455)]);t[o(478)]("unmount",()=>n.stop()),t.$listen(window,o(475),()=>{n[o(462)]()})}}),mount(t){const e=o;t[e(459)][e(469)]=this[e(469)],t[e(458)][e(470)]?this[e(469)]():t[e(467)][e(463)].modal.confirm(t[e(458)][e(454)])[e(461)](t=>{t&&this.pop()}),t[e(458)][e(471)]?this[e(468)]=!0:t[e(464)]()},template:'<if :="show"><slot/></if>'};export{s as default};
@@ -1 +1 @@
1
- var e={tag:"ok-portal-service",register(e){const n=new WeakMap,o=new WeakMap,r=e=>e instanceof Node?e:null,t=(o,t)=>{const s=r(o),a=r(t);if(!s||!a)return!1;const c=(o=>{let r=n.get(o);if(r)return r;const t=o.parentNode;if(!t)return null;const s=o.$owner,a=s?.$handle,c=a?a.nodes.indexOf(o):-1;if(a&&-1!==c){const n=e.config.document.createTextNode("");n.$owner=s,n.$scope={$__init__$:!0,$__unmount__$:null,$destroy(){if(n.$scope=null,o.parentNode&&o.remove(),!a.isDestroyed){const e=a.nodes.indexOf(n);-1!==e&&a.splice(e,1)}return Promise.resolve()}},t.insertBefore(n,o),a.nodes[c]=n,o.$owner=null,r={node:o,stub:n,handle:a,handleIdx:c,owner:s}}else{const n=e.config.document.createComment("ok-portal-anchor");t.insertBefore(n,o),r={node:o,anchor:n}}return n.set(o,r),r})(s);return!!c&&(s.parentNode!==a&&a.appendChild(s),!0)},s=e=>{const t=r(e);if(!t)return!1;const s=n.get(t);if(!s)return!1;if(s.stub){const{stub:e,handle:n,handleIdx:o,owner:r}=s;if(e.parentNode){if(e.$scope=null,e.parentNode.insertBefore(t,e),e.remove(),n&&!n.isDestroyed){const r=n.nodes.indexOf(e),s=-1!==r?r:o;n.nodes[s]=t}t.$owner=r}else t.parentNode&&t.remove();e.$owner=null}else s.anchor&&(s.anchor?.parentNode?(s.anchor.parentNode.insertBefore(t,s.anchor),s.anchor.remove()):(s.anchor?.remove(),t.parentNode&&t.remove()));return n.delete(t),o.delete(t),!0};e.shared.portal=e.proxy({create:a=>{const c=r(a);if(!c)return null;const d=o.get(c);if(d)return d;const l=e.proxy({to:e=>t(c,e),back:()=>s(c),get active(){return!!n.get(c)}});return o.set(c,l),l},to:t,back:s,has(e){const o=r(e);return!(!o||!n.get(o))}})},template:"",style:"[tag]{display:none}"};export{e as default};
1
+ const e=n;function n(e,n){return e-=308,t()[e]}function t(){const e=["portal","parentNode","splice","$scope","stub","remove","99636iGvtlS","721zijxaM","get","createTextNode","ok-portal-anchor","nodes","115kWFQnf","3648458dvenuh","$handle","shared","isDestroyed","10DDEzsw","createComment","10enLjxz","1507500cUBMbx","resolve","40184SuXmxS","anchor","delete","proxy","set","insertBefore","ok-portal-service","4636089oxuLDj","3088dUknSo","$owner","433758tyRJdA","config","appendChild","indexOf","document"];return(t=function(){return e})()}!function(){const e=n,r=t();for(;;)try{if(331883==-parseInt(e(324))/1*(-parseInt(e(342))/2)+-parseInt(e(318))/3+parseInt(e(332))/4+parseInt(e(329))/5*(parseInt(e(344))/6)+-parseInt(e(319))/7*(parseInt(e(334))/8)+parseInt(e(341))/9*(parseInt(e(331))/10)+-parseInt(e(325))/11)break;r.push(r.shift())}catch(e){r.push(r.shift())}}();var r={tag:e(340),register(t){const r=e,o=new WeakMap,s=new WeakMap,a=e=>e instanceof Node?e:null,c=(e,r)=>{const s=n,c=a(e),u=a(r);return!(!c||!u)&&(!!(e=>{const r=n;let s=o[r(320)](e);if(s)return s;const a=e[r(313)];if(!a)return null;const c=e[r(343)],u=c?.[r(326)],l=u?u[r(323)][r(310)](e):-1;if(u&&-1!==l){const n=t.config[r(311)][r(321)]("");n[r(343)]=c,n[r(315)]={$__init__$:!0,$__unmount__$:null,$destroy(){const t=r;if(n[t(315)]=null,e[t(313)]&&e[t(317)](),!u[t(328)]){const e=u[t(323)][t(310)](n);-1!==e&&u[t(314)](e,1)}return Promise[t(333)]()}},a[r(339)](n,e),u[r(323)][l]=n,e[r(343)]=null,s={node:e,stub:n,handle:u,handleIdx:l,owner:c}}else{const n=t[r(308)][r(311)][r(330)](r(322));a[r(339)](n,e),s={node:e,anchor:n}}return o[r(338)](e,s),s})(c)&&(c.parentNode!==u&&u[s(309)](c),!0))},u=e=>{const t=n,r=a(e);if(!r)return!1;const c=o[t(320)](r);if(!c)return!1;if(c[t(316)]){const{stub:e,handle:n,handleIdx:o,owner:s}=c;if(e.parentNode){if(e[t(315)]=null,e[t(313)].insertBefore(r,e),e[t(317)](),n&&!n[t(328)]){const s=n[t(323)][t(310)](e),a=-1!==s?s:o;n.nodes[a]=r}r[t(343)]=s}else r[t(313)]&&r[t(317)]();e[t(343)]=null}else c[t(335)]&&(c[t(335)]?.[t(313)]?(c.anchor[t(313)][t(339)](r,c.anchor),c[t(335)][t(317)]()):(c[t(335)]?.[t(317)](),r.parentNode&&r[t(317)]()));return o[t(336)](r),s[t(336)](r),!0};t[r(327)][r(312)]=t[r(337)]({create:e=>{const r=n,l=a(e);if(!l)return null;const i=s.get(l);if(i)return i;const d=t[r(337)]({to:e=>c(l,e),back:()=>u(l),get active(){return!!o[r(320)](l)}});return s.set(l,d),d},to:c,back:u,has(e){const n=r,t=a(e);return!(!t||!o[n(320)](t))}})},template:"",style:"[tag]{display:none}"};export{r as default};
@@ -1 +1 @@
1
- var e={tag:"ok-submenu",attr:{placement:{default:"right-start"},openOn:{default:"hover"},openDelay:{default:120},closeDelay:{default:200}},context(e){let t=null;const n=(e,n)=>{clearTimeout(t),t=setTimeout(n,e)};return{isOpen:!1,trigger:null,onEnter(){clearTimeout(t),n(e.$attr.openDelay,()=>this.isOpen=!0)},onLeave(){clearTimeout(t),n(e.$attr.closeDelay,()=>this.isOpen=!1)},onTriggerClick(t){"click"===e.$attr.openOn&&(t.stopPropagation(),setOpen(!open))},onTriggerKey(e){"ArrowRight"===e.key&&(this.isOpen=!0,e.preventDefault()),"ArrowLeft"===e.key&&(this.isOpen=!1,e.preventDefault()),"Escape"===e.key&&(this.isOpen=!1)}}},template:'<div class="ok-submenu" role="none" @mouseenter="onEnter" @mouseleave="onLeave"><div class="ok-submenu__trigger" @mount="trigger = $el" @click="onTriggerClick" @keydown="onTriggerKey"><slot/></div><ok-flyover :open="isOpen" :anchor="trigger" :placement="$props.placement"><div class="ok-submenu__panel" role="menu" @mouseenter="onEnter" @mouseleave="onLeave"><slot name="content"/></div></ok-flyover></div>',style:".ok-submenu__trigger{display:flex}"};export{e as default};
1
+ const e=t;function t(e,t){return e-=139,n()[e]}function n(){const e=["12210tPSqAV","1469923WdKjmn","openOn","right-start","56378NgXODu","$attr","119835eFcYhf","click","53343VVtGMg","key",'<div class="ok-submenu" role="none" @mouseenter="onEnter" @mouseleave="onLeave"><div class="ok-submenu__trigger" @mount="trigger = $el" @click="onTriggerClick" @keydown="onTriggerKey"><slot/></div><ok-flyover :open="isOpen" :anchor="trigger" :placement="$props.placement"><div class="ok-submenu__panel" role="menu" @mouseenter="onEnter" @mouseleave="onLeave"><slot name="content"/></div></ok-flyover></div>',"isOpen","5755tHZvCL","ok-submenu","3213546iPWpWv","Escape","preventDefault","ArrowLeft","136AJXcnx","664kGvgid"];return(n=function(){return e})()}!function(){const e=t,o=n();for(;;)try{if(270235==-parseInt(e(150))/1+-parseInt(e(146))/2+parseInt(e(152))/3+-parseInt(e(144))/4*(-parseInt(e(158))/5)+parseInt(e(140))/6+parseInt(e(147))/7+-parseInt(e(145))/8*(parseInt(e(154))/9))break;o.push(o.shift())}catch(e){o.push(o.shift())}}();var o={tag:e(139),attr:{placement:{default:e(149)},openOn:{default:"hover"},openDelay:{default:120},closeDelay:{default:200}},context(e){let n=null;const o=(e,t)=>{clearTimeout(n),n=setTimeout(t,e)};return{isOpen:!1,trigger:null,onEnter(){const r=t;clearTimeout(n),o(e[r(151)].openDelay,()=>this[r(157)]=!0)},onLeave(){const r=t;clearTimeout(n),o(e[r(151)].closeDelay,()=>this[r(157)]=!1)},onTriggerClick(n){const o=t;e.$attr[o(148)]===o(153)&&(n.stopPropagation(),setOpen(!open))},onTriggerKey(e){const n=t;"ArrowRight"===e[n(155)]&&(this[n(157)]=!0,e[n(142)]()),e[n(155)]===n(143)&&(this.isOpen=!1,e[n(142)]()),e[n(155)]===n(141)&&(this[n(157)]=!1)}}},template:e(156),style:".ok-submenu__trigger{display:flex}"};export{o as default};
@@ -1 +1 @@
1
- var e={tag:"ok-resizer",attr:{target:{default:null},direction:{default:"horizontal"}},context(e){let t=!1;function r(r){r.preventDefault(),t=!0;const i=e.$attr.direction||"horizontal",o=e.$attr.target?e.$el.parentNode.querySelector(e.$attr.target):e.$el.previousElementSibling;if(!o)return;const n=r.clientX,a=r.clientY,s=o.offsetWidth,d=o.offsetHeight,l=e=>{if(t)if("horizontal"===i){const t=e.clientX-n;o.style.width=`${s+t}px`}else{const t=e.clientY-a;o.style.height=`${d+t}px`}},c=()=>{t=!1,window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",c)};window.addEventListener("mousemove",l),window.addEventListener("mouseup",c)}return e.$listen(e.$el,"mousedown",r),{startResize:r}},template:'<div class="grabber"/>',style:"[tag]{display:flex;flex-shrink:0;background:0 0;position:relative;justify-content:center;align-items:center}[tag][direction=horizontal]{cursor:ew-resize}[tag][direction=vertical]{cursor:ns-resize}[tag][direction=horizontal] .grabber{margin:1px;width:2px;height:32px;border-left:2px dotted rgba(0,0,0,.5);border-right:2px dotted rgba(0,0,0,.5)}[tag][direction=vertical] .grabber{height:2px;width:32px;cursor:ns-resize;border-top:2px dotted rgba(0,0,0,.3);border-bottom:2px dotted rgba(0,0,0,.3)}"};export{e as default};
1
+ function t(t,e){return t-=415,r()[t]}const e=t;function r(){const t=["offsetHeight",'<div class="grabber"/>',"height","clientY","addEventListener","$listen","ok-resizer","3249euepTD","362309tEaPRC","26fIvTeU","3289319brfRMo","$el","direction","$attr","1644202TPJDky","mousemove","width","7VetjJw","horizontal","target","mousedown","2wQFhEl","mouseup","clientX","3890dCKDEk","removeEventListener","1380144JFMFrJ","12GDQykm","15nPnGxY","119332uGmDnT","[tag]{display:flex;flex-shrink:0;background:0 0;position:relative;justify-content:center;align-items:center}[tag][direction=horizontal]{cursor:ew-resize}[tag][direction=vertical]{cursor:ns-resize}[tag][direction=horizontal] .grabber{margin:1px;width:2px;height:32px;border-left:2px dotted rgba(0,0,0,.5);border-right:2px dotted rgba(0,0,0,.5)}[tag][direction=vertical] .grabber{height:2px;width:32px;cursor:ns-resize;border-top:2px dotted rgba(0,0,0,.3);border-bottom:2px dotted rgba(0,0,0,.3)}","35tspfxF","preventDefault","parentNode","offsetWidth","style","83058cIhzSZ"];return(r=function(){return t})()}!function(){const e=t,n=r();for(;;)try{if(193605==-parseInt(e(434))/1*(-parseInt(e(447))/2)+parseInt(e(417))/3*(parseInt(e(418))/4)+parseInt(e(420))/5*(-parseInt(e(425))/6)+-parseInt(e(443))/7*(-parseInt(e(415))/8)+-parseInt(e(433))/9*(-parseInt(e(450))/10)+parseInt(e(436))/11*(-parseInt(e(416))/12)+parseInt(e(435))/13*(-parseInt(e(440))/14))break;n.push(n.shift())}catch(t){n.push(n.shift())}}();var n={tag:e(432),attr:{target:{default:null},direction:{default:e(444)}},context(r){const n=e;let o=!1;function i(e){const n=t;e[n(421)](),o=!0;const i=r[n(439)][n(438)]||n(444),s=r[n(439)][n(445)]?r[n(437)][n(422)].querySelector(r.$attr[n(445)]):r[n(437)].previousElementSibling;if(!s)return;const a=e[n(449)],c=e[n(429)],p=s[n(423)],d=s[n(426)],l=t=>{const e=n;if(o)if("horizontal"===i){const r=t[e(449)]-a;s[e(424)][e(442)]=p+r+"px"}else{const r=t[e(429)]-c;s[e(424)][e(428)]=d+r+"px"}},u=()=>{const t=n;o=!1,window[t(451)](t(441),l),window[t(451)](t(448),u)};window[n(430)](n(441),l),window[n(430)](n(448),u)}return r[n(431)](r[n(437)],n(446),i),{startResize:i}},template:e(427),style:e(419)};export{n as default};
@@ -1 +1 @@
1
- const e=import.meta.url;var o=[{tag:"async",path:"./behavior/async.ok.js",meta:["ui"]},{tag:"ok-theme",path:"./theming/ok-theme.ok.js",meta:["ui"]},{tag:"transition",path:"./core/transition.ok.js",meta:["ui"]},{tag:"virtualized",path:"./core/virtualized.ok.js",meta:["ui","heavy"]},{tag:"ok-overlay",path:"./core/ok-overlay.ok.js",meta:["ui"]},{tag:"ok-layer",path:"./core/ok-layer.ok.js",meta:["ui"]},{tag:"ok-layer-service",path:"./core/ok-layer-service.ok.js",meta:["service"]},{tag:"router",path:"./navigation/router.ok.js",meta:["ui"]},{tag:"hash-router",path:"./navigation/hash-router.ok.js",meta:["ui"]},{tag:"history-router",path:"./navigation/history-router.ok.js",meta:["ui"]},{tag:"ok-icon",path:"./elements/ok-icon.ok.js",meta:["ui","cdn"]},{tag:"ok-table",path:"./elements/ok-table.ok.js",meta:["ui","heavy"]},{tag:"ok-dropdown",path:"./elements/ok-dropdown.ok.js",meta:["ui"]},{tag:"ok-select",path:"./elements/ok-select.ok.js",meta:["ui"]},{tag:"ok-window",path:"./modals/ok-window.ok.js",meta:["ui"]},{tag:"ok-modal",path:"./modals/ok-modal.ok.js",meta:["ui"]},{tag:"ok-modal-service",path:"./modals/ok-modal-service.ok.js",meta:["service"]},{tag:"ok-toast-service",path:"./modals/ok-toast-service.ok.js",meta:["service"]},{tag:"ok-contextmenu",path:"./interaction/ok-contextmenu.ok.js",meta:["ui"]},{tag:"ok-popout",path:"./interaction/ok-popout.ok.js",meta:["ui"]},{tag:"ok-popout-service",path:"./interaction/ok-popout-service.ok.js",meta:["service"]},{tag:"ok-picker-service",path:"./interaction/ok-picker-service.ok.js",meta:["service"]},{tag:"ok-submenu",path:"./interaction/ok-submenu.ok.js",meta:["ui"]},{tag:"ok-highlight",path:"./interaction/ok-highlight.ok.js",meta:["ui"]},{tag:"ok-highlight-service",path:"./interaction/ok-highlight-service.ok.js",meta:["ui","service"]},{tag:"ok-draggable",path:"./interaction/ok-draggable.ok.js",meta:["ui"]},{tag:"ok-flyover",path:"./interaction/ok-flyover.ok.js",meta:["ui"]},{tag:"ok-flyover-panel",path:"./interaction/ok-flyover-panel.ok.js",meta:["ui"]},{tag:"ok-hotkeys-service",path:"./interaction/ok-hotkeys-service.ok.js",meta:["service"]},{tag:"ok-dismiss-service",path:"./interaction/ok-dismiss-service.ok.js",meta:["service"]},{tag:"ok-portal-service",path:"./interaction/ok-portal-service.ok.js",meta:["service"]},{tag:"ok-chart",path:"./components/ok-chart.ok.js",meta:["ui","heavy"]},{tag:"ok-marked",path:"./components/ok-marked.ok.js",meta:["ui","cdn"]},{tag:"ok-doc-viewer",path:"./components/ok-doc-viewer.ok.js",meta:["ui","cdn"]},{tag:"ok-monaco",path:"./components/ok-monaco.ok.js",meta:["dev","editor","heavy","cdn"]},{tag:"ok-resizer",path:"./layout/ok-resizer.ok.js",meta:["ui"]},{tag:"reactive-sync-service",path:"./sync/reactive-sync-service.ok.js",meta:["service"]},{tag:"ok-console",path:"./devtools/ok-console.ok.js",meta:["dev","debug"]},{tag:"ok-console-service",path:"./devtools/ok-console-service.ok.js",meta:["dev","debug","service"]},{tag:"ok-fps-monitor",path:"./devtools/ok-fps-monitor.ok.js",meta:["dev","debug"]},{tag:"ok-fps-monitor-service",path:"./devtools/ok-fps-monitor-service.ok.js",meta:["dev","debug","service"]},{tag:"ok-inspector",path:"./devtools/ok-inspector.ok.js",meta:["dev","heavy","debug"]},{tag:"ok-inspector-service",path:"./devtools/ok-inspector-service.ok.js",meta:["dev","debug","service"]},{tag:"ok-js-tree",path:"./devtools/ok-js-tree.ok.js",meta:["dev","editor"]},{tag:"ok-live-shell",path:"./editor/ok-live-shell.ok.js",meta:["dev","editor","heavy"]},{tag:"ok-live-component",path:"./editor/ok-live-component.ok.js",meta:["dev","editor","heavy"]},{tag:"ok-live-example",path:"./editor/ok-live-example.ok.js",meta:["dev","editor","heavy"]},{tag:"ok-theme-editor",path:"./theming/ok-theme-editor/ok-theme-editor.ok.js",meta:["dev","editor","heavy"]},{tag:"ok-theme-editor-service",path:"./theming/ok-theme-editor/ok-theme-editor-service.ok.js",meta:["dev","editor","service"]},{tag:"i18n-service",path:"./i18n/i18n-service.ok.js",meta:["service"]},{tag:"i18n-editor",path:"./i18n/i18n-editor.ok.js",meta:["dev","editor"]},{tag:"ok-crash-info",path:"./errors/ok-crash-info.ok.js",meta:["dev","debug","service"]},{tag:"ok-sandbox",path:"./core/ok-sandbox.ok.js",meta:["ui","security"]},{tag:"ok-timeline",path:"./devtools/ok-timeline.ok.js",meta:["dev","performance"]},{tag:"ok-timeline-service",path:"./devtools/ok-timeline-service.ok.js",meta:["service","dev","performance"]}];export{e as base,o as default};
1
+ const e=a;!function(){const e=a,t=o();for(;;)try{if(314438==-parseInt(e(442))/1+parseInt(e(437))/2+-parseInt(e(435))/3*(-parseInt(e(370))/4)+-parseInt(e(449))/5*(-parseInt(e(440))/6)+parseInt(e(439))/7*(parseInt(e(432))/8)+parseInt(e(448))/9*(-parseInt(e(400))/10)+parseInt(e(407))/11*(-parseInt(e(436))/12))break;t.push(t.shift())}catch(e){t.push(t.shift())}}();const t=import.meta.url;function o(){const e=["12kDXuva","127578kWpCgO","ok-draggable","4073377tacCyu","5370fwXdiU","./modals/ok-modal-service.ok.js","415988ythCWO","heavy","ok-timeline-service","ok-picker-service","ok-resizer","debug","31095VtBqaJ","2705uUHYJi","security","ok-hotkeys-service","./devtools/ok-inspector-service.ok.js","i18n-editor","ok-live-example","./interaction/ok-flyover-panel.ok.js","./devtools/ok-console-service.ok.js","ok-highlight-service","./theming/ok-theme-editor/ok-theme-editor-service.ok.js","ok-toast-service","./interaction/ok-flyover.ok.js","ok-highlight","virtualized","./modals/ok-window.ok.js","./devtools/ok-timeline-service.ok.js","./interaction/ok-submenu.ok.js","ok-portal-service","ok-dropdown","ok-flyover-panel","./modals/ok-toast-service.ok.js","ok-timeline","./devtools/ok-fps-monitor-service.ok.js","./editor/ok-live-example.ok.js","ok-crash-info","reactive-sync-service","./core/virtualized.ok.js","8IlaOJI","ok-contextmenu","ok-marked","./core/ok-layer-service.ok.js","cdn","./interaction/ok-popout-service.ok.js","./navigation/hash-router.ok.js","ok-select","ok-theme-editor","./components/ok-doc-viewer.ok.js","ok-inspector","editor","ok-icon","./interaction/ok-draggable.ok.js","./core/transition.ok.js","./layout/ok-resizer.ok.js","./interaction/ok-contextmenu.ok.js","./i18n/i18n-service.ok.js","./interaction/ok-hotkeys-service.ok.js","ok-window","performance","./editor/ok-live-shell.ok.js","./interaction/ok-popout.ok.js","ok-overlay","./core/ok-sandbox.ok.js","ok-chart","service","./i18n/i18n-editor.ok.js","./behavior/async.ok.js","./navigation/history-router.ok.js","110gJlJyr","router","./interaction/ok-highlight-service.ok.js","./devtools/ok-console.ok.js","./theming/ok-theme-editor/ok-theme-editor.ok.js","ok-doc-viewer","./devtools/ok-inspector.ok.js","8199334sUrbxt","ok-modal","i18n-service","ok-layer-service","./elements/ok-icon.ok.js","ok-theme","history-router","./core/ok-overlay.ok.js","ok-theme-editor-service","ok-monaco","ok-submenu","./devtools/ok-fps-monitor.ok.js","./sync/reactive-sync-service.ok.js","./theming/ok-theme.ok.js","./interaction/ok-picker-service.ok.js","./errors/ok-crash-info.ok.js","async","ok-console-service","ok-fps-monitor","ok-console","./components/ok-monaco.ok.js","hash-router","ok-inspector-service","./elements/ok-select.ok.js","./elements/ok-table.ok.js","8SepaTW","dev","ok-fps-monitor-service","575895ZzQuDk"];return(o=function(){return e})()}function a(e,t){return e-=352,o()[e]}var i=[{tag:e(423),path:e(398),meta:["ui"]},{tag:e(412),path:e(420),meta:["ui"]},{tag:"transition",path:e(384),meta:["ui"]},{tag:e(356),path:e(369),meta:["ui","heavy"]},{tag:e(393),path:e(414),meta:["ui"]},{tag:"ok-layer",path:"./core/ok-layer.ok.js",meta:["ui"]},{tag:e(410),path:e(373),meta:[e(396)]},{tag:e(401),path:"./navigation/router.ok.js",meta:["ui"]},{tag:e(428),path:e(376),meta:["ui"]},{tag:e(413),path:e(399),meta:["ui"]},{tag:e(382),path:e(411),meta:["ui",e(374)]},{tag:"ok-table",path:e(431),meta:["ui",e(443)]},{tag:e(361),path:"./elements/ok-dropdown.ok.js",meta:["ui"]},{tag:e(377),path:e(430),meta:["ui"]},{tag:e(389),path:e(357),meta:["ui"]},{tag:e(408),path:"./modals/ok-modal.ok.js",meta:["ui"]},{tag:"ok-modal-service",path:e(441),meta:["service"]},{tag:e(353),path:e(363),meta:["service"]},{tag:e(371),path:e(386),meta:["ui"]},{tag:"ok-popout",path:e(392),meta:["ui"]},{tag:"ok-popout-service",path:e(375),meta:[e(396)]},{tag:e(445),path:e(421),meta:[e(396)]},{tag:e(417),path:e(359),meta:["ui"]},{tag:e(355),path:"./interaction/ok-highlight.ok.js",meta:["ui"]},{tag:e(457),path:e(402),meta:["ui",e(396)]},{tag:e(438),path:e(383),meta:["ui"]},{tag:"ok-flyover",path:e(354),meta:["ui"]},{tag:e(362),path:e(455),meta:["ui"]},{tag:e(451),path:e(388),meta:[e(396)]},{tag:"ok-dismiss-service",path:"./interaction/ok-dismiss-service.ok.js",meta:["service"]},{tag:e(360),path:"./interaction/ok-portal-service.ok.js",meta:[e(396)]},{tag:e(395),path:"./components/ok-chart.ok.js",meta:["ui",e(443)]},{tag:e(372),path:"./components/ok-marked.ok.js",meta:["ui",e(374)]},{tag:e(405),path:e(379),meta:["ui",e(374)]},{tag:e(416),path:e(427),meta:["dev",e(381),e(443),e(374)]},{tag:e(446),path:e(385),meta:["ui"]},{tag:e(368),path:e(419),meta:[e(396)]},{tag:e(426),path:e(403),meta:[e(433),e(447)]},{tag:e(424),path:e(456),meta:[e(433),e(447),e(396)]},{tag:e(425),path:e(418),meta:["dev",e(447)]},{tag:e(434),path:e(365),meta:["dev",e(447),e(396)]},{tag:e(380),path:e(406),meta:[e(433),e(443),e(447)]},{tag:e(429),path:e(452),meta:[e(433),e(447),e(396)]},{tag:"ok-js-tree",path:"./devtools/ok-js-tree.ok.js",meta:["dev",e(381)]},{tag:"ok-live-shell",path:e(391),meta:[e(433),e(381),"heavy"]},{tag:"ok-live-component",path:"./editor/ok-live-component.ok.js",meta:["dev",e(381),e(443)]},{tag:e(454),path:e(366),meta:["dev",e(381),e(443)]},{tag:e(378),path:e(404),meta:[e(433),e(381),e(443)]},{tag:e(415),path:e(352),meta:["dev",e(381),e(396)]},{tag:e(409),path:e(387),meta:["service"]},{tag:e(453),path:e(397),meta:[e(433),e(381)]},{tag:e(367),path:e(422),meta:[e(433),e(447),"service"]},{tag:"ok-sandbox",path:e(394),meta:["ui",e(450)]},{tag:e(364),path:"./devtools/ok-timeline.ok.js",meta:[e(433),e(390)]},{tag:e(444),path:e(358),meta:[e(396),"dev","performance"]}];export{t as base,i as default};
@@ -1 +1 @@
1
- import e from"../core/ok-layer.ok.js";import t from"../core/ok-layer-service.ok.js";import n from"../core/ok-overlay.ok.js";import o from"../interaction/ok-draggable.ok.js";import a from"./ok-modal.ok.js";let r=0;var l={tag:"ok-modal-service",dependencies:[t,e,n,o,a],template:'<if :="stack.length"><each :="stack" let:item="m"><ok-layer no-portal type="modal" tier="modal" :order="stack.indexOf(m)"><ok-overlay @request-close="onBackdropClick"><ok-draggable :no-drag="!m.canDrag" handle=".ok-modal__header"><ok-modal no-portal :no-close="!m.hasClose" :no-footer="m.footer == null" @close="onBackdropClick" :data-modal-id="m.id" aria-modal="true"><template name="title"><fragment :nodes="$ok.createNodes(m.title)" :context="m.context" :scope="m.scopeOverride"/></template><fragment :nodes="$ok.createNodes(m.content)" :context="m.context" :scope="m.scopeOverride"/><template name="footer"><fragment :nodes="$ok.createNodes(m.footer)" :context="m.context" :scope="m.scopeOverride"/></template></ok-modal></ok-draggable></ok-overlay></ok-layer></each></if>',register(e,t){e.shared.modal=e.proxy({stack:[],async open({content:n="",title:o="",footer:a,hasClose:l=!0,canClose:i=!0,canDrag:c=!0,onClosed:s=null,onOpened:d=null,owner:m=null,context:u=e=>({})}={}){const p=this,h=function(){let e,t,n=!1;return{promise:new Promise((o,a)=>{e=e=>{n||(n=!0,o(e))},t=e=>{n||(n=!0,a(e))}}),resolve:e,reject:t,get settled(){return n}}}(),f=e.proxy({id:++r,isOpen:!1,content:n,title:o,footer:a,hasClose:l,canClose:i,canDrag:c});let g=null;const k=e.proxy({get id(){return f.id},get isOpen(){return f.isOpen},get context(){return g},get content(){return f.content},set content(e){f.content=e},get title(){return f.title},set title(e){f.title=e},get footer(){return f.footer},set footer(e){f.footer=e},get hasClose(){return f.hasClose},set hasClose(e){f.hasClose=e},get canClose(){return f.canClose},set canClose(e){f.canClose=e},get canDrag(){return f.canDrag},set canDrag(e){f.canDrag=e},get scopeOverride(){return m?e=>({...e,$owner:m}):null},async open(){if(f.isOpen)return;await e.shared.layer.toggle("ok-modal-service",!0,{registration:t,layer:"modal"});const n=p.stack.indexOf(k);-1!==n&&p.stack.splice(n,1),p.stack.push(k),f.isOpen=!0,p._syncLocks(),await(d?.(this))},async close(){if(!f.isOpen||!f.canClose)return;const t=p.stack.indexOf(k);-1!==t&&p.stack.splice(t,1),f.isOpen=!1,p._syncLocks(),requestAnimationFrame(()=>e.shared.layer?.pruneEmpty?.()),p.stack.length||(await e.shared.layer.toggle("ok-modal-service",!1),requestAnimationFrame(()=>e.shared.layer?.pruneEmpty?.())),h.resolve(k),await(s?.(this))},toggle(e=null){(null===e?!this.isOpen:e)?this.open():this.close()},update(e={}){Object.assign(f,e)},bringToFront(){const e=p.stack.indexOf(k);-1!==e&&(p.stack.splice(e,1),p.stack.push(k))},get closed(){return h.promise},get opts(){return f}});return g=e.proxy(u(k)),await k.open(),k},async dialog(e={}){return e={confirmText:"OK",cancelText:"Cancel",hasConfirm:!0,canConfirm:!0,hasCancel:!0,canCancel:!0,data:e=>({}),...e},new Promise(async t=>{await this.open({context:n=>({confirmed:null,get modal(){return n},confirmText:e.confirmText,cancelText:e.cancelText,hasConfirm:e.hasConfirm,hasCancel:e.hasCancel,canConfirm:e.canConfirm,canCancel:e.canCancel,data:e.data(n),async confirm(){this.canConfirm&&(this.confirmed=!0,t(this),await n.close())},async cancel(){this.canCancel&&(this.confirmed=!1,t(this),await n.close())}}),footer:'<if :="hasConfirm"><button :disabled="!canConfirm" @click="confirm">{{ confirmText }}</button></if>\n <if :="hasCancel"><button :disabled="!canCancel" @click="cancel">{{ cancelText }}</button></if>',...e,onClosed(n){null===n.context.confirmed&&t(n.context),e.onClosed?.(n)},onOpened(t){t.context.result=null,e.onOpened?.(t)}})})},async confirm(e,t={}){return(await this.dialog({content:e,...t})).confirmed},async alert(e,t={}){return(await this.dialog({content:e,hasCancel:!1,hasClose:!0,...t})).confirmed},async prompt(e,t={}){const n={type:"text",title:"",value:"",label:"",placeholder:"",help:"",required:!1,min:void 0,max:void 0,step:void 0,minLength:void 0,maxLength:void 0,pattern:void 0,inputMode:void 0,autocomplete:void 0,spellcheck:!0,rows:4,autosize:!1,choices:null,coerce:"auto",sanitize:e=>e,validate:null,validateOn:"submit",confirmText:"OK",cancelText:"Cancel",hasCancel:!0,canCancel:!0,canConfirm:!0,hasConfirm:!0,returnRaw:!1,...t};const o=await this.dialog({...n,data:t=>({type:n.type,modal:t,message:e,value:void 0,choices:n.choices,label:n.label,placeholder:n.placeholder,rows:n.rows,autocomplete:n.autocomplete,inputmode:n.inputMode,spellcheck:n.spellcheck,isValidating:!1,error:"",async setValue(e){this.value=n.sanitize(e),t.context.canConfirm=!1,this.isValidating=!0,this.error=await async function(e){const t=function(e){if(n.required&&(""===e||null==e))return"Required";if("number"===n.type||"integer"===n.type){if(""!==e&&Number.isNaN(Number(e)))return"Not a number";const t=Number(e);if(null!=n.min&&t<n.min)return`Min ${n.min}`;if(null!=n.max&&t>n.max)return`Max ${n.max}`;if(n.step){const o=(t-(n.min??0))/n.step;if(""!==e&&Math.abs(o-Math.round(o))>1e-9)return`Step ${n.step}`}}return n.minLength&&String(e).length<n.minLength?`Min length ${n.minLength}`:n.maxLength&&String(e).length>n.maxLength?`Max length ${n.maxLength}`:!(n.pattern&&!new RegExp(n.pattern).test(String(e)))||"Invalid format"}(e);if(!0!==t)return t;if(n.validate){const t=await n.validate(e);if(!0!==t)return t||"Invalid"}return""}(this.value),this.isValidating=!1,this.error||(t.context.canConfirm=!0)}}),onOpened(e){e.context.data.setValue(n.value??"")},content:'<context :="data">\n <if :="isValidating">Validaing...</if>\n <p><fragment :nodes="$ok.createNodes(message)" /></p>\n <if :="type === \'text\' || type === \'email\' || type === \'password\' || type === \'number\' || type === \'date\' || type === \'time\' || type === \'datetime-local\'">\n <input :type :placeholder :value="value" @keypress:key.enter="modal.context.confirm()" :autocomplete :inputmode :spellcheck @ready="$el.focus()" @input="setValue($el.value)" />\n </if>\n <if :="type === \'textarea\'">\n <textarea :placeholder :value="value" :rows :autocomplete :spellcheck @ready="$el.focus()" @input="setValue($el.value)" />\n </if>\n <if :="type === \'select\'">\n <select @ready="$el.focus()" :value="value" @input="setValue($el.value)">\n <each :="choices" let:item>\n <option :value="item.value">{{ item.label }}</option>\n </each>\n </select>\n </if>\n <if :="type === \'checkbox\'">\n <label><input type="checkbox" :checked="!!value" @input="setValue($el.checked)" /> {{ label }}</label>\n </if>\n <if :="error"><div class="error">{{ error }}</div></if>\n </context>'});return o.confirmed?o.data.value:void 0},_locks:0,_syncLocks(){const e=this.stack.length>0;e&&!this._locks&&(document.documentElement.style.overflow="hidden"),!e&&this._locks&&(document.documentElement.style.overflow=""),this._locks=e?1:0}})},context:e=>({get stack(){return e.$ok.shared.modal.stack},get active(){return this.stack.at(-1)},onBackdropClick(e){const t=this.stack.at(-1);t?.opts?.noClose||t.close()}}),style:"[tag]{position:fixed;inset:0;z-index:var(--ok-z-modal,3000);pointer-events:auto;--ok-overlay_bg:var(--ok-modal-service_overlay-bg)}",plugins:{theme:{expose:{"--ok-modal-service_overlay-bg":{default:"var(--ok-overlay_bg)",type:"color",category:"Colors"}}}}};export{l as default};
1
+ import e from"../core/ok-layer.ok.js";import t from"../core/ok-layer-service.ok.js";import n from"../core/ok-overlay.ok.js";import o from"../interaction/ok-draggable.ok.js";import a from"./ok-modal.ok.js";const r=l;function s(){const e=["min","1820OgfyJi","splice","isNaN","stack","Min length ","integer","submit","footer","abs","7930074EnnFQM","color","ok-modal-service","style","content","label","isValidating","text","confirmed","layer","close","documentElement","round","2UfkRgD","Max ","opts","1582538sLamsx","choices","5153135cOCpWr","canCancel","canDrag","proxy","Colors","validate","resolve","coerce","isOpen","number","value","error","canClose","23336vtBgDM","Not a number","canConfirm","$ok","5058639CwjdYK","Invalid","hasClose","max","Min ","overflow","Invalid format","minLength","hasCancel","maxLength","type","placeholder","modal","var(--ok-overlay_bg)","spellcheck","_syncLocks",'<context :="data">\n <if :="isValidating">Validaing...</if>\n <p><fragment :nodes="$ok.createNodes(message)" /></p>\n <if :="type === \'text\' || type === \'email\' || type === \'password\' || type === \'number\' || type === \'date\' || type === \'time\' || type === \'datetime-local\'">\n <input :type :placeholder :value="value" @keypress:key.enter="modal.context.confirm()" :autocomplete :inputmode :spellcheck @ready="$el.focus()" @input="setValue($el.value)" />\n </if>\n <if :="type === \'textarea\'">\n <textarea :placeholder :value="value" :rows :autocomplete :spellcheck @ready="$el.focus()" @input="setValue($el.value)" />\n </if>\n <if :="type === \'select\'">\n <select @ready="$el.focus()" :value="value" @input="setValue($el.value)">\n <each :="choices" let:item>\n <option :value="item.value">{{ item.label }}</option>\n </each>\n </select>\n </if>\n <if :="type === \'checkbox\'">\n <label><input type="checkbox" :checked="!!value" @input="setValue($el.checked)" /> {{ label }}</label>\n </if>\n <if :="error"><div class="error">{{ error }}</div></if>\n </context>',"dialog","3482510rJJrIA","pattern",'<if :="stack.length"><each :="stack" let:item="m"><ok-layer no-portal type="modal" tier="modal" :order="stack.indexOf(m)"><ok-overlay @request-close="onBackdropClick"><ok-draggable :no-drag="!m.canDrag" handle=".ok-modal__header"><ok-modal no-portal :no-close="!m.hasClose" :no-footer="m.footer == null" @close="onBackdropClick" :data-modal-id="m.id" aria-modal="true"><template name="title"><fragment :nodes="$ok.createNodes(m.title)" :context="m.context" :scope="m.scopeOverride"/></template><fragment :nodes="$ok.createNodes(m.content)" :context="m.context" :scope="m.scopeOverride"/><template name="footer"><fragment :nodes="$ok.createNodes(m.footer)" :context="m.context" :scope="m.scopeOverride"/></template></ok-modal></ok-draggable></ok-overlay></ok-layer></each></if>',"_locks","open","cancelText","1659172MTYaed","step","hasConfirm","context","3FtRnHO","title","Required","data","time","indexOf","confirmText","shared","promise","test","length","onOpened","onClosed","datetime-local","Max length ","assign","sanitize","auto"];return(s=function(){return e})()}!function(){const e=l,t=s();for(;;)try{if(899575==parseInt(e(218))/1*(-parseInt(e(221))/2)+-parseInt(e(268))/3*(parseInt(e(264))/4)+parseInt(e(223))/5+parseInt(e(205))/6+-parseInt(e(196))/7*(-parseInt(e(236))/8)+-parseInt(e(240))/9+parseInt(e(258))/10)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();let c=0;function l(e,t){return e-=184,s()[e]}var i={tag:"ok-modal-service",dependencies:[t,e,n,o,a],template:r(260),register(e,t){const n=r;e.shared[n(252)]=e[n(226)]({stack:[],async open({content:o="",title:a="",footer:r,hasClose:s=!0,canClose:l=!0,canDrag:i=!0,onClosed:u=null,onOpened:d=null,owner:p=null,context:m=e=>({})}={}){const f=n,h=this,g=function(){let e,t,n=!1;return{promise:new Promise((o,a)=>{e=e=>{!n&&(n=!0,o(e))},t=e=>{!n&&(n=!0,a(e))}}),resolve:e,reject:t,get settled(){return n}}}(),k=e[f(226)]({id:++c,isOpen:!1,content:o,title:a,footer:r,hasClose:s,canClose:l,canDrag:i});let y=null;const v=e.proxy({get id(){return k.id},get isOpen(){return k.isOpen},get context(){return y},get content(){return k[f(209)]},set content(e){k.content=e},get title(){return k[f(269)]},set title(e){k[f(269)]=e},get footer(){return k[f(203)]},set footer(e){k[f(203)]=e},get hasClose(){return k[f(242)]},set hasClose(e){k[f(242)]=e},get canClose(){return k[f(235)]},set canClose(e){k.canClose=e},get canDrag(){return k[f(225)]},set canDrag(e){k[f(225)]=e},get scopeOverride(){return p?e=>({...e,$owner:p}):null},async open(){const n=f;if(k[n(231)])return;await e.shared[n(214)].toggle("ok-modal-service",!0,{registration:t,layer:n(252)});const o=h.stack.indexOf(v);-1!==o&&h[n(199)][n(197)](o,1),h[n(199)].push(v),k[n(231)]=!0,h[n(255)](),await(d?.(this))},async close(){const t=f;if(!k[t(231)]||!k.canClose)return;const n=h[t(199)][t(273)](v);-1!==n&&h[t(199)][t(197)](n,1),k.isOpen=!1,h[t(255)](),requestAnimationFrame(()=>e[t(184)][t(214)]?.pruneEmpty?.()),!h[t(199)][t(187)]&&(await e[t(184)].layer.toggle(t(207),!1),requestAnimationFrame(()=>e[t(184)].layer?.pruneEmpty?.())),g[t(229)](v),await(u?.(this))},toggle(e=null){const t=f;(null===e?!this[t(231)]:e)?this[t(262)]():this[t(215)]()},update(e={}){Object[f(192)](k,e)},bringToFront(){const e=f,t=h[e(199)][e(273)](v);-1!==t&&(h[e(199)][e(197)](t,1),h.stack.push(v))},get closed(){return g[f(185)]},get opts(){return k}});return y=e[f(226)](m(v)),await v[f(262)](),v},async dialog(e={}){return e={confirmText:"OK",cancelText:"Cancel",hasConfirm:!0,canConfirm:!0,hasCancel:!0,canCancel:!0,data:e=>({}),...e},new Promise(async t=>{await this.open({context(n){const o=l;return{confirmed:null,get modal(){return n},confirmText:e[o(274)],cancelText:e[o(263)],hasConfirm:e[o(266)],hasCancel:e[o(248)],canConfirm:e[o(238)],canCancel:e[o(224)],data:e[o(271)](n),async confirm(){const e=o;this[e(238)]&&(this[e(213)]=!0,t(this),await n[e(215)]())},async cancel(){const e=o;this.canCancel&&(this[e(213)]=!1,t(this),await n[e(215)]())}}},footer:'<if :="hasConfirm"><button :disabled="!canConfirm" @click="confirm">{{ confirmText }}</button></if>\n <if :="hasCancel"><button :disabled="!canCancel" @click="cancel">{{ cancelText }}</button></if>',...e,onClosed(n){const o=l;null===n[o(267)][o(213)]&&t(n[o(267)]),e[o(189)]?.(n)},onOpened(t){const n=l;t.context.result=null,e[n(188)]?.(t)}})})},async confirm(e,t={}){const o=n;return(await this[o(257)]({content:e,...t}))[o(213)]},async alert(e,t={}){const o=n;return(await this[o(257)]({content:e,hasCancel:!1,hasClose:!0,...t})).confirmed},async prompt(e,t={}){const o=n,a={type:o(212),title:"",value:"",label:"",placeholder:"",help:"",required:!1,min:void 0,max:void 0,step:void 0,minLength:void 0,maxLength:void 0,pattern:void 0,inputMode:void 0,autocomplete:void 0,spellcheck:!0,rows:4,autosize:!1,choices:null,coerce:o(194),sanitize:e=>e,validate:null,validateOn:o(202),confirmText:"OK",cancelText:"Cancel",hasCancel:!0,canCancel:!0,canConfirm:!0,hasConfirm:!0,returnRaw:!1,...t};const r=await this[o(257)]({...a,data(t){const n=o;return{type:a[n(250)],modal:t,message:e,value:void 0,choices:a[n(222)],label:a[n(210)],placeholder:a[n(251)],rows:a.rows,autocomplete:a.autocomplete,inputmode:a.inputMode,spellcheck:a[n(254)],isValidating:!1,error:"",async setValue(e){const r=n;this.value=a[r(193)](e),t[r(267)][r(238)]=!1,this[r(211)]=!0,this[r(234)]=await async function(e){const t=o,n=function(e){const t=o;if(a.required&&(""===e||null==e))return t(270);if(a.type===t(232)||a[t(250)]===t(201)){if(""!==e&&Number[t(198)](Number(e)))return t(237);const n=Number(e);if(null!=a[t(195)]&&n<a.min)return t(244)+a[t(195)];if(null!=a[t(243)]&&n>a[t(243)])return t(219)+a[t(243)];if(a.step){const o=(n-(a[t(195)]??0))/a[t(265)];if(""!==e&&Math[t(204)](o-Math[t(217)](o))>1e-9)return"Step "+a.step}}return a[t(247)]&&String(e)[t(187)]<a[t(247)]?t(200)+a[t(247)]:a[t(249)]&&String(e)[t(187)]>a[t(249)]?t(191)+a[t(249)]:!(a.pattern&&!new RegExp(a[t(259)])[t(186)](String(e)))||t(246)}(e);if(!0!==n)return n;if(a[t(228)]){const n=await a[t(228)](e);if(!0!==n)return n||t(241)}return""}(this[r(233)]),this[r(211)]=!1,!this.error&&(t[r(267)][r(238)]=!0)}}},onOpened(e){const t=o;e[t(267)].data.setValue(a[t(233)]??"")},content:o(256)});return r[o(213)]?r[o(271)][o(233)]:void 0},_locks:0,_syncLocks(){const e=n,t=this.stack.length>0;t&&!this._locks&&(document[e(216)][e(208)][e(245)]="hidden"),!t&&this[e(261)]&&(document[e(216)].style[e(245)]=""),this[e(261)]=t?1:0}})},context:e=>({get stack(){const t=l;return e[t(239)].shared[t(252)][t(199)]},get active(){return this[l(199)].at(-1)},onBackdropClick(e){const t=l,n=this[t(199)].at(-1);n?.[t(220)]?.noClose||n.close()}}),style:"[tag]{position:fixed;inset:0;z-index:var(--ok-z-modal,3000);pointer-events:auto;--ok-overlay_bg:var(--ok-modal-service_overlay-bg)}",plugins:{theme:{expose:{"--ok-modal-service_overlay-bg":{default:r(253),type:r(206),category:r(227)}}}}};export{i as default};
@@ -1 +1 @@
1
- import o from"../core/ok-layer-service.ok.js";import e from"../interaction/ok-portal-service.ok.js";var a={tag:"ok-modal",dependencies:[o,e],attr:{noClose:{empty:!0},noFooter:{empty:null},title:{default:null},noPortal:{empty:!0},layer:{default:"modal"}},context:o=>({close(){o.$el.dispatchEvent(new CustomEvent("close",{bubbles:!0}))}}),mount(o){o.$el.setAttribute("tabindex","-1"),o.$el.focus()},mounted(o){o.$attr.noPortal||requestAnimationFrame(async()=>{if(o.$__unmount__$||o.$attr.noPortal)return;const e=o.$ok.shared.layer,a=o.$ok.shared.portal;if(!e||!a)return;const r=await e.containerFor(o.$el,o.$attr.layer);!r||o.$__unmount__$||o.$attr.noPortal||(a.to(o.$el,r),o.$el.style.zIndex=String(e.resolveLocalZ?.(o.$attr.layer)??0),o.$el.style.pointerEvents="auto",o.$cache.modalPortalActive=!0)})},unmounted(o){o.$cache.modalPortalActive&&(o.$ok.shared.portal?.back(o.$el),o.$cache.modalPortalActive=!1)},template:'<div class="ok-modal__header"><div class="ok-modal__title"><slot name="title">{{$props.title || \'\' }}</slot></div><if :="!$props.noClose"><button class="ok-modal__close" @click="close" @mousedown="()=>{}">×</button></if></div><div class="ok-modal__body"><slot/><if :="$slots.footer"/></div><if :="!$props.noFooter"><div class="ok-modal__footer"><slot name="footer"/></div></if>',style:"[tag]{position:fixed;z-index:var(--ok-z-modal, 1001);display:flex;flex-direction:column;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--ok-bg, white);color:var(--ok_fg, black);border-radius:var(--ok-modal-radius, 0.5rem);border-color:var(--ok-modal-border-color, #eee);border-width:var(--ok-modal-border-width, 1px);border-style:solid;box-shadow:var(--ok-modal-shadow, 0 0 1rem rgba(0,0,0,0.2));max-height:90vh;overflow:hidden}[tag] .ok-modal__body{overflow-y:auto;padding:var(--ok-modal-padding, 1rem);max-height:100%}[tag] .ok-modal__footer,[tag] .ok-modal__header{display:flex;justify-content:space-between;align-items:center;padding:var(--ok-modal-header-padding, 0.5rem 1rem);border-color:var(--ok-modal-header-border-color, var(--ok-modal-border-color, #eee));border-style:solid}[tag] .ok-modal__header{border-width:0 0 var(--ok-modal-header-border-width, 1px)0}[tag] .ok-modal__footer{border-width:var(--ok-modal-header-border-width, 1px)0 0 0}[tag] .ok-modal__title{font-weight:700;flex-grow:1}[tag] .ok-modal__close{background:0 0;border:0;font-size:1.5rem;cursor:pointer;color:inherit;margin-inline-start:auto}",plugins:{theme:{expose:{"--ok-modal-radius":{default:"var(--ok_radius, 0.5rem)",type:"length",description:"Border radius of modal container",category:"Layout"},"--ok-modal-padding":{default:"var(--ok_padding, 1rem)",type:"length",description:"Padding inside modal",category:"Layout"},"--ok-modal-shadow":{default:"var(--ok_shadow, 0 0 1rem rgba(0,0,0,0.2))",type:"box-shadow",description:"Shadow around modal container",category:"Layout"}}}}};export{a as default};
1
+ import o from"../core/ok-layer-service.ok.js";import e from"../interaction/ok-portal-service.ok.js";function r(o,e){return o-=309,d()[o]}const t=r;!function(){const o=r,e=d();for(;;)try{if(450093==parseInt(o(344))/1+-parseInt(o(310))/2*(parseInt(o(323))/3)+parseInt(o(338))/4+parseInt(o(342))/5*(parseInt(o(318))/6)+-parseInt(o(324))/7*(parseInt(o(332))/8)+parseInt(o(311))/9*(-parseInt(o(320))/10)+parseInt(o(341))/11)break;e.push(e.shift())}catch(o){e.push(e.shift())}}();var a={tag:"ok-modal",dependencies:[o,e],attr:{noClose:{empty:!0},noFooter:{empty:null},title:{default:null},noPortal:{empty:!0},layer:{default:t(334)}},context:o=>({close(){o.$el.dispatchEvent(new CustomEvent("close",{bubbles:!0}))}}),mount(o){const e=t;o[e(322)][e(321)](e(348),"-1"),o[e(322)][e(327)]()},mounted(o){o.$attr.noPortal||requestAnimationFrame(async()=>{const e=r;if(o[e(345)]||o[e(329)].noPortal)return;const t=o[e(337)][e(326)].layer,a=o[e(337)][e(326)][e(316)];if(!t||!a)return;const d=await t[e(317)](o.$el,o[e(329)][e(340)]);!d||o[e(345)]||o[e(329)][e(346)]||(a.to(o[e(322)],d),o[e(322)][e(347)][e(325)]=String(t[e(314)]?.(o[e(329)].layer)??0),o[e(322)][e(347)].pointerEvents=e(313),o[e(331)][e(333)]=!0)})},unmounted(o){const e=t;o[e(331)][e(333)]&&(o[e(337)][e(326)].portal?.[e(350)](o[e(322)]),o[e(331)].modalPortalActive=!1)},template:t(315),style:t(330),plugins:{theme:{expose:{"--ok-modal-radius":{default:t(339),type:t(336),description:t(312),category:t(319)},"--ok-modal-padding":{default:t(335),type:"length",description:t(349),category:"Layout"},"--ok-modal-shadow":{default:t(328),type:t(343),description:t(309),category:t(319)}}}}};function d(){const o=["shared","focus","var(--ok_shadow, 0 0 1rem rgba(0,0,0,0.2))","$attr","[tag]{position:fixed;z-index:var(--ok-z-modal, 1001);display:flex;flex-direction:column;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--ok-bg, white);color:var(--ok_fg, black);border-radius:var(--ok-modal-radius, 0.5rem);border-color:var(--ok-modal-border-color, #eee);border-width:var(--ok-modal-border-width, 1px);border-style:solid;box-shadow:var(--ok-modal-shadow, 0 0 1rem rgba(0,0,0,0.2));max-height:90vh;overflow:hidden}[tag] .ok-modal__body{overflow-y:auto;padding:var(--ok-modal-padding, 1rem);max-height:100%}[tag] .ok-modal__footer,[tag] .ok-modal__header{display:flex;justify-content:space-between;align-items:center;padding:var(--ok-modal-header-padding, 0.5rem 1rem);border-color:var(--ok-modal-header-border-color, var(--ok-modal-border-color, #eee));border-style:solid}[tag] .ok-modal__header{border-width:0 0 var(--ok-modal-header-border-width, 1px)0}[tag] .ok-modal__footer{border-width:var(--ok-modal-header-border-width, 1px)0 0 0}[tag] .ok-modal__title{font-weight:700;flex-grow:1}[tag] .ok-modal__close{background:0 0;border:0;font-size:1.5rem;cursor:pointer;color:inherit;margin-inline-start:auto}","$cache","51424mhbJJF","modalPortalActive","modal","var(--ok_padding, 1rem)","length","$ok","3413504LekuyI","var(--ok_radius, 0.5rem)","layer","10727101lMawvQ","587905BcWqZK","box-shadow","76474sXXruU","$__unmount__$","noPortal","style","tabindex","Padding inside modal","back","Shadow around modal container","38dBeQEm","19863JDwBwT","Border radius of modal container","auto","resolveLocalZ",'<div class="ok-modal__header"><div class="ok-modal__title"><slot name="title">{{$props.title || \'\' }}</slot></div><if :="!$props.noClose"><button class="ok-modal__close" @click="close" @mousedown="()=>{}">×</button></if></div><div class="ok-modal__body"><slot/><if :="$slots.footer"/></div><if :="!$props.noFooter"><div class="ok-modal__footer"><slot name="footer"/></div></if>',"portal","containerFor","18CnwrAn","Layout","4030qHMLCv","setAttribute","$el","106422xoZxwD","266rmaMxW","zIndex"];return(d=function(){return o})()}export{a as default};
@@ -1 +1 @@
1
- import t from"../core/transition.ok.js";import o from"../core/ok-layer-service.ok.js";var a={tag:"ok-toast-service",dependencies:[o,{tag:"ok-toast",dependencies:[{tag:"transition",module:t}],attr:{class:{transform:(t,o)=>t.$ok.util.mergeClass(o,t.$attr.type)},icon:{default:""},content:{default:""},type:{default:"info"},duration:{default:5e3},noClose:{default:!1,empty:!0}},template:'<transition name="grow"><div><div class="ok-toast__wrapper"><div class="ok-toast__icon"><if :="$props.icon"><fragment :nodes="$ok.createNodes($props.icon)"/><else>{{ { info: \'💬\', success: \'✅\', error: \'🛑\', warn: \'⚠️\' }[$props.type] || \'\' }}</else></if></div><div class="ok-toast__content"><slot><fragment :nodes="$ok.createNodes($props.content)"/></slot></div><if :="!$props.noClose"><button class="ok-toast__close" @click="$cmp.$dispatch(\'close\')">×</button></if><if :="$props.duration > 0"><div class="ok-toast__progress"><div class="ok-toast__bar" :style="{ animationDuration: $props.duration + \'ms\' }"/></div></if></div></div></transition>',style:"@keyframes ok-toast__progress{to{transform:translateX(-100%)}}[tag]{display:block}[tag] .ok-toast__wrapper{display:flex;align-items:center;gap:.75rem 1rem;padding:.5rem;border-radius:var(--ok-toast-radius, 6px);box-shadow:var(--ok-toast-shadow, 0 4px 12px rgba(0,0,0,0.2));background:var(--ok-toast-bg, #fff);color:var(--ok-toast-color, #000);border:1px solid var(--ok-toast-border, #ccc);position:relative;pointer-events:auto;min-width:240px;overflow:hidden}[tag] .ok-toast__close,[tag] .ok-toast__icon{background-size:contain;background-repeat:no-repeat;background-position:center}[tag] .ok-toast__close{all:unset;border:0;cursor:pointer}[tag] .ok-toast__content{flex-grow:1;font-size:.875rem}[tag] .ok-toast__progress{position:absolute;bottom:0;left:0;height:3px;width:100%;overflow:hidden}[tag] .ok-toast__bar{height:100%;width:100%;animation:ok-toast__progress linear forwards}[tag].info .ok-toast__bar{background:var(--ok-toast-info, #999)}[tag].success .ok-toast__bar{background:var(--ok-toast-success, #12C178)}[tag].error .ok-toast__bar{background:var(--ok-toast-error, #cd7070)}[tag].warn .ok-toast__bar{background:var(--ok-toast-warn, orange)}",plugins:{theme:{expose:{"--ok-toast-radius":{default:"6px",type:"length",category:"Toast"},"--ok-toast-shadow":{default:"0 4px 12px rgba(0,0,0,0.2)",type:"box-shadow",category:"Toast"},"--ok-toast-bg":{default:"#fff",type:"color",category:"Toast"},"--ok-toast-color":{default:"#000",type:"color",category:"Toast"},"--ok-toast-border":{default:"#ccc",type:"color",category:"Toast"},"--ok-toast-info":{default:"#4d7adf",type:"color",category:"Toast"},"--ok-toast-success":{default:"#12C178",type:"color",category:"Toast"},"--ok-toast-error":{default:"#cd7070",type:"color",category:"Toast"},"--ok-toast-warn":{default:"#ef7731",type:"color",category:"Toast"}}}},_toolkit:!0}],register(t,o){t.shared.toast=t.proxy({toasts:[],async add(a){await t.shared.layer.toggle("ok-toast-service",!0,{registration:o,layer:"toast"}).then(()=>{const o=t.proxy({id:Math.random().toString(36).slice(2),type:"info",duration:5e3,...a});this.toasts.push(o),o.duration>0&&setTimeout(()=>this.remove(o),o.duration)})},async info(t,o){await this.add({type:"info",content:t,...o})},async success(t,o){await this.add({type:"success",content:t,...o})},async error(t,o){await this.add({type:"error",content:t,...o})},async warn(t,o){await this.add({type:"warn",content:t,...o})},async clear(){this.toasts=[],await t.shared.layer.toggle("ok-toast-service",!1)},async remove(o){const a=this.toasts.indexOf(o);a>=0&&this.toasts.splice(a,1),this.toasts.length||await t.shared.layer.toggle("ok-toast-service",!1)}})},context:t=>({toast:t.$ok.shared.toast}),template:'<div class="ok-toast">\n <each :of="toast.toasts" let:item>\n <ok-toast :duration="item.duration" :content="item.content" :type="item.type" @close="toast.remove(item)" />\n </each>\n </div>',style:"\n [tag] {\n position: absolute;\n bottom: 1rem;\n right: 1rem;\n z-index: var(--ok-z-toast, 4000);\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n pointer-events: none;\n }"};export{a as default};
1
+ import t from"../core/transition.ok.js";import o from"../core/ok-layer-service.ok.js";const a=s;function e(){const t=["remove",'<div class="ok-toast">\n <each :of="toast.toasts" let:item>\n <ok-toast :duration="item.duration" :content="item.content" :type="item.type" @close="toast.remove(item)" />\n </each>\n </div>',"Toast","add","toasts","box-shadow","transition","slice","toString","11RmeoPP","type","#4d7adf","566tsPEfQ","#cd7070","$ok","6767180dsqOYe","splice","5MoHrNS","toast","#12C178","proxy","1070124vBwDIA","util","0 4px 12px rgba(0,0,0,0.2)","length","shared","9ddXrma","@keyframes ok-toast__progress{to{transform:translateX(-100%)}}[tag]{display:block}[tag] .ok-toast__wrapper{display:flex;align-items:center;gap:.75rem 1rem;padding:.5rem;border-radius:var(--ok-toast-radius, 6px);box-shadow:var(--ok-toast-shadow, 0 4px 12px rgba(0,0,0,0.2));background:var(--ok-toast-bg, #fff);color:var(--ok-toast-color, #000);border:1px solid var(--ok-toast-border, #ccc);position:relative;pointer-events:auto;min-width:240px;overflow:hidden}[tag] .ok-toast__close,[tag] .ok-toast__icon{background-size:contain;background-repeat:no-repeat;background-position:center}[tag] .ok-toast__close{all:unset;border:0;cursor:pointer}[tag] .ok-toast__content{flex-grow:1;font-size:.875rem}[tag] .ok-toast__progress{position:absolute;bottom:0;left:0;height:3px;width:100%;overflow:hidden}[tag] .ok-toast__bar{height:100%;width:100%;animation:ok-toast__progress linear forwards}[tag].info .ok-toast__bar{background:var(--ok-toast-info, #999)}[tag].success .ok-toast__bar{background:var(--ok-toast-success, #12C178)}[tag].error .ok-toast__bar{background:var(--ok-toast-error, #cd7070)}[tag].warn .ok-toast__bar{background:var(--ok-toast-warn, orange)}","ok-toast","2941328gryqYq","error","ok-toast-service","#fff","25319qTNDIz","mergeClass","\n [tag] {\n position: absolute;\n bottom: 1rem;\n right: 1rem;\n z-index: var(--ok-z-toast, 4000);\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n pointer-events: none;\n }","then","push","#ccc","duration","942IXetWK","643548dXdoap","layer","toggle","16490088jKxiBo","1316CcjTrj",'<transition name="grow"><div><div class="ok-toast__wrapper"><div class="ok-toast__icon"><if :="$props.icon"><fragment :nodes="$ok.createNodes($props.icon)"/><else>{{ { info: \'💬\', success: \'✅\', error: \'🛑\', warn: \'⚠️\' }[$props.type] || \'\' }}</else></if></div><div class="ok-toast__content"><slot><fragment :nodes="$ok.createNodes($props.content)"/></slot></div><if :="!$props.noClose"><button class="ok-toast__close" @click="$cmp.$dispatch(\'close\')">×</button></if><if :="$props.duration > 0"><div class="ok-toast__progress"><div class="ok-toast__bar" :style="{ animationDuration: $props.duration + \'ms\' }"/></div></if></div></div></transition>',"color"];return(e=function(){return t})()}function s(t,o){return t-=252,e()[t]}!function(){const t=s,o=e();for(;;)try{if(357222==-parseInt(t(279))/1*(-parseInt(t(264))/2)+parseInt(t(260))/3+parseInt(t(288))/4*(parseInt(t(284))/5)+-parseInt(t(259))/6*(-parseInt(t(252))/7)+-parseInt(t(296))/8+-parseInt(t(293))/9*(-parseInt(t(282))/10)+parseInt(t(276))/11*(-parseInt(t(263))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}();var r={tag:"ok-toast-service",dependencies:[o,{tag:a(295),dependencies:[{tag:a(273),module:t}],attr:{class:{transform(t,o){const e=a;return t[e(281)][e(289)][e(253)](o,t.$attr[e(277)])}},icon:{default:""},content:{default:""},type:{default:"info"},duration:{default:5e3},noClose:{default:!1,empty:!0}},template:a(265),style:a(294),plugins:{theme:{expose:{"--ok-toast-radius":{default:"6px",type:a(291),category:a(269)},"--ok-toast-shadow":{default:a(290),type:a(272),category:a(269)},"--ok-toast-bg":{default:a(299),type:a(266),category:a(269)},"--ok-toast-color":{default:"#000",type:a(266),category:"Toast"},"--ok-toast-border":{default:a(257),type:a(266),category:"Toast"},"--ok-toast-info":{default:a(278),type:a(266),category:a(269)},"--ok-toast-success":{default:a(286),type:a(266),category:a(269)},"--ok-toast-error":{default:a(280),type:"color",category:a(269)},"--ok-toast-warn":{default:"#ef7731",type:a(266),category:a(269)}}}},_toolkit:!0}],register(t,o){const e=a;t[e(292)][e(285)]=t[e(287)]({toasts:[],async add(a){const s=e;await t[s(292)][s(261)][s(262)](s(298),!0,{registration:o,layer:s(285)})[s(255)](()=>{const o=s,e=t[o(287)]({id:Math.random()[o(275)](36)[o(274)](2),type:"info",duration:5e3,...a});this[o(271)][o(256)](e),e[o(258)]>0&&setTimeout(()=>this[o(267)](e),e[o(258)])})},async info(t,o){await this.add({type:"info",content:t,...o})},async success(t,o){const a=e;await this[a(270)]({type:"success",content:t,...o})},async error(t,o){const a=e;await this.add({type:a(297),content:t,...o})},async warn(t,o){const a=e;await this[a(270)]({type:"warn",content:t,...o})},async clear(){const o=e;this[o(271)]=[],await t[o(292)][o(261)][o(262)]("ok-toast-service",!1)},async remove(o){const a=e,s=this.toasts.indexOf(o);s>=0&&this[a(271)][a(283)](s,1),this[a(271)][a(291)]||await t[a(292)][a(261)].toggle(a(298),!1)}})},context(t){const o=a;return{toast:t[o(281)][o(292)][o(285)]}},template:a(268),style:a(254)};export{r as default};