@drjoshcsimmons/scl 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +73 -0
- package/dist/components/ui/accordion/accordion.d.ts +8 -0
- package/dist/components/ui/accordion/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion/index.d.ts +2 -0
- package/dist/components/ui/accordion/index.d.ts.map +1 -0
- package/dist/components/ui/alert/alert.d.ts +9 -0
- package/dist/components/ui/alert/alert.d.ts.map +1 -0
- package/dist/components/ui/alert/index.d.ts +2 -0
- package/dist/components/ui/alert/index.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts +21 -0
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog/index.d.ts +2 -0
- package/dist/components/ui/alert-dialog/index.d.ts.map +1 -0
- package/dist/components/ui/avatar/avatar.d.ts +7 -0
- package/dist/components/ui/avatar/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar/index.d.ts +2 -0
- package/dist/components/ui/avatar/index.d.ts.map +1 -0
- package/dist/components/ui/badge/badge.d.ts +10 -0
- package/dist/components/ui/badge/badge.d.ts.map +1 -0
- package/dist/components/ui/badge/index.d.ts +2 -0
- package/dist/components/ui/badge/index.d.ts.map +1 -0
- package/dist/components/ui/button/button.d.ts +12 -0
- package/dist/components/ui/button/button.d.ts.map +1 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.d.ts.map +1 -0
- package/dist/components/ui/card/card.d.ts +9 -0
- package/dist/components/ui/card/card.d.ts.map +1 -0
- package/dist/components/ui/card/index.d.ts +2 -0
- package/dist/components/ui/card/index.d.ts.map +1 -0
- package/dist/components/ui/checkbox/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox/index.d.ts +2 -0
- package/dist/components/ui/checkbox/index.d.ts.map +1 -0
- package/dist/components/ui/collapsible/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible/index.d.ts +2 -0
- package/dist/components/ui/collapsible/index.d.ts.map +1 -0
- package/dist/components/ui/dialog/dialog.d.ts +20 -0
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog/index.d.ts +2 -0
- package/dist/components/ui/dialog/index.d.ts.map +1 -0
- package/dist/components/ui/dithered-image/dithered-image.d.ts +17 -0
- package/dist/components/ui/dithered-image/dithered-image.d.ts.map +1 -0
- package/dist/components/ui/dithered-image/index.d.ts +3 -0
- package/dist/components/ui/dithered-image/index.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +2 -0
- package/dist/components/ui/dropdown-menu/index.d.ts.map +1 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/index.d.ts.map +1 -0
- package/dist/components/ui/input/input.d.ts +5 -0
- package/dist/components/ui/input/input.d.ts.map +1 -0
- package/dist/components/ui/label/index.d.ts +2 -0
- package/dist/components/ui/label/index.d.ts.map +1 -0
- package/dist/components/ui/label/label.d.ts +6 -0
- package/dist/components/ui/label/label.d.ts.map +1 -0
- package/dist/components/ui/popover/index.d.ts +2 -0
- package/dist/components/ui/popover/index.d.ts.map +1 -0
- package/dist/components/ui/popover/popover.d.ts +8 -0
- package/dist/components/ui/popover/popover.d.ts.map +1 -0
- package/dist/components/ui/progress/index.d.ts +2 -0
- package/dist/components/ui/progress/index.d.ts.map +1 -0
- package/dist/components/ui/progress/progress.d.ts +19 -0
- package/dist/components/ui/progress/progress.d.ts.map +1 -0
- package/dist/components/ui/radio-group/index.d.ts +2 -0
- package/dist/components/ui/radio-group/index.d.ts.map +1 -0
- package/dist/components/ui/radio-group/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/ui/scroll-area/index.d.ts +2 -0
- package/dist/components/ui/scroll-area/index.d.ts.map +1 -0
- package/dist/components/ui/scroll-area/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/select/index.d.ts +2 -0
- package/dist/components/ui/select/index.d.ts.map +1 -0
- package/dist/components/ui/select/select.d.ts +14 -0
- package/dist/components/ui/select/select.d.ts.map +1 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/index.d.ts.map +1 -0
- package/dist/components/ui/separator/separator.d.ts +5 -0
- package/dist/components/ui/separator/separator.d.ts.map +1 -0
- package/dist/components/ui/sheet/index.d.ts +2 -0
- package/dist/components/ui/sheet/index.d.ts.map +1 -0
- package/dist/components/ui/sheet/sheet.d.ts +26 -0
- package/dist/components/ui/sheet/sheet.d.ts.map +1 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/skeleton/index.d.ts.map +1 -0
- package/dist/components/ui/skeleton/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/ui/slider/index.d.ts +2 -0
- package/dist/components/ui/slider/index.d.ts.map +1 -0
- package/dist/components/ui/slider/slider.d.ts +5 -0
- package/dist/components/ui/slider/slider.d.ts.map +1 -0
- package/dist/components/ui/statusline/index.d.ts +2 -0
- package/dist/components/ui/statusline/index.d.ts.map +1 -0
- package/dist/components/ui/statusline/statusline.d.ts +40 -0
- package/dist/components/ui/statusline/statusline.d.ts.map +1 -0
- package/dist/components/ui/switch/index.d.ts +2 -0
- package/dist/components/ui/switch/index.d.ts.map +1 -0
- package/dist/components/ui/switch/switch.d.ts +5 -0
- package/dist/components/ui/switch/switch.d.ts.map +1 -0
- package/dist/components/ui/table/index.d.ts +2 -0
- package/dist/components/ui/table/index.d.ts.map +1 -0
- package/dist/components/ui/table/table.d.ts +11 -0
- package/dist/components/ui/table/table.d.ts.map +1 -0
- package/dist/components/ui/tabs/index.d.ts +2 -0
- package/dist/components/ui/tabs/index.d.ts.map +1 -0
- package/dist/components/ui/tabs/tabs.d.ts +8 -0
- package/dist/components/ui/tabs/tabs.d.ts.map +1 -0
- package/dist/components/ui/terminal-textarea/index.d.ts +2 -0
- package/dist/components/ui/terminal-textarea/index.d.ts.map +1 -0
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +27 -0
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.d.ts.map +1 -0
- package/dist/components/ui/textarea/textarea.d.ts +5 -0
- package/dist/components/ui/textarea/textarea.d.ts.map +1 -0
- package/dist/components/ui/toggle/index.d.ts +2 -0
- package/dist/components/ui/toggle/index.d.ts.map +1 -0
- package/dist/components/ui/toggle/toggle.d.ts +13 -0
- package/dist/components/ui/toggle/toggle.d.ts.map +1 -0
- package/dist/components/ui/tooltip/index.d.ts +2 -0
- package/dist/components/ui/tooltip/index.d.ts.map +1 -0
- package/dist/components/ui/tooltip/tooltip.d.ts +11 -0
- package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +165 -0
- package/dist/index10.js +61 -0
- package/dist/index100.js +32 -0
- package/dist/index101.js +17 -0
- package/dist/index102.js +137 -0
- package/dist/index103.js +52 -0
- package/dist/index104.js +11 -0
- package/dist/index105.js +6 -0
- package/dist/index106.js +183 -0
- package/dist/index107.js +652 -0
- package/dist/index108.js +109 -0
- package/dist/index109.js +93 -0
- package/dist/index11.js +27 -0
- package/dist/index110.js +69 -0
- package/dist/index111.js +161 -0
- package/dist/index112.js +399 -0
- package/dist/index113.js +1682 -0
- package/dist/index114.js +280 -0
- package/dist/index115.js +134 -0
- package/dist/index116.js +34 -0
- package/dist/index117.js +1613 -0
- package/dist/index118.js +300 -0
- package/dist/index119.js +637 -0
- package/dist/index12.js +7 -0
- package/dist/index120.js +146 -0
- package/dist/index121.js +23 -0
- package/dist/index122.js +11 -0
- package/dist/index123.js +40 -0
- package/dist/index124.js +20 -0
- package/dist/index125.js +8 -0
- package/dist/index126.js +14 -0
- package/dist/index127.js +208 -0
- package/dist/index128.js +24 -0
- package/dist/index129.js +402 -0
- package/dist/index13.js +100 -0
- package/dist/index130.js +1308 -0
- package/dist/index131.js +620 -0
- package/dist/index132.js +4 -0
- package/dist/index133.js +55 -0
- package/dist/index134.js +67 -0
- package/dist/index135.js +27 -0
- package/dist/index136.js +31 -0
- package/dist/index137.js +7 -0
- package/dist/index138.js +4 -0
- package/dist/index139.js +4 -0
- package/dist/index14.js +226 -0
- package/dist/index140.js +7 -0
- package/dist/index141.js +5 -0
- package/dist/index142.js +26 -0
- package/dist/index143.js +115 -0
- package/dist/index144.js +18 -0
- package/dist/index145.js +527 -0
- package/dist/index146.js +130 -0
- package/dist/index147.js +136 -0
- package/dist/index148.js +67 -0
- package/dist/index149.js +71 -0
- package/dist/index15.js +146 -0
- package/dist/index150.js +11 -0
- package/dist/index151.js +16 -0
- package/dist/index152.js +68 -0
- package/dist/index153.js +6 -0
- package/dist/index154.js +25 -0
- package/dist/index155.js +25 -0
- package/dist/index156.js +15 -0
- package/dist/index157.js +30 -0
- package/dist/index158.js +7 -0
- package/dist/index16.js +21 -0
- package/dist/index17.js +19 -0
- package/dist/index18.js +24 -0
- package/dist/index19.js +58 -0
- package/dist/index2.js +8 -0
- package/dist/index20.js +31 -0
- package/dist/index21.js +38 -0
- package/dist/index22.js +123 -0
- package/dist/index23.js +24 -0
- package/dist/index24.js +72 -0
- package/dist/index25.js +17 -0
- package/dist/index26.js +34 -0
- package/dist/index27.js +81 -0
- package/dist/index28.js +27 -0
- package/dist/index29.js +90 -0
- package/dist/index3.js +22 -0
- package/dist/index30.js +46 -0
- package/dist/index31.js +234 -0
- package/dist/index32.js +20 -0
- package/dist/index33.js +37 -0
- package/dist/index34.js +25 -0
- package/dist/index35.js +105 -0
- package/dist/index36.js +68 -0
- package/dist/index37.js +51 -0
- package/dist/index38.js +102 -0
- package/dist/index39.js +13 -0
- package/dist/index4.js +46 -0
- package/dist/index40.js +17 -0
- package/dist/index41.js +2265 -0
- package/dist/index42.js +35 -0
- package/dist/index43.js +20 -0
- package/dist/index44.js +239 -0
- package/dist/index45.js +13 -0
- package/dist/index46.js +75 -0
- package/dist/index47.js +251 -0
- package/dist/index48.js +11 -0
- package/dist/index49.js +338 -0
- package/dist/index5.js +51 -0
- package/dist/index50.js +62 -0
- package/dist/index51.js +243 -0
- package/dist/index52.js +862 -0
- package/dist/index53.js +11 -0
- package/dist/index54.js +120 -0
- package/dist/index55.js +227 -0
- package/dist/index56.js +13 -0
- package/dist/index57.js +13 -0
- package/dist/index58.js +238 -0
- package/dist/index59.js +262 -0
- package/dist/index6.js +51 -0
- package/dist/index60.js +14 -0
- package/dist/index61.js +24 -0
- package/dist/index62.js +532 -0
- package/dist/index63.js +6157 -0
- package/dist/index64.js +2635 -0
- package/dist/index65.js +300 -0
- package/dist/index66.js +674 -0
- package/dist/index67.js +832 -0
- package/dist/index68.js +27 -0
- package/dist/index69.js +330 -0
- package/dist/index7.js +42 -0
- package/dist/index70.js +4901 -0
- package/dist/index71.js +831 -0
- package/dist/index72.js +1260 -0
- package/dist/index73.js +536 -0
- package/dist/index74.js +127 -0
- package/dist/index75.js +163 -0
- package/dist/index76.js +33 -0
- package/dist/index77.js +437 -0
- package/dist/index78.js +132 -0
- package/dist/index79.js +83 -0
- package/dist/index8.js +31 -0
- package/dist/index80.js +70 -0
- package/dist/index81.js +48 -0
- package/dist/index82.js +29 -0
- package/dist/index83.js +9 -0
- package/dist/index84.js +54 -0
- package/dist/index85.js +36 -0
- package/dist/index86.js +13 -0
- package/dist/index87.js +10 -0
- package/dist/index88.js +32 -0
- package/dist/index89.js +57 -0
- package/dist/index9.js +54 -0
- package/dist/index90.js +13 -0
- package/dist/index91.js +6 -0
- package/dist/index92.js +15 -0
- package/dist/index93.js +8 -0
- package/dist/index94.js +27 -0
- package/dist/index95.js +71 -0
- package/dist/index96.js +127 -0
- package/dist/index97.js +221 -0
- package/dist/index98.js +16 -0
- package/dist/index99.js +56 -0
- package/dist/lib/utils.d.ts +14 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/tokens/animations.d.ts +174 -0
- package/dist/tokens/animations.d.ts.map +1 -0
- package/dist/tokens/colors.d.ts +92 -0
- package/dist/tokens/colors.d.ts.map +1 -0
- package/dist/tokens/index.d.ts +403 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/shadows.d.ts +15 -0
- package/dist/tokens/shadows.d.ts.map +1 -0
- package/dist/tokens/spacing.d.ts +55 -0
- package/dist/tokens/spacing.d.ts.map +1 -0
- package/dist/tokens/typography.d.ts +80 -0
- package/dist/tokens/typography.d.ts.map +1 -0
- package/package.json +128 -0
package/dist/index131.js
ADDED
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
let I = /* @__PURE__ */ "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((n) => n ? parseInt(n, 36) : 1);
|
|
2
|
+
for (let n = 1; n < I.length; n++)
|
|
3
|
+
I[n] += I[n - 1];
|
|
4
|
+
function q(n) {
|
|
5
|
+
return n >= 56320 && n < 57344;
|
|
6
|
+
}
|
|
7
|
+
function j(n) {
|
|
8
|
+
return n >= 55296 && n < 56320;
|
|
9
|
+
}
|
|
10
|
+
function O(n, t) {
|
|
11
|
+
let e = n.charCodeAt(t);
|
|
12
|
+
if (!j(e) || t + 1 == n.length)
|
|
13
|
+
return e;
|
|
14
|
+
let i = n.charCodeAt(t + 1);
|
|
15
|
+
return q(i) ? (e - 55296 << 10) + (i - 56320) + 65536 : e;
|
|
16
|
+
}
|
|
17
|
+
function V(n) {
|
|
18
|
+
return n <= 65535 ? String.fromCharCode(n) : (n -= 65536, String.fromCharCode((n >> 10) + 55296, (n & 1023) + 56320));
|
|
19
|
+
}
|
|
20
|
+
function G(n) {
|
|
21
|
+
return n < 65536 ? 1 : 2;
|
|
22
|
+
}
|
|
23
|
+
var y = /* @__PURE__ */ function(n) {
|
|
24
|
+
return n[n.Simple = 0] = "Simple", n[n.TrackDel = 1] = "TrackDel", n[n.TrackBefore = 2] = "TrackBefore", n[n.TrackAfter = 3] = "TrackAfter", n;
|
|
25
|
+
}(y || (y = {}));
|
|
26
|
+
class z {
|
|
27
|
+
/**
|
|
28
|
+
@internal
|
|
29
|
+
*/
|
|
30
|
+
constructor(t) {
|
|
31
|
+
this.map = t;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this
|
|
35
|
+
type.
|
|
36
|
+
*/
|
|
37
|
+
of(t) {
|
|
38
|
+
return new k(this, t);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
class k {
|
|
42
|
+
/**
|
|
43
|
+
@internal
|
|
44
|
+
*/
|
|
45
|
+
constructor(t, e) {
|
|
46
|
+
this.type = t, this.value = e;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
Map this effect through a position mapping. Will return
|
|
50
|
+
`undefined` when that ends up deleting the effect.
|
|
51
|
+
*/
|
|
52
|
+
map(t) {
|
|
53
|
+
let e = this.type.map(this.value, t);
|
|
54
|
+
return e === void 0 ? void 0 : e == this.value ? this : new k(this.type, e);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
Tells you whether this effect object is of a given
|
|
58
|
+
[type](https://codemirror.net/6/docs/ref/#state.StateEffectType).
|
|
59
|
+
*/
|
|
60
|
+
is(t) {
|
|
61
|
+
return this.type == t;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
Define a new effect type. The type parameter indicates the type
|
|
65
|
+
of values that his effect holds.
|
|
66
|
+
*/
|
|
67
|
+
static define(t = {}) {
|
|
68
|
+
return new z(t.map || ((e) => e));
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
Map an array of effects through a change set.
|
|
72
|
+
*/
|
|
73
|
+
static mapEffects(t, e) {
|
|
74
|
+
if (!t.length)
|
|
75
|
+
return t;
|
|
76
|
+
let i = [];
|
|
77
|
+
for (let s of t) {
|
|
78
|
+
let h = s.map(e);
|
|
79
|
+
h && i.push(h);
|
|
80
|
+
}
|
|
81
|
+
return i;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
k.reconfigure = /* @__PURE__ */ k.define();
|
|
85
|
+
k.appendConfig = /* @__PURE__ */ k.define();
|
|
86
|
+
let M;
|
|
87
|
+
try {
|
|
88
|
+
M = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
|
|
89
|
+
} catch {
|
|
90
|
+
}
|
|
91
|
+
y.TrackDel;
|
|
92
|
+
class S {
|
|
93
|
+
constructor(t, e, i) {
|
|
94
|
+
this.from = t, this.to = e, this.value = i;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
@internal
|
|
98
|
+
*/
|
|
99
|
+
static create(t, e, i) {
|
|
100
|
+
return new S(t, e, i);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function T(n, t) {
|
|
104
|
+
return n.from - t.from || n.value.startSide - t.value.startSide;
|
|
105
|
+
}
|
|
106
|
+
class E {
|
|
107
|
+
constructor(t, e, i, s) {
|
|
108
|
+
this.from = t, this.to = e, this.value = i, this.maxPoint = s;
|
|
109
|
+
}
|
|
110
|
+
get length() {
|
|
111
|
+
return this.to[this.to.length - 1];
|
|
112
|
+
}
|
|
113
|
+
// Find the index of the given position and side. Use the ranges'
|
|
114
|
+
// `from` pos when `end == false`, `to` when `end == true`.
|
|
115
|
+
findIndex(t, e, i, s = 0) {
|
|
116
|
+
let h = i ? this.to : this.from;
|
|
117
|
+
for (let r = s, o = h.length; ; ) {
|
|
118
|
+
if (r == o)
|
|
119
|
+
return r;
|
|
120
|
+
let a = r + o >> 1, l = h[a] - t || (i ? this.value[a].endSide : this.value[a].startSide) - e;
|
|
121
|
+
if (a == r)
|
|
122
|
+
return l >= 0 ? r : o;
|
|
123
|
+
l >= 0 ? o = a : r = a + 1;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
between(t, e, i, s) {
|
|
127
|
+
for (let h = this.findIndex(e, -1e9, !0), r = this.findIndex(i, 1e9, !1, h); h < r; h++)
|
|
128
|
+
if (s(this.from[h] + t, this.to[h] + t, this.value[h]) === !1)
|
|
129
|
+
return !1;
|
|
130
|
+
}
|
|
131
|
+
map(t, e) {
|
|
132
|
+
let i = [], s = [], h = [], r = -1, o = -1;
|
|
133
|
+
for (let a = 0; a < this.value.length; a++) {
|
|
134
|
+
let l = this.value[a], u = this.from[a] + t, c = this.to[a] + t, d, m;
|
|
135
|
+
if (u == c) {
|
|
136
|
+
let C = e.mapPos(u, l.startSide, l.mapMode);
|
|
137
|
+
if (C == null || (d = m = C, l.startSide != l.endSide && (m = e.mapPos(u, l.endSide), m < d)))
|
|
138
|
+
continue;
|
|
139
|
+
} else if (d = e.mapPos(u, l.startSide), m = e.mapPos(c, l.endSide), d > m || d == m && l.startSide > 0 && l.endSide <= 0)
|
|
140
|
+
continue;
|
|
141
|
+
(m - d || l.endSide - l.startSide) < 0 || (r < 0 && (r = d), l.point && (o = Math.max(o, m - d)), i.push(l), s.push(d - r), h.push(m - r));
|
|
142
|
+
}
|
|
143
|
+
return { mapped: i.length ? new E(s, h, i, o) : null, pos: r };
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
class f {
|
|
147
|
+
constructor(t, e, i, s) {
|
|
148
|
+
this.chunkPos = t, this.chunk = e, this.nextLayer = i, this.maxPoint = s;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
@internal
|
|
152
|
+
*/
|
|
153
|
+
static create(t, e, i, s) {
|
|
154
|
+
return new f(t, e, i, s);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
@internal
|
|
158
|
+
*/
|
|
159
|
+
get length() {
|
|
160
|
+
let t = this.chunk.length - 1;
|
|
161
|
+
return t < 0 ? 0 : Math.max(this.chunkEnd(t), this.nextLayer.length);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
The number of ranges in the set.
|
|
165
|
+
*/
|
|
166
|
+
get size() {
|
|
167
|
+
if (this.isEmpty)
|
|
168
|
+
return 0;
|
|
169
|
+
let t = this.nextLayer.size;
|
|
170
|
+
for (let e of this.chunk)
|
|
171
|
+
t += e.value.length;
|
|
172
|
+
return t;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
@internal
|
|
176
|
+
*/
|
|
177
|
+
chunkEnd(t) {
|
|
178
|
+
return this.chunkPos[t] + this.chunk[t].length;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
Update the range set, optionally adding new ranges or filtering
|
|
182
|
+
out existing ones.
|
|
183
|
+
|
|
184
|
+
(Note: The type parameter is just there as a kludge to work
|
|
185
|
+
around TypeScript variance issues that prevented `RangeSet<X>`
|
|
186
|
+
from being a subtype of `RangeSet<Y>` when `X` is a subtype of
|
|
187
|
+
`Y`.)
|
|
188
|
+
*/
|
|
189
|
+
update(t) {
|
|
190
|
+
let { add: e = [], sort: i = !1, filterFrom: s = 0, filterTo: h = this.length } = t, r = t.filter;
|
|
191
|
+
if (e.length == 0 && !r)
|
|
192
|
+
return this;
|
|
193
|
+
if (i && (e = e.slice().sort(T)), this.isEmpty)
|
|
194
|
+
return e.length ? f.of(e) : this;
|
|
195
|
+
let o = new F(this, null, -1).goto(0), a = 0, l = [], u = new P();
|
|
196
|
+
for (; o.value || a < e.length; )
|
|
197
|
+
if (a < e.length && (o.from - e[a].from || o.startSide - e[a].value.startSide) >= 0) {
|
|
198
|
+
let c = e[a++];
|
|
199
|
+
u.addInner(c.from, c.to, c.value) || l.push(c);
|
|
200
|
+
} else o.rangeIndex == 1 && o.chunkIndex < this.chunk.length && (a == e.length || this.chunkEnd(o.chunkIndex) < e[a].from) && (!r || s > this.chunkEnd(o.chunkIndex) || h < this.chunkPos[o.chunkIndex]) && u.addChunk(this.chunkPos[o.chunkIndex], this.chunk[o.chunkIndex]) ? o.nextChunk() : ((!r || s > o.to || h < o.from || r(o.from, o.to, o.value)) && (u.addInner(o.from, o.to, o.value) || l.push(S.create(o.from, o.to, o.value))), o.next());
|
|
201
|
+
return u.finishInner(this.nextLayer.isEmpty && !l.length ? f.empty : this.nextLayer.update({ add: l, filter: r, filterFrom: s, filterTo: h }));
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
Map this range set through a set of changes, return the new set.
|
|
205
|
+
*/
|
|
206
|
+
map(t) {
|
|
207
|
+
if (t.empty || this.isEmpty)
|
|
208
|
+
return this;
|
|
209
|
+
let e = [], i = [], s = -1;
|
|
210
|
+
for (let r = 0; r < this.chunk.length; r++) {
|
|
211
|
+
let o = this.chunkPos[r], a = this.chunk[r], l = t.touchesRange(o, o + a.length);
|
|
212
|
+
if (l === !1)
|
|
213
|
+
s = Math.max(s, a.maxPoint), e.push(a), i.push(t.mapPos(o));
|
|
214
|
+
else if (l === !0) {
|
|
215
|
+
let { mapped: u, pos: c } = a.map(o, t);
|
|
216
|
+
u && (s = Math.max(s, u.maxPoint), e.push(u), i.push(c));
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
let h = this.nextLayer.map(t);
|
|
220
|
+
return e.length == 0 ? h : new f(i, e, h || f.empty, s);
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
Iterate over the ranges that touch the region `from` to `to`,
|
|
224
|
+
calling `f` for each. There is no guarantee that the ranges will
|
|
225
|
+
be reported in any specific order. When the callback returns
|
|
226
|
+
`false`, iteration stops.
|
|
227
|
+
*/
|
|
228
|
+
between(t, e, i) {
|
|
229
|
+
if (!this.isEmpty) {
|
|
230
|
+
for (let s = 0; s < this.chunk.length; s++) {
|
|
231
|
+
let h = this.chunkPos[s], r = this.chunk[s];
|
|
232
|
+
if (e >= h && t <= h + r.length && r.between(h, t - h, e - h, i) === !1)
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
this.nextLayer.between(t, e, i);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
Iterate over the ranges in this set, in order, including all
|
|
240
|
+
ranges that end at or after `from`.
|
|
241
|
+
*/
|
|
242
|
+
iter(t = 0) {
|
|
243
|
+
return x.from([this]).goto(t);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
@internal
|
|
247
|
+
*/
|
|
248
|
+
get isEmpty() {
|
|
249
|
+
return this.nextLayer == this;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
Iterate over the ranges in a collection of sets, in order,
|
|
253
|
+
starting from `from`.
|
|
254
|
+
*/
|
|
255
|
+
static iter(t, e = 0) {
|
|
256
|
+
return x.from(t).goto(e);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
Iterate over two groups of sets, calling methods on `comparator`
|
|
260
|
+
to notify it of possible differences.
|
|
261
|
+
*/
|
|
262
|
+
static compare(t, e, i, s, h = -1) {
|
|
263
|
+
let r = t.filter((c) => c.maxPoint > 0 || !c.isEmpty && c.maxPoint >= h), o = e.filter((c) => c.maxPoint > 0 || !c.isEmpty && c.maxPoint >= h), a = A(r, o, i), l = new p(r, a, h), u = new p(o, a, h);
|
|
264
|
+
i.iterGaps((c, d, m) => L(l, c, u, d, m, s)), i.empty && i.length == 0 && L(l, 0, u, 0, 0, s);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
Compare the contents of two groups of range sets, returning true
|
|
268
|
+
if they are equivalent in the given range.
|
|
269
|
+
*/
|
|
270
|
+
static eq(t, e, i = 0, s) {
|
|
271
|
+
s == null && (s = 1e9);
|
|
272
|
+
let h = t.filter((u) => !u.isEmpty && e.indexOf(u) < 0), r = e.filter((u) => !u.isEmpty && t.indexOf(u) < 0);
|
|
273
|
+
if (h.length != r.length)
|
|
274
|
+
return !1;
|
|
275
|
+
if (!h.length)
|
|
276
|
+
return !0;
|
|
277
|
+
let o = A(h, r), a = new p(h, o, 0).goto(i), l = new p(r, o, 0).goto(i);
|
|
278
|
+
for (; ; ) {
|
|
279
|
+
if (a.to != l.to || !b(a.active, l.active) || a.point && (!l.point || !a.point.eq(l.point)))
|
|
280
|
+
return !1;
|
|
281
|
+
if (a.to > s)
|
|
282
|
+
return !0;
|
|
283
|
+
a.next(), l.next();
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
Iterate over a group of range sets at the same time, notifying
|
|
288
|
+
the iterator about the ranges covering every given piece of
|
|
289
|
+
content. Returns the open count (see
|
|
290
|
+
[`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end
|
|
291
|
+
of the iteration.
|
|
292
|
+
*/
|
|
293
|
+
static spans(t, e, i, s, h = -1) {
|
|
294
|
+
let r = new p(t, null, h).goto(e), o = e, a = r.openStart;
|
|
295
|
+
for (; ; ) {
|
|
296
|
+
let l = Math.min(r.to, i);
|
|
297
|
+
if (r.point ? (s.point(o, l, r.point, r.activeForPoint(r.to), a, r.pointRank), a = r.openEnd(l) + (r.to > l ? 1 : 0)) : l > o && (s.span(o, l, r.active, a), a = r.openEnd(l)), r.to > i)
|
|
298
|
+
break;
|
|
299
|
+
o = r.to, r.next();
|
|
300
|
+
}
|
|
301
|
+
return a;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
Create a range set for the given range or array of ranges. By
|
|
305
|
+
default, this expects the ranges to be _sorted_ (by start
|
|
306
|
+
position and, if two start at the same position,
|
|
307
|
+
`value.startSide`). You can pass `true` as second argument to
|
|
308
|
+
cause the method to sort them.
|
|
309
|
+
*/
|
|
310
|
+
static of(t, e = !1) {
|
|
311
|
+
let i = new P();
|
|
312
|
+
for (let s of t instanceof S ? [t] : e ? B(t) : t)
|
|
313
|
+
i.add(s.from, s.to, s.value);
|
|
314
|
+
return i.finish();
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
f.empty = /* @__PURE__ */ new f([], [], null, -1);
|
|
318
|
+
function B(n) {
|
|
319
|
+
if (n.length > 1)
|
|
320
|
+
for (let t = n[0], e = 1; e < n.length; e++) {
|
|
321
|
+
let i = n[e];
|
|
322
|
+
if (T(t, i) > 0)
|
|
323
|
+
return n.slice().sort(T);
|
|
324
|
+
t = i;
|
|
325
|
+
}
|
|
326
|
+
return n;
|
|
327
|
+
}
|
|
328
|
+
f.empty.nextLayer = f.empty;
|
|
329
|
+
class P {
|
|
330
|
+
/**
|
|
331
|
+
Create an empty builder.
|
|
332
|
+
*/
|
|
333
|
+
constructor() {
|
|
334
|
+
this.chunks = [], this.chunkPos = [], this.chunkStart = -1, this.last = null, this.lastFrom = -1e9, this.lastTo = -1e9, this.from = [], this.to = [], this.value = [], this.maxPoint = -1, this.setMaxPoint = -1, this.nextLayer = null;
|
|
335
|
+
}
|
|
336
|
+
finishChunk(t) {
|
|
337
|
+
this.chunks.push(new E(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, t && (this.from = [], this.to = [], this.value = []);
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
Add a range. Ranges should be added in sorted (by `from` and
|
|
341
|
+
`value.startSide`) order.
|
|
342
|
+
*/
|
|
343
|
+
add(t, e, i) {
|
|
344
|
+
this.addInner(t, e, i) || (this.nextLayer || (this.nextLayer = new P())).add(t, e, i);
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
@internal
|
|
348
|
+
*/
|
|
349
|
+
addInner(t, e, i) {
|
|
350
|
+
let s = t - this.lastTo || i.startSide - this.last.endSide;
|
|
351
|
+
if (s <= 0 && (t - this.lastFrom || i.startSide - this.last.startSide) < 0)
|
|
352
|
+
throw new Error("Ranges must be added sorted by `from` position and `startSide`");
|
|
353
|
+
return s < 0 ? !1 : (this.from.length == 250 && this.finishChunk(!0), this.chunkStart < 0 && (this.chunkStart = t), this.from.push(t - this.chunkStart), this.to.push(e - this.chunkStart), this.last = i, this.lastFrom = t, this.lastTo = e, this.value.push(i), i.point && (this.maxPoint = Math.max(this.maxPoint, e - t)), !0);
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
@internal
|
|
357
|
+
*/
|
|
358
|
+
addChunk(t, e) {
|
|
359
|
+
if ((t - this.lastTo || e.value[0].startSide - this.last.endSide) < 0)
|
|
360
|
+
return !1;
|
|
361
|
+
this.from.length && this.finishChunk(!0), this.setMaxPoint = Math.max(this.setMaxPoint, e.maxPoint), this.chunks.push(e), this.chunkPos.push(t);
|
|
362
|
+
let i = e.value.length - 1;
|
|
363
|
+
return this.last = e.value[i], this.lastFrom = e.from[i] + t, this.lastTo = e.to[i] + t, !0;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
Finish the range set. Returns the new set. The builder can't be
|
|
367
|
+
used anymore after this has been called.
|
|
368
|
+
*/
|
|
369
|
+
finish() {
|
|
370
|
+
return this.finishInner(f.empty);
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
@internal
|
|
374
|
+
*/
|
|
375
|
+
finishInner(t) {
|
|
376
|
+
if (this.from.length && this.finishChunk(!1), this.chunks.length == 0)
|
|
377
|
+
return t;
|
|
378
|
+
let e = f.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(t) : t, this.setMaxPoint);
|
|
379
|
+
return this.from = null, e;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
function A(n, t, e) {
|
|
383
|
+
let i = /* @__PURE__ */ new Map();
|
|
384
|
+
for (let h of n)
|
|
385
|
+
for (let r = 0; r < h.chunk.length; r++)
|
|
386
|
+
h.chunk[r].maxPoint <= 0 && i.set(h.chunk[r], h.chunkPos[r]);
|
|
387
|
+
let s = /* @__PURE__ */ new Set();
|
|
388
|
+
for (let h of t)
|
|
389
|
+
for (let r = 0; r < h.chunk.length; r++) {
|
|
390
|
+
let o = i.get(h.chunk[r]);
|
|
391
|
+
o != null && (e ? e.mapPos(o) : o) == h.chunkPos[r] && !(e != null && e.touchesRange(o, o + h.chunk[r].length)) && s.add(h.chunk[r]);
|
|
392
|
+
}
|
|
393
|
+
return s;
|
|
394
|
+
}
|
|
395
|
+
class F {
|
|
396
|
+
constructor(t, e, i, s = 0) {
|
|
397
|
+
this.layer = t, this.skip = e, this.minPoint = i, this.rank = s;
|
|
398
|
+
}
|
|
399
|
+
get startSide() {
|
|
400
|
+
return this.value ? this.value.startSide : 0;
|
|
401
|
+
}
|
|
402
|
+
get endSide() {
|
|
403
|
+
return this.value ? this.value.endSide : 0;
|
|
404
|
+
}
|
|
405
|
+
goto(t, e = -1e9) {
|
|
406
|
+
return this.chunkIndex = this.rangeIndex = 0, this.gotoInner(t, e, !1), this;
|
|
407
|
+
}
|
|
408
|
+
gotoInner(t, e, i) {
|
|
409
|
+
for (; this.chunkIndex < this.layer.chunk.length; ) {
|
|
410
|
+
let s = this.layer.chunk[this.chunkIndex];
|
|
411
|
+
if (!(this.skip && this.skip.has(s) || this.layer.chunkEnd(this.chunkIndex) < t || s.maxPoint < this.minPoint))
|
|
412
|
+
break;
|
|
413
|
+
this.chunkIndex++, i = !1;
|
|
414
|
+
}
|
|
415
|
+
if (this.chunkIndex < this.layer.chunk.length) {
|
|
416
|
+
let s = this.layer.chunk[this.chunkIndex].findIndex(t - this.layer.chunkPos[this.chunkIndex], e, !0);
|
|
417
|
+
(!i || this.rangeIndex < s) && this.setRangeIndex(s);
|
|
418
|
+
}
|
|
419
|
+
this.next();
|
|
420
|
+
}
|
|
421
|
+
forward(t, e) {
|
|
422
|
+
(this.to - t || this.endSide - e) < 0 && this.gotoInner(t, e, !0);
|
|
423
|
+
}
|
|
424
|
+
next() {
|
|
425
|
+
for (; ; )
|
|
426
|
+
if (this.chunkIndex == this.layer.chunk.length) {
|
|
427
|
+
this.from = this.to = 1e9, this.value = null;
|
|
428
|
+
break;
|
|
429
|
+
} else {
|
|
430
|
+
let t = this.layer.chunkPos[this.chunkIndex], e = this.layer.chunk[this.chunkIndex], i = t + e.from[this.rangeIndex];
|
|
431
|
+
if (this.from = i, this.to = t + e.to[this.rangeIndex], this.value = e.value[this.rangeIndex], this.setRangeIndex(this.rangeIndex + 1), this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint)
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
setRangeIndex(t) {
|
|
436
|
+
if (t == this.layer.chunk[this.chunkIndex].value.length) {
|
|
437
|
+
if (this.chunkIndex++, this.skip)
|
|
438
|
+
for (; this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]); )
|
|
439
|
+
this.chunkIndex++;
|
|
440
|
+
this.rangeIndex = 0;
|
|
441
|
+
} else
|
|
442
|
+
this.rangeIndex = t;
|
|
443
|
+
}
|
|
444
|
+
nextChunk() {
|
|
445
|
+
this.chunkIndex++, this.rangeIndex = 0, this.next();
|
|
446
|
+
}
|
|
447
|
+
compare(t) {
|
|
448
|
+
return this.from - t.from || this.startSide - t.startSide || this.rank - t.rank || this.to - t.to || this.endSide - t.endSide;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
class x {
|
|
452
|
+
constructor(t) {
|
|
453
|
+
this.heap = t;
|
|
454
|
+
}
|
|
455
|
+
static from(t, e = null, i = -1) {
|
|
456
|
+
let s = [];
|
|
457
|
+
for (let h = 0; h < t.length; h++)
|
|
458
|
+
for (let r = t[h]; !r.isEmpty; r = r.nextLayer)
|
|
459
|
+
r.maxPoint >= i && s.push(new F(r, e, i, h));
|
|
460
|
+
return s.length == 1 ? s[0] : new x(s);
|
|
461
|
+
}
|
|
462
|
+
get startSide() {
|
|
463
|
+
return this.value ? this.value.startSide : 0;
|
|
464
|
+
}
|
|
465
|
+
goto(t, e = -1e9) {
|
|
466
|
+
for (let i of this.heap)
|
|
467
|
+
i.goto(t, e);
|
|
468
|
+
for (let i = this.heap.length >> 1; i >= 0; i--)
|
|
469
|
+
w(this.heap, i);
|
|
470
|
+
return this.next(), this;
|
|
471
|
+
}
|
|
472
|
+
forward(t, e) {
|
|
473
|
+
for (let i of this.heap)
|
|
474
|
+
i.forward(t, e);
|
|
475
|
+
for (let i = this.heap.length >> 1; i >= 0; i--)
|
|
476
|
+
w(this.heap, i);
|
|
477
|
+
(this.to - t || this.value.endSide - e) < 0 && this.next();
|
|
478
|
+
}
|
|
479
|
+
next() {
|
|
480
|
+
if (this.heap.length == 0)
|
|
481
|
+
this.from = this.to = 1e9, this.value = null, this.rank = -1;
|
|
482
|
+
else {
|
|
483
|
+
let t = this.heap[0];
|
|
484
|
+
this.from = t.from, this.to = t.to, this.value = t.value, this.rank = t.rank, t.value && t.next(), w(this.heap, 0);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
function w(n, t) {
|
|
489
|
+
for (let e = n[t]; ; ) {
|
|
490
|
+
let i = (t << 1) + 1;
|
|
491
|
+
if (i >= n.length)
|
|
492
|
+
break;
|
|
493
|
+
let s = n[i];
|
|
494
|
+
if (i + 1 < n.length && s.compare(n[i + 1]) >= 0 && (s = n[i + 1], i++), e.compare(s) < 0)
|
|
495
|
+
break;
|
|
496
|
+
n[i] = e, n[t] = s, t = i;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
class p {
|
|
500
|
+
constructor(t, e, i) {
|
|
501
|
+
this.minPoint = i, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor = x.from(t, e, i);
|
|
502
|
+
}
|
|
503
|
+
goto(t, e = -1e9) {
|
|
504
|
+
return this.cursor.goto(t, e), this.active.length = this.activeTo.length = this.activeRank.length = 0, this.minActive = -1, this.to = t, this.endSide = e, this.openStart = -1, this.next(), this;
|
|
505
|
+
}
|
|
506
|
+
forward(t, e) {
|
|
507
|
+
for (; this.minActive > -1 && (this.activeTo[this.minActive] - t || this.active[this.minActive].endSide - e) < 0; )
|
|
508
|
+
this.removeActive(this.minActive);
|
|
509
|
+
this.cursor.forward(t, e);
|
|
510
|
+
}
|
|
511
|
+
removeActive(t) {
|
|
512
|
+
v(this.active, t), v(this.activeTo, t), v(this.activeRank, t), this.minActive = R(this.active, this.activeTo);
|
|
513
|
+
}
|
|
514
|
+
addActive(t) {
|
|
515
|
+
let e = 0, { value: i, to: s, rank: h } = this.cursor;
|
|
516
|
+
for (; e < this.activeRank.length && this.activeRank[e] <= h; )
|
|
517
|
+
e++;
|
|
518
|
+
g(this.active, e, i), g(this.activeTo, e, s), g(this.activeRank, e, h), t && g(t, e, this.cursor.from), this.minActive = R(this.active, this.activeTo);
|
|
519
|
+
}
|
|
520
|
+
// After calling this, if `this.point` != null, the next range is a
|
|
521
|
+
// point. Otherwise, it's a regular range, covered by `this.active`.
|
|
522
|
+
next() {
|
|
523
|
+
let t = this.to, e = this.point;
|
|
524
|
+
this.point = null;
|
|
525
|
+
let i = this.openStart < 0 ? [] : null, s = 0;
|
|
526
|
+
for (; ; ) {
|
|
527
|
+
let h = this.minActive;
|
|
528
|
+
if (h > -1 && (this.activeTo[h] - this.cursor.from || this.active[h].endSide - this.cursor.startSide) < 0) {
|
|
529
|
+
if (this.activeTo[h] > t) {
|
|
530
|
+
this.to = this.activeTo[h], this.endSide = this.active[h].endSide;
|
|
531
|
+
break;
|
|
532
|
+
}
|
|
533
|
+
this.removeActive(h), i && v(i, h);
|
|
534
|
+
} else if (this.cursor.value)
|
|
535
|
+
if (this.cursor.from > t) {
|
|
536
|
+
this.to = this.cursor.from, this.endSide = this.cursor.startSide;
|
|
537
|
+
break;
|
|
538
|
+
} else {
|
|
539
|
+
let r = this.cursor.value;
|
|
540
|
+
if (!r.point)
|
|
541
|
+
this.addActive(i), this.cursor.next();
|
|
542
|
+
else if (e && this.cursor.to == this.to && this.cursor.from < this.cursor.to)
|
|
543
|
+
this.cursor.next();
|
|
544
|
+
else {
|
|
545
|
+
this.point = r, this.pointFrom = this.cursor.from, this.pointRank = this.cursor.rank, this.to = this.cursor.to, this.endSide = r.endSide, this.cursor.from < t && (s = 1), this.cursor.next(), this.forward(this.to, this.endSide);
|
|
546
|
+
break;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
else {
|
|
550
|
+
this.to = this.endSide = 1e9;
|
|
551
|
+
break;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
if (i) {
|
|
555
|
+
let h = 0;
|
|
556
|
+
for (; h < i.length && i[h] < t; )
|
|
557
|
+
h++;
|
|
558
|
+
this.openStart = h + s;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
activeForPoint(t) {
|
|
562
|
+
if (!this.active.length)
|
|
563
|
+
return this.active;
|
|
564
|
+
let e = [];
|
|
565
|
+
for (let i = this.active.length - 1; i >= 0 && !(this.activeRank[i] < this.pointRank); i--)
|
|
566
|
+
(this.activeTo[i] > t || this.activeTo[i] == t && this.active[i].endSide >= this.point.endSide) && e.push(this.active[i]);
|
|
567
|
+
return e.reverse();
|
|
568
|
+
}
|
|
569
|
+
openEnd(t) {
|
|
570
|
+
let e = 0;
|
|
571
|
+
for (let i = this.activeTo.length - 1; i >= 0 && this.activeTo[i] > t; i--)
|
|
572
|
+
e++;
|
|
573
|
+
return e;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
function L(n, t, e, i, s, h) {
|
|
577
|
+
n.goto(t), e.goto(i);
|
|
578
|
+
let r = i + s, o = i, a = i - t;
|
|
579
|
+
for (; ; ) {
|
|
580
|
+
let l = n.to + a - e.to || n.endSide - e.endSide, u = l < 0 ? n.to + a : e.to, c = Math.min(u, r);
|
|
581
|
+
if (n.point || e.point ? n.point && e.point && (n.point == e.point || n.point.eq(e.point)) && b(n.activeForPoint(n.to + a), e.activeForPoint(e.to)) || h.comparePoint(o, c, n.point, e.point) : c > o && !b(n.active, e.active) && h.compareRange(o, c, n.active, e.active), u > r)
|
|
582
|
+
break;
|
|
583
|
+
o = u, l <= 0 && n.next(), l >= 0 && e.next();
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
function b(n, t) {
|
|
587
|
+
if (n.length != t.length)
|
|
588
|
+
return !1;
|
|
589
|
+
for (let e = 0; e < n.length; e++)
|
|
590
|
+
if (n[e] != t[e] && !n[e].eq(t[e]))
|
|
591
|
+
return !1;
|
|
592
|
+
return !0;
|
|
593
|
+
}
|
|
594
|
+
function v(n, t) {
|
|
595
|
+
for (let e = t, i = n.length - 1; e < i; e++)
|
|
596
|
+
n[e] = n[e + 1];
|
|
597
|
+
n.pop();
|
|
598
|
+
}
|
|
599
|
+
function g(n, t, e) {
|
|
600
|
+
for (let i = n.length - 1; i >= t; i--)
|
|
601
|
+
n[i + 1] = n[i];
|
|
602
|
+
n[t] = e;
|
|
603
|
+
}
|
|
604
|
+
function R(n, t) {
|
|
605
|
+
let e = -1, i = 1e9;
|
|
606
|
+
for (let s = 0; s < t.length; s++)
|
|
607
|
+
(t[s] - i || n[s].endSide - n[e].endSide) < 0 && (e = s, i = t[s]);
|
|
608
|
+
return e;
|
|
609
|
+
}
|
|
610
|
+
export {
|
|
611
|
+
y as MapMode,
|
|
612
|
+
S as Range,
|
|
613
|
+
f as RangeSet,
|
|
614
|
+
P as RangeSetBuilder,
|
|
615
|
+
k as StateEffect,
|
|
616
|
+
z as StateEffectType,
|
|
617
|
+
O as codePointAt,
|
|
618
|
+
G as codePointSize,
|
|
619
|
+
V as fromCodePoint
|
|
620
|
+
};
|
package/dist/index132.js
ADDED
package/dist/index133.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { __exports as i } from "./index138.js";
|
|
2
|
+
import h from "react";
|
|
3
|
+
/**
|
|
4
|
+
* @license React
|
|
5
|
+
* use-sync-external-store-shim.production.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
var f;
|
|
13
|
+
function x() {
|
|
14
|
+
if (f) return i;
|
|
15
|
+
f = 1;
|
|
16
|
+
var u = h;
|
|
17
|
+
function s(e, t) {
|
|
18
|
+
return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
|
|
19
|
+
}
|
|
20
|
+
var S = typeof Object.is == "function" ? Object.is : s, d = u.useState, l = u.useEffect, p = u.useLayoutEffect, E = u.useDebugValue;
|
|
21
|
+
function v(e, t) {
|
|
22
|
+
var r = t(), a = d({ inst: { value: r, getSnapshot: t } }), n = a[0].inst, c = a[1];
|
|
23
|
+
return p(
|
|
24
|
+
function() {
|
|
25
|
+
n.value = r, n.getSnapshot = t, o(n) && c({ inst: n });
|
|
26
|
+
},
|
|
27
|
+
[e, r, t]
|
|
28
|
+
), l(
|
|
29
|
+
function() {
|
|
30
|
+
return o(n) && c({ inst: n }), e(function() {
|
|
31
|
+
o(n) && c({ inst: n });
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
[e]
|
|
35
|
+
), E(r), r;
|
|
36
|
+
}
|
|
37
|
+
function o(e) {
|
|
38
|
+
var t = e.getSnapshot;
|
|
39
|
+
e = e.value;
|
|
40
|
+
try {
|
|
41
|
+
var r = t();
|
|
42
|
+
return !S(e, r);
|
|
43
|
+
} catch {
|
|
44
|
+
return !0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function y(e, t) {
|
|
48
|
+
return t();
|
|
49
|
+
}
|
|
50
|
+
var m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? y : v;
|
|
51
|
+
return i.useSyncExternalStore = u.useSyncExternalStore !== void 0 ? u.useSyncExternalStore : m, i;
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
x as __require
|
|
55
|
+
};
|