PageSourceSearch

https://kocherga-club.ru/_resources/cloudfront/_next/static/chunks/2735-8897a580639a283057f3.js

js kocherga-club.ru collected 2026-10-05 03:31:30 UTC 24,199 bytes, 734 lines download raw bytes

1"use strict";
2(self.webpackChunk_N_E = self.webpackChunk_N_E || []).push([
3  [2735],
4  {
5    58322: function (e, n, i) {
6      i.d(n, {
7        c: function () {
8          return d;
9        },
10      });
11      var a = i(85893),
12        t = function (e) {
13          var n = e.text,
14            i = e.color,
15            t = e.picked;
16          return (0, a.jsx)("div", {
17            className: "cursor-pointer px-4 hover:filter hover:brightness-90",
18            style: { backgroundColor: i },
19            onClick: t,
20            children: n,
21          });
22        };
23      function d(e) {
24        var n = e.loading,
25          i = e.items,
26          d = e.item2text,
27          m = e.item2color;
28        return (0, a.jsx)("div", {
29          className:
30            "absolute t-8 ml-1 min-w-full z-10 shadow-floating select-none",
31          children: n
32            ? (0, a.jsx)("div", { children: "loading..." })
33            : i.map(function (n, i) {
34                return (0, a.jsx)(
35                  t,
36                  {
37                    text: d(n),
38                    color: m ? m(n) : "white",
39                    picked: function () {
40                      return e.picked(n);
41                    },
42                  },
43                  i,
44                );
45              }),
46        });
47      }
48    },
49    42735: function (e, n, i) {
50      var a = i(85893),
51        t = i(31504),
52        d = i(67294),
53        m = i(46829),
54        l = i(58322),
55        o = i(84161);
56      n.Z = function (e) {
57        var n = e.extra,
58          i = e.pickedExtra,
59          r = e.pickedWatchman,
60          k = (0, m.useQuery)(o.S9, { fetchPolicy: "cache-first" }),
61          u = (0, d.useMemo)(
62            function () {
63              if (k.loading) return [];
64              if (!k.data) return [];
65              var e = k.data.watchmen
66                  .filter(function (e) {
67                    return e.priority <= 2;
68                  })
69                  .sort(function (e, n) {
70                    return e.priority - n.priority;
71                  })
72                  .map(function (e) {
73                    return { type: "watchman", watchman: e };
74                  }),
75                i = n
76                  ? n.map(function (e) {
77                      return { type: "extra", extra: e };
78                    })
79                  : [];
80              return [].concat((0, t.Z)(e), (0, t.Z)(i));
81            },
82            [k, n],
83          ),
84          c = (0, d.useCallback)(
85            function (e) {
86              switch (e.type) {
87                case "watchman":
88                  return r(e.watchman);
89                case "extra":
90                  if (!i)
91                    throw new Error(
92                      "Can't pick extra option without pickedExtra",
93                    );
94                  return i(e.extra.text);
95              }
96            },
97            [r, i],
98          ),
99          s = (0, d.useCallback)(function (e) {
100            switch (e.type) {
101              case "watchman":
102                return (
103                  e.watchman.member.short_name ||
104                  "\u041d\u0435\u0442 \u0438\u043c\u0435\u043d\u0438"
105                );
106              case "extra":
107                return e.extra.text;
108            }
109          }, []),
110          v = (0, d.useCallback)(function (e) {
111            switch (e.type) {
112              case "watchman":
113                return e.watchman.member.color || "white";
114              case "extra":
115                return e.extra.color;
116            }
117          }, []);
118        return (0, a.jsx)(l.c, {
119          loading: k.loading,
120          item2text: s,
121          item2color: v,
122          items: u,
123          picked: c,
124        });
125      };
126    },
127    84161: function (e, n, i) {
128      i.d(n, {
129        z1: function () {
130          return l;
131        },
132        G: function () {
133          return o;
134        },
135        S9: function () {
136          return r;
137        },
138        fl: function () {
139          return k;
140        },
141        lg: function () {
142          return u;
143        },
144        AI: function () {
145          return c;
146        },
147        tE: function () {
148          return s;
149        },
150        Qm: function () {
151          return v;
152        },
153        hA: function () {
154          return N;
155        },
156        $K: function () {
157          return p;
158        },
159      });
160      var a = i(31504),
161        t = i(18703),
162        d = i(98458),
163        m = [
164          {
165            kind: "FragmentDefinition",
166            name: { kind: "Name", value: "WatchmanForPicker" },
167            typeCondition: {
168              kind: "NamedType",
169              name: { kind: "Name", value: "WatchmenWatchman" },
170            },
171            selectionSet: {
172              kind: "SelectionSet",
173              selections: [
174                { kind: "Field", name: { kind: "Name", value: "id" } },
175                { kind: "Field", name: { kind: "Name", value: "priority" } },
176                {
177                  kind: "Field",
178                  name: { kind: "Name", value: "member" },
179                  selectionSet: {
180                    kind: "SelectionSet",
181                    selections: [
182                      { kind: "Field", name: { kind: "Name", value: "id" } },
183                      {
184                        kind: "Field",
185                        name: { kind: "Name", value: "short_name" },
186                      },
187                      { kind: "Field", name: { kind: "Name", value: "color" } },
188                    ],
189                  },
190                },
191              ],
192            },
193          },
194        ],
195        l = {
196          kind: "Document",
197          definitions: [
198            {
199              kind: "FragmentDefinition",
200              name: { kind: "Name", value: "Shift" },
201              typeCondition: {
202                kind: "NamedType",
203                name: { kind: "Name", value: "WatchmenShift" },
204              },
205              selectionSet: {
206                kind: "SelectionSet",
207                selections: [
208                  { kind: "Field", name: { kind: "Name", value: "date" } },
209                  { kind: "Field", name: { kind: "Name", value: "shift" } },
210                  {
211                    kind: "Field",
212                    name: { kind: "Name", value: "watchman" },
213                    selectionSet: {
214                      kind: "SelectionSet",
215                      selections: [
216                        {
217                          kind: "FragmentSpread",
218                          name: { kind: "Name", value: "WatchmanForPicker" },
219                        },
220                      ],
221                    },
222                  },
223                  { kind: "Field", name: { kind: "Name", value: "is_night" } },
224                ],
225              },
226            },
227          ].concat((0, a.Z)(m)),
228        },
229        o = (0, t.V)({
230          kind: "Document",
231          definitions: [
232            {
233              kind: "OperationDefinition",
234              operation: "query",
235              name: { kind: "Name", value: "WatchmenWatchmenList" },
236              selectionSet: {
237                kind: "SelectionSet",
238                selections: [
239                  {
240                    kind: "Field",
241                    alias: { kind: "Name", value: "watchmen" },
242                    name: { kind: "Name", value: "watchmenWatchmenAll" },
243                    arguments: [
244                      {
245                        kind: "Argument",
246                        name: { kind: "Name", value: "currentStaff" },
247                        value: { kind: "BooleanValue", value: !0 },
248                      },
249                    ],
250                    selectionSet: {
251                      kind: "SelectionSet",
252                      selections: [
253                        {
254                          kind: "FragmentSpread",
255                          name: { kind: "Name", value: "Watchman" },
256                        },
257                      ],
258                    },
259                  },
260                ],
261              },
262            },
263          ].concat(
264            (0, a.Z)([
265              {
266                kind: "FragmentDefinition",
267                name: { kind: "Name", value: "Watchman" },
268                typeCondition: {
269                  kind: "NamedType",
270                  name: { kind: "Name", value: "WatchmenWatchman" },
271                },
272                selectionSet: {
273                  kind: "SelectionSet",
274                  selections: [
275                    { kind: "Field", name: { kind: "Name", value: "id" } },
276                    {
277                      kind: "Field",
278                      name: { kind: "Name", value: "priority" },
279                    },
280                    {
281                      kind: "Field",
282                      name: { kind: "Name", value: "grade" },
283                      selectionSet: {
284                        kind: "SelectionSet",
285                        selections: [
286                          {
287                            kind: "Field",
288                            name: { kind: "Name", value: "id" },
289                          },
290                          {
291                            kind: "Field",
292                            name: { kind: "Name", value: "code" },
293                          },
294                        ],
295                      },
296                    },
297                    {
298                      kind: "Field",
299                      name: { kind: "Name", value: "member" },
300                      selectionSet: {
301                        kind: "SelectionSet",
302                        selections: [
303                          {
304                            kind: "Field",
305                            name: { kind: "Name", value: "id" },
306                          },
307                          {
308                            kind: "Field",
309                            name: { kind: "Name", value: "short_name" },
310                          },
311                        ],
312                      },
313                    },
314                  ],
315                },
316              },
317            ]),
318          ),
319        }),
320        r = (0, t.V)({
321          kind: "Document",
322          definitions: [
323            {
324              kind: "OperationDefinition",
325              operation: "query",
326              name: { kind: "Name", value: "WatchmenWatchmenListForPicker" },
327              selectionSet: {
328                kind: "SelectionSet",
329                selections: [
330                  {
331                    kind: "Field",
332                    alias: { kind: "Name", value: "watchmen" },
333                    name: { kind: "Name", value: "watchmenWatchmenAll" },
334                    arguments: [
335                      {
336                        kind: "Argument",
337                        name: { kind: "Name", value: "currentStaff" },
338                        value: { kind: "BooleanValue", value: !0 },
339                      },
340                      {
341                        kind: "Argument",
342                        name: { kind: "Name", value: "currentRole" },
343                        value: { kind: "BooleanValue", value: !0 },
344                      },
345                    ],
346                    selectionSet: {
347                      kind: "SelectionSet",
348                      selections: [
349                        {
350                          kind: "FragmentSpread",
351                          name: { kind: "Name", value: "WatchmanForPicker" },
352                        },
353                      ],
354                    },
355                  },
356                ],
357              },
358            },
359          ].concat((0, a.Z)(m)),
360        }),
361        k = (0, t.V)({
362          kind: "Document",
363          definitions: [
364            {
365              kind: "OperationDefinition",
366              operation: "query",
367              name: { kind: "Name", value: "WatchmenGradesList" },
368              selectionSet: {
369                kind: "SelectionSet",
370                selections: [
371                  {
372                    kind: "Field",
373                    alias: { kind: "Name", value: "grades" },
374                    name: { kind: "Name", value: "watchmenGradesAll" },
375                    selectionSet: {
376                      kind: "SelectionSet",
377                      selections: [
378                        {
379                          kind: "FragmentSpread",
380                          name: { kind: "Name", value: "Grade" },
381                        },
382                      ],
383                    },
384                  },
385                ],
386              },
387            },
388          ].concat(
389            (0, a.Z)([
390              {
391                kind: "FragmentDefinition",
392                name: { kind: "Name", value: "Grade" },
393                typeCondition: {
394                  kind: "NamedType",
395                  name: { kind: "Name", value: "WatchmenGrade" },
396                },
397                selectionSet: {
398                  kind: "SelectionSet",
399                  selections: [
400                    { kind: "Field", name: { kind: "Name", value: "id" } },
401                    { kind: "Field", name: { kind: "Name", value: "code" } },
402                    {
403                      kind: "Field",
404                      name: { kind: "Name", value: "multiplier" },
405                    },
406                  ],
407                },
408              },
409            ]),
410          ),
411        }),
412        u = (0, t.V)({
413          kind: "Document",
414          definitions: [
415            {
416              kind: "OperationDefinition",
417              operation: "query",
418              name: { kind: "Name", value: "WatchmenShifts" },
419              variableDefinitions: [
420                {
421                  kind: "VariableDefinition",
422                  variable: {
423                    kind: "Variable",
424                    name: { kind: "Name", value: "from_date" },
425                  },
426                  type: {
427                    kind: "NonNullType",
428                    type: {
429                      kind: "NamedType",
430                      name: { kind: "Name", value: "String" },
431                    },
432                  },
433                },
434                {
435                  kind: "VariableDefinition",
436                  variable: {
437                    kind: "Variable",
438                    name: { kind: "Name", value: "to_date" },
439                  },
440                  type: {
441                    kind: "NonNullType",
442                    type: {
443                      kind: "NamedType",
444                      name: { kind: "Name", value: "String" },
445                    },
446                  },
447                },
448              ],
449              selectionSet: {
450                kind: "SelectionSet",
451                selections: [
452                  {
453                    kind: "Field",
454                    alias: { kind: "Name", value: "shifts" },
455                    name: { kind: "Name", value: "watchmenShifts" },
456                    arguments: [
457                      {
458                        kind: "Argument",
459                        name: { kind: "Name", value: "from_date" },
460                        value: {
461                          kind: "Variable",
462                          name: { kind: "Name", value: "from_date" },
463                        },
464                      },
465                      {
466                        kind: "Argument",
467                        name: { kind: "Name", value: "to_date" },
468                        value: {
469                          kind: "Variable",
470                          name: { kind: "Name", value: "to_date" },
471                        },
472                      },
473                    ],
474                    selectionSet: {
475                      kind: "SelectionSet",
476                      selections: [
477                        {
478                          kind: "FragmentSpread",
479                          name: { kind: "Name", value: "Shift" },
480                        },
481                      ],
482                    },
483                  },
484                ],
485              },
486            },
487          ].concat((0, a.Z)(l.definitions)),
488        }),
489        c = (0, t.V)({
490          kind: "Document",
491          definitions: [
492            {
493              kind: "OperationDefinition",
494              operation: "mutation",
495              name: { kind: "Name", value: "WatchmenSetWatchmanPriority" },
496              variableDefinitions: [
497                {
498                  kind: "VariableDefinition",
499                  variable: {
500                    kind: "Variable",
501                    name: { kind: "Name", value: "input" },
502                  },
503                  type: {
504                    kind: "NonNullType",
505                    type: {
506                      kind: "NamedType",
507                      name: {
508                        kind: "Name",
509                        value: "WatchmenSetWatchmanPriorityInput",
510                      },
511                    },
512                  },
513                },
514              ],
515              selectionSet: {
516                kind: "SelectionSet",
517                selections: [
518                  {
519                    kind: "Field",
520                    name: {
521                      kind: "Name",
522                      value: "watchmenSetWatchmanPriority",
523                    },
524                    arguments: [
525                      {
526                        kind: "Argument",
527                        name: { kind: "Name", value: "input" },
528                        value: {
529                          kind: "Variable",
530                          name: { kind: "Name", value: "input" },
531                        },
532                      },
533                    ],
534                  },
535                ],
536              },
537            },
538          ],
539        }),
540        s = (0, t.V)({
541          kind: "Document",
542          definitions: [
543            {
544              kind: "OperationDefinition",
545              operation: "mutation",
546              name: { kind: "Name", value: "WatchmenSetWatchmanGrade" },
547              variableDefinitions: [
548                {
549                  kind: "VariableDefinition",
550                  variable: {
551                    kind: "Variable",
552                    name: { kind: "Name", value: "input" },
553                  },
554                  type: {
555                    kind: "NonNullType",
556                    type: {
557                      kind: "NamedType",
558                      name: {
559                        kind: "Name",
560                        value: "WatchmenSetWatchmanGradeInput",
561                      },
562                    },
563                  },
564                },
565              ],
566              selectionSet: {
567                kind: "SelectionSet",
568                selections: [
569                  {
570                    kind: "Field",
571                    name: { kind: "Name", value: "watchmenSetWatchmanGrade" },
572                    arguments: [
573                      {
574                        kind: "Argument",
575                        name: { kind: "Name", value: "input" },
576                        value: {
577                          kind: "Variable",
578                          name: { kind: "Name", value: "input" },
579                        },
580                      },
581                    ],
582                  },
583                ],
584              },
585            },
586          ],
587        }),
588        v = (0, t.V)({
589          kind: "Document",
590          definitions: [
591            {
592              kind: "OperationDefinition",
593              operation: "mutation",
594              name: { kind: "Name", value: "WatchmenCreateWatchman" },
595              variableDefinitions: [
596                {
597                  kind: "VariableDefinition",
598                  variable: {
599                    kind: "Variable",
600                    name: { kind: "Name", value: "input" },
601                  },
602                  type: {
603                    kind: "NonNullType",
604                    type: {
605                      kind: "NamedType",
606                      name: {
607                        kind: "Name",
608                        value: "WatchmenCreateWatchmanInput",
609                      },
610                    },
611                  },
612                },
613              ],
614              selectionSet: {
615                kind: "SelectionSet",
616                selections: [
617                  {
618                    kind: "Field",
619                    name: { kind: "Name", value: "watchmenCreateWatchman" },
620                    arguments: [
621                      {
622                        kind: "Argument",
623                        name: { kind: "Name", value: "input" },
624                        value: {
625                          kind: "Variable",
626                          name: { kind: "Name", value: "input" },
627                        },
628                      },
629                    ],
630                  },
631                ],
632              },
633            },
634          ],
635        }),
636        N = (0, t.V)({
637          kind: "Document",
638          definitions: [
639            {
640              kind: "OperationDefinition",
641              operation: "mutation",
642              name: { kind: "Name", value: "WatchmenUpdateShift" },
643              variableDefinitions: [
644                {
645                  kind: "VariableDefinition",
646                  variable: {
647                    kind: "Variable",
648                    name: { kind: "Name", value: "input" },
649                  },
650                  type: {
651                    kind: "NonNullType",
652                    type: {
653                      kind: "NamedType",
654                      name: { kind: "Name", value: "WatchmenUpdateShiftInput" },
655                    },
656                  },
657                },
658              ],
659              selectionSet: {
660                kind: "SelectionSet",
661                selections: [
662                  {
663                    kind: "Field",
664                    alias: { kind: "Name", value: "result" },
665                    name: { kind: "Name", value: "watchmenUpdateShift" },
666                    arguments: [
667                      {
668                        kind: "Argument",
669                        name: { kind: "Name", value: "input" },
670                        value: {
671                          kind: "Variable",
672                          name: { kind: "Name", value: "input" },
673                        },
674                      },
675                    ],
676                    selectionSet: {
677                      kind: "SelectionSet",
678                      selections: [
679                        {
680                          kind: "FragmentSpread",
681                          name: { kind: "Name", value: "Shift" },
682                        },
683                        {
684                          kind: "FragmentSpread",
685                          name: { kind: "Name", value: "ValidationError" },
686                        },
687                        {
688                          kind: "FragmentSpread",
689                          name: { kind: "Name", value: "GenericError" },
690                        },
691                      ],
692                    },
693                  },
694                ],
695              },
696            },
697          ].concat(
698            (0, a.Z)(l.definitions),
699            (0, a.Z)(d.AN.definitions),
700            (0, a.Z)(d.Tl.definitions),
701          ),
702        }),
703        p = (0, t.V)({
704          kind: "Document",
705          definitions: [
706            {
707              kind: "OperationDefinition",
708              operation: "subscription",
709              name: { kind: "Name", value: "onWatchmenScheduleUpdates" },
710              selectionSet: {
711                kind: "SelectionSet",
712                selections: [
713                  {
714                    kind: "Field",
715                    name: { kind: "Name", value: "watchmenScheduleUpdates" },
716                    selectionSet: {
717                      kind: "SelectionSet",
718                      selections: [
719                        {
720                          kind: "Field",
721                          name: { kind: "Name", value: "updated" },
722                        },
723                      ],
724                    },
725                  },
726                ],
727              },
728            },
729          ],
730        });
731    },
732  },
733]);
734//# sourceMappingURL=2735-8897a580639a283057f3.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.