@emailmaker/filemanager 0.10.18 → 0.10.20
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/assets/image-editor/images/samples/sample4.json +871 -871
- package/assets/image-editor/images/stickers/beach/0.svg +25 -25
- package/assets/image-editor/images/stickers/beach/1.svg +14 -14
- package/assets/image-editor/images/stickers/beach/10.svg +34 -34
- package/assets/image-editor/images/stickers/beach/11.svg +27 -27
- package/assets/image-editor/images/stickers/beach/12.svg +10 -10
- package/assets/image-editor/images/stickers/beach/13.svg +25 -25
- package/assets/image-editor/images/stickers/beach/14.svg +16 -16
- package/assets/image-editor/images/stickers/beach/15.svg +14 -14
- package/assets/image-editor/images/stickers/beach/16.svg +44 -44
- package/assets/image-editor/images/stickers/beach/17.svg +35 -35
- package/assets/image-editor/images/stickers/beach/18.svg +32 -32
- package/assets/image-editor/images/stickers/beach/19.svg +23 -23
- package/assets/image-editor/images/stickers/beach/2.svg +14 -14
- package/assets/image-editor/images/stickers/beach/20.svg +24 -24
- package/assets/image-editor/images/stickers/beach/21.svg +11 -11
- package/assets/image-editor/images/stickers/beach/3.svg +26 -26
- package/assets/image-editor/images/stickers/beach/4.svg +25 -25
- package/assets/image-editor/images/stickers/beach/5.svg +22 -22
- package/assets/image-editor/images/stickers/beach/6.svg +20 -20
- package/assets/image-editor/images/stickers/beach/7.svg +32 -32
- package/assets/image-editor/images/stickers/beach/8.svg +28 -28
- package/assets/image-editor/images/stickers/beach/9.svg +18 -18
- package/assets/image-editor/images/stickers/categories/beach.svg +17 -17
- package/assets/image-editor/images/stickers/categories/clouds.svg +14 -14
- package/assets/image-editor/images/stickers/categories/doodles.svg +12 -12
- package/assets/image-editor/images/stickers/categories/emoticon.svg +9 -9
- package/assets/image-editor/images/stickers/categories/landmark.svg +19 -19
- package/assets/image-editor/images/stickers/categories/speech-bubble.svg +5 -5
- package/assets/image-editor/images/stickers/categories/star.svg +5 -5
- package/assets/image-editor/images/stickers/categories/transportation.svg +17 -17
- package/assets/image-editor/images/stickers/doodles/0.svg +201 -201
- package/assets/image-editor/images/stickers/doodles/1.svg +255 -255
- package/assets/image-editor/images/stickers/doodles/10.svg +160 -160
- package/assets/image-editor/images/stickers/doodles/11.svg +393 -393
- package/assets/image-editor/images/stickers/doodles/12.svg +293 -293
- package/assets/image-editor/images/stickers/doodles/13.svg +251 -251
- package/assets/image-editor/images/stickers/doodles/14.svg +370 -370
- package/assets/image-editor/images/stickers/doodles/15.svg +194 -194
- package/assets/image-editor/images/stickers/doodles/16.svg +383 -383
- package/assets/image-editor/images/stickers/doodles/17.svg +346 -346
- package/assets/image-editor/images/stickers/doodles/18.svg +286 -286
- package/assets/image-editor/images/stickers/doodles/19.svg +241 -241
- package/assets/image-editor/images/stickers/doodles/2.svg +227 -227
- package/assets/image-editor/images/stickers/doodles/20.svg +330 -330
- package/assets/image-editor/images/stickers/doodles/21.svg +200 -200
- package/assets/image-editor/images/stickers/doodles/22.svg +308 -308
- package/assets/image-editor/images/stickers/doodles/23.svg +518 -518
- package/assets/image-editor/images/stickers/doodles/24.svg +207 -207
- package/assets/image-editor/images/stickers/doodles/25.svg +260 -260
- package/assets/image-editor/images/stickers/doodles/26.svg +380 -380
- package/assets/image-editor/images/stickers/doodles/27.svg +222 -222
- package/assets/image-editor/images/stickers/doodles/28.svg +164 -164
- package/assets/image-editor/images/stickers/doodles/29.svg +271 -271
- package/assets/image-editor/images/stickers/doodles/3.svg +272 -272
- package/assets/image-editor/images/stickers/doodles/30.svg +283 -283
- package/assets/image-editor/images/stickers/doodles/31.svg +257 -257
- package/assets/image-editor/images/stickers/doodles/32.svg +276 -276
- package/assets/image-editor/images/stickers/doodles/33.svg +198 -198
- package/assets/image-editor/images/stickers/doodles/34.svg +314 -314
- package/assets/image-editor/images/stickers/doodles/35.svg +236 -236
- package/assets/image-editor/images/stickers/doodles/36.svg +273 -273
- package/assets/image-editor/images/stickers/doodles/37.svg +284 -284
- package/assets/image-editor/images/stickers/doodles/38.svg +167 -167
- package/assets/image-editor/images/stickers/doodles/39.svg +381 -381
- package/assets/image-editor/images/stickers/doodles/4.svg +216 -216
- package/assets/image-editor/images/stickers/doodles/40.svg +198 -198
- package/assets/image-editor/images/stickers/doodles/41.svg +259 -259
- package/assets/image-editor/images/stickers/doodles/42.svg +371 -371
- package/assets/image-editor/images/stickers/doodles/43.svg +198 -198
- package/assets/image-editor/images/stickers/doodles/44.svg +174 -174
- package/assets/image-editor/images/stickers/doodles/45.svg +178 -178
- package/assets/image-editor/images/stickers/doodles/46.svg +211 -211
- package/assets/image-editor/images/stickers/doodles/47.svg +195 -195
- package/assets/image-editor/images/stickers/doodles/48.svg +293 -293
- package/assets/image-editor/images/stickers/doodles/49.svg +191 -191
- package/assets/image-editor/images/stickers/doodles/5.svg +179 -179
- package/assets/image-editor/images/stickers/doodles/50.svg +323 -323
- package/assets/image-editor/images/stickers/doodles/51.svg +308 -308
- package/assets/image-editor/images/stickers/doodles/52.svg +162 -162
- package/assets/image-editor/images/stickers/doodles/53.svg +263 -263
- package/assets/image-editor/images/stickers/doodles/54.svg +175 -175
- package/assets/image-editor/images/stickers/doodles/55.svg +177 -177
- package/assets/image-editor/images/stickers/doodles/56.svg +160 -160
- package/assets/image-editor/images/stickers/doodles/57.svg +115 -115
- package/assets/image-editor/images/stickers/doodles/58.svg +327 -327
- package/assets/image-editor/images/stickers/doodles/59.svg +197 -197
- package/assets/image-editor/images/stickers/doodles/6.svg +388 -388
- package/assets/image-editor/images/stickers/doodles/60.svg +414 -414
- package/assets/image-editor/images/stickers/doodles/61.svg +287 -287
- package/assets/image-editor/images/stickers/doodles/62.svg +193 -193
- package/assets/image-editor/images/stickers/doodles/63.svg +329 -329
- package/assets/image-editor/images/stickers/doodles/64.svg +150 -150
- package/assets/image-editor/images/stickers/doodles/65.svg +275 -275
- package/assets/image-editor/images/stickers/doodles/66.svg +174 -174
- package/assets/image-editor/images/stickers/doodles/67.svg +343 -343
- package/assets/image-editor/images/stickers/doodles/68.svg +242 -242
- package/assets/image-editor/images/stickers/doodles/69.svg +160 -160
- package/assets/image-editor/images/stickers/doodles/7.svg +194 -194
- package/assets/image-editor/images/stickers/doodles/70.svg +365 -365
- package/assets/image-editor/images/stickers/doodles/71.svg +454 -454
- package/assets/image-editor/images/stickers/doodles/72.svg +162 -162
- package/assets/image-editor/images/stickers/doodles/73.svg +393 -393
- package/assets/image-editor/images/stickers/doodles/74.svg +206 -206
- package/assets/image-editor/images/stickers/doodles/75.svg +275 -275
- package/assets/image-editor/images/stickers/doodles/76.svg +350 -350
- package/assets/image-editor/images/stickers/doodles/77.svg +323 -323
- package/assets/image-editor/images/stickers/doodles/78.svg +316 -316
- package/assets/image-editor/images/stickers/doodles/79.svg +503 -503
- package/assets/image-editor/images/stickers/doodles/8.svg +185 -185
- package/assets/image-editor/images/stickers/doodles/80.svg +235 -235
- package/assets/image-editor/images/stickers/doodles/81.svg +184 -184
- package/assets/image-editor/images/stickers/doodles/82.svg +246 -246
- package/assets/image-editor/images/stickers/doodles/83.svg +125 -125
- package/assets/image-editor/images/stickers/doodles/84.svg +168 -168
- package/assets/image-editor/images/stickers/doodles/85.svg +138 -138
- package/assets/image-editor/images/stickers/doodles/86.svg +223 -223
- package/assets/image-editor/images/stickers/doodles/87.svg +475 -475
- package/assets/image-editor/images/stickers/doodles/88.svg +172 -172
- package/assets/image-editor/images/stickers/doodles/89.svg +199 -199
- package/assets/image-editor/images/stickers/doodles/9.svg +368 -368
- package/assets/image-editor/images/stickers/doodles/90.svg +298 -298
- package/assets/image-editor/images/stickers/doodles/91.svg +176 -176
- package/assets/image-editor/images/stickers/doodles/92.svg +152 -152
- package/assets/image-editor/images/stickers/doodles/93.svg +206 -206
- package/assets/image-editor/images/stickers/doodles/94.svg +202 -202
- package/assets/image-editor/images/stickers/doodles/95.svg +114 -114
- package/assets/image-editor/images/stickers/doodles/96.svg +149 -149
- package/assets/image-editor/images/stickers/doodles/97.svg +197 -197
- package/assets/image-editor/images/stickers/doodles/98.svg +397 -397
- package/assets/image-editor/images/stickers/doodles/99.svg +502 -502
- package/assets/image-editor/images/stickers/emoticons/afro-1.svg +122 -122
- package/assets/image-editor/images/stickers/emoticons/afro.svg +85 -85
- package/assets/image-editor/images/stickers/emoticons/agent.svg +114 -114
- package/assets/image-editor/images/stickers/emoticons/alien-1.svg +60 -60
- package/assets/image-editor/images/stickers/emoticons/alien.svg +64 -64
- package/assets/image-editor/images/stickers/emoticons/angel.svg +47 -47
- package/assets/image-editor/images/stickers/emoticons/angry-1.svg +83 -83
- package/assets/image-editor/images/stickers/emoticons/angry-2.svg +48 -48
- package/assets/image-editor/images/stickers/emoticons/angry-3.svg +45 -45
- package/assets/image-editor/images/stickers/emoticons/angry-4.svg +52 -52
- package/assets/image-editor/images/stickers/emoticons/angry-5.svg +62 -62
- package/assets/image-editor/images/stickers/emoticons/angry.svg +78 -78
- package/assets/image-editor/images/stickers/emoticons/arguing.svg +49 -49
- package/assets/image-editor/images/stickers/emoticons/arrogant.svg +98 -98
- package/assets/image-editor/images/stickers/emoticons/asian-1.svg +52 -52
- package/assets/image-editor/images/stickers/emoticons/asian.svg +54 -54
- package/assets/image-editor/images/stickers/emoticons/avatar.svg +49 -49
- package/assets/image-editor/images/stickers/emoticons/baby-1.svg +51 -51
- package/assets/image-editor/images/stickers/emoticons/baby-2.svg +54 -54
- package/assets/image-editor/images/stickers/emoticons/baby.svg +66 -66
- package/assets/image-editor/images/stickers/emoticons/bully.svg +68 -68
- package/assets/image-editor/images/stickers/emoticons/burglar.svg +75 -75
- package/assets/image-editor/images/stickers/emoticons/businessman.svg +52 -52
- package/assets/image-editor/images/stickers/emoticons/cheeky-1.svg +83 -83
- package/assets/image-editor/images/stickers/emoticons/cheeky.svg +73 -73
- package/assets/image-editor/images/stickers/emoticons/clown.svg +75 -75
- package/assets/image-editor/images/stickers/emoticons/confused-1.svg +74 -74
- package/assets/image-editor/images/stickers/emoticons/confused-2.svg +55 -55
- package/assets/image-editor/images/stickers/emoticons/confused-3.svg +45 -45
- package/assets/image-editor/images/stickers/emoticons/confused.svg +66 -66
- package/assets/image-editor/images/stickers/emoticons/creepy.svg +60 -60
- package/assets/image-editor/images/stickers/emoticons/crying-1.svg +55 -55
- package/assets/image-editor/images/stickers/emoticons/crying-2.svg +83 -83
- package/assets/image-editor/images/stickers/emoticons/crying-3.svg +53 -53
- package/assets/image-editor/images/stickers/emoticons/crying.svg +59 -59
- package/assets/image-editor/images/stickers/emoticons/dazed-1.svg +63 -63
- package/assets/image-editor/images/stickers/emoticons/dazed-2.svg +51 -51
- package/assets/image-editor/images/stickers/emoticons/dazed-3.svg +55 -55
- package/assets/image-editor/images/stickers/emoticons/dazed.svg +56 -56
- package/assets/image-editor/images/stickers/emoticons/dead-1.svg +61 -61
- package/assets/image-editor/images/stickers/emoticons/dead-2.svg +80 -80
- package/assets/image-editor/images/stickers/emoticons/dead-3.svg +66 -66
- package/assets/image-editor/images/stickers/emoticons/dead-4.svg +54 -54
- package/assets/image-editor/images/stickers/emoticons/dead-5.svg +52 -52
- package/assets/image-editor/images/stickers/emoticons/dead-6.svg +53 -53
- package/assets/image-editor/images/stickers/emoticons/dead.svg +54 -54
- package/assets/image-editor/images/stickers/emoticons/desperate-1.svg +47 -47
- package/assets/image-editor/images/stickers/emoticons/desperate.svg +75 -75
- package/assets/image-editor/images/stickers/emoticons/detective.svg +75 -75
- package/assets/image-editor/images/stickers/emoticons/dissapointment.svg +70 -70
- package/assets/image-editor/images/stickers/emoticons/doctor.svg +61 -61
- package/assets/image-editor/images/stickers/emoticons/drunk.svg +55 -55
- package/assets/image-editor/images/stickers/emoticons/dumb.svg +50 -50
- package/assets/image-editor/images/stickers/emoticons/emo-1.svg +104 -104
- package/assets/image-editor/images/stickers/emoticons/emo-2.svg +111 -111
- package/assets/image-editor/images/stickers/emoticons/emo.svg +56 -56
- package/assets/image-editor/images/stickers/emoticons/emoticon.svg +84 -84
- package/assets/image-editor/images/stickers/emoticons/evil.svg +59 -59
- package/assets/image-editor/images/stickers/emoticons/faint-1.svg +75 -75
- package/assets/image-editor/images/stickers/emoticons/faint.svg +84 -84
- package/assets/image-editor/images/stickers/emoticons/flirt-1.svg +81 -81
- package/assets/image-editor/images/stickers/emoticons/flirt-2.svg +68 -68
- package/assets/image-editor/images/stickers/emoticons/flirt.svg +71 -71
- package/assets/image-editor/images/stickers/emoticons/flirty.svg +60 -60
- package/assets/image-editor/images/stickers/emoticons/gangster.svg +54 -54
- package/assets/image-editor/images/stickers/emoticons/geek-1.svg +76 -76
- package/assets/image-editor/images/stickers/emoticons/geek.svg +69 -69
- package/assets/image-editor/images/stickers/emoticons/gentleman-1.svg +82 -82
- package/assets/image-editor/images/stickers/emoticons/gentleman-2.svg +58 -58
- package/assets/image-editor/images/stickers/emoticons/gentleman-3.svg +54 -54
- package/assets/image-editor/images/stickers/emoticons/gentleman-4.svg +59 -59
- package/assets/image-editor/images/stickers/emoticons/gentleman.svg +57 -57
- package/assets/image-editor/images/stickers/emoticons/ginger.svg +55 -55
- package/assets/image-editor/images/stickers/emoticons/girl-1.svg +70 -70
- package/assets/image-editor/images/stickers/emoticons/girl.svg +73 -73
- package/assets/image-editor/images/stickers/emoticons/goofy-1.svg +46 -46
- package/assets/image-editor/images/stickers/emoticons/goofy-2.svg +79 -79
- package/assets/image-editor/images/stickers/emoticons/goofy-3.svg +79 -79
- package/assets/image-editor/images/stickers/emoticons/goofy-4.svg +46 -46
- package/assets/image-editor/images/stickers/emoticons/goofy.svg +79 -79
- package/assets/image-editor/images/stickers/emoticons/grubby-1.svg +114 -114
- package/assets/image-editor/images/stickers/emoticons/grubby.svg +165 -165
- package/assets/image-editor/images/stickers/emoticons/happy-1.svg +49 -49
- package/assets/image-editor/images/stickers/emoticons/happy-10.svg +62 -62
- package/assets/image-editor/images/stickers/emoticons/happy-11.svg +55 -55
- package/assets/image-editor/images/stickers/emoticons/happy-12.svg +53 -53
- package/assets/image-editor/images/stickers/emoticons/happy-13.svg +58 -58
- package/assets/image-editor/images/stickers/emoticons/happy-14.svg +62 -62
- package/assets/image-editor/images/stickers/emoticons/happy-15.svg +49 -49
- package/assets/image-editor/images/stickers/emoticons/happy-16.svg +49 -49
- package/assets/image-editor/images/stickers/emoticons/happy-2.svg +71 -71
- package/assets/image-editor/images/stickers/emoticons/happy-3.svg +74 -74
- package/assets/image-editor/images/stickers/emoticons/happy-4.svg +77 -77
- package/assets/image-editor/images/stickers/emoticons/happy-5.svg +52 -52
- package/assets/image-editor/images/stickers/emoticons/happy-6.svg +54 -54
- package/assets/image-editor/images/stickers/emoticons/happy-7.svg +58 -58
- package/assets/image-editor/images/stickers/emoticons/happy-8.svg +42 -42
- package/assets/image-editor/images/stickers/emoticons/happy-9.svg +45 -45
- package/assets/image-editor/images/stickers/emoticons/happy.svg +48 -48
- package/assets/image-editor/images/stickers/emoticons/harry-potter.svg +68 -68
- package/assets/image-editor/images/stickers/emoticons/heisenberg.svg +80 -80
- package/assets/image-editor/images/stickers/emoticons/hipster-1.svg +118 -118
- package/assets/image-editor/images/stickers/emoticons/hipster-2.svg +49 -49
- package/assets/image-editor/images/stickers/emoticons/hipster.svg +48 -48
- package/assets/image-editor/images/stickers/emoticons/in-love-1.svg +62 -62
- package/assets/image-editor/images/stickers/emoticons/in-love-2.svg +48 -48
- package/assets/image-editor/images/stickers/emoticons/in-love-3.svg +49 -49
- package/assets/image-editor/images/stickers/emoticons/in-love-4.svg +50 -50
- package/assets/image-editor/images/stickers/emoticons/in-love-5.svg +49 -49
- package/assets/image-editor/images/stickers/emoticons/in-love-6.svg +53 -53
- package/assets/image-editor/images/stickers/emoticons/in-love.svg +57 -57
- package/assets/image-editor/images/stickers/emoticons/japan.svg +79 -79
- package/assets/image-editor/images/stickers/emoticons/jew.svg +83 -83
- package/assets/image-editor/images/stickers/emoticons/joyful-1.svg +72 -72
- package/assets/image-editor/images/stickers/emoticons/joyful-2.svg +45 -45
- package/assets/image-editor/images/stickers/emoticons/joyful.svg +47 -47
- package/assets/image-editor/images/stickers/emoticons/kiss-1.svg +48 -48
- package/assets/image-editor/images/stickers/emoticons/kiss-2.svg +59 -59
- package/assets/image-editor/images/stickers/emoticons/kiss-3.svg +53 -53
- package/assets/image-editor/images/stickers/emoticons/kiss-4.svg +59 -59
- package/assets/image-editor/images/stickers/emoticons/kiss.svg +67 -67
- package/assets/image-editor/images/stickers/emoticons/laughing-1.svg +54 -54
- package/assets/image-editor/images/stickers/emoticons/laughing-2.svg +57 -57
- package/assets/image-editor/images/stickers/emoticons/laughing-3.svg +55 -55
- package/assets/image-editor/images/stickers/emoticons/laughing.svg +56 -56
- package/assets/image-editor/images/stickers/emoticons/listening.svg +55 -55
- package/assets/image-editor/images/stickers/emoticons/love.svg +74 -74
- package/assets/image-editor/images/stickers/emoticons/manly.svg +75 -75
- package/assets/image-editor/images/stickers/emoticons/miserly-1.svg +90 -90
- package/assets/image-editor/images/stickers/emoticons/miserly.svg +82 -82
- package/assets/image-editor/images/stickers/emoticons/nerd-1.svg +88 -88
- package/assets/image-editor/images/stickers/emoticons/nerd-2.svg +73 -73
- package/assets/image-editor/images/stickers/emoticons/nerd-3.svg +60 -60
- package/assets/image-editor/images/stickers/emoticons/nerd-4.svg +70 -70
- package/assets/image-editor/images/stickers/emoticons/nerd.svg +88 -88
- package/assets/image-editor/images/stickers/emoticons/ninja.svg +51 -51
- package/assets/image-editor/images/stickers/emoticons/pirate-1.svg +92 -92
- package/assets/image-editor/images/stickers/emoticons/pirate-2.svg +48 -48
- package/assets/image-editor/images/stickers/emoticons/pirate.svg +286 -286
- package/assets/image-editor/images/stickers/emoticons/punk-1.svg +134 -134
- package/assets/image-editor/images/stickers/emoticons/punk-2.svg +153 -153
- package/assets/image-editor/images/stickers/emoticons/punk.svg +82 -82
- package/assets/image-editor/images/stickers/emoticons/rapper.svg +51 -51
- package/assets/image-editor/images/stickers/emoticons/relieved.svg +56 -56
- package/assets/image-editor/images/stickers/emoticons/rich-1.svg +59 -59
- package/assets/image-editor/images/stickers/emoticons/rich-2.svg +93 -93
- package/assets/image-editor/images/stickers/emoticons/rich.svg +88 -88
- package/assets/image-editor/images/stickers/emoticons/rockstar.svg +177 -177
- package/assets/image-editor/images/stickers/emoticons/sad-1.svg +43 -43
- package/assets/image-editor/images/stickers/emoticons/sad-2.svg +49 -49
- package/assets/image-editor/images/stickers/emoticons/sad-3.svg +49 -49
- package/assets/image-editor/images/stickers/emoticons/sad-4.svg +49 -49
- package/assets/image-editor/images/stickers/emoticons/sad-5.svg +45 -45
- package/assets/image-editor/images/stickers/emoticons/sad-6.svg +47 -47
- package/assets/image-editor/images/stickers/emoticons/sad.svg +47 -47
- package/assets/image-editor/images/stickers/emoticons/scared-1.svg +79 -79
- package/assets/image-editor/images/stickers/emoticons/scared-2.svg +59 -59
- package/assets/image-editor/images/stickers/emoticons/scared-3.svg +52 -52
- package/assets/image-editor/images/stickers/emoticons/scared.svg +45 -45
- package/assets/image-editor/images/stickers/emoticons/sceptic-1.svg +59 -59
- package/assets/image-editor/images/stickers/emoticons/sceptic-2.svg +80 -80
- package/assets/image-editor/images/stickers/emoticons/sceptic-3.svg +59 -59
- package/assets/image-editor/images/stickers/emoticons/sceptic-4.svg +46 -46
- package/assets/image-editor/images/stickers/emoticons/sceptic-5.svg +43 -43
- package/assets/image-editor/images/stickers/emoticons/sceptic-6.svg +42 -42
- package/assets/image-editor/images/stickers/emoticons/sceptic-7.svg +50 -50
- package/assets/image-editor/images/stickers/emoticons/sceptic.svg +44 -44
- package/assets/image-editor/images/stickers/emoticons/secret.svg +48 -48
- package/assets/image-editor/images/stickers/emoticons/shocked-1.svg +67 -67
- package/assets/image-editor/images/stickers/emoticons/shocked-2.svg +44 -44
- package/assets/image-editor/images/stickers/emoticons/shocked-3.svg +48 -48
- package/assets/image-editor/images/stickers/emoticons/shocked.svg +46 -46
- package/assets/image-editor/images/stickers/emoticons/sick-1.svg +55 -55
- package/assets/image-editor/images/stickers/emoticons/sick-2.svg +48 -48
- package/assets/image-editor/images/stickers/emoticons/sick-3.svg +49 -49
- package/assets/image-editor/images/stickers/emoticons/sick-4.svg +52 -52
- package/assets/image-editor/images/stickers/emoticons/sick.svg +52 -52
- package/assets/image-editor/images/stickers/emoticons/silent.svg +43 -43
- package/assets/image-editor/images/stickers/emoticons/skeleton.svg +64 -64
- package/assets/image-editor/images/stickers/emoticons/smile.svg +43 -43
- package/assets/image-editor/images/stickers/emoticons/smiling-1.svg +47 -47
- package/assets/image-editor/images/stickers/emoticons/smiling.svg +75 -75
- package/assets/image-editor/images/stickers/emoticons/smoked.svg +131 -131
- package/assets/image-editor/images/stickers/emoticons/smug-1.svg +74 -74
- package/assets/image-editor/images/stickers/emoticons/smug-2.svg +82 -82
- package/assets/image-editor/images/stickers/emoticons/smug-3.svg +71 -71
- package/assets/image-editor/images/stickers/emoticons/smug-4.svg +50 -50
- package/assets/image-editor/images/stickers/emoticons/smug-5.svg +64 -64
- package/assets/image-editor/images/stickers/emoticons/smug-6.svg +82 -82
- package/assets/image-editor/images/stickers/emoticons/smug.svg +96 -96
- package/assets/image-editor/images/stickers/emoticons/sporty.svg +68 -68
- package/assets/image-editor/images/stickers/emoticons/stunned.svg +72 -72
- package/assets/image-editor/images/stickers/emoticons/superhero-1.svg +60 -60
- package/assets/image-editor/images/stickers/emoticons/superhero-2.svg +47 -47
- package/assets/image-editor/images/stickers/emoticons/superhero-3.svg +48 -48
- package/assets/image-editor/images/stickers/emoticons/superhero-4.svg +52 -52
- package/assets/image-editor/images/stickers/emoticons/superhero.svg +45 -45
- package/assets/image-editor/images/stickers/emoticons/surprised-1.svg +47 -47
- package/assets/image-editor/images/stickers/emoticons/surprised.svg +58 -58
- package/assets/image-editor/images/stickers/emoticons/thinking.svg +43 -43
- package/assets/image-editor/images/stickers/emoticons/tired-1.svg +78 -78
- package/assets/image-editor/images/stickers/emoticons/tired-2.svg +65 -65
- package/assets/image-editor/images/stickers/emoticons/tired-3.svg +59 -59
- package/assets/image-editor/images/stickers/emoticons/tired.svg +83 -83
- package/assets/image-editor/images/stickers/emoticons/tough-1.svg +65 -65
- package/assets/image-editor/images/stickers/emoticons/tough.svg +158 -158
- package/assets/image-editor/images/stickers/emoticons/trendy.svg +57 -57
- package/assets/image-editor/images/stickers/emoticons/vampire-1.svg +56 -56
- package/assets/image-editor/images/stickers/emoticons/vampire.svg +59 -59
- package/assets/image-editor/images/stickers/emoticons/wink-1.svg +54 -54
- package/assets/image-editor/images/stickers/emoticons/wink-2.svg +64 -64
- package/assets/image-editor/images/stickers/emoticons/wink.svg +73 -73
- package/assets/image-editor/images/stickers/emoticons/winking-1.svg +52 -52
- package/assets/image-editor/images/stickers/emoticons/winking.svg +43 -43
- package/assets/image-editor/images/stickers/emoticons/yawning-1.svg +62 -62
- package/assets/image-editor/images/stickers/emoticons/yawning-2.svg +51 -51
- package/assets/image-editor/images/stickers/emoticons/yawning-3.svg +51 -51
- package/assets/image-editor/images/stickers/emoticons/yawning.svg +73 -73
- package/assets/image-editor/images/stickers/emoticons/yelling.svg +80 -80
- package/assets/image-editor/images/stickers/emoticons/zombie.svg +65 -65
- package/assets/image-editor/images/stickers/landmarks/0.svg +38 -38
- package/assets/image-editor/images/stickers/landmarks/1.svg +46 -46
- package/assets/image-editor/images/stickers/landmarks/10.svg +18 -18
- package/assets/image-editor/images/stickers/landmarks/11.svg +81 -81
- package/assets/image-editor/images/stickers/landmarks/12.svg +77 -77
- package/assets/image-editor/images/stickers/landmarks/13.svg +42 -42
- package/assets/image-editor/images/stickers/landmarks/14.svg +78 -78
- package/assets/image-editor/images/stickers/landmarks/15.svg +84 -84
- package/assets/image-editor/images/stickers/landmarks/16.svg +87 -87
- package/assets/image-editor/images/stickers/landmarks/17.svg +60 -60
- package/assets/image-editor/images/stickers/landmarks/18.svg +30 -30
- package/assets/image-editor/images/stickers/landmarks/19.svg +36 -36
- package/assets/image-editor/images/stickers/landmarks/2.svg +28 -28
- package/assets/image-editor/images/stickers/landmarks/20.svg +137 -137
- package/assets/image-editor/images/stickers/landmarks/21.svg +63 -63
- package/assets/image-editor/images/stickers/landmarks/22.svg +26 -26
- package/assets/image-editor/images/stickers/landmarks/23.svg +52 -52
- package/assets/image-editor/images/stickers/landmarks/24.svg +56 -56
- package/assets/image-editor/images/stickers/landmarks/25.svg +40 -40
- package/assets/image-editor/images/stickers/landmarks/26.svg +34 -34
- package/assets/image-editor/images/stickers/landmarks/27.svg +32 -32
- package/assets/image-editor/images/stickers/landmarks/28.svg +19 -19
- package/assets/image-editor/images/stickers/landmarks/29.svg +23 -23
- package/assets/image-editor/images/stickers/landmarks/3.svg +36 -36
- package/assets/image-editor/images/stickers/landmarks/30.svg +36 -36
- package/assets/image-editor/images/stickers/landmarks/31.svg +27 -27
- package/assets/image-editor/images/stickers/landmarks/32.svg +25 -25
- package/assets/image-editor/images/stickers/landmarks/33.svg +29 -29
- package/assets/image-editor/images/stickers/landmarks/34.svg +72 -72
- package/assets/image-editor/images/stickers/landmarks/35.svg +18 -18
- package/assets/image-editor/images/stickers/landmarks/36.svg +45 -45
- package/assets/image-editor/images/stickers/landmarks/37.svg +46 -46
- package/assets/image-editor/images/stickers/landmarks/38.svg +44 -44
- package/assets/image-editor/images/stickers/landmarks/39.svg +23 -23
- package/assets/image-editor/images/stickers/landmarks/4.svg +33 -33
- package/assets/image-editor/images/stickers/landmarks/40.svg +25 -25
- package/assets/image-editor/images/stickers/landmarks/41.svg +69 -69
- package/assets/image-editor/images/stickers/landmarks/42.svg +75 -75
- package/assets/image-editor/images/stickers/landmarks/43.svg +44 -44
- package/assets/image-editor/images/stickers/landmarks/44.svg +65 -65
- package/assets/image-editor/images/stickers/landmarks/45.svg +19 -19
- package/assets/image-editor/images/stickers/landmarks/46.svg +47 -47
- package/assets/image-editor/images/stickers/landmarks/47.svg +544 -544
- package/assets/image-editor/images/stickers/landmarks/48.svg +162 -162
- package/assets/image-editor/images/stickers/landmarks/49.svg +70 -70
- package/assets/image-editor/images/stickers/landmarks/5.svg +36 -36
- package/assets/image-editor/images/stickers/landmarks/50.svg +52 -52
- package/assets/image-editor/images/stickers/landmarks/51.svg +110 -110
- package/assets/image-editor/images/stickers/landmarks/52.svg +41 -41
- package/assets/image-editor/images/stickers/landmarks/53.svg +74 -74
- package/assets/image-editor/images/stickers/landmarks/54.svg +36 -36
- package/assets/image-editor/images/stickers/landmarks/55.svg +84 -84
- package/assets/image-editor/images/stickers/landmarks/56.svg +93 -93
- package/assets/image-editor/images/stickers/landmarks/57.svg +67 -67
- package/assets/image-editor/images/stickers/landmarks/58.svg +101 -101
- package/assets/image-editor/images/stickers/landmarks/59.svg +47 -47
- package/assets/image-editor/images/stickers/landmarks/6.svg +59 -59
- package/assets/image-editor/images/stickers/landmarks/60.svg +134 -134
- package/assets/image-editor/images/stickers/landmarks/61.svg +79 -79
- package/assets/image-editor/images/stickers/landmarks/62.svg +43 -43
- package/assets/image-editor/images/stickers/landmarks/63.svg +83 -83
- package/assets/image-editor/images/stickers/landmarks/64.svg +99 -99
- package/assets/image-editor/images/stickers/landmarks/65.svg +79 -79
- package/assets/image-editor/images/stickers/landmarks/66.svg +37 -37
- package/assets/image-editor/images/stickers/landmarks/67.svg +82 -82
- package/assets/image-editor/images/stickers/landmarks/68.svg +216 -216
- package/assets/image-editor/images/stickers/landmarks/69.svg +17 -17
- package/assets/image-editor/images/stickers/landmarks/7.svg +16 -16
- package/assets/image-editor/images/stickers/landmarks/70.svg +45 -45
- package/assets/image-editor/images/stickers/landmarks/71.svg +37 -37
- package/assets/image-editor/images/stickers/landmarks/72.svg +28 -28
- package/assets/image-editor/images/stickers/landmarks/73.svg +25 -25
- package/assets/image-editor/images/stickers/landmarks/74.svg +23 -23
- package/assets/image-editor/images/stickers/landmarks/75.svg +88 -88
- package/assets/image-editor/images/stickers/landmarks/76.svg +25 -25
- package/assets/image-editor/images/stickers/landmarks/77.svg +23 -23
- package/assets/image-editor/images/stickers/landmarks/78.svg +63 -63
- package/assets/image-editor/images/stickers/landmarks/79.svg +25 -25
- package/assets/image-editor/images/stickers/landmarks/8.svg +52 -52
- package/assets/image-editor/images/stickers/landmarks/80.svg +29 -29
- package/assets/image-editor/images/stickers/landmarks/81.svg +44 -44
- package/assets/image-editor/images/stickers/landmarks/82.svg +83 -83
- package/assets/image-editor/images/stickers/landmarks/83.svg +65 -65
- package/assets/image-editor/images/stickers/landmarks/84.svg +31 -31
- package/assets/image-editor/images/stickers/landmarks/85.svg +30 -30
- package/assets/image-editor/images/stickers/landmarks/86.svg +26 -26
- package/assets/image-editor/images/stickers/landmarks/87.svg +132 -132
- package/assets/image-editor/images/stickers/landmarks/88.svg +93 -93
- package/assets/image-editor/images/stickers/landmarks/89.svg +91 -91
- package/assets/image-editor/images/stickers/landmarks/9.svg +70 -70
- package/assets/image-editor/images/stickers/landmarks/90.svg +65 -65
- package/assets/image-editor/images/stickers/landmarks/91.svg +36 -36
- package/assets/image-editor/images/stickers/landmarks/92.svg +66 -66
- package/assets/image-editor/images/stickers/landmarks/93.svg +65 -65
- package/assets/image-editor/images/stickers/landmarks/94.svg +28 -28
- package/assets/image-editor/images/stickers/landmarks/95.svg +31 -31
- package/assets/image-editor/images/stickers/landmarks/96.svg +25 -25
- package/assets/image-editor/images/stickers/landmarks/97.svg +31 -31
- package/assets/image-editor/images/stickers/landmarks/98.svg +52 -52
- package/assets/image-editor/images/stickers/landmarks/99.svg +56 -56
- package/assets/image-editor/images/stickers/transportation/0.svg +26 -26
- package/assets/image-editor/images/stickers/transportation/1.svg +10 -10
- package/assets/image-editor/images/stickers/transportation/10.svg +16 -16
- package/assets/image-editor/images/stickers/transportation/11.svg +30 -30
- package/assets/image-editor/images/stickers/transportation/12.svg +22 -22
- package/assets/image-editor/images/stickers/transportation/13.svg +24 -24
- package/assets/image-editor/images/stickers/transportation/14.svg +19 -19
- package/assets/image-editor/images/stickers/transportation/15.svg +23 -23
- package/assets/image-editor/images/stickers/transportation/16.svg +25 -25
- package/assets/image-editor/images/stickers/transportation/17.svg +34 -34
- package/assets/image-editor/images/stickers/transportation/18.svg +29 -29
- package/assets/image-editor/images/stickers/transportation/19.svg +24 -24
- package/assets/image-editor/images/stickers/transportation/2.svg +27 -27
- package/assets/image-editor/images/stickers/transportation/20.svg +25 -25
- package/assets/image-editor/images/stickers/transportation/21.svg +22 -22
- package/assets/image-editor/images/stickers/transportation/3.svg +18 -18
- package/assets/image-editor/images/stickers/transportation/4.svg +24 -24
- package/assets/image-editor/images/stickers/transportation/5.svg +15 -15
- package/assets/image-editor/images/stickers/transportation/6.svg +25 -25
- package/assets/image-editor/images/stickers/transportation/7.svg +17 -17
- package/assets/image-editor/images/stickers/transportation/8.svg +28 -28
- package/assets/image-editor/images/stickers/transportation/9.svg +23 -23
- package/file-manager.css +17 -10
- package/file-manager.esm.js +4 -4
- package/file-manager.esm.js.map +1 -1
- package/file-manager.js +1 -1
- package/notification.d.ts +364 -364
- package/package.json +30 -30
- package/sample-files.json +104 -104
- package/test-pixie-loading.html +108 -108
package/file-manager.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import i,{useState as o,useEffect as a,createContext as s,useContext as l,useCallback as c,useRef as u,useMemo as d,createElement as h,memo as f,forwardRef as p,useImperativeHandle as g,Children as m,isValidElement as v,Fragment as y,useId as b,cloneElement as w,useLayoutEffect as x,useInsertionEffect as C,Component as _}from"react";import{createRoot as S}from"react-dom/client";import{Spin as k,theme as A,ConfigProvider as E,App as I,Form as T,Input as O,Image as F,Typography as P,Select as M,Checkbox as R,Tooltip as L,Dropdown as j,Button as D,Space as N,Segmented as z,Pagination as B,Table as V,Empty as U,Row as $,Col as W,Card as H,Tree as G,Modal as Y,Menu as q,Divider as X,Layout as K,Radio as Z,Tag as J,Carousel as Q,Alert as ee}from"antd";import te from"antd/es/alert/ErrorBoundary";import ne,{LoadingOutlined as re,FolderOutlined as ie,EyeOutlined as oe,BarsOutlined as ae,AppstoreOutlined as se,DownOutlined as le,RightOutlined as ce,LinkOutlined as ue,UploadOutlined as de,FileOutlined as he,FolderAddOutlined as fe,FolderOpenOutlined as pe,CloseOutlined as ge,HistoryOutlined as me,ArrowRightOutlined as ve,ArrowLeftOutlined as ye,CheckOutlined as be}from"@ant-design/icons";import*as we from"react-dom";import{createPortal as xe,flushSync as Ce}from"react-dom";import"antd/dist/reset.css";function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _e(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_e(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}function Ae(e){var t=function(e,t){if("object"!=ke(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=ke(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ke(t)?t:t+""}function Ee(e,t,n){return(t=Ae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach(function(t){Ee(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Oe={},Fe=[];function Pe(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var n=Fe.reduce(function(e,t){return t(null!=e?e:"","warning")},t);n&&console.error("Warning: ".concat(n))}}function Me(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var n=Fe.reduce(function(e,t){return t(null!=e?e:"","note")},t);n&&console.warn("Note: ".concat(n))}}function Re(e,t,n){t||Oe[n]||(e(!1,n),Oe[n]=!0)}function Le(e,t){Re(Pe,e,t)}function je(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=r.has(t);if(Le(!a,"Warning: There may be circular references"),a)return!1;if(t===i)return!0;if(n&&o>1)return!1;r.add(t);var s=o+1;if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(var l=0;l<t.length;l++)if(!e(t[l],i[l],s))return!1;return!0}if(t&&i&&"object"===ke(t)&&"object"===ke(i)){var c=Object.keys(t);return c.length===Object.keys(i).length&&c.every(function(n){return e(t[n],i[n],s)})}return!1}(e,t)}function De(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ne(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ae(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}Le.preMessage=function(e){Fe.push(e)},Le.resetWarned=function(){Oe={}},Le.noteOnce=function(e,t){Re(Me,e,t)};function ze(e){return e.join("%")}var Be=function(){function e(t){De(this,e),Ee(this,"instanceId",void 0),Ee(this,"cache",new Map),Ee(this,"extracted",new Set),this.instanceId=t}return Ne(e,[{key:"get",value:function(e){return this.opGet(ze(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(ze(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}(),Ve=["children"],Ue="data-css-hash",$e="__cssinjs_instance__";function We(){var e=Math.random().toString(12).slice(2);if("undefined"!=typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(Ue,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(t){t[$e]=t[$e]||e,t[$e]===e&&document.head.insertBefore(t,n)});var r={};Array.from(document.querySelectorAll("style[".concat(Ue,"]"))).forEach(function(t){var n,i=t.getAttribute(Ue);r[i]?t[$e]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[i]=!0})}return new Be(e)}var He=r.createContext({hashPriority:"low",cache:We(),defaultCache:!0}),Ge=function(e){var t,n,i,o,a=e.children,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Ve),l=r.useContext(He),c=(t=function(){var e=Te({},l);Object.keys(s).forEach(function(t){var n=s[t];void 0!==s[t]&&(e[t]=n)});var t=s.cache;return e.cache=e.cache||We(),e.defaultCache=!t&&l.defaultCache,e},n=[l,s],i=function(e,t){return!je(e[0],t[0],!0)||!je(e[1],t[1],!0)},"value"in(o=r.useRef({})).current&&!i(o.current.condition,n)||(o.current.value=t(),o.current.condition=n),o.current.value);return r.createElement(He.Provider,{value:c},a)};var Ye=function(){function e(){De(this,e),Ee(this,"cache",void 0),Ee(this,"keys",void 0),Ee(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return Ne(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={map:this.cache};return e.forEach(function(e){var t;i?i=null===(t=i)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):i=void 0}),null!==(t=i)&&void 0!==t&&t.value&&r&&(i.value[1]=this.cacheCallTimes++),null===(n=i)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce(function(e,t){var n=Se(e,2)[1];return r.internalGet(t)[1]<n?[t,r.internalGet(t)[1]]:e},[this.keys[0],this.cacheCallTimes]),o=Se(i,1)[0];this.delete(o)}this.keys.push(t)}var a=this.cache;t.forEach(function(e,i){if(i===t.length-1)a.set(e,{value:[n,r.cacheCallTimes++]});else{var o=a.get(e);o?o.map||(o.map=new Map):a.set(e,{map:new Map}),a=a.get(e).map}})}},{key:"deleteByPath",value:function(e,t){var n,r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),null===(n=r.value)||void 0===n?void 0:n[0];var i=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),i}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter(function(t){return!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,e)}),this.deleteByPath(this.cache,e)}}]),e}();function qe(e,t,n){if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var r=Te(Te({},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),{},Ee(Ee({},"data-token-hash",t),Ue,n)),i=Object.keys(r).map(function(e){var t=r[e];return t?"".concat(e,'="').concat(t,'"'):null}).filter(function(e){return e}).join(" ");return"<style ".concat(i,">").concat(e,"</style>")}Ee(Ye,"MAX_CACHE_SIZE",20),Ee(Ye,"MAX_CACHE_OFFSET",5),new Ye,"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect,Te({},r).useInsertionEffect,Te({},r).useInsertionEffect;if(process.env.NODE_ENV,"production"!==process.env.NODE_ENV&&"undefined"!=typeof module&&module&&module.hot&&"undefined"!=typeof window){var Xe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:null;if(Xe&&"function"==typeof Xe.webpackHotUpdate){var Ke=Xe.webpackHotUpdate;Xe.webpackHotUpdate=function(){return setTimeout(function(){0},0),Ke.apply(void 0,arguments)}}}process.env.NODE_ENV;var Ze="comm",Je="rule",Qe="decl",et=Math.abs,tt=String.fromCharCode;function nt(e){return e.trim()}function rt(e,t,n){return e.replace(t,n)}function it(e,t,n){return e.indexOf(t,n)}function ot(e,t){return 0|e.charCodeAt(t)}function at(e,t,n){return e.slice(t,n)}function st(e){return e.length}function lt(e,t){return t.push(e),e}var ct=1,ut=1,dt=0,ht=0,ft=0,pt="";function gt(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:ct,column:ut,length:a,return:"",siblings:s}}function mt(){return ft=ht>0?ot(pt,--ht):0,ut--,10===ft&&(ut=1,ct--),ft}function vt(){return ft=ht<dt?ot(pt,ht++):0,ut++,10===ft&&(ut=1,ct++),ft}function yt(){return ot(pt,ht)}function bt(){return ht}function wt(e,t){return at(pt,e,t)}function xt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ct(e){return nt(wt(ht-1,kt(91===e?e+2:40===e?e+1:e)))}function _t(e){for(;(ft=yt())&&ft<33;)vt();return xt(e)>2||xt(ft)>3?"":" "}function St(e,t){for(;--t&&vt()&&!(ft<48||ft>102||ft>57&&ft<65||ft>70&&ft<97););return wt(e,bt()+(t<6&&32==yt()&&32==vt()))}function kt(e){for(;vt();)switch(ft){case e:return ht;case 34:case 39:34!==e&&39!==e&&kt(ft);break;case 40:41===e&&kt(e);break;case 92:vt()}return ht}function At(e,t){for(;vt()&&e+ft!==57&&(e+ft!==84||47!==yt()););return"/*"+wt(t,ht-1)+"*"+tt(47===e?e:vt())}function Et(e){for(;!xt(yt());)vt();return wt(e,ht)}function It(e){return function(e){return pt="",e}(Tt("",null,null,null,[""],e=function(e){return ct=ut=1,dt=st(pt=e),ht=0,[]}(e),0,[0],e))}function Tt(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,h=0,f=0,p=0,g=1,m=1,v=1,y=0,b="",w=i,x=o,C=r,_=b;m;)switch(p=y,y=vt()){case 40:if(108!=p&&58==ot(_,d-1)){-1!=it(_+=rt(Ct(y),"&","&\f"),"&\f",et(c?s[c-1]:0))&&(v=-1);break}case 34:case 39:case 91:_+=Ct(y);break;case 9:case 10:case 13:case 32:_+=_t(p);break;case 92:_+=St(bt()-1,7);continue;case 47:switch(yt()){case 42:case 47:lt(Ft(At(vt(),bt()),t,n,l),l),5!=xt(p||1)&&5!=xt(yt()||1)||!st(_)||" "===at(_,-1,void 0)||(_+=" ");break;default:_+="/"}break;case 123*g:s[c++]=st(_)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+u:-1==v&&(_=rt(_,/\f/g,"")),f>0&&(st(_)-d||0===g&&47===p)&<(f>32?Pt(_+";",r,n,d-1,l):Pt(rt(_," ","")+";",r,n,d-2,l),l);break;case 59:_+=";";default:if(lt(C=Ot(_,t,n,c,u,i,s,b,w=[],x=[],d,o),o),123===y)if(0===u)Tt(_,t,C,C,w,o,d,s,x);else{switch(h){case 99:if(110===ot(_,3))break;case 108:if(97===ot(_,2))break;default:u=0;case 100:case 109:case 115:}u?Tt(e,C,C,r&<(Ot(e,C,C,0,0,i,s,b,i,w=[],d,x),x),i,x,d,s,r?w:x):Tt(_,C,C,C,[""],x,0,s,x)}}c=u=f=0,g=v=1,b=_="",d=a;break;case 58:d=1+st(_),f=p;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==mt())continue;switch(_+=tt(y),y*g){case 38:v=u>0?1:(_+="\f",-1);break;case 44:s[c++]=(st(_)-1)*v,v=1;break;case 64:45===yt()&&(_+=Ct(vt())),h=yt(),u=d=st(b=_+=Et(bt())),y++;break;case 45:45===p&&2==st(_)&&(g=0)}}return o}function Ot(e,t,n,r,i,o,a,s,l,c,u,d){for(var h=i-1,f=0===i?o:[""],p=function(e){return e.length}(f),g=0,m=0,v=0;g<r;++g)for(var y=0,b=at(e,h+1,h=et(m=a[g])),w=e;y<p;++y)(w=nt(m>0?f[y]+" "+b:rt(b,/&\f/g,f[y])))&&(l[v++]=w);return gt(e,t,n,0===i?Je:s,l,c,u,d)}function Ft(e,t,n,r){return gt(e,t,n,Ze,tt(ft),at(e,2,-2),0,r)}function Pt(e,t,n,r,i){return gt(e,t,n,Qe,at(e,0,r),at(e,r+1,-1),r,i)}function Mt(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Rt(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case Qe:return e.return=e.return||e.value;case Ze:return"";case"@keyframes":return e.return=e.value+"{"+Mt(e.children,r)+"}";case Je:if(!st(e.value=e.props.join(",")))return""}return st(n=Mt(e.children,r))?e.return=e.value+"{"+n+"}":""}function Lt(e){return e.notSplit=!0,e}Ee(Ee(Ee({},"style",function(e,t,n){var r=Se(e,6),i=r[0],o=r[1],a=r[2],s=r[3],l=r[4],c=r[5],u=(n||{}).plain;if(l)return null;var d=i,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(c)};return d=qe(i,o,a,h,u),s&&Object.keys(s).forEach(function(e){if(!t[e]){t[e]=!0;var n=function(e){return Mt(It(e),Rt).replace(/\{%%%\:[^;];}/g,";")}(s[e]),r=qe(n,o,"_effect-".concat(e),h,u);e.startsWith("@layer")?d=r+d:d+=r}}),[c,a,d]}),"token",function(e,t,n){var r=Se(e,5),i=r[2],o=r[3],a=r[4],s=(n||{}).plain;if(!o)return null;var l=i._tokenKey;return[-999,l,qe(o,a,l,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}),"cssVar",function(e,t,n){var r=Se(e,4),i=r[1],o=r[2],a=r[3],s=(n||{}).plain;if(!i)return null;return[-999,o,qe(i,a,o,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}),Lt(["borderTop","borderBottom"]),Lt(["borderTop"]),Lt(["borderBottom"]),Lt(["borderLeft","borderRight"]),Lt(["borderLeft"]),Lt(["borderRight"]);const jt={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};function Dt(e,t){return t}function Nt(e,t){return e.filter(e=>void 0!==e)}var zt;function Bt(e){return"object"!=typeof e||null===e?0:Array.isArray(e)?2:function(e){if(!$t.includes(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(void 0===t)return!0;const n=t.prototype;if(null===n||"object"!=typeof n||!$t.includes(Object.prototype.toString.call(n)))return!1;if(!n.hasOwnProperty("isPrototypeOf"))return!1;return!0}(e)?1:e instanceof Set?3:e instanceof Map?4:5}function Vt(e,t){return"object"==typeof e&&Object.prototype.propertyIsEnumerable.call(e,t)}function Ut(e){let t=0,n=e[0]?.[Symbol.iterator]();return{[Symbol.iterator]:()=>({next(){for(;;){if(void 0===n)return{done:!0,value:void 0};const r=n.next();if(!0!==r.done)return{done:!1,value:r.value};t+=1,n=e[t]?.[Symbol.iterator]()}}})}}!function(e){e[e.NOT=0]="NOT",e[e.RECORD=1]="RECORD",e[e.ARRAY=2]="ARRAY",e[e.SET=3]="SET",e[e.MAP=4]="MAP",e[e.OTHER=5]="OTHER"}(zt||(zt={}));const $t=["[object Object]","[object Module]"];const Wt={mergeRecords:function(e,t,n){const r={};for(const i of function(e){const t=new Set;for(const n of e)for(const e of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(e);return t}(e)){const o=[];for(const t of e)Vt(t,i)&&o.push(t[i]);if(0===o.length)continue;const a=t.metaDataUpdater(n,{key:i,parents:e}),s=Gt(o,t,a);s!==jt.skip&&("__proto__"===i?Object.defineProperty(r,i,{value:s,configurable:!0,enumerable:!0,writable:!0}):r[i]=s)}return r},mergeArrays:function(e){return e.flat()},mergeSets:function(e){return new Set(Ut(e))},mergeMaps:function(e){return new Map(Ut(e))},mergeOthers:function(e){return e.at(-1)}};function Ht(...e){return function(e,t){const n=function(e,t){return{defaultMergeFunctions:Wt,mergeFunctions:{...Wt,...Object.fromEntries(Object.entries(e).filter(([e,t])=>Object.hasOwn(Wt,e)).map(([e,t])=>!1===t?[e,Wt.mergeOthers]:[e,t]))},metaDataUpdater:e.metaDataUpdater??Dt,deepmerge:t,useImplicitDefaultMerging:e.enableImplicitDefaultMerging??!1,filterValues:!1===e.filterValues?void 0:e.filterValues??Nt,actions:jt}}(e,r);function r(...e){return Gt(e,n,t)}return r}({})(...e)}function Gt(e,t,n){const r=t.filterValues?.(e,n)??e;if(0===r.length)return;if(1===r.length)return Yt(r,t,n);const i=Bt(r[0]);if(0!==i&&5!==i)for(let e=1;e<r.length;e++)if(Bt(r[e])!==i)return Yt(r,t,n);switch(i){case 1:return function(e,t,n){const r=t.mergeFunctions.mergeRecords(e,t,n);if(r===jt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords)return t.defaultMergeFunctions.mergeRecords(e,t,n);return r}(r,t,n);case 2:return function(e,t,n){const r=t.mergeFunctions.mergeArrays(e,t,n);if(r===jt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays)return t.defaultMergeFunctions.mergeArrays(e);return r}(r,t,n);case 3:return function(e,t,n){const r=t.mergeFunctions.mergeSets(e,t,n);if(r===jt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets)return t.defaultMergeFunctions.mergeSets(e);return r}(r,t,n);case 4:return function(e,t,n){const r=t.mergeFunctions.mergeMaps(e,t,n);if(r===jt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps)return t.defaultMergeFunctions.mergeMaps(e);return r}(r,t,n);default:return Yt(r,t,n)}}function Yt(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===jt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}const qt="my_files",Xt="gif",Kt="stock_images",Zt="ai",Jt="editor",Qt="light",en="dark",tn="system",nn="(prefers-color-scheme: dark)",rn=!1,on=["jpg","jpeg","png","gif","bmp","webp","svg","ico","tiff","tif"],an="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQABLAEsAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAAEsAAAAAQAAASwAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAQOgAwAEAAAAAQAAAMoAAAAA/+EJ2Wh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8APD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6c3RvY2s6Mzk2MmU4NTQtNjA1NC00MGZmLWEwYzMtYjJkNjcwMzQ2OWFhIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmE5M2NiZTgyLWI5NjEtNGUzNS1iYmQ0LWJjZWE1Zjc1YTQwZiIvPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw/eHBhY2tldCBlbmQ9InciPz4A/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAMoBAwMBIgACEQADEQD/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/3QAEABH/2gAMAwEAAhEDEQA/APsuiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoqG7uIbWB55nCooyTS208VxCssLh0boRQBLRRRQAUUUUAFFFFAH/9D7LooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAqG7uIrWBppnCoo5Jou7iK1gaaZwqKM5NcRq2oXOsXqxQq2wnEcYPX3NABq2oXOr3qwxK3l5xHGO/ua6nw7pzadZ7ZJGaR+WBPA9hUfh7R49Pi82TDXDDkkfd9hWxQAUUUUAFFFFABRRRQB//9H7LooooAKKKKACiiuOv/EOpQX88KNDsSQqMp6H60AdjRXD/wDCTapn70P/AH7/APr0f8JPqn96H/v3/wDXoA7iiuH/AOEn1T+9D/37/wDr0f8ACT6p/eh/79//AF6AO4orh/8AhJ9U/vQ/9+//AK9H/CT6p/eh/wC/f/16AO4orh/+En1T+9D/AN+//r0f8JPqn96H/v3/APXoA7iiuH/4SfVP70P/AH7/APr0f8JPqn96H/v3/wDXoA7iiuH/AOEn1T+9D/37/wDr0f8ACT6p/eh/79//AF6AO4orh/8AhJ9U/vQ/9+//AK9H/CT6p/eh/wC/f/16AO4orh/+En1T+9D/AN+//r0f8JPqn96H/v3/APXoA7iobq4itYHmncIijJJrE0jUdQlt2v8AUJIYrNVyMJgv9Oaw9X1C51e8WGJWMecRxr39zQAatqNzq94kUasELYjjB6/Wul8P6NHp8Qlkw1ww5P8Ad9hWRmDw9bfwTajIv4Riqw8Tap6wf98f/XoA7elrh/8AhJtU/vQ/9+//AK9avhnWL3UL94bgx7BGWG1cdwPX3oA6OiiigAooooAKKKKAP//S+y6KKKACiiigArgHAbxSVYAg3mCD3+eu/rgT/wAjV/2+f+z0Adt9jtMf8esH/fsUfY7T/n1g/wC/Yqeh2CIWY4AGSaAK7WlmqktbQADkkxr/AIVUe50JJPLZ7EN6YWuX17WJr+dkRylurYVQfve5rKJoA9Ghh0+Zd0MVtIvqqKaf9jtP+fWD/v2K89sry4sphLbyFD3HY/Wu+0e9TULFLhQATww9DQBJ9jtP+fWD/v2KattZM7ILe3LL94bF4p99cx2lpJcS/dRc/X2rjdG1eSLWmuZ2Oy4bEnoPQ/hQB2P2O0/59YP+/Yo+x2n/AD6wf9+xU4IPSloAr/Y7T/n1g/79ij7Haf8APrB/37FWKKAK/wBjtP8An1g/79ij7Haf8+sH/fsVYooAr/Y7T/n1g/79ioruPTrWBppoLdUUckxj/Cp7u4itYGnmcKijJJriNX1C61i9EUKtsziOMHr7mgBNVv7jVrxYII/3YOIYl/ma6bw9o8enxCSTD3DDkn+H2FHh/R49Pi8yTDXDDkkfd9hWxQBC9rbOxZ7eJmPUlATTfsdp/wA+sH/fsVYooAztXtbVdLumW3hBELkEIOPlNc74H/5Csv8A1xP8xXUaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5igDs6KKKACiiigAooooA//0/suiiigAooooAK4E/8AI1f9vn/s9d9XAn/kav8At8/9noA72s/xI7R6HdMpwdmPzODWhUN/ALqymt26SIVoA816UlS3ML207wSrtdCQai+lAC11HgN2xdx4+XKH6Hn/AArl++K6jSv+JN4flvJhiWfBRe/Tj+ZNAEHjLUfOnFjEw2R/NJju3Yfl/Oudp0jtJIzucsxJJ96bQB2/hLUftdkLeRh50OF+q9jW3XnOkXrWF/HcDJUHDjPUV6HDIssSSIQVYAg0APooooAKhu7iK1gaeZwqKM5NF3cQ2sDTTOFRRk5riNW1C51i9WKJW8vOI4x39zQAavqF1rF6IYVbZnEcYPX3NdL4e0ePT4hLIA1w45JH3fYUeHtHj0+LzJcNcMOTj7vsK2KACiiigAooooAqaz/yCbz/AK4v/wCgmuX8D/8AIWl/64n+YrqNZ/5BN5/1xf8A9BNcv4H/AOQtL/1xP8xQB2dFFFABRRRQAUUUUAf/1PsuiiigAooooAK4E/8AI1f9vn/s9d9XAn/kav8At8/9noA72lpKWgDO1bSLXUQDKCsg6OvX/wCvWFJ4Tn3fJdxFc8FkOa66igDC0zw3a2riadzPIOeRhR+FYXinUPtl+Yoz+5h+VcdCe5/p+FdH4n1H7DYFYziaX5U9vU1wn40AFFFFABXW+DNR3xtp8x+ZPmjyeo7j/PrXJVNZzva3UdxG2HjbP/1qAPTKhu7iK2gaaZwqKOSahTULf+zFv3bZEybsmuP1XULnV70QxK3l7sRxr39zQAmrahc6xerFEreXnEcY7+5rpfD2jx6fF5suGuGHJx932FHh7R49PiEkuGuGHJ/u+wrYoAKKKKACiiigAooooAqaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5iuo1n/AJBN5/1xf/0E1y/gf/kLS/8AXE/zFAHZ0UUUAFFFFABRRRQB/9X7LooooAKKKKACuBP/ACNX/b5/7PXfVwJ/5Gr/ALfP/Z6AO9paSloAKazBVZicBRkmnVz3jHUfs9qLOJsSy/ex2XvQBzuu351DUXlDfu1+WMewqhRRQAUUUv40AFbGi6ZG8TahqB8uzTkA9ZP/AK1Gi6ZG8TajqJ2WcfIB/wCWn/1qi1W+uNWu0hhQiIHbFEv86ADU7+fVbpIIU2xZ2xRL/M103h7R00+LzZcPcMOTj7vsKyCYfD9sQNsupSr+EY/z+ddDot8uoWCTj7/Rx6N3oAvUUUUAFZ17rFta6jDZydZPvNnhPTNSaxqEWn2bTv8AM3RF9TXntxLJPK8sp3O5yx9TQB6dmlrA8Kar9qg+yzt+/jHBP8QrfoAKKKKAKms/8gm8/wCuL/8AoJrl/A//ACFpf+uJ/mK6jWf+QTef9cX/APQTXL+B/wDkLS/9cT/MUAdnRRRQAUUUUAFFFFAH/9b7LooooAKKKKACuBP/ACNX/b5/7PXfVwJ/5Gr/ALfP/Z6AO9paSloAjuZo7eB5pThEGSa851G6e9vJLl+rngeg7Ct/xpqOWXT4m6fNLj9B/X8q5mgBKKKO9AADzWzoumRvEdQ1A7LOPkA/8tP/AK1JoulxvE2oagQlnHyAf+Wn/wBaotVv59WukhhjIizthiX+dABql/catdJBDGRHnbDEv86vkweH7bHyy6jKv4Rj/P8An0UmDw/bEfLLqMq/hGP8/n/Ln5JHlkaSRi7scsx70AEkjySNLIxd2OWY961fCuo/Y78RSNiGY7T7Hsax6WgD1EGmyuscbSOwVVBJPoKy/DGofbrABzmaLCvk9fQ1k+MNU3MdPgY4X/WkevpQBla7qLajel84iTiMe3rWdS0lAEtrPJbXMdxC2HQ5HvXoWlXsd/ZpPGevDD0PevOK0/D2pHTr0FiTBJgOP60Ad/RTUYOoZSCCMg06gCprP/IJvP8Ari//AKCa5fwP/wAhaX/rif5iuo1n/kE3n/XF/wD0E1y/gf8A5C0v/XE/zFAHZ0UUUAFFFFABRRRQB//X+y6KKKACiiigArgT/wAjV/2+f+z131cCf+Rq/wC3z/2egDvarapeJY2Mlw/8I+UZ6nsKs1xni7UftN39ljb91Eecd2/z/WgDFnlknmeaRsu5JJqOigdeKAFrX0XS43iOoagQlnHyAf8Alp/9al0XTI3ibUNQISzj5Ab/AJaf/WqHVb+41a6SGGMrEDtiiX+dAC6rfT6tdJBChEWdsMS/zq+TB4ftj92XUZV/CMf5/P8AkhMPh+2x8suoyr+EY/z+f8sCSR5ZGlkYu7HLMe9ABJI8sjSSMXdjlmPemUUUAFLSUUAWtOvp7CZ5YD8zIVOenNVmJZixJJPUmkooAKKKKAClFJRQB1Pg/VOBp87Dj/VEn9K6jPFeYRs0bh0JDqQQR2Nd7oGpJqNkGJxKnEg/rQBY1n/kE3n/AFxf/wBBNcv4H/5C0v8A1xP8xXUaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5igDs6KKKACiiigAooooA//0PsuiiigAooooAK4E/8AI1f9vn/s9d8a89u5RB4hlnYEiO5LkDvhs0Adtq808Ni7W0TyTEbUCjkE964c6TqhJJspyTySVroB4stsY+xzf99Cj/hK7X/nzl/76FAHPnSdTx/x4z/981d0zRvL33eqr5NtFztbq5/wro7PVo5rF72SB7eBfutIcbvpXLatqFzq94IokYpnEca859zQAmq31xq12sEEZEQOIol/nWxBYzaPZeZBavc30oxlVyIxUVsbLw6i+epuL1wCyp/AP6VY/wCEstv+fSb/AL6FAGBLpmrSyNJJZ3DuxyzFetN/sjU/+fGf/vmug/4Su1/585f++hR/wldr/wA+cv8A30KAOf8A7I1P/nxn/wC+aP7I1P8A58Z/++a6D/hK7X/nzl/76FH/AAldr/z5y/8AfQoA5/8AsjU/+fGf/vmj+yNT/wCfGf8A75roP+Ertf8Anzl/76FH/CV2v/PnL/30KAOf/sjU/wDnxn/75o/sjU/+fGf/AL5roP8AhK7X/nzl/wC+hR/wldr/AM+cv/fQoA5/+yNT/wCfGf8A75o/sjU/+fGf/vmug/4Su1/585f++hR/wldr/wA+cv8A30KAOf8A7I1P/nxn/wC+aP7I1P8A58Z/++a6D/hK7X/nzl/76FH/AAldr/z5y/8AfQoA5/8AsjU/+fGf/vmrmkW+r6ferOllPtzh12n5hWp/wldr/wA+cv8A30KP+Ertf+fOX/voUAa+rNu0a6bBGYGOD1HymuZ8D/8AIWl/64n+YqzfeJre4spoBayqZI2UEkcZGKreB/8AkKyn/pif5igDs6KKKACiiigAooooA//R+y6KKKACiiigArHn8OadPO80nm73YscNjknNbFFAGJ/wjGmf9N/+/lRXGg6NZxG4nMnlpyQ0mQfatq7uIrWBppnCoozk1xGrajdaxeLFCh2E4jjHf3NACapfT6tdpBDGfKU4hjUfrXTeH9HTT4vNkw1yw5JH3fYUeHtHj0+LzZMNcMOSR932FbFAGNL4b0+WRpJXuHdjks0nJNN/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTPSf/v5VrTNGs9PnM1v5m4qVO5s8ZB/pWjRQAUUUUAFFFFABRRRQB//0vsuiiigAooooAKhu7mK1t2nmYKijkmpq5fxda6jNcReXukgYgBVHQ+9AGVq2oXOsXqxRK2zdiNB39zXS+H9Hj0+ISSYa4Ycn+77Cjw/o8enxebLhrhhySPu+wrYoAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/9P7LooooAKKKKACkxS0UAFFFFABRRTW6D6igB1FN7n8KQE+YRQA+iiigAopsnEZI64pR90UALRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//2Q==",sn={keywords:"",color:"",orientation:""};k.setDefaultIndicator(e(()=>e(re,{style:{fontSize:48,height:"100%"},spin:!0}),{}));const ln={hashed:!1,algorithm:A.defaultAlgorithm,token:{colorLink:"#1677ff",colorInfo:"#722ed1",colorTextBase:"#000000",colorBgLayout:"#f0f2f5",borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,colorDarken1:"rgba(0, 0, 0, 0.08)",colorFillSecondaryDarken:"rgba(0, 0, 0, 0.1)",formControlHeight:34,borderWidth:1,borderColorHover:"#C5C5C5",formItemMarginBottomMD:20,formItemMarginBottomXS:8,colorSecondaryH:265.03,colorSecondaryS:"63.92%",colorSecondaryL:"50%",colorSecondaryBgH:273,colorSecondaryBgS:"100%",colorSecondaryBgL:"93%",appZoom:1},components:{Progress:{colorFillSecondary:"#ffffff"},Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}},cn={hashed:!1,algorithm:A.darkAlgorithm,token:{colorBgBase:"#1F1F1F",colorInfo:"#9254de",colorLink:"#1890ff",colorLinkHover:"#69c0ff",wireframe:!1,borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,borderWidth:1,colorDarken1:"rgba(0, 0, 0, 0.9)",colorFillSecondaryDarken:"rgba(255, 255, 255, 0.16)",formControlHeight:34,borderColorHover:"rgba(255, 255, 255, 0.3)",formItemMarginBottomMD:20,formItemMarginBottomXS:8,appZoom:1},components:{Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}},un=({externalTheme:t=Qt,children:n,customThemeToken:r})=>{const i=matchMedia(nn).matches?en:Qt,s=t===tn?i:t,[l,c]=o(s),[u,d]=o("light"===l?ln:cn);return a(()=>{c(s)},[s]),a(()=>{const e="light"===l?ln:cn,t=r?Ht(e.token,r):e.token;d(Object.assign(Object.assign({},e),{token:t}))},[d,l,r]),e("div",{id:"file-manager-element-id",style:{height:"100%"},children:e(E,{theme:u,children:e(Ge,{transformers:[],children:e(I,{style:{height:"100%"},children:n})})})})},dn={fileManager:{locale:"en_US",mode:"fileManager",theme:"light",enabledTabs:["editor"]},imageCenter:{locale:"en_US",mode:"imageCenter",theme:"light",enabledTabs:["stock","gif","editor"]},plugin:{locale:"en_US",mode:"plugin",theme:"light",enabledTabs:["editor","stock","gif","ai"]}},hn=(e="fileManager",t)=>"imageCenter"===e&&t?t:Object.assign({},dn[e]);let fn=!1;const pn=()=>{if(fn)return;window.addEventListener("error",e=>!(!e.message||!e.message.includes("ResizeObserver loop completed with undelivered notifications"))&&(e.stopImmediatePropagation(),e.preventDefault(),!0),!0);const e=window.onerror;window.onerror=(t,n,r,i,o)=>!("string"!=typeof t||!t.includes("ResizeObserver loop completed with undelivered notifications"))||!!e&&e(t,n,r,i,o),window.addEventListener("unhandledrejection",e=>{var t,n;(null===(n=null===(t=e.reason)||void 0===t?void 0:t.message)||void 0===n?void 0:n.includes("ResizeObserver loop completed with undelivered notifications"))&&e.preventDefault()});const t=console.error;if(console.error=(...e)=>{var n;((null===(n=e[0])||void 0===n?void 0:n.toString())||"").includes("ResizeObserver loop completed with undelivered notifications")||t.apply(console,e)},"undefined"!=typeof window){const e=()=>{try{["webpackHotUpdate","__webpack_require__","__webpack_hash__"].forEach(e=>{if(window[e]){const e=window.__webpack_require__;e&&"object"==typeof e&&null!==e&&"cache"in e&&console.warn("✅ Webpack обнаружен, активирована дополнительная защита от ResizeObserver ошибок")}})}catch(e){console.warn("Ошибка при поиске webpack объектов:",e)}};e(),setTimeout(e,1e3)}fn=!0},gn=()=>{fn=!1},mn=(e,t="image/png")=>{let n=t;if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/);t&&t[1].startsWith("image/")&&(n=t[1])}return n=n.includes("jpeg")||n.includes("jpg")?"image/jpeg":n.includes("png")?"image/png":n.includes("gif")?"image/gif":"image/png",n},vn=e=>e.split("/")[1]||"png",yn=/^data:(.+?);base64,(.+)$/i,bn=e=>{const t=(e=>{if("function"!=typeof globalThis.atob)throw new Error("Base64 decoding is not supported in the current environment.");return globalThis.atob(e)})(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r},wn=(e,t)=>{const n=e.replace(/\s/g,""),r=bn(n),i=new ArrayBuffer(r.length);return new Uint8Array(i).set(r),new Blob([i],{type:t})},xn=(e,t="application/octet-stream")=>{if(e instanceof Blob)return e;if("string"==typeof e){const n=e.trim(),r=n.match(yn);if(r){const[,e,t]=r;return wn(t,e)}return wn(n,t)}throw new Error("Unsupported data type. Expected Blob or base64 string.")};var Cn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};const _n={},Sn=(e,t,n,r)=>{In(n)&&_n[n]||(In(n)&&(_n[n]=new Date),((e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);In(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)})(e,t,n,r))},kn=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},An=(e,t,n)=>{e.loadNamespaces(t,kn(e,n))},En=(e,t,n,r)=>{if(In(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return An(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,kn(e,r))},In=e=>"string"==typeof e,Tn=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,On={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Fn=e=>On[e];let Pn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(Tn,Fn)};let Mn;const Rn={type:"3rdParty",init(e){((e={})=>{Pn={...Pn,...e}})(e.options.react),(e=>{Mn=e})(e)}},Ln=s();class jn{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Dn=(e,t,n,r)=>e.getFixedT(t,n,r),Nn=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=l(Ln)||{},s=n||r||Mn;if(s&&!s.reportNamespaces&&(s.reportNamespaces=new jn),!s){Sn(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return In(t)?t:"object"==typeof(n=t)&&null!==n&&In(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e;var n},t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}s.options.react?.wait&&Sn(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const d={...Pn,...s.options.react,...t},{useSuspense:h,keyPrefix:f}=d;let p=i||s.options?.defaultNS;p=In(p)?[p]:p||["translation"],s.reportNamespaces.addUsedNamespaces?.(p);const g=(s.isInitialized||s.initializedStoreOnce)&&p.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(Sn(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,s,d)),m=((e,t,n,r)=>c(Dn(e,t,n,r),[e,t,n,r]))(s,t.lng||null,"fallback"===d.nsMode?p:p[0],f),v=()=>m,y=()=>Dn(s,t.lng||null,"fallback"===d.nsMode?p:p[0],f),[b,w]=o(v);let x=p.join();t.lng&&(x=`${t.lng}${x}`);const C=((e,t)=>{const n=u();return a(()=>{n.current=e},[e,t]),n.current})(x),_=u(!0);a(()=>{const{bindI18n:e,bindI18nStore:n}=d;_.current=!0,g||h||(t.lng?En(s,t.lng,p,()=>{_.current&&w(y)}):An(s,p,()=>{_.current&&w(y)})),g&&C&&C!==x&&_.current&&w(y);const r=()=>{_.current&&w(y)};return e&&s?.on(e,r),n&&s?.store.on(n,r),()=>{_.current=!1,s&&e&&e?.split(" ").forEach(e=>s.off(e,r)),n&&s&&n.split(" ").forEach(e=>s.store.off(e,r))}},[s,x]),a(()=>{_.current&&g&&w(v)},[s,f,g]);const S=[b,s,g];if(S.t=b,S.i18n=s,S.ready=g,g)return S;if(!g&&!h)return S;throw new Promise(e=>{t.lng?En(s,t.lng,p,()=>e()):An(s,p,()=>e())})};function zn({i18n:e,defaultNS:t,children:n}){const r=d(()=>({i18n:e,defaultNS:t}),[e,t]);return h(Ln.Provider,{value:r},n)}const Bn=e=>"string"==typeof e,Vn=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Un=e=>null==e?"":""+e,$n=/###/g,Wn=e=>e&&e.indexOf("###")>-1?e.replace($n,"."):e,Hn=e=>!e||Bn(e),Gn=(e,t,n)=>{const r=Bn(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Hn(e))return{};const t=Wn(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Hn(e)?{}:{obj:e,k:Wn(r[i])}},Yn=(e,t,n)=>{const{obj:r,k:i}=Gn(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],a=t.slice(0,t.length-1),s=Gn(e,a,Object);for(;void 0===s.obj&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=Gn(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},qn=(e,t)=>{const{obj:n,k:r}=Gn(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Xn=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?Bn(e[r])||e[r]instanceof String||Bn(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Xn(e[r],t[r],n):e[r]=t[r]);return e},Kn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Zn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Jn=e=>Bn(e)?e.replace(/[&<>"'\/]/g,e=>Zn[e]):e;const Qn=[" ",",","?","!",";"],er=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),tr=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let i=e;for(let e=0;e<r.length;){if(!i||"object"!=typeof i)return;let t,o="";for(let a=e;a<r.length;++a)if(a!==e&&(o+=n),o+=r[a],t=i[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}i=t}return i},nr=e=>e?.replace("_","-"),rr={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class ir{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||rr,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(Bn(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ir(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new ir(this.logger,e)}}var or=new ir;class ar{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}}}class sr extends ar{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):Bn(n)&&i?a.push(...n.split(i)):a.push(n)));const s=qn(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&o&&Bn(n)?tr(this.data?.[e]?.[t],n,i):s}addResource(e,t,n,r,i={silent:!1}){const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Yn(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(Bn(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i,o={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=qn(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Xn(s,n,i):s={...s,...n},Yn(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var lr={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}};const cr=Symbol("i18next/PATH_KEY");function ur(e,t){const{[cr]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>(n?.revoke?.(),i===cr?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const dr={},hr=e=>!Bn(e)&&"boolean"!=typeof e&&"number"!=typeof e;class fr extends ar{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=or.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);return void 0!==r?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Qn.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const i=er.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Bn(i)?[i]:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return{key:e,namespaces:Bn(i)?[i]:i}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=ur(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const i=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1];let c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const u=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return d?i?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${c}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;const h=this.resolve(e,r);let f=h?.res;const p=h?.usedKey||a,g=h?.exactUsedKey||a,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=void 0!==r.count&&!Bn(r.count),b=fr.hasDefaultValue(r),w=y?this.pluralResolver.getSuffix(u,r.count,r):"",x=r.ordinal&&y?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):"",C=y&&!r.ordinal&&0===r.count,_=C&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${w}`]||r[`defaultValue${x}`]||r.defaultValue;let S=f;v&&!f&&b&&(S=_);const k=hr(S),A=Object.prototype.toString.apply(S);if(!(v&&S&&k&&["[object Number]","[object Function]","[object RegExp]"].indexOf(A)<0)||Bn(m)&&Array.isArray(S))if(v&&Bn(m)&&Array.isArray(f))f=f.join(m),f&&(f=this.extendTranslation(f,e,r,n));else{let t=!1,i=!1;!this.isValidLookup(f)&&b&&(t=!0,f=_),this.isValidLookup(f)||(i=!0,f=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:f,d=b&&_!==f&&this.options.updateMissing;if(i||t||d){if(this.logger.log(d?"updateKey":"missingKey",u,l,a,d?_:f),o){const e=this.resolve(a,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const i=b&&n!==f?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,i,d,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,i,d,r),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);C&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||_)})}):n(e,a,_))}f=this.extendTranslation(f,e,r,h,n),i&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${c}${a}`),(i||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,t?f:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,S,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(h.res=e,h.usedParams=this.getUsedParamsDetails(r),h):e}if(o){const e=Array.isArray(S),t=e?[]:{},n=e?g:p;for(const e in S)if(Object.prototype.hasOwnProperty.call(S,e)){const i=`${n}${o}${e}`;t[e]=b&&!f?this.translate(i,{...r,defaultValue:hr(_)?_[e]:void 0,joinArrays:!1,ns:s}):this.translate(i,{...r,joinArrays:!1,ns:s}),t[e]===i&&(t[e]=S[e])}f=t}}return i?(h.res=f,h.usedParams=this.getUsedParamsDetails(r),h):f}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o=Bn(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&!Bn(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),o){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>i?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,a=Bn(o)?[o]:o;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=lr.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,o,a;return Bn(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const s=this.extractFromKey(e,t),l=s.key;r=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==t.count&&!Bn(t.count),d=u&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(Bn(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(n)||(a=e,dr[`${f[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(dr[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(r=>{if(this.isValidLookup(n))return;o=r;const a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&0===e.indexOf(i)&&a.push(l+e.replace(i,this.options.pluralSeparator)),a.push(l+e),d&&a.push(l+n)),h){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(r),u&&(t.ordinal&&0===e.indexOf(i)&&a.push(r+e.replace(i,this.options.pluralSeparator)),a.push(r+e),d&&a.push(r+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Bn(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class pr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=or.create("languageUtils")}getScriptPartFromCode(e){if(!(e=nr(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=nr(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Bn(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),Bn(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Bn(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):Bn(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}}const gr={zero:0,one:1,two:2,few:3,many:4,other:5},mr={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class vr{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=or.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=nr("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),mr;if(!e.match(/-|_/))return mr;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>gr[e]-gr[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const yr=(e,t,n,r=".",i=!0)=>{let o=((e,t,n)=>{const r=qn(e,n);return void 0!==r?r:qn(t,n)})(e,t,n);return!o&&i&&Bn(n)&&(o=tr(e,n,r),void 0===o&&(o=tr(t,n,r))),o},br=e=>e.replace(/\$/g,"$$$$");class wr{constructor(e={}){this.logger=or.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:f,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Jn,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?Kn(i):o||"{{",this.suffix=a?Kn(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Kn(d):h||Kn("$t("),this.nestingSuffix=f?Kn(f):p||Kn(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=yr(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(yr(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const c=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>br(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?br(this.escape(e)):br(e)}].forEach(t=>{for(a=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=l(n),void 0===o)if("function"==typeof c){const t=c(e,i,r);o=Bn(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(u){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else Bn(o)||this.useRawValueToEscape||(o=Un(o));const s=t.safeValue(o);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,o;const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);((a?.length??0)%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];o={...n},o=o.replace&&!Bn(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),i=t(a.call(this,r[1].trim(),o),o),i&&r[0]===e&&!Bn(i))return i;Bn(i)||(i=Un(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),i=""),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}}const xr=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(nr(r),i),t[a]=s),s(n)}},Cr=e=>(t,n,r)=>e(nr(n),r)(t);class _r{constructor(e={}){this.logger=or.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?xr:Cr;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=xr(t)}format(e,t,n,r={}){const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){const e=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}const o=i.reduce((e,t)=>{const{formatName:i,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{const a=r?.formatParams?.[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...o,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e);return o}}class Sr extends ar{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=or.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,r=!1,void 0===o[a]&&(o[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:i}=Gn(e,t,Object);r[i]=r[i]||[],r[i].push(n)})(n.loaded,[i],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*i,o)},i):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Bn(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Bn(t)&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,i,o={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const s={...o,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let i;i=5===l.length?l(e,t,n,r,s):l(e,t,n,r),i&&"function"==typeof i.then?i.then(e=>a(null,e)).catch(a):a(null,i)}catch(e){a(e)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const kr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),Bn(e[1])&&(t.defaultValue=e[1]),Bn(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Ar=e=>(Bn(e.ns)&&(e.ns=[e.ns]),Bn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Bn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),Er=()=>{};class Ir extends ar{constructor(e={},t){var n;if(super(),this.options=Ar(e),this.services={},this.logger=or,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(Bn(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=kr();this.options={...n,...this.options,...Ar(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?or.init(r(this.modules.logger),this.options):or.init(null,this.options),e=this.modules.formatter?this.modules.formatter:_r;const t=new pr(this.options);this.store=new sr(this.options.resources,this.options);const i=this.services;i.logger=or,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new vr(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new wr(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Sr(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new fr(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Er),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const i=Vn(),o=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),i}loadResources(e,t=Er){let n=t;const r=Bn(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===r?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=Vn();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Er),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&lr.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=Vn();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Bn(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Bn(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{i(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...i)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(i)):{...t},o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);const a=this.options.keySeparator||".";let s;return o.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=ur(e,{...this.options,...t})),`${o.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=ur(e,{...this.options,...t})),s=o.keyPrefix?`${o.keyPrefix}${a}${e}`:e),this.t(s,o)};return Bn(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=Vn();return this.options.ns?(Bn(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Vn();Bn(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new pr(kr());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new Ir(e,t)}cloneInstance(e={},t=Er){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new Ir(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));if(["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});i.store=new sr(e,r),i.services.resourceStore=i.store}return i.translator=new fr(i.services,r),i.translator.on("*",(e,...t)=>{i.emit(e,...t)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Tr=Ir.createInstance();Tr.createInstance=Ir.createInstance,Tr.createInstance,Tr.dir,Tr.init,Tr.loadResources,Tr.reloadResources,Tr.use,Tr.changeLanguage,Tr.getFixedT,Tr.t,Tr.exists,Tr.setDefaultNamespace,Tr.hasLoadedNamespace,Tr.loadNamespaces,Tr.loadLanguages;var Or,Fr,Pr,Mr,Rr,Lr={};function jr(){if(Fr)return Or;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}function n(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function r(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,o(e,t,"get"))}function i(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,o(e,t,"set"),n),n}function o(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function a(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}Fr=1;var s=function(t){if(!t)return[];Array.isArray(t)||(t=[t]);for(var n={},r=0;r<t.length;++r){var i,o=t[r];if(o&&"object"===e(o)&&(o=String(o)),"string"!=typeof o){var a="Locales should be strings, ".concat(JSON.stringify(o)," isn't.");throw new TypeError(a)}var s=o.split("-");if(!s.every(function(e){return/[a-z0-9]+/i.test(e)})){var l=JSON.stringify(o),c="The locale ".concat(l," is not a structurally valid BCP 47 language tag.");throw new RangeError(c)}var u=s[0].toLowerCase();s[0]=null!==(i={in:"id",iw:"he",ji:"yi"}[u])&&void 0!==i?i:u,n[s.join("-")]=!0}return Object.keys(n)};function l(t){switch(e(t)){case"number":return t;case"bigint":throw new TypeError("Cannot convert a BigInt value to a number");default:return Number(t)}}return Or=function(e,n,o,c){var u=function(e){do{if(n(e))return e;e=e.replace(/-?[^-]*$/,"")}while(e);return null},d=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=function(){function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),a(this,d,{writable:!0,value:void 0}),a(this,h,{writable:!0,value:void 0}),a(this,f,{writable:!0,value:void 0}),a(this,p,{writable:!0,value:void 0}),a(this,g,{writable:!0,value:void 0}),i(this,d,function(t){for(var n=s(t),r=0;r<n.length;++r){var i=u(n[r]);if(i)return i}var o=(new e).resolvedOptions().locale;return u(o)}(t)),i(this,f,n(r(this,d))),i(this,h,c(r(this,d))),i(this,p,function(e){var t=Object.prototype.hasOwnProperty.call(e,"type")&&e.type;if(!t)return"cardinal";if("cardinal"===t||"ordinal"===t)return t;throw new RangeError("Not a valid plural type: "+JSON.stringify(t))}(o)),i(this,g,new e("en",o))}var v,y,b;return v=m,b=[{key:"supportedLocalesOf",value:function(e){return s(e).filter(u)}}],(y=[{key:"resolvedOptions",value:function(){var e=r(this,g).resolvedOptions(),t=e.minimumIntegerDigits,n=e.minimumFractionDigits,i=e.maximumFractionDigits,a=e.minimumSignificantDigits,s=e.maximumSignificantDigits,l=e.roundingPriority,c={locale:r(this,d),type:r(this,p),minimumIntegerDigits:t,minimumFractionDigits:n,maximumFractionDigits:i};return"number"==typeof a&&(c.minimumSignificantDigits=a,c.maximumSignificantDigits=s),c.pluralCategories=o(r(this,d),"ordinal"===r(this,p)).slice(0),c.roundingPriority=l||"auto",c}},{key:"select",value:function(e){if(!(this instanceof m))throw new TypeError("select() called on incompatible ".concat(this));if("number"!=typeof e&&(e=Number(e)),!isFinite(e))return"other";var t=r(this,g).format(Math.abs(e));return r(this,f).call(this,t,"ordinal"===r(this,p))}},{key:"selectRange",value:function(e,t){if(!(this instanceof m))throw new TypeError("selectRange() called on incompatible ".concat(this));if(void 0===e)throw new TypeError("start is undefined");if(void 0===t)throw new TypeError("end is undefined");var n=l(e),i=l(t);if(!isFinite(n))throw new RangeError("start must be finite");if(!isFinite(i))throw new RangeError("end must be finite");return r(this,h).call(this,this.select(n),this.select(i))}}])&&t(v.prototype,y),b&&t(v,b),Object.defineProperty(v,"prototype",{writable:!1}),m}();return"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(m.prototype,Symbol.toStringTag,{value:"Intl.PluralRules",writable:!1,configurable:!0}),Object.defineProperty(m,"prototype",{writable:!1}),m},Or}!function(){if(Rr)return Lr;Rr=1;var e=function(){if(Mr)return Pr;function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}Mr=1;var n=e(jr());function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==Cn||"undefined"!=typeof self&&self;var i={exports:{}};!function(e){var t=function(e,t){return t?"other":1==e?"one":"other"},n=function(e,t){return t?"other":0==e||1==e?"one":"other"},r=function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},i=function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},o=function(e,t){return"other"},a=function(e,t){return t?"other":1==e?"one":2==e?"two":"other"};!function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n}(0,{af:t,ak:n,am:r,an:t,ar:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ars:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},as:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},asa:t,ast:i,az:function(e,t){var n=String(e).split(".")[0],r=n.slice(-1),i=n.slice(-2),o=n.slice(-3);return t?1==r||2==r||5==r||7==r||8==r||20==i||50==i||70==i||80==i?"one":3==r||4==r||100==o||200==o||300==o||400==o||500==o||600==o||700==o||800==o||900==o?"few":0==n||6==r||40==i||60==i||90==i?"many":"other":1==e?"one":"other"},bal:function(e,t){return 1==e?"one":"other"},be:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?2!=i&&3!=i||12==o||13==o?"other":"few":1==i&&11!=o?"one":i>=2&&i<=4&&(o<12||o>14)?"few":r&&0==i||i>=5&&i<=9||o>=11&&o<=14?"many":"other"},bem:t,bez:t,bg:t,bho:n,bm:o,bn:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},bo:o,br:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2),a=r&&n[0].slice(-6);return t?"other":1==i&&11!=o&&71!=o&&91!=o?"one":2==i&&12!=o&&72!=o&&92!=o?"two":(3==i||4==i||9==i)&&(o<10||o>19)&&(o<70||o>79)&&(o<90||o>99)?"few":0!=e&&r&&0==a?"many":"other"},brx:t,bs:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},ca:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},ce:t,ceb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},cgg:t,chr:t,ckb:t,cs:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},cy:function(e,t){return t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other"},da:function(e,t){var n=String(e).split("."),r=n[0],i=Number(n[0])==e;return t||1!=e&&(i||0!=r&&1!=r)?"other":"one"},de:i,doi:r,dsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},dv:t,dz:o,ee:t,el:t,en:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1==o&&11!=a?"one":2==o&&12!=a?"two":3==o&&13!=a?"few":"other":1==e&&r?"one":"other"},eo:t,es:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":1==e?"one":0!=r&&0==o&&i?"many":"other"},et:i,eu:t,fa:r,ff:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},fi:i,fil:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},fo:t,fr:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?1==e?"one":"other":e>=0&&e<2?"one":0!=r&&0==o&&i?"many":"other"},fur:t,fy:i,ga:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"},gd:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"},gl:i,gsw:t,gu:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},guw:n,gv:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":!i||0!=a&&20!=a&&40!=a&&60!=a&&80!=a?i?"other":"many":"few"},ha:t,haw:t,he:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==r&&i||0==r&&!i?"one":2==r&&i?"two":"other"},hi:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},hnj:o,hr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},hsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},hu:function(e,t){return t?1==e||5==e?"one":"other":1==e?"one":"other"},hy:function(e,t){return t?1==e?"one":"other":e>=0&&e<2?"one":"other"},ia:i,id:o,ig:o,ii:o,io:i,is:function(e,t){var n=String(e).split("."),r=n[0],i=(n[1]||"").replace(/0+$/,""),o=Number(n[0])==e,a=r.slice(-1),s=r.slice(-2);return t?"other":o&&1==a&&11!=s||i%10==1&&i%100!=11?"one":"other"},it:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},iu:a,ja:o,jbo:o,jgo:t,jmc:t,jv:o,jw:o,ka:function(e,t){var n=String(e).split(".")[0],r=n.slice(-2);return t?1==n?"one":0==n||r>=2&&r<=20||40==r||60==r||80==r?"many":"other":1==e?"one":"other"},kab:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},kaj:t,kcg:t,kde:o,kea:o,kk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1);return t?6==i||9==i||r&&0==i&&0!=e?"many":"other":1==e?"one":"other"},kkj:t,kl:t,km:o,kn:r,ko:o,ks:t,ksb:t,ksh:function(e,t){return t?"other":0==e?"zero":1==e?"one":"other"},ku:t,kw:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-2),o=r&&n[0].slice(-3),a=r&&n[0].slice(-5),s=r&&n[0].slice(-6);return t?r&&e>=1&&e<=4||i>=1&&i<=4||i>=21&&i<=24||i>=41&&i<=44||i>=61&&i<=64||i>=81&&i<=84?"one":5==e||5==i?"many":"other":0==e?"zero":1==e?"one":2==i||22==i||42==i||62==i||82==i||r&&0==o&&(a>=1e3&&a<=2e4||4e4==a||6e4==a||8e4==a)||0!=e&&1e5==s?"two":3==i||23==i||43==i||63==i||83==i?"few":1==e||1!=i&&21!=i&&41!=i&&61!=i&&81!=i?"other":"many"},ky:t,lag:function(e,t){var n=String(e).split(".")[0];return t?"other":0==e?"zero":0!=n&&1!=n||0==e?"other":"one"},lb:t,lg:t,lij:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e;return t?11==e||8==e||i&&e>=80&&e<=89||i&&e>=800&&e<=899?"many":"other":1==e&&r?"one":"other"},lkt:o,ln:n,lo:function(e,t){return t&&1==e?"one":"other"},lt:function(e,t){var n=String(e).split("."),r=n[1]||"",i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?"other":1==o&&(a<11||a>19)?"one":o>=2&&o<=9&&(a<11||a>19)?"few":0!=r?"many":"other"},lv:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&l>=11&&l<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=l||2!=i&&1==c?"one":"other"},mas:t,mg:n,mgo:t,mk:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?1==a&&11!=s?"one":2==a&&12!=s?"two":7!=a&&8!=a||17==s||18==s?"other":"many":o&&1==a&&11!=s||1==l&&11!=c?"one":"other"},ml:t,mn:t,mo:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},mr:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":1==e?"one":"other"},ms:function(e,t){return t&&1==e?"one":"other"},mt:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":1==e?"one":2==e?"two":0==e||r>=3&&r<=10?"few":r>=11&&r<=19?"many":"other"},my:o,nah:t,naq:a,nb:t,nd:t,ne:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?"one":"other":1==e?"one":"other"},nl:i,nn:t,nnh:t,no:t,nqo:o,nr:t,nso:n,ny:t,nyn:t,om:t,or:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||5==e||r&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"},os:t,osa:o,pa:n,pap:t,pcm:r,pl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":1==e&&i?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&1!=r&&(0==o||1==o)||i&&o>=5&&o<=9||i&&a>=12&&a<=14?"many":"other"},prg:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&l>=11&&l<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=l||2!=i&&1==c?"one":"other"},ps:t,pt:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":0==r||1==r?"one":0!=r&&0==o&&i?"many":"other"},pt_PT:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},rm:t,ro:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},rof:t,ru:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o&&11!=a?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&0==o||i&&o>=5&&o<=9||i&&a>=11&&a<=14?"many":"other"},rwk:t,sah:o,saq:t,sat:a,sc:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},scn:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},sd:t,sdh:t,se:a,seh:t,ses:o,sg:o,sh:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},shi:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"},si:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"";return t?"other":0==e||1==e||0==r&&1==i?"one":"other"},sk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},sl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":i&&(3==o||4==o)||!i?"few":"other"},sma:a,smi:a,smj:a,smn:a,sms:a,sn:t,so:t,sq:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?1==e?"one":4==i&&14!=o?"many":"other":1==e?"one":"other"},sr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},ss:t,ssy:t,st:t,su:o,sv:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1!=o&&2!=o||11==a||12==a?"other":"one":1==e&&r?"one":"other"},sw:i,syr:t,ta:t,te:t,teo:t,th:o,ti:n,tig:t,tk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-1);return t?6==r||9==r||10==e?"few":"other":1==e?"one":"other"},tl:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},tn:t,to:o,tpi:o,tr:t,ts:t,tzm:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":0==e||1==e||r&&e>=11&&e<=99?"one":"other"},ug:t,uk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-1),c=r.slice(-2);return t?3==a&&13!=s?"few":"other":i&&1==l&&11!=c?"one":i&&l>=2&&l<=4&&(c<12||c>14)?"few":i&&0==l||i&&l>=5&&l<=9||i&&c>=11&&c<=14?"many":"other"},und:o,ur:i,uz:t,ve:t,vec:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},vi:function(e,t){return t&&1==e?"one":"other"},vo:t,vun:t,wa:n,wae:t,wo:o,xh:t,xog:t,yi:i,yo:o,yue:o,zh:o,zu:r})}(i);var o=r(i.exports),a=t({__proto__:null,default:o},[i.exports]),s={exports:{}};!function(e){var t="zero",n="one",r="two",i="few",o="many",a="other",s={cardinal:[n,a],ordinal:[a]},l={cardinal:[n,a],ordinal:[n,a]},c={cardinal:[a],ordinal:[a]},u={cardinal:[n,r,a],ordinal:[a]};!function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n}(0,{af:s,ak:s,am:s,an:s,ar:{cardinal:[t,n,r,i,o,a],ordinal:[a]},ars:{cardinal:[t,n,r,i,o,a],ordinal:[a]},as:{cardinal:[n,a],ordinal:[n,r,i,o,a]},asa:s,ast:s,az:{cardinal:[n,a],ordinal:[n,i,o,a]},bal:l,be:{cardinal:[n,i,o,a],ordinal:[i,a]},bem:s,bez:s,bg:s,bho:s,bm:c,bn:{cardinal:[n,a],ordinal:[n,r,i,o,a]},bo:c,br:{cardinal:[n,r,i,o,a],ordinal:[a]},brx:s,bs:{cardinal:[n,i,a],ordinal:[a]},ca:{cardinal:[n,o,a],ordinal:[n,r,i,a]},ce:s,ceb:s,cgg:s,chr:s,ckb:s,cs:{cardinal:[n,i,o,a],ordinal:[a]},cy:{cardinal:[t,n,r,i,o,a],ordinal:[t,n,r,i,o,a]},da:s,de:s,doi:s,dsb:{cardinal:[n,r,i,a],ordinal:[a]},dv:s,dz:c,ee:s,el:s,en:{cardinal:[n,a],ordinal:[n,r,i,a]},eo:s,es:{cardinal:[n,o,a],ordinal:[a]},et:s,eu:s,fa:s,ff:s,fi:s,fil:l,fo:s,fr:{cardinal:[n,o,a],ordinal:[n,a]},fur:s,fy:s,ga:{cardinal:[n,r,i,o,a],ordinal:[n,a]},gd:{cardinal:[n,r,i,a],ordinal:[n,r,i,a]},gl:s,gsw:s,gu:{cardinal:[n,a],ordinal:[n,r,i,o,a]},guw:s,gv:{cardinal:[n,r,i,o,a],ordinal:[a]},ha:s,haw:s,he:u,hi:{cardinal:[n,a],ordinal:[n,r,i,o,a]},hnj:c,hr:{cardinal:[n,i,a],ordinal:[a]},hsb:{cardinal:[n,r,i,a],ordinal:[a]},hu:l,hy:l,ia:s,id:c,ig:c,ii:c,io:s,is:s,it:{cardinal:[n,o,a],ordinal:[o,a]},iu:u,ja:c,jbo:c,jgo:s,jmc:s,jv:c,jw:c,ka:{cardinal:[n,a],ordinal:[n,o,a]},kab:s,kaj:s,kcg:s,kde:c,kea:c,kk:{cardinal:[n,a],ordinal:[o,a]},kkj:s,kl:s,km:c,kn:s,ko:c,ks:s,ksb:s,ksh:{cardinal:[t,n,a],ordinal:[a]},ku:s,kw:{cardinal:[t,n,r,i,o,a],ordinal:[n,o,a]},ky:s,lag:{cardinal:[t,n,a],ordinal:[a]},lb:s,lg:s,lij:{cardinal:[n,a],ordinal:[o,a]},lkt:c,ln:s,lo:{cardinal:[a],ordinal:[n,a]},lt:{cardinal:[n,i,o,a],ordinal:[a]},lv:{cardinal:[t,n,a],ordinal:[a]},mas:s,mg:s,mgo:s,mk:{cardinal:[n,a],ordinal:[n,r,o,a]},ml:s,mn:s,mo:{cardinal:[n,i,a],ordinal:[n,a]},mr:{cardinal:[n,a],ordinal:[n,r,i,a]},ms:{cardinal:[a],ordinal:[n,a]},mt:{cardinal:[n,r,i,o,a],ordinal:[a]},my:c,nah:s,naq:u,nb:s,nd:s,ne:l,nl:s,nn:s,nnh:s,no:s,nqo:c,nr:s,nso:s,ny:s,nyn:s,om:s,or:{cardinal:[n,a],ordinal:[n,r,i,o,a]},os:s,osa:c,pa:s,pap:s,pcm:s,pl:{cardinal:[n,i,o,a],ordinal:[a]},prg:{cardinal:[t,n,a],ordinal:[a]},ps:s,pt:{cardinal:[n,o,a],ordinal:[a]},pt_PT:{cardinal:[n,o,a],ordinal:[a]},rm:s,ro:{cardinal:[n,i,a],ordinal:[n,a]},rof:s,ru:{cardinal:[n,i,o,a],ordinal:[a]},rwk:s,sah:c,saq:s,sat:u,sc:{cardinal:[n,a],ordinal:[o,a]},scn:{cardinal:[n,a],ordinal:[o,a]},sd:s,sdh:s,se:u,seh:s,ses:c,sg:c,sh:{cardinal:[n,i,a],ordinal:[a]},shi:{cardinal:[n,i,a],ordinal:[a]},si:s,sk:{cardinal:[n,i,o,a],ordinal:[a]},sl:{cardinal:[n,r,i,a],ordinal:[a]},sma:u,smi:u,smj:u,smn:u,sms:u,sn:s,so:s,sq:{cardinal:[n,a],ordinal:[n,o,a]},sr:{cardinal:[n,i,a],ordinal:[a]},ss:s,ssy:s,st:s,su:c,sv:l,sw:s,syr:s,ta:s,te:s,teo:s,th:c,ti:s,tig:s,tk:{cardinal:[n,a],ordinal:[i,a]},tl:l,tn:s,to:c,tpi:c,tr:s,ts:s,tzm:s,ug:s,uk:{cardinal:[n,i,o,a],ordinal:[i,a]},und:c,ur:s,uz:s,ve:s,vec:{cardinal:[n,o,a],ordinal:[o,a]},vi:{cardinal:[a],ordinal:[n,a]},vo:s,vun:s,wa:s,wae:s,wo:c,xh:s,xog:s,yi:s,yo:c,yue:c,zh:c,zu:s})}(s);var l=r(s.exports),c=t({__proto__:null,default:l},[s.exports]),u={exports:{}};!function(e){var t,n=function(e,t){return"other"},r=function(e,t){return"other"===e&&"one"===t?"one":"other"},i=function(e,t){return t||"other"};t={af:n,ak:r,am:i,an:n,ar:function(e,t){return"few"===t?"few":"many"===t?"many":"zero"===e&&"one"===t||"zero"===e&&"two"===t?"zero":"other"},as:i,az:i,be:i,bg:n,bn:i,bs:i,ca:n,cs:i,cy:i,da:i,de:i,el:i,en:n,es:n,et:n,eu:n,fa:r,fi:n,fil:i,fr:i,ga:i,gl:i,gsw:i,gu:i,he:n,hi:i,hr:i,hu:i,hy:i,ia:n,id:n,io:n,is:i,it:i,ja:n,ka:function(e,t){return e||"other"},kk:i,km:n,kn:i,ko:n,ky:i,lij:i,lo:n,lt:i,lv:function(e,t){return"one"===t?"one":"other"},mk:n,ml:i,mn:i,mr:i,ms:n,my:n,nb:n,ne:i,nl:i,no:n,or:r,pa:i,pcm:n,pl:i,ps:i,pt:i,ro:function(e,t){return"few"===t||"one"===t?"few":"other"},ru:i,sc:i,scn:i,sd:r,si:function(e,t){return"one"===e&&"one"===t?"one":"other"},sk:i,sl:function(e,t){return"few"===t||"one"===t?"few":"two"===t?"two":"other"},sq:i,sr:i,sv:n,sw:i,ta:i,te:i,th:n,tk:i,tr:i,ug:i,uk:i,ur:n,uz:i,vi:n,yue:n,zh:n,zu:i},Object.defineProperty(t,"__esModule",{value:!0}),e.exports=t}(u);var d=r(u.exports),h=o||a,f=l||c,p=d||t({__proto__:null,default:d},[u.exports]),g=function(e){return"pt-PT"===e?"pt_PT":e},m=n.default(Intl.NumberFormat,function(e){return h[g(e)]},function(e,t){return f[g(e)][t?"ordinal":"cardinal"]},function(e){return p[g(e)]});return Pr=m}();function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);if("undefined"==typeof Intl)void 0!==Cn?Cn.Intl={PluralRules:n.default}:"undefined"!=typeof window?window.Intl={PluralRules:n.default}:Lr.Intl={PluralRules:n.default},n.default.polyfill=!0;else if(Intl.PluralRules&&Intl.PluralRules.prototype.selectRange){var r=["en","es","ru","zh"];Intl.PluralRules.supportedLocalesOf(r).length<r.length&&(Intl.PluralRules=n.default,n.default.polyfill=!0)}else Intl.PluralRules=n.default,n.default.polyfill=!0}();var Dr={Folder:"Folder",Folders:"Folders",Files:"Files",File:"File","Select the destination folder":"Select the destination folder","Filter by type":"Filter by type","All types":"All types","File name":"File name",Size:"Size",Date:"Date",Actions:"Actions",Delete:"Delete",Move:"Move",Copy:"Copy","Add folder":"Add folder","Add file":"Add file","Add file by URL":"Add file by URL","Please select an image file":"Please select an image file","File deleted":"File deleted","Error when deleting a file":"Error when deleting a file","Folder deleted":"Folder deleted","Error when deleting a folder":"Error when deleting a folder","Delete folder":"Delete folder","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Are you sure you want to delete this folder? This action will also delete all files and subfolders.","File moved":"File moved","Error when moving a file":"Error when moving a file","has been successfully uploaded":"has been successfully uploaded","Failed to download file":"Failed to download file","Failed to load JSON data":"Failed to load JSON data","Invalid file URL":"Invalid file URL","Unable to validate file URL":"Unable to validate file URL","Error when uploading a file":"Error when uploading a file","successfully uploaded":"successfully uploaded","Error when downloading a file by URL":"Error when downloading a file by URL","Error loading files":"Error loading files","File Manager not configured":"File Manager not configured","Type to search...":"Type to search...","Failed to create folder":"Failed to create folder",Cancel:"Cancel",Submit:"Submit",months:{january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},files:"files","No available folders":"No available folders","My files":"My files",GIF:"GIF","Stock images":"Stock images",AI:"AI","AI image generation":"AI image generation","Search GIFs":"Search GIFs","That`s all we could find.":"That`s all we could find.","Search image":"Search image",All:"All",Landscape:"Landscape",Portrait:"Portrait",Squarish:"Squarish",Black:"Black","Black and White":"Black and White",White:"White",Orange:"Orange",Red:"Red",Purple:"Purple",Magenta:"Magenta",Green:"Green",Teal:"Teal",Blue:"Blue","Photo by":"Photo by",on:"on",selected:"selected",Deselected:"Deselected",Rename:"Rename","Rename file":"Rename file {{currentFileName}}","Selected files":"Selected files: {{count}}",selected_files_one:"Selected {{count}} file",selected_files_other:"Selected {{count}} files",Edit:"Edit","Move to":"Move to","New folder":"New folder","Image search...":"Image search...","By name":"By name","By size":"By size","By date":"By date",List:"List",Grid:"Grid",Main:"Main","total pages":"Total {{total}} items",Name:"Name",Untitled:"Untitled",Dimensions:"Dimensions",error:"error",created:"created","API-endpoint for file upload is not configured":"API-endpoint for file upload is not configured","The URL must point to an image":"The URL must point to an image","Image upload...":"Image upload...",Unknown:"Unknown","Error downloading file by URL":"Error downloading file by URL","File not found":"File not found","File renamed to":"File renamed to ","Failed to rename the file":"Failed to rename the file","Folder renamed to":"Folder renamed to","Rename folder":"Rename folder","New folder name":"New folder name","Enter a new folder name":"Enter a new folder name","Please drag and drop image files only":"Please drag and drop image files only","Upload file by URL":"Upload file by URL","Upload file":"Upload file","Creating a new folder":"Creating a new folder",Create:"Create","Folder name":"Folder name","Enter the name of the folder":"Enter the name of the folder","A folder will be created inside:":"A folder will be created inside:","selected folder":"selected folder","The folder will be created in the root directory":"The folder will be created in the root directory","Failed to load folders":"Failed to load folders","Folder name cannot be empty":"Folder name cannot be empty","Folder creation provider is not configured":"Folder creation provider is not configured","Folder created":"Folder created","Folder rename is disabled by config":"Folder rename is disabled by config","Folder rename provider is not configured":"Folder rename provider is not configured","Unexpected response when renaming folder":"Unexpected response when renaming folder","Folder renamed":"Folder renamed","Failed to rename folder":"Failed to rename folder","Failed to load folder items count":"Failed to load folder items count","Failed to load subfolders":"Failed to load subfolders",Download:"Download","image URL":"image URL","Enter the URL of the image":"Enter the URL of the image","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"New file name","Enter a new file name":"Enter a new file name","Copy to folder":"Copy to folder",Added:"Added {{date}}","File uploaded successfully":"File {{fileName}} uploaded successfully","Successfully uploaded":"Successfully uploaded {{successCount}} of {{count}} file","Successfully uploaded files":"Successfully uploaded {{successCount}} of {{count}} files",Uploaded:"Uploaded: {{names}}",uploads_success_summary:"Uploaded {{successCount}} of {{totalCount}} files",Failed:"Failed: {{names}}",uploads_fail_summary:"Failed to upload {{failCount}} of {{totalCount}} files","File with this name already exists.":"File with this name already exists.","File not found or no longer available.":"File not found or no longer available.","You don't have permission to access this file.":"You don't have permission to access this file.","File is too large to upload.":"File is too large to upload.","This file type is not allowed.":"This file type is not allowed.","File name is not valid.":"File name is not valid.","Failed to read the file.":"Failed to read the file.","Failed to write the file.":"Failed to write the file.","The file appears to be corrupted.":"The file appears to be corrupted.","File integrity check failed.":"File integrity check failed.","Folder not found or no longer available.":"Folder not found or no longer available.","Folder with this name already exists.":"Folder with this name already exists.","You don't have permission to access this folder.":"You don't have permission to access this folder.","Folder name is not valid.":"Folder name is not valid.","Failed to read the folder contents.":"Failed to read the folder contents.","Failed to write to the folder.":"Failed to write to the folder.","Folder storage quota exceeded.":"Folder storage quota exceeded.","Folder is not empty.":"Folder is not empty.","Server error while processing the folder.":"Server error while processing the folder.","Folder operation took too long.":"Folder operation took too long.","Network error. Please check your connection and try again.":"Network error. Please check your connection and try again.","The operation took too long. Please try again.":"The operation took too long. Please try again.","Server error. Please try again later.":"Server error. Please try again later.","Service is temporarily unavailable. Please try again later.":"Service is temporarily unavailable. Please try again later.","Too many requests. Please try again a bit later.":"Too many requests. Please try again a bit later.","Authentication failed. Please sign in again.":"Authentication failed. Please sign in again.","You are not allowed to perform this action.":"You are not allowed to perform this action.","Some of the provided data is invalid.":"Some of the provided data is invalid.","This operation is not supported.":"This operation is not supported.","Request payload is too large.":"Request payload is too large.","This media type is not supported.":"This media type is not supported.","You have exceeded the upload quota.":"You have exceeded the upload quota.","Network error while uploading the file.":"Network error while uploading the file.","File upload took too long.":"File upload took too long.","Server error while uploading the file.":"Server error while uploading the file.","The specified URL is not valid.":"The specified URL is not valid.","The specified URL is not reachable.":"The specified URL is not reachable.","Content type at the URL is not allowed.":"Content type at the URL is not allowed.","Failed to download file from the URL.":"Failed to download file from the URL.","Network error while downloading the file.":"Network error while downloading the file.","File download took too long.":"File download took too long.","Server error while downloading the file.":"Server error while downloading the file.","Some items could not be processed.":"Some items could not be processed.","Failed to process all items in the batch.":"Failed to process all items in the batch.","Some items in the batch are in a conflicting state.":"Some items in the batch are in a conflicting state.","Some items in the batch did not pass validation.":"Some items in the batch did not pass validation.","AI service returned an invalid response.":"AI service returned an invalid response.","Failed to generate image using AI.":"Failed to generate image using AI.","You have reached the AI image generation limit.":"You have reached the AI image generation limit.","Error in external integration.":"Error in external integration.","Error in a third-party service.":"Error in a third-party service.","An unknown error occurred.":"An unknown error occurred.","Renaming is not allowed for this item.":"Renaming is not allowed for this item.","Moving is not allowed for this item.":"Moving is not allowed for this item.","Copying is not allowed for this item.":"Copying is not allowed for this item.","Deleting is not allowed for this item.":"Deleting is not allowed for this item.","Cannot move an item into itself.":"Cannot move an item into itself.","Cannot move an item into its descendant folder.":"Cannot move an item into its descendant folder.","Configuration error occurred.":"Configuration error occurred.",Moved:"Moved: {{names}}",move_success_summary:"Moved {{successCount}} of {{totalCount}} items",move_fail_summary:"Failed to move {{failCount}} of {{totalCount}} items",Copied:"Copied: {{names}}",copy_success_summary:"Copied {{successCount}} of {{totalCount}} items",copy_fail_summary:"Failed to copy {{failCount}} of {{totalCount}} items","Failed to upload":"Failed to upload {{failCount}} of {{count}} file","Failed to upload files":"Failed to upload {{failCount}} of {{count}} files","No folders yet":"No folders yet","Drag files to upload":"Drag files to upload","Drop files here to upload":"Drop files here to upload","Newest first":"Newest first","Oldest first":"Oldest first","Largest first":"Largest first","Smallest first":"Smallest first","A-Z":"A-Z","Z-A":"Z-A","By type":"By type","Evaluating the task":"Evaluating the task","Something went wrong, please try again":"Something went wrong, please try again","Sort by":"Sort by","preview text":"The image preview is trying to load ...","Use this variant":"Use this variant","Confirm deletion":"Confirm deletion","Are you sure you want to delete the selected items?":"Are you sure you want to delete the selected items?","Move to Trash":"Move to Trash","Are you sure you want to move the selected items to the Trash?":"Are you sure you want to move the selected items to the Trash?","Permanently delete":"Permanently delete","Delete permanently":"Delete permanently","Are you sure you want to permanently delete the selected items? This action cannot be undone.":"Are you sure you want to permanently delete the selected items? This action cannot be undone.",delete_files_permanent_one:"This action will permanently delete {{count}} file",delete_files_permanent_other:"This action will permanently delete {{count}} files",delete_folder_permanent:"This action will permanently delete the folder '{{name}}' and all its contents, including {{count}} items.",delete_mixed_permanent:"This action will permanently delete {{total}} selected items, including {{folders}} folders and all {{images}} images within them.",move_files_to_trash_one:"This will move {{count}} file to the Trash.",move_files_to_trash_other:"This will move {{count}} files to the Trash.",move_folder_to_trash:"This will move the folder '{{name}}' and all its contents ({{count}} items) to the Trash.",move_mixed_to_trash:"This will move {{total}} selected items to the Trash, including {{folders}} folders and {{images}} images.",delete_count_confirm_trash_one:"Move {{count}} file to Trash?",delete_count_confirm_trash_other:"Move {{count}} files to Trash?",delete_count_confirm_permanent_one:"Permanently delete {{count}} file?",delete_count_confirm_permanent_other:"Permanently delete {{count}} files?",delete_count_confirm_one:"Delete {{count}} file?",delete_count_confirm_other:"Delete {{count}} files?",item:"item",items:"items",Trash:"Deleted",Choose:"Choose",Stock:"Stock","Select an image from our library":"Select an image from our library","AI generation":"AI generation","Creating an image on demand":"Creating an image on demand","Search file or folder":"Search file or folder","Select a file or drag and drop it here":"Select a file or drag and drop it here","Supported files:":"Supported files:","Create folder":"Create folder",Done:"Done","Move here":"Move here","Copy here":"Copy here","File URL":"File URL","There are no files for your request.":"There are no files for your request.","Millions of free stock images":"Millions of free stock images","Enter a search query and we'll find the perfect image for you":"Enter a search query and we'll find the perfect image for you","Enter your query and we will find the right one for you":"Enter your query and we will find the right one for you","Over 350,000 live images":"Over 350,000 live images","The folder will be created in the root directory.":"The folder will be created in the root directory.",undo:"UNDO",moved_to_trash_one:"Moved {{count}} item to Trash",moved_to_trash_other:"Moved {{count}} items to Trash",restored_items_one:"Restored {{count}} item",restored_items_other:"Restored {{count}} items",Type:"Type"},Nr={Files:"Файлы",selected:"выбрано",Deselected:"Отменить выбор",Rename:"Переименовать","Rename file":"Переименовать файл {{currentFileName}}","Select the destination folder":"Выберите папку назначения","Selected files:":"Выбрано файлов:","Selected files":"Выбрано файлов: {{count}}",selected_files_one:"Выбран {{count}} файл",selected_files_few:"Выбрано {{count}} файла",selected_files_many:"Выбрано {{count}} файлов",selected_files_other:"Выбрано {{count}} файлов",Copy:"Дублировать",Edit:"Изменить","Move to":"Переместить",Delete:"Удалить","New folder":"Новая папка","Image search...":"Поиск изображений...","By name":"По имени","By size":"По размеру","By date":"По дате",List:"Список",Grid:"Плитки",Main:"Главная",Folders:"Папки","total pages":"Всего {{total}} элементов",Name:"Имя",Untitled:"Без названия",Size:"Объём",Dimensions:"Размер",Date:"Дата",error:"ошибка",Folder:"Папка",created:"создана","Failed to create folder":"Не удалось создать папку","File deleted":"Файл удален","Error when deleting a file":"Ошибка при удалении файла","Folder deleted":"Папка удалена","Error when deleting a folder":"Ошибка при удалении папки","Delete folder":"Удалить папку","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Вы уверены, что хотите удалить эту папку? Это действие также удалит все файлы и подпапки.","API-endpoint for file upload is not configured":"API-endpoint для загрузки файлов не настроен","Please select an image file":"Пожалуйста, выберите файл изображения",File:"Файл","has been successfully uploaded":"успешно загружен","The URL must point to an image":"URL должен указывать на изображение","Image upload...":"Загрузка изображения...",Unknown:"Неизвестно","Error downloading file by URL":"Ошибка загрузки файла по URL","successfully uploaded":"успешно загружен","Error when downloading a file by URL":"Ошибка при загрузке файла по URL","File not found":"Файл не найден","File renamed to":"Файл переименован на ","Failed to rename the file":"Не удалось переименовать файл","Folder renamed to":"Папка переименована на","Rename folder":"Переименовать папку","New folder name":"Новое название папки","Enter a new folder name":"Введите новое название папки","Please drag and drop image files only":"Пожалуйста, перетащите только файлы изображений","Upload file by URL":"Загрузить файл по URL","Upload file":"Загрузить файл","Creating a new folder":"Создание новой папки",Create:"Создать",Cancel:"Отмена","Folder name":"Название папки","Enter the name of the folder":"Введите название папки","A folder will be created inside:":"Папка будет создана внутри:","selected folder":"выбранной папки","The folder will be created in the root directory":"Папка будет создана в корневом каталоге","Failed to load folders":"Не удалось загрузить папки","Folder name cannot be empty":"Название папки не может быть пустым","Folder creation provider is not configured":"Провайдер создания папок не настроен","Folder created":"Папка создана","Folder rename is disabled by config":"Переименование папок отключено конфигурацией","Folder rename provider is not configured":"Провайдер переименования папок не настроен","Unexpected response when renaming folder":"Неожиданный ответ при переименовании папки","Folder renamed":"Папка переименована","Failed to rename folder":"Не удалось переименовать папку","Failed to load folder items count":"Не удалось получить количество файлов в папке","Failed to load subfolders":"Не удалось загрузить подпапки",Download:"Загрузить","image URL":"URL изображения","Enter the URL of the image":"Введите URL изображения","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Поддерживаемые форматы: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"Новое имя файла","Enter a new file name":"Введите новое имя файла","Copy to folder":"Копировать в папку",Added:"Добавлено {{date}}","File uploaded successfully":"Файл успешно загружен","Successfully uploaded":"Успешно загружено {{successCount}} из {{count}} файла","Successfully uploaded files":"Успешно загружено {{successCount}} из {{count}} файлов",uploads_success_summary:"Загружено {{successCount}} из {{totalCount}} файлов",uploads_fail_summary:"Не удалось загрузить {{failCount}} из {{totalCount}} файлов","File with this name already exists.":"Файл с таким именем уже существует.","File not found or no longer available.":"Файл не найден или уже был удалён.","You don't have permission to access this file.":"У вас нет прав доступа к этому файлу.","File is too large to upload.":"Файл слишком большой для загрузки.","This file type is not allowed.":"Этот тип файла не поддерживается.","File name is not valid.":"Недопустимое имя файла.","Failed to read the file.":"Не удалось прочитать файл.","Failed to write the file.":"Не удалось записать файл.","The file appears to be corrupted.":"Файл повреждён или имеет неверный формат.","File integrity check failed.":"Проверка целостности файла завершилась неудачно.","Folder not found or no longer available.":"Папка не найдена или уже была удалена.","Folder with this name already exists.":"Папка с таким именем уже существует.","You don't have permission to access this folder.":"У вас нет прав доступа к этой папке.","Folder name is not valid.":"Недопустимое имя папки.","Failed to read the folder contents.":"Не удалось прочитать содержимое папки.","Failed to write to the folder.":"Не удалось выполнить операцию с папкой.","Folder storage quota exceeded.":"Превышена квота хранения для папки.","Folder is not empty.":"Папка не пуста.","Server error while processing the folder.":"Ошибка сервера при обработке папки.","Folder operation took too long.":"Операция с папкой выполнялась слишком долго.","Network error. Please check your connection and try again.":"Ошибка сети. Проверьте подключение к интернету и повторите попытку.","The operation took too long. Please try again.":"Операция выполнялась слишком долго. Попробуйте ещё раз.","Server error. Please try again later.":"Ошибка на сервере. Повторите попытку позже.","Service is temporarily unavailable. Please try again later.":"Сервис временно недоступен. Повторите попытку позже.","Too many requests. Please try again a bit later.":"Слишком много запросов. Попробуйте ещё раз немного позже.","Authentication failed. Please sign in again.":"Не удалось пройти аутентификацию. Пожалуйста, войдите снова.","You are not allowed to perform this action.":"У вас нет прав для выполнения этого действия.","Some of the provided data is invalid.":"Некоторые из переданных данных некорректны.","This operation is not supported.":"Эта операция не поддерживается.","Request payload is too large.":"Тело запроса слишком большое.","This media type is not supported.":"Этот тип данных не поддерживается.","You have exceeded the upload quota.":"Превышена квота на загрузку файлов.","Network error while uploading the file.":"Сетевая ошибка при загрузке файла.","File upload took too long.":"Загрузка файла выполнялась слишком долго.","Server error while uploading the file.":"Ошибка сервера при загрузке файла.","The specified URL is not valid.":"Указан некорректный URL.","The specified URL is not reachable.":"Указанный URL недоступен.","Content type at the URL is not allowed.":"Тип содержимого по указанному URL не поддерживается.","Failed to download file from the URL.":"Не удалось скачать файл по указанному URL.","Network error while downloading the file.":"Сетевая ошибка при скачивании файла.","File download took too long.":"Скачивание файла выполнялось слишком долго.","Server error while downloading the file.":"Ошибка сервера при скачивании файла.","Some items could not be processed.":"Не все элементы были обработаны успешно.","Failed to process all items in the batch.":"Не удалось обработать ни один элемент в пакетной операции.","Some items in the batch are in a conflicting state.":"Некоторые элементы в пакетной операции находятся в конфликтующем состоянии.","Some items in the batch did not pass validation.":"Некоторые элементы в пакетной операции не прошли валидацию.","AI service returned an invalid response.":"Сервис AI вернул некорректный ответ.","Failed to generate image using AI.":"Не удалось создать изображение с помощью AI.","You have reached the AI image generation limit.":"Достигнут лимит генерации изображений AI.","Error in external integration.":"Ошибка во внешней интеграции.","Error in a third-party service.":"Ошибка во внешнем сервисе.","An unknown error occurred.":"Произошла неизвестная ошибка.","Renaming is not allowed for this item.":"Переименование не разрешено для этого элемента.","Moving is not allowed for this item.":"Перемещение не разрешено для этого элемента.","Copying is not allowed for this item.":"Копирование не разрешено для этого элемента.","Deleting is not allowed for this item.":"Удаление не разрешено для этого элемента.","Cannot move an item into itself.":"Нельзя переместить элемент в самого себя.","Cannot move an item into its descendant folder.":"Нельзя переместить элемент в дочернюю папку.","Configuration error occurred.":"Произошла ошибка конфигурации.",Moved:"Перемещены: {{names}}",move_success_summary:"Перемещено {{successCount}} из {{totalCount}} объектов",move_fail_summary:"Не удалось переместить {{failCount}} из {{totalCount}} объектов",Copied:"Скопированы: {{names}}",copy_success_summary:"Скопировано {{successCount}} из {{totalCount}} объектов",copy_fail_summary:"Не удалось скопировать {{failCount}} из {{totalCount}} объектов",Uploaded:"Загружены: {{names}}",Failed:"Не удалось: {{names}}","Failed to upload":"Не удалось загрузить {{failCount}} из {{count}} файла","Failed to upload files":"Не удалось загрузить {{failCount}} из {{count}} файлов",months:{january:"января",february:"февраля",march:"марта",april:"апреля",may:"мая",june:"июня",july:"июля",august:"августа",september:"сентября",october:"октября",november:"ноября",december:"декабря"},files:"файлов","No available folders":"Нет доступных папок","My files":"Мои файлы",GIF:"GIF","Stock images":"Стоковые изображения",AI:"AI","AI image generation":"AI генерация изображений","Search GIFs":"Найти GIF","That`s all we could find.":"Это все, что мы смогли найти.","Search image":"Найти изображение",All:"Все",Landscape:"Горизонтальные",Portrait:"Вертикальные",Squarish:"Квадратные",Black:"Черный","Black and White":"Черно-белый",White:"Белый",Orange:"Оранжевый",Red:"Красный",Purple:"Фиолетовый",Magenta:"Пурпурный",Green:"Зеленый",Teal:"Бирюзовый",Blue:"Синий","Photo by":"Фото",on:"на","File Manager":"Файловый менеджер","File Manager not configured":"Файловый менеджер не настроен","Filter by type":"Фильтр по типу","All types":"Все типы","File name":"Имя файла",Actions:"Действия","Add file":"Добавить файл","Add folder":"Добавить папку","Add file by URL":"Добавить файл по URL","File moved":"Файл перемещён","Error when moving a file":"Ошибка при перемещении файла","Failed to download file":"Не удалось скачать файл","Failed to load JSON data":"Не удалось загрузить данные JSON","Invalid file URL":"Некорректный URL файла","Unable to validate file URL":"Не удалось проверить файл по URL","Type to search...":"Введите для поиска...",Submit:"Отправить","No folders yet":"Папок пока нет","Drag files to upload":"Перетащите файлы для загрузки","Drop files here to upload":"Отпустите файлы здесь, чтобы загрузить их","Newest first":"Вначале новые","Oldest first":"Вначале старые","Largest first":"Вначале большие","Smallest first":"Вначале маленькие","A-Z":"По алфавиту А-Я","Z-A":"По алфавиту Я-А","By type":"По типу","Evaluating the task":"Оценка задания","Something went wrong, please try again":"Что-то пошло не так, пожалуйста, попробуйте еще раз","Sort by":"Сортировать по","preview text":"Изображение загружается ...","Use this variant":"Использовать этот вариант","Confirm deletion":"Подтвердить удаление","Are you sure you want to delete the selected items?":"Вы уверены, что хотите удалить выбранные элементы?","Move to Trash":"Переместить в корзину","Are you sure you want to move the selected items to the Trash?":"Вы уверены, что хотите переместить выбранные элементы в корзину?","Permanently delete":"Полное удаление","Delete permanently":"Удалить безвозвратно","Are you sure you want to permanently delete the selected items? This action cannot be undone.":"Вы уверены, что хотите безвозвратно удалить выбранные элементы? Это действие нельзя отменить.",delete_files_permanent_one:"Это действие безвозвратно удалит {{count}} файл",delete_files_permanent_few:"Это действие безвозвратно удалит {{count}} файла",delete_files_permanent_many:"Это действие безвозвратно удалит {{count}} файлов",delete_files_permanent_other:"Это действие безвозвратно удалит {{count}} файлов",delete_folder_permanent:"Это действие безвозвратно удалит папку «{{name}}» и всё её содержимое, включая {{count}} элементов.",delete_mixed_permanent:"Это действие безвозвратно удалит {{total}} выбранных элементов, включая {{folders}} папок и все {{images}} изображений внутри них.",move_files_to_trash_one:"Это действие переместит в корзину {{count}} файл.",move_files_to_trash_few:"Это действие переместит в корзину {{count}} файла.",move_files_to_trash_many:"Это действие переместит в корзину {{count}} файлов.",move_files_to_trash_other:"Это действие переместит в корзину {{count}} файлов.",move_folder_to_trash:"Это действие переместит в корзину папку «{{name}}» и всё её содержимое ({{count}} элементов).",move_mixed_to_trash:"Это действие переместит в корзину {{total}} выбранных элементов, включая {{folders}} папок и {{images}} изображений.",delete_count_confirm_trash_one:"Переместить в корзину {{count}} файл?",delete_count_confirm_trash_few:"Переместить в корзину {{count}} файла?",delete_count_confirm_trash_many:"Переместить в корзину {{count}} файлов?",delete_count_confirm_trash_other:"Переместить в корзину {{count}} файлов?",delete_count_confirm_permanent_one:"Удалить навсегда {{count}} файл?",delete_count_confirm_permanent_few:"Удалить навсегда {{count}} файла?",delete_count_confirm_permanent_many:"Удалить навсегда {{count}} файлов?",delete_count_confirm_permanent_other:"Удалить навсегда {{count}} файлов?",delete_count_confirm_one:"Удалить {{count}} файл?",delete_count_confirm_few:"Удалить {{count}} файла?",delete_count_confirm_many:"Удалить {{count}} файлов?",delete_count_confirm_other:"Удалить {{count}} файлов?",item:"файл",items:"файлов",Trash:"Удаленные",Choose:"Выбрать",Stock:"Фотосток","Select an image from our library":"Выберите изображение из нашей библиотеки","AI generation":"AI генерация","Creating an image on demand":"Создание изображения по запросу","Search file or folder":"Найти файл или папку","Select a file or drag and drop it here":"Выберите файл или перетащите его сюда","Supported files:":"Поддерживаемые файлы:","Create folder":"Создать папку",Done:"Готово","Move here":"Переместить сюда","Copy here":"Копировать сюда","File URL":"URL файла","There are no files for your request.":"Файлов по вашему запросу нет.","Millions of free stock images":"Миллионы бесплатных стоковых изображений","Enter a search query and we'll find the perfect image for you":"Введите поисковый запрос, и мы найдем для вас идеальное изображение","Enter your query and we will find the right one for you":"Введите запрос и мы найдем для вас подходящее","Over 350,000 live images":"Более 350 000 живых изображений","The folder will be created in the root directory.":"Папка будет создана в корневом каталоге.",undo:"ОТМЕНА",moved_to_trash_one:"Перемещён {{count}} элемент в корзину",moved_to_trash_few:"Перемещено {{count}} элемента в корзину",moved_to_trash_many:"Перемещено {{count}} элементов в корзину",moved_to_trash_other:"Перемещено {{count}} элементов в корзину",restored_items_one:"Восстановлён {{count}} элемент",restored_items_few:"Восстановлено {{count}} элемента",restored_items_many:"Восстановлено {{count}} элементов",restored_items_other:"Восстановлено {{count}} элементов",Type:"Тип"};const zr={en:{translation:Dr},ru:{translation:Nr},es:{translation:{Files:"Archivos",selected:"seleccionado(s)",Deselected:"Deseleccionar",Rename:"Renombrar","Rename file":"Renombrar archivo {{currentFileName}}","Select the destination folder":"Seleccionar la carpeta de destino","Selected files:":"Archivos seleccionados:","Selected files":"Archivos seleccionados: {{count}}",selected_files_one:"{{count}} archivo seleccionado",selected_files_few:"{{count}} archivos seleccionados",selected_files_many:"{{count}} archivos seleccionados",selected_files_other:"{{count}} archivos seleccionados",Copy:"Duplicar",Edit:"Editar","Move to":"Mover a",Delete:"Eliminar","New folder":"Nueva carpeta","Image search...":"Búsqueda de imágenes...","By name":"Por nombre","By size":"Por tamaño","By date":"Por fecha",List:"Lista",Grid:"Cuadrícula",Main:"Principal",Folders:"Carpetas","total pages":"{{total}} elementos en total",Name:"Nombre",Untitled:"Sin título",Size:"Tamaño",Dimensions:"Dimensiones",Date:"Fecha",error:"error",Folder:"Carpeta",created:"creada","Failed to create folder":"Error al crear la carpeta","File deleted":"Archivo eliminado","Error when deleting a file":"Error al eliminar el archivo","Folder deleted":"Carpeta eliminada","Error when deleting a folder":"Error al eliminar la carpeta","Delete folder":"Eliminar carpeta","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"¿Está seguro de que desea eliminar esta carpeta? Esta acción también eliminará todos los archivos y subcarpetas.","API-endpoint for file upload is not configured":"El endpoint API para la carga de archivos no está configurado","Please select an image file":"Por favor, seleccione un archivo de imagen",File:"Archivo","has been successfully uploaded":"se ha cargado exitosamente","The URL must point to an image":"La URL debe apuntar a una imagen","Image upload...":"Cargando imagen...",Unknown:"Desconocido","Error downloading file by URL":"Error al descargar el archivo por URL","successfully uploaded":"cargado exitosamente","Error when downloading a file by URL":"Error al descargar un archivo por URL","File not found":"Archivo no encontrado","File renamed to":"Archivo renombrado a","Failed to rename the file":"Error al renombrar el archivo","Folder renamed to":"Carpeta renombrada a","Rename folder":"Renombrar carpeta","New folder name":"Nuevo nombre de la carpeta","Enter a new folder name":"Ingrese un nuevo nombre para la carpeta","Please drag and drop image files only":"Por favor, arrastre y suelte solo archivos de imagen","Upload file by URL":"Cargar archivo por URL","Upload file":"Cargar archivo","Creating a new folder":"Creando una nueva carpeta",Create:"Crear",Cancel:"Cancelar","Folder name":"Nombre de la carpeta","Enter the name of the folder":"Ingrese el nombre de la carpeta","A folder will be created inside:":"La carpeta se creará dentro de:","selected folder":"carpeta seleccionada","The folder will be created in the root directory":"La carpeta se creará en el directorio raíz","Failed to load folders":"No se pudieron cargar las carpetas","Folder name cannot be empty":"El nombre de la carpeta no puede estar vacío","Folder creation provider is not configured":"El proveedor de creación de carpetas no está configurado","Folder created":"Carpeta creada","Folder rename is disabled by config":"El renombrado de carpetas está deshabilitado por la configuración","Folder rename provider is not configured":"El proveedor para renombrar carpetas no está configurado","Unexpected response when renaming folder":"Respuesta inesperada al renombrar la carpeta","Folder renamed":"Carpeta renombrada","Failed to rename folder":"No se pudo renombrar la carpeta","Failed to load folder items count":"No se pudo obtener la cantidad de elementos de la carpeta","Failed to load subfolders":"No se pudieron cargar las subcarpetas",Download:"Descargar","image URL":"URL de la imagen","Enter the URL of the image":"Ingrese la URL de la imagen","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Formatos admitidos: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"Nuevo nombre del archivo","Enter a new file name":"Ingrese un nuevo nombre para el archivo","Copy to folder":"Copiar a carpeta",Added:"Añadido el {{date}}","File uploaded successfully":"Archivo cargado exitosamente","Successfully uploaded":"{{successCount}} de {{count}} archivo cargado exitosamente","Successfully uploaded files":"{{successCount}} de {{count}} archivos cargados exitosamente",uploads_success_summary:"Se cargaron {{successCount}} de {{totalCount}} archivos",uploads_fail_summary:"No se pudieron cargar {{failCount}} de {{totalCount}} archivos","File with this name already exists.":"Ya existe un archivo con este nombre.","File not found or no longer available.":"El archivo no se encontró o ya fue eliminado.","You don't have permission to access this file.":"No tiene permisos para acceder a este archivo.","File is too large to upload.":"El archivo es demasiado grande para subir.","This file type is not allowed.":"Este tipo de archivo no está permitido.","File name is not valid.":"El nombre del archivo no es válido.","Failed to read the file.":"No se pudo leer el archivo.","Failed to write the file.":"No se pudo escribir el archivo.","The file appears to be corrupted.":"El archivo parece estar dañado.","File integrity check failed.":"La verificación de integridad del archivo falló.","Folder not found or no longer available.":"La carpeta no se encontró o ya fue eliminada.","Folder with this name already exists.":"Ya existe una carpeta con este nombre.","You don't have permission to access this folder.":"No tiene permisos para acceder a esta carpeta.","Folder name is not valid.":"El nombre de la carpeta no es válido.","Failed to read the folder contents.":"No se pudo leer el contenido de la carpeta.","Failed to write to the folder.":"No se pudo escribir en la carpeta.","Folder storage quota exceeded.":"Se superó la cuota de almacenamiento de la carpeta.","Folder is not empty.":"La carpeta no está vacía.","Server error while processing the folder.":"Error del servidor al procesar la carpeta.","Folder operation took too long.":"La operación con la carpeta tardó demasiado.","Network error. Please check your connection and try again.":"Error de red. Compruebe su conexión e inténtelo de nuevo.","The operation took too long. Please try again.":"La operación tardó demasiado. Inténtelo de nuevo.","Server error. Please try again later.":"Error del servidor. Inténtelo de nuevo más tarde.","Service is temporarily unavailable. Please try again later.":"El servicio no está disponible temporalmente. Inténtelo de nuevo más tarde.","Too many requests. Please try again a bit later.":"Demasiadas solicitudes. Inténtelo de nuevo más tarde.","Authentication failed. Please sign in again.":"Error de autenticación. Inicie sesión de nuevo.","You are not allowed to perform this action.":"No tiene permisos para realizar esta acción.","Some of the provided data is invalid.":"Algunos de los datos proporcionados no son válidos.","This operation is not supported.":"Esta operación no está soportada.","Request payload is too large.":"El cuerpo de la solicitud es demasiado grande.","This media type is not supported.":"Este tipo de contenido no está soportado.","You have exceeded the upload quota.":"Se ha superado la cuota de subida de archivos.","Network error while uploading the file.":"Error de red al subir el archivo.","File upload took too long.":"La subida del archivo tardó demasiado.","Server error while uploading the file.":"Error del servidor al subir el archivo.","The specified URL is not valid.":"La URL especificada no es válida.","The specified URL is not reachable.":"La URL especificada no es accesible.","Content type at the URL is not allowed.":"El tipo de contenido en la URL no está permitido.","Failed to download file from the URL.":"No se pudo descargar el archivo desde la URL.","Network error while downloading the file.":"Error de red al descargar el archivo.","File download took too long.":"La descarga del archivo tardó demasiado.","Server error while downloading the file.":"Error del servidor al descargar el archivo.","Some items could not be processed.":"No todos los elementos se procesaron correctamente.","Failed to process all items in the batch.":"No se pudo procesar ningún elemento del lote.","Some items in the batch are in a conflicting state.":"Algunos elementos del lote están en estado de conflicto.","Some items in the batch did not pass validation.":"Algunos elementos del lote no pasaron la validación.","AI service returned an invalid response.":"El servicio de IA devolvió una respuesta no válida.","Failed to generate image using AI.":"No se pudo generar la imagen usando IA.","You have reached the AI image generation limit.":"Se alcanzó el límite de generación de imágenes con IA.","Error in external integration.":"Error en la integración externa.","Error in a third-party service.":"Error en un servicio de terceros.","An unknown error occurred.":"Se ha producido un error desconocido.","Renaming is not allowed for this item.":"No se permite renombrar este elemento.","Moving is not allowed for this item.":"No se permite mover este elemento.","Copying is not allowed for this item.":"No se permite copiar este elemento.","Deleting is not allowed for this item.":"No se permite eliminar este elemento.","Cannot move an item into itself.":"No se puede mover un elemento dentro de sí mismo.","Cannot move an item into its descendant folder.":"No se puede mover un elemento a su carpeta descendiente.","Configuration error occurred.":"Se produjo un error de configuración.",Moved:"Movidos: {{names}}",move_success_summary:"Se movieron {{successCount}} de {{totalCount}} elementos",move_fail_summary:"No se pudieron mover {{failCount}} de {{totalCount}} elementos",Copied:"Copiados: {{names}}",copy_success_summary:"Se copiaron {{successCount}} de {{totalCount}} elementos",copy_fail_summary:"No se pudieron copiar {{failCount}} de {{totalCount}} elementos",Uploaded:"Archivos cargados: {{names}}",Failed:"No se pudieron cargar: {{names}}","Failed to upload":"Error al cargar {{failCount}} de {{count}} archivo","Failed to upload files":"Error al cargar {{failCount}} de {{count}} archivos",months:{january:"enero",february:"febrero",march:"marzo",april:"abril",may:"mayo",june:"junio",july:"julio",august:"agosto",september:"septiembre",october:"octubre",november:"noviembre",december:"diciembre"},files:"archivos","No available folders":"No hay carpetas disponibles","My files":"Mis archivos",GIF:"GIF","Stock images":"Imágenes de stock",AI:"IA","AI image generation":"Generación de imágenes con IA","Search GIFs":"Buscar GIFs","That`s all we could find.":"Es todo lo que pudimos encontrar.","Search image":"Buscar imagen",All:"Todos",Landscape:"Horizontal",Portrait:"Vertical",Squarish:"Cuadrado",Black:"Negro","Black and White":"Blanco y negro",White:"Blanco",Orange:"Naranja",Red:"Rojo",Purple:"Morado",Magenta:"Magenta",Green:"Verde",Teal:"Verde azulado",Blue:"Azul","Photo by":"Foto de",on:"en","File Manager":"Administrador de archivos","File Manager not configured":"Administrador de archivos no configurado","Filter by type":"Filtrar por tipo","All types":"Todos los tipos","File name":"Nombre del archivo",Actions:"Acciones","Add file":"Añadir archivo","Add folder":"Añadir carpeta","Add file by URL":"Añadir archivo por URL","File moved":"Archivo movido","Error when moving a file":"Error al mover el archivo","Failed to download file":"No se pudo descargar el archivo","Failed to load JSON data":"No se pudieron cargar los datos JSON","Invalid file URL":"URL de archivo inválida","Unable to validate file URL":"No se pudo validar la URL del archivo","Type to search...":"Escriba para buscar...",Submit:"Enviar","No folders yet":"Aún no hay carpetas","Drag files to upload":"Arrastre archivos para cargarlos","Drop files here to upload":"Suelte los archivos aquí para cargarlos","Newest first":"Los más nuevos primero","Oldest first":"Los más antiguos primero","Largest first":"Los más grandes primero","Smallest first":"Los más pequeños primero","A-Z":"A-Z","Z-A":"Z-A","By type":"Por tipo","Evaluating the task":"Evaluando la tarea","Something went wrong, please try again":"Algo salió mal, por favor intente nuevamente","Sort by":"Ordenar por","preview text":"Cargando imagen...","Use this variant":"Usar esta variante","Confirm deletion":"Confirmar eliminación","Are you sure you want to delete the selected items?":"¿Está seguro de que desea eliminar los elementos seleccionados?","Move to Trash":"Mover a la papelera","Are you sure you want to move the selected items to the Trash?":"¿Está seguro de que desea mover los elementos seleccionados a la papelera?","Permanently delete":"Eliminación permanente","Delete permanently":"Eliminar permanentemente","Are you sure you want to permanently delete the selected items? This action cannot be undone.":"¿Está seguro de que desea eliminar permanentemente los elementos seleccionados? Esta acción no se puede deshacer.",delete_files_permanent_one:"Esta acción eliminará permanentemente {{count}} archivo",delete_files_permanent_few:"Esta acción eliminará permanentemente {{count}} archivos",delete_files_permanent_many:"Esta acción eliminará permanentemente {{count}} archivos",delete_files_permanent_other:"Esta acción eliminará permanentemente {{count}} archivos",delete_folder_permanent:"Esta acción eliminará permanentemente la carpeta «{{name}}» y todo su contenido, incluyendo {{count}} elementos.",delete_mixed_permanent:"Esta acción eliminará permanentemente {{total}} elementos seleccionados, incluyendo {{folders}} carpetas y todas las {{images}} imágenes dentro de ellas.",move_files_to_trash_one:"Esta acción moverá {{count}} archivo a la papelera.",move_files_to_trash_few:"Esta acción moverá {{count}} archivos a la papelera.",move_files_to_trash_many:"Esta acción moverá {{count}} archivos a la papelera.",move_files_to_trash_other:"Esta acción moverá {{count}} archivos a la papelera.",move_folder_to_trash:"Esta acción moverá la carpeta «{{name}}» y todo su contenido ({{count}} elementos) a la papelera.",move_mixed_to_trash:"Esta acción moverá {{total}} elementos seleccionados a la papelera, incluyendo {{folders}} carpetas y {{images}} imágenes.",delete_count_confirm_trash_one:"¿Mover {{count}} archivo a la papelera?",delete_count_confirm_trash_few:"¿Mover {{count}} archivos a la papelera?",delete_count_confirm_trash_many:"¿Mover {{count}} archivos a la papelera?",delete_count_confirm_trash_other:"¿Mover {{count}} archivos a la papelera?",delete_count_confirm_permanent_one:"¿Eliminar permanentemente {{count}} archivo?",delete_count_confirm_permanent_few:"¿Eliminar permanentemente {{count}} archivos?",delete_count_confirm_permanent_many:"¿Eliminar permanentemente {{count}} archivos?",delete_count_confirm_permanent_other:"¿Eliminar permanentemente {{count}} archivos?",delete_count_confirm_one:"¿Eliminar {{count}} archivo?",delete_count_confirm_few:"¿Eliminar {{count}} archivos?",delete_count_confirm_many:"¿Eliminar {{count}} archivos?",delete_count_confirm_other:"¿Eliminar {{count}} archivos?",item:"archivo",items:"archivos",Trash:"Papelera",Choose:"Elegir",Stock:"Banco de imágenes","Select an image from our library":"Seleccione una imagen de nuestra biblioteca","AI generation":"Generación con IA","Creating an image on demand":"Creando una imagen bajo demanda","Search file or folder":"Buscar archivo o carpeta","Select a file or drag and drop it here":"Seleccione un archivo o arrástrelo y suéltelo aquí","Supported files:":"Archivos admitidos:","Create folder":"Crear carpeta",Done:"Hecho","Move here":"Mover aquí","Copy here":"Copiar aquí","File URL":"URL del archivo","There are no files for your request.":"No hay archivos para su solicitud.","Millions of free stock images":"Millones de imágenes de stock gratuitas","Enter a search query and we'll find the perfect image for you":"Ingrese una consulta de búsqueda y encontraremos la imagen perfecta para usted","Enter your query and we will find the right one for you":"Ingrese su consulta y nosotros encontraremos la adecuada para usted","Over 350,000 live images":"Más de 350,000 imágenes en vivo","The folder will be created in the root directory.":"La carpeta se creará en el directorio raíz.",undo:"DESHACER",moved_to_trash_one:"{{count}} elemento movido a la papelera",moved_to_trash_few:"{{count}} elementos movidos a la papelera",moved_to_trash_many:"{{count}} elementos movidos a la papelera",moved_to_trash_other:"{{count}} elementos movidos a la papelera",restored_items_one:"{{count}} elemento restaurado",restored_items_few:"{{count}} elementos restaurados",restored_items_many:"{{count}} elementos restaurados",restored_items_other:"{{count}} elementos restaurados",Type:"Tipo"}},uk:{translation:{Files:"Файли",selected:"обрано",Deselected:"Скасувати вибір",Rename:"Перейменувати","Rename file":"Перейменувати файл {{currentFileName}}","Select the destination folder":"Виберіть папку призначення","Selected files:":"Обрано файлів:","Selected files":"Обрано файлів: {{count}}",selected_files_one:"Обрано {{count}} файл",selected_files_few:"Обрано {{count}} файли",selected_files_many:"Обрано {{count}} файлів",selected_files_other:"Обрано {{count}} файлів",Copy:"Дублювати",Edit:"Змінити","Move to":"Перемістити",Delete:"Видалити","New folder":"Нова папка","Image search...":"Пошук зображень...","By name":"За назвою","By size":"За розміром","By date":"За датою",List:"Список",Grid:"Плитки",Main:"Головна",Folders:"Папки","total pages":"Всього {{total}} елементів",Name:"Назва",Untitled:"Без назви",Size:"Об'єм",Dimensions:"Розмір",Date:"Дата",error:"помилка",Folder:"Папка",created:"створена","Failed to create folder":"Не вдалося створити папку","File deleted":"Файл видалено","Error when deleting a file":"Помилка при видаленні файлу","Folder deleted":"Папку видалено","Error when deleting a folder":"Помилка при видаленні папки","Delete folder":"Видалити папку","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Ви впевнені, що хочете видалити цю папку? Ця дія також видалить усі файли та підпапки.","API-endpoint for file upload is not configured":"API-endpoint для завантаження файлів не налаштовано","Please select an image file":"Будь ласка, виберіть файл зображення",File:"Файл","has been successfully uploaded":"успішно завантажено","The URL must point to an image":"URL повинен вказувати на зображення","Image upload...":"Завантаження зображення...",Unknown:"Невідомо","Error downloading file by URL":"Помилка завантаження файлу за URL","successfully uploaded":"успішно завантажено","Error when downloading a file by URL":"Помилка при завантаженні файлу за URL","File not found":"Файл не знайдено","File renamed to":"Файл перейменовано на ","Failed to rename the file":"Не вдалося перейменувати файл","Folder renamed to":"Папку перейменовано на","Rename folder":"Перейменувати папку","New folder name":"Нова назва папки","Enter a new folder name":"Введіть нову назву папки","Please drag and drop image files only":"Будь ласка, перетягуйте лише файли зображень","Upload file by URL":"Завантажити файл за URL","Upload file":"Завантажити файл","Creating a new folder":"Створення нової папки",Create:"Створити",Cancel:"Скасувати","Folder name":"Назва папки","Enter the name of the folder":"Введіть назву папки","A folder will be created inside:":"Папка буде створена всередині:","selected folder":"обраної папки","The folder will be created in the root directory":"Папка буде створена в кореневому каталозі","Failed to load folders":"Не вдалося завантажити папки","Folder name cannot be empty":"Назва папки не може бути порожньою","Folder creation provider is not configured":"Постачальник створення папок не налаштований","Folder created":"Папку створено","Folder rename is disabled by config":"Перейменування папок вимкнено в налаштуваннях","Folder rename provider is not configured":"Постачальник перейменування папок не налаштований","Unexpected response when renaming folder":"Неочікувана відповідь під час перейменування папки","Folder renamed":"Папку перейменовано","Failed to rename folder":"Не вдалося перейменувати папку","Failed to load folder items count":"Не вдалося отримати кількість елементів у папці","Failed to load subfolders":"Не вдалося завантажити підпапки",Download:"Завантажити","image URL":"URL зображення","Enter the URL of the image":"Введіть URL зображення","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Підтримувані формати: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"Нова назва файлу","Enter a new file name":"Введіть нову назву файлу","Copy to folder":"Копіювати в папку",Added:"Додано {{date}}","File uploaded successfully":"Файл {{fileName}} успішно завантажено","Successfully uploaded":"Успішно завантажено {{successCount}} з {{count}} файлу","Successfully uploaded files":"Успішно завантажено {{successCount}} з {{count}} файлів",uploads_success_summary:"Завантажено {{successCount}} з {{totalCount}} файлів",uploads_fail_summary:"Не вдалося завантажити {{failCount}} з {{totalCount}} файлів","File with this name already exists.":"Файл з такою назвою вже існує.","File not found or no longer available.":"Файл не знайдено або його вже видалено.","You don't have permission to access this file.":"У вас немає прав доступу до цього файлу.","File is too large to upload.":"Файл занадто великий для завантаження.","This file type is not allowed.":"Цей тип файлу не підтримується.","File name is not valid.":"Неприпустима назва файлу.","Failed to read the file.":"Не вдалося прочитати файл.","Failed to write the file.":"Не вдалося записати файл.","The file appears to be corrupted.":"Файл пошкоджений або має неправильний формат.","File integrity check failed.":"Перевірка цілісності файлу завершилась невдало.","Folder not found or no longer available.":"Папку не знайдено або її вже видалено.","Folder with this name already exists.":"Папка з такою назвою вже існує.","You don't have permission to access this folder.":"У вас немає прав доступу до цієї папки.","Folder name is not valid.":"Неприпустима назва папки.","Failed to read the folder contents.":"Не вдалося прочитати вміст папки.","Failed to write to the folder.":"Не вдалося виконати операцію з папкою.","Folder storage quota exceeded.":"Перевищено квоту зберігання для папки.","Folder is not empty.":"Папка не порожня.","Server error while processing the folder.":"Помилка сервера під час обробки папки.","Folder operation took too long.":"Операція з папкою зайняла надто багато часу.","Network error. Please check your connection and try again.":"Помилка мережі. Перевірте підключення до інтернету та повторіть спробу.","The operation took too long. Please try again.":"Операція виконувалася надто довго. Спробуйте ще раз.","Server error. Please try again later.":"Помилка на сервері. Повторіть спробу пізніше.","Service is temporarily unavailable. Please try again later.":"Сервіс тимчасово недоступний. Повторіть спробу пізніше.","Too many requests. Please try again a bit later.":"Занадто багато запитів. Спробуйте ще раз пізніше.","Authentication failed. Please sign in again.":"Не вдалося пройти автентифікацію. Будь ласка, увійдіть знову.","You are not allowed to perform this action.":"У вас немає прав для виконання цієї дії.","Some of the provided data is invalid.":"Деякі з переданих даних є некоректними.","This operation is not supported.":"Ця операція не підтримується.","Request payload is too large.":"Тіло запиту занадто велике.","This media type is not supported.":"Цей тип даних не підтримується.","You have exceeded the upload quota.":"Перевищено квоту на завантаження файлів.","Network error while uploading the file.":"Помилка мережі під час завантаження файлу.","File upload took too long.":"Завантаження файлу тривало надто довго.","Server error while uploading the file.":"Помилка сервера під час завантаження файлу.","The specified URL is not valid.":"Вказано некоректну URL-адресу.","The specified URL is not reachable.":"Вказана URL-адреса недоступна.","Content type at the URL is not allowed.":"Тип вмісту за вказаною URL-адресою не підтримується.","Failed to download file from the URL.":"Не вдалося завантажити файл за вказаною URL-адресою.","Network error while downloading the file.":"Помилка мережі під час завантаження файлу.","File download took too long.":"Завантаження файлу тривало надто довго.","Server error while downloading the file.":"Помилка сервера під час завантаження файлу.","Some items could not be processed.":"Не всі елементи були оброблені успішно.","Failed to process all items in the batch.":"Не вдалося обробити жоден елемент у пакетній операції.","Some items in the batch are in a conflicting state.":"Деякі елементи в пакетній операції перебувають у конфліктному стані.","Some items in the batch did not pass validation.":"Деякі елементи в пакетній операції не пройшли валідацію.","AI service returned an invalid response.":"Сервіс ШІ повернув некоректну відповідь.","Failed to generate image using AI.":"Не вдалося створити зображення за допомогою ШІ.","You have reached the AI image generation limit.":"Досягнуто ліміту генерації зображень ШІ.","Error in external integration.":"Помилка у зовнішній інтеграції.","Error in a third-party service.":"Помилка у зовнішньому сервісі.","An unknown error occurred.":"Сталася невідома помилка.","Renaming is not allowed for this item.":"Перейменування не дозволено для цього елемента.","Moving is not allowed for this item.":"Переміщення не дозволено для цього елемента.","Copying is not allowed for this item.":"Копіювання не дозволено для цього елемента.","Deleting is not allowed for this item.":"Видалення не дозволено для цього елемента.","Cannot move an item into itself.":"Не можна перемістити елемент у самого себе.","Cannot move an item into its descendant folder.":"Не можна перемістити елемент у дочірню папку.","Configuration error occurred.":"Сталася помилка конфігурації.",Moved:"Переміщено: {{names}}",move_success_summary:"Переміщено {{successCount}} з {{totalCount}} елементів",move_fail_summary:"Не вдалося перемістити {{failCount}} з {{totalCount}} елементів",Copied:"Скопійовано: {{names}}",copy_success_summary:"Скопійовано {{successCount}} з {{totalCount}} елементів",copy_fail_summary:"Не вдалося скопіювати {{failCount}} з {{totalCount}} елементів",Uploaded:"Завантажено: {{names}}",Failed:"Не вдалося завантажити: {{names}}","Failed to upload":"Не вдалося завантажити {{failCount}} з {{count}} файлу","Failed to upload files":"Не вдалося завантажити {{failCount}} з {{count}} файлів",months:{january:"січня",february:"лютого",march:"березня",april:"квітня",may:"травня",june:"червня",july:"липня",august:"серпня",september:"вересня",october:"жовтня",november:"листопада",december:"грудня"},files:"файлів","No available folders":"Немає доступних папок","My files":"Мої файли",GIF:"GIF","Stock images":"Стокові зображення",AI:"AI","AI image generation":"AI генерація зображень","Search GIFs":"Знайти GIF","That`s all we could find.":"Це все, що ми змогли знайти.","Search image":"Знайти зображення",All:"Всі",Landscape:"Горизонтальні",Portrait:"Вертикальні",Squarish:"Квадратні",Black:"Чорний","Black and White":"Чорно-білий",White:"Білий",Orange:"Помаранчевий",Red:"Червоний",Purple:"Фіолетовий",Magenta:"Пурпурний",Green:"Зелений",Teal:"Бірюзовий",Blue:"Синій","Photo by":"Фото",on:"на","File Manager":"Файловий менеджер","File Manager not configured":"Файловий менеджер не налаштовано","Filter by type":"Фільтр за типом","All types":"Всі типи","File name":"Назва файлу",Actions:"Дії","Add file":"Додати файл","Add folder":"Додати папку","Add file by URL":"Додати файл за URL","File moved":"Файл переміщено","Error when moving a file":"Помилка при переміщенні файлу","Failed to download file":"Не вдалося завантажити файл","Failed to load JSON data":"Не вдалося завантажити дані JSON","Invalid file URL":"Некоректний URL файлу","Unable to validate file URL":"Не вдалося перевірити файл за URL","Type to search...":"Введіть для пошуку...",Submit:"Надіслати","No folders yet":"Папок поки немає","Drag files to upload":"Перетягніть файли для завантаження","Drop files here to upload":"Відпустіть файли тут, щоб завантажити їх","Newest first":"Спочатку нові","Oldest first":"Спочатку старі","Largest first":"Спочатку великі","Smallest first":"Спочатку маленькі","A-Z":"За алфавітом А-Я","Z-A":"За алфавітом Я-А","By type":"За типом","Evaluating the task":"Оцінка завдання","Something went wrong, please try again":"Щось пішло не так, будь ласка, спробуйте ще раз","Sort by":"Сортувати за","preview text":"Зображення завантажується ...","Use this variant":"Використати цей варіант","Confirm deletion":"Підтвердити видалення","Are you sure you want to delete the selected items?":"Ви впевнені, що хочете видалити обрані елементи?","Move to Trash":"Перемістити в кошик","Are you sure you want to move the selected items to the Trash?":"Ви впевнені, що хочете перемістити обрані елементи в кошик?","Permanently delete":"Повне видалення","Delete permanently":"Видалити безповоротно","Are you sure you want to permanently delete the selected items? This action cannot be undone.":"Ви впевнені, що хочете безповоротно видалити обрані елементи? Цю дію не можна скасувати.",delete_files_permanent_one:"Ця дія безповоротно видалить {{count}} файл",delete_files_permanent_few:"Ця дія безповоротно видалить {{count}} файли",delete_files_permanent_many:"Ця дія безповоротно видалить {{count}} файлів",delete_files_permanent_other:"Ця дія безповоротно видалить {{count}} файлів",delete_folder_permanent:"Ця дія безповоротно видалить папку «{{name}}» і все її вміст, включаючи {{count}} елементів.",delete_mixed_permanent:"Ця дія безповоротно видалить {{total}} обраних елементів, включаючи {{folders}} папок і всі {{images}} зображень всередині них.",move_files_to_trash_one:"Ця дія перемістить у кошик {{count}} файл.",move_files_to_trash_few:"Ця дія перемістить у кошик {{count}} файли.",move_files_to_trash_many:"Ця дія перемістить у кошик {{count}} файлів.",move_files_to_trash_other:"Ця дія перемістить у кошик {{count}} файлів.",move_folder_to_trash:"Ця дія перемістить у кошик папку «{{name}}» і все її вміст ({{count}} елементів).",move_mixed_to_trash:"Ця дія перемістить у кошик {{total}} обраних елементів, включаючи {{folders}} папок і {{images}} зображень.",delete_count_confirm_trash_one:"Перемістити в кошик {{count}} файл?",delete_count_confirm_trash_few:"Перемістити в кошик {{count}} файли?",delete_count_confirm_trash_many:"Перемістити в кошик {{count}} файлів?",delete_count_confirm_trash_other:"Перемістити в кошик {{count}} файлів?",delete_count_confirm_permanent_one:"Видалити назавжди {{count}} файл?",delete_count_confirm_permanent_few:"Видалити назавжди {{count}} файли?",delete_count_confirm_permanent_many:"Видалити назавжди {{count}} файлів?",delete_count_confirm_permanent_other:"Видалити назавжди {{count}} файлів?",delete_count_confirm_one:"Видалити {{count}} файл?",delete_count_confirm_few:"Видалити {{count}} файли?",delete_count_confirm_many:"Видалити {{count}} файлів?",delete_count_confirm_other:"Видалити {{count}} файлів?",item:"файл",items:"файлів",Trash:"Видалені",Choose:"Обрати",Stock:"Фотосток","Select an image from our library":"Виберіть зображення з нашої бібліотеки","AI generation":"AI генерація","Creating an image on demand":"Створення зображення на замовлення","Search file or folder":"Знайти файл або папку","Select a file or drag and drop it here":"Виберіть файл або перетягніть його сюди","Supported files:":"Підтримувані файли:","Create folder":"Створити папку",Done:"Готово","Move here":"Перемістити сюди","Copy here":"Копіювати сюди","File URL":"URL файлу","There are no files for your request.":"Файлів за вашим запитом немає.","Millions of free stock images":"Мільйони безкоштовних стокових зображень","Enter a search query and we'll find the perfect image for you":"Введіть пошуковий запит, і ми знайдемо для вас ідеальне зображення","Enter your query and we will find the right one for you":"Введіть запит і ми знайдемо для вас відповідне","Over 350,000 live images":"Понад 350 000 живих зображень","The folder will be created in the root directory.":"Папка буде створена в кореневому каталозі.",undo:"СКАСУВАТИ",moved_to_trash_one:"Переміщено {{count}} елемент у кошик",moved_to_trash_few:"Переміщено {{count}} елементи у кошик",moved_to_trash_many:"Переміщено {{count}} елементів у кошик",moved_to_trash_other:"Переміщено {{count}} елементів у кошик",restored_items_one:"Відновлено {{count}} елемент",restored_items_few:"Відновлено {{count}} елементи",restored_items_many:"Відновлено {{count}} елементів",restored_items_other:"Відновлено {{count}} елементів",Type:"Тип"}},"pt-br":{translation:{Files:"Arquivos",selected:"selecionado(s)",Deselected:"Desmarcar",Rename:"Renomear","Rename file":"Renomear arquivo {{currentFileName}}","Select the destination folder":"Selecionar a pasta de destino","Selected files:":"Arquivos selecionados:","Selected files":"Arquivos selecionados: {{count}}",selected_files_one:"{{count}} arquivo selecionado",selected_files_few:"{{count}} arquivos selecionados",selected_files_many:"{{count}} arquivos selecionados",selected_files_other:"{{count}} arquivos selecionados",Copy:"Duplicar",Edit:"Editar","Move to":"Mover para",Delete:"Excluir","New folder":"Nova pasta","Image search...":"Busca de imagens...","By name":"Por nome","By size":"Por tamanho","By date":"Por data",List:"Lista",Grid:"Grade",Main:"Principal",Folders:"Pastas","total pages":"Total de {{total}} itens",Name:"Nome",Untitled:"Sem título",Size:"Tamanho",Dimensions:"Dimensões",Date:"Data",error:"erro",Folder:"Pasta",created:"criada","Failed to create folder":"Falha ao criar pasta","File deleted":"Arquivo excluído","Error when deleting a file":"Erro ao excluir arquivo","Folder deleted":"Pasta excluída","Error when deleting a folder":"Erro ao excluir pasta","Delete folder":"Excluir pasta","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Tem certeza que deseja excluir esta pasta? Esta ação também excluirá todos os arquivos e subpastas.","API-endpoint for file upload is not configured":"Endpoint da API para upload de arquivos não está configurado","Please select an image file":"Por favor, selecione um arquivo de imagem",File:"Arquivo","has been successfully uploaded":"foi carregado com sucesso","The URL must point to an image":"A URL deve apontar para uma imagem","Image upload...":"Carregando imagem...",Unknown:"Desconhecido","Error downloading file by URL":"Erro ao baixar arquivo por URL","successfully uploaded":"carregado com sucesso","Error when downloading a file by URL":"Erro ao baixar arquivo por URL","File not found":"Arquivo não encontrado","File renamed to":"Arquivo renomeado para","Failed to rename the file":"Falha ao renomear o arquivo","Folder renamed to":"Pasta renomeada para","Rename folder":"Renomear pasta","New folder name":"Novo nome da pasta","Enter a new folder name":"Digite um novo nome para a pasta","Please drag and drop image files only":"Por favor, arraste e solte apenas arquivos de imagem","Upload file by URL":"Carregar arquivo por URL","Upload file":"Carregar arquivo","Creating a new folder":"Criando uma nova pasta",Create:"Criar",Cancel:"Cancelar","Folder name":"Nome da pasta","Enter the name of the folder":"Digite o nome da pasta","A folder will be created inside:":"A pasta será criada dentro de:","selected folder":"pasta selecionada","The folder will be created in the root directory":"A pasta será criada no diretório raiz","Failed to load folders":"Não foi possível carregar as pastas","Folder name cannot be empty":"O nome da pasta não pode estar vazio","Folder creation provider is not configured":"O provedor de criação de pastas não está configurado","Folder created":"Pasta criada","Folder rename is disabled by config":"Renomear pastas está desabilitado pela configuração","Folder rename provider is not configured":"O provedor de renomeação de pastas não está configurado","Unexpected response when renaming folder":"Resposta inesperada ao renomear a pasta","Folder renamed":"Pasta renomeada","Failed to rename folder":"Não foi possível renomear a pasta","Failed to load folder items count":"Não foi possível obter a contagem de itens da pasta","Failed to load subfolders":"Não foi possível carregar as subpastas",Download:"Baixar","image URL":"URL da imagem","Enter the URL of the image":"Digite a URL da imagem","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Formatos suportados: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"Novo nome do arquivo","Enter a new file name":"Digite um novo nome para o arquivo","Copy to folder":"Copiar para pasta",Added:"Adicionado em {{date}}","File uploaded successfully":"Arquivo carregado com sucesso","Successfully uploaded":"{{successCount}} de {{count}} arquivo carregado com sucesso","Successfully uploaded files":"{{successCount}} de {{count}} arquivos carregados com sucesso",uploads_success_summary:"Enviados {{successCount}} de {{totalCount}} arquivos",uploads_fail_summary:"Falhou ao enviar {{failCount}} de {{totalCount}} arquivos","File with this name already exists.":"Já existe um arquivo com esse nome.","File not found or no longer available.":"O arquivo não foi encontrado ou já foi excluído.","You don't have permission to access this file.":"Você não tem permissão para acessar este arquivo.","File is too large to upload.":"O arquivo é grande demais para ser enviado.","This file type is not allowed.":"Este tipo de arquivo não é permitido.","File name is not valid.":"O nome do arquivo não é válido.","Failed to read the file.":"Não foi possível ler o arquivo.","Failed to write the file.":"Não foi possível gravar o arquivo.","The file appears to be corrupted.":"O arquivo parece estar corrompido.","File integrity check failed.":"A verificação de integridade do arquivo falhou.","Folder not found or no longer available.":"A pasta não foi encontrada ou já foi excluída.","Folder with this name already exists.":"Já existe uma pasta com esse nome.","You don't have permission to access this folder.":"Você não tem permissão para acessar esta pasta.","Folder name is not valid.":"O nome da pasta não é válido.","Failed to read the folder contents.":"Não foi possível ler o conteúdo da pasta.","Failed to write to the folder.":"Não foi possível gravar na pasta.","Folder storage quota exceeded.":"A cota de armazenamento da pasta foi excedida.","Folder is not empty.":"A pasta não está vazia.","Server error while processing the folder.":"Erro do servidor ao processar a pasta.","Folder operation took too long.":"A operação com a pasta demorou demais.","Network error. Please check your connection and try again.":"Erro de rede. Verifique sua conexão e tente novamente.","The operation took too long. Please try again.":"A operação demorou demais. Tente novamente.","Server error. Please try again later.":"Erro no servidor. Tente novamente mais tarde.","Service is temporarily unavailable. Please try again later.":"O serviço está temporariamente indisponível. Tente novamente mais tarde.","Too many requests. Please try again a bit later.":"Muitas solicitações. Tente novamente mais tarde.","Authentication failed. Please sign in again.":"Falha na autenticação. Faça login novamente.","You are not allowed to perform this action.":"Você não tem permissão para executar esta ação.","Some of the provided data is invalid.":"Alguns dos dados fornecidos são inválidos.","This operation is not supported.":"Esta operação não é suportada.","Request payload is too large.":"O corpo da requisição é grande demais.","This media type is not supported.":"Este tipo de mídia não é suportado.","You have exceeded the upload quota.":"Você excedeu a cota de upload de arquivos.","Network error while uploading the file.":"Erro de rede ao enviar o arquivo.","File upload took too long.":"O envio do arquivo demorou demais.","Server error while uploading the file.":"Erro do servidor ao enviar o arquivo.","The specified URL is not valid.":"A URL especificada não é válida.","The specified URL is not reachable.":"A URL especificada não está acessível.","Content type at the URL is not allowed.":"O tipo de conteúdo na URL não é permitido.","Failed to download file from the URL.":"Não foi possível baixar o arquivo da URL.","Network error while downloading the file.":"Erro de rede ao baixar o arquivo.","File download took too long.":"O download do arquivo demorou demais.","Server error while downloading the file.":"Erro do servidor ao baixar o arquivo.","Some items could not be processed.":"Nem todos os itens foram processados com sucesso.","Failed to process all items in the batch.":"Nenhum item do lote pôde ser processado.","Some items in the batch are in a conflicting state.":"Alguns itens do lote estão em estado de conflito.","Some items in the batch did not pass validation.":"Alguns itens do lote não passaram na validação.","AI service returned an invalid response.":"O serviço de IA retornou uma resposta inválida.","Failed to generate image using AI.":"Falha ao gerar imagem usando IA.","You have reached the AI image generation limit.":"Você atingiu o limite de geração de imagens por IA.","Error in external integration.":"Erro em uma integração externa.","Error in a third-party service.":"Erro em um serviço de terceiros.","An unknown error occurred.":"Ocorreu um erro desconhecido.","Renaming is not allowed for this item.":"Renomear não é permitido para este item.","Moving is not allowed for this item.":"Mover não é permitido para este item.","Copying is not allowed for this item.":"Copiar não é permitido para este item.","Deleting is not allowed for this item.":"Excluir não é permitido para este item.","Cannot move an item into itself.":"Não é possível mover um item para dentro de si mesmo.","Cannot move an item into its descendant folder.":"Não é possível mover um item para sua pasta descendente.","Configuration error occurred.":"Ocorreu um erro de configuração.",Moved:"Movidos: {{names}}",move_success_summary:"Movidos {{successCount}} de {{totalCount}} itens",move_fail_summary:"Falhou ao mover {{failCount}} de {{totalCount}} itens",Copied:"Copiados: {{names}}",copy_success_summary:"Copiados {{successCount}} de {{totalCount}} itens",copy_fail_summary:"Falhou ao copiar {{failCount}} de {{totalCount}} itens",Uploaded:"Arquivos enviados: {{names}}",Failed:"Falha ao enviar: {{names}}","Failed to upload":"Falha ao carregar {{failCount}} de {{count}} arquivo","Failed to upload files":"Falha ao carregar {{failCount}} de {{count}} arquivos",months:{january:"janeiro",february:"fevereiro",march:"março",april:"abril",may:"maio",june:"junho",july:"julho",august:"agosto",september:"setembro",october:"outubro",november:"novembro",december:"dezembro"},files:"arquivos","No available folders":"Nenhuma pasta disponível","My files":"Meus arquivos",GIF:"GIF","Stock images":"Imagens de stock",AI:"IA","AI image generation":"Geração de imagens por IA","Search GIFs":"Buscar GIFs","That`s all we could find.":"Isso é tudo que conseguimos encontrar.","Search image":"Buscar imagem",All:"Todos",Landscape:"Paisagem",Portrait:"Retrato",Squarish:"Quadrados",Black:"Preto","Black and White":"Preto e branco",White:"Branco",Orange:"Laranja",Red:"Vermelho",Purple:"Roxo",Magenta:"Magenta",Green:"Verde",Teal:"Verde-azulado",Blue:"Azul","Photo by":"Foto por",on:"em","File Manager":"Gerenciador de arquivos","File Manager not configured":"Gerenciador de arquivos não configurado","Filter by type":"Filtrar por tipo","All types":"Todos os tipos","File name":"Nome do arquivo",Actions:"Ações","Add file":"Adicionar arquivo","Add folder":"Adicionar pasta","Add file by URL":"Adicionar arquivo por URL","File moved":"Arquivo movido","Error when moving a file":"Erro ao mover arquivo","Failed to download file":"Não foi possível baixar o arquivo","Failed to load JSON data":"Não foi possível carregar os dados JSON","Invalid file URL":"URL de arquivo inválida","Unable to validate file URL":"Não foi possível validar a URL do arquivo","Type to search...":"Digite para buscar...",Submit:"Enviar","No folders yet":"Nenhuma pasta ainda","Drag files to upload":"Arraste arquivos para carregar","Drop files here to upload":"Solte os arquivos aqui para carregá-los","Newest first":"Mais recentes primeiro","Oldest first":"Mais antigos primeiro","Largest first":"Maiores primeiro","Smallest first":"Menores primeiro","A-Z":"A-Z","Z-A":"Z-A","By type":"Por tipo","Evaluating the task":"Avaliando a tarefa","Something went wrong, please try again":"Algo deu errado, por favor tente novamente","Sort by":"Ordenar por","preview text":"Carregando imagem...","Use this variant":"Usar esta variante","Confirm deletion":"Confirmar exclusão","Are you sure you want to delete the selected items?":"Tem certeza que deseja excluir os itens selecionados?","Move to Trash":"Mover para lixeira","Are you sure you want to move the selected items to the Trash?":"Tem certeza que deseja mover os itens selecionados para a lixeira?","Permanently delete":"Exclusão permanente","Delete permanently":"Excluir permanentemente","Are you sure you want to permanently delete the selected items? This action cannot be undone.":"Tem certeza que deseja excluir permanentemente os itens selecionados? Esta ação não pode ser desfeita.",delete_files_permanent_one:"Esta ação excluirá permanentemente {{count}} arquivo",delete_files_permanent_few:"Esta ação excluirá permanentemente {{count}} arquivos",delete_files_permanent_many:"Esta ação excluirá permanentemente {{count}} arquivos",delete_files_permanent_other:"Esta ação excluirá permanentemente {{count}} arquivos",delete_folder_permanent:"Esta ação excluirá permanentemente a pasta «{{name}}» e todo seu conteúdo, incluindo {{count}} itens.",delete_mixed_permanent:"Esta ação excluirá permanentemente {{total}} itens selecionados, incluindo {{folders}} pastas e todas as {{images}} imagens dentro delas.",move_files_to_trash_one:"Esta ação moverá {{count}} arquivo para a lixeira.",move_files_to_trash_few:"Esta ação moverá {{count}} arquivos para a lixeira.",move_files_to_trash_many:"Esta ação moverá {{count}} arquivos para a lixeira.",move_files_to_trash_other:"Esta ação moverá {{count}} arquivos para a lixeira.",move_folder_to_trash:"Esta ação moverá a pasta «{{name}}» e todo seu conteúdo ({{count}} itens) para a lixeira.",move_mixed_to_trash:"Esta ação moverá {{total}} itens selecionados para a lixeira, incluindo {{folders}} pastas e {{images}} imagens.",delete_count_confirm_trash_one:"Mover {{count}} arquivo para a lixeira?",delete_count_confirm_trash_few:"Mover {{count}} arquivos para a lixeira?",delete_count_confirm_trash_many:"Mover {{count}} arquivos para a lixeira?",delete_count_confirm_trash_other:"Mover {{count}} arquivos para a lixeira?",delete_count_confirm_permanent_one:"Excluir permanentemente {{count}} arquivo?",delete_count_confirm_permanent_few:"Excluir permanentemente {{count}} arquivos?",delete_count_confirm_permanent_many:"Excluir permanentemente {{count}} arquivos?",delete_count_confirm_permanent_other:"Excluir permanentemente {{count}} arquivos?",delete_count_confirm_one:"Excluir {{count}} arquivo?",delete_count_confirm_few:"Excluir {{count}} arquivos?",delete_count_confirm_many:"Excluir {{count}} arquivos?",delete_count_confirm_other:"Excluir {{count}} arquivos?",item:"arquivo",items:"arquivos",Trash:"Lixeira",Choose:"Escolher",Stock:"Banco de imagens","Select an image from our library":"Selecione uma imagem da nossa biblioteca","AI generation":"Geração por IA","Creating an image on demand":"Criando uma imagem sob demanda","Search file or folder":"Buscar arquivo ou pasta","Select a file or drag and drop it here":"Selecione um arquivo ou arraste e solte aqui","Supported files:":"Arquivos suportados:","Create folder":"Criar pasta",Done:"Concluído","Move here":"Mover aqui","Copy here":"Copiar aqui","File URL":"URL do arquivo","There are no files for your request.":"Não há arquivos para sua solicitação.","Millions of free stock images":"Milhões de imagens de stock gratuitas","Enter a search query and we'll find the perfect image for you":"Digite uma consulta de busca e encontraremos a imagem perfeita para você","Enter your query and we will find the right one for you":"Digite sua consulta e nós encontraremos a ideal para você","Over 350,000 live images":"Mais de 350.000 imagens ao vivo","The folder will be created in the root directory.":"A pasta será criada no diretório raiz.",undo:"DESFAZER",moved_to_trash_one:"{{count}} item movido para a lixeira",moved_to_trash_few:"{{count}} itens movidos para a lixeira",moved_to_trash_many:"{{count}} itens movidos para a lixeira",moved_to_trash_other:"{{count}} itens movidos para a lixeira",restored_items_one:"{{count}} item restaurado",restored_items_few:"{{count}} itens restaurados",restored_items_many:"{{count}} itens restaurados",restored_items_other:"{{count}} itens restaurados",Type:"Tipo"}}};Tr.use(Rn).init({resources:zr,debug:!0,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});const Br=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m6 9 6 6 6-6"}));Br.displayName="ChevronDown";const Vr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M12 20.472a6 6 0 1 0 5.58-10.262m-11.16 0a6 6 0 1 0 7.16 3.58M18 8A6 6 0 1 1 6 8a6 6 0 0 1 12 0Z"}));Vr.displayName="Colors";const Ur=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M16 16v2.8c0 1.12 0 1.68-.218 2.108a2 2 0 0 1-.874.874C14.48 22 13.92 22 12.8 22H5.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2 20.48 2 19.92 2 18.8v-7.6c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 8 4.08 8 5.2 8H8m3.2 8h7.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 14.48 22 13.92 22 12.8V5.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 2 19.92 2 18.8 2h-7.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C8 3.52 8 4.08 8 5.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C9.52 16 10.08 16 11.2 16Z"}));Ur.displayName="Copy04";const $r=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M10 6h4.8c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C18 7.52 18 8.08 18 9.2V14M2 6h4m12 12v4m4-4H9.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C6 16.48 6 15.92 6 14.8V2"}));$r.displayName="Crop02";const Wr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0-7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));Wr.displayName="DotsVertical";const Hr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm7 7 3 3m0 0 3-3m-3 3v-6"}));Hr.displayName="FolderDownload";const Gr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm7 7h6"}));Gr.displayName="FolderMinus";const Yr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm10 10v-6m-3 3h6"}));Yr.displayName="FolderPlus";const qr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M8.4 3H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 3.76 3 4.04 3 4.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 10 4.04 10 4.6 10h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C10 9.24 10 8.96 10 8.4V4.6c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C9.24 3 8.96 3 8.4 3Zm11 0h-3.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C14 3.76 14 4.04 14 4.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 10 15.04 10 15.6 10h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C21 9.24 21 8.96 21 8.4V4.6c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C20.24 3 19.96 3 19.4 3Zm0 11h-3.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C14 14.76 14 15.04 14 15.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 21 15.04 21 15.6 21h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C21 20.24 21 19.96 21 19.4v-3.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C20.24 14 19.96 14 19.4 14Zm-11 0H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 14.76 3 15.04 3 15.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C10 20.24 10 19.96 10 19.4v-3.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C9.24 14 8.96 14 8.4 14Z"}));qr.displayName="Grid01";const Xr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m4.272 20.728 6.597-6.597c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668l6.553 6.553M14 15l2.869-2.869c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668L22 15M10 9a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM6.8 21h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 18.72 22 17.88 22 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 21 5.12 21 6.8 21Z"}));Xr.displayName="Image03";const Kr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m12.708 18.364-1.415 1.414a5 5 0 1 1-7.07-7.07l1.413-1.415m12.728 1.414 1.415-1.414a5 5 0 0 0-7.071-7.071l-1.415 1.414M8.5 15.5l7-7"}));Kr.displayName="Link01";const Zr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M21 12H9m12-6H9m12 12H9m-4-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));Zr.displayName="List";const Jr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}),r.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));Jr.displayName="PlaySquare";const Qr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M12 8v8m-4-4h8m6 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Qr.displayName="PlusCircle";const ei=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M14 22H6.8m0 0c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 19.72 2 18.88 2 17.2M6.8 22h.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C12 19.72 12 18.88 12 17.2v-.4c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C9.72 12 8.88 12 7.2 12h-.4c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 14.28 2 15.12 2 16.8v.4m0 0V10m8-8h4m8 8v4m-4 8c.93 0 1.395 0 1.776-.102a3 3 0 0 0 2.122-2.122C22 19.395 22 18.93 22 18m0-12c0-.93 0-1.395-.102-1.776a3 3 0 0 0-2.122-2.122C19.395 2 18.93 2 18 2M6 2c-.93 0-1.395 0-1.776.102a3 3 0 0 0-2.122 2.122C2 4.605 2 5.07 2 6"}));ei.displayName="Scale01";const ti=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m21 21-4.35-4.35M19 11a8 8 0 1 1-16 0 8 8 0 0 1 16 0Z"}));ti.displayName="SearchMd";const ni=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M4.5 22v-5m0-10V2M2 4.5h5m-5 15h5M13 3l-1.734 4.509c-.282.733-.423 1.1-.643 1.408a3 3 0 0 1-.706.707c-.308.219-.675.36-1.408.642L4 12l4.509 1.734c.733.282 1.1.423 1.408.643.273.194.512.433.707.706.219.308.36.675.642 1.408L13 21l1.734-4.509c.282-.733.423-1.1.643-1.408.194-.273.433-.512.706-.707.308-.219.675-.36 1.408-.642L22 12l-4.509-1.734c-.733-.282-1.1-.423-1.408-.642a3 3 0 0 1-.706-.707c-.22-.308-.36-.675-.643-1.408L13 3Z"}));ni.displayName="Stars02";const ri=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M13 7H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 8.52 2 9.08 2 10.2v3.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 17 4.08 17 5.2 17H13m4-10h1.8c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 8.52 22 9.08 22 10.2v3.6c0 1.12 0 1.68-.218 2.108a2 2 0 0 1-.874.874C20.48 17 19.92 17 18.8 17H17m0 4V3m2.5 0h-5m5 18h-5"}));ri.displayName="TextInput";const ii=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M9 3h6M3 6h18m-2 0-.701 10.52c-.105 1.578-.158 2.367-.499 2.965a3 3 0 0 1-1.298 1.215c-.62.3-1.41.3-2.993.3h-3.018c-1.582 0-2.373 0-2.993-.3A3 3 0 0 1 6.2 19.485c-.34-.598-.394-1.387-.499-2.966L5 6m5 4.5v5m4-5v5"}));ii.displayName="Trash03";var oi,ai={exports:{}},si=ai.exports;
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import i,{useState as o,useEffect as a,createContext as s,useContext as l,useCallback as c,useRef as u,useMemo as d,createElement as h,memo as f,forwardRef as p,useImperativeHandle as g,Children as m,isValidElement as v,Fragment as y,useId as b,cloneElement as w,useLayoutEffect as x,useInsertionEffect as C,Component as _}from"react";import{createRoot as S}from"react-dom/client";import{Spin as k,theme as A,ConfigProvider as E,App as I,Form as T,Input as O,Image as F,Typography as P,Select as M,Checkbox as R,Tooltip as L,Dropdown as j,Button as D,Space as N,Segmented as z,Pagination as B,Table as V,Empty as U,Row as $,Col as W,Card as H,Tree as G,Modal as Y,Menu as q,Divider as X,Layout as K,Radio as Z,Tag as J,Carousel as Q,Alert as ee}from"antd";import te from"antd/es/alert/ErrorBoundary";import ne,{LoadingOutlined as re,FolderOutlined as ie,EyeOutlined as oe,BarsOutlined as ae,AppstoreOutlined as se,DownOutlined as le,RightOutlined as ce,LinkOutlined as ue,UploadOutlined as de,FileOutlined as he,FolderAddOutlined as fe,FolderOpenOutlined as pe,CloseOutlined as ge,HistoryOutlined as me,ArrowRightOutlined as ve,ArrowLeftOutlined as ye,CheckOutlined as be}from"@ant-design/icons";import*as we from"react-dom";import{createPortal as xe,flushSync as Ce}from"react-dom";import"antd/dist/reset.css";function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _e(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_e(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}function Ae(e){var t=function(e,t){if("object"!=ke(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=ke(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ke(t)?t:t+""}function Ee(e,t,n){return(t=Ae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach(function(t){Ee(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Oe={},Fe=[];function Pe(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var n=Fe.reduce(function(e,t){return t(null!=e?e:"","warning")},t);n&&console.error("Warning: ".concat(n))}}function Me(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var n=Fe.reduce(function(e,t){return t(null!=e?e:"","note")},t);n&&console.warn("Note: ".concat(n))}}function Re(e,t,n){t||Oe[n]||(e(!1,n),Oe[n]=!0)}function Le(e,t){Re(Pe,e,t)}function je(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=r.has(t);if(Le(!a,"Warning: There may be circular references"),a)return!1;if(t===i)return!0;if(n&&o>1)return!1;r.add(t);var s=o+1;if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(var l=0;l<t.length;l++)if(!e(t[l],i[l],s))return!1;return!0}if(t&&i&&"object"===ke(t)&&"object"===ke(i)){var c=Object.keys(t);return c.length===Object.keys(i).length&&c.every(function(n){return e(t[n],i[n],s)})}return!1}(e,t)}function De(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ne(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ae(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}Le.preMessage=function(e){Fe.push(e)},Le.resetWarned=function(){Oe={}},Le.noteOnce=function(e,t){Re(Me,e,t)};function ze(e){return e.join("%")}var Be=function(){function e(t){De(this,e),Ee(this,"instanceId",void 0),Ee(this,"cache",new Map),Ee(this,"extracted",new Set),this.instanceId=t}return Ne(e,[{key:"get",value:function(e){return this.opGet(ze(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(ze(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}(),Ve=["children"],Ue="data-css-hash",$e="__cssinjs_instance__";function We(){var e=Math.random().toString(12).slice(2);if("undefined"!=typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(Ue,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(t){t[$e]=t[$e]||e,t[$e]===e&&document.head.insertBefore(t,n)});var r={};Array.from(document.querySelectorAll("style[".concat(Ue,"]"))).forEach(function(t){var n,i=t.getAttribute(Ue);r[i]?t[$e]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[i]=!0})}return new Be(e)}var He=r.createContext({hashPriority:"low",cache:We(),defaultCache:!0}),Ge=function(e){var t,n,i,o,a=e.children,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Ve),l=r.useContext(He),c=(t=function(){var e=Te({},l);Object.keys(s).forEach(function(t){var n=s[t];void 0!==s[t]&&(e[t]=n)});var t=s.cache;return e.cache=e.cache||We(),e.defaultCache=!t&&l.defaultCache,e},n=[l,s],i=function(e,t){return!je(e[0],t[0],!0)||!je(e[1],t[1],!0)},"value"in(o=r.useRef({})).current&&!i(o.current.condition,n)||(o.current.value=t(),o.current.condition=n),o.current.value);return r.createElement(He.Provider,{value:c},a)};var Ye=function(){function e(){De(this,e),Ee(this,"cache",void 0),Ee(this,"keys",void 0),Ee(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return Ne(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={map:this.cache};return e.forEach(function(e){var t;i?i=null===(t=i)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):i=void 0}),null!==(t=i)&&void 0!==t&&t.value&&r&&(i.value[1]=this.cacheCallTimes++),null===(n=i)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce(function(e,t){var n=Se(e,2)[1];return r.internalGet(t)[1]<n?[t,r.internalGet(t)[1]]:e},[this.keys[0],this.cacheCallTimes]),o=Se(i,1)[0];this.delete(o)}this.keys.push(t)}var a=this.cache;t.forEach(function(e,i){if(i===t.length-1)a.set(e,{value:[n,r.cacheCallTimes++]});else{var o=a.get(e);o?o.map||(o.map=new Map):a.set(e,{map:new Map}),a=a.get(e).map}})}},{key:"deleteByPath",value:function(e,t){var n,r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),null===(n=r.value)||void 0===n?void 0:n[0];var i=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),i}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter(function(t){return!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,e)}),this.deleteByPath(this.cache,e)}}]),e}();function qe(e,t,n){if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var r=Te(Te({},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),{},Ee(Ee({},"data-token-hash",t),Ue,n)),i=Object.keys(r).map(function(e){var t=r[e];return t?"".concat(e,'="').concat(t,'"'):null}).filter(function(e){return e}).join(" ");return"<style ".concat(i,">").concat(e,"</style>")}Ee(Ye,"MAX_CACHE_SIZE",20),Ee(Ye,"MAX_CACHE_OFFSET",5),new Ye,"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect,Te({},r).useInsertionEffect,Te({},r).useInsertionEffect;if(process.env.NODE_ENV,"production"!==process.env.NODE_ENV&&"undefined"!=typeof module&&module&&module.hot&&"undefined"!=typeof window){var Xe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:null;if(Xe&&"function"==typeof Xe.webpackHotUpdate){var Ke=Xe.webpackHotUpdate;Xe.webpackHotUpdate=function(){return setTimeout(function(){0},0),Ke.apply(void 0,arguments)}}}process.env.NODE_ENV;var Ze="comm",Je="rule",Qe="decl",et=Math.abs,tt=String.fromCharCode;function nt(e){return e.trim()}function rt(e,t,n){return e.replace(t,n)}function it(e,t,n){return e.indexOf(t,n)}function ot(e,t){return 0|e.charCodeAt(t)}function at(e,t,n){return e.slice(t,n)}function st(e){return e.length}function lt(e,t){return t.push(e),e}var ct=1,ut=1,dt=0,ht=0,ft=0,pt="";function gt(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:ct,column:ut,length:a,return:"",siblings:s}}function mt(){return ft=ht>0?ot(pt,--ht):0,ut--,10===ft&&(ut=1,ct--),ft}function vt(){return ft=ht<dt?ot(pt,ht++):0,ut++,10===ft&&(ut=1,ct++),ft}function yt(){return ot(pt,ht)}function bt(){return ht}function wt(e,t){return at(pt,e,t)}function xt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ct(e){return nt(wt(ht-1,kt(91===e?e+2:40===e?e+1:e)))}function _t(e){for(;(ft=yt())&&ft<33;)vt();return xt(e)>2||xt(ft)>3?"":" "}function St(e,t){for(;--t&&vt()&&!(ft<48||ft>102||ft>57&&ft<65||ft>70&&ft<97););return wt(e,bt()+(t<6&&32==yt()&&32==vt()))}function kt(e){for(;vt();)switch(ft){case e:return ht;case 34:case 39:34!==e&&39!==e&&kt(ft);break;case 40:41===e&&kt(e);break;case 92:vt()}return ht}function At(e,t){for(;vt()&&e+ft!==57&&(e+ft!==84||47!==yt()););return"/*"+wt(t,ht-1)+"*"+tt(47===e?e:vt())}function Et(e){for(;!xt(yt());)vt();return wt(e,ht)}function It(e){return function(e){return pt="",e}(Tt("",null,null,null,[""],e=function(e){return ct=ut=1,dt=st(pt=e),ht=0,[]}(e),0,[0],e))}function Tt(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,h=0,f=0,p=0,g=1,m=1,v=1,y=0,b="",w=i,x=o,C=r,_=b;m;)switch(p=y,y=vt()){case 40:if(108!=p&&58==ot(_,d-1)){-1!=it(_+=rt(Ct(y),"&","&\f"),"&\f",et(c?s[c-1]:0))&&(v=-1);break}case 34:case 39:case 91:_+=Ct(y);break;case 9:case 10:case 13:case 32:_+=_t(p);break;case 92:_+=St(bt()-1,7);continue;case 47:switch(yt()){case 42:case 47:lt(Ft(At(vt(),bt()),t,n,l),l),5!=xt(p||1)&&5!=xt(yt()||1)||!st(_)||" "===at(_,-1,void 0)||(_+=" ");break;default:_+="/"}break;case 123*g:s[c++]=st(_)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+u:-1==v&&(_=rt(_,/\f/g,"")),f>0&&(st(_)-d||0===g&&47===p)&<(f>32?Pt(_+";",r,n,d-1,l):Pt(rt(_," ","")+";",r,n,d-2,l),l);break;case 59:_+=";";default:if(lt(C=Ot(_,t,n,c,u,i,s,b,w=[],x=[],d,o),o),123===y)if(0===u)Tt(_,t,C,C,w,o,d,s,x);else{switch(h){case 99:if(110===ot(_,3))break;case 108:if(97===ot(_,2))break;default:u=0;case 100:case 109:case 115:}u?Tt(e,C,C,r&<(Ot(e,C,C,0,0,i,s,b,i,w=[],d,x),x),i,x,d,s,r?w:x):Tt(_,C,C,C,[""],x,0,s,x)}}c=u=f=0,g=v=1,b=_="",d=a;break;case 58:d=1+st(_),f=p;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==mt())continue;switch(_+=tt(y),y*g){case 38:v=u>0?1:(_+="\f",-1);break;case 44:s[c++]=(st(_)-1)*v,v=1;break;case 64:45===yt()&&(_+=Ct(vt())),h=yt(),u=d=st(b=_+=Et(bt())),y++;break;case 45:45===p&&2==st(_)&&(g=0)}}return o}function Ot(e,t,n,r,i,o,a,s,l,c,u,d){for(var h=i-1,f=0===i?o:[""],p=function(e){return e.length}(f),g=0,m=0,v=0;g<r;++g)for(var y=0,b=at(e,h+1,h=et(m=a[g])),w=e;y<p;++y)(w=nt(m>0?f[y]+" "+b:rt(b,/&\f/g,f[y])))&&(l[v++]=w);return gt(e,t,n,0===i?Je:s,l,c,u,d)}function Ft(e,t,n,r){return gt(e,t,n,Ze,tt(ft),at(e,2,-2),0,r)}function Pt(e,t,n,r,i){return gt(e,t,n,Qe,at(e,0,r),at(e,r+1,-1),r,i)}function Mt(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Rt(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case Qe:return e.return=e.return||e.value;case Ze:return"";case"@keyframes":return e.return=e.value+"{"+Mt(e.children,r)+"}";case Je:if(!st(e.value=e.props.join(",")))return""}return st(n=Mt(e.children,r))?e.return=e.value+"{"+n+"}":""}function Lt(e){return e.notSplit=!0,e}Ee(Ee(Ee({},"style",function(e,t,n){var r=Se(e,6),i=r[0],o=r[1],a=r[2],s=r[3],l=r[4],c=r[5],u=(n||{}).plain;if(l)return null;var d=i,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(c)};return d=qe(i,o,a,h,u),s&&Object.keys(s).forEach(function(e){if(!t[e]){t[e]=!0;var n=function(e){return Mt(It(e),Rt).replace(/\{%%%\:[^;];}/g,";")}(s[e]),r=qe(n,o,"_effect-".concat(e),h,u);e.startsWith("@layer")?d=r+d:d+=r}}),[c,a,d]}),"token",function(e,t,n){var r=Se(e,5),i=r[2],o=r[3],a=r[4],s=(n||{}).plain;if(!o)return null;var l=i._tokenKey;return[-999,l,qe(o,a,l,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}),"cssVar",function(e,t,n){var r=Se(e,4),i=r[1],o=r[2],a=r[3],s=(n||{}).plain;if(!i)return null;return[-999,o,qe(i,a,o,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}),Lt(["borderTop","borderBottom"]),Lt(["borderTop"]),Lt(["borderBottom"]),Lt(["borderLeft","borderRight"]),Lt(["borderLeft"]),Lt(["borderRight"]);const jt={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};function Dt(e,t){return t}function Nt(e,t){return e.filter(e=>void 0!==e)}var zt;function Bt(e){return"object"!=typeof e||null===e?0:Array.isArray(e)?2:function(e){if(!$t.includes(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(void 0===t)return!0;const n=t.prototype;if(null===n||"object"!=typeof n||!$t.includes(Object.prototype.toString.call(n)))return!1;if(!n.hasOwnProperty("isPrototypeOf"))return!1;return!0}(e)?1:e instanceof Set?3:e instanceof Map?4:5}function Vt(e,t){return"object"==typeof e&&Object.prototype.propertyIsEnumerable.call(e,t)}function Ut(e){let t=0,n=e[0]?.[Symbol.iterator]();return{[Symbol.iterator]:()=>({next(){for(;;){if(void 0===n)return{done:!0,value:void 0};const r=n.next();if(!0!==r.done)return{done:!1,value:r.value};t+=1,n=e[t]?.[Symbol.iterator]()}}})}}!function(e){e[e.NOT=0]="NOT",e[e.RECORD=1]="RECORD",e[e.ARRAY=2]="ARRAY",e[e.SET=3]="SET",e[e.MAP=4]="MAP",e[e.OTHER=5]="OTHER"}(zt||(zt={}));const $t=["[object Object]","[object Module]"];const Wt={mergeRecords:function(e,t,n){const r={};for(const i of function(e){const t=new Set;for(const n of e)for(const e of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(e);return t}(e)){const o=[];for(const t of e)Vt(t,i)&&o.push(t[i]);if(0===o.length)continue;const a=t.metaDataUpdater(n,{key:i,parents:e}),s=Gt(o,t,a);s!==jt.skip&&("__proto__"===i?Object.defineProperty(r,i,{value:s,configurable:!0,enumerable:!0,writable:!0}):r[i]=s)}return r},mergeArrays:function(e){return e.flat()},mergeSets:function(e){return new Set(Ut(e))},mergeMaps:function(e){return new Map(Ut(e))},mergeOthers:function(e){return e.at(-1)}};function Ht(...e){return function(e,t){const n=function(e,t){return{defaultMergeFunctions:Wt,mergeFunctions:{...Wt,...Object.fromEntries(Object.entries(e).filter(([e,t])=>Object.hasOwn(Wt,e)).map(([e,t])=>!1===t?[e,Wt.mergeOthers]:[e,t]))},metaDataUpdater:e.metaDataUpdater??Dt,deepmerge:t,useImplicitDefaultMerging:e.enableImplicitDefaultMerging??!1,filterValues:!1===e.filterValues?void 0:e.filterValues??Nt,actions:jt}}(e,r);function r(...e){return Gt(e,n,t)}return r}({})(...e)}function Gt(e,t,n){const r=t.filterValues?.(e,n)??e;if(0===r.length)return;if(1===r.length)return Yt(r,t,n);const i=Bt(r[0]);if(0!==i&&5!==i)for(let e=1;e<r.length;e++)if(Bt(r[e])!==i)return Yt(r,t,n);switch(i){case 1:return function(e,t,n){const r=t.mergeFunctions.mergeRecords(e,t,n);if(r===jt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords)return t.defaultMergeFunctions.mergeRecords(e,t,n);return r}(r,t,n);case 2:return function(e,t,n){const r=t.mergeFunctions.mergeArrays(e,t,n);if(r===jt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays)return t.defaultMergeFunctions.mergeArrays(e);return r}(r,t,n);case 3:return function(e,t,n){const r=t.mergeFunctions.mergeSets(e,t,n);if(r===jt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets)return t.defaultMergeFunctions.mergeSets(e);return r}(r,t,n);case 4:return function(e,t,n){const r=t.mergeFunctions.mergeMaps(e,t,n);if(r===jt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps)return t.defaultMergeFunctions.mergeMaps(e);return r}(r,t,n);default:return Yt(r,t,n)}}function Yt(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===jt.defaultMerge||t.useImplicitDefaultMerging&&void 0===r&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}const qt="my_files",Xt="gif",Kt="stock_images",Zt="ai",Jt="editor",Qt="light",en="dark",tn="system",nn="(prefers-color-scheme: dark)",rn=!1,on=["jpg","jpeg","png","gif","bmp","webp","svg","ico","tiff","tif"],an="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQABLAEsAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAAEsAAAAAQAAASwAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAQOgAwAEAAAAAQAAAMoAAAAA/+EJ2Wh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8APD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6c3RvY2s6Mzk2MmU4NTQtNjA1NC00MGZmLWEwYzMtYjJkNjcwMzQ2OWFhIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmE5M2NiZTgyLWI5NjEtNGUzNS1iYmQ0LWJjZWE1Zjc1YTQwZiIvPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw/eHBhY2tldCBlbmQ9InciPz4A/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAMoBAwMBIgACEQADEQD/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/3QAEABH/2gAMAwEAAhEDEQA/APsuiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoqG7uIbWB55nCooyTS208VxCssLh0boRQBLRRRQAUUUUAFFFFAH/9D7LooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAqG7uIrWBppnCoo5Jou7iK1gaaZwqKM5NcRq2oXOsXqxQq2wnEcYPX3NABq2oXOr3qwxK3l5xHGO/ua6nw7pzadZ7ZJGaR+WBPA9hUfh7R49Pi82TDXDDkkfd9hWxQAUUUUAFFFFABRRRQB//9H7LooooAKKKKACiiuOv/EOpQX88KNDsSQqMp6H60AdjRXD/wDCTapn70P/AH7/APr0f8JPqn96H/v3/wDXoA7iiuH/AOEn1T+9D/37/wDr0f8ACT6p/eh/79//AF6AO4orh/8AhJ9U/vQ/9+//AK9H/CT6p/eh/wC/f/16AO4orh/+En1T+9D/AN+//r0f8JPqn96H/v3/APXoA7iiuH/4SfVP70P/AH7/APr0f8JPqn96H/v3/wDXoA7iiuH/AOEn1T+9D/37/wDr0f8ACT6p/eh/79//AF6AO4orh/8AhJ9U/vQ/9+//AK9H/CT6p/eh/wC/f/16AO4orh/+En1T+9D/AN+//r0f8JPqn96H/v3/APXoA7iobq4itYHmncIijJJrE0jUdQlt2v8AUJIYrNVyMJgv9Oaw9X1C51e8WGJWMecRxr39zQAatqNzq94kUasELYjjB6/Wul8P6NHp8Qlkw1ww5P8Ad9hWRmDw9bfwTajIv4Riqw8Tap6wf98f/XoA7elrh/8AhJtU/vQ/9+//AK9avhnWL3UL94bgx7BGWG1cdwPX3oA6OiiigAooooAKKKKAP//S+y6KKKACiiigArgHAbxSVYAg3mCD3+eu/rgT/wAjV/2+f+z0Adt9jtMf8esH/fsUfY7T/n1g/wC/Yqeh2CIWY4AGSaAK7WlmqktbQADkkxr/AIVUe50JJPLZ7EN6YWuX17WJr+dkRylurYVQfve5rKJoA9Ghh0+Zd0MVtIvqqKaf9jtP+fWD/v2K89sry4sphLbyFD3HY/Wu+0e9TULFLhQATww9DQBJ9jtP+fWD/v2KattZM7ILe3LL94bF4p99cx2lpJcS/dRc/X2rjdG1eSLWmuZ2Oy4bEnoPQ/hQB2P2O0/59YP+/Yo+x2n/AD6wf9+xU4IPSloAr/Y7T/n1g/79ij7Haf8APrB/37FWKKAK/wBjtP8An1g/79ij7Haf8+sH/fsVYooAr/Y7T/n1g/79ioruPTrWBppoLdUUckxj/Cp7u4itYGnmcKijJJriNX1C61i9EUKtsziOMHr7mgBNVv7jVrxYII/3YOIYl/ma6bw9o8enxCSTD3DDkn+H2FHh/R49Pi8yTDXDDkkfd9hWxQBC9rbOxZ7eJmPUlATTfsdp/wA+sH/fsVYooAztXtbVdLumW3hBELkEIOPlNc74H/5Csv8A1xP8xXUaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5igDs6KKKACiiigAooooA//0/suiiigAooooAK4E/8AI1f9vn/s9d9XAn/kav8At8/9noA72s/xI7R6HdMpwdmPzODWhUN/ALqymt26SIVoA816UlS3ML207wSrtdCQai+lAC11HgN2xdx4+XKH6Hn/AArl++K6jSv+JN4flvJhiWfBRe/Tj+ZNAEHjLUfOnFjEw2R/NJju3Yfl/Oudp0jtJIzucsxJJ96bQB2/hLUftdkLeRh50OF+q9jW3XnOkXrWF/HcDJUHDjPUV6HDIssSSIQVYAg0APooooAKhu7iK1gaeZwqKM5NF3cQ2sDTTOFRRk5riNW1C51i9WKJW8vOI4x39zQAavqF1rF6IYVbZnEcYPX3NdL4e0ePT4hLIA1w45JH3fYUeHtHj0+LzJcNcMOTj7vsK2KACiiigAooooAqaz/yCbz/AK4v/wCgmuX8D/8AIWl/64n+YrqNZ/5BN5/1xf8A9BNcv4H/AOQtL/1xP8xQB2dFFFABRRRQAUUUUAf/1PsuiiigAooooAK4E/8AI1f9vn/s9d9XAn/kav8At8/9noA72lpKWgDO1bSLXUQDKCsg6OvX/wCvWFJ4Tn3fJdxFc8FkOa66igDC0zw3a2riadzPIOeRhR+FYXinUPtl+Yoz+5h+VcdCe5/p+FdH4n1H7DYFYziaX5U9vU1wn40AFFFFABXW+DNR3xtp8x+ZPmjyeo7j/PrXJVNZzva3UdxG2HjbP/1qAPTKhu7iK2gaaZwqKOSahTULf+zFv3bZEybsmuP1XULnV70QxK3l7sRxr39zQAmrahc6xerFEreXnEcY7+5rpfD2jx6fF5suGuGHJx932FHh7R49PiEkuGuGHJ/u+wrYoAKKKKACiiigAooooAqaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5iuo1n/AJBN5/1xf/0E1y/gf/kLS/8AXE/zFAHZ0UUUAFFFFABRRRQB/9X7LooooAKKKKACuBP/ACNX/b5/7PXfVwJ/5Gr/ALfP/Z6AO9paSloAKazBVZicBRkmnVz3jHUfs9qLOJsSy/ex2XvQBzuu351DUXlDfu1+WMewqhRRQAUUUv40AFbGi6ZG8TahqB8uzTkA9ZP/AK1Gi6ZG8TajqJ2WcfIB/wCWn/1qi1W+uNWu0hhQiIHbFEv86ADU7+fVbpIIU2xZ2xRL/M103h7R00+LzZcPcMOTj7vsKyCYfD9sQNsupSr+EY/z+ddDot8uoWCTj7/Rx6N3oAvUUUUAFZ17rFta6jDZydZPvNnhPTNSaxqEWn2bTv8AM3RF9TXntxLJPK8sp3O5yx9TQB6dmlrA8Kar9qg+yzt+/jHBP8QrfoAKKKKAKms/8gm8/wCuL/8AoJrl/A//ACFpf+uJ/mK6jWf+QTef9cX/APQTXL+B/wDkLS/9cT/MUAdnRRRQAUUUUAFFFFAH/9b7LooooAKKKKACuBP/ACNX/b5/7PXfVwJ/5Gr/ALfP/Z6AO9paSloAjuZo7eB5pThEGSa851G6e9vJLl+rngeg7Ct/xpqOWXT4m6fNLj9B/X8q5mgBKKKO9AADzWzoumRvEdQ1A7LOPkA/8tP/AK1JoulxvE2oagQlnHyAf+Wn/wBaotVv59WukhhjIizthiX+dABql/catdJBDGRHnbDEv86vkweH7bHyy6jKv4Rj/P8An0UmDw/bEfLLqMq/hGP8/n/Ln5JHlkaSRi7scsx70AEkjySNLIxd2OWY961fCuo/Y78RSNiGY7T7Hsax6WgD1EGmyuscbSOwVVBJPoKy/DGofbrABzmaLCvk9fQ1k+MNU3MdPgY4X/WkevpQBla7qLajel84iTiMe3rWdS0lAEtrPJbXMdxC2HQ5HvXoWlXsd/ZpPGevDD0PevOK0/D2pHTr0FiTBJgOP60Ad/RTUYOoZSCCMg06gCprP/IJvP8Ari//AKCa5fwP/wAhaX/rif5iuo1n/kE3n/XF/wD0E1y/gf8A5C0v/XE/zFAHZ0UUUAFFFFABRRRQB//X+y6KKKACiiigArgT/wAjV/2+f+z131cCf+Rq/wC3z/2egDvarapeJY2Mlw/8I+UZ6nsKs1xni7UftN39ljb91Eecd2/z/WgDFnlknmeaRsu5JJqOigdeKAFrX0XS43iOoagQlnHyAf8Alp/9al0XTI3ibUNQISzj5Ab/AJaf/WqHVb+41a6SGGMrEDtiiX+dAC6rfT6tdJBChEWdsMS/zq+TB4ftj92XUZV/CMf5/P8AkhMPh+2x8suoyr+EY/z+f8sCSR5ZGlkYu7HLMe9ABJI8sjSSMXdjlmPemUUUAFLSUUAWtOvp7CZ5YD8zIVOenNVmJZixJJPUmkooAKKKKAClFJRQB1Pg/VOBp87Dj/VEn9K6jPFeYRs0bh0JDqQQR2Nd7oGpJqNkGJxKnEg/rQBY1n/kE3n/AFxf/wBBNcv4H/5C0v8A1xP8xXUaz/yCbz/ri/8A6Ca5fwP/AMhaX/rif5igDs6KKKACiiigAooooA//0PsuiiigAooooAK4E/8AI1f9vn/s9d8a89u5RB4hlnYEiO5LkDvhs0Adtq808Ni7W0TyTEbUCjkE964c6TqhJJspyTySVroB4stsY+xzf99Cj/hK7X/nzl/76FAHPnSdTx/x4z/981d0zRvL33eqr5NtFztbq5/wro7PVo5rF72SB7eBfutIcbvpXLatqFzq94IokYpnEca859zQAmq31xq12sEEZEQOIol/nWxBYzaPZeZBavc30oxlVyIxUVsbLw6i+epuL1wCyp/AP6VY/wCEstv+fSb/AL6FAGBLpmrSyNJJZ3DuxyzFetN/sjU/+fGf/vmug/4Su1/585f++hR/wldr/wA+cv8A30KAOf8A7I1P/nxn/wC+aP7I1P8A58Z/++a6D/hK7X/nzl/76FH/AAldr/z5y/8AfQoA5/8AsjU/+fGf/vmj+yNT/wCfGf8A75roP+Ertf8Anzl/76FH/CV2v/PnL/30KAOf/sjU/wDnxn/75o/sjU/+fGf/AL5roP8AhK7X/nzl/wC+hR/wldr/AM+cv/fQoA5/+yNT/wCfGf8A75o/sjU/+fGf/vmug/4Su1/585f++hR/wldr/wA+cv8A30KAOf8A7I1P/nxn/wC+aP7I1P8A58Z/++a6D/hK7X/nzl/76FH/AAldr/z5y/8AfQoA5/8AsjU/+fGf/vmrmkW+r6ferOllPtzh12n5hWp/wldr/wA+cv8A30KP+Ertf+fOX/voUAa+rNu0a6bBGYGOD1HymuZ8D/8AIWl/64n+YqzfeJre4spoBayqZI2UEkcZGKreB/8AkKyn/pif5igDs6KKKACiiigAooooA//R+y6KKKACiiigArHn8OadPO80nm73YscNjknNbFFAGJ/wjGmf9N/+/lRXGg6NZxG4nMnlpyQ0mQfatq7uIrWBppnCoozk1xGrajdaxeLFCh2E4jjHf3NACapfT6tdpBDGfKU4hjUfrXTeH9HTT4vNkw1yw5JH3fYUeHtHj0+LzZMNcMOSR932FbFAGNL4b0+WRpJXuHdjks0nJNN/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTP+m/8A38o/4RjTP+m//fytuigDE/4RjTPSf/v5VrTNGs9PnM1v5m4qVO5s8ZB/pWjRQAUUUUAFFFFABRRRQB//0vsuiiigAooooAKhu7mK1t2nmYKijkmpq5fxda6jNcReXukgYgBVHQ+9AGVq2oXOsXqxRK2zdiNB39zXS+H9Hj0+ISSYa4Ycn+77Cjw/o8enxebLhrhhySPu+wrYoAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/9P7LooooAKKKKACkxS0UAFFFFABRRTW6D6igB1FN7n8KQE+YRQA+iiigAopsnEZI64pR90UALRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//2Q==",sn={keywords:"",color:"",orientation:""};k.setDefaultIndicator(e(()=>e(re,{style:{fontSize:48,height:"100%"},spin:!0}),{}));const ln={hashed:!1,algorithm:A.defaultAlgorithm,token:{colorLink:"#1677ff",colorInfo:"#722ed1",colorTextBase:"#000000",colorBgLayout:"#f0f2f5",borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,colorDarken1:"rgba(0, 0, 0, 0.08)",colorFillSecondaryDarken:"rgba(0, 0, 0, 0.1)",formControlHeight:34,borderWidth:1,borderColorHover:"#C5C5C5",formItemMarginBottomMD:20,formItemMarginBottomXS:8,colorSecondaryH:265.03,colorSecondaryS:"63.92%",colorSecondaryL:"50%",colorSecondaryBgH:273,colorSecondaryBgS:"100%",colorSecondaryBgL:"93%",appZoom:1},components:{Progress:{colorFillSecondary:"#ffffff"},Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}},cn={hashed:!1,algorithm:A.darkAlgorithm,token:{colorBgBase:"#1F1F1F",colorInfo:"#9254de",colorLink:"#1890ff",colorLinkHover:"#69c0ff",wireframe:!1,borderRadiusXL:16,borderRadiusLG:12,borderRadius:8,borderRadiusSM:6,borderWidth:1,colorDarken1:"rgba(0, 0, 0, 0.9)",colorFillSecondaryDarken:"rgba(255, 255, 255, 0.16)",formControlHeight:34,borderColorHover:"rgba(255, 255, 255, 0.3)",formItemMarginBottomMD:20,formItemMarginBottomXS:8,appZoom:1},components:{Tabs:{titleFontSize:16,titleFontSizeSM:16,fontSize:16,fontSizeLG:16}}},un=({externalTheme:t=Qt,children:n,customThemeToken:r})=>{const i=matchMedia(nn).matches?en:Qt,s=t===tn?i:t,[l,c]=o(s),[u,d]=o("light"===l?ln:cn);return a(()=>{c(s)},[s]),a(()=>{const e="light"===l?ln:cn,t=r?Ht(e.token,r):e.token;d(Object.assign(Object.assign({},e),{token:t}))},[d,l,r]),e("div",{id:"file-manager-element-id",style:{height:"100%"},children:e(E,{theme:u,children:e(Ge,{transformers:[],children:e(I,{style:{height:"100%"},children:n})})})})},dn={fileManager:{locale:"en_US",mode:"fileManager",theme:"light",enabledTabs:["editor"]},imageCenter:{locale:"en_US",mode:"imageCenter",theme:"light",enabledTabs:["stock","gif","editor"]},plugin:{locale:"en_US",mode:"plugin",theme:"light",enabledTabs:["editor","stock","gif","ai"]}},hn=(e="fileManager",t)=>"imageCenter"===e&&t?t:Object.assign({},dn[e]);let fn=!1;const pn=()=>{if(fn)return;window.addEventListener("error",e=>!(!e.message||!e.message.includes("ResizeObserver loop completed with undelivered notifications"))&&(e.stopImmediatePropagation(),e.preventDefault(),!0),!0);const e=window.onerror;window.onerror=(t,n,r,i,o)=>!("string"!=typeof t||!t.includes("ResizeObserver loop completed with undelivered notifications"))||!!e&&e(t,n,r,i,o),window.addEventListener("unhandledrejection",e=>{var t,n;(null===(n=null===(t=e.reason)||void 0===t?void 0:t.message)||void 0===n?void 0:n.includes("ResizeObserver loop completed with undelivered notifications"))&&e.preventDefault()});const t=console.error;if(console.error=(...e)=>{var n;((null===(n=e[0])||void 0===n?void 0:n.toString())||"").includes("ResizeObserver loop completed with undelivered notifications")||t.apply(console,e)},"undefined"!=typeof window){const e=()=>{try{["webpackHotUpdate","__webpack_require__","__webpack_hash__"].forEach(e=>{if(window[e]){const e=window.__webpack_require__;e&&"object"==typeof e&&null!==e&&"cache"in e&&console.warn("✅ Webpack обнаружен, активирована дополнительная защита от ResizeObserver ошибок")}})}catch(e){console.warn("Ошибка при поиске webpack объектов:",e)}};e(),setTimeout(e,1e3)}fn=!0},gn=()=>{fn=!1},mn=(e,t="image/png")=>{let n=t;if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/);t&&t[1].startsWith("image/")&&(n=t[1])}return n=n.includes("jpeg")||n.includes("jpg")?"image/jpeg":n.includes("png")?"image/png":n.includes("gif")?"image/gif":"image/png",n},vn=e=>e.split("/")[1]||"png",yn=/^data:(.+?);base64,(.+)$/i,bn=e=>{const t=(e=>{if("function"!=typeof globalThis.atob)throw new Error("Base64 decoding is not supported in the current environment.");return globalThis.atob(e)})(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r},wn=(e,t)=>{const n=e.replace(/\s/g,""),r=bn(n),i=new ArrayBuffer(r.length);return new Uint8Array(i).set(r),new Blob([i],{type:t})},xn=(e,t="application/octet-stream")=>{if(e instanceof Blob)return e;if("string"==typeof e){const n=e.trim(),r=n.match(yn);if(r){const[,e,t]=r;return wn(t,e)}return wn(n,t)}throw new Error("Unsupported data type. Expected Blob or base64 string.")};var Cn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};const _n={},Sn=(e,t,n,r)=>{In(n)&&_n[n]||(In(n)&&(_n[n]=new Date),((e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);In(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)})(e,t,n,r))},kn=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},An=(e,t,n)=>{e.loadNamespaces(t,kn(e,n))},En=(e,t,n,r)=>{if(In(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return An(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,kn(e,r))},In=e=>"string"==typeof e,Tn=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,On={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Fn=e=>On[e];let Pn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(Tn,Fn)};let Mn;const Rn={type:"3rdParty",init(e){((e={})=>{Pn={...Pn,...e}})(e.options.react),(e=>{Mn=e})(e)}},Ln=s();class jn{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Dn=(e,t,n,r)=>e.getFixedT(t,n,r),Nn=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=l(Ln)||{},s=n||r||Mn;if(s&&!s.reportNamespaces&&(s.reportNamespaces=new jn),!s){Sn(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return In(t)?t:"object"==typeof(n=t)&&null!==n&&In(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e;var n},t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}s.options.react?.wait&&Sn(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const d={...Pn,...s.options.react,...t},{useSuspense:h,keyPrefix:f}=d;let p=i||s.options?.defaultNS;p=In(p)?[p]:p||["translation"],s.reportNamespaces.addUsedNamespaces?.(p);const g=(s.isInitialized||s.initializedStoreOnce)&&p.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):(Sn(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,s,d)),m=((e,t,n,r)=>c(Dn(e,t,n,r),[e,t,n,r]))(s,t.lng||null,"fallback"===d.nsMode?p:p[0],f),v=()=>m,y=()=>Dn(s,t.lng||null,"fallback"===d.nsMode?p:p[0],f),[b,w]=o(v);let x=p.join();t.lng&&(x=`${t.lng}${x}`);const C=((e,t)=>{const n=u();return a(()=>{n.current=e},[e,t]),n.current})(x),_=u(!0);a(()=>{const{bindI18n:e,bindI18nStore:n}=d;_.current=!0,g||h||(t.lng?En(s,t.lng,p,()=>{_.current&&w(y)}):An(s,p,()=>{_.current&&w(y)})),g&&C&&C!==x&&_.current&&w(y);const r=()=>{_.current&&w(y)};return e&&s?.on(e,r),n&&s?.store.on(n,r),()=>{_.current=!1,s&&e&&e?.split(" ").forEach(e=>s.off(e,r)),n&&s&&n.split(" ").forEach(e=>s.store.off(e,r))}},[s,x]),a(()=>{_.current&&g&&w(v)},[s,f,g]);const S=[b,s,g];if(S.t=b,S.i18n=s,S.ready=g,g)return S;if(!g&&!h)return S;throw new Promise(e=>{t.lng?En(s,t.lng,p,()=>e()):An(s,p,()=>e())})};function zn({i18n:e,defaultNS:t,children:n}){const r=d(()=>({i18n:e,defaultNS:t}),[e,t]);return h(Ln.Provider,{value:r},n)}const Bn=e=>"string"==typeof e,Vn=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Un=e=>null==e?"":""+e,$n=/###/g,Wn=e=>e&&e.indexOf("###")>-1?e.replace($n,"."):e,Hn=e=>!e||Bn(e),Gn=(e,t,n)=>{const r=Bn(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Hn(e))return{};const t=Wn(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Hn(e)?{}:{obj:e,k:Wn(r[i])}},Yn=(e,t,n)=>{const{obj:r,k:i}=Gn(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],a=t.slice(0,t.length-1),s=Gn(e,a,Object);for(;void 0===s.obj&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=Gn(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},qn=(e,t)=>{const{obj:n,k:r}=Gn(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Xn=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?Bn(e[r])||e[r]instanceof String||Bn(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Xn(e[r],t[r],n):e[r]=t[r]);return e},Kn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Zn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Jn=e=>Bn(e)?e.replace(/[&<>"'\/]/g,e=>Zn[e]):e;const Qn=[" ",",","?","!",";"],er=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),tr=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let i=e;for(let e=0;e<r.length;){if(!i||"object"!=typeof i)return;let t,o="";for(let a=e;a<r.length;++a)if(a!==e&&(o+=n),o+=r[a],t=i[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}i=t}return i},nr=e=>e?.replace("_","-"),rr={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class ir{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||rr,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(Bn(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ir(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new ir(this.logger,e)}}var or=new ir;class ar{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}}}class sr extends ar{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):Bn(n)&&i?a.push(...n.split(i)):a.push(n)));const s=qn(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&o&&Bn(n)?tr(this.data?.[e]?.[t],n,i):s}addResource(e,t,n,r,i={silent:!1}){const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Yn(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(Bn(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i,o={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=qn(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Xn(s,n,i):s={...s,...n},Yn(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var lr={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}};const cr=Symbol("i18next/PATH_KEY");function ur(e,t){const{[cr]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>(n?.revoke?.(),i===cr?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const dr={},hr=e=>!Bn(e)&&"boolean"!=typeof e&&"number"!=typeof e;class fr extends ar{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=or.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);return void 0!==r?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Qn.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const i=er.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Bn(i)?[i]:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return{key:e,namespaces:Bn(i)?[i]:i}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=ur(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const i=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1];let c=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const u=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return d?i?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${c}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;const h=this.resolve(e,r);let f=h?.res;const p=h?.usedKey||a,g=h?.exactUsedKey||a,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=void 0!==r.count&&!Bn(r.count),b=fr.hasDefaultValue(r),w=y?this.pluralResolver.getSuffix(u,r.count,r):"",x=r.ordinal&&y?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):"",C=y&&!r.ordinal&&0===r.count,_=C&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${w}`]||r[`defaultValue${x}`]||r.defaultValue;let S=f;v&&!f&&b&&(S=_);const k=hr(S),A=Object.prototype.toString.apply(S);if(!(v&&S&&k&&["[object Number]","[object Function]","[object RegExp]"].indexOf(A)<0)||Bn(m)&&Array.isArray(S))if(v&&Bn(m)&&Array.isArray(f))f=f.join(m),f&&(f=this.extendTranslation(f,e,r,n));else{let t=!1,i=!1;!this.isValidLookup(f)&&b&&(t=!0,f=_),this.isValidLookup(f)||(i=!0,f=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:f,d=b&&_!==f&&this.options.updateMissing;if(i||t||d){if(this.logger.log(d?"updateKey":"missingKey",u,l,a,d?_:f),o){const e=this.resolve(a,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const i=b&&n!==f?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,i,d,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,i,d,r),this.emit("missingKey",e,l,t,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);C&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||_)})}):n(e,a,_))}f=this.extendTranslation(f,e,r,h,n),i&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${c}${a}`),(i||t)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,t?f:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,S,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(h.res=e,h.usedParams=this.getUsedParamsDetails(r),h):e}if(o){const e=Array.isArray(S),t=e?[]:{},n=e?g:p;for(const e in S)if(Object.prototype.hasOwnProperty.call(S,e)){const i=`${n}${o}${e}`;t[e]=b&&!f?this.translate(i,{...r,defaultValue:hr(_)?_[e]:void 0,joinArrays:!1,ns:s}):this.translate(i,{...r,joinArrays:!1,ns:s}),t[e]===i&&(t[e]=S[e])}f=t}}return i?(h.res=f,h.usedParams=this.getUsedParamsDetails(r),h):f}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o=Bn(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&!Bn(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),o){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>i?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,a=Bn(o)?[o]:o;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=lr.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,o,a;return Bn(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const s=this.extractFromKey(e,t),l=s.key;r=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==t.count&&!Bn(t.count),d=u&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(Bn(t.context)||"number"==typeof t.context)&&""!==t.context,f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(n)||(a=e,dr[`${f[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(dr[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(r=>{if(this.isValidLookup(n))return;o=r;const a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&0===e.indexOf(i)&&a.push(l+e.replace(i,this.options.pluralSeparator)),a.push(l+e),d&&a.push(l+n)),h){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(r),u&&(t.ordinal&&0===e.indexOf(i)&&a.push(r+e.replace(i,this.options.pluralSeparator)),a.push(r+e),d&&a.push(r+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Bn(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class pr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=or.create("languageUtils")}getScriptPartFromCode(e){if(!(e=nr(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=nr(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Bn(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),Bn(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Bn(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):Bn(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}}const gr={zero:0,one:1,two:2,few:3,many:4,other:5},mr={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class vr{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=or.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=nr("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),mr;if(!e.match(/-|_/))return mr;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>gr[e]-gr[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const yr=(e,t,n,r=".",i=!0)=>{let o=((e,t,n)=>{const r=qn(e,n);return void 0!==r?r:qn(t,n)})(e,t,n);return!o&&i&&Bn(n)&&(o=tr(e,n,r),void 0===o&&(o=tr(t,n,r))),o},br=e=>e.replace(/\$/g,"$$$$");class wr{constructor(e={}){this.logger=or.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:f,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Jn,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?Kn(i):o||"{{",this.suffix=a?Kn(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Kn(d):h||Kn("$t("),this.nestingSuffix=f?Kn(f):p||Kn(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=yr(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(yr(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const c=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>br(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?br(this.escape(e)):br(e)}].forEach(t=>{for(a=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=l(n),void 0===o)if("function"==typeof c){const t=c(e,i,r);o=Bn(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(u){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else Bn(o)||this.useRawValueToEscape||(o=Un(o));const s=t.safeValue(o);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,o;const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);((a?.length??0)%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];o={...n},o=o.replace&&!Bn(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),i=t(a.call(this,r[1].trim(),o),o),i&&r[0]===e&&!Bn(i))return i;Bn(i)||(i=Un(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),i=""),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}}const xr=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(nr(r),i),t[a]=s),s(n)}},Cr=e=>(t,n,r)=>e(nr(n),r)(t);class _r{constructor(e={}){this.logger=or.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?xr:Cr;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=xr(t)}format(e,t,n,r={}){const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){const e=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}const o=i.reduce((e,t)=>{const{formatName:i,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{const a=r?.formatParams?.[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...o,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e);return o}}class Sr extends ar{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=or.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,r=!1,void 0===o[a]&&(o[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:i}=Gn(e,t,Object);r[i]=r[i]||[],r[i].push(n)})(n.loaded,[i],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*i,o)},i):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Bn(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Bn(t)&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,i,o={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const s={...o,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let i;i=5===l.length?l(e,t,n,r,s):l(e,t,n,r),i&&"function"==typeof i.then?i.then(e=>a(null,e)).catch(a):a(null,i)}catch(e){a(e)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const kr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),Bn(e[1])&&(t.defaultValue=e[1]),Bn(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Ar=e=>(Bn(e.ns)&&(e.ns=[e.ns]),Bn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Bn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),Er=()=>{};class Ir extends ar{constructor(e={},t){var n;if(super(),this.options=Ar(e),this.services={},this.logger=or,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(Bn(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=kr();this.options={...n,...this.options,...Ar(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?or.init(r(this.modules.logger),this.options):or.init(null,this.options),e=this.modules.formatter?this.modules.formatter:_r;const t=new pr(this.options);this.store=new sr(this.options.resources,this.options);const i=this.services;i.logger=or,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new vr(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new wr(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Sr(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new fr(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Er),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const i=Vn(),o=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),i}loadResources(e,t=Er){let n=t;const r=Bn(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===r?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=Vn();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Er),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&lr.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=Vn();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Bn(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Bn(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{i(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...i)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(i)):{...t},o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);const a=this.options.keySeparator||".";let s;return o.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=ur(e,{...this.options,...t})),`${o.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=ur(e,{...this.options,...t})),s=o.keyPrefix?`${o.keyPrefix}${a}${e}`:e),this.t(s,o)};return Bn(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=Vn();return this.options.ns?(Bn(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Vn();Bn(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new pr(kr());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new Ir(e,t)}cloneInstance(e={},t=Er){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new Ir(r);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));if(["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});i.store=new sr(e,r),i.services.resourceStore=i.store}return i.translator=new fr(i.services,r),i.translator.on("*",(e,...t)=>{i.emit(e,...t)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Tr=Ir.createInstance();Tr.createInstance=Ir.createInstance,Tr.createInstance,Tr.dir,Tr.init,Tr.loadResources,Tr.reloadResources,Tr.use,Tr.changeLanguage,Tr.getFixedT,Tr.t,Tr.exists,Tr.setDefaultNamespace,Tr.hasLoadedNamespace,Tr.loadNamespaces,Tr.loadLanguages;var Or,Fr,Pr,Mr,Rr,Lr={};function jr(){if(Fr)return Or;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}function n(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function r(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,o(e,t,"get"))}function i(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,o(e,t,"set"),n),n}function o(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function a(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}Fr=1;var s=function(t){if(!t)return[];Array.isArray(t)||(t=[t]);for(var n={},r=0;r<t.length;++r){var i,o=t[r];if(o&&"object"===e(o)&&(o=String(o)),"string"!=typeof o){var a="Locales should be strings, ".concat(JSON.stringify(o)," isn't.");throw new TypeError(a)}var s=o.split("-");if(!s.every(function(e){return/[a-z0-9]+/i.test(e)})){var l=JSON.stringify(o),c="The locale ".concat(l," is not a structurally valid BCP 47 language tag.");throw new RangeError(c)}var u=s[0].toLowerCase();s[0]=null!==(i={in:"id",iw:"he",ji:"yi"}[u])&&void 0!==i?i:u,n[s.join("-")]=!0}return Object.keys(n)};function l(t){switch(e(t)){case"number":return t;case"bigint":throw new TypeError("Cannot convert a BigInt value to a number");default:return Number(t)}}return Or=function(e,n,o,c){var u=function(e){do{if(n(e))return e;e=e.replace(/-?[^-]*$/,"")}while(e);return null},d=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=function(){function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),a(this,d,{writable:!0,value:void 0}),a(this,h,{writable:!0,value:void 0}),a(this,f,{writable:!0,value:void 0}),a(this,p,{writable:!0,value:void 0}),a(this,g,{writable:!0,value:void 0}),i(this,d,function(t){for(var n=s(t),r=0;r<n.length;++r){var i=u(n[r]);if(i)return i}var o=(new e).resolvedOptions().locale;return u(o)}(t)),i(this,f,n(r(this,d))),i(this,h,c(r(this,d))),i(this,p,function(e){var t=Object.prototype.hasOwnProperty.call(e,"type")&&e.type;if(!t)return"cardinal";if("cardinal"===t||"ordinal"===t)return t;throw new RangeError("Not a valid plural type: "+JSON.stringify(t))}(o)),i(this,g,new e("en",o))}var v,y,b;return v=m,b=[{key:"supportedLocalesOf",value:function(e){return s(e).filter(u)}}],(y=[{key:"resolvedOptions",value:function(){var e=r(this,g).resolvedOptions(),t=e.minimumIntegerDigits,n=e.minimumFractionDigits,i=e.maximumFractionDigits,a=e.minimumSignificantDigits,s=e.maximumSignificantDigits,l=e.roundingPriority,c={locale:r(this,d),type:r(this,p),minimumIntegerDigits:t,minimumFractionDigits:n,maximumFractionDigits:i};return"number"==typeof a&&(c.minimumSignificantDigits=a,c.maximumSignificantDigits=s),c.pluralCategories=o(r(this,d),"ordinal"===r(this,p)).slice(0),c.roundingPriority=l||"auto",c}},{key:"select",value:function(e){if(!(this instanceof m))throw new TypeError("select() called on incompatible ".concat(this));if("number"!=typeof e&&(e=Number(e)),!isFinite(e))return"other";var t=r(this,g).format(Math.abs(e));return r(this,f).call(this,t,"ordinal"===r(this,p))}},{key:"selectRange",value:function(e,t){if(!(this instanceof m))throw new TypeError("selectRange() called on incompatible ".concat(this));if(void 0===e)throw new TypeError("start is undefined");if(void 0===t)throw new TypeError("end is undefined");var n=l(e),i=l(t);if(!isFinite(n))throw new RangeError("start must be finite");if(!isFinite(i))throw new RangeError("end must be finite");return r(this,h).call(this,this.select(n),this.select(i))}}])&&t(v.prototype,y),b&&t(v,b),Object.defineProperty(v,"prototype",{writable:!1}),m}();return"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(m.prototype,Symbol.toStringTag,{value:"Intl.PluralRules",writable:!1,configurable:!0}),Object.defineProperty(m,"prototype",{writable:!1}),m},Or}!function(){if(Rr)return Lr;Rr=1;var e=function(){if(Mr)return Pr;function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}Mr=1;var n=e(jr());function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==Cn||"undefined"!=typeof self&&self;var i={exports:{}};!function(e){var t=function(e,t){return t?"other":1==e?"one":"other"},n=function(e,t){return t?"other":0==e||1==e?"one":"other"},r=function(e,t){return t?"other":e>=0&&e<=1?"one":"other"},i=function(e,t){var n=!String(e).split(".")[1];return t?"other":1==e&&n?"one":"other"},o=function(e,t){return"other"},a=function(e,t){return t?"other":1==e?"one":2==e?"two":"other"};!function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n}(0,{af:t,ak:n,am:r,an:t,ar:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ars:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":0==e?"zero":1==e?"one":2==e?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},as:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},asa:t,ast:i,az:function(e,t){var n=String(e).split(".")[0],r=n.slice(-1),i=n.slice(-2),o=n.slice(-3);return t?1==r||2==r||5==r||7==r||8==r||20==i||50==i||70==i||80==i?"one":3==r||4==r||100==o||200==o||300==o||400==o||500==o||600==o||700==o||800==o||900==o?"few":0==n||6==r||40==i||60==i||90==i?"many":"other":1==e?"one":"other"},bal:function(e,t){return 1==e?"one":"other"},be:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?2!=i&&3!=i||12==o||13==o?"other":"few":1==i&&11!=o?"one":i>=2&&i<=4&&(o<12||o>14)?"few":r&&0==i||i>=5&&i<=9||o>=11&&o<=14?"many":"other"},bem:t,bez:t,bg:t,bho:n,bm:o,bn:function(e,t){return t?1==e||5==e||7==e||8==e||9==e||10==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},bo:o,br:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2),a=r&&n[0].slice(-6);return t?"other":1==i&&11!=o&&71!=o&&91!=o?"one":2==i&&12!=o&&72!=o&&92!=o?"two":(3==i||4==i||9==i)&&(o<10||o>19)&&(o<70||o>79)&&(o<90||o>99)?"few":0!=e&&r&&0==a?"many":"other"},brx:t,bs:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},ca:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?1==e||3==e?"one":2==e?"two":4==e?"few":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},ce:t,ceb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},cgg:t,chr:t,ckb:t,cs:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},cy:function(e,t){return t?0==e||7==e||8==e||9==e?"zero":1==e?"one":2==e?"two":3==e||4==e?"few":5==e||6==e?"many":"other":0==e?"zero":1==e?"one":2==e?"two":3==e?"few":6==e?"many":"other"},da:function(e,t){var n=String(e).split("."),r=n[0],i=Number(n[0])==e;return t||1!=e&&(i||0!=r&&1!=r)?"other":"one"},de:i,doi:r,dsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},dv:t,dz:o,ee:t,el:t,en:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1==o&&11!=a?"one":2==o&&12!=a?"two":3==o&&13!=a?"few":"other":1==e&&r?"one":"other"},eo:t,es:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":1==e?"one":0!=r&&0==o&&i?"many":"other"},et:i,eu:t,fa:r,ff:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},fi:i,fil:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},fo:t,fr:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?1==e?"one":"other":e>=0&&e<2?"one":0!=r&&0==o&&i?"many":"other"},fur:t,fy:i,ga:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e?"one":"other":1==e?"one":2==e?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"},gd:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||11==e?"one":2==e||12==e?"two":3==e||13==e?"few":"other":1==e||11==e?"one":2==e||12==e?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"},gl:i,gsw:t,gu:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},guw:n,gv:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":!i||0!=a&&20!=a&&40!=a&&60!=a&&80!=a?i?"other":"many":"few"},ha:t,haw:t,he:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==r&&i||0==r&&!i?"one":2==r&&i?"two":"other"},hi:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":e>=0&&e<=1?"one":"other"},hnj:o,hr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},hsb:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-2),s=i.slice(-2);return t?"other":o&&1==a||1==s?"one":o&&2==a||2==s?"two":o&&(3==a||4==a)||3==s||4==s?"few":"other"},hu:function(e,t){return t?1==e||5==e?"one":"other":1==e?"one":"other"},hy:function(e,t){return t?1==e?"one":"other":e>=0&&e<2?"one":"other"},ia:i,id:o,ig:o,ii:o,io:i,is:function(e,t){var n=String(e).split("."),r=n[0],i=(n[1]||"").replace(/0+$/,""),o=Number(n[0])==e,a=r.slice(-1),s=r.slice(-2);return t?"other":o&&1==a&&11!=s||i%10==1&&i%100!=11?"one":"other"},it:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},iu:a,ja:o,jbo:o,jgo:t,jmc:t,jv:o,jw:o,ka:function(e,t){var n=String(e).split(".")[0],r=n.slice(-2);return t?1==n?"one":0==n||r>=2&&r<=20||40==r||60==r||80==r?"many":"other":1==e?"one":"other"},kab:function(e,t){return t?"other":e>=0&&e<2?"one":"other"},kaj:t,kcg:t,kde:o,kea:o,kk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1);return t?6==i||9==i||r&&0==i&&0!=e?"many":"other":1==e?"one":"other"},kkj:t,kl:t,km:o,kn:r,ko:o,ks:t,ksb:t,ksh:function(e,t){return t?"other":0==e?"zero":1==e?"one":"other"},ku:t,kw:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-2),o=r&&n[0].slice(-3),a=r&&n[0].slice(-5),s=r&&n[0].slice(-6);return t?r&&e>=1&&e<=4||i>=1&&i<=4||i>=21&&i<=24||i>=41&&i<=44||i>=61&&i<=64||i>=81&&i<=84?"one":5==e||5==i?"many":"other":0==e?"zero":1==e?"one":2==i||22==i||42==i||62==i||82==i||r&&0==o&&(a>=1e3&&a<=2e4||4e4==a||6e4==a||8e4==a)||0!=e&&1e5==s?"two":3==i||23==i||43==i||63==i||83==i?"few":1==e||1!=i&&21!=i&&41!=i&&61!=i&&81!=i?"other":"many"},ky:t,lag:function(e,t){var n=String(e).split(".")[0];return t?"other":0==e?"zero":0!=n&&1!=n||0==e?"other":"one"},lb:t,lg:t,lij:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e;return t?11==e||8==e||i&&e>=80&&e<=89||i&&e>=800&&e<=899?"many":"other":1==e&&r?"one":"other"},lkt:o,ln:n,lo:function(e,t){return t&&1==e?"one":"other"},lt:function(e,t){var n=String(e).split("."),r=n[1]||"",i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?"other":1==o&&(a<11||a>19)?"one":o>=2&&o<=9&&(a<11||a>19)?"few":0!=r?"many":"other"},lv:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&l>=11&&l<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=l||2!=i&&1==c?"one":"other"},mas:t,mg:n,mgo:t,mk:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?1==a&&11!=s?"one":2==a&&12!=s?"two":7!=a&&8!=a||17==s||18==s?"other":"many":o&&1==a&&11!=s||1==l&&11!=c?"one":"other"},ml:t,mn:t,mo:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},mr:function(e,t){return t?1==e?"one":2==e||3==e?"two":4==e?"few":"other":1==e?"one":"other"},ms:function(e,t){return t&&1==e?"one":"other"},mt:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-2);return t?"other":1==e?"one":2==e?"two":0==e||r>=3&&r<=10?"few":r>=11&&r<=19?"many":"other"},my:o,nah:t,naq:a,nb:t,nd:t,ne:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?"one":"other":1==e?"one":"other"},nl:i,nn:t,nnh:t,no:t,nqo:o,nr:t,nso:n,ny:t,nyn:t,om:t,or:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?1==e||5==e||r&&e>=7&&e<=9?"one":2==e||3==e?"two":4==e?"few":6==e?"many":"other":1==e?"one":"other"},os:t,osa:o,pa:n,pap:t,pcm:r,pl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":1==e&&i?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&1!=r&&(0==o||1==o)||i&&o>=5&&o<=9||i&&a>=12&&a<=14?"many":"other"},prg:function(e,t){var n=String(e).split("."),r=n[1]||"",i=r.length,o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return t?"other":o&&0==a||s>=11&&s<=19||2==i&&l>=11&&l<=19?"zero":1==a&&11!=s||2==i&&1==c&&11!=l||2!=i&&1==c?"one":"other"},ps:t,pt:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":0==r||1==r?"one":0!=r&&0==o&&i?"many":"other"},pt_PT:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},rm:t,ro:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e&&n[0].slice(-2);return t?1==e?"one":"other":1==e&&r?"one":!r||0==e||1!=e&&i>=1&&i<=19?"few":"other"},rof:t,ru:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-1),a=r.slice(-2);return t?"other":i&&1==o&&11!=a?"one":i&&o>=2&&o<=4&&(a<12||a>14)?"few":i&&0==o||i&&o>=5&&o<=9||i&&a>=11&&a<=14?"many":"other"},rwk:t,sah:o,saq:t,sat:a,sc:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},scn:function(e,t){var n=!String(e).split(".")[1];return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&n?"one":"other"},sd:t,sdh:t,se:a,seh:t,ses:o,sg:o,sh:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},shi:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"},si:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"";return t?"other":0==e||1==e||0==r&&1==i?"one":"other"},sk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1];return t?"other":1==e&&i?"one":r>=2&&r<=4&&i?"few":i?"other":"many"},sl:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-2);return t?"other":i&&1==o?"one":i&&2==o?"two":i&&(3==o||4==o)||!i?"few":"other"},sma:a,smi:a,smj:a,smn:a,sms:a,sn:t,so:t,sq:function(e,t){var n=String(e).split("."),r=Number(n[0])==e,i=r&&n[0].slice(-1),o=r&&n[0].slice(-2);return t?1==e?"one":4==i&&14!=o?"many":"other":1==e?"one":"other"},sr:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=r.slice(-2),l=i.slice(-1),c=i.slice(-2);return t?"other":o&&1==a&&11!=s||1==l&&11!=c?"one":o&&a>=2&&a<=4&&(s<12||s>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"},ss:t,ssy:t,st:t,su:o,sv:function(e,t){var n=String(e).split("."),r=!n[1],i=Number(n[0])==e,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return t?1!=o&&2!=o||11==a||12==a?"other":"one":1==e&&r?"one":"other"},sw:i,syr:t,ta:t,te:t,teo:t,th:o,ti:n,tig:t,tk:function(e,t){var n=String(e).split("."),r=Number(n[0])==e&&n[0].slice(-1);return t?6==r||9==r||10==e?"few":"other":1==e?"one":"other"},tl:function(e,t){var n=String(e).split("."),r=n[0],i=n[1]||"",o=!n[1],a=r.slice(-1),s=i.slice(-1);return t?1==e?"one":"other":o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=s&&6!=s&&9!=s?"one":"other"},tn:t,to:o,tpi:o,tr:t,ts:t,tzm:function(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":0==e||1==e||r&&e>=11&&e<=99?"one":"other"},ug:t,uk:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=Number(n[0])==e,a=o&&n[0].slice(-1),s=o&&n[0].slice(-2),l=r.slice(-1),c=r.slice(-2);return t?3==a&&13!=s?"few":"other":i&&1==l&&11!=c?"one":i&&l>=2&&l<=4&&(c<12||c>14)?"few":i&&0==l||i&&l>=5&&l<=9||i&&c>=11&&c<=14?"many":"other"},und:o,ur:i,uz:t,ve:t,vec:function(e,t){var n=String(e).split("."),r=n[0],i=!n[1],o=r.slice(-6);return t?11==e||8==e||80==e||800==e?"many":"other":1==e&&i?"one":0!=r&&0==o&&i?"many":"other"},vi:function(e,t){return t&&1==e?"one":"other"},vo:t,vun:t,wa:n,wae:t,wo:o,xh:t,xog:t,yi:i,yo:o,yue:o,zh:o,zu:r})}(i);var o=r(i.exports),a=t({__proto__:null,default:o},[i.exports]),s={exports:{}};!function(e){var t="zero",n="one",r="two",i="few",o="many",a="other",s={cardinal:[n,a],ordinal:[a]},l={cardinal:[n,a],ordinal:[n,a]},c={cardinal:[a],ordinal:[a]},u={cardinal:[n,r,a],ordinal:[a]};!function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n}(0,{af:s,ak:s,am:s,an:s,ar:{cardinal:[t,n,r,i,o,a],ordinal:[a]},ars:{cardinal:[t,n,r,i,o,a],ordinal:[a]},as:{cardinal:[n,a],ordinal:[n,r,i,o,a]},asa:s,ast:s,az:{cardinal:[n,a],ordinal:[n,i,o,a]},bal:l,be:{cardinal:[n,i,o,a],ordinal:[i,a]},bem:s,bez:s,bg:s,bho:s,bm:c,bn:{cardinal:[n,a],ordinal:[n,r,i,o,a]},bo:c,br:{cardinal:[n,r,i,o,a],ordinal:[a]},brx:s,bs:{cardinal:[n,i,a],ordinal:[a]},ca:{cardinal:[n,o,a],ordinal:[n,r,i,a]},ce:s,ceb:s,cgg:s,chr:s,ckb:s,cs:{cardinal:[n,i,o,a],ordinal:[a]},cy:{cardinal:[t,n,r,i,o,a],ordinal:[t,n,r,i,o,a]},da:s,de:s,doi:s,dsb:{cardinal:[n,r,i,a],ordinal:[a]},dv:s,dz:c,ee:s,el:s,en:{cardinal:[n,a],ordinal:[n,r,i,a]},eo:s,es:{cardinal:[n,o,a],ordinal:[a]},et:s,eu:s,fa:s,ff:s,fi:s,fil:l,fo:s,fr:{cardinal:[n,o,a],ordinal:[n,a]},fur:s,fy:s,ga:{cardinal:[n,r,i,o,a],ordinal:[n,a]},gd:{cardinal:[n,r,i,a],ordinal:[n,r,i,a]},gl:s,gsw:s,gu:{cardinal:[n,a],ordinal:[n,r,i,o,a]},guw:s,gv:{cardinal:[n,r,i,o,a],ordinal:[a]},ha:s,haw:s,he:u,hi:{cardinal:[n,a],ordinal:[n,r,i,o,a]},hnj:c,hr:{cardinal:[n,i,a],ordinal:[a]},hsb:{cardinal:[n,r,i,a],ordinal:[a]},hu:l,hy:l,ia:s,id:c,ig:c,ii:c,io:s,is:s,it:{cardinal:[n,o,a],ordinal:[o,a]},iu:u,ja:c,jbo:c,jgo:s,jmc:s,jv:c,jw:c,ka:{cardinal:[n,a],ordinal:[n,o,a]},kab:s,kaj:s,kcg:s,kde:c,kea:c,kk:{cardinal:[n,a],ordinal:[o,a]},kkj:s,kl:s,km:c,kn:s,ko:c,ks:s,ksb:s,ksh:{cardinal:[t,n,a],ordinal:[a]},ku:s,kw:{cardinal:[t,n,r,i,o,a],ordinal:[n,o,a]},ky:s,lag:{cardinal:[t,n,a],ordinal:[a]},lb:s,lg:s,lij:{cardinal:[n,a],ordinal:[o,a]},lkt:c,ln:s,lo:{cardinal:[a],ordinal:[n,a]},lt:{cardinal:[n,i,o,a],ordinal:[a]},lv:{cardinal:[t,n,a],ordinal:[a]},mas:s,mg:s,mgo:s,mk:{cardinal:[n,a],ordinal:[n,r,o,a]},ml:s,mn:s,mo:{cardinal:[n,i,a],ordinal:[n,a]},mr:{cardinal:[n,a],ordinal:[n,r,i,a]},ms:{cardinal:[a],ordinal:[n,a]},mt:{cardinal:[n,r,i,o,a],ordinal:[a]},my:c,nah:s,naq:u,nb:s,nd:s,ne:l,nl:s,nn:s,nnh:s,no:s,nqo:c,nr:s,nso:s,ny:s,nyn:s,om:s,or:{cardinal:[n,a],ordinal:[n,r,i,o,a]},os:s,osa:c,pa:s,pap:s,pcm:s,pl:{cardinal:[n,i,o,a],ordinal:[a]},prg:{cardinal:[t,n,a],ordinal:[a]},ps:s,pt:{cardinal:[n,o,a],ordinal:[a]},pt_PT:{cardinal:[n,o,a],ordinal:[a]},rm:s,ro:{cardinal:[n,i,a],ordinal:[n,a]},rof:s,ru:{cardinal:[n,i,o,a],ordinal:[a]},rwk:s,sah:c,saq:s,sat:u,sc:{cardinal:[n,a],ordinal:[o,a]},scn:{cardinal:[n,a],ordinal:[o,a]},sd:s,sdh:s,se:u,seh:s,ses:c,sg:c,sh:{cardinal:[n,i,a],ordinal:[a]},shi:{cardinal:[n,i,a],ordinal:[a]},si:s,sk:{cardinal:[n,i,o,a],ordinal:[a]},sl:{cardinal:[n,r,i,a],ordinal:[a]},sma:u,smi:u,smj:u,smn:u,sms:u,sn:s,so:s,sq:{cardinal:[n,a],ordinal:[n,o,a]},sr:{cardinal:[n,i,a],ordinal:[a]},ss:s,ssy:s,st:s,su:c,sv:l,sw:s,syr:s,ta:s,te:s,teo:s,th:c,ti:s,tig:s,tk:{cardinal:[n,a],ordinal:[i,a]},tl:l,tn:s,to:c,tpi:c,tr:s,ts:s,tzm:s,ug:s,uk:{cardinal:[n,i,o,a],ordinal:[i,a]},und:c,ur:s,uz:s,ve:s,vec:{cardinal:[n,o,a],ordinal:[o,a]},vi:{cardinal:[a],ordinal:[n,a]},vo:s,vun:s,wa:s,wae:s,wo:c,xh:s,xog:s,yi:s,yo:c,yue:c,zh:c,zu:s})}(s);var l=r(s.exports),c=t({__proto__:null,default:l},[s.exports]),u={exports:{}};!function(e){var t,n=function(e,t){return"other"},r=function(e,t){return"other"===e&&"one"===t?"one":"other"},i=function(e,t){return t||"other"};t={af:n,ak:r,am:i,an:n,ar:function(e,t){return"few"===t?"few":"many"===t?"many":"zero"===e&&"one"===t||"zero"===e&&"two"===t?"zero":"other"},as:i,az:i,be:i,bg:n,bn:i,bs:i,ca:n,cs:i,cy:i,da:i,de:i,el:i,en:n,es:n,et:n,eu:n,fa:r,fi:n,fil:i,fr:i,ga:i,gl:i,gsw:i,gu:i,he:n,hi:i,hr:i,hu:i,hy:i,ia:n,id:n,io:n,is:i,it:i,ja:n,ka:function(e,t){return e||"other"},kk:i,km:n,kn:i,ko:n,ky:i,lij:i,lo:n,lt:i,lv:function(e,t){return"one"===t?"one":"other"},mk:n,ml:i,mn:i,mr:i,ms:n,my:n,nb:n,ne:i,nl:i,no:n,or:r,pa:i,pcm:n,pl:i,ps:i,pt:i,ro:function(e,t){return"few"===t||"one"===t?"few":"other"},ru:i,sc:i,scn:i,sd:r,si:function(e,t){return"one"===e&&"one"===t?"one":"other"},sk:i,sl:function(e,t){return"few"===t||"one"===t?"few":"two"===t?"two":"other"},sq:i,sr:i,sv:n,sw:i,ta:i,te:i,th:n,tk:i,tr:i,ug:i,uk:i,ur:n,uz:i,vi:n,yue:n,zh:n,zu:i},Object.defineProperty(t,"__esModule",{value:!0}),e.exports=t}(u);var d=r(u.exports),h=o||a,f=l||c,p=d||t({__proto__:null,default:d},[u.exports]),g=function(e){return"pt-PT"===e?"pt_PT":e},m=n.default(Intl.NumberFormat,function(e){return h[g(e)]},function(e,t){return f[g(e)][t?"ordinal":"cardinal"]},function(e){return p[g(e)]});return Pr=m}();function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);if("undefined"==typeof Intl)void 0!==Cn?Cn.Intl={PluralRules:n.default}:"undefined"!=typeof window?window.Intl={PluralRules:n.default}:Lr.Intl={PluralRules:n.default},n.default.polyfill=!0;else if(Intl.PluralRules&&Intl.PluralRules.prototype.selectRange){var r=["en","es","ru","zh"];Intl.PluralRules.supportedLocalesOf(r).length<r.length&&(Intl.PluralRules=n.default,n.default.polyfill=!0)}else Intl.PluralRules=n.default,n.default.polyfill=!0}();var Dr={Folder:"Folder",Folders:"Folders",Files:"Files",File:"File","Select the destination folder":"Select the destination folder","Filter by type":"Filter by type","All types":"All types","File name":"File name",Size:"Size",Date:"Date",Actions:"Actions",Delete:"Delete",Move:"Move",Copy:"Copy","Add folder":"Add folder","Add file":"Add file","Add file by URL":"Add file by URL","Please select an image file":"Please select an image file","File deleted":"File deleted","Error when deleting a file":"Error when deleting a file","Folder deleted":"Folder deleted","Error when deleting a folder":"Error when deleting a folder","Delete folder":"Delete folder","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Are you sure you want to delete this folder? This action will also delete all files and subfolders.","File moved":"File moved","Error when moving a file":"Error when moving a file","has been successfully uploaded":"has been successfully uploaded","Failed to download file":"Failed to download file","Failed to load JSON data":"Failed to load JSON data","Invalid file URL":"Invalid file URL","Unable to validate file URL":"Unable to validate file URL","Error when uploading a file":"Error when uploading a file","successfully uploaded":"successfully uploaded","Error when downloading a file by URL":"Error when downloading a file by URL","Error loading files":"Error loading files","File Manager not configured":"File Manager not configured","Type to search...":"Type to search...","Failed to create folder":"Failed to create folder",Cancel:"Cancel",Submit:"Submit",months:{january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},files:"files","No available folders":"No available folders","My files":"My files",GIF:"GIF","Stock images":"Stock images",AI:"AI","AI image generation":"AI image generation","Search GIFs":"Search GIFs","That`s all we could find.":"That`s all we could find.","Search image":"Search image",All:"All",Landscape:"Landscape",Portrait:"Portrait",Squarish:"Squarish",Black:"Black","Black and White":"Black and White",White:"White",Orange:"Orange",Red:"Red",Purple:"Purple",Magenta:"Magenta",Green:"Green",Teal:"Teal",Blue:"Blue","Photo by":"Photo by",on:"on",selected:"selected",Deselected:"Deselected",Rename:"Rename","Rename file":"Rename file {{currentFileName}}","Selected files":"Selected files: {{count}}",selected_files_one:"Selected {{count}} file",selected_files_other:"Selected {{count}} files",Edit:"Edit","Move to":"Move to","New folder":"New folder","Image search...":"Image search...","By name":"By name","By size":"By size","By date":"By date",List:"List",Grid:"Grid",Main:"Main","total pages":"Total {{total}} items",Name:"Name",Untitled:"Untitled",Dimensions:"Dimensions",error:"error",created:"created","API-endpoint for file upload is not configured":"API-endpoint for file upload is not configured","The URL must point to an image":"The URL must point to an image","Image upload...":"Image upload...",Unknown:"Unknown","Error downloading file by URL":"Error downloading file by URL","File not found":"File not found","File renamed to":"File renamed to ","Failed to rename the file":"Failed to rename the file","Folder renamed to":"Folder renamed to","Rename folder":"Rename folder","New folder name":"New folder name","Enter a new folder name":"Enter a new folder name","Please drag and drop image files only":"Please drag and drop image files only","Upload file by URL":"Upload file by URL","Upload file":"Upload file","Creating a new folder":"Creating a new folder",Create:"Create","Folder name":"Folder name","Enter the name of the folder":"Enter the name of the folder","A folder will be created inside:":"A folder will be created inside:","selected folder":"selected folder","The folder will be created in the root directory":"The folder will be created in the root directory","Failed to load folders":"Failed to load folders","Folder name cannot be empty":"Folder name cannot be empty","Folder creation provider is not configured":"Folder creation provider is not configured","Folder created":"Folder created","Folder rename is disabled by config":"Folder rename is disabled by config","Folder rename provider is not configured":"Folder rename provider is not configured","Unexpected response when renaming folder":"Unexpected response when renaming folder","Folder renamed":"Folder renamed","Failed to rename folder":"Failed to rename folder","Failed to load folder items count":"Failed to load folder items count","Failed to load subfolders":"Failed to load subfolders",Download:"Download","image URL":"image URL","Enter the URL of the image":"Enter the URL of the image","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"New file name","Enter a new file name":"Enter a new file name","Copy to folder":"Copy to folder",Added:"Added {{date}}","File uploaded successfully":"File {{fileName}} uploaded successfully","Successfully uploaded":"Successfully uploaded {{successCount}} of {{count}} file","Successfully uploaded files":"Successfully uploaded {{successCount}} of {{count}} files",Uploaded:"Uploaded: {{names}}",uploads_success_summary:"Uploaded {{successCount}} of {{totalCount}} files",Failed:"Failed: {{names}}",uploads_fail_summary:"Failed to upload {{failCount}} of {{totalCount}} files","File with this name already exists.":"File with this name already exists.","File not found or no longer available.":"File not found or no longer available.","You don't have permission to access this file.":"You don't have permission to access this file.","File is too large to upload.":"File is too large to upload.","This file type is not allowed.":"This file type is not allowed.","File name is not valid.":"File name is not valid.","Failed to read the file.":"Failed to read the file.","Failed to write the file.":"Failed to write the file.","The file appears to be corrupted.":"The file appears to be corrupted.","File integrity check failed.":"File integrity check failed.","Folder not found or no longer available.":"Folder not found or no longer available.","Folder with this name already exists.":"Folder with this name already exists.","You don't have permission to access this folder.":"You don't have permission to access this folder.","Folder name is not valid.":"Folder name is not valid.","Failed to read the folder contents.":"Failed to read the folder contents.","Failed to write to the folder.":"Failed to write to the folder.","Folder storage quota exceeded.":"Folder storage quota exceeded.","Folder is not empty.":"Folder is not empty.","Server error while processing the folder.":"Server error while processing the folder.","Folder operation took too long.":"Folder operation took too long.","Network error. Please check your connection and try again.":"Network error. Please check your connection and try again.","The operation took too long. Please try again.":"The operation took too long. Please try again.","Server error. Please try again later.":"Server error. Please try again later.","Service is temporarily unavailable. Please try again later.":"Service is temporarily unavailable. Please try again later.","Too many requests. Please try again a bit later.":"Too many requests. Please try again a bit later.","Authentication failed. Please sign in again.":"Authentication failed. Please sign in again.","You are not allowed to perform this action.":"You are not allowed to perform this action.","Some of the provided data is invalid.":"Some of the provided data is invalid.","This operation is not supported.":"This operation is not supported.","Request payload is too large.":"Request payload is too large.","This media type is not supported.":"This media type is not supported.","You have exceeded the upload quota.":"You have exceeded the upload quota.","Network error while uploading the file.":"Network error while uploading the file.","File upload took too long.":"File upload took too long.","Server error while uploading the file.":"Server error while uploading the file.","The specified URL is not valid.":"The specified URL is not valid.","The specified URL is not reachable.":"The specified URL is not reachable.","Content type at the URL is not allowed.":"Content type at the URL is not allowed.","Failed to download file from the URL.":"Failed to download file from the URL.","Network error while downloading the file.":"Network error while downloading the file.","File download took too long.":"File download took too long.","Server error while downloading the file.":"Server error while downloading the file.","Some items could not be processed.":"Some items could not be processed.","Failed to process all items in the batch.":"Failed to process all items in the batch.","Some items in the batch are in a conflicting state.":"Some items in the batch are in a conflicting state.","Some items in the batch did not pass validation.":"Some items in the batch did not pass validation.","AI service returned an invalid response.":"AI service returned an invalid response.","Failed to generate image using AI.":"Failed to generate image using AI.","You have reached the AI image generation limit.":"You have reached the AI image generation limit.","Error in external integration.":"Error in external integration.","Error in a third-party service.":"Error in a third-party service.","An unknown error occurred.":"An unknown error occurred.","Renaming is not allowed for this item.":"Renaming is not allowed for this item.","Moving is not allowed for this item.":"Moving is not allowed for this item.","Copying is not allowed for this item.":"Copying is not allowed for this item.","Deleting is not allowed for this item.":"Deleting is not allowed for this item.","Cannot move an item into itself.":"Cannot move an item into itself.","Cannot move an item into its descendant folder.":"Cannot move an item into its descendant folder.","Configuration error occurred.":"Configuration error occurred.",Moved:"Moved: {{names}}",move_success_summary:"Moved {{successCount}} of {{totalCount}} items",move_fail_summary:"Failed to move {{failCount}} of {{totalCount}} items",Copied:"Copied: {{names}}",copy_success_summary:"Copied {{successCount}} of {{totalCount}} items",copy_fail_summary:"Failed to copy {{failCount}} of {{totalCount}} items","Failed to upload":"Failed to upload {{failCount}} of {{count}} file","Failed to upload files":"Failed to upload {{failCount}} of {{count}} files","No folders yet":"No folders yet","Drag files to upload":"Drag files to upload","Drop files here to upload":"Drop files here to upload","Newest first":"Newest first","Oldest first":"Oldest first","Largest first":"Largest first","Smallest first":"Smallest first","A-Z":"A-Z","Z-A":"Z-A","By type":"By type","Evaluating the task":"Evaluating the task","Something went wrong, please try again":"Something went wrong, please try again","Sort by":"Sort by","preview text":"The image preview is trying to load ...","Use this variant":"Use this variant","Confirm deletion":"Confirm deletion","Are you sure you want to delete the selected items?":"Are you sure you want to delete the selected items?","Move to Trash":"Move to Trash","Are you sure you want to move the selected items to the Trash?":"Are you sure you want to move the selected items to the Trash?","Permanently delete":"Permanently delete","Delete permanently":"Delete permanently","Are you sure you want to permanently delete the selected items? This action cannot be undone.":"Are you sure you want to permanently delete the selected items? This action cannot be undone.",delete_files_permanent_one:"This action will permanently delete {{count}} file",delete_files_permanent_other:"This action will permanently delete {{count}} files",delete_folder_permanent:"This action will permanently delete the folder '{{name}}' and all its contents, including {{count}} items.",delete_mixed_permanent:"This action will permanently delete {{total}} selected items, including {{folders}} folders and all {{images}} images within them.",move_files_to_trash_one:"This will move {{count}} file to the Trash.",move_files_to_trash_other:"This will move {{count}} files to the Trash.",move_folder_to_trash:"This will move the folder '{{name}}' and all its contents ({{count}} items) to the Trash.",move_mixed_to_trash:"This will move {{total}} selected items to the Trash, including {{folders}} folders and {{images}} images.",delete_count_confirm_trash_one:"Move {{count}} file to Trash?",delete_count_confirm_trash_other:"Move {{count}} files to Trash?",delete_count_confirm_permanent_one:"Permanently delete {{count}} file?",delete_count_confirm_permanent_other:"Permanently delete {{count}} files?",delete_count_confirm_one:"Delete {{count}} file?",delete_count_confirm_other:"Delete {{count}} files?",item:"item",items:"items",Trash:"Deleted",Choose:"Choose",Stock:"Stock","Select an image from our library":"Select an image from our library","AI generation":"AI generation","Creating an image on demand":"Creating an image on demand","Search file or folder":"Search file or folder","Select a file or drag and drop it here":"Select a file or drag and drop it here","Supported files:":"Supported files:","Create folder":"Create folder",Done:"Done","Move here":"Move here","Copy here":"Copy here","File URL":"File URL","There are no files for your request.":"There are no files for your request.","Millions of free stock images":"Millions of free stock images","Enter a search query and we'll find the perfect image for you":"Enter a search query and we'll find the perfect image for you","Enter your query and we will find the right one for you":"Enter your query and we will find the right one for you","Over 350,000 live images":"Over 350,000 live images","The folder will be created in the root directory.":"The folder will be created in the root directory.",undo:"UNDO",moved_to_trash_one:"Moved {{count}} item to Trash",moved_to_trash_other:"Moved {{count}} items to Trash",restored_items_one:"Restored {{count}} item",restored_items_other:"Restored {{count}} items",Type:"Type","Generate image":"Generate image"},Nr={Files:"Файлы",selected:"выбрано",Deselected:"Отменить выбор",Rename:"Переименовать","Rename file":"Переименовать файл {{currentFileName}}","Select the destination folder":"Выберите папку назначения","Selected files:":"Выбрано файлов:","Selected files":"Выбрано файлов: {{count}}",selected_files_one:"Выбран {{count}} файл",selected_files_few:"Выбрано {{count}} файла",selected_files_many:"Выбрано {{count}} файлов",selected_files_other:"Выбрано {{count}} файлов",Copy:"Дублировать",Edit:"Изменить","Move to":"Переместить",Delete:"Удалить","New folder":"Новая папка","Image search...":"Поиск изображений...","By name":"По имени","By size":"По размеру","By date":"По дате",List:"Список",Grid:"Плитки",Main:"Главная",Folders:"Папки","total pages":"Всего {{total}} элементов",Name:"Имя",Untitled:"Без названия",Size:"Объём",Dimensions:"Размер",Date:"Дата",error:"ошибка",Folder:"Папка",created:"создана","Failed to create folder":"Не удалось создать папку","File deleted":"Файл удален","Error when deleting a file":"Ошибка при удалении файла","Folder deleted":"Папка удалена","Error when deleting a folder":"Ошибка при удалении папки","Delete folder":"Удалить папку","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Вы уверены, что хотите удалить эту папку? Это действие также удалит все файлы и подпапки.","API-endpoint for file upload is not configured":"API-endpoint для загрузки файлов не настроен","Please select an image file":"Пожалуйста, выберите файл изображения",File:"Файл","has been successfully uploaded":"успешно загружен","The URL must point to an image":"URL должен указывать на изображение","Image upload...":"Загрузка изображения...",Unknown:"Неизвестно","Error downloading file by URL":"Ошибка загрузки файла по URL","successfully uploaded":"успешно загружен","Error when downloading a file by URL":"Ошибка при загрузке файла по URL","File not found":"Файл не найден","File renamed to":"Файл переименован на ","Failed to rename the file":"Не удалось переименовать файл","Folder renamed to":"Папка переименована на","Rename folder":"Переименовать папку","New folder name":"Новое название папки","Enter a new folder name":"Введите новое название папки","Please drag and drop image files only":"Пожалуйста, перетащите только файлы изображений","Upload file by URL":"Загрузить файл по URL","Upload file":"Загрузить файл","Creating a new folder":"Создание новой папки",Create:"Создать",Cancel:"Отмена","Folder name":"Название папки","Enter the name of the folder":"Введите название папки","A folder will be created inside:":"Папка будет создана внутри:","selected folder":"выбранной папки","The folder will be created in the root directory":"Папка будет создана в корневом каталоге","Failed to load folders":"Не удалось загрузить папки","Folder name cannot be empty":"Название папки не может быть пустым","Folder creation provider is not configured":"Провайдер создания папок не настроен","Folder created":"Папка создана","Folder rename is disabled by config":"Переименование папок отключено конфигурацией","Folder rename provider is not configured":"Провайдер переименования папок не настроен","Unexpected response when renaming folder":"Неожиданный ответ при переименовании папки","Folder renamed":"Папка переименована","Failed to rename folder":"Не удалось переименовать папку","Failed to load folder items count":"Не удалось получить количество файлов в папке","Failed to load subfolders":"Не удалось загрузить подпапки",Download:"Загрузить","image URL":"URL изображения","Enter the URL of the image":"Введите URL изображения","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Поддерживаемые форматы: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"Новое имя файла","Enter a new file name":"Введите новое имя файла","Copy to folder":"Копировать в папку",Added:"Добавлено {{date}}","File uploaded successfully":"Файл успешно загружен","Successfully uploaded":"Успешно загружено {{successCount}} из {{count}} файла","Successfully uploaded files":"Успешно загружено {{successCount}} из {{count}} файлов",uploads_success_summary:"Загружено {{successCount}} из {{totalCount}} файлов",uploads_fail_summary:"Не удалось загрузить {{failCount}} из {{totalCount}} файлов","File with this name already exists.":"Файл с таким именем уже существует.","File not found or no longer available.":"Файл не найден или уже был удалён.","You don't have permission to access this file.":"У вас нет прав доступа к этому файлу.","File is too large to upload.":"Файл слишком большой для загрузки.","This file type is not allowed.":"Этот тип файла не поддерживается.","File name is not valid.":"Недопустимое имя файла.","Failed to read the file.":"Не удалось прочитать файл.","Failed to write the file.":"Не удалось записать файл.","The file appears to be corrupted.":"Файл повреждён или имеет неверный формат.","File integrity check failed.":"Проверка целостности файла завершилась неудачно.","Folder not found or no longer available.":"Папка не найдена или уже была удалена.","Folder with this name already exists.":"Папка с таким именем уже существует.","You don't have permission to access this folder.":"У вас нет прав доступа к этой папке.","Folder name is not valid.":"Недопустимое имя папки.","Failed to read the folder contents.":"Не удалось прочитать содержимое папки.","Failed to write to the folder.":"Не удалось выполнить операцию с папкой.","Folder storage quota exceeded.":"Превышена квота хранения для папки.","Folder is not empty.":"Папка не пуста.","Server error while processing the folder.":"Ошибка сервера при обработке папки.","Folder operation took too long.":"Операция с папкой выполнялась слишком долго.","Network error. Please check your connection and try again.":"Ошибка сети. Проверьте подключение к интернету и повторите попытку.","The operation took too long. Please try again.":"Операция выполнялась слишком долго. Попробуйте ещё раз.","Server error. Please try again later.":"Ошибка на сервере. Повторите попытку позже.","Service is temporarily unavailable. Please try again later.":"Сервис временно недоступен. Повторите попытку позже.","Too many requests. Please try again a bit later.":"Слишком много запросов. Попробуйте ещё раз немного позже.","Authentication failed. Please sign in again.":"Не удалось пройти аутентификацию. Пожалуйста, войдите снова.","You are not allowed to perform this action.":"У вас нет прав для выполнения этого действия.","Some of the provided data is invalid.":"Некоторые из переданных данных некорректны.","This operation is not supported.":"Эта операция не поддерживается.","Request payload is too large.":"Тело запроса слишком большое.","This media type is not supported.":"Этот тип данных не поддерживается.","You have exceeded the upload quota.":"Превышена квота на загрузку файлов.","Network error while uploading the file.":"Сетевая ошибка при загрузке файла.","File upload took too long.":"Загрузка файла выполнялась слишком долго.","Server error while uploading the file.":"Ошибка сервера при загрузке файла.","The specified URL is not valid.":"Указан некорректный URL.","The specified URL is not reachable.":"Указанный URL недоступен.","Content type at the URL is not allowed.":"Тип содержимого по указанному URL не поддерживается.","Failed to download file from the URL.":"Не удалось скачать файл по указанному URL.","Network error while downloading the file.":"Сетевая ошибка при скачивании файла.","File download took too long.":"Скачивание файла выполнялось слишком долго.","Server error while downloading the file.":"Ошибка сервера при скачивании файла.","Some items could not be processed.":"Не все элементы были обработаны успешно.","Failed to process all items in the batch.":"Не удалось обработать ни один элемент в пакетной операции.","Some items in the batch are in a conflicting state.":"Некоторые элементы в пакетной операции находятся в конфликтующем состоянии.","Some items in the batch did not pass validation.":"Некоторые элементы в пакетной операции не прошли валидацию.","AI service returned an invalid response.":"Сервис AI вернул некорректный ответ.","Failed to generate image using AI.":"Не удалось создать изображение с помощью AI.","You have reached the AI image generation limit.":"Достигнут лимит генерации изображений AI.","Error in external integration.":"Ошибка во внешней интеграции.","Error in a third-party service.":"Ошибка во внешнем сервисе.","An unknown error occurred.":"Произошла неизвестная ошибка.","Renaming is not allowed for this item.":"Переименование не разрешено для этого элемента.","Moving is not allowed for this item.":"Перемещение не разрешено для этого элемента.","Copying is not allowed for this item.":"Копирование не разрешено для этого элемента.","Deleting is not allowed for this item.":"Удаление не разрешено для этого элемента.","Cannot move an item into itself.":"Нельзя переместить элемент в самого себя.","Cannot move an item into its descendant folder.":"Нельзя переместить элемент в дочернюю папку.","Configuration error occurred.":"Произошла ошибка конфигурации.",Moved:"Перемещены: {{names}}",move_success_summary:"Перемещено {{successCount}} из {{totalCount}} объектов",move_fail_summary:"Не удалось переместить {{failCount}} из {{totalCount}} объектов",Copied:"Скопированы: {{names}}",copy_success_summary:"Скопировано {{successCount}} из {{totalCount}} объектов",copy_fail_summary:"Не удалось скопировать {{failCount}} из {{totalCount}} объектов",Uploaded:"Загружены: {{names}}",Failed:"Не удалось: {{names}}","Failed to upload":"Не удалось загрузить {{failCount}} из {{count}} файла","Failed to upload files":"Не удалось загрузить {{failCount}} из {{count}} файлов",months:{january:"января",february:"февраля",march:"марта",april:"апреля",may:"мая",june:"июня",july:"июля",august:"августа",september:"сентября",october:"октября",november:"ноября",december:"декабря"},files:"файлов","No available folders":"Нет доступных папок","My files":"Мои файлы",GIF:"GIF","Stock images":"Стоковые изображения",AI:"AI","AI image generation":"AI генерация изображений","Search GIFs":"Найти GIF","That`s all we could find.":"Это все, что мы смогли найти.","Search image":"Найти изображение",All:"Все",Landscape:"Горизонтальные",Portrait:"Вертикальные",Squarish:"Квадратные",Black:"Черный","Black and White":"Черно-белый",White:"Белый",Orange:"Оранжевый",Red:"Красный",Purple:"Фиолетовый",Magenta:"Пурпурный",Green:"Зеленый",Teal:"Бирюзовый",Blue:"Синий","Photo by":"Фото",on:"на","File Manager":"Файловый менеджер","File Manager not configured":"Файловый менеджер не настроен","Filter by type":"Фильтр по типу","All types":"Все типы","File name":"Имя файла",Actions:"Действия","Add file":"Добавить файл","Add folder":"Добавить папку","Add file by URL":"Добавить файл по URL","File moved":"Файл перемещён","Error when moving a file":"Ошибка при перемещении файла","Failed to download file":"Не удалось скачать файл","Failed to load JSON data":"Не удалось загрузить данные JSON","Invalid file URL":"Некорректный URL файла","Unable to validate file URL":"Не удалось проверить файл по URL","Type to search...":"Введите для поиска...",Submit:"Отправить","No folders yet":"Папок пока нет","Drag files to upload":"Перетащите файлы для загрузки","Drop files here to upload":"Отпустите файлы здесь, чтобы загрузить их","Newest first":"Сначала новые","Oldest first":"Сначала старые","Largest first":"Сначала большие","Smallest first":"Сначала маленькие","A-Z":"По алфавиту А-Я","Z-A":"По алфавиту Я-А","By type":"По типу","Evaluating the task":"Оценка задания","Something went wrong, please try again":"Что-то пошло не так, пожалуйста, попробуйте еще раз","Sort by":"Сортировать по","preview text":"Изображение загружается ...","Use this variant":"Использовать этот вариант","Confirm deletion":"Подтвердить удаление","Are you sure you want to delete the selected items?":"Вы уверены, что хотите удалить выбранные элементы?","Move to Trash":"Переместить в корзину","Are you sure you want to move the selected items to the Trash?":"Вы уверены, что хотите переместить выбранные элементы в корзину?","Permanently delete":"Полное удаление","Delete permanently":"Удалить безвозвратно","Are you sure you want to permanently delete the selected items? This action cannot be undone.":"Вы уверены, что хотите безвозвратно удалить выбранные элементы? Это действие нельзя отменить.",delete_files_permanent_one:"Это действие безвозвратно удалит {{count}} файл",delete_files_permanent_few:"Это действие безвозвратно удалит {{count}} файла",delete_files_permanent_many:"Это действие безвозвратно удалит {{count}} файлов",delete_files_permanent_other:"Это действие безвозвратно удалит {{count}} файлов",delete_folder_permanent:"Это действие безвозвратно удалит папку «{{name}}» и всё её содержимое, включая {{count}} элементов.",delete_mixed_permanent:"Это действие безвозвратно удалит {{total}} выбранных элементов, включая {{folders}} папок и все {{images}} изображений внутри них.",move_files_to_trash_one:"Это действие переместит в корзину {{count}} файл.",move_files_to_trash_few:"Это действие переместит в корзину {{count}} файла.",move_files_to_trash_many:"Это действие переместит в корзину {{count}} файлов.",move_files_to_trash_other:"Это действие переместит в корзину {{count}} файлов.",move_folder_to_trash:"Это действие переместит в корзину папку «{{name}}» и всё её содержимое ({{count}} элементов).",move_mixed_to_trash:"Это действие переместит в корзину {{total}} выбранных элементов, включая {{folders}} папок и {{images}} изображений.",delete_count_confirm_trash_one:"Переместить в корзину {{count}} файл?",delete_count_confirm_trash_few:"Переместить в корзину {{count}} файла?",delete_count_confirm_trash_many:"Переместить в корзину {{count}} файлов?",delete_count_confirm_trash_other:"Переместить в корзину {{count}} файлов?",delete_count_confirm_permanent_one:"Удалить навсегда {{count}} файл?",delete_count_confirm_permanent_few:"Удалить навсегда {{count}} файла?",delete_count_confirm_permanent_many:"Удалить навсегда {{count}} файлов?",delete_count_confirm_permanent_other:"Удалить навсегда {{count}} файлов?",delete_count_confirm_one:"Удалить {{count}} файл?",delete_count_confirm_few:"Удалить {{count}} файла?",delete_count_confirm_many:"Удалить {{count}} файлов?",delete_count_confirm_other:"Удалить {{count}} файлов?",item:"файл",items:"файлов",Trash:"Удаленные",Choose:"Выбрать",Stock:"Фотосток","Select an image from our library":"Выберите изображение из нашей библиотеки","AI generation":"AI генерация","Creating an image on demand":"Создание изображения по запросу","Search file or folder":"Найти файл или папку","Select a file or drag and drop it here":"Выберите файл или перетащите его сюда","Supported files:":"Поддерживаемые файлы:","Create folder":"Создать папку",Done:"Готово","Move here":"Переместить сюда","Copy here":"Копировать сюда","File URL":"URL файла","There are no files for your request.":"Файлов по вашему запросу нет.","Millions of free stock images":"Миллионы бесплатных стоковых изображений","Enter a search query and we'll find the perfect image for you":"Введите поисковый запрос, и мы найдем для вас идеальное изображение","Enter your query and we will find the right one for you":"Введите запрос и мы найдем для вас подходящее","Over 350,000 live images":"Более 350 000 живых изображений","The folder will be created in the root directory.":"Папка будет создана в корневом каталоге.",undo:"ОТМЕНА",moved_to_trash_one:"Перемещён {{count}} элемент в корзину",moved_to_trash_few:"Перемещено {{count}} элемента в корзину",moved_to_trash_many:"Перемещено {{count}} элементов в корзину",moved_to_trash_other:"Перемещено {{count}} элементов в корзину",restored_items_one:"Восстановлён {{count}} элемент",restored_items_few:"Восстановлено {{count}} элемента",restored_items_many:"Восстановлено {{count}} элементов",restored_items_other:"Восстановлено {{count}} элементов",Type:"Тип","Generate image":"Cгенерировать изображение"};const zr={en:{translation:Dr},ru:{translation:Nr},es:{translation:{Files:"Archivos",selected:"seleccionado(s)",Deselected:"Deseleccionar",Rename:"Renombrar","Rename file":"Renombrar archivo {{currentFileName}}","Select the destination folder":"Seleccionar la carpeta de destino","Selected files:":"Archivos seleccionados:","Selected files":"Archivos seleccionados: {{count}}",selected_files_one:"{{count}} archivo seleccionado",selected_files_few:"{{count}} archivos seleccionados",selected_files_many:"{{count}} archivos seleccionados",selected_files_other:"{{count}} archivos seleccionados",Copy:"Duplicar",Edit:"Editar","Move to":"Mover a",Delete:"Eliminar","New folder":"Nueva carpeta","Image search...":"Búsqueda de imágenes...","By name":"Por nombre","By size":"Por tamaño","By date":"Por fecha",List:"Lista",Grid:"Cuadrícula",Main:"Principal",Folders:"Carpetas","total pages":"{{total}} elementos en total",Name:"Nombre",Untitled:"Sin título",Size:"Tamaño",Dimensions:"Dimensiones",Date:"Fecha",error:"error",Folder:"Carpeta",created:"creada","Failed to create folder":"Error al crear la carpeta","File deleted":"Archivo eliminado","Error when deleting a file":"Error al eliminar el archivo","Folder deleted":"Carpeta eliminada","Error when deleting a folder":"Error al eliminar la carpeta","Delete folder":"Eliminar carpeta","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"¿Está seguro de que desea eliminar esta carpeta? Esta acción también eliminará todos los archivos y subcarpetas.","API-endpoint for file upload is not configured":"El endpoint API para la carga de archivos no está configurado","Please select an image file":"Por favor, seleccione un archivo de imagen",File:"Archivo","has been successfully uploaded":"se ha cargado exitosamente","The URL must point to an image":"La URL debe apuntar a una imagen","Image upload...":"Cargando imagen...",Unknown:"Desconocido","Error downloading file by URL":"Error al descargar el archivo por URL","successfully uploaded":"cargado exitosamente","Error when downloading a file by URL":"Error al descargar un archivo por URL","File not found":"Archivo no encontrado","File renamed to":"Archivo renombrado a","Failed to rename the file":"Error al renombrar el archivo","Folder renamed to":"Carpeta renombrada a","Rename folder":"Renombrar carpeta","New folder name":"Nuevo nombre de la carpeta","Enter a new folder name":"Ingrese un nuevo nombre para la carpeta","Please drag and drop image files only":"Por favor, arrastre y suelte solo archivos de imagen","Upload file by URL":"Cargar archivo por URL","Upload file":"Cargar archivo","Creating a new folder":"Creando una nueva carpeta",Create:"Crear",Cancel:"Cancelar","Folder name":"Nombre de la carpeta","Enter the name of the folder":"Ingrese el nombre de la carpeta","A folder will be created inside:":"La carpeta se creará dentro de:","selected folder":"carpeta seleccionada","The folder will be created in the root directory":"La carpeta se creará en el directorio raíz","Failed to load folders":"No se pudieron cargar las carpetas","Folder name cannot be empty":"El nombre de la carpeta no puede estar vacío","Folder creation provider is not configured":"El proveedor de creación de carpetas no está configurado","Folder created":"Carpeta creada","Folder rename is disabled by config":"El renombrado de carpetas está deshabilitado por la configuración","Folder rename provider is not configured":"El proveedor para renombrar carpetas no está configurado","Unexpected response when renaming folder":"Respuesta inesperada al renombrar la carpeta","Folder renamed":"Carpeta renombrada","Failed to rename folder":"No se pudo renombrar la carpeta","Failed to load folder items count":"No se pudo obtener la cantidad de elementos de la carpeta","Failed to load subfolders":"No se pudieron cargar las subcarpetas",Download:"Descargar","image URL":"URL de la imagen","Enter the URL of the image":"Ingrese la URL de la imagen","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Formatos admitidos: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"Nuevo nombre del archivo","Enter a new file name":"Ingrese un nuevo nombre para el archivo","Copy to folder":"Copiar a carpeta",Added:"Añadido el {{date}}","File uploaded successfully":"Archivo cargado exitosamente","Successfully uploaded":"{{successCount}} de {{count}} archivo cargado exitosamente","Successfully uploaded files":"{{successCount}} de {{count}} archivos cargados exitosamente",uploads_success_summary:"Se cargaron {{successCount}} de {{totalCount}} archivos",uploads_fail_summary:"No se pudieron cargar {{failCount}} de {{totalCount}} archivos","File with this name already exists.":"Ya existe un archivo con este nombre.","File not found or no longer available.":"El archivo no se encontró o ya fue eliminado.","You don't have permission to access this file.":"No tiene permisos para acceder a este archivo.","File is too large to upload.":"El archivo es demasiado grande para subir.","This file type is not allowed.":"Este tipo de archivo no está permitido.","File name is not valid.":"El nombre del archivo no es válido.","Failed to read the file.":"No se pudo leer el archivo.","Failed to write the file.":"No se pudo escribir el archivo.","The file appears to be corrupted.":"El archivo parece estar dañado.","File integrity check failed.":"La verificación de integridad del archivo falló.","Folder not found or no longer available.":"La carpeta no se encontró o ya fue eliminada.","Folder with this name already exists.":"Ya existe una carpeta con este nombre.","You don't have permission to access this folder.":"No tiene permisos para acceder a esta carpeta.","Folder name is not valid.":"El nombre de la carpeta no es válido.","Failed to read the folder contents.":"No se pudo leer el contenido de la carpeta.","Failed to write to the folder.":"No se pudo escribir en la carpeta.","Folder storage quota exceeded.":"Se superó la cuota de almacenamiento de la carpeta.","Folder is not empty.":"La carpeta no está vacía.","Server error while processing the folder.":"Error del servidor al procesar la carpeta.","Folder operation took too long.":"La operación con la carpeta tardó demasiado.","Network error. Please check your connection and try again.":"Error de red. Compruebe su conexión e inténtelo de nuevo.","The operation took too long. Please try again.":"La operación tardó demasiado. Inténtelo de nuevo.","Server error. Please try again later.":"Error del servidor. Inténtelo de nuevo más tarde.","Service is temporarily unavailable. Please try again later.":"El servicio no está disponible temporalmente. Inténtelo de nuevo más tarde.","Too many requests. Please try again a bit later.":"Demasiadas solicitudes. Inténtelo de nuevo más tarde.","Authentication failed. Please sign in again.":"Error de autenticación. Inicie sesión de nuevo.","You are not allowed to perform this action.":"No tiene permisos para realizar esta acción.","Some of the provided data is invalid.":"Algunos de los datos proporcionados no son válidos.","This operation is not supported.":"Esta operación no está soportada.","Request payload is too large.":"El cuerpo de la solicitud es demasiado grande.","This media type is not supported.":"Este tipo de contenido no está soportado.","You have exceeded the upload quota.":"Se ha superado la cuota de subida de archivos.","Network error while uploading the file.":"Error de red al subir el archivo.","File upload took too long.":"La subida del archivo tardó demasiado.","Server error while uploading the file.":"Error del servidor al subir el archivo.","The specified URL is not valid.":"La URL especificada no es válida.","The specified URL is not reachable.":"La URL especificada no es accesible.","Content type at the URL is not allowed.":"El tipo de contenido en la URL no está permitido.","Failed to download file from the URL.":"No se pudo descargar el archivo desde la URL.","Network error while downloading the file.":"Error de red al descargar el archivo.","File download took too long.":"La descarga del archivo tardó demasiado.","Server error while downloading the file.":"Error del servidor al descargar el archivo.","Some items could not be processed.":"No todos los elementos se procesaron correctamente.","Failed to process all items in the batch.":"No se pudo procesar ningún elemento del lote.","Some items in the batch are in a conflicting state.":"Algunos elementos del lote están en estado de conflicto.","Some items in the batch did not pass validation.":"Algunos elementos del lote no pasaron la validación.","AI service returned an invalid response.":"El servicio de IA devolvió una respuesta no válida.","Failed to generate image using AI.":"No se pudo generar la imagen usando IA.","You have reached the AI image generation limit.":"Se alcanzó el límite de generación de imágenes con IA.","Error in external integration.":"Error en la integración externa.","Error in a third-party service.":"Error en un servicio de terceros.","An unknown error occurred.":"Se ha producido un error desconocido.","Renaming is not allowed for this item.":"No se permite renombrar este elemento.","Moving is not allowed for this item.":"No se permite mover este elemento.","Copying is not allowed for this item.":"No se permite copiar este elemento.","Deleting is not allowed for this item.":"No se permite eliminar este elemento.","Cannot move an item into itself.":"No se puede mover un elemento dentro de sí mismo.","Cannot move an item into its descendant folder.":"No se puede mover un elemento a su carpeta descendiente.","Configuration error occurred.":"Se produjo un error de configuración.",Moved:"Movidos: {{names}}",move_success_summary:"Se movieron {{successCount}} de {{totalCount}} elementos",move_fail_summary:"No se pudieron mover {{failCount}} de {{totalCount}} elementos",Copied:"Copiados: {{names}}",copy_success_summary:"Se copiaron {{successCount}} de {{totalCount}} elementos",copy_fail_summary:"No se pudieron copiar {{failCount}} de {{totalCount}} elementos",Uploaded:"Archivos cargados: {{names}}",Failed:"No se pudieron cargar: {{names}}","Failed to upload":"Error al cargar {{failCount}} de {{count}} archivo","Failed to upload files":"Error al cargar {{failCount}} de {{count}} archivos",months:{january:"enero",february:"febrero",march:"marzo",april:"abril",may:"mayo",june:"junio",july:"julio",august:"agosto",september:"septiembre",october:"octubre",november:"noviembre",december:"diciembre"},files:"archivos","No available folders":"No hay carpetas disponibles","My files":"Mis archivos",GIF:"GIF","Stock images":"Imágenes de stock",AI:"IA","AI image generation":"Generación de imágenes con IA","Search GIFs":"Buscar GIFs","That`s all we could find.":"Es todo lo que pudimos encontrar.","Search image":"Buscar imagen",All:"Todos",Landscape:"Horizontal",Portrait:"Vertical",Squarish:"Cuadrado",Black:"Negro","Black and White":"Blanco y negro",White:"Blanco",Orange:"Naranja",Red:"Rojo",Purple:"Morado",Magenta:"Magenta",Green:"Verde",Teal:"Verde azulado",Blue:"Azul","Photo by":"Foto de",on:"en","File Manager":"Administrador de archivos","File Manager not configured":"Administrador de archivos no configurado","Filter by type":"Filtrar por tipo","All types":"Todos los tipos","File name":"Nombre del archivo",Actions:"Acciones","Add file":"Añadir archivo","Add folder":"Añadir carpeta","Add file by URL":"Añadir archivo por URL","File moved":"Archivo movido","Error when moving a file":"Error al mover el archivo","Failed to download file":"No se pudo descargar el archivo","Failed to load JSON data":"No se pudieron cargar los datos JSON","Invalid file URL":"URL de archivo inválida","Unable to validate file URL":"No se pudo validar la URL del archivo","Type to search...":"Escriba para buscar...",Submit:"Enviar","No folders yet":"Aún no hay carpetas","Drag files to upload":"Arrastre archivos para cargarlos","Drop files here to upload":"Suelte los archivos aquí para cargarlos","Newest first":"Los más nuevos primero","Oldest first":"Los más antiguos primero","Largest first":"Los más grandes primero","Smallest first":"Los más pequeños primero","A-Z":"A-Z","Z-A":"Z-A","By type":"Por tipo","Evaluating the task":"Evaluando la tarea","Something went wrong, please try again":"Algo salió mal, por favor intente nuevamente","Sort by":"Ordenar por","preview text":"Cargando imagen...","Use this variant":"Usar esta variante","Confirm deletion":"Confirmar eliminación","Are you sure you want to delete the selected items?":"¿Está seguro de que desea eliminar los elementos seleccionados?","Move to Trash":"Mover a la papelera","Are you sure you want to move the selected items to the Trash?":"¿Está seguro de que desea mover los elementos seleccionados a la papelera?","Permanently delete":"Eliminación permanente","Delete permanently":"Eliminar permanentemente","Are you sure you want to permanently delete the selected items? This action cannot be undone.":"¿Está seguro de que desea eliminar permanentemente los elementos seleccionados? Esta acción no se puede deshacer.",delete_files_permanent_one:"Esta acción eliminará permanentemente {{count}} archivo",delete_files_permanent_few:"Esta acción eliminará permanentemente {{count}} archivos",delete_files_permanent_many:"Esta acción eliminará permanentemente {{count}} archivos",delete_files_permanent_other:"Esta acción eliminará permanentemente {{count}} archivos",delete_folder_permanent:"Esta acción eliminará permanentemente la carpeta «{{name}}» y todo su contenido, incluyendo {{count}} elementos.",delete_mixed_permanent:"Esta acción eliminará permanentemente {{total}} elementos seleccionados, incluyendo {{folders}} carpetas y todas las {{images}} imágenes dentro de ellas.",move_files_to_trash_one:"Esta acción moverá {{count}} archivo a la papelera.",move_files_to_trash_few:"Esta acción moverá {{count}} archivos a la papelera.",move_files_to_trash_many:"Esta acción moverá {{count}} archivos a la papelera.",move_files_to_trash_other:"Esta acción moverá {{count}} archivos a la papelera.",move_folder_to_trash:"Esta acción moverá la carpeta «{{name}}» y todo su contenido ({{count}} elementos) a la papelera.",move_mixed_to_trash:"Esta acción moverá {{total}} elementos seleccionados a la papelera, incluyendo {{folders}} carpetas y {{images}} imágenes.",delete_count_confirm_trash_one:"¿Mover {{count}} archivo a la papelera?",delete_count_confirm_trash_few:"¿Mover {{count}} archivos a la papelera?",delete_count_confirm_trash_many:"¿Mover {{count}} archivos a la papelera?",delete_count_confirm_trash_other:"¿Mover {{count}} archivos a la papelera?",delete_count_confirm_permanent_one:"¿Eliminar permanentemente {{count}} archivo?",delete_count_confirm_permanent_few:"¿Eliminar permanentemente {{count}} archivos?",delete_count_confirm_permanent_many:"¿Eliminar permanentemente {{count}} archivos?",delete_count_confirm_permanent_other:"¿Eliminar permanentemente {{count}} archivos?",delete_count_confirm_one:"¿Eliminar {{count}} archivo?",delete_count_confirm_few:"¿Eliminar {{count}} archivos?",delete_count_confirm_many:"¿Eliminar {{count}} archivos?",delete_count_confirm_other:"¿Eliminar {{count}} archivos?",item:"archivo",items:"archivos",Trash:"Papelera",Choose:"Elegir",Stock:"Banco de imágenes","Select an image from our library":"Seleccione una imagen de nuestra biblioteca","AI generation":"Generación con IA","Creating an image on demand":"Creando una imagen bajo demanda","Search file or folder":"Buscar archivo o carpeta","Select a file or drag and drop it here":"Seleccione un archivo o arrástrelo y suéltelo aquí","Supported files:":"Archivos admitidos:","Create folder":"Crear carpeta",Done:"Hecho","Move here":"Mover aquí","Copy here":"Copiar aquí","File URL":"URL del archivo","There are no files for your request.":"No hay archivos para su solicitud.","Millions of free stock images":"Millones de imágenes de stock gratuitas","Enter a search query and we'll find the perfect image for you":"Ingrese una consulta de búsqueda y encontraremos la imagen perfecta para usted","Enter your query and we will find the right one for you":"Ingrese su consulta y nosotros encontraremos la adecuada para usted","Over 350,000 live images":"Más de 350,000 imágenes en vivo","The folder will be created in the root directory.":"La carpeta se creará en el directorio raíz.",undo:"DESHACER",moved_to_trash_one:"{{count}} elemento movido a la papelera",moved_to_trash_few:"{{count}} elementos movidos a la papelera",moved_to_trash_many:"{{count}} elementos movidos a la papelera",moved_to_trash_other:"{{count}} elementos movidos a la papelera",restored_items_one:"{{count}} elemento restaurado",restored_items_few:"{{count}} elementos restaurados",restored_items_many:"{{count}} elementos restaurados",restored_items_other:"{{count}} elementos restaurados",Type:"Tipo","Generate image":"Generar imagen"}},uk:{translation:{Files:"Файли",selected:"обрано",Deselected:"Скасувати вибір",Rename:"Перейменувати","Rename file":"Перейменувати файл {{currentFileName}}","Select the destination folder":"Виберіть папку призначення","Selected files:":"Обрано файлів:","Selected files":"Обрано файлів: {{count}}",selected_files_one:"Обрано {{count}} файл",selected_files_few:"Обрано {{count}} файли",selected_files_many:"Обрано {{count}} файлів",selected_files_other:"Обрано {{count}} файлів",Copy:"Дублювати",Edit:"Змінити","Move to":"Перемістити",Delete:"Видалити","New folder":"Нова папка","Image search...":"Пошук зображень...","By name":"За назвою","By size":"За розміром","By date":"За датою",List:"Список",Grid:"Плитки",Main:"Головна",Folders:"Папки","total pages":"Всього {{total}} елементів",Name:"Назва",Untitled:"Без назви",Size:"Об'єм",Dimensions:"Розмір",Date:"Дата",error:"помилка",Folder:"Папка",created:"створена","Failed to create folder":"Не вдалося створити папку","File deleted":"Файл видалено","Error when deleting a file":"Помилка при видаленні файлу","Folder deleted":"Папку видалено","Error when deleting a folder":"Помилка при видаленні папки","Delete folder":"Видалити папку","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Ви впевнені, що хочете видалити цю папку? Ця дія також видалить усі файли та підпапки.","API-endpoint for file upload is not configured":"API-endpoint для завантаження файлів не налаштовано","Please select an image file":"Будь ласка, виберіть файл зображення",File:"Файл","has been successfully uploaded":"успішно завантажено","The URL must point to an image":"URL повинен вказувати на зображення","Image upload...":"Завантаження зображення...",Unknown:"Невідомо","Error downloading file by URL":"Помилка завантаження файлу за URL","successfully uploaded":"успішно завантажено","Error when downloading a file by URL":"Помилка при завантаженні файлу за URL","File not found":"Файл не знайдено","File renamed to":"Файл перейменовано на ","Failed to rename the file":"Не вдалося перейменувати файл","Folder renamed to":"Папку перейменовано на","Rename folder":"Перейменувати папку","New folder name":"Нова назва папки","Enter a new folder name":"Введіть нову назву папки","Please drag and drop image files only":"Будь ласка, перетягуйте лише файли зображень","Upload file by URL":"Завантажити файл за URL","Upload file":"Завантажити файл","Creating a new folder":"Створення нової папки",Create:"Створити",Cancel:"Скасувати","Folder name":"Назва папки","Enter the name of the folder":"Введіть назву папки","A folder will be created inside:":"Папка буде створена всередині:","selected folder":"обраної папки","The folder will be created in the root directory":"Папка буде створена в кореневому каталозі","Failed to load folders":"Не вдалося завантажити папки","Folder name cannot be empty":"Назва папки не може бути порожньою","Folder creation provider is not configured":"Постачальник створення папок не налаштований","Folder created":"Папку створено","Folder rename is disabled by config":"Перейменування папок вимкнено в налаштуваннях","Folder rename provider is not configured":"Постачальник перейменування папок не налаштований","Unexpected response when renaming folder":"Неочікувана відповідь під час перейменування папки","Folder renamed":"Папку перейменовано","Failed to rename folder":"Не вдалося перейменувати папку","Failed to load folder items count":"Не вдалося отримати кількість елементів у папці","Failed to load subfolders":"Не вдалося завантажити підпапки",Download:"Завантажити","image URL":"URL зображення","Enter the URL of the image":"Введіть URL зображення","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Підтримувані формати: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"Нова назва файлу","Enter a new file name":"Введіть нову назву файлу","Copy to folder":"Копіювати в папку",Added:"Додано {{date}}","File uploaded successfully":"Файл {{fileName}} успішно завантажено","Successfully uploaded":"Успішно завантажено {{successCount}} з {{count}} файлу","Successfully uploaded files":"Успішно завантажено {{successCount}} з {{count}} файлів",uploads_success_summary:"Завантажено {{successCount}} з {{totalCount}} файлів",uploads_fail_summary:"Не вдалося завантажити {{failCount}} з {{totalCount}} файлів","File with this name already exists.":"Файл з такою назвою вже існує.","File not found or no longer available.":"Файл не знайдено або його вже видалено.","You don't have permission to access this file.":"У вас немає прав доступу до цього файлу.","File is too large to upload.":"Файл занадто великий для завантаження.","This file type is not allowed.":"Цей тип файлу не підтримується.","File name is not valid.":"Неприпустима назва файлу.","Failed to read the file.":"Не вдалося прочитати файл.","Failed to write the file.":"Не вдалося записати файл.","The file appears to be corrupted.":"Файл пошкоджений або має неправильний формат.","File integrity check failed.":"Перевірка цілісності файлу завершилась невдало.","Folder not found or no longer available.":"Папку не знайдено або її вже видалено.","Folder with this name already exists.":"Папка з такою назвою вже існує.","You don't have permission to access this folder.":"У вас немає прав доступу до цієї папки.","Folder name is not valid.":"Неприпустима назва папки.","Failed to read the folder contents.":"Не вдалося прочитати вміст папки.","Failed to write to the folder.":"Не вдалося виконати операцію з папкою.","Folder storage quota exceeded.":"Перевищено квоту зберігання для папки.","Folder is not empty.":"Папка не порожня.","Server error while processing the folder.":"Помилка сервера під час обробки папки.","Folder operation took too long.":"Операція з папкою зайняла надто багато часу.","Network error. Please check your connection and try again.":"Помилка мережі. Перевірте підключення до інтернету та повторіть спробу.","The operation took too long. Please try again.":"Операція виконувалася надто довго. Спробуйте ще раз.","Server error. Please try again later.":"Помилка на сервері. Повторіть спробу пізніше.","Service is temporarily unavailable. Please try again later.":"Сервіс тимчасово недоступний. Повторіть спробу пізніше.","Too many requests. Please try again a bit later.":"Занадто багато запитів. Спробуйте ще раз пізніше.","Authentication failed. Please sign in again.":"Не вдалося пройти автентифікацію. Будь ласка, увійдіть знову.","You are not allowed to perform this action.":"У вас немає прав для виконання цієї дії.","Some of the provided data is invalid.":"Деякі з переданих даних є некоректними.","This operation is not supported.":"Ця операція не підтримується.","Request payload is too large.":"Тіло запиту занадто велике.","This media type is not supported.":"Цей тип даних не підтримується.","You have exceeded the upload quota.":"Перевищено квоту на завантаження файлів.","Network error while uploading the file.":"Помилка мережі під час завантаження файлу.","File upload took too long.":"Завантаження файлу тривало надто довго.","Server error while uploading the file.":"Помилка сервера під час завантаження файлу.","The specified URL is not valid.":"Вказано некоректну URL-адресу.","The specified URL is not reachable.":"Вказана URL-адреса недоступна.","Content type at the URL is not allowed.":"Тип вмісту за вказаною URL-адресою не підтримується.","Failed to download file from the URL.":"Не вдалося завантажити файл за вказаною URL-адресою.","Network error while downloading the file.":"Помилка мережі під час завантаження файлу.","File download took too long.":"Завантаження файлу тривало надто довго.","Server error while downloading the file.":"Помилка сервера під час завантаження файлу.","Some items could not be processed.":"Не всі елементи були оброблені успішно.","Failed to process all items in the batch.":"Не вдалося обробити жоден елемент у пакетній операції.","Some items in the batch are in a conflicting state.":"Деякі елементи в пакетній операції перебувають у конфліктному стані.","Some items in the batch did not pass validation.":"Деякі елементи в пакетній операції не пройшли валідацію.","AI service returned an invalid response.":"Сервіс ШІ повернув некоректну відповідь.","Failed to generate image using AI.":"Не вдалося створити зображення за допомогою ШІ.","You have reached the AI image generation limit.":"Досягнуто ліміту генерації зображень ШІ.","Error in external integration.":"Помилка у зовнішній інтеграції.","Error in a third-party service.":"Помилка у зовнішньому сервісі.","An unknown error occurred.":"Сталася невідома помилка.","Renaming is not allowed for this item.":"Перейменування не дозволено для цього елемента.","Moving is not allowed for this item.":"Переміщення не дозволено для цього елемента.","Copying is not allowed for this item.":"Копіювання не дозволено для цього елемента.","Deleting is not allowed for this item.":"Видалення не дозволено для цього елемента.","Cannot move an item into itself.":"Не можна перемістити елемент у самого себе.","Cannot move an item into its descendant folder.":"Не можна перемістити елемент у дочірню папку.","Configuration error occurred.":"Сталася помилка конфігурації.",Moved:"Переміщено: {{names}}",move_success_summary:"Переміщено {{successCount}} з {{totalCount}} елементів",move_fail_summary:"Не вдалося перемістити {{failCount}} з {{totalCount}} елементів",Copied:"Скопійовано: {{names}}",copy_success_summary:"Скопійовано {{successCount}} з {{totalCount}} елементів",copy_fail_summary:"Не вдалося скопіювати {{failCount}} з {{totalCount}} елементів",Uploaded:"Завантажено: {{names}}",Failed:"Не вдалося завантажити: {{names}}","Failed to upload":"Не вдалося завантажити {{failCount}} з {{count}} файлу","Failed to upload files":"Не вдалося завантажити {{failCount}} з {{count}} файлів",months:{january:"січня",february:"лютого",march:"березня",april:"квітня",may:"травня",june:"червня",july:"липня",august:"серпня",september:"вересня",october:"жовтня",november:"листопада",december:"грудня"},files:"файлів","No available folders":"Немає доступних папок","My files":"Мої файли",GIF:"GIF","Stock images":"Стокові зображення",AI:"AI","AI image generation":"AI генерація зображень","Search GIFs":"Знайти GIF","That`s all we could find.":"Це все, що ми змогли знайти.","Search image":"Знайти зображення",All:"Всі",Landscape:"Горизонтальні",Portrait:"Вертикальні",Squarish:"Квадратні",Black:"Чорний","Black and White":"Чорно-білий",White:"Білий",Orange:"Помаранчевий",Red:"Червоний",Purple:"Фіолетовий",Magenta:"Пурпурний",Green:"Зелений",Teal:"Бірюзовий",Blue:"Синій","Photo by":"Фото",on:"на","File Manager":"Файловий менеджер","File Manager not configured":"Файловий менеджер не налаштовано","Filter by type":"Фільтр за типом","All types":"Всі типи","File name":"Назва файлу",Actions:"Дії","Add file":"Додати файл","Add folder":"Додати папку","Add file by URL":"Додати файл за URL","File moved":"Файл переміщено","Error when moving a file":"Помилка при переміщенні файлу","Failed to download file":"Не вдалося завантажити файл","Failed to load JSON data":"Не вдалося завантажити дані JSON","Invalid file URL":"Некоректний URL файлу","Unable to validate file URL":"Не вдалося перевірити файл за URL","Type to search...":"Введіть для пошуку...",Submit:"Надіслати","No folders yet":"Папок поки немає","Drag files to upload":"Перетягніть файли для завантаження","Drop files here to upload":"Відпустіть файли тут, щоб завантажити їх","Newest first":"Спочатку нові","Oldest first":"Спочатку старі","Largest first":"Спочатку великі","Smallest first":"Спочатку маленькі","A-Z":"За алфавітом А-Я","Z-A":"За алфавітом Я-А","By type":"За типом","Evaluating the task":"Оцінка завдання","Something went wrong, please try again":"Щось пішло не так, будь ласка, спробуйте ще раз","Sort by":"Сортувати за","preview text":"Зображення завантажується ...","Use this variant":"Використати цей варіант","Confirm deletion":"Підтвердити видалення","Are you sure you want to delete the selected items?":"Ви впевнені, що хочете видалити обрані елементи?","Move to Trash":"Перемістити в кошик","Are you sure you want to move the selected items to the Trash?":"Ви впевнені, що хочете перемістити обрані елементи в кошик?","Permanently delete":"Повне видалення","Delete permanently":"Видалити безповоротно","Are you sure you want to permanently delete the selected items? This action cannot be undone.":"Ви впевнені, що хочете безповоротно видалити обрані елементи? Цю дію не можна скасувати.",delete_files_permanent_one:"Ця дія безповоротно видалить {{count}} файл",delete_files_permanent_few:"Ця дія безповоротно видалить {{count}} файли",delete_files_permanent_many:"Ця дія безповоротно видалить {{count}} файлів",delete_files_permanent_other:"Ця дія безповоротно видалить {{count}} файлів",delete_folder_permanent:"Ця дія безповоротно видалить папку «{{name}}» і все її вміст, включаючи {{count}} елементів.",delete_mixed_permanent:"Ця дія безповоротно видалить {{total}} обраних елементів, включаючи {{folders}} папок і всі {{images}} зображень всередині них.",move_files_to_trash_one:"Ця дія перемістить у кошик {{count}} файл.",move_files_to_trash_few:"Ця дія перемістить у кошик {{count}} файли.",move_files_to_trash_many:"Ця дія перемістить у кошик {{count}} файлів.",move_files_to_trash_other:"Ця дія перемістить у кошик {{count}} файлів.",move_folder_to_trash:"Ця дія перемістить у кошик папку «{{name}}» і все її вміст ({{count}} елементів).",move_mixed_to_trash:"Ця дія перемістить у кошик {{total}} обраних елементів, включаючи {{folders}} папок і {{images}} зображень.",delete_count_confirm_trash_one:"Перемістити в кошик {{count}} файл?",delete_count_confirm_trash_few:"Перемістити в кошик {{count}} файли?",delete_count_confirm_trash_many:"Перемістити в кошик {{count}} файлів?",delete_count_confirm_trash_other:"Перемістити в кошик {{count}} файлів?",delete_count_confirm_permanent_one:"Видалити назавжди {{count}} файл?",delete_count_confirm_permanent_few:"Видалити назавжди {{count}} файли?",delete_count_confirm_permanent_many:"Видалити назавжди {{count}} файлів?",delete_count_confirm_permanent_other:"Видалити назавжди {{count}} файлів?",delete_count_confirm_one:"Видалити {{count}} файл?",delete_count_confirm_few:"Видалити {{count}} файли?",delete_count_confirm_many:"Видалити {{count}} файлів?",delete_count_confirm_other:"Видалити {{count}} файлів?",item:"файл",items:"файлів",Trash:"Видалені",Choose:"Обрати",Stock:"Фотосток","Select an image from our library":"Виберіть зображення з нашої бібліотеки","AI generation":"AI генерація","Creating an image on demand":"Створення зображення на замовлення","Search file or folder":"Знайти файл або папку","Select a file or drag and drop it here":"Виберіть файл або перетягніть його сюди","Supported files:":"Підтримувані файли:","Create folder":"Створити папку",Done:"Готово","Move here":"Перемістити сюди","Copy here":"Копіювати сюди","File URL":"URL файлу","There are no files for your request.":"Файлів за вашим запитом немає.","Millions of free stock images":"Мільйони безкоштовних стокових зображень","Enter a search query and we'll find the perfect image for you":"Введіть пошуковий запит, і ми знайдемо для вас ідеальне зображення","Enter your query and we will find the right one for you":"Введіть запит і ми знайдемо для вас відповідне","Over 350,000 live images":"Понад 350 000 живих зображень","The folder will be created in the root directory.":"Папка буде створена в кореневому каталозі.",undo:"СКАСУВАТИ",moved_to_trash_one:"Переміщено {{count}} елемент у кошик",moved_to_trash_few:"Переміщено {{count}} елементи у кошик",moved_to_trash_many:"Переміщено {{count}} елементів у кошик",moved_to_trash_other:"Переміщено {{count}} елементів у кошик",restored_items_one:"Відновлено {{count}} елемент",restored_items_few:"Відновлено {{count}} елементи",restored_items_many:"Відновлено {{count}} елементів",restored_items_other:"Відновлено {{count}} елементів",Type:"Тип","Generate image":"Створити зображення"}},"pt-br":{translation:{Files:"Arquivos",selected:"selecionado(s)",Deselected:"Desmarcar",Rename:"Renomear","Rename file":"Renomear arquivo {{currentFileName}}","Select the destination folder":"Selecionar a pasta de destino","Selected files:":"Arquivos selecionados:","Selected files":"Arquivos selecionados: {{count}}",selected_files_one:"{{count}} arquivo selecionado",selected_files_few:"{{count}} arquivos selecionados",selected_files_many:"{{count}} arquivos selecionados",selected_files_other:"{{count}} arquivos selecionados",Copy:"Duplicar",Edit:"Editar","Move to":"Mover para",Delete:"Excluir","New folder":"Nova pasta","Image search...":"Busca de imagens...","By name":"Por nome","By size":"Por tamanho","By date":"Por data",List:"Lista",Grid:"Grade",Main:"Principal",Folders:"Pastas","total pages":"Total de {{total}} itens",Name:"Nome",Untitled:"Sem título",Size:"Tamanho",Dimensions:"Dimensões",Date:"Data",error:"erro",Folder:"Pasta",created:"criada","Failed to create folder":"Falha ao criar pasta","File deleted":"Arquivo excluído","Error when deleting a file":"Erro ao excluir arquivo","Folder deleted":"Pasta excluída","Error when deleting a folder":"Erro ao excluir pasta","Delete folder":"Excluir pasta","Are you sure you want to delete this folder? This action will also delete all files and subfolders.":"Tem certeza que deseja excluir esta pasta? Esta ação também excluirá todos os arquivos e subpastas.","API-endpoint for file upload is not configured":"Endpoint da API para upload de arquivos não está configurado","Please select an image file":"Por favor, selecione um arquivo de imagem",File:"Arquivo","has been successfully uploaded":"foi carregado com sucesso","The URL must point to an image":"A URL deve apontar para uma imagem","Image upload...":"Carregando imagem...",Unknown:"Desconhecido","Error downloading file by URL":"Erro ao baixar arquivo por URL","successfully uploaded":"carregado com sucesso","Error when downloading a file by URL":"Erro ao baixar arquivo por URL","File not found":"Arquivo não encontrado","File renamed to":"Arquivo renomeado para","Failed to rename the file":"Falha ao renomear o arquivo","Folder renamed to":"Pasta renomeada para","Rename folder":"Renomear pasta","New folder name":"Novo nome da pasta","Enter a new folder name":"Digite um novo nome para a pasta","Please drag and drop image files only":"Por favor, arraste e solte apenas arquivos de imagem","Upload file by URL":"Carregar arquivo por URL","Upload file":"Carregar arquivo","Creating a new folder":"Criando uma nova pasta",Create:"Criar",Cancel:"Cancelar","Folder name":"Nome da pasta","Enter the name of the folder":"Digite o nome da pasta","A folder will be created inside:":"A pasta será criada dentro de:","selected folder":"pasta selecionada","The folder will be created in the root directory":"A pasta será criada no diretório raiz","Failed to load folders":"Não foi possível carregar as pastas","Folder name cannot be empty":"O nome da pasta não pode estar vazio","Folder creation provider is not configured":"O provedor de criação de pastas não está configurado","Folder created":"Pasta criada","Folder rename is disabled by config":"Renomear pastas está desabilitado pela configuração","Folder rename provider is not configured":"O provedor de renomeação de pastas não está configurado","Unexpected response when renaming folder":"Resposta inesperada ao renomear a pasta","Folder renamed":"Pasta renomeada","Failed to rename folder":"Não foi possível renomear a pasta","Failed to load folder items count":"Não foi possível obter a contagem de itens da pasta","Failed to load subfolders":"Não foi possível carregar as subpastas",Download:"Baixar","image URL":"URL da imagem","Enter the URL of the image":"Digite a URL da imagem","Supported formats: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP":"Formatos suportados: JPG, JPEG, PNG, GIF, WEBP, SVG, BMP","New file name":"Novo nome do arquivo","Enter a new file name":"Digite um novo nome para o arquivo","Copy to folder":"Copiar para pasta",Added:"Adicionado em {{date}}","File uploaded successfully":"Arquivo carregado com sucesso","Successfully uploaded":"{{successCount}} de {{count}} arquivo carregado com sucesso","Successfully uploaded files":"{{successCount}} de {{count}} arquivos carregados com sucesso",uploads_success_summary:"Enviados {{successCount}} de {{totalCount}} arquivos",uploads_fail_summary:"Falhou ao enviar {{failCount}} de {{totalCount}} arquivos","File with this name already exists.":"Já existe um arquivo com esse nome.","File not found or no longer available.":"O arquivo não foi encontrado ou já foi excluído.","You don't have permission to access this file.":"Você não tem permissão para acessar este arquivo.","File is too large to upload.":"O arquivo é grande demais para ser enviado.","This file type is not allowed.":"Este tipo de arquivo não é permitido.","File name is not valid.":"O nome do arquivo não é válido.","Failed to read the file.":"Não foi possível ler o arquivo.","Failed to write the file.":"Não foi possível gravar o arquivo.","The file appears to be corrupted.":"O arquivo parece estar corrompido.","File integrity check failed.":"A verificação de integridade do arquivo falhou.","Folder not found or no longer available.":"A pasta não foi encontrada ou já foi excluída.","Folder with this name already exists.":"Já existe uma pasta com esse nome.","You don't have permission to access this folder.":"Você não tem permissão para acessar esta pasta.","Folder name is not valid.":"O nome da pasta não é válido.","Failed to read the folder contents.":"Não foi possível ler o conteúdo da pasta.","Failed to write to the folder.":"Não foi possível gravar na pasta.","Folder storage quota exceeded.":"A cota de armazenamento da pasta foi excedida.","Folder is not empty.":"A pasta não está vazia.","Server error while processing the folder.":"Erro do servidor ao processar a pasta.","Folder operation took too long.":"A operação com a pasta demorou demais.","Network error. Please check your connection and try again.":"Erro de rede. Verifique sua conexão e tente novamente.","The operation took too long. Please try again.":"A operação demorou demais. Tente novamente.","Server error. Please try again later.":"Erro no servidor. Tente novamente mais tarde.","Service is temporarily unavailable. Please try again later.":"O serviço está temporariamente indisponível. Tente novamente mais tarde.","Too many requests. Please try again a bit later.":"Muitas solicitações. Tente novamente mais tarde.","Authentication failed. Please sign in again.":"Falha na autenticação. Faça login novamente.","You are not allowed to perform this action.":"Você não tem permissão para executar esta ação.","Some of the provided data is invalid.":"Alguns dos dados fornecidos são inválidos.","This operation is not supported.":"Esta operação não é suportada.","Request payload is too large.":"O corpo da requisição é grande demais.","This media type is not supported.":"Este tipo de mídia não é suportado.","You have exceeded the upload quota.":"Você excedeu a cota de upload de arquivos.","Network error while uploading the file.":"Erro de rede ao enviar o arquivo.","File upload took too long.":"O envio do arquivo demorou demais.","Server error while uploading the file.":"Erro do servidor ao enviar o arquivo.","The specified URL is not valid.":"A URL especificada não é válida.","The specified URL is not reachable.":"A URL especificada não está acessível.","Content type at the URL is not allowed.":"O tipo de conteúdo na URL não é permitido.","Failed to download file from the URL.":"Não foi possível baixar o arquivo da URL.","Network error while downloading the file.":"Erro de rede ao baixar o arquivo.","File download took too long.":"O download do arquivo demorou demais.","Server error while downloading the file.":"Erro do servidor ao baixar o arquivo.","Some items could not be processed.":"Nem todos os itens foram processados com sucesso.","Failed to process all items in the batch.":"Nenhum item do lote pôde ser processado.","Some items in the batch are in a conflicting state.":"Alguns itens do lote estão em estado de conflito.","Some items in the batch did not pass validation.":"Alguns itens do lote não passaram na validação.","AI service returned an invalid response.":"O serviço de IA retornou uma resposta inválida.","Failed to generate image using AI.":"Falha ao gerar imagem usando IA.","You have reached the AI image generation limit.":"Você atingiu o limite de geração de imagens por IA.","Error in external integration.":"Erro em uma integração externa.","Error in a third-party service.":"Erro em um serviço de terceiros.","An unknown error occurred.":"Ocorreu um erro desconhecido.","Renaming is not allowed for this item.":"Renomear não é permitido para este item.","Moving is not allowed for this item.":"Mover não é permitido para este item.","Copying is not allowed for this item.":"Copiar não é permitido para este item.","Deleting is not allowed for this item.":"Excluir não é permitido para este item.","Cannot move an item into itself.":"Não é possível mover um item para dentro de si mesmo.","Cannot move an item into its descendant folder.":"Não é possível mover um item para sua pasta descendente.","Configuration error occurred.":"Ocorreu um erro de configuração.",Moved:"Movidos: {{names}}",move_success_summary:"Movidos {{successCount}} de {{totalCount}} itens",move_fail_summary:"Falhou ao mover {{failCount}} de {{totalCount}} itens",Copied:"Copiados: {{names}}",copy_success_summary:"Copiados {{successCount}} de {{totalCount}} itens",copy_fail_summary:"Falhou ao copiar {{failCount}} de {{totalCount}} itens",Uploaded:"Arquivos enviados: {{names}}",Failed:"Falha ao enviar: {{names}}","Failed to upload":"Falha ao carregar {{failCount}} de {{count}} arquivo","Failed to upload files":"Falha ao carregar {{failCount}} de {{count}} arquivos",months:{january:"janeiro",february:"fevereiro",march:"março",april:"abril",may:"maio",june:"junho",july:"julho",august:"agosto",september:"setembro",october:"outubro",november:"novembro",december:"dezembro"},files:"arquivos","No available folders":"Nenhuma pasta disponível","My files":"Meus arquivos",GIF:"GIF","Stock images":"Imagens de stock",AI:"IA","AI image generation":"Geração de imagens por IA","Search GIFs":"Buscar GIFs","That`s all we could find.":"Isso é tudo que conseguimos encontrar.","Search image":"Buscar imagem",All:"Todos",Landscape:"Paisagem",Portrait:"Retrato",Squarish:"Quadrados",Black:"Preto","Black and White":"Preto e branco",White:"Branco",Orange:"Laranja",Red:"Vermelho",Purple:"Roxo",Magenta:"Magenta",Green:"Verde",Teal:"Verde-azulado",Blue:"Azul","Photo by":"Foto por",on:"em","File Manager":"Gerenciador de arquivos","File Manager not configured":"Gerenciador de arquivos não configurado","Filter by type":"Filtrar por tipo","All types":"Todos os tipos","File name":"Nome do arquivo",Actions:"Ações","Add file":"Adicionar arquivo","Add folder":"Adicionar pasta","Add file by URL":"Adicionar arquivo por URL","File moved":"Arquivo movido","Error when moving a file":"Erro ao mover arquivo","Failed to download file":"Não foi possível baixar o arquivo","Failed to load JSON data":"Não foi possível carregar os dados JSON","Invalid file URL":"URL de arquivo inválida","Unable to validate file URL":"Não foi possível validar a URL do arquivo","Type to search...":"Digite para buscar...",Submit:"Enviar","No folders yet":"Nenhuma pasta ainda","Drag files to upload":"Arraste arquivos para carregar","Drop files here to upload":"Solte os arquivos aqui para carregá-los","Newest first":"Mais recentes primeiro","Oldest first":"Mais antigos primeiro","Largest first":"Maiores primeiro","Smallest first":"Menores primeiro","A-Z":"A-Z","Z-A":"Z-A","By type":"Por tipo","Evaluating the task":"Avaliando a tarefa","Something went wrong, please try again":"Algo deu errado, por favor tente novamente","Sort by":"Ordenar por","preview text":"Carregando imagem...","Use this variant":"Usar esta variante","Confirm deletion":"Confirmar exclusão","Are you sure you want to delete the selected items?":"Tem certeza que deseja excluir os itens selecionados?","Move to Trash":"Mover para lixeira","Are you sure you want to move the selected items to the Trash?":"Tem certeza que deseja mover os itens selecionados para a lixeira?","Permanently delete":"Exclusão permanente","Delete permanently":"Excluir permanentemente","Are you sure you want to permanently delete the selected items? This action cannot be undone.":"Tem certeza que deseja excluir permanentemente os itens selecionados? Esta ação não pode ser desfeita.",delete_files_permanent_one:"Esta ação excluirá permanentemente {{count}} arquivo",delete_files_permanent_few:"Esta ação excluirá permanentemente {{count}} arquivos",delete_files_permanent_many:"Esta ação excluirá permanentemente {{count}} arquivos",delete_files_permanent_other:"Esta ação excluirá permanentemente {{count}} arquivos",delete_folder_permanent:"Esta ação excluirá permanentemente a pasta «{{name}}» e todo seu conteúdo, incluindo {{count}} itens.",delete_mixed_permanent:"Esta ação excluirá permanentemente {{total}} itens selecionados, incluindo {{folders}} pastas e todas as {{images}} imagens dentro delas.",move_files_to_trash_one:"Esta ação moverá {{count}} arquivo para a lixeira.",move_files_to_trash_few:"Esta ação moverá {{count}} arquivos para a lixeira.",move_files_to_trash_many:"Esta ação moverá {{count}} arquivos para a lixeira.",move_files_to_trash_other:"Esta ação moverá {{count}} arquivos para a lixeira.",move_folder_to_trash:"Esta ação moverá a pasta «{{name}}» e todo seu conteúdo ({{count}} itens) para a lixeira.",move_mixed_to_trash:"Esta ação moverá {{total}} itens selecionados para a lixeira, incluindo {{folders}} pastas e {{images}} imagens.",delete_count_confirm_trash_one:"Mover {{count}} arquivo para a lixeira?",delete_count_confirm_trash_few:"Mover {{count}} arquivos para a lixeira?",delete_count_confirm_trash_many:"Mover {{count}} arquivos para a lixeira?",delete_count_confirm_trash_other:"Mover {{count}} arquivos para a lixeira?",delete_count_confirm_permanent_one:"Excluir permanentemente {{count}} arquivo?",delete_count_confirm_permanent_few:"Excluir permanentemente {{count}} arquivos?",delete_count_confirm_permanent_many:"Excluir permanentemente {{count}} arquivos?",delete_count_confirm_permanent_other:"Excluir permanentemente {{count}} arquivos?",delete_count_confirm_one:"Excluir {{count}} arquivo?",delete_count_confirm_few:"Excluir {{count}} arquivos?",delete_count_confirm_many:"Excluir {{count}} arquivos?",delete_count_confirm_other:"Excluir {{count}} arquivos?",item:"arquivo",items:"arquivos",Trash:"Lixeira",Choose:"Escolher",Stock:"Banco de imagens","Select an image from our library":"Selecione uma imagem da nossa biblioteca","AI generation":"Geração por IA","Creating an image on demand":"Criando uma imagem sob demanda","Search file or folder":"Buscar arquivo ou pasta","Select a file or drag and drop it here":"Selecione um arquivo ou arraste e solte aqui","Supported files:":"Arquivos suportados:","Create folder":"Criar pasta",Done:"Concluído","Move here":"Mover aqui","Copy here":"Copiar aqui","File URL":"URL do arquivo","There are no files for your request.":"Não há arquivos para sua solicitação.","Millions of free stock images":"Milhões de imagens de stock gratuitas","Enter a search query and we'll find the perfect image for you":"Digite uma consulta de busca e encontraremos a imagem perfeita para você","Enter your query and we will find the right one for you":"Digite sua consulta e nós encontraremos a ideal para você","Over 350,000 live images":"Mais de 350.000 imagens ao vivo","The folder will be created in the root directory.":"A pasta será criada no diretório raiz.",undo:"DESFAZER",moved_to_trash_one:"{{count}} item movido para a lixeira",moved_to_trash_few:"{{count}} itens movidos para a lixeira",moved_to_trash_many:"{{count}} itens movidos para a lixeira",moved_to_trash_other:"{{count}} itens movidos para a lixeira",restored_items_one:"{{count}} item restaurado",restored_items_few:"{{count}} itens restaurados",restored_items_many:"{{count}} itens restaurados",restored_items_other:"{{count}} itens restaurados",Type:"Tipo","Generate image":"Gerar imagem"}}};Tr.use(Rn).init({resources:zr,debug:!0,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});const Br=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m6 9 6 6 6-6"}));Br.displayName="ChevronDown";const Vr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M12 20.472a6 6 0 1 0 5.58-10.262m-11.16 0a6 6 0 1 0 7.16 3.58M18 8A6 6 0 1 1 6 8a6 6 0 0 1 12 0Z"}));Vr.displayName="Colors";const Ur=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M16 16v2.8c0 1.12 0 1.68-.218 2.108a2 2 0 0 1-.874.874C14.48 22 13.92 22 12.8 22H5.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2 20.48 2 19.92 2 18.8v-7.6c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 8 4.08 8 5.2 8H8m3.2 8h7.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 14.48 22 13.92 22 12.8V5.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 2 19.92 2 18.8 2h-7.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C8 3.52 8 4.08 8 5.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C9.52 16 10.08 16 11.2 16Z"}));Ur.displayName="Copy04";const $r=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M10 6h4.8c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C18 7.52 18 8.08 18 9.2V14M2 6h4m12 12v4m4-4H9.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C6 16.48 6 15.92 6 14.8V2"}));$r.displayName="Crop02";const Wr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0-7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));Wr.displayName="DotsVertical";const Hr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm7 7 3 3m0 0 3-3m-3 3v-6"}));Hr.displayName="FolderDownload";const Gr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm7 7h6"}));Gr.displayName="FolderMinus";const Yr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm10 10v-6m-3 3h6"}));Yr.displayName="FolderPlus";const qr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M8.4 3H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 3.76 3 4.04 3 4.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 10 4.04 10 4.6 10h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C10 9.24 10 8.96 10 8.4V4.6c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C9.24 3 8.96 3 8.4 3Zm11 0h-3.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C14 3.76 14 4.04 14 4.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 10 15.04 10 15.6 10h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C21 9.24 21 8.96 21 8.4V4.6c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C20.24 3 19.96 3 19.4 3Zm0 11h-3.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C14 14.76 14 15.04 14 15.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 21 15.04 21 15.6 21h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C21 20.24 21 19.96 21 19.4v-3.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C20.24 14 19.96 14 19.4 14Zm-11 0H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 14.76 3 15.04 3 15.6v3.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21h3.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C10 20.24 10 19.96 10 19.4v-3.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C9.24 14 8.96 14 8.4 14Z"}));qr.displayName="Grid01";const Xr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m4.272 20.728 6.597-6.597c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668l6.553 6.553M14 15l2.869-2.869c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668L22 15M10 9a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM6.8 21h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 18.72 22 17.88 22 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 21 5.12 21 6.8 21Z"}));Xr.displayName="Image03";const Kr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m12.708 18.364-1.415 1.414a5 5 0 1 1-7.07-7.07l1.413-1.415m12.728 1.414 1.415-1.414a5 5 0 0 0-7.071-7.071l-1.415 1.414M8.5 15.5l7-7"}));Kr.displayName="Link01";const Zr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M21 12H9m12-6H9m12 12H9m-4-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));Zr.displayName="List";const Jr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}),r.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));Jr.displayName="PlaySquare";const Qr=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M12 8v8m-4-4h8m6 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Qr.displayName="PlusCircle";const ei=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M14 22H6.8m0 0c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 19.72 2 18.88 2 17.2M6.8 22h.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C12 19.72 12 18.88 12 17.2v-.4c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C9.72 12 8.88 12 7.2 12h-.4c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 14.28 2 15.12 2 16.8v.4m0 0V10m8-8h4m8 8v4m-4 8c.93 0 1.395 0 1.776-.102a3 3 0 0 0 2.122-2.122C22 19.395 22 18.93 22 18m0-12c0-.93 0-1.395-.102-1.776a3 3 0 0 0-2.122-2.122C19.395 2 18.93 2 18 2M6 2c-.93 0-1.395 0-1.776.102a3 3 0 0 0-2.122 2.122C2 4.605 2 5.07 2 6"}));ei.displayName="Scale01";const ti=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m21 21-4.35-4.35M19 11a8 8 0 1 1-16 0 8 8 0 0 1 16 0Z"}));ti.displayName="SearchMd";const ni=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M4.5 22v-5m0-10V2M2 4.5h5m-5 15h5M13 3l-1.734 4.509c-.282.733-.423 1.1-.643 1.408a3 3 0 0 1-.706.707c-.308.219-.675.36-1.408.642L4 12l4.509 1.734c.733.282 1.1.423 1.408.643.273.194.512.433.707.706.219.308.36.675.642 1.408L13 21l1.734-4.509c.282-.733.423-1.1.643-1.408.194-.273.433-.512.706-.707.308-.219.675-.36 1.408-.642L22 12l-4.509-1.734c-.733-.282-1.1-.423-1.408-.642a3 3 0 0 1-.706-.707c-.22-.308-.36-.675-.643-1.408L13 3Z"}));ni.displayName="Stars02";const ri=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M13 7H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 8.52 2 9.08 2 10.2v3.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 17 4.08 17 5.2 17H13m4-10h1.8c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 8.52 22 9.08 22 10.2v3.6c0 1.12 0 1.68-.218 2.108a2 2 0 0 1-.874.874C20.48 17 19.92 17 18.8 17H17m0 4V3m2.5 0h-5m5 18h-5"}));ri.displayName="TextInput";const ii=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M9 3h6M3 6h18m-2 0-.701 10.52c-.105 1.578-.158 2.367-.499 2.965a3 3 0 0 1-1.298 1.215c-.62.3-1.41.3-2.993.3h-3.018c-1.582 0-2.373 0-2.993-.3A3 3 0 0 1 6.2 19.485c-.34-.598-.394-1.387-.499-2.966L5 6m5 4.5v5m4-5v5"}));ii.displayName="Trash03";var oi,ai={exports:{}},si=ai.exports;
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Lodash <https://lodash.com/>
|
|
@@ -6,7 +6,7 @@ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from
|
|
|
6
6
|
* Released under MIT license <https://lodash.com/license>
|
|
7
7
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
8
8
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
9
|
-
*/var li=(oi||(oi=1,function(e,t){(function(){var n,r="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",a=32,s=128,l=256,c=1/0,u=9007199254740991,d=NaN,h=4294967295,f=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",l]],p="[object Arguments]",g="[object Array]",m="[object Boolean]",v="[object Date]",y="[object Error]",b="[object Function]",w="[object GeneratorFunction]",x="[object Map]",C="[object Number]",_="[object Object]",S="[object Promise]",k="[object RegExp]",A="[object Set]",E="[object String]",I="[object Symbol]",T="[object WeakMap]",O="[object ArrayBuffer]",F="[object DataView]",P="[object Float32Array]",M="[object Float64Array]",R="[object Int8Array]",L="[object Int16Array]",j="[object Int32Array]",D="[object Uint8Array]",N="[object Uint8ClampedArray]",z="[object Uint16Array]",B="[object Uint32Array]",V=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,G=RegExp(W.source),Y=RegExp(H.source),q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ne=/^\s+/,re=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,pe=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,be=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",_e="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="['’]",Ie="["+we+"]",Te="["+Ae+"]",Oe="["+xe+"]",Fe="\\d+",Pe="["+Ce+"]",Me="["+_e+"]",Re="[^"+we+Ae+Fe+Ce+_e+Se+"]",Le="\\ud83c[\\udffb-\\udfff]",je="[^"+we+"]",De="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]",ze="["+Se+"]",Be="\\u200d",Ve="(?:"+Me+"|"+Re+")",Ue="(?:"+ze+"|"+Re+")",$e="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+Oe+"|"+Le+")?",Ge="["+ke+"]?",Ye=Ge+He+"(?:"+Be+"(?:"+[je,De,Ne].join("|")+")"+Ge+He+")*",qe="(?:"+[Pe,De,Ne].join("|")+")"+Ye,Xe="(?:"+[je+Oe+"?",Oe,De,Ne,Ie].join("|")+")",Ke=RegExp(Ee,"g"),Ze=RegExp(Oe,"g"),Je=RegExp(Le+"(?="+Le+")|"+Xe+Ye,"g"),Qe=RegExp([ze+"?"+Me+"+"+$e+"(?="+[Te,ze,"$"].join("|")+")",Ue+"+"+We+"(?="+[Te,ze+Ve,"$"].join("|")+")",ze+"?"+Ve+"+"+$e,ze+"+"+We,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fe,qe].join("|"),"g"),et=RegExp("["+Be+we+xe+ke+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[P]=it[M]=it[R]=it[L]=it[j]=it[D]=it[N]=it[z]=it[B]=!0,it[p]=it[g]=it[O]=it[m]=it[F]=it[v]=it[y]=it[b]=it[x]=it[C]=it[_]=it[k]=it[A]=it[E]=it[T]=!1;var ot={};ot[p]=ot[g]=ot[O]=ot[F]=ot[m]=ot[v]=ot[P]=ot[M]=ot[R]=ot[L]=ot[j]=ot[x]=ot[C]=ot[_]=ot[k]=ot[A]=ot[E]=ot[I]=ot[D]=ot[N]=ot[z]=ot[B]=!0,ot[y]=ot[b]=ot[T]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,lt=parseInt,ct="object"==typeof Cn&&Cn&&Cn.Object===Object&&Cn,ut="object"==typeof self&&self&&self.Object===Object&&self,dt=ct||ut||Function("return this")(),ht=t&&!t.nodeType&&t,ft=ht&&e&&!e.nodeType&&e,pt=ft&&ft.exports===ht,gt=pt&&ct.process,mt=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||gt&>.binding&>.binding("util")}catch(e){}}(),vt=mt&&mt.isArrayBuffer,yt=mt&&mt.isDate,bt=mt&&mt.isMap,wt=mt&&mt.isRegExp,xt=mt&&mt.isSet,Ct=mt&&mt.isTypedArray;function _t(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function kt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function It(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Tt(e,t){return!(null==e||!e.length)&&zt(e,t,0)>-1}function Ot(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Ft(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Pt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Mt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Rt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var jt=$t("length");function Dt(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function Nt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function zt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Nt(e,Vt,n)}function Bt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Vt(e){return e!=e}function Ut(e,t){var n=null==e?0:e.length;return n?Gt(e,t)/n:d}function $t(e){return function(t){return null==t?n:t[e]}}function Wt(e){return function(t){return null==e?n:e[t]}}function Ht(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function Gt(e,t){for(var r,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==n&&(r=r===n?a:r+a)}return r}function Yt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function qt(e){return e?e.slice(0,hn(e)+1).replace(ne,""):e}function Xt(e){return function(t){return e(t)}}function Kt(e,t){return Ft(t,function(t){return e[t]})}function Zt(e,t){return e.has(t)}function Jt(e,t){for(var n=-1,r=e.length;++n<r&&zt(t,e[n],0)>-1;);return n}function Qt(e,t){for(var n=e.length;n--&&zt(t,e[n],0)>-1;);return n}var en=Wt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),tn=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var s=e[n];s!==t&&s!==o||(e[n]=o,a[i++]=n)}return a}function ln(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function cn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function un(e){return rn(e)?function(e){for(var t=Je.lastIndex=0;Je.test(e);)++t;return t}(e):jt(e)}function dn(e){return rn(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function hn(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var fn=Wt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),pn=function e(t){var re,we=(t=null==t?dt:pn.defaults(dt.Object(),t,pn.pick(dt,nt))).Array,xe=t.Date,Ce=t.Error,_e=t.Function,Se=t.Math,ke=t.Object,Ae=t.RegExp,Ee=t.String,Ie=t.TypeError,Te=we.prototype,Oe=_e.prototype,Fe=ke.prototype,Pe=t["__core-js_shared__"],Me=Oe.toString,Re=Fe.hasOwnProperty,Le=0,je=(re=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||""))?"Symbol(src)_1."+re:"",De=Fe.toString,Ne=Me.call(ke),ze=dt._,Be=Ae("^"+Me.call(Re).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=pt?t.Buffer:n,Ue=t.Symbol,$e=t.Uint8Array,We=Ve?Ve.allocUnsafe:n,He=an(ke.getPrototypeOf,ke),Ge=ke.create,Ye=Fe.propertyIsEnumerable,qe=Te.splice,Xe=Ue?Ue.isConcatSpreadable:n,Je=Ue?Ue.iterator:n,et=Ue?Ue.toStringTag:n,at=function(){try{var e=uo(ke,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==dt.clearTimeout&&t.clearTimeout,ut=xe&&xe.now!==dt.Date.now&&xe.now,ht=t.setTimeout!==dt.setTimeout&&t.setTimeout,ft=Se.ceil,gt=Se.floor,mt=ke.getOwnPropertySymbols,jt=Ve?Ve.isBuffer:n,Wt=t.isFinite,gn=Te.join,mn=an(ke.keys,ke),vn=Se.max,yn=Se.min,bn=xe.now,wn=t.parseInt,xn=Se.random,Cn=Te.reverse,_n=uo(t,"DataView"),Sn=uo(t,"Map"),kn=uo(t,"Promise"),An=uo(t,"Set"),En=uo(t,"WeakMap"),In=uo(ke,"create"),Tn=En&&new En,On={},Fn=Do(_n),Pn=Do(Sn),Mn=Do(kn),Rn=Do(An),Ln=Do(En),jn=Ue?Ue.prototype:n,Dn=jn?jn.valueOf:n,Nn=jn?jn.toString:n;function zn(e){if(es(e)&&!$a(e)&&!(e instanceof $n)){if(e instanceof Un)return e;if(Re.call(e,"__wrapped__"))return No(e)}return new Un(e)}var Bn=function(){function e(){}return function(t){if(!Qa(t))return{};if(Ge)return Ge(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Vn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function $n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function qn(e){var t=this.__data__=new Hn(e);this.size=t.size}function Xn(e,t){var n=$a(e),r=!n&&Ua(e),i=!n&&!r&&Ya(e),o=!n&&!r&&!i&&ls(e),a=n||r||i||o,s=a?Yt(e.length,Ee):[],l=s.length;for(var c in e)!t&&!Re.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yo(c,l))||s.push(c);return s}function Kn(e){var t=e.length;return t?e[Yr(0,t-1)]:n}function Zn(e,t){return Ro(Ii(e),ar(t,0,e.length))}function Jn(e){return Ro(Ii(e))}function Qn(e,t,r){(r!==n&&!za(e[t],r)||r===n&&!(t in e))&&ir(e,t,r)}function er(e,t,r){var i=e[t];Re.call(e,t)&&za(i,r)&&(r!==n||t in e)||ir(e,t,r)}function tr(e,t){for(var n=e.length;n--;)if(za(e[n][0],t))return n;return-1}function nr(e,t,n,r){return dr(e,function(e,i,o){t(r,e,n(e),o)}),r}function rr(e,t){return e&&Ti(t,Os(t),e)}function ir(e,t,n){"__proto__"==t&&at?at(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var r=-1,i=t.length,o=we(i),a=null==e;++r<i;)o[r]=a?n:ks(e,t[r]);return o}function ar(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function sr(e,t,r,i,o,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=o?r(e,i,o,a):r(e)),s!==n)return s;if(!Qa(e))return e;var d=$a(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Ii(e,s)}else{var h=po(e),f=h==b||h==w;if(Ya(e))return Ci(e,l);if(h==_||h==p||f&&!o){if(s=c||f?{}:mo(e),!l)return c?function(e,t){return Ti(e,fo(e),t)}(e,function(e,t){return e&&Ti(t,Fs(t),e)}(s,e)):function(e,t){return Ti(e,ho(e),t)}(e,rr(s,e))}else{if(!ot[h])return o?e:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case O:return _i(e);case m:case v:return new i(+e);case F:return function(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case M:case R:case L:case j:case D:case N:case z:case B:return Si(e,n);case x:return new i;case C:case E:return new i(e);case k:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new i;case I:return r=e,Dn?ke(Dn.call(r)):{}}}(e,h,l)}}a||(a=new qn);var g=a.get(e);if(g)return g;a.set(e,s),os(e)?e.forEach(function(n){s.add(sr(n,t,r,n,e,a))}):ts(e)&&e.forEach(function(n,i){s.set(i,sr(n,t,r,i,e,a))});var y=d?n:(u?c?ro:no:c?Fs:Os)(e);return kt(y||e,function(n,i){y&&(n=e[i=n]),er(s,i,sr(n,t,r,i,e,a))}),s}function lr(e,t,r){var i=r.length;if(null==e)return!i;for(e=ke(e);i--;){var o=r[i],a=t[o],s=e[o];if(s===n&&!(o in e)||!a(s))return!1}return!0}function cr(e,t,i){if("function"!=typeof e)throw new Ie(r);return Oo(function(){e.apply(n,i)},t)}function ur(e,t,n,r){var i=-1,o=Tt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Ft(t,Xt(n))),r?(o=Ot,a=!1):t.length>=200&&(o=Zt,a=!1,t=new Yn(t));e:for(;++i<s;){var u=e[i],d=null==n?u:n(u);if(u=r||0!==u?u:0,a&&d==d){for(var h=c;h--;)if(t[h]===d)continue e;l.push(u)}else o(t,d,r)||l.push(u)}return l}zn.templateSettings={escape:q,evaluate:X,interpolate:K,variable:"",imports:{_:zn}},zn.prototype=Vn.prototype,zn.prototype.constructor=zn,Un.prototype=Bn(Vn.prototype),Un.prototype.constructor=Un,$n.prototype=Bn(Vn.prototype),$n.prototype.constructor=$n,Wn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(In){var r=t[e];return r===i?n:r}return Re.call(t,e)?t[e]:n},Wn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==n:Re.call(t,e)},Wn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=In&&t===n?i:t,this},Hn.prototype.clear=function(){this.__data__=[],this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():qe.call(t,n,1),--this.size,0))},Hn.prototype.get=function(e){var t=this.__data__,r=tr(t,e);return r<0?n:t[r][1]},Hn.prototype.has=function(e){return tr(this.__data__,e)>-1},Hn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Sn||Hn),string:new Wn}},Gn.prototype.delete=function(e){var t=lo(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return lo(this,e).get(e)},Gn.prototype.has=function(e){return lo(this,e).has(e)},Gn.prototype.set=function(e,t){var n=lo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,i),this},Yn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.clear=function(){this.__data__=new Hn,this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},qn.prototype.get=function(e){return this.__data__.get(e)},qn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Hn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var dr=Pi(br),hr=Pi(wr,!0);function fr(e,t){var n=!0;return dr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function pr(e,t,r){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(l===n?s==s&&!ss(s):r(s,l)))var l=s,c=a}return c}function gr(e,t){var n=[];return dr(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function mr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=vo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?mr(s,t-1,n,r,i):Pt(i,s):r||(i[i.length]=s)}return i}var vr=Mi(),yr=Mi(!0);function br(e,t){return e&&vr(e,t,Os)}function wr(e,t){return e&&yr(e,t,Os)}function xr(e,t){return It(t,function(t){return Ka(e[t])})}function Cr(e,t){for(var r=0,i=(t=yi(t,e)).length;null!=e&&r<i;)e=e[jo(t[r++])];return r&&r==i?e:n}function _r(e,t,n){var r=t(e);return $a(e)?r:Pt(r,n(e))}function Sr(e){return null==e?e===n?"[object Undefined]":"[object Null]":et&&et in ke(e)?function(e){var t=Re.call(e,et),r=e[et];try{e[et]=n;var i=!0}catch(e){}var o=De.call(e);return i&&(t?e[et]=r:delete e[et]),o}(e):function(e){return De.call(e)}(e)}function kr(e,t){return e>t}function Ar(e,t){return null!=e&&Re.call(e,t)}function Er(e,t){return null!=e&&t in ke(e)}function Ir(e,t,r){for(var i=r?Ot:Tt,o=e[0].length,a=e.length,s=a,l=we(a),c=1/0,u=[];s--;){var d=e[s];s&&t&&(d=Ft(d,Xt(t))),c=yn(d.length,c),l[s]=!r&&(t||o>=120&&d.length>=120)?new Yn(s&&d):n}d=e[0];var h=-1,f=l[0];e:for(;++h<o&&u.length<c;){var p=d[h],g=t?t(p):p;if(p=r||0!==p?p:0,!(f?Zt(f,g):i(u,g,r))){for(s=a;--s;){var m=l[s];if(!(m?Zt(m,g):i(e[s],g,r)))continue e}f&&f.push(g),u.push(p)}}return u}function Tr(e,t,r){var i=null==(e=Eo(e,t=yi(t,e)))?e:e[jo(Xo(t))];return null==i?n:_t(i,e,r)}function Or(e){return es(e)&&Sr(e)==p}function Fr(e,t,r,i,o){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,r,i,o,a){var s=$a(e),l=$a(t),c=s?g:po(e),u=l?g:po(t),d=(c=c==p?_:c)==_,h=(u=u==p?_:u)==_,f=c==u;if(f&&Ya(e)){if(!Ya(t))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new qn),s||ls(e)?eo(e,t,r,i,o,a):function(e,t,n,r,i,o,a){switch(n){case F:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!o(new $e(e),new $e(t)));case m:case v:case C:return za(+e,+t);case y:return e.name==t.name&&e.message==t.message;case k:case E:return e==t+"";case x:var s=on;case A:var l=1&r;if(s||(s=ln),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=eo(s(e),s(t),r,i,o,a);return a.delete(e),u;case I:if(Dn)return Dn.call(e)==Dn.call(t)}return!1}(e,t,c,r,i,o,a);if(!(1&r)){var b=d&&Re.call(e,"__wrapped__"),w=h&&Re.call(t,"__wrapped__");if(b||w){var S=b?e.value():e,T=w?t.value():t;return a||(a=new qn),o(S,T,r,i,a)}}return!!f&&(a||(a=new qn),function(e,t,r,i,o,a){var s=1&r,l=no(e),c=l.length,u=no(t),d=u.length;if(c!=d&&!s)return!1;for(var h=c;h--;){var f=l[h];if(!(s?f in t:Re.call(t,f)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var v=s;++h<c;){var y=e[f=l[h]],b=t[f];if(i)var w=s?i(b,y,f,t,e,a):i(y,b,f,e,t,a);if(!(w===n?y===b||o(y,b,r,i,a):w)){m=!1;break}v||(v="constructor"==f)}if(m&&!v){var x=e.constructor,C=t.constructor;x==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof C&&C instanceof C||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,r,i,o,a))}(e,t,r,i,Fr,o))}function Pr(e,t,r,i){var o=r.length,a=o,s=!i;if(null==e)return!a;for(e=ke(e);o--;){var l=r[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var c=(l=r[o])[0],u=e[c],d=l[1];if(s&&l[2]){if(u===n&&!(c in e))return!1}else{var h=new qn;if(i)var f=i(u,d,c,e,t,h);if(!(f===n?Fr(d,u,3,i,h):f))return!1}}return!0}function Mr(e){return!(!Qa(e)||(t=e,je&&je in t))&&(Ka(e)?Be:pe).test(Do(e));var t}function Rr(e){return"function"==typeof e?e:null==e?nl:"object"==typeof e?$a(e)?Br(e[0],e[1]):zr(e):dl(e)}function Lr(e){if(!_o(e))return mn(e);var t=[];for(var n in ke(e))Re.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e){if(!Qa(e))return function(e){var t=[];if(null!=e)for(var n in ke(e))t.push(n);return t}(e);var t=_o(e),n=[];for(var r in e)("constructor"!=r||!t&&Re.call(e,r))&&n.push(r);return n}function Dr(e,t){return e<t}function Nr(e,t){var n=-1,r=Ha(e)?we(e.length):[];return dr(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function zr(e){var t=co(e);return 1==t.length&&t[0][2]?ko(t[0][0],t[0][1]):function(n){return n===e||Pr(n,e,t)}}function Br(e,t){return wo(e)&&So(t)?ko(jo(e),t):function(r){var i=ks(r,e);return i===n&&i===t?As(r,e):Fr(t,i,3)}}function Vr(e,t,r,i,o){e!==t&&vr(t,function(a,s){if(o||(o=new qn),Qa(a))!function(e,t,r,i,o,a,s){var l=Io(e,r),c=Io(t,r),u=s.get(c);if(u)Qn(e,r,u);else{var d=a?a(l,c,r+"",e,t,s):n,h=d===n;if(h){var f=$a(c),p=!f&&Ya(c),g=!f&&!p&&ls(c);d=c,f||p||g?$a(l)?d=l:Ga(l)?d=Ii(l):p?(h=!1,d=Ci(c,!0)):g?(h=!1,d=Si(c,!0)):d=[]:rs(c)||Ua(c)?(d=l,Ua(l)?d=ms(l):Qa(l)&&!Ka(l)||(d=mo(c))):h=!1}h&&(s.set(c,d),o(d,c,i,a,s),s.delete(c)),Qn(e,r,d)}}(e,t,s,r,Vr,i,o);else{var l=i?i(Io(e,s),a,s+"",e,t,o):n;l===n&&(l=a),Qn(e,s,l)}},Fs)}function Ur(e,t){var r=e.length;if(r)return yo(t+=t<0?r:0,r)?e[t]:n}function $r(e,t,n){t=t.length?Ft(t,function(e){return $a(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e}):[nl];var r=-1;t=Ft(t,Xt(so()));var i=Nr(e,function(e,n,i){var o=Ft(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=ki(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Wr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Cr(e,a);n(s,a)&&Jr(o,yi(a,e),s)}return o}function Hr(e,t,n,r){var i=r?Bt:zt,o=-1,a=t.length,s=e;for(e===t&&(t=Ii(t)),n&&(s=Ft(e,Xt(n)));++o<a;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(s,u,l,r))>-1;)s!==e&&qe.call(s,l,1),qe.call(e,l,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;yo(i)?qe.call(e,i,1):ui(e,i)}}return e}function Yr(e,t){return e+gt(xn()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>u)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Xr(e,t){return Fo(Ao(e,t,nl),e+"")}function Kr(e){return Kn(zs(e))}function Zr(e,t){var n=zs(e);return Ro(n,ar(t,0,n.length))}function Jr(e,t,r,i){if(!Qa(e))return e;for(var o=-1,a=(t=yi(t,e)).length,s=a-1,l=e;null!=l&&++o<a;){var c=jo(t[o]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var d=l[c];(u=i?i(d,c,l):n)===n&&(u=Qa(d)?d:yo(t[o+1])?[]:{})}er(l,c,u),l=l[c]}return e}var Qr=Tn?function(e,t){return Tn.set(e,t),e}:nl,ei=at?function(e,t){return at(e,"toString",{configurable:!0,enumerable:!1,value:Qs(t),writable:!0})}:nl;function ti(e){return Ro(zs(e))}function ni(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=we(i);++r<i;)o[r]=e[r+t];return o}function ri(e,t){var n;return dr(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function ii(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ss(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return oi(e,t,nl,n)}function oi(e,t,r,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,c=ss(t),u=t===n;o<a;){var d=gt((o+a)/2),h=r(e[d]),f=h!==n,p=null===h,g=h==h,m=ss(h);if(s)var v=i||g;else v=u?g&&(i||f):l?g&&f&&(i||!p):c?g&&f&&!p&&(i||!m):!p&&!m&&(i?h<=t:h<t);v?o=d+1:a=d}return yn(a,4294967294)}function ai(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!za(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function si(e){return"number"==typeof e?e:ss(e)?d:+e}function li(e){if("string"==typeof e)return e;if($a(e))return Ft(e,li)+"";if(ss(e))return Nn?Nn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ci(e,t,n){var r=-1,i=Tt,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Ot;else if(o>=200){var c=t?null:qi(e);if(c)return ln(c);a=!1,i=Zt,l=new Yn}else l=t?[]:s;e:for(;++r<o;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),s.push(u)}else i(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}function ui(e,t){return null==(e=Eo(e,t=yi(t,e)))||delete e[jo(Xo(t))]}function di(e,t,n,r){return Jr(e,t,n(Cr(e,t)),r)}function hi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ni(e,r?0:o,r?o+1:i):ni(e,r?o+1:0,r?i:o)}function fi(e,t){var n=e;return n instanceof $n&&(n=n.value()),Mt(t,function(e,t){return t.func.apply(t.thisArg,Pt([e],t.args))},n)}function pi(e,t,n){var r=e.length;if(r<2)return r?ci(e[0]):[];for(var i=-1,o=we(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=ur(o[i]||a,e[s],t,n));return ci(mr(o,1),t,n)}function gi(e,t,r){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var l=i<a?t[i]:n;r(s,e[i],l)}return s}function mi(e){return Ga(e)?e:[]}function vi(e){return"function"==typeof e?e:nl}function yi(e,t){return $a(e)?e:wo(e,t)?[e]:Lo(vs(e))}var bi=Xr;function wi(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:ni(e,t,r)}var xi=ct||function(e){return dt.clearTimeout(e)};function Ci(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function _i(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Si(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ki(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,a=ss(e),s=t!==n,l=null===t,c=t==t,u=ss(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!u&&e<t||u&&r&&o&&!i&&!a||l&&r&&o||!s&&o||!c)return-1}return 0}function Ai(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,c=vn(o-a,0),u=we(l+c),d=!r;++s<l;)u[s]=t[s];for(;++i<a;)(d||i<o)&&(u[n[i]]=e[i]);for(;c--;)u[s++]=e[i++];return u}function Ei(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,l=-1,c=t.length,u=vn(o-s,0),d=we(u+c),h=!r;++i<u;)d[i]=e[i];for(var f=i;++l<c;)d[f+l]=t[l];for(;++a<s;)(h||i<o)&&(d[f+n[a]]=e[i++]);return d}function Ii(e,t){var n=-1,r=e.length;for(t||(t=we(r));++n<r;)t[n]=e[n];return t}function Ti(e,t,r,i){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=i?i(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),o?ir(r,l,c):er(r,l,c)}return r}function Oi(e,t){return function(n,r){var i=$a(n)?St:nr,o=t?t():{};return i(n,e,so(r,2),o)}}function Fi(e){return Xr(function(t,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(o--,a):n,s&&bo(r[0],r[1],s)&&(a=o<3?n:a,o=1),t=ke(t);++i<o;){var l=r[i];l&&e(t,l,i,a)}return t})}function Pi(e,t){return function(n,r){if(null==n)return n;if(!Ha(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=ke(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Mi(e){return function(t,n,r){for(var i=-1,o=ke(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function Ri(e){return function(t){var r=rn(t=vs(t))?dn(t):n,i=r?r[0]:t.charAt(0),o=r?wi(r,1).join(""):t.slice(1);return i[e]()+o}}function Li(e){return function(t){return Mt(Ks(Us(t).replace(Ke,"")),e,"")}}function ji(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return Qa(r)?r:n}}function Di(e){return function(t,r,i){var o=ke(t);if(!Ha(t)){var a=so(r,3);t=Os(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,i);return s>-1?o[a?t[s]:s]:n}}function Ni(e){return to(function(t){var i=t.length,o=i,a=Un.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new Ie(r);if(a&&!l&&"wrapper"==oo(s))var l=new Un([],!0)}for(o=l?o:i;++o<i;){var c=oo(s=t[o]),u="wrapper"==c?io(s):n;l=u&&xo(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[oo(u[0])].apply(l,u[3]):1==s.length&&xo(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&$a(n))return l.plant(n).value();for(var r=0,o=i?t[r].apply(this,e):n;++r<i;)o=t[r].call(this,o);return o}})}function zi(e,t,r,i,o,a,l,c,u,d){var h=t&s,f=1&t,p=2&t,g=24&t,m=512&t,v=p?n:ji(e);return function s(){for(var y=arguments.length,b=we(y),w=y;w--;)b[w]=arguments[w];if(g)var x=ao(s),C=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,x);if(i&&(b=Ai(b,i,o,g)),a&&(b=Ei(b,a,l,g)),y-=C,g&&y<d){var _=sn(b,x);return Gi(e,t,zi,s.placeholder,r,b,_,c,u,d-y)}var S=f?r:this,k=p?S[e]:e;return y=b.length,c?b=function(e,t){for(var r=e.length,i=yn(t.length,r),o=Ii(e);i--;){var a=t[i];e[i]=yo(a,r)?o[a]:n}return e}(b,c):m&&y>1&&b.reverse(),h&&u<y&&(b.length=u),this&&this!==dt&&this instanceof s&&(k=v||ji(k)),k.apply(S,b)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return br(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Vi(e,t){return function(r,i){var o;if(r===n&&i===n)return t;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=li(r),i=li(i)):(r=si(r),i=si(i)),o=e(r,i)}return o}}function Ui(e){return to(function(t){return t=Ft(t,Xt(so())),Xr(function(n){var r=this;return e(t,function(e){return _t(e,r,n)})})})}function $i(e,t){var r=(t=t===n?" ":li(t)).length;if(r<2)return r?qr(t,e):t;var i=qr(t,ft(e/un(t)));return rn(t)?wi(dn(i),0,e).join(""):i.slice(0,e)}function Wi(e){return function(t,r,i){return i&&"number"!=typeof i&&bo(t,r,i)&&(r=i=n),t=hs(t),r===n?(r=t,t=0):r=hs(r),function(e,t,n,r){for(var i=-1,o=vn(ft((t-e)/(n||1)),0),a=we(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,r,i=i===n?t<r?1:-1:hs(i),e)}}function Hi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function Gi(e,t,r,i,o,s,l,c,u,d){var h=8&t;t|=h?a:64,4&(t&=~(h?64:a))||(t&=-4);var f=[e,t,o,h?s:n,h?l:n,h?n:s,h?n:l,c,u,d],p=r.apply(n,f);return xo(e)&&To(p,f),p.placeholder=i,Po(p,e,t)}function Yi(e){var t=Se[e];return function(e,n){if(e=gs(e),(n=null==n?0:yn(fs(n),292))&&Wt(e)){var r=(vs(e)+"e").split("e");return+((r=(vs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var qi=An&&1/ln(new An([,-0]))[1]==c?function(e){return new An(e)}:sl;function Xi(e){return function(t){var n=po(t);return n==x?on(t):n==A?cn(t):function(e,t){return Ft(t,function(t){return[t,e[t]]})}(t,e(t))}}function Ki(e,t,i,c,u,d,h,f){var p=2&t;if(!p&&"function"!=typeof e)throw new Ie(r);var g=c?c.length:0;if(g||(t&=-97,c=u=n),h=h===n?h:vn(fs(h),0),f=f===n?f:fs(f),g-=u?u.length:0,64&t){var m=c,v=u;c=u=n}var y=p?n:io(e),b=[e,t,i,c,u,m,v,d,h,f];if(y&&function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,c=r==s&&8==n||r==s&&n==l&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!c)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var d=e[3];e[3]=d?Ai(d,u,t[4]):u,e[4]=d?sn(e[3],o):t[4]}(u=t[5])&&(d=e[5],e[5]=d?Ei(d,u,t[6]):u,e[6]=d?sn(e[5],o):t[6]),(u=t[7])&&(e[7]=u),r&s&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,y),e=b[0],t=b[1],i=b[2],c=b[3],u=b[4],!(f=b[9]=b[9]===n?p?0:e.length:vn(b[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,r){var i=ji(e);return function o(){for(var a=arguments.length,s=we(a),l=a,c=ao(o);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:sn(s,c);return(a-=u.length)<r?Gi(e,t,zi,o.placeholder,n,s,u,n,n,r-a):_t(this&&this!==dt&&this instanceof o?i:e,this,s)}}(e,t,f):t!=a&&33!=t||u.length?zi.apply(n,b):function(e,t,n,r){var i=1&t,o=ji(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=r.length,u=we(c+s),d=this&&this!==dt&&this instanceof t?o:e;++l<c;)u[l]=r[l];for(;s--;)u[l++]=arguments[++a];return _t(d,i?n:this,u)}}(e,t,i,c);else var w=function(e,t,n){var r=1&t,i=ji(e);return function t(){return(this&&this!==dt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,i);return Po((y?Qr:To)(w,b),e,t)}function Zi(e,t,r,i){return e===n||za(e,Fe[r])&&!Re.call(i,r)?t:e}function Ji(e,t,r,i,o,a){return Qa(e)&&Qa(t)&&(a.set(t,e),Vr(e,t,n,Ji,a),a.delete(t)),e}function Qi(e){return rs(e)?n:e}function eo(e,t,r,i,o,a){var s=1&r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var h=-1,f=!0,p=2&r?new Yn:n;for(a.set(e,t),a.set(t,e);++h<l;){var g=e[h],m=t[h];if(i)var v=s?i(m,g,h,t,e,a):i(g,m,h,e,t,a);if(v!==n){if(v)continue;f=!1;break}if(p){if(!Lt(t,function(e,t){if(!Zt(p,t)&&(g===e||o(g,e,r,i,a)))return p.push(t)})){f=!1;break}}else if(g!==m&&!o(g,m,r,i,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function to(e){return Fo(Ao(e,n,Wo),e+"")}function no(e){return _r(e,Os,ho)}function ro(e){return _r(e,Fs,fo)}var io=Tn?function(e){return Tn.get(e)}:sl;function oo(e){for(var t=e.name+"",n=On[t],r=Re.call(On,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function ao(e){return(Re.call(zn,"placeholder")?zn:e).placeholder}function so(){var e=zn.iteratee||rl;return e=e===rl?Rr:e,arguments.length?e(arguments[0],arguments[1]):e}function lo(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function co(e){for(var t=Os(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,So(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Mr(r)?r:n}var ho=mt?function(e){return null==e?[]:(e=ke(e),It(mt(e),function(t){return Ye.call(e,t)}))}:pl,fo=mt?function(e){for(var t=[];e;)Pt(t,ho(e)),e=He(e);return t}:pl,po=Sr;function go(e,t,n){for(var r=-1,i=(t=yi(t,e)).length,o=!1;++r<i;){var a=jo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ja(i)&&yo(a,i)&&($a(e)||Ua(e))}function mo(e){return"function"!=typeof e.constructor||_o(e)?{}:Bn(He(e))}function vo(e){return $a(e)||Ua(e)||!!(Xe&&e&&e[Xe])}function yo(e,t){var n=typeof e;return!!(t=null==t?u:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function bo(e,t,n){if(!Qa(n))return!1;var r=typeof t;return!!("number"==r?Ha(n)&&yo(t,n.length):"string"==r&&t in n)&&za(n[t],e)}function wo(e,t){if($a(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ss(e))||J.test(e)||!Z.test(e)||null!=t&&e in ke(t)}function xo(e){var t=oo(e),n=zn[t];if("function"!=typeof n||!(t in $n.prototype))return!1;if(e===n)return!0;var r=io(n);return!!r&&e===r[0]}(_n&&po(new _n(new ArrayBuffer(1)))!=F||Sn&&po(new Sn)!=x||kn&&po(kn.resolve())!=S||An&&po(new An)!=A||En&&po(new En)!=T)&&(po=function(e){var t=Sr(e),r=t==_?e.constructor:n,i=r?Do(r):"";if(i)switch(i){case Fn:return F;case Pn:return x;case Mn:return S;case Rn:return A;case Ln:return T}return t});var Co=Pe?Ka:gl;function _o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Fe)}function So(e){return e==e&&!Qa(e)}function ko(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in ke(r))}}function Ao(e,t,r){return t=vn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=vn(n.length-t,0),a=we(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=we(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),_t(e,this,s)}}function Eo(e,t){return t.length<2?e:Cr(e,ni(t,0,-1))}function Io(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var To=Mo(Qr),Oo=ht||function(e,t){return dt.setTimeout(e,t)},Fo=Mo(ei);function Po(e,t,n){var r=t+"";return Fo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return kt(f,function(n){var r="_."+n[0];t&n[1]&&!Tt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(r),n)))}function Mo(e){var t=0,r=0;return function(){var i=bn(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Ro(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r<t;){var a=Yr(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Lo=function(e){var t=Ma(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)}),t});function jo(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Do(e){if(null!=e){try{return Me.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function No(e){if(e instanceof $n)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zo=Xr(function(e,t){return Ga(e)?ur(e,mr(t,1,Ga,!0)):[]}),Bo=Xr(function(e,t){var r=Xo(t);return Ga(r)&&(r=n),Ga(e)?ur(e,mr(t,1,Ga,!0),so(r,2)):[]}),Vo=Xr(function(e,t){var r=Xo(t);return Ga(r)&&(r=n),Ga(e)?ur(e,mr(t,1,Ga,!0),n,r):[]});function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=vn(r+i,0)),Nt(e,so(t,3),i)}function $o(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==n&&(o=fs(r),o=r<0?vn(i+o,0):yn(o,i-1)),Nt(e,so(t,3),o,!0)}function Wo(e){return null!=e&&e.length?mr(e,1):[]}function Ho(e){return e&&e.length?e[0]:n}var Go=Xr(function(e){var t=Ft(e,mi);return t.length&&t[0]===e[0]?Ir(t):[]}),Yo=Xr(function(e){var t=Xo(e),r=Ft(e,mi);return t===Xo(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Ir(r,so(t,2)):[]}),qo=Xr(function(e){var t=Xo(e),r=Ft(e,mi);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Ir(r,n,t):[]});function Xo(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Ko=Xr(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?Hr(e,t):e}var Jo=to(function(e,t){var n=null==e?0:e.length,r=or(e,t);return Gr(e,Ft(t,function(e){return yo(e,n)?+e:e}).sort(ki)),r});function Qo(e){return null==e?e:Cn.call(e)}var ea=Xr(function(e){return ci(mr(e,1,Ga,!0))}),ta=Xr(function(e){var t=Xo(e);return Ga(t)&&(t=n),ci(mr(e,1,Ga,!0),so(t,2))}),na=Xr(function(e){var t=Xo(e);return t="function"==typeof t?t:n,ci(mr(e,1,Ga,!0),n,t)});function ra(e){if(!e||!e.length)return[];var t=0;return e=It(e,function(e){if(Ga(e))return t=vn(e.length,t),!0}),Yt(t,function(t){return Ft(e,$t(t))})}function ia(e,t){if(!e||!e.length)return[];var r=ra(e);return null==t?r:Ft(r,function(e){return _t(t,n,e)})}var oa=Xr(function(e,t){return Ga(e)?ur(e,t):[]}),aa=Xr(function(e){return pi(It(e,Ga))}),sa=Xr(function(e){var t=Xo(e);return Ga(t)&&(t=n),pi(It(e,Ga),so(t,2))}),la=Xr(function(e){var t=Xo(e);return t="function"==typeof t?t:n,pi(It(e,Ga),n,t)}),ca=Xr(ra),ua=Xr(function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,ia(e,r)});function da(e){var t=zn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var fa=to(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&i instanceof $n&&yo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:n}),new Un(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e})):this.thru(o)}),pa=Oi(function(e,t,n){Re.call(e,n)?++e[n]:ir(e,n,1)}),ga=Di(Uo),ma=Di($o);function va(e,t){return($a(e)?kt:dr)(e,so(t,3))}function ya(e,t){return($a(e)?At:hr)(e,so(t,3))}var ba=Oi(function(e,t,n){Re.call(e,n)?e[n].push(t):ir(e,n,[t])}),wa=Xr(function(e,t,n){var r=-1,i="function"==typeof t,o=Ha(e)?we(e.length):[];return dr(e,function(e){o[++r]=i?_t(t,e,n):Tr(e,t,n)}),o}),xa=Oi(function(e,t,n){ir(e,n,t)});function Ca(e,t){return($a(e)?Ft:Nr)(e,so(t,3))}var _a=Oi(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Sa=Xr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&bo(e,t[0],t[1])?t=[]:n>2&&bo(t[0],t[1],t[2])&&(t=[t[0]]),$r(e,mr(t,1),[])}),ka=ut||function(){return dt.Date.now()};function Aa(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Ki(e,s,n,n,n,n,t)}function Ea(e,t){var i;if("function"!=typeof t)throw new Ie(r);return e=fs(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var Ia=Xr(function(e,t,n){var r=1;if(n.length){var i=sn(n,ao(Ia));r|=a}return Ki(e,r,t,n,i)}),Ta=Xr(function(e,t,n){var r=3;if(n.length){var i=sn(n,ao(Ta));r|=a}return Ki(t,r,e,n,i)});function Oa(e,t,i){var o,a,s,l,c,u,d=0,h=!1,f=!1,p=!0;if("function"!=typeof e)throw new Ie(r);function g(t){var r=o,i=a;return o=a=n,d=t,l=e.apply(i,r)}function m(e){var r=e-u;return u===n||r>=t||r<0||f&&e-d>=s}function v(){var e=ka();if(m(e))return y(e);c=Oo(v,function(e){var n=t-(e-u);return f?yn(n,s-(e-d)):n}(e))}function y(e){return c=n,p&&o?g(e):(o=a=n,l)}function b(){var e=ka(),r=m(e);if(o=arguments,a=this,u=e,r){if(c===n)return function(e){return d=e,c=Oo(v,t),h?g(e):l}(u);if(f)return xi(c),c=Oo(v,t),g(u)}return c===n&&(c=Oo(v,t)),l}return t=gs(t)||0,Qa(i)&&(h=!!i.leading,s=(f="maxWait"in i)?vn(gs(i.maxWait)||0,t):s,p="trailing"in i?!!i.trailing:p),b.cancel=function(){c!==n&&xi(c),d=0,o=u=a=c=n},b.flush=function(){return c===n?l:y(ka())},b}var Fa=Xr(function(e,t){return cr(e,1,t)}),Pa=Xr(function(e,t,n){return cr(e,gs(t)||0,n)});function Ma(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ie(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ma.Cache||Gn),n}function Ra(e){if("function"!=typeof e)throw new Ie(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ma.Cache=Gn;var La=bi(function(e,t){var n=(t=1==t.length&&$a(t[0])?Ft(t[0],Xt(so())):Ft(mr(t,1),Xt(so()))).length;return Xr(function(r){for(var i=-1,o=yn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return _t(e,this,r)})}),ja=Xr(function(e,t){var r=sn(t,ao(ja));return Ki(e,a,n,t,r)}),Da=Xr(function(e,t){var r=sn(t,ao(Da));return Ki(e,64,n,t,r)}),Na=to(function(e,t){return Ki(e,l,n,n,n,t)});function za(e,t){return e===t||e!=e&&t!=t}var Ba=Hi(kr),Va=Hi(function(e,t){return e>=t}),Ua=Or(function(){return arguments}())?Or:function(e){return es(e)&&Re.call(e,"callee")&&!Ye.call(e,"callee")},$a=we.isArray,Wa=vt?Xt(vt):function(e){return es(e)&&Sr(e)==O};function Ha(e){return null!=e&&Ja(e.length)&&!Ka(e)}function Ga(e){return es(e)&&Ha(e)}var Ya=jt||gl,qa=yt?Xt(yt):function(e){return es(e)&&Sr(e)==v};function Xa(e){if(!es(e))return!1;var t=Sr(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function Ka(e){if(!Qa(e))return!1;var t=Sr(e);return t==b||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==fs(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}function Qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=bt?Xt(bt):function(e){return es(e)&&po(e)==x};function ns(e){return"number"==typeof e||es(e)&&Sr(e)==C}function rs(e){if(!es(e)||Sr(e)!=_)return!1;var t=He(e);if(null===t)return!0;var n=Re.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Me.call(n)==Ne}var is=wt?Xt(wt):function(e){return es(e)&&Sr(e)==k},os=xt?Xt(xt):function(e){return es(e)&&po(e)==A};function as(e){return"string"==typeof e||!$a(e)&&es(e)&&Sr(e)==E}function ss(e){return"symbol"==typeof e||es(e)&&Sr(e)==I}var ls=Ct?Xt(Ct):function(e){return es(e)&&Ja(e.length)&&!!it[Sr(e)]},cs=Hi(Dr),us=Hi(function(e,t){return e<=t});function ds(e){if(!e)return[];if(Ha(e))return as(e)?dn(e):Ii(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=po(e);return(t==x?on:t==A?ln:zs)(e)}function hs(e){return e?(e=gs(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fs(e){var t=hs(e),n=t%1;return t==t?n?t-n:t:0}function ps(e){return e?ar(fs(e),0,h):0}function gs(e){if("number"==typeof e)return e;if(ss(e))return d;if(Qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=qt(e);var n=fe.test(e);return n||ge.test(e)?lt(e.slice(2),n?2:8):he.test(e)?d:+e}function ms(e){return Ti(e,Fs(e))}function vs(e){return null==e?"":li(e)}var ys=Fi(function(e,t){if(_o(t)||Ha(t))Ti(t,Os(t),e);else for(var n in t)Re.call(t,n)&&er(e,n,t[n])}),bs=Fi(function(e,t){Ti(t,Fs(t),e)}),ws=Fi(function(e,t,n,r){Ti(t,Fs(t),e,r)}),xs=Fi(function(e,t,n,r){Ti(t,Os(t),e,r)}),Cs=to(or),_s=Xr(function(e,t){e=ke(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&bo(t[0],t[1],o)&&(i=1);++r<i;)for(var a=t[r],s=Fs(a),l=-1,c=s.length;++l<c;){var u=s[l],d=e[u];(d===n||za(d,Fe[u])&&!Re.call(e,u))&&(e[u]=a[u])}return e}),Ss=Xr(function(e){return e.push(n,Ji),_t(Ms,n,e)});function ks(e,t,r){var i=null==e?n:Cr(e,t);return i===n?r:i}function As(e,t){return null!=e&&go(e,t,Er)}var Es=Bi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),e[t]=n},Qs(nl)),Is=Bi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),Re.call(e,t)?e[t].push(n):e[t]=[n]},so),Ts=Xr(Tr);function Os(e){return Ha(e)?Xn(e):Lr(e)}function Fs(e){return Ha(e)?Xn(e,!0):jr(e)}var Ps=Fi(function(e,t,n){Vr(e,t,n)}),Ms=Fi(function(e,t,n,r){Vr(e,t,n,r)}),Rs=to(function(e,t){var n={};if(null==e)return n;var r=!1;t=Ft(t,function(t){return t=yi(t,e),r||(r=t.length>1),t}),Ti(e,ro(e),n),r&&(n=sr(n,7,Qi));for(var i=t.length;i--;)ui(n,t[i]);return n}),Ls=to(function(e,t){return null==e?{}:function(e,t){return Wr(e,t,function(t,n){return As(e,n)})}(e,t)});function js(e,t){if(null==e)return{};var n=Ft(ro(e),function(e){return[e]});return t=so(t),Wr(e,n,function(e,n){return t(e,n[0])})}var Ds=Xi(Os),Ns=Xi(Fs);function zs(e){return null==e?[]:Kt(e,Os(e))}var Bs=Li(function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)});function Vs(e){return Xs(vs(e).toLowerCase())}function Us(e){return(e=vs(e))&&e.replace(ve,en).replace(Ze,"")}var $s=Li(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ws=Li(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Hs=Ri("toLowerCase"),Gs=Li(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Ys=Li(function(e,t,n){return e+(n?" ":"")+Xs(t)}),qs=Li(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Xs=Ri("toUpperCase");function Ks(e,t,r){return e=vs(e),(t=r?n:t)===n?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Zs=Xr(function(e,t){try{return _t(e,n,t)}catch(e){return Xa(e)?e:new Ce(e)}}),Js=to(function(e,t){return kt(t,function(t){t=jo(t),ir(e,t,Ia(e[t],e))}),e});function Qs(e){return function(){return e}}var el=Ni(),tl=Ni(!0);function nl(e){return e}function rl(e){return Rr("function"==typeof e?e:sr(e,1))}var il=Xr(function(e,t){return function(n){return Tr(n,e,t)}}),ol=Xr(function(e,t){return function(n){return Tr(e,n,t)}});function al(e,t,n){var r=Os(t),i=xr(t,r);null!=n||Qa(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=xr(t,Os(t)));var o=!(Qa(n)&&"chain"in n&&!n.chain),a=Ka(e);return kt(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ii(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Pt([this.value()],arguments))})}),e}function sl(){}var ll=Ui(Ft),cl=Ui(Et),ul=Ui(Lt);function dl(e){return wo(e)?$t(jo(e)):function(e){return function(t){return Cr(t,e)}}(e)}var hl=Wi(),fl=Wi(!0);function pl(){return[]}function gl(){return!1}var ml,vl=Vi(function(e,t){return e+t},0),yl=Yi("ceil"),bl=Vi(function(e,t){return e/t},1),wl=Yi("floor"),xl=Vi(function(e,t){return e*t},1),Cl=Yi("round"),_l=Vi(function(e,t){return e-t},0);return zn.after=function(e,t){if("function"!=typeof t)throw new Ie(r);return e=fs(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=Aa,zn.assign=ys,zn.assignIn=bs,zn.assignInWith=ws,zn.assignWith=xs,zn.at=Cs,zn.before=Ea,zn.bind=Ia,zn.bindAll=Js,zn.bindKey=Ta,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return $a(e)?e:[e]},zn.chain=da,zn.chunk=function(e,t,r){t=(r?bo(e,t,r):t===n)?1:vn(fs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=we(ft(i/t));o<i;)s[a++]=ni(e,o,o+=t);return s},zn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},zn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=we(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Pt($a(n)?Ii(n):[n],mr(t,1))},zn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?Ft(e,function(e){if("function"!=typeof e[1])throw new Ie(r);return[n(e[0]),e[1]]}):[],Xr(function(n){for(var r=-1;++r<t;){var i=e[r];if(_t(i[0],this,n))return _t(i[1],this,n)}})},zn.conforms=function(e){return function(e){var t=Os(e);return function(n){return lr(n,e,t)}}(sr(e,1))},zn.constant=Qs,zn.countBy=pa,zn.create=function(e,t){var n=Bn(e);return null==t?n:rr(n,t)},zn.curry=function e(t,r,i){var o=Ki(t,8,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},zn.curryRight=function e(t,r,i){var o=Ki(t,16,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},zn.debounce=Oa,zn.defaults=_s,zn.defaultsDeep=Ss,zn.defer=Fa,zn.delay=Pa,zn.difference=zo,zn.differenceBy=Bo,zn.differenceWith=Vo,zn.drop=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,(t=r||t===n?1:fs(t))<0?0:t,i):[]},zn.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,0,(t=i-(t=r||t===n?1:fs(t)))<0?0:t):[]},zn.dropRightWhile=function(e,t){return e&&e.length?hi(e,so(t,3),!0,!0):[]},zn.dropWhile=function(e,t){return e&&e.length?hi(e,so(t,3),!0):[]},zn.fill=function(e,t,r,i){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&bo(e,t,r)&&(r=0,i=o),function(e,t,r,i){var o=e.length;for((r=fs(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:fs(i))<0&&(i+=o),i=r>i?0:ps(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},zn.filter=function(e,t){return($a(e)?It:gr)(e,so(t,3))},zn.flatMap=function(e,t){return mr(Ca(e,t),1)},zn.flatMapDeep=function(e,t){return mr(Ca(e,t),c)},zn.flatMapDepth=function(e,t,r){return r=r===n?1:fs(r),mr(Ca(e,t),r)},zn.flatten=Wo,zn.flattenDeep=function(e){return null!=e&&e.length?mr(e,c):[]},zn.flattenDepth=function(e,t){return null!=e&&e.length?mr(e,t=t===n?1:fs(t)):[]},zn.flip=function(e){return Ki(e,512)},zn.flow=el,zn.flowRight=tl,zn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},zn.functions=function(e){return null==e?[]:xr(e,Os(e))},zn.functionsIn=function(e){return null==e?[]:xr(e,Fs(e))},zn.groupBy=ba,zn.initial=function(e){return null!=e&&e.length?ni(e,0,-1):[]},zn.intersection=Go,zn.intersectionBy=Yo,zn.intersectionWith=qo,zn.invert=Es,zn.invertBy=Is,zn.invokeMap=wa,zn.iteratee=rl,zn.keyBy=xa,zn.keys=Os,zn.keysIn=Fs,zn.map=Ca,zn.mapKeys=function(e,t){var n={};return t=so(t,3),br(e,function(e,r,i){ir(n,t(e,r,i),e)}),n},zn.mapValues=function(e,t){var n={};return t=so(t,3),br(e,function(e,r,i){ir(n,r,t(e,r,i))}),n},zn.matches=function(e){return zr(sr(e,1))},zn.matchesProperty=function(e,t){return Br(e,sr(t,1))},zn.memoize=Ma,zn.merge=Ps,zn.mergeWith=Ms,zn.method=il,zn.methodOf=ol,zn.mixin=al,zn.negate=Ra,zn.nthArg=function(e){return e=fs(e),Xr(function(t){return Ur(t,e)})},zn.omit=Rs,zn.omitBy=function(e,t){return js(e,Ra(so(t)))},zn.once=function(e){return Ea(2,e)},zn.orderBy=function(e,t,r,i){return null==e?[]:($a(t)||(t=null==t?[]:[t]),$a(r=i?n:r)||(r=null==r?[]:[r]),$r(e,t,r))},zn.over=ll,zn.overArgs=La,zn.overEvery=cl,zn.overSome=ul,zn.partial=ja,zn.partialRight=Da,zn.partition=_a,zn.pick=Ls,zn.pickBy=js,zn.property=dl,zn.propertyOf=function(e){return function(t){return null==e?n:Cr(e,t)}},zn.pull=Ko,zn.pullAll=Zo,zn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,so(n,2)):e},zn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Hr(e,t,n,r):e},zn.pullAt=Jo,zn.range=hl,zn.rangeRight=fl,zn.rearg=Na,zn.reject=function(e,t){return($a(e)?It:gr)(e,Ra(so(t,3)))},zn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=so(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Gr(e,i),n},zn.rest=function(e,t){if("function"!=typeof e)throw new Ie(r);return Xr(e,t=t===n?t:fs(t))},zn.reverse=Qo,zn.sampleSize=function(e,t,r){return t=(r?bo(e,t,r):t===n)?1:fs(t),($a(e)?Zn:Zr)(e,t)},zn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},zn.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Jr(e,t,r,i)},zn.shuffle=function(e){return($a(e)?Jn:ti)(e)},zn.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&bo(e,t,r)?(t=0,r=i):(t=null==t?0:fs(t),r=r===n?i:fs(r)),ni(e,t,r)):[]},zn.sortBy=Sa,zn.sortedUniq=function(e){return e&&e.length?ai(e):[]},zn.sortedUniqBy=function(e,t){return e&&e.length?ai(e,so(t,2)):[]},zn.split=function(e,t,r){return r&&"number"!=typeof r&&bo(e,t,r)&&(t=r=n),(r=r===n?h:r>>>0)?(e=vs(e))&&("string"==typeof t||null!=t&&!is(t))&&!(t=li(t))&&rn(e)?wi(dn(e),0,r):e.split(t,r):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new Ie(r);return t=null==t?0:vn(fs(t),0),Xr(function(n){var r=n[t],i=wi(n,0,t);return r&&Pt(i,r),_t(e,this,i)})},zn.tail=function(e){var t=null==e?0:e.length;return t?ni(e,1,t):[]},zn.take=function(e,t,r){return e&&e.length?ni(e,0,(t=r||t===n?1:fs(t))<0?0:t):[]},zn.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,(t=i-(t=r||t===n?1:fs(t)))<0?0:t,i):[]},zn.takeRightWhile=function(e,t){return e&&e.length?hi(e,so(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?hi(e,so(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new Ie(r);return Qa(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Oa(e,t,{leading:i,maxWait:t,trailing:o})},zn.thru=ha,zn.toArray=ds,zn.toPairs=Ds,zn.toPairsIn=Ns,zn.toPath=function(e){return $a(e)?Ft(e,jo):ss(e)?[e]:Ii(Lo(vs(e)))},zn.toPlainObject=ms,zn.transform=function(e,t,n){var r=$a(e),i=r||Ya(e)||ls(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Qa(e)&&Ka(o)?Bn(He(e)):{}}return(i?kt:br)(e,function(e,r,i){return t(n,e,r,i)}),n},zn.unary=function(e){return Aa(e,1)},zn.union=ea,zn.unionBy=ta,zn.unionWith=na,zn.uniq=function(e){return e&&e.length?ci(e):[]},zn.uniqBy=function(e,t){return e&&e.length?ci(e,so(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?ci(e,n,t):[]},zn.unset=function(e,t){return null==e||ui(e,t)},zn.unzip=ra,zn.unzipWith=ia,zn.update=function(e,t,n){return null==e?e:di(e,t,vi(n))},zn.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:di(e,t,vi(r),i)},zn.values=zs,zn.valuesIn=function(e){return null==e?[]:Kt(e,Fs(e))},zn.without=oa,zn.words=Ks,zn.wrap=function(e,t){return ja(vi(t),e)},zn.xor=aa,zn.xorBy=sa,zn.xorWith=la,zn.zip=ca,zn.zipObject=function(e,t){return gi(e||[],t||[],er)},zn.zipObjectDeep=function(e,t){return gi(e||[],t||[],Jr)},zn.zipWith=ua,zn.entries=Ds,zn.entriesIn=Ns,zn.extend=bs,zn.extendWith=ws,al(zn,zn),zn.add=vl,zn.attempt=Zs,zn.camelCase=Bs,zn.capitalize=Vs,zn.ceil=yl,zn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=gs(r))==r?r:0),t!==n&&(t=(t=gs(t))==t?t:0),ar(gs(e),t,r)},zn.clone=function(e){return sr(e,4)},zn.cloneDeep=function(e){return sr(e,5)},zn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:n)},zn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:n)},zn.conformsTo=function(e,t){return null==t||lr(e,t,Os(t))},zn.deburr=Us,zn.defaultTo=function(e,t){return null==e||e!=e?t:e},zn.divide=bl,zn.endsWith=function(e,t,r){e=vs(e),t=li(t);var i=e.length,o=r=r===n?i:ar(fs(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},zn.eq=za,zn.escape=function(e){return(e=vs(e))&&Y.test(e)?e.replace(H,tn):e},zn.escapeRegExp=function(e){return(e=vs(e))&&te.test(e)?e.replace(ee,"\\$&"):e},zn.every=function(e,t,r){var i=$a(e)?Et:fr;return r&&bo(e,t,r)&&(t=n),i(e,so(t,3))},zn.find=ga,zn.findIndex=Uo,zn.findKey=function(e,t){return Dt(e,so(t,3),br)},zn.findLast=ma,zn.findLastIndex=$o,zn.findLastKey=function(e,t){return Dt(e,so(t,3),wr)},zn.floor=wl,zn.forEach=va,zn.forEachRight=ya,zn.forIn=function(e,t){return null==e?e:vr(e,so(t,3),Fs)},zn.forInRight=function(e,t){return null==e?e:yr(e,so(t,3),Fs)},zn.forOwn=function(e,t){return e&&br(e,so(t,3))},zn.forOwnRight=function(e,t){return e&&wr(e,so(t,3))},zn.get=ks,zn.gt=Ba,zn.gte=Va,zn.has=function(e,t){return null!=e&&go(e,t,Ar)},zn.hasIn=As,zn.head=Ho,zn.identity=nl,zn.includes=function(e,t,n,r){e=Ha(e)?e:zs(e),n=n&&!r?fs(n):0;var i=e.length;return n<0&&(n=vn(i+n,0)),as(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&zt(e,t,n)>-1},zn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=vn(r+i,0)),zt(e,t,i)},zn.inRange=function(e,t,r){return t=hs(t),r===n?(r=t,t=0):r=hs(r),function(e,t,n){return e>=yn(t,n)&&e<vn(t,n)}(e=gs(e),t,r)},zn.invoke=Ts,zn.isArguments=Ua,zn.isArray=$a,zn.isArrayBuffer=Wa,zn.isArrayLike=Ha,zn.isArrayLikeObject=Ga,zn.isBoolean=function(e){return!0===e||!1===e||es(e)&&Sr(e)==m},zn.isBuffer=Ya,zn.isDate=qa,zn.isElement=function(e){return es(e)&&1===e.nodeType&&!rs(e)},zn.isEmpty=function(e){if(null==e)return!0;if(Ha(e)&&($a(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||ls(e)||Ua(e)))return!e.length;var t=po(e);if(t==x||t==A)return!e.size;if(_o(e))return!Lr(e).length;for(var n in e)if(Re.call(e,n))return!1;return!0},zn.isEqual=function(e,t){return Fr(e,t)},zn.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?Fr(e,t,n,r):!!i},zn.isError=Xa,zn.isFinite=function(e){return"number"==typeof e&&Wt(e)},zn.isFunction=Ka,zn.isInteger=Za,zn.isLength=Ja,zn.isMap=ts,zn.isMatch=function(e,t){return e===t||Pr(e,t,co(t))},zn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Pr(e,t,co(t),r)},zn.isNaN=function(e){return ns(e)&&e!=+e},zn.isNative=function(e){if(Co(e))throw new Ce("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(e)},zn.isNil=function(e){return null==e},zn.isNull=function(e){return null===e},zn.isNumber=ns,zn.isObject=Qa,zn.isObjectLike=es,zn.isPlainObject=rs,zn.isRegExp=is,zn.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=u},zn.isSet=os,zn.isString=as,zn.isSymbol=ss,zn.isTypedArray=ls,zn.isUndefined=function(e){return e===n},zn.isWeakMap=function(e){return es(e)&&po(e)==T},zn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Sr(e)},zn.join=function(e,t){return null==e?"":gn.call(e,t)},zn.kebabCase=$s,zn.last=Xo,zn.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=fs(r))<0?vn(i+o,0):yn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Nt(e,Vt,o,!0)},zn.lowerCase=Ws,zn.lowerFirst=Hs,zn.lt=cs,zn.lte=us,zn.max=function(e){return e&&e.length?pr(e,nl,kr):n},zn.maxBy=function(e,t){return e&&e.length?pr(e,so(t,2),kr):n},zn.mean=function(e){return Ut(e,nl)},zn.meanBy=function(e,t){return Ut(e,so(t,2))},zn.min=function(e){return e&&e.length?pr(e,nl,Dr):n},zn.minBy=function(e,t){return e&&e.length?pr(e,so(t,2),Dr):n},zn.stubArray=pl,zn.stubFalse=gl,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=xl,zn.nth=function(e,t){return e&&e.length?Ur(e,fs(t)):n},zn.noConflict=function(){return dt._===this&&(dt._=ze),this},zn.noop=sl,zn.now=ka,zn.pad=function(e,t,n){e=vs(e);var r=(t=fs(t))?un(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return $i(gt(i),n)+e+$i(ft(i),n)},zn.padEnd=function(e,t,n){e=vs(e);var r=(t=fs(t))?un(e):0;return t&&r<t?e+$i(t-r,n):e},zn.padStart=function(e,t,n){e=vs(e);var r=(t=fs(t))?un(e):0;return t&&r<t?$i(t-r,n)+e:e},zn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(vs(e).replace(ne,""),t||0)},zn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&bo(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=hs(e),t===n?(t=e,e=0):t=hs(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=xn();return yn(e+o*(t-e+st("1e-"+((o+"").length-1))),t)}return Yr(e,t)},zn.reduce=function(e,t,n){var r=$a(e)?Mt:Ht,i=arguments.length<3;return r(e,so(t,4),n,i,dr)},zn.reduceRight=function(e,t,n){var r=$a(e)?Rt:Ht,i=arguments.length<3;return r(e,so(t,4),n,i,hr)},zn.repeat=function(e,t,r){return t=(r?bo(e,t,r):t===n)?1:fs(t),qr(vs(e),t)},zn.replace=function(){var e=arguments,t=vs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(e,t,r){var i=-1,o=(t=yi(t,e)).length;for(o||(o=1,e=n);++i<o;){var a=null==e?n:e[jo(t[i])];a===n&&(i=o,a=r),e=Ka(a)?a.call(e):a}return e},zn.round=Cl,zn.runInContext=e,zn.sample=function(e){return($a(e)?Kn:Kr)(e)},zn.size=function(e){if(null==e)return 0;if(Ha(e))return as(e)?un(e):e.length;var t=po(e);return t==x||t==A?e.size:Lr(e).length},zn.snakeCase=Gs,zn.some=function(e,t,r){var i=$a(e)?Lt:ri;return r&&bo(e,t,r)&&(t=n),i(e,so(t,3))},zn.sortedIndex=function(e,t){return ii(e,t)},zn.sortedIndexBy=function(e,t,n){return oi(e,t,so(n,2))},zn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ii(e,t);if(r<n&&za(e[r],t))return r}return-1},zn.sortedLastIndex=function(e,t){return ii(e,t,!0)},zn.sortedLastIndexBy=function(e,t,n){return oi(e,t,so(n,2),!0)},zn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ii(e,t,!0)-1;if(za(e[n],t))return n}return-1},zn.startCase=Ys,zn.startsWith=function(e,t,n){return e=vs(e),n=null==n?0:ar(fs(n),0,e.length),t=li(t),e.slice(n,n+t.length)==t},zn.subtract=_l,zn.sum=function(e){return e&&e.length?Gt(e,nl):0},zn.sumBy=function(e,t){return e&&e.length?Gt(e,so(t,2)):0},zn.template=function(e,t,r){var i=zn.templateSettings;r&&bo(e,t,r)&&(t=n),e=vs(e),t=ws({},t,i,Zi);var o,a,s=ws({},t.imports,i.imports,Zi),l=Os(s),c=Kt(s,l),u=0,d=t.interpolate||ye,h="__p += '",f=Ae((t.escape||ye).source+"|"+d.source+"|"+(d===K?ue:ye).source+"|"+(t.evaluate||ye).source+"|$","g"),p="//# sourceURL="+(Re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(f,function(t,n,r,i,s,l){return r||(r=i),h+=e.slice(u,l).replace(be,nn),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t}),h+="';\n";var g=Re.call(t,"variable")&&t.variable;if(g){if(le.test(g))throw new Ce("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(V,""):h).replace(U,"$1").replace($,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=Zs(function(){return _e(l,p+"return "+h).apply(n,c)});if(m.source=h,Xa(m))throw m;return m},zn.times=function(e,t){if((e=fs(e))<1||e>u)return[];var n=h,r=yn(e,h);t=so(t),e-=h;for(var i=Yt(r,t);++n<e;)t(n);return i},zn.toFinite=hs,zn.toInteger=fs,zn.toLength=ps,zn.toLower=function(e){return vs(e).toLowerCase()},zn.toNumber=gs,zn.toSafeInteger=function(e){return e?ar(fs(e),-9007199254740991,u):0===e?e:0},zn.toString=vs,zn.toUpper=function(e){return vs(e).toUpperCase()},zn.trim=function(e,t,r){if((e=vs(e))&&(r||t===n))return qt(e);if(!e||!(t=li(t)))return e;var i=dn(e),o=dn(t);return wi(i,Jt(i,o),Qt(i,o)+1).join("")},zn.trimEnd=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.slice(0,hn(e)+1);if(!e||!(t=li(t)))return e;var i=dn(e);return wi(i,0,Qt(i,dn(t))+1).join("")},zn.trimStart=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.replace(ne,"");if(!e||!(t=li(t)))return e;var i=dn(e);return wi(i,Jt(i,dn(t))).join("")},zn.truncate=function(e,t){var r=30,i="...";if(Qa(t)){var o="separator"in t?t.separator:o;r="length"in t?fs(t.length):r,i="omission"in t?li(t.omission):i}var a=(e=vs(e)).length;if(rn(e)){var s=dn(e);a=s.length}if(r>=a)return e;var l=r-un(i);if(l<1)return i;var c=s?wi(s,0,l).join(""):e.slice(0,l);if(o===n)return c+i;if(s&&(l+=c.length-l),is(o)){if(e.slice(l).search(o)){var u,d=c;for(o.global||(o=Ae(o.source,vs(de.exec(o))+"g")),o.lastIndex=0;u=o.exec(d);)var h=u.index;c=c.slice(0,h===n?l:h)}}else if(e.indexOf(li(o),l)!=l){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+i},zn.unescape=function(e){return(e=vs(e))&&G.test(e)?e.replace(W,fn):e},zn.uniqueId=function(e){var t=++Le;return vs(e)+t},zn.upperCase=qs,zn.upperFirst=Xs,zn.each=va,zn.eachRight=ya,zn.first=Ho,al(zn,(ml={},br(zn,function(e,t){Re.call(zn.prototype,t)||(ml[t]=e)}),ml),{chain:!1}),zn.VERSION="4.17.21",kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){zn[e].placeholder=zn}),kt(["drop","take"],function(e,t){$n.prototype[e]=function(r){r=r===n?1:vn(fs(r),0);var i=this.__filtered__&&!t?new $n(this):this.clone();return i.__filtered__?i.__takeCount__=yn(r,i.__takeCount__):i.__views__.push({size:yn(r,h),type:e+(i.__dir__<0?"Right":"")}),i},$n.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),kt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;$n.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),kt(["head","last"],function(e,t){var n="take"+(t?"Right":"");$n.prototype[e]=function(){return this[n](1).value()[0]}}),kt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");$n.prototype[e]=function(){return this.__filtered__?new $n(this):this[n](1)}}),$n.prototype.compact=function(){return this.filter(nl)},$n.prototype.find=function(e){return this.filter(e).head()},$n.prototype.findLast=function(e){return this.reverse().find(e)},$n.prototype.invokeMap=Xr(function(e,t){return"function"==typeof e?new $n(this):this.map(function(n){return Tr(n,e,t)})}),$n.prototype.reject=function(e){return this.filter(Ra(so(e)))},$n.prototype.slice=function(e,t){e=fs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new $n(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=fs(t))<0?r.dropRight(-t):r.take(t-e)),r)},$n.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$n.prototype.toArray=function(){return this.take(h)},br($n.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=zn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(zn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof $n,c=s[0],u=l||$a(t),d=function(e){var t=o.apply(zn,Pt([e],s));return i&&h?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,f=!!this.__actions__.length,p=a&&!h,g=l&&!f;if(!a&&u){t=g?t:new $n(this);var m=e.apply(t,s);return m.__actions__.push({func:ha,args:[d],thisArg:n}),new Un(m,h)}return p&&g?e.apply(this,s):(m=this.thru(d),p?i?m.value()[0]:m.value():m)})}),kt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Te[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply($a(i)?i:[],e)}return this[n](function(n){return t.apply($a(n)?n:[],e)})}}),br($n.prototype,function(e,t){var n=zn[t];if(n){var r=n.name+"";Re.call(On,r)||(On[r]=[]),On[r].push({name:t,func:n})}}),On[zi(n,2).name]=[{name:"wrapper",func:n}],$n.prototype.clone=function(){var e=new $n(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},$n.prototype.reverse=function(){if(this.__filtered__){var e=new $n(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$n.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=$a(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=yn(t,e+a);break;case"takeRight":e=vn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,d=u.length,h=0,f=yn(l,this.__takeCount__);if(!n||!r&&i==l&&f==l)return fi(e,this.__actions__);var p=[];e:for(;l--&&h<f;){for(var g=-1,m=e[c+=t];++g<d;){var v=u[g],y=v.iteratee,b=v.type,w=y(m);if(2==b)m=w;else if(!w){if(1==b)continue e;break e}}p[h++]=m}return p},zn.prototype.at=fa,zn.prototype.chain=function(){return da(this)},zn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===n&&(this.__values__=ds(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var t,r=this;r instanceof Vn;){var i=No(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $n){var t=e;return this.__actions__.length&&(t=new $n(this)),(t=t.reverse()).__actions__.push({func:ha,args:[Qo],thisArg:n}),new Un(t,this.__chain__)}return this.thru(Qo)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Je&&(zn.prototype[Je]=function(){return this}),zn}();ft?((ft.exports=pn)._=pn,ht._=pn):dt._=pn}).call(si)}(ai,ai.exports)),ai.exports);const ci=s({state:{},actions:{},options:{}}),ui=()=>l(ci),di=({children:t,options:n})=>{var r;const[s,l]=o([]),[u,d]=o([]),[h,f]=o(null),[p,g]=o(n.searchQuery||""),[m,v]=o(n.sortBySize||"name"),{config:y}=n,[b,w]=o("date"),[x,C]=o("desc"),[_,S]=o([{id:"folders",name:"Папки"}]),[k,A]=o(new Set),[E,I]=o("");i.useEffect(()=>{A(new Set)},[]);const O=i.useRef(null);i.useEffect(()=>{if(n.onChangeSelection&&O.current!==k){if(null!==O.current){const e=(Array.isArray(u)?u:[]).filter(e=>k.has(e.id));n.onChangeSelection(e)}O.current=k}},[u,k,n.onChangeSelection,n]);const[F,P]=o(!1),[M,R]=o(qt);a(()=>{(null==y?void 0:y.activeLibraryItem)&&R&&R(null==y?void 0:y.activeLibraryItem)},[null==y?void 0:y.activeLibraryItem,R]);const[L,j]=o({current:1,pageSize:12,total:0}),[D]=T.useForm(),[N]=T.useForm(),[z]=T.useForm(),[B]=T.useForm(),[V]=T.useForm(),[U]=T.useForm(),[$,W]=o(!1),[H,G]=o(!1),[Y,q]=o(!1),[X,K]=o(!1),[Z,J]=o(!1),[Q,ee]=o(!1),[te,ne]=o(!1),[re,ie]=o(null),[oe,ae]=o(null),[se,le]=o(null),ce=c(e=>{j(t=>Object.assign(Object.assign({},t),e))},[j]),ue=c(e=>{A(null!=e?e:new Set)},[A]);a(()=>{ue()},[M,ue]);const de={folders:s,files:u,selectedFolder:h,searchTerm:p,sortField:m,sortBy:b,sortOrder:x,pathHistory:_,selectedFiles:k,currentMenuFile:E,loading:F,pagination:L,isModalVisible:$,isUrlModalVisible:H,isRenameModalVisible:Y,isMoveModalVisible:X,isRenameFolderModalVisible:Z,isCopyModalVisible:Q,isDeleteConfirmVisible:te,form:D,urlForm:N,renameForm:z,moveForm:B,renameFolderForm:V,copyForm:U,fileToRename:re,folderToRename:oe,activeLibraryItem:M,multiSelect:null===(r=null==y?void 0:y.multiSelect)||void 0===r||r,undoDeletion:se},he={setFolders:l,setFiles:d,setSelectedFolder:f,setSearchTerm:g,setSortField:v,setSortBy:w,setSortOrder:C,setPathHistory:S,setSelectedFiles:ue,setLoading:P,setPagination:ce,setIsModalVisible:W,setIsUrlModalVisible:G,setIsRenameModalVisible:q,setIsMoveModalVisible:K,setIsRenameFolderModalVisible:J,setIsCopyModalVisible:ee,setIsDeleteConfirmVisible:ne,setFileToRename:ie,setFolderToRename:ae,setUndoDeletion:le,updatePathHistoryOnFolderRename:(e,t)=>{S(n=>n.map(n=>n.id===e?Object.assign(Object.assign({},n),{name:t}):n))},setActiveLibraryItem:R,setCurrentMenuFile:I},fe={state:de,actions:he,options:n};return e(ci.Provider,{value:fe,children:t})},hi=e=>null===e.parentId||"null"===e.parentId||!e.parentId,fi=async(e,t,n)=>{var r;if(console.log("📁 addSubfoldersToFiles: params:",JSON.stringify(t,null,2)),"file"===(null==t?void 0:t.itemType))return e;let i=[];if(!n)return console.warn("🔍 getFolders не доступен!"),e;{const e=await n({parentId:t.folderId});i=Array.isArray(e)?e:[],console.log("📁 Получено папок от dataProvider:",i.length,"тип данных:",typeof e,"данные:",e)}let o=((e,t)=>{const n=Array.isArray(e)?e:[];return(r=t.folderId)&&"root"!==r&&"folders"!==r&&"null"!==r&&null!==r?n.filter(e=>e.parentId===t.folderId):n.filter(hi);var r})(i,t);if(null===(r=null==t?void 0:t.search)||void 0===r?void 0:r.trim()){const e=t.search.trim().toLowerCase();o=o.filter(t=>{var n;return null===(n=t.name)||void 0===n?void 0:n.toLowerCase().includes(e)})}if(console.log("📁 Найдено подпапок для добавления:",o.length),0===o.length)return e;const a=o.map(e=>({id:e.id,name:e.name,size:void 0,date:"-",isFolder:!0,folderId:e.parentId||"",type:"",selected:!1,extension:""}));if("folder"===(null==t?void 0:t.itemType))return a;const s=[...a,...e];return console.log("📁 РЕЗУЛЬТАТ: папок:",a.length,"файлов:",e.length,"всего:",s.length),s},pi=e=>{var t,n,r,i;const{state:o,actions:s,options:l}=ui(),{searchTerm:d,sortBy:h,sortOrder:f,selectedFolder:p,pagination:g}=o,{setSearchTerm:m,setSortBy:v,setSortOrder:y,setPagination:b}=s,w=e||s.fetchFiles,x=u(null),C=u(li.debounce(e=>{const t=JSON.stringify(e);x.current!==t?(x.current=t,console.log("✅ Выполняется запрос:",e),null==w||w(e)):console.log("🚫 Дублированный запрос пропущен:",e)},150)).current,_=c(()=>{var e;const t=null===(e=null==l?void 0:l.config)||void 0===e?void 0:e.disablePagination;return{folderId:p||"",search:(null==d?void 0:d.trim())||void 0,page:t?void 0:g.current,limit:t?void 0:g.pageSize,sortBy:h,sortOrder:f,itemType:"all"}},[p,d,g.current,g.pageSize,h,f,null===(t=null==l?void 0:l.config)||void 0===t?void 0:t.disablePagination]),S=c(e=>{var t,n;if(console.log("🔎 useSortAndFilter: handleSearch вызван с:",e),m&&(console.log("🔎 useSortAndFilter: Обновляем searchTerm в стейте"),m(e)),b&&(console.log("🔎 useSortAndFilter: Сбрасываем пагинацию"),b({current:1,pageSize:g.pageSize,total:0})),console.log("🔎 useSortAndFilter: Проверяем fetchFiles:",!!w),w){console.log("🔎 useSortAndFilter: Вызываем fetchFiles с параметрами поиска");const r={folderId:p||"",search:(null==e?void 0:e.trim())||void 0,page:(null===(t=null==l?void 0:l.config)||void 0===t?void 0:t.disablePagination)?void 0:1,limit:(null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination)?void 0:g.pageSize,sortBy:h,sortOrder:f,itemType:"all"};console.log("🔎 useSortAndFilter: Параметры запроса:",r),w(r),console.log("🔎 useSortAndFilter: fetchFiles вызван!")}else console.error("🔎 useSortAndFilter: fetchFiles НЕ ОПРЕДЕЛЕНА!")},[m,b,g.pageSize,w,p,h,f,null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination]),k=c((e,t)=>{var n,r;null==v||v(e),null==y||y(t),w&&C({folderId:p||"",search:(null==d?void 0:d.trim())||void 0,page:(null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination)?void 0:g.current,limit:(null===(r=null==l?void 0:l.config)||void 0===r?void 0:r.disablePagination)?void 0:g.pageSize,sortBy:e,sortOrder:t,itemType:"all"})},[v,y,C,p,d,g.current,g.pageSize,null===(r=null==l?void 0:l.config)||void 0===r?void 0:r.disablePagination]),A=c((e,t)=>{var n;(null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination)||(b&&b({current:e,pageSize:t||g.pageSize,total:g.total}),w&&C({folderId:p||"",search:(null==d?void 0:d.trim())||void 0,page:e,limit:t||g.pageSize,sortBy:h,sortOrder:f,itemType:"all"}))},[b,g.pageSize,g.total,C,p,d,h,f,null===(i=null==l?void 0:l.config)||void 0===i?void 0:i.disablePagination]);return a(()=>{if(w){console.log("🔄 useSortAndFilter: изменение selectedFolder, загрузка файлов для папки:",p);const e=_();C(Object.assign(Object.assign({},e),{page:1}))}},[p]),a(()=>{w&&(console.log("🔄 useSortAndFilter: начальная загрузка файлов, selectedFolder:",p),C(_()))},[]),a(()=>()=>{var e;null===(e=C.cancel)||void 0===e||e.call(C)},[C]),{state:{searchTerm:d||"",sortBy:h||"name",sortOrder:f||"asc"},actions:{setSearchTerm:m||(()=>{}),setSortBy:v||(()=>{}),setSortOrder:y||(()=>{}),handleSearch:S,handleSort:k,handlePaginationChange:A,getCurrentQueryParams:_}}},gi=()=>{var e;const{notification:t}=I.useApp(),n=ui(),{options:r}=n,i=c(async e=>{let t;if(r.handleNotify){if(t=await r.handleNotify(e),!1===t)return!1;"object"==typeof t&&t&&(e=t)}if("error"===e.type&&r.handleError){if(t=await r.handleError(e),!1===t)return!1;"object"==typeof t&&t&&(e=t)}return("success"!==e.type||!r.handleSuccess||(t=await r.handleSuccess(e),!t))&&t},[r]),o=c(async function(e,n=!1){var o;const a=await i(e);if(!1===a||n||!1===(null===(o=r.config)||void 0===o?void 0:o.showNotifications))return;"object"==typeof a&&(e=a);const s=t[e.type];"function"==typeof s?s(e):console.warn(`Unknown notification type: ${e.type}`,e)},[t,i,null===(e=r.config)||void 0===e?void 0:e.showNotifications]);return d(()=>({error(e){o(Object.assign(Object.assign({},e),{type:"error"}))},success(e){o(Object.assign(Object.assign({},e),{type:"success"}))},warning(e){o(Object.assign(Object.assign({},e),{type:"warning"}))},notify:o}),[o])},mi={FileNotFound:"File not found or no longer available.",FileAlreadyExists:"File with this name already exists.",FileInvalidName:"File name is not valid.",FileAccessDenied:"You don't have permission to access this file.",FileReadError:"Failed to read the file.",FileWriteError:"Failed to write the file.",FileTooLarge:"File is too large to upload.",FileTypeNotAllowed:"This file type is not allowed.",FileCorrupted:"The file appears to be corrupted.",FileChecksumMismatch:"File integrity check failed.",FolderNotFound:"Folder not found or no longer available.",FolderAlreadyExists:"Folder with this name already exists.",FolderInvalidName:"Folder name is not valid.",FolderAccessDenied:"You don't have permission to access this folder.",FolderReadError:"Failed to read the folder contents.",FolderWriteError:"Failed to write to the folder.",FolderQuotaExceeded:"Folder storage quota exceeded.",FolderNotEmpty:"Folder is not empty.",FolderBackendError:"Server error while processing the folder.",FolderTimeout:"Folder operation took too long.",RenameNotAllowed:"Renaming is not allowed for this item.",MoveNotAllowed:"Moving is not allowed for this item.",CopyNotAllowed:"Copying is not allowed for this item.",DeleteNotAllowed:"Deleting is not allowed for this item.",MoveIntoSelf:"Cannot move an item into itself.",MoveIntoDescendant:"Cannot move an item into its descendant folder.",UnsupportedOperation:"This operation is not supported.",ConfigError:"Configuration error occurred.",FileUploadQuotaExceeded:"You have exceeded the upload quota.",FileUploadNetworkError:"Network error while uploading the file.",FileUploadTimeout:"File upload took too long.",FileUploadBackendError:"Server error while uploading the file.",UploadUrlInvalid:"The specified URL is not valid.",UploadUrlNotReachable:"The specified URL is not reachable.",UploadUrlContentTypeNotAllowed:"Content type at the URL is not allowed.",UploadUrlDownloadFailed:"Failed to download file from the URL.",FileDownloadNetworkError:"Network error while downloading the file.",FileDownloadTimeout:"File download took too long.",FileDownloadBackendError:"Server error while downloading the file.",BatchPartialFailure:"Some items could not be processed.",BatchAllFailed:"Failed to process all items in the batch.",BatchConflict:"Some items in the batch are in a conflicting state.",BatchValidationFailed:"Some items in the batch did not pass validation.",ValidationError:"Some of the provided data is invalid.",PayloadTooLarge:"Request payload is too large.",UnsupportedMediaType:"This media type is not supported.",NetworkError:"Network error. Please check your connection and try again.",BackendError:"Server error. Please try again later.",Timeout:"The operation took too long. Please try again.",AuthenticationFailed:"Authentication failed. Please sign in again.",AuthorizationFailed:"You are not allowed to perform this action.",RateLimitExceeded:"Too many requests. Please try again a bit later.",ServiceUnavailable:"Service is temporarily unavailable. Please try again later.",AIResponseInvalid:"AI service returned an invalid response.",AIImageGenerationFailed:"Failed to generate image using AI.",AIImageGenerationLimitExceeded:"You have reached the AI image generation limit.",IntegrationError:"Error in external integration.",ThirdPartyError:"Error in a third-party service.",UnknownError:"An unknown error occurred."},vi=(e,t)=>{if(!e)return;const n=mi[e];return n?t(n):void 0},yi=e=>{if(!e||"object"!=typeof e)return;return e.code?e:void 0},bi=()=>{var e,t;const{state:n,actions:i,options:o}=ui(),{t:a}=Nn(),s=gi(),{folders:l,selectedFolder:u,form:d,loading:h,isModalVisible:f}=n,{setFolders:p,setLoading:g,setIsModalVisible:m}=i,{dataProviders:v,config:y}=o,b=c(e=>(Array.isArray(e)?e:[]).filter(e=>e&&e.id&&e.name).map(e=>({id:e.id,name:e.name,parentId:e.folderId?e.folderId:null})),[]),w=c(async()=>{console.log("Запрос папок (через getFiles itemType=folder)..."),null==g||g(!0);try{let e=[];const t="lazy"===(null==y?void 0:y.folderTreeLoading);if(null==v?void 0:v.getFolders){const n=!t;e=await v.getFolders({parentId:null,deep:n})}else{if(!(null==v?void 0:v.getFiles))return void console.error("DataProvider для папок не определен");{const n=async e=>{const{files:r}=await v.getFiles({itemType:"folder",folderId:e||void 0}),i=b(r);if(t)return i;const o=await Promise.all(i.map(e=>n(e.id)));return[...i,...o.flat()]},r=await n(null),i=new Map(r.map(e=>[e.id,e]));e=Array.from(i.values())}}console.log("Полученные папки:",e);const n=Array.isArray(e)?e:[];null==p||p(n);const r=n.filter(e=>e.id===e.parentId);r.length>0&&console.warn("Обнаружены папки с циклическими зависимостями:",r)}catch(e){console.error("Ошибка при загрузке папок:",e);const t=yi(e),n=vi(null==t?void 0:t.code,a);s.error({id:"FOLDERS_FETCH_FAILED",message:null!=n?n:a("Failed to load folders"),placement:"bottomRight",innerException:e,data:{reason:e instanceof Error?e.message:String(e)}})}finally{null==g||g(!1)}},[null==v?void 0:v.getFiles,null==v?void 0:v.getFolders,p,g,null==y?void 0:y.folderTreeLoading,b,s,a]),x=c(async e=>{try{if(null==v?void 0:v.getFolders){const t=await v.getFolders({parentId:e,deep:!1}),n=Array.isArray(l)?l:[],r=new Map(n.map(e=>[e.id,e]));return t.forEach(e=>r.set(e.id,e)),null==p||p(Array.from(r.values())),t}if(null==v?void 0:v.getFiles){const{files:t}=await v.getFiles({itemType:"folder",folderId:e||void 0}),n=b(t),r=Array.isArray(l)?l:[],i=new Map(r.map(e=>[e.id,e]));return n.forEach(e=>i.set(e.id,e)),null==p||p(Array.from(i.values())),n}return[]}catch(e){return console.error("Ошибка при загрузке дочерних папок:",e),[]}},[null==v?void 0:v.getFiles,null==v?void 0:v.getFolders,l,p,b]),C=c(()=>{var e;const t=null!==(e=null==y?void 0:y.defaultFolderName)&&void 0!==e?e:a("Новая папка");d.setFieldsValue({folderName:t}),null==m||m(!0)},[d,m,a,null==y?void 0:y.defaultFolderName]),_=c(e=>{const t=[...(Array.isArray(l)?l:[]).filter(t=>t.id!==e.id),e];if(null==p||p(t),console.log("📂 Обновлен список папок, новая папка:",e),i.setSelectedFolder&&(i.setSelectedFolder(e.id),console.log("🎯 Выбрана созданная папка как активная:",e.id)),i.setPathHistory){const t=[...n.pathHistory||[],{id:e.id,name:e.name}];i.setPathHistory(t),console.log("🧭 Обновлен путь навигации:",t)}},[l,p,i,n.pathHistory]),S=c(async e=>{try{if(null==v?void 0:v.getFolders){const t=await v.getFolders(),n=(Array.isArray(t)?t:[]).some(t=>t.id===e);return console.log(n?"✅ Папка найдена:":"❌ Папка не найдена:",e),n}if(null==v?void 0:v.getFiles){const t=new Set,n=async r=>{const{files:i}=await v.getFiles({itemType:"folder",folderId:r||void 0}),o=b(i);for(const r of o){if(t.has(r.id))continue;if(t.add(r.id),r.id===e)return!0;if(await n(r.id))return!0}return!1},r=await n(null);return console.log(r?"✅ Папка найдена:":"❌ Папка не найдена:",e),r}}catch(e){console.warn("⚠️ Ошибка проверки папки:",e)}return!1},[null==v?void 0:v.getFolders,null==v?void 0:v.getFiles,b]),k=c(async e=>{var t;let n;console.log("handleModalOk currentForm",e);let r=null;try{const i=await(e?e.validateFields():d.validateFields());if(console.log("values",i),n=i.folderName.trim(),console.log("folderName",n),!n){const e=i.targetFolder||(u&&"folders"!==u?u:null);return void s.warning({id:"FOLDER_OPERATION_VALIDATION_FAILED",message:a("Folder name cannot be empty"),placement:"bottomRight",data:{folderName:n,folderId:null!=e?e:null,reason:"emptyName"}})}let o;if(r=i.targetFolder||(u&&"folders"!==u?u:null),console.log("🆕 Создание новой папки:",{folderName:n,parentId:r,selectedFolder:u}),!(null==v?void 0:v.createFolder))return void s.error({id:"FOLDER_CREATE_PROVIDER_NOT_CONFIGURED",message:a("Folder creation provider is not configured"),placement:"bottomRight",data:{folderName:n,folderId:null!=r?r:null}});o=await v.createFolder({name:n,parentId:r}),(e=>{if(!e||!e.id)throw new Error("Некорректный ответ от сервера: отсутствует ID папки");if(e.id===e.parentId&&e.parentId)throw console.error("Обнаружена циклическая зависимость: папка является родителем сама для себя"),new Error("Ошибка: папка не может быть родителем самой себя")})(o),_(o),s.success({id:"FOLDER_CREATE_SUCCESS",message:a("Folder created"),placement:"bottomRight",data:{itemIds:[o.id],folderId:null!==(t=o.parentId)&&void 0!==t?t:null,folderName:o.name}}),await w(),await new Promise(e=>setTimeout(e,200));if(await S(o.id)||console.warn("⚠️ Не удалось подтвердить создание папки на сервере, но продолжаем..."),e)return o;null==m||m(!1)}catch(e){console.error("❌ Ошибка при создании папки:",e);const t=yi(e),i=vi(null==t?void 0:t.code,a);s.error({id:"FOLDER_CREATE_FAILED",message:null!=i?i:a("Failed to create folder"),placement:"bottomRight",innerException:e,data:{folderName:n,folderId:null!=r?r:null,reason:e instanceof Error?e.message:String(e)}})}},[d,u,v,_,w,S,m,s,a]),A=c(()=>{null==m||m(!1)},[m]),E=c((e,t=new Set)=>{const n=Array.isArray(l)?l:[];return e.map(e=>{if(t.has(e.id))return console.warn(`Обнаружен цикл в структуре папок с id=${e.id}. Пропускаем обработку дочерних элементов.`),{key:e.id,label:e.name+" (ошибка)",icon:r.createElement(ie,{style:{color:"red"}})};const i=new Set(t);i.add(e.id);const o=n.filter(t=>t.parentId===e.id&&t.id!==e.id);return{key:e.id,label:e.name,children:o.length>0?E(o,i):void 0}})},[l]),I=c(()=>{const e=Array.isArray(l)?l:[],t={key:"folders",label:a("Folders"),children:[]},n=e.filter(e=>null===e.parentId||!e.parentId);return t.children=E(n),[t]},[l,a,E]),T=c(async(e,t)=>{var n,r,c,u;console.log("renameFolder");try{const d=t.trim(),h=null==l?void 0:l.find(t=>t.id===e);if(!d)return void s.warning({id:"FOLDER_OPERATION_VALIDATION_FAILED",message:a("Folder name cannot be empty"),placement:"bottomRight",data:{folderId:e,folderName:t,reason:"emptyName"}});if(!(!1!==(null===(n=null==y?void 0:y.features)||void 0===n?void 0:n.enableRenameFolder)))return void s.error({id:"FOLDER_RENAME_DISABLED_BY_CONFIG",message:a("Folder rename is disabled by config"),placement:"bottomRight",data:{itemId:e,itemName:null!==(r=null==h?void 0:h.name)&&void 0!==r?r:d}});if(!(null===(c=o.dataProviders)||void 0===c?void 0:c.renameFolder))return void s.error({id:"FOLDER_RENAME_FAILED",message:a("Folder rename provider is not configured"),placement:"bottomRight",data:{itemId:e,itemName:d,reason:"providerNotConfigured"}});const f=await o.dataProviders.renameFolder(e,d);if(!(null==f?void 0:f.id))return void s.error({id:"FOLDER_RENAME_FAILED",message:a("Unexpected response when renaming folder"),placement:"bottomRight",data:{itemId:e,itemName:d,reason:"invalidResponse"}});await w(),e!==f.id&&i.setSelectedFolder&&i.setSelectedFolder(f.id),s.success({id:"FOLDER_RENAME_SUCCESS",message:a("Folder renamed"),placement:"bottomRight",data:{itemId:f.id,itemName:f.name,folderId:null!==(u=f.parentId)&&void 0!==u?u:null}})}catch(n){console.error("Ошибка при переименовании папки:",n),s.error({id:"FOLDER_RENAME_FAILED",message:a("Failed to rename folder"),placement:"bottomRight",innerException:n,data:{itemId:e,itemName:t,reason:n instanceof Error?n.message:String(n)}})}},[w,l,null===(e=o.dataProviders)||void 0===e?void 0:e.renameFolder,null===(t=null==y?void 0:y.features)||void 0===t?void 0:t.enableRenameFolder,i.setSelectedFolder,s,a]);return{state:{folders:l,isCreatingFolder:f,loading:h},actions:{fetchFolders:w,fetchChildFolders:x,handleCreateFolder:C,handleModalOk:k,handleModalCancel:A,generateMenuItems:I,renameFolder:T}}},wi=()=>{var e,t;const{state:n,actions:r,options:o}=ui(),a=pi(),{sortBy:s,sortOrder:l}=a.state,{actions:{fetchFolders:u}}=bi(),{t:d}=Nn(),h=gi(),{selectedFolder:f,urlForm:p,pagination:g,files:m}=n,v=i.useRef(null);v.current=g;const{setFiles:y,setLoading:b,setIsUrlModalVisible:w,setSelectedFiles:x,setActiveLibraryItem:C,setPagination:_}=r,{dataProviders:S}=o,k=c(async e=>{var t,n,r;if(!(null==S?void 0:S.getFiles))return[];const i=null===(t=null==o?void 0:o.config)||void 0===t?void 0:t.disablePagination,{files:a,pagination:s}=await S.getFiles({folderId:"folders"!==(null==e?void 0:e.folderId)?null==e?void 0:e.folderId:void 0,search:(null===(n=null==e?void 0:e.search)||void 0===n?void 0:n.trim())||void 0,sortBy:null==e?void 0:e.sortBy,sortOrder:null==e?void 0:e.sortOrder,page:i||null==e?void 0:e.page,limit:i||null==e?void 0:e.limit,itemType:(null==e?void 0:e.itemType)||"all"});return console.warn("🔍 fetchFilesFromDataProvider результат:",a,"с параметрами сортировки:",{sortBy:null==e?void 0:e.sortBy,sortOrder:null==e?void 0:e.sortOrder}),_&&((null===(r=null==o?void 0:o.config)||void 0===r?void 0:r.disablePagination)?_({current:1,pageSize:a.length||1,total:a.length||0}):s&&_({current:s.page,pageSize:s.limit,total:s.total})),a},[S,null===(e=null==o?void 0:o.config)||void 0===e?void 0:e.disablePagination,_]),A=c(async e=>{try{null==b||b(!0),console.warn("fetchFiles вызван с параметрами:",e);let t=[];if(!(null==S?void 0:S.getFiles))return void console.error("DataProvider для получения файлов не определен");t=await k(e),console.warn("Получены файлы:",t);const n=null!=e?e:{folderId:f||"",itemType:"all"};"file"!==n.itemType&&(t=await fi(t,n,null==S?void 0:S.getFolders)),"Trash"!==(f||"")&&(t=t.filter(e=>!(e.isFolder&&"Trash"===e.id))),null==y||y(t),null==x||x(new Set)}catch(t){console.error("Ошибка при загрузке файлов:",t);const n=yi(t),r=vi(null==n?void 0:n.code,d);h.error({id:"FILES_FETCH_FAILED",message:null!=r?r:"Не удалось загрузить файлы",placement:"bottomRight",innerException:t,data:{params:e}})}finally{null==b||b(!1)}},[S,y,b,x,k,f,h]),E=c(async e=>{var t,n;const r=v.current;try{const i=f||null;if(null==S?void 0:S.deleteItems){const r=await S.deleteItems([e]);if(!r.success&&!(null===(t=r.detailed)||void 0===t?void 0:t.every(e=>e.success))){const t=yi(r.error),o=vi(null==t?void 0:t.code,d);throw h.error({id:"FILES_DELETE_ERROR",message:null!=o?o:d("Files deleted"),innerException:r.error,placement:"bottomRight",data:{failCount:1,totalCount:1,itemIds:[e],folderId:i,errors:null===(n=r.detailed)||void 0===n?void 0:n.filter(e=>!e.success).map(e=>({itemId:e.requestId,reason:e.error?String(e.error):void 0,code:e.code}))}}),new Error("Не удалось удалить файлы")}h.success({id:"FILES_DELETE_SUCCESS",message:d("Files deleted"),placement:"bottomRight",data:{successCount:1,totalCount:1,itemIds:[e],folderId:i}})}else{if(!(null==S?void 0:S.deleteFile))return void h.error({id:"FILES_DELETE_ERROR",message:"DataProvider для удаления файлов не настроен",placement:"bottomRight",data:{failCount:1,totalCount:1,itemIds:[e],folderId:i}});if(!await S.deleteFile(e))throw new Error("Не удалось удалить файл");h.success({id:"FILES_DELETE_SUCCESS",message:d("File deleted"),placement:"bottomRight",data:{successCount:1,totalCount:1,itemIds:[e],folderId:i}})}await A({folderId:f||"",page:m.length>=1?r.current:r.current-1,limit:r.pageSize,sortBy:s,sortOrder:l})}catch(t){console.error("Ошибка при удалении файла:",t),h.error({id:"FILES_DELETE_ERROR",message:d("Error when deleting a file"),placement:"bottomRight",innerException:t,data:{failCount:1,totalCount:1,itemIds:[e],folderId:f||null,errors:[{itemId:e,reason:t instanceof Error?t.message:String(t)}]}})}},[S,A,f,d,h,m,s,l]),I=c(async e=>{try{const t=v.current;if(!(null==S?void 0:S.deleteFolder))return void h.error({id:"FOLDER_DELETE_ERROR",message:"DataProvider для удаления папок не настроен",placement:"bottomRight",data:{totalCount:1,failCount:1,itemIds:[e],folderId:e}});if(!await S.deleteFolder(e))throw new Error("Не удалось удалить папку");h.success({id:"FOLDER_DELETE_SUCCESS",message:d("Folder deleted"),placement:"bottomRight",data:{successCount:1,totalCount:1,itemIds:[e],folderId:e}});f===e?await A({page:t.current,limit:t.pageSize,sortBy:s,sortOrder:l}):await A({folderId:f||"",sortBy:s,sortOrder:l,page:t.current,limit:t.pageSize})}catch(t){console.error("Ошибка при удалении папки:",t),h.error({id:"FOLDER_DELETE_ERROR",message:d("Error when deleting a folder"),innerException:t,placement:"bottomRight",data:{totalCount:1,failCount:1,itemIds:[e],folderId:e,errors:[{itemId:e,reason:t instanceof Error?t.message:String(t)}]}})}},[S,f,h,d,A,s,l]),T=c(async e=>{var t,n;try{if(null==S?void 0:S.getFileData){const t=await S.getFileData(e);if(t)return t;throw new Error("Не удалось загрузить файл")}{const t=await fetch(`/api/files/${e.id}/content`);if(!t.ok)throw new Error("Ошибка загрузки файла");return await t.blob()}}catch(r){console.error("Ошибка при загрузке файла:",r),h.error({id:"FILE_DOWNLOAD_FAILED",message:d("Failed to download file"),placement:"bottomRight",description:e.name,innerException:r,data:{itemId:e.id,itemName:e.name,folderId:null!==(t=e.folderId)&&void 0!==t?t:null,thumbnail:null!==(n=e.thumbnail)&&void 0!==n?n:null}})}},[S,h,d]),O=c(async(e,t)=>{if(!(null==S?void 0:S.uploadFile))return;const n=e.name.split(".").pop()||"",r=await S.uploadFile({name:e.name,size:e.size,type:e.type,folderId:null!=t?t:f||"",data:e,extension:n});return C&&C(qt),r},[S,f,C]),F=c(async(e,t)=>{var n;if(!(null==S?void 0:S.getFolders)||!(null==S?void 0:S.createFolder))return e||"";try{const r=await S.getFolders(),i=Array.isArray(r)?r:[],o=(e,t)=>i.find(n=>{var r;return(null!==(r=n.parentId)&&void 0!==r?r:null)===(null!=e?e:null)&&n.name===t});let a=null!=e?e:"";for(const e of t){if(!e)continue;let t=o(a,e);if(!t){const n=await S.createFolder({name:e,parentId:null!=a?a:null});i.push(n),t=n}a=t.id}return null!==(n=a)&&void 0!==n?n:e||""}catch(t){return console.warn("ensureFolderPath: не удалось гарантировать путь",t),e||""}},[S]),P=c(async(e,t)=>{var n,r,i;if(!(null===(r=null===(n=e.type)||void 0===n?void 0:n.startsWith)||void 0===r?void 0:r.call(n,"image/")))return null!=t?t:null;const o=null==e?void 0:e.webkitRelativePath;let a=t||"";if(o&&o.includes("/")){const e=o.split("/");e.pop();const n=e.filter(Boolean);n.length&&(a=await F(t||"",n)||t||"")}return null!==(i=a)&&void 0!==i?i:null!=t?t:null},[F]),M=c(async e=>{var t,n,r,i,o,a,s,l,c,u,d;const{file:h,selectedFolderId:f,uploadFn:p,progressCallbacks:g}=e;if(!(null===(n=null===(t=h.type)||void 0===t?void 0:t.startsWith)||void 0===n?void 0:n.call(t,"image/")))return{success:!0,fileName:h.name,folderId:null!=f?f:null};const m=null!==(r=await P(h,f))&&void 0!==r?r:null!=f?f:null,v=null!==(i=null!=m?m:f)&&void 0!==i?i:null;let y;null===(o=null==g?void 0:g.onStart)||void 0===o||o.call(g,h);try{if(null==g?void 0:g.onProgress){let e=0;y=window.setInterval(()=>{var t;e=Math.min(e+10+Math.floor(Date.now()%10),90),null===(t=null==g?void 0:g.onProgress)||void 0===t||t.call(g,h.name,e)},200)}const e=await p(h,null!=v?v:void 0);return(null==g?void 0:g.onProgress)&&(null===(a=null==g?void 0:g.onProgress)||void 0===a||a.call(g,h.name,100)),null===(s=null==g?void 0:g.onComplete)||void 0===s||s.call(g,h.name),{success:!0,fileName:h.name,fileId:null==e?void 0:e.id,folderId:null!==(c=null!==(l=null==e?void 0:e.folderId)&&void 0!==l?l:v)&&void 0!==c?c:null}}catch(e){const t=e instanceof Error?e.message:String(e);return null===(u=null==g?void 0:g.onError)||void 0===u||u.call(g,h.name,t),{success:!1,fileName:h.name,folderId:null!==(d=null!=v?v:f)&&void 0!==d?d:null,error:t}}finally{void 0!==y&&clearInterval(y)}},[P]),R=c(async(e,t)=>{var n,r,i,o,a,s,l,c,u,p,g,m,v,y,b,w,x,_,k,A,E,I,T,F,R,L,j,D,N,z;if(0===e.length)return{successCount:0,failCount:0,successes:[],errors:[],totalCount:0};null===(n=null==t?void 0:t.onStartBatch)||void 0===n||n.call(t,e);const B=e=>{const t=e.filter(Boolean);return t.length>0&&t.length<=5?t.join(", "):null},V=[];for(let n=0;n<e.length;n++){const s=e[n];if(!(null===(i=null===(r=s.type)||void 0===r?void 0:r.startsWith)||void 0===i?void 0:i.call(r,"image/"))){h.warning({id:"FILES_UPLOAD_UNSUPPORTED_TYPE",message:`Файл ${s.name} не является изображением и будет пропущен`,placement:"bottomRight",data:{itemName:s.name,fileType:s.type,folderId:f||null}}),null===(o=null==t?void 0:t.onError)||void 0===o||o.call(t,s.name,"Unsupported file type");continue}const l=`${Date.now()}-${n}-${Math.random().toString(36).slice(2,8)}`,c=await P(s,f);null===(a=null==t?void 0:t.onStart)||void 0===a||a.call(t,s),V.push({file:s,targetFolderId:c,requestId:l})}const U=V.length;if(0===U)return{successCount:0,failCount:0,successes:[],errors:[],totalCount:0};const $=1===U,W=[],H=[],G=[],Y=[];let q=0,X=0;const K=(e,n,r,i)=>{var o,a;const{emitProgress:s=!0,emitNotification:l=!0}=null!=i?i:{};q++,W.push(e),H.push(null!=r?r:e),s&&(null===(o=null==t?void 0:t.onProgress)||void 0===o||o.call(t,e,100),null===(a=null==t?void 0:t.onComplete)||void 0===a||a.call(t,e)),l&&((e,t,n)=>{var r;h.success({id:"FILE_UPLOAD_ITEM_SUCCESS",message:`${d("File")} ${e} ${d("has been successfully uploaded")}`,placement:"bottomRight",data:{itemId:n,itemName:e,folderId:null!==(r=null!=t?t:f)&&void 0!==r?r:null}})})(e,n,r)},Z=(e,n,r,i,o)=>{var a;const{emitProgress:s=!0,emitNotification:l=!0}=null!=o?o:{};X++,G.push({fileName:e,error:r});const c=yi(i);Y.push({itemId:void 0,itemName:e,reason:r,code:null==c?void 0:c.code,httpStatus:null==c?void 0:c.httpStatus}),s&&(null===(a=null==t?void 0:t.onError)||void 0===a||a.call(t,e,r)),l&&((e,t,n,r)=>{var i;const o=yi(r),a=vi(null==o?void 0:o.code,d);h.error({id:"FILE_UPLOAD_ITEM_FAILED",message:null!=a?a:`Ошибка при загрузке файла ${e}`,placement:"bottomRight",data:{itemName:e,folderId:null!==(i=null!=t?t:f)&&void 0!==i?i:null,error:n,errorCode:null==o?void 0:o.code,httpStatus:null==o?void 0:o.httpStatus},innerException:r})})(e,n,r,i)};if(null==S?void 0:S.uploadFiles)try{const e=await S.uploadFiles({items:V.map(e=>{var t,n;return{requestId:e.requestId,name:e.file.name,size:e.file.size,type:e.file.type,folderId:null!==(n=null!==(t=e.targetFolderId)&&void 0!==t?t:f)&&void 0!==n?n:null,data:e.file,extension:e.file.name.split(".").pop()||""}}),folderId:null!=f?f:null}),t=null!==(s=e.detailed)&&void 0!==s?s:[],n=new Map(t.filter(e=>e.requestId).map(e=>[e.requestId,e]));if(t.length>0)for(let e=0;e<V.length;e++){const r=V[e],i=null!==(l=r.requestId?n.get(r.requestId):void 0)&&void 0!==l?l:t[e];if(i&&i.success){const e=i.data,t=null!==(c=null==e?void 0:e.name)&&void 0!==c?c:r.file.name,n=null!==(g=null!==(p=null!==(u=null==e?void 0:e.folderId)&&void 0!==u?u:r.targetFolderId)&&void 0!==p?p:f)&&void 0!==g?g:null;K(t,n,null==e?void 0:e.id,{emitNotification:$})}else{const e=(null==i?void 0:i.error)?String(i.error):"Ошибка при загрузке файла",t=null==i?void 0:i.data,n=null!==(m=null==t?void 0:t.name)&&void 0!==m?m:r.file.name;Z(n,null!==(b=null!==(y=null!==(v=null==t?void 0:t.folderId)&&void 0!==v?v:r.targetFolderId)&&void 0!==y?y:f)&&void 0!==b?b:null,e,null==i?void 0:i.error,{emitNotification:$})}}else if(e.success)for(const e of V){const t=e.file.name;K(t,null!==(x=null!==(w=e.targetFolderId)&&void 0!==w?w:f)&&void 0!==x?x:null,void 0,{emitNotification:$})}else{const t=e.error?String(e.error):"Ошибка при загрузке файла";for(const n of V){const r=n.file.name;Z(r,null!==(k=null!==(_=n.targetFolderId)&&void 0!==_?_:f)&&void 0!==k?k:null,t,e.error,{emitNotification:$})}}}catch(e){const t=e instanceof Error?e.message:String(e);for(const n of V){Z(n.file.name,null!==(E=null!==(A=n.targetFolderId)&&void 0!==A?A:f)&&void 0!==E?E:null,t,e,{emitNotification:$})}}else{if(!(null==S?void 0:S.uploadFile))return h.error({id:"FILES_UPLOAD_PROVIDER_NOT_CONFIGURED",message:"DataProvider для загрузки файлов не настроен",placement:"bottomRight"}),{successCount:0,failCount:U,successes:[],errors:[],totalCount:U};for(const e of V){const n=await M({file:e.file,selectedFolderId:f,uploadFn:O,progressCallbacks:t});if(n.success)K(n.fileName,null!==(F=null!==(T=null!==(I=n.folderId)&&void 0!==I?I:e.targetFolderId)&&void 0!==T?T:f)&&void 0!==F?F:null,n.fileId,{emitProgress:!1,emitNotification:$});else{const t=null!==(R=n.error)&&void 0!==R?R:"Ошибка при загрузке файла";Z(n.fileName,null!==(D=null!==(j=null!==(L=n.folderId)&&void 0!==L?L:e.targetFolderId)&&void 0!==j?j:f)&&void 0!==D?D:null,t,n.error,{emitProgress:!1,emitNotification:$})}}}if(q>0&&(C&&C(qt),U>1)){const e=B(W),t=e?d("Uploaded",{names:e}):d("uploads_success_summary",{successCount:q,totalCount:U});h.success({id:"FILES_UPLOAD_BATCH_SUCCESS",message:t,placement:"bottomRight",data:{successCount:q,totalCount:U,itemIds:H,itemNames:W,folderId:null!=f?f:null}})}if(X>0)if(U>1){const e=G.map(e=>e.fileName),t=B(e),n=t?d("Failed",{names:t}):d("uploads_fail_summary",{failCount:X,totalCount:U});h.error({id:"FILES_UPLOAD_BATCH_FAILED",message:n,placement:"bottomRight",data:{failCount:X,totalCount:U,itemNames:e,folderId:null!=f?f:null,errors:Y}})}else if(1===U&&Y.length>0&&Y[0].code){const e=vi(Y[0].code,d),t=null!==(z=null===(N=G[0])||void 0===N?void 0:N.fileName)&&void 0!==z?z:"",n=null!=e?e:t?`${d("Failed to upload files")}: ${t}`:d("Failed to upload files");h.error({id:"FILES_UPLOAD_BATCH_FAILED",message:n,placement:"bottomRight",data:{failCount:X,totalCount:U,itemNames:[t],folderId:null!=f?f:null,errors:Y}})}return{successCount:q,failCount:X,successes:W,errors:G,totalCount:U}},[null==S?void 0:S.uploadFiles,null==S?void 0:S.uploadFile,h,P,f,C,d,M,O]),L=c(async e=>{var t;if(!(null==S?void 0:S.uploadFile)&&!(null==S?void 0:S.uploadFiles))return void h.error({id:"FILES_UPLOAD_PROVIDER_NOT_CONFIGURED",message:"DataProvider для загрузки файлов не настроен",placement:"bottomRight"});const n=v.current,r=document.createElement("input");r.type="file",r.accept="image/*",r.multiple=!0;try{!(!(null===(t=null==o?void 0:o.config)||void 0===t?void 0:t.features)||!o.config.features.enableDirectoryUpload)&&(r.webkitdirectory=!0)}catch(e){}r.onchange=async t=>{var r;const i=t.target.files;if(!i||0===i.length)return;const o=Array.from(i);try{null==b||b(!0);const{successes:t,errors:i}=await R(o,e);null===(r=null==e?void 0:e.onBatchComplete)||void 0===r||r.call(e,{files:o,successes:t,errors:i}),await u(),await A({folderId:f||"",sortBy:s,sortOrder:l,page:n.current,limit:n.pageSize})}catch(e){console.error("Ошибка при загрузке файлов:",e)}finally{null==b||b(!1)}},r.click()},[null==S?void 0:S.uploadFile,null==S?void 0:S.uploadFiles,f,h,d,b,A,u,s,l,R,null===(t=null==o?void 0:o.config)||void 0===t?void 0:t.features]),j=c(async(e,t)=>{const n=v.current;let r,i,o;try{if(i=await(null==p?void 0:p.validateFields()),r=null!=e?e:null==i?void 0:i.fileUrl,!r)return void h.error({id:"FILES_UPLOAD_URL_VALIDATION_FAILED",message:"Заполните все поля",placement:"bottomRight",data:{url:null!=r?r:null,folderId:f||null}});if(null==b||b(!0),!(null==S?void 0:S.uploadFileByUrl))return void h.error({id:"FILES_UPLOAD_URL_NOT_SUPPORTED",message:"Загрузка по URL не поддерживается",placement:"bottomRight",data:{url:r,folderId:f||null}});o=await S.uploadFileByUrl({url:r,folderId:f||"",noFolder:t});const a=(null==i?void 0:i.name)||(null==o?void 0:o.name)||"unnamed file";return h.success({id:"FILE_UPLOAD_ITEM_SUCCESS",message:`${d("File")} ${a} ${d("successfully uploaded")}`,placement:"bottomRight",data:{itemName:a,itemId:null==o?void 0:o.id,folderId:f||null}}),null==w||w(!1),null==p||p.resetFields(),C&&C(qt),await A({folderId:f||"",sortBy:s,sortOrder:l,page:n.current,limit:n.pageSize}),o}catch(e){console.error("Ошибка при загрузке файла по URL:",e),h.error({id:"FILES_UPLOAD_BY_URL_FAILED",message:d("Error when downloading a file by URL"),placement:"bottomRight",data:{url:null!=r?r:null,folderId:f||null,reason:e instanceof Error?e.message:String(e)},innerException:e})}finally{null==b||b(!1)}},[p,b,S,h,d,w,C,A,f,s,l]),D=c(async e=>{if(!e.length)return;const t=v.current;await R(e),await A({folderId:f||"",sortBy:s,sortOrder:l,page:t.current,limit:t.pageSize})},[A,f,s,l,R]);return{fetchFiles:A,handleDeleteFile:E,handleDeleteFolder:I,handleAddFile:L,handleAddFileByUrl:j,handleDroppedFiles:D,getFileData:T,uploadFileWithProvider:O}},xi=()=>{const{state:e}=ui(),{files:t,loading:n,isUrlModalVisible:r}=e,i=wi(),o=(()=>{const{state:e,actions:t}=ui(),{selectedFiles:n,files:r,multiSelect:i}=e,{setSelectedFiles:o}=t,a=u(null),s=c((e,t,n)=>{const i=Array.isArray(r)?r:[],o=i.findIndex(t=>t.id===e),a=i.findIndex(e=>e.id===t);if(-1===o||-1===a)return n;const[s,l]=o<a?[o,a]:[a,o],c=i.slice(s,l+1).map(e=>e.id),u=new Set(n);return c.forEach(e=>u.add(e)),u},[r]),l=c((e,t)=>{if(!n||!o)return;const r=!1!==i,l=!!(null==t?void 0:t.shiftKey)&&r&&a.current;let c=new Set(r?n:[]);l&&a.current?c=s(a.current,e,c):c.has(e)?c.delete(e):c.add(e),a.current=e,o(c)},[i,n,o,s]);return{state:{selectedFiles:n||new Set},actions:{toggleFileSelection:l}}})(),a=(e=>{var t,n;const{state:r,actions:i,options:o}=ui(),{t:a}=Nn(),s=bi(),l=gi(),{fetchFolders:u}=s.actions,{files:d,selectedFolder:h,selectedFiles:f,fileToRename:p,renameForm:g,isRenameModalVisible:m,moveForm:v,copyForm:y,pagination:b,currentMenuFile:w}=r,{setFileToRename:x,setIsRenameModalVisible:C,setIsMoveModalVisible:_,setIsCopyModalVisible:S,setSelectedFiles:k,setIsDeleteConfirmVisible:A,setUndoDeletion:E}=i,{apiEndpoints:I,dataProviders:T,config:O}=o,F=e=>{var t,n;if(!e)return null;const r=e;return null!==(n=null!==(t=r.folderId)&&void 0!==t?t:r.parentId)&&void 0!==n?n:null},P=(e,t)=>{var n;return{itemId:null!==(n=null==e?void 0:e.id)&&void 0!==n?n:t,itemName:null==e?void 0:e.name,folderId:F(e)}},M=e=>{if(!e)return;const t=d.find(t=>t.id===e);return null==t?void 0:t.name},R=e=>e.map(M).filter(e=>Boolean(e)),L=e=>e.length>0&&e.length<=5?e.join(", "):null,j=e=>{var t;return null!==(t=e.requestId)&&void 0!==t?t:e.id},D=(e,t,n,r,i)=>({itemIds:e,itemNames:i&&i.length?i:void 0,successCount:t,totalCount:n,folderId:null!=r?r:null}),N=(e,t,n,r,i,o)=>({itemIds:e,itemNames:o&&o.length?o:void 0,failCount:t,totalCount:n,folderId:null!=r?r:null,errors:i}),z=c(e=>{var t,n;const r=null==d?void 0:d.find(t=>t.id===e);if((null==r?void 0:r.isFolder)||e.startsWith("folder_")){if(!1===(null===(t=null==O?void 0:O.features)||void 0===t?void 0:t.enableRenameFolder))return void l.error({id:"FOLDER_RENAME_DISABLED_BY_CONFIG",message:a("Folder rename is disabled by config"),placement:"bottomRight",data:P(r,e)});if(!(null==T?void 0:T.renameFolder))throw new Error("renameFolder не реализован в dataProviders")}else{if(!1===(null===(n=null==O?void 0:O.features)||void 0===n?void 0:n.enableRenameFile))return void l.error({id:"FILE_RENAME_DISABLED_BY_CONFIG",message:a("File rename is disabled by config"),placement:"bottomRight",data:P(r,e)});if(!(null==T?void 0:T.renameFile))throw new Error("renameFile не реализован в dataProviders")}null==x||x(e),null==C||C(!0),r&&g&&g.setFieldsValue({newFileName:r.name})},[d,x,C,g,null===(t=null==O?void 0:O.features)||void 0===t?void 0:t.enableRenameFolder,null===(n=null==O?void 0:O.features)||void 0===n?void 0:n.enableRenameFile,null==T?void 0:T.renameFolder,null==T?void 0:T.renameFile,l,a]),B=c(()=>{null==C||C(!1),null==x||x(null),null==g||g.resetFields()},[C,x,g]),V=c(async()=>{var t,n,r;if(!p||!g)return;const o=null==d?void 0:d.find(e=>e.id===p);try{const s=await g.validateFields();if(!(null==s?void 0:s.newFileName))return;if((null==o?void 0:o.isFolder)||p.startsWith("folder_")){if(!1===(null===(t=null==O?void 0:O.features)||void 0===t?void 0:t.enableRenameFolder))return void l.error({id:"FOLDER_RENAME_DISABLED_BY_CONFIG",message:a("Folder rename is disabled by config"),placement:"bottomRight",data:P(o,p)});if(!(null==T?void 0:T.renameFolder))throw new Error("renameFolder не реализован в dataProviders");{const e=await T.renameFolder(p,s.newFileName.trim());if(!(null==e?void 0:e.id))return void l.error({id:"FOLDER_RENAME_FAILED",message:a("Некорректный ответ при переименовании папки"),placement:"bottomRight",data:Object.assign(Object.assign({},P(o,p)),{reason:"Invalid rename response"})});l.success({id:"FOLDER_RENAME_SUCCESS",message:a(`${a("Folder renamed to")} ${s.newFileName}`),placement:"bottomRight",data:{itemId:e.id,itemName:e.name,folderId:null!==(n=e.parentId)&&void 0!==n?n:null}}),await u(),p!==e.id&&i.setSelectedFolder&&i.setSelectedFolder(e.id)}}else{if(!1===(null===(r=null==O?void 0:O.features)||void 0===r?void 0:r.enableRenameFile))return void l.error({id:"FILE_RENAME_DISABLED_BY_CONFIG",message:a("File rename is disabled by config"),placement:"bottomRight",data:P(o,p)});if(!(null==T?void 0:T.renameFile))throw new Error("renameFile не реализован в dataProviders");await T.renameFile(p,s.newFileName),l.success({id:"FILE_RENAME_SUCCESS",message:`${a("File renamed to")} ${s.newFileName}`,placement:"bottomRight",data:Object.assign(Object.assign({},P(o,p)),{itemName:s.newFileName})})}B(),await e({folderId:h||"",page:b.current,limit:b.pageSize})}catch(e){console.error("Ошибка при переименовании:",e);const t=yi(e),n=vi(null==t?void 0:t.code,a);l.error({id:"ITEM_RENAME_FAILED",message:null!=n?n:e instanceof Error?e.message:"Ошибка при переименовании",placement:"bottomRight",data:Object.assign(Object.assign({},P(o,p)),{reason:e instanceof Error?e.message:void 0}),innerException:e})}},[p,g,d,T,I,B,e,h,a,b]),U=c(()=>{null==_||_(!0)},[_]),$=c(()=>{null==_||_(!1),null==v||v.resetFields()},[_,v]),W=c(async t=>{var n;if(!((null==w?void 0:w.length)||f&&0!==f.size))return;const r=Array.from((null==w?void 0:w.length)?[w]:f),i=r.length;let o=0,s=0;const c=[],p=r.map(e=>d.find(t=>t.id===e)).filter(e=>!!e),g=p.some(e=>(null==e?void 0:e.isFolder)||e.id.startsWith("folder_"));try{let d=t;if(!t){const e=await v.validateFields();d=null==e?void 0:e.targetFolder}if(!d)return void l.error({id:"FILES_MOVE_DIRECTORY_NOT_SELECTED",message:a("Выберите папку назначения"),placement:"bottomRight"});const f="folders"===d?null:d;if(null==T?void 0:T.moveItems)try{const e=await T.moveItems("folders"===d?"":d,p.map(e=>e.id)),t=e.detailed;if(t){const e=t.filter(e=>e.success),n=t.filter(e=>!e.success);o+=e.length,s+=n.length,n.forEach(e=>{const t=j(e),n=e.error,r=yi(n);c.push({itemId:t,itemName:M(t),reason:n?String(n):void 0,code:null==r?void 0:r.code,httpStatus:null==r?void 0:r.httpStatus})})}else if(e.success)o+=p.length;else{const t=e.error;if(t){s+=p.length;const e=yi(t);c.push({reason:String(t),code:null==e?void 0:e.code,httpStatus:null==e?void 0:e.httpStatus})}else s+=p.length}}catch(e){console.error("Ошибка при перемещении",e),s+=p.length;const t=yi(e);c.push({reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus})}else for(const e of p)try{const t=(null==e?void 0:e.isFolder)||(null===(n=e.id)||void 0===n?void 0:n.startsWith("folder_"));(null==T?void 0:T.moveItem)?(await T.moveItem({itemId:e.id,targetFolderId:"folders"===d?"":d,isFolder:t}),o++):(console.warn(`DataProvider для перемещения не настроен для ${t?"папки":"файла"} ${e.id}`),s++,c.push({itemId:e.id,reason:"Move provider is not configured"}))}catch(t){console.error("Ошибка при перемещении объекта",e.id,t),s++;const n=yi(t);c.push({itemId:e.id,itemName:e.name,reason:t instanceof Error?t.message:String(t),code:null==n?void 0:n.code,httpStatus:null==n?void 0:n.httpStatus})}if(o>0){const e=R(r),t=L(e),n=t?a("Moved",{names:t}):a("move_success_summary",{successCount:o,totalCount:i});l.success({id:"FILES_MOVE_SUCCESS",message:n,placement:"bottomRight",data:D(r,o,i,f,e)})}if(s>0){const e=R(r),t=L(e);let n;if(1===i&&c.length>0&&c[0].code){const e=vi(c[0].code,a);n=null!=e?e:t?a("Failed",{names:t}):a("move_fail_summary",{failCount:s,totalCount:i})}else n=t?a("Failed",{names:t}):a("move_fail_summary",{failCount:s,totalCount:i});l.error({id:"FILES_MOVE_ERROR",message:n,placement:"bottomRight",innerException:c.length?c:void 0,data:N(r,s,i,f,c.length?c:void 0,e)})}$(),null==k||k(new Set),g&&await u(),await e({folderId:h||"",page:b.current,limit:b.pageSize})}catch(e){console.error("Ошибка при перемещении:",e);const t=yi(e),n=vi(null==t?void 0:t.code,a);l.error({id:"FILES_MOVE_ERROR",innerException:e,message:null!=n?n:a("Ошибка при перемещении"),placement:"bottomRight",data:N(r,i,i,h||null,[{reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus}],R(r))})}},[w,f,v,$,k,e,h,b,d,T,u]),H=c(()=>{null==S||S(!0)},[S]),G=c(()=>{null==S||S(!1),null==y||y.resetFields()},[S,y]),Y=c(async t=>{if(!((null==w?void 0:w.length)||f&&0!==f.size))return;const n=Array.from((null==w?void 0:w.length)?[w]:f),r=n.length;let i=0,o=0;const s=[],c=n.map(e=>d.find(t=>t.id===e)).filter(e=>!!e),p=c.some(e=>(null==e?void 0:e.isFolder)||e.id.startsWith("folder_"));try{let d=t;if(!t){const e=await y.validateFields();d=null==e?void 0:e.targetFolder}if(!d)return void l.error({id:"FILES_COPY_DIRECTORY_NOT_SELECTED",message:a("Выберите папку назначения"),placement:"bottomRight"});const f="folders"===d?null:d;if(null==T?void 0:T.copyItems)try{const e=await T.copyItems("folders"===d?"":d,c.map(e=>e.id)),t=e.detailed;if(t){const e=t.filter(e=>e.success),n=t.filter(e=>!e.success);i+=e.length,o+=n.length,n.forEach(e=>{const t=j(e),n=e.error,r=yi(n);s.push({itemId:t,itemName:M(t),reason:n?String(n):void 0,code:null==r?void 0:r.code,httpStatus:null==r?void 0:r.httpStatus})})}else if(e.success)i+=c.length;else{const t=e.error;if(t){o+=c.length;const e=yi(t);s.push({reason:String(t),code:null==e?void 0:e.code,httpStatus:null==e?void 0:e.httpStatus})}else o+=c.length}}catch(e){console.error("Ошибка при копировании",e),o+=c.length;const t=yi(e);s.push({reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus})}else for(const e of c)try{const t=(null==e?void 0:e.isFolder)||e.id.startsWith("folder_");(null==T?void 0:T.copyItem)?(await T.copyItem({itemId:e.id,targetFolderId:"folders"===d?"":d,isFolder:t}),i++):(console.warn(`DataProvider для копирования не настроен для ${t?"папки":"файла"} ${e.id}`),o++,s.push({itemId:e.id,reason:"Copy provider is not configured"}))}catch(t){console.error("Ошибка при копировании объекта",e.id,t),o++;const n=yi(t);s.push({itemId:e.id,itemName:e.name,reason:t instanceof Error?t.message:String(t),code:null==n?void 0:n.code,httpStatus:null==n?void 0:n.httpStatus})}if(i>0){const e=R(n),t=L(e),o=t?a("Copied",{names:t}):a("copy_success_summary",{successCount:i,totalCount:r});l.success({id:"FILES_COPY_SUCCESS",message:o,placement:"bottomRight",data:D(n,i,r,f,e)})}if(o>0){const e=R(n),t=L(e);let i;if(1===r&&s.length>0&&s[0].code){const e=vi(s[0].code,a);i=null!=e?e:t?a("Failed",{names:t}):a("copy_fail_summary",{failCount:o,totalCount:r})}else i=t?a("Failed",{names:t}):a("copy_fail_summary",{failCount:o,totalCount:r});l.error({id:"FILES_COPY_ERROR",message:i,placement:"bottomRight",innerException:s.length?s:void 0,data:N(n,o,r,f,s.length?s:void 0,e)})}G(),null==k||k(new Set),p&&await u(),await e({folderId:h||"",page:b.current,limit:b.pageSize})}catch(e){console.error("Ошибка при копировании:",e);const t=yi(e),i=vi(null==t?void 0:t.code,a);l.error({id:"FILES_COPY_ERROR",message:null!=i?i:a("Ошибка при копировании"),innerException:e,placement:"bottomRight",data:N(n,r,r,h||null,[{reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus}],R(n))})}},[w,f,y,G,k,e,h,b,d,T,u,l,a]),q=c(()=>{null==A||A(!0)},[A]),X=c(()=>{null==A||A(!1)},[A]),K=c(async()=>{if(!((null==w?void 0:w.length)||f&&0!==f.size))return void(null==A||A(!1));let t=0,n=0;const r=[],i=Array.from(w?[w]:f),o=i.map(e=>d.find(t=>t.id===e)).filter(e=>!!e);try{const s=async()=>{const e="Trash";if(null==T?void 0:T.deleteItems)try{const e=await T.deleteItems(o.map(e=>e.id),{permanent:!1}),s=e.detailed;if(s){const e=s.filter(e=>e.success).length;t+=e;const c=s.filter(e=>!e.success);if(n+=c.length,c.forEach(e=>{const t=j(e),n=e.error,i=yi(n);r.push({itemId:t,itemName:M(t),reason:n?String(n):void 0,code:null==i?void 0:i.code,httpStatus:null==i?void 0:i.httpStatus})}),e!==o.length){const e=i.length,t=R(i),o=L(t);let s;if(1===e&&r.length>0&&r[0].code){const e=vi(r[0].code,a);s=null!=e?e:o?a("Failed",{names:o}):a("При перемещении в корзину произошли ошибки")}else s=o?a("Failed",{names:o}):a("При перемещении в корзину произошли ошибки");l.error({id:"FILES_MOVE_TO_TRASH_ERROR",message:s,placement:"bottomRight",innerException:r.length?r:void 0,data:{failCount:n,totalCount:i.length,itemNames:t}})}}else if(e.success)t+=o.length;else{const t=e.error;if(t){n+=o.length;const e=yi(t),s=vi(null==e?void 0:e.code,a),c=i.length,u=R(i);let d;1===c&&(null==e||e.code),d=null!=s?s:String(t),r.push({reason:String(t),code:null==e?void 0:e.code,httpStatus:null==e?void 0:e.httpStatus}),l.error({id:"FILES_MOVE_TO_TRASH_ERROR",message:d,placement:"bottomRight",innerException:t,data:{failCount:n,totalCount:i.length,itemNames:u}})}else n+=o.length}return}catch(e){console.error("Ошибка при перемещении в корзину",e),n+=o.length;const t=yi(e);r.push({reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus})}if(null==T?void 0:T.moveItems)try{const s=await T.moveItems(e,o.map(e=>e.id)),c=s.detailed;if(c){const e=c.filter(e=>e.success).length;t+=e;const s=c.filter(e=>!e.success);if(n+=s.length,s.forEach(e=>{const t=j(e),n=e.error,i=yi(n);r.push({itemId:t,itemName:M(t),reason:n?String(n):void 0,code:null==i?void 0:i.code,httpStatus:null==i?void 0:i.httpStatus})}),e!==o.length){const e=i.length,t=R(i),o=L(t);let s;if(1===e&&r.length>0&&r[0].code){const e=vi(r[0].code,a);s=null!=e?e:o?a("Failed",{names:o}):a("При перемещении в корзину произошли ошибки")}else s=o?a("Failed",{names:o}):a("При перемещении в корзину произошли ошибки");l.error({id:"FILES_MOVE_TO_TRASH_ERROR",message:s,placement:"bottomRight",innerException:r.length?r:void 0,data:{failCount:n,totalCount:i.length,itemNames:t}})}}else if(s.success)t+=o.length;else{const e=s.error;if(e){n+=o.length;const t=yi(e),s=vi(null==t?void 0:t.code,a),c=i.length,u=R(i);let d;1===c&&(null==t||t.code),d=null!=s?s:String(e),r.push({reason:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus}),l.error({id:"FILES_MOVE_TO_TRASH_ERROR",message:d,placement:"bottomRight",innerException:e,data:{failCount:n,totalCount:i.length,itemNames:u}})}else n+=o.length}}catch(e){console.error("Ошибка при перемещении в корзину",e),n+=o.length;const t=yi(e);r.push({reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus})}else for(const i of o)try{const r=(null==i?void 0:i.isFolder)||i.id.startsWith("folder_");(null==T?void 0:T.moveItem)?(await T.moveItem({itemId:i.id,targetFolderId:e,isFolder:r}),t++):(console.warn(`DataProvider для перемещения не настроен для ${r?"папки":"файла"} ${i.id}`),n++)}catch(e){console.error("Ошибка при перемещении в корзину объекта",i.id,e),n++;const t=yi(e);r.push({itemId:i.id,itemName:i.name,reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus})}},c=async()=>{if(null==T?void 0:T.deleteItems){const e=await T.deleteItems(o.map(e=>e.id),{permanent:!0}),s=e.detailed;if(s){const e=s.filter(e=>e.success);t+=e.length;const c=s.filter(e=>!e.success);if(n+=c.length,c.forEach(e=>{const t=j(e),n=e.error,i=yi(n);r.push({itemId:t,itemName:M(t),reason:n?String(n):void 0,code:null==i?void 0:i.code,httpStatus:null==i?void 0:i.httpStatus})}),e.length!==o.length){const e=i.length,t=R(i),o=L(t);let s;if(1===e&&r.length>0&&r[0].code){const e=vi(r[0].code,a);s=null!=e?e:o?a("Failed",{names:o}):a("При удалении произошли ошибки")}else s=o?a("Failed",{names:o}):a("При удалении произошли ошибки");l.error({id:"FILES_DELETE_ERROR",message:s,placement:"bottomRight",innerException:r.length?r:void 0,data:{failCount:n,totalCount:i.length,itemNames:t}})}return}if(e.success)return void(t+=o.length);if(e.error){n+=o.length;const t=yi(e.error),s=vi(null==t?void 0:t.code,a),c=i.length,u=R(i);let d;1===c&&(null==t||t.code),d=null!=s?s:String(e.error),r.push({reason:String(e.error),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus}),l.error({id:"FILES_DELETE_ERROR",message:d,innerException:e.error,placement:"bottomRight",data:{failCount:n,totalCount:i.length,itemNames:u}})}else n+=o.length;return}for(const e of o)try{(null==e?void 0:e.isFolder)||e.id.startsWith("folder_")?(null==T?void 0:T.deleteFolder)?await T.deleteFolder(e.id)?t++:n++:(console.warn("DataProvider для удаления папок не настроен"),n++):(null==T?void 0:T.deleteFile)?await T.deleteFile(e.id)?t++:n++:(console.warn("DataProvider для удаления файлов не настроен"),n++)}catch(t){console.error("Ошибка при удалении объекта",e.id,t),n++;const i=yi(t);r.push({itemId:e.id,itemName:e.name,reason:t instanceof Error?t.message:String(t),code:null==i?void 0:i.code,httpStatus:null==i?void 0:i.httpStatus})}},d=(null==O?void 0:O.enableTrashFolder)&&"Trash"===h;(null==O?void 0:O.enableTrashFolder)&&!d?(await s(),t>0&&(null==E||E({itemIds:i,sourceFolderId:h||"folders"}))):await c(),n>0&&l.error({id:"FILES_DELETE_ERROR",message:`Не удалось удалить ${n} из ${i.length} объектов`,placement:"bottomRight",data:{failCount:n,totalCount:i.length}}),null==k||k(new Set),null==A||A(!1),await u(),await e({folderId:h||"",page:b.current,limit:b.pageSize})}catch(e){console.error("Ошибка при удалении:",e),l.error({id:"FILES_DELETE_ERROR",message:a("Ошибка при удалении"),placement:"bottomRight",innerException:e,data:{failCount:n,totalCount:o.length}})}},[w,f,A,T,e,h,b,u,w]);return{state:{isRenamingFile:m||!1,fileToRename:p},actions:{showRenameModal:z,handleRenameCancel:B,handleRenameOk:V,showMoveModal:U,handleMoveCancel:$,handleMoveOk:W,showCopyModal:H,handleCopyCancel:G,handleCopyOk:Y,showDeleteConfirm:q,handleDeleteConfirmCancel:X,handleDeleteConfirmOk:K}}})(i.fetchFiles);return{state:{files:t||[],selectedFiles:o.state.selectedFiles,loading:n||!1,isAddingFileByUrl:r||!1,isRenamingFile:a.state.isRenamingFile,fileToRename:a.state.fileToRename},actions:{fetchFiles:i.fetchFiles,handleDeleteFile:i.handleDeleteFile,handleDeleteFolder:i.handleDeleteFolder,handleAddFile:i.handleAddFile,handleAddFileByUrl:i.handleAddFileByUrl,handleDroppedFiles:i.handleDroppedFiles,uploadFileWithProvider:i.uploadFileWithProvider,toggleFileSelection:o.actions.toggleFileSelection,showRenameModal:a.actions.showRenameModal,handleRenameCancel:a.actions.handleRenameCancel,handleRenameOk:a.actions.handleRenameOk,showMoveModal:a.actions.showMoveModal,handleMoveCancel:a.actions.handleMoveCancel,handleMoveOk:a.actions.handleMoveOk,showCopyModal:a.actions.showCopyModal,handleCopyCancel:a.actions.handleCopyCancel,handleCopyOk:a.actions.handleCopyOk,showDeleteConfirm:a.actions.showDeleteConfirm,handleDeleteConfirmCancel:a.actions.handleDeleteConfirmCancel,handleDeleteConfirmOk:a.actions.handleDeleteConfirmOk}}},Ci="filemanager_sidebar_width",_i=({onSearch:t,placeholder:n="Поиск файлов...",className:r})=>{const[i,s]=o(""),l=u(null),{options:c}=ui(),{config:d}=c;a(()=>(l.current=li.debounce(e=>{t(e)},500),()=>{var e;null===(e=l.current)||void 0===e||e.cancel()}),[t]);return e(O,{value:i,onChange:e=>{var t;const n=e.target.value;s(n),null===(t=l.current)||void 0===t||t.call(l,n)},placeholder:n,prefix:e(ti,{size:16,strokeWidth:null==d?void 0:d.iconStrokeWidth}),className:r,allowClear:!0,onClear:()=>{s(""),t("")}})},Si=new Map,ki=(e,t)=>{Si.set(e,t),console.log("Изображение сохранено в кеш:",e),Si.size>350&&(Array.from(Si.keys()).slice(0,50).forEach(e=>Si.delete(e)),console.warn("Очищен кеш изображений. Удалено 50 самых старых записей."))},Ai=e=>{if(e.type&&e.type.startsWith("image/"))return!0;if(e.name){const t=e.name.toLowerCase().split(".").pop();return on.includes(t||"")}return!1},Ei=({src:t,alt:n,className:r,width:i,height:s,preview:l=!1,file:u})=>{const d=wi(),[h,f]=o(!1),[p,g]=o(t),[m,v]=o(!1),y=c(e=>{g(e),f(!1),v(!1)},[]),b=c(e=>{console.warn("Не удалось загрузить изображение:",e),g(void 0),f(!0),v(!1)},[]),w=c(()=>{g(an),f(!0)},[]),x=c(e=>{g(e),f(!1)},[]),C=c(e=>{const t=e.split(",")[1];t&&t.length>20?g(e):(console.warn("Некорректные base64 данные:",e.substring(0,50)+"..."),w())},[w]),_=c(async e=>{if(console.log("loadImageFromFile",e.id),t=e.id,Si.has(t))return console.log("Изображение найдено в кеше:",e.id),(e=>Si.get(e))(e.id);var t;if(!e||!Ai(e))return console.warn("Файл не является изображением:",null==e?void 0:e.name,null==e?void 0:e.type),w(),an;try{const t=await d.getFileData(e);if(!t)throw new Error("Ошибка загрузки файла");return new Promise((n,r)=>{const i=new FileReader;i.onload=()=>{const t=i.result;ki(e.id,t),n(t)},i.onerror=()=>r(new Error("Ошибка чтения файла")),i.readAsDataURL(t)})}catch(e){throw console.error("Ошибка загрузки изображения:",e),e}},[u,w,d]),S=c(()=>{(null==u?void 0:u.id)&&Ai(u)?_(u).then(y).catch(b):u&&!Ai(u)&&(console.warn("Файл не является изображением, показываем fallback:",u.name,u.type),w())},[u,_,y,b,w]),k=c(e=>{console.log("HandleBlobSrc:",{blobSrc:e,file:u?{id:u.id,name:u.name,type:u.type,extension:u.extension,folderId:u.folderId}:null}),u&&Ai(u)?(console.log("Blob файл является изображением, устанавливаем src:",u.name,u.type),g(e),f(!1)):(console.warn("Blob файл не является изображением, показываем fallback:",null==u?void 0:u.name,null==u?void 0:u.type),w())},[u,w,Ai]),A=c(()=>{(null==u?void 0:u.id)&&Ai(u)?(v(!0),_(u).then(y).catch(b)):u&&!Ai(u)?(console.warn("Файл не является изображением, показываем fallback:",u.name,u.type),w()):(console.warn("Неподдерживаемый формат изображения:",t),g(void 0))},[u,t,_,y,b,w]);a(()=>{v(!1),t?t.startsWith("data:image/")?C(t):t.startsWith("blob:")?k(t):t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")?x(t):A():S()},[t,S,C,k,x,A]);return e(F,{className:r,src:p,alt:n,width:i,height:s,preview:l&&!h&&{src:p,toolbarRender:()=>null,destroyOnHidden:!0,mask:e(oe,{style:{fontSize:"20px"}})},onError:()=>{console.warn("Ошибка загрузки изображения:",(null==p?void 0:p.substring(0,50))+"..."),f(!0)},fallback:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCA4MCA4MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjgwIiBoZWlnaHQ9IjgwIiBmaWxsPSIjRjVGNUY1Ii8+CjxwYXRoIGQ9Ik0yNCAzMkw0MCA0OEw1NiAzMkw2NCA0MEw2NCA2NEgyNFYzMloiIGZpbGw9IiNEOUQ5RDkiLz4KPC9zdmc+",loading:m?"lazy":void 0})},Ii="filemanager_view_mode",Ti=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"mixed-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 1h2v2H1V1zm0 4h2v2H1V5zm0 4h2v2H1V9zm4-8h2v2H5V1zm0 4h2v2H5V5zm0 4h2v2H5V9zm4-8h2v2H9V1zm0 4h2v2H9V5zm0 4h2v2H9V9z"})}),Oi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"landscape-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 3h10v6H1V3zm1 1v4h8V4H2z"})}),Fi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"portrait-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M3 1h6v10H3V1zm1 1v8h4V2H4z"})}),Pi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"square-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 1h10v10H1V1zm1 1v8h8V2H2z"})}),Mi=()=>t("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"ai-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[e("path",{d:"M2.45454 11.7273C2.45454 11.7273 2.16994 10.446 1.66154 9.88113C1.15314 9.31625 0 9 0 9C0 9 1.15314 8.68374 1.66154 8.11887C2.16994 7.554 2.45454 6.27273 2.45454 6.27273C2.45454 6.27273 2.73915 7.554 3.24755 8.11887C3.75594 8.68374 4.90909 9 4.90909 9C4.90909 9 3.75594 9.31625 3.24755 9.88113C2.73915 10.446 2.45454 11.7273 2.45454 11.7273Z"}),e("path",{d:"M7.63636 9C7.63636 9 7.1304 6.94996 6.22658 6.04614C5.32276 5.14233 3.27273 4.63636 3.27273 4.63636C3.27273 4.63636 5.32276 4.1304 6.22658 3.22657C7.1304 2.32275 7.63636 0.272728 7.63636 0.272728C7.63636 0.272728 8.14233 2.32275 9.04615 3.22657C9.94996 4.1304 12 4.63636 12 4.63636C12 4.63636 9.94996 5.14233 9.04615 6.04614C8.14233 6.94996 7.63636 9 7.63636 9Z"}),e("path",{d:"M1.63636 4.09091C1.63636 4.09091 1.44663 3.19402 1.10769 2.7986C0.768758 2.40318 0 2.18182 0 2.18182C0 2.18182 0.768758 1.96046 1.10769 1.56503C1.44663 1.16961 1.63636 0.272728 1.63636 0.272728C1.63636 0.272728 1.8261 1.16961 2.16503 1.56503C2.50397 1.96046 3.27273 2.18182 3.27273 2.18182C3.27273 2.18182 2.50397 2.40318 2.16503 2.7986C1.8261 3.19402 1.63636 4.09091 1.63636 4.09091Z"}),e("path",{d:"M10.6364 11.7273C10.6364 11.7273 10.4782 11.0866 10.1958 10.8042C9.91336 10.5218 9.27273 10.3636 9.27273 10.3636C9.27273 10.3636 9.91336 10.2055 10.1958 9.92307C10.4782 9.64064 10.6364 9 10.6364 9C10.6364 9 10.7945 9.64064 11.0769 9.92307C11.3594 10.2055 12 10.3636 12 10.3636C12 10.3636 11.3594 10.5218 11.0769 10.8042C10.7945 11.0866 10.6364 11.7273 10.6364 11.7273Z"})]}),Ri=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"light-mode",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M6 7.81819C6.50303 7.81819 6.93182 7.64092 7.28637 7.28637C7.64092 6.93182 7.81819 6.50303 7.81819 6C7.81819 5.49697 7.64092 5.06818 7.28637 4.71363C6.93182 4.35908 6.50303 4.18181 6 4.18181C5.49697 4.18181 5.06818 4.35908 4.71363 4.71363C4.35908 5.06818 4.18181 5.49697 4.18181 6C4.18181 6.50303 4.35908 6.93182 4.71363 7.28637C5.06818 7.64092 5.49697 7.81819 6 7.81819ZM6 8.72727C5.24545 8.72727 4.60227 8.46136 4.07045 7.92955C3.53864 7.39773 3.27273 6.75455 3.27273 6C3.27273 5.24545 3.53864 4.60227 4.07045 4.07045C4.60227 3.53864 5.24545 3.27273 6 3.27273C6.75455 3.27273 7.39773 3.53864 7.92955 4.07045C8.46136 4.60227 8.72727 5.24545 8.72727 6C8.72727 6.75455 8.46136 7.39773 7.92955 7.92955C7.39773 8.46136 6.75455 8.72727 6 8.72727ZM2.18182 6.45454H0V5.54546H2.18182V6.45454ZM12 6.45454H9.81818V5.54546H12V6.45454ZM5.54546 2.18182V0H6.45454V2.18182H5.54546ZM5.54546 12V9.81818H6.45454V12H5.54546ZM3 3.6091L1.63182 2.28637L2.28181 1.61819L3.5909 2.98182L3 3.6091ZM9.72727 10.3727L8.39546 9.00454L9.0091 8.38182L10.3682 9.71363L9.72727 10.3727ZM8.38182 2.9909L9.71363 1.63182L10.3818 2.27273L9.02727 3.6L8.38182 2.9909ZM1.62727 9.71819L2.98636 8.38636L3.61818 9.0091L2.28637 10.3682L1.62727 9.71819Z"})}),Li=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"dark-mode",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M6 11C4.61111 11 3.43056 10.5139 2.45833 9.54167C1.48611 8.56944 1 7.38889 1 6C1 4.61111 1.48611 3.43056 2.45833 2.45833C3.43056 1.48611 4.61111 1 6 1C6.09259 1 6.1875 1.00309 6.28472 1.00926C6.38194 1.01543 6.49382 1.02469 6.62036 1.03704C6.2716 1.32408 5.99769 1.68442 5.79861 2.11806C5.59954 2.55169 5.5 3.01234 5.5 3.5C5.5 4.33333 5.79167 5.04167 6.375 5.625C6.95833 6.20833 7.66667 6.5 8.5 6.5C8.99074 6.5 9.45216 6.40509 9.88426 6.21528C10.3164 6.02546 10.6759 5.76544 10.963 5.43519C10.9753 5.54939 10.9846 5.65047 10.9907 5.73843C10.9969 5.82639 11 5.91358 11 6C11 7.38889 10.5139 8.56944 9.54167 9.54167C8.56944 10.5139 7.38889 11 6 11ZM6 10.0741C6.94444 10.0741 7.77469 9.7909 8.49075 9.22454C9.20681 8.65818 9.67594 7.97376 9.89815 7.17129C9.68211 7.25463 9.45474 7.3179 9.21606 7.36111C8.97737 7.40431 8.73869 7.42592 8.5 7.42592C7.41242 7.42592 6.4862 7.0435 5.72135 6.27865C4.9565 5.5138 4.57408 4.58758 4.57408 3.5C4.57408 3.29012 4.59414 3.06944 4.63426 2.83796C4.67438 2.60648 4.74229 2.35185 4.83797 2.07407C3.99229 2.3395 3.29552 2.83487 2.74768 3.56018C2.19984 4.28549 1.92592 5.09876 1.92592 6C1.92592 7.12963 2.32252 8.09105 3.11574 8.88426C3.90895 9.67748 4.87037 10.0741 6 10.0741Z"})}),ji=()=>t("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{opacity:"0.5",d:"M6 19H49C54.5229 19 59 23.4772 59 29V46C59 51.5228 54.5228 56 49 56H14C9.58172 56 6 52.4183 6 48V19Z",fill:"#91CAFF"}),e("path",{d:"M6 19L34.866 18.5L30.7172 11.0737C29.6569 9.17588 27.6531 8 25.4792 8H10C7.79086 8 6 9.79086 6 12V19Z",stroke:"currentColor"}),e("path",{d:"M34.6663 18.6667L31.6916 12.7171C30.8354 11.0048 30.4073 10.1486 29.7687 9.5231C29.2039 8.96995 28.5232 8.54926 27.7759 8.29149C26.9308 8 25.9736 8 24.0591 8H13.8663C10.8794 8 9.38592 8 8.24506 8.5813C7.24153 9.09262 6.42563 9.90852 5.91431 10.9121C5.33301 12.0529 5.33301 13.5464 5.33301 16.5333V18.6667M5.33301 18.6667H45.8663C50.3468 18.6667 52.587 18.6667 54.2983 19.5386C55.8036 20.3056 57.0274 21.5294 57.7944 23.0347C58.6663 24.746 58.6663 26.9862 58.6663 31.4667V43.2C58.6663 47.6804 58.6663 49.9206 57.7944 51.6319C57.0274 53.1372 55.8036 54.3611 54.2983 55.1281C52.587 56 50.3468 56 45.8663 56H18.133C13.6526 56 11.4124 56 9.70108 55.1281C8.19579 54.3611 6.97194 53.1372 6.20496 51.6319C5.33301 49.9206 5.33301 47.6804 5.33301 43.2V18.6667Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Di=()=>e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10.8337 5.83333L9.90404 3.9741C9.6365 3.439 9.50271 3.17144 9.30313 2.97597C9.12664 2.80311 8.91393 2.67164 8.68039 2.59109C8.4163 2.5 8.11716 2.5 7.5189 2.5H4.33366C3.40024 2.5 2.93353 2.5 2.57701 2.68166C2.2634 2.84144 2.00844 3.09641 1.84865 3.41002C1.66699 3.76654 1.66699 4.23325 1.66699 5.16667V5.83333M1.66699 5.83333H14.3337C15.7338 5.83333 16.4339 5.83333 16.9686 6.10582C17.439 6.3455 17.8215 6.72795 18.0612 7.19836C18.3337 7.73314 18.3337 8.4332 18.3337 9.83333V13.5C18.3337 14.9001 18.3337 15.6002 18.0612 16.135C17.8215 16.6054 17.439 16.9878 16.9686 17.2275C16.4339 17.5 15.7338 17.5 14.3337 17.5H5.66699C4.26686 17.5 3.5668 17.5 3.03202 17.2275C2.56161 16.9878 2.17916 16.6054 1.93948 16.135C1.66699 15.6002 1.66699 14.9001 1.66699 13.5V5.83333Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),Ni=()=>e("svg",{width:"48",height:"49",viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M32 24.5L24 16.5M24 16.5L16 24.5M24 16.5V34.9C24 37.6814 24 39.0721 25.101 40.6292C25.8326 41.6638 27.9388 42.9406 29.1944 43.1108C31.0842 43.3668 31.8019 42.9924 33.2371 42.2437C39.6333 38.9071 44 32.2135 44 24.5C44 13.4543 35.0457 4.5 24 4.5C12.9543 4.5 4 13.4543 4 24.5C4 31.9028 8.02199 38.3663 14 41.8244",stroke:"#2884FF",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})}),zi=()=>t("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{width:"56",height:"56",rx:"24",fill:"#8946FB"}),e("path",{d:"M28 36.4722C29.0615 37.4223 30.4633 38 32 38C35.3137 38 38 35.3137 38 32C38 29.2331 36.1271 26.9036 33.5798 26.2102M22.4202 26.2102C19.8729 26.9036 18 29.2331 18 32C18 35.3137 20.6863 38 24 38C27.3137 38 30 35.3137 30 32C30 31.2195 29.851 30.4738 29.5798 29.7898M34 24C34 27.3137 31.3137 30 28 30C24.6863 30 22 27.3137 22 24C22 20.6863 24.6863 18 28 18C31.3137 18 34 20.6863 34 24Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Bi=()=>t("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{width:"56",height:"56",rx:"24",fill:"#7ED846"}),e("path",{d:"M20.5 38V33M20.5 23V18M18 20.5H23M18 35.5H23M29 19L27.2658 23.5089C26.9838 24.2421 26.8428 24.6087 26.6235 24.9171C26.4292 25.1904 26.1904 25.4292 25.9171 25.6235C25.6087 25.8428 25.2421 25.9838 24.5089 26.2658L20 28L24.5089 29.7342C25.2421 30.0162 25.6087 30.1572 25.9171 30.3765C26.1904 30.5708 26.4292 30.8096 26.6235 31.0829C26.8428 31.3913 26.9838 31.7579 27.2658 32.4911L29 37L30.7342 32.4911C31.0162 31.7579 31.1572 31.3913 31.3765 31.0829C31.5708 30.8096 31.8096 30.5708 32.0829 30.3765C32.3913 30.1572 32.7579 30.0162 33.4911 29.7342L38 28L33.4911 26.2658C32.7579 25.9838 32.3913 25.8428 32.0829 25.6235C31.8096 25.4292 31.5708 25.1904 31.3765 24.9171C31.1572 24.6087 31.0162 24.2421 30.7342 23.5089L29 19Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Vi=()=>t("svg",{width:"48",height:"49",viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M19 18.4307C19 17.4761 19 16.9988 19.1995 16.7324C19.3733 16.5001 19.6394 16.3549 19.9288 16.3342C20.2608 16.3105 20.6622 16.5686 21.4652 17.0848L30.9064 23.1541C31.6032 23.602 31.9516 23.826 32.0719 24.1108C32.177 24.3596 32.177 24.6404 32.0719 24.8892C31.9516 25.174 31.6032 25.398 30.9064 25.8459L21.4652 31.9152C20.6622 32.4314 20.2608 32.6895 19.9288 32.6658C19.6394 32.6451 19.3733 32.4998 19.1995 32.2676C19 32.0012 19 31.5239 19 30.5693V18.4307Z",stroke:"currentColor",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M6 16.1C6 12.7397 6 11.0595 6.65396 9.77606C7.2292 8.64708 8.14708 7.7292 9.27606 7.15396C10.5595 6.5 12.2397 6.5 15.6 6.5H32.4C35.7603 6.5 37.4405 6.5 38.7239 7.15396C39.8529 7.7292 40.7708 8.64708 41.346 9.77606C42 11.0595 42 12.7397 42 16.1V32.9C42 36.2603 42 37.9405 41.346 39.2239C40.7708 40.3529 39.8529 41.2708 38.7239 41.846C37.4405 42.5 35.7603 42.5 32.4 42.5H15.6C12.2397 42.5 10.5595 42.5 9.27606 41.846C8.14708 41.2708 7.2292 40.3529 6.65396 39.2239C6 37.9405 6 36.2603 6 32.9V16.1Z",stroke:"currentColor",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ui=()=>e("svg",{width:"48",height:"49",viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M24 41.4444C26.123 43.3446 28.9266 44.5 32 44.5C38.6274 44.5 44 39.1274 44 32.5C44 26.9662 40.2541 22.3072 35.1596 20.9203M12.8404 20.9203C7.74587 22.3072 4 26.9661 4 32.5C4 39.1274 9.37258 44.5 16 44.5C22.6274 44.5 28 39.1274 28 32.5C28 30.939 27.7019 29.4476 27.1596 28.0797M36 16.5C36 23.1274 30.6274 28.5 24 28.5C17.3726 28.5 12 23.1274 12 16.5C12 9.87258 17.3726 4.5 24 4.5C30.6274 4.5 36 9.87258 36 16.5Z",stroke:"currentColor",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})}),$i=t=>e(ne,Object.assign({component:Ti},t)),Wi=t=>e(ne,Object.assign({component:Oi},t)),Hi=t=>e(ne,Object.assign({component:Fi},t)),Gi=t=>e(ne,Object.assign({component:Pi},t)),Yi=t=>e(ne,Object.assign({component:Mi},t)),qi=t=>e(ne,Object.assign({component:Ri},t)),Xi=t=>e(ne,Object.assign({component:Li},t)),Ki=t=>e(ne,Object.assign({component:ji},t)),Zi=t=>e(ne,Object.assign({component:Di},t)),Ji=t=>e(ne,Object.assign({component:Ni},t)),Qi=t=>e(ne,Object.assign({component:zi},t)),eo=t=>e(ne,Object.assign({component:Bi},t)),to=t=>e(ne,Object.assign({component:Vi},t)),no=t=>e(ne,Object.assign({component:Ui},t)),ro=()=>{const{options:e}=ui(),{customIcons:t}=e,n=(e,n,r)=>{const o=null==t?void 0:t[e];return o?i.createElement(o,r):i.createElement(n,r)};return{RootFolderIcon:e=>n("rootFolder",ie,e),FolderIcon:e=>n("folder",ie,e),FolderOpenIcon:e=>n("folderOpen",pe,e),AddFolderIcon:e=>n("addFolder",fe,e),FileIcon:e=>n("file",he,e),UploadIcon:e=>n("upload",de,e),UploadByUrlIcon:e=>n("uploadByUrl",ue,e),ExpandArrowIcon:e=>n("expandArrow",ce,e),CollapseArrowIcon:e=>n("collapseArrow",le,e),ExpandFolderIcon:e=>n("expandArrow",Yr,e),CollapseFolderIcon:e=>n("collapseArrow",Gr,e),FolderPreviewIcon:e=>n("folderPreview",Ki,e),EmptyFolderIcon:e=>n("folderPreview",Zi,e),GridViewIcon:e=>n("gridView",se,e),ListViewIcon:e=>n("listView",ae,e),DropZoneFileIcon:e=>n("folderPreview",Ji,e),BigStockIcon:e=>n("folderPreview",Qi,e),BigAIIcon:e=>n("folderPreview",eo,e),GifPlayIcon:e=>n("folderPreview",to,e),StockBigIcon:e=>n("folderPreview",no,e),MixedViewIcon:e=>n("mixedView",$i,e),LandscapeViewIcon:e=>n("landscapeView",Wi,e),PortraitViewIcon:e=>n("portraitView",Hi,e),SquareViewIcon:e=>n("squareView",Gi,e),LightModeIcon:e=>n("lightMode",qi,e),DarkModeIcon:e=>n("darkMode",Xi,e),AiIcon_2:e=>n("aiIcon_2",Yi,e),getCustomIcon:n}};var io={headerContainer:"headerContainer",actionsContainer:"actionsContainer",filesContainer:"filesContainer",paginationContainer:"paginationContainer",uploadIcon:"uploadIcon",tableContainer:"tableContainer",imagePreview:"imagePreview",fileManagerTableFolder:"fileManagerTableFolder",fileManagerTableFolderInner:"fileManagerTableFolderInner",sortSelect:"sortSelect",fileNameCol:"fileNameCol",fileItemCount:"fileItemCount",fileSize:"fileSize",fileDate:"fileDate",tableMenu:"tableMenu",tableImagePreview:"tableImagePreview",tableFolderIcon:"tableFolderIcon",buttonDeselected:"buttonDeselected",gridRow:"gridRow",gridCard:"gridCard",selectedRow:"selectedRow",gridCardSelected:"gridCardSelected",gridCheckbox:"gridCheckbox",gridCardContent:"gridCardContent",gridPreviewContainer:"gridPreviewContainer",gridPreviewContainerFolder:"gridPreviewContainerFolder",gridFolderIcon:"gridFolderIcon",gridFolderIconImage:"gridFolderIconImage",gridFileName:"gridFileName",gridFileInfo:"gridFileInfo",gridFileMenu:"gridFileMenu",gridFileMenuButton:"gridFileMenuButton",actionsBox:"actionsBox",uploadContainer:"uploadContainer",uploadArea:"uploadArea",active:"active",blockText:"blockText",textTitle:"textTitle",textDescription:"textDescription",buttons:"buttons",btnAi:"btnAi",btnPhoto:"btnPhoto",dragOverlay:"dragOverlay",dragOverlayInner:"dragOverlayInner",noFiles:"noFiles"};const{Text:oo}=P,{Option:ao}=M,so=({files:r,searchTerm:s,handleSearch:l,handleSort:d,sortBy:h,sortOrder:f,handleSortOptionChange:p,pagination:g,setPagination:m,loading:v,handleItemClick:y,selectedFiles:b,toggleFileSelection:w,handleDroppedFiles:x,onRename:C,onDelete:_,onCopy:S,onMove:k,onEdit:A,fileUpload:I,handleAddFile:T})=>{var O,F,P;const{t:G}=Nn(),{DropZoneFileIcon:Y,BigStockIcon:q,BigAIIcon:X,FolderIcon:K}=ro(),{options:Z,actions:J}=ui();gi();const Q=null===(O=null==Z?void 0:Z.config)||void 0===O?void 0:O.disablePagination,{dataProviders:ee}=Z,{setCurrentMenuFile:te,setSelectedFiles:ne,setActiveLibraryItem:re}=J,{viewMode:ie,setViewMode:oe}=(()=>{const[e,t]=o(()=>{try{return localStorage.getItem(Ii)||"table"}catch(e){return"table"}}),n=c(e=>{t(e);try{localStorage.setItem(Ii,e)}catch(e){console.warn("Не удалось сохранить режим отображения:",e)}},[]),r=c(()=>{n("table"===e?"grid":"table")},[e,n]);return{viewMode:e,setViewMode:n,toggleViewMode:r}})(),[ae,se]=o(!1),[le,ce]=o({}),[ue,de]=o(null),[he,fe]=o(!1),pe=u(0);a(()=>{const e=()=>{fe(window.innerWidth<1200)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const ge=b.size,me=(null===(F=Z.config)||void 0===F?void 0:F.features)||{},ve=i.useMemo(()=>Array.from(b)[0],[b]),ye=i.useMemo(()=>ve?r.find(e=>e.id===ve):void 0,[ve,r]),be=(null==ye?void 0:ye.isFolder)?!1!==(null==me?void 0:me.enableRenameFolder):!1!==(null==me?void 0:me.enableRenameFile),we=null===(P=Z.config)||void 0===P?void 0:P.iconStrokeWidth,xe=i.useMemo(()=>{var e,t;if(1!==ge||!ye||ye.isFolder)return!1;let n=!1;if(ye.type&&ye.type.startsWith("image/"))n=!0;else if(ye.extension){const e=ye.extension.toLowerCase();n=on.includes(e)}else{const t=null===(e=ye.name.split(".").pop())||void 0===e?void 0:e.toLowerCase();n=!!t&&on.includes(t)}return console.warn("isImageSelected проверка:",{fileName:ye.name,fileType:ye.type,fileExtension:ye.extension,nameExtension:null===(t=ye.name.split(".").pop())||void 0===t?void 0:t.toLowerCase(),isImage:n,IMAGE_EXTENSIONS:on}),n},[ge,ye]),Ce=`${h}-${f}`,_e=i.useMemo(()=>Array.isArray(r)&&r.some(e=>(e=>{if(!e)return!1;const t=new Date(e);return!Number.isNaN(t.getTime())})(e.date)),[r]),Se=c(async e=>{try{if(null==ee?void 0:ee.getChildrenCount)return await ee.getChildrenCount("folders"===e?void 0:e);if(null==ee?void 0:ee.getFiles){const{files:t,pagination:n}=await ee.getFiles({folderId:"folders"===e?void 0:e,itemType:"all"});return(null==n?void 0:n.total)||t.filter(e=>!e.isFolder).length}return 0}catch(t){return console.error(`Ошибка при получении количества файлов для папки ${e}:`,t),0}},[ee]),ke=c(async()=>{const e=r.filter(e=>e.isFolder);if(0===e.length)return;const t={},n=e.map(async e=>{t[e.id]=await Se(e.id)});await Promise.all(n),ce(t)},[r,Se]);a(()=>{ke()},[ke]);const Ae=c(e=>{e.preventDefault(),e.stopPropagation(),pe.current+=1,e.dataTransfer.types&&e.dataTransfer.types.includes("Files")&&se(!0)},[]),Ee=c(e=>{e.preventDefault(),e.stopPropagation(),pe.current-=1,0===pe.current&&se(!1)},[]),Ie=c(e=>{e.preventDefault(),e.stopPropagation()},[]),Te=c(e=>{if(e.preventDefault(),e.stopPropagation(),se(!1),pe.current=0,e.dataTransfer.files&&e.dataTransfer.files.length>0){const t=Array.from(e.dataTransfer.files);x(t).catch(e=>{console.error("Ошибка при загрузке файлов:",e)})}},[x]),Oe=c((e=()=>{})=>{if(ue)return;const t=setTimeout(()=>{e(),de(null)},300);de(t)},[ue]),Fe=c(e=>{ue&&(clearTimeout(ue),de(null)),e()},[ue]),Pe=c(t=>{const n=[];t.isFolder||!1===(null==me?void 0:me.enableEdit)||n.push({key:"edit",label:G("Edit"),icon:e($r,{size:16,strokeWidth:we})}),(t.isFolder?!1!==(null==me?void 0:me.enableMoveFolder):!1!==(null==me?void 0:me.enableMoveItem))&&n.push({key:"move",label:G("Move to"),icon:e(Hr,{size:16,strokeWidth:we})}),(t.isFolder?!1!==(null==me?void 0:me.enableCopyFolder):!1!==(null==me?void 0:me.enableCopyItem))&&n.push({key:"copy",label:G("Copy"),icon:e(Ur,{size:16,strokeWidth:we})});return(t.isFolder?!1!==(null==me?void 0:me.enableRenameFolder):!1!==(null==me?void 0:me.enableRenameFile))&&n.push({key:"rename",label:G("Rename"),icon:e(ri,{size:16,strokeWidth:we})}),!1!==me.enableDelete&&n.push({key:"delete",label:G("Delete"),icon:e(ii,{size:16,strokeWidth:we}),style:{color:"#ff4d4f"}}),n},[me,G,we]),Me=e=>({key:t})=>{const n=r.find(t=>t.id===e);switch(te&&(null==n?void 0:n.id)&&te(null==n?void 0:n.id),t){case"edit":A(n);break;case"move":k();break;case"copy":S();break;case"rename":C(e);break;case"delete":_(n);break;default:te&&te("")}},Re=[{key:"selection",width:46,render:(t,n)=>e(R,{checked:b.has(n.id),onChange:()=>w(n.id)})},{key:"preview",width:60,render:(t,n)=>n.isFolder?e("div",{className:io.fileManagerTableFolder,children:e("div",{className:io.fileManagerTableFolderInner,children:e(K,{className:io.tableFolderIcon,style:{width:40,height:40}})})}):e(Ei,{className:`${io.imagePreview} ${io.tableImagePreview}`,src:n.thumbnail||n.thumbnailUrl||n.url,alt:n.name,width:40,height:40,preview:!0,file:n})},{title:G("Name"),width:"calc(100% - 430px)",dataIndex:"name",key:"name",className:io.fileNameCol,render:(e,n)=>{const r=n.isFolder&&le[n.id]||0,i=G(1===r?"item":"items");return t("div",{className:io.fileName,children:[e||G("No name"),n.isFolder&&t("div",{className:io.fileItemCount,children:[r," ",i]})]})}},{title:G("Dimensions"),key:"dimensions",width:100,render:(t,n)=>n.dimensions&&e("div",{className:io.fileSize,children:n.dimensions})},{title:G("Size"),key:"size",width:90,render:(t,n)=>!!(null==n?void 0:n.size)&&!n.isFolder&&e("div",{className:io.fileSize,children:`${(n.size/1e6).toFixed(2)}MB`})},{title:G("Type"),key:"type",width:90,render:(t,n)=>e("div",{className:io.fileSize,children:n.isFolder?G("Folder"):(null==n?void 0:n.extension)||""})},..._e?[{title:G("Date"),dataIndex:"date",key:"date",width:180,render:(t,n)=>{const r=n.date;if(!r)return null;const i=new Date(r);if(isNaN(i.getTime()))return null;const o=e=>`${e.getDate()} ${[G("months.january"),G("months.february"),G("months.march"),G("months.april"),G("months.may"),G("months.june"),G("months.july"),G("months.august"),G("months.september"),G("months.october"),G("months.november"),G("months.december")][e.getMonth()]} ${e.getFullYear()}`;return e(L,{title:G("Added",{date:o(i)}),placement:"bottom",className:io.fileDate,children:G("Added",{date:o(i)})})}}]:[],{width:40,title:"",dataIndex:"",key:"x",onCell:()=>({style:{padding:0}}),render:(t,n)=>e(j,{arrow:!0,placement:"bottom",menu:{items:Pe(n),onClick:Me(n.id)},trigger:["hover"],children:e("span",{className:`${io.tableMenu} tableMenuButton`,onClick:e=>{e.stopPropagation(),e.preventDefault()},children:e(Wr,{size:16,strokeWidth:we})})})}],Le="table"===ie?e(E,{renderEmpty:()=>e(U,{image:e(n,{}),description:""}),children:e(V,{dataSource:r,columns:Re,rowKey:"id",pagination:!1,loading:v,rowClassName:e=>(null==b?void 0:b.has(e.id))?io.selectedRow:"",tableLayout:"fixed",onRow:e=>({onClick:t=>{const n=t.target;Oe(()=>{t.stopPropagation(),t.preventDefault();const r=!!n.closest(".ant-image")||!!n.closest(".ant-image-preview-wrap"),i=!!n.closest(".tableMenuButton"),o=!!n.closest(".ant-dropdown-menu");r||i||o||w(e.id,{metaKey:t.metaKey,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey})})},onDoubleClick:t=>{Fe(()=>{t.stopPropagation(),t.preventDefault();const n=t.target;n.closest(".ant-checkbox-wrapper")||n.closest(".tableMenu")||(e.isFolder?y(e):n.closest(".ant-image")||n.closest(".ant-image-preview-wrap")||!Z.onEditorOk||(console.warn("onEditorOk"),Z.onEditorOk(e)))})}}),showHeader:!1})}):e($,{gutter:[16,16],className:io.gridRow,style:{gap:20,padding:"0 24px 24px",margin:0},children:r.map(r=>e(W,{className:io.gridCard_col,style:{padding:0},children:t(H,{hoverable:!0,cover:e("div",{className:r.isFolder?io.gridPreviewContainerFolder:io.gridPreviewContainer,onClick:e=>{e.stopPropagation(),r.isFolder&&Oe(()=>{w(r.id,{metaKey:e.metaKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey})})},onDoubleClick:e=>{e.stopPropagation(),Fe(()=>{r.isFolder&&y(r)})},children:r.isFolder?e("div",{className:io.gridFolderIcon,children:e(K,{className:io.gridFolderIconImage})}):e(Ei,{src:r.thumbnail||r.thumbnailUrl||r.url,alt:r.name,className:io.gridImagePreview,preview:!0,file:r})}),className:`${io.gridCard} ${(null==b?void 0:b.has(r.id))?io.gridCardSelected:""}`,onClick:e=>{e.stopPropagation(),e.preventDefault();const t=e.target;t.closest(".gridFileMenuButton")||t.closest(".ant-dropdown-menu")||Oe(()=>w(r.id,{metaKey:e.metaKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey}))},onDoubleClick:e=>{e.stopPropagation(),Fe(()=>{r.isFolder&&y(r)})},children:[t("div",{className:io.gridCardContent,onDoubleClick:e=>{e.stopPropagation(),e.preventDefault(),Fe(()=>{Z.onEditorOk&&Z.onEditorOk(r)})},onClick:e=>{e.stopPropagation(),e.preventDefault();const t=e.target;t.closest(".gridFileMenuButton")||t.closest(".ant-dropdown-menu")||Oe(()=>w(r.id,{metaKey:e.metaKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey}))},children:[e("div",{className:io.gridFileName,children:r.name||G("Untitled")}),e("div",{className:io.gridFileInfo,children:r.isFolder?(()=>{const e=le[r.id]||0;return`${e} ${G(1===e?"item":"items")}`})():t(n,{children:[r.dimensions&&`${r.dimensions} • `,r.size&&`${(r.size/1e6).toFixed(2)} MB • `,r.extension&&`${r.extension}`]})})]}),e("div",{className:io.gridFileMenu,children:e(j,{menu:{items:Pe(r),onClick:Me(r.id)},arrow:!0,placement:"bottom",trigger:["hover"],children:e(D,{type:"default",className:`${io.gridFileMenuButton} gridFileMenuButton`,onClick:()=>{},children:e(Wr,{size:16,strokeWidth:we})})},r.id)}),e("div",{onClick:e=>{e.stopPropagation()},className:io.gridCheckbox,children:e(R,{checked:b.has(r.id),style:{height:20},onChange:e=>{e.stopPropagation(),w(r.id)}})})]})},r.id))});return e("div",{className:"content-layout",children:t("div",{className:io.filesContainer,onDragOver:Ie,onDragLeave:Ee,onDragEnter:Ae,onDrop:Te,children:[ae&&0!==(null==r?void 0:r.length)&&e("div",{className:io.dragOverlay,children:t("div",{className:io.dragOverlayInner,children:[e("div",{className:io.uploadIcon,children:e(Y,{})}),e("div",{className:io.textTitle,children:G("Drop files to upload")}),e("div",{className:io.textDescription,children:G("Supported files:")+" jpeg, .svg, .png"})]})}),v||0!==(null==r?void 0:r.length)||s?t("div",{className:io.tableContainer,children:[t("div",ge?{className:`header-container ${io.headerContainer}`,children:[t(oo,{type:"secondary",className:"selected-text",children:[t("div",{children:[ge," ",G("selected")]}),e(L,{title:he?G("Deselected"):null,children:e(D,{className:io.buttonDeselected,icon:e(ei,{size:16,strokeWidth:we}),onClick:()=>ne&&ne(new Set),children:G("Deselected")})})]}),t(N,{children:[xe&&!1!==(null==me?void 0:me.enableEdit)&&e(L,{title:he?G("Edit"):null,children:e(D,{icon:e($r,{size:16,strokeWidth:we}),onClick:()=>{A(ye)},disabled:!xe,children:G("Edit")})}),Array.from(b).every(e=>{const t=r.find(t=>t.id===e);return!!t&&(t.isFolder?!1!==(null==me?void 0:me.enableMoveFolder):!1!==(null==me?void 0:me.enableMoveItem))})&&e(L,{title:he?G("Move to"):null,children:e(D,{icon:e(Hr,{size:16,strokeWidth:we}),onClick:k,children:G("Move to")})}),Array.from(b).every(e=>{const t=r.find(t=>t.id===e);return!!t&&(t.isFolder?!1!==(null==me?void 0:me.enableCopyFolder):!1!==(null==me?void 0:me.enableCopyItem))})&&e(L,{title:he?G("Copy"):null,children:e(D,{icon:e(Ur,{size:16,strokeWidth:we}),onClick:S,children:G("Copy")})}),1===ge&&be&&e(L,{title:he?G("Rename"):null,children:e(D,{icon:e(ri,{size:16,strokeWidth:we}),onClick:()=>C(),disabled:1!==ge||!be,children:G("Rename")})}),!1!==(null==me?void 0:me.enableDelete)&&e(L,{title:he?G("Delete"):null,children:e(D,{danger:!0,icon:e(ii,{size:16,strokeWidth:we}),onClick:e=>{e.stopPropagation(),e.preventDefault(),_()},children:G("Delete")})})]})]}:{className:io.headerContainer,children:[e("div",{className:"search-container",children:e(_i,{placeholder:G("Search file or folder"),onSearch:l,className:io.searchInput})}),t("div",{className:io.actionsBox,children:[e("div",{className:"sort-container",children:t(M,{value:Ce,onChange:p,className:io.sortSelect,popupMatchSelectWidth:!1,suffixIcon:e(Br,{size:16,strokeWidth:we}),children:[e(ao,{value:"date-desc",children:G("Newest first")}),e(ao,{value:"date-asc",children:G("Oldest first")}),e(ao,{value:"size-desc",children:G("Largest first")}),e(ao,{value:"size-asc",children:G("Smallest first")}),e(ao,{value:"name-asc",children:G("A-Z")}),e(ao,{value:"name-desc",children:G("Z-A")}),e(ao,{value:"type-asc",children:G("By type")})]})}),e("div",{className:io.actionsContainer,children:e(z,{options:[{value:"grid",icon:e(qr,{size:16,strokeWidth:we})},{value:"table",icon:e(Zr,{size:20,strokeWidth:we})}],value:ie,onChange:e=>oe(e)})})]})]}),s&&!r.length?e("div",{className:io.noFiles,children:G("There are no files for your request.")}):Le,!Q&&g.total>g.pageSize&&e("div",{className:io.paginationContainer,children:e(B,{current:g.current,pageSize:g.pageSize,total:g.total,onChange:(e,t)=>m({current:e,pageSize:t,total:g.total}),showSizeChanger:!0,showTotal:e=>G("total pages",{total:e})})})]}):t("div",{className:io.uploadContainer,children:[t("div",{className:`${io.uploadArea} ${ae?io.active:""}`,onClick:T,onDragOver:Ie,onDragLeave:Ee,onDragEnter:Ae,onDrop:Te,children:[e("div",{className:io.uploadIcon,children:e(Y,{})}),e("div",{className:io.textTitle,children:G("Select a file or drag and drop it here")}),e("div",{className:io.textDescription,children:G("Supported files:")+" jpeg, .svg, .png"})]}),t("div",{className:io.buttons,children:[t("button",{className:io.btnPhoto,onClick:()=>{re&&re(Kt)},children:[e("div",{className:io.icon,children:e(q,{})}),t("div",{className:io.blockText,children:[e("div",{className:io.textTitle,children:G("Stock")}),e("div",{className:io.textDescription,children:G("Select an image from our library")})]})]}),t("button",{className:io.btnAi,onClick:()=>{re&&re(Zt)},children:[e("div",{className:io.icon,children:e(X,{})}),t("div",{className:io.blockText,children:[e("div",{className:io.textTitle,children:G("AI generation")}),e("div",{className:io.textDescription,children:G("Creating an image on demand")})]})]})]})]})]})})};var lo={"em-filemanager":"em-filemanager",folderTree:"folderTree",emptyFolderContainer:"emptyFolderContainer",folderItemContainer:"folderItemContainer",folderLabel:"folderLabel",folderLabelItem:"folderLabelItem",fileCount:"fileCount",foldersTitle:"foldersTitle",foldersTitleItem:"foldersTitleItem",folderSelectionTree:"folderSelectionTree",folderMenu:"folderMenu",folderIcon:"folderIcon"};const co=({selectedFolder:n,onSelect:r,onExpand:i,generateMenuItems:a,fetchChildFolders:s,disabledFolders:l=[],showFileCounts:u=!1,folderFileCounts:h={},className:f="",expandedKeys:p,setExpandedKeys:g,showTrashFolder:m=!1,mode:v="navigation",defaultExpandAll:y=!1})=>{const{t:b}=Nn(),{options:w}=ui(),{config:x}=w,{ExpandArrowIcon:C,CollapseArrowIcon:_,CollapseFolderIcon:S,ExpandFolderIcon:k,EmptyFolderIcon:A}=ro(),E=c(e=>{const t=[],n=e=>{e.forEach(e=>{t.push(e.key),e.children&&n(e.children)})};return n(e),t},[]),[I,T]=o(()=>{if(y||"selection"===v&&y){const e=a();return E(e)}return[]}),O=void 0!==p?p:I,F=void 0!==g?g:T,P=c(async e=>{const t=e[0];t&&"empty"!==t&&(null==r||r(e),await(null==s?void 0:s("folders"===t?null:t)))},[r,s]),M=c(async(e,t)=>{var n;F(e),null==i||i(e,t);if(!("lazy"===(null==x?void 0:x.folderTreeLoading)))return;const r=(null===(n=null==t?void 0:t.node)||void 0===n?void 0:n.key)||void 0;if(r&&"folders"!==r)try{await(null==s?void 0:s(r))}catch(e){console.warn("Failed to load child folders for",r,e)}},[null==x?void 0:x.folderTreeLoading,s,i,F]),R=c(()=>{var r;const i=a(),o=e=>e.filter(e=>"Trash"!==e.key).map(e=>Object.assign(Object.assign({},e),{children:e.children?o(e.children):void 0})),s=m?o(i):i,c=e=>{"selection"!==v?(O.includes(e)&&n===e?F(O.filter(t=>t!==e)):O.includes(e)||F([...O,e]),n!==e&&P([e])):P([e])};if(0===s.length||1===s.length&&(!s[0].children||0===s[0].children.length))return[{key:"empty",title:e("div",{className:lo.emptyFolderContainer,children:b("No folders yet")}),disabled:!0}];const d=n=>{var r;const i=u&&h[n.key]||0,o=O.includes(n.key),a=l.includes(n.key),s=(()=>{var t;return(null===(t=n.children)||void 0===t?void 0:t.length)?e(o?S:k,{size:20,strokeWidth:null==x?void 0:x.iconStrokeWidth}):e(A,{size:20,strokeWidth:null==x?void 0:x.iconStrokeWidth})})(),f=t("div",{className:`${lo.folderItemContainer} folder-item-container`,onClick:()=>!a&&c(n.key),style:{opacity:a?.5:1,cursor:a?"not-allowed":"pointer"},children:[t("div",{className:lo.folderLabel,children:[n.icon||s,e("span",{className:lo.folderLabelItem,children:n.label})]}),u&&e("div",{className:lo.fileCount,title:`${i} ${1===i?"file":"files"}`,children:i})]});return{key:n.key,title:f,children:null===(r=n.children)||void 0===r?void 0:r.map(d),disabled:a}},f=O.includes("folders"),p=e("div",{className:lo.foldersTitle,onClick:()=>c("folders"),children:t("div",{className:lo.foldersTitleItem,children:[e(f?S:k,{size:20,strokeWidth:null==x?void 0:x.iconStrokeWidth}),e("span",{className:`${lo.folderLabelItem} folder-label-item`,children:"folders"===s[0].key?s[0].label:b("Folders")})]})});if(s.length>0&&"folders"===s[0].key){const n=[{key:"folders",title:p,children:null===(r=s[0].children)||void 0===r?void 0:r.map(d)}];return m&&n.push({key:"Trash",title:e("div",{className:lo.foldersTitle,onClick:()=>c("Trash"),children:t("div",{className:lo.foldersTitleItem,children:[e(ii,{size:20,strokeWidth:null==x?void 0:x.iconStrokeWidth}),e("span",{className:lo.folderLabelItem,children:b("Trash")})]})}),children:void 0}),n}return s.map(d)},[a,O,S,null==x?void 0:x.iconStrokeWidth,k,b,n,P,u,h,A,l,m,v,F]),L=d(()=>R(),[R]);return e(G,{className:`${lo.folderTree} ${lo.folderMenu} ${lo[f]}`,selectedKeys:n?[n]:[],expandedKeys:O,onSelect:P,onExpand:M,treeData:L,switcherIcon:({expanded:t})=>e(t?_:C,{}),showLine:!1})};var uo={formFooter:"formFooter",folderButton:"folderButton",foldersWrapper:"foldersWrapper",formItem:"formItem",folderToolsField:"folderToolsField"};const ho=f(({folderId:r,activeFormField:i,EmptyFolderIcon:o,targetForm:a,handleModalOk:s,onComplete:l,t:u})=>{const d=c(()=>{a.setFieldsValue({folderName:""})},[a]),h=c(()=>{s(a).then(e=>{l(null==e?void 0:e.id)})},[s,a,l]);return e(T.Item,{className:"form-item form-item-moveto "+(i===r?"form-item_active":""),name:"folderName",initialValue:u("New folder"),rules:[{required:!0,validator:(e,t)=>"string"==typeof t&&0===t.trim().length?Promise.reject(new Error(u("Enter the name of the folder"))):Promise.resolve()}],children:e(O,{className:"form-input",autoFocus:!0,prefix:e(o,{style:{marginRight:6}}),suffix:t(n,{children:[e(L,{placement:"top",title:"Clean",children:e(D,{icon:e(ge,{style:{fontSize:10}}),className:uo.inputButtonClose,type:"text",onClick:d})}),e(D,{className:uo.inputButtonOk,type:"text",onClick:h,children:"Создать"})]})})})});ho.displayName="CustomFolderInput";const fo=({isModalVisible:r,handleModalOk:i,handleModalCancel:a,form:s,selectedFolder:l,folders:u,isUrlModalVisible:h,setIsUrlModalVisible:f,handleAddFileByUrl:p,urlForm:g,isRenameModalVisible:m,handleRenameOk:v,handleRenameCancel:y,renameForm:b,fileToRename:w,files:x,isMoveModalVisible:C,handleMoveOk:_,handleMoveCancel:S,moveForm:k,selectedFiles:A,isRenameFolderModalVisible:E,handleRenameFolderOk:I,handleRenameFolderCancel:F,renameFolderForm:P,folderToRename:M,isCopyModalVisible:R,handleCopyOk:L,handleCopyCancel:j,copyForm:N,isDeleteConfirmVisible:z,handleDeleteConfirmOk:B,handleDeleteConfirmCancel:V,fetchChildFolders:U})=>{var $,W,H;const{t:G}=Nn(),{state:q,actions:X,options:K}=ui(),{setCurrentMenuFile:Z}=X,{config:J}=K,{currentMenuFile:Q}=q,ee=T.useWatch("folderName",s),{EmptyFolderIcon:te}=ro(),[ne,re]=o(""),ie=!ee||0===String(ee).trim().length,oe=d(()=>Array.isArray(x)?x:[],[x]),ae=w?null===($=oe.find(e=>e.id===w))||void 0===$?void 0:$.name:"",se=Array.isArray(u)?u:[],le=M?null===(W=se.find(e=>e.id===M))||void 0===W?void 0:W.name:"",ce=w?oe.find(e=>e.id===w):null,ue=(null==ce?void 0:ce.isFolder)||(null==w?void 0:w.startsWith("folder_")),de=c(async e=>{e.length>0&&(k.setFieldsValue({targetFolder:e[0]}),ne!==e[0].toString()&&re(""))},[k,ne]),he=c(async e=>{e.length>0&&(N.setFieldsValue({targetFolder:e[0]}),ne!==e[0].toString()&&re(""))},[ne,N]),fe=d(()=>Array.from(A).filter(e=>{const t=oe.find(t=>t.id===e);return(null==t?void 0:t.isFolder)||u.some(t=>t.id===e)}),[A,oe,u]),pe=c((t,n)=>{const r=r=>e(ho,{folderId:r,activeFormField:ne,EmptyFolderIcon:te,targetForm:t,handleModalOk:i,onComplete:n,t:G},r);return r.displayName="CustomInputComponent",r},[te,ne,i,G]),ge=c(e=>{const{folderId:t,targetForm:n,onTreeSelect:r,onComplete:i}=e;return{handleAddFolder:e=>{e.preventDefault(),e.stopPropagation(),re(t),n.setFieldsValue({folderName:G("New folder"),targetFolder:t})},handleSelectFolder:e=>{e.preventDefault(),e.stopPropagation(),r([t]).then(()=>i(t))}}},[G]),me=c(r=>{const{targetForm:i,onTreeSelect:o,onComplete:a,actionButtonText:s}=r,c=pe(i,a),d=(r=null,h=new Set)=>u.filter(e=>{const t=null===r&&!e.parentId,n=e.parentId===r;return t||n}).map(r=>{if(h.has(r.id))return{key:r.id,label:`${r.name} (циклическая ссылка)`};const u=new Set(h);u.add(r.id);const f=d(r.id,u),{handleAddFolder:p,handleSelectFolder:g}=ge({folderId:r.id,targetForm:i,onTreeSelect:o,onComplete:a});return{key:r.id,label:t(n,{children:[r.name,l!==r.id&&t("div",{className:`${uo.folderToolsField} folder-tools-field`,children:[e(D,{onClick:p,children:"+"}),e(D,{onClick:g,children:s})]}),ne===r.id&&c(r.id)]}),children:f.length>0?f:void 0}}),h=d(),{handleAddFolder:f,handleSelectFolder:p}=ge({folderId:"folders",targetForm:i,onTreeSelect:o,onComplete:a});return[{key:"folders",label:t(n,{children:[G("Folders"),"folders"!==l&&null!==l&&t("div",{className:`${uo.folderToolsField} folder-tools-field`,children:[e(D,{onClick:f,children:"+"}),e(D,{onClick:p,children:s})]}),"folders"===ne&&c("folders")]}),children:h}]},[G,l,ne,u,pe,ge]);return t(n,{children:[e(Y,{title:e("div",{className:"modal-title",children:G("Creating a new folder")}),open:r,onOk:()=>i(),onCancel:a,okText:G("Create"),cancelText:G("Cancel"),okButtonProps:{disabled:ie},children:t(T,{form:s,layout:"vertical",children:[e(T.Item,{name:"folderName",label:e("div",{className:"form-label",children:G("Folder name")}),rules:[{required:!0,validator:(e,t)=>"string"==typeof t&&0===t.trim().length?Promise.reject(new Error(G("Enter the name of the folder"))):Promise.resolve()}],initialValue:G("New folder"),className:"form-item",style:{marginBottom:5},children:e(O,{autoFocus:!0,className:"form-input"})}),e("div",{children:l&&"folders"!==l?t("p",{className:"fm-note",children:[G("A folder will be created inside:")," ",(null===(H=se.find(e=>e.id===l))||void 0===H?void 0:H.name)||G("selected folder"),"."]}):e("p",{className:"fm-note",children:G("The folder will be created in the root directory.")})})]})}),e(Y,{title:e("div",{className:"modal-title",children:G("Upload file by URL")}),open:h,onOk:()=>p(null),onCancel:()=>f(!1),okText:G("Download"),cancelText:G("Cancel"),children:e(T,{form:g,layout:"vertical",children:e(T.Item,{name:"fileUrl",label:e("div",{className:"form-label",children:G("File URL")}),rules:[{required:!0,message:G("Enter the URL of the image")}],className:"form-item",children:e(O,{autoFocus:!0,placeholder:"https://example.com/image.jpg",className:"form-input"})})})}),e(Y,{title:e("div",{className:"modal-title",children:ue?`${G("Rename folder")} ${ae}`:G("Rename file",{currentFileName:ae})}),open:m,onOk:v,onCancel:y,okText:G("Rename"),cancelText:G("Cancel"),afterClose:()=>{Z&&Z("")},children:e(T,{form:b,layout:"vertical",children:e(T.Item,{name:"newFileName",label:e("div",{className:"form-label",children:G(ue?"New folder name":"New file name")}),rules:[{required:!0,message:G(ue?"Enter a new folder name":"Enter a new file name")}],className:"form-item",children:e(O,{autoFocus:!0,className:"form-input"})})})}),e(Y,{title:e("div",{className:"modal-title",children:G("Move to")}),open:C,onCancel:S,footer:t("div",{className:uo.formFooter,children:[t(D,{className:uo.folderButton,onClick:()=>i(k),children:[e(Yr,{size:18,strokeWidth:null==J?void 0:J.iconStrokeWidth}),G("Create folder")]}),e(D,{type:"primary",className:uo.folderButton,onClick:S,children:G("Done")})]}),afterClose:()=>{Z&&Z(""),re("")},children:e(T,{form:k,layout:"vertical",children:e("div",{className:uo.foldersWrapper,children:e(T.Item,{name:"targetFolder",rules:[{required:!0,message:G("Select the destination folder")}],className:uo.formItem,children:e(co,{onSelect:de,generateMenuItems:()=>me({targetForm:k,onTreeSelect:de,onComplete:_,actionButtonText:G("Move here")}),fetchChildFolders:U,disabledFolders:fe,mode:"selection",className:uo.folderSelectionTree,defaultExpandAll:!0})})})})}),e(Y,{title:e("div",{className:"modal-title",children:G("Copy to folder")}),open:R,onCancel:j,footer:t("div",{className:uo.formFooter,children:[t(D,{className:uo.folderButton,onClick:()=>i(N),children:[e(Yr,{size:18,strokeWidth:null==J?void 0:J.iconStrokeWidth}),G("Create folder")]}),e(D,{type:"primary",className:uo.folderButton,onClick:j,children:G("Done")})]}),afterClose:()=>{Z&&Z(""),re("")},children:e(T,{form:N,layout:"vertical",children:e("div",{className:uo.foldersWrapper,children:e(T.Item,{name:"targetFolder",rules:[{required:!0,message:G("Select the destination folder")}],className:uo.formItem,children:e(co,{onSelect:he,generateMenuItems:()=>me({targetForm:N,onTreeSelect:he,onComplete:L,actionButtonText:G("Copy here")}),fetchChildFolders:U,disabledFolders:fe,mode:"selection",className:uo.folderSelectionTree,defaultExpandAll:!0})})})})}),e(Y,{title:t("div",{className:"modal-title",children:[G("Rename folder")," ",le]}),open:E,onOk:I,onCancel:F,okText:G("Rename"),cancelText:G("Cancel"),afterClose:()=>{Z&&Z("")},children:e(T,{form:P,layout:"vertical",children:e(T.Item,{name:"newFolderName",label:e("div",{className:"form-label",children:G("New folder name")}),rules:[{required:!0,message:G("Enter a new folder name")}],className:"form-item",children:e(O,{autoFocus:!0,className:"form-input"})})})}),e(Y,{title:(()=>{const t=!!(null==J?void 0:J.enableTrashFolder)&&"Trash"===l||!(null==J?void 0:J.enableTrashFolder),n=G(t?"Permanently delete":"Move to Trash");return e("div",{className:"modal-title",children:n})})(),open:!!z,onOk:()=>B&&B(),onCancel:()=>V&&V(),okText:(null==J?void 0:J.enableTrashFolder)&&"Trash"===l?G("Delete permanently"):(null==J?void 0:J.enableTrashFolder)?G("Move to Trash"):G("Delete"),cancelText:G("Cancel"),okButtonProps:{danger:!(null==J?void 0:J.enableTrashFolder)||"Trash"===l},afterClose:()=>{Z&&Z("")},children:(()=>{var t,n;const r=(Q?[Q]:Array.from(A||[])).map(e=>oe.find(t=>t.id===e)).filter(e=>!!e),i=r.filter(e=>e.isFolder||e.id.startsWith("folder_")),o=r.filter(e=>!(e.isFolder||e.id.startsWith("folder_"))),a=r.length,s=i.length,c=o.length,u=!!(null==J?void 0:J.enableTrashFolder);if(!u||u&&"Trash"===l){if(1===a&&1===s){const n=i[0],r=(null==n?void 0:n.name)||"",o=null!==(t=null==n?void 0:n.childCount)&&void 0!==t?t:0;return e("div",{children:G("delete_folder_permanent",{name:r,count:o})})}return e("div",0===s&&c>0?{children:G("delete_files_permanent",{count:c})}:{children:G("delete_mixed_permanent",{total:a,folders:s,images:c})})}if(1===a&&1===s){const t=i[0],r=(null==t?void 0:t.name)||"",o=null!==(n=null==t?void 0:t.childCount)&&void 0!==n?n:0;return e("div",{children:G("move_folder_to_trash",{name:r,count:o})})}return e("div",0===s&&c>0?{children:G("move_files_to_trash",{count:c})}:{children:G("move_mixed_to_trash",{total:a,folders:s,images:c})})})()})]})};var po={button:"button",folderActions:"folderActions",uploadButton:"uploadButton",folderMenu:"folderMenu",foldersContainer:"foldersContainer",divider:"divider",buttonWrapper:"buttonWrapper",uploadButtonTitle:"uploadButtonTitle"};const go=f(p(({selectedFolder:n,generateMenuItems:r,onFolderSelect:i,folders:s,fetchFolders:l,fetchChildFolders:h,handleAddFile:f,setIsUrlModalVisible:p,handleCreateFolder:m,activeLibraryItem:v,setActiveLibraryItem:y},b)=>{const w=d(()=>Array.isArray(s)?s:[],[s]),{t:x}=Nn(),C=gi(),[_,S]=o({}),{options:k}=ui(),{dataProviders:A,config:E}=k;ro();const I=c(e=>{const t=[],n=e=>{e.forEach(e=>{t.push(e.key),e.children&&n(e.children)})};return n(e),t},[]),[T,O]=o(()=>{if(!0===(null==E?void 0:E.expandAllFoldersOnInit)&&"lazy"!==(null==E?void 0:E.folderTreeLoading)){const e=r();return I(e)}return!0===(null==E?void 0:E.expandRootFolderOnInit)?["folders"]:[]}),F=u(!1),P=u(!1);a(()=>{if(F.current)return;"lazy"===(null==E?void 0:E.folderTreeLoading)&&!0===(null==E?void 0:E.expandRootFolderOnInit)&&(F.current=!0,(async()=>{try{await(null==h?void 0:h(null))}catch(e){console.warn("Не удалось подгрузить дочерние папки корня при инициализации",e)}})())},[null==E?void 0:E.folderTreeLoading,null==E?void 0:E.expandRootFolderOnInit,h]),a(()=>{!0===(null==E?void 0:E.expandRootFolderOnInit)&&Array.isArray(w)&&w.length>0&&(P.current||(P.current=!0,O(["folders"])))},[null==E?void 0:E.expandRootFolderOnInit,w]),a(()=>{if(!0===(null==E?void 0:E.expandAllFoldersOnInit)&&"lazy"!==(null==E?void 0:E.folderTreeLoading)){const e=r(),t=I(e);return void O(t)}!0===(null==E?void 0:E.expandRootFolderOnInit)&&O(e=>e&&e.length>0?[...e]:["folders"])},[w,r,I,null==E?void 0:E.expandAllFoldersOnInit,null==E?void 0:E.folderTreeLoading,null==E?void 0:E.expandRootFolderOnInit]);const M=c(async e=>{try{if(null==A?void 0:A.getChildrenCount)return await A.getChildrenCount("folders"===e?void 0:e);if(null==A?void 0:A.getFiles){const{files:t,pagination:n}=await A.getFiles({folderId:"folders"===e?void 0:e,itemType:"all"});return(null==n?void 0:n.total)||t.filter(e=>!e.isFolder).length}return 0}catch(t){return console.error(`Ошибка при получении количества файлов для папки ${e}:`,t),C.error({id:"FOLDER_CHILDREN_COUNT_FAILED",message:x("Failed to load folder items count"),placement:"bottomRight",innerException:t,data:{folderId:"folders"===e?null:e,reason:t instanceof Error?t.message:String(t)}}),0}},[A,C,x]),R=c(async()=>{if(0===w.length)return;const e={};e.folders=await M("folders");const t=w.map(async t=>{const n=await M(t.id);e[t.id]=n});await Promise.all(t),S(e)},[w,M]),L=c(async e=>{const t=await M(e);S(n=>Object.assign(Object.assign({},n),{[e]:t}))},[M]);g(b,()=>({refreshFileCounts:R}),[R]),a(()=>{R()},[R]);const j=c(async()=>{await f(),n?await L(n):await L("folders")},[f,n,L]),N=[{key:qt,label:x("My files"),icon:e(Xr,{size:20,strokeWidth:null==E?void 0:E.iconStrokeWidth})},{key:Xt,label:x("GIF"),icon:e(Jr,{size:20,strokeWidth:null==E?void 0:E.iconStrokeWidth})},{key:Kt,label:x("Stock images"),icon:e(Vr,{size:20,strokeWidth:null==E?void 0:E.iconStrokeWidth})},{key:Zt,label:x("AI"),icon:e(ni,{size:20,strokeWidth:null==E?void 0:E.iconStrokeWidth}),disabled:!(null==E?void 0:E.sseQuery)}],z=c(async e=>{const t=e[0];t&&"empty"!==t&&(v!==qt&&y(qt),null==i||i(t),await(null==h?void 0:h(t)))},[i,v,y,h]),B=c(({key:e})=>{console.warn("key",e),y(e)},[y]),V=c(async(e,t)=>{var n;O(e);if(!("lazy"===(null==E?void 0:E.folderTreeLoading)))return;const r=(null===(n=null==t?void 0:t.node)||void 0===n?void 0:n.key)||void 0;if(r&&"folders"!==r)try{await(null==h?void 0:h(r))}catch(e){console.warn("Не удалось подгрузить дочерние папки для",r,e),C.error({id:"FOLDER_CHILDREN_FETCH_FAILED",message:x("Failed to load subfolders"),placement:"bottomRight",innerException:e,data:{folderId:r,reason:e instanceof Error?e.message:String(e)}})}},[null==E?void 0:E.folderTreeLoading,h,C,x]);return t("div",{className:"sidebar-container",children:[t("div",{className:po.buttonWrapper,children:[e(D,{type:"primary",size:"large",icon:e(Qr,{size:24,strokeWidth:null==E?void 0:E.iconStrokeWidth}),onClick:j,className:po.uploadButton,style:{whiteSpace:"nowrap"},children:e("span",{className:po.uploadButtonTitle,children:x("Upload file")})}),e(D,{type:"primary",size:"large",icon:e(Kr,{size:24,strokeWidth:null==E?void 0:E.iconStrokeWidth}),onClick:()=>null==p?void 0:p(!0),className:po.uploadByURLButton,style:{whiteSpace:"nowrap"}})]}),e(q,{className:"folder-menu",items:N,defaultSelectedKeys:[qt],onSelect:({key:e})=>B({key:e}),selectedKeys:[v]}),e(X,{className:po.divider}),t("div",{className:po.foldersContainer,children:[e(co,{className:`${po.folderMenu} ${po.folderTree}`,selectedFolder:n,onSelect:z,onExpand:V,generateMenuItems:r,fetchChildFolders:h,showFileCounts:!0,folderFileCounts:_,expandedKeys:T,setExpandedKeys:O,showTrashFolder:null==E?void 0:E.enableTrashFolder}),e("div",{className:po.folderActions,children:e(D,{onClick:e=>{e.stopPropagation(),m()},className:po.button,icon:e(Yr,{size:18,strokeWidth:null==E?void 0:E.iconStrokeWidth}),size:"middle"})})]})]})}));go.displayName="FolderSidebar";var mo=Object.defineProperty,vo=(e,t,n)=>(((e,t,n)=>{t in e?mo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function yo(e,t){return void 0===t&&(t=15),+parseFloat(Number(e).toPrecision(t))}function bo(e){var t=e.toString().split(/[eE]/),n=(t[0].split(".")[1]||"").length-+(t[1]||0);return n>0?n:0}function wo(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));var t=bo(e);return t>0?yo(Number(e)*Math.pow(10,t)):Number(e)}function xo(e){Eo&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&console.warn(e+" is beyond boundary when transfer to integer, the results may not be accurate")}function Co(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0];return t.slice(1).reduce(function(t,n){return e(t,n)},r)}}var _o=Co(function(e,t){var n=wo(e),r=wo(t),i=bo(e)+bo(t),o=n*r;return xo(o),o/Math.pow(10,i)}),So=Co(function(e,t){var n=Math.pow(10,Math.max(bo(e),bo(t)));return(_o(e,n)+_o(t,n))/n}),ko=Co(function(e,t){var n=Math.pow(10,Math.max(bo(e),bo(t)));return(_o(e,n)-_o(t,n))/n}),Ao=Co(function(e,t){var n=wo(e),r=wo(t);return xo(n),xo(r),_o(n/r,yo(Math.pow(10,bo(t)-bo(e))))});var Eo=!0;var Io={strip:yo,plus:So,minus:ko,times:_o,divide:Ao,round:function(e,t){var n=Math.pow(10,t),r=Ao(Math.round(Math.abs(_o(e,n))),n);return e<0&&0!==r&&(r=_o(r,-1)),r},digitLength:bo,float2Fixed:wo,enableBoundaryChecking:function(e){void 0===e&&(e=!0),Eo=e}};const To=Object.prototype.toString;function Oo(e){switch(To.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Bo(e,Error)}}function Fo(e,t){return To.call(e)===`[object ${t}]`}function Po(e){return Fo(e,"ErrorEvent")}function Mo(e){return Fo(e,"DOMError")}function Ro(e){return Fo(e,"String")}function Lo(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function jo(e){return null===e||Lo(e)||"object"!=typeof e&&"function"!=typeof e}function Do(e){return Fo(e,"Object")}function No(e){return typeof Event<"u"&&Bo(e,Event)}function zo(e){return!(!e||!e.then||"function"!=typeof e.then)}function Bo(e,t){try{return e instanceof t}catch{return!1}}function Vo(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}function Uo(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function $o(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{Vo(r)?n.push("[VueViewModel]"):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Wo(e,t,n=!1){return!!Ro(e)&&(function(e){return Fo(e,"RegExp")}(t)?t.test(e):!!Ro(t)&&(n?e===t:e.includes(t)))}function Ho(e,t=[],n=!1){return t.some(t=>Wo(e,t,n))}function Go(e,t,n=250,r,i,o,a){if(!(o.exception&&o.exception.values&&a&&Bo(a.originalException,Error)))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=function(e,t){return e.map(e=>(e.value&&(e.value=Uo(e.value,t)),e))}(Yo(e,t,i,a.originalException,r,o.exception.values,s,0),n))}function Yo(e,t,n,r,i,o,a,s){if(o.length>=n+1)return o;let l=[...o];if(Bo(r[i],Error)){qo(a,s);const o=e(t,r[i]),c=l.length;Xo(o,i,c,s),l=Yo(e,t,n,r[i],i,[o,...l],o,c)}return Array.isArray(r.errors)&&r.errors.forEach((r,o)=>{if(Bo(r,Error)){qo(a,s);const c=e(t,r),u=l.length;Xo(c,`errors[${o}]`,u,s),l=Yo(e,t,n,r,i,[c,...l],c,u)}}),l}function qo(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function Xo(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Ko(e){return e&&e.Math==Math?e:void 0}const Zo="object"==typeof globalThis&&Ko(globalThis)||"object"==typeof window&&Ko(window)||"object"==typeof self&&Ko(self)||"object"==typeof global&&Ko(global)||function(){return this}()||{};function Jo(){return Zo}function Qo(e,t,n){const r=n||Zo,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}const ea=Jo();function ta(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,a=0;const s=" > ",l=s.length;let c;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(c=na(n,u),!("html"===c||o>1&&a+i.length*l+c.length>=d));)i.push(c),a+=c.length,n=n.parentNode;return i.reverse().join(s)}catch{return"<unknown>"}}function na(e,t){const n=e,r=[];let i,o,a,s,l;if(!n||!n.tagName)return"";if(ea.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const c=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(c&&c.length)c.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&Ro(i))for(o=i.split(/\s+/),l=0;l<o.length;l++)r.push(`.${o[l]}`);const u=["aria-label","type","name","title","alt"];for(l=0;l<u.length;l++)a=u[l],s=n.getAttribute(a),s&&r.push(`[${a}="${s}"]`);return r.join("")}const ra=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ia=["debug","info","warn","error","log","assert","trace"],oa={};function aa(e){if(!("console"in Zo))return e();const t=Zo.console,n={},r=Object.keys(oa);r.forEach(e=>{const r=oa[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}const sa=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ra?ia.forEach(n=>{t[n]=(...t)=>{e&&aa(()=>{Zo.console[n](`Sentry Logger [${n}]:`,...t)})}}):ia.forEach(e=>{t[e]=()=>{}}),t}(),la=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ca(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${a}`}function ua(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function da(e){const t="string"==typeof e?function(e){const t=la.exec(e);if(!t)return void aa(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,i="",o,a="",s]=t.slice(1);let l="",c=s;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const e=c.match(/^\d+/);e&&(c=e[0])}return ua({host:o,pass:i,path:l,projectId:c,port:a,protocol:n,publicKey:r})}(e):ua(e);if(t&&function(e){if(!ra)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(sa.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(sa.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(sa.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(sa.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}class ha extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}function fa(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);"function"==typeof i&&ga(i,r),e[t]=i}function pa(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ra&&sa.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ga(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,pa(e,"__sentry_original__",t)}catch{}}function ma(e){return e.__sentry_original__}function va(e){if(Oo(e))return{message:e.message,name:e.name,stack:e.stack,...ba(e)};if(No(e)){const t={type:e.type,target:ya(e.target),currentTarget:ya(e.currentTarget),...ba(e)};return typeof CustomEvent<"u"&&Bo(e,CustomEvent)&&(t.detail=e.detail),t}return e}function ya(e){try{return function(e){return typeof Element<"u"&&Bo(e,Element)}(e)?ta(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function ba(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function wa(e){return xa(e,new Map)}function xa(e,t){if(function(e){if(!Do(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch{return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.keys(e))typeof e[n]<"u"&&(r[n]=xa(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach(e=>{r.push(xa(e,t))}),r}return e}const Ca=/\(error: (.*)\)/,_a=/captureMessage|captureException/;function Sa(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0)=>{const r=[],i=e.split("\n");for(let e=n;e<i.length;e++){const n=i[e];if(n.length>1024)continue;const o=Ca.test(n)?n.replace(Ca,"$1"):n;if(!o.match(/\S*Error: /)){for(const e of t){const t=e(o);if(t){r.push(t);break}}if(r.length>=50)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),_a.test(t[t.length-1].function||"")&&(t.pop(),_a.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"}))}(r)}}function ka(e){return Array.isArray(e)?Sa(...e):e}const Aa="<anonymous>";function Ea(e){try{return e&&"function"==typeof e&&e.name||Aa}catch{return Aa}}const Ia={},Ta={};function Oa(e,t){Ia[e]=Ia[e]||[],Ia[e].push(t)}function Fa(e,t){Ta[e]||(t(),Ta[e]=!0)}function Pa(e,t){const n=e&&Ia[e];if(n)for(const r of n)try{r(t)}catch(t){ra&&sa.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Ea(r)}\nError:`,t)}}function Ma(){"console"in Zo&&ia.forEach(function(e){e in Zo.console&&fa(Zo.console,e,function(t){return oa[e]=t,function(...t){Pa("console",{args:t,level:e});const n=oa[e];n&&n.apply(Zo.console,t)}})})}function Ra(){const e=Zo,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function La(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ja(e){const{message:t,event_id:n}=e;if(t)return t;const r=La(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Da(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function Na(e,t){const n=La(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function za(e){if(e&&e.__sentry_captured__)return!0;try{pa(e,"__sentry_captured__",!0)}catch{}return!1}function Ba(e){return Array.isArray(e)?e:[e]}const Va=Zo;let Ua,$a,Wa;function Ha(){if(!Va.document)return;const e=Pa.bind(null,"dom"),t=Ga(e,!0);Va.document.addEventListener("click",t,!1),Va.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Va[t]&&Va[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(fa(n,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=o[n]=o[n]||{refCount:0};if(!a.handler){const r=Ga(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),fa(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},o=i[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Ga(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return!("keypress"!==e||t&&t.tagName&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable))}(n.type,r))return;pa(n,"_sentryCaptured",!0),r&&!r._sentryId&&pa(r,"_sentryId",Ra());const i="keypress"===n.type?"input":n.type;(function(e){if(e.type!==$a)return!1;try{if(!e.target||e.target._sentryId!==Wa)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),$a=n.type,Wa=r?r._sentryId:void 0),clearTimeout(Ua),Ua=Va.setTimeout(()=>{Wa=void 0,$a=void 0},1e3)}}const Ya=Jo();function qa(){if(!("fetch"in Ya))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Xa(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Ka(){(function(){if("string"==typeof EdgeRuntime)return!0;if(!qa())return!1;if(Xa(Ya.fetch))return!0;let e=!1;const t=Ya.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Xa(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){ra&&sa.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e})()&&fa(Zo,"fetch",function(e){return function(...t){const{method:n,url:r}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Ja(t),method:Za(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Ja(t),method:Za(t,"method")?String(t.method).toUpperCase():"GET"}}(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return Pa("fetch",{...i}),e.apply(Zo,t).then(e=>(Pa("fetch",{...i,endTimestamp:Date.now(),response:e}),e),e=>{throw Pa("fetch",{...i,endTimestamp:Date.now(),error:e}),e})}})}function Za(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Ja(e){return"string"==typeof e?e:e?Za(e,"url")?e.url:e.toString?e.toString():"":""}let Qa=null;function es(){Qa=Zo.onerror,Zo.onerror=function(e,t,n,r,i){return Pa("error",{column:r,error:i,line:n,msg:e,url:t}),!(!Qa||Qa.__SENTRY_LOADER__)&&Qa.apply(this,arguments)},Zo.onerror.__SENTRY_INSTRUMENTED__=!0}let ts=null;function ns(){ts=Zo.onunhandledrejection,Zo.onunhandledrejection=function(e){return Pa("unhandledrejection",e),!(ts&&!ts.__SENTRY_LOADER__)||ts.apply(this,arguments)},Zo.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const rs=Jo();const is=Zo;let os;function as(e){const t="history";Oa(t,e),Fa(t,ss)}function ss(){if(!function(){const e=rs.chrome,t=e&&e.app&&e.app.runtime,n="history"in rs&&!!rs.history.pushState&&!!rs.history.replaceState;return!t&&n}())return;const e=is.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=os,t=String(n);os=t,Pa("history",{from:e,to:t})}return e.apply(this,t)}}is.onpopstate=function(...t){const n=is.location.href,r=os;if(os=n,Pa("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},fa(is.history,"pushState",t),fa(is.history,"replaceState",t)}const ls=Zo,cs="__sentry_xhr_v3__";function us(){if(!ls.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;fa(e,"open",function(e){return function(...t){const n=Date.now(),r=Ro(t[0])?t[0].toUpperCase():void 0,i=function(e){if(Ro(e))return e;try{return e.toString()}catch{}}(t[1]);if(!r||!i)return e.apply(this,t);this[cs]={method:r,url:i,request_headers:{}},"POST"===r&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const e=this[cs];if(e&&4===this.readyState){try{e.status_code=this.status}catch{}Pa("xhr",{args:[r,i],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?fa(this,"onreadystatechange",function(e){return function(...t){return o(),e.apply(this,t)}}):this.addEventListener("readystatechange",o),fa(this,"setRequestHeader",function(e){return function(...t){const[n,r]=t,i=this[cs];return i&&Ro(n)&&Ro(r)&&(i.request_headers[n.toLowerCase()]=r),e.apply(this,t)}}),e.apply(this,t)}}),fa(e,"send",function(e){return function(...t){const n=this[cs];if(!n)return e.apply(this,t);void 0!==t[0]&&(n.body=t[0]);return Pa("xhr",{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}})}function ds(e,t=100,n=1/0){try{return fs("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function hs(e,t=3,n=102400){const r=ds(e,t);return function(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}(r)>n?hs(e,t-1,n):r}function fs(e,t,n=1/0,r=1/0,i=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[o,a]=i;if(null==t||["number","boolean","string"].includes(typeof t)&&!function(e){return"number"==typeof e&&e!=e}(t))return t;const s=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Vo(t))return"[VueViewModel]";if(function(e){return Do(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}(t))return"[SyntheticEvent]";if("number"==typeof t&&t!=t)return"[NaN]";if("function"==typeof t)return`[Function: ${Ea(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const n=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const l="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===l)return s.replace("object ","");if(o(t))return"[Circular ~]";const c=t;if(c&&"function"==typeof c.toJSON)try{return fs("",c.toJSON(),l-1,r,i)}catch{}const u=Array.isArray(t)?[]:{};let d=0;const h=va(t);for(const e in h){if(!Object.prototype.hasOwnProperty.call(h,e))continue;if(d>=r){u[e]="[MaxProperties ~]";break}const t=h[e];u[e]=fs(e,t,l-1,r,i),d++}return a(t),u}var ps;function gs(e){return new vs(t=>{t(e)})}function ms(e){return new vs((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(ps||(ps={}));class vs{constructor(e){vs.prototype.__init.call(this),vs.prototype.__init2.call(this),vs.prototype.__init3.call(this),vs.prototype.__init4.call(this),this._state=ps.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new vs((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new vs((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{i?n(r):t(r)})})}__init(){this._resolve=e=>{this._setResult(ps.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(ps.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===ps.PENDING){if(zo(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===ps.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===ps.RESOLVED&&e[1](this._value),this._state===ps.REJECTED&&e[2](this._value),e[0]=!0)})}}}function ys(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return ms(new ha("Not adding Promise because buffer limit was reached."));const i=r();return-1===t.indexOf(i)&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new vs((n,r)=>{let i=t.length;if(!i)return n(!0);const o=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{gs(e).then(()=>{--i||(clearTimeout(o),n(!0))},r)})})}}}function bs(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const ws=["fatal","error","warning","log","info","debug"];function xs(e){return"warn"===e?"warning":ws.includes(e)?e:"log"}function Cs(){return Date.now()/1e3}const _s=function(){const{performance:e}=Zo;if(!e||!e.now)return Cs;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function Ss(e,t=[]){return[e,t]}function ks(e,t){const[n,r]=e;return[n,[...r,t]]}function As(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function Es(e,t){return(t||new TextEncoder).encode(e)}function Is(e,t){const[n,r]=e;let i=JSON.stringify(n);function o(e){"string"==typeof i?i="string"==typeof e?i+e:[Es(i,t),e]:i.push("string"==typeof e?Es(e,t):e)}for(const e of r){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(ds(n))}o(e)}}return"string"==typeof i?i:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(i)}function Ts(e,t){const n="string"==typeof e.data?Es(e.data,t):e.data;return[wa({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}(()=>{const{performance:e}=Zo;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,a=e.timing&&e.timing.navigationStart,s="number"==typeof a?Math.abs(a+n-r):t;(o||s<t)&&(i<=s&&e.timeOrigin)})();const Os={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Fs(e){return Os[e]}function Ps(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ms(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),a=parseInt(t,10),s=1e3*(isNaN(a)?60:a);if(n)for(const e of n.split(";"))"metric_bucket"===e?(!o||o.split(";").includes("custom"))&&(i[e]=r+s):i[e]=r+s;else i.all=r+s}else a?i.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(i.all=r+6e4);return i}const Rs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ls="production";function js(){return Qo("globalEventProcessors",()=>[])}function Ds(e){js().push(e)}function Ns(e,t,n,r=0){return new vs((i,o)=>{const a=e[r];if(null===t||"function"!=typeof a)i(t);else{const s=a({...t},n);Rs&&a.id&&null===s&&sa.log(`Event processor "${a.id}" dropped event`),zo(s)?s.then(t=>Ns(e,t,n,r+1).then(i)).then(null,o):Ns(e,s,n,r+1).then(i).then(null,o)}})}function zs(e){const t=_s(),n={sid:Ra(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return wa({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&Bs(n,e),n}function Bs(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||_s(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Ra()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Vs(e,t){let n={};"ok"===e.status&&(n={status:"exited"}),Bs(e,n)}function Us(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:o,status:a,tags:s,origin:l}=$s(e);return wa({data:r,op:i,parent_span_id:o,span_id:t,status:a,tags:s,trace_id:n,origin:l})}function $s(e){return function(e){return"function"==typeof e.getSpanJSON}(e)?e.getSpanJSON():"function"==typeof e.toJSON?e.toJSON():{}}function Ws(e,t,n,r,i,o){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Ra(),timestamp:t.timestamp||Cs()},c=n.integrations||e.integrations.map(e=>e.name);(function(e,t){const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:Ls),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=Uo(e.message,o));const a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=Uo(a.value,o));const s=e.request;s&&s.url&&(s.url=Uo(s.url,o))})(l,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(l,c),void 0===t.type&&function(e,t){const n=Zo._sentryDebugIds;if(!n)return;let r;const i=Hs.get(t);i?r=i:(r=new Map,Hs.set(t,r));const o=Object.keys(n).reduce((e,i)=>{let o;const a=r.get(i);a?o=a:(o=t(i),r.set(i,o));for(let t=o.length-1;t>=0;t--){const r=o[t];if(r.filename){e[r.filename]=n[i];break}}return e},{});try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.filename&&(e.debug_id=o[e.filename])})})}catch{}}(l,e.stackParser);const u=function(e,t){if(!t)return e;const n=e?e.clone():new sl;return n.update(t),n}(r,n.captureContext);n.mechanism&&Na(l,n.mechanism);const d=i&&i.getEventProcessors?i.getEventProcessors():[],h=(al||(al=new sl),al).getScopeData();if(o){il(h,o.getScopeData())}if(u){il(h,u.getScopeData())}const f=[...n.attachments||[],...h.attachments];f.length&&(n.attachments=f),rl(l,h);return Ns([...d,...js(),...h.eventProcessors],l,n).then(e=>(e&&function(e){const t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch{}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach(e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})})}(e),"number"==typeof a&&a>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:ds(e.data,t,n)}}))},...e.user&&{user:ds(e.user,t,n)},...e.contexts&&{contexts:ds(e.contexts,t,n)},...e.extra&&{extra:ds(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ds(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>{const r=$s(e).data;return r&&(e.data=ds(r,t,n)),e})),r}(e,a,s):e))}const Hs=new WeakMap;function Gs(e,t){return gl().captureEvent(e,t)}function Ys(e,t){gl().addBreadcrumb(e,t)}function qs(){return gl().getClient()}function Xs(){return gl().getScope()}function Ks(e){const t=qs(),n=ml(),r=Xs(),{release:i,environment:o=Ls}=t&&t.getOptions()||{},{userAgent:a}=Zo.navigator||{},s=zs({release:i,environment:o,user:r.getUser()||n.getUser(),...a&&{userAgent:a},...e}),l=n.getSession();return l&&"ok"===l.status&&Bs(l,{status:"exited"}),Zs(),n.setSession(s),r.setSession(s),s}function Zs(){const e=ml(),t=Xs(),n=t.getSession()||e.getSession();n&&Vs(n),Js(),e.setSession(),t.setSession()}function Js(){const e=ml(),t=Xs(),n=qs(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function Qs(e=!1){e?Zs():Js()}function el(e){return e.transaction}function tl(e,t,n){const r=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:o}=n&&n.getUser()||{},a=wa({environment:r.environment||Ls,release:r.release,user_segment:o,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",a),a}function nl(e){const t=qs();if(!t)return{};const n=tl($s(e).trace_id||"",t,Xs()),r=el(e);if(!r)return n;const i=r&&r._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:o,source:a}=r.metadata;null!=o&&(n.sample_rate=`${o}`);const s=$s(r);return a&&"url"!==a&&(n.transaction=s.description),n.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return!!(1&t)}(r)),t.emit&&t.emit("createDsc",n),n}function rl(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;(function(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,transactionName:s}=t,l=wa(n);l&&Object.keys(l).length&&(e.extra={...l,...e.extra});const c=wa(r);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});const u=wa(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});const d=wa(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),a&&(e.level=a),s&&(e.transaction=s)})(e,t),r&&function(e,t){e.contexts={trace:Us(t),...e.contexts};const n=el(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:nl(t),...e.sdkProcessingMetadata};const r=$s(n).description;r&&(e.tags={transaction:r,...e.tags})}}(e,r),function(e,t){e.fingerprint=e.fingerprint?Ba(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)}function il(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,sdkProcessingMetadata:s,breadcrumbs:l,fingerprint:c,eventProcessors:u,attachments:d,propagationContext:h,transactionName:f,span:p}=t;ol(e,"extra",n),ol(e,"tags",r),ol(e,"user",i),ol(e,"contexts",o),ol(e,"sdkProcessingMetadata",s),a&&(e.level=a),f&&(e.transactionName=f),p&&(e.span=p),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...h}}function ol(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}let al;class sl{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=ll()}static clone(e){return e?e.clone():new sl}clone(){const e=new sl;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&Bs(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e;if(t instanceof sl){const e=t.getScopeData();this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&Object.keys(e.user).length&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint.length&&(this._fingerprint=e.fingerprint),t.getRequestSession()&&(this._requestSession=t.getRequestSession()),e.propagationContext&&(this._propagationContext=e.propagationContext)}else if(Do(t)){const t=e;this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=ll(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Cs(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:t,_contexts:n,_tags:r,_extra:i,_user:o,_level:a,_fingerprint:s,_eventProcessors:l,_propagationContext:c,_sdkProcessingMetadata:u,_transactionName:d,_span:h}=this;return{breadcrumbs:e,attachments:t,contexts:n,tags:r,extra:i,user:o,level:a,fingerprint:s||[],eventProcessors:l,propagationContext:c,sdkProcessingMetadata:u,transactionName:d,span:h}}applyToEvent(e,t={},n=[]){rl(e,this.getScopeData());return Ns([...n,...js(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:Ra();if(!this._client)return sa.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:Ra();if(!this._client)return sa.warn("No client configured on scope - will not capture message!"),r;const i=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Ra();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(sa.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function ll(){return{traceId:Ra(),spanId:Ra().substring(16)}}const cl="7.116.0",ul=parseFloat(cl),dl=100;class hl{constructor(e,t,n,r=ul){let i,o;this._version=r,t?i=t:(i=new sl,i.setClient(e)),n?o=n:(o=new sl,o.setClient(e)),this._stack=[{scope:i}],e&&this.bindClient(e),this._isolationScope=o}isOlderThan(e){return this._version<e}bindClient(e){const t=this.getStackTop();t.client=e,t.scope.setClient(e),e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();let n;try{n=e(t)}catch(e){throw this.popScope(),e}return zo(n)?n.then(e=>(this.popScope(),e),e=>{throw this.popScope(),e}):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:Ra(),r=new Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:r,...t,event_id:n}),n}captureMessage(e,t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:Ra(),i=new Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r}),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Ra();return e.type||(this._lastEventId=n),this.getScope().captureEvent(e,{...t,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=dl}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const a={timestamp:Cs(),...e},s=i?aa(()=>i(a,t)):a;null!==s&&(r.emit&&r.emit("beforeAddBreadcrumb",s,t),n.addBreadcrumb(s,o))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=pl(this);try{e(this)}finally{pl(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch{return Rs&&sa.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);return Rs&&!n&&(this.getClient()?sa.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):sa.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&Vs(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=Ls}=n&&n.getOptions()||{},{userAgent:o}=Zo.navigator||{},a=zs({release:r,environment:i,user:t.getUser(),...o&&{userAgent:o},...e}),s=t.getSession&&t.getSession();return s&&"ok"===s.status&&Bs(s,{status:"exited"}),this.endSession(),t.setSession(a),a}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return!(!t||!t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_callExtensionMethod(e,...t){const n=fl().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);Rs&&sa.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function fl(){return Zo.__SENTRY__=Zo.__SENTRY__||{extensions:{},hub:void 0},Zo}function pl(e){const t=fl(),n=vl(t);return yl(t,e),n}function gl(){const e=fl();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=fl()){return(!function(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}(e)||vl(e).isOlderThan(ul))&&yl(e,new hl),vl(e)}(e)}function ml(){return gl().getIsolationScope()}function vl(e){return Qo("hub",()=>new hl,e)}function yl(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}function bl(e,t,n,r){const i=Ps(n),o=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const a=function(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:ca(r)},...i&&{trace:wa({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,Ss(a,[[{type:o},e]])}function wl(e,t){return function(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}const xl=[];function Cl(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;t.forEach(e=>{e.isDefaultInstance=!0}),r=Array.isArray(n)?[...t,...n]:"function"==typeof n?Ba(n(t)):t;const i=function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.keys(t).map(e=>t[e])}(r),o=function(e,t){for(let n=0;n<e.length;n++)if(!0===t(e[n]))return n;return-1}(i,e=>"Debug"===e.name);if(-1!==o){const[e]=i.splice(o,1);i.push(e)}return i}function _l(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Sl(e,t,n){if(n[t.name])Rs&&sa.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===xl.indexOf(t.name)&&(t.setupOnce(Ds,gl),xl.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),e.on&&"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if(e.addEventProcessor&&"function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}Rs&&sa.log(`Integration installed: ${t.name}`)}}function kl(e,t){return Object.assign(function(...e){return t(...e)},{id:e})}function Al(e,t,n,r){const i={sent_at:(new Date).toISOString()};n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(i.dsn=ca(t));const o=function(e){const t=function(e){let t="";for(const n of e){const e=Object.entries(n.tags),r=e.length>0?`|#${e.map(([e,t])=>`${e}:${t}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return t}(e);return[{type:"statsd",length:t.length},t]}(e);return Ss(i,[o])}const El="Not capturing exception because it's already been captured.";class Il{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=da(e.dsn):Rs&&sa.warn("No DSN provided, client will not send events."),this._dsn){const t=function(e,t={}){const n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${wl(e,r)}`}(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(za(e))return void(Rs&&sa.log(El));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e})),r}captureMessage(e,t,n,r){let i=n&&n.event_id;const o=Lo(e)?e:String(e),a=jo(e)?this.eventFromMessage(o,t,n):this.eventFromException(e,n);return this._process(a.then(e=>this._captureEvent(e,n,r)).then(e=>{i=e})),i}captureEvent(e,t,n){if(t&&t.originalException&&za(t.originalException))return void(Rs&&sa.log(El));let r=t&&t.event_id;const i=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,t,i||n).then(e=>{r=e})),r}captureSession(e){"string"!=typeof e.release?Rs&&sa.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Bs(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):gs(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return Rs&&sa.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){const t=this._integrations[e.name];Sl(this,e,this._integrations),t||_l(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=bl(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=ks(n,Ts(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){const t=function(e,t,n,r){const i=Ps(n);return Ss({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:ca(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const n=`${e}:${t}`;Rs&&sa.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}captureAggregateMetrics(e){Rs&&sa.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const t=Al(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach(e=>e(...t))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&Sl(e,t,n)}),n}(this,e),_l(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,t){let n=!1,r=!1;const i=t.exception&&t.exception.values;if(i){r=!0;for(const e of i){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(Bs(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new vs(t=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r=ml()){const i=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),Ws(i,e,t,n,this,r).then(e=>{if(null===e)return e;const t={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if((!e.contexts||!e.contexts.trace)&&t){const{traceId:r,spanId:i,parentSpanId:o,dsc:a}=t;e.contexts={trace:{trace_id:r,span_id:i,parent_span_id:o},...e.contexts};const s=a||tl(r,this,n);e.sdkProcessingMetadata={dynamicSamplingContext:s,...e.sdkProcessingMetadata}}return e})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{if(Rs){const t=e;"log"===t.logLevel?sa.log(t.message):sa.warn(t)}})}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r,o=Ol(e),a=Tl(e),s=e.type||"error",l=`before send for type \`${s}\``;if(a&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),ms(new ha(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const c="replay_event"===s?"replay":s,u=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,u).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",c,e),new ha("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const i=function(e,t,n){const{beforeSend:r,beforeSendTransaction:i}=e;return Tl(t)&&r?r(t,n):Ol(t)&&i?i(t,n):t}(r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(zo(e))return e.then(e=>{if(!Do(e)&&null!==e)throw new ha(n);return e},e=>{throw new ha(`${t} rejected with ${e}`)});if(!Do(e)&&null!==e)throw new ha(n);return e}(i,l)}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",c,e),new ha(`${l} returned \`null\`, will not send event.`,"log");const i=n&&n.getSession();!o&&i&&this._updateSessionFromEvent(i,r);const a=r.transaction_info;if(o&&a&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...a,source:e}}return this.sendEvent(r,t),r}).then(null,e=>{throw e instanceof ha?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new ha(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,e=>{Rs&&sa.error("Error while sending event:",e)});Rs&&sa.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}}function Tl(e){return void 0===e.type}function Ol(e){return"transaction"===e.type}function Fl(e,t){!0===t.debug&&(Rs?sa.enable():aa(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Xs().update(t.initialScope);const n=new e(t);(function(e){const t=gl().getStackTop();t.client=e,t.scope.setClient(e)})(n),function(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}(n)}function Pl(e,t,n=ys(e.bufferSize||30)){let r={};function i(i){const o=[];if(As(i,(t,n)=>{const i=Fs(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)){const r=Ml(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else o.push(t)}),0===o.length)return gs();const a=Ss(i[0],o),s=t=>{As(a,(n,r)=>{const i=Ml(n,r);e.recordDroppedEvent(t,Fs(r),i)})};return n.add(()=>t({body:Is(a,e.textEncoder)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&Rs&&sa.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Ms(r,e),e),e=>{throw s("network_error"),e})).then(e=>e,e=>{if(e instanceof ha)return Rs&&sa.error("Skipped sending event because buffer is full."),s("queue_overflow"),gs();throw e})}return i.__sentry__baseTransport__=!0,{send:i,flush:e=>n.drain(e)}}function Ml(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function Rl(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:cl})),version:cl}),e._metadata=i}const Ll=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],jl=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],Dl="InboundFilters",Nl=(e={})=>({name:Dl,setupOnce(){},processEvent(t,n,r){const i=r.getOptions(),o=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Ll],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:jl],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,i);return function(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch{}return!1}(e)?(Rs&&sa.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${ja(e)}`),!0):function(e,t){return!(e.type||!t||!t.length)&&function(e){const t=[];let n;e.message&&t.push(e.message);try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),Rs&&0===t.length&&sa.error(`Could not extract message for event ${ja(e)}`),t}(e).some(e=>Ho(e,t))}(e,t.ignoreErrors)?(Rs&&sa.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${ja(e)}`),!0):function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&Ho(n,t)}(e,t.ignoreTransactions)?(Rs&&sa.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${ja(e)}`),!0):function(e,t){if(!t||!t.length)return!1;const n=zl(e);return!!n&&Ho(n,t)}(e,t.denyUrls)?(Rs&&sa.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${ja(e)}.\nUrl: ${zl(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;const n=zl(e);return!n||Ho(n,t)}(e,t.allowUrls)&&(Rs&&sa.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${ja(e)}.\nUrl: ${zl(e)}`),!0)}(t,o)?null:t}});function zl(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch{return Rs&&sa.error(`Cannot extract url for event ${ja(e)}`),null}}let Bl;kl(Dl,Nl);const Vl="FunctionToString",Ul=new WeakMap,$l=()=>({name:Vl,setupOnce(){Bl=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=ma(this),n=Ul.has(qs())&&void 0!==t?t:this;return Bl.apply(n,e)}}catch{}},setup(e){Ul.set(e,!0)}});kl(Vl,$l);const Wl=Zo;let Hl=0;function Gl(){return Hl>0}function Yl(e,t={},n){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if(ma(e))return e}catch{return e}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map(e=>Yl(e,t));return e.apply(this,i)}catch(e){throw Hl++,setTimeout(()=>{Hl--}),function(...e){const t=gl();if(2===e.length){const[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}t.withScope(e[0])}(n=>{n.addEventProcessor(e=>(t.mechanism&&(Da(e,void 0),Na(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),function(e){gl().captureException(e,void 0)}(e)}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}ga(r,e),pa(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch{}return r}const ql=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Xl(e,t){const n=Zl(e,t),r={type:t&&t.name,value:Ql(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Kl(e,t){return{exception:{values:[Xl(e,t)]}}}function Zl(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(Jl.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch{}return[]}const Jl=/Minified React error #\d+;/i;function Ql(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function ec(e,t,n,r,i){let o;if(Po(t)&&t.error)return Kl(e,t.error);if(Mo(t)||function(e){return Fo(e,"DOMException")}(t)){const i=t;if("stack"in t)o=Kl(e,t);else{const t=i.name||(Mo(i)?"DOMError":"DOMException"),a=i.message?`${t}: ${i.message}`:t;o=tc(e,a,n,r),Da(o,a)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return Oo(t)?Kl(e,t):Do(t)||No(t)?(o=function(e,t,n,r){const i=qs(),o=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:No(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:nc(t,{isUnhandledRejection:r})}]},extra:{__serialized__:hs(t,o)}};if(n){const t=Zl(e,n);t.length&&(a.exception.values[0].stacktrace={frames:t})}return a}(e,t,n,i),Na(o,{synthetic:!0}),o):(o=tc(e,t,n,r),Da(o,`${t}`),Na(o,{synthetic:!0}),o)}function tc(e,t,n,r){const i={};if(r&&n){const r=Zl(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}if(Lo(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function nc(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(va(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Uo(n[0],t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:Uo(r,t)}return""}(e),r=t?"promise rejection":"exception";return Po(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:No(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}class rc extends Il{constructor(e){Rl(e,"browser",["browser"],Wl.SENTRY_SDK_SOURCE||"npm"),super(e),e.sendClientReports&&Wl.document&&Wl.document.addEventListener("visibilitychange",()=>{"hidden"===Wl.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){const i=ec(e,t,n&&n.syntheticException||void 0,r);return Na(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),gs(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const o=tc(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),gs(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(ql&&sa.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:ca(r)}},o=function(e){return[{type:"user_report"},e]}(e);return Ss(i,[o])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return void(ql&&sa.log("No outcomes to send"));if(!this._dsn)return void(ql&&sa.log("No dsn provided, will not send outcomes"));ql&&sa.log("Sending outcomes:",e);const t=function(e,t){return Ss(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:Cs(),discarded_events:e}]])}(e,this._options.tunnel&&ca(this._dsn));this._sendEnvelope(t)}}let ic;function oc(e,t=function(){if(ic)return ic;if(Xa(Wl.fetch))return ic=Wl.fetch.bind(Wl);const e=Wl.document;let t=Wl.fetch;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){ql&&sa.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return ic=t.bind(Wl)}()){let n=0,r=0;return Pl(e,function(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then(e=>(n-=o,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}catch(e){return ic=void 0,n-=o,r--,ms(e)}})}function ac(e){return Pl(e,function(t){return new vs((n,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&i.setRequestHeader(t,e.headers[t]);i.send(t.body)})})}const sc="?";function lc(e,t,n,r){const i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const cc=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,uc=/\((\S*)(?::(\d+))(?::(\d+))\)/,dc=[30,e=>{const t=cc.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=uc.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=yc(t[1]||sc,t[2]);return lc(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],hc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,fc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,pc=[50,e=>{const t=hc.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=fc.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||sc;return[n,e]=yc(n,e),lc(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],gc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,mc=[40,e=>{const t=gc.exec(e);return t?lc(t[2],t[1]||sc,+t[3],t[4]?+t[4]:void 0):void 0}],vc=Sa(...[dc,pc,mc]),yc=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:sc,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},bc=1024,wc="Breadcrumbs",xc=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:wc,setupOnce(){},setup(e){t.console&&function(e){const t="console";Oa(t,e),Fa(t,Ma)}(function(e){return function(t){if(qs()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:xs(t.level),message:$o(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${$o(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Ys(n,{input:t.args,level:t.level})}}(e)),t.dom&&function(e){Oa("dom",e),Fa("dom",Ha)}(function(e,t){return function(n){if(qs()!==e)return;let r,i,o="object"==typeof t?t.serializeAttribute:void 0,a="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;a&&a>bc&&(ql&&sa.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=bc),"string"==typeof o&&(o=[o]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=ta(t,{keyAttrs:o,maxStringLength:a}),i=function(e){if(!ea.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}(t)}catch{r="<unknown>"}if(0===r.length)return;const s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),Ys(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&function(e){Oa("xhr",e),Fa("xhr",us)}(function(e){return function(t){if(qs()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[cs];if(!n||!r||!i)return;const{method:o,url:a,status_code:s,body:l}=i;Ys({category:"xhr",data:{method:o,url:a,status_code:s},type:"http"},{xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r})}}(e)),t.fetch&&function(e){const t="fetch";Oa(t,e),Fa(t,Ka)}(function(e){return function(t){if(qs()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){Ys({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response;Ys({category:"fetch",data:{...t.fetchData,status_code:e&&e.status},type:"http"},{input:t.args,response:e,startTimestamp:n,endTimestamp:r})}}}(e)),t.history&&as(function(e){return function(t){if(qs()!==e)return;let n=t.from,r=t.to;const i=bs(Wl.location.href);let o=n?bs(n):void 0;const a=bs(r);(!o||!o.path)&&(o=i),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),Ys({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on&&e.on("beforeSendEvent",function(e){return function(t){qs()===e&&Ys({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:ja(t)},{event:t})}}(e))}}};kl(wc,xc);const Cc="Dedupe",_c=()=>{let e;return{name:Cc,setupOnce(){},processEvent(t){if(t.type)return t;try{if(function(e,t){return!!t&&!(!function(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!kc(e,t)||!Sc(e,t))}(e,t)&&!function(e,t){const n=Ac(t),r=Ac(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&kc(e,t)&&Sc(e,t))}(e,t))}(t,e))return ql&&sa.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function Sc(e,t){let n=Ec(e),r=Ec(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function kc(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function Ac(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Ec(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}kl(Cc,_c);const Ic="GlobalHandlers",Tc=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Ic,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){!function(e){const t="error";Oa(t,e),Fa(t,es)}(t=>{const{stackParser:n,attachStacktrace:r}=Pc();if(qs()!==e||Gl())return;const{msg:i,url:o,line:a,column:s,error:l}=t,c=void 0===l&&Ro(i)?function(e,t,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=Po(e)?e.message:e,a="Error";const s=o.match(i);return s&&(a=s[1],o=s[2]),Oc({exception:{values:[{type:a,value:o}]}},t,n,r)}(i,o,a,s):Oc(ec(n,l||i,void 0,r,!1),o,a,s);c.level="error",Gs(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}(e),Fc("onerror")),t.onunhandledrejection&&(function(e){!function(e){const t="unhandledrejection";Oa(t,e),Fa(t,ns)}(t=>{const{stackParser:n,attachStacktrace:r}=Pc();if(qs()!==e||Gl())return;const i=function(e){if(jo(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}(t),o=jo(i)?function(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}(i):ec(n,i,void 0,r,!0);o.level="error",Gs(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(e),Fc("onunhandledrejection"))}}};function Oc(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},s=a.stacktrace=a.stacktrace||{},l=s.frames=s.frames||[],c=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=Ro(t)&&t.length>0?t:function(){try{return ea.document.location.href}catch{return""}}();return 0===l.length&&l.push({colno:c,filename:d,function:"?",in_app:!0,lineno:u}),e}function Fc(e){ql&&sa.log(`Global Handler attached: ${e}`)}function Pc(){const e=qs();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}kl(Ic,Tc);const Mc="HttpContext",Rc=()=>({name:Mc,setupOnce(){},preprocessEvent(e){if(!Wl.navigator&&!Wl.location&&!Wl.document)return;const t=e.request&&e.request.url||Wl.location&&Wl.location.href,{referrer:n}=Wl.document||{},{userAgent:r}=Wl.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:i};e.request=o}});kl(Mc,Rc);const Lc="LinkedErrors",jc=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:Lc,setupOnce(){},preprocessEvent(e,r,i){const o=i.getOptions();Go(Xl,o.stackParser,o.maxValueLength,n,t,e,r)}}};kl(Lc,jc);const Dc=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Nc="TryCatch",zc=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Nc,setupOnce(){t.setTimeout&&fa(Wl,"setTimeout",Bc),t.setInterval&&fa(Wl,"setInterval",Bc),t.requestAnimationFrame&&fa(Wl,"requestAnimationFrame",Vc),t.XMLHttpRequest&&"XMLHttpRequest"in Wl&&fa(XMLHttpRequest.prototype,"send",Uc);const e=t.eventTarget;e&&(Array.isArray(e)?e:Dc).forEach($c)}}};function Bc(e){return function(...t){const n=t[0];return t[0]=Yl(n,{mechanism:{data:{function:Ea(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Vc(e){return function(t){return e.apply(this,[Yl(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ea(e)},handled:!1,type:"instrument"}})])}}function Uc(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&fa(n,e,function(t){const n={mechanism:{data:{function:e,handler:Ea(t)},handled:!1,type:"instrument"}},r=ma(t);return r&&(n.mechanism.data.handler=Ea(r)),Yl(t,n)})}),e.apply(this,t)}}function $c(e){const t=Wl,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(fa(n,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Yl(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ea(r),target:e},handled:!1,type:"instrument"}}))}catch{}return t.apply(this,[n,Yl(r,{mechanism:{data:{function:"addEventListener",handler:Ea(r),target:e},handled:!1,type:"instrument"}}),i])}}),fa(n,"removeEventListener",function(e){return function(t,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch{}return e.call(this,t,i,r)}}))}kl(Nc,zc);const Wc=[Nl(),$l(),zc(),xc(),Tc(),jc(),_c(),Rc()];function Hc(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=[...Wc]),void 0===e.release&&("string"==typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),Wl.SENTRY_RELEASE&&Wl.SENTRY_RELEASE.id&&(e.release=Wl.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:ka(e.stackParser||vc),integrations:Cl(e),transport:e.transport||(qa()?oc:ac)};Fl(rc,t),e.autoSessionTracking&&function(){if(typeof Wl.document>"u")return void(ql&&sa.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));Ks({ignoreDuration:!0}),Qs(),as(({from:e,to:t})=>{void 0!==e&&e!==t&&(Ks({ignoreDuration:!0}),Qs())})}()}var Gc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qc(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Xc=(e=>(e.INLINE="inline",e.OVERLAY="overlay",e))(Xc||{}),Kc=(e=>(e.TOP="top",e.BOTTOM="bottom",e.HIDDEN="",e))(Kc||{});function Zc(e,t){return{...t,message:e}}const Jc=[{name:"emoticons",list:["afro-1","afro","agent","alien-1","alien","angel","angry-1","angry-2","angry-3","angry-4","angry-5","angry","arguing","arrogant","asian-1","asian","avatar","baby-1","baby-2","baby","bully","burglar","businessman","cheeky-1","cheeky","clown","confused-1","confused-2","confused-3","confused","creepy","crying-1","crying-2","crying-3","crying","dazed-1","dazed-2","dazed-3","dazed","dead-1","dead-2","dead-3","dead-4","dead-5","dead-6","dead","desperate-1","desperate","detective","dissapointment","doctor","drunk","dumb","emo-1","emo-2","emo","emoticon","evil","faint-1","faint","flirt-1","flirt-2","flirt","flirty","gangster","geek-1","geek","gentleman-1","gentleman-2","gentleman-3","gentleman-4","gentleman","ginger","girl-1","girl","goofy-1","goofy-2","goofy-3","goofy-4","goofy","grubby-1","grubby","happy-1","happy-10","happy-11","happy-12","happy-13","happy-14","happy-15","happy-16","happy-2","happy-3","happy-4","happy-5","happy-6","happy-7","happy-8","happy-9","happy","harry-potter","heisenberg","hipster-1","hipster-2","hipster","in-love-1","in-love-2","in-love-3","in-love-4","in-love-5","in-love-6","in-love","japan","jew","joyful-1","joyful-2","joyful","kiss-1","kiss-2","kiss-3","kiss-4","kiss","laughing-1","laughing-2","laughing-3","laughing","listening","love","manly","miserly-1","miserly","nerd-1","nerd-2","nerd-3","nerd-4","nerd","ninja","pirate-1","pirate-2","pirate","punk-1","punk-2","punk","rapper","relieved","rich-1","rich-2","rich","rockstar","sad-1","sad-2","sad-3","sad-4","sad-5","sad-6","sad","scared-1","scared-2","scared-3","scared","sceptic-1","sceptic-2","sceptic-3","sceptic-4","sceptic-5","sceptic-6","sceptic-7","sceptic","secret","shocked-1","shocked-2","shocked-3","shocked","sick-1","sick-2","sick-3","sick-4","sick","silent","skeleton","smile","smiling-1","smiling","smoked","smug-1","smug-2","smug-3","smug-4","smug-5","smug-6","smug","sporty","stunned","superhero-1","superhero-2","superhero-3","superhero-4","superhero","surprised-1","surprised","thinking","tired-1","tired-2","tired-3","tired","tough-1","tough","trendy","vampire-1","vampire","wink-1","wink-2","wink","winking-1","winking","yawning-1","yawning-2","yawning-3","yawning","yelling","zombie"],type:"svg",thumbnailUrl:"images/stickers/categories/emoticon.svg"},{name:"doodles",items:100,type:"svg",thumbnailUrl:"images/stickers/categories/doodles.svg"},{name:"landmarks",items:100,type:"svg",thumbnailUrl:"images/stickers/categories/landmark.svg",invertPreview:!0},{name:"bubbles",items:104,type:"png",thumbnailUrl:"images/stickers/categories/speech-bubble.svg"},{name:"transportation",items:22,type:"svg",thumbnailUrl:"images/stickers/categories/transportation.svg",invertPreview:!0},{name:"beach",items:22,type:"svg",thumbnailUrl:"images/stickers/categories/beach.svg",invertPreview:!0}],Qc={emoticons:Zc("Emoticons"),doodles:Zc("Doodles"),landmarks:Zc("Landmarks"),bubbles:Zc("Bubbles"),transportation:Zc("Transportation"),beach:Zc("Beach")},eu={fill:"#1565C0",opacity:1,backgroundColor:null,strokeWidth:.05,stroke:"#000"},tu=[1,8,15,20,25];var nu=(e=>(e.DARK="dark",e.LIGHT="light",e))(nu||{});const ru=[{name:nu.LIGHT,colors:{"--be-foreground-base":"0 0 0","--be-primary-light":"191 219 254","--be-primary":"59 130 246","--be-primary-dark":"37 99 235","--be-on-primary":"255 255 255","--be-danger":"179 38 30","--be-on-danger":"255 255 255","--be-background":"255 255 255","--be-background-alt":"250 250 250","--be-paper":"255 255 255","--be-disabled-bg-opacity":"12%","--be-disabled-fg-opacity":"26%","--be-hover-opacity":"4%","--be-focus-opacity":"12%","--be-selected-opacity":"8%","--be-text-main-opacity":"87%","--be-text-muted-opacity":"60%","--be-divider-opacity":"12%"}},{name:nu.DARK,isDark:!0,colors:{"--be-foreground-base":"255 255 255","--be-primary-light":"239 246 255","--be-primary":"191 219 254","--be-primary-dark":"147 197 253","--be-on-primary":"56 30 114","--be-danger":"242 184 181","--be-on-danger":"96 20 16","--be-background":"20 21 23","--be-background-alt":"26 27 30","--be-paper":"44 46 51","--be-disabled-bg-opacity":"12%","--be-disabled-fg-opacity":"30%","--be-hover-opacity":"8%","--be-focus-opacity":"12%","--be-selected-opacity":"16%","--be-text-main-opacity":"100%","--be-text-muted-opacity":"70%","--be-divider-opacity":"12%"}}];var iu=(e=>(e.FILTER="filter",e.RESIZE="resize",e.CROP="crop",e.DRAW="draw",e.TEXT="text",e.SHAPES="shapes",e.STICKERS="stickers",e.FRAME="frame",e.CORNERS="corners",e.MERGE="merge",e))(iu||{});function ou(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ou(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function au(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ou(e))&&(r&&(r+=" "),r+=t);return r}const su=p((n,r)=>{const{attr:i,size:o,title:a,className:s,color:l,style:c,children:u,viewBox:d,width:h,height:f,...p}=n;return t("svg",{"aria-hidden":!a,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:d||"0 0 24 24",...i,...p,className:au("svg-icon",s,lu(o)),style:{color:l,...c},ref:r,height:f||"1em",width:h||"1em",children:[a&&e("title",{children:a}),u]})});function lu(e){switch(e){case"2xs":return"icon-2xs";case"xs":return"icon-xs";case"sm":return"icon-sm";case"md":return"icon-md";case"lg":return"icon-lg";case"xl":return"icon-xl";default:return e}}function cu(t,n="",r){return i.memo(i.forwardRef((i,o)=>e(su,{"data-testid":`${n}Icon`,ref:o,viewBox:r,...i,size:i.size||"md",children:t})))}function uu(e,t=""){return cu(du(e),t)}function du(e){return(null==e?void 0:e.map)&&e.map((e,t)=>i.createElement(e.tag,{key:t,...e.attr},du(e.child)))}const hu=cu(e("path",{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"}),"TuneOutlined"),fu=cu(e("path",{d:"M21 15h2v2h-2v-2zm0-4h2v2h-2v-2zm2 8h-2v2c1 0 2-1 2-2zM13 3h2v2h-2V3zm8 4h2v2h-2V7zm0-4v2h2c0-1-1-2-2-2zM1 7h2v2H1V7zm16-4h2v2h-2V3zm0 16h2v2h-2v-2zM3 3C2 3 1 4 1 5h2V3zm6 0h2v2H9V3zM5 3h2v2H5V3zm-4 8v8c0 1.1.9 2 2 2h12V11H1zm2 8 2.5-3.21 1.79 2.15 2.5-3.22L13 19H3z"}),"PhotoSizeSelectLargeOutlined"),pu=cu(e("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8v8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2H7z"}),"CropOutlined"),gu=cu(e("path",{d:"M2.5 4v3h5v12h3V7h5V4h-13zm19 5h-9v3h3v7h3v-7h3V9z"}),"TextFieldsOutlined"),mu=cu(e("path",{d:"M10.5 4.5c.28 0 .5.22.5.5v2h6v6h2c.28 0 .5.22.5.5s-.22.5-.5.5h-2v6h-2.12c-.68-1.75-2.39-3-4.38-3s-3.7 1.25-4.38 3H4v-2.12c1.75-.68 3-2.39 3-4.38 0-1.99-1.24-3.7-2.99-4.38L4 7h6V5c0-.28.22-.5.5-.5m0-2C9.12 2.5 8 3.62 8 5H4c-1.1 0-1.99.9-1.99 2v3.8h.29c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-.3c0-1.49 1.21-2.7 2.7-2.7s2.7 1.21 2.7 2.7v.3H17c1.1 0 2-.9 2-2v-4c1.38 0 2.5-1.12 2.5-2.5S20.38 11 19 11V7c0-1.1-.9-2-2-2h-4c0-1.38-1.12-2.5-2.5-2.5z"}),"ExtensionOutlined"),vu=cu(e("path",{d:"M10.25 13c0 .69-.56 1.25-1.25 1.25S7.75 13.69 7.75 13s.56-1.25 1.25-1.25 1.25.56 1.25 1.25zM15 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm7 .25c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2s10 4.48 10 10zM10.66 4.12C12.06 6.44 14.6 8 17.5 8c.46 0 .91-.05 1.34-.12C17.44 5.56 14.9 4 12 4c-.46 0-.91.05-1.34.12zM4.42 9.47c1.71-.97 3.03-2.55 3.66-4.44C6.37 6 5.05 7.58 4.42 9.47zM20 12c0-.78-.12-1.53-.33-2.24-.7.15-1.42.24-2.17.24-3.13 0-5.92-1.44-7.76-3.69C8.69 8.87 6.6 10.88 4 11.86c.01.04 0 .09 0 .14 0 4.41 3.59 8 8 8s8-3.59 8-8z"}),"FaceOutlined"),yu=cu(e("path",{d:"M20 4h-4l-4-4-4 4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H4V6h4.52l3.52-3.5L15.52 6H20v14zM6 18h12V8H6v10zm2-8h8v6H8v-6z"}),"FilterFramesOutlined"),bu=cu(e("path",{d:"M6.41 21 5 19.59l4.83-4.83c.75-.75 1.17-1.77 1.17-2.83v-5.1L9.41 8.41 8 7l4-4 4 4-1.41 1.41L13 6.83v5.1c0 1.06.42 2.08 1.17 2.83L19 19.59 17.59 21 12 15.41 6.41 21z"}),"MergeOutlined"),wu=cu(e("path",{d:"M19 19h2v2h-2v-2zm0-2h2v-2h-2v2zM3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm0-4h2V3H3v2zm4 0h2V3H7v2zm8 16h2v-2h-2v2zm-4 0h2v-2h-2v2zm4 0h2v-2h-2v2zm-8 0h2v-2H7v2zm-4 0h2v-2H3v2zM21 8c0-2.76-2.24-5-5-5h-5v2h5c1.65 0 3 1.35 3 3v5h2V8z"}),"RoundedCornerOutlined"),xu=cu(e("path",{d:"M20 4v12H8V4h12m0-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 9.67 1.69 2.26 2.48-3.1L19 15H9zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}),"PhotoLibraryOutlined"),Cu=cu(e("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.25 2.52.77-1.28-3.52-2.09V8z"}),"HistoryOutlined"),_u=cu([e("path",{d:"m2.53 19.65 1.34.56v-9.03l-2.43 5.86c-.41 1.02.08 2.19 1.09 2.61zm19.5-3.7L17.07 3.98c-.31-.75-1.04-1.21-1.81-1.23-.26 0-.53.04-.79.15L7.1 5.95c-.75.31-1.21 1.03-1.23 1.8-.01.27.04.54.15.8l4.96 11.97c.31.76 1.05 1.22 1.83 1.23.26 0 .52-.05.77-.15l7.36-3.05c1.02-.42 1.51-1.59 1.09-2.6zm-9.2 3.8L7.87 7.79l7.35-3.04h.01l4.95 11.95-7.35 3.05z"},"0"),e("circle",{cx:"11",cy:"9",r:"1"},"1"),e("path",{d:"M5.88 19.75c0 1.1.9 2 2 2h1.45l-3.45-8.34v6.34z"},"2")],"StyleOutlined"),Su=cu(e("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}),"DeleteOutlined"),ku=cu(e("path",{d:"M18.85,10.39l1.06-1.06c0.78-0.78,0.78-2.05,0-2.83L18.5,5.09c-0.78-0.78-2.05-0.78-2.83,0l-1.06,1.06L18.85,10.39z M14.61,11.81L7.41,19H6v-1.41l7.19-7.19L14.61,11.81z M13.19,7.56L4,16.76V21h4.24l9.19-9.19L13.19,7.56L13.19,7.56z M19,17.5 c0,2.19-2.54,3.5-5,3.5c-0.55,0-1-0.45-1-1s0.45-1,1-1c1.54,0,3-0.73,3-1.5c0-0.47-0.48-0.87-1.23-1.2l1.48-1.48 C18.32,15.45,19,16.29,19,17.5z M4.58,13.35C3.61,12.79,3,12.06,3,11c0-1.8,1.89-2.63,3.56-3.36C7.59,7.18,9,6.56,9,6 c0-0.41-0.78-1-2-1C5.74,5,5.2,5.61,5.17,5.64C4.82,6.05,4.19,6.1,3.77,5.76C3.36,5.42,3.28,4.81,3.62,4.38C3.73,4.24,4.76,3,7,3 c2.24,0,4,1.32,4,3c0,1.87-1.93,2.72-3.64,3.47C6.42,9.88,5,10.5,5,11c0,0.31,0.43,0.6,1.07,0.86L4.58,13.35z"}),"Draw"),Au=cu(e("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81l5-4.5M12 3 2 12h3v8h6v-6h2v6h6v-8h3L12 3z"}),"HomeOutlined"),Eu={[iu.FILTER]:{name:Zc("Applied Filters"),icon:hu},[iu.RESIZE]:{name:Zc("Resized Image"),icon:fu},[iu.CROP]:{name:Zc("Cropped Image"),icon:pu},[iu.DRAW]:{name:Zc("Added Drawing"),icon:ku},[iu.TEXT]:{name:Zc("Added Text"),icon:gu},[iu.SHAPES]:{name:Zc("Added Shape"),icon:mu},[iu.STICKERS]:{name:Zc("Added Sticker"),icon:vu},[iu.FRAME]:{name:Zc("Added Frame"),icon:yu},[iu.MERGE]:{name:Zc("Merged Objects"),icon:bu},[iu.CORNERS]:{name:Zc("Rounded Corner"),icon:wu},bgImage:{name:Zc("Replaced Background Image"),icon:xu},overlayImage:{name:Zc("Added Image"),icon:xu},initial:{name:Zc("Initial"),icon:Au},loadedState:{name:Zc("Loaded State"),icon:Cu},objectStyle:{name:Zc("Changed Style"),icon:_u},deletedObject:{name:Zc("Deleted object"),icon:Su}},Iu=Object.values(iu).map(e=>({name:e,icon:Eu[e].icon,action:e===iu.MERGE?e=>{e.tools.merge.apply()}:e})),Tu={filter:Zc("filter"),resize:Zc("resize"),crop:Zc("crop"),draw:Zc("draw"),text:Zc("text"),shapes:Zc("shapes"),stickers:Zc("stickers"),frame:Zc("frame"),corners:Zc("corners"),merge:Zc("merge")},Ou=cu(e("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}),"FileDownloadOutlined"),Fu="3.0.5",Pu={selector:"pixie-editor",textureSize:4096,activeLanguage:"en",ui:{visible:!0,mode:Xc.INLINE,forceOverlayModeOnMobile:!0,activeTheme:nu.LIGHT,themes:ru,allowEditorClose:!0,menubar:{items:[{type:"undoWidget",align:"left"},{type:"zoomWidget",align:"center",desktopOnly:!0},{type:"button",icon:Cu,align:"right",desktopOnly:!0,action:e=>{e.togglePanel("history")}},{type:"button",icon:Ou,label:Zc("Done"),align:"right",action:e=>{var t;null!=(t=e.state.config.ui)&&t.showExportPanel?e.state.togglePanel("export",!0):e.tools.export.save()}}]},nav:{position:Kc.BOTTOM,items:[...Iu]},openImageDialog:{show:!0,sampleImages:[{url:"images/samples/sample1.jpg",thumbnail:"images/samples/sample1_thumbnail.jpg"},{url:"images/samples/sample2.jpg",thumbnail:"images/samples/sample2_thumbnail.jpg"},{url:"images/samples/sample3.jpg",thumbnail:"images/samples/sample3_thumbnail.jpg"}]},colorPresets:{items:["rgb(0,0,0)","rgb(255, 255, 255)","rgb(242, 38, 19)","rgb(249, 105, 14)","rgb(253, 227, 167)","rgb(4, 147, 114)","rgb(30, 139, 195)","rgb(142, 68, 173)"]}},objectDefaults:{global:{...eu},sticker:{fill:void 0},text:{textAlign:"initial",underline:!1,linethrough:!1,fontStyle:"normal",fontFamily:"Times New Roman",fontWeight:"normal",stroke:void 0,fontSize:40}},tools:{filter:{items:["grayscale","blackWhite","sharpen","invert","vintage","polaroid","kodachrome","technicolor","brownie","sepia","removeColor","brightness","gamma","noise","pixelate","blur","emboss","blendColor"]},zoom:{allowUserZoom:!0,fitImageToScreen:!0},crop:{allowCustomRatio:!0,defaultRatio:"1:1",presets:[{ratio:null,name:"Custom"},{ratio:"1:1",name:"Square"},{ratio:"4:3"},{ratio:"16:9"},{ratio:"5:3"},{ratio:"5:4"},{ratio:"6:4"},{ratio:"7:5"},{ratio:"10:8"}]},text:{defaultText:"Double click to edit",controlsPadding:6,items:[{family:"Roboto",src:"fonts/open-sans-v27-latin-ext_latin-regular.woff2"},{family:"Fuzzy Bubbles",src:"fonts/fuzzy-bubbles-v3-latin-700.woff2",descriptors:{weight:"700"}},{family:"Aleo Bold",src:"fonts/aleo-v4-latin-ext_latin-700.woff2",descriptors:{weight:"700"}},{family:"Amatic SC",src:"fonts/amatic-sc-v16-latin-ext_latin-regular.woff2"},{family:"Corinthia Bold",src:"fonts/corinthia-v7-latin-ext_latin-700.woff2"},{family:"Bungee Inline",src:"fonts/bungee-inline-v6-latin-ext_latin-regular.woff2"},{family:"Robot Slab Bold",src:"fonts/roboto-slab-v16-latin-ext_latin-500.woff2"},{family:"Carter One",src:"fonts/carter-one-v12-latin-regular.woff2"},{family:"Cody Star",src:"fonts/codystar-v10-latin-ext_latin-regular.woff2"},{family:"Fira Sans",src:"fonts/fira-sans-v11-latin-ext_latin_cyrillic-regular.woff2"},{family:"Krona One",src:"fonts/krona-one-v9-latin-ext_latin-regular.woff2"},{family:"Kumar One Outline",src:"fonts/kumar-one-outline-v8-latin-ext_latin-regular.woff2"},{family:"Lobster Two",src:"fonts/lobster-two-v13-latin-regular.woff2"},{family:"Molle Italic",src:"fonts/molle-v11-latin-ext_latin-italic.woff2"},{family:"Monoton",src:"fonts/monoton-v10-latin-regular.woff2"},{family:"Nixie One",src:"fonts/nixie-one-v11-latin-regular.woff2"},{family:"Permanent Marker",src:"fonts/permanent-marker-v10-latin-regular.woff2"},{family:"Sancreek",src:"fonts/sancreek-v13-latin-ext_latin-regular.woff2"},{family:"Stint Ultra Expanded",src:"fonts/stint-ultra-expanded-v10-latin-regular.woff2"},{family:"VT323",src:"fonts/vt323-v12-latin-ext_latin-regular.woff2"},{family:"Trash Hand",src:"fonts/TrashHand.ttf"}]},draw:{brushSizes:tu,brushTypes:["PencilBrush","EraserBrush","SprayBrush","CircleBrush","DiamondBrush","VLineBrush","HLineBrush","SquareBrush"]},shapes:{items:[{name:"circle",type:"Circle"},{name:"square",type:"Rect",options:{lockUniScaling:!1}},{name:"triangle",type:"Triangle"},{name:"ellipse",type:"Ellipse",options:{lockUniScaling:!1}},{name:"Arrow #1",type:"Path",options:{path:"M 294.9 16.4 l 15.7 42.2 c -171.4 70.3 -294 242.3 -289.1 437.4 l 14.7 -1 c 9.1 -0.6 18.1 -1.2 27.1 -1.9 l 14.7 -1 c -4.3 -170.1 102.5 -320 252 -381.3 l 15.7 42.2 c 34.7 -40.5 83.1 -76.6 144.8 -99.8 c -58.1 -26.2 -124.9 -39.6 -195.6 -36.8 z"}},{name:"Arrow #2",type:"Path",options:{path:"M 16 248.4 v 14.9 h 447.5 l -93.2 82.5 l 11.9 10.5 l 113.8 -100.2 l -113.6 -100.4 l -11.8 10.5 l 92.9 82.2 z"}},{name:"Arrow #3",type:"Path",options:{path:"M 496 256 l -118.6 -66 v 40.8 h -361.4 v 50.4 h 361.4 v 40.8 l 118.6 -66 z"}},{name:"Line",type:"Path",options:{path:"M 16 256 h 480",strokeWidth:10,stroke:"#000",padding:10}},{name:"Star",type:"Path",options:{path:"M 256 406.3 l 148.3 78 l -28.3 -165.2 l 120 -117 l -165.8 -24.1 l -74.2 -150.3 l -74.2 150.3 l -165.8 24.1 l 120 117 l -28.3 165.2 z"}},{name:"Polygon",type:"Path",options:{path:"M 256 19.6 l 156.6 57.1 l 83.4 144.3 l -28.9 164.2 l -127.7 107.2 h -166.8 l -127.7 -107.2 l -28.9 -164.2 l 83.4 -144.3 z"}},{name:"Badge",type:"Path",options:{path:"M 257.3 16.2 s -148 58.2 -204.4 81.4 c 0 75.7 -16.8 303.5 204.4 398.2 c 218.7 -94.6 201.9 -322.4 201.9 -398.2 c -62.1 -23.6 -201.9 -81.4 -201.9 -81.4 z"}}].slice()},stickers:{items:Jc},import:{validImgExtensions:["png","jpg","jpeg","svg","gif"],fitOverlayToScreen:!0,openDroppedImageAsBackground:!1},export:{defaultFormat:"png",defaultQuality:.8,defaultName:"image"},frame:{items:[{name:"basic",mode:"basic",size:{min:1,max:35,default:10}},{name:"pine",mode:"stretch",size:{min:1,max:35,default:15}},{name:"oak",mode:"stretch",size:{min:1,max:35,default:15}},{name:"rainbow",mode:"stretch",size:{min:1,max:35,default:15}},{name:"grunge1",display_name:"grunge #1",mode:"stretch",size:{min:1,max:35,default:15}},{name:"grunge2",display_name:"grunge #2",mode:"stretch",size:{min:1,max:35,default:20}},{name:"ebony",mode:"stretch",size:{min:1,max:35,default:15}},{name:"art1",display_name:"Art #1",mode:"repeat",size:{min:10,max:70,default:55}},{name:"art2",display_name:"Art #2",mode:"repeat",size:{min:10,max:70,default:55}}]}}},Mu=e=>{let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=r??("object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},a=t=e(r,i,o);return o};var Ru={exports:{}},Lu={},ju={exports:{}},Du={},Nu=i;
|
|
9
|
+
*/var li=(oi||(oi=1,function(e,t){(function(){var n,r="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",a=32,s=128,l=256,c=1/0,u=9007199254740991,d=NaN,h=4294967295,f=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",l]],p="[object Arguments]",g="[object Array]",m="[object Boolean]",v="[object Date]",y="[object Error]",b="[object Function]",w="[object GeneratorFunction]",x="[object Map]",C="[object Number]",_="[object Object]",S="[object Promise]",k="[object RegExp]",A="[object Set]",E="[object String]",I="[object Symbol]",T="[object WeakMap]",O="[object ArrayBuffer]",F="[object DataView]",P="[object Float32Array]",M="[object Float64Array]",R="[object Int8Array]",L="[object Int16Array]",j="[object Int32Array]",D="[object Uint8Array]",N="[object Uint8ClampedArray]",z="[object Uint16Array]",B="[object Uint32Array]",V=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,G=RegExp(W.source),Y=RegExp(H.source),q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ne=/^\s+/,re=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,pe=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,be=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",_e="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="['’]",Ie="["+we+"]",Te="["+Ae+"]",Oe="["+xe+"]",Fe="\\d+",Pe="["+Ce+"]",Me="["+_e+"]",Re="[^"+we+Ae+Fe+Ce+_e+Se+"]",Le="\\ud83c[\\udffb-\\udfff]",je="[^"+we+"]",De="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]",ze="["+Se+"]",Be="\\u200d",Ve="(?:"+Me+"|"+Re+")",Ue="(?:"+ze+"|"+Re+")",$e="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+Oe+"|"+Le+")?",Ge="["+ke+"]?",Ye=Ge+He+"(?:"+Be+"(?:"+[je,De,Ne].join("|")+")"+Ge+He+")*",qe="(?:"+[Pe,De,Ne].join("|")+")"+Ye,Xe="(?:"+[je+Oe+"?",Oe,De,Ne,Ie].join("|")+")",Ke=RegExp(Ee,"g"),Ze=RegExp(Oe,"g"),Je=RegExp(Le+"(?="+Le+")|"+Xe+Ye,"g"),Qe=RegExp([ze+"?"+Me+"+"+$e+"(?="+[Te,ze,"$"].join("|")+")",Ue+"+"+We+"(?="+[Te,ze+Ve,"$"].join("|")+")",ze+"?"+Ve+"+"+$e,ze+"+"+We,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fe,qe].join("|"),"g"),et=RegExp("["+Be+we+xe+ke+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,it={};it[P]=it[M]=it[R]=it[L]=it[j]=it[D]=it[N]=it[z]=it[B]=!0,it[p]=it[g]=it[O]=it[m]=it[F]=it[v]=it[y]=it[b]=it[x]=it[C]=it[_]=it[k]=it[A]=it[E]=it[T]=!1;var ot={};ot[p]=ot[g]=ot[O]=ot[F]=ot[m]=ot[v]=ot[P]=ot[M]=ot[R]=ot[L]=ot[j]=ot[x]=ot[C]=ot[_]=ot[k]=ot[A]=ot[E]=ot[I]=ot[D]=ot[N]=ot[z]=ot[B]=!0,ot[y]=ot[b]=ot[T]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,lt=parseInt,ct="object"==typeof Cn&&Cn&&Cn.Object===Object&&Cn,ut="object"==typeof self&&self&&self.Object===Object&&self,dt=ct||ut||Function("return this")(),ht=t&&!t.nodeType&&t,ft=ht&&e&&!e.nodeType&&e,pt=ft&&ft.exports===ht,gt=pt&&ct.process,mt=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||gt&>.binding&>.binding("util")}catch(e){}}(),vt=mt&&mt.isArrayBuffer,yt=mt&&mt.isDate,bt=mt&&mt.isMap,wt=mt&&mt.isRegExp,xt=mt&&mt.isSet,Ct=mt&&mt.isTypedArray;function _t(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function kt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function It(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Tt(e,t){return!(null==e||!e.length)&&zt(e,t,0)>-1}function Ot(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Ft(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Pt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Mt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Rt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var jt=$t("length");function Dt(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function Nt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function zt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Nt(e,Vt,n)}function Bt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Vt(e){return e!=e}function Ut(e,t){var n=null==e?0:e.length;return n?Gt(e,t)/n:d}function $t(e){return function(t){return null==t?n:t[e]}}function Wt(e){return function(t){return null==e?n:e[t]}}function Ht(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function Gt(e,t){for(var r,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==n&&(r=r===n?a:r+a)}return r}function Yt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function qt(e){return e?e.slice(0,hn(e)+1).replace(ne,""):e}function Xt(e){return function(t){return e(t)}}function Kt(e,t){return Ft(t,function(t){return e[t]})}function Zt(e,t){return e.has(t)}function Jt(e,t){for(var n=-1,r=e.length;++n<r&&zt(t,e[n],0)>-1;);return n}function Qt(e,t){for(var n=e.length;n--&&zt(t,e[n],0)>-1;);return n}var en=Wt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),tn=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var s=e[n];s!==t&&s!==o||(e[n]=o,a[i++]=n)}return a}function ln(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function cn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function un(e){return rn(e)?function(e){for(var t=Je.lastIndex=0;Je.test(e);)++t;return t}(e):jt(e)}function dn(e){return rn(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function hn(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var fn=Wt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),pn=function e(t){var re,we=(t=null==t?dt:pn.defaults(dt.Object(),t,pn.pick(dt,nt))).Array,xe=t.Date,Ce=t.Error,_e=t.Function,Se=t.Math,ke=t.Object,Ae=t.RegExp,Ee=t.String,Ie=t.TypeError,Te=we.prototype,Oe=_e.prototype,Fe=ke.prototype,Pe=t["__core-js_shared__"],Me=Oe.toString,Re=Fe.hasOwnProperty,Le=0,je=(re=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||""))?"Symbol(src)_1."+re:"",De=Fe.toString,Ne=Me.call(ke),ze=dt._,Be=Ae("^"+Me.call(Re).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=pt?t.Buffer:n,Ue=t.Symbol,$e=t.Uint8Array,We=Ve?Ve.allocUnsafe:n,He=an(ke.getPrototypeOf,ke),Ge=ke.create,Ye=Fe.propertyIsEnumerable,qe=Te.splice,Xe=Ue?Ue.isConcatSpreadable:n,Je=Ue?Ue.iterator:n,et=Ue?Ue.toStringTag:n,at=function(){try{var e=uo(ke,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==dt.clearTimeout&&t.clearTimeout,ut=xe&&xe.now!==dt.Date.now&&xe.now,ht=t.setTimeout!==dt.setTimeout&&t.setTimeout,ft=Se.ceil,gt=Se.floor,mt=ke.getOwnPropertySymbols,jt=Ve?Ve.isBuffer:n,Wt=t.isFinite,gn=Te.join,mn=an(ke.keys,ke),vn=Se.max,yn=Se.min,bn=xe.now,wn=t.parseInt,xn=Se.random,Cn=Te.reverse,_n=uo(t,"DataView"),Sn=uo(t,"Map"),kn=uo(t,"Promise"),An=uo(t,"Set"),En=uo(t,"WeakMap"),In=uo(ke,"create"),Tn=En&&new En,On={},Fn=Do(_n),Pn=Do(Sn),Mn=Do(kn),Rn=Do(An),Ln=Do(En),jn=Ue?Ue.prototype:n,Dn=jn?jn.valueOf:n,Nn=jn?jn.toString:n;function zn(e){if(es(e)&&!$a(e)&&!(e instanceof $n)){if(e instanceof Un)return e;if(Re.call(e,"__wrapped__"))return No(e)}return new Un(e)}var Bn=function(){function e(){}return function(t){if(!Qa(t))return{};if(Ge)return Ge(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Vn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function $n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function qn(e){var t=this.__data__=new Hn(e);this.size=t.size}function Xn(e,t){var n=$a(e),r=!n&&Ua(e),i=!n&&!r&&Ya(e),o=!n&&!r&&!i&&ls(e),a=n||r||i||o,s=a?Yt(e.length,Ee):[],l=s.length;for(var c in e)!t&&!Re.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yo(c,l))||s.push(c);return s}function Kn(e){var t=e.length;return t?e[Yr(0,t-1)]:n}function Zn(e,t){return Ro(Ii(e),ar(t,0,e.length))}function Jn(e){return Ro(Ii(e))}function Qn(e,t,r){(r!==n&&!za(e[t],r)||r===n&&!(t in e))&&ir(e,t,r)}function er(e,t,r){var i=e[t];Re.call(e,t)&&za(i,r)&&(r!==n||t in e)||ir(e,t,r)}function tr(e,t){for(var n=e.length;n--;)if(za(e[n][0],t))return n;return-1}function nr(e,t,n,r){return dr(e,function(e,i,o){t(r,e,n(e),o)}),r}function rr(e,t){return e&&Ti(t,Os(t),e)}function ir(e,t,n){"__proto__"==t&&at?at(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var r=-1,i=t.length,o=we(i),a=null==e;++r<i;)o[r]=a?n:ks(e,t[r]);return o}function ar(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function sr(e,t,r,i,o,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=o?r(e,i,o,a):r(e)),s!==n)return s;if(!Qa(e))return e;var d=$a(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Ii(e,s)}else{var h=po(e),f=h==b||h==w;if(Ya(e))return Ci(e,l);if(h==_||h==p||f&&!o){if(s=c||f?{}:mo(e),!l)return c?function(e,t){return Ti(e,fo(e),t)}(e,function(e,t){return e&&Ti(t,Fs(t),e)}(s,e)):function(e,t){return Ti(e,ho(e),t)}(e,rr(s,e))}else{if(!ot[h])return o?e:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case O:return _i(e);case m:case v:return new i(+e);case F:return function(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case M:case R:case L:case j:case D:case N:case z:case B:return Si(e,n);case x:return new i;case C:case E:return new i(e);case k:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new i;case I:return r=e,Dn?ke(Dn.call(r)):{}}}(e,h,l)}}a||(a=new qn);var g=a.get(e);if(g)return g;a.set(e,s),os(e)?e.forEach(function(n){s.add(sr(n,t,r,n,e,a))}):ts(e)&&e.forEach(function(n,i){s.set(i,sr(n,t,r,i,e,a))});var y=d?n:(u?c?ro:no:c?Fs:Os)(e);return kt(y||e,function(n,i){y&&(n=e[i=n]),er(s,i,sr(n,t,r,i,e,a))}),s}function lr(e,t,r){var i=r.length;if(null==e)return!i;for(e=ke(e);i--;){var o=r[i],a=t[o],s=e[o];if(s===n&&!(o in e)||!a(s))return!1}return!0}function cr(e,t,i){if("function"!=typeof e)throw new Ie(r);return Oo(function(){e.apply(n,i)},t)}function ur(e,t,n,r){var i=-1,o=Tt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Ft(t,Xt(n))),r?(o=Ot,a=!1):t.length>=200&&(o=Zt,a=!1,t=new Yn(t));e:for(;++i<s;){var u=e[i],d=null==n?u:n(u);if(u=r||0!==u?u:0,a&&d==d){for(var h=c;h--;)if(t[h]===d)continue e;l.push(u)}else o(t,d,r)||l.push(u)}return l}zn.templateSettings={escape:q,evaluate:X,interpolate:K,variable:"",imports:{_:zn}},zn.prototype=Vn.prototype,zn.prototype.constructor=zn,Un.prototype=Bn(Vn.prototype),Un.prototype.constructor=Un,$n.prototype=Bn(Vn.prototype),$n.prototype.constructor=$n,Wn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(In){var r=t[e];return r===i?n:r}return Re.call(t,e)?t[e]:n},Wn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==n:Re.call(t,e)},Wn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=In&&t===n?i:t,this},Hn.prototype.clear=function(){this.__data__=[],this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():qe.call(t,n,1),--this.size,0))},Hn.prototype.get=function(e){var t=this.__data__,r=tr(t,e);return r<0?n:t[r][1]},Hn.prototype.has=function(e){return tr(this.__data__,e)>-1},Hn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Sn||Hn),string:new Wn}},Gn.prototype.delete=function(e){var t=lo(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return lo(this,e).get(e)},Gn.prototype.has=function(e){return lo(this,e).has(e)},Gn.prototype.set=function(e,t){var n=lo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,i),this},Yn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.clear=function(){this.__data__=new Hn,this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},qn.prototype.get=function(e){return this.__data__.get(e)},qn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Hn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var dr=Pi(br),hr=Pi(wr,!0);function fr(e,t){var n=!0;return dr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function pr(e,t,r){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(l===n?s==s&&!ss(s):r(s,l)))var l=s,c=a}return c}function gr(e,t){var n=[];return dr(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function mr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=vo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?mr(s,t-1,n,r,i):Pt(i,s):r||(i[i.length]=s)}return i}var vr=Mi(),yr=Mi(!0);function br(e,t){return e&&vr(e,t,Os)}function wr(e,t){return e&&yr(e,t,Os)}function xr(e,t){return It(t,function(t){return Ka(e[t])})}function Cr(e,t){for(var r=0,i=(t=yi(t,e)).length;null!=e&&r<i;)e=e[jo(t[r++])];return r&&r==i?e:n}function _r(e,t,n){var r=t(e);return $a(e)?r:Pt(r,n(e))}function Sr(e){return null==e?e===n?"[object Undefined]":"[object Null]":et&&et in ke(e)?function(e){var t=Re.call(e,et),r=e[et];try{e[et]=n;var i=!0}catch(e){}var o=De.call(e);return i&&(t?e[et]=r:delete e[et]),o}(e):function(e){return De.call(e)}(e)}function kr(e,t){return e>t}function Ar(e,t){return null!=e&&Re.call(e,t)}function Er(e,t){return null!=e&&t in ke(e)}function Ir(e,t,r){for(var i=r?Ot:Tt,o=e[0].length,a=e.length,s=a,l=we(a),c=1/0,u=[];s--;){var d=e[s];s&&t&&(d=Ft(d,Xt(t))),c=yn(d.length,c),l[s]=!r&&(t||o>=120&&d.length>=120)?new Yn(s&&d):n}d=e[0];var h=-1,f=l[0];e:for(;++h<o&&u.length<c;){var p=d[h],g=t?t(p):p;if(p=r||0!==p?p:0,!(f?Zt(f,g):i(u,g,r))){for(s=a;--s;){var m=l[s];if(!(m?Zt(m,g):i(e[s],g,r)))continue e}f&&f.push(g),u.push(p)}}return u}function Tr(e,t,r){var i=null==(e=Eo(e,t=yi(t,e)))?e:e[jo(Xo(t))];return null==i?n:_t(i,e,r)}function Or(e){return es(e)&&Sr(e)==p}function Fr(e,t,r,i,o){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,r,i,o,a){var s=$a(e),l=$a(t),c=s?g:po(e),u=l?g:po(t),d=(c=c==p?_:c)==_,h=(u=u==p?_:u)==_,f=c==u;if(f&&Ya(e)){if(!Ya(t))return!1;s=!0,d=!1}if(f&&!d)return a||(a=new qn),s||ls(e)?eo(e,t,r,i,o,a):function(e,t,n,r,i,o,a){switch(n){case F:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!o(new $e(e),new $e(t)));case m:case v:case C:return za(+e,+t);case y:return e.name==t.name&&e.message==t.message;case k:case E:return e==t+"";case x:var s=on;case A:var l=1&r;if(s||(s=ln),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=eo(s(e),s(t),r,i,o,a);return a.delete(e),u;case I:if(Dn)return Dn.call(e)==Dn.call(t)}return!1}(e,t,c,r,i,o,a);if(!(1&r)){var b=d&&Re.call(e,"__wrapped__"),w=h&&Re.call(t,"__wrapped__");if(b||w){var S=b?e.value():e,T=w?t.value():t;return a||(a=new qn),o(S,T,r,i,a)}}return!!f&&(a||(a=new qn),function(e,t,r,i,o,a){var s=1&r,l=no(e),c=l.length,u=no(t),d=u.length;if(c!=d&&!s)return!1;for(var h=c;h--;){var f=l[h];if(!(s?f in t:Re.call(t,f)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var v=s;++h<c;){var y=e[f=l[h]],b=t[f];if(i)var w=s?i(b,y,f,t,e,a):i(y,b,f,e,t,a);if(!(w===n?y===b||o(y,b,r,i,a):w)){m=!1;break}v||(v="constructor"==f)}if(m&&!v){var x=e.constructor,C=t.constructor;x==C||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof C&&C instanceof C||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,r,i,o,a))}(e,t,r,i,Fr,o))}function Pr(e,t,r,i){var o=r.length,a=o,s=!i;if(null==e)return!a;for(e=ke(e);o--;){var l=r[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var c=(l=r[o])[0],u=e[c],d=l[1];if(s&&l[2]){if(u===n&&!(c in e))return!1}else{var h=new qn;if(i)var f=i(u,d,c,e,t,h);if(!(f===n?Fr(d,u,3,i,h):f))return!1}}return!0}function Mr(e){return!(!Qa(e)||(t=e,je&&je in t))&&(Ka(e)?Be:pe).test(Do(e));var t}function Rr(e){return"function"==typeof e?e:null==e?nl:"object"==typeof e?$a(e)?Br(e[0],e[1]):zr(e):dl(e)}function Lr(e){if(!_o(e))return mn(e);var t=[];for(var n in ke(e))Re.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e){if(!Qa(e))return function(e){var t=[];if(null!=e)for(var n in ke(e))t.push(n);return t}(e);var t=_o(e),n=[];for(var r in e)("constructor"!=r||!t&&Re.call(e,r))&&n.push(r);return n}function Dr(e,t){return e<t}function Nr(e,t){var n=-1,r=Ha(e)?we(e.length):[];return dr(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function zr(e){var t=co(e);return 1==t.length&&t[0][2]?ko(t[0][0],t[0][1]):function(n){return n===e||Pr(n,e,t)}}function Br(e,t){return wo(e)&&So(t)?ko(jo(e),t):function(r){var i=ks(r,e);return i===n&&i===t?As(r,e):Fr(t,i,3)}}function Vr(e,t,r,i,o){e!==t&&vr(t,function(a,s){if(o||(o=new qn),Qa(a))!function(e,t,r,i,o,a,s){var l=Io(e,r),c=Io(t,r),u=s.get(c);if(u)Qn(e,r,u);else{var d=a?a(l,c,r+"",e,t,s):n,h=d===n;if(h){var f=$a(c),p=!f&&Ya(c),g=!f&&!p&&ls(c);d=c,f||p||g?$a(l)?d=l:Ga(l)?d=Ii(l):p?(h=!1,d=Ci(c,!0)):g?(h=!1,d=Si(c,!0)):d=[]:rs(c)||Ua(c)?(d=l,Ua(l)?d=ms(l):Qa(l)&&!Ka(l)||(d=mo(c))):h=!1}h&&(s.set(c,d),o(d,c,i,a,s),s.delete(c)),Qn(e,r,d)}}(e,t,s,r,Vr,i,o);else{var l=i?i(Io(e,s),a,s+"",e,t,o):n;l===n&&(l=a),Qn(e,s,l)}},Fs)}function Ur(e,t){var r=e.length;if(r)return yo(t+=t<0?r:0,r)?e[t]:n}function $r(e,t,n){t=t.length?Ft(t,function(e){return $a(e)?function(t){return Cr(t,1===e.length?e[0]:e)}:e}):[nl];var r=-1;t=Ft(t,Xt(so()));var i=Nr(e,function(e,n,i){var o=Ft(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=ki(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Wr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Cr(e,a);n(s,a)&&Jr(o,yi(a,e),s)}return o}function Hr(e,t,n,r){var i=r?Bt:zt,o=-1,a=t.length,s=e;for(e===t&&(t=Ii(t)),n&&(s=Ft(e,Xt(n)));++o<a;)for(var l=0,c=t[o],u=n?n(c):c;(l=i(s,u,l,r))>-1;)s!==e&&qe.call(s,l,1),qe.call(e,l,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;yo(i)?qe.call(e,i,1):ui(e,i)}}return e}function Yr(e,t){return e+gt(xn()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>u)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Xr(e,t){return Fo(Ao(e,t,nl),e+"")}function Kr(e){return Kn(zs(e))}function Zr(e,t){var n=zs(e);return Ro(n,ar(t,0,n.length))}function Jr(e,t,r,i){if(!Qa(e))return e;for(var o=-1,a=(t=yi(t,e)).length,s=a-1,l=e;null!=l&&++o<a;){var c=jo(t[o]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var d=l[c];(u=i?i(d,c,l):n)===n&&(u=Qa(d)?d:yo(t[o+1])?[]:{})}er(l,c,u),l=l[c]}return e}var Qr=Tn?function(e,t){return Tn.set(e,t),e}:nl,ei=at?function(e,t){return at(e,"toString",{configurable:!0,enumerable:!1,value:Qs(t),writable:!0})}:nl;function ti(e){return Ro(zs(e))}function ni(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=we(i);++r<i;)o[r]=e[r+t];return o}function ri(e,t){var n;return dr(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function ii(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ss(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return oi(e,t,nl,n)}function oi(e,t,r,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,c=ss(t),u=t===n;o<a;){var d=gt((o+a)/2),h=r(e[d]),f=h!==n,p=null===h,g=h==h,m=ss(h);if(s)var v=i||g;else v=u?g&&(i||f):l?g&&f&&(i||!p):c?g&&f&&!p&&(i||!m):!p&&!m&&(i?h<=t:h<t);v?o=d+1:a=d}return yn(a,4294967294)}function ai(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!za(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function si(e){return"number"==typeof e?e:ss(e)?d:+e}function li(e){if("string"==typeof e)return e;if($a(e))return Ft(e,li)+"";if(ss(e))return Nn?Nn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ci(e,t,n){var r=-1,i=Tt,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Ot;else if(o>=200){var c=t?null:qi(e);if(c)return ln(c);a=!1,i=Zt,l=new Yn}else l=t?[]:s;e:for(;++r<o;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),s.push(u)}else i(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}function ui(e,t){return null==(e=Eo(e,t=yi(t,e)))||delete e[jo(Xo(t))]}function di(e,t,n,r){return Jr(e,t,n(Cr(e,t)),r)}function hi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ni(e,r?0:o,r?o+1:i):ni(e,r?o+1:0,r?i:o)}function fi(e,t){var n=e;return n instanceof $n&&(n=n.value()),Mt(t,function(e,t){return t.func.apply(t.thisArg,Pt([e],t.args))},n)}function pi(e,t,n){var r=e.length;if(r<2)return r?ci(e[0]):[];for(var i=-1,o=we(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=ur(o[i]||a,e[s],t,n));return ci(mr(o,1),t,n)}function gi(e,t,r){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var l=i<a?t[i]:n;r(s,e[i],l)}return s}function mi(e){return Ga(e)?e:[]}function vi(e){return"function"==typeof e?e:nl}function yi(e,t){return $a(e)?e:wo(e,t)?[e]:Lo(vs(e))}var bi=Xr;function wi(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:ni(e,t,r)}var xi=ct||function(e){return dt.clearTimeout(e)};function Ci(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function _i(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Si(e,t){var n=t?_i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ki(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,a=ss(e),s=t!==n,l=null===t,c=t==t,u=ss(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!u&&e<t||u&&r&&o&&!i&&!a||l&&r&&o||!s&&o||!c)return-1}return 0}function Ai(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,c=vn(o-a,0),u=we(l+c),d=!r;++s<l;)u[s]=t[s];for(;++i<a;)(d||i<o)&&(u[n[i]]=e[i]);for(;c--;)u[s++]=e[i++];return u}function Ei(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,l=-1,c=t.length,u=vn(o-s,0),d=we(u+c),h=!r;++i<u;)d[i]=e[i];for(var f=i;++l<c;)d[f+l]=t[l];for(;++a<s;)(h||i<o)&&(d[f+n[a]]=e[i++]);return d}function Ii(e,t){var n=-1,r=e.length;for(t||(t=we(r));++n<r;)t[n]=e[n];return t}function Ti(e,t,r,i){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=i?i(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),o?ir(r,l,c):er(r,l,c)}return r}function Oi(e,t){return function(n,r){var i=$a(n)?St:nr,o=t?t():{};return i(n,e,so(r,2),o)}}function Fi(e){return Xr(function(t,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(o--,a):n,s&&bo(r[0],r[1],s)&&(a=o<3?n:a,o=1),t=ke(t);++i<o;){var l=r[i];l&&e(t,l,i,a)}return t})}function Pi(e,t){return function(n,r){if(null==n)return n;if(!Ha(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=ke(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Mi(e){return function(t,n,r){for(var i=-1,o=ke(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function Ri(e){return function(t){var r=rn(t=vs(t))?dn(t):n,i=r?r[0]:t.charAt(0),o=r?wi(r,1).join(""):t.slice(1);return i[e]()+o}}function Li(e){return function(t){return Mt(Ks(Us(t).replace(Ke,"")),e,"")}}function ji(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return Qa(r)?r:n}}function Di(e){return function(t,r,i){var o=ke(t);if(!Ha(t)){var a=so(r,3);t=Os(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,i);return s>-1?o[a?t[s]:s]:n}}function Ni(e){return to(function(t){var i=t.length,o=i,a=Un.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new Ie(r);if(a&&!l&&"wrapper"==oo(s))var l=new Un([],!0)}for(o=l?o:i;++o<i;){var c=oo(s=t[o]),u="wrapper"==c?io(s):n;l=u&&xo(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[oo(u[0])].apply(l,u[3]):1==s.length&&xo(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&$a(n))return l.plant(n).value();for(var r=0,o=i?t[r].apply(this,e):n;++r<i;)o=t[r].call(this,o);return o}})}function zi(e,t,r,i,o,a,l,c,u,d){var h=t&s,f=1&t,p=2&t,g=24&t,m=512&t,v=p?n:ji(e);return function s(){for(var y=arguments.length,b=we(y),w=y;w--;)b[w]=arguments[w];if(g)var x=ao(s),C=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,x);if(i&&(b=Ai(b,i,o,g)),a&&(b=Ei(b,a,l,g)),y-=C,g&&y<d){var _=sn(b,x);return Gi(e,t,zi,s.placeholder,r,b,_,c,u,d-y)}var S=f?r:this,k=p?S[e]:e;return y=b.length,c?b=function(e,t){for(var r=e.length,i=yn(t.length,r),o=Ii(e);i--;){var a=t[i];e[i]=yo(a,r)?o[a]:n}return e}(b,c):m&&y>1&&b.reverse(),h&&u<y&&(b.length=u),this&&this!==dt&&this instanceof s&&(k=v||ji(k)),k.apply(S,b)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return br(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Vi(e,t){return function(r,i){var o;if(r===n&&i===n)return t;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=li(r),i=li(i)):(r=si(r),i=si(i)),o=e(r,i)}return o}}function Ui(e){return to(function(t){return t=Ft(t,Xt(so())),Xr(function(n){var r=this;return e(t,function(e){return _t(e,r,n)})})})}function $i(e,t){var r=(t=t===n?" ":li(t)).length;if(r<2)return r?qr(t,e):t;var i=qr(t,ft(e/un(t)));return rn(t)?wi(dn(i),0,e).join(""):i.slice(0,e)}function Wi(e){return function(t,r,i){return i&&"number"!=typeof i&&bo(t,r,i)&&(r=i=n),t=hs(t),r===n?(r=t,t=0):r=hs(r),function(e,t,n,r){for(var i=-1,o=vn(ft((t-e)/(n||1)),0),a=we(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,r,i=i===n?t<r?1:-1:hs(i),e)}}function Hi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function Gi(e,t,r,i,o,s,l,c,u,d){var h=8&t;t|=h?a:64,4&(t&=~(h?64:a))||(t&=-4);var f=[e,t,o,h?s:n,h?l:n,h?n:s,h?n:l,c,u,d],p=r.apply(n,f);return xo(e)&&To(p,f),p.placeholder=i,Po(p,e,t)}function Yi(e){var t=Se[e];return function(e,n){if(e=gs(e),(n=null==n?0:yn(fs(n),292))&&Wt(e)){var r=(vs(e)+"e").split("e");return+((r=(vs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var qi=An&&1/ln(new An([,-0]))[1]==c?function(e){return new An(e)}:sl;function Xi(e){return function(t){var n=po(t);return n==x?on(t):n==A?cn(t):function(e,t){return Ft(t,function(t){return[t,e[t]]})}(t,e(t))}}function Ki(e,t,i,c,u,d,h,f){var p=2&t;if(!p&&"function"!=typeof e)throw new Ie(r);var g=c?c.length:0;if(g||(t&=-97,c=u=n),h=h===n?h:vn(fs(h),0),f=f===n?f:fs(f),g-=u?u.length:0,64&t){var m=c,v=u;c=u=n}var y=p?n:io(e),b=[e,t,i,c,u,m,v,d,h,f];if(y&&function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,c=r==s&&8==n||r==s&&n==l&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!c)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var d=e[3];e[3]=d?Ai(d,u,t[4]):u,e[4]=d?sn(e[3],o):t[4]}(u=t[5])&&(d=e[5],e[5]=d?Ei(d,u,t[6]):u,e[6]=d?sn(e[5],o):t[6]),(u=t[7])&&(e[7]=u),r&s&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,y),e=b[0],t=b[1],i=b[2],c=b[3],u=b[4],!(f=b[9]=b[9]===n?p?0:e.length:vn(b[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,r){var i=ji(e);return function o(){for(var a=arguments.length,s=we(a),l=a,c=ao(o);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:sn(s,c);return(a-=u.length)<r?Gi(e,t,zi,o.placeholder,n,s,u,n,n,r-a):_t(this&&this!==dt&&this instanceof o?i:e,this,s)}}(e,t,f):t!=a&&33!=t||u.length?zi.apply(n,b):function(e,t,n,r){var i=1&t,o=ji(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=r.length,u=we(c+s),d=this&&this!==dt&&this instanceof t?o:e;++l<c;)u[l]=r[l];for(;s--;)u[l++]=arguments[++a];return _t(d,i?n:this,u)}}(e,t,i,c);else var w=function(e,t,n){var r=1&t,i=ji(e);return function t(){return(this&&this!==dt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,i);return Po((y?Qr:To)(w,b),e,t)}function Zi(e,t,r,i){return e===n||za(e,Fe[r])&&!Re.call(i,r)?t:e}function Ji(e,t,r,i,o,a){return Qa(e)&&Qa(t)&&(a.set(t,e),Vr(e,t,n,Ji,a),a.delete(t)),e}function Qi(e){return rs(e)?n:e}function eo(e,t,r,i,o,a){var s=1&r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var h=-1,f=!0,p=2&r?new Yn:n;for(a.set(e,t),a.set(t,e);++h<l;){var g=e[h],m=t[h];if(i)var v=s?i(m,g,h,t,e,a):i(g,m,h,e,t,a);if(v!==n){if(v)continue;f=!1;break}if(p){if(!Lt(t,function(e,t){if(!Zt(p,t)&&(g===e||o(g,e,r,i,a)))return p.push(t)})){f=!1;break}}else if(g!==m&&!o(g,m,r,i,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function to(e){return Fo(Ao(e,n,Wo),e+"")}function no(e){return _r(e,Os,ho)}function ro(e){return _r(e,Fs,fo)}var io=Tn?function(e){return Tn.get(e)}:sl;function oo(e){for(var t=e.name+"",n=On[t],r=Re.call(On,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function ao(e){return(Re.call(zn,"placeholder")?zn:e).placeholder}function so(){var e=zn.iteratee||rl;return e=e===rl?Rr:e,arguments.length?e(arguments[0],arguments[1]):e}function lo(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function co(e){for(var t=Os(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,So(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Mr(r)?r:n}var ho=mt?function(e){return null==e?[]:(e=ke(e),It(mt(e),function(t){return Ye.call(e,t)}))}:pl,fo=mt?function(e){for(var t=[];e;)Pt(t,ho(e)),e=He(e);return t}:pl,po=Sr;function go(e,t,n){for(var r=-1,i=(t=yi(t,e)).length,o=!1;++r<i;){var a=jo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ja(i)&&yo(a,i)&&($a(e)||Ua(e))}function mo(e){return"function"!=typeof e.constructor||_o(e)?{}:Bn(He(e))}function vo(e){return $a(e)||Ua(e)||!!(Xe&&e&&e[Xe])}function yo(e,t){var n=typeof e;return!!(t=null==t?u:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function bo(e,t,n){if(!Qa(n))return!1;var r=typeof t;return!!("number"==r?Ha(n)&&yo(t,n.length):"string"==r&&t in n)&&za(n[t],e)}function wo(e,t){if($a(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ss(e))||J.test(e)||!Z.test(e)||null!=t&&e in ke(t)}function xo(e){var t=oo(e),n=zn[t];if("function"!=typeof n||!(t in $n.prototype))return!1;if(e===n)return!0;var r=io(n);return!!r&&e===r[0]}(_n&&po(new _n(new ArrayBuffer(1)))!=F||Sn&&po(new Sn)!=x||kn&&po(kn.resolve())!=S||An&&po(new An)!=A||En&&po(new En)!=T)&&(po=function(e){var t=Sr(e),r=t==_?e.constructor:n,i=r?Do(r):"";if(i)switch(i){case Fn:return F;case Pn:return x;case Mn:return S;case Rn:return A;case Ln:return T}return t});var Co=Pe?Ka:gl;function _o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Fe)}function So(e){return e==e&&!Qa(e)}function ko(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in ke(r))}}function Ao(e,t,r){return t=vn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=vn(n.length-t,0),a=we(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=we(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),_t(e,this,s)}}function Eo(e,t){return t.length<2?e:Cr(e,ni(t,0,-1))}function Io(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var To=Mo(Qr),Oo=ht||function(e,t){return dt.setTimeout(e,t)},Fo=Mo(ei);function Po(e,t,n){var r=t+"";return Fo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return kt(f,function(n){var r="_."+n[0];t&n[1]&&!Tt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(r),n)))}function Mo(e){var t=0,r=0;return function(){var i=bn(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Ro(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r<t;){var a=Yr(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Lo=function(e){var t=Ma(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)}),t});function jo(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Do(e){if(null!=e){try{return Me.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function No(e){if(e instanceof $n)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zo=Xr(function(e,t){return Ga(e)?ur(e,mr(t,1,Ga,!0)):[]}),Bo=Xr(function(e,t){var r=Xo(t);return Ga(r)&&(r=n),Ga(e)?ur(e,mr(t,1,Ga,!0),so(r,2)):[]}),Vo=Xr(function(e,t){var r=Xo(t);return Ga(r)&&(r=n),Ga(e)?ur(e,mr(t,1,Ga,!0),n,r):[]});function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=vn(r+i,0)),Nt(e,so(t,3),i)}function $o(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==n&&(o=fs(r),o=r<0?vn(i+o,0):yn(o,i-1)),Nt(e,so(t,3),o,!0)}function Wo(e){return null!=e&&e.length?mr(e,1):[]}function Ho(e){return e&&e.length?e[0]:n}var Go=Xr(function(e){var t=Ft(e,mi);return t.length&&t[0]===e[0]?Ir(t):[]}),Yo=Xr(function(e){var t=Xo(e),r=Ft(e,mi);return t===Xo(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Ir(r,so(t,2)):[]}),qo=Xr(function(e){var t=Xo(e),r=Ft(e,mi);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Ir(r,n,t):[]});function Xo(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Ko=Xr(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?Hr(e,t):e}var Jo=to(function(e,t){var n=null==e?0:e.length,r=or(e,t);return Gr(e,Ft(t,function(e){return yo(e,n)?+e:e}).sort(ki)),r});function Qo(e){return null==e?e:Cn.call(e)}var ea=Xr(function(e){return ci(mr(e,1,Ga,!0))}),ta=Xr(function(e){var t=Xo(e);return Ga(t)&&(t=n),ci(mr(e,1,Ga,!0),so(t,2))}),na=Xr(function(e){var t=Xo(e);return t="function"==typeof t?t:n,ci(mr(e,1,Ga,!0),n,t)});function ra(e){if(!e||!e.length)return[];var t=0;return e=It(e,function(e){if(Ga(e))return t=vn(e.length,t),!0}),Yt(t,function(t){return Ft(e,$t(t))})}function ia(e,t){if(!e||!e.length)return[];var r=ra(e);return null==t?r:Ft(r,function(e){return _t(t,n,e)})}var oa=Xr(function(e,t){return Ga(e)?ur(e,t):[]}),aa=Xr(function(e){return pi(It(e,Ga))}),sa=Xr(function(e){var t=Xo(e);return Ga(t)&&(t=n),pi(It(e,Ga),so(t,2))}),la=Xr(function(e){var t=Xo(e);return t="function"==typeof t?t:n,pi(It(e,Ga),n,t)}),ca=Xr(ra),ua=Xr(function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,ia(e,r)});function da(e){var t=zn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var fa=to(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&i instanceof $n&&yo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:n}),new Un(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e})):this.thru(o)}),pa=Oi(function(e,t,n){Re.call(e,n)?++e[n]:ir(e,n,1)}),ga=Di(Uo),ma=Di($o);function va(e,t){return($a(e)?kt:dr)(e,so(t,3))}function ya(e,t){return($a(e)?At:hr)(e,so(t,3))}var ba=Oi(function(e,t,n){Re.call(e,n)?e[n].push(t):ir(e,n,[t])}),wa=Xr(function(e,t,n){var r=-1,i="function"==typeof t,o=Ha(e)?we(e.length):[];return dr(e,function(e){o[++r]=i?_t(t,e,n):Tr(e,t,n)}),o}),xa=Oi(function(e,t,n){ir(e,n,t)});function Ca(e,t){return($a(e)?Ft:Nr)(e,so(t,3))}var _a=Oi(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Sa=Xr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&bo(e,t[0],t[1])?t=[]:n>2&&bo(t[0],t[1],t[2])&&(t=[t[0]]),$r(e,mr(t,1),[])}),ka=ut||function(){return dt.Date.now()};function Aa(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Ki(e,s,n,n,n,n,t)}function Ea(e,t){var i;if("function"!=typeof t)throw new Ie(r);return e=fs(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var Ia=Xr(function(e,t,n){var r=1;if(n.length){var i=sn(n,ao(Ia));r|=a}return Ki(e,r,t,n,i)}),Ta=Xr(function(e,t,n){var r=3;if(n.length){var i=sn(n,ao(Ta));r|=a}return Ki(t,r,e,n,i)});function Oa(e,t,i){var o,a,s,l,c,u,d=0,h=!1,f=!1,p=!0;if("function"!=typeof e)throw new Ie(r);function g(t){var r=o,i=a;return o=a=n,d=t,l=e.apply(i,r)}function m(e){var r=e-u;return u===n||r>=t||r<0||f&&e-d>=s}function v(){var e=ka();if(m(e))return y(e);c=Oo(v,function(e){var n=t-(e-u);return f?yn(n,s-(e-d)):n}(e))}function y(e){return c=n,p&&o?g(e):(o=a=n,l)}function b(){var e=ka(),r=m(e);if(o=arguments,a=this,u=e,r){if(c===n)return function(e){return d=e,c=Oo(v,t),h?g(e):l}(u);if(f)return xi(c),c=Oo(v,t),g(u)}return c===n&&(c=Oo(v,t)),l}return t=gs(t)||0,Qa(i)&&(h=!!i.leading,s=(f="maxWait"in i)?vn(gs(i.maxWait)||0,t):s,p="trailing"in i?!!i.trailing:p),b.cancel=function(){c!==n&&xi(c),d=0,o=u=a=c=n},b.flush=function(){return c===n?l:y(ka())},b}var Fa=Xr(function(e,t){return cr(e,1,t)}),Pa=Xr(function(e,t,n){return cr(e,gs(t)||0,n)});function Ma(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ie(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ma.Cache||Gn),n}function Ra(e){if("function"!=typeof e)throw new Ie(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ma.Cache=Gn;var La=bi(function(e,t){var n=(t=1==t.length&&$a(t[0])?Ft(t[0],Xt(so())):Ft(mr(t,1),Xt(so()))).length;return Xr(function(r){for(var i=-1,o=yn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return _t(e,this,r)})}),ja=Xr(function(e,t){var r=sn(t,ao(ja));return Ki(e,a,n,t,r)}),Da=Xr(function(e,t){var r=sn(t,ao(Da));return Ki(e,64,n,t,r)}),Na=to(function(e,t){return Ki(e,l,n,n,n,t)});function za(e,t){return e===t||e!=e&&t!=t}var Ba=Hi(kr),Va=Hi(function(e,t){return e>=t}),Ua=Or(function(){return arguments}())?Or:function(e){return es(e)&&Re.call(e,"callee")&&!Ye.call(e,"callee")},$a=we.isArray,Wa=vt?Xt(vt):function(e){return es(e)&&Sr(e)==O};function Ha(e){return null!=e&&Ja(e.length)&&!Ka(e)}function Ga(e){return es(e)&&Ha(e)}var Ya=jt||gl,qa=yt?Xt(yt):function(e){return es(e)&&Sr(e)==v};function Xa(e){if(!es(e))return!1;var t=Sr(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function Ka(e){if(!Qa(e))return!1;var t=Sr(e);return t==b||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==fs(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}function Qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=bt?Xt(bt):function(e){return es(e)&&po(e)==x};function ns(e){return"number"==typeof e||es(e)&&Sr(e)==C}function rs(e){if(!es(e)||Sr(e)!=_)return!1;var t=He(e);if(null===t)return!0;var n=Re.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Me.call(n)==Ne}var is=wt?Xt(wt):function(e){return es(e)&&Sr(e)==k},os=xt?Xt(xt):function(e){return es(e)&&po(e)==A};function as(e){return"string"==typeof e||!$a(e)&&es(e)&&Sr(e)==E}function ss(e){return"symbol"==typeof e||es(e)&&Sr(e)==I}var ls=Ct?Xt(Ct):function(e){return es(e)&&Ja(e.length)&&!!it[Sr(e)]},cs=Hi(Dr),us=Hi(function(e,t){return e<=t});function ds(e){if(!e)return[];if(Ha(e))return as(e)?dn(e):Ii(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=po(e);return(t==x?on:t==A?ln:zs)(e)}function hs(e){return e?(e=gs(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fs(e){var t=hs(e),n=t%1;return t==t?n?t-n:t:0}function ps(e){return e?ar(fs(e),0,h):0}function gs(e){if("number"==typeof e)return e;if(ss(e))return d;if(Qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=qt(e);var n=fe.test(e);return n||ge.test(e)?lt(e.slice(2),n?2:8):he.test(e)?d:+e}function ms(e){return Ti(e,Fs(e))}function vs(e){return null==e?"":li(e)}var ys=Fi(function(e,t){if(_o(t)||Ha(t))Ti(t,Os(t),e);else for(var n in t)Re.call(t,n)&&er(e,n,t[n])}),bs=Fi(function(e,t){Ti(t,Fs(t),e)}),ws=Fi(function(e,t,n,r){Ti(t,Fs(t),e,r)}),xs=Fi(function(e,t,n,r){Ti(t,Os(t),e,r)}),Cs=to(or),_s=Xr(function(e,t){e=ke(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&bo(t[0],t[1],o)&&(i=1);++r<i;)for(var a=t[r],s=Fs(a),l=-1,c=s.length;++l<c;){var u=s[l],d=e[u];(d===n||za(d,Fe[u])&&!Re.call(e,u))&&(e[u]=a[u])}return e}),Ss=Xr(function(e){return e.push(n,Ji),_t(Ms,n,e)});function ks(e,t,r){var i=null==e?n:Cr(e,t);return i===n?r:i}function As(e,t){return null!=e&&go(e,t,Er)}var Es=Bi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),e[t]=n},Qs(nl)),Is=Bi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),Re.call(e,t)?e[t].push(n):e[t]=[n]},so),Ts=Xr(Tr);function Os(e){return Ha(e)?Xn(e):Lr(e)}function Fs(e){return Ha(e)?Xn(e,!0):jr(e)}var Ps=Fi(function(e,t,n){Vr(e,t,n)}),Ms=Fi(function(e,t,n,r){Vr(e,t,n,r)}),Rs=to(function(e,t){var n={};if(null==e)return n;var r=!1;t=Ft(t,function(t){return t=yi(t,e),r||(r=t.length>1),t}),Ti(e,ro(e),n),r&&(n=sr(n,7,Qi));for(var i=t.length;i--;)ui(n,t[i]);return n}),Ls=to(function(e,t){return null==e?{}:function(e,t){return Wr(e,t,function(t,n){return As(e,n)})}(e,t)});function js(e,t){if(null==e)return{};var n=Ft(ro(e),function(e){return[e]});return t=so(t),Wr(e,n,function(e,n){return t(e,n[0])})}var Ds=Xi(Os),Ns=Xi(Fs);function zs(e){return null==e?[]:Kt(e,Os(e))}var Bs=Li(function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)});function Vs(e){return Xs(vs(e).toLowerCase())}function Us(e){return(e=vs(e))&&e.replace(ve,en).replace(Ze,"")}var $s=Li(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ws=Li(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Hs=Ri("toLowerCase"),Gs=Li(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Ys=Li(function(e,t,n){return e+(n?" ":"")+Xs(t)}),qs=Li(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Xs=Ri("toUpperCase");function Ks(e,t,r){return e=vs(e),(t=r?n:t)===n?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Zs=Xr(function(e,t){try{return _t(e,n,t)}catch(e){return Xa(e)?e:new Ce(e)}}),Js=to(function(e,t){return kt(t,function(t){t=jo(t),ir(e,t,Ia(e[t],e))}),e});function Qs(e){return function(){return e}}var el=Ni(),tl=Ni(!0);function nl(e){return e}function rl(e){return Rr("function"==typeof e?e:sr(e,1))}var il=Xr(function(e,t){return function(n){return Tr(n,e,t)}}),ol=Xr(function(e,t){return function(n){return Tr(e,n,t)}});function al(e,t,n){var r=Os(t),i=xr(t,r);null!=n||Qa(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=xr(t,Os(t)));var o=!(Qa(n)&&"chain"in n&&!n.chain),a=Ka(e);return kt(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ii(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Pt([this.value()],arguments))})}),e}function sl(){}var ll=Ui(Ft),cl=Ui(Et),ul=Ui(Lt);function dl(e){return wo(e)?$t(jo(e)):function(e){return function(t){return Cr(t,e)}}(e)}var hl=Wi(),fl=Wi(!0);function pl(){return[]}function gl(){return!1}var ml,vl=Vi(function(e,t){return e+t},0),yl=Yi("ceil"),bl=Vi(function(e,t){return e/t},1),wl=Yi("floor"),xl=Vi(function(e,t){return e*t},1),Cl=Yi("round"),_l=Vi(function(e,t){return e-t},0);return zn.after=function(e,t){if("function"!=typeof t)throw new Ie(r);return e=fs(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=Aa,zn.assign=ys,zn.assignIn=bs,zn.assignInWith=ws,zn.assignWith=xs,zn.at=Cs,zn.before=Ea,zn.bind=Ia,zn.bindAll=Js,zn.bindKey=Ta,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return $a(e)?e:[e]},zn.chain=da,zn.chunk=function(e,t,r){t=(r?bo(e,t,r):t===n)?1:vn(fs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=we(ft(i/t));o<i;)s[a++]=ni(e,o,o+=t);return s},zn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},zn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=we(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Pt($a(n)?Ii(n):[n],mr(t,1))},zn.cond=function(e){var t=null==e?0:e.length,n=so();return e=t?Ft(e,function(e){if("function"!=typeof e[1])throw new Ie(r);return[n(e[0]),e[1]]}):[],Xr(function(n){for(var r=-1;++r<t;){var i=e[r];if(_t(i[0],this,n))return _t(i[1],this,n)}})},zn.conforms=function(e){return function(e){var t=Os(e);return function(n){return lr(n,e,t)}}(sr(e,1))},zn.constant=Qs,zn.countBy=pa,zn.create=function(e,t){var n=Bn(e);return null==t?n:rr(n,t)},zn.curry=function e(t,r,i){var o=Ki(t,8,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},zn.curryRight=function e(t,r,i){var o=Ki(t,16,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},zn.debounce=Oa,zn.defaults=_s,zn.defaultsDeep=Ss,zn.defer=Fa,zn.delay=Pa,zn.difference=zo,zn.differenceBy=Bo,zn.differenceWith=Vo,zn.drop=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,(t=r||t===n?1:fs(t))<0?0:t,i):[]},zn.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,0,(t=i-(t=r||t===n?1:fs(t)))<0?0:t):[]},zn.dropRightWhile=function(e,t){return e&&e.length?hi(e,so(t,3),!0,!0):[]},zn.dropWhile=function(e,t){return e&&e.length?hi(e,so(t,3),!0):[]},zn.fill=function(e,t,r,i){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&bo(e,t,r)&&(r=0,i=o),function(e,t,r,i){var o=e.length;for((r=fs(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:fs(i))<0&&(i+=o),i=r>i?0:ps(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},zn.filter=function(e,t){return($a(e)?It:gr)(e,so(t,3))},zn.flatMap=function(e,t){return mr(Ca(e,t),1)},zn.flatMapDeep=function(e,t){return mr(Ca(e,t),c)},zn.flatMapDepth=function(e,t,r){return r=r===n?1:fs(r),mr(Ca(e,t),r)},zn.flatten=Wo,zn.flattenDeep=function(e){return null!=e&&e.length?mr(e,c):[]},zn.flattenDepth=function(e,t){return null!=e&&e.length?mr(e,t=t===n?1:fs(t)):[]},zn.flip=function(e){return Ki(e,512)},zn.flow=el,zn.flowRight=tl,zn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},zn.functions=function(e){return null==e?[]:xr(e,Os(e))},zn.functionsIn=function(e){return null==e?[]:xr(e,Fs(e))},zn.groupBy=ba,zn.initial=function(e){return null!=e&&e.length?ni(e,0,-1):[]},zn.intersection=Go,zn.intersectionBy=Yo,zn.intersectionWith=qo,zn.invert=Es,zn.invertBy=Is,zn.invokeMap=wa,zn.iteratee=rl,zn.keyBy=xa,zn.keys=Os,zn.keysIn=Fs,zn.map=Ca,zn.mapKeys=function(e,t){var n={};return t=so(t,3),br(e,function(e,r,i){ir(n,t(e,r,i),e)}),n},zn.mapValues=function(e,t){var n={};return t=so(t,3),br(e,function(e,r,i){ir(n,r,t(e,r,i))}),n},zn.matches=function(e){return zr(sr(e,1))},zn.matchesProperty=function(e,t){return Br(e,sr(t,1))},zn.memoize=Ma,zn.merge=Ps,zn.mergeWith=Ms,zn.method=il,zn.methodOf=ol,zn.mixin=al,zn.negate=Ra,zn.nthArg=function(e){return e=fs(e),Xr(function(t){return Ur(t,e)})},zn.omit=Rs,zn.omitBy=function(e,t){return js(e,Ra(so(t)))},zn.once=function(e){return Ea(2,e)},zn.orderBy=function(e,t,r,i){return null==e?[]:($a(t)||(t=null==t?[]:[t]),$a(r=i?n:r)||(r=null==r?[]:[r]),$r(e,t,r))},zn.over=ll,zn.overArgs=La,zn.overEvery=cl,zn.overSome=ul,zn.partial=ja,zn.partialRight=Da,zn.partition=_a,zn.pick=Ls,zn.pickBy=js,zn.property=dl,zn.propertyOf=function(e){return function(t){return null==e?n:Cr(e,t)}},zn.pull=Ko,zn.pullAll=Zo,zn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Hr(e,t,so(n,2)):e},zn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Hr(e,t,n,r):e},zn.pullAt=Jo,zn.range=hl,zn.rangeRight=fl,zn.rearg=Na,zn.reject=function(e,t){return($a(e)?It:gr)(e,Ra(so(t,3)))},zn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=so(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Gr(e,i),n},zn.rest=function(e,t){if("function"!=typeof e)throw new Ie(r);return Xr(e,t=t===n?t:fs(t))},zn.reverse=Qo,zn.sampleSize=function(e,t,r){return t=(r?bo(e,t,r):t===n)?1:fs(t),($a(e)?Zn:Zr)(e,t)},zn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},zn.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Jr(e,t,r,i)},zn.shuffle=function(e){return($a(e)?Jn:ti)(e)},zn.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&bo(e,t,r)?(t=0,r=i):(t=null==t?0:fs(t),r=r===n?i:fs(r)),ni(e,t,r)):[]},zn.sortBy=Sa,zn.sortedUniq=function(e){return e&&e.length?ai(e):[]},zn.sortedUniqBy=function(e,t){return e&&e.length?ai(e,so(t,2)):[]},zn.split=function(e,t,r){return r&&"number"!=typeof r&&bo(e,t,r)&&(t=r=n),(r=r===n?h:r>>>0)?(e=vs(e))&&("string"==typeof t||null!=t&&!is(t))&&!(t=li(t))&&rn(e)?wi(dn(e),0,r):e.split(t,r):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new Ie(r);return t=null==t?0:vn(fs(t),0),Xr(function(n){var r=n[t],i=wi(n,0,t);return r&&Pt(i,r),_t(e,this,i)})},zn.tail=function(e){var t=null==e?0:e.length;return t?ni(e,1,t):[]},zn.take=function(e,t,r){return e&&e.length?ni(e,0,(t=r||t===n?1:fs(t))<0?0:t):[]},zn.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?ni(e,(t=i-(t=r||t===n?1:fs(t)))<0?0:t,i):[]},zn.takeRightWhile=function(e,t){return e&&e.length?hi(e,so(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?hi(e,so(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new Ie(r);return Qa(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Oa(e,t,{leading:i,maxWait:t,trailing:o})},zn.thru=ha,zn.toArray=ds,zn.toPairs=Ds,zn.toPairsIn=Ns,zn.toPath=function(e){return $a(e)?Ft(e,jo):ss(e)?[e]:Ii(Lo(vs(e)))},zn.toPlainObject=ms,zn.transform=function(e,t,n){var r=$a(e),i=r||Ya(e)||ls(e);if(t=so(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Qa(e)&&Ka(o)?Bn(He(e)):{}}return(i?kt:br)(e,function(e,r,i){return t(n,e,r,i)}),n},zn.unary=function(e){return Aa(e,1)},zn.union=ea,zn.unionBy=ta,zn.unionWith=na,zn.uniq=function(e){return e&&e.length?ci(e):[]},zn.uniqBy=function(e,t){return e&&e.length?ci(e,so(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?ci(e,n,t):[]},zn.unset=function(e,t){return null==e||ui(e,t)},zn.unzip=ra,zn.unzipWith=ia,zn.update=function(e,t,n){return null==e?e:di(e,t,vi(n))},zn.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:di(e,t,vi(r),i)},zn.values=zs,zn.valuesIn=function(e){return null==e?[]:Kt(e,Fs(e))},zn.without=oa,zn.words=Ks,zn.wrap=function(e,t){return ja(vi(t),e)},zn.xor=aa,zn.xorBy=sa,zn.xorWith=la,zn.zip=ca,zn.zipObject=function(e,t){return gi(e||[],t||[],er)},zn.zipObjectDeep=function(e,t){return gi(e||[],t||[],Jr)},zn.zipWith=ua,zn.entries=Ds,zn.entriesIn=Ns,zn.extend=bs,zn.extendWith=ws,al(zn,zn),zn.add=vl,zn.attempt=Zs,zn.camelCase=Bs,zn.capitalize=Vs,zn.ceil=yl,zn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=gs(r))==r?r:0),t!==n&&(t=(t=gs(t))==t?t:0),ar(gs(e),t,r)},zn.clone=function(e){return sr(e,4)},zn.cloneDeep=function(e){return sr(e,5)},zn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:n)},zn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:n)},zn.conformsTo=function(e,t){return null==t||lr(e,t,Os(t))},zn.deburr=Us,zn.defaultTo=function(e,t){return null==e||e!=e?t:e},zn.divide=bl,zn.endsWith=function(e,t,r){e=vs(e),t=li(t);var i=e.length,o=r=r===n?i:ar(fs(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},zn.eq=za,zn.escape=function(e){return(e=vs(e))&&Y.test(e)?e.replace(H,tn):e},zn.escapeRegExp=function(e){return(e=vs(e))&&te.test(e)?e.replace(ee,"\\$&"):e},zn.every=function(e,t,r){var i=$a(e)?Et:fr;return r&&bo(e,t,r)&&(t=n),i(e,so(t,3))},zn.find=ga,zn.findIndex=Uo,zn.findKey=function(e,t){return Dt(e,so(t,3),br)},zn.findLast=ma,zn.findLastIndex=$o,zn.findLastKey=function(e,t){return Dt(e,so(t,3),wr)},zn.floor=wl,zn.forEach=va,zn.forEachRight=ya,zn.forIn=function(e,t){return null==e?e:vr(e,so(t,3),Fs)},zn.forInRight=function(e,t){return null==e?e:yr(e,so(t,3),Fs)},zn.forOwn=function(e,t){return e&&br(e,so(t,3))},zn.forOwnRight=function(e,t){return e&&wr(e,so(t,3))},zn.get=ks,zn.gt=Ba,zn.gte=Va,zn.has=function(e,t){return null!=e&&go(e,t,Ar)},zn.hasIn=As,zn.head=Ho,zn.identity=nl,zn.includes=function(e,t,n,r){e=Ha(e)?e:zs(e),n=n&&!r?fs(n):0;var i=e.length;return n<0&&(n=vn(i+n,0)),as(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&zt(e,t,n)>-1},zn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=vn(r+i,0)),zt(e,t,i)},zn.inRange=function(e,t,r){return t=hs(t),r===n?(r=t,t=0):r=hs(r),function(e,t,n){return e>=yn(t,n)&&e<vn(t,n)}(e=gs(e),t,r)},zn.invoke=Ts,zn.isArguments=Ua,zn.isArray=$a,zn.isArrayBuffer=Wa,zn.isArrayLike=Ha,zn.isArrayLikeObject=Ga,zn.isBoolean=function(e){return!0===e||!1===e||es(e)&&Sr(e)==m},zn.isBuffer=Ya,zn.isDate=qa,zn.isElement=function(e){return es(e)&&1===e.nodeType&&!rs(e)},zn.isEmpty=function(e){if(null==e)return!0;if(Ha(e)&&($a(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||ls(e)||Ua(e)))return!e.length;var t=po(e);if(t==x||t==A)return!e.size;if(_o(e))return!Lr(e).length;for(var n in e)if(Re.call(e,n))return!1;return!0},zn.isEqual=function(e,t){return Fr(e,t)},zn.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?Fr(e,t,n,r):!!i},zn.isError=Xa,zn.isFinite=function(e){return"number"==typeof e&&Wt(e)},zn.isFunction=Ka,zn.isInteger=Za,zn.isLength=Ja,zn.isMap=ts,zn.isMatch=function(e,t){return e===t||Pr(e,t,co(t))},zn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Pr(e,t,co(t),r)},zn.isNaN=function(e){return ns(e)&&e!=+e},zn.isNative=function(e){if(Co(e))throw new Ce("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(e)},zn.isNil=function(e){return null==e},zn.isNull=function(e){return null===e},zn.isNumber=ns,zn.isObject=Qa,zn.isObjectLike=es,zn.isPlainObject=rs,zn.isRegExp=is,zn.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=u},zn.isSet=os,zn.isString=as,zn.isSymbol=ss,zn.isTypedArray=ls,zn.isUndefined=function(e){return e===n},zn.isWeakMap=function(e){return es(e)&&po(e)==T},zn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Sr(e)},zn.join=function(e,t){return null==e?"":gn.call(e,t)},zn.kebabCase=$s,zn.last=Xo,zn.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=fs(r))<0?vn(i+o,0):yn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Nt(e,Vt,o,!0)},zn.lowerCase=Ws,zn.lowerFirst=Hs,zn.lt=cs,zn.lte=us,zn.max=function(e){return e&&e.length?pr(e,nl,kr):n},zn.maxBy=function(e,t){return e&&e.length?pr(e,so(t,2),kr):n},zn.mean=function(e){return Ut(e,nl)},zn.meanBy=function(e,t){return Ut(e,so(t,2))},zn.min=function(e){return e&&e.length?pr(e,nl,Dr):n},zn.minBy=function(e,t){return e&&e.length?pr(e,so(t,2),Dr):n},zn.stubArray=pl,zn.stubFalse=gl,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=xl,zn.nth=function(e,t){return e&&e.length?Ur(e,fs(t)):n},zn.noConflict=function(){return dt._===this&&(dt._=ze),this},zn.noop=sl,zn.now=ka,zn.pad=function(e,t,n){e=vs(e);var r=(t=fs(t))?un(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return $i(gt(i),n)+e+$i(ft(i),n)},zn.padEnd=function(e,t,n){e=vs(e);var r=(t=fs(t))?un(e):0;return t&&r<t?e+$i(t-r,n):e},zn.padStart=function(e,t,n){e=vs(e);var r=(t=fs(t))?un(e):0;return t&&r<t?$i(t-r,n)+e:e},zn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(vs(e).replace(ne,""),t||0)},zn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&bo(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=hs(e),t===n?(t=e,e=0):t=hs(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=xn();return yn(e+o*(t-e+st("1e-"+((o+"").length-1))),t)}return Yr(e,t)},zn.reduce=function(e,t,n){var r=$a(e)?Mt:Ht,i=arguments.length<3;return r(e,so(t,4),n,i,dr)},zn.reduceRight=function(e,t,n){var r=$a(e)?Rt:Ht,i=arguments.length<3;return r(e,so(t,4),n,i,hr)},zn.repeat=function(e,t,r){return t=(r?bo(e,t,r):t===n)?1:fs(t),qr(vs(e),t)},zn.replace=function(){var e=arguments,t=vs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(e,t,r){var i=-1,o=(t=yi(t,e)).length;for(o||(o=1,e=n);++i<o;){var a=null==e?n:e[jo(t[i])];a===n&&(i=o,a=r),e=Ka(a)?a.call(e):a}return e},zn.round=Cl,zn.runInContext=e,zn.sample=function(e){return($a(e)?Kn:Kr)(e)},zn.size=function(e){if(null==e)return 0;if(Ha(e))return as(e)?un(e):e.length;var t=po(e);return t==x||t==A?e.size:Lr(e).length},zn.snakeCase=Gs,zn.some=function(e,t,r){var i=$a(e)?Lt:ri;return r&&bo(e,t,r)&&(t=n),i(e,so(t,3))},zn.sortedIndex=function(e,t){return ii(e,t)},zn.sortedIndexBy=function(e,t,n){return oi(e,t,so(n,2))},zn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ii(e,t);if(r<n&&za(e[r],t))return r}return-1},zn.sortedLastIndex=function(e,t){return ii(e,t,!0)},zn.sortedLastIndexBy=function(e,t,n){return oi(e,t,so(n,2),!0)},zn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ii(e,t,!0)-1;if(za(e[n],t))return n}return-1},zn.startCase=Ys,zn.startsWith=function(e,t,n){return e=vs(e),n=null==n?0:ar(fs(n),0,e.length),t=li(t),e.slice(n,n+t.length)==t},zn.subtract=_l,zn.sum=function(e){return e&&e.length?Gt(e,nl):0},zn.sumBy=function(e,t){return e&&e.length?Gt(e,so(t,2)):0},zn.template=function(e,t,r){var i=zn.templateSettings;r&&bo(e,t,r)&&(t=n),e=vs(e),t=ws({},t,i,Zi);var o,a,s=ws({},t.imports,i.imports,Zi),l=Os(s),c=Kt(s,l),u=0,d=t.interpolate||ye,h="__p += '",f=Ae((t.escape||ye).source+"|"+d.source+"|"+(d===K?ue:ye).source+"|"+(t.evaluate||ye).source+"|$","g"),p="//# sourceURL="+(Re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(f,function(t,n,r,i,s,l){return r||(r=i),h+=e.slice(u,l).replace(be,nn),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t}),h+="';\n";var g=Re.call(t,"variable")&&t.variable;if(g){if(le.test(g))throw new Ce("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(V,""):h).replace(U,"$1").replace($,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=Zs(function(){return _e(l,p+"return "+h).apply(n,c)});if(m.source=h,Xa(m))throw m;return m},zn.times=function(e,t){if((e=fs(e))<1||e>u)return[];var n=h,r=yn(e,h);t=so(t),e-=h;for(var i=Yt(r,t);++n<e;)t(n);return i},zn.toFinite=hs,zn.toInteger=fs,zn.toLength=ps,zn.toLower=function(e){return vs(e).toLowerCase()},zn.toNumber=gs,zn.toSafeInteger=function(e){return e?ar(fs(e),-9007199254740991,u):0===e?e:0},zn.toString=vs,zn.toUpper=function(e){return vs(e).toUpperCase()},zn.trim=function(e,t,r){if((e=vs(e))&&(r||t===n))return qt(e);if(!e||!(t=li(t)))return e;var i=dn(e),o=dn(t);return wi(i,Jt(i,o),Qt(i,o)+1).join("")},zn.trimEnd=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.slice(0,hn(e)+1);if(!e||!(t=li(t)))return e;var i=dn(e);return wi(i,0,Qt(i,dn(t))+1).join("")},zn.trimStart=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.replace(ne,"");if(!e||!(t=li(t)))return e;var i=dn(e);return wi(i,Jt(i,dn(t))).join("")},zn.truncate=function(e,t){var r=30,i="...";if(Qa(t)){var o="separator"in t?t.separator:o;r="length"in t?fs(t.length):r,i="omission"in t?li(t.omission):i}var a=(e=vs(e)).length;if(rn(e)){var s=dn(e);a=s.length}if(r>=a)return e;var l=r-un(i);if(l<1)return i;var c=s?wi(s,0,l).join(""):e.slice(0,l);if(o===n)return c+i;if(s&&(l+=c.length-l),is(o)){if(e.slice(l).search(o)){var u,d=c;for(o.global||(o=Ae(o.source,vs(de.exec(o))+"g")),o.lastIndex=0;u=o.exec(d);)var h=u.index;c=c.slice(0,h===n?l:h)}}else if(e.indexOf(li(o),l)!=l){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+i},zn.unescape=function(e){return(e=vs(e))&&G.test(e)?e.replace(W,fn):e},zn.uniqueId=function(e){var t=++Le;return vs(e)+t},zn.upperCase=qs,zn.upperFirst=Xs,zn.each=va,zn.eachRight=ya,zn.first=Ho,al(zn,(ml={},br(zn,function(e,t){Re.call(zn.prototype,t)||(ml[t]=e)}),ml),{chain:!1}),zn.VERSION="4.17.21",kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){zn[e].placeholder=zn}),kt(["drop","take"],function(e,t){$n.prototype[e]=function(r){r=r===n?1:vn(fs(r),0);var i=this.__filtered__&&!t?new $n(this):this.clone();return i.__filtered__?i.__takeCount__=yn(r,i.__takeCount__):i.__views__.push({size:yn(r,h),type:e+(i.__dir__<0?"Right":"")}),i},$n.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),kt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;$n.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),kt(["head","last"],function(e,t){var n="take"+(t?"Right":"");$n.prototype[e]=function(){return this[n](1).value()[0]}}),kt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");$n.prototype[e]=function(){return this.__filtered__?new $n(this):this[n](1)}}),$n.prototype.compact=function(){return this.filter(nl)},$n.prototype.find=function(e){return this.filter(e).head()},$n.prototype.findLast=function(e){return this.reverse().find(e)},$n.prototype.invokeMap=Xr(function(e,t){return"function"==typeof e?new $n(this):this.map(function(n){return Tr(n,e,t)})}),$n.prototype.reject=function(e){return this.filter(Ra(so(e)))},$n.prototype.slice=function(e,t){e=fs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new $n(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=fs(t))<0?r.dropRight(-t):r.take(t-e)),r)},$n.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$n.prototype.toArray=function(){return this.take(h)},br($n.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=zn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(zn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof $n,c=s[0],u=l||$a(t),d=function(e){var t=o.apply(zn,Pt([e],s));return i&&h?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,f=!!this.__actions__.length,p=a&&!h,g=l&&!f;if(!a&&u){t=g?t:new $n(this);var m=e.apply(t,s);return m.__actions__.push({func:ha,args:[d],thisArg:n}),new Un(m,h)}return p&&g?e.apply(this,s):(m=this.thru(d),p?i?m.value()[0]:m.value():m)})}),kt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Te[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply($a(i)?i:[],e)}return this[n](function(n){return t.apply($a(n)?n:[],e)})}}),br($n.prototype,function(e,t){var n=zn[t];if(n){var r=n.name+"";Re.call(On,r)||(On[r]=[]),On[r].push({name:t,func:n})}}),On[zi(n,2).name]=[{name:"wrapper",func:n}],$n.prototype.clone=function(){var e=new $n(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},$n.prototype.reverse=function(){if(this.__filtered__){var e=new $n(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$n.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=$a(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=yn(t,e+a);break;case"takeRight":e=vn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,d=u.length,h=0,f=yn(l,this.__takeCount__);if(!n||!r&&i==l&&f==l)return fi(e,this.__actions__);var p=[];e:for(;l--&&h<f;){for(var g=-1,m=e[c+=t];++g<d;){var v=u[g],y=v.iteratee,b=v.type,w=y(m);if(2==b)m=w;else if(!w){if(1==b)continue e;break e}}p[h++]=m}return p},zn.prototype.at=fa,zn.prototype.chain=function(){return da(this)},zn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===n&&(this.__values__=ds(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var t,r=this;r instanceof Vn;){var i=No(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $n){var t=e;return this.__actions__.length&&(t=new $n(this)),(t=t.reverse()).__actions__.push({func:ha,args:[Qo],thisArg:n}),new Un(t,this.__chain__)}return this.thru(Qo)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Je&&(zn.prototype[Je]=function(){return this}),zn}();ft?((ft.exports=pn)._=pn,ht._=pn):dt._=pn}).call(si)}(ai,ai.exports)),ai.exports);const ci=s({state:{},actions:{},options:{}}),ui=()=>l(ci),di=({children:t,options:n})=>{var r;const[s,l]=o([]),[u,d]=o([]),[h,f]=o(null),[p,g]=o(n.searchQuery||""),[m,v]=o(n.sortBySize||"name"),{config:y}=n,[b,w]=o("date"),[x,C]=o("desc"),[_,S]=o([{id:"folders",name:"Папки"}]),[k,A]=o(new Set),[E,I]=o("");i.useEffect(()=>{A(new Set)},[]);const O=i.useRef(null);i.useEffect(()=>{if(n.onChangeSelection&&O.current!==k){if(null!==O.current){const e=(Array.isArray(u)?u:[]).filter(e=>k.has(e.id));n.onChangeSelection(e)}O.current=k}},[u,k,n.onChangeSelection,n]);const[F,P]=o(!1),[M,R]=o(qt);a(()=>{(null==y?void 0:y.activeLibraryItem)&&R&&R(null==y?void 0:y.activeLibraryItem)},[null==y?void 0:y.activeLibraryItem,R]);const[L,j]=o({current:1,pageSize:12,total:0}),[D]=T.useForm(),[N]=T.useForm(),[z]=T.useForm(),[B]=T.useForm(),[V]=T.useForm(),[U]=T.useForm(),[$,W]=o(!1),[H,G]=o(!1),[Y,q]=o(!1),[X,K]=o(!1),[Z,J]=o(!1),[Q,ee]=o(!1),[te,ne]=o(!1),[re,ie]=o(null),[oe,ae]=o(null),[se,le]=o(null),ce=c(e=>{j(t=>Object.assign(Object.assign({},t),e))},[j]),ue=c(e=>{A(null!=e?e:new Set)},[A]);a(()=>{ue()},[M,ue]);const de={folders:s,files:u,selectedFolder:h,searchTerm:p,sortField:m,sortBy:b,sortOrder:x,pathHistory:_,selectedFiles:k,currentMenuFile:E,loading:F,pagination:L,isModalVisible:$,isUrlModalVisible:H,isRenameModalVisible:Y,isMoveModalVisible:X,isRenameFolderModalVisible:Z,isCopyModalVisible:Q,isDeleteConfirmVisible:te,form:D,urlForm:N,renameForm:z,moveForm:B,renameFolderForm:V,copyForm:U,fileToRename:re,folderToRename:oe,activeLibraryItem:M,multiSelect:null===(r=null==y?void 0:y.multiSelect)||void 0===r||r,undoDeletion:se},he={setFolders:l,setFiles:d,setSelectedFolder:f,setSearchTerm:g,setSortField:v,setSortBy:w,setSortOrder:C,setPathHistory:S,setSelectedFiles:ue,setLoading:P,setPagination:ce,setIsModalVisible:W,setIsUrlModalVisible:G,setIsRenameModalVisible:q,setIsMoveModalVisible:K,setIsRenameFolderModalVisible:J,setIsCopyModalVisible:ee,setIsDeleteConfirmVisible:ne,setFileToRename:ie,setFolderToRename:ae,setUndoDeletion:le,updatePathHistoryOnFolderRename:(e,t)=>{S(n=>n.map(n=>n.id===e?Object.assign(Object.assign({},n),{name:t}):n))},setActiveLibraryItem:R,setCurrentMenuFile:I},fe={state:de,actions:he,options:n};return e(ci.Provider,{value:fe,children:t})},hi=e=>null===e.parentId||"null"===e.parentId||!e.parentId,fi=async(e,t,n)=>{var r;if(console.log("📁 addSubfoldersToFiles: params:",JSON.stringify(t,null,2)),"file"===(null==t?void 0:t.itemType))return e;let i=[];if(!n)return console.warn("🔍 getFolders не доступен!"),e;{const e=await n({parentId:t.folderId});i=Array.isArray(e)?e:[],console.log("📁 Получено папок от dataProvider:",i.length,"тип данных:",typeof e,"данные:",e)}let o=((e,t)=>{const n=Array.isArray(e)?e:[];return(r=t.folderId)&&"root"!==r&&"folders"!==r&&"null"!==r&&null!==r?n.filter(e=>e.parentId===t.folderId):n.filter(hi);var r})(i,t);if(null===(r=null==t?void 0:t.search)||void 0===r?void 0:r.trim()){const e=t.search.trim().toLowerCase();o=o.filter(t=>{var n;return null===(n=t.name)||void 0===n?void 0:n.toLowerCase().includes(e)})}if(console.log("📁 Найдено подпапок для добавления:",o.length),0===o.length)return e;const a=o.map(e=>({id:e.id,name:e.name,size:void 0,date:"-",isFolder:!0,folderId:e.parentId||"",type:"",selected:!1,extension:""}));if("folder"===(null==t?void 0:t.itemType))return a;const s=[...a,...e];return console.log("📁 РЕЗУЛЬТАТ: папок:",a.length,"файлов:",e.length,"всего:",s.length),s},pi=e=>{var t,n,r,i;const{state:o,actions:s,options:l}=ui(),{searchTerm:d,sortBy:h,sortOrder:f,selectedFolder:p,pagination:g}=o,{setSearchTerm:m,setSortBy:v,setSortOrder:y,setPagination:b}=s,w=e||s.fetchFiles,x=u(null),C=u(li.debounce(e=>{const t=JSON.stringify(e);x.current!==t?(x.current=t,console.log("✅ Выполняется запрос:",e),null==w||w(e)):console.log("🚫 Дублированный запрос пропущен:",e)},150)).current,_=c(()=>{var e;const t=null===(e=null==l?void 0:l.config)||void 0===e?void 0:e.disablePagination;return{folderId:p||"",search:(null==d?void 0:d.trim())||void 0,page:t?void 0:g.current,limit:t?void 0:g.pageSize,sortBy:h,sortOrder:f,itemType:"all"}},[p,d,g.current,g.pageSize,h,f,null===(t=null==l?void 0:l.config)||void 0===t?void 0:t.disablePagination]),S=c(e=>{var t,n;if(console.log("🔎 useSortAndFilter: handleSearch вызван с:",e),m&&(console.log("🔎 useSortAndFilter: Обновляем searchTerm в стейте"),m(e)),b&&(console.log("🔎 useSortAndFilter: Сбрасываем пагинацию"),b({current:1,pageSize:g.pageSize,total:0})),console.log("🔎 useSortAndFilter: Проверяем fetchFiles:",!!w),w){console.log("🔎 useSortAndFilter: Вызываем fetchFiles с параметрами поиска");const r={folderId:p||"",search:(null==e?void 0:e.trim())||void 0,page:(null===(t=null==l?void 0:l.config)||void 0===t?void 0:t.disablePagination)?void 0:1,limit:(null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination)?void 0:g.pageSize,sortBy:h,sortOrder:f,itemType:"all"};console.log("🔎 useSortAndFilter: Параметры запроса:",r),w(r),console.log("🔎 useSortAndFilter: fetchFiles вызван!")}else console.error("🔎 useSortAndFilter: fetchFiles НЕ ОПРЕДЕЛЕНА!")},[m,b,g.pageSize,w,p,h,f,null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination]),k=c((e,t)=>{var n,r;null==v||v(e),null==y||y(t),w&&C({folderId:p||"",search:(null==d?void 0:d.trim())||void 0,page:(null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination)?void 0:g.current,limit:(null===(r=null==l?void 0:l.config)||void 0===r?void 0:r.disablePagination)?void 0:g.pageSize,sortBy:e,sortOrder:t,itemType:"all"})},[v,y,C,p,d,g.current,g.pageSize,null===(r=null==l?void 0:l.config)||void 0===r?void 0:r.disablePagination]),A=c((e,t)=>{var n;(null===(n=null==l?void 0:l.config)||void 0===n?void 0:n.disablePagination)||(b&&b({current:e,pageSize:t||g.pageSize,total:g.total}),w&&C({folderId:p||"",search:(null==d?void 0:d.trim())||void 0,page:e,limit:t||g.pageSize,sortBy:h,sortOrder:f,itemType:"all"}))},[b,g.pageSize,g.total,C,p,d,h,f,null===(i=null==l?void 0:l.config)||void 0===i?void 0:i.disablePagination]);return a(()=>{if(w){console.log("🔄 useSortAndFilter: изменение selectedFolder, загрузка файлов для папки:",p);const e=_();C(Object.assign(Object.assign({},e),{page:1}))}},[p]),a(()=>{w&&(console.log("🔄 useSortAndFilter: начальная загрузка файлов, selectedFolder:",p),C(_()))},[]),a(()=>()=>{var e;null===(e=C.cancel)||void 0===e||e.call(C)},[C]),{state:{searchTerm:d||"",sortBy:h||"name",sortOrder:f||"asc"},actions:{setSearchTerm:m||(()=>{}),setSortBy:v||(()=>{}),setSortOrder:y||(()=>{}),handleSearch:S,handleSort:k,handlePaginationChange:A,getCurrentQueryParams:_}}},gi=()=>{var e;const{notification:t}=I.useApp(),n=ui(),{options:r}=n,i=c(async e=>{let t;if(r.handleNotify){if(t=await r.handleNotify(e),!1===t)return!1;"object"==typeof t&&t&&(e=t)}if("error"===e.type&&r.handleError){if(t=await r.handleError(e),!1===t)return!1;"object"==typeof t&&t&&(e=t)}return("success"!==e.type||!r.handleSuccess||(t=await r.handleSuccess(e),!t))&&t},[r]),o=c(async function(e,n=!1){var o;const a=await i(e);if(!1===a||n||!1===(null===(o=r.config)||void 0===o?void 0:o.showNotifications))return;"object"==typeof a&&(e=a);const s=t[e.type];"function"==typeof s?s(e):console.warn(`Unknown notification type: ${e.type}`,e)},[t,i,null===(e=r.config)||void 0===e?void 0:e.showNotifications]);return d(()=>({error(e){o(Object.assign(Object.assign({},e),{type:"error"}))},success(e){o(Object.assign(Object.assign({},e),{type:"success"}))},warning(e){o(Object.assign(Object.assign({},e),{type:"warning"}))},notify:o}),[o])},mi={FileNotFound:"File not found or no longer available.",FileAlreadyExists:"File with this name already exists.",FileInvalidName:"File name is not valid.",FileAccessDenied:"You don't have permission to access this file.",FileReadError:"Failed to read the file.",FileWriteError:"Failed to write the file.",FileTooLarge:"File is too large to upload.",FileTypeNotAllowed:"This file type is not allowed.",FileCorrupted:"The file appears to be corrupted.",FileChecksumMismatch:"File integrity check failed.",FolderNotFound:"Folder not found or no longer available.",FolderAlreadyExists:"Folder with this name already exists.",FolderInvalidName:"Folder name is not valid.",FolderAccessDenied:"You don't have permission to access this folder.",FolderReadError:"Failed to read the folder contents.",FolderWriteError:"Failed to write to the folder.",FolderQuotaExceeded:"Folder storage quota exceeded.",FolderNotEmpty:"Folder is not empty.",FolderBackendError:"Server error while processing the folder.",FolderTimeout:"Folder operation took too long.",RenameNotAllowed:"Renaming is not allowed for this item.",MoveNotAllowed:"Moving is not allowed for this item.",CopyNotAllowed:"Copying is not allowed for this item.",DeleteNotAllowed:"Deleting is not allowed for this item.",MoveIntoSelf:"Cannot move an item into itself.",MoveIntoDescendant:"Cannot move an item into its descendant folder.",UnsupportedOperation:"This operation is not supported.",ConfigError:"Configuration error occurred.",FileUploadQuotaExceeded:"You have exceeded the upload quota.",FileUploadNetworkError:"Network error while uploading the file.",FileUploadTimeout:"File upload took too long.",FileUploadBackendError:"Server error while uploading the file.",UploadUrlInvalid:"The specified URL is not valid.",UploadUrlNotReachable:"The specified URL is not reachable.",UploadUrlContentTypeNotAllowed:"Content type at the URL is not allowed.",UploadUrlDownloadFailed:"Failed to download file from the URL.",FileDownloadNetworkError:"Network error while downloading the file.",FileDownloadTimeout:"File download took too long.",FileDownloadBackendError:"Server error while downloading the file.",BatchPartialFailure:"Some items could not be processed.",BatchAllFailed:"Failed to process all items in the batch.",BatchConflict:"Some items in the batch are in a conflicting state.",BatchValidationFailed:"Some items in the batch did not pass validation.",ValidationError:"Some of the provided data is invalid.",PayloadTooLarge:"Request payload is too large.",UnsupportedMediaType:"This media type is not supported.",NetworkError:"Network error. Please check your connection and try again.",BackendError:"Server error. Please try again later.",Timeout:"The operation took too long. Please try again.",AuthenticationFailed:"Authentication failed. Please sign in again.",AuthorizationFailed:"You are not allowed to perform this action.",RateLimitExceeded:"Too many requests. Please try again a bit later.",ServiceUnavailable:"Service is temporarily unavailable. Please try again later.",AIResponseInvalid:"AI service returned an invalid response.",AIImageGenerationFailed:"Failed to generate image using AI.",AIImageGenerationLimitExceeded:"You have reached the AI image generation limit.",IntegrationError:"Error in external integration.",ThirdPartyError:"Error in a third-party service.",UnknownError:"An unknown error occurred."},vi=(e,t)=>{if(!e)return;const n=mi[e];return n?t(n):void 0},yi=e=>{if(!e||"object"!=typeof e)return;return e.code?e:void 0},bi=()=>{var e,t;const{state:n,actions:i,options:o}=ui(),{t:a}=Nn(),s=gi(),{folders:l,selectedFolder:u,form:d,loading:h,isModalVisible:f}=n,{setFolders:p,setLoading:g,setIsModalVisible:m}=i,{dataProviders:v,config:y}=o,b=c(e=>(Array.isArray(e)?e:[]).filter(e=>e&&e.id&&e.name).map(e=>({id:e.id,name:e.name,parentId:e.folderId?e.folderId:null})),[]),w=c(async()=>{console.log("Запрос папок (через getFiles itemType=folder)..."),null==g||g(!0);try{let e=[];const t="lazy"===(null==y?void 0:y.folderTreeLoading);if(null==v?void 0:v.getFolders){const n=!t;e=await v.getFolders({parentId:null,deep:n})}else{if(!(null==v?void 0:v.getFiles))return void console.error("DataProvider для папок не определен");{const n=async e=>{const{files:r}=await v.getFiles({itemType:"folder",folderId:e||void 0}),i=b(r);if(t)return i;const o=await Promise.all(i.map(e=>n(e.id)));return[...i,...o.flat()]},r=await n(null),i=new Map(r.map(e=>[e.id,e]));e=Array.from(i.values())}}console.log("Полученные папки:",e);const n=Array.isArray(e)?e:[];null==p||p(n);const r=n.filter(e=>e.id===e.parentId);r.length>0&&console.warn("Обнаружены папки с циклическими зависимостями:",r)}catch(e){console.error("Ошибка при загрузке папок:",e);const t=yi(e),n=vi(null==t?void 0:t.code,a);s.error({id:"FOLDERS_FETCH_FAILED",message:null!=n?n:a("Failed to load folders"),placement:"bottomRight",innerException:e,data:{reason:e instanceof Error?e.message:String(e)}})}finally{null==g||g(!1)}},[null==v?void 0:v.getFiles,null==v?void 0:v.getFolders,p,g,null==y?void 0:y.folderTreeLoading,b,s,a]),x=c(async e=>{try{if(null==v?void 0:v.getFolders){const t=await v.getFolders({parentId:e,deep:!1}),n=Array.isArray(l)?l:[],r=new Map(n.map(e=>[e.id,e]));return t.forEach(e=>r.set(e.id,e)),null==p||p(Array.from(r.values())),t}if(null==v?void 0:v.getFiles){const{files:t}=await v.getFiles({itemType:"folder",folderId:e||void 0}),n=b(t),r=Array.isArray(l)?l:[],i=new Map(r.map(e=>[e.id,e]));return n.forEach(e=>i.set(e.id,e)),null==p||p(Array.from(i.values())),n}return[]}catch(e){return console.error("Ошибка при загрузке дочерних папок:",e),[]}},[null==v?void 0:v.getFiles,null==v?void 0:v.getFolders,l,p,b]),C=c(()=>{var e;const t=null!==(e=null==y?void 0:y.defaultFolderName)&&void 0!==e?e:a("Новая папка");d.setFieldsValue({folderName:t}),null==m||m(!0)},[d,m,a,null==y?void 0:y.defaultFolderName]),_=c(e=>{const t=[...(Array.isArray(l)?l:[]).filter(t=>t.id!==e.id),e];if(null==p||p(t),console.log("📂 Обновлен список папок, новая папка:",e),i.setSelectedFolder&&(i.setSelectedFolder(e.id),console.log("🎯 Выбрана созданная папка как активная:",e.id)),i.setPathHistory){const t=[...n.pathHistory||[],{id:e.id,name:e.name}];i.setPathHistory(t),console.log("🧭 Обновлен путь навигации:",t)}},[l,p,i,n.pathHistory]),S=c(async e=>{try{if(null==v?void 0:v.getFolders){const t=await v.getFolders(),n=(Array.isArray(t)?t:[]).some(t=>t.id===e);return console.log(n?"✅ Папка найдена:":"❌ Папка не найдена:",e),n}if(null==v?void 0:v.getFiles){const t=new Set,n=async r=>{const{files:i}=await v.getFiles({itemType:"folder",folderId:r||void 0}),o=b(i);for(const r of o){if(t.has(r.id))continue;if(t.add(r.id),r.id===e)return!0;if(await n(r.id))return!0}return!1},r=await n(null);return console.log(r?"✅ Папка найдена:":"❌ Папка не найдена:",e),r}}catch(e){console.warn("⚠️ Ошибка проверки папки:",e)}return!1},[null==v?void 0:v.getFolders,null==v?void 0:v.getFiles,b]),k=c(async e=>{var t;let n;console.log("handleModalOk currentForm",e);let r=null;try{const i=await(e?e.validateFields():d.validateFields());if(console.log("values",i),n=i.folderName.trim(),console.log("folderName",n),!n){const e=i.targetFolder||(u&&"folders"!==u?u:null);return void s.warning({id:"FOLDER_OPERATION_VALIDATION_FAILED",message:a("Folder name cannot be empty"),placement:"bottomRight",data:{folderName:n,folderId:null!=e?e:null,reason:"emptyName"}})}let o;if(r=i.targetFolder||(u&&"folders"!==u?u:null),console.log("🆕 Создание новой папки:",{folderName:n,parentId:r,selectedFolder:u}),!(null==v?void 0:v.createFolder))return void s.error({id:"FOLDER_CREATE_PROVIDER_NOT_CONFIGURED",message:a("Folder creation provider is not configured"),placement:"bottomRight",data:{folderName:n,folderId:null!=r?r:null}});o=await v.createFolder({name:n,parentId:r}),(e=>{if(!e||!e.id)throw new Error("Некорректный ответ от сервера: отсутствует ID папки");if(e.id===e.parentId&&e.parentId)throw console.error("Обнаружена циклическая зависимость: папка является родителем сама для себя"),new Error("Ошибка: папка не может быть родителем самой себя")})(o),_(o),s.success({id:"FOLDER_CREATE_SUCCESS",message:a("Folder created"),placement:"bottomRight",data:{itemIds:[o.id],folderId:null!==(t=o.parentId)&&void 0!==t?t:null,folderName:o.name}}),await w(),await new Promise(e=>setTimeout(e,200));if(await S(o.id)||console.warn("⚠️ Не удалось подтвердить создание папки на сервере, но продолжаем..."),e)return o;null==m||m(!1)}catch(e){console.error("❌ Ошибка при создании папки:",e);const t=yi(e),i=vi(null==t?void 0:t.code,a);s.error({id:"FOLDER_CREATE_FAILED",message:null!=i?i:a("Failed to create folder"),placement:"bottomRight",innerException:e,data:{folderName:n,folderId:null!=r?r:null,reason:e instanceof Error?e.message:String(e)}})}},[d,u,v,_,w,S,m,s,a]),A=c(()=>{null==m||m(!1)},[m]),E=c((e,t=new Set)=>{const n=Array.isArray(l)?l:[];return e.map(e=>{if(t.has(e.id))return console.warn(`Обнаружен цикл в структуре папок с id=${e.id}. Пропускаем обработку дочерних элементов.`),{key:e.id,label:e.name+" (ошибка)",icon:r.createElement(ie,{style:{color:"red"}})};const i=new Set(t);i.add(e.id);const o=n.filter(t=>t.parentId===e.id&&t.id!==e.id);return{key:e.id,label:e.name,children:o.length>0?E(o,i):void 0}})},[l]),I=c(()=>{const e=Array.isArray(l)?l:[],t={key:"folders",label:a("Folders"),children:[]},n=e.filter(e=>null===e.parentId||!e.parentId);return t.children=E(n),[t]},[l,a,E]),T=c(async(e,t)=>{var n,r,c,u;console.log("renameFolder");try{const d=t.trim(),h=null==l?void 0:l.find(t=>t.id===e);if(!d)return void s.warning({id:"FOLDER_OPERATION_VALIDATION_FAILED",message:a("Folder name cannot be empty"),placement:"bottomRight",data:{folderId:e,folderName:t,reason:"emptyName"}});if(!(!1!==(null===(n=null==y?void 0:y.features)||void 0===n?void 0:n.enableRenameFolder)))return void s.error({id:"FOLDER_RENAME_DISABLED_BY_CONFIG",message:a("Folder rename is disabled by config"),placement:"bottomRight",data:{itemId:e,itemName:null!==(r=null==h?void 0:h.name)&&void 0!==r?r:d}});if(!(null===(c=o.dataProviders)||void 0===c?void 0:c.renameFolder))return void s.error({id:"FOLDER_RENAME_FAILED",message:a("Folder rename provider is not configured"),placement:"bottomRight",data:{itemId:e,itemName:d,reason:"providerNotConfigured"}});const f=await o.dataProviders.renameFolder(e,d);if(!(null==f?void 0:f.id))return void s.error({id:"FOLDER_RENAME_FAILED",message:a("Unexpected response when renaming folder"),placement:"bottomRight",data:{itemId:e,itemName:d,reason:"invalidResponse"}});await w(),e!==f.id&&i.setSelectedFolder&&i.setSelectedFolder(f.id),s.success({id:"FOLDER_RENAME_SUCCESS",message:a("Folder renamed"),placement:"bottomRight",data:{itemId:f.id,itemName:f.name,folderId:null!==(u=f.parentId)&&void 0!==u?u:null}})}catch(n){console.error("Ошибка при переименовании папки:",n),s.error({id:"FOLDER_RENAME_FAILED",message:a("Failed to rename folder"),placement:"bottomRight",innerException:n,data:{itemId:e,itemName:t,reason:n instanceof Error?n.message:String(n)}})}},[w,l,null===(e=o.dataProviders)||void 0===e?void 0:e.renameFolder,null===(t=null==y?void 0:y.features)||void 0===t?void 0:t.enableRenameFolder,i.setSelectedFolder,s,a]);return{state:{folders:l,isCreatingFolder:f,loading:h},actions:{fetchFolders:w,fetchChildFolders:x,handleCreateFolder:C,handleModalOk:k,handleModalCancel:A,generateMenuItems:I,renameFolder:T}}},wi=()=>{var e,t;const{state:n,actions:r,options:o}=ui(),a=pi(),{sortBy:s,sortOrder:l}=a.state,{actions:{fetchFolders:u}}=bi(),{t:d}=Nn(),h=gi(),{selectedFolder:f,urlForm:p,pagination:g,files:m}=n,v=i.useRef(null);v.current=g;const{setFiles:y,setLoading:b,setIsUrlModalVisible:w,setSelectedFiles:x,setActiveLibraryItem:C,setPagination:_}=r,{dataProviders:S}=o,k=c(async e=>{var t,n,r;if(!(null==S?void 0:S.getFiles))return[];const i=null===(t=null==o?void 0:o.config)||void 0===t?void 0:t.disablePagination,{files:a,pagination:s}=await S.getFiles({folderId:"folders"!==(null==e?void 0:e.folderId)?null==e?void 0:e.folderId:void 0,search:(null===(n=null==e?void 0:e.search)||void 0===n?void 0:n.trim())||void 0,sortBy:null==e?void 0:e.sortBy,sortOrder:null==e?void 0:e.sortOrder,page:i||null==e?void 0:e.page,limit:i||null==e?void 0:e.limit,itemType:(null==e?void 0:e.itemType)||"all"});return console.warn("🔍 fetchFilesFromDataProvider результат:",a,"с параметрами сортировки:",{sortBy:null==e?void 0:e.sortBy,sortOrder:null==e?void 0:e.sortOrder}),_&&((null===(r=null==o?void 0:o.config)||void 0===r?void 0:r.disablePagination)?_({current:1,pageSize:a.length||1,total:a.length||0}):s&&_({current:s.page,pageSize:s.limit,total:s.total})),a},[S,null===(e=null==o?void 0:o.config)||void 0===e?void 0:e.disablePagination,_]),A=c(async e=>{try{null==b||b(!0),console.warn("fetchFiles вызван с параметрами:",e);let t=[];if(!(null==S?void 0:S.getFiles))return void console.error("DataProvider для получения файлов не определен");t=await k(e),console.warn("Получены файлы:",t);const n=null!=e?e:{folderId:f||"",itemType:"all"};"file"!==n.itemType&&(t=await fi(t,n,null==S?void 0:S.getFolders)),"Trash"!==(f||"")&&(t=t.filter(e=>!(e.isFolder&&"Trash"===e.id))),null==y||y(t),null==x||x(new Set)}catch(t){console.error("Ошибка при загрузке файлов:",t);const n=yi(t),r=vi(null==n?void 0:n.code,d);h.error({id:"FILES_FETCH_FAILED",message:null!=r?r:"Не удалось загрузить файлы",placement:"bottomRight",innerException:t,data:{params:e}})}finally{null==b||b(!1)}},[S,y,b,x,k,f,h]),E=c(async e=>{var t,n;const r=v.current;try{const i=f||null;if(null==S?void 0:S.deleteItems){const r=await S.deleteItems([e]);if(!r.success&&!(null===(t=r.detailed)||void 0===t?void 0:t.every(e=>e.success))){const t=yi(r.error),o=vi(null==t?void 0:t.code,d);throw h.error({id:"FILES_DELETE_ERROR",message:null!=o?o:d("Files deleted"),innerException:r.error,placement:"bottomRight",data:{failCount:1,totalCount:1,itemIds:[e],folderId:i,errors:null===(n=r.detailed)||void 0===n?void 0:n.filter(e=>!e.success).map(e=>({itemId:e.requestId,reason:e.error?String(e.error):void 0,code:e.code}))}}),new Error("Не удалось удалить файлы")}h.success({id:"FILES_DELETE_SUCCESS",message:d("Files deleted"),placement:"bottomRight",data:{successCount:1,totalCount:1,itemIds:[e],folderId:i}})}else{if(!(null==S?void 0:S.deleteFile))return void h.error({id:"FILES_DELETE_ERROR",message:"DataProvider для удаления файлов не настроен",placement:"bottomRight",data:{failCount:1,totalCount:1,itemIds:[e],folderId:i}});if(!await S.deleteFile(e))throw new Error("Не удалось удалить файл");h.success({id:"FILES_DELETE_SUCCESS",message:d("File deleted"),placement:"bottomRight",data:{successCount:1,totalCount:1,itemIds:[e],folderId:i}})}await A({folderId:f||"",page:m.length>=1?r.current:r.current-1,limit:r.pageSize,sortBy:s,sortOrder:l})}catch(t){console.error("Ошибка при удалении файла:",t),h.error({id:"FILES_DELETE_ERROR",message:d("Error when deleting a file"),placement:"bottomRight",innerException:t,data:{failCount:1,totalCount:1,itemIds:[e],folderId:f||null,errors:[{itemId:e,reason:t instanceof Error?t.message:String(t)}]}})}},[S,A,f,d,h,m,s,l]),I=c(async e=>{try{const t=v.current;if(!(null==S?void 0:S.deleteFolder))return void h.error({id:"FOLDER_DELETE_ERROR",message:"DataProvider для удаления папок не настроен",placement:"bottomRight",data:{totalCount:1,failCount:1,itemIds:[e],folderId:e}});if(!await S.deleteFolder(e))throw new Error("Не удалось удалить папку");h.success({id:"FOLDER_DELETE_SUCCESS",message:d("Folder deleted"),placement:"bottomRight",data:{successCount:1,totalCount:1,itemIds:[e],folderId:e}});f===e?await A({page:t.current,limit:t.pageSize,sortBy:s,sortOrder:l}):await A({folderId:f||"",sortBy:s,sortOrder:l,page:t.current,limit:t.pageSize})}catch(t){console.error("Ошибка при удалении папки:",t),h.error({id:"FOLDER_DELETE_ERROR",message:d("Error when deleting a folder"),innerException:t,placement:"bottomRight",data:{totalCount:1,failCount:1,itemIds:[e],folderId:e,errors:[{itemId:e,reason:t instanceof Error?t.message:String(t)}]}})}},[S,f,h,d,A,s,l]),T=c(async e=>{var t,n;try{if(null==S?void 0:S.getFileData){const t=await S.getFileData(e);if(t)return t;throw new Error("Не удалось загрузить файл")}{const t=await fetch(`/api/files/${e.id}/content`);if(!t.ok)throw new Error("Ошибка загрузки файла");return await t.blob()}}catch(r){console.error("Ошибка при загрузке файла:",r),h.error({id:"FILE_DOWNLOAD_FAILED",message:d("Failed to download file"),placement:"bottomRight",description:e.name,innerException:r,data:{itemId:e.id,itemName:e.name,folderId:null!==(t=e.folderId)&&void 0!==t?t:null,thumbnail:null!==(n=e.thumbnail)&&void 0!==n?n:null}})}},[S,h,d]),O=c(async(e,t)=>{if(!(null==S?void 0:S.uploadFile))return;const n=e.name.split(".").pop()||"",r=await S.uploadFile({name:e.name,size:e.size,type:e.type,folderId:null!=t?t:f||"",data:e,extension:n});return C&&C(qt),r},[S,f,C]),F=c(async(e,t)=>{var n;if(!(null==S?void 0:S.getFolders)||!(null==S?void 0:S.createFolder))return e||"";try{const r=await S.getFolders(),i=Array.isArray(r)?r:[],o=(e,t)=>i.find(n=>{var r;return(null!==(r=n.parentId)&&void 0!==r?r:null)===(null!=e?e:null)&&n.name===t});let a=null!=e?e:"";for(const e of t){if(!e)continue;let t=o(a,e);if(!t){const n=await S.createFolder({name:e,parentId:null!=a?a:null});i.push(n),t=n}a=t.id}return null!==(n=a)&&void 0!==n?n:e||""}catch(t){return console.warn("ensureFolderPath: не удалось гарантировать путь",t),e||""}},[S]),P=c(async(e,t)=>{var n,r,i;if(!(null===(r=null===(n=e.type)||void 0===n?void 0:n.startsWith)||void 0===r?void 0:r.call(n,"image/")))return null!=t?t:null;const o=null==e?void 0:e.webkitRelativePath;let a=t||"";if(o&&o.includes("/")){const e=o.split("/");e.pop();const n=e.filter(Boolean);n.length&&(a=await F(t||"",n)||t||"")}return null!==(i=a)&&void 0!==i?i:null!=t?t:null},[F]),M=c(async e=>{var t,n,r,i,o,a,s,l,c,u,d;const{file:h,selectedFolderId:f,uploadFn:p,progressCallbacks:g}=e;if(!(null===(n=null===(t=h.type)||void 0===t?void 0:t.startsWith)||void 0===n?void 0:n.call(t,"image/")))return{success:!0,fileName:h.name,folderId:null!=f?f:null};const m=null!==(r=await P(h,f))&&void 0!==r?r:null!=f?f:null,v=null!==(i=null!=m?m:f)&&void 0!==i?i:null;let y;null===(o=null==g?void 0:g.onStart)||void 0===o||o.call(g,h);try{if(null==g?void 0:g.onProgress){let e=0;y=window.setInterval(()=>{var t;e=Math.min(e+10+Math.floor(Date.now()%10),90),null===(t=null==g?void 0:g.onProgress)||void 0===t||t.call(g,h.name,e)},200)}const e=await p(h,null!=v?v:void 0);return(null==g?void 0:g.onProgress)&&(null===(a=null==g?void 0:g.onProgress)||void 0===a||a.call(g,h.name,100)),null===(s=null==g?void 0:g.onComplete)||void 0===s||s.call(g,h.name),{success:!0,fileName:h.name,fileId:null==e?void 0:e.id,folderId:null!==(c=null!==(l=null==e?void 0:e.folderId)&&void 0!==l?l:v)&&void 0!==c?c:null}}catch(e){const t=e instanceof Error?e.message:String(e);return null===(u=null==g?void 0:g.onError)||void 0===u||u.call(g,h.name,t),{success:!1,fileName:h.name,folderId:null!==(d=null!=v?v:f)&&void 0!==d?d:null,error:t}}finally{void 0!==y&&clearInterval(y)}},[P]),R=c(async(e,t)=>{var n,r,i,o,a,s,l,c,u,p,g,m,v,y,b,w,x,_,k,A,E,I,T,F,R,L,j,D,N,z;if(0===e.length)return{successCount:0,failCount:0,successes:[],errors:[],totalCount:0};null===(n=null==t?void 0:t.onStartBatch)||void 0===n||n.call(t,e);const B=e=>{const t=e.filter(Boolean);return t.length>0&&t.length<=5?t.join(", "):null},V=[];for(let n=0;n<e.length;n++){const s=e[n];if(!(null===(i=null===(r=s.type)||void 0===r?void 0:r.startsWith)||void 0===i?void 0:i.call(r,"image/"))){h.warning({id:"FILES_UPLOAD_UNSUPPORTED_TYPE",message:`Файл ${s.name} не является изображением и будет пропущен`,placement:"bottomRight",data:{itemName:s.name,fileType:s.type,folderId:f||null}}),null===(o=null==t?void 0:t.onError)||void 0===o||o.call(t,s.name,"Unsupported file type");continue}const l=`${Date.now()}-${n}-${Math.random().toString(36).slice(2,8)}`,c=await P(s,f);null===(a=null==t?void 0:t.onStart)||void 0===a||a.call(t,s),V.push({file:s,targetFolderId:c,requestId:l})}const U=V.length;if(0===U)return{successCount:0,failCount:0,successes:[],errors:[],totalCount:0};const $=1===U,W=[],H=[],G=[],Y=[];let q=0,X=0;const K=(e,n,r,i)=>{var o,a;const{emitProgress:s=!0,emitNotification:l=!0}=null!=i?i:{};q++,W.push(e),H.push(null!=r?r:e),s&&(null===(o=null==t?void 0:t.onProgress)||void 0===o||o.call(t,e,100),null===(a=null==t?void 0:t.onComplete)||void 0===a||a.call(t,e)),l&&((e,t,n)=>{var r;h.success({id:"FILE_UPLOAD_ITEM_SUCCESS",message:`${d("File")} ${e} ${d("has been successfully uploaded")}`,placement:"bottomRight",data:{itemId:n,itemName:e,folderId:null!==(r=null!=t?t:f)&&void 0!==r?r:null}})})(e,n,r)},Z=(e,n,r,i,o)=>{var a;const{emitProgress:s=!0,emitNotification:l=!0}=null!=o?o:{};X++,G.push({fileName:e,error:r});const c=yi(i);Y.push({itemId:void 0,itemName:e,reason:r,code:null==c?void 0:c.code,httpStatus:null==c?void 0:c.httpStatus}),s&&(null===(a=null==t?void 0:t.onError)||void 0===a||a.call(t,e,r)),l&&((e,t,n,r)=>{var i;const o=yi(r),a=vi(null==o?void 0:o.code,d);h.error({id:"FILE_UPLOAD_ITEM_FAILED",message:null!=a?a:`Ошибка при загрузке файла ${e}`,placement:"bottomRight",data:{itemName:e,folderId:null!==(i=null!=t?t:f)&&void 0!==i?i:null,error:n,errorCode:null==o?void 0:o.code,httpStatus:null==o?void 0:o.httpStatus},innerException:r})})(e,n,r,i)};if(null==S?void 0:S.uploadFiles)try{const e=await S.uploadFiles({items:V.map(e=>{var t,n;return{requestId:e.requestId,name:e.file.name,size:e.file.size,type:e.file.type,folderId:null!==(n=null!==(t=e.targetFolderId)&&void 0!==t?t:f)&&void 0!==n?n:null,data:e.file,extension:e.file.name.split(".").pop()||""}}),folderId:null!=f?f:null}),t=null!==(s=e.detailed)&&void 0!==s?s:[],n=new Map(t.filter(e=>e.requestId).map(e=>[e.requestId,e]));if(t.length>0)for(let e=0;e<V.length;e++){const r=V[e],i=null!==(l=r.requestId?n.get(r.requestId):void 0)&&void 0!==l?l:t[e];if(i&&i.success){const e=i.data,t=null!==(c=null==e?void 0:e.name)&&void 0!==c?c:r.file.name,n=null!==(g=null!==(p=null!==(u=null==e?void 0:e.folderId)&&void 0!==u?u:r.targetFolderId)&&void 0!==p?p:f)&&void 0!==g?g:null;K(t,n,null==e?void 0:e.id,{emitNotification:$})}else{const e=(null==i?void 0:i.error)?String(i.error):"Ошибка при загрузке файла",t=null==i?void 0:i.data,n=null!==(m=null==t?void 0:t.name)&&void 0!==m?m:r.file.name;Z(n,null!==(b=null!==(y=null!==(v=null==t?void 0:t.folderId)&&void 0!==v?v:r.targetFolderId)&&void 0!==y?y:f)&&void 0!==b?b:null,e,null==i?void 0:i.error,{emitNotification:$})}}else if(e.success)for(const e of V){const t=e.file.name;K(t,null!==(x=null!==(w=e.targetFolderId)&&void 0!==w?w:f)&&void 0!==x?x:null,void 0,{emitNotification:$})}else{const t=e.error?String(e.error):"Ошибка при загрузке файла";for(const n of V){const r=n.file.name;Z(r,null!==(k=null!==(_=n.targetFolderId)&&void 0!==_?_:f)&&void 0!==k?k:null,t,e.error,{emitNotification:$})}}}catch(e){const t=e instanceof Error?e.message:String(e);for(const n of V){Z(n.file.name,null!==(E=null!==(A=n.targetFolderId)&&void 0!==A?A:f)&&void 0!==E?E:null,t,e,{emitNotification:$})}}else{if(!(null==S?void 0:S.uploadFile))return h.error({id:"FILES_UPLOAD_PROVIDER_NOT_CONFIGURED",message:"DataProvider для загрузки файлов не настроен",placement:"bottomRight"}),{successCount:0,failCount:U,successes:[],errors:[],totalCount:U};for(const e of V){const n=await M({file:e.file,selectedFolderId:f,uploadFn:O,progressCallbacks:t});if(n.success)K(n.fileName,null!==(F=null!==(T=null!==(I=n.folderId)&&void 0!==I?I:e.targetFolderId)&&void 0!==T?T:f)&&void 0!==F?F:null,n.fileId,{emitProgress:!1,emitNotification:$});else{const t=null!==(R=n.error)&&void 0!==R?R:"Ошибка при загрузке файла";Z(n.fileName,null!==(D=null!==(j=null!==(L=n.folderId)&&void 0!==L?L:e.targetFolderId)&&void 0!==j?j:f)&&void 0!==D?D:null,t,n.error,{emitProgress:!1,emitNotification:$})}}}if(q>0&&(C&&C(qt),U>1)){const e=B(W),t=e?d("Uploaded",{names:e}):d("uploads_success_summary",{successCount:q,totalCount:U});h.success({id:"FILES_UPLOAD_BATCH_SUCCESS",message:t,placement:"bottomRight",data:{successCount:q,totalCount:U,itemIds:H,itemNames:W,folderId:null!=f?f:null}})}if(X>0)if(U>1){const e=G.map(e=>e.fileName),t=B(e),n=t?d("Failed",{names:t}):d("uploads_fail_summary",{failCount:X,totalCount:U});h.error({id:"FILES_UPLOAD_BATCH_FAILED",message:n,placement:"bottomRight",data:{failCount:X,totalCount:U,itemNames:e,folderId:null!=f?f:null,errors:Y}})}else if(1===U&&Y.length>0&&Y[0].code){const e=vi(Y[0].code,d),t=null!==(z=null===(N=G[0])||void 0===N?void 0:N.fileName)&&void 0!==z?z:"",n=null!=e?e:t?`${d("Failed to upload files")}: ${t}`:d("Failed to upload files");h.error({id:"FILES_UPLOAD_BATCH_FAILED",message:n,placement:"bottomRight",data:{failCount:X,totalCount:U,itemNames:[t],folderId:null!=f?f:null,errors:Y}})}return{successCount:q,failCount:X,successes:W,errors:G,totalCount:U}},[null==S?void 0:S.uploadFiles,null==S?void 0:S.uploadFile,h,P,f,C,d,M,O]),L=c(async e=>{var t;if(!(null==S?void 0:S.uploadFile)&&!(null==S?void 0:S.uploadFiles))return void h.error({id:"FILES_UPLOAD_PROVIDER_NOT_CONFIGURED",message:"DataProvider для загрузки файлов не настроен",placement:"bottomRight"});const n=v.current,r=document.createElement("input");r.type="file",r.accept="image/*",r.multiple=!0;try{!(!(null===(t=null==o?void 0:o.config)||void 0===t?void 0:t.features)||!o.config.features.enableDirectoryUpload)&&(r.webkitdirectory=!0)}catch(e){}r.onchange=async t=>{var r;const i=t.target.files;if(!i||0===i.length)return;const o=Array.from(i);try{null==b||b(!0);const{successes:t,errors:i}=await R(o,e);null===(r=null==e?void 0:e.onBatchComplete)||void 0===r||r.call(e,{files:o,successes:t,errors:i}),await u(),await A({folderId:f||"",sortBy:s,sortOrder:l,page:n.current,limit:n.pageSize})}catch(e){console.error("Ошибка при загрузке файлов:",e)}finally{null==b||b(!1)}},r.click()},[null==S?void 0:S.uploadFile,null==S?void 0:S.uploadFiles,f,h,d,b,A,u,s,l,R,null===(t=null==o?void 0:o.config)||void 0===t?void 0:t.features]),j=c(async(e,t)=>{const n=v.current;let r,i,o;try{if(i=await(null==p?void 0:p.validateFields()),r=null!=e?e:null==i?void 0:i.fileUrl,!r)return void h.error({id:"FILES_UPLOAD_URL_VALIDATION_FAILED",message:"Заполните все поля",placement:"bottomRight",data:{url:null!=r?r:null,folderId:f||null}});if(null==b||b(!0),!(null==S?void 0:S.uploadFileByUrl))return void h.error({id:"FILES_UPLOAD_URL_NOT_SUPPORTED",message:"Загрузка по URL не поддерживается",placement:"bottomRight",data:{url:r,folderId:f||null}});o=await S.uploadFileByUrl({url:r,folderId:f||"",noFolder:t});const a=(null==i?void 0:i.name)||(null==o?void 0:o.name)||"unnamed file";return h.success({id:"FILE_UPLOAD_ITEM_SUCCESS",message:`${d("File")} ${a} ${d("successfully uploaded")}`,placement:"bottomRight",data:{itemName:a,itemId:null==o?void 0:o.id,folderId:f||null}}),null==w||w(!1),null==p||p.resetFields(),C&&C(qt),await A({folderId:f||"",sortBy:s,sortOrder:l,page:n.current,limit:n.pageSize}),o}catch(e){console.error("Ошибка при загрузке файла по URL:",e),h.error({id:"FILES_UPLOAD_BY_URL_FAILED",message:d("Error when downloading a file by URL"),placement:"bottomRight",data:{url:null!=r?r:null,folderId:f||null,reason:e instanceof Error?e.message:String(e)},innerException:e})}finally{null==b||b(!1)}},[p,b,S,h,d,w,C,A,f,s,l]),D=c(async e=>{if(!e.length)return;const t=v.current;await R(e),await A({folderId:f||"",sortBy:s,sortOrder:l,page:t.current,limit:t.pageSize})},[A,f,s,l,R]);return{fetchFiles:A,handleDeleteFile:E,handleDeleteFolder:I,handleAddFile:L,handleAddFileByUrl:j,handleDroppedFiles:D,getFileData:T,uploadFileWithProvider:O}},xi=()=>{const{state:e}=ui(),{files:t,loading:n,isUrlModalVisible:r}=e,i=wi(),o=(()=>{const{state:e,actions:t}=ui(),{selectedFiles:n,files:r,multiSelect:i}=e,{setSelectedFiles:o}=t,a=u(null),s=c((e,t,n)=>{const i=Array.isArray(r)?r:[],o=i.findIndex(t=>t.id===e),a=i.findIndex(e=>e.id===t);if(-1===o||-1===a)return n;const[s,l]=o<a?[o,a]:[a,o],c=i.slice(s,l+1).map(e=>e.id),u=new Set(n);return c.forEach(e=>u.add(e)),u},[r]),l=c((e,t)=>{if(!n||!o)return;const r=!1!==i,l=!!(null==t?void 0:t.shiftKey)&&r&&a.current;let c=new Set(r?n:[]);l&&a.current?c=s(a.current,e,c):c.has(e)?c.delete(e):c.add(e),a.current=e,o(c)},[i,n,o,s]);return{state:{selectedFiles:n||new Set},actions:{toggleFileSelection:l}}})(),a=(e=>{var t,n;const{state:r,actions:i,options:o}=ui(),{t:a}=Nn(),s=bi(),l=gi(),{fetchFolders:u}=s.actions,{files:d,selectedFolder:h,selectedFiles:f,fileToRename:p,renameForm:g,isRenameModalVisible:m,moveForm:v,copyForm:y,pagination:b,currentMenuFile:w}=r,{setFileToRename:x,setIsRenameModalVisible:C,setIsMoveModalVisible:_,setIsCopyModalVisible:S,setSelectedFiles:k,setIsDeleteConfirmVisible:A,setUndoDeletion:E}=i,{apiEndpoints:I,dataProviders:T,config:O}=o,F=e=>{var t,n;if(!e)return null;const r=e;return null!==(n=null!==(t=r.folderId)&&void 0!==t?t:r.parentId)&&void 0!==n?n:null},P=(e,t)=>{var n;return{itemId:null!==(n=null==e?void 0:e.id)&&void 0!==n?n:t,itemName:null==e?void 0:e.name,folderId:F(e)}},M=e=>{if(!e)return;const t=d.find(t=>t.id===e);return null==t?void 0:t.name},R=e=>e.map(M).filter(e=>Boolean(e)),L=e=>e.length>0&&e.length<=5?e.join(", "):null,j=e=>{var t;return null!==(t=e.requestId)&&void 0!==t?t:e.id},D=(e,t,n,r,i)=>({itemIds:e,itemNames:i&&i.length?i:void 0,successCount:t,totalCount:n,folderId:null!=r?r:null}),N=(e,t,n,r,i,o)=>({itemIds:e,itemNames:o&&o.length?o:void 0,failCount:t,totalCount:n,folderId:null!=r?r:null,errors:i}),z=c(e=>{var t,n;const r=null==d?void 0:d.find(t=>t.id===e);if((null==r?void 0:r.isFolder)||e.startsWith("folder_")){if(!1===(null===(t=null==O?void 0:O.features)||void 0===t?void 0:t.enableRenameFolder))return void l.error({id:"FOLDER_RENAME_DISABLED_BY_CONFIG",message:a("Folder rename is disabled by config"),placement:"bottomRight",data:P(r,e)});if(!(null==T?void 0:T.renameFolder))throw new Error("renameFolder не реализован в dataProviders")}else{if(!1===(null===(n=null==O?void 0:O.features)||void 0===n?void 0:n.enableRenameFile))return void l.error({id:"FILE_RENAME_DISABLED_BY_CONFIG",message:a("File rename is disabled by config"),placement:"bottomRight",data:P(r,e)});if(!(null==T?void 0:T.renameFile))throw new Error("renameFile не реализован в dataProviders")}null==x||x(e),null==C||C(!0),r&&g&&g.setFieldsValue({newFileName:r.name})},[d,x,C,g,null===(t=null==O?void 0:O.features)||void 0===t?void 0:t.enableRenameFolder,null===(n=null==O?void 0:O.features)||void 0===n?void 0:n.enableRenameFile,null==T?void 0:T.renameFolder,null==T?void 0:T.renameFile,l,a]),B=c(()=>{null==C||C(!1),null==x||x(null),null==g||g.resetFields()},[C,x,g]),V=c(async()=>{var t,n,r;if(!p||!g)return;const o=null==d?void 0:d.find(e=>e.id===p);try{const s=await g.validateFields();if(!(null==s?void 0:s.newFileName))return;if((null==o?void 0:o.isFolder)||p.startsWith("folder_")){if(!1===(null===(t=null==O?void 0:O.features)||void 0===t?void 0:t.enableRenameFolder))return void l.error({id:"FOLDER_RENAME_DISABLED_BY_CONFIG",message:a("Folder rename is disabled by config"),placement:"bottomRight",data:P(o,p)});if(!(null==T?void 0:T.renameFolder))throw new Error("renameFolder не реализован в dataProviders");{const e=await T.renameFolder(p,s.newFileName.trim());if(!(null==e?void 0:e.id))return void l.error({id:"FOLDER_RENAME_FAILED",message:a("Некорректный ответ при переименовании папки"),placement:"bottomRight",data:Object.assign(Object.assign({},P(o,p)),{reason:"Invalid rename response"})});l.success({id:"FOLDER_RENAME_SUCCESS",message:a(`${a("Folder renamed to")} ${s.newFileName}`),placement:"bottomRight",data:{itemId:e.id,itemName:e.name,folderId:null!==(n=e.parentId)&&void 0!==n?n:null}}),await u(),p!==e.id&&i.setSelectedFolder&&i.setSelectedFolder(e.id)}}else{if(!1===(null===(r=null==O?void 0:O.features)||void 0===r?void 0:r.enableRenameFile))return void l.error({id:"FILE_RENAME_DISABLED_BY_CONFIG",message:a("File rename is disabled by config"),placement:"bottomRight",data:P(o,p)});if(!(null==T?void 0:T.renameFile))throw new Error("renameFile не реализован в dataProviders");await T.renameFile(p,s.newFileName),l.success({id:"FILE_RENAME_SUCCESS",message:`${a("File renamed to")} ${s.newFileName}`,placement:"bottomRight",data:Object.assign(Object.assign({},P(o,p)),{itemName:s.newFileName})})}B(),await e({folderId:h||"",page:b.current,limit:b.pageSize})}catch(e){console.error("Ошибка при переименовании:",e);const t=yi(e),n=vi(null==t?void 0:t.code,a);l.error({id:"ITEM_RENAME_FAILED",message:null!=n?n:e instanceof Error?e.message:"Ошибка при переименовании",placement:"bottomRight",data:Object.assign(Object.assign({},P(o,p)),{reason:e instanceof Error?e.message:void 0}),innerException:e})}},[p,g,d,T,I,B,e,h,a,b]),U=c(()=>{null==_||_(!0)},[_]),$=c(()=>{null==_||_(!1),null==v||v.resetFields()},[_,v]),W=c(async t=>{var n;if(!((null==w?void 0:w.length)||f&&0!==f.size))return;const r=Array.from((null==w?void 0:w.length)?[w]:f),i=r.length;let o=0,s=0;const c=[],p=r.map(e=>d.find(t=>t.id===e)).filter(e=>!!e),g=p.some(e=>(null==e?void 0:e.isFolder)||e.id.startsWith("folder_"));try{let d=t;if(!t){const e=await v.validateFields();d=null==e?void 0:e.targetFolder}if(!d)return void l.error({id:"FILES_MOVE_DIRECTORY_NOT_SELECTED",message:a("Выберите папку назначения"),placement:"bottomRight"});const f="folders"===d?null:d;if(null==T?void 0:T.moveItems)try{const e=await T.moveItems("folders"===d?"":d,p.map(e=>e.id)),t=e.detailed;if(t){const e=t.filter(e=>e.success),n=t.filter(e=>!e.success);o+=e.length,s+=n.length,n.forEach(e=>{const t=j(e),n=e.error,r=yi(n);c.push({itemId:t,itemName:M(t),reason:n?String(n):void 0,code:null==r?void 0:r.code,httpStatus:null==r?void 0:r.httpStatus})})}else if(e.success)o+=p.length;else{const t=e.error;if(t){s+=p.length;const e=yi(t);c.push({reason:String(t),code:null==e?void 0:e.code,httpStatus:null==e?void 0:e.httpStatus})}else s+=p.length}}catch(e){console.error("Ошибка при перемещении",e),s+=p.length;const t=yi(e);c.push({reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus})}else for(const e of p)try{const t=(null==e?void 0:e.isFolder)||(null===(n=e.id)||void 0===n?void 0:n.startsWith("folder_"));(null==T?void 0:T.moveItem)?(await T.moveItem({itemId:e.id,targetFolderId:"folders"===d?"":d,isFolder:t}),o++):(console.warn(`DataProvider для перемещения не настроен для ${t?"папки":"файла"} ${e.id}`),s++,c.push({itemId:e.id,reason:"Move provider is not configured"}))}catch(t){console.error("Ошибка при перемещении объекта",e.id,t),s++;const n=yi(t);c.push({itemId:e.id,itemName:e.name,reason:t instanceof Error?t.message:String(t),code:null==n?void 0:n.code,httpStatus:null==n?void 0:n.httpStatus})}if(o>0){const e=R(r),t=L(e),n=t?a("Moved",{names:t}):a("move_success_summary",{successCount:o,totalCount:i});l.success({id:"FILES_MOVE_SUCCESS",message:n,placement:"bottomRight",data:D(r,o,i,f,e)})}if(s>0){const e=R(r),t=L(e);let n;if(1===i&&c.length>0&&c[0].code){const e=vi(c[0].code,a);n=null!=e?e:t?a("Failed",{names:t}):a("move_fail_summary",{failCount:s,totalCount:i})}else n=t?a("Failed",{names:t}):a("move_fail_summary",{failCount:s,totalCount:i});l.error({id:"FILES_MOVE_ERROR",message:n,placement:"bottomRight",innerException:c.length?c:void 0,data:N(r,s,i,f,c.length?c:void 0,e)})}$(),null==k||k(new Set),g&&await u(),await e({folderId:h||"",page:b.current,limit:b.pageSize})}catch(e){console.error("Ошибка при перемещении:",e);const t=yi(e),n=vi(null==t?void 0:t.code,a);l.error({id:"FILES_MOVE_ERROR",innerException:e,message:null!=n?n:a("Ошибка при перемещении"),placement:"bottomRight",data:N(r,i,i,h||null,[{reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus}],R(r))})}},[w,f,v,$,k,e,h,b,d,T,u]),H=c(()=>{null==S||S(!0)},[S]),G=c(()=>{null==S||S(!1),null==y||y.resetFields()},[S,y]),Y=c(async t=>{if(!((null==w?void 0:w.length)||f&&0!==f.size))return;const n=Array.from((null==w?void 0:w.length)?[w]:f),r=n.length;let i=0,o=0;const s=[],c=n.map(e=>d.find(t=>t.id===e)).filter(e=>!!e),p=c.some(e=>(null==e?void 0:e.isFolder)||e.id.startsWith("folder_"));try{let d=t;if(!t){const e=await y.validateFields();d=null==e?void 0:e.targetFolder}if(!d)return void l.error({id:"FILES_COPY_DIRECTORY_NOT_SELECTED",message:a("Выберите папку назначения"),placement:"bottomRight"});const f="folders"===d?null:d;if(null==T?void 0:T.copyItems)try{const e=await T.copyItems("folders"===d?"":d,c.map(e=>e.id)),t=e.detailed;if(t){const e=t.filter(e=>e.success),n=t.filter(e=>!e.success);i+=e.length,o+=n.length,n.forEach(e=>{const t=j(e),n=e.error,r=yi(n);s.push({itemId:t,itemName:M(t),reason:n?String(n):void 0,code:null==r?void 0:r.code,httpStatus:null==r?void 0:r.httpStatus})})}else if(e.success)i+=c.length;else{const t=e.error;if(t){o+=c.length;const e=yi(t);s.push({reason:String(t),code:null==e?void 0:e.code,httpStatus:null==e?void 0:e.httpStatus})}else o+=c.length}}catch(e){console.error("Ошибка при копировании",e),o+=c.length;const t=yi(e);s.push({reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus})}else for(const e of c)try{const t=(null==e?void 0:e.isFolder)||e.id.startsWith("folder_");(null==T?void 0:T.copyItem)?(await T.copyItem({itemId:e.id,targetFolderId:"folders"===d?"":d,isFolder:t}),i++):(console.warn(`DataProvider для копирования не настроен для ${t?"папки":"файла"} ${e.id}`),o++,s.push({itemId:e.id,reason:"Copy provider is not configured"}))}catch(t){console.error("Ошибка при копировании объекта",e.id,t),o++;const n=yi(t);s.push({itemId:e.id,itemName:e.name,reason:t instanceof Error?t.message:String(t),code:null==n?void 0:n.code,httpStatus:null==n?void 0:n.httpStatus})}if(i>0){const e=R(n),t=L(e),o=t?a("Copied",{names:t}):a("copy_success_summary",{successCount:i,totalCount:r});l.success({id:"FILES_COPY_SUCCESS",message:o,placement:"bottomRight",data:D(n,i,r,f,e)})}if(o>0){const e=R(n),t=L(e);let i;if(1===r&&s.length>0&&s[0].code){const e=vi(s[0].code,a);i=null!=e?e:t?a("Failed",{names:t}):a("copy_fail_summary",{failCount:o,totalCount:r})}else i=t?a("Failed",{names:t}):a("copy_fail_summary",{failCount:o,totalCount:r});l.error({id:"FILES_COPY_ERROR",message:i,placement:"bottomRight",innerException:s.length?s:void 0,data:N(n,o,r,f,s.length?s:void 0,e)})}G(),null==k||k(new Set),p&&await u(),await e({folderId:h||"",page:b.current,limit:b.pageSize})}catch(e){console.error("Ошибка при копировании:",e);const t=yi(e),i=vi(null==t?void 0:t.code,a);l.error({id:"FILES_COPY_ERROR",message:null!=i?i:a("Ошибка при копировании"),innerException:e,placement:"bottomRight",data:N(n,r,r,h||null,[{reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus}],R(n))})}},[w,f,y,G,k,e,h,b,d,T,u,l,a]),q=c(()=>{null==A||A(!0)},[A]),X=c(()=>{null==A||A(!1)},[A]),K=c(async()=>{if(!((null==w?void 0:w.length)||f&&0!==f.size))return void(null==A||A(!1));let t=0,n=0;const r=[],i=Array.from(w?[w]:f),o=i.map(e=>d.find(t=>t.id===e)).filter(e=>!!e);try{const s=async()=>{const e="Trash";if(null==T?void 0:T.deleteItems)try{const e=await T.deleteItems(o.map(e=>e.id),{permanent:!1}),s=e.detailed;if(s){const e=s.filter(e=>e.success).length;t+=e;const c=s.filter(e=>!e.success);if(n+=c.length,c.forEach(e=>{const t=j(e),n=e.error,i=yi(n);r.push({itemId:t,itemName:M(t),reason:n?String(n):void 0,code:null==i?void 0:i.code,httpStatus:null==i?void 0:i.httpStatus})}),e!==o.length){const e=i.length,t=R(i),o=L(t);let s;if(1===e&&r.length>0&&r[0].code){const e=vi(r[0].code,a);s=null!=e?e:o?a("Failed",{names:o}):a("При перемещении в корзину произошли ошибки")}else s=o?a("Failed",{names:o}):a("При перемещении в корзину произошли ошибки");l.error({id:"FILES_MOVE_TO_TRASH_ERROR",message:s,placement:"bottomRight",innerException:r.length?r:void 0,data:{failCount:n,totalCount:i.length,itemNames:t}})}}else if(e.success)t+=o.length;else{const t=e.error;if(t){n+=o.length;const e=yi(t),s=vi(null==e?void 0:e.code,a),c=i.length,u=R(i);let d;1===c&&(null==e||e.code),d=null!=s?s:String(t),r.push({reason:String(t),code:null==e?void 0:e.code,httpStatus:null==e?void 0:e.httpStatus}),l.error({id:"FILES_MOVE_TO_TRASH_ERROR",message:d,placement:"bottomRight",innerException:t,data:{failCount:n,totalCount:i.length,itemNames:u}})}else n+=o.length}return}catch(e){console.error("Ошибка при перемещении в корзину",e),n+=o.length;const t=yi(e);r.push({reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus})}if(null==T?void 0:T.moveItems)try{const s=await T.moveItems(e,o.map(e=>e.id)),c=s.detailed;if(c){const e=c.filter(e=>e.success).length;t+=e;const s=c.filter(e=>!e.success);if(n+=s.length,s.forEach(e=>{const t=j(e),n=e.error,i=yi(n);r.push({itemId:t,itemName:M(t),reason:n?String(n):void 0,code:null==i?void 0:i.code,httpStatus:null==i?void 0:i.httpStatus})}),e!==o.length){const e=i.length,t=R(i),o=L(t);let s;if(1===e&&r.length>0&&r[0].code){const e=vi(r[0].code,a);s=null!=e?e:o?a("Failed",{names:o}):a("При перемещении в корзину произошли ошибки")}else s=o?a("Failed",{names:o}):a("При перемещении в корзину произошли ошибки");l.error({id:"FILES_MOVE_TO_TRASH_ERROR",message:s,placement:"bottomRight",innerException:r.length?r:void 0,data:{failCount:n,totalCount:i.length,itemNames:t}})}}else if(s.success)t+=o.length;else{const e=s.error;if(e){n+=o.length;const t=yi(e),s=vi(null==t?void 0:t.code,a),c=i.length,u=R(i);let d;1===c&&(null==t||t.code),d=null!=s?s:String(e),r.push({reason:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus}),l.error({id:"FILES_MOVE_TO_TRASH_ERROR",message:d,placement:"bottomRight",innerException:e,data:{failCount:n,totalCount:i.length,itemNames:u}})}else n+=o.length}}catch(e){console.error("Ошибка при перемещении в корзину",e),n+=o.length;const t=yi(e);r.push({reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus})}else for(const i of o)try{const r=(null==i?void 0:i.isFolder)||i.id.startsWith("folder_");(null==T?void 0:T.moveItem)?(await T.moveItem({itemId:i.id,targetFolderId:e,isFolder:r}),t++):(console.warn(`DataProvider для перемещения не настроен для ${r?"папки":"файла"} ${i.id}`),n++)}catch(e){console.error("Ошибка при перемещении в корзину объекта",i.id,e),n++;const t=yi(e);r.push({itemId:i.id,itemName:i.name,reason:e instanceof Error?e.message:String(e),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus})}},c=async()=>{if(null==T?void 0:T.deleteItems){const e=await T.deleteItems(o.map(e=>e.id),{permanent:!0}),s=e.detailed;if(s){const e=s.filter(e=>e.success);t+=e.length;const c=s.filter(e=>!e.success);if(n+=c.length,c.forEach(e=>{const t=j(e),n=e.error,i=yi(n);r.push({itemId:t,itemName:M(t),reason:n?String(n):void 0,code:null==i?void 0:i.code,httpStatus:null==i?void 0:i.httpStatus})}),e.length!==o.length){const e=i.length,t=R(i),o=L(t);let s;if(1===e&&r.length>0&&r[0].code){const e=vi(r[0].code,a);s=null!=e?e:o?a("Failed",{names:o}):a("При удалении произошли ошибки")}else s=o?a("Failed",{names:o}):a("При удалении произошли ошибки");l.error({id:"FILES_DELETE_ERROR",message:s,placement:"bottomRight",innerException:r.length?r:void 0,data:{failCount:n,totalCount:i.length,itemNames:t}})}return}if(e.success)return void(t+=o.length);if(e.error){n+=o.length;const t=yi(e.error),s=vi(null==t?void 0:t.code,a),c=i.length,u=R(i);let d;1===c&&(null==t||t.code),d=null!=s?s:String(e.error),r.push({reason:String(e.error),code:null==t?void 0:t.code,httpStatus:null==t?void 0:t.httpStatus}),l.error({id:"FILES_DELETE_ERROR",message:d,innerException:e.error,placement:"bottomRight",data:{failCount:n,totalCount:i.length,itemNames:u}})}else n+=o.length;return}for(const e of o)try{(null==e?void 0:e.isFolder)||e.id.startsWith("folder_")?(null==T?void 0:T.deleteFolder)?await T.deleteFolder(e.id)?t++:n++:(console.warn("DataProvider для удаления папок не настроен"),n++):(null==T?void 0:T.deleteFile)?await T.deleteFile(e.id)?t++:n++:(console.warn("DataProvider для удаления файлов не настроен"),n++)}catch(t){console.error("Ошибка при удалении объекта",e.id,t),n++;const i=yi(t);r.push({itemId:e.id,itemName:e.name,reason:t instanceof Error?t.message:String(t),code:null==i?void 0:i.code,httpStatus:null==i?void 0:i.httpStatus})}},d=(null==O?void 0:O.enableTrashFolder)&&"Trash"===h;(null==O?void 0:O.enableTrashFolder)&&!d?(await s(),t>0&&(null==E||E({itemIds:i,sourceFolderId:h||"folders"}))):await c(),n>0&&l.error({id:"FILES_DELETE_ERROR",message:`Не удалось удалить ${n} из ${i.length} объектов`,placement:"bottomRight",data:{failCount:n,totalCount:i.length}}),null==k||k(new Set),null==A||A(!1),await u(),await e({folderId:h||"",page:b.current,limit:b.pageSize})}catch(e){console.error("Ошибка при удалении:",e),l.error({id:"FILES_DELETE_ERROR",message:a("Ошибка при удалении"),placement:"bottomRight",innerException:e,data:{failCount:n,totalCount:o.length}})}},[w,f,A,T,e,h,b,u,w]);return{state:{isRenamingFile:m||!1,fileToRename:p},actions:{showRenameModal:z,handleRenameCancel:B,handleRenameOk:V,showMoveModal:U,handleMoveCancel:$,handleMoveOk:W,showCopyModal:H,handleCopyCancel:G,handleCopyOk:Y,showDeleteConfirm:q,handleDeleteConfirmCancel:X,handleDeleteConfirmOk:K}}})(i.fetchFiles);return{state:{files:t||[],selectedFiles:o.state.selectedFiles,loading:n||!1,isAddingFileByUrl:r||!1,isRenamingFile:a.state.isRenamingFile,fileToRename:a.state.fileToRename},actions:{fetchFiles:i.fetchFiles,handleDeleteFile:i.handleDeleteFile,handleDeleteFolder:i.handleDeleteFolder,handleAddFile:i.handleAddFile,handleAddFileByUrl:i.handleAddFileByUrl,handleDroppedFiles:i.handleDroppedFiles,uploadFileWithProvider:i.uploadFileWithProvider,toggleFileSelection:o.actions.toggleFileSelection,showRenameModal:a.actions.showRenameModal,handleRenameCancel:a.actions.handleRenameCancel,handleRenameOk:a.actions.handleRenameOk,showMoveModal:a.actions.showMoveModal,handleMoveCancel:a.actions.handleMoveCancel,handleMoveOk:a.actions.handleMoveOk,showCopyModal:a.actions.showCopyModal,handleCopyCancel:a.actions.handleCopyCancel,handleCopyOk:a.actions.handleCopyOk,showDeleteConfirm:a.actions.showDeleteConfirm,handleDeleteConfirmCancel:a.actions.handleDeleteConfirmCancel,handleDeleteConfirmOk:a.actions.handleDeleteConfirmOk}}},Ci="filemanager_sidebar_width",_i=({onSearch:t,placeholder:n="Поиск файлов...",className:r})=>{const[i,s]=o(""),l=u(null),{options:c}=ui(),{config:d}=c;a(()=>(l.current=li.debounce(e=>{t(e)},500),()=>{var e;null===(e=l.current)||void 0===e||e.cancel()}),[t]);return e(O,{value:i,onChange:e=>{var t;const n=e.target.value;s(n),null===(t=l.current)||void 0===t||t.call(l,n)},placeholder:n,prefix:e(ti,{size:16,strokeWidth:null==d?void 0:d.iconStrokeWidth}),className:r,allowClear:!0,onClear:()=>{s(""),t("")}})},Si=new Map,ki=(e,t)=>{Si.set(e,t),console.log("Изображение сохранено в кеш:",e),Si.size>350&&(Array.from(Si.keys()).slice(0,50).forEach(e=>Si.delete(e)),console.warn("Очищен кеш изображений. Удалено 50 самых старых записей."))},Ai=e=>{if(e.type&&e.type.startsWith("image/"))return!0;if(e.name){const t=e.name.toLowerCase().split(".").pop();return on.includes(t||"")}return!1},Ei=({src:t,alt:n,className:r,width:i,height:s,preview:l=!1,file:u})=>{const d=wi(),[h,f]=o(!1),[p,g]=o(t),[m,v]=o(!1),y=c(e=>{g(e),f(!1),v(!1)},[]),b=c(e=>{console.warn("Не удалось загрузить изображение:",e),g(void 0),f(!0),v(!1)},[]),w=c(()=>{g(an),f(!0)},[]),x=c(e=>{g(e),f(!1)},[]),C=c(e=>{const t=e.split(",")[1];t&&t.length>20?g(e):(console.warn("Некорректные base64 данные:",e.substring(0,50)+"..."),w())},[w]),_=c(async e=>{if(console.log("loadImageFromFile",e.id),t=e.id,Si.has(t))return console.log("Изображение найдено в кеше:",e.id),(e=>Si.get(e))(e.id);var t;if(!e||!Ai(e))return console.warn("Файл не является изображением:",null==e?void 0:e.name,null==e?void 0:e.type),w(),an;try{const t=await d.getFileData(e);if(!t)throw new Error("Ошибка загрузки файла");return new Promise((n,r)=>{const i=new FileReader;i.onload=()=>{const t=i.result;ki(e.id,t),n(t)},i.onerror=()=>r(new Error("Ошибка чтения файла")),i.readAsDataURL(t)})}catch(e){throw console.error("Ошибка загрузки изображения:",e),e}},[u,w,d]),S=c(()=>{(null==u?void 0:u.id)&&Ai(u)?_(u).then(y).catch(b):u&&!Ai(u)&&(console.warn("Файл не является изображением, показываем fallback:",u.name,u.type),w())},[u,_,y,b,w]),k=c(e=>{console.log("HandleBlobSrc:",{blobSrc:e,file:u?{id:u.id,name:u.name,type:u.type,extension:u.extension,folderId:u.folderId}:null}),u&&Ai(u)?(console.log("Blob файл является изображением, устанавливаем src:",u.name,u.type),g(e),f(!1)):(console.warn("Blob файл не является изображением, показываем fallback:",null==u?void 0:u.name,null==u?void 0:u.type),w())},[u,w,Ai]),A=c(()=>{(null==u?void 0:u.id)&&Ai(u)?(v(!0),_(u).then(y).catch(b)):u&&!Ai(u)?(console.warn("Файл не является изображением, показываем fallback:",u.name,u.type),w()):(console.warn("Неподдерживаемый формат изображения:",t),g(void 0))},[u,t,_,y,b,w]);a(()=>{v(!1),t?t.startsWith("data:image/")?C(t):t.startsWith("blob:")?k(t):t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")?x(t):A():S()},[t,S,C,k,x,A]);return e(F,{className:r,src:p,alt:n,width:i,height:s,preview:l&&!h&&{src:p,toolbarRender:()=>null,destroyOnHidden:!0,mask:e(oe,{style:{fontSize:"20px"}})},onError:()=>{console.warn("Ошибка загрузки изображения:",(null==p?void 0:p.substring(0,50))+"..."),f(!0)},fallback:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCA4MCA4MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjgwIiBoZWlnaHQ9IjgwIiBmaWxsPSIjRjVGNUY1Ii8+CjxwYXRoIGQ9Ik0yNCAzMkw0MCA0OEw1NiAzMkw2NCA0MEw2NCA2NEgyNFYzMloiIGZpbGw9IiNEOUQ5RDkiLz4KPC9zdmc+",loading:m?"lazy":void 0})},Ii="filemanager_view_mode",Ti=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"mixed-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 1h2v2H1V1zm0 4h2v2H1V5zm0 4h2v2H1V9zm4-8h2v2H5V1zm0 4h2v2H5V5zm0 4h2v2H5V9zm4-8h2v2H9V1zm0 4h2v2H9V5zm0 4h2v2H9V9z"})}),Oi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"landscape-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 3h10v6H1V3zm1 1v4h8V4H2z"})}),Fi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"portrait-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M3 1h6v10H3V1zm1 1v8h4V2H4z"})}),Pi=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"square-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M1 1h10v10H1V1zm1 1v8h8V2H2z"})}),Mi=()=>t("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"ai-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:[e("path",{d:"M2.45454 11.7273C2.45454 11.7273 2.16994 10.446 1.66154 9.88113C1.15314 9.31625 0 9 0 9C0 9 1.15314 8.68374 1.66154 8.11887C2.16994 7.554 2.45454 6.27273 2.45454 6.27273C2.45454 6.27273 2.73915 7.554 3.24755 8.11887C3.75594 8.68374 4.90909 9 4.90909 9C4.90909 9 3.75594 9.31625 3.24755 9.88113C2.73915 10.446 2.45454 11.7273 2.45454 11.7273Z"}),e("path",{d:"M7.63636 9C7.63636 9 7.1304 6.94996 6.22658 6.04614C5.32276 5.14233 3.27273 4.63636 3.27273 4.63636C3.27273 4.63636 5.32276 4.1304 6.22658 3.22657C7.1304 2.32275 7.63636 0.272728 7.63636 0.272728C7.63636 0.272728 8.14233 2.32275 9.04615 3.22657C9.94996 4.1304 12 4.63636 12 4.63636C12 4.63636 9.94996 5.14233 9.04615 6.04614C8.14233 6.94996 7.63636 9 7.63636 9Z"}),e("path",{d:"M1.63636 4.09091C1.63636 4.09091 1.44663 3.19402 1.10769 2.7986C0.768758 2.40318 0 2.18182 0 2.18182C0 2.18182 0.768758 1.96046 1.10769 1.56503C1.44663 1.16961 1.63636 0.272728 1.63636 0.272728C1.63636 0.272728 1.8261 1.16961 2.16503 1.56503C2.50397 1.96046 3.27273 2.18182 3.27273 2.18182C3.27273 2.18182 2.50397 2.40318 2.16503 2.7986C1.8261 3.19402 1.63636 4.09091 1.63636 4.09091Z"}),e("path",{d:"M10.6364 11.7273C10.6364 11.7273 10.4782 11.0866 10.1958 10.8042C9.91336 10.5218 9.27273 10.3636 9.27273 10.3636C9.27273 10.3636 9.91336 10.2055 10.1958 9.92307C10.4782 9.64064 10.6364 9 10.6364 9C10.6364 9 10.7945 9.64064 11.0769 9.92307C11.3594 10.2055 12 10.3636 12 10.3636C12 10.3636 11.3594 10.5218 11.0769 10.8042C10.7945 11.0866 10.6364 11.7273 10.6364 11.7273Z"})]}),Ri=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"light-mode",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M6 7.81819C6.50303 7.81819 6.93182 7.64092 7.28637 7.28637C7.64092 6.93182 7.81819 6.50303 7.81819 6C7.81819 5.49697 7.64092 5.06818 7.28637 4.71363C6.93182 4.35908 6.50303 4.18181 6 4.18181C5.49697 4.18181 5.06818 4.35908 4.71363 4.71363C4.35908 5.06818 4.18181 5.49697 4.18181 6C4.18181 6.50303 4.35908 6.93182 4.71363 7.28637C5.06818 7.64092 5.49697 7.81819 6 7.81819ZM6 8.72727C5.24545 8.72727 4.60227 8.46136 4.07045 7.92955C3.53864 7.39773 3.27273 6.75455 3.27273 6C3.27273 5.24545 3.53864 4.60227 4.07045 4.07045C4.60227 3.53864 5.24545 3.27273 6 3.27273C6.75455 3.27273 7.39773 3.53864 7.92955 4.07045C8.46136 4.60227 8.72727 5.24545 8.72727 6C8.72727 6.75455 8.46136 7.39773 7.92955 7.92955C7.39773 8.46136 6.75455 8.72727 6 8.72727ZM2.18182 6.45454H0V5.54546H2.18182V6.45454ZM12 6.45454H9.81818V5.54546H12V6.45454ZM5.54546 2.18182V0H6.45454V2.18182H5.54546ZM5.54546 12V9.81818H6.45454V12H5.54546ZM3 3.6091L1.63182 2.28637L2.28181 1.61819L3.5909 2.98182L3 3.6091ZM9.72727 10.3727L8.39546 9.00454L9.0091 8.38182L10.3682 9.71363L9.72727 10.3727ZM8.38182 2.9909L9.71363 1.63182L10.3818 2.27273L9.02727 3.6L8.38182 2.9909ZM1.62727 9.71819L2.98636 8.38636L3.61818 9.0091L2.28637 10.3682L1.62727 9.71819Z"})}),Li=()=>e("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"dark-mode",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:e("path",{d:"M6 11C4.61111 11 3.43056 10.5139 2.45833 9.54167C1.48611 8.56944 1 7.38889 1 6C1 4.61111 1.48611 3.43056 2.45833 2.45833C3.43056 1.48611 4.61111 1 6 1C6.09259 1 6.1875 1.00309 6.28472 1.00926C6.38194 1.01543 6.49382 1.02469 6.62036 1.03704C6.2716 1.32408 5.99769 1.68442 5.79861 2.11806C5.59954 2.55169 5.5 3.01234 5.5 3.5C5.5 4.33333 5.79167 5.04167 6.375 5.625C6.95833 6.20833 7.66667 6.5 8.5 6.5C8.99074 6.5 9.45216 6.40509 9.88426 6.21528C10.3164 6.02546 10.6759 5.76544 10.963 5.43519C10.9753 5.54939 10.9846 5.65047 10.9907 5.73843C10.9969 5.82639 11 5.91358 11 6C11 7.38889 10.5139 8.56944 9.54167 9.54167C8.56944 10.5139 7.38889 11 6 11ZM6 10.0741C6.94444 10.0741 7.77469 9.7909 8.49075 9.22454C9.20681 8.65818 9.67594 7.97376 9.89815 7.17129C9.68211 7.25463 9.45474 7.3179 9.21606 7.36111C8.97737 7.40431 8.73869 7.42592 8.5 7.42592C7.41242 7.42592 6.4862 7.0435 5.72135 6.27865C4.9565 5.5138 4.57408 4.58758 4.57408 3.5C4.57408 3.29012 4.59414 3.06944 4.63426 2.83796C4.67438 2.60648 4.74229 2.35185 4.83797 2.07407C3.99229 2.3395 3.29552 2.83487 2.74768 3.56018C2.19984 4.28549 1.92592 5.09876 1.92592 6C1.92592 7.12963 2.32252 8.09105 3.11574 8.88426C3.90895 9.67748 4.87037 10.0741 6 10.0741Z"})}),ji=()=>t("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{opacity:"0.5",d:"M6 19H49C54.5229 19 59 23.4772 59 29V46C59 51.5228 54.5228 56 49 56H14C9.58172 56 6 52.4183 6 48V19Z",fill:"#91CAFF"}),e("path",{d:"M6 19L34.866 18.5L30.7172 11.0737C29.6569 9.17588 27.6531 8 25.4792 8H10C7.79086 8 6 9.79086 6 12V19Z",stroke:"currentColor"}),e("path",{d:"M34.6663 18.6667L31.6916 12.7171C30.8354 11.0048 30.4073 10.1486 29.7687 9.5231C29.2039 8.96995 28.5232 8.54926 27.7759 8.29149C26.9308 8 25.9736 8 24.0591 8H13.8663C10.8794 8 9.38592 8 8.24506 8.5813C7.24153 9.09262 6.42563 9.90852 5.91431 10.9121C5.33301 12.0529 5.33301 13.5464 5.33301 16.5333V18.6667M5.33301 18.6667H45.8663C50.3468 18.6667 52.587 18.6667 54.2983 19.5386C55.8036 20.3056 57.0274 21.5294 57.7944 23.0347C58.6663 24.746 58.6663 26.9862 58.6663 31.4667V43.2C58.6663 47.6804 58.6663 49.9206 57.7944 51.6319C57.0274 53.1372 55.8036 54.3611 54.2983 55.1281C52.587 56 50.3468 56 45.8663 56H18.133C13.6526 56 11.4124 56 9.70108 55.1281C8.19579 54.3611 6.97194 53.1372 6.20496 51.6319C5.33301 49.9206 5.33301 47.6804 5.33301 43.2V18.6667Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Di=()=>e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10.8337 5.83333L9.90404 3.9741C9.6365 3.439 9.50271 3.17144 9.30313 2.97597C9.12664 2.80311 8.91393 2.67164 8.68039 2.59109C8.4163 2.5 8.11716 2.5 7.5189 2.5H4.33366C3.40024 2.5 2.93353 2.5 2.57701 2.68166C2.2634 2.84144 2.00844 3.09641 1.84865 3.41002C1.66699 3.76654 1.66699 4.23325 1.66699 5.16667V5.83333M1.66699 5.83333H14.3337C15.7338 5.83333 16.4339 5.83333 16.9686 6.10582C17.439 6.3455 17.8215 6.72795 18.0612 7.19836C18.3337 7.73314 18.3337 8.4332 18.3337 9.83333V13.5C18.3337 14.9001 18.3337 15.6002 18.0612 16.135C17.8215 16.6054 17.439 16.9878 16.9686 17.2275C16.4339 17.5 15.7338 17.5 14.3337 17.5H5.66699C4.26686 17.5 3.5668 17.5 3.03202 17.2275C2.56161 16.9878 2.17916 16.6054 1.93948 16.135C1.66699 15.6002 1.66699 14.9001 1.66699 13.5V5.83333Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),Ni=()=>e("svg",{width:"48",height:"49",viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M32 24.5L24 16.5M24 16.5L16 24.5M24 16.5V34.9C24 37.6814 24 39.0721 25.101 40.6292C25.8326 41.6638 27.9388 42.9406 29.1944 43.1108C31.0842 43.3668 31.8019 42.9924 33.2371 42.2437C39.6333 38.9071 44 32.2135 44 24.5C44 13.4543 35.0457 4.5 24 4.5C12.9543 4.5 4 13.4543 4 24.5C4 31.9028 8.02199 38.3663 14 41.8244",stroke:"#2884FF",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})}),zi=()=>t("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{width:"56",height:"56",rx:"24",fill:"#8946FB"}),e("path",{d:"M28 36.4722C29.0615 37.4223 30.4633 38 32 38C35.3137 38 38 35.3137 38 32C38 29.2331 36.1271 26.9036 33.5798 26.2102M22.4202 26.2102C19.8729 26.9036 18 29.2331 18 32C18 35.3137 20.6863 38 24 38C27.3137 38 30 35.3137 30 32C30 31.2195 29.851 30.4738 29.5798 29.7898M34 24C34 27.3137 31.3137 30 28 30C24.6863 30 22 27.3137 22 24C22 20.6863 24.6863 18 28 18C31.3137 18 34 20.6863 34 24Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Bi=()=>t("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{width:"56",height:"56",rx:"24",fill:"#7ED846"}),e("path",{d:"M20.5 38V33M20.5 23V18M18 20.5H23M18 35.5H23M29 19L27.2658 23.5089C26.9838 24.2421 26.8428 24.6087 26.6235 24.9171C26.4292 25.1904 26.1904 25.4292 25.9171 25.6235C25.6087 25.8428 25.2421 25.9838 24.5089 26.2658L20 28L24.5089 29.7342C25.2421 30.0162 25.6087 30.1572 25.9171 30.3765C26.1904 30.5708 26.4292 30.8096 26.6235 31.0829C26.8428 31.3913 26.9838 31.7579 27.2658 32.4911L29 37L30.7342 32.4911C31.0162 31.7579 31.1572 31.3913 31.3765 31.0829C31.5708 30.8096 31.8096 30.5708 32.0829 30.3765C32.3913 30.1572 32.7579 30.0162 33.4911 29.7342L38 28L33.4911 26.2658C32.7579 25.9838 32.3913 25.8428 32.0829 25.6235C31.8096 25.4292 31.5708 25.1904 31.3765 24.9171C31.1572 24.6087 31.0162 24.2421 30.7342 23.5089L29 19Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Vi=()=>t("svg",{width:"48",height:"49",viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M19 18.4307C19 17.4761 19 16.9988 19.1995 16.7324C19.3733 16.5001 19.6394 16.3549 19.9288 16.3342C20.2608 16.3105 20.6622 16.5686 21.4652 17.0848L30.9064 23.1541C31.6032 23.602 31.9516 23.826 32.0719 24.1108C32.177 24.3596 32.177 24.6404 32.0719 24.8892C31.9516 25.174 31.6032 25.398 30.9064 25.8459L21.4652 31.9152C20.6622 32.4314 20.2608 32.6895 19.9288 32.6658C19.6394 32.6451 19.3733 32.4998 19.1995 32.2676C19 32.0012 19 31.5239 19 30.5693V18.4307Z",stroke:"currentColor",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M6 16.1C6 12.7397 6 11.0595 6.65396 9.77606C7.2292 8.64708 8.14708 7.7292 9.27606 7.15396C10.5595 6.5 12.2397 6.5 15.6 6.5H32.4C35.7603 6.5 37.4405 6.5 38.7239 7.15396C39.8529 7.7292 40.7708 8.64708 41.346 9.77606C42 11.0595 42 12.7397 42 16.1V32.9C42 36.2603 42 37.9405 41.346 39.2239C40.7708 40.3529 39.8529 41.2708 38.7239 41.846C37.4405 42.5 35.7603 42.5 32.4 42.5H15.6C12.2397 42.5 10.5595 42.5 9.27606 41.846C8.14708 41.2708 7.2292 40.3529 6.65396 39.2239C6 37.9405 6 36.2603 6 32.9V16.1Z",stroke:"currentColor",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ui=()=>e("svg",{width:"48",height:"49",viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M24 41.4444C26.123 43.3446 28.9266 44.5 32 44.5C38.6274 44.5 44 39.1274 44 32.5C44 26.9662 40.2541 22.3072 35.1596 20.9203M12.8404 20.9203C7.74587 22.3072 4 26.9661 4 32.5C4 39.1274 9.37258 44.5 16 44.5C22.6274 44.5 28 39.1274 28 32.5C28 30.939 27.7019 29.4476 27.1596 28.0797M36 16.5C36 23.1274 30.6274 28.5 24 28.5C17.3726 28.5 12 23.1274 12 16.5C12 9.87258 17.3726 4.5 24 4.5C30.6274 4.5 36 9.87258 36 16.5Z",stroke:"currentColor",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})}),$i=t=>e(ne,Object.assign({component:Ti},t)),Wi=t=>e(ne,Object.assign({component:Oi},t)),Hi=t=>e(ne,Object.assign({component:Fi},t)),Gi=t=>e(ne,Object.assign({component:Pi},t)),Yi=t=>e(ne,Object.assign({component:Mi},t)),qi=t=>e(ne,Object.assign({component:Ri},t)),Xi=t=>e(ne,Object.assign({component:Li},t)),Ki=t=>e(ne,Object.assign({component:ji},t)),Zi=t=>e(ne,Object.assign({component:Di},t)),Ji=t=>e(ne,Object.assign({component:Ni},t)),Qi=t=>e(ne,Object.assign({component:zi},t)),eo=t=>e(ne,Object.assign({component:Bi},t)),to=t=>e(ne,Object.assign({component:Vi},t)),no=t=>e(ne,Object.assign({component:Ui},t)),ro=()=>{const{options:e}=ui(),{customIcons:t}=e,n=(e,n,r)=>{const o=null==t?void 0:t[e];return o?i.createElement(o,r):i.createElement(n,r)};return{RootFolderIcon:e=>n("rootFolder",ie,e),FolderIcon:e=>n("folder",ie,e),FolderOpenIcon:e=>n("folderOpen",pe,e),AddFolderIcon:e=>n("addFolder",fe,e),FileIcon:e=>n("file",he,e),UploadIcon:e=>n("upload",de,e),UploadByUrlIcon:e=>n("uploadByUrl",ue,e),ExpandArrowIcon:e=>n("expandArrow",ce,e),CollapseArrowIcon:e=>n("collapseArrow",le,e),ExpandFolderIcon:e=>n("expandArrow",Yr,e),CollapseFolderIcon:e=>n("collapseArrow",Gr,e),FolderPreviewIcon:e=>n("folderPreview",Ki,e),EmptyFolderIcon:e=>n("folderPreview",Zi,e),GridViewIcon:e=>n("gridView",se,e),ListViewIcon:e=>n("listView",ae,e),DropZoneFileIcon:e=>n("folderPreview",Ji,e),BigStockIcon:e=>n("folderPreview",Qi,e),BigAIIcon:e=>n("folderPreview",eo,e),GifPlayIcon:e=>n("folderPreview",to,e),StockBigIcon:e=>n("folderPreview",no,e),MixedViewIcon:e=>n("mixedView",$i,e),LandscapeViewIcon:e=>n("landscapeView",Wi,e),PortraitViewIcon:e=>n("portraitView",Hi,e),SquareViewIcon:e=>n("squareView",Gi,e),LightModeIcon:e=>n("lightMode",qi,e),DarkModeIcon:e=>n("darkMode",Xi,e),AiIcon_2:e=>n("aiIcon_2",Yi,e),getCustomIcon:n}};var io={headerContainer:"headerContainer",actionsContainer:"actionsContainer",filesContainer:"filesContainer",paginationContainer:"paginationContainer",uploadIcon:"uploadIcon",tableContainer:"tableContainer",imagePreview:"imagePreview",fileManagerTableFolder:"fileManagerTableFolder",fileManagerTableFolderInner:"fileManagerTableFolderInner",sortSelect:"sortSelect",fileNameCol:"fileNameCol",fileItemCount:"fileItemCount",fileSize:"fileSize",fileDate:"fileDate",tableMenu:"tableMenu",tableImagePreview:"tableImagePreview",tableFolderIcon:"tableFolderIcon",buttonDeselected:"buttonDeselected",gridRow:"gridRow",gridCard:"gridCard",selectedRow:"selectedRow",gridCardSelected:"gridCardSelected",gridCheckbox:"gridCheckbox",gridCardContent:"gridCardContent",gridPreviewContainer:"gridPreviewContainer",gridPreviewContainerFolder:"gridPreviewContainerFolder",gridFolderIcon:"gridFolderIcon",gridFolderIconImage:"gridFolderIconImage",gridFileName:"gridFileName",gridFileInfo:"gridFileInfo",gridFileMenu:"gridFileMenu",gridFileMenuButton:"gridFileMenuButton",actionsBox:"actionsBox",uploadContainer:"uploadContainer",uploadArea:"uploadArea",active:"active",blockText:"blockText",textTitle:"textTitle",textDescription:"textDescription",buttons:"buttons",btnAi:"btnAi",btnPhoto:"btnPhoto",dragOverlay:"dragOverlay",dragOverlayInner:"dragOverlayInner",noFiles:"noFiles"};const{Text:oo}=P,{Option:ao}=M,so=({files:r,searchTerm:s,handleSearch:l,handleSort:d,sortBy:h,sortOrder:f,handleSortOptionChange:p,pagination:g,setPagination:m,loading:v,handleItemClick:y,selectedFiles:b,toggleFileSelection:w,handleDroppedFiles:x,onRename:C,onDelete:_,onCopy:S,onMove:k,onEdit:A,fileUpload:I,handleAddFile:T})=>{var O,F,P;const{t:G}=Nn(),{DropZoneFileIcon:Y,BigStockIcon:q,BigAIIcon:X,FolderIcon:K}=ro(),{options:Z,actions:J}=ui();gi();const Q=null===(O=null==Z?void 0:Z.config)||void 0===O?void 0:O.disablePagination,{dataProviders:ee}=Z,{setCurrentMenuFile:te,setSelectedFiles:ne,setActiveLibraryItem:re}=J,{viewMode:ie,setViewMode:oe}=(()=>{const[e,t]=o(()=>{try{return localStorage.getItem(Ii)||"table"}catch(e){return"table"}}),n=c(e=>{t(e);try{localStorage.setItem(Ii,e)}catch(e){console.warn("Не удалось сохранить режим отображения:",e)}},[]),r=c(()=>{n("table"===e?"grid":"table")},[e,n]);return{viewMode:e,setViewMode:n,toggleViewMode:r}})(),[ae,se]=o(!1),[le,ce]=o({}),[ue,de]=o(null),[he,fe]=o(!1),pe=u(0);a(()=>{const e=()=>{fe(window.innerWidth<1200)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const ge=b.size,me=(null===(F=Z.config)||void 0===F?void 0:F.features)||{},ve=i.useMemo(()=>Array.from(b)[0],[b]),ye=i.useMemo(()=>ve?r.find(e=>e.id===ve):void 0,[ve,r]),be=(null==ye?void 0:ye.isFolder)?!1!==(null==me?void 0:me.enableRenameFolder):!1!==(null==me?void 0:me.enableRenameFile),we=null===(P=Z.config)||void 0===P?void 0:P.iconStrokeWidth,xe=i.useMemo(()=>{var e,t;if(1!==ge||!ye||ye.isFolder)return!1;let n=!1;if(ye.type&&ye.type.startsWith("image/"))n=!0;else if(ye.extension){const e=ye.extension.toLowerCase();n=on.includes(e)}else{const t=null===(e=ye.name.split(".").pop())||void 0===e?void 0:e.toLowerCase();n=!!t&&on.includes(t)}return console.warn("isImageSelected проверка:",{fileName:ye.name,fileType:ye.type,fileExtension:ye.extension,nameExtension:null===(t=ye.name.split(".").pop())||void 0===t?void 0:t.toLowerCase(),isImage:n,IMAGE_EXTENSIONS:on}),n},[ge,ye]),Ce=`${h}-${f}`,_e=i.useMemo(()=>Array.isArray(r)&&r.some(e=>(e=>{if(!e)return!1;const t=new Date(e);return!Number.isNaN(t.getTime())})(e.date)),[r]),Se=c(async e=>{try{if(null==ee?void 0:ee.getChildrenCount)return await ee.getChildrenCount("folders"===e?void 0:e);if(null==ee?void 0:ee.getFiles){const{files:t,pagination:n}=await ee.getFiles({folderId:"folders"===e?void 0:e,itemType:"all"});return(null==n?void 0:n.total)||t.filter(e=>!e.isFolder).length}return 0}catch(t){return console.error(`Ошибка при получении количества файлов для папки ${e}:`,t),0}},[ee]),ke=c(async()=>{const e=r.filter(e=>e.isFolder);if(0===e.length)return;const t={},n=e.map(async e=>{t[e.id]=await Se(e.id)});await Promise.all(n),ce(t)},[r,Se]);a(()=>{ke()},[ke]);const Ae=c(e=>{e.preventDefault(),e.stopPropagation(),pe.current+=1,e.dataTransfer.types&&e.dataTransfer.types.includes("Files")&&se(!0)},[]),Ee=c(e=>{e.preventDefault(),e.stopPropagation(),pe.current-=1,0===pe.current&&se(!1)},[]),Ie=c(e=>{e.preventDefault(),e.stopPropagation()},[]),Te=c(e=>{if(e.preventDefault(),e.stopPropagation(),se(!1),pe.current=0,e.dataTransfer.files&&e.dataTransfer.files.length>0){const t=Array.from(e.dataTransfer.files);x(t).catch(e=>{console.error("Ошибка при загрузке файлов:",e)})}},[x]),Oe=c((e=()=>{})=>{if(ue)return;const t=setTimeout(()=>{e(),de(null)},300);de(t)},[ue]),Fe=c(e=>{ue&&(clearTimeout(ue),de(null)),e()},[ue]),Pe=c(t=>{const n=[];t.isFolder||!1===(null==me?void 0:me.enableEdit)||n.push({key:"edit",label:G("Edit"),icon:e($r,{size:16,strokeWidth:we})}),(t.isFolder?!1!==(null==me?void 0:me.enableMoveFolder):!1!==(null==me?void 0:me.enableMoveItem))&&n.push({key:"move",label:G("Move to"),icon:e(Hr,{size:16,strokeWidth:we})}),(t.isFolder?!1!==(null==me?void 0:me.enableCopyFolder):!1!==(null==me?void 0:me.enableCopyItem))&&n.push({key:"copy",label:G("Copy"),icon:e(Ur,{size:16,strokeWidth:we})});return(t.isFolder?!1!==(null==me?void 0:me.enableRenameFolder):!1!==(null==me?void 0:me.enableRenameFile))&&n.push({key:"rename",label:G("Rename"),icon:e(ri,{size:16,strokeWidth:we})}),!1!==me.enableDelete&&n.push({key:"delete",label:G("Delete"),icon:e(ii,{size:16,strokeWidth:we}),style:{color:"#ff4d4f"}}),n},[me,G,we]),Me=e=>({key:t})=>{const n=r.find(t=>t.id===e);switch(te&&(null==n?void 0:n.id)&&te(null==n?void 0:n.id),t){case"edit":A(n);break;case"move":k();break;case"copy":S();break;case"rename":C(e);break;case"delete":_(n);break;default:te&&te("")}},Re=[{key:"selection",width:46,render:(t,n)=>e(R,{checked:b.has(n.id),onChange:()=>w(n.id)})},{key:"preview",width:60,render:(t,n)=>n.isFolder?e("div",{className:io.fileManagerTableFolder,children:e("div",{className:io.fileManagerTableFolderInner,children:e(K,{className:io.tableFolderIcon,style:{width:40,height:40}})})}):e(Ei,{className:`${io.imagePreview} ${io.tableImagePreview}`,src:n.thumbnail||n.thumbnailUrl||n.url,alt:n.name,width:40,height:40,preview:!0,file:n})},{title:G("Name"),width:"calc(100% - 430px)",dataIndex:"name",key:"name",className:io.fileNameCol,render:(e,n)=>{const r=n.isFolder&&le[n.id]||0,i=G(1===r?"item":"items");return t("div",{className:io.fileName,children:[e||G("No name"),n.isFolder&&t("div",{className:io.fileItemCount,children:[r," ",i]})]})}},{title:G("Dimensions"),key:"dimensions",width:100,render:(t,n)=>n.dimensions&&e("div",{className:io.fileSize,children:n.dimensions})},{title:G("Size"),key:"size",width:90,render:(t,n)=>!!(null==n?void 0:n.size)&&!n.isFolder&&e("div",{className:io.fileSize,children:`${(n.size/1e6).toFixed(2)}MB`})},{title:G("Type"),key:"type",width:90,render:(t,n)=>e("div",{className:io.fileSize,children:n.isFolder?G("Folder"):(null==n?void 0:n.extension)||""})},..._e?[{title:G("Date"),dataIndex:"date",key:"date",width:180,render:(t,n)=>{const r=n.date;if(!r)return null;const i=new Date(r);if(isNaN(i.getTime()))return null;const o=e=>`${e.getDate()} ${[G("months.january"),G("months.february"),G("months.march"),G("months.april"),G("months.may"),G("months.june"),G("months.july"),G("months.august"),G("months.september"),G("months.october"),G("months.november"),G("months.december")][e.getMonth()]} ${e.getFullYear()}`;return e(L,{title:G("Added",{date:o(i)}),placement:"bottom",className:io.fileDate,children:G("Added",{date:o(i)})})}}]:[],{width:40,title:"",dataIndex:"",key:"x",onCell:()=>({style:{padding:0}}),render:(t,n)=>e(j,{arrow:!0,placement:"bottom",menu:{items:Pe(n),onClick:Me(n.id)},trigger:["hover"],children:e("span",{className:`${io.tableMenu} tableMenuButton`,onClick:e=>{e.stopPropagation(),e.preventDefault()},children:e(Wr,{size:16,strokeWidth:we})})})}],Le="table"===ie?e(E,{renderEmpty:()=>e(U,{image:e(n,{}),description:""}),children:e(V,{dataSource:r,columns:Re,rowKey:"id",pagination:!1,loading:v,rowClassName:e=>(null==b?void 0:b.has(e.id))?io.selectedRow:"",tableLayout:"fixed",onRow:e=>({onClick:t=>{const n=t.target;Oe(()=>{t.stopPropagation(),t.preventDefault();const r=!!n.closest(".ant-image")||!!n.closest(".ant-image-preview-wrap"),i=!!n.closest(".tableMenuButton"),o=!!n.closest(".ant-dropdown-menu");r||i||o||w(e.id,{metaKey:t.metaKey,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey})})},onDoubleClick:t=>{Fe(()=>{t.stopPropagation(),t.preventDefault();const n=t.target;n.closest(".ant-checkbox-wrapper")||n.closest(".tableMenu")||(e.isFolder?y(e):n.closest(".ant-image")||n.closest(".ant-image-preview-wrap")||!Z.onEditorOk||(console.warn("onEditorOk"),Z.onEditorOk(e)))})}}),showHeader:!1})}):e($,{gutter:[16,16],className:io.gridRow,style:{gap:20,padding:"0 24px 24px",margin:0},children:r.map(r=>e(W,{className:io.gridCard_col,style:{padding:0},children:t(H,{hoverable:!0,cover:e("div",{className:r.isFolder?io.gridPreviewContainerFolder:io.gridPreviewContainer,onClick:e=>{e.stopPropagation(),r.isFolder&&Oe(()=>{w(r.id,{metaKey:e.metaKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey})})},onDoubleClick:e=>{e.stopPropagation(),Fe(()=>{r.isFolder&&y(r)})},children:r.isFolder?e("div",{className:io.gridFolderIcon,children:e(K,{className:io.gridFolderIconImage})}):e(Ei,{src:r.thumbnail||r.thumbnailUrl||r.url,alt:r.name,className:io.gridImagePreview,preview:!0,file:r})}),className:`${io.gridCard} ${(null==b?void 0:b.has(r.id))?io.gridCardSelected:""}`,onClick:e=>{e.stopPropagation(),e.preventDefault();const t=e.target;t.closest(".gridFileMenuButton")||t.closest(".ant-dropdown-menu")||Oe(()=>w(r.id,{metaKey:e.metaKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey}))},onDoubleClick:e=>{e.stopPropagation(),Fe(()=>{r.isFolder&&y(r)})},children:[t("div",{className:io.gridCardContent,onDoubleClick:e=>{e.stopPropagation(),e.preventDefault(),Fe(()=>{Z.onEditorOk&&Z.onEditorOk(r)})},onClick:e=>{e.stopPropagation(),e.preventDefault();const t=e.target;t.closest(".gridFileMenuButton")||t.closest(".ant-dropdown-menu")||Oe(()=>w(r.id,{metaKey:e.metaKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey}))},children:[e("div",{className:io.gridFileName,children:r.name||G("Untitled")}),e("div",{className:io.gridFileInfo,children:r.isFolder?(()=>{const e=le[r.id]||0;return`${e} ${G(1===e?"item":"items")}`})():t(n,{children:[r.dimensions&&`${r.dimensions} • `,r.size&&`${(r.size/1e6).toFixed(2)} MB • `,r.extension&&`${r.extension}`]})})]}),e("div",{className:io.gridFileMenu,children:e(j,{menu:{items:Pe(r),onClick:Me(r.id)},arrow:!0,placement:"bottom",trigger:["hover"],children:e(D,{type:"default",className:`${io.gridFileMenuButton} gridFileMenuButton`,onClick:()=>{},children:e(Wr,{size:16,strokeWidth:we})})},r.id)}),e("div",{onClick:e=>{e.stopPropagation()},className:io.gridCheckbox,children:e(R,{checked:b.has(r.id),style:{height:20},onChange:e=>{e.stopPropagation(),w(r.id)}})})]})},r.id))});return e("div",{className:"content-layout",children:t("div",{className:io.filesContainer,onDragOver:Ie,onDragLeave:Ee,onDragEnter:Ae,onDrop:Te,children:[ae&&0!==(null==r?void 0:r.length)&&e("div",{className:io.dragOverlay,children:t("div",{className:io.dragOverlayInner,children:[e("div",{className:io.uploadIcon,children:e(Y,{})}),e("div",{className:io.textTitle,children:G("Drop files to upload")}),e("div",{className:io.textDescription,children:G("Supported files:")+" jpeg, .svg, .png"})]})}),v||0!==(null==r?void 0:r.length)||s?t("div",{className:io.tableContainer,children:[t("div",ge?{className:`header-container ${io.headerContainer}`,children:[t(oo,{type:"secondary",className:"selected-text",children:[t("div",{children:[ge," ",G("selected")]}),e(L,{title:he?G("Deselected"):null,children:e(D,{className:io.buttonDeselected,icon:e(ei,{size:16,strokeWidth:we}),onClick:()=>ne&&ne(new Set),children:G("Deselected")})})]}),t(N,{children:[xe&&!1!==(null==me?void 0:me.enableEdit)&&e(L,{title:he?G("Edit"):null,children:e(D,{icon:e($r,{size:16,strokeWidth:we}),onClick:()=>{A(ye)},disabled:!xe,children:G("Edit")})}),Array.from(b).every(e=>{const t=r.find(t=>t.id===e);return!!t&&(t.isFolder?!1!==(null==me?void 0:me.enableMoveFolder):!1!==(null==me?void 0:me.enableMoveItem))})&&e(L,{title:he?G("Move to"):null,children:e(D,{icon:e(Hr,{size:16,strokeWidth:we}),onClick:k,children:G("Move to")})}),Array.from(b).every(e=>{const t=r.find(t=>t.id===e);return!!t&&(t.isFolder?!1!==(null==me?void 0:me.enableCopyFolder):!1!==(null==me?void 0:me.enableCopyItem))})&&e(L,{title:he?G("Copy"):null,children:e(D,{icon:e(Ur,{size:16,strokeWidth:we}),onClick:S,children:G("Copy")})}),1===ge&&be&&e(L,{title:he?G("Rename"):null,children:e(D,{icon:e(ri,{size:16,strokeWidth:we}),onClick:()=>C(),disabled:1!==ge||!be,children:G("Rename")})}),!1!==(null==me?void 0:me.enableDelete)&&e(L,{title:he?G("Delete"):null,children:e(D,{danger:!0,icon:e(ii,{size:16,strokeWidth:we}),onClick:e=>{e.stopPropagation(),e.preventDefault(),_()},children:G("Delete")})})]})]}:{className:io.headerContainer,children:[e("div",{className:"search-container",children:e(_i,{placeholder:G("Search file or folder"),onSearch:l,className:io.searchInput})}),t("div",{className:io.actionsBox,children:[e("div",{className:"sort-container",children:t(M,{value:Ce,onChange:p,className:io.sortSelect,popupMatchSelectWidth:!1,suffixIcon:e(Br,{size:16,strokeWidth:we}),children:[e(ao,{value:"date-desc",children:G("Newest first")}),e(ao,{value:"date-asc",children:G("Oldest first")}),e(ao,{value:"size-desc",children:G("Largest first")}),e(ao,{value:"size-asc",children:G("Smallest first")}),e(ao,{value:"name-asc",children:G("A-Z")}),e(ao,{value:"name-desc",children:G("Z-A")}),e(ao,{value:"type-asc",children:G("By type")})]})}),e("div",{className:io.actionsContainer,children:e(z,{options:[{value:"grid",icon:e(qr,{size:16,strokeWidth:we})},{value:"table",icon:e(Zr,{size:20,strokeWidth:we})}],value:ie,onChange:e=>oe(e)})})]})]}),s&&!r.length?e("div",{className:io.noFiles,children:G("There are no files for your request.")}):Le,!Q&&g.total>g.pageSize&&e("div",{className:io.paginationContainer,children:e(B,{current:g.current,pageSize:g.pageSize,total:g.total,onChange:(e,t)=>m({current:e,pageSize:t,total:g.total}),showSizeChanger:!0,showTotal:e=>G("total pages",{total:e})})})]}):t("div",{className:io.uploadContainer,children:[t("div",{className:`${io.uploadArea} ${ae?io.active:""}`,onClick:T,onDragOver:Ie,onDragLeave:Ee,onDragEnter:Ae,onDrop:Te,children:[e("div",{className:io.uploadIcon,children:e(Y,{})}),e("div",{className:io.textTitle,children:G("Select a file or drag and drop it here")}),e("div",{className:io.textDescription,children:G("Supported files:")+" jpeg, .svg, .png"})]}),t("div",{className:io.buttons,children:[t("button",{className:io.btnPhoto,onClick:()=>{re&&re(Kt)},children:[e("div",{className:io.icon,children:e(q,{})}),t("div",{className:io.blockText,children:[e("div",{className:io.textTitle,children:G("Stock")}),e("div",{className:io.textDescription,children:G("Select an image from our library")})]})]}),t("button",{className:io.btnAi,onClick:()=>{re&&re(Zt)},children:[e("div",{className:io.icon,children:e(X,{})}),t("div",{className:io.blockText,children:[e("div",{className:io.textTitle,children:G("AI generation")}),e("div",{className:io.textDescription,children:G("Creating an image on demand")})]})]})]})]})]})})};var lo={"em-filemanager":"em-filemanager",folderTree:"folderTree",emptyFolderContainer:"emptyFolderContainer",folderItemContainer:"folderItemContainer",folderLabel:"folderLabel",folderLabelItem:"folderLabelItem",fileCount:"fileCount",foldersTitle:"foldersTitle",foldersTitleItem:"foldersTitleItem",folderSelectionTree:"folderSelectionTree",folderMenu:"folderMenu",folderIcon:"folderIcon"};const co=({selectedFolder:n,onSelect:r,onExpand:i,generateMenuItems:a,fetchChildFolders:s,disabledFolders:l=[],showFileCounts:u=!1,folderFileCounts:h={},className:f="",expandedKeys:p,setExpandedKeys:g,showTrashFolder:m=!1,mode:v="navigation",defaultExpandAll:y=!1})=>{const{t:b}=Nn(),{options:w}=ui(),{config:x}=w,{ExpandArrowIcon:C,CollapseArrowIcon:_,CollapseFolderIcon:S,ExpandFolderIcon:k,EmptyFolderIcon:A}=ro(),E=c(e=>{const t=[],n=e=>{e.forEach(e=>{t.push(e.key),e.children&&n(e.children)})};return n(e),t},[]),[I,T]=o(()=>{if(y||"selection"===v&&y){const e=a();return E(e)}return[]}),O=void 0!==p?p:I,F=void 0!==g?g:T,P=c(async e=>{const t=e[0];t&&"empty"!==t&&(null==r||r(e),await(null==s?void 0:s("folders"===t?null:t)))},[r,s]),M=c(async(e,t)=>{var n;F(e),null==i||i(e,t);if(!("lazy"===(null==x?void 0:x.folderTreeLoading)))return;const r=(null===(n=null==t?void 0:t.node)||void 0===n?void 0:n.key)||void 0;if(r&&"folders"!==r)try{await(null==s?void 0:s(r))}catch(e){console.warn("Failed to load child folders for",r,e)}},[null==x?void 0:x.folderTreeLoading,s,i,F]),R=c(()=>{var r;const i=a(),o=e=>e.filter(e=>"Trash"!==e.key).map(e=>Object.assign(Object.assign({},e),{children:e.children?o(e.children):void 0})),s=m?o(i):i,c=e=>{"selection"!==v?(O.includes(e)&&n===e?F(O.filter(t=>t!==e)):O.includes(e)||F([...O,e]),n!==e&&P([e])):P([e])};if(0===s.length||1===s.length&&(!s[0].children||0===s[0].children.length))return[{key:"empty",title:e("div",{className:lo.emptyFolderContainer,children:b("No folders yet")}),disabled:!0}];const d=n=>{var r;const i=u&&h[n.key]||0,o=O.includes(n.key),a=l.includes(n.key),s=(()=>{var t;return(null===(t=n.children)||void 0===t?void 0:t.length)?e(o?S:k,{size:20,strokeWidth:null==x?void 0:x.iconStrokeWidth}):e(A,{size:20,strokeWidth:null==x?void 0:x.iconStrokeWidth})})(),f=t("div",{className:`${lo.folderItemContainer} folder-item-container`,onClick:()=>!a&&c(n.key),style:{opacity:a?.5:1,cursor:a?"not-allowed":"pointer"},children:[t("div",{className:lo.folderLabel,children:[n.icon||s,e("span",{className:lo.folderLabelItem,children:n.label})]}),u&&e("div",{className:lo.fileCount,title:`${i} ${1===i?"file":"files"}`,children:i})]});return{key:n.key,title:f,children:null===(r=n.children)||void 0===r?void 0:r.map(d),disabled:a}},f=O.includes("folders"),p=e("div",{className:lo.foldersTitle,onClick:()=>c("folders"),children:t("div",{className:lo.foldersTitleItem,children:[e(f?S:k,{size:20,strokeWidth:null==x?void 0:x.iconStrokeWidth}),e("span",{className:`${lo.folderLabelItem} folder-label-item`,children:"folders"===s[0].key?s[0].label:b("Folders")})]})});if(s.length>0&&"folders"===s[0].key){const n=[{key:"folders",title:p,children:null===(r=s[0].children)||void 0===r?void 0:r.map(d)}];return m&&n.push({key:"Trash",title:e("div",{className:lo.foldersTitle,onClick:()=>c("Trash"),children:t("div",{className:lo.foldersTitleItem,children:[e(ii,{size:20,strokeWidth:null==x?void 0:x.iconStrokeWidth}),e("span",{className:lo.folderLabelItem,children:b("Trash")})]})}),children:void 0}),n}return s.map(d)},[a,O,S,null==x?void 0:x.iconStrokeWidth,k,b,n,P,u,h,A,l,m,v,F]),L=d(()=>R(),[R]);return e(G,{className:`${lo.folderTree} ${lo.folderMenu} ${lo[f]}`,selectedKeys:n?[n]:[],expandedKeys:O,onSelect:P,onExpand:M,treeData:L,switcherIcon:({expanded:t})=>e(t?_:C,{}),showLine:!1})};var uo={formFooter:"formFooter",folderButton:"folderButton",foldersWrapper:"foldersWrapper",formItem:"formItem",folderToolsField:"folderToolsField"};const ho=f(({folderId:r,activeFormField:i,EmptyFolderIcon:o,targetForm:a,handleModalOk:s,onComplete:l,t:u})=>{const d=c(()=>{a.setFieldsValue({folderName:""})},[a]),h=c(()=>{s(a).then(e=>{l(null==e?void 0:e.id)})},[s,a,l]);return e(T.Item,{className:"form-item form-item-moveto "+(i===r?"form-item_active":""),name:"folderName",initialValue:u("New folder"),rules:[{required:!0,validator:(e,t)=>"string"==typeof t&&0===t.trim().length?Promise.reject(new Error(u("Enter the name of the folder"))):Promise.resolve()}],children:e(O,{className:"form-input",autoFocus:!0,prefix:e(o,{style:{marginRight:6}}),suffix:t(n,{children:[e(L,{placement:"top",title:"Clean",children:e(D,{icon:e(ge,{style:{fontSize:10}}),className:uo.inputButtonClose,type:"text",onClick:d})}),e(D,{className:uo.inputButtonOk,type:"text",onClick:h,children:"Создать"})]})})})});ho.displayName="CustomFolderInput";const fo=({isModalVisible:r,handleModalOk:i,handleModalCancel:a,form:s,selectedFolder:l,folders:u,isUrlModalVisible:h,setIsUrlModalVisible:f,handleAddFileByUrl:p,urlForm:g,isRenameModalVisible:m,handleRenameOk:v,handleRenameCancel:y,renameForm:b,fileToRename:w,files:x,isMoveModalVisible:C,handleMoveOk:_,handleMoveCancel:S,moveForm:k,selectedFiles:A,isRenameFolderModalVisible:E,handleRenameFolderOk:I,handleRenameFolderCancel:F,renameFolderForm:P,folderToRename:M,isCopyModalVisible:R,handleCopyOk:L,handleCopyCancel:j,copyForm:N,isDeleteConfirmVisible:z,handleDeleteConfirmOk:B,handleDeleteConfirmCancel:V,fetchChildFolders:U})=>{var $,W,H;const{t:G}=Nn(),{state:q,actions:X,options:K}=ui(),{setCurrentMenuFile:Z}=X,{config:J}=K,{currentMenuFile:Q}=q,ee=T.useWatch("folderName",s),{EmptyFolderIcon:te}=ro(),[ne,re]=o(""),ie=!ee||0===String(ee).trim().length,oe=d(()=>Array.isArray(x)?x:[],[x]),ae=w?null===($=oe.find(e=>e.id===w))||void 0===$?void 0:$.name:"",se=Array.isArray(u)?u:[],le=M?null===(W=se.find(e=>e.id===M))||void 0===W?void 0:W.name:"",ce=w?oe.find(e=>e.id===w):null,ue=(null==ce?void 0:ce.isFolder)||(null==w?void 0:w.startsWith("folder_")),de=c(async e=>{e.length>0&&(k.setFieldsValue({targetFolder:e[0]}),ne!==e[0].toString()&&re(""))},[k,ne]),he=c(async e=>{e.length>0&&(N.setFieldsValue({targetFolder:e[0]}),ne!==e[0].toString()&&re(""))},[ne,N]),fe=d(()=>Array.from(A).filter(e=>{const t=oe.find(t=>t.id===e);return(null==t?void 0:t.isFolder)||u.some(t=>t.id===e)}),[A,oe,u]),pe=c((t,n)=>{const r=r=>e(ho,{folderId:r,activeFormField:ne,EmptyFolderIcon:te,targetForm:t,handleModalOk:i,onComplete:n,t:G},r);return r.displayName="CustomInputComponent",r},[te,ne,i,G]),ge=c(e=>{const{folderId:t,targetForm:n,onTreeSelect:r,onComplete:i}=e;return{handleAddFolder:e=>{e.preventDefault(),e.stopPropagation(),re(t),n.setFieldsValue({folderName:G("New folder"),targetFolder:t})},handleSelectFolder:e=>{e.preventDefault(),e.stopPropagation(),r([t]).then(()=>i(t))}}},[G]),me=c(r=>{const{targetForm:i,onTreeSelect:o,onComplete:a,actionButtonText:s}=r,c=pe(i,a),d=(r=null,h=new Set)=>u.filter(e=>{const t=null===r&&!e.parentId,n=e.parentId===r;return t||n}).map(r=>{if(h.has(r.id))return{key:r.id,label:`${r.name} (циклическая ссылка)`};const u=new Set(h);u.add(r.id);const f=d(r.id,u),{handleAddFolder:p,handleSelectFolder:g}=ge({folderId:r.id,targetForm:i,onTreeSelect:o,onComplete:a});return{key:r.id,label:t(n,{children:[r.name,l!==r.id&&t("div",{className:`${uo.folderToolsField} folder-tools-field`,children:[e(D,{onClick:p,children:"+"}),e(D,{onClick:g,children:s})]}),ne===r.id&&c(r.id)]}),children:f.length>0?f:void 0}}),h=d(),{handleAddFolder:f,handleSelectFolder:p}=ge({folderId:"folders",targetForm:i,onTreeSelect:o,onComplete:a});return[{key:"folders",label:t(n,{children:[G("Folders"),"folders"!==l&&null!==l&&t("div",{className:`${uo.folderToolsField} folder-tools-field`,children:[e(D,{onClick:f,children:"+"}),e(D,{onClick:p,children:s})]}),"folders"===ne&&c("folders")]}),children:h}]},[G,l,ne,u,pe,ge]);return t(n,{children:[e(Y,{title:e("div",{className:"modal-title",children:G("Creating a new folder")}),open:r,onOk:()=>i(),onCancel:a,okText:G("Create"),cancelText:G("Cancel"),okButtonProps:{disabled:ie},children:t(T,{form:s,layout:"vertical",children:[e(T.Item,{name:"folderName",label:e("div",{className:"form-label",children:G("Folder name")}),rules:[{required:!0,validator:(e,t)=>"string"==typeof t&&0===t.trim().length?Promise.reject(new Error(G("Enter the name of the folder"))):Promise.resolve()}],initialValue:G("New folder"),className:"form-item",style:{marginBottom:5},children:e(O,{autoFocus:!0,className:"form-input"})}),e("div",{children:l&&"folders"!==l?t("p",{className:"fm-note",children:[G("A folder will be created inside:")," ",(null===(H=se.find(e=>e.id===l))||void 0===H?void 0:H.name)||G("selected folder"),"."]}):e("p",{className:"fm-note",children:G("The folder will be created in the root directory.")})})]})}),e(Y,{title:e("div",{className:"modal-title",children:G("Upload file by URL")}),open:h,onOk:()=>p(null),onCancel:()=>f(!1),okText:G("Download"),cancelText:G("Cancel"),children:e(T,{form:g,layout:"vertical",children:e(T.Item,{name:"fileUrl",label:e("div",{className:"form-label",children:G("File URL")}),rules:[{required:!0,message:G("Enter the URL of the image")}],className:"form-item",children:e(O,{autoFocus:!0,placeholder:"https://example.com/image.jpg",className:"form-input"})})})}),e(Y,{title:e("div",{className:"modal-title",children:ue?`${G("Rename folder")} ${ae}`:G("Rename file",{currentFileName:ae})}),open:m,onOk:v,onCancel:y,okText:G("Rename"),cancelText:G("Cancel"),afterClose:()=>{Z&&Z("")},children:e(T,{form:b,layout:"vertical",children:e(T.Item,{name:"newFileName",label:e("div",{className:"form-label",children:G(ue?"New folder name":"New file name")}),rules:[{required:!0,message:G(ue?"Enter a new folder name":"Enter a new file name")}],className:"form-item",children:e(O,{autoFocus:!0,className:"form-input"})})})}),e(Y,{title:e("div",{className:"modal-title",children:G("Move to")}),open:C,onCancel:S,footer:t("div",{className:uo.formFooter,children:[t(D,{className:uo.folderButton,onClick:()=>i(k),children:[e(Yr,{size:18,strokeWidth:null==J?void 0:J.iconStrokeWidth}),G("Create folder")]}),e(D,{type:"primary",className:uo.folderButton,onClick:S,children:G("Done")})]}),afterClose:()=>{Z&&Z(""),re("")},children:e(T,{form:k,layout:"vertical",children:e("div",{className:uo.foldersWrapper,children:e(T.Item,{name:"targetFolder",rules:[{required:!0,message:G("Select the destination folder")}],className:uo.formItem,children:e(co,{onSelect:de,generateMenuItems:()=>me({targetForm:k,onTreeSelect:de,onComplete:_,actionButtonText:G("Move here")}),fetchChildFolders:U,disabledFolders:fe,mode:"selection",className:uo.folderSelectionTree,defaultExpandAll:!0})})})})}),e(Y,{title:e("div",{className:"modal-title",children:G("Copy to folder")}),open:R,onCancel:j,footer:t("div",{className:uo.formFooter,children:[t(D,{className:uo.folderButton,onClick:()=>i(N),children:[e(Yr,{size:18,strokeWidth:null==J?void 0:J.iconStrokeWidth}),G("Create folder")]}),e(D,{type:"primary",className:uo.folderButton,onClick:j,children:G("Done")})]}),afterClose:()=>{Z&&Z(""),re("")},children:e(T,{form:N,layout:"vertical",children:e("div",{className:uo.foldersWrapper,children:e(T.Item,{name:"targetFolder",rules:[{required:!0,message:G("Select the destination folder")}],className:uo.formItem,children:e(co,{onSelect:he,generateMenuItems:()=>me({targetForm:N,onTreeSelect:he,onComplete:L,actionButtonText:G("Copy here")}),fetchChildFolders:U,disabledFolders:fe,mode:"selection",className:uo.folderSelectionTree,defaultExpandAll:!0})})})})}),e(Y,{title:t("div",{className:"modal-title",children:[G("Rename folder")," ",le]}),open:E,onOk:I,onCancel:F,okText:G("Rename"),cancelText:G("Cancel"),afterClose:()=>{Z&&Z("")},children:e(T,{form:P,layout:"vertical",children:e(T.Item,{name:"newFolderName",label:e("div",{className:"form-label",children:G("New folder name")}),rules:[{required:!0,message:G("Enter a new folder name")}],className:"form-item",children:e(O,{autoFocus:!0,className:"form-input"})})})}),e(Y,{title:(()=>{const t=!!(null==J?void 0:J.enableTrashFolder)&&"Trash"===l||!(null==J?void 0:J.enableTrashFolder),n=G(t?"Permanently delete":"Move to Trash");return e("div",{className:"modal-title",children:n})})(),open:!!z,onOk:()=>B&&B(),onCancel:()=>V&&V(),okText:(null==J?void 0:J.enableTrashFolder)&&"Trash"===l?G("Delete permanently"):(null==J?void 0:J.enableTrashFolder)?G("Move to Trash"):G("Delete"),cancelText:G("Cancel"),okButtonProps:{danger:!(null==J?void 0:J.enableTrashFolder)||"Trash"===l},afterClose:()=>{Z&&Z("")},children:(()=>{var t,n;const r=(Q?[Q]:Array.from(A||[])).map(e=>oe.find(t=>t.id===e)).filter(e=>!!e),i=r.filter(e=>e.isFolder||e.id.startsWith("folder_")),o=r.filter(e=>!(e.isFolder||e.id.startsWith("folder_"))),a=r.length,s=i.length,c=o.length,u=!!(null==J?void 0:J.enableTrashFolder);if(!u||u&&"Trash"===l){if(1===a&&1===s){const n=i[0],r=(null==n?void 0:n.name)||"",o=null!==(t=null==n?void 0:n.childCount)&&void 0!==t?t:0;return e("div",{children:G("delete_folder_permanent",{name:r,count:o})})}return e("div",0===s&&c>0?{children:G("delete_files_permanent",{count:c})}:{children:G("delete_mixed_permanent",{total:a,folders:s,images:c})})}if(1===a&&1===s){const t=i[0],r=(null==t?void 0:t.name)||"",o=null!==(n=null==t?void 0:t.childCount)&&void 0!==n?n:0;return e("div",{children:G("move_folder_to_trash",{name:r,count:o})})}return e("div",0===s&&c>0?{children:G("move_files_to_trash",{count:c})}:{children:G("move_mixed_to_trash",{total:a,folders:s,images:c})})})()})]})};var po={button:"button",folderActions:"folderActions",uploadButton:"uploadButton",folderMenu:"folderMenu",foldersContainer:"foldersContainer",buttonWrapper:"buttonWrapper",uploadButtonTitle:"uploadButtonTitle"};const go=f(p(({selectedFolder:n,generateMenuItems:r,onFolderSelect:i,folders:s,fetchFolders:l,fetchChildFolders:h,handleAddFile:f,setIsUrlModalVisible:p,handleCreateFolder:m,activeLibraryItem:v,setActiveLibraryItem:y},b)=>{const w=d(()=>Array.isArray(s)?s:[],[s]),{t:x}=Nn(),C=gi(),[_,S]=o({}),{options:k}=ui(),{dataProviders:A,config:E}=k;ro();const I=c(e=>{const t=[],n=e=>{e.forEach(e=>{t.push(e.key),e.children&&n(e.children)})};return n(e),t},[]),[T,O]=o(()=>{if(!0===(null==E?void 0:E.expandAllFoldersOnInit)&&"lazy"!==(null==E?void 0:E.folderTreeLoading)){const e=r();return I(e)}return!0===(null==E?void 0:E.expandRootFolderOnInit)?["folders"]:[]}),F=u(!1),P=u(!1);a(()=>{if(F.current)return;"lazy"===(null==E?void 0:E.folderTreeLoading)&&!0===(null==E?void 0:E.expandRootFolderOnInit)&&(F.current=!0,(async()=>{try{await(null==h?void 0:h(null))}catch(e){console.warn("Не удалось подгрузить дочерние папки корня при инициализации",e)}})())},[null==E?void 0:E.folderTreeLoading,null==E?void 0:E.expandRootFolderOnInit,h]),a(()=>{!0===(null==E?void 0:E.expandRootFolderOnInit)&&Array.isArray(w)&&w.length>0&&(P.current||(P.current=!0,O(["folders"])))},[null==E?void 0:E.expandRootFolderOnInit,w]),a(()=>{if(!0===(null==E?void 0:E.expandAllFoldersOnInit)&&"lazy"!==(null==E?void 0:E.folderTreeLoading)){const e=r(),t=I(e);return void O(t)}!0===(null==E?void 0:E.expandRootFolderOnInit)&&O(e=>e&&e.length>0?[...e]:["folders"])},[w,r,I,null==E?void 0:E.expandAllFoldersOnInit,null==E?void 0:E.folderTreeLoading,null==E?void 0:E.expandRootFolderOnInit]);const M=c(async e=>{try{if(null==A?void 0:A.getChildrenCount)return await A.getChildrenCount("folders"===e?void 0:e);if(null==A?void 0:A.getFiles){const{files:t,pagination:n}=await A.getFiles({folderId:"folders"===e?void 0:e,itemType:"all"});return(null==n?void 0:n.total)||t.filter(e=>!e.isFolder).length}return 0}catch(t){return console.error(`Ошибка при получении количества файлов для папки ${e}:`,t),C.error({id:"FOLDER_CHILDREN_COUNT_FAILED",message:x("Failed to load folder items count"),placement:"bottomRight",innerException:t,data:{folderId:"folders"===e?null:e,reason:t instanceof Error?t.message:String(t)}}),0}},[A,C,x]),R=c(async()=>{if(0===w.length)return;const e={};e.folders=await M("folders");const t=w.map(async t=>{const n=await M(t.id);e[t.id]=n});await Promise.all(t),S(e)},[w,M]),L=c(async e=>{const t=await M(e);S(n=>Object.assign(Object.assign({},n),{[e]:t}))},[M]);g(b,()=>({refreshFileCounts:R}),[R]),a(()=>{R()},[R]);const j=c(async()=>{await f(),n?await L(n):await L("folders")},[f,n,L]),N=[{key:qt,label:x("My files"),icon:e(Xr,{size:20,strokeWidth:null==E?void 0:E.iconStrokeWidth})},{key:Xt,label:x("GIF"),icon:e(Jr,{size:20,strokeWidth:null==E?void 0:E.iconStrokeWidth})},{key:Kt,label:x("Stock images"),icon:e(Vr,{size:20,strokeWidth:null==E?void 0:E.iconStrokeWidth})},{key:Zt,label:x("AI"),icon:e(ni,{size:20,strokeWidth:null==E?void 0:E.iconStrokeWidth}),disabled:!(null==E?void 0:E.sseQuery)}],z=c(async e=>{const t=e[0];t&&"empty"!==t&&(v!==qt&&y(qt),null==i||i(t),await(null==h?void 0:h(t)))},[i,v,y,h]),B=c(({key:e})=>{console.warn("key",e),y(e)},[y]),V=c(async(e,t)=>{var n;O(e);if(!("lazy"===(null==E?void 0:E.folderTreeLoading)))return;const r=(null===(n=null==t?void 0:t.node)||void 0===n?void 0:n.key)||void 0;if(r&&"folders"!==r)try{await(null==h?void 0:h(r))}catch(e){console.warn("Не удалось подгрузить дочерние папки для",r,e),C.error({id:"FOLDER_CHILDREN_FETCH_FAILED",message:x("Failed to load subfolders"),placement:"bottomRight",innerException:e,data:{folderId:r,reason:e instanceof Error?e.message:String(e)}})}},[null==E?void 0:E.folderTreeLoading,h,C,x]);return t("div",{className:"sidebar-container",children:[t("div",{className:po.buttonWrapper,children:[e(D,{type:"primary",size:"large",icon:e(Qr,{size:24,strokeWidth:null==E?void 0:E.iconStrokeWidth}),onClick:j,className:po.uploadButton,style:{whiteSpace:"nowrap"},children:e("span",{className:po.uploadButtonTitle,children:x("Upload file")})}),e(D,{type:"primary",size:"large",icon:e(Kr,{size:24,strokeWidth:null==E?void 0:E.iconStrokeWidth}),onClick:()=>null==p?void 0:p(!0),className:po.uploadByURLButton,style:{whiteSpace:"nowrap"}})]}),e(q,{className:"folder-menu",items:N,defaultSelectedKeys:[qt],onSelect:({key:e})=>B({key:e}),selectedKeys:[v]}),e(X,{className:po.divider}),t("div",{className:po.foldersContainer,children:[e(co,{className:`${po.folderMenu} ${po.folderTree}`,selectedFolder:n,onSelect:z,onExpand:V,generateMenuItems:r,fetchChildFolders:h,showFileCounts:!0,folderFileCounts:_,expandedKeys:T,setExpandedKeys:O,showTrashFolder:null==E?void 0:E.enableTrashFolder}),e("div",{className:po.folderActions,children:e(D,{onClick:e=>{e.stopPropagation(),m()},className:po.button,icon:e(Yr,{size:18,strokeWidth:null==E?void 0:E.iconStrokeWidth}),size:"middle"})})]})]})}));go.displayName="FolderSidebar";var mo=Object.defineProperty,vo=(e,t,n)=>(((e,t,n)=>{t in e?mo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function yo(e,t){return void 0===t&&(t=15),+parseFloat(Number(e).toPrecision(t))}function bo(e){var t=e.toString().split(/[eE]/),n=(t[0].split(".")[1]||"").length-+(t[1]||0);return n>0?n:0}function wo(e){if(-1===e.toString().indexOf("e"))return Number(e.toString().replace(".",""));var t=bo(e);return t>0?yo(Number(e)*Math.pow(10,t)):Number(e)}function xo(e){Eo&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&console.warn(e+" is beyond boundary when transfer to integer, the results may not be accurate")}function Co(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0];return t.slice(1).reduce(function(t,n){return e(t,n)},r)}}var _o=Co(function(e,t){var n=wo(e),r=wo(t),i=bo(e)+bo(t),o=n*r;return xo(o),o/Math.pow(10,i)}),So=Co(function(e,t){var n=Math.pow(10,Math.max(bo(e),bo(t)));return(_o(e,n)+_o(t,n))/n}),ko=Co(function(e,t){var n=Math.pow(10,Math.max(bo(e),bo(t)));return(_o(e,n)-_o(t,n))/n}),Ao=Co(function(e,t){var n=wo(e),r=wo(t);return xo(n),xo(r),_o(n/r,yo(Math.pow(10,bo(t)-bo(e))))});var Eo=!0;var Io={strip:yo,plus:So,minus:ko,times:_o,divide:Ao,round:function(e,t){var n=Math.pow(10,t),r=Ao(Math.round(Math.abs(_o(e,n))),n);return e<0&&0!==r&&(r=_o(r,-1)),r},digitLength:bo,float2Fixed:wo,enableBoundaryChecking:function(e){void 0===e&&(e=!0),Eo=e}};const To=Object.prototype.toString;function Oo(e){switch(To.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Bo(e,Error)}}function Fo(e,t){return To.call(e)===`[object ${t}]`}function Po(e){return Fo(e,"ErrorEvent")}function Mo(e){return Fo(e,"DOMError")}function Ro(e){return Fo(e,"String")}function Lo(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function jo(e){return null===e||Lo(e)||"object"!=typeof e&&"function"!=typeof e}function Do(e){return Fo(e,"Object")}function No(e){return typeof Event<"u"&&Bo(e,Event)}function zo(e){return!(!e||!e.then||"function"!=typeof e.then)}function Bo(e,t){try{return e instanceof t}catch{return!1}}function Vo(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}function Uo(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function $o(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{Vo(r)?n.push("[VueViewModel]"):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Wo(e,t,n=!1){return!!Ro(e)&&(function(e){return Fo(e,"RegExp")}(t)?t.test(e):!!Ro(t)&&(n?e===t:e.includes(t)))}function Ho(e,t=[],n=!1){return t.some(t=>Wo(e,t,n))}function Go(e,t,n=250,r,i,o,a){if(!(o.exception&&o.exception.values&&a&&Bo(a.originalException,Error)))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=function(e,t){return e.map(e=>(e.value&&(e.value=Uo(e.value,t)),e))}(Yo(e,t,i,a.originalException,r,o.exception.values,s,0),n))}function Yo(e,t,n,r,i,o,a,s){if(o.length>=n+1)return o;let l=[...o];if(Bo(r[i],Error)){qo(a,s);const o=e(t,r[i]),c=l.length;Xo(o,i,c,s),l=Yo(e,t,n,r[i],i,[o,...l],o,c)}return Array.isArray(r.errors)&&r.errors.forEach((r,o)=>{if(Bo(r,Error)){qo(a,s);const c=e(t,r),u=l.length;Xo(c,`errors[${o}]`,u,s),l=Yo(e,t,n,r,i,[c,...l],c,u)}}),l}function qo(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function Xo(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Ko(e){return e&&e.Math==Math?e:void 0}const Zo="object"==typeof globalThis&&Ko(globalThis)||"object"==typeof window&&Ko(window)||"object"==typeof self&&Ko(self)||"object"==typeof global&&Ko(global)||function(){return this}()||{};function Jo(){return Zo}function Qo(e,t,n){const r=n||Zo,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}const ea=Jo();function ta(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,a=0;const s=" > ",l=s.length;let c;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(c=na(n,u),!("html"===c||o>1&&a+i.length*l+c.length>=d));)i.push(c),a+=c.length,n=n.parentNode;return i.reverse().join(s)}catch{return"<unknown>"}}function na(e,t){const n=e,r=[];let i,o,a,s,l;if(!n||!n.tagName)return"";if(ea.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const c=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(c&&c.length)c.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&Ro(i))for(o=i.split(/\s+/),l=0;l<o.length;l++)r.push(`.${o[l]}`);const u=["aria-label","type","name","title","alt"];for(l=0;l<u.length;l++)a=u[l],s=n.getAttribute(a),s&&r.push(`[${a}="${s}"]`);return r.join("")}const ra=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ia=["debug","info","warn","error","log","assert","trace"],oa={};function aa(e){if(!("console"in Zo))return e();const t=Zo.console,n={},r=Object.keys(oa);r.forEach(e=>{const r=oa[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}const sa=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ra?ia.forEach(n=>{t[n]=(...t)=>{e&&aa(()=>{Zo.console[n](`Sentry Logger [${n}]:`,...t)})}}):ia.forEach(e=>{t[e]=()=>{}}),t}(),la=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ca(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:l}=e;return`${s}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${a}`}function ua(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function da(e){const t="string"==typeof e?function(e){const t=la.exec(e);if(!t)return void aa(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,i="",o,a="",s]=t.slice(1);let l="",c=s;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const e=c.match(/^\d+/);e&&(c=e[0])}return ua({host:o,pass:i,path:l,projectId:c,port:a,protocol:n,publicKey:r})}(e):ua(e);if(t&&function(e){if(!ra)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(sa.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(sa.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(sa.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(sa.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}class ha extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}function fa(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);"function"==typeof i&&ga(i,r),e[t]=i}function pa(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ra&&sa.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ga(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,pa(e,"__sentry_original__",t)}catch{}}function ma(e){return e.__sentry_original__}function va(e){if(Oo(e))return{message:e.message,name:e.name,stack:e.stack,...ba(e)};if(No(e)){const t={type:e.type,target:ya(e.target),currentTarget:ya(e.currentTarget),...ba(e)};return typeof CustomEvent<"u"&&Bo(e,CustomEvent)&&(t.detail=e.detail),t}return e}function ya(e){try{return function(e){return typeof Element<"u"&&Bo(e,Element)}(e)?ta(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function ba(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function wa(e){return xa(e,new Map)}function xa(e,t){if(function(e){if(!Do(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch{return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.keys(e))typeof e[n]<"u"&&(r[n]=xa(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach(e=>{r.push(xa(e,t))}),r}return e}const Ca=/\(error: (.*)\)/,_a=/captureMessage|captureException/;function Sa(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0)=>{const r=[],i=e.split("\n");for(let e=n;e<i.length;e++){const n=i[e];if(n.length>1024)continue;const o=Ca.test(n)?n.replace(Ca,"$1"):n;if(!o.match(/\S*Error: /)){for(const e of t){const t=e(o);if(t){r.push(t);break}}if(r.length>=50)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),_a.test(t[t.length-1].function||"")&&(t.pop(),_a.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"}))}(r)}}function ka(e){return Array.isArray(e)?Sa(...e):e}const Aa="<anonymous>";function Ea(e){try{return e&&"function"==typeof e&&e.name||Aa}catch{return Aa}}const Ia={},Ta={};function Oa(e,t){Ia[e]=Ia[e]||[],Ia[e].push(t)}function Fa(e,t){Ta[e]||(t(),Ta[e]=!0)}function Pa(e,t){const n=e&&Ia[e];if(n)for(const r of n)try{r(t)}catch(t){ra&&sa.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Ea(r)}\nError:`,t)}}function Ma(){"console"in Zo&&ia.forEach(function(e){e in Zo.console&&fa(Zo.console,e,function(t){return oa[e]=t,function(...t){Pa("console",{args:t,level:e});const n=oa[e];n&&n.apply(Zo.console,t)}})})}function Ra(){const e=Zo,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function La(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ja(e){const{message:t,event_id:n}=e;if(t)return t;const r=La(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Da(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function Na(e,t){const n=La(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function za(e){if(e&&e.__sentry_captured__)return!0;try{pa(e,"__sentry_captured__",!0)}catch{}return!1}function Ba(e){return Array.isArray(e)?e:[e]}const Va=Zo;let Ua,$a,Wa;function Ha(){if(!Va.document)return;const e=Pa.bind(null,"dom"),t=Ga(e,!0);Va.document.addEventListener("click",t,!1),Va.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Va[t]&&Va[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(fa(n,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=o[n]=o[n]||{refCount:0};if(!a.handler){const r=Ga(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),fa(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},o=i[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Ga(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return!("keypress"!==e||t&&t.tagName&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable))}(n.type,r))return;pa(n,"_sentryCaptured",!0),r&&!r._sentryId&&pa(r,"_sentryId",Ra());const i="keypress"===n.type?"input":n.type;(function(e){if(e.type!==$a)return!1;try{if(!e.target||e.target._sentryId!==Wa)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),$a=n.type,Wa=r?r._sentryId:void 0),clearTimeout(Ua),Ua=Va.setTimeout(()=>{Wa=void 0,$a=void 0},1e3)}}const Ya=Jo();function qa(){if(!("fetch"in Ya))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Xa(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Ka(){(function(){if("string"==typeof EdgeRuntime)return!0;if(!qa())return!1;if(Xa(Ya.fetch))return!0;let e=!1;const t=Ya.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Xa(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){ra&&sa.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e})()&&fa(Zo,"fetch",function(e){return function(...t){const{method:n,url:r}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Ja(t),method:Za(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Ja(t),method:Za(t,"method")?String(t.method).toUpperCase():"GET"}}(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return Pa("fetch",{...i}),e.apply(Zo,t).then(e=>(Pa("fetch",{...i,endTimestamp:Date.now(),response:e}),e),e=>{throw Pa("fetch",{...i,endTimestamp:Date.now(),error:e}),e})}})}function Za(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Ja(e){return"string"==typeof e?e:e?Za(e,"url")?e.url:e.toString?e.toString():"":""}let Qa=null;function es(){Qa=Zo.onerror,Zo.onerror=function(e,t,n,r,i){return Pa("error",{column:r,error:i,line:n,msg:e,url:t}),!(!Qa||Qa.__SENTRY_LOADER__)&&Qa.apply(this,arguments)},Zo.onerror.__SENTRY_INSTRUMENTED__=!0}let ts=null;function ns(){ts=Zo.onunhandledrejection,Zo.onunhandledrejection=function(e){return Pa("unhandledrejection",e),!(ts&&!ts.__SENTRY_LOADER__)||ts.apply(this,arguments)},Zo.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const rs=Jo();const is=Zo;let os;function as(e){const t="history";Oa(t,e),Fa(t,ss)}function ss(){if(!function(){const e=rs.chrome,t=e&&e.app&&e.app.runtime,n="history"in rs&&!!rs.history.pushState&&!!rs.history.replaceState;return!t&&n}())return;const e=is.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=os,t=String(n);os=t,Pa("history",{from:e,to:t})}return e.apply(this,t)}}is.onpopstate=function(...t){const n=is.location.href,r=os;if(os=n,Pa("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},fa(is.history,"pushState",t),fa(is.history,"replaceState",t)}const ls=Zo,cs="__sentry_xhr_v3__";function us(){if(!ls.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;fa(e,"open",function(e){return function(...t){const n=Date.now(),r=Ro(t[0])?t[0].toUpperCase():void 0,i=function(e){if(Ro(e))return e;try{return e.toString()}catch{}}(t[1]);if(!r||!i)return e.apply(this,t);this[cs]={method:r,url:i,request_headers:{}},"POST"===r&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const e=this[cs];if(e&&4===this.readyState){try{e.status_code=this.status}catch{}Pa("xhr",{args:[r,i],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?fa(this,"onreadystatechange",function(e){return function(...t){return o(),e.apply(this,t)}}):this.addEventListener("readystatechange",o),fa(this,"setRequestHeader",function(e){return function(...t){const[n,r]=t,i=this[cs];return i&&Ro(n)&&Ro(r)&&(i.request_headers[n.toLowerCase()]=r),e.apply(this,t)}}),e.apply(this,t)}}),fa(e,"send",function(e){return function(...t){const n=this[cs];if(!n)return e.apply(this,t);void 0!==t[0]&&(n.body=t[0]);return Pa("xhr",{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}})}function ds(e,t=100,n=1/0){try{return fs("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function hs(e,t=3,n=102400){const r=ds(e,t);return function(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}(r)>n?hs(e,t-1,n):r}function fs(e,t,n=1/0,r=1/0,i=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[o,a]=i;if(null==t||["number","boolean","string"].includes(typeof t)&&!function(e){return"number"==typeof e&&e!=e}(t))return t;const s=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Vo(t))return"[VueViewModel]";if(function(e){return Do(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}(t))return"[SyntheticEvent]";if("number"==typeof t&&t!=t)return"[NaN]";if("function"==typeof t)return`[Function: ${Ea(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const n=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const l="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===l)return s.replace("object ","");if(o(t))return"[Circular ~]";const c=t;if(c&&"function"==typeof c.toJSON)try{return fs("",c.toJSON(),l-1,r,i)}catch{}const u=Array.isArray(t)?[]:{};let d=0;const h=va(t);for(const e in h){if(!Object.prototype.hasOwnProperty.call(h,e))continue;if(d>=r){u[e]="[MaxProperties ~]";break}const t=h[e];u[e]=fs(e,t,l-1,r,i),d++}return a(t),u}var ps;function gs(e){return new vs(t=>{t(e)})}function ms(e){return new vs((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(ps||(ps={}));class vs{constructor(e){vs.prototype.__init.call(this),vs.prototype.__init2.call(this),vs.prototype.__init3.call(this),vs.prototype.__init4.call(this),this._state=ps.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new vs((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new vs((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{i?n(r):t(r)})})}__init(){this._resolve=e=>{this._setResult(ps.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(ps.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===ps.PENDING){if(zo(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===ps.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===ps.RESOLVED&&e[1](this._value),this._state===ps.REJECTED&&e[2](this._value),e[0]=!0)})}}}function ys(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return ms(new ha("Not adding Promise because buffer limit was reached."));const i=r();return-1===t.indexOf(i)&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new vs((n,r)=>{let i=t.length;if(!i)return n(!0);const o=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{gs(e).then(()=>{--i||(clearTimeout(o),n(!0))},r)})})}}}function bs(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const ws=["fatal","error","warning","log","info","debug"];function xs(e){return"warn"===e?"warning":ws.includes(e)?e:"log"}function Cs(){return Date.now()/1e3}const _s=function(){const{performance:e}=Zo;if(!e||!e.now)return Cs;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function Ss(e,t=[]){return[e,t]}function ks(e,t){const[n,r]=e;return[n,[...r,t]]}function As(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function Es(e,t){return(t||new TextEncoder).encode(e)}function Is(e,t){const[n,r]=e;let i=JSON.stringify(n);function o(e){"string"==typeof i?i="string"==typeof e?i+e:[Es(i,t),e]:i.push("string"==typeof e?Es(e,t):e)}for(const e of r){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(ds(n))}o(e)}}return"string"==typeof i?i:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(i)}function Ts(e,t){const n="string"==typeof e.data?Es(e.data,t):e.data;return[wa({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}(()=>{const{performance:e}=Zo;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,a=e.timing&&e.timing.navigationStart,s="number"==typeof a?Math.abs(a+n-r):t;(o||s<t)&&(i<=s&&e.timeOrigin)})();const Os={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Fs(e){return Os[e]}function Ps(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ms(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),a=parseInt(t,10),s=1e3*(isNaN(a)?60:a);if(n)for(const e of n.split(";"))"metric_bucket"===e?(!o||o.split(";").includes("custom"))&&(i[e]=r+s):i[e]=r+s;else i.all=r+s}else a?i.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(i.all=r+6e4);return i}const Rs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ls="production";function js(){return Qo("globalEventProcessors",()=>[])}function Ds(e){js().push(e)}function Ns(e,t,n,r=0){return new vs((i,o)=>{const a=e[r];if(null===t||"function"!=typeof a)i(t);else{const s=a({...t},n);Rs&&a.id&&null===s&&sa.log(`Event processor "${a.id}" dropped event`),zo(s)?s.then(t=>Ns(e,t,n,r+1).then(i)).then(null,o):Ns(e,s,n,r+1).then(i).then(null,o)}})}function zs(e){const t=_s(),n={sid:Ra(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return wa({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&Bs(n,e),n}function Bs(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||_s(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Ra()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Vs(e,t){let n={};"ok"===e.status&&(n={status:"exited"}),Bs(e,n)}function Us(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:o,status:a,tags:s,origin:l}=$s(e);return wa({data:r,op:i,parent_span_id:o,span_id:t,status:a,tags:s,trace_id:n,origin:l})}function $s(e){return function(e){return"function"==typeof e.getSpanJSON}(e)?e.getSpanJSON():"function"==typeof e.toJSON?e.toJSON():{}}function Ws(e,t,n,r,i,o){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Ra(),timestamp:t.timestamp||Cs()},c=n.integrations||e.integrations.map(e=>e.name);(function(e,t){const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:Ls),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=Uo(e.message,o));const a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=Uo(a.value,o));const s=e.request;s&&s.url&&(s.url=Uo(s.url,o))})(l,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(l,c),void 0===t.type&&function(e,t){const n=Zo._sentryDebugIds;if(!n)return;let r;const i=Hs.get(t);i?r=i:(r=new Map,Hs.set(t,r));const o=Object.keys(n).reduce((e,i)=>{let o;const a=r.get(i);a?o=a:(o=t(i),r.set(i,o));for(let t=o.length-1;t>=0;t--){const r=o[t];if(r.filename){e[r.filename]=n[i];break}}return e},{});try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.filename&&(e.debug_id=o[e.filename])})})}catch{}}(l,e.stackParser);const u=function(e,t){if(!t)return e;const n=e?e.clone():new sl;return n.update(t),n}(r,n.captureContext);n.mechanism&&Na(l,n.mechanism);const d=i&&i.getEventProcessors?i.getEventProcessors():[],h=(al||(al=new sl),al).getScopeData();if(o){il(h,o.getScopeData())}if(u){il(h,u.getScopeData())}const f=[...n.attachments||[],...h.attachments];f.length&&(n.attachments=f),rl(l,h);return Ns([...d,...js(),...h.eventProcessors],l,n).then(e=>(e&&function(e){const t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch{}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach(e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})})}(e),"number"==typeof a&&a>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:ds(e.data,t,n)}}))},...e.user&&{user:ds(e.user,t,n)},...e.contexts&&{contexts:ds(e.contexts,t,n)},...e.extra&&{extra:ds(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ds(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>{const r=$s(e).data;return r&&(e.data=ds(r,t,n)),e})),r}(e,a,s):e))}const Hs=new WeakMap;function Gs(e,t){return gl().captureEvent(e,t)}function Ys(e,t){gl().addBreadcrumb(e,t)}function qs(){return gl().getClient()}function Xs(){return gl().getScope()}function Ks(e){const t=qs(),n=ml(),r=Xs(),{release:i,environment:o=Ls}=t&&t.getOptions()||{},{userAgent:a}=Zo.navigator||{},s=zs({release:i,environment:o,user:r.getUser()||n.getUser(),...a&&{userAgent:a},...e}),l=n.getSession();return l&&"ok"===l.status&&Bs(l,{status:"exited"}),Zs(),n.setSession(s),r.setSession(s),s}function Zs(){const e=ml(),t=Xs(),n=t.getSession()||e.getSession();n&&Vs(n),Js(),e.setSession(),t.setSession()}function Js(){const e=ml(),t=Xs(),n=qs(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function Qs(e=!1){e?Zs():Js()}function el(e){return e.transaction}function tl(e,t,n){const r=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:o}=n&&n.getUser()||{},a=wa({environment:r.environment||Ls,release:r.release,user_segment:o,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",a),a}function nl(e){const t=qs();if(!t)return{};const n=tl($s(e).trace_id||"",t,Xs()),r=el(e);if(!r)return n;const i=r&&r._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:o,source:a}=r.metadata;null!=o&&(n.sample_rate=`${o}`);const s=$s(r);return a&&"url"!==a&&(n.transaction=s.description),n.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return!!(1&t)}(r)),t.emit&&t.emit("createDsc",n),n}function rl(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;(function(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,transactionName:s}=t,l=wa(n);l&&Object.keys(l).length&&(e.extra={...l,...e.extra});const c=wa(r);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});const u=wa(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});const d=wa(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),a&&(e.level=a),s&&(e.transaction=s)})(e,t),r&&function(e,t){e.contexts={trace:Us(t),...e.contexts};const n=el(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:nl(t),...e.sdkProcessingMetadata};const r=$s(n).description;r&&(e.tags={transaction:r,...e.tags})}}(e,r),function(e,t){e.fingerprint=e.fingerprint?Ba(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)}function il(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,sdkProcessingMetadata:s,breadcrumbs:l,fingerprint:c,eventProcessors:u,attachments:d,propagationContext:h,transactionName:f,span:p}=t;ol(e,"extra",n),ol(e,"tags",r),ol(e,"user",i),ol(e,"contexts",o),ol(e,"sdkProcessingMetadata",s),a&&(e.level=a),f&&(e.transactionName=f),p&&(e.span=p),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...h}}function ol(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}let al;class sl{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=ll()}static clone(e){return e?e.clone():new sl}clone(){const e=new sl;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._span=this._span,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e}setClient(e){this._client=e}getClient(){return this._client}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&Bs(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e;if(t instanceof sl){const e=t.getScopeData();this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&Object.keys(e.user).length&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint.length&&(this._fingerprint=e.fingerprint),t.getRequestSession()&&(this._requestSession=t.getRequestSession()),e.propagationContext&&(this._propagationContext=e.propagationContext)}else if(Do(t)){const t=e;this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=ll(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Cs(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:e,_attachments:t,_contexts:n,_tags:r,_extra:i,_user:o,_level:a,_fingerprint:s,_eventProcessors:l,_propagationContext:c,_sdkProcessingMetadata:u,_transactionName:d,_span:h}=this;return{breadcrumbs:e,attachments:t,contexts:n,tags:r,extra:i,user:o,level:a,fingerprint:s||[],eventProcessors:l,propagationContext:c,sdkProcessingMetadata:u,transactionName:d,span:h}}applyToEvent(e,t={},n=[]){rl(e,this.getScopeData());return Ns([...n,...js(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:Ra();if(!this._client)return sa.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:Ra();if(!this._client)return sa.warn("No client configured on scope - will not capture message!"),r;const i=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Ra();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(sa.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function ll(){return{traceId:Ra(),spanId:Ra().substring(16)}}const cl="7.116.0",ul=parseFloat(cl),dl=100;class hl{constructor(e,t,n,r=ul){let i,o;this._version=r,t?i=t:(i=new sl,i.setClient(e)),n?o=n:(o=new sl,o.setClient(e)),this._stack=[{scope:i}],e&&this.bindClient(e),this._isolationScope=o}isOlderThan(e){return this._version<e}bindClient(e){const t=this.getStackTop();t.client=e,t.scope.setClient(e),e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();let n;try{n=e(t)}catch(e){throw this.popScope(),e}return zo(n)?n.then(e=>(this.popScope(),e),e=>{throw this.popScope(),e}):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:Ra(),r=new Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:r,...t,event_id:n}),n}captureMessage(e,t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:Ra(),i=new Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r}),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Ra();return e.type||(this._lastEventId=n),this.getScope().captureEvent(e,{...t,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=dl}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const a={timestamp:Cs(),...e},s=i?aa(()=>i(a,t)):a;null!==s&&(r.emit&&r.emit("beforeAddBreadcrumb",s,t),n.addBreadcrumb(s,o))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=pl(this);try{e(this)}finally{pl(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch{return Rs&&sa.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);return Rs&&!n&&(this.getClient()?sa.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):sa.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&Vs(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=Ls}=n&&n.getOptions()||{},{userAgent:o}=Zo.navigator||{},a=zs({release:r,environment:i,user:t.getUser(),...o&&{userAgent:o},...e}),s=t.getSession&&t.getSession();return s&&"ok"===s.status&&Bs(s,{status:"exited"}),this.endSession(),t.setSession(a),a}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return!(!t||!t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_callExtensionMethod(e,...t){const n=fl().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);Rs&&sa.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function fl(){return Zo.__SENTRY__=Zo.__SENTRY__||{extensions:{},hub:void 0},Zo}function pl(e){const t=fl(),n=vl(t);return yl(t,e),n}function gl(){const e=fl();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=fl()){return(!function(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}(e)||vl(e).isOlderThan(ul))&&yl(e,new hl),vl(e)}(e)}function ml(){return gl().getIsolationScope()}function vl(e){return Qo("hub",()=>new hl,e)}function yl(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}function bl(e,t,n,r){const i=Ps(n),o=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const a=function(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:ca(r)},...i&&{trace:wa({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,Ss(a,[[{type:o},e]])}function wl(e,t){return function(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}const xl=[];function Cl(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;t.forEach(e=>{e.isDefaultInstance=!0}),r=Array.isArray(n)?[...t,...n]:"function"==typeof n?Ba(n(t)):t;const i=function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.keys(t).map(e=>t[e])}(r),o=function(e,t){for(let n=0;n<e.length;n++)if(!0===t(e[n]))return n;return-1}(i,e=>"Debug"===e.name);if(-1!==o){const[e]=i.splice(o,1);i.push(e)}return i}function _l(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Sl(e,t,n){if(n[t.name])Rs&&sa.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===xl.indexOf(t.name)&&(t.setupOnce(Ds,gl),xl.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),e.on&&"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if(e.addEventProcessor&&"function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}Rs&&sa.log(`Integration installed: ${t.name}`)}}function kl(e,t){return Object.assign(function(...e){return t(...e)},{id:e})}function Al(e,t,n,r){const i={sent_at:(new Date).toISOString()};n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(i.dsn=ca(t));const o=function(e){const t=function(e){let t="";for(const n of e){const e=Object.entries(n.tags),r=e.length>0?`|#${e.map(([e,t])=>`${e}:${t}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return t}(e);return[{type:"statsd",length:t.length},t]}(e);return Ss(i,[o])}const El="Not capturing exception because it's already been captured.";class Il{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=da(e.dsn):Rs&&sa.warn("No DSN provided, client will not send events."),this._dsn){const t=function(e,t={}){const n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${wl(e,r)}`}(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(za(e))return void(Rs&&sa.log(El));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e})),r}captureMessage(e,t,n,r){let i=n&&n.event_id;const o=Lo(e)?e:String(e),a=jo(e)?this.eventFromMessage(o,t,n):this.eventFromException(e,n);return this._process(a.then(e=>this._captureEvent(e,n,r)).then(e=>{i=e})),i}captureEvent(e,t,n){if(t&&t.originalException&&za(t.originalException))return void(Rs&&sa.log(El));let r=t&&t.event_id;const i=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,t,i||n).then(e=>{r=e})),r}captureSession(e){"string"!=typeof e.release?Rs&&sa.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Bs(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):gs(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return Rs&&sa.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){const t=this._integrations[e.name];Sl(this,e,this._integrations),t||_l(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=bl(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=ks(n,Ts(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){const t=function(e,t,n,r){const i=Ps(n);return Ss({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:ca(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const n=`${e}:${t}`;Rs&&sa.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}captureAggregateMetrics(e){Rs&&sa.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const t=Al(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach(e=>e(...t))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&Sl(e,t,n)}),n}(this,e),_l(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,t){let n=!1,r=!1;const i=t.exception&&t.exception.values;if(i){r=!0;for(const e of i){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(Bs(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new vs(t=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r=ml()){const i=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),Ws(i,e,t,n,this,r).then(e=>{if(null===e)return e;const t={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if((!e.contexts||!e.contexts.trace)&&t){const{traceId:r,spanId:i,parentSpanId:o,dsc:a}=t;e.contexts={trace:{trace_id:r,span_id:i,parent_span_id:o},...e.contexts};const s=a||tl(r,this,n);e.sdkProcessingMetadata={dynamicSamplingContext:s,...e.sdkProcessingMetadata}}return e})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{if(Rs){const t=e;"log"===t.logLevel?sa.log(t.message):sa.warn(t)}})}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r,o=Ol(e),a=Tl(e),s=e.type||"error",l=`before send for type \`${s}\``;if(a&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),ms(new ha(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const c="replay_event"===s?"replay":s,u=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,u).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",c,e),new ha("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const i=function(e,t,n){const{beforeSend:r,beforeSendTransaction:i}=e;return Tl(t)&&r?r(t,n):Ol(t)&&i?i(t,n):t}(r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(zo(e))return e.then(e=>{if(!Do(e)&&null!==e)throw new ha(n);return e},e=>{throw new ha(`${t} rejected with ${e}`)});if(!Do(e)&&null!==e)throw new ha(n);return e}(i,l)}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",c,e),new ha(`${l} returned \`null\`, will not send event.`,"log");const i=n&&n.getSession();!o&&i&&this._updateSessionFromEvent(i,r);const a=r.transaction_info;if(o&&a&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...a,source:e}}return this.sendEvent(r,t),r}).then(null,e=>{throw e instanceof ha?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new ha(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,e=>{Rs&&sa.error("Error while sending event:",e)});Rs&&sa.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}}function Tl(e){return void 0===e.type}function Ol(e){return"transaction"===e.type}function Fl(e,t){!0===t.debug&&(Rs?sa.enable():aa(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Xs().update(t.initialScope);const n=new e(t);(function(e){const t=gl().getStackTop();t.client=e,t.scope.setClient(e)})(n),function(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}(n)}function Pl(e,t,n=ys(e.bufferSize||30)){let r={};function i(i){const o=[];if(As(i,(t,n)=>{const i=Fs(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)){const r=Ml(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else o.push(t)}),0===o.length)return gs();const a=Ss(i[0],o),s=t=>{As(a,(n,r)=>{const i=Ml(n,r);e.recordDroppedEvent(t,Fs(r),i)})};return n.add(()=>t({body:Is(a,e.textEncoder)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&Rs&&sa.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Ms(r,e),e),e=>{throw s("network_error"),e})).then(e=>e,e=>{if(e instanceof ha)return Rs&&sa.error("Skipped sending event because buffer is full."),s("queue_overflow"),gs();throw e})}return i.__sentry__baseTransport__=!0,{send:i,flush:e=>n.drain(e)}}function Ml(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function Rl(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:cl})),version:cl}),e._metadata=i}const Ll=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],jl=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],Dl="InboundFilters",Nl=(e={})=>({name:Dl,setupOnce(){},processEvent(t,n,r){const i=r.getOptions(),o=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Ll],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:jl],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,i);return function(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch{}return!1}(e)?(Rs&&sa.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${ja(e)}`),!0):function(e,t){return!(e.type||!t||!t.length)&&function(e){const t=[];let n;e.message&&t.push(e.message);try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),Rs&&0===t.length&&sa.error(`Could not extract message for event ${ja(e)}`),t}(e).some(e=>Ho(e,t))}(e,t.ignoreErrors)?(Rs&&sa.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${ja(e)}`),!0):function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&Ho(n,t)}(e,t.ignoreTransactions)?(Rs&&sa.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${ja(e)}`),!0):function(e,t){if(!t||!t.length)return!1;const n=zl(e);return!!n&&Ho(n,t)}(e,t.denyUrls)?(Rs&&sa.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${ja(e)}.\nUrl: ${zl(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;const n=zl(e);return!n||Ho(n,t)}(e,t.allowUrls)&&(Rs&&sa.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${ja(e)}.\nUrl: ${zl(e)}`),!0)}(t,o)?null:t}});function zl(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch{return Rs&&sa.error(`Cannot extract url for event ${ja(e)}`),null}}let Bl;kl(Dl,Nl);const Vl="FunctionToString",Ul=new WeakMap,$l=()=>({name:Vl,setupOnce(){Bl=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=ma(this),n=Ul.has(qs())&&void 0!==t?t:this;return Bl.apply(n,e)}}catch{}},setup(e){Ul.set(e,!0)}});kl(Vl,$l);const Wl=Zo;let Hl=0;function Gl(){return Hl>0}function Yl(e,t={},n){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if(ma(e))return e}catch{return e}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map(e=>Yl(e,t));return e.apply(this,i)}catch(e){throw Hl++,setTimeout(()=>{Hl--}),function(...e){const t=gl();if(2===e.length){const[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}t.withScope(e[0])}(n=>{n.addEventProcessor(e=>(t.mechanism&&(Da(e,void 0),Na(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),function(e){gl().captureException(e,void 0)}(e)}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}ga(r,e),pa(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch{}return r}const ql=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Xl(e,t){const n=Zl(e,t),r={type:t&&t.name,value:Ql(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Kl(e,t){return{exception:{values:[Xl(e,t)]}}}function Zl(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(Jl.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch{}return[]}const Jl=/Minified React error #\d+;/i;function Ql(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function ec(e,t,n,r,i){let o;if(Po(t)&&t.error)return Kl(e,t.error);if(Mo(t)||function(e){return Fo(e,"DOMException")}(t)){const i=t;if("stack"in t)o=Kl(e,t);else{const t=i.name||(Mo(i)?"DOMError":"DOMException"),a=i.message?`${t}: ${i.message}`:t;o=tc(e,a,n,r),Da(o,a)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return Oo(t)?Kl(e,t):Do(t)||No(t)?(o=function(e,t,n,r){const i=qs(),o=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:No(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:nc(t,{isUnhandledRejection:r})}]},extra:{__serialized__:hs(t,o)}};if(n){const t=Zl(e,n);t.length&&(a.exception.values[0].stacktrace={frames:t})}return a}(e,t,n,i),Na(o,{synthetic:!0}),o):(o=tc(e,t,n,r),Da(o,`${t}`),Na(o,{synthetic:!0}),o)}function tc(e,t,n,r){const i={};if(r&&n){const r=Zl(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}if(Lo(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function nc(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(va(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Uo(n[0],t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:Uo(r,t)}return""}(e),r=t?"promise rejection":"exception";return Po(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:No(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}class rc extends Il{constructor(e){Rl(e,"browser",["browser"],Wl.SENTRY_SDK_SOURCE||"npm"),super(e),e.sendClientReports&&Wl.document&&Wl.document.addEventListener("visibilitychange",()=>{"hidden"===Wl.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){const i=ec(e,t,n&&n.syntheticException||void 0,r);return Na(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),gs(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const o=tc(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),gs(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(ql&&sa.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:ca(r)}},o=function(e){return[{type:"user_report"},e]}(e);return Ss(i,[o])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return void(ql&&sa.log("No outcomes to send"));if(!this._dsn)return void(ql&&sa.log("No dsn provided, will not send outcomes"));ql&&sa.log("Sending outcomes:",e);const t=function(e,t){return Ss(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:Cs(),discarded_events:e}]])}(e,this._options.tunnel&&ca(this._dsn));this._sendEnvelope(t)}}let ic;function oc(e,t=function(){if(ic)return ic;if(Xa(Wl.fetch))return ic=Wl.fetch.bind(Wl);const e=Wl.document;let t=Wl.fetch;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){ql&&sa.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return ic=t.bind(Wl)}()){let n=0,r=0;return Pl(e,function(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then(e=>(n-=o,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}catch(e){return ic=void 0,n-=o,r--,ms(e)}})}function ac(e){return Pl(e,function(t){return new vs((n,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&i.setRequestHeader(t,e.headers[t]);i.send(t.body)})})}const sc="?";function lc(e,t,n,r){const i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const cc=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,uc=/\((\S*)(?::(\d+))(?::(\d+))\)/,dc=[30,e=>{const t=cc.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=uc.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=yc(t[1]||sc,t[2]);return lc(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],hc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,fc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,pc=[50,e=>{const t=hc.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=fc.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||sc;return[n,e]=yc(n,e),lc(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],gc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,mc=[40,e=>{const t=gc.exec(e);return t?lc(t[2],t[1]||sc,+t[3],t[4]?+t[4]:void 0):void 0}],vc=Sa(...[dc,pc,mc]),yc=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:sc,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},bc=1024,wc="Breadcrumbs",xc=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:wc,setupOnce(){},setup(e){t.console&&function(e){const t="console";Oa(t,e),Fa(t,Ma)}(function(e){return function(t){if(qs()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:xs(t.level),message:$o(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${$o(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Ys(n,{input:t.args,level:t.level})}}(e)),t.dom&&function(e){Oa("dom",e),Fa("dom",Ha)}(function(e,t){return function(n){if(qs()!==e)return;let r,i,o="object"==typeof t?t.serializeAttribute:void 0,a="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;a&&a>bc&&(ql&&sa.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=bc),"string"==typeof o&&(o=[o]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=ta(t,{keyAttrs:o,maxStringLength:a}),i=function(e){if(!ea.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}(t)}catch{r="<unknown>"}if(0===r.length)return;const s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),Ys(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&function(e){Oa("xhr",e),Fa("xhr",us)}(function(e){return function(t){if(qs()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[cs];if(!n||!r||!i)return;const{method:o,url:a,status_code:s,body:l}=i;Ys({category:"xhr",data:{method:o,url:a,status_code:s},type:"http"},{xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r})}}(e)),t.fetch&&function(e){const t="fetch";Oa(t,e),Fa(t,Ka)}(function(e){return function(t){if(qs()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){Ys({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response;Ys({category:"fetch",data:{...t.fetchData,status_code:e&&e.status},type:"http"},{input:t.args,response:e,startTimestamp:n,endTimestamp:r})}}}(e)),t.history&&as(function(e){return function(t){if(qs()!==e)return;let n=t.from,r=t.to;const i=bs(Wl.location.href);let o=n?bs(n):void 0;const a=bs(r);(!o||!o.path)&&(o=i),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),Ys({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on&&e.on("beforeSendEvent",function(e){return function(t){qs()===e&&Ys({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:ja(t)},{event:t})}}(e))}}};kl(wc,xc);const Cc="Dedupe",_c=()=>{let e;return{name:Cc,setupOnce(){},processEvent(t){if(t.type)return t;try{if(function(e,t){return!!t&&!(!function(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!kc(e,t)||!Sc(e,t))}(e,t)&&!function(e,t){const n=Ac(t),r=Ac(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&kc(e,t)&&Sc(e,t))}(e,t))}(t,e))return ql&&sa.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function Sc(e,t){let n=Ec(e),r=Ec(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function kc(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function Ac(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Ec(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}kl(Cc,_c);const Ic="GlobalHandlers",Tc=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Ic,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){!function(e){const t="error";Oa(t,e),Fa(t,es)}(t=>{const{stackParser:n,attachStacktrace:r}=Pc();if(qs()!==e||Gl())return;const{msg:i,url:o,line:a,column:s,error:l}=t,c=void 0===l&&Ro(i)?function(e,t,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=Po(e)?e.message:e,a="Error";const s=o.match(i);return s&&(a=s[1],o=s[2]),Oc({exception:{values:[{type:a,value:o}]}},t,n,r)}(i,o,a,s):Oc(ec(n,l||i,void 0,r,!1),o,a,s);c.level="error",Gs(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}(e),Fc("onerror")),t.onunhandledrejection&&(function(e){!function(e){const t="unhandledrejection";Oa(t,e),Fa(t,ns)}(t=>{const{stackParser:n,attachStacktrace:r}=Pc();if(qs()!==e||Gl())return;const i=function(e){if(jo(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}(t),o=jo(i)?function(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}(i):ec(n,i,void 0,r,!0);o.level="error",Gs(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(e),Fc("onunhandledrejection"))}}};function Oc(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},s=a.stacktrace=a.stacktrace||{},l=s.frames=s.frames||[],c=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=Ro(t)&&t.length>0?t:function(){try{return ea.document.location.href}catch{return""}}();return 0===l.length&&l.push({colno:c,filename:d,function:"?",in_app:!0,lineno:u}),e}function Fc(e){ql&&sa.log(`Global Handler attached: ${e}`)}function Pc(){const e=qs();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}kl(Ic,Tc);const Mc="HttpContext",Rc=()=>({name:Mc,setupOnce(){},preprocessEvent(e){if(!Wl.navigator&&!Wl.location&&!Wl.document)return;const t=e.request&&e.request.url||Wl.location&&Wl.location.href,{referrer:n}=Wl.document||{},{userAgent:r}=Wl.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:i};e.request=o}});kl(Mc,Rc);const Lc="LinkedErrors",jc=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:Lc,setupOnce(){},preprocessEvent(e,r,i){const o=i.getOptions();Go(Xl,o.stackParser,o.maxValueLength,n,t,e,r)}}};kl(Lc,jc);const Dc=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Nc="TryCatch",zc=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Nc,setupOnce(){t.setTimeout&&fa(Wl,"setTimeout",Bc),t.setInterval&&fa(Wl,"setInterval",Bc),t.requestAnimationFrame&&fa(Wl,"requestAnimationFrame",Vc),t.XMLHttpRequest&&"XMLHttpRequest"in Wl&&fa(XMLHttpRequest.prototype,"send",Uc);const e=t.eventTarget;e&&(Array.isArray(e)?e:Dc).forEach($c)}}};function Bc(e){return function(...t){const n=t[0];return t[0]=Yl(n,{mechanism:{data:{function:Ea(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Vc(e){return function(t){return e.apply(this,[Yl(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ea(e)},handled:!1,type:"instrument"}})])}}function Uc(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&fa(n,e,function(t){const n={mechanism:{data:{function:e,handler:Ea(t)},handled:!1,type:"instrument"}},r=ma(t);return r&&(n.mechanism.data.handler=Ea(r)),Yl(t,n)})}),e.apply(this,t)}}function $c(e){const t=Wl,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(fa(n,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Yl(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ea(r),target:e},handled:!1,type:"instrument"}}))}catch{}return t.apply(this,[n,Yl(r,{mechanism:{data:{function:"addEventListener",handler:Ea(r),target:e},handled:!1,type:"instrument"}}),i])}}),fa(n,"removeEventListener",function(e){return function(t,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch{}return e.call(this,t,i,r)}}))}kl(Nc,zc);const Wc=[Nl(),$l(),zc(),xc(),Tc(),jc(),_c(),Rc()];function Hc(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=[...Wc]),void 0===e.release&&("string"==typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),Wl.SENTRY_RELEASE&&Wl.SENTRY_RELEASE.id&&(e.release=Wl.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:ka(e.stackParser||vc),integrations:Cl(e),transport:e.transport||(qa()?oc:ac)};Fl(rc,t),e.autoSessionTracking&&function(){if(typeof Wl.document>"u")return void(ql&&sa.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));Ks({ignoreDuration:!0}),Qs(),as(({from:e,to:t})=>{void 0!==e&&e!==t&&(Ks({ignoreDuration:!0}),Qs())})}()}var Gc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qc(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Xc=(e=>(e.INLINE="inline",e.OVERLAY="overlay",e))(Xc||{}),Kc=(e=>(e.TOP="top",e.BOTTOM="bottom",e.HIDDEN="",e))(Kc||{});function Zc(e,t){return{...t,message:e}}const Jc=[{name:"emoticons",list:["afro-1","afro","agent","alien-1","alien","angel","angry-1","angry-2","angry-3","angry-4","angry-5","angry","arguing","arrogant","asian-1","asian","avatar","baby-1","baby-2","baby","bully","burglar","businessman","cheeky-1","cheeky","clown","confused-1","confused-2","confused-3","confused","creepy","crying-1","crying-2","crying-3","crying","dazed-1","dazed-2","dazed-3","dazed","dead-1","dead-2","dead-3","dead-4","dead-5","dead-6","dead","desperate-1","desperate","detective","dissapointment","doctor","drunk","dumb","emo-1","emo-2","emo","emoticon","evil","faint-1","faint","flirt-1","flirt-2","flirt","flirty","gangster","geek-1","geek","gentleman-1","gentleman-2","gentleman-3","gentleman-4","gentleman","ginger","girl-1","girl","goofy-1","goofy-2","goofy-3","goofy-4","goofy","grubby-1","grubby","happy-1","happy-10","happy-11","happy-12","happy-13","happy-14","happy-15","happy-16","happy-2","happy-3","happy-4","happy-5","happy-6","happy-7","happy-8","happy-9","happy","harry-potter","heisenberg","hipster-1","hipster-2","hipster","in-love-1","in-love-2","in-love-3","in-love-4","in-love-5","in-love-6","in-love","japan","jew","joyful-1","joyful-2","joyful","kiss-1","kiss-2","kiss-3","kiss-4","kiss","laughing-1","laughing-2","laughing-3","laughing","listening","love","manly","miserly-1","miserly","nerd-1","nerd-2","nerd-3","nerd-4","nerd","ninja","pirate-1","pirate-2","pirate","punk-1","punk-2","punk","rapper","relieved","rich-1","rich-2","rich","rockstar","sad-1","sad-2","sad-3","sad-4","sad-5","sad-6","sad","scared-1","scared-2","scared-3","scared","sceptic-1","sceptic-2","sceptic-3","sceptic-4","sceptic-5","sceptic-6","sceptic-7","sceptic","secret","shocked-1","shocked-2","shocked-3","shocked","sick-1","sick-2","sick-3","sick-4","sick","silent","skeleton","smile","smiling-1","smiling","smoked","smug-1","smug-2","smug-3","smug-4","smug-5","smug-6","smug","sporty","stunned","superhero-1","superhero-2","superhero-3","superhero-4","superhero","surprised-1","surprised","thinking","tired-1","tired-2","tired-3","tired","tough-1","tough","trendy","vampire-1","vampire","wink-1","wink-2","wink","winking-1","winking","yawning-1","yawning-2","yawning-3","yawning","yelling","zombie"],type:"svg",thumbnailUrl:"images/stickers/categories/emoticon.svg"},{name:"doodles",items:100,type:"svg",thumbnailUrl:"images/stickers/categories/doodles.svg"},{name:"landmarks",items:100,type:"svg",thumbnailUrl:"images/stickers/categories/landmark.svg",invertPreview:!0},{name:"bubbles",items:104,type:"png",thumbnailUrl:"images/stickers/categories/speech-bubble.svg"},{name:"transportation",items:22,type:"svg",thumbnailUrl:"images/stickers/categories/transportation.svg",invertPreview:!0},{name:"beach",items:22,type:"svg",thumbnailUrl:"images/stickers/categories/beach.svg",invertPreview:!0}],Qc={emoticons:Zc("Emoticons"),doodles:Zc("Doodles"),landmarks:Zc("Landmarks"),bubbles:Zc("Bubbles"),transportation:Zc("Transportation"),beach:Zc("Beach")},eu={fill:"#1565C0",opacity:1,backgroundColor:null,strokeWidth:.05,stroke:"#000"},tu=[1,8,15,20,25];var nu=(e=>(e.DARK="dark",e.LIGHT="light",e))(nu||{});const ru=[{name:nu.LIGHT,colors:{"--be-foreground-base":"0 0 0","--be-primary-light":"191 219 254","--be-primary":"59 130 246","--be-primary-dark":"37 99 235","--be-on-primary":"255 255 255","--be-danger":"179 38 30","--be-on-danger":"255 255 255","--be-background":"255 255 255","--be-background-alt":"250 250 250","--be-paper":"255 255 255","--be-disabled-bg-opacity":"12%","--be-disabled-fg-opacity":"26%","--be-hover-opacity":"4%","--be-focus-opacity":"12%","--be-selected-opacity":"8%","--be-text-main-opacity":"87%","--be-text-muted-opacity":"60%","--be-divider-opacity":"12%"}},{name:nu.DARK,isDark:!0,colors:{"--be-foreground-base":"255 255 255","--be-primary-light":"239 246 255","--be-primary":"191 219 254","--be-primary-dark":"147 197 253","--be-on-primary":"56 30 114","--be-danger":"242 184 181","--be-on-danger":"96 20 16","--be-background":"20 21 23","--be-background-alt":"26 27 30","--be-paper":"44 46 51","--be-disabled-bg-opacity":"12%","--be-disabled-fg-opacity":"30%","--be-hover-opacity":"8%","--be-focus-opacity":"12%","--be-selected-opacity":"16%","--be-text-main-opacity":"100%","--be-text-muted-opacity":"70%","--be-divider-opacity":"12%"}}];var iu=(e=>(e.FILTER="filter",e.RESIZE="resize",e.CROP="crop",e.DRAW="draw",e.TEXT="text",e.SHAPES="shapes",e.STICKERS="stickers",e.FRAME="frame",e.CORNERS="corners",e.MERGE="merge",e))(iu||{});function ou(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ou(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function au(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ou(e))&&(r&&(r+=" "),r+=t);return r}const su=p((n,r)=>{const{attr:i,size:o,title:a,className:s,color:l,style:c,children:u,viewBox:d,width:h,height:f,...p}=n;return t("svg",{"aria-hidden":!a,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:d||"0 0 24 24",...i,...p,className:au("svg-icon",s,lu(o)),style:{color:l,...c},ref:r,height:f||"1em",width:h||"1em",children:[a&&e("title",{children:a}),u]})});function lu(e){switch(e){case"2xs":return"icon-2xs";case"xs":return"icon-xs";case"sm":return"icon-sm";case"md":return"icon-md";case"lg":return"icon-lg";case"xl":return"icon-xl";default:return e}}function cu(t,n="",r){return i.memo(i.forwardRef((i,o)=>e(su,{"data-testid":`${n}Icon`,ref:o,viewBox:r,...i,size:i.size||"md",children:t})))}function uu(e,t=""){return cu(du(e),t)}function du(e){return(null==e?void 0:e.map)&&e.map((e,t)=>i.createElement(e.tag,{key:t,...e.attr},du(e.child)))}const hu=cu(e("path",{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"}),"TuneOutlined"),fu=cu(e("path",{d:"M21 15h2v2h-2v-2zm0-4h2v2h-2v-2zm2 8h-2v2c1 0 2-1 2-2zM13 3h2v2h-2V3zm8 4h2v2h-2V7zm0-4v2h2c0-1-1-2-2-2zM1 7h2v2H1V7zm16-4h2v2h-2V3zm0 16h2v2h-2v-2zM3 3C2 3 1 4 1 5h2V3zm6 0h2v2H9V3zM5 3h2v2H5V3zm-4 8v8c0 1.1.9 2 2 2h12V11H1zm2 8 2.5-3.21 1.79 2.15 2.5-3.22L13 19H3z"}),"PhotoSizeSelectLargeOutlined"),pu=cu(e("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8v8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2H7z"}),"CropOutlined"),gu=cu(e("path",{d:"M2.5 4v3h5v12h3V7h5V4h-13zm19 5h-9v3h3v7h3v-7h3V9z"}),"TextFieldsOutlined"),mu=cu(e("path",{d:"M10.5 4.5c.28 0 .5.22.5.5v2h6v6h2c.28 0 .5.22.5.5s-.22.5-.5.5h-2v6h-2.12c-.68-1.75-2.39-3-4.38-3s-3.7 1.25-4.38 3H4v-2.12c1.75-.68 3-2.39 3-4.38 0-1.99-1.24-3.7-2.99-4.38L4 7h6V5c0-.28.22-.5.5-.5m0-2C9.12 2.5 8 3.62 8 5H4c-1.1 0-1.99.9-1.99 2v3.8h.29c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-.3c0-1.49 1.21-2.7 2.7-2.7s2.7 1.21 2.7 2.7v.3H17c1.1 0 2-.9 2-2v-4c1.38 0 2.5-1.12 2.5-2.5S20.38 11 19 11V7c0-1.1-.9-2-2-2h-4c0-1.38-1.12-2.5-2.5-2.5z"}),"ExtensionOutlined"),vu=cu(e("path",{d:"M10.25 13c0 .69-.56 1.25-1.25 1.25S7.75 13.69 7.75 13s.56-1.25 1.25-1.25 1.25.56 1.25 1.25zM15 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm7 .25c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2s10 4.48 10 10zM10.66 4.12C12.06 6.44 14.6 8 17.5 8c.46 0 .91-.05 1.34-.12C17.44 5.56 14.9 4 12 4c-.46 0-.91.05-1.34.12zM4.42 9.47c1.71-.97 3.03-2.55 3.66-4.44C6.37 6 5.05 7.58 4.42 9.47zM20 12c0-.78-.12-1.53-.33-2.24-.7.15-1.42.24-2.17.24-3.13 0-5.92-1.44-7.76-3.69C8.69 8.87 6.6 10.88 4 11.86c.01.04 0 .09 0 .14 0 4.41 3.59 8 8 8s8-3.59 8-8z"}),"FaceOutlined"),yu=cu(e("path",{d:"M20 4h-4l-4-4-4 4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H4V6h4.52l3.52-3.5L15.52 6H20v14zM6 18h12V8H6v10zm2-8h8v6H8v-6z"}),"FilterFramesOutlined"),bu=cu(e("path",{d:"M6.41 21 5 19.59l4.83-4.83c.75-.75 1.17-1.77 1.17-2.83v-5.1L9.41 8.41 8 7l4-4 4 4-1.41 1.41L13 6.83v5.1c0 1.06.42 2.08 1.17 2.83L19 19.59 17.59 21 12 15.41 6.41 21z"}),"MergeOutlined"),wu=cu(e("path",{d:"M19 19h2v2h-2v-2zm0-2h2v-2h-2v2zM3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm0-4h2V3H3v2zm4 0h2V3H7v2zm8 16h2v-2h-2v2zm-4 0h2v-2h-2v2zm4 0h2v-2h-2v2zm-8 0h2v-2H7v2zm-4 0h2v-2H3v2zM21 8c0-2.76-2.24-5-5-5h-5v2h5c1.65 0 3 1.35 3 3v5h2V8z"}),"RoundedCornerOutlined"),xu=cu(e("path",{d:"M20 4v12H8V4h12m0-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 9.67 1.69 2.26 2.48-3.1L19 15H9zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}),"PhotoLibraryOutlined"),Cu=cu(e("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.25 2.52.77-1.28-3.52-2.09V8z"}),"HistoryOutlined"),_u=cu([e("path",{d:"m2.53 19.65 1.34.56v-9.03l-2.43 5.86c-.41 1.02.08 2.19 1.09 2.61zm19.5-3.7L17.07 3.98c-.31-.75-1.04-1.21-1.81-1.23-.26 0-.53.04-.79.15L7.1 5.95c-.75.31-1.21 1.03-1.23 1.8-.01.27.04.54.15.8l4.96 11.97c.31.76 1.05 1.22 1.83 1.23.26 0 .52-.05.77-.15l7.36-3.05c1.02-.42 1.51-1.59 1.09-2.6zm-9.2 3.8L7.87 7.79l7.35-3.04h.01l4.95 11.95-7.35 3.05z"},"0"),e("circle",{cx:"11",cy:"9",r:"1"},"1"),e("path",{d:"M5.88 19.75c0 1.1.9 2 2 2h1.45l-3.45-8.34v6.34z"},"2")],"StyleOutlined"),Su=cu(e("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}),"DeleteOutlined"),ku=cu(e("path",{d:"M18.85,10.39l1.06-1.06c0.78-0.78,0.78-2.05,0-2.83L18.5,5.09c-0.78-0.78-2.05-0.78-2.83,0l-1.06,1.06L18.85,10.39z M14.61,11.81L7.41,19H6v-1.41l7.19-7.19L14.61,11.81z M13.19,7.56L4,16.76V21h4.24l9.19-9.19L13.19,7.56L13.19,7.56z M19,17.5 c0,2.19-2.54,3.5-5,3.5c-0.55,0-1-0.45-1-1s0.45-1,1-1c1.54,0,3-0.73,3-1.5c0-0.47-0.48-0.87-1.23-1.2l1.48-1.48 C18.32,15.45,19,16.29,19,17.5z M4.58,13.35C3.61,12.79,3,12.06,3,11c0-1.8,1.89-2.63,3.56-3.36C7.59,7.18,9,6.56,9,6 c0-0.41-0.78-1-2-1C5.74,5,5.2,5.61,5.17,5.64C4.82,6.05,4.19,6.1,3.77,5.76C3.36,5.42,3.28,4.81,3.62,4.38C3.73,4.24,4.76,3,7,3 c2.24,0,4,1.32,4,3c0,1.87-1.93,2.72-3.64,3.47C6.42,9.88,5,10.5,5,11c0,0.31,0.43,0.6,1.07,0.86L4.58,13.35z"}),"Draw"),Au=cu(e("path",{d:"m12 5.69 5 4.5V18h-2v-6H9v6H7v-7.81l5-4.5M12 3 2 12h3v8h6v-6h2v6h6v-8h3L12 3z"}),"HomeOutlined"),Eu={[iu.FILTER]:{name:Zc("Applied Filters"),icon:hu},[iu.RESIZE]:{name:Zc("Resized Image"),icon:fu},[iu.CROP]:{name:Zc("Cropped Image"),icon:pu},[iu.DRAW]:{name:Zc("Added Drawing"),icon:ku},[iu.TEXT]:{name:Zc("Added Text"),icon:gu},[iu.SHAPES]:{name:Zc("Added Shape"),icon:mu},[iu.STICKERS]:{name:Zc("Added Sticker"),icon:vu},[iu.FRAME]:{name:Zc("Added Frame"),icon:yu},[iu.MERGE]:{name:Zc("Merged Objects"),icon:bu},[iu.CORNERS]:{name:Zc("Rounded Corner"),icon:wu},bgImage:{name:Zc("Replaced Background Image"),icon:xu},overlayImage:{name:Zc("Added Image"),icon:xu},initial:{name:Zc("Initial"),icon:Au},loadedState:{name:Zc("Loaded State"),icon:Cu},objectStyle:{name:Zc("Changed Style"),icon:_u},deletedObject:{name:Zc("Deleted object"),icon:Su}},Iu=Object.values(iu).map(e=>({name:e,icon:Eu[e].icon,action:e===iu.MERGE?e=>{e.tools.merge.apply()}:e})),Tu={filter:Zc("filter"),resize:Zc("resize"),crop:Zc("crop"),draw:Zc("draw"),text:Zc("text"),shapes:Zc("shapes"),stickers:Zc("stickers"),frame:Zc("frame"),corners:Zc("corners"),merge:Zc("merge")},Ou=cu(e("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}),"FileDownloadOutlined"),Fu="3.0.5",Pu={selector:"pixie-editor",textureSize:4096,activeLanguage:"en",ui:{visible:!0,mode:Xc.INLINE,forceOverlayModeOnMobile:!0,activeTheme:nu.LIGHT,themes:ru,allowEditorClose:!0,menubar:{items:[{type:"undoWidget",align:"left"},{type:"zoomWidget",align:"center",desktopOnly:!0},{type:"button",icon:Cu,align:"right",desktopOnly:!0,action:e=>{e.togglePanel("history")}},{type:"button",icon:Ou,label:Zc("Done"),align:"right",action:e=>{var t;null!=(t=e.state.config.ui)&&t.showExportPanel?e.state.togglePanel("export",!0):e.tools.export.save()}}]},nav:{position:Kc.BOTTOM,items:[...Iu]},openImageDialog:{show:!0,sampleImages:[{url:"images/samples/sample1.jpg",thumbnail:"images/samples/sample1_thumbnail.jpg"},{url:"images/samples/sample2.jpg",thumbnail:"images/samples/sample2_thumbnail.jpg"},{url:"images/samples/sample3.jpg",thumbnail:"images/samples/sample3_thumbnail.jpg"}]},colorPresets:{items:["rgb(0,0,0)","rgb(255, 255, 255)","rgb(242, 38, 19)","rgb(249, 105, 14)","rgb(253, 227, 167)","rgb(4, 147, 114)","rgb(30, 139, 195)","rgb(142, 68, 173)"]}},objectDefaults:{global:{...eu},sticker:{fill:void 0},text:{textAlign:"initial",underline:!1,linethrough:!1,fontStyle:"normal",fontFamily:"Times New Roman",fontWeight:"normal",stroke:void 0,fontSize:40}},tools:{filter:{items:["grayscale","blackWhite","sharpen","invert","vintage","polaroid","kodachrome","technicolor","brownie","sepia","removeColor","brightness","gamma","noise","pixelate","blur","emboss","blendColor"]},zoom:{allowUserZoom:!0,fitImageToScreen:!0},crop:{allowCustomRatio:!0,defaultRatio:"1:1",presets:[{ratio:null,name:"Custom"},{ratio:"1:1",name:"Square"},{ratio:"4:3"},{ratio:"16:9"},{ratio:"5:3"},{ratio:"5:4"},{ratio:"6:4"},{ratio:"7:5"},{ratio:"10:8"}]},text:{defaultText:"Double click to edit",controlsPadding:6,items:[{family:"Roboto",src:"fonts/open-sans-v27-latin-ext_latin-regular.woff2"},{family:"Fuzzy Bubbles",src:"fonts/fuzzy-bubbles-v3-latin-700.woff2",descriptors:{weight:"700"}},{family:"Aleo Bold",src:"fonts/aleo-v4-latin-ext_latin-700.woff2",descriptors:{weight:"700"}},{family:"Amatic SC",src:"fonts/amatic-sc-v16-latin-ext_latin-regular.woff2"},{family:"Corinthia Bold",src:"fonts/corinthia-v7-latin-ext_latin-700.woff2"},{family:"Bungee Inline",src:"fonts/bungee-inline-v6-latin-ext_latin-regular.woff2"},{family:"Robot Slab Bold",src:"fonts/roboto-slab-v16-latin-ext_latin-500.woff2"},{family:"Carter One",src:"fonts/carter-one-v12-latin-regular.woff2"},{family:"Cody Star",src:"fonts/codystar-v10-latin-ext_latin-regular.woff2"},{family:"Fira Sans",src:"fonts/fira-sans-v11-latin-ext_latin_cyrillic-regular.woff2"},{family:"Krona One",src:"fonts/krona-one-v9-latin-ext_latin-regular.woff2"},{family:"Kumar One Outline",src:"fonts/kumar-one-outline-v8-latin-ext_latin-regular.woff2"},{family:"Lobster Two",src:"fonts/lobster-two-v13-latin-regular.woff2"},{family:"Molle Italic",src:"fonts/molle-v11-latin-ext_latin-italic.woff2"},{family:"Monoton",src:"fonts/monoton-v10-latin-regular.woff2"},{family:"Nixie One",src:"fonts/nixie-one-v11-latin-regular.woff2"},{family:"Permanent Marker",src:"fonts/permanent-marker-v10-latin-regular.woff2"},{family:"Sancreek",src:"fonts/sancreek-v13-latin-ext_latin-regular.woff2"},{family:"Stint Ultra Expanded",src:"fonts/stint-ultra-expanded-v10-latin-regular.woff2"},{family:"VT323",src:"fonts/vt323-v12-latin-ext_latin-regular.woff2"},{family:"Trash Hand",src:"fonts/TrashHand.ttf"}]},draw:{brushSizes:tu,brushTypes:["PencilBrush","EraserBrush","SprayBrush","CircleBrush","DiamondBrush","VLineBrush","HLineBrush","SquareBrush"]},shapes:{items:[{name:"circle",type:"Circle"},{name:"square",type:"Rect",options:{lockUniScaling:!1}},{name:"triangle",type:"Triangle"},{name:"ellipse",type:"Ellipse",options:{lockUniScaling:!1}},{name:"Arrow #1",type:"Path",options:{path:"M 294.9 16.4 l 15.7 42.2 c -171.4 70.3 -294 242.3 -289.1 437.4 l 14.7 -1 c 9.1 -0.6 18.1 -1.2 27.1 -1.9 l 14.7 -1 c -4.3 -170.1 102.5 -320 252 -381.3 l 15.7 42.2 c 34.7 -40.5 83.1 -76.6 144.8 -99.8 c -58.1 -26.2 -124.9 -39.6 -195.6 -36.8 z"}},{name:"Arrow #2",type:"Path",options:{path:"M 16 248.4 v 14.9 h 447.5 l -93.2 82.5 l 11.9 10.5 l 113.8 -100.2 l -113.6 -100.4 l -11.8 10.5 l 92.9 82.2 z"}},{name:"Arrow #3",type:"Path",options:{path:"M 496 256 l -118.6 -66 v 40.8 h -361.4 v 50.4 h 361.4 v 40.8 l 118.6 -66 z"}},{name:"Line",type:"Path",options:{path:"M 16 256 h 480",strokeWidth:10,stroke:"#000",padding:10}},{name:"Star",type:"Path",options:{path:"M 256 406.3 l 148.3 78 l -28.3 -165.2 l 120 -117 l -165.8 -24.1 l -74.2 -150.3 l -74.2 150.3 l -165.8 24.1 l 120 117 l -28.3 165.2 z"}},{name:"Polygon",type:"Path",options:{path:"M 256 19.6 l 156.6 57.1 l 83.4 144.3 l -28.9 164.2 l -127.7 107.2 h -166.8 l -127.7 -107.2 l -28.9 -164.2 l 83.4 -144.3 z"}},{name:"Badge",type:"Path",options:{path:"M 257.3 16.2 s -148 58.2 -204.4 81.4 c 0 75.7 -16.8 303.5 204.4 398.2 c 218.7 -94.6 201.9 -322.4 201.9 -398.2 c -62.1 -23.6 -201.9 -81.4 -201.9 -81.4 z"}}].slice()},stickers:{items:Jc},import:{validImgExtensions:["png","jpg","jpeg","svg","gif"],fitOverlayToScreen:!0,openDroppedImageAsBackground:!1},export:{defaultFormat:"png",defaultQuality:.8,defaultName:"image"},frame:{items:[{name:"basic",mode:"basic",size:{min:1,max:35,default:10}},{name:"pine",mode:"stretch",size:{min:1,max:35,default:15}},{name:"oak",mode:"stretch",size:{min:1,max:35,default:15}},{name:"rainbow",mode:"stretch",size:{min:1,max:35,default:15}},{name:"grunge1",display_name:"grunge #1",mode:"stretch",size:{min:1,max:35,default:15}},{name:"grunge2",display_name:"grunge #2",mode:"stretch",size:{min:1,max:35,default:20}},{name:"ebony",mode:"stretch",size:{min:1,max:35,default:15}},{name:"art1",display_name:"Art #1",mode:"repeat",size:{min:10,max:70,default:55}},{name:"art2",display_name:"Art #2",mode:"repeat",size:{min:10,max:70,default:55}}]}}},Mu=e=>{let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=r??("object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},a=t=e(r,i,o);return o};var Ru={exports:{}},Lu={},ju={exports:{}},Du={},Nu=i;
|
|
10
10
|
/**
|
|
11
11
|
* @license React
|
|
12
12
|
* use-sync-external-store-shim.production.min.js
|
|
@@ -58,7 +58,7 @@ function JO(){return JO=Object.assign?Object.assign.bind():function(e){for(var t
|
|
|
58
58
|
*
|
|
59
59
|
* @license MIT
|
|
60
60
|
*/
|
|
61
|
-
function dF(){return dF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dF.apply(this,arguments)}new Promise(()=>{});const hF=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch{}const fF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pF=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gF=r.forwardRef(function(e,t){let n,{onClick:i,relative:o,reloadDocument:a,replace:s,state:l,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,f=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&(i[n]=e[n]);return i}(e,hF),{basename:p}=r.useContext(eF),g=!1;if("string"==typeof u&&pF.test(u)&&(n=u,fF))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}(t.pathname,p);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:g=!0}catch{}let m=function(e,t){let{relative:n}=void 0===t?{}:t;rF()||BO(!1);let{basename:i,navigator:o}=r.useContext(eF),{hash:a,pathname:s,search:l}=sF(e,{relative:n}),c=s;return"/"!==i&&(c="/"===s?i:YO([i,s])),o.createHref({pathname:c,search:l,hash:a})}(u,{relative:o}),v=function(e,t){let{target:n,replace:i,state:o,preventScrollReset:a,relative:s,unstable_viewTransition:l}=void 0===t?{}:t,c=aF(),u=iF(),d=sF(e,{relative:s});return r.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==i?i:VO(u)===VO(d);c(e,{replace:n,state:o,preventScrollReset:a,relative:s,unstable_viewTransition:l})}},[u,c,d,i,o,n,e,a,s,l])}(u,{replace:s,state:l,target:c,preventScrollReset:d,relative:o,unstable_viewTransition:h});return r.createElement("a",dF({},f,{href:n||m,onClick:g||a?i:function(e){i&&i(e),e.defaultPrevented||v(e)},ref:t,target:c}))});var mF,vF;!function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"}(mF||(mF={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(vF||(vF={}));const yF=cu(e("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutlineOutlined"),bF=cu(e("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}),"CheckCircleOutlined"),wF={opacity:0,y:50,scale:.3},xF={opacity:1,y:0,scale:1},CF={opacity:0,scale:.5};function _F(){const n=Lf(e=>e.toasts);return e("div",{className:"pointer-events-none relative",children:e(Py,{initial:!1,children:n.map(n=>e("div",{className:au("fixed z-toast mx-auto p-20","bottom-center"===n.position?"bottom-0 left-0 right-0":"bottom-0 right-0"),children:t(ky.div,{initial:n.disableEnterAnimation?void 0:wF,animate:n.disableEnterAnimation?void 0:xF,exit:n.disableExitAnimation?void 0:CF,className:au("pointer-events-auto mx-auto flex max-h-100 min-h-50 w-min min-w-288 max-w-500 items-center gap-10 rounded-lg border bg-paper bg-paper py-6 pl-16 pr-6 text-sm text-main shadow-lg"),onPointerEnter:()=>{var e;return null==(e=n.timer)?void 0:e.pause()},onPointerLeave:()=>{var e;return null==(e=n.timer)?void 0:e.resume()},role:"alert","aria-live":"danger"===n.type?"assertive":"polite",children:["danger"===n.type&&e(yF,{className:"flex-shrink-0 text-danger",size:"md"}),"loading"===n.type&&e(fI,{size:"sm",className:"flex-shrink-0",isIndeterminate:!0}),"positive"===n.type&&e(bF,{className:"flex-shrink-0 text-positive",size:"md"}),e("div",{className:"mr-auto w-max overflow-hidden overflow-ellipsis","data-testid":"toast-message",children:e(nS,{value:n.message})}),n.action&&e(Vw,{variant:"text",color:"primary",size:"sm",className:"flex-shrink-0",onFocus:()=>{var e;return null==(e=n.timer)?void 0:e.pause()},onBlur:()=>{var e;return null==(e=n.timer)?void 0:e.resume()},onClick:()=>jf().remove(n.id),elementType:gF,to:n.action.action,children:e(nS,{value:n.action.label})}),"loading"!==n.type&&e(eS,{onFocus:()=>{var e;return null==(e=n.timer)?void 0:e.pause()},onBlur:()=>{var e;return null==(e=n.timer)?void 0:e.resume()},type:"button",className:"flex-shrink-0",onClick:()=>{jf().remove(n.id)},size:"sm",children:e(gS,{})})]})},n.id))})})}function SF(e){return Ky()?e.metaKey:e.ctrlKey}function kF(e){switch(e.key){case"z":SF(e)&&(e.preventDefault(),e.stopPropagation(),e.shiftKey?kf().history.redo():kf().history.undo());break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),kf().objects.move("up");break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),kf().objects.move("right");break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),kf().objects.move("down");break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),kf().objects.move("left");break;case"Delete":e.preventDefault(),e.stopPropagation(),kf().objects.delete();break;case"v":SF(e)&&(e.preventDefault(),e.stopPropagation(),async function(){try{const e=await navigator.clipboard.read();for(const t of e)for(const e of t.types)if(e.startsWith("image/")){const n=await t.getType(e),r=new FileReader;return r.onload=e=>{var t;null!=(t=e.target)&&t.result&&kf().import.addImageFromData(e.target.result)},void r.readAsDataURL(n)}}catch(e){console.error(e)}}())}}const AF=new Map,EF=new Map,IF={};async function*TF(e){const t=e.createReader();let n;do{n=await new Promise((e,n)=>{t.readEntries(e,n)});for(const e of n)if(e.isFile){if(".DS_Store"===e.name)continue;const t=await OF(e);yield new fw(t,e.fullPath)}else e.isDirectory&&(yield*TF(e))}while(n.length>0)}function OF(e){return new Promise((t,n)=>e.file(t,n))}function FF(e){return null!=IF.dragTargetId?AF.get(IF.dragTargetId):e.dataTransfer.types.includes("Files")?{type:"nativeFile",el:null,ref:null,getData:()=>async function(e){const t=[];for await(const n of e)t.push(n);return t}(async function*(e){const t=[];for(const n of e.items)if("file"===n.kind){const e=n.webkitGetAsEntry();e&&t.push(e)}for(const e of t)if(e.isFile){if(".DS_Store"===e.name)continue;const t=await OF(e);yield new fw(t,e.fullPath)}else e.isDirectory&&(yield*TF(e))}(e.dataTransfer))}:void 0}function PF(){const n=_f(e=>{var t;return null==(t=e.config.ui)?void 0:t.visible})??!0,r=_f(e=>{var t,n;return null==(n=null==(t=e.config.ui)?void 0:t.nav)?void 0:n.position})??"bottom",i=_f(e=>{var t,n;return null==(n=null==(t=e.config.ui)?void 0:t.menubar)?void 0:n.position})??"top",o=_f(e=>{var t;return null==(t=e.config.ui)?void 0:t.allowEditorClose})??!0,s=u(null),l=u(null),{isModal:d,isMobile:h}=mS(),f=c(async e=>{var t,n;if(Sf().activeTool||Sf().dirty||"nativeFile"!==e.type)return;const r=await e.getData();kf().import.fileIsValid(r[0])&&((null==(n=null==(t=Sf().config.tools)?void 0:t.import)?void 0:n.openDroppedImageAsBackground)?await kf().import.openBackgroundImage(r[0]):await kf().import.openUploadedFile(r[0]))},[]),{droppableProps:p}=function({id:e,disabled:t,ref:n,...r}){const i=u({dragOverElements:new Set,dropActivateTimer:void 0}).current,o=u(r);o.current=r,x(()=>(EF.set(e,{...EF.get(e),disabled:t,id:e,ref:n}),()=>{EF.delete(e)}),[e,o,t,n]);const a=e=>{var t;const r=o.current,i=r.allowDragEventsFromItself||n.current!==(null==(t=e.ref)?void 0:t.current);return!(!(null!=e&&e.type&&i&&r.types.includes(e.type))||r.acceptsDrop&&!r.acceptsDrop(e))},s=e=>{var t,n;const r=FF(e);r&&(null==(n=(t=o.current).onDragLeave)||n.call(t,r))};return{droppableProps:t?{}:{onDragOver:e=>{var t,n;e.preventDefault(),e.stopPropagation();const r=FF(e);r&&a(r)&&(null==(n=(t=o.current).onDragOver)||n.call(t,r,e))},onDragEnter:e=>{var t,n;if(e.stopPropagation(),i.dragOverElements.add(e.target),i.dragOverElements.size>1)return;const r=FF(e);r&&a(r)&&(null==(n=(t=o.current).onDragEnter)||n.call(t,r),clearTimeout(i.dropActivateTimer),"function"==typeof o.current.onDropActivate&&(i.dropActivateTimer=setTimeout(()=>{var e,t;r&&(null==(t=(e=o.current).onDropActivate)||t.call(e,r))},400)))},onDragLeave:e=>{e.stopPropagation(),i.dragOverElements.delete(e.target);for(const t of i.dragOverElements)e.currentTarget.contains(t)||i.dragOverElements.delete(t);if(i.dragOverElements.size>0)return;const t=FF(e);t&&a(t)&&(s(e),clearTimeout(i.dropActivateTimer))},onDrop:async e=>{var t,n,r,l;e.preventDefault(),e.stopPropagation(),i.dragOverElements.clear(),s(e),clearTimeout(i.dropActivateTimer);const c=FF(e);c&&(null==(n=(t=o.current).onDragLeave)||n.call(t,c),a(c)&&(null==(l=(r=o.current).onDrop)||l.call(r,c)))}}}}({id:"pixie-root",ref:l,types:["nativeFile"],onDrop:f});a(()=>{var e,t;Sf().fabric||(_f.setState({canvasRef:s}),Pw(s.current),null!=(e=Sf().config.ui)&&e.defaultTool&&Sf().setActiveTool(null==(t=Sf().config.ui)?void 0:t.defaultTool,null),kf().canvas.loadInitialContent().then(()=>{var e,t;null==(t=(e=Sf().config).onLoad)||t.call(e,Sf().editor)}));const n=Mw(l,()=>{Sf().setStageSize(Rw(l.current))}),r=Mw(s,()=>{Sf().setCanvasSize(Rw(s.current))});return()=>{n(),r()}},[l]);const g=au("pixie-root flex flex-col overflow-hidden bg-background text-main no-tap-highlight w-full h-full",{relative:!d,"fixed inset-0 w-full h-full z-20":d,"shadow-lg border rounded-md m-auto max-h-[calc(100vh-90px)] max-w-[calc(100vw-90px)]":d&&!h});return t(My,{features:Ly,strict:!0,children:[d&&n&&!h&&o&&e(eS,{className:"z-20 fixed right-2 top-2 text-white",size:"lg",onClick:()=>{Sf().editor.close()},children:e(gS,{})}),d&&n&&e(r_,{position:"fixed",disableInitialTransition:!0}),t(ky.div,{initial:!1,variants:{visible:{opacity:1,scale:1,display:"flex"},hidden:{opacity:0,transitionEnd:{display:"none"}}},animate:n?"visible":"hidden",className:g,children:["top"===i&&e(_S,{}),"top"===r&&e(yO,{className:"pt-14"}),t("main",{className:"relative flex-auto my-20 overflow-hidden outline-none",tabIndex:-1,...Yy(p,{onKeyDownCapture:kF}),ref:l,children:[e(kS,{}),e(rA,{ref:s})]}),e(sT,{}),"bottom"===r&&e(yO,{}),"bottom"===i&&e(_S,{}),e(jO,{}),e(_F,{})]})]})}!function(){fabric.Object.ENLIVEN_PROPS.push("eraser");var e=fabric.Object.prototype._drawClipPath,t=fabric.Object.prototype.needsItsOwnCache,n=fabric.Object.prototype.toObject,r=fabric.Object.prototype.getSvgCommons,i=fabric.Object.prototype._createBaseClipPathSVGMarkup,o=fabric.Object.prototype._createBaseSVGMarkup;fabric.Object.prototype.cacheProperties.push("eraser"),fabric.Object.prototype.stateProperties.push("eraser"),fabric.util.object.extend(fabric.Object.prototype,{erasable:!0,eraser:void 0,needsItsOwnCache:function(){return t.call(this)||!!this.eraser},_drawClipPath:function(t,n){if(e.call(this,t,n),this.eraser){var r=this._getNonTransformedDimensions();this.eraser.isType("eraser")&&this.eraser.set({width:r.x,height:r.y}),e.call(this,t,this.eraser)}},toObject:function(e){var t=n.call(this,["erasable"].concat(e));return this.eraser&&!this.eraser.excludeFromExport&&(t.eraser=this.eraser.toObject(e)),t},getSvgCommons:function(){return r.call(this)+(this.eraser?'mask="url(#'+this.eraser.clipPathId+')" ':"")},_createEraserSVGMarkup:function(e){return this.eraser?(this.eraser.clipPathId="MASK_"+fabric.Object.__uid++,['<mask id="',this.eraser.clipPathId,'" >',this.eraser.toSVG(e),"</mask>","\n"].join("")):""},_createBaseClipPathSVGMarkup:function(e,t){return[this._createEraserSVGMarkup(t&&t.reviver),i.call(this,e,t)].join("")},_createBaseSVGMarkup:function(e,t){return[this._createEraserSVGMarkup(t&&t.reviver),o.call(this,e,t)].join("")}});var a=fabric.Group.prototype._restoreObjectsState;fabric.util.object.extend(fabric.Group.prototype,{_addEraserPathToObjects:function(e){this._objects.forEach(function(t){fabric.EraserBrush.prototype._addPathToObjectEraser.call(fabric.EraserBrush.prototype,t,e)})},applyEraserToObjects:function(){var e=this,t=this.eraser;if(t){delete this.eraser;var n=e.calcTransformMatrix();t.clone(function(t){var r=e.clipPath;t.getObjects("path").forEach(function(t){var i=fabric.util.multiplyTransformMatrices(n,t.calcTransformMatrix());fabric.util.applyTransformToObject(t,i),r?r.clone(function(r){var i=fabric.EraserBrush.prototype.applyClipPathToPath.call(fabric.EraserBrush.prototype,t,r,n);e._addEraserPathToObjects(i)},["absolutePositioned","inverted"]):e._addEraserPathToObjects(t)})})}},_restoreObjectsState:function(){return!0===this.erasable&&this.applyEraserToObjects(),a.call(this)}}),fabric.Eraser=fabric.util.createClass(fabric.Group,{type:"eraser",originX:"center",originY:"center",drawObject:function(e){e.save(),e.fillStyle="black",e.fillRect(-this.width/2,-this.height/2,this.width,this.height),e.restore(),this.callSuper("drawObject",e)},_getBounds:function(){},_toSVG:function(e){var t=["<g ","COMMON_PARTS"," >\n"],n=["<rect ",'fill="white" ','x="',-this.width/2,'" y="',-this.height/2,'" width="',this.width,'" height="',this.height,'" />\n'].join("");t.push("\t\t",n);for(var r=0,i=this._objects.length;r<i;r++)t.push("\t\t",this._objects[r].toSVG(e));return t.push("</g>\n"),t}}),fabric.Eraser.fromObject=function(e,t){var n=e.objects;fabric.util.enlivenObjects(n,function(n){var r=fabric.util.object.clone(e,!0);delete r.objects,fabric.util.enlivenObjectEnlivables(e,r,function(){t&&t(new fabric.Eraser(n,r,!0))})})};var s=fabric.Canvas.prototype._renderOverlay;fabric.util.object.extend(fabric.Canvas.prototype,{isErasing:function(){return this.isDrawingMode&&this.freeDrawingBrush&&"eraser"===this.freeDrawingBrush.type&&this.freeDrawingBrush._isErasing},_renderOverlay:function(e){s.call(this,e),this.isErasing()&&!this.freeDrawingBrush.inverted&&this.freeDrawingBrush._render()}}),fabric.EraserBrush=fabric.util.createClass(fabric.PencilBrush,{type:"eraser",inverted:!1,_isErasing:!1,_isErasable:function(e){return!1!==e.erasable},_prepareCollectionTraversal:function(e,t,n){e.forEachObject(function(r){r.forEachObject&&"deep"===r.erasable?this._prepareCollectionTraversal(r,t,n):!this.inverted&&r.erasable&&r.visible?(r.visible=!1,e.dirty=!0,n.visibility.push(r),n.collection.push(e)):this.inverted&&r.visible&&(r.erasable&&r.eraser?(r.eraser.inverted=!0,r.dirty=!0,e.dirty=!0,n.eraser.push(r),n.collection.push(e)):(r.visible=!1,e.dirty=!0,n.visibility.push(r),n.collection.push(e)))},this)},preparePattern:function(){this._patternCanvas||(this._patternCanvas=fabric.util.createCanvasElement());var e=this._patternCanvas;e.width=this.canvas.width,e.height=this.canvas.height;var t=e.getContext("2d");if(this.canvas._isRetinaScaling()){var n=this.canvas.getRetinaScaling();this.canvas.__initRetinaScaling(n,e,t)}var r=this.canvas.backgroundImage,i=r&&this._isErasable(r),o=this.canvas.overlayImage,a=o&&this._isErasable(o);if(!this.inverted&&(r&&!i||this.canvas.backgroundColor))i&&(this.canvas.backgroundImage=void 0),this.canvas._renderBackground(t),i&&(this.canvas.backgroundImage=r);else if(this.inverted&&r&&i){var l=this.canvas.backgroundColor;this.canvas.backgroundColor=void 0,this.canvas._renderBackground(t),this.canvas.backgroundColor=l}t.save(),t.transform.apply(t,this.canvas.viewportTransform);var c={visibility:[],eraser:[],collection:[]};if(this._prepareCollectionTraversal(this.canvas,t,c),this.canvas._renderObjects(t,this.canvas._objects),c.visibility.forEach(function(e){e.visible=!0}),c.eraser.forEach(function(e){e.eraser.inverted=!1,e.dirty=!0}),c.collection.forEach(function(e){e.dirty=!0}),t.restore(),!this.inverted&&(o&&!a||this.canvas.overlayColor))a&&(this.canvas.overlayImage=void 0),s.call(this.canvas,t),a&&(this.canvas.overlayImage=o);else if(this.inverted&&o&&a){l=this.canvas.overlayColor;this.canvas.overlayColor=void 0,s.call(this.canvas,t),this.canvas.overlayColor=l}},_setBrushStyles:function(e){this.callSuper("_setBrushStyles",e),e.strokeStyle="black"},_saveAndTransform:function(e){this.callSuper("_saveAndTransform",e),this._setBrushStyles(e),e.globalCompositeOperation=e===this.canvas.getContext()?"destination-out":"source-over"},needsFullRender:function(){return!0},onMouseDown:function(e,t){this.canvas._isMainEvent(t.e)&&(this._prepareForDrawing(e),this._captureDrawingPath(e),this.preparePattern(),this._isErasing=!0,this.canvas.fire("erasing:start"),this._render())},_render:function(){var e;this.inverted||(e=this.canvas.getContext(),this.callSuper("_render",e)),e=this.canvas.contextTop,this.canvas.clearContext(e),this.callSuper("_render",e),e.save();var t=1/this.canvas.getRetinaScaling();e.scale(t,t),e.globalCompositeOperation="source-in",e.drawImage(this._patternCanvas,0,0),e.restore()},createPath:function(e){var t=this.callSuper("createPath",e);return t.globalCompositeOperation=this.inverted?"source-over":"destination-out",t.stroke=this.inverted?"white":"black",t},applyClipPathToPath:function(e,t,n){var r=fabric.util.invertTransform(e.calcTransformMatrix()),i=t.calcTransformMatrix(),o=t.absolutePositioned?r:fabric.util.multiplyTransformMatrices(r,n);return t.absolutePositioned=!1,fabric.util.applyTransformToObject(t,fabric.util.multiplyTransformMatrices(o,i)),e.clipPath=e.clipPath?fabric.util.mergeClipPaths(t,e.clipPath):t,e},clonePathWithClipPath:function(e,t,n){var r=t.calcTransformMatrix(),i=t.clipPath,o=this;e.clone(function(e){i.clone(function(t){n(o.applyClipPathToPath(e,t,r))},["absolutePositioned","inverted"])})},_addPathToObjectEraser:function(e,t){var n=this;if(e.forEachObject&&"deep"===e.erasable){var r=e._objects.filter(function(e){return e.erasable});r.length>0&&e.clipPath?this.clonePathWithClipPath(t,e,function(e){r.forEach(function(t){n._addPathToObjectEraser(t,e)})}):r.length>0&&r.forEach(function(e){n._addPathToObjectEraser(e,t)})}else{var i=e.eraser;i||(i=new fabric.Eraser,e.eraser=i),t.clone(function(t){var r=fabric.util.multiplyTransformMatrices(fabric.util.invertTransform(e.calcTransformMatrix()),t.calcTransformMatrix());fabric.util.applyTransformToObject(t,r),i.addWithUpdate(t),e.set("dirty",!0),e.fire("erasing:end",{path:t}),e.group&&Array.isArray(n.__subTargets)&&n.__subTargets.push(e)})}},applyEraserToCanvas:function(e){var t=this.canvas,n={};return["backgroundImage","overlayImage"].forEach(function(r){var i=t[r];i&&i.erasable&&(this._addPathToObjectEraser(i,e),n[r]=i)},this),n},_finalizeAndAddPath:function(){var e=this.canvas.contextTop,t=this.canvas;e.closePath(),this.decimate&&(this._points=this.decimatePoints(this._points,this.decimate)),t.clearContext(t.contextTop),this._isErasing=!1;var n=this._points&&this._points.length>1?this.convertPointsToSVGPath(this._points):null;if(!n||this._isEmptySVGPath(n))return t.fire("erasing:end"),void t.requestRenderAll();var r=this.createPath(n);r.setCoords(),t.fire("before:path:created",{path:r});var i=this.applyEraserToCanvas(r),o=this;this.__subTargets=[];var a=[];t.forEachObject(function(e){e.erasable&&e.intersectsWithObject(r,!0,!0)&&(o._addPathToObjectEraser(e,r),a.push(e))}),t.fire("erasing:end",{path:r,targets:a,subTargets:this.__subTargets,drawables:i}),delete this.__subTargets,t.requestRenderAll(),this._resetShadow(),t.fire("path:created",{path:r})}})}(),Io.enableBoundaryChecking(!1);const MF=class t{constructor(t){if(vo(this,"tools",{}),vo(this,"fabric",null),t.sentryDsn&&function(e){const t={...e};Rl(t,"react"),Hc(t)}({dsn:t.sentryDsn}),function(e,t){void 0===t&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('/*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com*/.pi *,.pi :after,.pi :before{border-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity));border-style:solid;border-width:0;box-sizing:border-box}.pi :after,.pi :before{--tw-content:""}.pi hr{border-top-width:1px;color:inherit;height:0}.pi abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.pi h1,.pi h2,.pi h3,.pi h4,.pi h5,.pi h6{font-size:inherit;font-weight:inherit}.pi a{color:inherit;text-decoration:inherit}.pi b,.pi strong{font-weight:bolder}.pi code,.pi kbd,.pi pre,.pi samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.pi small{font-size:80%}.pi sub,.pi sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.pi sub{bottom:-.25em}.pi sup{top:-.5em}.pi table{border-collapse:collapse;border-color:inherit;text-indent:0}.pi button,.pi input,.pi optgroup,.pi select,.pi textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}.pi button,.pi select{text-transform:none}.pi [type=button],.pi [type=reset],.pi [type=submit],.pi button{-webkit-appearance:button;background-color:transparent;background-image:none}.pi :-moz-focusring{outline:auto}.pi :-moz-ui-invalid{box-shadow:none}.pi progress{vertical-align:baseline}.pi ::-webkit-inner-spin-button,.pi ::-webkit-outer-spin-button{height:auto}.pi [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.pi ::-webkit-search-decoration{-webkit-appearance:none}.pi ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.pi summary{display:list-item}.pi blockquote,.pi dd,.pi dl,.pi figure,.pi h1,.pi h2,.pi h3,.pi h4,.pi h5,.pi h6,.pi hr,.pi p,.pi pre{margin:0}.pi fieldset{margin:0;padding:0}.pi legend{padding:0}.pi menu,.pi ol,.pi ul{list-style:none;margin:0;padding:0}.pi textarea{resize:vertical}.pi input::-moz-placeholder,.pi textarea::-moz-placeholder{color:#9ca3af;opacity:1}.pi input::placeholder,.pi textarea::placeholder{color:#9ca3af;opacity:1}.pi [role=button],.pi button{cursor:pointer}.pi :disabled{cursor:default}.pi audio,.pi canvas,.pi embed,.pi iframe,.pi img,.pi object,.pi svg,.pi video{display:block;vertical-align:middle}.pi img,.pi video{height:auto;max-width:100%}.pi [hidden]{display:none}.pi *,.pi :after,.pi :before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pi ::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pi .\\!container{width:100%!important}.pi .container{width:100%}@media (min-width:640px){.pi .\\!container{max-width:640px!important}.pi .container{max-width:640px}}@media (min-width:768px){.pi .\\!container{max-width:768px!important}.pi .container{max-width:768px}}@media (min-width:1024px){.pi .\\!container{max-width:1024px!important}.pi .container{max-width:1024px}}@media (min-width:1280px){.pi .\\!container{max-width:1280px!important}.pi .container{max-width:1280px}}@media (min-width:1536px){.pi .\\!container{max-width:1536px!important}.pi .container{max-width:1536px}}.pi .sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.pi .pointer-events-none{pointer-events:none}.pi .pointer-events-auto{pointer-events:auto}.pi .\\!visible{visibility:visible!important}.pi .visible{visibility:visible}.pi .invisible{visibility:hidden}.pi .collapse{visibility:collapse}.pi .static{position:static}.pi .fixed{position:fixed}.pi .absolute{position:absolute}.pi .relative{position:relative}.pi .inset-0{top:0;right:0;bottom:0;left:0}.pi .inset-x-0{left:0;right:0}.pi .-bottom-10{bottom:-10px}.pi .-bottom-20{bottom:-20px}.pi .-bottom-5{bottom:-5px}.pi .-left-5{left:-5px}.pi .-left-8{left:-8px}.pi .-left-80{left:-80px}.pi .-right-5{right:-5px}.pi .-top-144{top:-144px}.pi .-top-40{top:-40px}.pi .-top-5{top:-5px}.pi .bottom-0{bottom:0}.pi .bottom-20{bottom:20px}.pi .left-0{left:0}.pi .left-1\\/2{left:50%}.pi .left-20{left:20px}.pi .right-0{right:0}.pi .right-16{right:16px}.pi .right-2{right:2px}.pi .right-20{right:20px}.pi .right-4{right:4px}.pi .top-0{top:0}.pi .top-1\\/2{top:50%}.pi .top-2{top:2px}.pi .isolate{isolation:isolate}.pi .z-10{z-index:10}.pi .z-20{z-index:20}.pi .z-50{z-index:50}.pi .z-cropzone{z-index:10}.pi .z-loading-indicator{z-index:50}.pi .z-modal{z-index:110}.pi .z-navbar{z-index:40}.pi .z-obj-box{z-index:20}.pi .z-popover{z-index:130}.pi .z-toast{z-index:160}.pi .z-tool-overlay{z-index:30}.pi .z-tooltip{z-index:150}.pi .z-tray{z-index:120}.pi .m-auto{margin:auto}.pi .mx-20{margin-left:20px;margin-right:20px}.pi .mx-8{margin-left:8px;margin-right:8px}.pi .mx-auto{margin-left:auto;margin-right:auto}.pi .my-20{margin-bottom:20px;margin-top:20px}.pi .my-4{margin-bottom:4px;margin-top:4px}.pi .my-6{margin-bottom:6px;margin-top:6px}.pi .my-8{margin-bottom:8px;margin-top:8px}.pi .my-auto{margin-bottom:auto;margin-top:auto}.pi .-ml-1{margin-left:-1px}.pi .-ml-10{margin-left:-10px}.pi .-ml-12{margin-left:-12px}.pi .-ml-3{margin-left:-3px}.pi .-ml-4{margin-left:-4px}.pi .-ml-6{margin-left:-6px}.pi .-mr-4{margin-right:-4px}.pi .-mr-8{margin-right:-8px}.pi .mb-1{margin-bottom:1px}.pi .mb-10{margin-bottom:10px}.pi .mb-16{margin-bottom:16px}.pi .mb-2{margin-bottom:2px}.pi .mb-20{margin-bottom:20px}.pi .mb-24{margin-bottom:24px}.pi .mb-4{margin-bottom:4px}.pi .mb-6{margin-bottom:6px}.pi .mb-8{margin-bottom:8px}.pi .ml-10{margin-left:10px}.pi .ml-12{margin-left:12px}.pi .ml-4{margin-left:4px}.pi .ml-6{margin-left:6px}.pi .ml-8{margin-left:8px}.pi .ml-auto{margin-left:auto}.pi .mr-10{margin-right:10px}.pi .mr-16{margin-right:16px}.pi .mr-20{margin-right:20px}.pi .mr-4{margin-right:4px}.pi .mr-5{margin-right:5px}.pi .mr-6{margin-right:6px}.pi .mr-8{margin-right:8px}.pi .mr-auto{margin-right:auto}.pi .mt-0{margin-top:0}.pi .mt-10{margin-top:10px}.pi .mt-14{margin-top:14px}.pi .mt-20{margin-top:20px}.pi .mt-24{margin-top:24px}.pi .mt-4{margin-top:4px}.pi .mt-6{margin-top:6px}.pi .box-content{box-sizing:content-box}.pi .block{display:block}.pi .inline-block{display:inline-block}.pi .inline{display:inline}.pi .flex{display:flex}.pi .inline-flex{display:inline-flex}.pi .grid{display:grid}.pi .contents{display:contents}.pi .hidden{display:none}.pi .aspect-square{aspect-ratio:1/1}.pi .h-1{height:1px}.pi .h-12{height:12px}.pi .h-128{height:128px}.pi .h-14{height:14px}.pi .h-16{height:16px}.pi .h-18{height:18px}.pi .h-2{height:2px}.pi .h-2\\/4{height:50%}.pi .h-20{height:20px}.pi .h-22{height:22px}.pi .h-24{height:24px}.pi .h-26{height:26px}.pi .h-28{height:28px}.pi .h-3{height:3px}.pi .h-30{height:30px}.pi .h-32{height:32px}.pi .h-36{height:36px}.pi .h-38{height:2.375rem}.pi .h-4{height:4px}.pi .h-40{height:40px}.pi .h-42{height:42px}.pi .h-48{height:48px}.pi .h-50{height:50px}.pi .h-56{height:56px}.pi .h-6{height:6px}.pi .h-60{height:60px}.pi .h-64{height:64px}.pi .h-68{height:68px}.pi .h-8{height:8px}.pi .h-80{height:80px}.pi .h-84{height:84px}.pi .h-92{height:92px}.pi .h-\\[54px\\]{height:54px}.pi .h-font{height:1em}.pi .h-full{height:100%}.pi .h-px{height:1px}.pi .h-screen{height:100dvh}.pi .max-h-100{max-height:6.25rem}.pi .max-h-\\[calc\\(100\\%-40px\\)\\]{max-height:calc(100% - 40px)}.pi .max-h-\\[calc\\(100vh-90px\\)\\]{max-height:calc(100vh - 90px)}.pi .max-h-dialog{max-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .max-h-full{max-height:100%}.pi .max-h-inherit{max-height:inherit}.pi .max-h-tray{max-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .min-h-24{min-height:24px}.pi .min-h-30{min-height:30px}.pi .min-h-36{min-height:36px}.pi .min-h-42{min-height:42px}.pi .min-h-50{min-height:50px}.pi .min-h-60{min-height:60px}.pi .min-h-86{min-height:86px}.pi .\\!w-auto{width:auto!important}.pi .w-1\\/2{width:50%}.pi .w-110{width:110px}.pi .w-12{width:12px}.pi .w-1280{width:80rem}.pi .w-14{width:14px}.pi .w-144{width:144px}.pi .w-16{width:16px}.pi .w-18{width:18px}.pi .w-2{width:2px}.pi .w-20{width:20px}.pi .w-22{width:22px}.pi .w-224{width:224px}.pi .w-24{width:24px}.pi .w-256{width:256px}.pi .w-26{width:26px}.pi .w-28{width:28px}.pi .w-280{width:17.5rem}.pi .w-30{width:30px}.pi .w-32{width:32px}.pi .w-320{width:320px}.pi .w-36{width:36px}.pi .w-38{width:2.375rem}.pi .w-384{width:384px}.pi .w-40{width:40px}.pi .w-42{width:42px}.pi .w-440{width:27.5rem}.pi .w-46{width:2.875rem}.pi .w-50{width:50px}.pi .w-56{width:56px}.pi .w-60{width:60px}.pi .w-620{width:38.75rem}.pi .w-64{width:64px}.pi .w-68{width:68px}.pi .w-780{width:48.75rem}.pi .w-8{width:8px}.pi .w-80{width:80px}.pi .w-850{width:53.125rem}.pi .w-96{width:96px}.pi .w-\\[4ch\\]{width:4ch}.pi .w-auto{width:auto}.pi .w-font{width:1em}.pi .w-full{width:100%}.pi .w-max{width:-moz-max-content;width:max-content}.pi .w-min{width:-moz-min-content;width:min-content}.pi .w-px{width:1px}.pi .w-screen{width:100vw}.pi .min-w-0{min-width:0}.pi .min-w-128{min-width:128px}.pi .min-w-180{min-width:11.25rem}.pi .min-w-192{min-width:192px}.pi .min-w-288{min-width:288px}.pi .min-w-30{min-width:30px}.pi .min-w-4{min-width:4px}.pi .min-w-42{min-width:42px}.pi .min-w-92{min-width:92px}.pi .min-w-min{min-width:-moz-min-content;min-width:min-content}.pi .max-w-112{max-width:112px}.pi .max-w-240{max-width:240px}.pi .max-w-288{max-width:288px}.pi .max-w-320{max-width:320px}.pi .max-w-375{max-width:375px}.pi .max-w-500{max-width:31.25rem}.pi .max-w-\\[90\\%\\]{max-width:90%}.pi .max-w-\\[calc\\(100\\%-40px\\)\\]{max-width:calc(100% - 40px)}.pi .max-w-\\[calc\\(100vw-90px\\)\\]{max-width:calc(100vw - 90px)}.pi .max-w-dialog{max-width:calc(var(--be-viewport-width, 100vw)*.9)}.pi .max-w-full{max-width:100%}.pi .max-w-max{max-width:-moz-max-content;max-width:max-content}.pi .flex-\\[1_1_60px\\]{flex:1 1 60px}.pi .flex-auto{flex:1 1 auto}.pi .flex-shrink-0,.pi .shrink-0{flex-shrink:0}.pi .origin-\\[0_55\\%\\]{transform-origin:0 55%}.pi .origin-\\[100\\%\\]{transform-origin:100%}.pi .-translate-x-1\\/2{--tw-translate-x:-50%}.pi .-translate-x-1\\/2,.pi .-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .-translate-y-1\\/2{--tw-translate-y:-50%}.pi .rotate-0{--tw-rotate:0deg}.pi .rotate-0,.pi .rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .rotate-180{--tw-rotate:180deg}.pi .rotate-45{--tw-rotate:45deg}.pi .rotate-45,.pi .rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .rotate-90{--tw-rotate:90deg}.pi .scale-y-\\[0\\.6\\]{--tw-scale-y:.6}.pi .scale-y-\\[0\\.6\\],.pi .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .cursor-default{cursor:default}.pi .cursor-move{cursor:move}.pi .cursor-nesw-resize{cursor:nesw-resize}.pi .cursor-not-allowed{cursor:not-allowed}.pi .cursor-nwse-resize{cursor:nwse-resize}.pi .cursor-pointer{cursor:pointer}.pi .cursor-se-resize{cursor:se-resize}.pi .cursor-sw-resize{cursor:sw-resize}.pi .touch-none{touch-action:none}.pi .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.pi .resize{resize:both}.pi .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.pi .grid-cols-5-min-content{grid-template-columns:repeat(5,min-content)}.pi .flex-row{flex-direction:row}.pi .flex-col{flex-direction:column}.pi .flex-col-reverse{flex-direction:column-reverse}.pi .flex-wrap{flex-wrap:wrap}.pi .flex-nowrap{flex-wrap:nowrap}.pi .items-start{align-items:flex-start}.pi .items-end{align-items:flex-end}.pi .items-center{align-items:center}.pi .items-stretch{align-items:stretch}.pi .justify-start{justify-content:flex-start}.pi .justify-center{justify-content:center}.pi .justify-between{justify-content:space-between}.pi .gap-10{gap:10px}.pi .gap-14{gap:14px}.pi .gap-16{gap:16px}.pi .gap-18{gap:18px}.pi .gap-20{gap:20px}.pi .gap-36{gap:36px}.pi .gap-4{gap:4px}.pi .gap-40{gap:40px}.pi .gap-6{gap:6px}.pi .gap-8{gap:8px}.pi .space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(10px*var(--tw-space-y-reverse));margin-top:calc(10px*(1 - var(--tw-space-y-reverse)))}.pi .overflow-auto{overflow:auto}.pi .overflow-hidden{overflow:hidden}.pi .overflow-x-auto{overflow-x:auto}.pi .overflow-y-auto{overflow-y:auto}.pi .overflow-x-hidden{overflow-x:hidden}.pi .overflow-y-hidden{overflow-y:hidden}.pi .overscroll-contain{overscroll-behavior:contain}.pi .truncate{overflow:hidden;white-space:nowrap}.pi .overflow-ellipsis,.pi .text-ellipsis,.pi .truncate{text-overflow:ellipsis}.pi .whitespace-normal{white-space:normal}.pi .whitespace-nowrap{white-space:nowrap}.pi .break-words{overflow-wrap:break-word}.pi .rounded{border-radius:4px}.pi .rounded-2xl{border-radius:16px}.pi .rounded-3xl{border-radius:24px}.pi .rounded-button{border-radius:var(--be-button-radius,.25rem)}.pi .rounded-full{border-radius:9999px}.pi .rounded-input{border-radius:var(--be-input-radius,.25rem)}.pi .rounded-lg{border-radius:8px}.pi .rounded-md{border-radius:6px}.pi .rounded-none{border-radius:0}.pi .rounded-panel{border-radius:var(--be-panel-radius,.25rem)}.pi .rounded-xl{border-radius:12px}.pi .rounded-l{border-bottom-left-radius:4px;border-top-left-radius:4px}.pi .rounded-l-full{border-bottom-left-radius:9999px;border-top-left-radius:9999px}.pi .rounded-l-input{border-bottom-left-radius:var(--be-input-radius,.25rem);border-top-left-radius:var(--be-input-radius,.25rem)}.pi .rounded-l-none{border-bottom-left-radius:0;border-top-left-radius:0}.pi .rounded-r-full{border-bottom-right-radius:9999px;border-top-right-radius:9999px}.pi .rounded-r-input{border-bottom-right-radius:var(--be-input-radius,.25rem);border-top-right-radius:var(--be-input-radius,.25rem)}.pi .rounded-r-none{border-bottom-right-radius:0;border-top-right-radius:0}.pi .rounded-t{border-top-left-radius:4px;border-top-right-radius:4px}.pi .rounded-bl-none{border-bottom-left-radius:0}.pi .rounded-br-none{border-bottom-right-radius:0}.pi .rounded-tl-none{border-top-left-radius:0}.pi .rounded-tr-none{border-top-right-radius:0}.pi .border{border-width:1px}.pi .border-2{border-width:2px}.pi .border-4{border-width:4px}.pi .border-\\[3px\\]{border-width:3px}.pi .border-y{border-top-width:1px}.pi .border-b,.pi .border-y{border-bottom-width:1px}.pi .border-b-4{border-bottom-width:4px}.pi .border-l{border-left-width:1px}.pi .border-l-4{border-left-width:4px}.pi .border-r{border-right-width:1px}.pi .border-r-4{border-right-width:4px}.pi .border-t{border-top-width:1px}.pi .border-t-4{border-top-width:4px}.pi .border-dotted{border-style:dotted}.pi .border-none{border-style:none}.pi .border-background{--tw-border-opacity:1;border-color:rgb(var(--be-background)/var(--tw-border-opacity))}.pi .border-bg-alt{--tw-border-opacity:1;border-color:rgb(var(--be-background-alt)/var(--tw-border-opacity))}.pi .border-chip{--tw-border-opacity:1;border-color:rgb(var(--be-background-chip)/var(--tw-border-opacity))}.pi .border-danger{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .border-danger\\/50{border-color:#ef444480}.pi .border-divider{border-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity))}.pi .border-paper{--tw-border-opacity:1;border-color:rgb(var(--be-paper)/var(--tw-border-opacity))}.pi .border-positive\\/50{border-color:#22c55e80}.pi .border-primary{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .border-primary\\/50{border-color:rgb(var(--be-primary)/.5)}.pi .border-text-muted{border-color:rgb(var(--be-foreground-base)/var(--be-text-muted-opacity))}.pi .border-transparent{border-color:transparent}.pi .border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.pi .border-white\\/50{border-color:#ffffff80}.pi .border-b-bg{--tw-border-opacity:1;border-bottom-color:rgb(var(--be-background)/var(--tw-border-opacity))}.pi .border-b-transparent{border-bottom-color:transparent}.pi .border-r-transparent{border-right-color:transparent}.pi .bg{--tw-bg-opacity:1;background-color:rgb(var(--be-background)/var(--tw-bg-opacity))}.pi .bg-alt{--tw-bg-opacity:1;background-color:rgb(var(--be-background-alt)/var(--tw-bg-opacity))}.pi .bg-background{--tw-bg-opacity:1;background-color:rgb(var(--be-background)/var(--tw-bg-opacity))}.pi .bg-background\\/70{background-color:rgb(var(--be-background)/.7)}.pi .bg-background\\/80{background-color:rgb(var(--be-background)/.8)}.pi .bg-black\\/50{background-color:#00000080}.pi .bg-black\\/80{background-color:#000c}.pi .bg-chip{--tw-bg-opacity:1;background-color:rgb(var(--be-background-chip)/var(--tw-bg-opacity))}.pi .bg-controls{--tw-bg-opacity:1;background-color:rgb(50 50 50/var(--tw-bg-opacity))}.pi .bg-danger{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.pi .bg-danger-lighter{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.pi .bg-divider{background-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity))}.pi .bg-fg-base\\/4{background-color:rgb(var(--be-foreground-base)/4%)}.pi .bg-focus{background-color:rgb(var(--be-foreground-base)/var(--be-focus-opacity))}.pi .bg-inherit{background-color:inherit}.pi .bg-paper{--tw-bg-opacity:1;background-color:rgb(var(--be-paper)/var(--tw-bg-opacity))}.pi .bg-positive{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.pi .bg-positive-lighter{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}.pi .bg-primary{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .bg-primary-dark{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .bg-primary-light{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-light)/var(--tw-bg-opacity))}.pi .bg-primary\\/focus{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .bg-primary\\/selected{background-color:rgb(var(--be-primary)/var(--be-selected-opacity))}.pi .bg-slider-disabled{--tw-bg-opacity:1;background-color:rgb(189 189 189/var(--tw-bg-opacity))}.pi .bg-slider-disabled\\/60{background-color:#bdbdbd99}.pi .bg-toast{--tw-bg-opacity:1;background-color:rgb(50 50 50/var(--tw-bg-opacity))}.pi .bg-transparent{background-color:transparent}.pi .bg-warning{--tw-bg-opacity:1;background-color:rgb(243 164 50/var(--tw-bg-opacity))}.pi .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pi .bg-white\\/50{background-color:#ffffff80}.pi .bg-opacity-95{--tw-bg-opacity:.95}.pi .bg-no-repeat{background-repeat:no-repeat}.pi .fill-current{fill:currentColor}.pi .fill-transparent{fill:transparent}.pi .stroke-current{stroke:currentColor}.pi .object-contain{-o-object-fit:contain;object-fit:contain}.pi .object-cover{-o-object-fit:cover;object-fit:cover}.pi .p-0{padding:0}.pi .p-10{padding:10px}.pi .p-14{padding:14px}.pi .p-16{padding:16px}.pi .p-18{padding:18px}.pi .p-2{padding:2px}.pi .p-20{padding:20px}.pi .p-4{padding:4px}.pi .p-40{padding:40px}.pi .p-6{padding:6px}.pi .p-8{padding:8px}.pi .px-10{padding-left:10px;padding-right:10px}.pi .px-12{padding-left:12px;padding-right:12px}.pi .px-14{padding-left:14px;padding-right:14px}.pi .px-16{padding-left:16px;padding-right:16px}.pi .px-18{padding-left:18px;padding-right:18px}.pi .px-20{padding-left:20px;padding-right:20px}.pi .px-22{padding-left:22px;padding-right:22px}.pi .px-24{padding-left:24px;padding-right:24px}.pi .px-26{padding-left:26px;padding-right:26px}.pi .px-32{padding-left:32px;padding-right:32px}.pi .px-4{padding-left:4px;padding-right:4px}.pi .px-5vw{padding-left:5vw;padding-right:5vw}.pi .px-6{padding-left:6px;padding-right:6px}.pi .px-8{padding-left:8px;padding-right:8px}.pi .py-10{padding-bottom:10px;padding-top:10px}.pi .py-12{padding-bottom:12px;padding-top:12px}.pi .py-14{padding-bottom:14px;padding-top:14px}.pi .py-2{padding-bottom:2px;padding-top:2px}.pi .py-20{padding-bottom:20px;padding-top:20px}.pi .py-3{padding-bottom:3px;padding-top:3px}.pi .py-4{padding-bottom:4px;padding-top:4px}.pi .py-5{padding-bottom:5px;padding-top:5px}.pi .py-6{padding-bottom:6px;padding-top:6px}.pi .py-8{padding-bottom:8px;padding-top:8px}.pi .py-\\[9px\\]{padding-bottom:9px;padding-top:9px}.pi .pb-10{padding-bottom:10px}.pi .pb-12{padding-bottom:12px}.pi .pb-14{padding-bottom:14px}.pi .pb-16{padding-bottom:16px}.pi .pb-18{padding-bottom:18px}.pi .pb-20{padding-bottom:20px}.pi .pb-4{padding-bottom:4px}.pi .pb-8{padding-bottom:8px}.pi .pb-safe-area{padding-bottom:env(safe-area-inset-bottom)}.pi .pl-10{padding-left:10px}.pi .pl-12{padding-left:12px}.pi .pl-14{padding-left:14px}.pi .pl-16{padding-left:16px}.pi .pl-18{padding-left:18px}.pi .pl-28{padding-left:28px}.pi .pl-46{padding-left:2.875rem}.pi .pl-54{padding-left:3.375rem}.pi .pl-8{padding-left:8px}.pi .pr-10{padding-right:10px}.pi .pr-12{padding-right:12px}.pi .pr-18{padding-right:18px}.pi .pr-24{padding-right:24px}.pi .pr-28{padding-right:28px}.pi .pr-46{padding-right:2.875rem}.pi .pr-54{padding-right:3.375rem}.pi .pr-6{padding-right:6px}.pi .pr-8{padding-right:8px}.pi .pt-10{padding-top:10px}.pi .pt-12{padding-top:12px}.pi .pt-14{padding-top:14px}.pi .pt-16{padding-top:16px}.pi .pt-20{padding-top:20px}.pi .pt-24{padding-top:24px}.pi .pt-4{padding-top:4px}.pi .pt-40{padding-top:40px}.pi .pt-6{padding-top:6px}.pi .text-left{text-align:left}.pi .text-center{text-align:center}.pi .text-right{text-align:right}.pi .align-middle{vertical-align:middle}.pi .text-base{font-size:16px;line-height:24px}.pi .text-lg{font-size:18px;line-height:28px}.pi .text-sm{font-size:14px;line-height:20px}.pi .text-xl{font-size:20px;line-height:28px}.pi .text-xs{font-size:12px;line-height:16px}.pi .font-bold{font-weight:700}.pi .font-medium{font-weight:500}.pi .font-semibold{font-weight:600}.pi .uppercase{text-transform:uppercase}.pi .capitalize{text-transform:capitalize}.pi .italic{font-style:italic}.pi .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.pi .leading-5{line-height:1.25rem}.pi .leading-none{line-height:1}.pi .tracking-wide{letter-spacing:.025em}.pi .\\!text{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))!important}.pi .text{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.pi .text-black\\/30{color:#0000004d}.pi .text-danger{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.pi .text-danger-darker{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity))}.pi .text-disabled{color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .text-link{--tw-text-opacity:1;color:rgb(var(--be-link-color,var(--be-primary))/var(--tw-text-opacity))}.pi .text-main{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .text-muted{color:rgb(var(--be-foreground-base)/var(--be-text-muted-opacity))}.pi .text-on-primary{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .text-positive{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.pi .text-positive-darker{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.pi .text-primary{--tw-text-opacity:1;color:rgb(var(--be-primary)/var(--tw-text-opacity))}.pi .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.pi .underline{text-decoration-line:underline}.pi .no-underline{text-decoration-line:none}.pi .caret-transparent{caret-color:transparent}.pi .opacity-0{opacity:0}.pi .opacity-100{opacity:1}.pi .opacity-70{opacity:.7}.pi .opacity-80{opacity:.8}.pi .opacity-90{opacity:.9}.pi .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.pi .shadow,.pi .shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.pi .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.pi .shadow-lg,.pi .shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.pi .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.pi .shadow-sm,.pi .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.pi .outline-none{outline:2px solid transparent;outline-offset:2px}.pi .outline{outline-color:rgb(var(--be-primary-lighter)/1);outline-style:solid;outline-width:2px}.pi .ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .ring-inset{--tw-ring-inset:inset}.pi .blur{--tw-blur:blur(8px)}.pi .blur,.pi .grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .grayscale{--tw-grayscale:grayscale(100%)}.pi .invert{--tw-invert:invert(100%)}.pi .invert,.pi .sepia{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .sepia{--tw-sepia:sepia(100%)}.pi .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.pi .transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-button{transition-duration:.15s;transition-property:background-color,box-shadow,border-color,color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-width{transition-duration:.15s;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .duration-100{transition-duration:.1s}.pi .duration-200{transition-duration:.2s}.pi .will-change-transform{will-change:transform}.pi .icon-2xs{font-size:.75rem}.pi .icon-xs{font-size:1rem}.pi .icon-sm{font-size:1.25rem}.pi .icon-md{font-size:1.5rem}.pi .icon-lg{font-size:2.1875rem}.pi .icon-xl{font-size:2.6875rem}.pi .no-tap-highlight{-webkit-tap-highlight-color:transparent}@media only screen and (min-device-width:768px){.pi .tiny-scrollbar{scrollbar-color:rgba(0,0,0,.2) transparent;scrollbar-width:thin}.pi .tiny-scrollbar::-webkit-scrollbar{background-color:transparent;height:6px;width:6px}.pi .tiny-scrollbar::-webkit-scrollbar-thumb{background-color:rgb(var(--be-foreground-base)/.2);border-radius:10px}.pi .tiny-scrollbar::-webkit-scrollbar-track-piece:start{background:transparent}.pi .tiny-scrollbar::-webkit-scrollbar-track-piece:end{background:transparent}}.pi .hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.pi .hide-scrollbar::-webkit-scrollbar{background:transparent;display:none;height:0;width:0}.pi .svg-icon{display:inline-block;flex-shrink:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;fill:currentColor;transition-duration:.15s;transition-property:transform,fill;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .cropzone:not(.moving) .cropzone-transition{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .first-letter\\:capitalize:first-letter{text-transform:capitalize}.pi .file\\:mr-10::file-selector-button{margin-right:10px}.pi .file\\:h-24::file-selector-button{height:24px}.pi .file\\:rounded::file-selector-button{border-radius:4px}.pi .file\\:border-none::file-selector-button{border-style:none}.pi .file\\:bg-primary::file-selector-button{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .file\\:px-10::file-selector-button{padding-left:10px;padding-right:10px}.pi .file\\:text-sm::file-selector-button{font-size:14px;line-height:20px}.pi .file\\:font-semibold::file-selector-button{font-weight:600}.pi .file\\:text-on-primary::file-selector-button{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .before\\:z-10:before{content:var(--tw-content);z-index:10}.pi .before\\:block:before{content:var(--tw-content);display:block}.pi .before\\:h-12:before{content:var(--tw-content);height:12px}.pi .before\\:h-14:before{content:var(--tw-content);height:14px}.pi .before\\:h-18:before{content:var(--tw-content);height:18px}.pi .before\\:h-22:before{content:var(--tw-content);height:22px}.pi .before\\:h-28:before{content:var(--tw-content);height:28px}.pi .before\\:h-full:before{content:var(--tw-content);height:100%}.pi .before\\:w-12:before{content:var(--tw-content);width:12px}.pi .before\\:w-14:before{content:var(--tw-content);width:14px}.pi .before\\:w-18:before{content:var(--tw-content);width:18px}.pi .before\\:w-22:before{content:var(--tw-content);width:22px}.pi .before\\:w-28:before{content:var(--tw-content);width:28px}.pi .before\\:w-full:before{content:var(--tw-content);width:100%}.pi .before\\:translate-x-2:before{--tw-translate-x:2px}.pi .before\\:scale-10:before,.pi .before\\:translate-x-2:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .before\\:scale-10:before{--tw-scale-x:.1;--tw-scale-y:.1}.pi .before\\:rounded-3xl:before{border-radius:24px;content:var(--tw-content)}.pi .before\\:rounded-full:before{border-radius:9999px;content:var(--tw-content)}.pi .before\\:border:before{border-width:1px;content:var(--tw-content)}.pi .before\\:bg-primary:before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .before\\:bg-white:before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pi .before\\:opacity-0:before{content:var(--tw-content);opacity:0}.pi .before\\:transition:before{content:var(--tw-content);transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .before\\:transition-transform:before{content:var(--tw-content);transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .before\\:duration-200:before{content:var(--tw-content);transition-duration:.2s}.pi .after\\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.pi .after\\:absolute:after{content:var(--tw-content);position:absolute}.pi .after\\:inset-0:after{content:var(--tw-content);top:0;right:0;bottom:0;left:0}.pi .checked\\:border-danger:checked{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .checked\\:border-primary:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .checked\\:bg-danger:checked{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.pi .checked\\:bg-primary:checked{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .checked\\:before\\:translate-x-14:checked:before{--tw-translate-x:14px}.pi .checked\\:before\\:translate-x-14:checked:before,.pi .checked\\:before\\:translate-x-20:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:translate-x-20:checked:before{--tw-translate-x:20px}.pi .checked\\:before\\:translate-x-24:checked:before{--tw-translate-x:24px}.pi .checked\\:before\\:translate-x-24:checked:before,.pi .checked\\:before\\:translate-x-30:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:translate-x-30:checked:before{--tw-translate-x:30px}.pi .checked\\:before\\:translate-x-36:checked:before{--tw-translate-x:36px}.pi .checked\\:before\\:scale-\\[\\.65\\]:checked:before,.pi .checked\\:before\\:translate-x-36:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:scale-\\[\\.65\\]:checked:before{--tw-scale-x:.65;--tw-scale-y:.65}.pi .checked\\:before\\:border-white:checked:before{content:var(--tw-content);--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.pi .checked\\:before\\:opacity-100:checked:before{content:var(--tw-content);opacity:1}.pi .focus-within\\:border-primary\\/60:focus-within{border-color:rgb(var(--be-primary)/.6)}.pi .focus-within\\:ring:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-within\\:ring-primary\\/focus:focus-within{--tw-ring-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .hover\\:border-chip\\/90:hover{border-color:rgb(var(--be-background-chip)/.9)}.pi .hover\\:border-danger:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .hover\\:border-danger\\/90:hover{border-color:#ef4444e6}.pi .hover\\:border-paper\\/90:hover{border-color:rgb(var(--be-paper)/.9)}.pi .hover\\:border-positive:hover{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity))}.pi .hover\\:border-primary:hover{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .hover\\:border-primary-dark:hover{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .hover\\:bg-chip\\/90:hover{background-color:rgb(var(--be-background-chip)/.9)}.pi .hover\\:bg-danger\\/4:hover{background-color:#ef44440a}.pi .hover\\:bg-danger\\/90:hover{background-color:#ef4444e6}.pi .hover\\:bg-fg-base\\/15:hover{background-color:rgb(var(--be-foreground-base)/15%)}.pi .hover\\:bg-hover:hover{background-color:rgb(var(--be-foreground-base)/var(--be-hover-opacity))}.pi .hover\\:bg-paper\\/90:hover{background-color:rgb(var(--be-paper)/.9)}.pi .hover\\:bg-positive\\/4:hover{background-color:#22c55e0a}.pi .hover\\:bg-primary-dark:hover{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .hover\\:bg-primary\\/4:hover{background-color:rgb(var(--be-primary)/4%)}.pi .hover\\:bg-primary\\/focus:hover{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .hover\\:bg-primary\\/hover:hover{background-color:rgb(var(--be-primary)/var(--be-hover-opacity))}.pi .hover\\:bg-white:hover{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pi .hover\\:bg-white\\/20:hover{background-color:#fff3}.pi .hover\\:bg-white\\/hover:hover{background-color:rgb(255 255 255/var(--be-hover-opacity))}.pi .hover\\:text-main:hover{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .hover\\:text-primary-dark:hover{--tw-text-opacity:1;color:rgb(var(--be-primary-dark)/var(--tw-text-opacity))}.pi .hover\\:underline:hover{text-decoration-line:underline}.pi .hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .before\\:hover\\:bg-primary-dark:hover:before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .hover\\:after\\:bg-black\\/5:hover:after{background-color:#0000000d;content:var(--tw-content)}.pi .checked\\:hover\\:border-primary-dark:hover:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .focus\\:border-danger\\/60:focus{border-color:#ef444499}.pi .focus\\:border-primary\\/60:focus{border-color:rgb(var(--be-primary)/.6)}.pi .focus\\:bg-primary:focus{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .focus\\:text-on-primary:focus{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.pi .focus\\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus\\:ring-danger\\/focus:focus{--tw-ring-color:rgb(239 68 68/var(--be-focus-opacity))}.pi .focus\\:ring-primary\\/focus:focus{--tw-ring-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus\\:after\\:bg-black\\/10:focus:after{background-color:#0000001a;content:var(--tw-content)}.pi .focus-visible\\:bg-primary\\/focus:focus-visible{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus-visible\\:outline:focus-visible{outline-color:rgb(var(--be-primary-lighter)/1);outline-style:solid;outline-width:2px}.pi .focus-visible\\:outline-primary-light:focus-visible{outline-color:rgb(var(--be-primary-light)/1)}.pi .focus-visible\\:ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.pi .disabled\\:pointer-events-none:disabled{pointer-events:none}.pi .disabled\\:cursor-default:disabled{cursor:default}.pi .disabled\\:border-disabled-bg:disabled{border-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .disabled\\:border-disabled-fg:disabled{border-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .disabled\\:border-transparent:disabled{border-color:transparent}.pi .disabled\\:border-white\\/70:disabled{border-color:#ffffffb3}.pi .disabled\\:border-r-transparent:disabled{border-right-color:transparent}.pi .disabled\\:bg-disabled:disabled{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .disabled\\:bg-transparent:disabled{background-color:transparent}.pi .disabled\\:text-disabled:disabled{color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .disabled\\:text-white\\/70:disabled{color:#ffffffb3}.pi .disabled\\:shadow-none:disabled{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .disabled\\:before\\:bg-disabled-fg:disabled:before{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity));content:var(--tw-content)}.pi :is(.dark .dark\\:bg-chip){--tw-bg-opacity:1;background-color:rgb(var(--be-background-chip)/var(--tw-bg-opacity))}.pi :is(.dark .dark\\:text-white\\/50){color:#ffffff80}.pi :is(.dark .dark\\:checked\\:border-primary-dark:checked){--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi :is(.dark .dark\\:checked\\:bg-primary-dark:checked){--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}@media (min-width:640px){.pi .sm\\:text-sm{font-size:14px;line-height:20px}}@media (min-width:768px){.pi .md\\:text-lg{font-size:18px;line-height:28px}}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring:focus-visible>.tree-label{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring-2:focus-visible>.tree-label{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring-inset:focus-visible>.tree-label{--tw-ring-inset:inset}\n'),!t.selector)throw new Error('Pixie required "selector" option.');const n=document.querySelector(t.selector);n&&(n.classList.add("pi"),function(e){mf=e,vf=e}(n),this.setConfig(t),_f.setState({editor:this}),S(n).render(e(i.StrictMode,{children:e(PF,{})})))}get state(){return Sf()}get defaultConfig(){return t.defaultConfig}open(e={}){return new Promise(async t=>{var n;Object.keys(e).length?await this.resetEditor({...oh(e,{ui:{visible:!0},image:e.image||Sf().config.image,state:e.state||Sf().config.state,blankCanvasSize:e.blankCanvasSize||Sf().config.blankCanvasSize})}):null!=(n=Sf().config.ui)&&n.visible||Sf().setConfig({ui:{visible:!0}}),t()})}close(){var e,t,n;null!=(e=Sf().config.ui)&&e.visible&&(this.setConfig({ui:{visible:!1}}),null==(n=(t=Sf().config).onClose)||n.call(t))}setConfig(e){Sf().setConfig(e)}uploadAndAddImage(){return kf().import.uploadAndAddImage()}uploadAndReplaceMainImage(){return kf().import.uploadAndReplaceMainImage()}uploadAndOpenStateFile(){return kf().import.uploadAndOpenStateFile()}newCanvas(e,t,n){return kf().canvas.openNew(e,t,n)}getState(e){return JSON.stringify(Of(e))}setState(e){return kf().import.loadState(e)}async setStateFromUrl(e){const t=await If(e);return kf().import.loadState(t)}openTool(e){Ff(e)}applyChanges(){Sf().applyChanges()}cancelChanges(){Sf().cancelChanges()}async resetEditor(e){await Ef(e),await kf().canvas.loadInitialContent()}togglePanel(e,t){"objects"===e&&Sf().togglePanel("history",!1),"history"===e&&Sf().togglePanel("objects",!1),Sf().togglePanel(e,t)}on(e,t){var n;null==(n=this.fabric)||n.on(e,t)}isDirty(){return Sf().dirty}get(e){return this.tools[e]}notify(e){return Df(e)}static init(e){return new Promise(t=>{const n=e.onLoad;e.onLoad=e=>{null==n||n(e),t(e)},new this(e)})}};vo(MF,"defaultConfig",Pu),vo(MF,"version",Fu);let RF=MF;function LF(e){if(!this.backgroundColor)return;const t=this._getNonTransformedDimensions(),n=-t.x/2,r=-t.y/2,i=t.x,o=t.y,a=this.backgroundColor;if("string"==typeof a||a instanceof CanvasGradient||a instanceof CanvasPattern)e.fillStyle=a,e.fillRect(n,r,i,o);else if("object"!=typeof a||!("type"in a)||"linear"!==a.type&&"radial"!==a.type){if("source"in a&&(a.source instanceof HTMLImageElement||a.source instanceof HTMLCanvasElement))if(a.repeat){const t=e.createPattern(a.source,a.repeat);t&&(e.fillStyle=t,e.fillRect(n,r,i,o))}else e.drawImage(a.source,n,r,i,o)}else{const t=function(e,t,n,r){var i,o;if("linear"===t.type){const i=e.createLinearGradient(n+t.coords.x1,r+t.coords.y1,n+t.coords.x2,r+t.coords.y2);return t.colorStops.forEach(e=>i.addColorStop(e.offset,e.color)),i}if("radial"===t.type){const a=e.createRadialGradient(n+t.coords.x1,r+t.coords.y1,null!==(i=t.coords.r1)&&void 0!==i?i:0,n+t.coords.x2,r+t.coords.y2,null!==(o=t.coords.r2)&&void 0!==o?o:0);return t.colorStops.forEach(e=>a.addColorStop(e.offset,e.color)),a}throw new Error("Unknown gradient type")}(e,a,n,r);e.fillStyle=t,e.fillRect(n,r,i,o)}this._removeShadow(e)}const jF="fm-pixie-editor";const DF=new class{constructor(){this._container=document.createElement("div"),this._instance=null,this._container.classList.add(jF),this._container.style.width="100%",this._container.style.height="85vh",this._container.style.minHeight="400px"}get className(){return`.${jF}`}get canvas(){var e,t;return null===(t=null===(e=this._instance)||void 0===e?void 0:e.state.canvasRef)||void 0===t?void 0:t.current}get tools(){var e;return null===(e=this._instance)||void 0===e?void 0:e.tools}isLoaded(){return!!this._instance}async _setConfig(e){this._instance?await this._instance.resetEditor(e):this._instance=await RF.init(Object.assign(Object.assign({},e),{selector:this.className})),this._instance.fabric.on("object:added",e=>{const t=e.target;"text"===t.name&&(t._renderBackground=LF)})}async show(e,t,n=t.firstChild){t.insertBefore(this._container,n),await this._setConfig(e),this._instance.open()}close(){var e;null===(e=this._container.parentNode)||void 0===e||e.removeChild(this._container)}},NF=({small:t=!1,style:n={},wrap:r=!1})=>{const i=Object.assign({width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},n);return e(N,{size:"large",style:i,wrap:r,children:e(k,{})})};function zF(e,t){if(!e)return t;if(!t)return e;return`${e.replace(/\/+$/,"")}/${t.replace(/^\/+/,"")}`}function BF(e,t){if(/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(t))return t;const n=function(e){const t="undefined"!=typeof __webpack_public_path__?__webpack_public_path__:"";if(e&&/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(e))return e;let n=zF(t,e||"");return!n||n.startsWith("/")||/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(n)||(n="/"+n),n}(e),r=zF(n,t);return!r||r.startsWith("/")||/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(r)?r:"/"+r}var VF,UF;!function(e){e.TOP="top",e.BOTTOM="bottom",e.HIDDEN=""}(VF||(VF={})),function(e){e.TOP="top",e.BOTTOM="bottom",e.HIDDEN=""}(UF||(UF={}));const $F=(e,t="image/png")=>fetch(`data:${t};base64,${e}`).then(e=>e.blob());const WF=({visible:n,onClose:i,file:o,onSave:a})=>{const s=r.useRef(null),l=gi(),{options:c,actions:u,state:d}=ui(),{config:h}=c,{setCurrentMenuFile:f,setLoading:p}=u,{loading:g}=d,[m,v]=r.useState(null),[y,b]=r.useState(""),[w,x]=r.useState(!1),[C,_]=r.useState(!1),S=wi(),k=r.useRef(!1),A=r.useRef(),E=r.useRef(void 0),[I,T]=r.useState(null);r.useEffect(()=>{o&&(p&&p(!0),(async()=>{if(E.current!==o)if("object"!=typeof o)try{if(E.current=o,o.startsWith("data:"))T({thumbnail:o});else{const e=await S.handleAddFileByUrl(o,!0);if(!e)throw new Error("Не удалось загрузить файл");E.current===o&&T(e)}}finally{E.current===o&&(E.current=null)}else T(o)})())},[o,S.handleAddFileByUrl,T,p]),A.current=a;const O=r.useCallback(async e=>{try{if(e.thumbnail&&e.thumbnail.startsWith("data:"))return e.thumbnail;const t=await S.getFileData(e);if(!t)throw new Error("Ошибка загрузки файла");return new Promise(e=>{const n=new FileReader;n.onload=()=>e(n.result),n.readAsDataURL(t)})}catch(e){throw console.error("Ошибка получения данных изображения:",e),e}},[S]);r.useEffect(()=>{(async()=>{var e,t,n;try{const e=I?await O(I):null;v(e);const t=I?I.type:"";b(t||"image/png"),p&&p(!1)}catch(r){console.error("🎨 Ошибка загрузки изображения:",r),l.error({id:"IMAGE_DOWNLOAD_FAILED",innerException:r,message:"Ошибка загрузки изображения",placement:"bottomRight",data:{itemId:null!==(e=null==I?void 0:I.id)&&void 0!==e?e:void 0,itemName:null!==(t=null==I?void 0:I.name)&&void 0!==t?t:void 0,folderId:null!==(n=null==I?void 0:I.folderId)&&void 0!==n?n:null,thumbnail:null==I?void 0:I.thumbnail}}),null==i||i()}})()},[n,I,O,i,l,p]);const F=r.useCallback(async(e,t,n)=>{var r,o,a,s,u;if(!I||!A.current)return;const d="object"==typeof I&&null!==I?I:null;let h=null;try{null==p||p(!0);const t=await function(e,t){if("json"===e)return new Blob([t],{type:"application/json"});if("svg"===e)return new Blob([t],{type:"image/svg+xml"});let n=`image/${e}`;if("jpg"===e&&(n="image/jpeg"),t.startsWith("data:")){const e=t.match(/^data:([^;]+)/);e&&e[1].startsWith("image/")&&(n=e[1]);const r=t.replace(/data:image\/[^;]+;base64,/,"");return $F(r,n)}return $F(t,n)}(n,e);let a=t.type||`image/${n}`;"jpg"===n&&(a="image/jpeg");const s=e.startsWith("data:")?e:`data:${a};base64,${e}`,u=Object.assign(Object.assign({},I),{thumbnail:s,size:t.size,date:(new Date).toISOString().split("T")[0],type:a,folderId:I.folderId||"",name:I.name,extension:I.extension||I.name.split(".").pop()||""});h=u;const d=await A.current(u);if(d)return l.success({id:"IMAGE_UPDATE_SUCCESS",message:"Успех",description:"Изображение успешно обновлено",data:{itemId:null!==(r=d.id)&&void 0!==r?r:void 0,itemName:d.name,folderId:null!==(o=d.folderId)&&void 0!==o?o:null,thumbnail:d.thumbnail}}),c.onEditorOk&&c.onEditorOk(d),null==p||p(!1),d;null==p||p(!1),null==i||i()}catch(e){console.error("Ошибка сохранения:",e);const n=null!=h?h:d;l.error({id:"IMAGE_SAVE_FAILED",message:"Ошибка при сохранении изображения",placement:"bottomRight",data:{itemId:null!==(a=null==n?void 0:n.id)&&void 0!==a?a:void 0,itemName:null!==(s=null==n?void 0:n.name)&&void 0!==s?s:t,folderId:null!==(u=null==n?void 0:n.folderId)&&void 0!==u?u:null,thumbnail:null==n?void 0:n.thumbnail},innerException:e}),null==p||p(!1)}},[I,l,i,c,p]),P=r.useCallback(async()=>{var e;if(!DF.isLoaded()||!I)return void console.error("❌ Pixie instance или file отсутствует");const t=I.name||"edited-image",n=I.extension||y.split("/")[1]||"png";try{let r;r="jpg"===n?"jpeg":["png","jpeg","json","svg"].includes(n)?n:"jpeg",await(null===(e=DF.tools)||void 0===e?void 0:e.export.save(t.replace(/\.[^/.]+$/,""),r,.8))}catch(e){console.error("🎨 Ошибка при сохранении через кнопку:",e);try{const e=DF.canvas,r=e?e.toDataURL(`image/${n}`):null;r&&await F(r,t,n)}catch(e){console.error("🎨 Альтернативный способ тоже не сработал:",e)}}},[I,y,F]),M=r.useCallback(async()=>{if(m&&n&&w&&!k.current)try{k.current=!0;const t=s.current;let n=0;for(;n<20&&(0===t.clientWidth||0===t.clientHeight);)await new Promise(e=>setTimeout(e,50)),n++;const r=(null==h?void 0:h.locale)?null==h?void 0:h.locale.replace("_","-"):"ru-RU",o=matchMedia(nn).matches?en:Qt,a=(null==h?void 0:h.theme)===tn?o:null==h?void 0:h.theme,l={selector:"#pixie-editor",baseUrl:BF((null==h?void 0:h.baseUrl)||"",(null==h?void 0:h.assetsUrl)||"assets/image-editor"),image:m,activeLanguage:r,ui:{activeTheme:a,mode:"inline",forceOverlayModeOnMobile:!1,visible:!0,menubar:{replaceDefaultItems:!0,position:VF.TOP,items:[{type:"undoWidget",align:"left"},{type:"zoomWidget",align:"center",desktopOnly:!0},{type:"button",align:"right",desktopOnly:!0,icon:()=>e(me,{style:{fontSize:20}}),action:e=>{e.togglePanel("history")}},{type:"button",icon:()=>e(ge,{style:{fontSize:20}}),align:"right",desktopOnly:!0,action:i}]},nav:{position:UF.TOP}},onSave:async function(e,t,n){try{null==p||p(!0);return await F(e,t,n)}catch(e){throw console.error("🎨 PIXIE onSave ERROR:",e),null==p||p(!1),e}}};try{_(!1),await DF.show(l,s.current);const e=DF.canvas;e&&e.focus(),_(!0)}catch(e){console.error("init pixie failed:",e)}}catch(e){console.error("Ошибка инициализации Pixie:",e),l.error({id:"EDITOR_INIT_FAILED",message:"Ошибка инициализации редактора",placement:"bottomRight",innerException:e}),k.current=!1,null==i||i()}},[m,n,w,null==h?void 0:h.locale,i,p,F,l]);return r.useEffect(()=>{n&&m&&w&&M()},[n,m,w,null==I?void 0:I.id,M]),r.useEffect(()=>{if(!n){try{DF.close()}catch(e){console.warn("Ошибка при закрытии Pixie:",e)}v(null),b(""),k.current=!1,x(!1),_(!1)}return()=>{try{DF.close()}catch(e){console.warn("Ошибка при закрытии Pixie при размонтировании:",e)}}},[n]),e(Y,{title:`Редактирование: ${(null==I?void 0:I.name)||"Изображение"}`,open:n,closeIcon:null,onCancel:i,afterOpenChange:e=>x(e),forceRender:!0,width:"95vw",style:{top:20},styles:{body:{height:"85vh",padding:0}},footer:[e(D,{onClick:i,disabled:!w||g,children:"Отмена"},"cancel"),e(D,{type:"primary",onClick:P,loading:g,children:"Сохранить"},"save")],maskClosable:!1,destroyOnHidden:!1,afterClose:()=>{f&&f("")},children:t("div",{ref:s,style:{position:"relative",width:"100%",height:"100%"},children:[n&&!C?e("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,0.45)",backdropFilter:"blur(1px)",pointerEvents:"all",zIndex:10},children:e("span",{style:{fontSize:14,color:"#555"},children:"Загрузка редактора…"})}):null,g&&e(NF,{style:{position:"absolute",top:0,background:"var(--colorBgLayout)",zIndex:100,opacity:.7}})]})})},{Header:HF}=K,{Title:GF}=P,YF=({activeLibraryItem:t,selectedFolder:n})=>{const{t:r}=Nn(),i={[qt]:r("My files"),[Xt]:r("GIF"),[Kt]:r("Stock images"),[Zt]:r("AI image generation")};return e(HF,{className:"actions-header",children:e("div",{className:"header-title-container",children:e(GF,{level:5,className:"header-title",children:t===qt?n:i[t]})})})};
|
|
61
|
+
function dF(){return dF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dF.apply(this,arguments)}new Promise(()=>{});const hF=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch{}const fF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pF=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gF=r.forwardRef(function(e,t){let n,{onClick:i,relative:o,reloadDocument:a,replace:s,state:l,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,f=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&(i[n]=e[n]);return i}(e,hF),{basename:p}=r.useContext(eF),g=!1;if("string"==typeof u&&pF.test(u)&&(n=u,fF))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}(t.pathname,p);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:g=!0}catch{}let m=function(e,t){let{relative:n}=void 0===t?{}:t;rF()||BO(!1);let{basename:i,navigator:o}=r.useContext(eF),{hash:a,pathname:s,search:l}=sF(e,{relative:n}),c=s;return"/"!==i&&(c="/"===s?i:YO([i,s])),o.createHref({pathname:c,search:l,hash:a})}(u,{relative:o}),v=function(e,t){let{target:n,replace:i,state:o,preventScrollReset:a,relative:s,unstable_viewTransition:l}=void 0===t?{}:t,c=aF(),u=iF(),d=sF(e,{relative:s});return r.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==i?i:VO(u)===VO(d);c(e,{replace:n,state:o,preventScrollReset:a,relative:s,unstable_viewTransition:l})}},[u,c,d,i,o,n,e,a,s,l])}(u,{replace:s,state:l,target:c,preventScrollReset:d,relative:o,unstable_viewTransition:h});return r.createElement("a",dF({},f,{href:n||m,onClick:g||a?i:function(e){i&&i(e),e.defaultPrevented||v(e)},ref:t,target:c}))});var mF,vF;!function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"}(mF||(mF={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(vF||(vF={}));const yF=cu(e("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutlineOutlined"),bF=cu(e("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}),"CheckCircleOutlined"),wF={opacity:0,y:50,scale:.3},xF={opacity:1,y:0,scale:1},CF={opacity:0,scale:.5};function _F(){const n=Lf(e=>e.toasts);return e("div",{className:"pointer-events-none relative",children:e(Py,{initial:!1,children:n.map(n=>e("div",{className:au("fixed z-toast mx-auto p-20","bottom-center"===n.position?"bottom-0 left-0 right-0":"bottom-0 right-0"),children:t(ky.div,{initial:n.disableEnterAnimation?void 0:wF,animate:n.disableEnterAnimation?void 0:xF,exit:n.disableExitAnimation?void 0:CF,className:au("pointer-events-auto mx-auto flex max-h-100 min-h-50 w-min min-w-288 max-w-500 items-center gap-10 rounded-lg border bg-paper bg-paper py-6 pl-16 pr-6 text-sm text-main shadow-lg"),onPointerEnter:()=>{var e;return null==(e=n.timer)?void 0:e.pause()},onPointerLeave:()=>{var e;return null==(e=n.timer)?void 0:e.resume()},role:"alert","aria-live":"danger"===n.type?"assertive":"polite",children:["danger"===n.type&&e(yF,{className:"flex-shrink-0 text-danger",size:"md"}),"loading"===n.type&&e(fI,{size:"sm",className:"flex-shrink-0",isIndeterminate:!0}),"positive"===n.type&&e(bF,{className:"flex-shrink-0 text-positive",size:"md"}),e("div",{className:"mr-auto w-max overflow-hidden overflow-ellipsis","data-testid":"toast-message",children:e(nS,{value:n.message})}),n.action&&e(Vw,{variant:"text",color:"primary",size:"sm",className:"flex-shrink-0",onFocus:()=>{var e;return null==(e=n.timer)?void 0:e.pause()},onBlur:()=>{var e;return null==(e=n.timer)?void 0:e.resume()},onClick:()=>jf().remove(n.id),elementType:gF,to:n.action.action,children:e(nS,{value:n.action.label})}),"loading"!==n.type&&e(eS,{onFocus:()=>{var e;return null==(e=n.timer)?void 0:e.pause()},onBlur:()=>{var e;return null==(e=n.timer)?void 0:e.resume()},type:"button",className:"flex-shrink-0",onClick:()=>{jf().remove(n.id)},size:"sm",children:e(gS,{})})]})},n.id))})})}function SF(e){return Ky()?e.metaKey:e.ctrlKey}function kF(e){switch(e.key){case"z":SF(e)&&(e.preventDefault(),e.stopPropagation(),e.shiftKey?kf().history.redo():kf().history.undo());break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),kf().objects.move("up");break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),kf().objects.move("right");break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),kf().objects.move("down");break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),kf().objects.move("left");break;case"Delete":e.preventDefault(),e.stopPropagation(),kf().objects.delete();break;case"v":SF(e)&&(e.preventDefault(),e.stopPropagation(),async function(){try{const e=await navigator.clipboard.read();for(const t of e)for(const e of t.types)if(e.startsWith("image/")){const n=await t.getType(e),r=new FileReader;return r.onload=e=>{var t;null!=(t=e.target)&&t.result&&kf().import.addImageFromData(e.target.result)},void r.readAsDataURL(n)}}catch(e){console.error(e)}}())}}const AF=new Map,EF=new Map,IF={};async function*TF(e){const t=e.createReader();let n;do{n=await new Promise((e,n)=>{t.readEntries(e,n)});for(const e of n)if(e.isFile){if(".DS_Store"===e.name)continue;const t=await OF(e);yield new fw(t,e.fullPath)}else e.isDirectory&&(yield*TF(e))}while(n.length>0)}function OF(e){return new Promise((t,n)=>e.file(t,n))}function FF(e){return null!=IF.dragTargetId?AF.get(IF.dragTargetId):e.dataTransfer.types.includes("Files")?{type:"nativeFile",el:null,ref:null,getData:()=>async function(e){const t=[];for await(const n of e)t.push(n);return t}(async function*(e){const t=[];for(const n of e.items)if("file"===n.kind){const e=n.webkitGetAsEntry();e&&t.push(e)}for(const e of t)if(e.isFile){if(".DS_Store"===e.name)continue;const t=await OF(e);yield new fw(t,e.fullPath)}else e.isDirectory&&(yield*TF(e))}(e.dataTransfer))}:void 0}function PF(){const n=_f(e=>{var t;return null==(t=e.config.ui)?void 0:t.visible})??!0,r=_f(e=>{var t,n;return null==(n=null==(t=e.config.ui)?void 0:t.nav)?void 0:n.position})??"bottom",i=_f(e=>{var t,n;return null==(n=null==(t=e.config.ui)?void 0:t.menubar)?void 0:n.position})??"top",o=_f(e=>{var t;return null==(t=e.config.ui)?void 0:t.allowEditorClose})??!0,s=u(null),l=u(null),{isModal:d,isMobile:h}=mS(),f=c(async e=>{var t,n;if(Sf().activeTool||Sf().dirty||"nativeFile"!==e.type)return;const r=await e.getData();kf().import.fileIsValid(r[0])&&((null==(n=null==(t=Sf().config.tools)?void 0:t.import)?void 0:n.openDroppedImageAsBackground)?await kf().import.openBackgroundImage(r[0]):await kf().import.openUploadedFile(r[0]))},[]),{droppableProps:p}=function({id:e,disabled:t,ref:n,...r}){const i=u({dragOverElements:new Set,dropActivateTimer:void 0}).current,o=u(r);o.current=r,x(()=>(EF.set(e,{...EF.get(e),disabled:t,id:e,ref:n}),()=>{EF.delete(e)}),[e,o,t,n]);const a=e=>{var t;const r=o.current,i=r.allowDragEventsFromItself||n.current!==(null==(t=e.ref)?void 0:t.current);return!(!(null!=e&&e.type&&i&&r.types.includes(e.type))||r.acceptsDrop&&!r.acceptsDrop(e))},s=e=>{var t,n;const r=FF(e);r&&(null==(n=(t=o.current).onDragLeave)||n.call(t,r))};return{droppableProps:t?{}:{onDragOver:e=>{var t,n;e.preventDefault(),e.stopPropagation();const r=FF(e);r&&a(r)&&(null==(n=(t=o.current).onDragOver)||n.call(t,r,e))},onDragEnter:e=>{var t,n;if(e.stopPropagation(),i.dragOverElements.add(e.target),i.dragOverElements.size>1)return;const r=FF(e);r&&a(r)&&(null==(n=(t=o.current).onDragEnter)||n.call(t,r),clearTimeout(i.dropActivateTimer),"function"==typeof o.current.onDropActivate&&(i.dropActivateTimer=setTimeout(()=>{var e,t;r&&(null==(t=(e=o.current).onDropActivate)||t.call(e,r))},400)))},onDragLeave:e=>{e.stopPropagation(),i.dragOverElements.delete(e.target);for(const t of i.dragOverElements)e.currentTarget.contains(t)||i.dragOverElements.delete(t);if(i.dragOverElements.size>0)return;const t=FF(e);t&&a(t)&&(s(e),clearTimeout(i.dropActivateTimer))},onDrop:async e=>{var t,n,r,l;e.preventDefault(),e.stopPropagation(),i.dragOverElements.clear(),s(e),clearTimeout(i.dropActivateTimer);const c=FF(e);c&&(null==(n=(t=o.current).onDragLeave)||n.call(t,c),a(c)&&(null==(l=(r=o.current).onDrop)||l.call(r,c)))}}}}({id:"pixie-root",ref:l,types:["nativeFile"],onDrop:f});a(()=>{var e,t;Sf().fabric||(_f.setState({canvasRef:s}),Pw(s.current),null!=(e=Sf().config.ui)&&e.defaultTool&&Sf().setActiveTool(null==(t=Sf().config.ui)?void 0:t.defaultTool,null),kf().canvas.loadInitialContent().then(()=>{var e,t;null==(t=(e=Sf().config).onLoad)||t.call(e,Sf().editor)}));const n=Mw(l,()=>{Sf().setStageSize(Rw(l.current))}),r=Mw(s,()=>{Sf().setCanvasSize(Rw(s.current))});return()=>{n(),r()}},[l]);const g=au("pixie-root flex flex-col overflow-hidden bg-background text-main no-tap-highlight w-full h-full",{relative:!d,"fixed inset-0 w-full h-full z-20":d,"shadow-lg border rounded-md m-auto max-h-[calc(100vh-90px)] max-w-[calc(100vw-90px)]":d&&!h});return t(My,{features:Ly,strict:!0,children:[d&&n&&!h&&o&&e(eS,{className:"z-20 fixed right-2 top-2 text-white",size:"lg",onClick:()=>{Sf().editor.close()},children:e(gS,{})}),d&&n&&e(r_,{position:"fixed",disableInitialTransition:!0}),t(ky.div,{initial:!1,variants:{visible:{opacity:1,scale:1,display:"flex"},hidden:{opacity:0,transitionEnd:{display:"none"}}},animate:n?"visible":"hidden",className:g,children:["top"===i&&e(_S,{}),"top"===r&&e(yO,{className:"pt-14"}),t("main",{className:"relative flex-auto my-20 overflow-hidden outline-none",tabIndex:-1,...Yy(p,{onKeyDownCapture:kF}),ref:l,children:[e(kS,{}),e(rA,{ref:s})]}),e(sT,{}),"bottom"===r&&e(yO,{}),"bottom"===i&&e(_S,{}),e(jO,{}),e(_F,{})]})]})}!function(){fabric.Object.ENLIVEN_PROPS.push("eraser");var e=fabric.Object.prototype._drawClipPath,t=fabric.Object.prototype.needsItsOwnCache,n=fabric.Object.prototype.toObject,r=fabric.Object.prototype.getSvgCommons,i=fabric.Object.prototype._createBaseClipPathSVGMarkup,o=fabric.Object.prototype._createBaseSVGMarkup;fabric.Object.prototype.cacheProperties.push("eraser"),fabric.Object.prototype.stateProperties.push("eraser"),fabric.util.object.extend(fabric.Object.prototype,{erasable:!0,eraser:void 0,needsItsOwnCache:function(){return t.call(this)||!!this.eraser},_drawClipPath:function(t,n){if(e.call(this,t,n),this.eraser){var r=this._getNonTransformedDimensions();this.eraser.isType("eraser")&&this.eraser.set({width:r.x,height:r.y}),e.call(this,t,this.eraser)}},toObject:function(e){var t=n.call(this,["erasable"].concat(e));return this.eraser&&!this.eraser.excludeFromExport&&(t.eraser=this.eraser.toObject(e)),t},getSvgCommons:function(){return r.call(this)+(this.eraser?'mask="url(#'+this.eraser.clipPathId+')" ':"")},_createEraserSVGMarkup:function(e){return this.eraser?(this.eraser.clipPathId="MASK_"+fabric.Object.__uid++,['<mask id="',this.eraser.clipPathId,'" >',this.eraser.toSVG(e),"</mask>","\n"].join("")):""},_createBaseClipPathSVGMarkup:function(e,t){return[this._createEraserSVGMarkup(t&&t.reviver),i.call(this,e,t)].join("")},_createBaseSVGMarkup:function(e,t){return[this._createEraserSVGMarkup(t&&t.reviver),o.call(this,e,t)].join("")}});var a=fabric.Group.prototype._restoreObjectsState;fabric.util.object.extend(fabric.Group.prototype,{_addEraserPathToObjects:function(e){this._objects.forEach(function(t){fabric.EraserBrush.prototype._addPathToObjectEraser.call(fabric.EraserBrush.prototype,t,e)})},applyEraserToObjects:function(){var e=this,t=this.eraser;if(t){delete this.eraser;var n=e.calcTransformMatrix();t.clone(function(t){var r=e.clipPath;t.getObjects("path").forEach(function(t){var i=fabric.util.multiplyTransformMatrices(n,t.calcTransformMatrix());fabric.util.applyTransformToObject(t,i),r?r.clone(function(r){var i=fabric.EraserBrush.prototype.applyClipPathToPath.call(fabric.EraserBrush.prototype,t,r,n);e._addEraserPathToObjects(i)},["absolutePositioned","inverted"]):e._addEraserPathToObjects(t)})})}},_restoreObjectsState:function(){return!0===this.erasable&&this.applyEraserToObjects(),a.call(this)}}),fabric.Eraser=fabric.util.createClass(fabric.Group,{type:"eraser",originX:"center",originY:"center",drawObject:function(e){e.save(),e.fillStyle="black",e.fillRect(-this.width/2,-this.height/2,this.width,this.height),e.restore(),this.callSuper("drawObject",e)},_getBounds:function(){},_toSVG:function(e){var t=["<g ","COMMON_PARTS"," >\n"],n=["<rect ",'fill="white" ','x="',-this.width/2,'" y="',-this.height/2,'" width="',this.width,'" height="',this.height,'" />\n'].join("");t.push("\t\t",n);for(var r=0,i=this._objects.length;r<i;r++)t.push("\t\t",this._objects[r].toSVG(e));return t.push("</g>\n"),t}}),fabric.Eraser.fromObject=function(e,t){var n=e.objects;fabric.util.enlivenObjects(n,function(n){var r=fabric.util.object.clone(e,!0);delete r.objects,fabric.util.enlivenObjectEnlivables(e,r,function(){t&&t(new fabric.Eraser(n,r,!0))})})};var s=fabric.Canvas.prototype._renderOverlay;fabric.util.object.extend(fabric.Canvas.prototype,{isErasing:function(){return this.isDrawingMode&&this.freeDrawingBrush&&"eraser"===this.freeDrawingBrush.type&&this.freeDrawingBrush._isErasing},_renderOverlay:function(e){s.call(this,e),this.isErasing()&&!this.freeDrawingBrush.inverted&&this.freeDrawingBrush._render()}}),fabric.EraserBrush=fabric.util.createClass(fabric.PencilBrush,{type:"eraser",inverted:!1,_isErasing:!1,_isErasable:function(e){return!1!==e.erasable},_prepareCollectionTraversal:function(e,t,n){e.forEachObject(function(r){r.forEachObject&&"deep"===r.erasable?this._prepareCollectionTraversal(r,t,n):!this.inverted&&r.erasable&&r.visible?(r.visible=!1,e.dirty=!0,n.visibility.push(r),n.collection.push(e)):this.inverted&&r.visible&&(r.erasable&&r.eraser?(r.eraser.inverted=!0,r.dirty=!0,e.dirty=!0,n.eraser.push(r),n.collection.push(e)):(r.visible=!1,e.dirty=!0,n.visibility.push(r),n.collection.push(e)))},this)},preparePattern:function(){this._patternCanvas||(this._patternCanvas=fabric.util.createCanvasElement());var e=this._patternCanvas;e.width=this.canvas.width,e.height=this.canvas.height;var t=e.getContext("2d");if(this.canvas._isRetinaScaling()){var n=this.canvas.getRetinaScaling();this.canvas.__initRetinaScaling(n,e,t)}var r=this.canvas.backgroundImage,i=r&&this._isErasable(r),o=this.canvas.overlayImage,a=o&&this._isErasable(o);if(!this.inverted&&(r&&!i||this.canvas.backgroundColor))i&&(this.canvas.backgroundImage=void 0),this.canvas._renderBackground(t),i&&(this.canvas.backgroundImage=r);else if(this.inverted&&r&&i){var l=this.canvas.backgroundColor;this.canvas.backgroundColor=void 0,this.canvas._renderBackground(t),this.canvas.backgroundColor=l}t.save(),t.transform.apply(t,this.canvas.viewportTransform);var c={visibility:[],eraser:[],collection:[]};if(this._prepareCollectionTraversal(this.canvas,t,c),this.canvas._renderObjects(t,this.canvas._objects),c.visibility.forEach(function(e){e.visible=!0}),c.eraser.forEach(function(e){e.eraser.inverted=!1,e.dirty=!0}),c.collection.forEach(function(e){e.dirty=!0}),t.restore(),!this.inverted&&(o&&!a||this.canvas.overlayColor))a&&(this.canvas.overlayImage=void 0),s.call(this.canvas,t),a&&(this.canvas.overlayImage=o);else if(this.inverted&&o&&a){l=this.canvas.overlayColor;this.canvas.overlayColor=void 0,s.call(this.canvas,t),this.canvas.overlayColor=l}},_setBrushStyles:function(e){this.callSuper("_setBrushStyles",e),e.strokeStyle="black"},_saveAndTransform:function(e){this.callSuper("_saveAndTransform",e),this._setBrushStyles(e),e.globalCompositeOperation=e===this.canvas.getContext()?"destination-out":"source-over"},needsFullRender:function(){return!0},onMouseDown:function(e,t){this.canvas._isMainEvent(t.e)&&(this._prepareForDrawing(e),this._captureDrawingPath(e),this.preparePattern(),this._isErasing=!0,this.canvas.fire("erasing:start"),this._render())},_render:function(){var e;this.inverted||(e=this.canvas.getContext(),this.callSuper("_render",e)),e=this.canvas.contextTop,this.canvas.clearContext(e),this.callSuper("_render",e),e.save();var t=1/this.canvas.getRetinaScaling();e.scale(t,t),e.globalCompositeOperation="source-in",e.drawImage(this._patternCanvas,0,0),e.restore()},createPath:function(e){var t=this.callSuper("createPath",e);return t.globalCompositeOperation=this.inverted?"source-over":"destination-out",t.stroke=this.inverted?"white":"black",t},applyClipPathToPath:function(e,t,n){var r=fabric.util.invertTransform(e.calcTransformMatrix()),i=t.calcTransformMatrix(),o=t.absolutePositioned?r:fabric.util.multiplyTransformMatrices(r,n);return t.absolutePositioned=!1,fabric.util.applyTransformToObject(t,fabric.util.multiplyTransformMatrices(o,i)),e.clipPath=e.clipPath?fabric.util.mergeClipPaths(t,e.clipPath):t,e},clonePathWithClipPath:function(e,t,n){var r=t.calcTransformMatrix(),i=t.clipPath,o=this;e.clone(function(e){i.clone(function(t){n(o.applyClipPathToPath(e,t,r))},["absolutePositioned","inverted"])})},_addPathToObjectEraser:function(e,t){var n=this;if(e.forEachObject&&"deep"===e.erasable){var r=e._objects.filter(function(e){return e.erasable});r.length>0&&e.clipPath?this.clonePathWithClipPath(t,e,function(e){r.forEach(function(t){n._addPathToObjectEraser(t,e)})}):r.length>0&&r.forEach(function(e){n._addPathToObjectEraser(e,t)})}else{var i=e.eraser;i||(i=new fabric.Eraser,e.eraser=i),t.clone(function(t){var r=fabric.util.multiplyTransformMatrices(fabric.util.invertTransform(e.calcTransformMatrix()),t.calcTransformMatrix());fabric.util.applyTransformToObject(t,r),i.addWithUpdate(t),e.set("dirty",!0),e.fire("erasing:end",{path:t}),e.group&&Array.isArray(n.__subTargets)&&n.__subTargets.push(e)})}},applyEraserToCanvas:function(e){var t=this.canvas,n={};return["backgroundImage","overlayImage"].forEach(function(r){var i=t[r];i&&i.erasable&&(this._addPathToObjectEraser(i,e),n[r]=i)},this),n},_finalizeAndAddPath:function(){var e=this.canvas.contextTop,t=this.canvas;e.closePath(),this.decimate&&(this._points=this.decimatePoints(this._points,this.decimate)),t.clearContext(t.contextTop),this._isErasing=!1;var n=this._points&&this._points.length>1?this.convertPointsToSVGPath(this._points):null;if(!n||this._isEmptySVGPath(n))return t.fire("erasing:end"),void t.requestRenderAll();var r=this.createPath(n);r.setCoords(),t.fire("before:path:created",{path:r});var i=this.applyEraserToCanvas(r),o=this;this.__subTargets=[];var a=[];t.forEachObject(function(e){e.erasable&&e.intersectsWithObject(r,!0,!0)&&(o._addPathToObjectEraser(e,r),a.push(e))}),t.fire("erasing:end",{path:r,targets:a,subTargets:this.__subTargets,drawables:i}),delete this.__subTargets,t.requestRenderAll(),this._resetShadow(),t.fire("path:created",{path:r})}})}(),Io.enableBoundaryChecking(!1);const MF=class t{constructor(t){if(vo(this,"tools",{}),vo(this,"fabric",null),t.sentryDsn&&function(e){const t={...e};Rl(t,"react"),Hc(t)}({dsn:t.sentryDsn}),function(e,t){void 0===t&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('/*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com*/.pi *,.pi :after,.pi :before{border-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity));border-style:solid;border-width:0;box-sizing:border-box}.pi :after,.pi :before{--tw-content:""}.pi hr{border-top-width:1px;color:inherit;height:0}.pi abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.pi h1,.pi h2,.pi h3,.pi h4,.pi h5,.pi h6{font-size:inherit;font-weight:inherit}.pi a{color:inherit;text-decoration:inherit}.pi b,.pi strong{font-weight:bolder}.pi code,.pi kbd,.pi pre,.pi samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.pi small{font-size:80%}.pi sub,.pi sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.pi sub{bottom:-.25em}.pi sup{top:-.5em}.pi table{border-collapse:collapse;border-color:inherit;text-indent:0}.pi button,.pi input,.pi optgroup,.pi select,.pi textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}.pi button,.pi select{text-transform:none}.pi [type=button],.pi [type=reset],.pi [type=submit],.pi button{-webkit-appearance:button;background-color:transparent;background-image:none}.pi :-moz-focusring{outline:auto}.pi :-moz-ui-invalid{box-shadow:none}.pi progress{vertical-align:baseline}.pi ::-webkit-inner-spin-button,.pi ::-webkit-outer-spin-button{height:auto}.pi [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.pi ::-webkit-search-decoration{-webkit-appearance:none}.pi ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.pi summary{display:list-item}.pi blockquote,.pi dd,.pi dl,.pi figure,.pi h1,.pi h2,.pi h3,.pi h4,.pi h5,.pi h6,.pi hr,.pi p,.pi pre{margin:0}.pi fieldset{margin:0;padding:0}.pi legend{padding:0}.pi menu,.pi ol,.pi ul{list-style:none;margin:0;padding:0}.pi textarea{resize:vertical}.pi input::-moz-placeholder,.pi textarea::-moz-placeholder{color:#9ca3af;opacity:1}.pi input::placeholder,.pi textarea::placeholder{color:#9ca3af;opacity:1}.pi [role=button],.pi button{cursor:pointer}.pi :disabled{cursor:default}.pi audio,.pi canvas,.pi embed,.pi iframe,.pi img,.pi object,.pi svg,.pi video{display:block;vertical-align:middle}.pi img,.pi video{height:auto;max-width:100%}.pi [hidden]{display:none}.pi *,.pi :after,.pi :before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pi ::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pi .\\!container{width:100%!important}.pi .container{width:100%}@media (min-width:640px){.pi .\\!container{max-width:640px!important}.pi .container{max-width:640px}}@media (min-width:768px){.pi .\\!container{max-width:768px!important}.pi .container{max-width:768px}}@media (min-width:1024px){.pi .\\!container{max-width:1024px!important}.pi .container{max-width:1024px}}@media (min-width:1280px){.pi .\\!container{max-width:1280px!important}.pi .container{max-width:1280px}}@media (min-width:1536px){.pi .\\!container{max-width:1536px!important}.pi .container{max-width:1536px}}.pi .sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.pi .pointer-events-none{pointer-events:none}.pi .pointer-events-auto{pointer-events:auto}.pi .\\!visible{visibility:visible!important}.pi .visible{visibility:visible}.pi .invisible{visibility:hidden}.pi .collapse{visibility:collapse}.pi .static{position:static}.pi .fixed{position:fixed}.pi .absolute{position:absolute}.pi .relative{position:relative}.pi .inset-0{top:0;right:0;bottom:0;left:0}.pi .inset-x-0{left:0;right:0}.pi .-bottom-10{bottom:-10px}.pi .-bottom-20{bottom:-20px}.pi .-bottom-5{bottom:-5px}.pi .-left-5{left:-5px}.pi .-left-8{left:-8px}.pi .-left-80{left:-80px}.pi .-right-5{right:-5px}.pi .-top-144{top:-144px}.pi .-top-40{top:-40px}.pi .-top-5{top:-5px}.pi .bottom-0{bottom:0}.pi .bottom-20{bottom:20px}.pi .left-0{left:0}.pi .left-1\\/2{left:50%}.pi .left-20{left:20px}.pi .right-0{right:0}.pi .right-16{right:16px}.pi .right-2{right:2px}.pi .right-20{right:20px}.pi .right-4{right:4px}.pi .top-0{top:0}.pi .top-1\\/2{top:50%}.pi .top-2{top:2px}.pi .isolate{isolation:isolate}.pi .z-10{z-index:10}.pi .z-20{z-index:20}.pi .z-50{z-index:50}.pi .z-cropzone{z-index:10}.pi .z-loading-indicator{z-index:50}.pi .z-modal{z-index:110}.pi .z-navbar{z-index:40}.pi .z-obj-box{z-index:20}.pi .z-popover{z-index:130}.pi .z-toast{z-index:160}.pi .z-tool-overlay{z-index:30}.pi .z-tooltip{z-index:150}.pi .z-tray{z-index:120}.pi .m-auto{margin:auto}.pi .mx-20{margin-left:20px;margin-right:20px}.pi .mx-8{margin-left:8px;margin-right:8px}.pi .mx-auto{margin-left:auto;margin-right:auto}.pi .my-20{margin-bottom:20px;margin-top:20px}.pi .my-4{margin-bottom:4px;margin-top:4px}.pi .my-6{margin-bottom:6px;margin-top:6px}.pi .my-8{margin-bottom:8px;margin-top:8px}.pi .my-auto{margin-bottom:auto;margin-top:auto}.pi .-ml-1{margin-left:-1px}.pi .-ml-10{margin-left:-10px}.pi .-ml-12{margin-left:-12px}.pi .-ml-3{margin-left:-3px}.pi .-ml-4{margin-left:-4px}.pi .-ml-6{margin-left:-6px}.pi .-mr-4{margin-right:-4px}.pi .-mr-8{margin-right:-8px}.pi .mb-1{margin-bottom:1px}.pi .mb-10{margin-bottom:10px}.pi .mb-16{margin-bottom:16px}.pi .mb-2{margin-bottom:2px}.pi .mb-20{margin-bottom:20px}.pi .mb-24{margin-bottom:24px}.pi .mb-4{margin-bottom:4px}.pi .mb-6{margin-bottom:6px}.pi .mb-8{margin-bottom:8px}.pi .ml-10{margin-left:10px}.pi .ml-12{margin-left:12px}.pi .ml-4{margin-left:4px}.pi .ml-6{margin-left:6px}.pi .ml-8{margin-left:8px}.pi .ml-auto{margin-left:auto}.pi .mr-10{margin-right:10px}.pi .mr-16{margin-right:16px}.pi .mr-20{margin-right:20px}.pi .mr-4{margin-right:4px}.pi .mr-5{margin-right:5px}.pi .mr-6{margin-right:6px}.pi .mr-8{margin-right:8px}.pi .mr-auto{margin-right:auto}.pi .mt-0{margin-top:0}.pi .mt-10{margin-top:10px}.pi .mt-14{margin-top:14px}.pi .mt-20{margin-top:20px}.pi .mt-24{margin-top:24px}.pi .mt-4{margin-top:4px}.pi .mt-6{margin-top:6px}.pi .box-content{box-sizing:content-box}.pi .block{display:block}.pi .inline-block{display:inline-block}.pi .inline{display:inline}.pi .flex{display:flex}.pi .inline-flex{display:inline-flex}.pi .grid{display:grid}.pi .contents{display:contents}.pi .hidden{display:none}.pi .aspect-square{aspect-ratio:1/1}.pi .h-1{height:1px}.pi .h-12{height:12px}.pi .h-128{height:128px}.pi .h-14{height:14px}.pi .h-16{height:16px}.pi .h-18{height:18px}.pi .h-2{height:2px}.pi .h-2\\/4{height:50%}.pi .h-20{height:20px}.pi .h-22{height:22px}.pi .h-24{height:24px}.pi .h-26{height:26px}.pi .h-28{height:28px}.pi .h-3{height:3px}.pi .h-30{height:30px}.pi .h-32{height:32px}.pi .h-36{height:36px}.pi .h-38{height:2.375rem}.pi .h-4{height:4px}.pi .h-40{height:40px}.pi .h-42{height:42px}.pi .h-48{height:48px}.pi .h-50{height:50px}.pi .h-56{height:56px}.pi .h-6{height:6px}.pi .h-60{height:60px}.pi .h-64{height:64px}.pi .h-68{height:68px}.pi .h-8{height:8px}.pi .h-80{height:80px}.pi .h-84{height:84px}.pi .h-92{height:92px}.pi .h-\\[54px\\]{height:54px}.pi .h-font{height:1em}.pi .h-full{height:100%}.pi .h-px{height:1px}.pi .h-screen{height:100dvh}.pi .max-h-100{max-height:6.25rem}.pi .max-h-\\[calc\\(100\\%-40px\\)\\]{max-height:calc(100% - 40px)}.pi .max-h-\\[calc\\(100vh-90px\\)\\]{max-height:calc(100vh - 90px)}.pi .max-h-dialog{max-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .max-h-full{max-height:100%}.pi .max-h-inherit{max-height:inherit}.pi .max-h-tray{max-height:calc(var(--be-viewport-height, 100vh)*.9)}.pi .min-h-24{min-height:24px}.pi .min-h-30{min-height:30px}.pi .min-h-36{min-height:36px}.pi .min-h-42{min-height:42px}.pi .min-h-50{min-height:50px}.pi .min-h-60{min-height:60px}.pi .min-h-86{min-height:86px}.pi .\\!w-auto{width:auto!important}.pi .w-1\\/2{width:50%}.pi .w-110{width:110px}.pi .w-12{width:12px}.pi .w-1280{width:80rem}.pi .w-14{width:14px}.pi .w-144{width:144px}.pi .w-16{width:16px}.pi .w-18{width:18px}.pi .w-2{width:2px}.pi .w-20{width:20px}.pi .w-22{width:22px}.pi .w-224{width:224px}.pi .w-24{width:24px}.pi .w-256{width:256px}.pi .w-26{width:26px}.pi .w-28{width:28px}.pi .w-280{width:17.5rem}.pi .w-30{width:30px}.pi .w-32{width:32px}.pi .w-320{width:320px}.pi .w-36{width:36px}.pi .w-38{width:2.375rem}.pi .w-384{width:384px}.pi .w-40{width:40px}.pi .w-42{width:42px}.pi .w-440{width:27.5rem}.pi .w-46{width:2.875rem}.pi .w-50{width:50px}.pi .w-56{width:56px}.pi .w-60{width:60px}.pi .w-620{width:38.75rem}.pi .w-64{width:64px}.pi .w-68{width:68px}.pi .w-780{width:48.75rem}.pi .w-8{width:8px}.pi .w-80{width:80px}.pi .w-850{width:53.125rem}.pi .w-96{width:96px}.pi .w-\\[4ch\\]{width:4ch}.pi .w-auto{width:auto}.pi .w-font{width:1em}.pi .w-full{width:100%}.pi .w-max{width:-moz-max-content;width:max-content}.pi .w-min{width:-moz-min-content;width:min-content}.pi .w-px{width:1px}.pi .w-screen{width:100vw}.pi .min-w-0{min-width:0}.pi .min-w-128{min-width:128px}.pi .min-w-180{min-width:11.25rem}.pi .min-w-192{min-width:192px}.pi .min-w-288{min-width:288px}.pi .min-w-30{min-width:30px}.pi .min-w-4{min-width:4px}.pi .min-w-42{min-width:42px}.pi .min-w-92{min-width:92px}.pi .min-w-min{min-width:-moz-min-content;min-width:min-content}.pi .max-w-112{max-width:112px}.pi .max-w-240{max-width:240px}.pi .max-w-288{max-width:288px}.pi .max-w-320{max-width:320px}.pi .max-w-375{max-width:375px}.pi .max-w-500{max-width:31.25rem}.pi .max-w-\\[90\\%\\]{max-width:90%}.pi .max-w-\\[calc\\(100\\%-40px\\)\\]{max-width:calc(100% - 40px)}.pi .max-w-\\[calc\\(100vw-90px\\)\\]{max-width:calc(100vw - 90px)}.pi .max-w-dialog{max-width:calc(var(--be-viewport-width, 100vw)*.9)}.pi .max-w-full{max-width:100%}.pi .max-w-max{max-width:-moz-max-content;max-width:max-content}.pi .flex-\\[1_1_60px\\]{flex:1 1 60px}.pi .flex-auto{flex:1 1 auto}.pi .flex-shrink-0,.pi .shrink-0{flex-shrink:0}.pi .origin-\\[0_55\\%\\]{transform-origin:0 55%}.pi .origin-\\[100\\%\\]{transform-origin:100%}.pi .-translate-x-1\\/2{--tw-translate-x:-50%}.pi .-translate-x-1\\/2,.pi .-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .-translate-y-1\\/2{--tw-translate-y:-50%}.pi .rotate-0{--tw-rotate:0deg}.pi .rotate-0,.pi .rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .rotate-180{--tw-rotate:180deg}.pi .rotate-45{--tw-rotate:45deg}.pi .rotate-45,.pi .rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .rotate-90{--tw-rotate:90deg}.pi .scale-y-\\[0\\.6\\]{--tw-scale-y:.6}.pi .scale-y-\\[0\\.6\\],.pi .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .cursor-default{cursor:default}.pi .cursor-move{cursor:move}.pi .cursor-nesw-resize{cursor:nesw-resize}.pi .cursor-not-allowed{cursor:not-allowed}.pi .cursor-nwse-resize{cursor:nwse-resize}.pi .cursor-pointer{cursor:pointer}.pi .cursor-se-resize{cursor:se-resize}.pi .cursor-sw-resize{cursor:sw-resize}.pi .touch-none{touch-action:none}.pi .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.pi .resize{resize:both}.pi .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.pi .grid-cols-5-min-content{grid-template-columns:repeat(5,min-content)}.pi .flex-row{flex-direction:row}.pi .flex-col{flex-direction:column}.pi .flex-col-reverse{flex-direction:column-reverse}.pi .flex-wrap{flex-wrap:wrap}.pi .flex-nowrap{flex-wrap:nowrap}.pi .items-start{align-items:flex-start}.pi .items-end{align-items:flex-end}.pi .items-center{align-items:center}.pi .items-stretch{align-items:stretch}.pi .justify-start{justify-content:flex-start}.pi .justify-center{justify-content:center}.pi .justify-between{justify-content:space-between}.pi .gap-10{gap:10px}.pi .gap-14{gap:14px}.pi .gap-16{gap:16px}.pi .gap-18{gap:18px}.pi .gap-20{gap:20px}.pi .gap-36{gap:36px}.pi .gap-4{gap:4px}.pi .gap-40{gap:40px}.pi .gap-6{gap:6px}.pi .gap-8{gap:8px}.pi .space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(10px*var(--tw-space-y-reverse));margin-top:calc(10px*(1 - var(--tw-space-y-reverse)))}.pi .overflow-auto{overflow:auto}.pi .overflow-hidden{overflow:hidden}.pi .overflow-x-auto{overflow-x:auto}.pi .overflow-y-auto{overflow-y:auto}.pi .overflow-x-hidden{overflow-x:hidden}.pi .overflow-y-hidden{overflow-y:hidden}.pi .overscroll-contain{overscroll-behavior:contain}.pi .truncate{overflow:hidden;white-space:nowrap}.pi .overflow-ellipsis,.pi .text-ellipsis,.pi .truncate{text-overflow:ellipsis}.pi .whitespace-normal{white-space:normal}.pi .whitespace-nowrap{white-space:nowrap}.pi .break-words{overflow-wrap:break-word}.pi .rounded{border-radius:4px}.pi .rounded-2xl{border-radius:16px}.pi .rounded-3xl{border-radius:24px}.pi .rounded-button{border-radius:var(--be-button-radius,.25rem)}.pi .rounded-full{border-radius:9999px}.pi .rounded-input{border-radius:var(--be-input-radius,.25rem)}.pi .rounded-lg{border-radius:8px}.pi .rounded-md{border-radius:6px}.pi .rounded-none{border-radius:0}.pi .rounded-panel{border-radius:var(--be-panel-radius,.25rem)}.pi .rounded-xl{border-radius:12px}.pi .rounded-l{border-bottom-left-radius:4px;border-top-left-radius:4px}.pi .rounded-l-full{border-bottom-left-radius:9999px;border-top-left-radius:9999px}.pi .rounded-l-input{border-bottom-left-radius:var(--be-input-radius,.25rem);border-top-left-radius:var(--be-input-radius,.25rem)}.pi .rounded-l-none{border-bottom-left-radius:0;border-top-left-radius:0}.pi .rounded-r-full{border-bottom-right-radius:9999px;border-top-right-radius:9999px}.pi .rounded-r-input{border-bottom-right-radius:var(--be-input-radius,.25rem);border-top-right-radius:var(--be-input-radius,.25rem)}.pi .rounded-r-none{border-bottom-right-radius:0;border-top-right-radius:0}.pi .rounded-t{border-top-left-radius:4px;border-top-right-radius:4px}.pi .rounded-bl-none{border-bottom-left-radius:0}.pi .rounded-br-none{border-bottom-right-radius:0}.pi .rounded-tl-none{border-top-left-radius:0}.pi .rounded-tr-none{border-top-right-radius:0}.pi .border{border-width:1px}.pi .border-2{border-width:2px}.pi .border-4{border-width:4px}.pi .border-\\[3px\\]{border-width:3px}.pi .border-y{border-top-width:1px}.pi .border-b,.pi .border-y{border-bottom-width:1px}.pi .border-b-4{border-bottom-width:4px}.pi .border-l{border-left-width:1px}.pi .border-l-4{border-left-width:4px}.pi .border-r{border-right-width:1px}.pi .border-r-4{border-right-width:4px}.pi .border-t{border-top-width:1px}.pi .border-t-4{border-top-width:4px}.pi .border-dotted{border-style:dotted}.pi .border-none{border-style:none}.pi .border-background{--tw-border-opacity:1;border-color:rgb(var(--be-background)/var(--tw-border-opacity))}.pi .border-bg-alt{--tw-border-opacity:1;border-color:rgb(var(--be-background-alt)/var(--tw-border-opacity))}.pi .border-chip{--tw-border-opacity:1;border-color:rgb(var(--be-background-chip)/var(--tw-border-opacity))}.pi .border-danger{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .border-danger\\/50{border-color:#ef444480}.pi .border-divider{border-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity))}.pi .border-paper{--tw-border-opacity:1;border-color:rgb(var(--be-paper)/var(--tw-border-opacity))}.pi .border-positive\\/50{border-color:#22c55e80}.pi .border-primary{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .border-primary\\/50{border-color:rgb(var(--be-primary)/.5)}.pi .border-text-muted{border-color:rgb(var(--be-foreground-base)/var(--be-text-muted-opacity))}.pi .border-transparent{border-color:transparent}.pi .border-white{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.pi .border-white\\/50{border-color:#ffffff80}.pi .border-b-bg{--tw-border-opacity:1;border-bottom-color:rgb(var(--be-background)/var(--tw-border-opacity))}.pi .border-b-transparent{border-bottom-color:transparent}.pi .border-r-transparent{border-right-color:transparent}.pi .bg{--tw-bg-opacity:1;background-color:rgb(var(--be-background)/var(--tw-bg-opacity))}.pi .bg-alt{--tw-bg-opacity:1;background-color:rgb(var(--be-background-alt)/var(--tw-bg-opacity))}.pi .bg-background{--tw-bg-opacity:1;background-color:rgb(var(--be-background)/var(--tw-bg-opacity))}.pi .bg-background\\/70{background-color:rgb(var(--be-background)/.7)}.pi .bg-background\\/80{background-color:rgb(var(--be-background)/.8)}.pi .bg-black\\/50{background-color:#00000080}.pi .bg-black\\/80{background-color:#000c}.pi .bg-chip{--tw-bg-opacity:1;background-color:rgb(var(--be-background-chip)/var(--tw-bg-opacity))}.pi .bg-controls{--tw-bg-opacity:1;background-color:rgb(50 50 50/var(--tw-bg-opacity))}.pi .bg-danger{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.pi .bg-danger-lighter{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.pi .bg-divider{background-color:rgb(var(--be-foreground-base)/var(--be-divider-opacity))}.pi .bg-fg-base\\/4{background-color:rgb(var(--be-foreground-base)/4%)}.pi .bg-focus{background-color:rgb(var(--be-foreground-base)/var(--be-focus-opacity))}.pi .bg-inherit{background-color:inherit}.pi .bg-paper{--tw-bg-opacity:1;background-color:rgb(var(--be-paper)/var(--tw-bg-opacity))}.pi .bg-positive{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.pi .bg-positive-lighter{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}.pi .bg-primary{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .bg-primary-dark{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .bg-primary-light{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-light)/var(--tw-bg-opacity))}.pi .bg-primary\\/focus{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .bg-primary\\/selected{background-color:rgb(var(--be-primary)/var(--be-selected-opacity))}.pi .bg-slider-disabled{--tw-bg-opacity:1;background-color:rgb(189 189 189/var(--tw-bg-opacity))}.pi .bg-slider-disabled\\/60{background-color:#bdbdbd99}.pi .bg-toast{--tw-bg-opacity:1;background-color:rgb(50 50 50/var(--tw-bg-opacity))}.pi .bg-transparent{background-color:transparent}.pi .bg-warning{--tw-bg-opacity:1;background-color:rgb(243 164 50/var(--tw-bg-opacity))}.pi .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pi .bg-white\\/50{background-color:#ffffff80}.pi .bg-opacity-95{--tw-bg-opacity:.95}.pi .bg-no-repeat{background-repeat:no-repeat}.pi .fill-current{fill:currentColor}.pi .fill-transparent{fill:transparent}.pi .stroke-current{stroke:currentColor}.pi .object-contain{-o-object-fit:contain;object-fit:contain}.pi .object-cover{-o-object-fit:cover;object-fit:cover}.pi .p-0{padding:0}.pi .p-10{padding:10px}.pi .p-14{padding:14px}.pi .p-16{padding:16px}.pi .p-18{padding:18px}.pi .p-2{padding:2px}.pi .p-20{padding:20px}.pi .p-4{padding:4px}.pi .p-40{padding:40px}.pi .p-6{padding:6px}.pi .p-8{padding:8px}.pi .px-10{padding-left:10px;padding-right:10px}.pi .px-12{padding-left:12px;padding-right:12px}.pi .px-14{padding-left:14px;padding-right:14px}.pi .px-16{padding-left:16px;padding-right:16px}.pi .px-18{padding-left:18px;padding-right:18px}.pi .px-20{padding-left:20px;padding-right:20px}.pi .px-22{padding-left:22px;padding-right:22px}.pi .px-24{padding-left:24px;padding-right:24px}.pi .px-26{padding-left:26px;padding-right:26px}.pi .px-32{padding-left:32px;padding-right:32px}.pi .px-4{padding-left:4px;padding-right:4px}.pi .px-5vw{padding-left:5vw;padding-right:5vw}.pi .px-6{padding-left:6px;padding-right:6px}.pi .px-8{padding-left:8px;padding-right:8px}.pi .py-10{padding-bottom:10px;padding-top:10px}.pi .py-12{padding-bottom:12px;padding-top:12px}.pi .py-14{padding-bottom:14px;padding-top:14px}.pi .py-2{padding-bottom:2px;padding-top:2px}.pi .py-20{padding-bottom:20px;padding-top:20px}.pi .py-3{padding-bottom:3px;padding-top:3px}.pi .py-4{padding-bottom:4px;padding-top:4px}.pi .py-5{padding-bottom:5px;padding-top:5px}.pi .py-6{padding-bottom:6px;padding-top:6px}.pi .py-8{padding-bottom:8px;padding-top:8px}.pi .py-\\[9px\\]{padding-bottom:9px;padding-top:9px}.pi .pb-10{padding-bottom:10px}.pi .pb-12{padding-bottom:12px}.pi .pb-14{padding-bottom:14px}.pi .pb-16{padding-bottom:16px}.pi .pb-18{padding-bottom:18px}.pi .pb-20{padding-bottom:20px}.pi .pb-4{padding-bottom:4px}.pi .pb-8{padding-bottom:8px}.pi .pb-safe-area{padding-bottom:env(safe-area-inset-bottom)}.pi .pl-10{padding-left:10px}.pi .pl-12{padding-left:12px}.pi .pl-14{padding-left:14px}.pi .pl-16{padding-left:16px}.pi .pl-18{padding-left:18px}.pi .pl-28{padding-left:28px}.pi .pl-46{padding-left:2.875rem}.pi .pl-54{padding-left:3.375rem}.pi .pl-8{padding-left:8px}.pi .pr-10{padding-right:10px}.pi .pr-12{padding-right:12px}.pi .pr-18{padding-right:18px}.pi .pr-24{padding-right:24px}.pi .pr-28{padding-right:28px}.pi .pr-46{padding-right:2.875rem}.pi .pr-54{padding-right:3.375rem}.pi .pr-6{padding-right:6px}.pi .pr-8{padding-right:8px}.pi .pt-10{padding-top:10px}.pi .pt-12{padding-top:12px}.pi .pt-14{padding-top:14px}.pi .pt-16{padding-top:16px}.pi .pt-20{padding-top:20px}.pi .pt-24{padding-top:24px}.pi .pt-4{padding-top:4px}.pi .pt-40{padding-top:40px}.pi .pt-6{padding-top:6px}.pi .text-left{text-align:left}.pi .text-center{text-align:center}.pi .text-right{text-align:right}.pi .align-middle{vertical-align:middle}.pi .text-base{font-size:16px;line-height:24px}.pi .text-lg{font-size:18px;line-height:28px}.pi .text-sm{font-size:14px;line-height:20px}.pi .text-xl{font-size:20px;line-height:28px}.pi .text-xs{font-size:12px;line-height:16px}.pi .font-bold{font-weight:700}.pi .font-medium{font-weight:500}.pi .font-semibold{font-weight:600}.pi .uppercase{text-transform:uppercase}.pi .capitalize{text-transform:capitalize}.pi .italic{font-style:italic}.pi .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.pi .leading-5{line-height:1.25rem}.pi .leading-none{line-height:1}.pi .tracking-wide{letter-spacing:.025em}.pi .\\!text{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))!important}.pi .text{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.pi .text-black\\/30{color:#0000004d}.pi .text-danger{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.pi .text-danger-darker{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity))}.pi .text-disabled{color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .text-link{--tw-text-opacity:1;color:rgb(var(--be-link-color,var(--be-primary))/var(--tw-text-opacity))}.pi .text-main{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .text-muted{color:rgb(var(--be-foreground-base)/var(--be-text-muted-opacity))}.pi .text-on-primary{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .text-positive{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.pi .text-positive-darker{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.pi .text-primary{--tw-text-opacity:1;color:rgb(var(--be-primary)/var(--tw-text-opacity))}.pi .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.pi .underline{text-decoration-line:underline}.pi .no-underline{text-decoration-line:none}.pi .caret-transparent{caret-color:transparent}.pi .opacity-0{opacity:0}.pi .opacity-100{opacity:1}.pi .opacity-70{opacity:.7}.pi .opacity-80{opacity:.8}.pi .opacity-90{opacity:.9}.pi .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.pi .shadow,.pi .shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.pi .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.pi .shadow-lg,.pi .shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.pi .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.pi .shadow-sm,.pi .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.pi .outline-none{outline:2px solid transparent;outline-offset:2px}.pi .outline{outline-color:rgb(var(--be-primary-lighter)/1);outline-style:solid;outline-width:2px}.pi .ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .ring-inset{--tw-ring-inset:inset}.pi .blur{--tw-blur:blur(8px)}.pi .blur,.pi .grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .grayscale{--tw-grayscale:grayscale(100%)}.pi .invert{--tw-invert:invert(100%)}.pi .invert,.pi .sepia{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .sepia{--tw-sepia:sepia(100%)}.pi .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pi .backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.pi .transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-button{transition-duration:.15s;transition-property:background-color,box-shadow,border-color,color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .transition-width{transition-duration:.15s;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .duration-100{transition-duration:.1s}.pi .duration-200{transition-duration:.2s}.pi .will-change-transform{will-change:transform}.pi .icon-2xs{font-size:.75rem}.pi .icon-xs{font-size:1rem}.pi .icon-sm{font-size:1.25rem}.pi .icon-md{font-size:1.5rem}.pi .icon-lg{font-size:2.1875rem}.pi .icon-xl{font-size:2.6875rem}.pi .no-tap-highlight{-webkit-tap-highlight-color:transparent}@media only screen and (min-device-width:768px){.pi .tiny-scrollbar{scrollbar-color:rgba(0,0,0,.2) transparent;scrollbar-width:thin}.pi .tiny-scrollbar::-webkit-scrollbar{background-color:transparent;height:6px;width:6px}.pi .tiny-scrollbar::-webkit-scrollbar-thumb{background-color:rgb(var(--be-foreground-base)/.2);border-radius:10px}.pi .tiny-scrollbar::-webkit-scrollbar-track-piece:start{background:transparent}.pi .tiny-scrollbar::-webkit-scrollbar-track-piece:end{background:transparent}}.pi .hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.pi .hide-scrollbar::-webkit-scrollbar{background:transparent;display:none;height:0;width:0}.pi .svg-icon{display:inline-block;flex-shrink:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;fill:currentColor;transition-duration:.15s;transition-property:transform,fill;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .cropzone:not(.moving) .cropzone-transition{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .first-letter\\:capitalize:first-letter{text-transform:capitalize}.pi .file\\:mr-10::file-selector-button{margin-right:10px}.pi .file\\:h-24::file-selector-button{height:24px}.pi .file\\:rounded::file-selector-button{border-radius:4px}.pi .file\\:border-none::file-selector-button{border-style:none}.pi .file\\:bg-primary::file-selector-button{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .file\\:px-10::file-selector-button{padding-left:10px;padding-right:10px}.pi .file\\:text-sm::file-selector-button{font-size:14px;line-height:20px}.pi .file\\:font-semibold::file-selector-button{font-weight:600}.pi .file\\:text-on-primary::file-selector-button{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .before\\:z-10:before{content:var(--tw-content);z-index:10}.pi .before\\:block:before{content:var(--tw-content);display:block}.pi .before\\:h-12:before{content:var(--tw-content);height:12px}.pi .before\\:h-14:before{content:var(--tw-content);height:14px}.pi .before\\:h-18:before{content:var(--tw-content);height:18px}.pi .before\\:h-22:before{content:var(--tw-content);height:22px}.pi .before\\:h-28:before{content:var(--tw-content);height:28px}.pi .before\\:h-full:before{content:var(--tw-content);height:100%}.pi .before\\:w-12:before{content:var(--tw-content);width:12px}.pi .before\\:w-14:before{content:var(--tw-content);width:14px}.pi .before\\:w-18:before{content:var(--tw-content);width:18px}.pi .before\\:w-22:before{content:var(--tw-content);width:22px}.pi .before\\:w-28:before{content:var(--tw-content);width:28px}.pi .before\\:w-full:before{content:var(--tw-content);width:100%}.pi .before\\:translate-x-2:before{--tw-translate-x:2px}.pi .before\\:scale-10:before,.pi .before\\:translate-x-2:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .before\\:scale-10:before{--tw-scale-x:.1;--tw-scale-y:.1}.pi .before\\:rounded-3xl:before{border-radius:24px;content:var(--tw-content)}.pi .before\\:rounded-full:before{border-radius:9999px;content:var(--tw-content)}.pi .before\\:border:before{border-width:1px;content:var(--tw-content)}.pi .before\\:bg-primary:before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .before\\:bg-white:before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pi .before\\:opacity-0:before{content:var(--tw-content);opacity:0}.pi .before\\:transition:before{content:var(--tw-content);transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .before\\:transition-transform:before{content:var(--tw-content);transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.pi .before\\:duration-200:before{content:var(--tw-content);transition-duration:.2s}.pi .after\\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.pi .after\\:absolute:after{content:var(--tw-content);position:absolute}.pi .after\\:inset-0:after{content:var(--tw-content);top:0;right:0;bottom:0;left:0}.pi .checked\\:border-danger:checked{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .checked\\:border-primary:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .checked\\:bg-danger:checked{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.pi .checked\\:bg-primary:checked{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .checked\\:before\\:translate-x-14:checked:before{--tw-translate-x:14px}.pi .checked\\:before\\:translate-x-14:checked:before,.pi .checked\\:before\\:translate-x-20:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:translate-x-20:checked:before{--tw-translate-x:20px}.pi .checked\\:before\\:translate-x-24:checked:before{--tw-translate-x:24px}.pi .checked\\:before\\:translate-x-24:checked:before,.pi .checked\\:before\\:translate-x-30:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:translate-x-30:checked:before{--tw-translate-x:30px}.pi .checked\\:before\\:translate-x-36:checked:before{--tw-translate-x:36px}.pi .checked\\:before\\:scale-\\[\\.65\\]:checked:before,.pi .checked\\:before\\:translate-x-36:checked:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .checked\\:before\\:scale-\\[\\.65\\]:checked:before{--tw-scale-x:.65;--tw-scale-y:.65}.pi .checked\\:before\\:border-white:checked:before{content:var(--tw-content);--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}.pi .checked\\:before\\:opacity-100:checked:before{content:var(--tw-content);opacity:1}.pi .focus-within\\:border-primary\\/60:focus-within{border-color:rgb(var(--be-primary)/.6)}.pi .focus-within\\:ring:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-within\\:ring-primary\\/focus:focus-within{--tw-ring-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .hover\\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.pi .hover\\:border-chip\\/90:hover{border-color:rgb(var(--be-background-chip)/.9)}.pi .hover\\:border-danger:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.pi .hover\\:border-danger\\/90:hover{border-color:#ef4444e6}.pi .hover\\:border-paper\\/90:hover{border-color:rgb(var(--be-paper)/.9)}.pi .hover\\:border-positive:hover{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity))}.pi .hover\\:border-primary:hover{--tw-border-opacity:1;border-color:rgb(var(--be-primary)/var(--tw-border-opacity))}.pi .hover\\:border-primary-dark:hover{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .hover\\:bg-chip\\/90:hover{background-color:rgb(var(--be-background-chip)/.9)}.pi .hover\\:bg-danger\\/4:hover{background-color:#ef44440a}.pi .hover\\:bg-danger\\/90:hover{background-color:#ef4444e6}.pi .hover\\:bg-fg-base\\/15:hover{background-color:rgb(var(--be-foreground-base)/15%)}.pi .hover\\:bg-hover:hover{background-color:rgb(var(--be-foreground-base)/var(--be-hover-opacity))}.pi .hover\\:bg-paper\\/90:hover{background-color:rgb(var(--be-paper)/.9)}.pi .hover\\:bg-positive\\/4:hover{background-color:#22c55e0a}.pi .hover\\:bg-primary-dark:hover{--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .hover\\:bg-primary\\/4:hover{background-color:rgb(var(--be-primary)/4%)}.pi .hover\\:bg-primary\\/focus:hover{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .hover\\:bg-primary\\/hover:hover{background-color:rgb(var(--be-primary)/var(--be-hover-opacity))}.pi .hover\\:bg-white:hover{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pi .hover\\:bg-white\\/20:hover{background-color:#fff3}.pi .hover\\:bg-white\\/hover:hover{background-color:rgb(255 255 255/var(--be-hover-opacity))}.pi .hover\\:text-main:hover{color:rgb(var(--be-foreground-base)/var(--be-text-main-opacity))}.pi .hover\\:text-primary-dark:hover{--tw-text-opacity:1;color:rgb(var(--be-primary-dark)/var(--tw-text-opacity))}.pi .hover\\:underline:hover{text-decoration-line:underline}.pi .hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .before\\:hover\\:bg-primary-dark:hover:before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}.pi .hover\\:after\\:bg-black\\/5:hover:after{background-color:#0000000d;content:var(--tw-content)}.pi .checked\\:hover\\:border-primary-dark:hover:checked{--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi .focus\\:border-danger\\/60:focus{border-color:#ef444499}.pi .focus\\:border-primary\\/60:focus{border-color:rgb(var(--be-primary)/.6)}.pi .focus\\:bg-primary:focus{--tw-bg-opacity:1;background-color:rgb(var(--be-primary)/var(--tw-bg-opacity))}.pi .focus\\:text-on-primary:focus{--tw-text-opacity:1;color:rgb(var(--be-on-primary)/var(--tw-text-opacity))}.pi .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.pi .focus\\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus\\:ring-danger\\/focus:focus{--tw-ring-color:rgb(239 68 68/var(--be-focus-opacity))}.pi .focus\\:ring-primary\\/focus:focus{--tw-ring-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus\\:after\\:bg-black\\/10:focus:after{background-color:#0000001a;content:var(--tw-content)}.pi .focus-visible\\:bg-primary\\/focus:focus-visible{background-color:rgb(var(--be-primary)/var(--be-focus-opacity))}.pi .focus-visible\\:outline:focus-visible{outline-color:rgb(var(--be-primary-lighter)/1);outline-style:solid;outline-width:2px}.pi .focus-visible\\:outline-primary-light:focus-visible{outline-color:rgb(var(--be-primary-light)/1)}.pi .focus-visible\\:ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.pi .disabled\\:pointer-events-none:disabled{pointer-events:none}.pi .disabled\\:cursor-default:disabled{cursor:default}.pi .disabled\\:border-disabled-bg:disabled{border-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .disabled\\:border-disabled-fg:disabled{border-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .disabled\\:border-transparent:disabled{border-color:transparent}.pi .disabled\\:border-white\\/70:disabled{border-color:#ffffffb3}.pi .disabled\\:border-r-transparent:disabled{border-right-color:transparent}.pi .disabled\\:bg-disabled:disabled{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-bg-opacity))}.pi .disabled\\:bg-transparent:disabled{background-color:transparent}.pi .disabled\\:text-disabled:disabled{color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity))}.pi .disabled\\:text-white\\/70:disabled{color:#ffffffb3}.pi .disabled\\:shadow-none:disabled{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pi .disabled\\:before\\:bg-disabled-fg:disabled:before{background-color:rgb(var(--be-foreground-base)/var(--be-disabled-fg-opacity));content:var(--tw-content)}.pi :is(.dark .dark\\:bg-chip){--tw-bg-opacity:1;background-color:rgb(var(--be-background-chip)/var(--tw-bg-opacity))}.pi :is(.dark .dark\\:text-white\\/50){color:#ffffff80}.pi :is(.dark .dark\\:checked\\:border-primary-dark:checked){--tw-border-opacity:1;border-color:rgb(var(--be-primary-dark)/var(--tw-border-opacity))}.pi :is(.dark .dark\\:checked\\:bg-primary-dark:checked){--tw-bg-opacity:1;background-color:rgb(var(--be-primary-dark)/var(--tw-bg-opacity))}@media (min-width:640px){.pi .sm\\:text-sm{font-size:14px;line-height:20px}}@media (min-width:768px){.pi .md\\:text-lg{font-size:18px;line-height:28px}}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring:focus-visible>.tree-label{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring-2:focus-visible>.tree-label{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.pi .\\[\\&\\>\\.tree-label\\]\\:focus-visible\\:ring-inset:focus-visible>.tree-label{--tw-ring-inset:inset}\n'),!t.selector)throw new Error('Pixie required "selector" option.');const n=document.querySelector(t.selector);n&&(n.classList.add("pi"),function(e){mf=e,vf=e}(n),this.setConfig(t),_f.setState({editor:this}),S(n).render(e(i.StrictMode,{children:e(PF,{})})))}get state(){return Sf()}get defaultConfig(){return t.defaultConfig}open(e={}){return new Promise(async t=>{var n;Object.keys(e).length?await this.resetEditor({...oh(e,{ui:{visible:!0},image:e.image||Sf().config.image,state:e.state||Sf().config.state,blankCanvasSize:e.blankCanvasSize||Sf().config.blankCanvasSize})}):null!=(n=Sf().config.ui)&&n.visible||Sf().setConfig({ui:{visible:!0}}),t()})}close(){var e,t,n;null!=(e=Sf().config.ui)&&e.visible&&(this.setConfig({ui:{visible:!1}}),null==(n=(t=Sf().config).onClose)||n.call(t))}setConfig(e){Sf().setConfig(e)}uploadAndAddImage(){return kf().import.uploadAndAddImage()}uploadAndReplaceMainImage(){return kf().import.uploadAndReplaceMainImage()}uploadAndOpenStateFile(){return kf().import.uploadAndOpenStateFile()}newCanvas(e,t,n){return kf().canvas.openNew(e,t,n)}getState(e){return JSON.stringify(Of(e))}setState(e){return kf().import.loadState(e)}async setStateFromUrl(e){const t=await If(e);return kf().import.loadState(t)}openTool(e){Ff(e)}applyChanges(){Sf().applyChanges()}cancelChanges(){Sf().cancelChanges()}async resetEditor(e){await Ef(e),await kf().canvas.loadInitialContent()}togglePanel(e,t){"objects"===e&&Sf().togglePanel("history",!1),"history"===e&&Sf().togglePanel("objects",!1),Sf().togglePanel(e,t)}on(e,t){var n;null==(n=this.fabric)||n.on(e,t)}isDirty(){return Sf().dirty}get(e){return this.tools[e]}notify(e){return Df(e)}static init(e){return new Promise(t=>{const n=e.onLoad;e.onLoad=e=>{null==n||n(e),t(e)},new this(e)})}};vo(MF,"defaultConfig",Pu),vo(MF,"version",Fu);let RF=MF;function LF(e){if(!this.backgroundColor)return;const t=this._getNonTransformedDimensions(),n=-t.x/2,r=-t.y/2,i=t.x,o=t.y,a=this.backgroundColor;if("string"==typeof a||a instanceof CanvasGradient||a instanceof CanvasPattern)e.fillStyle=a,e.fillRect(n,r,i,o);else if("object"!=typeof a||!("type"in a)||"linear"!==a.type&&"radial"!==a.type){if("source"in a&&(a.source instanceof HTMLImageElement||a.source instanceof HTMLCanvasElement))if(a.repeat){const t=e.createPattern(a.source,a.repeat);t&&(e.fillStyle=t,e.fillRect(n,r,i,o))}else e.drawImage(a.source,n,r,i,o)}else{const t=function(e,t,n,r){var i,o;if("linear"===t.type){const i=e.createLinearGradient(n+t.coords.x1,r+t.coords.y1,n+t.coords.x2,r+t.coords.y2);return t.colorStops.forEach(e=>i.addColorStop(e.offset,e.color)),i}if("radial"===t.type){const a=e.createRadialGradient(n+t.coords.x1,r+t.coords.y1,null!==(i=t.coords.r1)&&void 0!==i?i:0,n+t.coords.x2,r+t.coords.y2,null!==(o=t.coords.r2)&&void 0!==o?o:0);return t.colorStops.forEach(e=>a.addColorStop(e.offset,e.color)),a}throw new Error("Unknown gradient type")}(e,a,n,r);e.fillStyle=t,e.fillRect(n,r,i,o)}this._removeShadow(e)}const jF="fm-pixie-editor";const DF=new class{constructor(){this._container=document.createElement("div"),this._instance=null,this._container.classList.add(jF),this._container.style.width="100%",this._container.style.height="85vh",this._container.style.minHeight="400px"}get className(){return`.${jF}`}get canvas(){var e,t;return null===(t=null===(e=this._instance)||void 0===e?void 0:e.state.canvasRef)||void 0===t?void 0:t.current}get tools(){var e;return null===(e=this._instance)||void 0===e?void 0:e.tools}isLoaded(){return!!this._instance}async _setConfig(e){var t;this._instance?await this._instance.resetEditor(e):this._instance=await RF.init(Object.assign(Object.assign({},e),{selector:this.className})),(t=this._instance).fabric?t.fabric.on("object:added",e=>{const t=e.target;t&&"text"===t.name&&(t._renderBackground=LF)}):console.warn("Pixie fabric instance is not available")}async show(e,t,n=t.firstChild){t.insertBefore(this._container,n),await this._setConfig(e),this._instance.open()}close(){var e;null===(e=this._container.parentNode)||void 0===e||e.removeChild(this._container)}},NF=({small:t=!1,style:n={},wrap:r=!1})=>{const i=Object.assign({width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},n);return e(N,{size:"large",style:i,wrap:r,children:e(k,{})})};function zF(e,t){if(!e)return t;if(!t)return e;return`${e.replace(/\/+$/,"")}/${t.replace(/^\/+/,"")}`}function BF(e,t){if(/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(t))return t;const n=function(e){const t="undefined"!=typeof __webpack_public_path__?__webpack_public_path__:"";if(e&&/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(e))return e;let n=zF(t,e||"");return!n||n.startsWith("/")||/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(n)||(n="/"+n),n}(e),r=zF(n,t);return!r||r.startsWith("/")||/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(r)?r:"/"+r}var VF,UF;!function(e){e.TOP="top",e.BOTTOM="bottom",e.HIDDEN=""}(VF||(VF={})),function(e){e.TOP="top",e.BOTTOM="bottom",e.HIDDEN=""}(UF||(UF={}));const $F=(e,t="image/png")=>fetch(`data:${t};base64,${e}`).then(e=>e.blob());const WF=({visible:n,onClose:i,file:o,onSave:a})=>{const s=r.useRef(null),l=gi(),{options:c,actions:u,state:d}=ui(),{config:h}=c,{setCurrentMenuFile:f,setLoading:p}=u,{loading:g}=d,[m,v]=r.useState(null),[y,b]=r.useState(""),[w,x]=r.useState(!1),[C,_]=r.useState(!1),S=wi(),k=r.useRef(!1),A=r.useRef(),E=r.useRef(void 0),[I,T]=r.useState(null);r.useEffect(()=>{o&&(p&&p(!0),(async()=>{if(E.current!==o)if("object"!=typeof o)try{if(E.current=o,o.startsWith("data:"))T({thumbnail:o});else{const e=await S.handleAddFileByUrl(o,!0);if(!e)throw new Error("Не удалось загрузить файл");E.current===o&&T(e)}}finally{E.current===o&&(E.current=null)}else T(o)})())},[o,S.handleAddFileByUrl,T,p]),A.current=a;const O=r.useCallback(async e=>{try{if(e.thumbnail&&e.thumbnail.startsWith("data:"))return e.thumbnail;const t=await S.getFileData(e);if(!t)throw new Error("Ошибка загрузки файла");return new Promise(e=>{const n=new FileReader;n.onload=()=>e(n.result),n.readAsDataURL(t)})}catch(e){throw console.error("Ошибка получения данных изображения:",e),e}},[S]);r.useEffect(()=>{(async()=>{var e,t,n;try{const e=I?await O(I):null;v(e);const t=I?I.type:"";b(t||"image/png"),p&&p(!1)}catch(r){console.error("🎨 Ошибка загрузки изображения:",r),l.error({id:"IMAGE_DOWNLOAD_FAILED",innerException:r,message:"Ошибка загрузки изображения",placement:"bottomRight",data:{itemId:null!==(e=null==I?void 0:I.id)&&void 0!==e?e:void 0,itemName:null!==(t=null==I?void 0:I.name)&&void 0!==t?t:void 0,folderId:null!==(n=null==I?void 0:I.folderId)&&void 0!==n?n:null,thumbnail:null==I?void 0:I.thumbnail}}),null==i||i()}})()},[n,I,O,i,l,p]);const F=r.useCallback(async(e,t,n)=>{var r,o,a,s,u;if(!I||!A.current)return;const d="object"==typeof I&&null!==I?I:null;let h=null;try{null==p||p(!0);const t=await function(e,t){if("json"===e)return new Blob([t],{type:"application/json"});if("svg"===e)return new Blob([t],{type:"image/svg+xml"});let n=`image/${e}`;if("jpg"===e&&(n="image/jpeg"),t.startsWith("data:")){const e=t.match(/^data:([^;]+)/);e&&e[1].startsWith("image/")&&(n=e[1]);const r=t.replace(/data:image\/[^;]+;base64,/,"");return $F(r,n)}return $F(t,n)}(n,e);let a=t.type||`image/${n}`;"jpg"===n&&(a="image/jpeg");const s=e.startsWith("data:")?e:`data:${a};base64,${e}`,u=Object.assign(Object.assign({},I),{thumbnail:s,size:t.size,date:(new Date).toISOString().split("T")[0],type:a,folderId:I.folderId||"",name:I.name,extension:I.extension||I.name.split(".").pop()||""});h=u;const d=await A.current(u);if(d)return l.success({id:"IMAGE_UPDATE_SUCCESS",message:"Успех",description:"Изображение успешно обновлено",data:{itemId:null!==(r=d.id)&&void 0!==r?r:void 0,itemName:d.name,folderId:null!==(o=d.folderId)&&void 0!==o?o:null,thumbnail:d.thumbnail}}),c.onEditorOk&&c.onEditorOk(d),null==p||p(!1),d;null==p||p(!1),null==i||i()}catch(e){console.error("Ошибка сохранения:",e);const n=null!=h?h:d;l.error({id:"IMAGE_SAVE_FAILED",message:"Ошибка при сохранении изображения",placement:"bottomRight",data:{itemId:null!==(a=null==n?void 0:n.id)&&void 0!==a?a:void 0,itemName:null!==(s=null==n?void 0:n.name)&&void 0!==s?s:t,folderId:null!==(u=null==n?void 0:n.folderId)&&void 0!==u?u:null,thumbnail:null==n?void 0:n.thumbnail},innerException:e}),null==p||p(!1)}},[I,l,i,c,p]),P=r.useCallback(async()=>{var e;if(!DF.isLoaded()||!I)return void console.error("❌ Pixie instance или file отсутствует");const t=I.name||"edited-image",n=I.extension||y.split("/")[1]||"png";try{let r;r="jpg"===n?"jpeg":["png","jpeg","json","svg"].includes(n)?n:"jpeg",await(null===(e=DF.tools)||void 0===e?void 0:e.export.save(t.replace(/\.[^/.]+$/,""),r,.8))}catch(e){console.error("🎨 Ошибка при сохранении через кнопку:",e);try{const e=DF.canvas,r=e?e.toDataURL(`image/${n}`):null;r&&await F(r,t,n)}catch(e){console.error("🎨 Альтернативный способ тоже не сработал:",e)}}},[I,y,F]),M=r.useCallback(async()=>{if(m&&n&&w&&!k.current)try{k.current=!0;const t=s.current;let n=0;for(;n<20&&(0===t.clientWidth||0===t.clientHeight);)await new Promise(e=>setTimeout(e,50)),n++;const r=(null==h?void 0:h.locale)?null==h?void 0:h.locale.replace("_","-"):"ru-RU",o=matchMedia(nn).matches?en:Qt,a=(null==h?void 0:h.theme)===tn?o:null==h?void 0:h.theme,l={selector:"#pixie-editor",baseUrl:BF((null==h?void 0:h.baseUrl)||"",(null==h?void 0:h.assetsUrl)||"assets/image-editor"),image:m,activeLanguage:r,ui:{activeTheme:a,mode:"inline",forceOverlayModeOnMobile:!1,visible:!0,menubar:{replaceDefaultItems:!0,position:VF.TOP,items:[{type:"undoWidget",align:"left"},{type:"zoomWidget",align:"center",desktopOnly:!0},{type:"button",align:"right",desktopOnly:!0,icon:()=>e(me,{style:{fontSize:20}}),action:e=>{e.togglePanel("history")}},{type:"button",icon:()=>e(ge,{style:{fontSize:20}}),align:"right",desktopOnly:!0,action:i}]},nav:{position:UF.TOP}},onSave:async function(e,t,n){try{null==p||p(!0);return await F(e,t,n)}catch(e){throw console.error("🎨 PIXIE onSave ERROR:",e),null==p||p(!1),e}}};try{_(!1),await DF.show(l,s.current);const e=DF.canvas;e&&e.focus(),_(!0)}catch(e){console.error("init pixie failed:",e)}}catch(e){console.error("Ошибка инициализации Pixie:",e),l.error({id:"EDITOR_INIT_FAILED",message:"Ошибка инициализации редактора",placement:"bottomRight",innerException:e}),k.current=!1,null==i||i()}},[m,n,w,null==h?void 0:h.locale,i,p,F,l]);return r.useEffect(()=>{n&&m&&w&&M()},[n,m,w,null==I?void 0:I.id,M]),r.useEffect(()=>{if(!n){try{DF.close()}catch(e){console.warn("Ошибка при закрытии Pixie:",e)}v(null),b(""),k.current=!1,x(!1),_(!1)}return()=>{try{DF.close()}catch(e){console.warn("Ошибка при закрытии Pixie при размонтировании:",e)}}},[n]),e(Y,{title:`Редактирование: ${(null==I?void 0:I.name)||"Изображение"}`,open:n,closeIcon:null,onCancel:i,afterOpenChange:e=>x(e),forceRender:!0,width:"95vw",style:{top:20},styles:{body:{height:"85vh",padding:0}},footer:[e(D,{onClick:i,disabled:!w||g,children:"Отмена"},"cancel"),e(D,{type:"primary",onClick:P,loading:g,children:"Сохранить"},"save")],maskClosable:!1,destroyOnHidden:!1,afterClose:()=>{f&&f("")},children:t("div",{ref:s,style:{position:"relative",width:"100%",height:"100%"},children:[n&&!C?e("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,0.45)",backdropFilter:"blur(1px)",pointerEvents:"all",zIndex:10},children:e("span",{style:{fontSize:14,color:"#555"},children:"Загрузка редактора…"})}):null,g&&e(NF,{style:{position:"absolute",top:0,background:"var(--colorBgLayout)",zIndex:100,opacity:.7}})]})})},{Header:HF}=K,{Title:GF}=P,YF=({activeLibraryItem:t,selectedFolder:n})=>{const{t:r}=Nn(),i={[qt]:r("My files"),[Xt]:r("GIF"),[Kt]:r("Stock images"),[Zt]:r("AI image generation")};return e(HF,{className:"actions-header",children:e("div",{className:"header-title-container",children:e(GF,{level:5,className:"header-title",children:t===qt?n:i[t]})})})};
|
|
62
62
|
/*! *****************************************************************************
|
|
63
63
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
64
64
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -73,5 +73,5 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
73
73
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
74
74
|
and limitations under the License.
|
|
75
75
|
***************************************************************************** */
|
|
76
|
-
var qF=function(e,t){return qF=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},qF(e,t)};var XF=function(){return XF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},XF.apply(this,arguments)};var KF="Pixel",ZF="Percent",JF={unit:ZF,value:.8};function QF(e){return"number"==typeof e?{unit:ZF,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:KF,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:ZF,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),JF):(console.warn("scrollThreshold should be string or number"),JF)}var eP=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"==typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),n.currentY-n.startY>1.5*n.maxPullDownDistance||n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")})},n.onScrollListener=function(e){"function"==typeof n.props.onScroll&&setTimeout(function(){return n.props.onScroll&&n.props.onScroll(e)},0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,r){var i,o=!1,a=0;function s(){i&&clearTimeout(i)}function l(){var l=this,c=Date.now()-a,u=arguments;function d(){a=Date.now(),n.apply(l,u)}o||(r&&!i&&d(),s(),void 0===r&&c>e?d():!0!==t&&(i=setTimeout(r?function(){i=void 0}:d,void 0===r?e-c:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){s(),o=!0},l}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}qF(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?XF(XF({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=QF(t);return r.unit===KF?e.scrollTop<=r.value+n-e.scrollHeight+1:e.scrollTop<=r.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=QF(t);return r.unit===KF?e.scrollTop+n>=e.scrollHeight-r.value:e.scrollTop+n>=r.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=XF({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),r=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return i.createElement("div",{style:r,className:"infinite-scroll-component__outerdiv"},i.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&i.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},i.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(_);function tP(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function nP(){return nP=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nP.apply(this,arguments)}function rP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rP(Object(n),!0).forEach(function(t){oP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const aP={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0};class sP extends i.Component{constructor(e){let t;super(e),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this),t=this.props.breakpointCols&&this.props.breakpointCols.default?this.props.breakpointCols.default:parseInt(this.props.breakpointCols)||2,this.state={columnCount:t}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){window&&window.requestAnimationFrame?(window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame(()=>{this.reCalculateColumnCount()})):this.reCalculateColumnCount()}reCalculateColumnCount(){const e=window&&window.innerWidth||1/0;let t=this.props.breakpointCols;"object"!=typeof t&&(t={default:parseInt(t)||2});let n=1/0,r=t.default||2;for(let i in t){const o=parseInt(i);o>0&&e<=o&&o<n&&(n=o,r=t[i])}r=Math.max(1,parseInt(r)||1),this.state.columnCount!==r&&this.setState({columnCount:r})}itemsInColumns(){const e=this.state.columnCount,t=new Array(e),n=i.Children.toArray(this.props.children);for(let r=0;r<n.length;r++){const i=r%e;t[i]||(t[i]=[]),t[i].push(n[r])}return t}renderColumns(){const{column:e,columnAttrs:t={},columnClassName:n}=this.props,r=this.itemsInColumns(),o=100/r.length+"%";let a=n;a&&"string"!=typeof a&&(this.logDeprecated('The property "columnClassName" requires a string'),void 0===a&&(a="my-masonry-grid_column"));const s=iP(iP(iP({},e),t),{},{style:iP(iP({},t.style),{},{width:o}),className:a});return r.map((e,t)=>i.createElement("div",nP({},s,{key:t}),e))}logDeprecated(e){console.error("[Masonry]",e)}render(){const e=this.props,{children:t,breakpointCols:n,columnClassName:r,columnAttrs:o,column:a,className:s}=e,l=tP(e,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let c=s;return"string"!=typeof s&&(this.logDeprecated('The property "className" requires a string'),void 0===s&&(c="my-masonry-grid")),i.createElement("div",nP({},l,{className:c}),this.renderColumns())}}sP.defaultProps=aP;var lP={gifTab:"gifTab",scrollableDiv:"scrollableDiv",gifSearchInput:"gifSearchInput",search:"search",searchResults:"searchResults",myMasonryGrid:"myMasonryGrid",myMasonryGridColumn:"myMasonryGridColumn",listItem:"listItem",loaded:"loaded",loadedImage:"loadedImage",searchOutputWrapper:"searchOutputWrapper",divider:"divider",resultsContainer:"resultsContainer",playButton:"playButton",title:"title",subtitle:"subtitle",noFiles:"noFiles"};const cP={default:4,1600:3,1100:2,700:1},uP=({setImageGifList:r,imageGifList:i=[],currentReqGif:s,setCurrentReqGif:l,inputRef:c,customRequest:u})=>{const{t:d}=Nn(),{GifPlayIcon:h}=ro(),{options:f}=ui(),{config:p}=f,[g,m]=o(null),[v,y]=o(!1),[b,w]=o(25),[x,C]=o(null),_=async function({query:e,page:t}){const n=e.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g,"").replace(/[\s_-]+/g," ");try{const e=`https://api.giphy.com/v1/gifs/search?api_key=${null==p?void 0:p.REACT_APP_GIPHY_KEY}&q=${n}&limit=25&offset=${t}&lang=en`,r=await fetch(e);return{data:await r.json()}}catch(e){console.warn(e)}},S=async()=>{var e,t;const n=await _({query:s,page:0});(null===(t=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.data)||void 0===t?void 0:t.length)&&n.data.data.length>0&&r(n.data.data)};return a(()=>()=>{x&&clearTimeout(x)},[x]),e("div",{className:lP.gifTab,children:e("div",{className:lP.searchOutputWrapper,children:t("div",{id:"scrollableDiv",className:lP.scrollableDiv,children:[t(T,{onValuesChange:e=>{if(void 0!==e.keywords){l(t=>Object.assign(Object.assign({},t),{keywords:e.keywords})),x&&clearTimeout(x);const t=setTimeout(S,800);C(t)}},className:i.length>0?lP.searchResults:lP.search,children:[e(T.Item,{name:"keywords",className:lP.gifSearchInput,children:e(O,{onKeyDown:e=>"Space"===e.code&&S(),onPressEnter:e=>S(),allowClear:!0,placeholder:d("Search GIFs"),ref:c,spellCheck:"false",prefix:e(ti,{size:16,strokeWidth:null==p?void 0:p.iconStrokeWidth,onClick:S})})}),i.length>0&&!v&&e("div",{className:`ant-divider ${lP.divider}`,role:"separator"})]}),!i.length&&!v&&e(n,{children:s.keywords?e("div",{className:lP.noFiles,children:d("There are no files for your request.")}):t("div",{className:lP.resultsContainer,children:[e("div",{className:lP.videoIcon,children:e(h,{className:lP.playButton})}),e("h1",{className:lP.title,children:d("Over 350,000 live images")}),e("p",{className:lP.subtitle,children:d("Enter a search query and we'll find the perfect image for you")})]})}),!i.length&&v&&e(NF,{}),i.length>0&&e(eP,{dataLength:i&&i.length,next:async()=>{v||(y(!0),_({query:s,page:b}).then(e=>{e&&e.data&&e.data.data&&r(t=>[...t,...e.data.data]),y(!1),w(e=>e+25)}).catch(()=>{y(!1)}))},hasMore:!!i,endMessage:t(X,{plain:!0,children:[d("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:e(NF,{}),children:e(sP,{breakpointCols:cP,className:lP.myMasonryGrid,columnClassName:lP.myMasonryGridColumn,children:i.map((n,r)=>t("div",{className:lP.listItem,onClick:()=>((e,t)=>{m(t),setTimeout(()=>{m(null)},2e3),u(e)})(n.images.downsized.url,n.id),children:[e("img",{className:g===n.id?lP.loadedImage:"",width:"100%",src:`${n.images.downsized.url}`,alt:n.title,onLoad:e=>{const t=e.target.parentNode;t&&t instanceof HTMLElement&&t.classList.add(lP.loaded)}}),e("a",{rel:"noreferrer",href:"https://giphy.com/",target:"_blank",onClick:e=>e.stopPropagation()}),g===n.id&&e(k,{className:lP.antSpin})]},n.id+r))})})]})})})};var dP={stockTab:"stockTab",stockSearchInput:"stockSearchInput",searchOutputWrapper:"searchOutputWrapper",divider:"divider",search:"search",searchResults:"searchResults",scrollableDiv:"scrollableDiv",myMasonryGrid:"myMasonryGrid",myMasonryGridColumn:"myMasonryGridColumn",listItem:"listItem",loaded:"loaded",loadedImage:"loadedImage",creatorInfo:"creatorInfo",stockColorFilter:"stockColorFilter",allColors:"allColors",blackColor:"blackColor",bwColor:"bwColor",whiteColor:"whiteColor",orangeColor:"orangeColor",redColor:"redColor",purpleColor:"purpleColor",magentaColor:"magentaColor",greenColor:"greenColor",tealColor:"tealColor",blueColor:"blueColor",resultsContainer:"resultsContainer",playButton:"playButton",title:"title",subtitle:"subtitle",noFiles:"noFiles"};const hP={default:4,1600:3,1100:2,700:1},fP=({imageStockList:r,setImageStockList:i,currentReq:s,setCurrentReq:l,inputRef:c,customRequest:d})=>{var h;const{t:f}=Nn(),{StockBigIcon:p,MixedViewIcon:g,LandscapeViewIcon:m,PortraitViewIcon:v,SquareViewIcon:y}=ro(),{options:b}=ui(),{config:w}=b,[x,C]=o(!1),[_,S]=o(2),[A,E]=o(null),[I,F]=o(null),[P,M]=o(!0),[R]=T.useForm(),j=u(s);a(()=>{j.current=s},[s]),a(()=>{0===r.length&&R.setFieldsValue({color:"",orientation:""})},[r,R]);const D=async function({query:e,page:t}){const n=e.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g,"").replace(/[\s_-]+/g," ");try{let r=`https://api.unsplash.com/search/photos?client_id=${null==w?void 0:w.UNSPLASH_KEY}&lang=ru&per_page=18&query=${n}&page=${t}`;""!==e.color&&(r+=`&color=${e.color}`),""!==e.orientation&&(r+=`&orientation=${e.orientation}`);const i=await fetch(r);return{data:await i.json()}}catch(e){console.warn(e)}finally{C(!1)}},N=async()=>{var e,t,n;C(!0);const r=await D({query:j.current,page:1});(null===(e=null==r?void 0:r.data)||void 0===e?void 0:e.results)&&(i(r.data.results),M(18===r.data.results.length),(null===(n=null===(t=null==r?void 0:r.data)||void 0===t?void 0:t.results)||void 0===n?void 0:n.length)&&r.data.results.length>0&&S(2))};a(()=>()=>{I&&clearTimeout(I)},[I]);const z=(e,t,n)=>{!async function(e){try{const t=await fetch(`${e}&client_id=${null==w?void 0:w.UNSPLASH_KEY}`);return{data:await t.json()}}catch(e){console.warn(e)}}(t.download_location),E(n),setTimeout(()=>E(null),2e3),d(`${e.raw}&w=1200&q=96`)};return e("div",{className:dP.stockTab,children:e("div",{className:dP.searchOutputWrapper,children:t("div",{className:dP.scrollableDiv,id:"scrollableDiv",children:[t(T,{form:R,initialValues:sn,onValuesChange:(e,t)=>{if(l(Object.assign(Object.assign({},sn),t)),I&&clearTimeout(I),""!==t.keywords){const e=setTimeout(N,800);F(e)}else r.length||(l(Object.assign({},sn)),R.resetFields())},className:r.length>0?dP.searchResults:dP.search,children:[t($,{gutter:24,children:[e(W,{span:r.length>0?void 0:24,children:e(T.Item,{name:"keywords",className:dP.stockSearchInput,children:e(O,{allowClear:!0,placeholder:f("Search image"),ref:c,spellCheck:"false",prefix:e(ti,{size:16,strokeWidth:null==w?void 0:w.iconStrokeWidth})})})}),!!r.length&&t(n,{children:[e(W,{children:e(T.Item,{name:"orientation",children:t(Z.Group,{onChange:e=>l(t=>Object.assign(Object.assign({},t),{orientation:e.target.value})),children:[e(L,{title:f("All"),placement:"top",children:e(Z.Button,{value:"",children:e(g,{})})}),e(L,{title:f("Landscape"),placement:"top",children:e(Z.Button,{value:"landscape",children:e(m,{})})}),e(L,{title:f("Portrait"),placement:"top",children:e(Z.Button,{value:"portrait",children:e(v,{})})}),e(L,{title:f("Squarish"),placement:"top",children:e(Z.Button,{value:"squarish",children:e(y,{})})})]})})}),e(W,{children:e(T.Item,{name:"color",children:t(Z.Group,{className:dP.stockColorFilter,onChange:e=>l(t=>Object.assign(Object.assign({},t),{color:e.target.value})),children:[e(L,{title:f("All"),placement:"top",children:e(Z.Button,{className:dP.allColors,value:"",children:"All"})}),e(L,{title:f("Black"),placement:"top",children:e(Z.Button,{className:dP.blackColor,value:"black",children:"B"})}),e(L,{title:f("Black and White"),placement:"top",children:e(Z.Button,{className:dP.bwColor,value:"black_and_white",children:"B&W"})}),e(L,{title:f("White"),placement:"top",children:e(Z.Button,{className:dP.whiteColor,value:"white",children:"W"})}),e(L,{title:f("Orange"),placement:"top",children:e(Z.Button,{className:dP.orangeColor,value:"orange",children:"O"})}),e(L,{title:f("Red"),placement:"top",children:e(Z.Button,{className:dP.redColor,value:"red",children:"R"})}),e(L,{title:f("Purple"),placement:"top",children:e(Z.Button,{className:dP.purpleColor,value:"purple",children:"P"})}),e(L,{title:f("Magenta"),placement:"top",children:e(Z.Button,{className:dP.magentaColor,value:"magenta",children:"M"})}),e(L,{title:f("Green"),placement:"top",children:e(Z.Button,{className:dP.greenColor,value:"green",children:"G"})}),e(L,{title:f("Teal"),placement:"top",children:e(Z.Button,{className:dP.tealColor,value:"teal",children:"T"})}),e(L,{title:f("Blue"),placement:"top",children:e(Z.Button,{className:dP.blueColor,value:"blue",children:"B"})})]})})})]})]}),r.length>0&&!x&&e("div",{className:`ant-divider ${dP.divider}`,role:"separator"})]}),!r.length&&!x&&e(n,{children:s.keywords?e("div",{className:dP.noFiles,children:f("There are no files for your request.")}):t("div",{className:dP.resultsContainer,children:[e("div",{className:dP.videoIcon,children:e(p,{className:dP.playButton})}),e("h1",{className:dP.title,children:f("Millions of free stock images")}),e("p",{className:dP.subtitle,children:f("Enter a search query and we'll find the perfect image for you")})]})}),!r.length&&x&&e(NF,{}),r.length>0&&e(eP,{dataLength:r&&r.length,next:async()=>{if(x||""===j.current.keywords)return C(!1),void(""===j.current.keywords&&M(!1));C(!0),D({query:j.current,page:_}).then(e=>{e&&e.data&&e.data.results&&(i(t=>[...t,...e.data.results]),M(18===e.data.results.length)),S(e=>e+1)}).catch(e=>{console.warn("catch",e)}).finally(()=>{C(!1)})},hasMore:P&&""!==(null===(h=j.current)||void 0===h?void 0:h.keywords),endMessage:t(X,{plain:!0,children:[f("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:e(NF,{}),children:e(sP,{breakpointCols:hP,className:dP.myMasonryGrid,columnClassName:dP.myMasonryGridColumn,children:r.map((n,r)=>t("div",{className:dP.listItem,onClick:()=>z(n.urls,n.links,n.id),children:[e("img",{className:A===n.id?dP.loadedImage:"",width:"100%",src:`${n.urls.raw}&w=644&q=96`,alt:n.description,onLoad:e=>{const t=e.target.parentNode;t&&t instanceof HTMLElement&&t.classList.add(dP.loaded)}}),t("p",{className:dP.creatorInfo,onClick:e=>e.stopPropagation(),children:[f("Photo by")," ",e("a",{target:"_blank",href:`${n.user.links.html}?utm_source=${null==w?void 0:w.APP_NAME_UNSPLASH}&utm_medium=referral`,rel:"noreferrer",children:n.user.name})," ",f("on")," ",e("a",{target:"_blank",href:`https://unsplash.com/?utm_source=${null==w?void 0:w.APP_NAME_UNSPLASH}&utm_medium=referral`,rel:"noreferrer",children:"Unsplash"})]}),A===n.id&&e(k,{className:dP.antSpin})]},n.id+r))})})]})})})},pP=()=>{const{options:e}=ui(),t=e.config;return c((e,n)=>{!1!==(null==t?void 0:t.pushToGTM)&&((e,t)=>{const n=()=>{try{const t=Object.assign(Object.assign({},e),{appLabel:"blocks_app"});window.dataLayer&&"function"==typeof window.dataLayer.push?window.dataLayer.push(t):console.log("Attempting to add to the dataLayer:",e)}catch(e){console.error("Ошибка при вызове GTM:",e)}};t?setTimeout(n,t):n()})(e,n)},[null==t?void 0:t.pushToGTM])};var gP="slideshowContainer",mP="slideshowImage";const vP=({images:t,transitionDuration:n=1e3,frameHeight:r})=>{const[i,s]=o([]),l=()=>{s(e=>e.map((t,n)=>n===e.length-1?Object.assign(Object.assign({},t),{opacity:1}):t))};return a(()=>{if(t.length>0){const e=t[t.length-1];s(t=>[...t,{src:e,opacity:0}]),setTimeout(l,1e3)}else s([])},[t]),e("div",{className:gP,style:{height:600,minHeight:130},children:i.map((t,r)=>e("img",{src:`data:image/jpeg;base64, ${t.src}`,alt:`Slide ${r+1}`,className:mP,style:{opacity:t.opacity,transition:`opacity ${n}ms linear`,display:"block"}},r))})};"function"==typeof SuppressedError&&SuppressedError;const yP=t=>{var{className:n,style:r,color:i,text:o,bordered:a}=t,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["className","style","color","text","bordered"]);const l=o||"";return e(J,Object.assign({style:r,color:i,bordered:a,className:n},s,{children:l}))},bP=({text:n,counter:r,limits:i,wrapperStyles:o})=>{const{t:a}=Nn(),{options:s}=ui(),l=s.config,{token:c}=A.useToken(),u=+i>0,d=!u||r<+i,h=(null==l?void 0:l.billingPageUrl)||"/billing",f=r+" "+a("of")+" "+(u?i:"∞")+" "+(n||a("tests",{count:i}))+" "+a("was used",{count:r});return t("div",{className:"limits-couter-wrapper",style:o,children:[e(yP,{bordered:!1,text:f,className:"limit-counter",style:{color:d?c.colorText:"white"},color:d?c.colorFillSecondary:"rgb(255, 77, 79)"}),u&&e("div",{style:{fontSize:14,textDecoration:"underline",cursor:"pointer"},onClick:()=>window.location.assign(h),children:a("Need more?")})]})};var wP={imageAi:"imageAi",imageItem:"imageItem",textAreaInputHybrid:"textAreaInputHybrid",loading:"loading",carousel:"carousel",arrow:"arrow",arrowNext:"arrowNext",arrowPrev:"arrowPrev",arrowBtn:"arrowBtn",arrowBtnNext:"arrowBtnNext",arrowBtnPrev:"arrowBtnPrev",row:"row",inputAffixWrapper:"inputAffixWrapper",textarea:"textarea",inputIcon:"inputIcon"};const xP=f(({className:t,onClick:n})=>e("div",{className:`${wP.arrow} ${wP.arrowNext} ${t||""}`,onClick:n,children:e(D,{className:`${wP.arrowBtn} ${wP.arrowBtnNext}`,size:"large",icon:e(ve,{})})}));xP.displayName="SampleNextArrow";const CP=f(({className:t,onClick:n})=>e("div",{className:`${wP.arrow} ${wP.arrowPrev} ${t||""}`,onClick:n,children:e(D,{className:`${wP.arrowBtn} ${wP.arrowBtnPrev}`,size:"large",icon:e(ye,{})})}));CP.displayName="SamplePrevArrow";const _P=({customRequest:n,aiTabRef:r,inputAiRef:i,isImageUploaded:s,setIsImageUploaded:l,aiImageRequest:u,setAiImageRequest:h,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:m})=>{const{t:v}=Nn(),{AiIcon_2:y}=ro(),[b,w]=o("auto"),{aiImageCounter:x,currentAiImgLimits:C,loadingDuringGeneration:_,requestStatus:S,handleGenerate:k,convertBase64ToFile:A,isShiftPressed:E,setIsShiftPressed:I,limitsInPlugin:F}=function({setFrameHeight:e,customRequest:t,aiTabRef:n,isImageUploaded:r,setIsImageUploaded:i,aiImageRequest:s,imageAiList:l,setImageAiList:u,isLoadingAi:h,setIsLoadingAi:f}){const{t:p}=Nn(),{options:g}=ui(),m=g.config,v=gi(),y=pP(),{messages:b}=g.config,[w,x]=o([]),[C,_]=o(0),[S,k]=o(null),[A,E]=o(!1),[I,T]=o(p("Evaluating the task")),[O,F]=o(!1);a(()=>{x(b)},[b]),a(()=>{l.length||S||x([])},[l,S]);const P=d(()=>m&&"function"==typeof(null==m?void 0:m.sendAIImageRequest)?null==m?void 0:m.sendAIImageRequest:()=>Promise.resolve({}),[m]),M=c(e=>{if("error"!==e.status&&"Canceled"!==e.status){if(e.images){if(T(String(e.status)),100===e.progress){f(!1),u(e.images);const t=S,n=Array.isArray(e.images)?e.images:[];n.length>0&&v.success({id:"AI_IMAGE_GENERERATION_SUCCESS",message:p("Images generated successfully"),placement:"bottomRight",data:{request:s,taskId:t,images:n}}),k(null),F(!1)}}else if(u([String(e.data)]),100===e.progress){f(!1);const t=S,n=e.data?[String(e.data)]:[];n.length>0&&v.success({id:"AI_IMAGE_GENERERATION_SUCCESS",message:p("Images generated successfully"),placement:"bottomRight",data:{request:s,taskId:t,images:n}}),k(null),F(!1)}}else f(!1),F(!1),v.error({id:"AI_RESPONSE_INVALID",message:p("Something went wrong, please try again"),placement:"bottomRight",description:String(S)||void 0,data:{requestId:S,request:s,response:e},innerException:e})},[s,u,T,p,f,S,v,F]);a(()=>{w.length>1&&M(w[w.length-1])},[M,w]);const R=d(()=>{if(m&&"function"==typeof(null==m?void 0:m.sseQuery)){const e=null==m?void 0:m.sseQuery;return t=>e(t)}return e=>{}},[m]),L=d(()=>m&&"object"==typeof(null==m?void 0:m.handleLimitUsageEmitter)?null==m?void 0:m.handleLimitUsageEmitter:{fire:()=>{}},[m]),j=null==m?void 0:m.elementId,{projectId:D}=m,{limits:N}=(null==m?void 0:m.limits)?m:{limits:{ai_img_limit:0}},{ai_img_limit:z}=N,B=z>0&&C>=z,V=!(!(null==m?void 0:m.limits)||!m.counters)&&rn,U=c(()=>{L.fire({name:"AiImgCount",count:C+1})},[L,C]),$=d(()=>!B&&!V,[B,V,C,z]),W=c(async()=>{T(p("Evaluating the task")),""===s||h||(f(!0),F(!0),u([]),y({event:"submit_form",action:"ai_image_generation",entity_id:j,project_id:D}),P({body:{project_id:D,request:"create-image",connection:"midjourney",message:s}}).then(e=>{var t,n,r,i,o;const{data:a,error:l}=e||{};if(l)throw l;const c=a;if(401===(null==c?void 0:c.status)||401===(null===(t=null==c?void 0:c.data)||void 0===t?void 0:t.status))throw new Error("ERROR");const u=(null==c?void 0:c.task)||(null===(n=null==c?void 0:c.data)||void 0===n?void 0:n.task),d=null!==(i=null!==(r=null==u?void 0:u.id)&&void 0!==r?r:S)&&void 0!==i?i:void 0;200===(null==c?void 0:c.status)||200===(null===(o=null==c?void 0:c.data)||void 0===o?void 0:o.status)?((null==u?void 0:u.id)&&(T(u.message),k(u.id)),(null==c?void 0:c.message)&&v.success({id:"AI_IMAGE_GENERATION_STARTED",message:c.message,placement:"bottomRight",description:s,data:{request:s,taskId:d,response:null==c?void 0:c.data}}),R({task_id:null==u?void 0:u.id,entity_id:j})):(f(!1),F(!1),v.error({id:"AI_IMAGE_GENERATION_FAILED",message:(null==c?void 0:c.message)||p("Something went wrong, please try again"),placement:"bottomRight",description:s,data:{request:s,taskId:d,response:c},innerException:c}))}).catch(e=>{f(!1),F(!1);const t=e;return((null==t?void 0:t.error)||(null==t?void 0:t.data))&&(null==v||v.error({id:"AI_IMAGE_GENERATION_FAILED",message:p("Something went wrong, please try again"),placement:"bottomRight",description:s,innerException:e,data:{request:s,taskId:S,response:null==t?void 0:t.data,error:null==t?void 0:t.error}})),t}))},[s,h,f,F,u,y,j,D,P,v,R,p,S]),H=c(()=>{$&&W()},[$,V,_,U,W,v,p]);a(()=>{},[m,V]);const G=c(e=>{if(!r){i(!0);const n=e.match(/^data:image\/([A-Za-z-+/]+);base64,(.+)$/);if(!n)return;const r=n[1],o=n[2],a=atob(o),s=new Array(a.length);for(let e=0;e<a.length;e++)s[e]=a.charCodeAt(e);const l=new Uint8Array(s),c=new Blob([l],{type:`image/${r}`}),u=new File([c],"image.jpeg",{type:c.type,lastModified:Date.now()});t({file:u})}},[r,i,t]);return a(()=>{(h||l.length>0)&&setTimeout(()=>{let t=350;n.current&&(t=n.current.offsetHeight-120),e(t)},0)},[n,l.length,h,e]),{aiImageCounter:C,setAiImageCounter:_,currentAiImgLimits:z,isFieldsDisabled:B,canGenerateImage:$,aiImageRequest:s,imageAiList:l,setImageAiList:u,isLoadingAi:h,setIsLoadingAi:f,loadingDuringGeneration:O,setLoadingDuringGeneration:F,requestStatus:I,setRequestStatus:T,handleGenerate:H,handleLimitAiImgCount:U,convertBase64ToFile:G,isShiftPressed:A,setIsShiftPressed:E,currentReqId:S,setCurrentReqId:k,limitsInPlugin:V}}({setFrameHeight:w,customRequest:n,aiTabRef:r,isImageUploaded:s,setIsImageUploaded:l,aiImageRequest:u,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:m}),[P,M]=o(!1),R=c(()=>M(!0),[]),L=c(()=>M(!1),[]),j=c(e=>h(e.target.value),[h]),N=c(e=>{"Shift"===e.key?I(!0):"Enter"!==e.key||E||(e.preventDefault(),k())},[E,k,I]),z=c(e=>{"Shift"===e.key&&I(!1)},[I]);return t("div",{className:wP.imageAi,children:[F&&e(bP,{text:"images",counter:x,limits:C,wrapperStyles:{marginTop:-25}}),e($,{gutter:24,className:wP.row,children:e(W,{span:24,children:e(T.Item,{children:t("span",{className:`ant-input-affix-wrapper ant-input-affix-wrapper-lg ${wP.inputAffixWrapper}${P?" ant-input-affix-wrapper-focused":""}`,children:[e(O.TextArea,{ref:i,onKeyDown:N,onKeyUp:z,onFocus:R,onBlur:L,autoSize:!0,allowClear:!0,className:`${wP.textAreaInputHybrid} ${wP.textarea}`,placeholder:"Generate image",value:u,onChange:j,spellCheck:"false"}),e("span",{className:`ant-input-suffix ${wP.inputSuffix}`,children:g||_?e(re,{className:`${wP.inputIcon} input-icon`,spin:!0}):e(y,{className:`${wP.inputIcon} input-icon`,onClick:k})})]})})})}),(g||f.length>0)&&t(Q,{dotPosition:"top",arrows:!0,nextArrow:e(xP,{}),prevArrow:e(CP,{}),className:wP.carousel,infinite:!1,children:[g&&!f.length&&e("div",{className:wP.loading,children:t("div",{className:"spin",children:[e(re,{style:{fontSize:48},spin:!0}),e("p",{className:"status",children:S})]})}),f.length>0&&f.map((n,r)=>t("div",{className:wP.imageItem,children:[e(vP,{images:f,frameHeight:b}),e("div",{className:"buttons",children:f.length>0&&!g&&e(D,{onClick:()=>A(`data:image/jpeg;base64, ${n}`),icon:e(be,{}),children:v("Use this variant")})})]},r))]})]})},SP=e=>{(null==e?void 0:e.customTheme)&&((e={})=>{const t=document.querySelector("head");if(!t)return;const n=document.createElement("style");if(n.type="text/css",n.dataset.themeVariablesFm="true",n.setAttribute("data-file-manager","true"),Object.entries(e).length){let r="";Object.entries(e).forEach(([e,t])=>{"object"!=typeof t&&(r+=`\t--${e}: ${t};\n`)}),r=`.em-filemanager {\n${r}}`,n.appendChild(document.createTextNode(r));const i=t.querySelector('[data-theme-variables-fm="true"]');i?t.replaceChild(n,i):t.insertBefore(n,t.firstChild)}})(null==e?void 0:e.customTheme)},{Sider:kP,Content:AP}=K,EP=({itemIds:t,onUndo:n,onClose:r})=>{const{t:i}=Nn();return a(()=>{const e=setTimeout(()=>r(),5e3);return()=>clearTimeout(e)},[r]),e("div",{style:{position:"fixed",bottom:24,right:24,maxWidth:420,zIndex:1e3},children:e(ee,{message:i("moved_to_trash",{count:t.length}),type:"success",showIcon:!0,action:e(D,{size:"small",type:"text",onClick:()=>n(),children:i("undo")}),closable:!0,onClose:r})})},IP={keywords:""},TP=()=>{var s;const l=bi(),d=xi(),h=(()=>{var e,t;const{state:n,actions:r,options:i}=ui(),{selectedFolder:o,pathHistory:a,folders:s}=n,{t:l}=Nn(),{setSelectedFolder:u,setPathHistory:d}=r,h=c(()=>{var e;return`em_fm:lastFolder:${(null===(e=null==i?void 0:i.config)||void 0===e?void 0:e.projectId)||"default"}`},[null===(e=null==i?void 0:i.config)||void 0===e?void 0:e.projectId]),f=c((e,t=new Set)=>{if(t.has(e))return console.warn(`Обнаружен цикл в пути к папке с id=${e}`),[];const n=(Array.isArray(s)?s:[]).find(t=>t.id===e);if(!n)return[];const r=new Set(t);return r.add(e),n.parentId?n.parentId===n.id?(console.warn(`Обнаружена циклическая зависимость: папка ${n.id} является родителем самой себя`),[{id:n.id,name:n.name+" (ошибка)"}]):[...f(n.parentId,r),{id:n.id,name:n.name}]:[{id:n.id,name:n.name}]},[s]),p=c(e=>{var t;if("undefined"==typeof window)return;const n=!1!==(null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.rememberLastFolder),r=h();try{if(!n)return void localStorage.removeItem(r);e?localStorage.setItem(r,e):localStorage.removeItem(r)}catch(e){console.warn("localStorage недоступен для сохранения последней папки")}},[h,null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.rememberLastFolder]),g=c(e=>{if("folders"===e){const e=[{id:"folders",name:l("Folders")}];return null==d||d(e),void(i.onPathChange&&i.onPathChange([]))}if(!(Array.isArray(s)?s:[]).find(t=>t.id===e))return void console.warn("⚠️ Папка не найдена:",e);const t=f(e),n=[{id:"folders",name:l("Folders")},...t];null==d||d(n),i.onPathChange&&i.onPathChange(n.map(e=>e.name))},[s,f,d,i,l]),m=c(e=>{const t="folders"===e?null:e;t!==o&&(null==u||u(t),p(t),g(e))},[p,o,u,g]),v=c(e=>{if(-1===e)null==u||u(null),null==d||d([{id:"folders",name:l("Folders")}]),i.onPathChange&&i.onPathChange([]);else{const t=a.slice(0,e+1),n=t[t.length-1],r="folders"===n.id?void 0:n.id;null==u||u(r||null),null==d||d(t),i.onPathChange&&i.onPathChange(t.map(e=>e.name))}},[i,a,d,u,l]),y=c(e=>{if(!e.isFolder)return;null==u||u(e.id);const t={id:e.id,name:e.name};if(d){const e=[...a,t];d(e)}if(i.onPathChange){const t=[...a.map(e=>e.name),e.name];i.onPathChange(t)}},[i,a,d,u]);return{state:{selectedFolder:o,pathHistory:a},actions:{handleFolderSelect:m,handleBreadcrumbClick:v,handleItemClick:y},selectedFolder:o,pathHistory:a,handleFolderSelect:m,handleBreadcrumbClick:v,handleItemClick:y}})(),f=(()=>{const{state:e,actions:t}=ui(),{pagination:n}=e,{setPagination:r}=t,i=c((e,t)=>{const i=t||n.pageSize;null==r||r({current:e,pageSize:i,total:n.total})},[n.pageSize,n.total,r]);return{state:{pagination:n},actions:{handlePaginationChange:i}}})(),p=(()=>{const[e,t]=r.useState(()=>{const e=localStorage.getItem(Ci);return e?Math.max(290,parseInt(e,10)):298}),[n,i]=r.useState(!1),[o,a]=r.useState(!1),[s,l]=r.useState(0),c=r.useCallback(()=>{console.log("Double click: Resetting to default width"),t(298),localStorage.setItem(Ci,298..toString())},[]),u=r.useCallback(n=>{n.preventDefault(),n.stopPropagation(),i(!0),document.body.classList.add("resizing");const r=n.clientX,o=e;let s=o;const c=e=>{e.preventDefault();const n=Math.max(Math.min(o+e.clientX-r,600),290);s=n,t(n),l(e.clientX),a(!0)},u=()=>{i(!1),document.body.classList.remove("resizing"),a(!1),localStorage.setItem(Ci,s.toString()),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)},[e]);return r.useEffect(()=>()=>{document.body.classList.remove("resizing")},[]),{sidebarWidth:e,isResizing:n,showResizeGuide:o,resizeGuidePosition:s,handleResizeStart:u,handleDoubleClick:c}})(),g=(()=>{const[e,t]=o([]),[n,r]=o(!1),[i,a]=o(!1),s=u(0),l=c(()=>(s.current+=1,`upload_${s.current}_${Date.now()}`),[]),d=c(e=>`${(e.size/1024).toFixed(2)} КБ`,[]),h=c(e=>{const n=e.map(e=>({id:l(),name:e.name,size:d(e),status:"uploading",progress:0}));return t(n),r(!0),a(!1),n.map(e=>e.id)},[l,d]),f=c((e,n)=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{progress:Math.min(100,Math.max(0,n))}):t))},[]),p=c(e=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{status:"success",progress:100}):t))},[]),g=c((e,n)=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{status:"error",error:n}):t))},[]),m=c(()=>{r(!1),a(!1),setTimeout(()=>{t([])},300)},[]),v=c(()=>{a(e=>!e)},[]),y=c(e=>{t(t=>{const n=t.filter(t=>t.id!==e);return 0===n.length&&setTimeout(()=>{r(!1),a(!1)},100),n})},[]),b=e.length,w=e.filter(e=>"success"===e.status||"error"===e.status).length;return{uploadFiles:e,isUploadVisible:n,isUploadMinimized:i,totalFiles:b,completedFiles:w,startUpload:h,updateProgress:f,markAsSuccess:p,markAsError:g,closeUpload:m,minimizeUpload:v,insertFile:y}})(),m=wi(),{t:v}=Nn(),y=i.useRef(null),{folders:b,loading:w}=l.state,{fetchFolders:x,fetchChildFolders:C,handleCreateFolder:_,handleModalOk:S,handleModalCancel:k,generateMenuItems:A}=l.actions,E=(e=>{var t;const{state:n,actions:r,options:i}=ui(),{t:o}=Nn(),a=gi(),{folders:s,folderToRename:l,renameFolderForm:u,isRenameFolderModalVisible:d}=n,{setFolderToRename:h,setIsRenameFolderModalVisible:f}=r,{apiEndpoints:p,dataProviders:g,config:m}=i,v=c(e=>{null==h||h(e),null==f||f(!0);const t=null==s?void 0:s.find(t=>t.id===e);t&&u&&u.setFieldsValue({newFolderName:t.name})},[h,f,s,u]),y=c(()=>{null==f||f(!1),null==h||h(null),null==u||u.resetFields()},[f,h,u]),b=c(async()=>{var t,n;if(l&&u)try{const i=await u.validateFields();if(!(null==i?void 0:i.newFolderName))return void a.warning({id:"FOLDER_OPERATION_VALIDATION_FAILED",message:o("Folder name cannot be empty"),placement:"bottomRight",data:{folderId:l,folderName:null==i?void 0:i.newFolderName,reason:"emptyName"}});if(!1===(null===(t=null==m?void 0:m.features)||void 0===t?void 0:t.enableRenameFolder))return void a.error({id:"FOLDER_RENAME_DISABLED_BY_CONFIG",message:o("Folder rename is disabled by config"),placement:"bottomRight",data:{itemId:null!=l?l:void 0,itemName:null==i?void 0:i.newFolderName}});if(!(null==g?void 0:g.renameFolder))throw new Error("renameFolder не реализован в dataProviders");const s=await g.renameFolder(l,i.newFolderName.trim());if(!(null==s?void 0:s.id))return void a.error({id:"FOLDER_RENAME_FAILED",message:o("Unexpected response when renaming folder"),placement:"bottomRight",data:{itemId:null!=l?l:void 0,itemName:i.newFolderName,reason:"invalidResponse"}});a.success({id:"FOLDER_RENAME_SUCCESS",message:o("Folder renamed"),placement:"bottomRight",data:{itemId:s.id,itemName:s.name,folderId:null!==(n=s.parentId)&&void 0!==n?n:null}}),y(),await e(),l!==s.id&&r.setSelectedFolder&&r.setSelectedFolder(s.id)}catch(e){console.error("Ошибка при переименовании папки:",e),a.error({id:"FOLDER_RENAME_FAILED",message:o("Failed to rename folder"),placement:"bottomRight",innerException:e,data:{itemId:null!=l?l:void 0,itemName:null==u?void 0:u.getFieldValue("newFolderName"),reason:e instanceof Error?e.message:String(e)}})}},[l,u,p,y,e,o,null===(t=null==m?void 0:m.features)||void 0===t?void 0:t.enableRenameFolder,a]);return{state:{isRenamingFolder:d||!1,folderToRename:l},actions:{showRenameFolderModal:v,handleRenameFolderCancel:y,handleRenameFolderOk:b}}})(x),{files:I,selectedFiles:T,loading:O,isRenamingFile:F,fileToRename:P}=d.state,{fetchFiles:M,handleDeleteFile:R,handleDeleteFolder:L,handleAddFile:j,handleAddFileByUrl:N,uploadFileWithProvider:z,toggleFileSelection:B,showRenameModal:V,handleRenameCancel:U,handleRenameOk:$,handleDroppedFiles:W,showMoveModal:H,handleMoveCancel:G,handleMoveOk:Y,handleCopyOk:q,handleCopyCancel:Z,showDeleteConfirm:J,handleDeleteConfirmCancel:Q,handleDeleteConfirmOk:ee}=d.actions,{selectedFolder:te,pathHistory:ne}=h.state,{handleFolderSelect:re,handleBreadcrumbClick:ie,handleItemClick:oe}=h.actions,{pagination:ae}=f.state,se=pi(M),{searchTerm:le,sortBy:ce,sortOrder:ue}=se.state,{handleSearch:de,handleSort:he,handlePaginationChange:fe}=se.actions,pe=(({files:e,selectedFiles:t,fetchFiles:n,selectedFolder:i})=>{const o=gi(),{options:a,actions:s,state:l}=r.useContext(ci),{setActiveLibraryItem:c}=s,{activeLibraryItem:u}=l,[d,h]=r.useState(!1),[f,p]=r.useState(null),g=r.useCallback(e=>{var t;if(e.type&&e.type.startsWith("image/"))return!0;if(e.extension){const t=e.extension.toLowerCase();return on.includes(t)}const n=null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase();return!!n&&on.includes(n)},[]),m=r.useCallback(async e=>{var t,n,r,i;const{dataProviders:o}=a;if(console.log("🔧 saveFileToServer: dataProviders доступны:",{hasUpdateFile:!!(null==o?void 0:o.updateFile),hasUploadFile:!!(null==o?void 0:o.uploadFile),hasThumbnail:!!e.thumbnail,fileId:e.id}),!1!==(null===(n=null===(t=a.config)||void 0===t?void 0:t.features)||void 0===n?void 0:n.enableUpdateFile)&&(null==o?void 0:o.updateFile)&&e.thumbnail)try{const t=mn(e.thumbnail,e.type),n=vn(t),r=e.name.substring(0,e.name.lastIndexOf("."))+"."+n,i=xn(e.thumbnail,t);return await o.updateFile(e.id,{name:r,type:t,data:i})}catch(e){return console.error("Ошибка при обновлении файла через updateFile:",e),null}else if((null==o?void 0:o.uploadFile)&&e.thumbnail)try{const t=mn(e.thumbnail,e.type),n=xn(e.thumbnail,t);await o.uploadFile(Object.assign(Object.assign({},e),{type:t,data:n,size:n.size||e.size||0}))}catch(e){return console.error("Ошибка при сохранении файла через uploadFile:",e),null}else if(!1!==(null===(i=null===(r=a.config)||void 0===r?void 0:r.features)||void 0===i?void 0:i.enableRenameFile)&&(null==o?void 0:o.renameFile))try{return await o.renameFile(e.id,e.name)}catch(e){return console.error("Ошибка при переименовании файла:",e),null}return console.warn("DataProvider для обновления файлов не настроен"),null},[a]),v=r.useCallback(n=>{let r;if(console.log("🎨 handleEdit ВЫЗВАНА!",{fileForEdit:n,selectedFilesSize:t.size}),n)console.log("fileForEdit",n),r=n;else{if(1!==t.size)return;const n=Array.from(t)[0];if(r=e.find(e=>e.id===n),!r||r.isFolder||!g(r))return}console.log("🎨 usePixieEditor: Открываем редактор для файла:",r),c&&c(Jt),console.log("🎨 usePixieEditor: Устанавливаем editingFile"),p(r),console.log("🎨 usePixieEditor: Устанавливаем isPixieEditorVisible = true"),h(!0),console.log("🎨 usePixieEditor: Редактор должен открыться")},[t,e,g,h,c]),y=r.useCallback(()=>{console.log("🎨 usePixieEditor: Закрываем редактор"),c&&u===Jt&&c(qt),h(!1),p(null),console.log("🎨 usePixieEditor: Редактор закрыт")},[u,c]),b=r.useCallback(async e=>{var t,r,s,l;console.log("Файл обновлен:",e);try{const s=await m(e);if(s)return o.success({id:"IMAGE_UPDATE_SUCCESS",message:"Успех",description:"Изображение успешно обновлено",placement:"bottomRight",data:{itemId:null!==(t=s.id)&&void 0!==t?t:void 0,itemName:s.name,folderId:null!==(r=s.folderId)&&void 0!==r?r:null,thumbnail:s.thumbnail}}),a.onEditorOk&&a.onEditorOk(s),await n({folderId:i||""}),y(),s}catch(t){console.error("Ошибка при сохранении файла:",t),o.error({id:"IMAGE_SAVE_FAILED",message:"Ошибка",description:`Не удалось сохранить изменения: ${t instanceof Error?t.message:"Неизвестная ошибка"}`,innerException:t,placement:"bottomRight",data:{itemId:null!==(s=e.id)&&void 0!==s?s:void 0,itemName:e.name,folderId:null!==(l=e.folderId)&&void 0!==l?l:null,thumbnail:e.thumbnail}})}},[m,a,n,i,o,y]);return{isPixieEditorVisible:d,editingFile:f,handleEdit:v,handlePixieEditorSave:b,handlePixieEditorClose:y}})({files:I||[],selectedFiles:T||new Set,fetchFiles:M,selectedFolder:te||null}),ge=i.useCallback(async()=>{var e;await ee(),await x(),await(null===(e=y.current)||void 0===e?void 0:e.refreshFileCounts())},[x,ee]),me=i.useCallback(async e=>{var t;await Y(e),await(null===(t=y.current)||void 0===t?void 0:t.refreshFileCounts())},[Y]),ve=i.useCallback(async e=>{var t;await q(e),await(null===(t=y.current)||void 0===t?void 0:t.refreshFileCounts())},[q]),ye=i.useCallback(async()=>{let e=[],t=new Map;await j({onStartBatch:n=>{e=g.startUpload(n),t=new Map(n.map((t,n)=>[t.name,e[n]])),console.warn("🚀 onStartBatch: файлы запущены",{count:n.length,currentIds:e})},onStart:n=>{0===e.length&&(e=g.startUpload([n]),t.set(n.name,e[0]))},onProgress:(e,n)=>{const r=t.get(e);r&&g.updateProgress(r,n)},onComplete:async e=>{var n;const r=t.get(e);r&&g.markAsSuccess(r),await(null===(n=y.current)||void 0===n?void 0:n.refreshFileCounts())},onError:(e,n)=>{const r=t.get(e);r&&g.markAsError(r,n)}})},[j,g]),be=i.useCallback(async(e,t)=>{var n;await N(e,t),await(null===(n=y.current)||void 0===n?void 0:n.refreshFileCounts())},[N]),we=i.useCallback(async({file:e})=>{var t;const n=await z(e);return await(null===(t=y.current)||void 0===t?void 0:t.refreshFileCounts()),n},[z]),xe=i.useCallback(async e=>{var t;await R(e),await(null===(t=y.current)||void 0===t?void 0:t.refreshFileCounts())},[R]),Ce=i.useCallback(async e=>{var t;if(W){const n=g.startUpload(e);console.warn("🚀 Drag&Drop: файлы запущены",{fileCount:e.length,fileIds:n}),e.forEach(async(e,t)=>{const r=n[t];if(!r)return;let i=0;const o=setInterval(()=>{i=Math.min(i+10+Math.floor(Date.now()%10),85),g.updateProgress(r,i)},200);setTimeout(()=>{clearInterval(o)},2e3)}),await W(e),n.forEach(e=>{g.updateProgress(e,100),g.markAsSuccess(e)}),await(null===(t=y.current)||void 0===t?void 0:t.refreshFileCounts())}},[W,g]),_e=i.useCallback(async e=>{var t;await L(e),await x(),await(null===(t=y.current)||void 0===t?void 0:t.refreshFileCounts())},[L,x]),Se=(({files:e,selectedFiles:t,toggleFileSelection:n,showRenameModal:i,showMoveModal:o,showCopyModal:a,handleDeleteFile:s,handleDeleteFolder:l,showDeleteConfirm:c,onEdit:u})=>{const d=r.useCallback(()=>{t&&t.size>0&&t.forEach(e=>{n(e)})},[t,n]),h=r.useCallback(e=>{if(t&&1===t.size||e){const n=e||Array.from(t)[0];i(n)}},[t,i]),f=r.useCallback(n=>{if(t&&t.size>0||(null==n?void 0:n.id)){if(c)return void c();(n?[n.id]:t).forEach(t=>{const n=e.find(e=>e.id===t);console.log("item",n),n?n.isFolder?l(t):s(t):console.warn(`Объект с ID ${t} не найден в списке файлов`)})}},[t,e,s,l,c]);return{handleClearSelection:d,handleRename:h,handleDeleteSelected:f,handleCopy:r.useCallback(()=>{a()},[a]),handleMove:r.useCallback(()=>{o()},[o]),handleEdit:r.useCallback(()=>{console.log("onEdit"),u()},[u])}})({files:I||[],selectedFiles:T||new Set,toggleFileSelection:B,showRenameModal:V,showMoveModal:H,showCopyModal:d.actions.showCopyModal||(()=>{}),handleDeleteFile:R,handleDeleteFolder:_e,showDeleteConfirm:J,onEdit:pe.handleEdit}),ke=w||O,{options:Ae}=i.useContext(ci),Ee=null==Ae?void 0:Ae.config;a(()=>{pn(),x()},[x]),i.useEffect(()=>{if(!re||0===b.length)return;const e=!!(null==Ee?void 0:Ee.rememberLastFolder),t=`em_fm:lastFolder:${(null==Ee?void 0:Ee.projectId)||"default"}`;if(e&&"undefined"!=typeof window)try{const e=localStorage.getItem(t);if(e&&b.some(t=>t.id===e))return void re(e)}catch(e){}te||re("folders")},[te,re,b,null==Ee?void 0:Ee.rememberLastFolder,null==Ee?void 0:Ee.projectId]);const{state:Ie,actions:Te,options:Oe}=i.useContext(ci),{form:Fe,urlForm:Pe,renameForm:Me,moveForm:Re,renameFolderForm:Le,copyForm:je,isModalVisible:De,isUrlModalVisible:Ne,isMoveModalVisible:ze,isRenameFolderModalVisible:Be,isCopyModalVisible:Ve,isDeleteConfirmVisible:Ue,folderToRename:$e,activeLibraryItem:We}=Ie,{setIsUrlModalVisible:He,setSortField:Ge,setActiveLibraryItem:Ye,setUndoDeletion:qe}=Te,{config:Xe}=Oe,Ke=gi(),{handleRenameFolderCancel:Ze,handleRenameFolderOk:Je}=E.actions,Qe=c(e=>{fe(e.current||ae.current,e.pageSize||ae.pageSize)},[fe,ae]),et=i.useCallback(e=>{const{sortBy:t,sortOrder:n}=(e=>{const[t,n]=e.split("-");return{sortBy:t,sortOrder:n}})(e);he(t,n)},[he]),[tt,nt]=o(IP),[rt,it]=o([]),ot=u(null),[at,st]=o(sn),[lt,ct]=o([]),ut=u(null),[dt,ht]=o(""),[ft,pt]=o([]),gt=i.useRef(void 0),[mt,vt]=o(!1),[yt,bt]=o(!1),wt=i.useRef(null),xt=i.useRef(null),Ct=c(async()=>{const e=null==Xe?void 0:Xe.fileForEdit;if(gt.current!==e){gt.current=e;try{if(!(We===Jt&&e&&!pe.editingFile))return;if("string"==typeof e){if(e.startsWith("data:"))return void(null==pe||pe.handleEdit({thumbnail:e}));const t=await m.handleAddFileByUrl(e,!0);if(!t)throw new Error("Не удалось загрузить файл");gt.current===e&&(null==pe||pe.handleEdit(t))}}finally{gt.current===e&&(gt.current=null)}}},[null==Xe?void 0:Xe.fileForEdit,We,pe,m]);a(()=>{Ct()},[Ct]),a(()=>{var e,t,n;We===qt?(console.warn("reset requests"),it([]),nt(IP),ct([]),st(sn),pt([]),ht(""),bt(!1),vt(!1)):We===Zt?null===(e=xt.current)||void 0===e||e.focus():We===Xt?null===(t=ot.current)||void 0===t||t.focus():We===Kt&&(null===(n=ut.current)||void 0===n||n.focus())},[We]);const _t=i.useCallback(async()=>{var e;await Je(),await(null===(e=y.current)||void 0===e?void 0:e.refreshFileCounts())},[Je]),St=T.size,kt=i.useMemo(()=>{var e,t;if(1!==St)return!1;const n=Array.from(T)[0],r=I.find(e=>e.id===n);if(!r||r.isFolder)return!1;let i=!1;if(r.type&&r.type.startsWith("image/"))i=!0;else if(r.extension){const e=r.extension.toLowerCase();i=on.includes(e)}else{const t=null===(e=r.name.split(".").pop())||void 0===e?void 0:e.toLowerCase();i=!!t&&on.includes(t)}return console.log("isImageSelected проверка:",{fileName:r.name,fileType:r.type,fileExtension:r.extension,nameExtension:null===(t=r.name.split(".").pop())||void 0===t?void 0:t.toLowerCase(),isImage:i,IMAGE_EXTENSIONS:on}),i},[St,T,I]);return t(K,{className:"file-manager__layout",children:[p.showResizeGuide&&e("div",{className:"resize-guide",style:{left:`${p.resizeGuidePosition}px`}}),t(K,{className:"file-manager__content",children:[t(kP,{width:320,theme:"light",className:"file-manager-sider",children:[e(go,{ref:y,selectedFolder:te||"folders",generateMenuItems:A,onFolderSelect:e=>null==re?void 0:re(e),folders:b||[],fetchFolders:x,fetchChildFolders:C,handleAddFile:ye,setIsUrlModalVisible:e=>null==He?void 0:He(e),handleDeleteFolder:_e,handleCreateFolder:_,activeLibraryItem:We,setActiveLibraryItem:e=>null==Ye?void 0:Ye(e)}),e("div",{className:"sidebar-resizer "+(p.isResizing?"resizing":""),onMouseDown:p.handleResizeStart,onDoubleClick:p.handleDoubleClick,children:e("div",{className:"sidebar-resizer-indicator"})})]}),e(K,{className:"file-manager__main-content",children:t(AP,{className:"main-content",ref:wt,children:[e(YF,{activeLibraryItem:We,selectedFolder:(null===(s=null==b?void 0:b.find(e=>(null==e?void 0:e.id)===te))||void 0===s?void 0:s.name)||v("Folders")}),e(X,{className:"zero-divider"}),We===qt&&e(so,{searchTerm:le,sortField:Ie.sortField||"name",setSortField:e=>null==Ge?void 0:Ge(e),pathHistory:ne||[],handleBreadcrumbClick:e=>null==ie?void 0:ie(e),handleAddFile:ye,setIsUrlModalVisible:e=>null==He?void 0:He(e),files:I||[],handleSearch:de,handleSort:he,sortBy:ce,sortOrder:ue,handleSortOptionChange:et,pagination:ae,setPagination:Qe,loading:ke,handleItemClick:e=>null==oe?void 0:oe(e),handleDeleteFile:xe,selectedFiles:T||new Set,toggleFileSelection:e=>null==B?void 0:B(e),handleDroppedFiles:Ce,fileUpload:g,onClearSelection:Se.handleClearSelection,onRename:Se.handleRename,onCopy:Se.handleCopy,onMove:Se.handleMove,onDelete:Se.handleDeleteSelected,onEdit:pe.handleEdit}),We===Xt&&e(uP,{imageGifList:rt,setImageGifList:it,currentReqGif:tt,setCurrentReqGif:nt,inputRef:ot,customRequest:be}),We===Kt&&e(fP,{imageStockList:lt,setImageStockList:ct,currentReq:at,setCurrentReq:st,inputRef:ut,customRequest:be}),We===Zt&&!!(null==Xe?void 0:Xe.sseQuery)&&e(_P,{imageAiList:ft,setImageAiList:pt,aiImageRequest:dt,setAiImageRequest:ht,inputAiRef:xt,customRequest:we,isLoadingAi:mt,setIsLoadingAi:vt,isImageUploaded:yt,setIsImageUploaded:bt,aiTabRef:wt}),We===Jt&&e(n,{}),e("div",{children:kt&&t(n,{children:[e(X,{className:"zero-divider"}),e("div",{style:{display:"flex",justifyContent:"right",padding:"17px 24px",alignItems:"center"},children:e(D,{size:"large",type:"primary",style:{height:40},onClick:()=>{if(Oe.onEditorOk){const e=Array.from(T)[0],t=I.find(t=>t.id===e);t&&Oe.onEditorOk(t)}},children:v("Choose")})})]})})]})})]}),e(fo,{isModalVisible:De,handleModalOk:S,handleModalCancel:k,form:Fe,selectedFolder:te||null,folders:b||[],isUrlModalVisible:Ne,setIsUrlModalVisible:e=>null==He?void 0:He(e),handleAddFileByUrl:be,urlForm:Pe,isRenameModalVisible:F,handleRenameOk:()=>null==$?void 0:$(),handleRenameCancel:()=>null==U?void 0:U(),renameForm:Me,fileToRename:P,files:I||[],isMoveModalVisible:ze,handleMoveOk:me,handleMoveCancel:G,moveForm:Re,selectedFiles:T||new Set,isRenameFolderModalVisible:Be,handleRenameFolderOk:_t,handleRenameFolderCancel:Ze,renameFolderForm:Le,folderToRename:$e,isCopyModalVisible:Ve,handleCopyOk:ve,handleCopyCancel:Z,copyForm:je,isDeleteConfirmVisible:Ue,handleDeleteConfirmOk:ge,handleDeleteConfirmCancel:()=>null==Q?void 0:Q(),fetchChildFolders:C}),Ie.undoDeletion&&e(EP,{itemIds:Ie.undoDeletion.itemIds,sourceFolderId:Ie.undoDeletion.sourceFolderId||"folders",onClose:()=>null==qe?void 0:qe(null),onUndo:async()=>{var e,t,n,r,i,o,a,s,l,c,u,d,h;try{const o=null!==(t=null===(e=Ie.undoDeletion)||void 0===e?void 0:e.itemIds)&&void 0!==t?t:[],a=(null===(n=Ie.undoDeletion)||void 0===n?void 0:n.sourceFolderId)||"folders";if(null===(r=Oe.dataProviders)||void 0===r?void 0:r.moveItems)await Oe.dataProviders.moveItems("folders"===a?"":a,o);else if(null===(i=Oe.dataProviders)||void 0===i?void 0:i.moveItem)for(const e of o){const t=e.startsWith("folder_");await Oe.dataProviders.moveItem({itemId:e,targetFolderId:"folders"===a?"":a,isFolder:t})}Ke.success({id:"FILES_MOVE_SUCCESS",message:v("restored_items",{count:o.length}),placement:"bottomRight",data:{successCount:o.length,totalCount:o.length,itemIds:o}}),null==qe||qe(null),await x(),await M({folderId:te||"",page:ae.current,limit:ae.pageSize})}catch(e){Ke.error({id:"FILES_MOVE_ERROR",message:v("Error when moving a file"),placement:"bottomRight",data:{failCount:null!==(s=null===(a=null===(o=Ie.undoDeletion)||void 0===o?void 0:o.itemIds)||void 0===a?void 0:a.length)&&void 0!==s?s:0,totalCount:null!==(u=null===(c=null===(l=Ie.undoDeletion)||void 0===l?void 0:l.itemIds)||void 0===c?void 0:c.length)&&void 0!==u?u:0,itemIds:null!==(h=null===(d=Ie.undoDeletion)||void 0===d?void 0:d.itemIds)&&void 0!==h?h:[]},innerException:e})}}}),e(WF,{visible:pe.isPixieEditorVisible,onClose:pe.handlePixieEditorClose,file:pe.editingFile,onSave:pe.handlePixieEditorSave})]})},OP=f(({config:r={},onPathChange:o,onChangeSelection:s,onEditorOk:l,searchQuery:c="",sortBySize:d="name",apiEndpoints:h={},customIcons:f,dragDropIcon:p,dataProviders:g,handleNotify:m,handleError:v,handleSuccess:y})=>{const b=i.useMemo(()=>Object.assign({folderTreeLoading:"lazy",expandAllFoldersOnInit:!1,expandRootFolderOnInit:!1,iconStrokeWidth:1.4},r),[r]);i.useEffect(()=>{b.theme&&(e=>{if("system"===e){const t=matchMedia(nn).matches?en:Qt;e=e===tn?t:e}document.documentElement.setAttribute("data-theme",e)})(b.theme),SP(b)},[b]),a(()=>{b.locale&&b.locale!==Tr.language&&(console.warn("FileManagerApp: меняем локаль с",Tr.language,"на",b.locale),Tr.changeLanguage(b.locale)),b.customLocale&&b.locale&&Tr.addResourceBundle(b.locale,"translation",b.customLocale,!0,!0)},[b.locale,b.customLocale]);const w=u(null);return e(I,{className:"em-filemanager",children:t(n,{children:[e(E,{getPopupContainer:()=>w.current||document.body,children:e(di,{options:{apiEndpoints:h,searchQuery:c,sortBySize:d,onPathChange:o,onChangeSelection:s,onEditorOk:l,config:b,customIcons:f,dragDropIcon:p,dataProviders:g,handleNotify:m,handleError:v,handleSuccess:y},children:e(TP,{})})}),e("div",{ref:w,className:"file-manager-modal-root"})]})})});OP.displayName="FileManagerApp";const FP=t=>{var n,r,i;return e(zn,{i18n:Tr,children:e(un,{externalTheme:null!==(r=null===(n=t.config)||void 0===n?void 0:n.theme)&&void 0!==r?r:"light",customThemeToken:null===(i=t.config)||void 0===i?void 0:i.customTheme,children:e(te,{children:e(OP,Object.assign({},t))})})})},PP=new Map,MP=(t,n)=>{var r;let i;pn();let o={};const a=e=>{const t=!e||"fileManager"!==e.mode&&"imageCenter"!==e.mode&&"plugin"!==e.mode?void 0:e.mode;return"imageCenter"===t?hn("imageCenter",e):hn(t)};if(t instanceof HTMLElement){i=t;o={config:a(n),apiEndpoints:null==n?void 0:n.apiEndpoints}}else{i=t.element;const e=a(t.config),n=Object.assign(Object.assign({},null===(r=t.config)||void 0===r?void 0:r.apiEndpoints),t.apiEndpoints);o={config:e,currentPath:t.currentPath,onPathChange:t.onPathChange,onChangeSelection:t.onChangeSelection,searchQuery:t.searchQuery,sortBySize:t.sortBySize,apiEndpoints:n,dataProviders:t.dataProviders,customIcons:t.customIcons,dragDropIcon:t.dragDropIcon,handleNotify:t.handleNotify,handleError:t.handleError,handleSuccess:t.handleSuccess}}const s=S(i);s.render(e(FP,Object.assign({},o))),PP.set(i.id||`container_${Date.now()}`,s)},RP=e=>{const t=e.id||Object.keys(PP).find(e=>e.startsWith("container_"));if(t&&PP.has(t)){const e=PP.get(t);null==e||e.unmount(),PP.delete(t)}else{console.warn("Не удалось найти корень для размонтирования");try{S(e).unmount()}catch(e){console.error("Ошибка при размонтировании компонента:",e)}}},LP=new Map,jP=r=>{const{onClose:o,onSave:a,dataProviders:s,theme:l}=r,c=i.useMemo(()=>{if(r.file)return r.file;const e=r.name||"edited-image",t=r.extension||(r.type?r.type.split("/")[1]:"png"),n=r.type||`image/${t}`;return{thumbnail:r.imageDataUrl||"",name:e,id:void 0,type:n,extension:t}},[r.file,r.imageDataUrl,r.name,r.extension,r.type]),d=i.useCallback(async e=>{if(console.log("🔧 saveFileToServer: dataProviders доступны:",{hasUpdateFile:!!(null==s?void 0:s.updateFile),hasThumbnail:!!e.thumbnail,fileId:e.id}),(null==s?void 0:s.updateFile)&&e.thumbnail)try{const t=mn(e.thumbnail,e.type),n=vn(t),r=e.name.substring(0,e.name.lastIndexOf("."))+"."+n,i=xn(e.thumbnail,t);return await s.updateFile(e.id,{name:r,type:t,data:i})}catch(e){return console.error("Ошибка при обновлении файла через updateFile:",e),null}return console.warn("DataProvider для обновления файлов не настроен"),null},[s]),h=i.useCallback(async e=>{if((null==s?void 0:s.updateFile)&&e.id&&e.thumbnail)try{const t=await d(e);t&&(e=t)}catch(e){console.error("Standalone Pixie: saveFileToServer error",e)}return a&&await a(e),o&&o(),e},[s,a,o,d]),f=u(null);return e(I,{className:"em-filemanager",children:t(n,{children:[e(E,{getPopupContainer:()=>f.current||document.body,children:e(zn,{i18n:Tr,children:e(un,{externalTheme:null!=l?l:"light",children:e(te,{children:e(di,{options:{dataProviders:s,handleNotify:r.handleNotify,handleError:r.handleError,handleSuccess:r.handleSuccess,config:{theme:null!=l?l:"light",locale:r.locale,baseUrl:r.baseUrl,assetsUrl:r.assetsUrl,showNotifications:r.showNotifications}},children:e(WF,{visible:!0,onClose:o,file:c,onSave:h})})})})})}),e("div",{ref:f,className:"file-manager-modal-root"})]})})},DP=t=>{pn();const n=t.element,r=S(n);r.render(e(jP,Object.assign({},t))),LP.set(n.id||`pixie_container_${Date.now()}`,r)},NP=e=>{const t=Array.from(LP.keys()).find(e=>e.startsWith("pixie_container_")),n=e.id||t;if(n&&LP.has(n)){const e=LP.get(n);null==e||e.unmount(),LP.delete(n)}else{console.warn("Не удалось найти корень Pixie для размонтирования");try{S(e).unmount()}catch(e){console.error("Ошибка при размонтировании Pixie:",e)}}},zP=e=>{var t,n;const{mode:r,element:i,fileManager:o,pixieEditor:a,theme:s,dataProviders:l}=e;let c,u;const d={unmount:()=>{c&&RP(c),u&&NP(u)},unmountFileManager:void 0,unmountPixieEditor:void 0};switch(r){case"fileManager":c=i,MP(i,Object.assign(Object.assign({},null==o?void 0:o.config),{theme:s||(null===(t=null==o?void 0:o.config)||void 0===t?void 0:t.theme),apiEndpoints:null==o?void 0:o.apiEndpoints})),d.unmountFileManager=()=>RP(c);break;case"pixieEditor":u=i,DP(Object.assign({element:i,theme:s||(null==a?void 0:a.theme),dataProviders:l||(null==a?void 0:a.dataProviders)},a)),d.unmountPixieEditor=()=>NP(u);break;case"both":{const e=document.createElement("div");e.id="file-manager-container",e.style.cssText="height: 50%; border-bottom: 1px solid #d9d9d9;";const t=document.createElement("div");t.id="pixie-editor-container",t.style.cssText="height: 50%;",i.appendChild(e),i.appendChild(t),c=e,u=t,MP(c,Object.assign(Object.assign({},null==o?void 0:o.config),{theme:s||(null===(n=null==o?void 0:o.config)||void 0===n?void 0:n.theme),apiEndpoints:null==o?void 0:o.apiEndpoints})),DP(Object.assign({element:u,theme:s||(null==a?void 0:a.theme),dataProviders:l||(null==a?void 0:a.dataProviders)},a)),d.unmountFileManager=()=>RP(c),d.unmountPixieEditor=()=>NP(u);break}}return d};class BP extends Error{constructor(e,t,n,r){super(e),this.name="FileManagerApiError",this.code=t,this.httpStatus=n,this.details=r,Error.captureStackTrace&&Error.captureStackTrace(this,BP)}}var VP={init:MP,unmount:RP,initPixieEditor:DP,unmountPixieEditor:NP,initFileManager:zP};export{so as FileContent,BP as FileManagerApiError,OP as FileManagerApp,FP as FileManagerAppWithContext,fo as FileModals,go as FolderSidebar,jP as PixieOnlyApp,VP as default,MP as init,zP as initFileManager,DP as initPixieEditor,pn as installResizeObserverErrorHandler,gn as uninstallResizeObserverErrorHandler,RP as unmount,NP as unmountPixieEditor};
|
|
76
|
+
var qF=function(e,t){return qF=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},qF(e,t)};var XF=function(){return XF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},XF.apply(this,arguments)};var KF="Pixel",ZF="Percent",JF={unit:ZF,value:.8};function QF(e){return"number"==typeof e?{unit:ZF,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:KF,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:ZF,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),JF):(console.warn("scrollThreshold should be string or number"),JF)}var eP=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"==typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),n.currentY-n.startY>1.5*n.maxPullDownDistance||n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")})},n.onScrollListener=function(e){"function"==typeof n.props.onScroll&&setTimeout(function(){return n.props.onScroll&&n.props.onScroll(e)},0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,r){var i,o=!1,a=0;function s(){i&&clearTimeout(i)}function l(){var l=this,c=Date.now()-a,u=arguments;function d(){a=Date.now(),n.apply(l,u)}o||(r&&!i&&d(),s(),void 0===r&&c>e?d():!0!==t&&(i=setTimeout(r?function(){i=void 0}:d,void 0===r?e-c:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){s(),o=!0},l}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}qF(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?XF(XF({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=QF(t);return r.unit===KF?e.scrollTop<=r.value+n-e.scrollHeight+1:e.scrollTop<=r.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=QF(t);return r.unit===KF?e.scrollTop+n>=e.scrollHeight-r.value:e.scrollTop+n>=r.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=XF({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),r=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return i.createElement("div",{style:r,className:"infinite-scroll-component__outerdiv"},i.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&i.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},i.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(_);function tP(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function nP(){return nP=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nP.apply(this,arguments)}function rP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rP(Object(n),!0).forEach(function(t){oP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const aP={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0};class sP extends i.Component{constructor(e){let t;super(e),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this),t=this.props.breakpointCols&&this.props.breakpointCols.default?this.props.breakpointCols.default:parseInt(this.props.breakpointCols)||2,this.state={columnCount:t}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){window&&window.requestAnimationFrame?(window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame(()=>{this.reCalculateColumnCount()})):this.reCalculateColumnCount()}reCalculateColumnCount(){const e=window&&window.innerWidth||1/0;let t=this.props.breakpointCols;"object"!=typeof t&&(t={default:parseInt(t)||2});let n=1/0,r=t.default||2;for(let i in t){const o=parseInt(i);o>0&&e<=o&&o<n&&(n=o,r=t[i])}r=Math.max(1,parseInt(r)||1),this.state.columnCount!==r&&this.setState({columnCount:r})}itemsInColumns(){const e=this.state.columnCount,t=new Array(e),n=i.Children.toArray(this.props.children);for(let r=0;r<n.length;r++){const i=r%e;t[i]||(t[i]=[]),t[i].push(n[r])}return t}renderColumns(){const{column:e,columnAttrs:t={},columnClassName:n}=this.props,r=this.itemsInColumns(),o=100/r.length+"%";let a=n;a&&"string"!=typeof a&&(this.logDeprecated('The property "columnClassName" requires a string'),void 0===a&&(a="my-masonry-grid_column"));const s=iP(iP(iP({},e),t),{},{style:iP(iP({},t.style),{},{width:o}),className:a});return r.map((e,t)=>i.createElement("div",nP({},s,{key:t}),e))}logDeprecated(e){console.error("[Masonry]",e)}render(){const e=this.props,{children:t,breakpointCols:n,columnClassName:r,columnAttrs:o,column:a,className:s}=e,l=tP(e,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let c=s;return"string"!=typeof s&&(this.logDeprecated('The property "className" requires a string'),void 0===s&&(c="my-masonry-grid")),i.createElement("div",nP({},l,{className:c}),this.renderColumns())}}sP.defaultProps=aP;var lP={gifTab:"gifTab",scrollableDiv:"scrollableDiv",gifSearchInput:"gifSearchInput",search:"search",searchResults:"searchResults",myMasonryGrid:"myMasonryGrid",myMasonryGridColumn:"myMasonryGridColumn",listItem:"listItem",loaded:"loaded",loadedImage:"loadedImage",searchOutputWrapper:"searchOutputWrapper",divider:"divider",resultsContainer:"resultsContainer",playButton:"playButton",title:"title",subtitle:"subtitle",noFiles:"noFiles"};const cP={default:4,1600:3,1100:2,700:1},uP=({setImageGifList:r,imageGifList:i=[],currentReqGif:s,setCurrentReqGif:l,inputRef:c,customRequest:u})=>{const{t:d}=Nn(),{GifPlayIcon:h}=ro(),{options:f}=ui(),{config:p}=f,[g,m]=o(null),[v,y]=o(!1),[b,w]=o(25),[x,C]=o(null),_=async function({query:e,page:t}){const n=e.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g,"").replace(/[\s_-]+/g," ");try{const e=`https://api.giphy.com/v1/gifs/search?api_key=${null==p?void 0:p.REACT_APP_GIPHY_KEY}&q=${n}&limit=25&offset=${t}&lang=en`,r=await fetch(e);return{data:await r.json()}}catch(e){console.warn(e)}},S=async()=>{var e,t;const n=await _({query:s,page:0});(null===(t=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.data)||void 0===t?void 0:t.length)&&n.data.data.length>0&&r(n.data.data)};return a(()=>()=>{x&&clearTimeout(x)},[x]),e("div",{className:lP.gifTab,children:e("div",{className:lP.searchOutputWrapper,children:t("div",{id:"scrollableDiv",className:lP.scrollableDiv,children:[t(T,{onValuesChange:e=>{if(void 0!==e.keywords){l(t=>Object.assign(Object.assign({},t),{keywords:e.keywords})),x&&clearTimeout(x);const t=setTimeout(S,800);C(t)}},className:i.length>0?lP.searchResults:lP.search,children:[e(T.Item,{name:"keywords",className:lP.gifSearchInput,children:e(O,{onKeyDown:e=>"Space"===e.code&&S(),onPressEnter:e=>S(),allowClear:!0,placeholder:d("Search GIFs"),ref:c,spellCheck:"false",prefix:e(ti,{size:16,strokeWidth:null==p?void 0:p.iconStrokeWidth,onClick:S})})}),i.length>0&&!v&&e("div",{className:`ant-divider ${lP.divider}`,role:"separator"})]}),!i.length&&!v&&e(n,{children:s.keywords?e("div",{className:lP.noFiles,children:d("There are no files for your request.")}):t("div",{className:lP.resultsContainer,children:[e("div",{className:lP.videoIcon,children:e(h,{className:lP.playButton})}),e("h1",{className:lP.title,children:d("Over 350,000 live images")}),e("p",{className:lP.subtitle,children:d("Enter a search query and we'll find the perfect image for you")})]})}),!i.length&&v&&e(NF,{}),i.length>0&&e(eP,{dataLength:i&&i.length,next:async()=>{v||(y(!0),_({query:s,page:b}).then(e=>{e&&e.data&&e.data.data&&r(t=>[...t,...e.data.data]),y(!1),w(e=>e+25)}).catch(()=>{y(!1)}))},hasMore:!!i,endMessage:t(X,{plain:!0,children:[d("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:e(NF,{}),children:e(sP,{breakpointCols:cP,className:lP.myMasonryGrid,columnClassName:lP.myMasonryGridColumn,children:i.map((n,r)=>t("div",{className:lP.listItem,onClick:()=>((e,t)=>{m(t),setTimeout(()=>{m(null)},2e3),u(e)})(n.images.downsized.url,n.id),children:[e("img",{className:g===n.id?lP.loadedImage:"",width:"100%",src:`${n.images.downsized.url}`,alt:n.title,onLoad:e=>{const t=e.target.parentNode;t&&t instanceof HTMLElement&&t.classList.add(lP.loaded)}}),e("a",{rel:"noreferrer",href:"https://giphy.com/",target:"_blank",onClick:e=>e.stopPropagation()}),g===n.id&&e(k,{className:lP.antSpin})]},n.id+r))})})]})})})};var dP={stockTab:"stockTab",stockSearchInput:"stockSearchInput",searchOutputWrapper:"searchOutputWrapper",divider:"divider",search:"search",searchResults:"searchResults",scrollableDiv:"scrollableDiv",myMasonryGrid:"myMasonryGrid",myMasonryGridColumn:"myMasonryGridColumn",listItem:"listItem",loaded:"loaded",loadedImage:"loadedImage",creatorInfo:"creatorInfo",stockColorFilter:"stockColorFilter",allColors:"allColors",blackColor:"blackColor",bwColor:"bwColor",whiteColor:"whiteColor",orangeColor:"orangeColor",redColor:"redColor",purpleColor:"purpleColor",magentaColor:"magentaColor",greenColor:"greenColor",tealColor:"tealColor",blueColor:"blueColor",resultsContainer:"resultsContainer",playButton:"playButton",title:"title",subtitle:"subtitle",noFiles:"noFiles"};const hP={default:4,1600:3,1100:2,700:1},fP=({imageStockList:r,setImageStockList:i,currentReq:s,setCurrentReq:l,inputRef:c,customRequest:d})=>{var h;const{t:f}=Nn(),{StockBigIcon:p,MixedViewIcon:g,LandscapeViewIcon:m,PortraitViewIcon:v,SquareViewIcon:y}=ro(),{options:b}=ui(),{config:w}=b,[x,C]=o(!1),[_,S]=o(2),[A,E]=o(null),[I,F]=o(null),[P,M]=o(!0),[R]=T.useForm(),j=u(s);a(()=>{j.current=s},[s]),a(()=>{0===r.length&&R.setFieldsValue({color:"",orientation:""})},[r,R]);const D=async function({query:e,page:t}){const n=e.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g,"").replace(/[\s_-]+/g," ");try{let r=`https://api.unsplash.com/search/photos?client_id=${null==w?void 0:w.UNSPLASH_KEY}&lang=ru&per_page=18&query=${n}&page=${t}`;""!==e.color&&(r+=`&color=${e.color}`),""!==e.orientation&&(r+=`&orientation=${e.orientation}`);const i=await fetch(r);return{data:await i.json()}}catch(e){console.warn(e)}finally{C(!1)}},N=async()=>{var e,t,n;C(!0);const r=await D({query:j.current,page:1});(null===(e=null==r?void 0:r.data)||void 0===e?void 0:e.results)&&(i(r.data.results),M(18===r.data.results.length),(null===(n=null===(t=null==r?void 0:r.data)||void 0===t?void 0:t.results)||void 0===n?void 0:n.length)&&r.data.results.length>0&&S(2))};a(()=>()=>{I&&clearTimeout(I)},[I]);const z=(e,t,n)=>{!async function(e){try{const t=await fetch(`${e}&client_id=${null==w?void 0:w.UNSPLASH_KEY}`);return{data:await t.json()}}catch(e){console.warn(e)}}(t.download_location),E(n),setTimeout(()=>E(null),2e3),d(`${e.raw}&w=1200&q=96`)};return e("div",{className:dP.stockTab,children:e("div",{className:dP.searchOutputWrapper,children:t("div",{className:dP.scrollableDiv,id:"scrollableDiv",children:[t(T,{form:R,initialValues:sn,onValuesChange:(e,t)=>{if(l(Object.assign(Object.assign({},sn),t)),I&&clearTimeout(I),""!==t.keywords){const e=setTimeout(N,800);F(e)}else r.length||(l(Object.assign({},sn)),R.resetFields())},className:r.length>0?dP.searchResults:dP.search,children:[t($,{gutter:24,children:[e(W,{span:r.length>0?void 0:24,children:e(T.Item,{name:"keywords",className:dP.stockSearchInput,children:e(O,{allowClear:!0,placeholder:f("Search image"),ref:c,spellCheck:"false",prefix:e(ti,{size:16,strokeWidth:null==w?void 0:w.iconStrokeWidth})})})}),!!r.length&&t(n,{children:[e(W,{children:e(T.Item,{name:"orientation",children:t(Z.Group,{onChange:e=>l(t=>Object.assign(Object.assign({},t),{orientation:e.target.value})),children:[e(L,{title:f("All"),placement:"top",children:e(Z.Button,{value:"",children:e(g,{})})}),e(L,{title:f("Landscape"),placement:"top",children:e(Z.Button,{value:"landscape",children:e(m,{})})}),e(L,{title:f("Portrait"),placement:"top",children:e(Z.Button,{value:"portrait",children:e(v,{})})}),e(L,{title:f("Squarish"),placement:"top",children:e(Z.Button,{value:"squarish",children:e(y,{})})})]})})}),e(W,{children:e(T.Item,{name:"color",children:t(Z.Group,{className:dP.stockColorFilter,onChange:e=>l(t=>Object.assign(Object.assign({},t),{color:e.target.value})),children:[e(L,{title:f("All"),placement:"top",children:e(Z.Button,{className:dP.allColors,value:"",children:"All"})}),e(L,{title:f("Black"),placement:"top",children:e(Z.Button,{className:dP.blackColor,value:"black",children:"B"})}),e(L,{title:f("Black and White"),placement:"top",children:e(Z.Button,{className:dP.bwColor,value:"black_and_white",children:"B&W"})}),e(L,{title:f("White"),placement:"top",children:e(Z.Button,{className:dP.whiteColor,value:"white",children:"W"})}),e(L,{title:f("Orange"),placement:"top",children:e(Z.Button,{className:dP.orangeColor,value:"orange",children:"O"})}),e(L,{title:f("Red"),placement:"top",children:e(Z.Button,{className:dP.redColor,value:"red",children:"R"})}),e(L,{title:f("Purple"),placement:"top",children:e(Z.Button,{className:dP.purpleColor,value:"purple",children:"P"})}),e(L,{title:f("Magenta"),placement:"top",children:e(Z.Button,{className:dP.magentaColor,value:"magenta",children:"M"})}),e(L,{title:f("Green"),placement:"top",children:e(Z.Button,{className:dP.greenColor,value:"green",children:"G"})}),e(L,{title:f("Teal"),placement:"top",children:e(Z.Button,{className:dP.tealColor,value:"teal",children:"T"})}),e(L,{title:f("Blue"),placement:"top",children:e(Z.Button,{className:dP.blueColor,value:"blue",children:"B"})})]})})})]})]}),r.length>0&&!x&&e("div",{className:`ant-divider ${dP.divider}`,role:"separator"})]}),!r.length&&!x&&e(n,{children:s.keywords?e("div",{className:dP.noFiles,children:f("There are no files for your request.")}):t("div",{className:dP.resultsContainer,children:[e("div",{className:dP.videoIcon,children:e(p,{className:dP.playButton})}),e("h1",{className:dP.title,children:f("Millions of free stock images")}),e("p",{className:dP.subtitle,children:f("Enter a search query and we'll find the perfect image for you")})]})}),!r.length&&x&&e(NF,{}),r.length>0&&e(eP,{dataLength:r&&r.length,next:async()=>{if(x||""===j.current.keywords)return C(!1),void(""===j.current.keywords&&M(!1));C(!0),D({query:j.current,page:_}).then(e=>{e&&e.data&&e.data.results&&(i(t=>[...t,...e.data.results]),M(18===e.data.results.length)),S(e=>e+1)}).catch(e=>{console.warn("catch",e)}).finally(()=>{C(!1)})},hasMore:P&&""!==(null===(h=j.current)||void 0===h?void 0:h.keywords),endMessage:t(X,{plain:!0,children:[f("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:e(NF,{}),children:e(sP,{breakpointCols:hP,className:dP.myMasonryGrid,columnClassName:dP.myMasonryGridColumn,children:r.map((n,r)=>t("div",{className:dP.listItem,onClick:()=>z(n.urls,n.links,n.id),children:[e("img",{className:A===n.id?dP.loadedImage:"",width:"100%",src:`${n.urls.raw}&w=644&q=96`,alt:n.description,onLoad:e=>{const t=e.target.parentNode;t&&t instanceof HTMLElement&&t.classList.add(dP.loaded)}}),t("p",{className:dP.creatorInfo,onClick:e=>e.stopPropagation(),children:[f("Photo by")," ",e("a",{target:"_blank",href:`${n.user.links.html}?utm_source=${null==w?void 0:w.APP_NAME_UNSPLASH}&utm_medium=referral`,rel:"noreferrer",children:n.user.name})," ",f("on")," ",e("a",{target:"_blank",href:`https://unsplash.com/?utm_source=${null==w?void 0:w.APP_NAME_UNSPLASH}&utm_medium=referral`,rel:"noreferrer",children:"Unsplash"})]}),A===n.id&&e(k,{className:dP.antSpin})]},n.id+r))})})]})})})},pP=()=>{const{options:e}=ui(),t=e.config;return c((e,n)=>{!1!==(null==t?void 0:t.pushToGTM)&&((e,t)=>{const n=()=>{try{const t=Object.assign(Object.assign({},e),{appLabel:"blocks_app"});window.dataLayer&&"function"==typeof window.dataLayer.push?window.dataLayer.push(t):console.log("Attempting to add to the dataLayer:",e)}catch(e){console.error("Ошибка при вызове GTM:",e)}};t?setTimeout(n,t):n()})(e,n)},[null==t?void 0:t.pushToGTM])};var gP="slideshowContainer",mP="slideshowImage";const vP=({images:t,transitionDuration:n=1e3,frameHeight:r})=>{const[i,s]=o([]),l=()=>{s(e=>e.map((t,n)=>n===e.length-1?Object.assign(Object.assign({},t),{opacity:1}):t))};return a(()=>{if(t.length>0){const e=t[t.length-1];s(t=>[...t,{src:e,opacity:0}]),setTimeout(l,1e3)}else s([])},[t]),e("div",{className:gP,style:{height:600,minHeight:130},children:i.map((t,r)=>e("img",{src:`data:image/jpeg;base64, ${t.src}`,alt:`Slide ${r+1}`,className:mP,style:{opacity:t.opacity,transition:`opacity ${n}ms linear`,display:"block"}},r))})};"function"==typeof SuppressedError&&SuppressedError;const yP=t=>{var{className:n,style:r,color:i,text:o,bordered:a}=t,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["className","style","color","text","bordered"]);const l=o||"";return e(J,Object.assign({style:r,color:i,bordered:a,className:n},s,{children:l}))},bP=({text:n,counter:r,limits:i,wrapperStyles:o})=>{const{t:a}=Nn(),{options:s}=ui(),l=s.config,{token:c}=A.useToken(),u=+i>0,d=!u||r<+i,h=(null==l?void 0:l.billingPageUrl)||"/billing",f=r+" "+a("of")+" "+(u?i:"∞")+" "+(n||a("tests",{count:i}))+" "+a("was used",{count:r});return t("div",{className:"limits-couter-wrapper",style:o,children:[e(yP,{bordered:!1,text:f,className:"limit-counter",style:{color:d?c.colorText:"white"},color:d?c.colorFillSecondary:"rgb(255, 77, 79)"}),u&&e("div",{style:{fontSize:14,textDecoration:"underline",cursor:"pointer"},onClick:()=>window.location.assign(h),children:a("Need more?")})]})};var wP={imageAi:"imageAi",imageItem:"imageItem",textAreaInputHybrid:"textAreaInputHybrid",loading:"loading",carousel:"carousel",arrow:"arrow",arrowNext:"arrowNext",arrowPrev:"arrowPrev",arrowBtn:"arrowBtn",arrowBtnNext:"arrowBtnNext",arrowBtnPrev:"arrowBtnPrev",row:"row",inputAffixWrapper:"inputAffixWrapper",textarea:"textarea",inputIcon:"inputIcon"};const xP=f(({className:t,onClick:n})=>e("div",{className:`${wP.arrow} ${wP.arrowNext} ${t||""}`,onClick:n,children:e(D,{className:`${wP.arrowBtn} ${wP.arrowBtnNext}`,size:"large",icon:e(ve,{})})}));xP.displayName="SampleNextArrow";const CP=f(({className:t,onClick:n})=>e("div",{className:`${wP.arrow} ${wP.arrowPrev} ${t||""}`,onClick:n,children:e(D,{className:`${wP.arrowBtn} ${wP.arrowBtnPrev}`,size:"large",icon:e(ye,{})})}));CP.displayName="SamplePrevArrow";const _P=({customRequest:n,aiTabRef:r,inputAiRef:i,isImageUploaded:s,setIsImageUploaded:l,aiImageRequest:u,setAiImageRequest:h,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:m})=>{const{t:v}=Nn(),{AiIcon_2:y}=ro(),[b,w]=o("auto"),{aiImageCounter:x,currentAiImgLimits:C,loadingDuringGeneration:_,requestStatus:S,handleGenerate:k,convertBase64ToFile:A,isShiftPressed:E,setIsShiftPressed:I,limitsInPlugin:F}=function({setFrameHeight:e,customRequest:t,aiTabRef:n,isImageUploaded:r,setIsImageUploaded:i,aiImageRequest:s,imageAiList:l,setImageAiList:u,isLoadingAi:h,setIsLoadingAi:f}){const{t:p}=Nn(),{options:g}=ui(),m=g.config,v=gi(),y=pP(),{messages:b}=g.config,[w,x]=o([]),[C,_]=o(0),[S,k]=o(null),[A,E]=o(!1),[I,T]=o(p("Evaluating the task")),[O,F]=o(!1);a(()=>{x(b)},[b]),a(()=>{l.length||S||x([])},[l,S]);const P=d(()=>m&&"function"==typeof(null==m?void 0:m.sendAIImageRequest)?null==m?void 0:m.sendAIImageRequest:()=>Promise.resolve({}),[m]),M=c(e=>{if("error"!==e.status&&"Canceled"!==e.status){if(e.images){if(T(String(e.status)),100===e.progress){f(!1),u(e.images);const t=S,n=Array.isArray(e.images)?e.images:[];n.length>0&&v.success({id:"AI_IMAGE_GENERERATION_SUCCESS",message:p("Images generated successfully"),placement:"bottomRight",data:{request:s,taskId:t,images:n}}),k(null),F(!1)}}else if(u([String(e.data)]),100===e.progress){f(!1);const t=S,n=e.data?[String(e.data)]:[];n.length>0&&v.success({id:"AI_IMAGE_GENERERATION_SUCCESS",message:p("Images generated successfully"),placement:"bottomRight",data:{request:s,taskId:t,images:n}}),k(null),F(!1)}}else f(!1),F(!1),v.error({id:"AI_RESPONSE_INVALID",message:p("Something went wrong, please try again"),placement:"bottomRight",description:String(S)||void 0,data:{requestId:S,request:s,response:e},innerException:e})},[s,u,T,p,f,S,v,F]);a(()=>{w.length>1&&M(w[w.length-1])},[M,w]);const R=d(()=>{if(m&&"function"==typeof(null==m?void 0:m.sseQuery)){const e=null==m?void 0:m.sseQuery;return t=>e(t)}return e=>{}},[m]),L=d(()=>m&&"object"==typeof(null==m?void 0:m.handleLimitUsageEmitter)?null==m?void 0:m.handleLimitUsageEmitter:{fire:()=>{}},[m]),j=null==m?void 0:m.elementId,{projectId:D}=m,{limits:N}=(null==m?void 0:m.limits)?m:{limits:{ai_img_limit:0}},{ai_img_limit:z}=N,B=z>0&&C>=z,V=!(!(null==m?void 0:m.limits)||!m.counters)&&rn,U=c(()=>{L.fire({name:"AiImgCount",count:C+1})},[L,C]),$=d(()=>!B&&!V,[B,V,C,z]),W=c(async()=>{T(p("Evaluating the task")),""===s||h||(f(!0),F(!0),u([]),y({event:"submit_form",action:"ai_image_generation",entity_id:j,project_id:D}),P({body:{project_id:D,request:"create-image",connection:"midjourney",message:s}}).then(e=>{var t,n,r,i,o;const{data:a,error:l}=e||{};if(l)throw l;const c=a;if(401===(null==c?void 0:c.status)||401===(null===(t=null==c?void 0:c.data)||void 0===t?void 0:t.status))throw new Error("ERROR");const u=(null==c?void 0:c.task)||(null===(n=null==c?void 0:c.data)||void 0===n?void 0:n.task),d=null!==(i=null!==(r=null==u?void 0:u.id)&&void 0!==r?r:S)&&void 0!==i?i:void 0;200===(null==c?void 0:c.status)||200===(null===(o=null==c?void 0:c.data)||void 0===o?void 0:o.status)?((null==u?void 0:u.id)&&(T(u.message),k(u.id)),(null==c?void 0:c.message)&&v.success({id:"AI_IMAGE_GENERATION_STARTED",message:c.message,placement:"bottomRight",description:s,data:{request:s,taskId:d,response:null==c?void 0:c.data}}),R({task_id:null==u?void 0:u.id,entity_id:j})):(f(!1),F(!1),v.error({id:"AI_IMAGE_GENERATION_FAILED",message:(null==c?void 0:c.message)||p("Something went wrong, please try again"),placement:"bottomRight",description:s,data:{request:s,taskId:d,response:c},innerException:c}))}).catch(e=>{f(!1),F(!1);const t=e;return((null==t?void 0:t.error)||(null==t?void 0:t.data))&&(null==v||v.error({id:"AI_IMAGE_GENERATION_FAILED",message:p("Something went wrong, please try again"),placement:"bottomRight",description:s,innerException:e,data:{request:s,taskId:S,response:null==t?void 0:t.data,error:null==t?void 0:t.error}})),t}))},[s,h,f,F,u,y,j,D,P,v,R,p,S]),H=c(()=>{$&&W()},[$,V,_,U,W,v,p]);a(()=>{},[m,V]);const G=c(e=>{if(!r){i(!0);const n=e.match(/^data:image\/([A-Za-z-+/]+);base64,(.+)$/);if(!n)return;const r=n[1],o=n[2],a=atob(o),s=new Array(a.length);for(let e=0;e<a.length;e++)s[e]=a.charCodeAt(e);const l=new Uint8Array(s),c=new Blob([l],{type:`image/${r}`}),u=new File([c],"image.jpeg",{type:c.type,lastModified:Date.now()});t({file:u})}},[r,i,t]);return a(()=>{(h||l.length>0)&&setTimeout(()=>{let t=350;n.current&&(t=n.current.offsetHeight-120),e(t)},0)},[n,l.length,h,e]),{aiImageCounter:C,setAiImageCounter:_,currentAiImgLimits:z,isFieldsDisabled:B,canGenerateImage:$,aiImageRequest:s,imageAiList:l,setImageAiList:u,isLoadingAi:h,setIsLoadingAi:f,loadingDuringGeneration:O,setLoadingDuringGeneration:F,requestStatus:I,setRequestStatus:T,handleGenerate:H,handleLimitAiImgCount:U,convertBase64ToFile:G,isShiftPressed:A,setIsShiftPressed:E,currentReqId:S,setCurrentReqId:k,limitsInPlugin:V}}({setFrameHeight:w,customRequest:n,aiTabRef:r,isImageUploaded:s,setIsImageUploaded:l,aiImageRequest:u,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:m}),[P,M]=o(!1),R=c(()=>M(!0),[]),L=c(()=>M(!1),[]),j=c(e=>h(e.target.value),[h]),N=c(e=>{"Shift"===e.key?I(!0):"Enter"!==e.key||E||(e.preventDefault(),k())},[E,k,I]),z=c(e=>{"Shift"===e.key&&I(!1)},[I]);return t("div",{className:wP.imageAi,children:[F&&e(bP,{text:"images",counter:x,limits:C,wrapperStyles:{marginTop:-25}}),e($,{gutter:24,className:wP.row,children:t(W,{span:24,children:[e(T.Item,{children:t("span",{className:`ant-input-affix-wrapper ant-input-affix-wrapper-lg ${wP.inputAffixWrapper}${P?" ant-input-affix-wrapper-focused":""}`,children:[e(O.TextArea,{ref:i,onKeyDown:N,onKeyUp:z,onFocus:R,onBlur:L,autoSize:!0,allowClear:!0,className:`${wP.textAreaInputHybrid} ${wP.textarea}`,placeholder:v("Generate image"),value:u,onChange:j,spellCheck:"false"}),e("span",{className:`ant-input-suffix ${wP.inputSuffix}`,children:g||_?e(re,{className:`${wP.inputIcon} input-icon`,spin:!0}):e(y,{className:`${wP.inputIcon} input-icon`,onClick:k})})]})}),t("div",{children:[e("span",{className:wP.imageAiExample,children:"For example:"})," ",v("A beautiful image of a sunset over a calm ocean")]})]})}),(g||f.length>0)&&t(Q,{dotPosition:"top",arrows:!0,nextArrow:e(xP,{}),prevArrow:e(CP,{}),className:wP.carousel,infinite:!1,children:[g&&!f.length&&e("div",{className:wP.loading,children:t("div",{className:"spin",children:[e(re,{style:{fontSize:48},spin:!0}),e("p",{className:"status",children:S})]})}),f.length>0&&f.map((n,r)=>t("div",{className:wP.imageItem,children:[e(vP,{images:f,frameHeight:b}),e("div",{className:"buttons",children:f.length>0&&!g&&e(D,{onClick:()=>A(`data:image/jpeg;base64, ${n}`),icon:e(be,{}),children:v("Use this variant")})})]},r))]})]})},SP=e=>{(null==e?void 0:e.customTheme)&&((e={})=>{const t=document.querySelector("head");if(!t)return;const n=document.createElement("style");if(n.type="text/css",n.dataset.themeVariablesFm="true",n.setAttribute("data-file-manager","true"),Object.entries(e).length){let r="";Object.entries(e).forEach(([e,t])=>{"object"!=typeof t&&(r+=`\t--${e}: ${t};\n`)}),r=`.em-filemanager {\n${r}}`,n.appendChild(document.createTextNode(r));const i=t.querySelector('[data-theme-variables-fm="true"]');i?t.replaceChild(n,i):t.insertBefore(n,t.firstChild)}})(null==e?void 0:e.customTheme)},{Sider:kP,Content:AP}=K,EP=({itemIds:t,onUndo:n,onClose:r})=>{const{t:i}=Nn();return a(()=>{const e=setTimeout(()=>r(),5e3);return()=>clearTimeout(e)},[r]),e("div",{style:{position:"fixed",bottom:24,right:24,maxWidth:420,zIndex:1e3},children:e(ee,{message:i("moved_to_trash",{count:t.length}),type:"success",showIcon:!0,action:e(D,{size:"small",type:"text",onClick:()=>n(),children:i("undo")}),closable:!0,onClose:r})})},IP={keywords:""},TP=()=>{var s;const l=bi(),d=xi(),h=(()=>{var e,t;const{state:n,actions:r,options:i}=ui(),{selectedFolder:o,pathHistory:a,folders:s}=n,{t:l}=Nn(),{setSelectedFolder:u,setPathHistory:d}=r,h=c(()=>{var e;return`em_fm:lastFolder:${(null===(e=null==i?void 0:i.config)||void 0===e?void 0:e.projectId)||"default"}`},[null===(e=null==i?void 0:i.config)||void 0===e?void 0:e.projectId]),f=c((e,t=new Set)=>{if(t.has(e))return console.warn(`Обнаружен цикл в пути к папке с id=${e}`),[];const n=(Array.isArray(s)?s:[]).find(t=>t.id===e);if(!n)return[];const r=new Set(t);return r.add(e),n.parentId?n.parentId===n.id?(console.warn(`Обнаружена циклическая зависимость: папка ${n.id} является родителем самой себя`),[{id:n.id,name:n.name+" (ошибка)"}]):[...f(n.parentId,r),{id:n.id,name:n.name}]:[{id:n.id,name:n.name}]},[s]),p=c(e=>{var t;if("undefined"==typeof window)return;const n=!1!==(null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.rememberLastFolder),r=h();try{if(!n)return void localStorage.removeItem(r);e?localStorage.setItem(r,e):localStorage.removeItem(r)}catch(e){console.warn("localStorage недоступен для сохранения последней папки")}},[h,null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.rememberLastFolder]),g=c(e=>{if("folders"===e){const e=[{id:"folders",name:l("Folders")}];return null==d||d(e),void(i.onPathChange&&i.onPathChange([]))}if(!(Array.isArray(s)?s:[]).find(t=>t.id===e))return void console.warn("⚠️ Папка не найдена:",e);const t=f(e),n=[{id:"folders",name:l("Folders")},...t];null==d||d(n),i.onPathChange&&i.onPathChange(n.map(e=>e.name))},[s,f,d,i,l]),m=c(e=>{const t="folders"===e?null:e;t!==o&&(null==u||u(t),p(t),g(e))},[p,o,u,g]),v=c(e=>{if(-1===e)null==u||u(null),null==d||d([{id:"folders",name:l("Folders")}]),i.onPathChange&&i.onPathChange([]);else{const t=a.slice(0,e+1),n=t[t.length-1],r="folders"===n.id?void 0:n.id;null==u||u(r||null),null==d||d(t),i.onPathChange&&i.onPathChange(t.map(e=>e.name))}},[i,a,d,u,l]),y=c(e=>{if(!e.isFolder)return;null==u||u(e.id);const t={id:e.id,name:e.name};if(d){const e=[...a,t];d(e)}if(i.onPathChange){const t=[...a.map(e=>e.name),e.name];i.onPathChange(t)}},[i,a,d,u]);return{state:{selectedFolder:o,pathHistory:a},actions:{handleFolderSelect:m,handleBreadcrumbClick:v,handleItemClick:y},selectedFolder:o,pathHistory:a,handleFolderSelect:m,handleBreadcrumbClick:v,handleItemClick:y}})(),f=(()=>{const{state:e,actions:t}=ui(),{pagination:n}=e,{setPagination:r}=t,i=c((e,t)=>{const i=t||n.pageSize;null==r||r({current:e,pageSize:i,total:n.total})},[n.pageSize,n.total,r]);return{state:{pagination:n},actions:{handlePaginationChange:i}}})(),p=(()=>{const[e,t]=r.useState(()=>{const e=localStorage.getItem(Ci);return e?Math.max(290,parseInt(e,10)):298}),[n,i]=r.useState(!1),[o,a]=r.useState(!1),[s,l]=r.useState(0),c=r.useCallback(()=>{console.log("Double click: Resetting to default width"),t(298),localStorage.setItem(Ci,298..toString())},[]),u=r.useCallback(n=>{n.preventDefault(),n.stopPropagation(),i(!0),document.body.classList.add("resizing");const r=n.clientX,o=e;let s=o;const c=e=>{e.preventDefault();const n=Math.max(Math.min(o+e.clientX-r,600),290);s=n,t(n),l(e.clientX),a(!0)},u=()=>{i(!1),document.body.classList.remove("resizing"),a(!1),localStorage.setItem(Ci,s.toString()),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)},[e]);return r.useEffect(()=>()=>{document.body.classList.remove("resizing")},[]),{sidebarWidth:e,isResizing:n,showResizeGuide:o,resizeGuidePosition:s,handleResizeStart:u,handleDoubleClick:c}})(),g=(()=>{const[e,t]=o([]),[n,r]=o(!1),[i,a]=o(!1),s=u(0),l=c(()=>(s.current+=1,`upload_${s.current}_${Date.now()}`),[]),d=c(e=>`${(e.size/1024).toFixed(2)} КБ`,[]),h=c(e=>{const n=e.map(e=>({id:l(),name:e.name,size:d(e),status:"uploading",progress:0}));return t(n),r(!0),a(!1),n.map(e=>e.id)},[l,d]),f=c((e,n)=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{progress:Math.min(100,Math.max(0,n))}):t))},[]),p=c(e=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{status:"success",progress:100}):t))},[]),g=c((e,n)=>{t(t=>t.map(t=>t.id===e?Object.assign(Object.assign({},t),{status:"error",error:n}):t))},[]),m=c(()=>{r(!1),a(!1),setTimeout(()=>{t([])},300)},[]),v=c(()=>{a(e=>!e)},[]),y=c(e=>{t(t=>{const n=t.filter(t=>t.id!==e);return 0===n.length&&setTimeout(()=>{r(!1),a(!1)},100),n})},[]),b=e.length,w=e.filter(e=>"success"===e.status||"error"===e.status).length;return{uploadFiles:e,isUploadVisible:n,isUploadMinimized:i,totalFiles:b,completedFiles:w,startUpload:h,updateProgress:f,markAsSuccess:p,markAsError:g,closeUpload:m,minimizeUpload:v,insertFile:y}})(),m=wi(),{t:v}=Nn(),y=i.useRef(null),{folders:b,loading:w}=l.state,{fetchFolders:x,fetchChildFolders:C,handleCreateFolder:_,handleModalOk:S,handleModalCancel:k,generateMenuItems:A}=l.actions,E=(e=>{var t;const{state:n,actions:r,options:i}=ui(),{t:o}=Nn(),a=gi(),{folders:s,folderToRename:l,renameFolderForm:u,isRenameFolderModalVisible:d}=n,{setFolderToRename:h,setIsRenameFolderModalVisible:f}=r,{apiEndpoints:p,dataProviders:g,config:m}=i,v=c(e=>{null==h||h(e),null==f||f(!0);const t=null==s?void 0:s.find(t=>t.id===e);t&&u&&u.setFieldsValue({newFolderName:t.name})},[h,f,s,u]),y=c(()=>{null==f||f(!1),null==h||h(null),null==u||u.resetFields()},[f,h,u]),b=c(async()=>{var t,n;if(l&&u)try{const i=await u.validateFields();if(!(null==i?void 0:i.newFolderName))return void a.warning({id:"FOLDER_OPERATION_VALIDATION_FAILED",message:o("Folder name cannot be empty"),placement:"bottomRight",data:{folderId:l,folderName:null==i?void 0:i.newFolderName,reason:"emptyName"}});if(!1===(null===(t=null==m?void 0:m.features)||void 0===t?void 0:t.enableRenameFolder))return void a.error({id:"FOLDER_RENAME_DISABLED_BY_CONFIG",message:o("Folder rename is disabled by config"),placement:"bottomRight",data:{itemId:null!=l?l:void 0,itemName:null==i?void 0:i.newFolderName}});if(!(null==g?void 0:g.renameFolder))throw new Error("renameFolder не реализован в dataProviders");const s=await g.renameFolder(l,i.newFolderName.trim());if(!(null==s?void 0:s.id))return void a.error({id:"FOLDER_RENAME_FAILED",message:o("Unexpected response when renaming folder"),placement:"bottomRight",data:{itemId:null!=l?l:void 0,itemName:i.newFolderName,reason:"invalidResponse"}});a.success({id:"FOLDER_RENAME_SUCCESS",message:o("Folder renamed"),placement:"bottomRight",data:{itemId:s.id,itemName:s.name,folderId:null!==(n=s.parentId)&&void 0!==n?n:null}}),y(),await e(),l!==s.id&&r.setSelectedFolder&&r.setSelectedFolder(s.id)}catch(e){console.error("Ошибка при переименовании папки:",e),a.error({id:"FOLDER_RENAME_FAILED",message:o("Failed to rename folder"),placement:"bottomRight",innerException:e,data:{itemId:null!=l?l:void 0,itemName:null==u?void 0:u.getFieldValue("newFolderName"),reason:e instanceof Error?e.message:String(e)}})}},[l,u,p,y,e,o,null===(t=null==m?void 0:m.features)||void 0===t?void 0:t.enableRenameFolder,a]);return{state:{isRenamingFolder:d||!1,folderToRename:l},actions:{showRenameFolderModal:v,handleRenameFolderCancel:y,handleRenameFolderOk:b}}})(x),{files:I,selectedFiles:T,loading:O,isRenamingFile:F,fileToRename:P}=d.state,{fetchFiles:M,handleDeleteFile:R,handleDeleteFolder:L,handleAddFile:j,handleAddFileByUrl:N,uploadFileWithProvider:z,toggleFileSelection:B,showRenameModal:V,handleRenameCancel:U,handleRenameOk:$,handleDroppedFiles:W,showMoveModal:H,handleMoveCancel:G,handleMoveOk:Y,handleCopyOk:q,handleCopyCancel:Z,showDeleteConfirm:J,handleDeleteConfirmCancel:Q,handleDeleteConfirmOk:ee}=d.actions,{selectedFolder:te,pathHistory:ne}=h.state,{handleFolderSelect:re,handleBreadcrumbClick:ie,handleItemClick:oe}=h.actions,{pagination:ae}=f.state,se=pi(M),{searchTerm:le,sortBy:ce,sortOrder:ue}=se.state,{handleSearch:de,handleSort:he,handlePaginationChange:fe}=se.actions,pe=(({files:e,selectedFiles:t,fetchFiles:n,selectedFolder:i})=>{const o=gi(),{options:a,actions:s,state:l}=r.useContext(ci),{setActiveLibraryItem:c}=s,{activeLibraryItem:u}=l,[d,h]=r.useState(!1),[f,p]=r.useState(null),g=r.useCallback(e=>{var t;if(e.type&&e.type.startsWith("image/"))return!0;if(e.extension){const t=e.extension.toLowerCase();return on.includes(t)}const n=null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase();return!!n&&on.includes(n)},[]),m=r.useCallback(async e=>{var t,n,r,i;const{dataProviders:o}=a;if(console.log("🔧 saveFileToServer: dataProviders доступны:",{hasUpdateFile:!!(null==o?void 0:o.updateFile),hasUploadFile:!!(null==o?void 0:o.uploadFile),hasThumbnail:!!e.thumbnail,fileId:e.id}),!1!==(null===(n=null===(t=a.config)||void 0===t?void 0:t.features)||void 0===n?void 0:n.enableUpdateFile)&&(null==o?void 0:o.updateFile)&&e.thumbnail)try{const t=mn(e.thumbnail,e.type),n=vn(t),r=e.name.substring(0,e.name.lastIndexOf("."))+"."+n,i=xn(e.thumbnail,t);return await o.updateFile(e.id,{name:r,type:t,data:i})}catch(e){return console.error("Ошибка при обновлении файла через updateFile:",e),null}else if((null==o?void 0:o.uploadFile)&&e.thumbnail)try{const t=mn(e.thumbnail,e.type),n=xn(e.thumbnail,t);await o.uploadFile(Object.assign(Object.assign({},e),{type:t,data:n,size:n.size||e.size||0}))}catch(e){return console.error("Ошибка при сохранении файла через uploadFile:",e),null}else if(!1!==(null===(i=null===(r=a.config)||void 0===r?void 0:r.features)||void 0===i?void 0:i.enableRenameFile)&&(null==o?void 0:o.renameFile))try{return await o.renameFile(e.id,e.name)}catch(e){return console.error("Ошибка при переименовании файла:",e),null}return console.warn("DataProvider для обновления файлов не настроен"),null},[a]),v=r.useCallback(n=>{let r;if(console.log("🎨 handleEdit ВЫЗВАНА!",{fileForEdit:n,selectedFilesSize:t.size}),n)console.log("fileForEdit",n),r=n;else{if(1!==t.size)return;const n=Array.from(t)[0];if(r=e.find(e=>e.id===n),!r||r.isFolder||!g(r))return}console.log("🎨 usePixieEditor: Открываем редактор для файла:",r),c&&c(Jt),console.log("🎨 usePixieEditor: Устанавливаем editingFile"),p(r),console.log("🎨 usePixieEditor: Устанавливаем isPixieEditorVisible = true"),h(!0),console.log("🎨 usePixieEditor: Редактор должен открыться")},[t,e,g,h,c]),y=r.useCallback(()=>{console.log("🎨 usePixieEditor: Закрываем редактор"),c&&u===Jt&&c(qt),h(!1),p(null),console.log("🎨 usePixieEditor: Редактор закрыт")},[u,c]),b=r.useCallback(async e=>{var t,r,s,l;console.log("Файл обновлен:",e);try{const s=await m(e);if(s)return o.success({id:"IMAGE_UPDATE_SUCCESS",message:"Успех",description:"Изображение успешно обновлено",placement:"bottomRight",data:{itemId:null!==(t=s.id)&&void 0!==t?t:void 0,itemName:s.name,folderId:null!==(r=s.folderId)&&void 0!==r?r:null,thumbnail:s.thumbnail}}),a.onEditorOk&&a.onEditorOk(s),await n({folderId:i||""}),y(),s}catch(t){console.error("Ошибка при сохранении файла:",t),o.error({id:"IMAGE_SAVE_FAILED",message:"Ошибка",description:`Не удалось сохранить изменения: ${t instanceof Error?t.message:"Неизвестная ошибка"}`,innerException:t,placement:"bottomRight",data:{itemId:null!==(s=e.id)&&void 0!==s?s:void 0,itemName:e.name,folderId:null!==(l=e.folderId)&&void 0!==l?l:null,thumbnail:e.thumbnail}})}},[m,a,n,i,o,y]);return{isPixieEditorVisible:d,editingFile:f,handleEdit:v,handlePixieEditorSave:b,handlePixieEditorClose:y}})({files:I||[],selectedFiles:T||new Set,fetchFiles:M,selectedFolder:te||null}),ge=i.useCallback(async()=>{var e;await ee(),await x(),await(null===(e=y.current)||void 0===e?void 0:e.refreshFileCounts())},[x,ee]),me=i.useCallback(async e=>{var t;await Y(e),await(null===(t=y.current)||void 0===t?void 0:t.refreshFileCounts())},[Y]),ve=i.useCallback(async e=>{var t;await q(e),await(null===(t=y.current)||void 0===t?void 0:t.refreshFileCounts())},[q]),ye=i.useCallback(async()=>{let e=[],t=new Map;await j({onStartBatch:n=>{e=g.startUpload(n),t=new Map(n.map((t,n)=>[t.name,e[n]])),console.warn("🚀 onStartBatch: файлы запущены",{count:n.length,currentIds:e})},onStart:n=>{0===e.length&&(e=g.startUpload([n]),t.set(n.name,e[0]))},onProgress:(e,n)=>{const r=t.get(e);r&&g.updateProgress(r,n)},onComplete:async e=>{var n;const r=t.get(e);r&&g.markAsSuccess(r),await(null===(n=y.current)||void 0===n?void 0:n.refreshFileCounts())},onError:(e,n)=>{const r=t.get(e);r&&g.markAsError(r,n)}})},[j,g]),be=i.useCallback(async(e,t)=>{var n;await N(e,t),await(null===(n=y.current)||void 0===n?void 0:n.refreshFileCounts())},[N]),we=i.useCallback(async({file:e})=>{var t;const n=await z(e);return await(null===(t=y.current)||void 0===t?void 0:t.refreshFileCounts()),n},[z]),xe=i.useCallback(async e=>{var t;await R(e),await(null===(t=y.current)||void 0===t?void 0:t.refreshFileCounts())},[R]),Ce=i.useCallback(async e=>{var t;if(W){const n=g.startUpload(e);console.warn("🚀 Drag&Drop: файлы запущены",{fileCount:e.length,fileIds:n}),e.forEach(async(e,t)=>{const r=n[t];if(!r)return;let i=0;const o=setInterval(()=>{i=Math.min(i+10+Math.floor(Date.now()%10),85),g.updateProgress(r,i)},200);setTimeout(()=>{clearInterval(o)},2e3)}),await W(e),n.forEach(e=>{g.updateProgress(e,100),g.markAsSuccess(e)}),await(null===(t=y.current)||void 0===t?void 0:t.refreshFileCounts())}},[W,g]),_e=i.useCallback(async e=>{var t;await L(e),await x(),await(null===(t=y.current)||void 0===t?void 0:t.refreshFileCounts())},[L,x]),Se=(({files:e,selectedFiles:t,toggleFileSelection:n,showRenameModal:i,showMoveModal:o,showCopyModal:a,handleDeleteFile:s,handleDeleteFolder:l,showDeleteConfirm:c,onEdit:u})=>{const d=r.useCallback(()=>{t&&t.size>0&&t.forEach(e=>{n(e)})},[t,n]),h=r.useCallback(e=>{if(t&&1===t.size||e){const n=e||Array.from(t)[0];i(n)}},[t,i]),f=r.useCallback(n=>{if(t&&t.size>0||(null==n?void 0:n.id)){if(c)return void c();(n?[n.id]:t).forEach(t=>{const n=e.find(e=>e.id===t);console.log("item",n),n?n.isFolder?l(t):s(t):console.warn(`Объект с ID ${t} не найден в списке файлов`)})}},[t,e,s,l,c]);return{handleClearSelection:d,handleRename:h,handleDeleteSelected:f,handleCopy:r.useCallback(()=>{a()},[a]),handleMove:r.useCallback(()=>{o()},[o]),handleEdit:r.useCallback(()=>{console.log("onEdit"),u()},[u])}})({files:I||[],selectedFiles:T||new Set,toggleFileSelection:B,showRenameModal:V,showMoveModal:H,showCopyModal:d.actions.showCopyModal||(()=>{}),handleDeleteFile:R,handleDeleteFolder:_e,showDeleteConfirm:J,onEdit:pe.handleEdit}),ke=w||O,{options:Ae}=i.useContext(ci),Ee=null==Ae?void 0:Ae.config;a(()=>{pn(),x()},[x]),i.useEffect(()=>{if(!re||0===b.length)return;const e=!!(null==Ee?void 0:Ee.rememberLastFolder),t=`em_fm:lastFolder:${(null==Ee?void 0:Ee.projectId)||"default"}`;if(e&&"undefined"!=typeof window)try{const e=localStorage.getItem(t);if(e&&b.some(t=>t.id===e))return void re(e)}catch(e){}te||re("folders")},[te,re,b,null==Ee?void 0:Ee.rememberLastFolder,null==Ee?void 0:Ee.projectId]);const{state:Ie,actions:Te,options:Oe}=i.useContext(ci),{form:Fe,urlForm:Pe,renameForm:Me,moveForm:Re,renameFolderForm:Le,copyForm:je,isModalVisible:De,isUrlModalVisible:Ne,isMoveModalVisible:ze,isRenameFolderModalVisible:Be,isCopyModalVisible:Ve,isDeleteConfirmVisible:Ue,folderToRename:$e,activeLibraryItem:We}=Ie,{setIsUrlModalVisible:He,setSortField:Ge,setActiveLibraryItem:Ye,setUndoDeletion:qe}=Te,{config:Xe}=Oe,Ke=gi(),{handleRenameFolderCancel:Ze,handleRenameFolderOk:Je}=E.actions,Qe=c(e=>{fe(e.current||ae.current,e.pageSize||ae.pageSize)},[fe,ae]),et=i.useCallback(e=>{const{sortBy:t,sortOrder:n}=(e=>{const[t,n]=e.split("-");return{sortBy:t,sortOrder:n}})(e);he(t,n)},[he]),[tt,nt]=o(IP),[rt,it]=o([]),ot=u(null),[at,st]=o(sn),[lt,ct]=o([]),ut=u(null),[dt,ht]=o(""),[ft,pt]=o([]),gt=i.useRef(void 0),[mt,vt]=o(!1),[yt,bt]=o(!1),wt=i.useRef(null),xt=i.useRef(null),Ct=c(async()=>{const e=null==Xe?void 0:Xe.fileForEdit;if(gt.current!==e){gt.current=e;try{if(!(We===Jt&&e&&!pe.editingFile))return;if("string"==typeof e){if(e.startsWith("data:"))return void(null==pe||pe.handleEdit({thumbnail:e}));const t=await m.handleAddFileByUrl(e,!0);if(!t)throw new Error("Не удалось загрузить файл");gt.current===e&&(null==pe||pe.handleEdit(t))}}finally{gt.current===e&&(gt.current=null)}}},[null==Xe?void 0:Xe.fileForEdit,We,pe,m]);a(()=>{Ct()},[Ct]),a(()=>{var e,t,n;We===qt?(console.warn("reset requests"),it([]),nt(IP),ct([]),st(sn),pt([]),ht(""),bt(!1),vt(!1)):We===Zt?null===(e=xt.current)||void 0===e||e.focus():We===Xt?null===(t=ot.current)||void 0===t||t.focus():We===Kt&&(null===(n=ut.current)||void 0===n||n.focus())},[We]);const _t=i.useCallback(async()=>{var e;await Je(),await(null===(e=y.current)||void 0===e?void 0:e.refreshFileCounts())},[Je]),St=T.size,kt=i.useMemo(()=>{var e,t;if(1!==St)return!1;const n=Array.from(T)[0],r=I.find(e=>e.id===n);if(!r||r.isFolder)return!1;let i=!1;if(r.type&&r.type.startsWith("image/"))i=!0;else if(r.extension){const e=r.extension.toLowerCase();i=on.includes(e)}else{const t=null===(e=r.name.split(".").pop())||void 0===e?void 0:e.toLowerCase();i=!!t&&on.includes(t)}return console.log("isImageSelected проверка:",{fileName:r.name,fileType:r.type,fileExtension:r.extension,nameExtension:null===(t=r.name.split(".").pop())||void 0===t?void 0:t.toLowerCase(),isImage:i,IMAGE_EXTENSIONS:on}),i},[St,T,I]);return t(K,{className:"file-manager__layout",children:[p.showResizeGuide&&e("div",{className:"resize-guide",style:{left:`${p.resizeGuidePosition}px`}}),t(K,{className:"file-manager__content",children:[t(kP,{width:320,theme:"light",className:"file-manager-sider",children:[e(go,{ref:y,selectedFolder:te||"folders",generateMenuItems:A,onFolderSelect:e=>null==re?void 0:re(e),folders:b||[],fetchFolders:x,fetchChildFolders:C,handleAddFile:ye,setIsUrlModalVisible:e=>null==He?void 0:He(e),handleDeleteFolder:_e,handleCreateFolder:_,activeLibraryItem:We,setActiveLibraryItem:e=>null==Ye?void 0:Ye(e)}),e("div",{className:"sidebar-resizer "+(p.isResizing?"resizing":""),onMouseDown:p.handleResizeStart,onDoubleClick:p.handleDoubleClick,children:e("div",{className:"sidebar-resizer-indicator"})})]}),e(K,{className:"file-manager__main-content",children:t(AP,{className:"main-content",ref:wt,children:[e(YF,{activeLibraryItem:We,selectedFolder:(null===(s=null==b?void 0:b.find(e=>(null==e?void 0:e.id)===te))||void 0===s?void 0:s.name)||v("Folders")}),e(X,{className:"zero-divider"}),We===qt&&e(so,{searchTerm:le,sortField:Ie.sortField||"name",setSortField:e=>null==Ge?void 0:Ge(e),pathHistory:ne||[],handleBreadcrumbClick:e=>null==ie?void 0:ie(e),handleAddFile:ye,setIsUrlModalVisible:e=>null==He?void 0:He(e),files:I||[],handleSearch:de,handleSort:he,sortBy:ce,sortOrder:ue,handleSortOptionChange:et,pagination:ae,setPagination:Qe,loading:ke,handleItemClick:e=>null==oe?void 0:oe(e),handleDeleteFile:xe,selectedFiles:T||new Set,toggleFileSelection:e=>null==B?void 0:B(e),handleDroppedFiles:Ce,fileUpload:g,onClearSelection:Se.handleClearSelection,onRename:Se.handleRename,onCopy:Se.handleCopy,onMove:Se.handleMove,onDelete:Se.handleDeleteSelected,onEdit:pe.handleEdit}),We===Xt&&e(uP,{imageGifList:rt,setImageGifList:it,currentReqGif:tt,setCurrentReqGif:nt,inputRef:ot,customRequest:be}),We===Kt&&e(fP,{imageStockList:lt,setImageStockList:ct,currentReq:at,setCurrentReq:st,inputRef:ut,customRequest:be}),We===Zt&&!!(null==Xe?void 0:Xe.sseQuery)&&e(_P,{imageAiList:ft,setImageAiList:pt,aiImageRequest:dt,setAiImageRequest:ht,inputAiRef:xt,customRequest:we,isLoadingAi:mt,setIsLoadingAi:vt,isImageUploaded:yt,setIsImageUploaded:bt,aiTabRef:wt}),We===Jt&&e(n,{}),e("div",{children:kt&&t(n,{children:[e(X,{className:"zero-divider"}),e("div",{style:{display:"flex",justifyContent:"right",padding:"17px 24px",alignItems:"center"},children:e(D,{size:"large",type:"primary",style:{height:40},onClick:()=>{if(Oe.onEditorOk){const e=Array.from(T)[0],t=I.find(t=>t.id===e);t&&Oe.onEditorOk(t)}},children:v("Choose")})})]})})]})})]}),e(fo,{isModalVisible:De,handleModalOk:S,handleModalCancel:k,form:Fe,selectedFolder:te||null,folders:b||[],isUrlModalVisible:Ne,setIsUrlModalVisible:e=>null==He?void 0:He(e),handleAddFileByUrl:be,urlForm:Pe,isRenameModalVisible:F,handleRenameOk:()=>null==$?void 0:$(),handleRenameCancel:()=>null==U?void 0:U(),renameForm:Me,fileToRename:P,files:I||[],isMoveModalVisible:ze,handleMoveOk:me,handleMoveCancel:G,moveForm:Re,selectedFiles:T||new Set,isRenameFolderModalVisible:Be,handleRenameFolderOk:_t,handleRenameFolderCancel:Ze,renameFolderForm:Le,folderToRename:$e,isCopyModalVisible:Ve,handleCopyOk:ve,handleCopyCancel:Z,copyForm:je,isDeleteConfirmVisible:Ue,handleDeleteConfirmOk:ge,handleDeleteConfirmCancel:()=>null==Q?void 0:Q(),fetchChildFolders:C}),Ie.undoDeletion&&e(EP,{itemIds:Ie.undoDeletion.itemIds,sourceFolderId:Ie.undoDeletion.sourceFolderId||"folders",onClose:()=>null==qe?void 0:qe(null),onUndo:async()=>{var e,t,n,r,i,o,a,s,l,c,u,d,h;try{const o=null!==(t=null===(e=Ie.undoDeletion)||void 0===e?void 0:e.itemIds)&&void 0!==t?t:[],a=(null===(n=Ie.undoDeletion)||void 0===n?void 0:n.sourceFolderId)||"folders";if(null===(r=Oe.dataProviders)||void 0===r?void 0:r.moveItems)await Oe.dataProviders.moveItems("folders"===a?"":a,o);else if(null===(i=Oe.dataProviders)||void 0===i?void 0:i.moveItem)for(const e of o){const t=e.startsWith("folder_");await Oe.dataProviders.moveItem({itemId:e,targetFolderId:"folders"===a?"":a,isFolder:t})}Ke.success({id:"FILES_MOVE_SUCCESS",message:v("restored_items",{count:o.length}),placement:"bottomRight",data:{successCount:o.length,totalCount:o.length,itemIds:o}}),null==qe||qe(null),await x(),await M({folderId:te||"",page:ae.current,limit:ae.pageSize})}catch(e){Ke.error({id:"FILES_MOVE_ERROR",message:v("Error when moving a file"),placement:"bottomRight",data:{failCount:null!==(s=null===(a=null===(o=Ie.undoDeletion)||void 0===o?void 0:o.itemIds)||void 0===a?void 0:a.length)&&void 0!==s?s:0,totalCount:null!==(u=null===(c=null===(l=Ie.undoDeletion)||void 0===l?void 0:l.itemIds)||void 0===c?void 0:c.length)&&void 0!==u?u:0,itemIds:null!==(h=null===(d=Ie.undoDeletion)||void 0===d?void 0:d.itemIds)&&void 0!==h?h:[]},innerException:e})}}}),e(WF,{visible:pe.isPixieEditorVisible,onClose:pe.handlePixieEditorClose,file:pe.editingFile,onSave:pe.handlePixieEditorSave})]})},OP=f(({config:r={},onPathChange:o,onChangeSelection:s,onEditorOk:l,searchQuery:c="",sortBySize:d="name",apiEndpoints:h={},customIcons:f,dragDropIcon:p,dataProviders:g,handleNotify:m,handleError:v,handleSuccess:y})=>{const b=i.useMemo(()=>Object.assign({folderTreeLoading:"lazy",expandAllFoldersOnInit:!1,expandRootFolderOnInit:!1,iconStrokeWidth:1.4},r),[r]);i.useEffect(()=>{b.theme&&(e=>{if("system"===e){const t=matchMedia(nn).matches?en:Qt;e=e===tn?t:e}document.documentElement.setAttribute("data-theme",e)})(b.theme),SP(b)},[b]),a(()=>{b.locale&&b.locale!==Tr.language&&(console.warn("FileManagerApp: меняем локаль с",Tr.language,"на",b.locale),Tr.changeLanguage(b.locale)),b.customLocale&&b.locale&&Tr.addResourceBundle(b.locale,"translation",b.customLocale,!0,!0)},[b.locale,b.customLocale]);const w=u(null);return e(I,{className:"em-filemanager",children:t(n,{children:[e(E,{getPopupContainer:()=>w.current||document.body,children:e(di,{options:{apiEndpoints:h,searchQuery:c,sortBySize:d,onPathChange:o,onChangeSelection:s,onEditorOk:l,config:b,customIcons:f,dragDropIcon:p,dataProviders:g,handleNotify:m,handleError:v,handleSuccess:y},children:e(TP,{})})}),e("div",{ref:w,className:"file-manager-modal-root"})]})})});OP.displayName="FileManagerApp";const FP=t=>{var n,r,i;return e(zn,{i18n:Tr,children:e(un,{externalTheme:null!==(r=null===(n=t.config)||void 0===n?void 0:n.theme)&&void 0!==r?r:"light",customThemeToken:null===(i=t.config)||void 0===i?void 0:i.customTheme,children:e(te,{children:e(OP,Object.assign({},t))})})})},PP=new Map,MP=(t,n)=>{var r;let i;pn();let o={};const a=e=>{const t=!e||"fileManager"!==e.mode&&"imageCenter"!==e.mode&&"plugin"!==e.mode?void 0:e.mode;return"imageCenter"===t?hn("imageCenter",e):hn(t)};if(t instanceof HTMLElement){i=t;o={config:a(n),apiEndpoints:null==n?void 0:n.apiEndpoints}}else{i=t.element;const e=a(t.config),n=Object.assign(Object.assign({},null===(r=t.config)||void 0===r?void 0:r.apiEndpoints),t.apiEndpoints);o={config:e,currentPath:t.currentPath,onPathChange:t.onPathChange,onChangeSelection:t.onChangeSelection,searchQuery:t.searchQuery,sortBySize:t.sortBySize,apiEndpoints:n,dataProviders:t.dataProviders,customIcons:t.customIcons,dragDropIcon:t.dragDropIcon,handleNotify:t.handleNotify,handleError:t.handleError,handleSuccess:t.handleSuccess}}const s=S(i);s.render(e(FP,Object.assign({},o))),PP.set(i.id||`container_${Date.now()}`,s)},RP=e=>{const t=e.id||Object.keys(PP).find(e=>e.startsWith("container_"));if(t&&PP.has(t)){const e=PP.get(t);null==e||e.unmount(),PP.delete(t)}else{console.warn("Не удалось найти корень для размонтирования");try{S(e).unmount()}catch(e){console.error("Ошибка при размонтировании компонента:",e)}}},LP=new Map,jP=r=>{const{onClose:o,onSave:a,dataProviders:s,theme:l}=r,c=i.useMemo(()=>{if(r.file)return r.file;const e=r.name||"edited-image",t=r.extension||(r.type?r.type.split("/")[1]:"png"),n=r.type||`image/${t}`;return{thumbnail:r.imageDataUrl||"",name:e,id:void 0,type:n,extension:t}},[r.file,r.imageDataUrl,r.name,r.extension,r.type]),d=i.useCallback(async e=>{if(console.log("🔧 saveFileToServer: dataProviders доступны:",{hasUpdateFile:!!(null==s?void 0:s.updateFile),hasThumbnail:!!e.thumbnail,fileId:e.id}),(null==s?void 0:s.updateFile)&&e.thumbnail)try{const t=mn(e.thumbnail,e.type),n=vn(t),r=e.name.substring(0,e.name.lastIndexOf("."))+"."+n,i=xn(e.thumbnail,t);return await s.updateFile(e.id,{name:r,type:t,data:i})}catch(e){return console.error("Ошибка при обновлении файла через updateFile:",e),null}return console.warn("DataProvider для обновления файлов не настроен"),null},[s]),h=i.useCallback(async e=>{if((null==s?void 0:s.updateFile)&&e.id&&e.thumbnail)try{const t=await d(e);t&&(e=t)}catch(e){console.error("Standalone Pixie: saveFileToServer error",e)}return a&&await a(e),o&&o(),e},[s,a,o,d]),f=u(null);return e(I,{className:"em-filemanager",children:t(n,{children:[e(E,{getPopupContainer:()=>f.current||document.body,children:e(zn,{i18n:Tr,children:e(un,{externalTheme:null!=l?l:"light",children:e(te,{children:e(di,{options:{dataProviders:s,handleNotify:r.handleNotify,handleError:r.handleError,handleSuccess:r.handleSuccess,config:{theme:null!=l?l:"light",locale:r.locale,baseUrl:r.baseUrl,assetsUrl:r.assetsUrl,showNotifications:r.showNotifications}},children:e(WF,{visible:!0,onClose:o,file:c,onSave:h})})})})})}),e("div",{ref:f,className:"file-manager-modal-root"})]})})},DP=t=>{pn();const n=t.element,r=S(n);r.render(e(jP,Object.assign({},t))),LP.set(n.id||`pixie_container_${Date.now()}`,r)},NP=e=>{const t=Array.from(LP.keys()).find(e=>e.startsWith("pixie_container_")),n=e.id||t;if(n&&LP.has(n)){const e=LP.get(n);null==e||e.unmount(),LP.delete(n)}else{console.warn("Не удалось найти корень Pixie для размонтирования");try{S(e).unmount()}catch(e){console.error("Ошибка при размонтировании Pixie:",e)}}},zP=e=>{var t,n;const{mode:r,element:i,fileManager:o,pixieEditor:a,theme:s,dataProviders:l}=e;let c,u;const d={unmount:()=>{c&&RP(c),u&&NP(u)},unmountFileManager:void 0,unmountPixieEditor:void 0};switch(r){case"fileManager":c=i,MP(i,Object.assign(Object.assign({},null==o?void 0:o.config),{theme:s||(null===(t=null==o?void 0:o.config)||void 0===t?void 0:t.theme),apiEndpoints:null==o?void 0:o.apiEndpoints})),d.unmountFileManager=()=>RP(c);break;case"pixieEditor":u=i,DP(Object.assign({element:i,theme:s||(null==a?void 0:a.theme),dataProviders:l||(null==a?void 0:a.dataProviders)},a)),d.unmountPixieEditor=()=>NP(u);break;case"both":{const e=document.createElement("div");e.id="file-manager-container",e.style.cssText="height: 50%; border-bottom: 1px solid #d9d9d9;";const t=document.createElement("div");t.id="pixie-editor-container",t.style.cssText="height: 50%;",i.appendChild(e),i.appendChild(t),c=e,u=t,MP(c,Object.assign(Object.assign({},null==o?void 0:o.config),{theme:s||(null===(n=null==o?void 0:o.config)||void 0===n?void 0:n.theme),apiEndpoints:null==o?void 0:o.apiEndpoints})),DP(Object.assign({element:u,theme:s||(null==a?void 0:a.theme),dataProviders:l||(null==a?void 0:a.dataProviders)},a)),d.unmountFileManager=()=>RP(c),d.unmountPixieEditor=()=>NP(u);break}}return d};class BP extends Error{constructor(e,t,n,r){super(e),this.name="FileManagerApiError",this.code=t,this.httpStatus=n,this.details=r,Error.captureStackTrace&&Error.captureStackTrace(this,BP)}}var VP={init:MP,unmount:RP,initPixieEditor:DP,unmountPixieEditor:NP,initFileManager:zP};export{so as FileContent,BP as FileManagerApiError,OP as FileManagerApp,FP as FileManagerAppWithContext,fo as FileModals,go as FolderSidebar,jP as PixieOnlyApp,VP as default,MP as init,zP as initFileManager,DP as initPixieEditor,pn as installResizeObserverErrorHandler,gn as uninstallResizeObserverErrorHandler,RP as unmount,NP as unmountPixieEditor};
|
|
77
77
|
//# sourceMappingURL=file-manager.esm.js.map
|