@livetiles/reach-components-react 0.4.0-preview.53 → 0.4.0-preview.57
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/NewsItemPreviewContextProvider.d.ts +5 -0
- package/en.async.esm.esm.js +2 -1
- package/index.d.ts +9 -2
- package/index.esm.js +1 -1
- package/index.esm2.js +498 -456
- package/index.umd.js +500 -456
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -163,22 +163,22 @@
|
|
|
163
163
|
return IndexedObject$9(requireObjectCoercible$k(it));
|
|
164
164
|
};
|
|
165
165
|
|
|
166
|
-
var isObject$
|
|
166
|
+
var isObject$u = function (it) {
|
|
167
167
|
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
|
168
168
|
};
|
|
169
169
|
|
|
170
|
-
var isObject$
|
|
170
|
+
var isObject$t = isObject$u;
|
|
171
171
|
|
|
172
172
|
// `ToPrimitive` abstract operation
|
|
173
173
|
// https://tc39.github.io/ecma262/#sec-toprimitive
|
|
174
174
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
175
175
|
// and the second argument - flag - preferred type is a string
|
|
176
176
|
var toPrimitive$c = function (input, PREFERRED_STRING) {
|
|
177
|
-
if (!isObject$
|
|
177
|
+
if (!isObject$t(input)) return input;
|
|
178
178
|
var fn, val;
|
|
179
|
-
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$
|
|
180
|
-
if (typeof (fn = input.valueOf) == 'function' && !isObject$
|
|
181
|
-
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$
|
|
179
|
+
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$t(val = fn.call(input))) return val;
|
|
180
|
+
if (typeof (fn = input.valueOf) == 'function' && !isObject$t(val = fn.call(input))) return val;
|
|
181
|
+
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$t(val = fn.call(input))) return val;
|
|
182
182
|
throw TypeError("Can't convert object to primitive value");
|
|
183
183
|
};
|
|
184
184
|
|
|
@@ -189,11 +189,11 @@
|
|
|
189
189
|
};
|
|
190
190
|
|
|
191
191
|
var global$F = global$G;
|
|
192
|
-
var isObject$
|
|
192
|
+
var isObject$s = isObject$u;
|
|
193
193
|
|
|
194
194
|
var document$4 = global$F.document;
|
|
195
195
|
// typeof document.createElement is 'object' in old IE
|
|
196
|
-
var EXISTS$7 = isObject$
|
|
196
|
+
var EXISTS$7 = isObject$s(document$4) && isObject$s(document$4.createElement);
|
|
197
197
|
|
|
198
198
|
var documentCreateElement$8 = function (it) {
|
|
199
199
|
return EXISTS$7 ? document$4.createElement(it) : {};
|
|
@@ -233,10 +233,10 @@
|
|
|
233
233
|
|
|
234
234
|
var objectDefineProperty$7 = {};
|
|
235
235
|
|
|
236
|
-
var isObject$
|
|
236
|
+
var isObject$r = isObject$u;
|
|
237
237
|
|
|
238
238
|
var anObject$v = function (it) {
|
|
239
|
-
if (!isObject$
|
|
239
|
+
if (!isObject$r(it)) {
|
|
240
240
|
throw TypeError(String(it) + ' is not an object');
|
|
241
241
|
} return it;
|
|
242
242
|
};
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
|
|
347
347
|
var NATIVE_WEAK_MAP$7 = nativeWeakMap$7;
|
|
348
348
|
var global$B = global$G;
|
|
349
|
-
var isObject$
|
|
349
|
+
var isObject$q = isObject$u;
|
|
350
350
|
var createNonEnumerableProperty$i = createNonEnumerableProperty$k;
|
|
351
351
|
var objectHas$7 = has$w;
|
|
352
352
|
var sharedKey$a = sharedKey$b;
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
var getterFor$7 = function (TYPE) {
|
|
363
363
|
return function (it) {
|
|
364
364
|
var state;
|
|
365
|
-
if (!isObject$
|
|
365
|
+
if (!isObject$q(it) || (state = get$9(it)).type !== TYPE) {
|
|
366
366
|
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
367
367
|
} return state;
|
|
368
368
|
};
|
|
@@ -474,7 +474,7 @@
|
|
|
474
474
|
|
|
475
475
|
// `ToLength` abstract operation
|
|
476
476
|
// https://tc39.github.io/ecma262/#sec-tolength
|
|
477
|
-
var toLength$
|
|
477
|
+
var toLength$k = function (argument) {
|
|
478
478
|
return argument > 0 ? min$c(toInteger$d(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
479
479
|
};
|
|
480
480
|
|
|
@@ -492,14 +492,14 @@
|
|
|
492
492
|
};
|
|
493
493
|
|
|
494
494
|
var toIndexedObject$c = toIndexedObject$e;
|
|
495
|
-
var toLength$
|
|
495
|
+
var toLength$j = toLength$k;
|
|
496
496
|
var toAbsoluteIndex$8 = toAbsoluteIndex$9;
|
|
497
497
|
|
|
498
498
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
499
499
|
var createMethod$b = function (IS_INCLUDES) {
|
|
500
500
|
return function ($this, el, fromIndex) {
|
|
501
501
|
var O = toIndexedObject$c($this);
|
|
502
|
-
var length = toLength$
|
|
502
|
+
var length = toLength$j(O.length);
|
|
503
503
|
var index = toAbsoluteIndex$8(fromIndex, length);
|
|
504
504
|
var value;
|
|
505
505
|
// Array#includes uses SameValueZero equality algorithm
|
|
@@ -710,7 +710,7 @@
|
|
|
710
710
|
var Symbol$2 = global$v.Symbol;
|
|
711
711
|
var createWellKnownSymbol$7 = USE_SYMBOL_AS_UID$7 ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$9;
|
|
712
712
|
|
|
713
|
-
var wellKnownSymbol$
|
|
713
|
+
var wellKnownSymbol$E = function (name) {
|
|
714
714
|
if (!has$q(WellKnownSymbolsStore$7, name)) {
|
|
715
715
|
if (NATIVE_SYMBOL$8 && has$q(Symbol$2, name)) WellKnownSymbolsStore$7[name] = Symbol$2[name];
|
|
716
716
|
else WellKnownSymbolsStore$7[name] = createWellKnownSymbol$7('Symbol.' + name);
|
|
@@ -719,9 +719,9 @@
|
|
|
719
719
|
|
|
720
720
|
var defineProperty$b = objectDefineProperty$7.f;
|
|
721
721
|
var has$p = has$w;
|
|
722
|
-
var wellKnownSymbol$
|
|
722
|
+
var wellKnownSymbol$D = wellKnownSymbol$E;
|
|
723
723
|
|
|
724
|
-
var TO_STRING_TAG$b = wellKnownSymbol$
|
|
724
|
+
var TO_STRING_TAG$b = wellKnownSymbol$D('toStringTag');
|
|
725
725
|
|
|
726
726
|
var setToStringTag$c = function (it, TAG, STATIC) {
|
|
727
727
|
if (it && !has$p(it = STATIC ? it : it.prototype, TO_STRING_TAG$b)) {
|
|
@@ -731,17 +731,17 @@
|
|
|
731
731
|
|
|
732
732
|
var getBuiltIn$g = getBuiltIn$i;
|
|
733
733
|
var definePropertyModule$c = objectDefineProperty$7;
|
|
734
|
-
var wellKnownSymbol$
|
|
734
|
+
var wellKnownSymbol$C = wellKnownSymbol$E;
|
|
735
735
|
var DESCRIPTORS$h = descriptors$7;
|
|
736
736
|
|
|
737
|
-
var SPECIES$
|
|
737
|
+
var SPECIES$d = wellKnownSymbol$C('species');
|
|
738
738
|
|
|
739
739
|
var setSpecies$7 = function (CONSTRUCTOR_NAME) {
|
|
740
740
|
var Constructor = getBuiltIn$g(CONSTRUCTOR_NAME);
|
|
741
741
|
var defineProperty = definePropertyModule$c.f;
|
|
742
742
|
|
|
743
|
-
if (DESCRIPTORS$h && Constructor && !Constructor[SPECIES$
|
|
744
|
-
defineProperty(Constructor, SPECIES$
|
|
743
|
+
if (DESCRIPTORS$h && Constructor && !Constructor[SPECIES$d]) {
|
|
744
|
+
defineProperty(Constructor, SPECIES$d, {
|
|
745
745
|
configurable: true,
|
|
746
746
|
get: function () { return this; }
|
|
747
747
|
});
|
|
@@ -764,10 +764,10 @@
|
|
|
764
764
|
|
|
765
765
|
var iterators$6 = {};
|
|
766
766
|
|
|
767
|
-
var wellKnownSymbol$
|
|
767
|
+
var wellKnownSymbol$B = wellKnownSymbol$E;
|
|
768
768
|
var Iterators$b = iterators$6;
|
|
769
769
|
|
|
770
|
-
var ITERATOR$f = wellKnownSymbol$
|
|
770
|
+
var ITERATOR$f = wellKnownSymbol$B('iterator');
|
|
771
771
|
var ArrayPrototype$7 = Array.prototype;
|
|
772
772
|
|
|
773
773
|
// check on default Array iterator
|
|
@@ -800,9 +800,9 @@
|
|
|
800
800
|
};
|
|
801
801
|
};
|
|
802
802
|
|
|
803
|
-
var wellKnownSymbol$
|
|
803
|
+
var wellKnownSymbol$A = wellKnownSymbol$E;
|
|
804
804
|
|
|
805
|
-
var TO_STRING_TAG$a = wellKnownSymbol$
|
|
805
|
+
var TO_STRING_TAG$a = wellKnownSymbol$A('toStringTag');
|
|
806
806
|
var test$7 = {};
|
|
807
807
|
|
|
808
808
|
test$7[TO_STRING_TAG$a] = 'z';
|
|
@@ -811,9 +811,9 @@
|
|
|
811
811
|
|
|
812
812
|
var TO_STRING_TAG_SUPPORT$5 = toStringTagSupport$5;
|
|
813
813
|
var classofRaw$8 = classofRaw$9;
|
|
814
|
-
var wellKnownSymbol$
|
|
814
|
+
var wellKnownSymbol$z = wellKnownSymbol$E;
|
|
815
815
|
|
|
816
|
-
var TO_STRING_TAG$9 = wellKnownSymbol$
|
|
816
|
+
var TO_STRING_TAG$9 = wellKnownSymbol$z('toStringTag');
|
|
817
817
|
// ES3 wrong here
|
|
818
818
|
var CORRECT_ARGUMENTS$5 = classofRaw$8(function () { return arguments; }()) == 'Arguments';
|
|
819
819
|
|
|
@@ -838,9 +838,9 @@
|
|
|
838
838
|
|
|
839
839
|
var classof$l = classof$m;
|
|
840
840
|
var Iterators$a = iterators$6;
|
|
841
|
-
var wellKnownSymbol$
|
|
841
|
+
var wellKnownSymbol$y = wellKnownSymbol$E;
|
|
842
842
|
|
|
843
|
-
var ITERATOR$e = wellKnownSymbol$
|
|
843
|
+
var ITERATOR$e = wellKnownSymbol$y('iterator');
|
|
844
844
|
|
|
845
845
|
var getIteratorMethod$a = function (it) {
|
|
846
846
|
if (it != undefined) return it[ITERATOR$e]
|
|
@@ -864,8 +864,8 @@
|
|
|
864
864
|
|
|
865
865
|
var anObject$r = anObject$v;
|
|
866
866
|
var isArrayIteratorMethod$7 = isArrayIteratorMethod$8;
|
|
867
|
-
var toLength$
|
|
868
|
-
var bind$
|
|
867
|
+
var toLength$i = toLength$k;
|
|
868
|
+
var bind$e = functionBindContext$5;
|
|
869
869
|
var getIteratorMethod$9 = getIteratorMethod$a;
|
|
870
870
|
var callWithSafeIterationClosing$7 = callWithSafeIterationClosing$8;
|
|
871
871
|
|
|
@@ -875,7 +875,7 @@
|
|
|
875
875
|
};
|
|
876
876
|
|
|
877
877
|
var iterate$7 = iterate$8.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {
|
|
878
|
-
var boundFunction = bind$
|
|
878
|
+
var boundFunction = bind$e(fn, that, AS_ENTRIES ? 2 : 1);
|
|
879
879
|
var iterator, iterFn, index, length, result, next, step;
|
|
880
880
|
|
|
881
881
|
if (IS_ITERATOR) {
|
|
@@ -885,7 +885,7 @@
|
|
|
885
885
|
if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
|
|
886
886
|
// optimisation for array iterators
|
|
887
887
|
if (isArrayIteratorMethod$7(iterFn)) {
|
|
888
|
-
for (index = 0, length = toLength$
|
|
888
|
+
for (index = 0, length = toLength$i(iterable.length); length > index; index++) {
|
|
889
889
|
result = AS_ENTRIES
|
|
890
890
|
? boundFunction(anObject$r(step = iterable[index])[0], step[1])
|
|
891
891
|
: boundFunction(iterable[index]);
|
|
@@ -906,9 +906,9 @@
|
|
|
906
906
|
return new Result$4(true, result);
|
|
907
907
|
};
|
|
908
908
|
|
|
909
|
-
var wellKnownSymbol$
|
|
909
|
+
var wellKnownSymbol$x = wellKnownSymbol$E;
|
|
910
910
|
|
|
911
|
-
var ITERATOR$d = wellKnownSymbol$
|
|
911
|
+
var ITERATOR$d = wellKnownSymbol$x('iterator');
|
|
912
912
|
var SAFE_CLOSING$4 = false;
|
|
913
913
|
|
|
914
914
|
try {
|
|
@@ -947,16 +947,16 @@
|
|
|
947
947
|
|
|
948
948
|
var anObject$q = anObject$v;
|
|
949
949
|
var aFunction$h = aFunction$j;
|
|
950
|
-
var wellKnownSymbol$
|
|
950
|
+
var wellKnownSymbol$w = wellKnownSymbol$E;
|
|
951
951
|
|
|
952
|
-
var SPECIES$
|
|
952
|
+
var SPECIES$c = wellKnownSymbol$w('species');
|
|
953
953
|
|
|
954
954
|
// `SpeciesConstructor` abstract operation
|
|
955
955
|
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
|
956
956
|
var speciesConstructor$8 = function (O, defaultConstructor) {
|
|
957
957
|
var C = anObject$q(O).constructor;
|
|
958
958
|
var S;
|
|
959
|
-
return C === undefined || (S = anObject$q(C)[SPECIES$
|
|
959
|
+
return C === undefined || (S = anObject$q(C)[SPECIES$c]) == undefined ? defaultConstructor : aFunction$h(S);
|
|
960
960
|
};
|
|
961
961
|
|
|
962
962
|
var getBuiltIn$f = getBuiltIn$i;
|
|
@@ -974,7 +974,7 @@
|
|
|
974
974
|
var global$u = global$G;
|
|
975
975
|
var fails$q = fails$w;
|
|
976
976
|
var classof$k = classofRaw$9;
|
|
977
|
-
var bind$
|
|
977
|
+
var bind$d = functionBindContext$5;
|
|
978
978
|
var html$8 = html$9;
|
|
979
979
|
var createElement$8 = documentCreateElement$8;
|
|
980
980
|
var IS_IOS$6 = engineIsIos$4;
|
|
@@ -1046,7 +1046,7 @@
|
|
|
1046
1046
|
channel$4 = new MessageChannel$5();
|
|
1047
1047
|
port$4 = channel$4.port2;
|
|
1048
1048
|
channel$4.port1.onmessage = listener$4;
|
|
1049
|
-
defer$4 = bind$
|
|
1049
|
+
defer$4 = bind$d(port$4.postMessage, port$4, 1);
|
|
1050
1050
|
// Browsers with postMessage, skip WebWorkers
|
|
1051
1051
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
1052
1052
|
} else if (
|
|
@@ -1179,12 +1179,12 @@
|
|
|
1179
1179
|
};
|
|
1180
1180
|
|
|
1181
1181
|
var anObject$p = anObject$v;
|
|
1182
|
-
var isObject$
|
|
1182
|
+
var isObject$p = isObject$u;
|
|
1183
1183
|
var newPromiseCapability$7 = newPromiseCapability$8;
|
|
1184
1184
|
|
|
1185
1185
|
var promiseResolve$6 = function (C, x) {
|
|
1186
1186
|
anObject$p(C);
|
|
1187
|
-
if (isObject$
|
|
1187
|
+
if (isObject$p(x) && x.constructor === C) return x;
|
|
1188
1188
|
var promiseCapability = newPromiseCapability$7.f(C);
|
|
1189
1189
|
var resolve = promiseCapability.resolve;
|
|
1190
1190
|
resolve(x);
|
|
@@ -1229,7 +1229,7 @@
|
|
|
1229
1229
|
|
|
1230
1230
|
var engineV8Version$4 = version$a && +version$a;
|
|
1231
1231
|
|
|
1232
|
-
var $$
|
|
1232
|
+
var $$o = _export$7;
|
|
1233
1233
|
var global$q = global$G;
|
|
1234
1234
|
var getBuiltIn$d = getBuiltIn$i;
|
|
1235
1235
|
var NativePromise$4 = nativePromiseConstructor$4;
|
|
@@ -1237,7 +1237,7 @@
|
|
|
1237
1237
|
var redefineAll$7 = redefineAll$8;
|
|
1238
1238
|
var setToStringTag$b = setToStringTag$c;
|
|
1239
1239
|
var setSpecies$6 = setSpecies$7;
|
|
1240
|
-
var isObject$
|
|
1240
|
+
var isObject$o = isObject$u;
|
|
1241
1241
|
var aFunction$f = aFunction$j;
|
|
1242
1242
|
var anInstance$8 = anInstance$9;
|
|
1243
1243
|
var classof$i = classofRaw$9;
|
|
@@ -1253,10 +1253,10 @@
|
|
|
1253
1253
|
var perform$5 = perform$6;
|
|
1254
1254
|
var InternalStateModule$c = internalState$7;
|
|
1255
1255
|
var isForced$a = isForced_1$7;
|
|
1256
|
-
var wellKnownSymbol$
|
|
1256
|
+
var wellKnownSymbol$v = wellKnownSymbol$E;
|
|
1257
1257
|
var V8_VERSION$4 = engineV8Version$4;
|
|
1258
1258
|
|
|
1259
|
-
var SPECIES$
|
|
1259
|
+
var SPECIES$b = wellKnownSymbol$v('species');
|
|
1260
1260
|
var PROMISE$4 = 'Promise';
|
|
1261
1261
|
var getInternalState$a = InternalStateModule$c.get;
|
|
1262
1262
|
var setInternalState$b = InternalStateModule$c.set;
|
|
@@ -1299,7 +1299,7 @@
|
|
|
1299
1299
|
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
1300
1300
|
};
|
|
1301
1301
|
var constructor = promise.constructor = {};
|
|
1302
|
-
constructor[SPECIES$
|
|
1302
|
+
constructor[SPECIES$b] = FakePromise;
|
|
1303
1303
|
return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
|
|
1304
1304
|
});
|
|
1305
1305
|
|
|
@@ -1310,7 +1310,7 @@
|
|
|
1310
1310
|
// helpers
|
|
1311
1311
|
var isThenable$4 = function (it) {
|
|
1312
1312
|
var then;
|
|
1313
|
-
return isObject$
|
|
1313
|
+
return isObject$o(it) && typeof (then = it.then) == 'function' ? then : false;
|
|
1314
1314
|
};
|
|
1315
1315
|
|
|
1316
1316
|
var notify$5 = function (promise, state, isReject) {
|
|
@@ -1404,7 +1404,7 @@
|
|
|
1404
1404
|
});
|
|
1405
1405
|
};
|
|
1406
1406
|
|
|
1407
|
-
var bind$
|
|
1407
|
+
var bind$c = function (fn, promise, state, unwrap) {
|
|
1408
1408
|
return function (value) {
|
|
1409
1409
|
fn(promise, state, value, unwrap);
|
|
1410
1410
|
};
|
|
@@ -1431,8 +1431,8 @@
|
|
|
1431
1431
|
var wrapper = { done: false };
|
|
1432
1432
|
try {
|
|
1433
1433
|
then.call(value,
|
|
1434
|
-
bind$
|
|
1435
|
-
bind$
|
|
1434
|
+
bind$c(internalResolve$4, promise, wrapper, state),
|
|
1435
|
+
bind$c(internalReject$4, promise, wrapper, state)
|
|
1436
1436
|
);
|
|
1437
1437
|
} catch (error) {
|
|
1438
1438
|
internalReject$4(promise, wrapper, error, state);
|
|
@@ -1457,7 +1457,7 @@
|
|
|
1457
1457
|
Internal$4.call(this);
|
|
1458
1458
|
var state = getInternalState$a(this);
|
|
1459
1459
|
try {
|
|
1460
|
-
executor(bind$
|
|
1460
|
+
executor(bind$c(internalResolve$4, this, state), bind$c(internalReject$4, this, state));
|
|
1461
1461
|
} catch (error) {
|
|
1462
1462
|
internalReject$4(this, state, error);
|
|
1463
1463
|
}
|
|
@@ -1499,8 +1499,8 @@
|
|
|
1499
1499
|
var promise = new Internal$4();
|
|
1500
1500
|
var state = getInternalState$a(promise);
|
|
1501
1501
|
this.promise = promise;
|
|
1502
|
-
this.resolve = bind$
|
|
1503
|
-
this.reject = bind$
|
|
1502
|
+
this.resolve = bind$c(internalResolve$4, promise, state);
|
|
1503
|
+
this.reject = bind$c(internalReject$4, promise, state);
|
|
1504
1504
|
};
|
|
1505
1505
|
newPromiseCapabilityModule$4.f = newPromiseCapability$6 = function (C) {
|
|
1506
1506
|
return C === PromiseConstructor$4 || C === PromiseWrapper$4
|
|
@@ -1521,7 +1521,7 @@
|
|
|
1521
1521
|
}, { unsafe: true });
|
|
1522
1522
|
|
|
1523
1523
|
// wrap fetch result
|
|
1524
|
-
if (typeof $fetch$6 == 'function') $$
|
|
1524
|
+
if (typeof $fetch$6 == 'function') $$o({ global: true, enumerable: true, forced: true }, {
|
|
1525
1525
|
// eslint-disable-next-line no-unused-vars
|
|
1526
1526
|
fetch: function fetch(input /* , init */) {
|
|
1527
1527
|
return promiseResolve$5(PromiseConstructor$4, $fetch$6.apply(global$q, arguments));
|
|
@@ -1530,7 +1530,7 @@
|
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
1532
|
|
|
1533
|
-
$$
|
|
1533
|
+
$$o({ global: true, wrap: true, forced: FORCED$9 }, {
|
|
1534
1534
|
Promise: PromiseConstructor$4
|
|
1535
1535
|
});
|
|
1536
1536
|
|
|
@@ -1540,7 +1540,7 @@
|
|
|
1540
1540
|
PromiseWrapper$4 = getBuiltIn$d(PROMISE$4);
|
|
1541
1541
|
|
|
1542
1542
|
// statics
|
|
1543
|
-
$$
|
|
1543
|
+
$$o({ target: PROMISE$4, stat: true, forced: FORCED$9 }, {
|
|
1544
1544
|
// `Promise.reject` method
|
|
1545
1545
|
// https://tc39.github.io/ecma262/#sec-promise.reject
|
|
1546
1546
|
reject: function reject(r) {
|
|
@@ -1550,7 +1550,7 @@
|
|
|
1550
1550
|
}
|
|
1551
1551
|
});
|
|
1552
1552
|
|
|
1553
|
-
$$
|
|
1553
|
+
$$o({ target: PROMISE$4, stat: true, forced: FORCED$9 }, {
|
|
1554
1554
|
// `Promise.resolve` method
|
|
1555
1555
|
// https://tc39.github.io/ecma262/#sec-promise.resolve
|
|
1556
1556
|
resolve: function resolve(x) {
|
|
@@ -1558,7 +1558,7 @@
|
|
|
1558
1558
|
}
|
|
1559
1559
|
});
|
|
1560
1560
|
|
|
1561
|
-
$$
|
|
1561
|
+
$$o({ target: PROMISE$4, stat: true, forced: INCORRECT_ITERATION$4 }, {
|
|
1562
1562
|
// `Promise.all` method
|
|
1563
1563
|
// https://tc39.github.io/ecma262/#sec-promise.all
|
|
1564
1564
|
all: function all(iterable) {
|
|
@@ -14710,7 +14710,7 @@
|
|
|
14710
14710
|
var toObject$d = toObject$3$3;
|
|
14711
14711
|
var callWithSafeIterationClosing$6 = callWithSafeIterationClosing$1$4;
|
|
14712
14712
|
var isArrayIteratorMethod$6 = isArrayIteratorMethod$1$4;
|
|
14713
|
-
var toLength$
|
|
14713
|
+
var toLength$h = toLength$2$5;
|
|
14714
14714
|
var createProperty$2 = createProperty$1$1;
|
|
14715
14715
|
var getIteratorMethod$2$1 = getIteratorMethod$3$1; // `Array.from` method implementation
|
|
14716
14716
|
// https://tc39.github.io/ecma262/#sec-array.from
|
|
@@ -14738,7 +14738,7 @@
|
|
|
14738
14738
|
createProperty$2(result, index, value);
|
|
14739
14739
|
}
|
|
14740
14740
|
} else {
|
|
14741
|
-
length = toLength$
|
|
14741
|
+
length = toLength$h(O.length);
|
|
14742
14742
|
result = new C(length);
|
|
14743
14743
|
|
|
14744
14744
|
for (; length > index; index++) {
|
|
@@ -14973,18 +14973,18 @@
|
|
|
14973
14973
|
var InternalStateModule$1$5 = internalState$6;
|
|
14974
14974
|
var anInstance$1$4 = anInstance$2$1;
|
|
14975
14975
|
var hasOwn$4 = has$a$3;
|
|
14976
|
-
var bind$
|
|
14976
|
+
var bind$b = functionBindContext$4;
|
|
14977
14977
|
var classof$h = classof$2$5;
|
|
14978
14978
|
var anObject$o = anObject$8$5;
|
|
14979
|
-
var isObject$
|
|
14979
|
+
var isObject$n = isObject$6$5;
|
|
14980
14980
|
var create$8 = objectCreate$5;
|
|
14981
14981
|
var createPropertyDescriptor$b = createPropertyDescriptor$5$1;
|
|
14982
14982
|
var getIterator$2 = getIterator$1$1;
|
|
14983
14983
|
var getIteratorMethod$8 = getIteratorMethod$3$1;
|
|
14984
|
-
var wellKnownSymbol$
|
|
14984
|
+
var wellKnownSymbol$u = wellKnownSymbol$b$4;
|
|
14985
14985
|
var $fetch$5 = getBuiltIn$c('fetch');
|
|
14986
14986
|
var Headers$2 = getBuiltIn$c('Headers');
|
|
14987
|
-
var ITERATOR$c = wellKnownSymbol$
|
|
14987
|
+
var ITERATOR$c = wellKnownSymbol$u('iterator');
|
|
14988
14988
|
var URL_SEARCH_PARAMS$1 = 'URLSearchParams';
|
|
14989
14989
|
var URL_SEARCH_PARAMS_ITERATOR$1 = URL_SEARCH_PARAMS$1 + 'Iterator';
|
|
14990
14990
|
var setInternalState$1$3 = InternalStateModule$1$5.set;
|
|
@@ -15105,7 +15105,7 @@
|
|
|
15105
15105
|
});
|
|
15106
15106
|
|
|
15107
15107
|
if (init !== undefined) {
|
|
15108
|
-
if (isObject$
|
|
15108
|
+
if (isObject$n(init)) {
|
|
15109
15109
|
iteratorMethod = getIteratorMethod$8(init);
|
|
15110
15110
|
|
|
15111
15111
|
if (typeof iteratorMethod === 'function') {
|
|
@@ -15261,7 +15261,7 @@
|
|
|
15261
15261
|
/* , thisArg */
|
|
15262
15262
|
) {
|
|
15263
15263
|
var entries = getInternalParamsState$1(this).entries;
|
|
15264
|
-
var boundFunction = bind$
|
|
15264
|
+
var boundFunction = bind$b(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
|
|
15265
15265
|
var index = 0;
|
|
15266
15266
|
var entry;
|
|
15267
15267
|
|
|
@@ -15328,7 +15328,7 @@
|
|
|
15328
15328
|
if (arguments.length > 1) {
|
|
15329
15329
|
init = arguments[1];
|
|
15330
15330
|
|
|
15331
|
-
if (isObject$
|
|
15331
|
+
if (isObject$n(init)) {
|
|
15332
15332
|
body = init.body;
|
|
15333
15333
|
|
|
15334
15334
|
if (classof$h(body) === URL_SEARCH_PARAMS$1) {
|
|
@@ -16560,11 +16560,11 @@
|
|
|
16560
16560
|
var S = trim$3(String(string));
|
|
16561
16561
|
return $parseInt$3(S, radix >>> 0 || (hex$3.test(S) ? 16 : 10));
|
|
16562
16562
|
} : $parseInt$3;
|
|
16563
|
-
var $$
|
|
16563
|
+
var $$n = _export$6;
|
|
16564
16564
|
var parseIntImplementation$3 = numberParseInt$3; // `parseInt` method
|
|
16565
16565
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
16566
16566
|
|
|
16567
|
-
$$
|
|
16567
|
+
$$n({
|
|
16568
16568
|
global: true,
|
|
16569
16569
|
forced: parseInt != parseIntImplementation$3
|
|
16570
16570
|
}, {
|
|
@@ -18591,7 +18591,7 @@
|
|
|
18591
18591
|
if (sham) createNonEnumerableProperty$e(RegExp.prototype[SYMBOL], 'sham', true);
|
|
18592
18592
|
};
|
|
18593
18593
|
|
|
18594
|
-
var isObject$
|
|
18594
|
+
var isObject$m = isObject$6$4;
|
|
18595
18595
|
var classof$1$5 = classofRaw$6;
|
|
18596
18596
|
var wellKnownSymbol$1$5 = wellKnownSymbol$8$4;
|
|
18597
18597
|
var MATCH$8 = wellKnownSymbol$1$5('match'); // `IsRegExp` abstract operation
|
|
@@ -18599,7 +18599,7 @@
|
|
|
18599
18599
|
|
|
18600
18600
|
var isRegexp$5 = function (it) {
|
|
18601
18601
|
var isRegExp;
|
|
18602
|
-
return isObject$
|
|
18602
|
+
return isObject$m(it) && ((isRegExp = it[MATCH$8]) !== undefined ? !!isRegExp : classof$1$5(it) == 'RegExp');
|
|
18603
18603
|
};
|
|
18604
18604
|
|
|
18605
18605
|
var aFunction$1$4 = function (it) {
|
|
@@ -18612,14 +18612,14 @@
|
|
|
18612
18612
|
|
|
18613
18613
|
var anObject$2$6 = anObject$9$3;
|
|
18614
18614
|
var aFunction$d = aFunction$1$4;
|
|
18615
|
-
var wellKnownSymbol$
|
|
18616
|
-
var SPECIES$
|
|
18615
|
+
var wellKnownSymbol$t = wellKnownSymbol$8$4;
|
|
18616
|
+
var SPECIES$a = wellKnownSymbol$t('species'); // `SpeciesConstructor` abstract operation
|
|
18617
18617
|
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
|
18618
18618
|
|
|
18619
18619
|
var speciesConstructor$1$4 = function (O, defaultConstructor) {
|
|
18620
18620
|
var C = anObject$2$6(O).constructor;
|
|
18621
18621
|
var S;
|
|
18622
|
-
return C === undefined || (S = anObject$2$6(C)[SPECIES$
|
|
18622
|
+
return C === undefined || (S = anObject$2$6(C)[SPECIES$a]) == undefined ? defaultConstructor : aFunction$d(S);
|
|
18623
18623
|
};
|
|
18624
18624
|
|
|
18625
18625
|
var toInteger$1$5 = toInteger$4$4;
|
|
@@ -18833,7 +18833,7 @@
|
|
|
18833
18833
|
var fixRegExpWellKnownSymbolLogic$8 = fixRegexpWellKnownSymbolLogic$5;
|
|
18834
18834
|
var anObject$n = anObject$9$3;
|
|
18835
18835
|
var toObject$c = toObject$2$3;
|
|
18836
|
-
var toLength$
|
|
18836
|
+
var toLength$g = toLength$3$4;
|
|
18837
18837
|
var toInteger$a = toInteger$4$4;
|
|
18838
18838
|
var requireObjectCoercible$1$6 = requireObjectCoercible$6$3;
|
|
18839
18839
|
var advanceStringIndex$7 = advanceStringIndex$2$3;
|
|
@@ -18886,7 +18886,7 @@
|
|
|
18886
18886
|
results.push(result);
|
|
18887
18887
|
if (!global) break;
|
|
18888
18888
|
var matchStr = String(result[0]);
|
|
18889
|
-
if (matchStr === '') rx.lastIndex = advanceStringIndex$7(S, toLength$
|
|
18889
|
+
if (matchStr === '') rx.lastIndex = advanceStringIndex$7(S, toLength$g(rx.lastIndex), fullUnicode);
|
|
18890
18890
|
}
|
|
18891
18891
|
|
|
18892
18892
|
var accumulatedResult = '';
|
|
@@ -19013,11 +19013,11 @@
|
|
|
19013
19013
|
var S = trim$2(String(string));
|
|
19014
19014
|
return $parseInt$2(S, radix >>> 0 || (hex$2.test(S) ? 16 : 10));
|
|
19015
19015
|
} : $parseInt$2;
|
|
19016
|
-
var $$
|
|
19016
|
+
var $$m = _export$5;
|
|
19017
19017
|
var parseIntImplementation$2 = numberParseInt$2; // `parseInt` method
|
|
19018
19018
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
19019
19019
|
|
|
19020
|
-
$$
|
|
19020
|
+
$$m({
|
|
19021
19021
|
global: true,
|
|
19022
19022
|
forced: parseInt != parseIntImplementation$2
|
|
19023
19023
|
}, {
|
|
@@ -25247,7 +25247,7 @@
|
|
|
25247
25247
|
var hiddenKeys$3$4 = {};
|
|
25248
25248
|
var NATIVE_WEAK_MAP$4 = nativeWeakMap$4;
|
|
25249
25249
|
var global$6$4 = global$b$4;
|
|
25250
|
-
var isObject$
|
|
25250
|
+
var isObject$l = isObject$4$4;
|
|
25251
25251
|
var createNonEnumerableProperty$3$4 = createNonEnumerableProperty$5$3;
|
|
25252
25252
|
var objectHas$4 = has$6$4;
|
|
25253
25253
|
var sharedKey$7 = sharedKey$1$4;
|
|
@@ -25263,7 +25263,7 @@
|
|
|
25263
25263
|
return function (it) {
|
|
25264
25264
|
var state;
|
|
25265
25265
|
|
|
25266
|
-
if (!isObject$
|
|
25266
|
+
if (!isObject$l(it) || (state = get$6(it)).type !== TYPE) {
|
|
25267
25267
|
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
25268
25268
|
}
|
|
25269
25269
|
|
|
@@ -25388,13 +25388,13 @@
|
|
|
25388
25388
|
};
|
|
25389
25389
|
|
|
25390
25390
|
var toIndexedObject$1$4 = toIndexedObject$3$4;
|
|
25391
|
-
var toLength$
|
|
25391
|
+
var toLength$f = toLength$1$4;
|
|
25392
25392
|
var toAbsoluteIndex$5 = toAbsoluteIndex$1$4; // `Array.prototype.{ indexOf, includes }` methods implementation
|
|
25393
25393
|
|
|
25394
25394
|
var createMethod$8 = function (IS_INCLUDES) {
|
|
25395
25395
|
return function ($this, el, fromIndex) {
|
|
25396
25396
|
var O = toIndexedObject$1$4($this);
|
|
25397
|
-
var length = toLength$
|
|
25397
|
+
var length = toLength$f(O.length);
|
|
25398
25398
|
var index = toAbsoluteIndex$5(fromIndex, length);
|
|
25399
25399
|
var value; // Array#includes uses SameValueZero equality algorithm
|
|
25400
25400
|
// eslint-disable-next-line no-self-compare
|
|
@@ -25676,9 +25676,9 @@
|
|
|
25676
25676
|
}
|
|
25677
25677
|
|
|
25678
25678
|
var regexpExec$2$4 = patchedExec$4;
|
|
25679
|
-
var $$
|
|
25679
|
+
var $$l = _export$4;
|
|
25680
25680
|
var exec$4 = regexpExec$2$4;
|
|
25681
|
-
$$
|
|
25681
|
+
$$l({
|
|
25682
25682
|
target: 'RegExp',
|
|
25683
25683
|
proto: true,
|
|
25684
25684
|
forced: /./.exec !== exec$4
|
|
@@ -25716,10 +25716,10 @@
|
|
|
25716
25716
|
|
|
25717
25717
|
var redefine$e = redefine$2$4.exports;
|
|
25718
25718
|
var fails$n = fails$7$4;
|
|
25719
|
-
var wellKnownSymbol$
|
|
25719
|
+
var wellKnownSymbol$s = wellKnownSymbol$1$4;
|
|
25720
25720
|
var regexpExec$1$4 = regexpExec$2$4;
|
|
25721
25721
|
var createNonEnumerableProperty$d = createNonEnumerableProperty$5$3;
|
|
25722
|
-
var SPECIES$
|
|
25722
|
+
var SPECIES$9 = wellKnownSymbol$s('species');
|
|
25723
25723
|
var REPLACE_SUPPORTS_NAMED_GROUPS$4 = !fails$n(function () {
|
|
25724
25724
|
// #replace needs built-in support for named groups.
|
|
25725
25725
|
// #match works fine because it just return the exec results, even if it has
|
|
@@ -25742,7 +25742,7 @@
|
|
|
25742
25742
|
return 'a'.replace(/./, '$0') === '$0';
|
|
25743
25743
|
}();
|
|
25744
25744
|
|
|
25745
|
-
var REPLACE$5 = wellKnownSymbol$
|
|
25745
|
+
var REPLACE$5 = wellKnownSymbol$s('replace'); // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
25746
25746
|
|
|
25747
25747
|
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE$4 = function () {
|
|
25748
25748
|
if (/./[REPLACE$5]) {
|
|
@@ -25767,7 +25767,7 @@
|
|
|
25767
25767
|
});
|
|
25768
25768
|
|
|
25769
25769
|
var fixRegexpWellKnownSymbolLogic$4 = function (KEY, length, exec, sham) {
|
|
25770
|
-
var SYMBOL = wellKnownSymbol$
|
|
25770
|
+
var SYMBOL = wellKnownSymbol$s(KEY);
|
|
25771
25771
|
var DELEGATES_TO_SYMBOL = !fails$n(function () {
|
|
25772
25772
|
// String methods call symbol-named RegEp methods
|
|
25773
25773
|
var O = {};
|
|
@@ -25792,7 +25792,7 @@
|
|
|
25792
25792
|
|
|
25793
25793
|
re.constructor = {};
|
|
25794
25794
|
|
|
25795
|
-
re.constructor[SPECIES$
|
|
25795
|
+
re.constructor[SPECIES$9] = function () {
|
|
25796
25796
|
return re;
|
|
25797
25797
|
};
|
|
25798
25798
|
|
|
@@ -38433,13 +38433,13 @@
|
|
|
38433
38433
|
}
|
|
38434
38434
|
isString$3.default = isString$2;
|
|
38435
38435
|
|
|
38436
|
-
var isObject$
|
|
38436
|
+
var isObject$k = {};
|
|
38437
38437
|
|
|
38438
|
-
Object.defineProperty(isObject$
|
|
38439
|
-
function isObject$
|
|
38438
|
+
Object.defineProperty(isObject$k, "__esModule", { value: true });
|
|
38439
|
+
function isObject$j(value) {
|
|
38440
38440
|
return ((value !== null) && (typeof value === 'object'));
|
|
38441
38441
|
}
|
|
38442
|
-
isObject$
|
|
38442
|
+
isObject$k.default = isObject$j;
|
|
38443
38443
|
|
|
38444
38444
|
var printer = {};
|
|
38445
38445
|
|
|
@@ -39876,7 +39876,7 @@
|
|
|
39876
39876
|
var Backoff = backo2;
|
|
39877
39877
|
var eventemitter3_1 = eventemitter3.exports;
|
|
39878
39878
|
var is_string_1 = isString$3;
|
|
39879
|
-
var is_object_1 = isObject$
|
|
39879
|
+
var is_object_1 = isObject$k;
|
|
39880
39880
|
var printer_1 = printer;
|
|
39881
39881
|
var getOperationAST_1 = getOperationAST$1;
|
|
39882
39882
|
var symbol_observable_1 = require$$6$1;
|
|
@@ -42556,19 +42556,19 @@
|
|
|
42556
42556
|
var classof$e = classofRaw$1$3; // `IsArray` abstract operation
|
|
42557
42557
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
42558
42558
|
|
|
42559
|
-
var isArray$2$
|
|
42559
|
+
var isArray$2$3 = Array.isArray || function isArray(arg) {
|
|
42560
42560
|
return classof$e(arg) == 'Array';
|
|
42561
42561
|
};
|
|
42562
42562
|
|
|
42563
|
-
var isArray$1$3 = isArray$2$
|
|
42563
|
+
var isArray$1$3 = isArray$2$3;
|
|
42564
42564
|
var toLength$1$3 = toLength$5$3;
|
|
42565
|
-
var bind$
|
|
42565
|
+
var bind$a = functionBindContext$3; // `FlattenIntoArray` abstract operation
|
|
42566
42566
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
42567
42567
|
|
|
42568
|
-
var flattenIntoArray$1$
|
|
42568
|
+
var flattenIntoArray$1$3 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
42569
42569
|
var targetIndex = start;
|
|
42570
42570
|
var sourceIndex = 0;
|
|
42571
|
-
var mapFn = mapper ? bind$
|
|
42571
|
+
var mapFn = mapper ? bind$a(mapper, thisArg, 3) : false;
|
|
42572
42572
|
var element;
|
|
42573
42573
|
|
|
42574
42574
|
while (sourceIndex < sourceLen) {
|
|
@@ -42576,7 +42576,7 @@
|
|
|
42576
42576
|
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
42577
42577
|
|
|
42578
42578
|
if (depth > 0 && isArray$1$3(element)) {
|
|
42579
|
-
targetIndex = flattenIntoArray$1$
|
|
42579
|
+
targetIndex = flattenIntoArray$1$3(target, original, element, toLength$1$3(element.length), targetIndex, depth - 1) - 1;
|
|
42580
42580
|
} else {
|
|
42581
42581
|
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
42582
42582
|
target[targetIndex] = element;
|
|
@@ -42591,7 +42591,7 @@
|
|
|
42591
42591
|
return targetIndex;
|
|
42592
42592
|
};
|
|
42593
42593
|
|
|
42594
|
-
var flattenIntoArray_1$
|
|
42594
|
+
var flattenIntoArray_1$3 = flattenIntoArray$1$3;
|
|
42595
42595
|
var requireObjectCoercible$g = requireObjectCoercible$4$3; // `ToObject` abstract operation
|
|
42596
42596
|
// https://tc39.github.io/ecma262/#sec-toobject
|
|
42597
42597
|
|
|
@@ -42599,20 +42599,20 @@
|
|
|
42599
42599
|
return Object(requireObjectCoercible$g(argument));
|
|
42600
42600
|
};
|
|
42601
42601
|
|
|
42602
|
-
var isObject$
|
|
42603
|
-
var isArray$b = isArray$2$
|
|
42602
|
+
var isObject$i = isObject$8$3;
|
|
42603
|
+
var isArray$b = isArray$2$3;
|
|
42604
42604
|
var wellKnownSymbol$1$3 = wellKnownSymbol$d$3;
|
|
42605
|
-
var SPECIES$
|
|
42605
|
+
var SPECIES$8 = wellKnownSymbol$1$3('species'); // `ArraySpeciesCreate` abstract operation
|
|
42606
42606
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
42607
42607
|
|
|
42608
|
-
var arraySpeciesCreate$1$
|
|
42608
|
+
var arraySpeciesCreate$1$3 = function (originalArray, length) {
|
|
42609
42609
|
var C;
|
|
42610
42610
|
|
|
42611
42611
|
if (isArray$b(originalArray)) {
|
|
42612
42612
|
C = originalArray.constructor; // cross-realm fallback
|
|
42613
42613
|
|
|
42614
|
-
if (typeof C == 'function' && (C === Array || isArray$b(C.prototype))) C = undefined;else if (isObject$
|
|
42615
|
-
C = C[SPECIES$
|
|
42614
|
+
if (typeof C == 'function' && (C === Array || isArray$b(C.prototype))) C = undefined;else if (isObject$i(C)) {
|
|
42615
|
+
C = C[SPECIES$8];
|
|
42616
42616
|
if (C === null) C = undefined;
|
|
42617
42617
|
}
|
|
42618
42618
|
}
|
|
@@ -42620,15 +42620,15 @@
|
|
|
42620
42620
|
return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
|
42621
42621
|
};
|
|
42622
42622
|
|
|
42623
|
-
var $$
|
|
42624
|
-
var flattenIntoArray$
|
|
42623
|
+
var $$k = _export$3;
|
|
42624
|
+
var flattenIntoArray$4 = flattenIntoArray_1$3;
|
|
42625
42625
|
var toObject$b = toObject$1$3;
|
|
42626
|
-
var toLength$
|
|
42626
|
+
var toLength$e = toLength$5$3;
|
|
42627
42627
|
var aFunction$b = aFunction$5$3;
|
|
42628
|
-
var arraySpeciesCreate$
|
|
42628
|
+
var arraySpeciesCreate$4 = arraySpeciesCreate$1$3; // `Array.prototype.flatMap` method
|
|
42629
42629
|
// https://github.com/tc39/proposal-flatMap
|
|
42630
42630
|
|
|
42631
|
-
$$
|
|
42631
|
+
$$k({
|
|
42632
42632
|
target: 'Array',
|
|
42633
42633
|
proto: true
|
|
42634
42634
|
}, {
|
|
@@ -42636,11 +42636,11 @@
|
|
|
42636
42636
|
/* , thisArg */
|
|
42637
42637
|
) {
|
|
42638
42638
|
var O = toObject$b(this);
|
|
42639
|
-
var sourceLen = toLength$
|
|
42639
|
+
var sourceLen = toLength$e(O.length);
|
|
42640
42640
|
var A;
|
|
42641
42641
|
aFunction$b(callbackfn);
|
|
42642
|
-
A = arraySpeciesCreate$
|
|
42643
|
-
A.length = flattenIntoArray$
|
|
42642
|
+
A = arraySpeciesCreate$4(O, 0);
|
|
42643
|
+
A.length = flattenIntoArray$4(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
42644
42644
|
return A;
|
|
42645
42645
|
}
|
|
42646
42646
|
});
|
|
@@ -42757,10 +42757,10 @@
|
|
|
42757
42757
|
return Properties === undefined ? result : defineProperties$4(result, Properties);
|
|
42758
42758
|
};
|
|
42759
42759
|
|
|
42760
|
-
var wellKnownSymbol$
|
|
42760
|
+
var wellKnownSymbol$r = wellKnownSymbol$d$3;
|
|
42761
42761
|
var create$6 = objectCreate$3;
|
|
42762
42762
|
var definePropertyModule$8 = objectDefineProperty$3;
|
|
42763
|
-
var UNSCOPABLES$3 = wellKnownSymbol$
|
|
42763
|
+
var UNSCOPABLES$3 = wellKnownSymbol$r('unscopables');
|
|
42764
42764
|
var ArrayPrototype$4 = Array.prototype; // Array.prototype[@@unscopables]
|
|
42765
42765
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
42766
42766
|
|
|
@@ -42981,7 +42981,7 @@
|
|
|
42981
42981
|
var isArray$a = /*@__PURE__*/ (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })();
|
|
42982
42982
|
|
|
42983
42983
|
/** PURE_IMPORTS_START PURE_IMPORTS_END */
|
|
42984
|
-
function isObject$
|
|
42984
|
+
function isObject$h(x) {
|
|
42985
42985
|
return x !== null && typeof x === 'object';
|
|
42986
42986
|
}
|
|
42987
42987
|
|
|
@@ -43041,7 +43041,7 @@
|
|
|
43041
43041
|
var len = _subscriptions.length;
|
|
43042
43042
|
while (++index < len) {
|
|
43043
43043
|
var sub = _subscriptions[index];
|
|
43044
|
-
if (isObject$
|
|
43044
|
+
if (isObject$h(sub)) {
|
|
43045
43045
|
try {
|
|
43046
43046
|
sub.unsubscribe();
|
|
43047
43047
|
}
|
|
@@ -44285,7 +44285,7 @@
|
|
|
44285
44285
|
return subscribeToIterable(result);
|
|
44286
44286
|
}
|
|
44287
44287
|
else {
|
|
44288
|
-
var value = isObject$
|
|
44288
|
+
var value = isObject$h(result) ? 'an invalid object' : "'" + result + "'";
|
|
44289
44289
|
var msg = "You provided " + value + " where a stream was expected."
|
|
44290
44290
|
+ ' You can provide an Observable, Promise, Array, or Iterable.';
|
|
44291
44291
|
throw new TypeError(msg);
|
|
@@ -44550,7 +44550,7 @@
|
|
|
44550
44550
|
if (isArray$a(first_1)) {
|
|
44551
44551
|
return forkJoinInternal(first_1, null);
|
|
44552
44552
|
}
|
|
44553
|
-
if (isObject$
|
|
44553
|
+
if (isObject$h(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {
|
|
44554
44554
|
var keys = Object.keys(first_1);
|
|
44555
44555
|
return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);
|
|
44556
44556
|
}
|
|
@@ -47851,6 +47851,37 @@
|
|
|
47851
47851
|
}
|
|
47852
47852
|
});
|
|
47853
47853
|
|
|
47854
|
+
function styleInject(css, ref) {
|
|
47855
|
+
if ( ref === void 0 ) ref = {};
|
|
47856
|
+
var insertAt = ref.insertAt;
|
|
47857
|
+
|
|
47858
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
47859
|
+
|
|
47860
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
47861
|
+
var style = document.createElement('style');
|
|
47862
|
+
style.type = 'text/css';
|
|
47863
|
+
|
|
47864
|
+
if (insertAt === 'top') {
|
|
47865
|
+
if (head.firstChild) {
|
|
47866
|
+
head.insertBefore(style, head.firstChild);
|
|
47867
|
+
} else {
|
|
47868
|
+
head.appendChild(style);
|
|
47869
|
+
}
|
|
47870
|
+
} else {
|
|
47871
|
+
head.appendChild(style);
|
|
47872
|
+
}
|
|
47873
|
+
|
|
47874
|
+
if (style.styleSheet) {
|
|
47875
|
+
style.styleSheet.cssText = css;
|
|
47876
|
+
} else {
|
|
47877
|
+
style.appendChild(document.createTextNode(css));
|
|
47878
|
+
}
|
|
47879
|
+
}
|
|
47880
|
+
|
|
47881
|
+
var css_248z$4 = ".Toastify__toast-container{z-index:9999;-webkit-transform:translateZ(9999px);position:fixed;padding:4px;width:320px;box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:1em;left:1em}.Toastify__toast-container--top-center{top:1em;left:50%;margin-left:-160px}.Toastify__toast-container--top-right{top:1em;right:1em}.Toastify__toast-container--bottom-left{bottom:1em;left:1em}.Toastify__toast-container--bottom-center{bottom:1em;left:50%;margin-left:-160px}.Toastify__toast-container--bottom-right{bottom:1em;right:1em}@media only screen and (max-width:480px){.Toastify__toast-container{width:100vw;padding:0;left:0;margin:0}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:0}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:0}.Toastify__toast-container--rtl{right:0;left:auto}}.Toastify__toast{position:relative;min-height:64px;box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:1px;box-shadow:0 1px 10px 0 rgba(0,0,0,.1),0 2px 15px 0 rgba(0,0,0,.05);display:flex;justify-content:space-between;max-height:800px;overflow:hidden;font-family:sans-serif;cursor:pointer;direction:ltr}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--default{background:#fff;color:#aaa}.Toastify__toast--info{background:#3498db}.Toastify__toast--success{background:#07bc0c}.Toastify__toast--warning{background:#f1c40f}.Toastify__toast--error{background:#e74c3c}.Toastify__toast-body{margin:auto 0;flex:1}@media only screen and (max-width:480px){.Toastify__toast{margin-bottom:0}}.Toastify__close-button{color:#fff;font-weight:700;font-size:14px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;align-self:flex-start}.Toastify__close-button--default{color:#000;opacity:.3}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@-webkit-keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:5px;z-index:9999;opacity:.7;background-color:hsla(0,0%,100%,.7);transform-origin:left}.Toastify__progress-bar--animated{-webkit-animation:Toastify__trackProgress linear 1 forwards;animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:auto;transform-origin:right}.Toastify__progress-bar--default{background:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55)}@-webkit-keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@-webkit-keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(2000px,0,0)}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(2000px,0,0)}}@-webkit-keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@-webkit-keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,0,0)}to{opacity:0;transform:translate3d(-2000px,0,0)}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,0,0)}to{opacity:0;transform:translate3d(-2000px,0,0)}}@-webkit-keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@-webkit-keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,-10px,0)}40%,45%{opacity:1;transform:translate3d(0,20px,0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,-10px,0)}40%,45%{opacity:1;transform:translate3d(0,20px,0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@-webkit-keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@-webkit-keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,10px,0)}40%,45%{opacity:1;transform:translate3d(0,-20px,0)}to{opacity:0;transform:translate3d(0,2000px,0)}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,10px,0)}40%,45%{opacity:1;transform:translate3d(0,-20px,0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{-webkit-animation-name:Toastify__bounceInLeft;animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{-webkit-animation-name:Toastify__bounceInRight;animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{-webkit-animation-name:Toastify__bounceInDown;animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{-webkit-animation-name:Toastify__bounceInUp;animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{-webkit-animation-name:Toastify__bounceOutLeft;animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{-webkit-animation-name:Toastify__bounceOutRight;animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{-webkit-animation-name:Toastify__bounceOutUp;animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{-webkit-animation-name:Toastify__bounceOutDown;animation-name:Toastify__bounceOutDown}@-webkit-keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@-webkit-keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{-webkit-animation-name:Toastify__zoomIn;animation-name:Toastify__zoomIn}.Toastify__zoom-exit{-webkit-animation-name:Toastify__zoomOut;animation-name:Toastify__zoomOut}@-webkit-keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@-webkit-keyframes Toastify__flipOut{0%{transform:perspective(400px)}30%{transform:perspective(400px) rotateX(-20deg);opacity:1}to{transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes Toastify__flipOut{0%{transform:perspective(400px)}30%{transform:perspective(400px) rotateX(-20deg);opacity:1}to{transform:perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{-webkit-animation-name:Toastify__flipIn;animation-name:Toastify__flipIn}.Toastify__flip-exit{-webkit-animation-name:Toastify__flipOut;animation-name:Toastify__flipOut}@-webkit-keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translateZ(0)}}@-webkit-keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translateZ(0)}}@-webkit-keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translateZ(0)}}@-webkit-keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translateZ(0)}}@-webkit-keyframes Toastify__slideOutRight{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(110%,0,0)}}@keyframes Toastify__slideOutRight{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(110%,0,0)}}@-webkit-keyframes Toastify__slideOutLeft{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(-110%,0,0)}}@keyframes Toastify__slideOutLeft{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(-110%,0,0)}}@-webkit-keyframes Toastify__slideOutDown{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutDown{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@-webkit-keyframes Toastify__slideOutUp{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{-webkit-animation-name:Toastify__slideInLeft;animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{-webkit-animation-name:Toastify__slideInRight;animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{-webkit-animation-name:Toastify__slideInDown;animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{-webkit-animation-name:Toastify__slideInUp;animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{-webkit-animation-name:Toastify__slideOutLeft;animation-name:Toastify__slideOutLeft}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{-webkit-animation-name:Toastify__slideOutRight;animation-name:Toastify__slideOutRight}.Toastify__slide-exit--top-center{-webkit-animation-name:Toastify__slideOutUp;animation-name:Toastify__slideOutUp}.Toastify__slide-exit--bottom-center{-webkit-animation-name:Toastify__slideOutDown;animation-name:Toastify__slideOutDown}";
|
|
47882
|
+
var stylesheet=".Toastify__toast-container{z-index:9999;-webkit-transform:translateZ(9999px);position:fixed;padding:4px;width:320px;box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:1em;left:1em}.Toastify__toast-container--top-center{top:1em;left:50%;margin-left:-160px}.Toastify__toast-container--top-right{top:1em;right:1em}.Toastify__toast-container--bottom-left{bottom:1em;left:1em}.Toastify__toast-container--bottom-center{bottom:1em;left:50%;margin-left:-160px}.Toastify__toast-container--bottom-right{bottom:1em;right:1em}@media only screen and (max-width:480px){.Toastify__toast-container{width:100vw;padding:0;left:0;margin:0}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:0}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:0}.Toastify__toast-container--rtl{right:0;left:auto}}.Toastify__toast{position:relative;min-height:64px;box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:1px;box-shadow:0 1px 10px 0 rgba(0,0,0,.1),0 2px 15px 0 rgba(0,0,0,.05);display:flex;justify-content:space-between;max-height:800px;overflow:hidden;font-family:sans-serif;cursor:pointer;direction:ltr}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--default{background:#fff;color:#aaa}.Toastify__toast--info{background:#3498db}.Toastify__toast--success{background:#07bc0c}.Toastify__toast--warning{background:#f1c40f}.Toastify__toast--error{background:#e74c3c}.Toastify__toast-body{margin:auto 0;flex:1}@media only screen and (max-width:480px){.Toastify__toast{margin-bottom:0}}.Toastify__close-button{color:#fff;font-weight:700;font-size:14px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;align-self:flex-start}.Toastify__close-button--default{color:#000;opacity:.3}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@-webkit-keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:5px;z-index:9999;opacity:.7;background-color:hsla(0,0%,100%,.7);transform-origin:left}.Toastify__progress-bar--animated{-webkit-animation:Toastify__trackProgress linear 1 forwards;animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:auto;transform-origin:right}.Toastify__progress-bar--default{background:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55)}@-webkit-keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@-webkit-keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(2000px,0,0)}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(2000px,0,0)}}@-webkit-keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@-webkit-keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,0,0)}to{opacity:0;transform:translate3d(-2000px,0,0)}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,0,0)}to{opacity:0;transform:translate3d(-2000px,0,0)}}@-webkit-keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@-webkit-keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,-10px,0)}40%,45%{opacity:1;transform:translate3d(0,20px,0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,-10px,0)}40%,45%{opacity:1;transform:translate3d(0,20px,0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@-webkit-keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@-webkit-keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,10px,0)}40%,45%{opacity:1;transform:translate3d(0,-20px,0)}to{opacity:0;transform:translate3d(0,2000px,0)}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,10px,0)}40%,45%{opacity:1;transform:translate3d(0,-20px,0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{-webkit-animation-name:Toastify__bounceInLeft;animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{-webkit-animation-name:Toastify__bounceInRight;animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{-webkit-animation-name:Toastify__bounceInDown;animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{-webkit-animation-name:Toastify__bounceInUp;animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{-webkit-animation-name:Toastify__bounceOutLeft;animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{-webkit-animation-name:Toastify__bounceOutRight;animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{-webkit-animation-name:Toastify__bounceOutUp;animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{-webkit-animation-name:Toastify__bounceOutDown;animation-name:Toastify__bounceOutDown}@-webkit-keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@-webkit-keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{-webkit-animation-name:Toastify__zoomIn;animation-name:Toastify__zoomIn}.Toastify__zoom-exit{-webkit-animation-name:Toastify__zoomOut;animation-name:Toastify__zoomOut}@-webkit-keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@-webkit-keyframes Toastify__flipOut{0%{transform:perspective(400px)}30%{transform:perspective(400px) rotateX(-20deg);opacity:1}to{transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes Toastify__flipOut{0%{transform:perspective(400px)}30%{transform:perspective(400px) rotateX(-20deg);opacity:1}to{transform:perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{-webkit-animation-name:Toastify__flipIn;animation-name:Toastify__flipIn}.Toastify__flip-exit{-webkit-animation-name:Toastify__flipOut;animation-name:Toastify__flipOut}@-webkit-keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translateZ(0)}}@-webkit-keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translateZ(0)}}@-webkit-keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translateZ(0)}}@-webkit-keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translateZ(0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translateZ(0)}}@-webkit-keyframes Toastify__slideOutRight{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(110%,0,0)}}@keyframes Toastify__slideOutRight{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(110%,0,0)}}@-webkit-keyframes Toastify__slideOutLeft{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(-110%,0,0)}}@keyframes Toastify__slideOutLeft{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(-110%,0,0)}}@-webkit-keyframes Toastify__slideOutDown{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutDown{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@-webkit-keyframes Toastify__slideOutUp{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{-webkit-animation-name:Toastify__slideInLeft;animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{-webkit-animation-name:Toastify__slideInRight;animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{-webkit-animation-name:Toastify__slideInDown;animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{-webkit-animation-name:Toastify__slideInUp;animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{-webkit-animation-name:Toastify__slideOutLeft;animation-name:Toastify__slideOutLeft}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{-webkit-animation-name:Toastify__slideOutRight;animation-name:Toastify__slideOutRight}.Toastify__slide-exit--top-center{-webkit-animation-name:Toastify__slideOutUp;animation-name:Toastify__slideOutUp}.Toastify__slide-exit--bottom-center{-webkit-animation-name:Toastify__slideOutDown;animation-name:Toastify__slideOutDown}";
|
|
47883
|
+
styleInject(css_248z$4);
|
|
47884
|
+
|
|
47854
47885
|
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
|
|
47855
47886
|
function catchError(selector) {
|
|
47856
47887
|
return function catchErrorOperatorFunction(source) {
|
|
@@ -48840,12 +48871,12 @@
|
|
|
48840
48871
|
var path$3 = path$1$2;
|
|
48841
48872
|
var global$b$2 = global$j$2;
|
|
48842
48873
|
|
|
48843
|
-
var aFunction$8$
|
|
48874
|
+
var aFunction$8$2 = function (variable) {
|
|
48844
48875
|
return typeof variable == 'function' ? variable : undefined;
|
|
48845
48876
|
};
|
|
48846
48877
|
|
|
48847
48878
|
var getBuiltIn$5$2 = function (namespace, method) {
|
|
48848
|
-
return arguments.length < 2 ? aFunction$8$
|
|
48879
|
+
return arguments.length < 2 ? aFunction$8$2(path$3[namespace]) || aFunction$8$2(global$b$2[namespace]) : path$3[namespace] && path$3[namespace][method] || global$b$2[namespace] && global$b$2[namespace][method];
|
|
48849
48880
|
};
|
|
48850
48881
|
|
|
48851
48882
|
var objectGetOwnPropertyNames$2 = {};
|
|
@@ -51878,7 +51909,7 @@
|
|
|
51878
51909
|
} // add a key to Array.prototype[@@unscopables]
|
|
51879
51910
|
|
|
51880
51911
|
|
|
51881
|
-
var addToUnscopables$2$
|
|
51912
|
+
var addToUnscopables$2$2 = function (key) {
|
|
51882
51913
|
ArrayPrototype$3[UNSCOPABLES$2][key] = true;
|
|
51883
51914
|
};
|
|
51884
51915
|
|
|
@@ -52112,7 +52143,7 @@
|
|
|
52112
52143
|
};
|
|
52113
52144
|
|
|
52114
52145
|
var toIndexedObject$6 = toIndexedObject$4$2;
|
|
52115
|
-
var addToUnscopables$1$2 = addToUnscopables$2$
|
|
52146
|
+
var addToUnscopables$1$2 = addToUnscopables$2$2;
|
|
52116
52147
|
var Iterators$6 = iterators$2;
|
|
52117
52148
|
var InternalStateModule$7 = internalState$2;
|
|
52118
52149
|
var defineIterator$4 = defineIterator$1$2;
|
|
@@ -53324,27 +53355,27 @@
|
|
|
53324
53355
|
var classof$d = classofRaw$1$2; // `IsArray` abstract operation
|
|
53325
53356
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
53326
53357
|
|
|
53327
|
-
var isArray$3$
|
|
53358
|
+
var isArray$3$2 = Array.isArray || function isArray(arg) {
|
|
53328
53359
|
return classof$d(arg) == 'Array';
|
|
53329
53360
|
};
|
|
53330
53361
|
|
|
53331
|
-
var isArray$2$
|
|
53362
|
+
var isArray$2$2 = isArray$3$2;
|
|
53332
53363
|
var toLength$3$2 = toLength$a$1;
|
|
53333
|
-
var bind$
|
|
53364
|
+
var bind$9 = functionBindContext$2; // `FlattenIntoArray` abstract operation
|
|
53334
53365
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
53335
53366
|
|
|
53336
|
-
var flattenIntoArray$1$
|
|
53367
|
+
var flattenIntoArray$1$2 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
53337
53368
|
var targetIndex = start;
|
|
53338
53369
|
var sourceIndex = 0;
|
|
53339
|
-
var mapFn = mapper ? bind$
|
|
53370
|
+
var mapFn = mapper ? bind$9(mapper, thisArg, 3) : false;
|
|
53340
53371
|
var element;
|
|
53341
53372
|
|
|
53342
53373
|
while (sourceIndex < sourceLen) {
|
|
53343
53374
|
if (sourceIndex in source) {
|
|
53344
53375
|
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
53345
53376
|
|
|
53346
|
-
if (depth > 0 && isArray$2$
|
|
53347
|
-
targetIndex = flattenIntoArray$1$
|
|
53377
|
+
if (depth > 0 && isArray$2$2(element)) {
|
|
53378
|
+
targetIndex = flattenIntoArray$1$2(target, original, element, toLength$3$2(element.length), targetIndex, depth - 1) - 1;
|
|
53348
53379
|
} else {
|
|
53349
53380
|
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
53350
53381
|
target[targetIndex] = element;
|
|
@@ -53359,21 +53390,21 @@
|
|
|
53359
53390
|
return targetIndex;
|
|
53360
53391
|
};
|
|
53361
53392
|
|
|
53362
|
-
var flattenIntoArray_1$
|
|
53363
|
-
var isObject$
|
|
53364
|
-
var isArray$1$2 = isArray$3$
|
|
53365
|
-
var wellKnownSymbol$
|
|
53366
|
-
var SPECIES$
|
|
53393
|
+
var flattenIntoArray_1$2 = flattenIntoArray$1$2;
|
|
53394
|
+
var isObject$g = isObject$9$2;
|
|
53395
|
+
var isArray$1$2 = isArray$3$2;
|
|
53396
|
+
var wellKnownSymbol$q = wellKnownSymbol$h$2;
|
|
53397
|
+
var SPECIES$7 = wellKnownSymbol$q('species'); // `ArraySpeciesCreate` abstract operation
|
|
53367
53398
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
53368
53399
|
|
|
53369
|
-
var arraySpeciesCreate$1$
|
|
53400
|
+
var arraySpeciesCreate$1$2 = function (originalArray, length) {
|
|
53370
53401
|
var C;
|
|
53371
53402
|
|
|
53372
53403
|
if (isArray$1$2(originalArray)) {
|
|
53373
53404
|
C = originalArray.constructor; // cross-realm fallback
|
|
53374
53405
|
|
|
53375
|
-
if (typeof C == 'function' && (C === Array || isArray$1$2(C.prototype))) C = undefined;else if (isObject$
|
|
53376
|
-
C = C[SPECIES$
|
|
53406
|
+
if (typeof C == 'function' && (C === Array || isArray$1$2(C.prototype))) C = undefined;else if (isObject$g(C)) {
|
|
53407
|
+
C = C[SPECIES$7];
|
|
53377
53408
|
if (C === null) C = undefined;
|
|
53378
53409
|
}
|
|
53379
53410
|
}
|
|
@@ -53382,11 +53413,11 @@
|
|
|
53382
53413
|
};
|
|
53383
53414
|
|
|
53384
53415
|
var $$5$2 = _export$2;
|
|
53385
|
-
var flattenIntoArray$
|
|
53416
|
+
var flattenIntoArray$3 = flattenIntoArray_1$2;
|
|
53386
53417
|
var toObject$2$2 = toObject$6$2;
|
|
53387
53418
|
var toLength$2$2 = toLength$a$1;
|
|
53388
53419
|
var aFunction$1$2 = aFunction$7$2;
|
|
53389
|
-
var arraySpeciesCreate$
|
|
53420
|
+
var arraySpeciesCreate$3 = arraySpeciesCreate$1$2; // `Array.prototype.flatMap` method
|
|
53390
53421
|
// https://github.com/tc39/proposal-flatMap
|
|
53391
53422
|
|
|
53392
53423
|
$$5$2({
|
|
@@ -53400,14 +53431,14 @@
|
|
|
53400
53431
|
var sourceLen = toLength$2$2(O.length);
|
|
53401
53432
|
var A;
|
|
53402
53433
|
aFunction$1$2(callbackfn);
|
|
53403
|
-
A = arraySpeciesCreate$
|
|
53404
|
-
A.length = flattenIntoArray$
|
|
53434
|
+
A = arraySpeciesCreate$3(O, 0);
|
|
53435
|
+
A.length = flattenIntoArray$3(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
53405
53436
|
return A;
|
|
53406
53437
|
}
|
|
53407
53438
|
}); // this method was added to unscopables after implementation
|
|
53408
53439
|
// in popular engines, so it's moved to a separate module
|
|
53409
53440
|
|
|
53410
|
-
var addToUnscopables$4 = addToUnscopables$2$
|
|
53441
|
+
var addToUnscopables$4 = addToUnscopables$2$2;
|
|
53411
53442
|
addToUnscopables$4('flatMap'); // `SameValue` abstract operation
|
|
53412
53443
|
// https://tc39.github.io/ecma262/#sec-samevalue
|
|
53413
53444
|
|
|
@@ -53823,7 +53854,7 @@
|
|
|
53823
53854
|
var requireObjectCoercible$f = requireObjectCoercible$b$1;
|
|
53824
53855
|
var speciesConstructor$4 = speciesConstructor$2$2;
|
|
53825
53856
|
var advanceStringIndex$6 = advanceStringIndex$3$1;
|
|
53826
|
-
var toLength$
|
|
53857
|
+
var toLength$d = toLength$a$1;
|
|
53827
53858
|
var callRegExpExec$2 = regexpExecAbstract$3;
|
|
53828
53859
|
var regexpExec$6 = regexpExec$3$2;
|
|
53829
53860
|
var fails$3$3 = fails$g$2;
|
|
@@ -53918,7 +53949,7 @@
|
|
|
53918
53949
|
var z = callRegExpExec$2(splitter, SUPPORTS_Y$2 ? S : S.slice(q));
|
|
53919
53950
|
var e;
|
|
53920
53951
|
|
|
53921
|
-
if (z === null || (e = min$6(toLength$
|
|
53952
|
+
if (z === null || (e = min$6(toLength$d(splitter.lastIndex + (SUPPORTS_Y$2 ? 0 : q)), S.length)) === p) {
|
|
53922
53953
|
q = advanceStringIndex$6(S, q, unicodeMatching);
|
|
53923
53954
|
} else {
|
|
53924
53955
|
A.push(S.slice(p, q));
|
|
@@ -54850,9 +54881,9 @@
|
|
|
54850
54881
|
var ToastGlobalStyles = _styled.createGlobalStyle(templateObject_3$1f || (templateObject_3$1f = __makeTemplateObject$k(["\n .lt-reach .Toastify .Toastify__toast-container {\n ", "\n\n ", "\n }\n\n .Toastify {\n .Toastify__toast-container {\n // This allows us to have wider toasts that do not wrap too soon.\n // Toastify itself will add responsive design at 480px and span the\n // toast the full width...\n max-width: 540px;\n width: auto;\n z-index: 1000001;\n\n @media (max-width: 480px) {\n padding: 0 10px !important;\n }\n }\n\n .Toastify__toast-body {\n display: flex;\n flex: 1 1 540px;\n height: 100%;\n justify-content: center;\n flex-direction: column;\n // IE fix: this is a default value from Toastify but doesn't work properly unless added here too\n min-height: 48px;\n }\n }\n"], ["\n .lt-reach .Toastify .Toastify__toast-container {\n ", "\n\n ", "\n }\n\n .Toastify {\n .Toastify__toast-container {\n // This allows us to have wider toasts that do not wrap too soon.\n // Toastify itself will add responsive design at 480px and span the\n // toast the full width...\n max-width: 540px;\n width: auto;\n z-index: 1000001;\n\n @media (max-width: 480px) {\n padding: 0 10px !important;\n }\n }\n\n .Toastify__toast-body {\n display: flex;\n flex: 1 1 540px;\n height: 100%;\n justify-content: center;\n flex-direction: column;\n // IE fix: this is a default value from Toastify but doesn't work properly unless added here too\n min-height: 48px;\n }\n }\n"])), function (p) {
|
|
54851
54882
|
return !p.chromeless && _styled.css(templateObject_1$2F || (templateObject_1$2F = __makeTemplateObject$k(["\n top: 4em;\n "], ["\n top: 4em;\n "])));
|
|
54852
54883
|
}, function (p) {
|
|
54853
|
-
return p.chromeless && _styled.css(templateObject_2$
|
|
54884
|
+
return p.chromeless && _styled.css(templateObject_2$1M || (templateObject_2$1M = __makeTemplateObject$k(["\n @media all and (max-width: ", "px) {\n top: 0.5em;\n right: 0.5em;\n }\n "], ["\n @media all and (max-width: ", "px) {\n top: 0.5em;\n right: 0.5em;\n }\n "])), maxScreenSize.small);
|
|
54854
54885
|
});
|
|
54855
|
-
var templateObject_1$2F, templateObject_2$
|
|
54886
|
+
var templateObject_1$2F, templateObject_2$1M, templateObject_3$1f;
|
|
54856
54887
|
|
|
54857
54888
|
function useKeywordsApi() {
|
|
54858
54889
|
var api = useApi();
|
|
@@ -55152,7 +55183,7 @@
|
|
|
55152
55183
|
function useListener(type, listener, deps) {
|
|
55153
55184
|
React$d.useEffect(function () {
|
|
55154
55185
|
if (!type) {
|
|
55155
|
-
return
|
|
55186
|
+
return undefined;
|
|
55156
55187
|
}
|
|
55157
55188
|
|
|
55158
55189
|
if (!listeners[type]) {
|
|
@@ -55197,15 +55228,15 @@
|
|
|
55197
55228
|
return comparefn === undefined ? nativeSort$2.call(toObject$9(this)) : nativeSort$2.call(toObject$9(this), aFunction$a(comparefn));
|
|
55198
55229
|
}
|
|
55199
55230
|
});
|
|
55200
|
-
var $$
|
|
55201
|
-
var isArray$9 = isArray$3$
|
|
55231
|
+
var $$j = _export$2;
|
|
55232
|
+
var isArray$9 = isArray$3$2;
|
|
55202
55233
|
var nativeReverse$1 = [].reverse;
|
|
55203
55234
|
var test$4 = [1, 2]; // `Array.prototype.reverse` method
|
|
55204
55235
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reverse
|
|
55205
55236
|
// fix for Safari 12.0 bug
|
|
55206
55237
|
// https://bugs.webkit.org/show_bug.cgi?id=188794
|
|
55207
55238
|
|
|
55208
|
-
$$
|
|
55239
|
+
$$j({
|
|
55209
55240
|
target: 'Array',
|
|
55210
55241
|
proto: true,
|
|
55211
55242
|
forced: String(test$4) === String(test$4.reverse())
|
|
@@ -55264,33 +55295,6 @@
|
|
|
55264
55295
|
}
|
|
55265
55296
|
}
|
|
55266
55297
|
|
|
55267
|
-
function styleInject(css, ref) {
|
|
55268
|
-
if ( ref === void 0 ) ref = {};
|
|
55269
|
-
var insertAt = ref.insertAt;
|
|
55270
|
-
|
|
55271
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
55272
|
-
|
|
55273
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
55274
|
-
var style = document.createElement('style');
|
|
55275
|
-
style.type = 'text/css';
|
|
55276
|
-
|
|
55277
|
-
if (insertAt === 'top') {
|
|
55278
|
-
if (head.firstChild) {
|
|
55279
|
-
head.insertBefore(style, head.firstChild);
|
|
55280
|
-
} else {
|
|
55281
|
-
head.appendChild(style);
|
|
55282
|
-
}
|
|
55283
|
-
} else {
|
|
55284
|
-
head.appendChild(style);
|
|
55285
|
-
}
|
|
55286
|
-
|
|
55287
|
-
if (style.styleSheet) {
|
|
55288
|
-
style.styleSheet.cssText = css;
|
|
55289
|
-
} else {
|
|
55290
|
-
style.appendChild(document.createTextNode(css));
|
|
55291
|
-
}
|
|
55292
|
-
}
|
|
55293
|
-
|
|
55294
55298
|
var css_248z$3 = "/*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */\n/*\n\tStyles for basic PhotoSwipe functionality (sliding area, open/close transitions)\n*/\n/* pswp = photoswipe */\n.pswp {\n display: none;\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n overflow: hidden;\n touch-action: none;\n z-index: 1500;\n -webkit-text-size-adjust: 100%;\n /* create separate layer, to avoid paint on window.onscroll in webkit/blink */\n -webkit-backface-visibility: hidden;\n outline: none; }\n .pswp * {\n box-sizing: border-box; }\n .pswp img {\n max-width: none; }\n\n/* style is added when JS option showHideOpacity is set to true */\n.pswp--animate_opacity {\n /* 0.001, because opacity:0 doesn't trigger Paint action, which causes lag at start of transition */\n opacity: 0.001;\n will-change: opacity;\n /* for open/close transition */\n transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }\n\n.pswp--open {\n display: block; }\n\n.pswp--zoom-allowed .pswp__img {\n /* autoprefixer: off */\n cursor: -webkit-zoom-in;\n cursor: -moz-zoom-in;\n cursor: zoom-in; }\n\n.pswp--zoomed-in .pswp__img {\n /* autoprefixer: off */\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab; }\n\n.pswp--dragging .pswp__img {\n /* autoprefixer: off */\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing; }\n\n/*\n\tBackground is added as a separate element.\n\tAs animating opacity is much faster than animating rgba() background-color.\n*/\n.pswp__bg {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: #000;\n opacity: 0;\n transform: translateZ(0);\n -webkit-backface-visibility: hidden;\n will-change: opacity; }\n\n.pswp__scroll-wrap {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n overflow: hidden; }\n\n.pswp__container,\n.pswp__zoom-wrap {\n touch-action: none;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0; }\n\n/* Prevent selection and tap highlights */\n.pswp__container,\n.pswp__img {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none; }\n\n.pswp__zoom-wrap {\n position: absolute;\n width: 100%;\n transform-origin: left top;\n /* for open/close transition */\n transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1); }\n\n.pswp__bg {\n will-change: opacity;\n /* for open/close transition */\n transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }\n\n.pswp--animated-in .pswp__bg,\n.pswp--animated-in .pswp__zoom-wrap {\n transition: none; }\n\n.pswp__container,\n.pswp__zoom-wrap {\n -webkit-backface-visibility: hidden; }\n\n.pswp__item {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n overflow: hidden; }\n\n.pswp__img {\n position: absolute;\n width: auto;\n height: auto;\n top: 0;\n left: 0; }\n\n/*\n\tstretched thumbnail or div placeholder element (see below)\n\tstyle is added to avoid flickering in webkit/blink when layers overlap\n*/\n.pswp__img--placeholder {\n -webkit-backface-visibility: hidden; }\n\n/*\n\tdiv element that matches size of large image\n\tlarge image loads on top of it\n*/\n.pswp__img--placeholder--blank {\n background: #222; }\n\n.pswp--ie .pswp__img {\n width: 100% !important;\n height: auto !important;\n left: 0;\n top: 0; }\n\n/*\n\tError message appears when image is not loaded\n\t(JS option errorMsg controls markup)\n*/\n.pswp__error-msg {\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n text-align: center;\n font-size: 14px;\n line-height: 16px;\n margin-top: -8px;\n color: #CCC; }\n\n.pswp__error-msg a {\n color: #CCC;\n text-decoration: underline; }\n";
|
|
55295
55299
|
styleInject(css_248z$3);
|
|
55296
55300
|
|
|
@@ -65273,9 +65277,9 @@
|
|
|
65273
65277
|
var colors_1 = colors;
|
|
65274
65278
|
var bouncer$1 = emotion_1.keyframes(templateObject_1$2D || (templateObject_1$2D = __makeTemplateObject$i(["\n to {\n transform: scale(1.75) translateY(-20px);\n }\n"], ["\n to {\n transform: scale(1.75) translateY(-20px);\n }\n"])));
|
|
65275
65279
|
var loaderHeight$1 = 37;
|
|
65276
|
-
var loader$1 = emotion_1.css(templateObject_2$
|
|
65280
|
+
var loader$1 = emotion_1.css(templateObject_2$1L || (templateObject_2$1L = __makeTemplateObject$i(["\n display: flex;\n align-items: center;\n height: ", "px;\n padding-top: 15px;\n margin: 0 auto;\n text-align: center;\n justify-content: center;\n animation: pulse 0.8s ease-in-out 0s infinite alternate backwards;\n div {\n display: inline-block;\n height: 10px;\n width: 10px;\n margin: ", "px 10px 10px 10px;\n position: relative;\n box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);\n animation: ", " cubic-bezier(0.455, 0.03, 0.515, 0.955) 0.75s infinite alternate;\n &:nth-child(5n + 1) {\n background: ", ";\n animation-delay: 0;\n }\n &:nth-child(5n + 2) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 1));\n }\n &:nth-child(5n + 3) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 2));\n }\n &:nth-child(5n + 4) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 3));\n }\n &:nth-child(5n + 5) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 4));\n }\n }\n"], ["\n display: flex;\n align-items: center;\n height: ", "px;\n padding-top: 15px;\n margin: 0 auto;\n text-align: center;\n justify-content: center;\n animation: pulse 0.8s ease-in-out 0s infinite alternate backwards;\n div {\n display: inline-block;\n height: 10px;\n width: 10px;\n margin: ", "px 10px 10px 10px;\n position: relative;\n box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);\n animation: ", " cubic-bezier(0.455, 0.03, 0.515, 0.955) 0.75s infinite alternate;\n &:nth-child(5n + 1) {\n background: ", ";\n animation-delay: 0;\n }\n &:nth-child(5n + 2) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 1));\n }\n &:nth-child(5n + 3) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 2));\n }\n &:nth-child(5n + 4) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 3));\n }\n &:nth-child(5n + 5) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 4));\n }\n }\n"])), loaderHeight$1, loaderHeight$1, bouncer$1, colors_1.giphyGreen, colors_1.giphyBlue, colors_1.giphyPurple, colors_1.giphyRed, colors_1.giphyYellow);
|
|
65277
65281
|
loader$2.default = loader$1;
|
|
65278
|
-
var templateObject_1$2D, templateObject_2$
|
|
65282
|
+
var templateObject_1$2D, templateObject_2$1L;
|
|
65279
65283
|
|
|
65280
65284
|
var typography = {};
|
|
65281
65285
|
|
|
@@ -65406,7 +65410,7 @@
|
|
|
65406
65410
|
var avatar_1$3 = __importDefault$k(avatar);
|
|
65407
65411
|
var user_1$1 = __importDefault$k(user);
|
|
65408
65412
|
var Container$b = styled_1$a.default.div(templateObject_1$2C || (templateObject_1$2C = __makeTemplateObject$h(["\n display: flex;\n align-items: center;\n font-family: interface, helvetica, arial;\n"], ["\n display: flex;\n align-items: center;\n font-family: interface, helvetica, arial;\n"])));
|
|
65409
|
-
var Avatar$4 = styled_1$a.default(avatar_1$3.default)(templateObject_2$
|
|
65413
|
+
var Avatar$4 = styled_1$a.default(avatar_1$3.default)(templateObject_2$1K || (templateObject_2$1K = __makeTemplateObject$h(["\n flex-shrink: 0;\n"], ["\n flex-shrink: 0;\n"])));
|
|
65410
65414
|
var Attribution$2 = function (_a) {
|
|
65411
65415
|
var gif = _a.gif, className = _a.className, onClick = _a.onClick;
|
|
65412
65416
|
var user = gif.user;
|
|
@@ -65430,7 +65434,7 @@
|
|
|
65430
65434
|
};
|
|
65431
65435
|
Attribution$2.className = 'giphy-attribution';
|
|
65432
65436
|
attribution$1.default = Attribution$2;
|
|
65433
|
-
var templateObject_1$2C, templateObject_2$
|
|
65437
|
+
var templateObject_1$2C, templateObject_2$1K;
|
|
65434
65438
|
|
|
65435
65439
|
var overlay = {};
|
|
65436
65440
|
|
|
@@ -65465,7 +65469,7 @@
|
|
|
65465
65469
|
var react_1$r = __importStar$c(React__default["default"]);
|
|
65466
65470
|
var _1$1 = __importDefault$j(attribution$1);
|
|
65467
65471
|
var Background = styled_1$9.default.div(templateObject_1$2B || (templateObject_1$2B = __makeTemplateObject$g(["\n background: linear-gradient(rgba(0, 0, 0, 0), rgba(18, 18, 18, 0.6));\n cursor: default;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 75px;\n pointer-events: none;\n"], ["\n background: linear-gradient(rgba(0, 0, 0, 0), rgba(18, 18, 18, 0.6));\n cursor: default;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 75px;\n pointer-events: none;\n"])));
|
|
65468
|
-
var Attribution$1 = styled_1$9.default(_1$1.default)(templateObject_2$
|
|
65472
|
+
var Attribution$1 = styled_1$9.default(_1$1.default)(templateObject_2$1J || (templateObject_2$1J = __makeTemplateObject$g(["\n position: absolute;\n bottom: 10px;\n left: 10px;\n right: 10px;\n"], ["\n position: absolute;\n bottom: 10px;\n left: 10px;\n right: 10px;\n"])));
|
|
65469
65473
|
var Container$a = styled_1$9.default.div(templateObject_3$1e || (templateObject_3$1e = __makeTemplateObject$g(["\n transition: opacity 150ms ease-in;\n"], ["\n transition: opacity 150ms ease-in;\n"])));
|
|
65470
65474
|
var AttributionOverlay = function (_a) {
|
|
65471
65475
|
var gif = _a.gif, isHovered = _a.isHovered, onClick = _a.onClick;
|
|
@@ -65479,7 +65483,7 @@
|
|
|
65479
65483
|
react_1$r.default.createElement(Attribution$1, { gif: gif, onClick: onClick }))) : null;
|
|
65480
65484
|
};
|
|
65481
65485
|
overlay.default = AttributionOverlay;
|
|
65482
|
-
var templateObject_1$2B, templateObject_2$
|
|
65486
|
+
var templateObject_1$2B, templateObject_2$1J, templateObject_3$1e;
|
|
65483
65487
|
|
|
65484
65488
|
var carousel = {};
|
|
65485
65489
|
|
|
@@ -65605,9 +65609,9 @@
|
|
|
65605
65609
|
|
|
65606
65610
|
var functionBind = Function.prototype.bind || implementation;
|
|
65607
65611
|
|
|
65608
|
-
var bind$
|
|
65612
|
+
var bind$8 = functionBind;
|
|
65609
65613
|
|
|
65610
|
-
var src = bind$
|
|
65614
|
+
var src = bind$8.call(Function.call, Object.prototype.hasOwnProperty);
|
|
65611
65615
|
|
|
65612
65616
|
var undefined$1;
|
|
65613
65617
|
|
|
@@ -65805,12 +65809,12 @@
|
|
|
65805
65809
|
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
65806
65810
|
};
|
|
65807
65811
|
|
|
65808
|
-
var bind$
|
|
65812
|
+
var bind$7 = functionBind;
|
|
65809
65813
|
var hasOwn$2 = src;
|
|
65810
|
-
var $concat = bind$
|
|
65811
|
-
var $spliceApply = bind$
|
|
65812
|
-
var $replace = bind$
|
|
65813
|
-
var $strSlice = bind$
|
|
65814
|
+
var $concat = bind$7.call(Function.call, Array.prototype.concat);
|
|
65815
|
+
var $spliceApply = bind$7.call(Function.apply, Array.prototype.splice);
|
|
65816
|
+
var $replace = bind$7.call(Function.call, String.prototype.replace);
|
|
65817
|
+
var $strSlice = bind$7.call(Function.call, String.prototype.slice);
|
|
65814
65818
|
|
|
65815
65819
|
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
65816
65820
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
@@ -68746,7 +68750,7 @@
|
|
|
68746
68750
|
var gif_1$1 = __importDefault$f(gif);
|
|
68747
68751
|
var pingback_context_manager_1$1 = __importDefault$f(pingbackContextManager);
|
|
68748
68752
|
var Container$9 = styled_1$8.default.div(templateObject_1$2A || (templateObject_1$2A = __makeTemplateObject$f(["\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n overflow-y: hidden;\n white-space: nowrap;\n position: relative;\n"], ["\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n overflow-y: hidden;\n white-space: nowrap;\n position: relative;\n"])));
|
|
68749
|
-
var Gif = styled_1$8.default(gif_1$1.default)(templateObject_2$
|
|
68753
|
+
var Gif = styled_1$8.default(gif_1$1.default)(templateObject_2$1I || (templateObject_2$1I = __makeTemplateObject$f(["\n position: relative;\n display: inline-block;\n list-style: none;\n margin-left: ", "px;\n /* make sure gifs are fully visible with a scrollbar */\n margin-bottom: 1px;\n\n &:first-of-type {\n margin-left: 0;\n }\n .", " {\n position: absolute;\n top: 0;\n left: 0;\n }\n"], ["\n position: relative;\n display: inline-block;\n list-style: none;\n margin-left: ", "px;\n /* make sure gifs are fully visible with a scrollbar */\n margin-bottom: 1px;\n\n &:first-of-type {\n margin-left: 0;\n }\n .", " {\n position: absolute;\n top: 0;\n left: 0;\n }\n"])), function (props) { return props.ml; }, gif_1$1.default.imgClassName);
|
|
68750
68754
|
var Observer = styled_1$8.default(observer_1$1.default)(templateObject_3$1d || (templateObject_3$1d = __makeTemplateObject$f(["\n display: inline-block;\n"], ["\n display: inline-block;\n"])));
|
|
68751
68755
|
var Loader$2 = styled_1$8.default.div(templateObject_4$Q || (templateObject_4$Q = __makeTemplateObject$f(["\n width: 30px;\n display: inline-block;\n opacity: ", ";\n height: ", "px;\n"], ["\n width: 30px;\n display: inline-block;\n opacity: ", ";\n height: ", "px;\n"])), function (props) { return (props.isFirstLoad ? 0 : 1); }, function (props) { return props.height; });
|
|
68752
68756
|
var defaultProps$1 = Object.freeze({ gutter: 6, user: {}, initialGifs: [] });
|
|
@@ -68836,7 +68840,7 @@
|
|
|
68836
68840
|
return Carousel;
|
|
68837
68841
|
}(react_1$p.PureComponent));
|
|
68838
68842
|
carousel.default = Carousel$1;
|
|
68839
|
-
var templateObject_1$2A, templateObject_2$
|
|
68843
|
+
var templateObject_1$2A, templateObject_2$1I, templateObject_3$1d, templateObject_4$Q;
|
|
68840
68844
|
|
|
68841
68845
|
var grid = {};
|
|
68842
68846
|
|
|
@@ -68879,7 +68883,7 @@
|
|
|
68879
68883
|
var react_1$n = __importDefault$d(React__default["default"]);
|
|
68880
68884
|
var bouncer = core_1$4.keyframes(templateObject_1$2y || (templateObject_1$2y = __makeTemplateObject$d(["\n to {\n transform: scale(1.75) translateY(-20px);\n }\n"], ["\n to {\n transform: scale(1.75) translateY(-20px);\n }\n"])));
|
|
68881
68885
|
var loaderHeight = 37;
|
|
68882
|
-
var Loader$1 = styled_1$6.default.div(templateObject_2$
|
|
68886
|
+
var Loader$1 = styled_1$6.default.div(templateObject_2$1H || (templateObject_2$1H = __makeTemplateObject$d(["\n display: flex;\n align-items: center;\n height: ", "px;\n padding-top: 15px;\n margin: 0 auto;\n text-align: center;\n justify-content: center;\n animation: pulse 0.8s ease-in-out 0s infinite alternate backwards;\n"], ["\n display: flex;\n align-items: center;\n height: ", "px;\n padding-top: 15px;\n margin: 0 auto;\n text-align: center;\n justify-content: center;\n animation: pulse 0.8s ease-in-out 0s infinite alternate backwards;\n"])), loaderHeight);
|
|
68883
68887
|
var Dot = styled_1$6.default.div(templateObject_3$1c || (templateObject_3$1c = __makeTemplateObject$d(["\n display: inline-block;\n height: 10px;\n width: 10px;\n margin: ", "px 10px 10px 10px;\n position: relative;\n box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);\n animation: ", " cubic-bezier(0.455, 0.03, 0.515, 0.955) 0.75s infinite alternate;\n background: ", ";\n animation-delay: ", ";\n"], ["\n display: inline-block;\n height: 10px;\n width: 10px;\n margin: ", "px 10px 10px 10px;\n position: relative;\n box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);\n animation: ", " cubic-bezier(0.455, 0.03, 0.515, 0.955) 0.75s infinite alternate;\n background: ", ";\n animation-delay: ", ";\n"])), loaderHeight, bouncer, function (props) { return props.color; }, function (props) { return props.delay; });
|
|
68884
68888
|
loader.default = (function (_a) {
|
|
68885
68889
|
var _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
@@ -68890,7 +68894,7 @@
|
|
|
68890
68894
|
react_1$n.default.createElement(Dot, { color: js_brand_1$4.giphyRed, delay: ".3s" }),
|
|
68891
68895
|
react_1$n.default.createElement(Dot, { color: js_brand_1$4.giphyYellow, delay: ".4s" })));
|
|
68892
68896
|
});
|
|
68893
|
-
var templateObject_1$2y, templateObject_2$
|
|
68897
|
+
var templateObject_1$2y, templateObject_2$1H, templateObject_3$1c;
|
|
68894
68898
|
|
|
68895
68899
|
var masonryGrid = {};
|
|
68896
68900
|
|
|
@@ -69324,11 +69328,11 @@
|
|
|
69324
69328
|
// DRY but kinda ugly
|
|
69325
69329
|
var getSize = function (theme, includeWidth) {
|
|
69326
69330
|
if (includeWidth === void 0) { includeWidth = false; }
|
|
69327
|
-
return core_1$3.css(templateObject_3$1b || (templateObject_3$1b = __makeTemplateObject$b(["\n height: ", "px;\n ", ";\n @media (", ") {\n height: ", "px;\n ", ";\n }\n"], ["\n height: ", "px;\n ", ";\n @media (", ") {\n height: ", "px;\n ", ";\n }\n"])), theme.searchbarHeight, includeWidth && core_1$3.css(templateObject_1$2w || (templateObject_1$2w = __makeTemplateObject$b(["\n width: ", "px;\n "], ["\n width: ", "px;\n "])), theme.searchbarHeight), theme.condensedMediaQuery, theme.smallSearchbarHeight, includeWidth && core_1$3.css(templateObject_2$
|
|
69331
|
+
return core_1$3.css(templateObject_3$1b || (templateObject_3$1b = __makeTemplateObject$b(["\n height: ", "px;\n ", ";\n @media (", ") {\n height: ", "px;\n ", ";\n }\n"], ["\n height: ", "px;\n ", ";\n @media (", ") {\n height: ", "px;\n ", ";\n }\n"])), theme.searchbarHeight, includeWidth && core_1$3.css(templateObject_1$2w || (templateObject_1$2w = __makeTemplateObject$b(["\n width: ", "px;\n "], ["\n width: ", "px;\n "])), theme.searchbarHeight), theme.condensedMediaQuery, theme.smallSearchbarHeight, includeWidth && core_1$3.css(templateObject_2$1G || (templateObject_2$1G = __makeTemplateObject$b(["\n width: ", "px;\n "], ["\n width: ", "px;\n "])), theme.smallSearchbarHeight));
|
|
69328
69332
|
};
|
|
69329
69333
|
theme.getSize = getSize;
|
|
69330
69334
|
theme.default = styled_1$4.default;
|
|
69331
|
-
var templateObject_1$2w, templateObject_2$
|
|
69335
|
+
var templateObject_1$2w, templateObject_2$1G, templateObject_3$1b;
|
|
69332
69336
|
|
|
69333
69337
|
(function (exports) {
|
|
69334
69338
|
var __assign = (commonjsGlobal$7 && commonjsGlobal$7.__assign) || function () {
|
|
@@ -69572,7 +69576,7 @@
|
|
|
69572
69576
|
var channelSearchHeight = function (theme) { return theme.searchbarHeight - channelMargin * 2; };
|
|
69573
69577
|
var smallChannelSearchHeight = function (theme) { return theme.smallSearchbarHeight - 3 * 2; };
|
|
69574
69578
|
var animateAvatar = function (h) { return core_1$2.keyframes(templateObject_1$2v || (templateObject_1$2v = __makeTemplateObject$a(["\nto {\n width: ", "px;\n}\n"], ["\nto {\n width: ", "px;\n}\n"])), h); };
|
|
69575
|
-
var Avatar$3 = theme_1$4.default(avatar_1$2.default)(templateObject_2$
|
|
69579
|
+
var Avatar$3 = theme_1$4.default(avatar_1$2.default)(templateObject_2$1F || (templateObject_2$1F = __makeTemplateObject$a(["\n height: ", "px;\n margin: 0;\n width: 0;\n animation: ", " 100ms ease-in-out forwards;\n @media (", ") {\n height: ", "px;\n animation: ", " 100ms ease-in-out forwards;\n }\n"], ["\n height: ", "px;\n margin: 0;\n width: 0;\n animation: ", " 100ms ease-in-out forwards;\n @media (", ") {\n height: ", "px;\n animation: ", " 100ms ease-in-out forwards;\n }\n"])), function (props) { return channelSearchHeight(props.theme); }, function (props) { return animateAvatar(channelSearchHeight(props.theme)); }, function (props) { return props.theme.condensedMediaQuery; }, function (props) { return smallChannelSearchHeight(props.theme); }, function (props) { return animateAvatar(smallChannelSearchHeight(props.theme)); });
|
|
69576
69580
|
var Username = theme_1$4.default.div(templateObject_3$1a || (templateObject_3$1a = __makeTemplateObject$a(["\n background: ", ";\n display: flex;\n align-items: center;\n padding-left: ", "px;\n"], ["\n background: ", ";\n display: flex;\n align-items: center;\n padding-left: ", "px;\n"])), function (props) { return (props.theme.mode === 'dark' ? js_brand_1$3.giphyCharcoal : js_brand_1$3.giphyWhite); }, channelMargin);
|
|
69577
69581
|
var UsernamePill = theme_1$4.default.div(templateObject_4$P || (templateObject_4$P = __makeTemplateObject$a(["\n background: ", ";\n display: flex;\n padding: 0 4px;\n color: ", ";\n font-family: interface, Helvetica Neue, helvetica, sans-serif;\n font-weight: 600;\n font-size: 12px;\n align-items: center;\n height: ", "px;\n @media (", ") {\n display: none;\n }\n"], ["\n background: ", ";\n display: flex;\n padding: 0 4px;\n color: ", ";\n font-family: interface, Helvetica Neue, helvetica, sans-serif;\n font-weight: 600;\n font-size: 12px;\n align-items: center;\n height: ", "px;\n @media (", ") {\n display: none;\n }\n"])), js_brand_1$3.giphyWhiteSmoke, js_brand_1$3.giphyDarkCharcoal, function (props) { return channelSearchHeight(props.theme); }, function (props) { return props.theme.condensedMediaQuery; });
|
|
69578
69582
|
var SearchBarChannel = function (_a) {
|
|
@@ -69587,7 +69591,7 @@
|
|
|
69587
69591
|
activeChannel.user.is_verified && react_1$i.default.createElement(verified_badge_1$1.default, { size: 14 })))) : null;
|
|
69588
69592
|
};
|
|
69589
69593
|
searchBarChannel.default = SearchBarChannel;
|
|
69590
|
-
var templateObject_1$2v, templateObject_2$
|
|
69594
|
+
var templateObject_1$2v, templateObject_2$1F, templateObject_3$1a, templateObject_4$P;
|
|
69591
69595
|
|
|
69592
69596
|
var searchButton = {};
|
|
69593
69597
|
|
|
@@ -69714,7 +69718,7 @@
|
|
|
69714
69718
|
var pink = '#FF6666';
|
|
69715
69719
|
var strongEasing = 'cubic-bezier(0.920, 0.240, 0.185, 0.730)';
|
|
69716
69720
|
var searchFx = core_1$1.keyframes(templateObject_1$2u || (templateObject_1$2u = __makeTemplateObject$9(["\n 0% {\n transform: rotate(34deg) translate(-10px, 80px);\n };\n \n 100% {\n transform: rotate(34deg) translate(-10px, -20px);\n }\n"], ["\n 0% {\n transform: rotate(34deg) translate(-10px, 80px);\n };\n \n 100% {\n transform: rotate(34deg) translate(-10px, -20px);\n }\n"])));
|
|
69717
|
-
var plus$1 = core_1$1.keyframes(templateObject_2$
|
|
69721
|
+
var plus$1 = core_1$1.keyframes(templateObject_2$1E || (templateObject_2$1E = __makeTemplateObject$9(["\n 0% { \n transform: translate(0px, 0px);\n opacity: 0;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n transform: translate(10px, -17px);\n opacity: 0;\n }\n"], ["\n 0% { \n transform: translate(0px, 0px);\n opacity: 0;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n transform: translate(10px, -17px);\n opacity: 0;\n }\n"])));
|
|
69718
69722
|
var gradientFade = core_1$1.keyframes(templateObject_3$19 || (templateObject_3$19 = __makeTemplateObject$9(["\n 0% {\n opacity: 0;\n transform: translateX(-400%);\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n transform: translateX(0);\n }\n"], ["\n 0% {\n opacity: 0;\n transform: translateX(-400%);\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n transform: translateX(0);\n }\n"])));
|
|
69719
69723
|
var Container$8 = theme_1$3.default.div(templateObject_4$O || (templateObject_4$O = __makeTemplateObject$9(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n cursor: pointer;\n @media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {\n display: none;\n }\n ", "\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n cursor: pointer;\n @media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {\n display: none;\n }\n ", "\n"])), function (props) { return theme_1$3.getSize(props.theme, true); });
|
|
69720
69724
|
var GradientBox = theme_1$3.default.div(templateObject_5$G || (templateObject_5$G = __makeTemplateObject$9(["\n position: absolute;\n height: 100%;\n width: 100%;\n background: linear-gradient(45deg, ", " 0%, ", " 100%);\n overflow: hidden;\n &:before {\n animation: ", " ", " linear 0s infinite;\n background-image: linear-gradient(45deg, ", " 0%, ", " 50%, ", " 100%);\n background-size: 400%;\n background-position: 0% 100%;\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n width: 400%;\n }\n"], ["\n position: absolute;\n height: 100%;\n width: 100%;\n background: linear-gradient(45deg, ", " 0%, ", " 100%);\n overflow: hidden;\n &:before {\n animation: ", " ", " linear 0s infinite;\n background-image: linear-gradient(45deg, ", " 0%, ", " 50%, ", " 100%);\n background-size: 400%;\n background-position: 0% 100%;\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n width: 400%;\n }\n"])), purp, pink, gradientFade, time, purp, pink, purp);
|
|
@@ -69732,7 +69736,7 @@
|
|
|
69732
69736
|
react_1$d.default.createElement(Scanner, null)))));
|
|
69733
69737
|
};
|
|
69734
69738
|
searchButton.default = SearchButton;
|
|
69735
|
-
var templateObject_1$2u, templateObject_2$
|
|
69739
|
+
var templateObject_1$2u, templateObject_2$1E, templateObject_3$19, templateObject_4$O, templateObject_5$G, templateObject_6$u, templateObject_7$o, templateObject_8$m;
|
|
69736
69740
|
|
|
69737
69741
|
var __makeTemplateObject$8 = (commonjsGlobal$7 && commonjsGlobal$7.__makeTemplateObject) || function (cooked, raw) {
|
|
69738
69742
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
@@ -69779,7 +69783,7 @@
|
|
|
69779
69783
|
var SEARCH_DEBOUNCE = 500;
|
|
69780
69784
|
var Container$7 = theme_1$2.default.div(templateObject_1$2t || (templateObject_1$2t = __makeTemplateObject$8(["\n display: flex;\n background: white;\n ", "\n"], ["\n display: flex;\n background: white;\n ", "\n"])), function (props) { return theme_1$2.getSize(props.theme); });
|
|
69781
69785
|
var Input = theme_1$2.default.input(templateObject_3$18 || (templateObject_3$18 = __makeTemplateObject$8(["\n background: ", ";\n box-sizing: border-box;\n border: 0;\n appearance: none;\n font-weight: normal;\n font-family: interface, Helvetica Neue, helvetica, sans-serif;\n outline: 0;\n font-size: 15px;\n padding: 0 10px;\n border-radius: 0;\n text-overflow: ellipsis;\n color: ", ";\n &::placeholder {\n color: ", ";\n }\n min-width: 150px;\n flex: 1;\n ", "\n"], ["\n background: ", ";\n box-sizing: border-box;\n border: 0;\n appearance: none;\n font-weight: normal;\n font-family: interface, Helvetica Neue, helvetica, sans-serif;\n outline: 0;\n font-size: 15px;\n padding: 0 10px;\n border-radius: 0;\n text-overflow: ellipsis;\n color: ", ";\n &::placeholder {\n color: ", ";\n }\n min-width: 150px;\n flex: 1;\n ", "\n"])), function (props) { return (props.theme.mode === 'dark' ? js_brand_1$2.giphyCharcoal : js_brand_1$2.giphyWhite); }, function (props) { return (props.theme.mode === 'dark' ? js_brand_1$2.giphyWhite : js_brand_1$2.giphyBlack); }, function (props) { return (props.theme.mode === 'dark' ? js_brand_1$2.giphyLightGrey : js_brand_1$2.giphyLightGrey); }, function (props) {
|
|
69782
|
-
return props.isUsernameSearch && core_1.css(templateObject_2$
|
|
69786
|
+
return props.isUsernameSearch && core_1.css(templateObject_2$1D || (templateObject_2$1D = __makeTemplateObject$8(["\n color: ", ";\n "], ["\n color: ", ";\n "])), js_brand_1$2.giphyIndigo);
|
|
69783
69787
|
});
|
|
69784
69788
|
var SearchBar = function (_a) {
|
|
69785
69789
|
var className = _a.className, _b = _a.placeholder, placeholder = _b === void 0 ? "Search GIPHY" : _b, _c = _a.clear, clear = _c === void 0 ? false : _c, autoFocus = _a.autoFocus;
|
|
@@ -69846,7 +69850,7 @@
|
|
|
69846
69850
|
};
|
|
69847
69851
|
SearchBar.className = 'giphy-search-bar';
|
|
69848
69852
|
searchBar.default = SearchBar;
|
|
69849
|
-
var templateObject_1$2t, templateObject_2$
|
|
69853
|
+
var templateObject_1$2t, templateObject_2$1D, templateObject_3$18;
|
|
69850
69854
|
|
|
69851
69855
|
var suggestionBar = {};
|
|
69852
69856
|
|
|
@@ -69906,7 +69910,7 @@
|
|
|
69906
69910
|
var trending_icon_1 = __importDefault$5(trendingIcon);
|
|
69907
69911
|
var margin = 9;
|
|
69908
69912
|
var ChannelPillContainer = theme_1$1.default.div(templateObject_1$2s || (templateObject_1$2s = __makeTemplateObject$7(["\n background: ", ";\n display: flex;\n padding-right: 4px;\n align-items: center;\n margin-right: ", "px;\n cursor: pointer;\n"], ["\n background: ", ";\n display: flex;\n padding-right: 4px;\n align-items: center;\n margin-right: ", "px;\n cursor: pointer;\n"])), js_brand_1$1.giphyDarkestGrey, margin);
|
|
69909
|
-
var TrendingSearchPillContainer = theme_1$1.default.div(templateObject_2$
|
|
69913
|
+
var TrendingSearchPillContainer = theme_1$1.default.div(templateObject_2$1C || (templateObject_2$1C = __makeTemplateObject$7(["\n background: ", ";\n display: flex;\n padding: 14px;\n align-items: center;\n margin-right: ", "px;\n white-space: nowrap;\n cursor: pointer;\n font-style: italic;\n border-radius: 20px;\n"], ["\n background: ", ";\n display: flex;\n padding: 14px;\n align-items: center;\n margin-right: ", "px;\n white-space: nowrap;\n cursor: pointer;\n font-style: italic;\n border-radius: 20px;\n"])), js_brand_1$1.giphyDarkestGrey, margin);
|
|
69910
69914
|
var Avatar$2 = theme_1$1.default(avatar_1$1.default)(templateObject_3$17 || (templateObject_3$17 = __makeTemplateObject$7(["\n ", "\n"], ["\n ", "\n"])), function (props) { return theme_1$1.getSize(props.theme, true); });
|
|
69911
69915
|
var TrendingIcon = theme_1$1.default(trending_icon_1.default)(templateObject_4$N || (templateObject_4$N = __makeTemplateObject$7(["\n margin-right: 2px;\n"], ["\n margin-right: 2px;\n"])));
|
|
69912
69916
|
var ChannelPill = function (_a) {
|
|
@@ -69928,7 +69932,7 @@
|
|
|
69928
69932
|
trendingSearch));
|
|
69929
69933
|
};
|
|
69930
69934
|
pills.TrendingSearchPill = TrendingSearchPill;
|
|
69931
|
-
var templateObject_1$2s, templateObject_2$
|
|
69935
|
+
var templateObject_1$2s, templateObject_2$1C, templateObject_3$17, templateObject_4$N;
|
|
69932
69936
|
|
|
69933
69937
|
var __makeTemplateObject$6 = (commonjsGlobal$7 && commonjsGlobal$7.__makeTemplateObject) || function (cooked, raw) {
|
|
69934
69938
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
@@ -74829,7 +74833,7 @@
|
|
|
74829
74833
|
var user_1 = __importDefault$3(user);
|
|
74830
74834
|
var clips_branding_1 = __importDefault$3(clipsBranding);
|
|
74831
74835
|
var Container$5 = styled_1$3.default.div(templateObject_1$2q || (templateObject_1$2q = __makeTemplateObject$5(["\n display: flex;\n align-items: center;\n font-family: interface, helvetica, arial;\n cursor: pointer;\n"], ["\n display: flex;\n align-items: center;\n font-family: interface, helvetica, arial;\n cursor: pointer;\n"])));
|
|
74832
|
-
var Avatar$1 = styled_1$3.default(avatar_1.default)(templateObject_2$
|
|
74836
|
+
var Avatar$1 = styled_1$3.default(avatar_1.default)(templateObject_2$1B || (templateObject_2$1B = __makeTemplateObject$5(["\n flex-shrink: 0;\n"], ["\n flex-shrink: 0;\n"])));
|
|
74833
74837
|
var Right = styled_1$3.default.div(templateObject_3$16 || (templateObject_3$16 = __makeTemplateObject$5(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
74834
74838
|
var Attribution = function (_a) {
|
|
74835
74839
|
var gif = _a.gif, className = _a.className, onClick = _a.onClick;
|
|
@@ -74865,7 +74869,7 @@
|
|
|
74865
74869
|
};
|
|
74866
74870
|
Attribution.className = 'giphy-attribution';
|
|
74867
74871
|
attribution.default = Attribution;
|
|
74868
|
-
var templateObject_1$2q, templateObject_2$
|
|
74872
|
+
var templateObject_1$2q, templateObject_2$1B, templateObject_3$16;
|
|
74869
74873
|
|
|
74870
74874
|
var volume = {};
|
|
74871
74875
|
|
|
@@ -75337,7 +75341,7 @@
|
|
|
75337
75341
|
var progress_bar_1 = __importDefault$1(progressBar);
|
|
75338
75342
|
var video_1 = __importDefault$1(video);
|
|
75339
75343
|
var Container$4 = styled_1$1.default.div(templateObject_1$2o || (templateObject_1$2o = __makeTemplateObject$3(["\n position: relative;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: black;\n font-family: interface, helvetica, arial;\n -webkit-font-smoothing: antialiased;\n"], ["\n position: relative;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: black;\n font-family: interface, helvetica, arial;\n -webkit-font-smoothing: antialiased;\n"])));
|
|
75340
|
-
var Volume = styled_1$1.default.div(templateObject_2$
|
|
75344
|
+
var Volume = styled_1$1.default.div(templateObject_2$1A || (templateObject_2$1A = __makeTemplateObject$3(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n cursor: pointer;\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n cursor: pointer;\n"])));
|
|
75341
75345
|
var Controls = styled_1$1.default.div(templateObject_3$15 || (templateObject_3$15 = __makeTemplateObject$3(["\n position: absolute;\n top: 10px;\n right: 10px;\n left: 10px;\n bottom: 0;\n display: flex;\n justify-content: space-between;\n opacity: ", ";\n transition: opacity ease-out 250ms;\n align-items: flex-start;\n"], ["\n position: absolute;\n top: 10px;\n right: 10px;\n left: 10px;\n bottom: 0;\n display: flex;\n justify-content: space-between;\n opacity: ", ";\n transition: opacity ease-out 250ms;\n align-items: flex-start;\n"])), function (props) { return (props.isHovered ? 1 : 0); });
|
|
75342
75346
|
var Title$9 = styled_1$1.default.div(templateObject_4$M || (templateObject_4$M = __makeTemplateObject$3(["\n font-size: 26px;\n color: white;\n margin-bottom: 5px;\n font-weight: bold;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n user-select: none;\n cursor: pointer;\n"], ["\n font-size: 26px;\n color: white;\n margin-bottom: 5px;\n font-weight: bold;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n user-select: none;\n cursor: pointer;\n"])));
|
|
75343
75347
|
var TitleContainer$1 = styled_1$1.default.div(templateObject_5$F || (templateObject_5$F = __makeTemplateObject$3(["\n position: relative;\n min-width: 0;\n"], ["\n position: relative;\n min-width: 0;\n"])));
|
|
@@ -75421,7 +75425,7 @@
|
|
|
75421
75425
|
return props.controls ? react_1$1.default.createElement(VideoPlayer, __assign$3({}, props)) : react_1$1.default.createElement(video_1.default, __assign$3({}, props));
|
|
75422
75426
|
};
|
|
75423
75427
|
video$1.default = VideoWrapper;
|
|
75424
|
-
var templateObject_1$2o, templateObject_2$
|
|
75428
|
+
var templateObject_1$2o, templateObject_2$1A, templateObject_3$15, templateObject_4$M, templateObject_5$F, templateObject_6$t;
|
|
75425
75429
|
|
|
75426
75430
|
var playPause = {};
|
|
75427
75431
|
|
|
@@ -75497,7 +75501,7 @@
|
|
|
75497
75501
|
var _1 = __importDefault(video$1);
|
|
75498
75502
|
var volume_1 = volume;
|
|
75499
75503
|
var VideoContainer = styled_1.default.div(templateObject_1$2n || (templateObject_1$2n = __makeTemplateObject$2(["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n height: 100%;\n width: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n height: 100%;\n width: 100%;\n"])));
|
|
75500
|
-
var VideoStyled = styled_1.default(_1.default)(templateObject_2$
|
|
75504
|
+
var VideoStyled = styled_1.default(_1.default)(templateObject_2$1z || (templateObject_2$1z = __makeTemplateObject$2(["\n height: 100%;\n display: inline-block;\n object-fit: fill;\n pointer-events: none;\n background: rgb(0, 0, 0, 0);\n"], ["\n height: 100%;\n display: inline-block;\n object-fit: fill;\n pointer-events: none;\n background: rgb(0, 0, 0, 0);\n"])));
|
|
75501
75505
|
var Button$1 = styled_1.default.div(templateObject_3$14 || (templateObject_3$14 = __makeTemplateObject$2(["\n position: absolute;\n top: 6px;\n right: 6px;\n cursor: pointer;\n opacity: ", ";\n transition: opacity ease-out 800ms;\n"], ["\n position: absolute;\n top: 6px;\n right: 6px;\n cursor: pointer;\n opacity: ", ";\n transition: opacity ease-out 800ms;\n"])), function (props) { return (props.isHovered ? 1 : 0.8); });
|
|
75502
75506
|
var speakerClassName = 'giphy-video-overlay-button';
|
|
75503
75507
|
var VolumeButton = function (_a) {
|
|
@@ -75532,7 +75536,7 @@
|
|
|
75532
75536
|
};
|
|
75533
75537
|
VideoOverlay.imgClassName = speakerClassName;
|
|
75534
75538
|
videoOverlay.default = VideoOverlay;
|
|
75535
|
-
var templateObject_1$2n, templateObject_2$
|
|
75539
|
+
var templateObject_1$2n, templateObject_2$1z, templateObject_3$14;
|
|
75536
75540
|
|
|
75537
75541
|
var _args = [
|
|
75538
75542
|
[
|
|
@@ -77289,12 +77293,12 @@
|
|
|
77289
77293
|
var path$2 = path$1$1;
|
|
77290
77294
|
var global$b$1 = global$j$1;
|
|
77291
77295
|
|
|
77292
|
-
var aFunction$8 = function (variable) {
|
|
77296
|
+
var aFunction$8$1 = function (variable) {
|
|
77293
77297
|
return typeof variable == 'function' ? variable : undefined;
|
|
77294
77298
|
};
|
|
77295
77299
|
|
|
77296
77300
|
var getBuiltIn$5$1 = function (namespace, method) {
|
|
77297
|
-
return arguments.length < 2 ? aFunction$8(path$2[namespace]) || aFunction$8(global$b$1[namespace]) : path$2[namespace] && path$2[namespace][method] || global$b$1[namespace] && global$b$1[namespace][method];
|
|
77301
|
+
return arguments.length < 2 ? aFunction$8$1(path$2[namespace]) || aFunction$8$1(global$b$1[namespace]) : path$2[namespace] && path$2[namespace][method] || global$b$1[namespace] && global$b$1[namespace][method];
|
|
77298
77302
|
};
|
|
77299
77303
|
|
|
77300
77304
|
var objectGetOwnPropertyNames$1 = {};
|
|
@@ -77505,12 +77509,12 @@
|
|
|
77505
77509
|
var requireObjectCoercible$7$1 = requireObjectCoercible$9$1; // `ToObject` abstract operation
|
|
77506
77510
|
// https://tc39.github.io/ecma262/#sec-toobject
|
|
77507
77511
|
|
|
77508
|
-
var toObject$7 = function (argument) {
|
|
77512
|
+
var toObject$7$1 = function (argument) {
|
|
77509
77513
|
return Object(requireObjectCoercible$7$1(argument));
|
|
77510
77514
|
};
|
|
77511
77515
|
|
|
77512
77516
|
var aFunction$6$1 = aFunction$7$1;
|
|
77513
|
-
var toObject$6$1 = toObject$7;
|
|
77517
|
+
var toObject$6$1 = toObject$7$1;
|
|
77514
77518
|
var IndexedObject$1$1 = indexedObject$1;
|
|
77515
77519
|
var toLength$6$1 = toLength$8$1; // `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
77516
77520
|
|
|
@@ -77628,7 +77632,7 @@
|
|
|
77628
77632
|
var objectKeys$1$1 = objectKeys$2$1;
|
|
77629
77633
|
var getOwnPropertySymbolsModule$2 = objectGetOwnPropertySymbols$1;
|
|
77630
77634
|
var propertyIsEnumerableModule$2 = objectPropertyIsEnumerable$1;
|
|
77631
|
-
var toObject$5$1 = toObject$7;
|
|
77635
|
+
var toObject$5$1 = toObject$7$1;
|
|
77632
77636
|
var IndexedObject$3 = indexedObject$1;
|
|
77633
77637
|
var nativeAssign$1 = Object.assign;
|
|
77634
77638
|
var defineProperty$2$1 = Object.defineProperty; // `Object.assign` method
|
|
@@ -77903,7 +77907,7 @@
|
|
|
77903
77907
|
} // add a key to Array.prototype[@@unscopables]
|
|
77904
77908
|
|
|
77905
77909
|
|
|
77906
|
-
var addToUnscopables$2 = function (key) {
|
|
77910
|
+
var addToUnscopables$2$1 = function (key) {
|
|
77907
77911
|
ArrayPrototype$1$1[UNSCOPABLES$1][key] = true;
|
|
77908
77912
|
};
|
|
77909
77913
|
|
|
@@ -77918,7 +77922,7 @@
|
|
|
77918
77922
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
77919
77923
|
});
|
|
77920
77924
|
var has$4$1 = has$c$1;
|
|
77921
|
-
var toObject$4$1 = toObject$7;
|
|
77925
|
+
var toObject$4$1 = toObject$7$1;
|
|
77922
77926
|
var sharedKey$4 = sharedKey$3$1;
|
|
77923
77927
|
var CORRECT_PROTOTYPE_GETTER$1 = correctPrototypeGetter$1;
|
|
77924
77928
|
var IE_PROTO$2 = sharedKey$4('IE_PROTO');
|
|
@@ -78152,7 +78156,7 @@
|
|
|
78152
78156
|
};
|
|
78153
78157
|
|
|
78154
78158
|
var toIndexedObject$5 = toIndexedObject$4$1;
|
|
78155
|
-
var addToUnscopables$1$1 = addToUnscopables$2;
|
|
78159
|
+
var addToUnscopables$1$1 = addToUnscopables$2$1;
|
|
78156
78160
|
var Iterators$2$1 = iterators$1;
|
|
78157
78161
|
var InternalStateModule$1$1 = internalState$1;
|
|
78158
78162
|
var defineIterator$3 = defineIterator$1$1;
|
|
@@ -78691,7 +78695,7 @@
|
|
|
78691
78695
|
}
|
|
78692
78696
|
|
|
78693
78697
|
function prepareEmptyInputFocusItems(accounts) {
|
|
78694
|
-
if (isArray$3(accounts)) {
|
|
78698
|
+
if (isArray$3$1(accounts)) {
|
|
78695
78699
|
return excludeSelectedItems(accounts).map(toPersona);
|
|
78696
78700
|
}
|
|
78697
78701
|
|
|
@@ -78800,7 +78804,7 @@
|
|
|
78800
78804
|
return a.userPrincipalName === b.userPrincipalName;
|
|
78801
78805
|
}
|
|
78802
78806
|
|
|
78803
|
-
function isArray$3(accounts) {
|
|
78807
|
+
function isArray$3$1(accounts) {
|
|
78804
78808
|
return typeof accounts.length !== 'undefined';
|
|
78805
78809
|
}
|
|
78806
78810
|
|
|
@@ -79364,7 +79368,7 @@
|
|
|
79364
79368
|
|
|
79365
79369
|
var fixRegExpWellKnownSymbolLogic$1$1 = fixRegexpWellKnownSymbolLogic$2;
|
|
79366
79370
|
var anObject$5$1 = anObject$e$1;
|
|
79367
|
-
var toObject$3$1 = toObject$7;
|
|
79371
|
+
var toObject$3$1 = toObject$7$1;
|
|
79368
79372
|
var toLength$4$1 = toLength$8$1;
|
|
79369
79373
|
var toInteger$6 = toInteger$4$1;
|
|
79370
79374
|
var requireObjectCoercible$2$2 = requireObjectCoercible$9$1;
|
|
@@ -80983,7 +80987,7 @@
|
|
|
80983
80987
|
|
|
80984
80988
|
var $$2$1 = _export$1;
|
|
80985
80989
|
var aFunction$1$1 = aFunction$7$1;
|
|
80986
|
-
var toObject$2$1 = toObject$7;
|
|
80990
|
+
var toObject$2$1 = toObject$7$1;
|
|
80987
80991
|
var fails$2$2 = fails$h$1;
|
|
80988
80992
|
var arrayMethodIsStrict$3 = arrayMethodIsStrict$2$1;
|
|
80989
80993
|
var test$3 = [];
|
|
@@ -81045,7 +81049,7 @@
|
|
|
81045
81049
|
|
|
81046
81050
|
React$d.useEffect(function () {
|
|
81047
81051
|
if (!props.delay == null) {
|
|
81048
|
-
return
|
|
81052
|
+
return undefined;
|
|
81049
81053
|
}
|
|
81050
81054
|
|
|
81051
81055
|
var timeoutHandle = setTimeout(function () {
|
|
@@ -82064,7 +82068,7 @@
|
|
|
82064
82068
|
var initializeGalleryHandle = React$d.useRef();
|
|
82065
82069
|
React$d.useEffect(function () {
|
|
82066
82070
|
if (hidden) {
|
|
82067
|
-
return
|
|
82071
|
+
return undefined;
|
|
82068
82072
|
} // we have to initialize the gallery with a delay
|
|
82069
82073
|
// because if the gallery is initialized to quickly after it had been closed
|
|
82070
82074
|
// because for example a dependency changed (selectedIndex) than the whole page gets unusable
|
|
@@ -82343,6 +82347,61 @@
|
|
|
82343
82347
|
return;
|
|
82344
82348
|
}
|
|
82345
82349
|
}
|
|
82350
|
+
// eslint-disable-next-line max-len
|
|
82351
|
+
|
|
82352
|
+
|
|
82353
|
+
var whitespaces$2$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
82354
|
+
var requireObjectCoercible$e = requireObjectCoercible$9$1;
|
|
82355
|
+
var whitespaces$1$2 = whitespaces$2$2;
|
|
82356
|
+
var whitespace$2 = '[' + whitespaces$1$2 + ']';
|
|
82357
|
+
var ltrim$2 = RegExp('^' + whitespace$2 + whitespace$2 + '*');
|
|
82358
|
+
var rtrim$2 = RegExp(whitespace$2 + whitespace$2 + '*$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
82359
|
+
|
|
82360
|
+
var createMethod$5 = function (TYPE) {
|
|
82361
|
+
return function ($this) {
|
|
82362
|
+
var string = String(requireObjectCoercible$e($this));
|
|
82363
|
+
if (TYPE & 1) string = string.replace(ltrim$2, '');
|
|
82364
|
+
if (TYPE & 2) string = string.replace(rtrim$2, '');
|
|
82365
|
+
return string;
|
|
82366
|
+
};
|
|
82367
|
+
};
|
|
82368
|
+
|
|
82369
|
+
var stringTrim$2 = {
|
|
82370
|
+
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
82371
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
|
|
82372
|
+
start: createMethod$5(1),
|
|
82373
|
+
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
82374
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trimend
|
|
82375
|
+
end: createMethod$5(2),
|
|
82376
|
+
// `String.prototype.trim` method
|
|
82377
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
82378
|
+
trim: createMethod$5(3)
|
|
82379
|
+
};
|
|
82380
|
+
var fails$k = fails$h$1;
|
|
82381
|
+
var whitespaces$5 = whitespaces$2$2;
|
|
82382
|
+
var non$2 = '\u200B\u0085\u180E'; // check that a method works with the correct list
|
|
82383
|
+
// of whitespaces and has a correct name
|
|
82384
|
+
|
|
82385
|
+
var stringTrimForced$2 = function (METHOD_NAME) {
|
|
82386
|
+
return fails$k(function () {
|
|
82387
|
+
return !!whitespaces$5[METHOD_NAME]() || non$2[METHOD_NAME]() != non$2 || whitespaces$5[METHOD_NAME].name !== METHOD_NAME;
|
|
82388
|
+
});
|
|
82389
|
+
};
|
|
82390
|
+
|
|
82391
|
+
var $$1$2 = _export$1;
|
|
82392
|
+
var $trim$2 = stringTrim$2.trim;
|
|
82393
|
+
var forcedStringTrimMethod$2 = stringTrimForced$2; // `String.prototype.trim` method
|
|
82394
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
82395
|
+
|
|
82396
|
+
$$1$2({
|
|
82397
|
+
target: 'String',
|
|
82398
|
+
proto: true,
|
|
82399
|
+
forced: forcedStringTrimMethod$2('trim')
|
|
82400
|
+
}, {
|
|
82401
|
+
trim: function trim() {
|
|
82402
|
+
return $trim$2(this);
|
|
82403
|
+
}
|
|
82404
|
+
});
|
|
82346
82405
|
|
|
82347
82406
|
var TextLink = function TextLink(_a) {
|
|
82348
82407
|
var url = _a.url,
|
|
@@ -82410,7 +82469,10 @@
|
|
|
82410
82469
|
};
|
|
82411
82470
|
|
|
82412
82471
|
var ToolbarIconButtonWithToolTip = function ToolbarIconButtonWithToolTip(_a) {
|
|
82472
|
+
var _b;
|
|
82473
|
+
|
|
82413
82474
|
var iconName = _a.iconName,
|
|
82475
|
+
ariaLabelText = _a.ariaLabel,
|
|
82414
82476
|
ariaLabelResourceKey = _a.ariaLabelResourceKey,
|
|
82415
82477
|
onClick = _a.onClick,
|
|
82416
82478
|
to = _a.to,
|
|
@@ -82419,10 +82481,10 @@
|
|
|
82419
82481
|
tooltipResourceKey = _a.tooltipResourceKey,
|
|
82420
82482
|
disabled = _a.disabled,
|
|
82421
82483
|
className = _a.className,
|
|
82422
|
-
rest = __rest$1(_a, ["iconName", "ariaLabelResourceKey", "onClick", "to", "target", "tooltipText", "tooltipResourceKey", "disabled", "className"]);
|
|
82484
|
+
rest = __rest$1(_a, ["iconName", "ariaLabel", "ariaLabelResourceKey", "onClick", "to", "target", "tooltipText", "tooltipResourceKey", "disabled", "className"]);
|
|
82423
82485
|
|
|
82424
82486
|
var formatMessage = useIntl().formatMessage;
|
|
82425
|
-
var ariaLabel = formatMessage({
|
|
82487
|
+
var ariaLabel = ariaLabelText || ((_b = ariaLabelResourceKey === null || ariaLabelResourceKey === void 0 ? void 0 : ariaLabelResourceKey.trim()) === null || _b === void 0 ? void 0 : _b.length) > 0 && formatMessage({
|
|
82426
82488
|
id: ariaLabelResourceKey
|
|
82427
82489
|
});
|
|
82428
82490
|
return jsxRuntime.jsxs(Tooltip, __assign$1({
|
|
@@ -84235,62 +84297,8 @@
|
|
|
84235
84297
|
video: 'video-view-container',
|
|
84236
84298
|
code: 'news-inline-code',
|
|
84237
84299
|
quote: 'news-inline-quote'
|
|
84238
|
-
}; // a string of all valid unicode whitespaces
|
|
84239
|
-
// eslint-disable-next-line max-len
|
|
84240
|
-
|
|
84241
|
-
var whitespaces$2$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
84242
|
-
var requireObjectCoercible$e = requireObjectCoercible$9$1;
|
|
84243
|
-
var whitespaces$1$2 = whitespaces$2$2;
|
|
84244
|
-
var whitespace$2 = '[' + whitespaces$1$2 + ']';
|
|
84245
|
-
var ltrim$2 = RegExp('^' + whitespace$2 + whitespace$2 + '*');
|
|
84246
|
-
var rtrim$2 = RegExp(whitespace$2 + whitespace$2 + '*$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
84247
|
-
|
|
84248
|
-
var createMethod$5 = function (TYPE) {
|
|
84249
|
-
return function ($this) {
|
|
84250
|
-
var string = String(requireObjectCoercible$e($this));
|
|
84251
|
-
if (TYPE & 1) string = string.replace(ltrim$2, '');
|
|
84252
|
-
if (TYPE & 2) string = string.replace(rtrim$2, '');
|
|
84253
|
-
return string;
|
|
84254
|
-
};
|
|
84255
84300
|
};
|
|
84256
84301
|
|
|
84257
|
-
var stringTrim$2 = {
|
|
84258
|
-
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
84259
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
|
|
84260
|
-
start: createMethod$5(1),
|
|
84261
|
-
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
84262
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trimend
|
|
84263
|
-
end: createMethod$5(2),
|
|
84264
|
-
// `String.prototype.trim` method
|
|
84265
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
84266
|
-
trim: createMethod$5(3)
|
|
84267
|
-
};
|
|
84268
|
-
var fails$k = fails$h$1;
|
|
84269
|
-
var whitespaces$5 = whitespaces$2$2;
|
|
84270
|
-
var non$2 = '\u200B\u0085\u180E'; // check that a method works with the correct list
|
|
84271
|
-
// of whitespaces and has a correct name
|
|
84272
|
-
|
|
84273
|
-
var stringTrimForced$2 = function (METHOD_NAME) {
|
|
84274
|
-
return fails$k(function () {
|
|
84275
|
-
return !!whitespaces$5[METHOD_NAME]() || non$2[METHOD_NAME]() != non$2 || whitespaces$5[METHOD_NAME].name !== METHOD_NAME;
|
|
84276
|
-
});
|
|
84277
|
-
};
|
|
84278
|
-
|
|
84279
|
-
var $$1$2 = _export$1;
|
|
84280
|
-
var $trim$2 = stringTrim$2.trim;
|
|
84281
|
-
var forcedStringTrimMethod$2 = stringTrimForced$2; // `String.prototype.trim` method
|
|
84282
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
84283
|
-
|
|
84284
|
-
$$1$2({
|
|
84285
|
-
target: 'String',
|
|
84286
|
-
proto: true,
|
|
84287
|
-
forced: forcedStringTrimMethod$2('trim')
|
|
84288
|
-
}, {
|
|
84289
|
-
trim: function trim() {
|
|
84290
|
-
return $trim$2(this);
|
|
84291
|
-
}
|
|
84292
|
-
});
|
|
84293
|
-
|
|
84294
84302
|
function isNullOrWhitespace(s, isHtml) {
|
|
84295
84303
|
if (isHtml === void 0) {
|
|
84296
84304
|
isHtml = false;
|
|
@@ -84472,19 +84480,19 @@
|
|
|
84472
84480
|
var classof$c = classofRaw$1$1; // `IsArray` abstract operation
|
|
84473
84481
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
84474
84482
|
|
|
84475
|
-
var isArray$2 = Array.isArray || function isArray(arg) {
|
|
84483
|
+
var isArray$2$1 = Array.isArray || function isArray(arg) {
|
|
84476
84484
|
return classof$c(arg) == 'Array';
|
|
84477
84485
|
};
|
|
84478
84486
|
|
|
84479
|
-
var isArray$1$1 = isArray$2;
|
|
84487
|
+
var isArray$1$1 = isArray$2$1;
|
|
84480
84488
|
var toLength$1$1 = toLength$8$1;
|
|
84481
|
-
var bind$
|
|
84489
|
+
var bind$6 = functionBindContext$1; // `FlattenIntoArray` abstract operation
|
|
84482
84490
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
84483
84491
|
|
|
84484
|
-
var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
84492
|
+
var flattenIntoArray$1$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
84485
84493
|
var targetIndex = start;
|
|
84486
84494
|
var sourceIndex = 0;
|
|
84487
|
-
var mapFn = mapper ? bind$
|
|
84495
|
+
var mapFn = mapper ? bind$6(mapper, thisArg, 3) : false;
|
|
84488
84496
|
var element;
|
|
84489
84497
|
|
|
84490
84498
|
while (sourceIndex < sourceLen) {
|
|
@@ -84492,7 +84500,7 @@
|
|
|
84492
84500
|
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
84493
84501
|
|
|
84494
84502
|
if (depth > 0 && isArray$1$1(element)) {
|
|
84495
|
-
targetIndex = flattenIntoArray$1(target, original, element, toLength$1$1(element.length), targetIndex, depth - 1) - 1;
|
|
84503
|
+
targetIndex = flattenIntoArray$1$1(target, original, element, toLength$1$1(element.length), targetIndex, depth - 1) - 1;
|
|
84496
84504
|
} else {
|
|
84497
84505
|
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
84498
84506
|
target[targetIndex] = element;
|
|
@@ -84507,21 +84515,21 @@
|
|
|
84507
84515
|
return targetIndex;
|
|
84508
84516
|
};
|
|
84509
84517
|
|
|
84510
|
-
var flattenIntoArray_1 = flattenIntoArray$1;
|
|
84511
|
-
var isObject$
|
|
84512
|
-
var isArray$4 = isArray$2;
|
|
84513
|
-
var wellKnownSymbol$
|
|
84514
|
-
var SPECIES$
|
|
84518
|
+
var flattenIntoArray_1$1 = flattenIntoArray$1$1;
|
|
84519
|
+
var isObject$f = isObject$a$1;
|
|
84520
|
+
var isArray$4 = isArray$2$1;
|
|
84521
|
+
var wellKnownSymbol$p = wellKnownSymbol$i$1;
|
|
84522
|
+
var SPECIES$6 = wellKnownSymbol$p('species'); // `ArraySpeciesCreate` abstract operation
|
|
84515
84523
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
84516
84524
|
|
|
84517
|
-
var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
84525
|
+
var arraySpeciesCreate$1$1 = function (originalArray, length) {
|
|
84518
84526
|
var C;
|
|
84519
84527
|
|
|
84520
84528
|
if (isArray$4(originalArray)) {
|
|
84521
84529
|
C = originalArray.constructor; // cross-realm fallback
|
|
84522
84530
|
|
|
84523
|
-
if (typeof C == 'function' && (C === Array || isArray$4(C.prototype))) C = undefined;else if (isObject$
|
|
84524
|
-
C = C[SPECIES$
|
|
84531
|
+
if (typeof C == 'function' && (C === Array || isArray$4(C.prototype))) C = undefined;else if (isObject$f(C)) {
|
|
84532
|
+
C = C[SPECIES$6];
|
|
84525
84533
|
if (C === null) C = undefined;
|
|
84526
84534
|
}
|
|
84527
84535
|
}
|
|
@@ -84529,15 +84537,15 @@
|
|
|
84529
84537
|
return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
|
84530
84538
|
};
|
|
84531
84539
|
|
|
84532
|
-
var $$
|
|
84533
|
-
var flattenIntoArray = flattenIntoArray_1;
|
|
84534
|
-
var toObject$1$1 = toObject$7;
|
|
84535
|
-
var toLength$
|
|
84540
|
+
var $$i = _export$1;
|
|
84541
|
+
var flattenIntoArray$2 = flattenIntoArray_1$1;
|
|
84542
|
+
var toObject$1$1 = toObject$7$1;
|
|
84543
|
+
var toLength$c = toLength$8$1;
|
|
84536
84544
|
var aFunction$9 = aFunction$7$1;
|
|
84537
|
-
var arraySpeciesCreate = arraySpeciesCreate$1; // `Array.prototype.flatMap` method
|
|
84545
|
+
var arraySpeciesCreate$2 = arraySpeciesCreate$1$1; // `Array.prototype.flatMap` method
|
|
84538
84546
|
// https://github.com/tc39/proposal-flatMap
|
|
84539
84547
|
|
|
84540
|
-
$$
|
|
84548
|
+
$$i({
|
|
84541
84549
|
target: 'Array',
|
|
84542
84550
|
proto: true
|
|
84543
84551
|
}, {
|
|
@@ -84545,17 +84553,17 @@
|
|
|
84545
84553
|
/* , thisArg */
|
|
84546
84554
|
) {
|
|
84547
84555
|
var O = toObject$1$1(this);
|
|
84548
|
-
var sourceLen = toLength$
|
|
84556
|
+
var sourceLen = toLength$c(O.length);
|
|
84549
84557
|
var A;
|
|
84550
84558
|
aFunction$9(callbackfn);
|
|
84551
|
-
A = arraySpeciesCreate(O, 0);
|
|
84552
|
-
A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
84559
|
+
A = arraySpeciesCreate$2(O, 0);
|
|
84560
|
+
A.length = flattenIntoArray$2(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
84553
84561
|
return A;
|
|
84554
84562
|
}
|
|
84555
84563
|
}); // this method was added to unscopables after implementation
|
|
84556
84564
|
// in popular engines, so it's moved to a separate module
|
|
84557
84565
|
|
|
84558
|
-
var addToUnscopables$3 = addToUnscopables$2;
|
|
84566
|
+
var addToUnscopables$3 = addToUnscopables$2$1;
|
|
84559
84567
|
addToUnscopables$3('flatMap');
|
|
84560
84568
|
|
|
84561
84569
|
function useItemLoaderWithPreFetch(pageSize, handler, deps) {
|
|
@@ -86072,7 +86080,7 @@
|
|
|
86072
86080
|
var Content$a = _styled__default["default"].div.withConfig({
|
|
86073
86081
|
displayName: "PageAlert__Content",
|
|
86074
86082
|
componentId: "sc-gj7gx6-1"
|
|
86075
|
-
})(templateObject_2$
|
|
86083
|
+
})(templateObject_2$1y || (templateObject_2$1y = __makeTemplateObject$1(["\n padding: 30px;\n text-align: center;\n"], ["\n padding: 30px;\n text-align: center;\n"])));
|
|
86076
86084
|
|
|
86077
86085
|
var SvgContainer = _styled__default["default"].div.withConfig({
|
|
86078
86086
|
displayName: "PageAlert__SvgContainer",
|
|
@@ -86094,7 +86102,7 @@
|
|
|
86094
86102
|
componentId: "sc-gj7gx6-5"
|
|
86095
86103
|
})(templateObject_6$s || (templateObject_6$s = __makeTemplateObject$1(["\n display: flex;\n justify-content: space-around;\n"], ["\n display: flex;\n justify-content: space-around;\n"])));
|
|
86096
86104
|
|
|
86097
|
-
var templateObject_1$2m, templateObject_2$
|
|
86105
|
+
var templateObject_1$2m, templateObject_2$1y, templateObject_3$13, templateObject_4$L, templateObject_5$E, templateObject_6$s;
|
|
86098
86106
|
var propTypes$1 = {
|
|
86099
86107
|
exports: {}
|
|
86100
86108
|
};
|
|
@@ -87223,9 +87231,9 @@
|
|
|
87223
87231
|
}), void 0);
|
|
87224
87232
|
};
|
|
87225
87233
|
|
|
87226
|
-
var version$1 = "0.4.0-preview.
|
|
87227
|
-
var buildId = "
|
|
87228
|
-
var commitId = "
|
|
87234
|
+
var version$1 = "0.4.0-preview.57";
|
|
87235
|
+
var buildId = "95651";
|
|
87236
|
+
var commitId = "47fb910168e3301947f843ab3b0d26824fc087b2";
|
|
87229
87237
|
var isCustomerBuild = false;
|
|
87230
87238
|
var buildInfo = {
|
|
87231
87239
|
version: version$1,
|
|
@@ -87234,17 +87242,17 @@
|
|
|
87234
87242
|
isCustomerBuild: isCustomerBuild
|
|
87235
87243
|
};
|
|
87236
87244
|
|
|
87237
|
-
var isObject$
|
|
87245
|
+
var isObject$e = isObject$u;
|
|
87238
87246
|
var classof$b = classofRaw$9;
|
|
87239
|
-
var wellKnownSymbol$
|
|
87247
|
+
var wellKnownSymbol$o = wellKnownSymbol$E;
|
|
87240
87248
|
|
|
87241
|
-
var MATCH$4 = wellKnownSymbol$
|
|
87249
|
+
var MATCH$4 = wellKnownSymbol$o('match');
|
|
87242
87250
|
|
|
87243
87251
|
// `IsRegExp` abstract operation
|
|
87244
87252
|
// https://tc39.github.io/ecma262/#sec-isregexp
|
|
87245
87253
|
var isRegexp$1 = function (it) {
|
|
87246
87254
|
var isRegExp;
|
|
87247
|
-
return isObject$
|
|
87255
|
+
return isObject$e(it) && ((isRegExp = it[MATCH$4]) !== undefined ? !!isRegExp : classof$b(it) == 'RegExp');
|
|
87248
87256
|
};
|
|
87249
87257
|
|
|
87250
87258
|
var isRegExp$5 = isRegexp$1;
|
|
@@ -87255,9 +87263,9 @@
|
|
|
87255
87263
|
} return it;
|
|
87256
87264
|
};
|
|
87257
87265
|
|
|
87258
|
-
var wellKnownSymbol$
|
|
87266
|
+
var wellKnownSymbol$n = wellKnownSymbol$E;
|
|
87259
87267
|
|
|
87260
|
-
var MATCH$3 = wellKnownSymbol$
|
|
87268
|
+
var MATCH$3 = wellKnownSymbol$n('match');
|
|
87261
87269
|
|
|
87262
87270
|
var correctIsRegexpLogic$1 = function (METHOD_NAME) {
|
|
87263
87271
|
var regexp = /./;
|
|
@@ -87271,14 +87279,14 @@
|
|
|
87271
87279
|
} return false;
|
|
87272
87280
|
};
|
|
87273
87281
|
|
|
87274
|
-
var $$
|
|
87282
|
+
var $$h = _export$7;
|
|
87275
87283
|
var notARegExp$2 = notARegexp$1;
|
|
87276
87284
|
var requireObjectCoercible$d = requireObjectCoercible$l;
|
|
87277
87285
|
var correctIsRegExpLogic$2 = correctIsRegexpLogic$1;
|
|
87278
87286
|
|
|
87279
87287
|
// `String.prototype.includes` method
|
|
87280
87288
|
// https://tc39.github.io/ecma262/#sec-string.prototype.includes
|
|
87281
|
-
$$
|
|
87289
|
+
$$h({ target: 'String', proto: true, forced: !correctIsRegExpLogic$2('includes') }, {
|
|
87282
87290
|
includes: function includes(searchString /* , position = 0 */) {
|
|
87283
87291
|
return !!~String(requireObjectCoercible$d(this))
|
|
87284
87292
|
.indexOf(notARegExp$2(searchString), arguments.length > 1 ? arguments[1] : undefined);
|
|
@@ -87620,9 +87628,9 @@
|
|
|
87620
87628
|
var Details = _styled__default["default"].p.withConfig({
|
|
87621
87629
|
displayName: "ReachErrorProvider__Details",
|
|
87622
87630
|
componentId: "sc-15225g3-1"
|
|
87623
|
-
})(templateObject_2$
|
|
87631
|
+
})(templateObject_2$1x || (templateObject_2$1x = __makeTemplateObject$l(["\n opacity: 0.4;\n font-size: small;\n"], ["\n opacity: 0.4;\n font-size: small;\n"])));
|
|
87624
87632
|
|
|
87625
|
-
var templateObject_1$2l, templateObject_2$
|
|
87633
|
+
var templateObject_1$2l, templateObject_2$1x;
|
|
87626
87634
|
|
|
87627
87635
|
var ReachLinkContextProvider = function ReachLinkContextProvider(_a) {
|
|
87628
87636
|
var children = _a.children;
|
|
@@ -88121,7 +88129,7 @@
|
|
|
88121
88129
|
|
|
88122
88130
|
function _class(obj) { return Object.prototype.toString.call(obj); }
|
|
88123
88131
|
function isString(obj) { return _class(obj) === '[object String]'; }
|
|
88124
|
-
function isObject$
|
|
88132
|
+
function isObject$d(obj) { return _class(obj) === '[object Object]'; }
|
|
88125
88133
|
function isRegExp$4(obj) { return _class(obj) === '[object RegExp]'; }
|
|
88126
88134
|
function isFunction(obj) { return _class(obj) === '[object Function]'; }
|
|
88127
88135
|
|
|
@@ -88292,7 +88300,7 @@
|
|
|
88292
88300
|
|
|
88293
88301
|
self.__compiled__[name] = compiled;
|
|
88294
88302
|
|
|
88295
|
-
if (isObject$
|
|
88303
|
+
if (isObject$d(val)) {
|
|
88296
88304
|
if (isRegExp$4(val.validate)) {
|
|
88297
88305
|
compiled.validate = createValidator(val.validate);
|
|
88298
88306
|
} else if (isFunction(val.validate)) {
|
|
@@ -125353,28 +125361,28 @@
|
|
|
125353
125361
|
return !Object('z').propertyIsEnumerable(0);})?function(it){return classof$9(it)=='String'?split.call(it,''):Object(it);}:Object;// `RequireObjectCoercible` abstract operation
|
|
125354
125362
|
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
|
125355
125363
|
var requireObjectCoercible$b=function(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it;};// toObject with fallback for non-array-like ES3 strings
|
|
125356
|
-
var IndexedObject$2=indexedObject;var requireObjectCoercible$a=requireObjectCoercible$b;var toIndexedObject$4=function(it){return IndexedObject$2(requireObjectCoercible$a(it));};var isObject$
|
|
125364
|
+
var IndexedObject$2=indexedObject;var requireObjectCoercible$a=requireObjectCoercible$b;var toIndexedObject$4=function(it){return IndexedObject$2(requireObjectCoercible$a(it));};var isObject$c=function(it){return typeof it==='object'?it!==null:typeof it==='function';};var isObject$b=isObject$c;// `ToPrimitive` abstract operation
|
|
125357
125365
|
// https://tc39.github.io/ecma262/#sec-toprimitive
|
|
125358
125366
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
125359
125367
|
// and the second argument - flag - preferred type is a string
|
|
125360
|
-
var toPrimitive$3=function(input,PREFERRED_STRING){if(!isObject$
|
|
125361
|
-
var EXISTS=isObject$
|
|
125368
|
+
var toPrimitive$3=function(input,PREFERRED_STRING){if(!isObject$b(input))return input;var fn,val;if(PREFERRED_STRING&&typeof(fn=input.toString)=='function'&&!isObject$b(val=fn.call(input)))return val;if(typeof(fn=input.valueOf)=='function'&&!isObject$b(val=fn.call(input)))return val;if(!PREFERRED_STRING&&typeof(fn=input.toString)=='function'&&!isObject$b(val=fn.call(input)))return val;throw TypeError("Can't convert object to primitive value");};var hasOwnProperty={}.hasOwnProperty;var has$c=function(it,key){return hasOwnProperty.call(it,key);};var global$l=global$m;var isObject$a=isObject$c;var document$2=global$l.document;// typeof document.createElement is 'object' in old IE
|
|
125369
|
+
var EXISTS=isObject$a(document$2)&&isObject$a(document$2.createElement);var documentCreateElement$1=function(it){return EXISTS?document$2.createElement(it):{};};var DESCRIPTORS$a=descriptors;var fails$f=fails$i;var createElement$1=documentCreateElement$1;// Thank's IE8 for his funny defineProperty
|
|
125362
125370
|
var ie8DomDefine=!DESCRIPTORS$a&&!fails$f(function(){return Object.defineProperty(createElement$1('div'),'a',{get:function(){return 7;}}).a!=7;});var DESCRIPTORS$9=descriptors;var propertyIsEnumerableModule$1=objectPropertyIsEnumerable;var createPropertyDescriptor$4=createPropertyDescriptor$5;var toIndexedObject$3=toIndexedObject$4;var toPrimitive$2=toPrimitive$3;var has$b=has$c;var IE8_DOM_DEFINE$1=ie8DomDefine;var nativeGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;// `Object.getOwnPropertyDescriptor` method
|
|
125363
125371
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
|
125364
|
-
objectGetOwnPropertyDescriptor.f=DESCRIPTORS$9?nativeGetOwnPropertyDescriptor:function getOwnPropertyDescriptor(O,P){O=toIndexedObject$3(O);P=toPrimitive$2(P,true);if(IE8_DOM_DEFINE$1)try{return nativeGetOwnPropertyDescriptor(O,P);}catch(error){/* empty */}if(has$b(O,P))return createPropertyDescriptor$4(!propertyIsEnumerableModule$1.f.call(O,P),O[P]);};var objectDefineProperty={};var isObject$
|
|
125372
|
+
objectGetOwnPropertyDescriptor.f=DESCRIPTORS$9?nativeGetOwnPropertyDescriptor:function getOwnPropertyDescriptor(O,P){O=toIndexedObject$3(O);P=toPrimitive$2(P,true);if(IE8_DOM_DEFINE$1)try{return nativeGetOwnPropertyDescriptor(O,P);}catch(error){/* empty */}if(has$b(O,P))return createPropertyDescriptor$4(!propertyIsEnumerableModule$1.f.call(O,P),O[P]);};var objectDefineProperty={};var isObject$9=isObject$c;var anObject$h=function(it){if(!isObject$9(it)){throw TypeError(String(it)+' is not an object');}return it;};var DESCRIPTORS$8=descriptors;var IE8_DOM_DEFINE=ie8DomDefine;var anObject$g=anObject$h;var toPrimitive$1=toPrimitive$3;var nativeDefineProperty=Object.defineProperty;// `Object.defineProperty` method
|
|
125365
125373
|
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
|
125366
125374
|
objectDefineProperty.f=DESCRIPTORS$8?nativeDefineProperty:function defineProperty(O,P,Attributes){anObject$g(O);P=toPrimitive$1(P,true);anObject$g(Attributes);if(IE8_DOM_DEFINE)try{return nativeDefineProperty(O,P,Attributes);}catch(error){/* empty */}if('get'in Attributes||'set'in Attributes)throw TypeError('Accessors not supported');if('value'in Attributes)O[P]=Attributes.value;return O;};var DESCRIPTORS$7=descriptors;var definePropertyModule$5=objectDefineProperty;var createPropertyDescriptor$3=createPropertyDescriptor$5;var createNonEnumerableProperty$8=DESCRIPTORS$7?function(object,key,value){return definePropertyModule$5.f(object,key,createPropertyDescriptor$3(1,value));}:function(object,key,value){object[key]=value;return object;};var redefine$9={exports:{}};var global$k=global$m;var createNonEnumerableProperty$7=createNonEnumerableProperty$8;var setGlobal$3=function(key,value){try{createNonEnumerableProperty$7(global$k,key,value);}catch(error){global$k[key]=value;}return value;};var global$j=global$m;var setGlobal$2=setGlobal$3;var SHARED='__core-js_shared__';var store$3=global$j[SHARED]||setGlobal$2(SHARED,{});var sharedStore=store$3;var store$2=sharedStore;var functionToString=Function.toString;// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
|
125367
|
-
if(typeof store$2.inspectSource!='function'){store$2.inspectSource=function(it){return functionToString.call(it);};}var inspectSource$3=store$2.inspectSource;var global$i=global$m;var inspectSource$2=inspectSource$3;var WeakMap$1=global$i.WeakMap;var nativeWeakMap=typeof WeakMap$1==='function'&&/native code/.test(inspectSource$2(WeakMap$1));var shared$2={exports:{}};var isPure=false;var store$1=sharedStore;(shared$2.exports=function(key,value){return store$1[key]||(store$1[key]=value!==undefined?value:{});})('versions',[]).push({version:'3.6.5',mode:'global',copyright:'© 2020 Denis Pushkarev (zloirock.ru)'});var id$3=0;var postfix=Math.random();var uid$2=function(key){return 'Symbol('+String(key===undefined?'':key)+')_'+(++id$3+postfix).toString(36);};var shared$1=shared$2.exports;var uid$1=uid$2;var keys$1=shared$1('keys');var sharedKey$3=function(key){return keys$1[key]||(keys$1[key]=uid$1(key));};var hiddenKeys$4={};var NATIVE_WEAK_MAP=nativeWeakMap;var global$h=global$m;var isObject$
|
|
125368
|
-
})(Function.prototype,'toString',function toString(){return typeof this=='function'&&getInternalState$3(this).source||inspectSource$1(this);});var global$f=global$m;var path$1=global$f;var path=path$1;var global$e=global$m;var aFunction$
|
|
125375
|
+
if(typeof store$2.inspectSource!='function'){store$2.inspectSource=function(it){return functionToString.call(it);};}var inspectSource$3=store$2.inspectSource;var global$i=global$m;var inspectSource$2=inspectSource$3;var WeakMap$1=global$i.WeakMap;var nativeWeakMap=typeof WeakMap$1==='function'&&/native code/.test(inspectSource$2(WeakMap$1));var shared$2={exports:{}};var isPure=false;var store$1=sharedStore;(shared$2.exports=function(key,value){return store$1[key]||(store$1[key]=value!==undefined?value:{});})('versions',[]).push({version:'3.6.5',mode:'global',copyright:'© 2020 Denis Pushkarev (zloirock.ru)'});var id$3=0;var postfix=Math.random();var uid$2=function(key){return 'Symbol('+String(key===undefined?'':key)+')_'+(++id$3+postfix).toString(36);};var shared$1=shared$2.exports;var uid$1=uid$2;var keys$1=shared$1('keys');var sharedKey$3=function(key){return keys$1[key]||(keys$1[key]=uid$1(key));};var hiddenKeys$4={};var NATIVE_WEAK_MAP=nativeWeakMap;var global$h=global$m;var isObject$8=isObject$c;var createNonEnumerableProperty$6=createNonEnumerableProperty$8;var objectHas=has$c;var sharedKey$2=sharedKey$3;var hiddenKeys$3=hiddenKeys$4;var WeakMap$2=global$h.WeakMap;var set$1,get$2,has$a;var enforce=function(it){return has$a(it)?get$2(it):set$1(it,{});};var getterFor=function(TYPE){return function(it){var state;if(!isObject$8(it)||(state=get$2(it)).type!==TYPE){throw TypeError('Incompatible receiver, '+TYPE+' required');}return state;};};if(NATIVE_WEAK_MAP){var store$4=new WeakMap$2();var wmget=store$4.get;var wmhas=store$4.has;var wmset=store$4.set;set$1=function(it,metadata){wmset.call(store$4,it,metadata);return metadata;};get$2=function(it){return wmget.call(store$4,it)||{};};has$a=function(it){return wmhas.call(store$4,it);};}else {var STATE=sharedKey$2('state');hiddenKeys$3[STATE]=true;set$1=function(it,metadata){createNonEnumerableProperty$6(it,STATE,metadata);return metadata;};get$2=function(it){return objectHas(it,STATE)?it[STATE]:{};};has$a=function(it){return objectHas(it,STATE);};}var internalState={set:set$1,get:get$2,has:has$a,enforce:enforce,getterFor:getterFor};var global$g=global$m;var createNonEnumerableProperty$5=createNonEnumerableProperty$8;var has$9=has$c;var setGlobal$1=setGlobal$3;var inspectSource$1=inspectSource$3;var InternalStateModule$5=internalState;var getInternalState$3=InternalStateModule$5.get;var enforceInternalState=InternalStateModule$5.enforce;var TEMPLATE=String(String).split('String');(redefine$9.exports=function(O,key,value,options){var unsafe=options?!!options.unsafe:false;var simple=options?!!options.enumerable:false;var noTargetGet=options?!!options.noTargetGet:false;if(typeof value=='function'){if(typeof key=='string'&&!has$9(value,'name'))createNonEnumerableProperty$5(value,'name',key);enforceInternalState(value).source=TEMPLATE.join(typeof key=='string'?key:'');}if(O===global$g){if(simple)O[key]=value;else setGlobal$1(key,value);return;}else if(!unsafe){delete O[key];}else if(!noTargetGet&&O[key]){simple=true;}if(simple)O[key]=value;else createNonEnumerableProperty$5(O,key,value);// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
125376
|
+
})(Function.prototype,'toString',function toString(){return typeof this=='function'&&getInternalState$3(this).source||inspectSource$1(this);});var global$f=global$m;var path$1=global$f;var path=path$1;var global$e=global$m;var aFunction$8=function(variable){return typeof variable=='function'?variable:undefined;};var getBuiltIn$6=function(namespace,method){return arguments.length<2?aFunction$8(path[namespace])||aFunction$8(global$e[namespace]):path[namespace]&&path[namespace][method]||global$e[namespace]&&global$e[namespace][method];};var objectGetOwnPropertyNames={};var ceil=Math.ceil;var floor$3=Math.floor;// `ToInteger` abstract operation
|
|
125369
125377
|
// https://tc39.github.io/ecma262/#sec-tointeger
|
|
125370
125378
|
var toInteger$4=function(argument){return isNaN(argument=+argument)?0:(argument>0?floor$3:ceil)(argument);};var toInteger$3=toInteger$4;var min$5=Math.min;// `ToLength` abstract operation
|
|
125371
125379
|
// https://tc39.github.io/ecma262/#sec-tolength
|
|
125372
|
-
var toLength$
|
|
125380
|
+
var toLength$a=function(argument){return argument>0?min$5(toInteger$3(argument),0x1FFFFFFFFFFFFF):0;// 2 ** 53 - 1 == 9007199254740991
|
|
125373
125381
|
};var toInteger$2=toInteger$4;var max$2=Math.max;var min$4=Math.min;// Helper for a popular repeating case of the spec:
|
|
125374
125382
|
// Let integer be ? ToInteger(index).
|
|
125375
125383
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
125376
|
-
var toAbsoluteIndex$1=function(index,length){var integer=toInteger$2(index);return integer<0?max$2(integer+length,0):min$4(integer,length);};var toIndexedObject$2=toIndexedObject$4;var toLength$
|
|
125377
|
-
var createMethod$3=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIndexedObject$2($this);var length=toLength$
|
|
125384
|
+
var toAbsoluteIndex$1=function(index,length){var integer=toInteger$2(index);return integer<0?max$2(integer+length,0):min$4(integer,length);};var toIndexedObject$2=toIndexedObject$4;var toLength$9=toLength$a;var toAbsoluteIndex=toAbsoluteIndex$1;// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
125385
|
+
var createMethod$3=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIndexedObject$2($this);var length=toLength$9(O.length);var index=toAbsoluteIndex(fromIndex,length);var value;// Array#includes uses SameValueZero equality algorithm
|
|
125378
125386
|
// eslint-disable-next-line no-self-compare
|
|
125379
125387
|
if(IS_INCLUDES&&el!=el)while(length>index){value=O[index++];// eslint-disable-next-line no-self-compare
|
|
125380
125388
|
if(value!=value)return true;// Array#indexOf ignores holes, Array#includes - not
|
|
@@ -125407,11 +125415,11 @@
|
|
|
125407
125415
|
// eslint-disable-next-line no-undef
|
|
125408
125416
|
return !String(Symbol());});var NATIVE_SYMBOL$1=nativeSymbol;var useSymbolAsUid=NATIVE_SYMBOL$1// eslint-disable-next-line no-undef
|
|
125409
125417
|
&&!Symbol.sham// eslint-disable-next-line no-undef
|
|
125410
|
-
&&typeof Symbol.iterator=='symbol';var global$c=global$m;var shared=shared$2.exports;var has$6=has$c;var uid=uid$2;var NATIVE_SYMBOL=nativeSymbol;var USE_SYMBOL_AS_UID=useSymbolAsUid;var WellKnownSymbolsStore=shared('wks');var Symbol$1=global$c.Symbol;var createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid;var wellKnownSymbol$
|
|
125418
|
+
&&typeof Symbol.iterator=='symbol';var global$c=global$m;var shared=shared$2.exports;var has$6=has$c;var uid=uid$2;var NATIVE_SYMBOL=nativeSymbol;var USE_SYMBOL_AS_UID=useSymbolAsUid;var WellKnownSymbolsStore=shared('wks');var Symbol$1=global$c.Symbol;var createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid;var wellKnownSymbol$l=function(name){if(!has$6(WellKnownSymbolsStore,name)){if(NATIVE_SYMBOL&&has$6(Symbol$1,name))WellKnownSymbolsStore[name]=Symbol$1[name];else WellKnownSymbolsStore[name]=createWellKnownSymbol('Symbol.'+name);}return WellKnownSymbolsStore[name];};var isObject$7=isObject$c;var classof$8=classofRaw$1;var wellKnownSymbol$k=wellKnownSymbol$l;var MATCH$2=wellKnownSymbol$k('match');// `IsRegExp` abstract operation
|
|
125411
125419
|
// https://tc39.github.io/ecma262/#sec-isregexp
|
|
125412
|
-
var isRegexp=function(it){var isRegExp;return isObject$
|
|
125420
|
+
var isRegexp=function(it){var isRegExp;return isObject$7(it)&&((isRegExp=it[MATCH$2])!==undefined?!!isRegExp:classof$8(it)=='RegExp');};var isRegExp$3=isRegexp;var notARegexp=function(it){if(isRegExp$3(it)){throw TypeError("The method doesn't accept regular expressions");}return it;};var wellKnownSymbol$j=wellKnownSymbol$l;var MATCH$1=wellKnownSymbol$j('match');var correctIsRegexpLogic=function(METHOD_NAME){var regexp=/./;try{'/./'[METHOD_NAME](regexp);}catch(e){try{regexp[MATCH$1]=false;return '/./'[METHOD_NAME](regexp);}catch(f){/* empty */}}return false;};var $$f=_export;var notARegExp$1=notARegexp;var requireObjectCoercible$9=requireObjectCoercible$b;var correctIsRegExpLogic$1=correctIsRegexpLogic;// `String.prototype.includes` method
|
|
125413
125421
|
// https://tc39.github.io/ecma262/#sec-string.prototype.includes
|
|
125414
|
-
$$
|
|
125422
|
+
$$f({target:'String',proto:true,forced:!correctIsRegExpLogic$1('includes')},{includes:function includes(searchString/* , position = 0 */){return !!~String(requireObjectCoercible$9(this)).indexOf(notARegExp$1(searchString),arguments.length>1?arguments[1]:undefined);}});var anObject$e=anObject$h;// `RegExp.prototype.flags` getter implementation
|
|
125415
125423
|
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
|
125416
125424
|
var regexpFlags$1$1=function(){var that=anObject$e(this);var result='';if(that.global)result+='g';if(that.ignoreCase)result+='i';if(that.multiline)result+='m';if(that.dotAll)result+='s';if(that.unicode)result+='u';if(that.sticky)result+='y';return result;};var regexpStickyHelpers$1={};var fails$c=fails$i;// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
|
|
125417
125425
|
// so we use an intermediate function.
|
|
@@ -125426,32 +125434,32 @@
|
|
|
125426
125434
|
// simulate the 'y' flag.
|
|
125427
125435
|
reCopy=new RegExp('^(?:'+source+')',flags);}if(NPCG_INCLUDED$1){reCopy=new RegExp('^'+source+'$(?!\\s)',flags);}if(UPDATES_LAST_INDEX_WRONG$1)lastIndex=re.lastIndex;match=nativeExec$1.call(sticky?reCopy:re,strCopy);if(sticky){if(match){match.input=match.input.slice(charsAdded);match[0]=match[0].slice(charsAdded);match.index=re.lastIndex;re.lastIndex+=match[0].length;}else re.lastIndex=0;}else if(UPDATES_LAST_INDEX_WRONG$1&&match){re.lastIndex=re.global?match.index+match[0].length:lastIndex;}if(NPCG_INCLUDED$1&&match&&match.length>1){// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
125428
125436
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
125429
|
-
nativeReplace$1.call(match[0],reCopy,function(){for(i=1;i<arguments.length-2;i++){if(arguments[i]===undefined)match[i]=undefined;}});}return match;};}var regexpExec$3=patchedExec$1;var $$
|
|
125430
|
-
var redefine$7=redefine$9.exports;var fails$b=fails$i;var wellKnownSymbol$
|
|
125437
|
+
nativeReplace$1.call(match[0],reCopy,function(){for(i=1;i<arguments.length-2;i++){if(arguments[i]===undefined)match[i]=undefined;}});}return match;};}var regexpExec$3=patchedExec$1;var $$e=_export;var exec$1=regexpExec$3;$$e({target:'RegExp',proto:true,forced:/./.exec!==exec$1},{exec:exec$1});// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
125438
|
+
var redefine$7=redefine$9.exports;var fails$b=fails$i;var wellKnownSymbol$i=wellKnownSymbol$l;var regexpExec$2$1=regexpExec$3;var createNonEnumerableProperty$3=createNonEnumerableProperty$8;var SPECIES$4=wellKnownSymbol$i('species');var REPLACE_SUPPORTS_NAMED_GROUPS$1=!fails$b(function(){// #replace needs built-in support for named groups.
|
|
125431
125439
|
// #match works fine because it just return the exec results, even if it has
|
|
125432
125440
|
// a "grops" property.
|
|
125433
125441
|
var re=/./;re.exec=function(){var result=[];result.groups={a:'7'};return result;};return ''.replace(re,'$<a>')!=='7';});// IE <= 11 replaces $0 with the whole match, as if it was $&
|
|
125434
125442
|
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
|
125435
|
-
var REPLACE_KEEPS_$0$1=function(){return 'a'.replace(/./,'$0')==='$0';}();var REPLACE$1=wellKnownSymbol$
|
|
125443
|
+
var REPLACE_KEEPS_$0$1=function(){return 'a'.replace(/./,'$0')==='$0';}();var REPLACE$1=wellKnownSymbol$i('replace');// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
125436
125444
|
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE$1=function(){if(/./[REPLACE$1]){return /./[REPLACE$1]('a','$0')==='';}return false;}();// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
|
125437
125445
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
125438
|
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC$1=!fails$b(function(){var re=/(?:)/;var originalExec=re.exec;re.exec=function(){return originalExec.apply(this,arguments);};var result='ab'.split(re);return result.length!==2||result[0]!=='a'||result[1]!=='b';});var fixRegexpWellKnownSymbolLogic$1=function(KEY,length,exec,sham){var SYMBOL=wellKnownSymbol$
|
|
125446
|
+
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC$1=!fails$b(function(){var re=/(?:)/;var originalExec=re.exec;re.exec=function(){return originalExec.apply(this,arguments);};var result='ab'.split(re);return result.length!==2||result[0]!=='a'||result[1]!=='b';});var fixRegexpWellKnownSymbolLogic$1=function(KEY,length,exec,sham){var SYMBOL=wellKnownSymbol$i(KEY);var DELEGATES_TO_SYMBOL=!fails$b(function(){// String methods call symbol-named RegEp methods
|
|
125439
125447
|
var O={};O[SYMBOL]=function(){return 7;};return ''[KEY](O)!=7;});var DELEGATES_TO_EXEC=DELEGATES_TO_SYMBOL&&!fails$b(function(){// Symbol-named RegExp methods call .exec
|
|
125440
125448
|
var execCalled=false;var re=/a/;if(KEY==='split'){// We can't use real regex here since it causes deoptimization
|
|
125441
125449
|
// and serious performance degradation in V8
|
|
125442
125450
|
// https://github.com/zloirock/core-js/issues/306
|
|
125443
125451
|
re={};// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
125444
125452
|
// a new one. We need to return the patched regex when creating the new one.
|
|
125445
|
-
re.constructor={};re.constructor[SPECIES$
|
|
125453
|
+
re.constructor={};re.constructor[SPECIES$4]=function(){return re;};re.flags='';re[SYMBOL]=/./[SYMBOL];}re.exec=function(){execCalled=true;return null;};re[SYMBOL]('');return !execCalled;});if(!DELEGATES_TO_SYMBOL||!DELEGATES_TO_EXEC||KEY==='replace'&&!(REPLACE_SUPPORTS_NAMED_GROUPS$1&&REPLACE_KEEPS_$0$1&&!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE$1)||KEY==='split'&&!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC$1){var nativeRegExpMethod=/./[SYMBOL];var methods=exec(SYMBOL,''[KEY],function(nativeMethod,regexp,str,arg2,forceStringMethod){if(regexp.exec===regexpExec$2$1){if(DELEGATES_TO_SYMBOL&&!forceStringMethod){// The native String method already delegates to @@method (this
|
|
125446
125454
|
// polyfilled function), leasing to infinite recursion.
|
|
125447
125455
|
// We avoid it by directly calling the native @@method method.
|
|
125448
125456
|
return {done:true,value:nativeRegExpMethod.call(regexp,str,arg2)};}return {done:true,value:nativeMethod.call(str,regexp,arg2)};}return {done:false};},{REPLACE_KEEPS_$0:REPLACE_KEEPS_$0$1,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE$1});var stringMethod=methods[0];var regexMethod=methods[1];redefine$7(String.prototype,KEY,stringMethod);redefine$7(RegExp.prototype,SYMBOL,length==2// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
|
125449
125457
|
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
|
125450
125458
|
?function(string,arg){return regexMethod.call(string,this,arg);}// 21.2.5.6 RegExp.prototype[@@match](string)
|
|
125451
125459
|
// 21.2.5.9 RegExp.prototype[@@search](string)
|
|
125452
|
-
:function(string){return regexMethod.call(string,this);});}if(sham)createNonEnumerableProperty$3(RegExp.prototype[SYMBOL],'sham',true);};var aFunction$
|
|
125460
|
+
:function(string){return regexMethod.call(string,this);});}if(sham)createNonEnumerableProperty$3(RegExp.prototype[SYMBOL],'sham',true);};var aFunction$7=function(it){if(typeof it!='function'){throw TypeError(String(it)+' is not a function');}return it;};var anObject$d=anObject$h;var aFunction$6=aFunction$7;var wellKnownSymbol$h=wellKnownSymbol$l;var SPECIES$3=wellKnownSymbol$h('species');// `SpeciesConstructor` abstract operation
|
|
125453
125461
|
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
|
125454
|
-
var speciesConstructor$2=function(O,defaultConstructor){var C=anObject$d(O).constructor;var S;return C===undefined||(S=anObject$d(C)[SPECIES$
|
|
125462
|
+
var speciesConstructor$2=function(O,defaultConstructor){var C=anObject$d(O).constructor;var S;return C===undefined||(S=anObject$d(C)[SPECIES$3])==undefined?defaultConstructor:aFunction$6(S);};var toInteger$1=toInteger$4;var requireObjectCoercible$8=requireObjectCoercible$b;// `String.prototype.{ codePointAt, at }` methods implementation
|
|
125455
125463
|
var createMethod$2=function(CONVERT_TO_STRING){return function($this,pos){var S=String(requireObjectCoercible$8($this));var position=toInteger$1(pos);var size=S.length;var first,second;if(position<0||position>=size)return CONVERT_TO_STRING?'':undefined;first=S.charCodeAt(position);return first<0xD800||first>0xDBFF||position+1===size||(second=S.charCodeAt(position+1))<0xDC00||second>0xDFFF?CONVERT_TO_STRING?S.charAt(position):first:CONVERT_TO_STRING?S.slice(position,position+2):(first-0xD800<<10)+(second-0xDC00)+0x10000;};};var stringMultibyte$1={// `String.prototype.codePointAt` method
|
|
125456
125464
|
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
|
125457
125465
|
codeAt:createMethod$2(false),// `String.prototype.at` method
|
|
@@ -125460,7 +125468,7 @@
|
|
|
125460
125468
|
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
|
125461
125469
|
var advanceStringIndex$3=function(S,index,unicode){return index+(unicode?charAt$1(S,index).length:1);};var classof$7=classofRaw$1;var regexpExec$1$1=regexpExec$3;// `RegExpExec` abstract operation
|
|
125462
125470
|
// https://tc39.github.io/ecma262/#sec-regexpexec
|
|
125463
|
-
var regexpExecAbstract$1=function(R,S){var exec=R.exec;if(typeof exec==='function'){var result=exec.call(R,S);if(typeof result!=='object'){throw TypeError('RegExp exec method returned something other than an Object or null');}return result;}if(classof$7(R)!=='RegExp'){throw TypeError('RegExp#exec called on incompatible receiver');}return regexpExec$1$1.call(R,S);};var fixRegExpWellKnownSymbolLogic$3=fixRegexpWellKnownSymbolLogic$1;var isRegExp$2=isRegexp;var anObject$c=anObject$h;var requireObjectCoercible$7=requireObjectCoercible$b;var speciesConstructor$1=speciesConstructor$2;var advanceStringIndex$2=advanceStringIndex$3;var toLength$
|
|
125471
|
+
var regexpExecAbstract$1=function(R,S){var exec=R.exec;if(typeof exec==='function'){var result=exec.call(R,S);if(typeof result!=='object'){throw TypeError('RegExp exec method returned something other than an Object or null');}return result;}if(classof$7(R)!=='RegExp'){throw TypeError('RegExp#exec called on incompatible receiver');}return regexpExec$1$1.call(R,S);};var fixRegExpWellKnownSymbolLogic$3=fixRegexpWellKnownSymbolLogic$1;var isRegExp$2=isRegexp;var anObject$c=anObject$h;var requireObjectCoercible$7=requireObjectCoercible$b;var speciesConstructor$1=speciesConstructor$2;var advanceStringIndex$2=advanceStringIndex$3;var toLength$8=toLength$a;var callRegExpExec=regexpExecAbstract$1;var regexpExec$4=regexpExec$3;var fails$a=fails$i;var arrayPush=[].push;var min$3=Math.min;var MAX_UINT32=0xFFFFFFFF;// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
|
|
125464
125472
|
var SUPPORTS_Y=!fails$a(function(){return !RegExp(MAX_UINT32,'y');});// @@split logic
|
|
125465
125473
|
fixRegExpWellKnownSymbolLogic$3('split',2,function(SPLIT,nativeSplit,maybeCallNative){var internalSplit;if('abbc'.split(/(b)*/)[1]=='c'||'test'.split(/(?:)/,-1).length!=4||'ab'.split(/(?:ab)*/).length!=2||'.'.split(/(.?)(.?)/).length!=4||'.'.split(/()()/).length>1||''.split(/.?/).length){// based on es5-shim implementation, need to rework it
|
|
125466
125474
|
internalSplit=function(separator,limit){var string=String(requireObjectCoercible$7(this));var lim=limit===undefined?MAX_UINT32:limit>>>0;if(lim===0)return [];if(separator===undefined)return [string];// If `separator` is not a regex, use native split
|
|
@@ -125476,12 +125484,12 @@
|
|
|
125476
125484
|
// the 'y' flag.
|
|
125477
125485
|
function(regexp,limit){var res=maybeCallNative(internalSplit,regexp,this,limit,internalSplit!==nativeSplit);if(res.done)return res.value;var rx=anObject$c(regexp);var S=String(this);var C=speciesConstructor$1(rx,RegExp);var unicodeMatching=rx.unicode;var flags=(rx.ignoreCase?'i':'')+(rx.multiline?'m':'')+(rx.unicode?'u':'')+(SUPPORTS_Y?'y':'g');// ^(? + rx + ) is needed, in combination with some S slicing, to
|
|
125478
125486
|
// simulate the 'y' flag.
|
|
125479
|
-
var splitter=new C(SUPPORTS_Y?rx:'^(?:'+rx.source+')',flags);var lim=limit===undefined?MAX_UINT32:limit>>>0;if(lim===0)return [];if(S.length===0)return callRegExpExec(splitter,S)===null?[S]:[];var p=0;var q=0;var A=[];while(q<S.length){splitter.lastIndex=SUPPORTS_Y?q:0;var z=callRegExpExec(splitter,SUPPORTS_Y?S:S.slice(q));var e;if(z===null||(e=min$3(toLength$
|
|
125487
|
+
var splitter=new C(SUPPORTS_Y?rx:'^(?:'+rx.source+')',flags);var lim=limit===undefined?MAX_UINT32:limit>>>0;if(lim===0)return [];if(S.length===0)return callRegExpExec(splitter,S)===null?[S]:[];var p=0;var q=0;var A=[];while(q<S.length){splitter.lastIndex=SUPPORTS_Y?q:0;var z=callRegExpExec(splitter,SUPPORTS_Y?S:S.slice(q));var e;if(z===null||(e=min$3(toLength$8(splitter.lastIndex+(SUPPORTS_Y?0:q)),S.length))===p){q=advanceStringIndex$2(S,q,unicodeMatching);}else {A.push(S.slice(p,q));if(A.length===lim)return A;for(var i=1;i<=z.length-1;i++){A.push(z[i]);if(A.length===lim)return A;}q=p=e;}}A.push(S.slice(p));return A;}];},!SUPPORTS_Y);var fixRegExpWellKnownSymbolLogic$2=fixRegexpWellKnownSymbolLogic$1;var anObject$b=anObject$h;var toLength$7=toLength$a;var requireObjectCoercible$6=requireObjectCoercible$b;var advanceStringIndex$1$1=advanceStringIndex$3;var regExpExec$2=regexpExecAbstract$1;// @@match logic
|
|
125480
125488
|
fixRegExpWellKnownSymbolLogic$2('match',1,function(MATCH,nativeMatch,maybeCallNative){return [// `String.prototype.match` method
|
|
125481
125489
|
// https://tc39.github.io/ecma262/#sec-string.prototype.match
|
|
125482
125490
|
function match(regexp){var O=requireObjectCoercible$6(this);var matcher=regexp==undefined?undefined:regexp[MATCH];return matcher!==undefined?matcher.call(regexp,O):new RegExp(regexp)[MATCH](String(O));},// `RegExp.prototype[@@match]` method
|
|
125483
125491
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
|
|
125484
|
-
function(regexp){var res=maybeCallNative(nativeMatch,regexp,this);if(res.done)return res.value;var rx=anObject$b(regexp);var S=String(this);if(!rx.global)return regExpExec$2(rx,S);var fullUnicode=rx.unicode;rx.lastIndex=0;var A=[];var n=0;var result;while((result=regExpExec$2(rx,S))!==null){var matchStr=String(result[0]);A[n]=matchStr;if(matchStr==='')rx.lastIndex=advanceStringIndex$1$1(S,toLength$
|
|
125492
|
+
function(regexp){var res=maybeCallNative(nativeMatch,regexp,this);if(res.done)return res.value;var rx=anObject$b(regexp);var S=String(this);if(!rx.global)return regExpExec$2(rx,S);var fullUnicode=rx.unicode;rx.lastIndex=0;var A=[];var n=0;var result;while((result=regExpExec$2(rx,S))!==null){var matchStr=String(result[0]);A[n]=matchStr;if(matchStr==='')rx.lastIndex=advanceStringIndex$1$1(S,toLength$7(rx.lastIndex),fullUnicode);n++;}return n===0?null:A;}];});/*! *****************************************************************************
|
|
125485
125493
|
Copyright (c) Microsoft Corporation.
|
|
125486
125494
|
|
|
125487
125495
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -125507,10 +125515,10 @@
|
|
|
125507
125515
|
if(path==null&&port==null){var segments=urlMatch.split('.');if(segments.length<2){return null;}var lastSegment=segments[segments.length-1];var domainName=segments[segments.length-2];if(// all segments must not be empty
|
|
125508
125516
|
segments.some(function(s){return s==='';})||// domainName must at least be 3 characters
|
|
125509
125517
|
domainName.length<3||// last segment may not be a number
|
|
125510
|
-
lastSegment.match(/^\d+$/)){return null;}}if(!linkify.match(urlMatch)){return null;}return {url:"https://"+urlMatch,label:urlMatch};}function transformContent(content){var matches=__spreadArray([],Array.from(getAllMatches(content,regex)));var result=[];var lastStart=0;for(var _i=0,matches_1=matches;_i<matches_1.length;_i++){var match=matches_1[_i];result.push(content.substring(lastStart,match.index));var email=match[2];var urlMatch=match[3];var protocol=match[4];var port=match[6];var path=match[7];var fullMention=match[8];var name_1=match[10];var id=match[11];var hashtag=match[12];var d3Link=match[14];var link=getLink(email,urlMatch,protocol,path,port);result.push(__assign({fullMatch:match[0],isLineBreak:match[1]!=null,hashtag:hashtag,link:d3Link?{url:d3Link}:link},fullMention&&{mention:{name:name_1,id:id}}));lastStart=match.index+match[0].length;}result.push(content.substring(lastStart));return result;}var Mention=function Mention(_a){var userDisplayName=_a.userDisplayName,userId=_a.userId;var _b=React$d.useState(false),showUserInfo=_b[0],setShowUserInfo=_b[1];var mentionContainer=React$d.useRef(null);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(MentionHost,__assign({"data-mention":true,onClick:function(){return setShowUserInfo(true);},ref:mentionContainer},{children:userDisplayName}),void 0),showUserInfo&&jsxRuntime.jsx(Callout,__assign({target:mentionContainer.current,directionalHint:officeUiFabricReact.DirectionalHint.bottomCenter,onDismiss:function(){return setShowUserInfo(false);},calloutMaxWidth:300},{children:jsxRuntime.jsx(CalloutContent,{children:jsxRuntime.jsx(UserDetails,{upn:null,id:userId,showAvatar:true},void 0)},void 0)}),void 0)]},void 0);};var MentionHost=_styled__default["default"].span.withConfig({displayName:"ContentDisplay__MentionHost",componentId:"sc-1yxe01n-0"})(templateObject_1$2j||(templateObject_1$2j=__makeTemplateObject(["\n font-weight: bold;\n cursor: pointer;\n color: ",";\n"],["\n font-weight: bold;\n cursor: pointer;\n color: ",";\n"])),function(p){return p.theme.palette.accent;});var CalloutContent=_styled__default["default"].div.withConfig({displayName:"ContentDisplay__CalloutContent",componentId:"sc-1yxe01n-1"})(templateObject_2$
|
|
125518
|
+
lastSegment.match(/^\d+$/)){return null;}}if(!linkify.match(urlMatch)){return null;}return {url:"https://"+urlMatch,label:urlMatch};}function transformContent(content){var matches=__spreadArray([],Array.from(getAllMatches(content,regex)));var result=[];var lastStart=0;for(var _i=0,matches_1=matches;_i<matches_1.length;_i++){var match=matches_1[_i];result.push(content.substring(lastStart,match.index));var email=match[2];var urlMatch=match[3];var protocol=match[4];var port=match[6];var path=match[7];var fullMention=match[8];var name_1=match[10];var id=match[11];var hashtag=match[12];var d3Link=match[14];var link=getLink(email,urlMatch,protocol,path,port);result.push(__assign({fullMatch:match[0],isLineBreak:match[1]!=null,hashtag:hashtag,link:d3Link?{url:d3Link}:link},fullMention&&{mention:{name:name_1,id:id}}));lastStart=match.index+match[0].length;}result.push(content.substring(lastStart));return result;}var Mention=function Mention(_a){var userDisplayName=_a.userDisplayName,userId=_a.userId;var _b=React$d.useState(false),showUserInfo=_b[0],setShowUserInfo=_b[1];var mentionContainer=React$d.useRef(null);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(MentionHost,__assign({"data-mention":true,onClick:function(){return setShowUserInfo(true);},ref:mentionContainer},{children:userDisplayName}),void 0),showUserInfo&&jsxRuntime.jsx(Callout,__assign({target:mentionContainer.current,directionalHint:officeUiFabricReact.DirectionalHint.bottomCenter,onDismiss:function(){return setShowUserInfo(false);},calloutMaxWidth:300},{children:jsxRuntime.jsx(CalloutContent,{children:jsxRuntime.jsx(UserDetails,{upn:null,id:userId,showAvatar:true},void 0)},void 0)}),void 0)]},void 0);};var MentionHost=_styled__default["default"].span.withConfig({displayName:"ContentDisplay__MentionHost",componentId:"sc-1yxe01n-0"})(templateObject_1$2j||(templateObject_1$2j=__makeTemplateObject(["\n font-weight: bold;\n cursor: pointer;\n color: ",";\n"],["\n font-weight: bold;\n cursor: pointer;\n color: ",";\n"])),function(p){return p.theme.palette.accent;});var CalloutContent=_styled__default["default"].div.withConfig({displayName:"ContentDisplay__CalloutContent",componentId:"sc-1yxe01n-1"})(templateObject_2$1v||(templateObject_2$1v=__makeTemplateObject(["\n padding: ","px ","px;\n"],["\n padding: ","px ","px;\n"])),spacingM-5,spacingM);var HashtagLink=_styled__default["default"](Link$2).withConfig({displayName:"ContentDisplay__HashtagLink",componentId:"sc-1yxe01n-2"})(templateObject_3$11||(templateObject_3$11=__makeTemplateObject(["\n && {\n font-weight: bold;\n text-decoration: none;\n }\n"],["\n && {\n font-weight: bold;\n text-decoration: none;\n }\n"])));var templateObject_1$2j,templateObject_2$1v,templateObject_3$11;var NeutralCheckBox=_styled__default["default"](officeUiFabricReact.Checkbox).withConfig({displayName:"NeutralCheckbox__NeutralCheckBox",componentId:"sc-18jxdgn-0"})(templateObject_1$2i||(templateObject_1$2i=__makeTemplateObject(["\n display: inline-block;\n &.is-checked .ms-Checkbox-checkbox {\n border-color: #656565;\n background-color: #919191;\n }\n"],["\n display: inline-block;\n &.is-checked .ms-Checkbox-checkbox {\n border-color: #656565;\n background-color: #919191;\n }\n"])));var templateObject_1$2i;var EventResponseTriggerAction=/** @class */function(){function EventResponseTriggerAction(){this.type=EventResponseTriggerAction.type;}EventResponseTriggerAction.create=function(itemId,response,locationId,onBehalfOfUpn){var dispatch=new EventResponseTriggerAction();dispatch.itemId=itemId;dispatch.response=response;dispatch.locationId=locationId;dispatch.onBehalfOfUpn=onBehalfOfUpn;return dispatch;};EventResponseTriggerAction.type='update_event_response';return EventResponseTriggerAction;}();var RegisterFullSeriesTriggerAction=/** @class */function(){function RegisterFullSeriesTriggerAction(){this.type=RegisterFullSeriesTriggerAction.type;}RegisterFullSeriesTriggerAction.create=function(recurrenceSeriesId,response){var dispatch=new RegisterFullSeriesTriggerAction();dispatch.recurrenceSeriesId=recurrenceSeriesId;dispatch.response=response;return dispatch;};RegisterFullSeriesTriggerAction.type='update_register_button_state';return RegisterFullSeriesTriggerAction;}();var FollowCommentsTriggerAction=/** @class */function(){function FollowCommentsTriggerAction(){this.type=FollowCommentsTriggerAction.type;}FollowCommentsTriggerAction.create=function(itemId,followState){var dispatch=new FollowCommentsTriggerAction();dispatch.itemId=itemId;dispatch.followState=followState;return dispatch;};FollowCommentsTriggerAction.type='update_follow_comments';return FollowCommentsTriggerAction;}();var ForbiddenErrorTriggerAction=/** @class */function(){function ForbiddenErrorTriggerAction(){this.type=ForbiddenErrorTriggerAction.type;}ForbiddenErrorTriggerAction.create=function(){return new ForbiddenErrorTriggerAction();};ForbiddenErrorTriggerAction.type='forbidden_error';return ForbiddenErrorTriggerAction;}();var PromptPublicUserLoginAction=/** @class */function(){function PromptPublicUserLoginAction(){this.type=ForbiddenErrorTriggerAction.type;}PromptPublicUserLoginAction.create=function(){return new ForbiddenErrorTriggerAction();};return PromptPublicUserLoginAction;}();var commentCreatedSubject=new Subject();var onCommentCreated$=commentCreatedSubject.asObservable();function useCommentApi(){var api=useApi();return React$d.useMemo(function(){return {createComment:createComment,createEditorComment:createEditorComment,listComments:listComments,getCommentReplies:getCommentReplies,getCommentThread:getCommentThread,getEditorConversations:getEditorConversations,translateComment:translateComment,deleteComment:deleteComment,deleteEditorComment:deleteEditorComment,toggleCommentLike:toggleCommentLike,updateComment:updateComment,onCommentCreated$:onCommentCreated$};function createComment(type,scope,itemId,comment){return api.all(getRoute(scope,itemId,type)).post(comment).then(function(result){commentCreatedSubject.next(itemId);return result.body().data();});}function createEditorComment(itemId,comment){return api.all(getRoute(ConversationScope.Editor,itemId)).post(comment).then(function(result){commentCreatedSubject.next(itemId);return result.body().data();});}function listComments(type,scope,itemId,filter){return api.custom(getRoute(scope,itemId,type,null,filter)).get().then(function(res){return res.body().data();});}function getCommentReplies(type,scope,itemId,commentId,filter){return api.custom(getRoute(scope,itemId,type,commentId,filter,true)).get().then(function(res){return res.body().data();});}function getCommentThread(type,itemId,commentId){return api.custom(type+"/"+itemId+"/comments/"+commentId+"/thread").get().then(function(res){return res.body().data();});}function getEditorConversations(itemId){return api.all(getRoute(ConversationScope.Editor,itemId)).getAll().then(function(res){return res.body().map(function(comment){return comment.data();});});}function translateComment(type,scope,itemId,commentId,targetLanguage){return api.custom(getRoute(scope,itemId,type,commentId)+"/"+(type===ItemResourceTypes.Posts?'content':'contents')+"/"+targetLanguage).get().then(function(res){return res.body().data();});}function deleteComment(type,scope,itemId,commentId){return api// note: commentId is passed as argument for delete method
|
|
125511
125519
|
.all(getRoute(scope,itemId,type)).delete(commentId);}function deleteEditorComment(itemId,commentId){return api// note: commentId is passed as argument for delete method
|
|
125512
125520
|
.all(getRoute(ConversationScope.Editor,itemId)).delete(commentId);}function toggleCommentLike(commentId,isLiked){if(isLiked){return api.custom("comments/"+commentId+"/feedback/like").put({});}else {return api.custom("comments/"+commentId+"/feedback/like").delete();}}function updateComment(scope,itemId,commentId,content,attachments,type){return api.all(getRoute(scope,itemId,type,commentId)).put('',{id:commentId,content:content,parentItemId:itemId,attachments:attachments});}},[api]);}function getRoute(scope,itemId,type,commentId,filter,isThread){var baseRoute='';switch(scope){case ConversationScope.Editor:baseRoute="editor/"+itemId+"/messages";break;case ConversationScope.Public:baseRoute=type+"/"+itemId+"/comments";break;case ConversationScope.Posts:baseRoute=type+"/"+itemId+"/comments";break;default:throw new Error('Cannot determine route for unsupported scope '+scope);}var route=commentId?baseRoute+"/"+commentId:baseRoute;route=isThread?baseRoute+"/"+commentId+"/replies":route;return filter?route+"?"+queryString.stringify(filter):route;}var FollowComments=function FollowComments(props){var user=useCurrentUser();var _a=useManageCurrentUserApi(),getFollowCommentsStatus=_a.getFollowCommentsStatus,toggleFollowComments=_a.toggleFollowComments;var formatMessage=useIntl().formatMessage;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var isSavingRef=React$d.useRef(false);var currentToastIdRef=React$d.useRef(null);var onCommentCreated$=useCommentApi().onCommentCreated$;var _b=useNotificationContext(),dismissToast=_b.dismissToast,showToast=_b.showToast,showError=_b.showError;var _c=usePromise$2(function(){return getFollowCommentsStatus(props.itemId,props.type,props.scope);},false),isFollowing=_c[0],setIsFollowing=_c[3];useListener(FollowCommentsTriggerAction.type,function(action){if(action.itemId!==props.itemId){return false;}setIsFollowing(action.followState);return true;},[setIsFollowing,props.itemId]);React$d.useEffect(function(){var subscription=onCommentCreated$.pipe(filter(function(id){return id===props.itemId;}),tap(function(){return handleCommentCreated();})).subscribe(function(){return null;});return function(){return subscription.unsubscribe();};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125513
|
-
},[isFollowing,props.itemId,props.scope]);var showWarning=isFollowing&&hasDisabledNotificationSettings();var followLabelStringResourceKey=props.scope===ConversationScope.Public?'Comment.followLabel':'Comment.followEditorLabel';return jsxRuntime.jsxs(Host$V,__assign({className:props.className},{children:[jsxRuntime.jsx(NeutralCheckBox,{checked:isFollowing,onChange:function(_e,checked){return handleOnChange(checked);},label:formatMessage({id:followLabelStringResourceKey})},void 0),showWarning&&jsxRuntime.jsxs(WarningContainer,__assign({className:"ms-font-m"},{children:[jsxRuntime.jsx(officeUiFabricReact.Icon,{className:"ms-fontColor-red",iconName:"warning"},void 0),jsxRuntime.jsxs(WarningMessage,{children:[jsxRuntime.jsx(FormattedMessage$1,{id:"Profile.notificationSettings.conversationsDisabled"},void 0),!props.hideProfileUrl&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:["\u00A0",jsxRuntime.jsx(Link$2,__assign({to:buildPath('/user')},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Profile.notificationSettings.conversationsDisabledChangeSettings"},void 0)}),void 0)]},void 0)]},void 0)]}),void 0)]}),void 0);function handleCommentCreated(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,updateFollow(true)];case 1:_a.sent();return [2/*return*/];}});});}function handleOnChange(newFollowState){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,updateFollow(newFollowState)];case 1:_a.sent();if(currentToastIdRef.current){dismissToast(currentToastIdRef.current);}currentToastIdRef.current=showToast(newFollowState?'Comment.followSuccessful':'Comment.unfollowSuccessful');return [2/*return*/];}});});}function updateFollow(newFollowState){return __awaiter(this,void 0,void 0,function(){var error_1;return __generator(this,function(_a){switch(_a.label){case 0:if(isSavingRef.current){return [2/*return*/];}if(newFollowState===isFollowing){return [2/*return*/];}setIsFollowing(newFollowState);isSavingRef.current=true;_a.label=1;case 1:_a.trys.push([1,3,4,5]);return [4/*yield*/,toggleFollowComments(props.itemId,props.type,props.scope,newFollowState)];case 2:_a.sent();return [3/*break*/,5];case 3:error_1=_a.sent();logger.error(error_1);showError('Generic.error');return [3/*break*/,5];case 4:isSavingRef.current=false;return [7/*endfinally*/];case 5:return [2/*return*/];}});});}function hasDisabledNotificationSettings(){var notificationSettings=user.notificationTypeSettings||{};return notificationSettings.comments===NotificationType.None;}};var Host$V=_styled__default["default"].div.withConfig({displayName:"FollowComments__Host",componentId:"sc-1vcax52-0"})(templateObject_1$2h||(templateObject_1$2h=__makeTemplateObject([""],[""])));var WarningContainer=_styled__default["default"].div.withConfig({displayName:"FollowComments__WarningContainer",componentId:"sc-1vcax52-1"})(templateObject_2$
|
|
125521
|
+
},[isFollowing,props.itemId,props.scope]);var showWarning=isFollowing&&hasDisabledNotificationSettings();var followLabelStringResourceKey=props.scope===ConversationScope.Public?'Comment.followLabel':'Comment.followEditorLabel';return jsxRuntime.jsxs(Host$V,__assign({className:props.className},{children:[jsxRuntime.jsx(NeutralCheckBox,{checked:isFollowing,onChange:function(_e,checked){return handleOnChange(checked);},label:formatMessage({id:followLabelStringResourceKey})},void 0),showWarning&&jsxRuntime.jsxs(WarningContainer,__assign({className:"ms-font-m"},{children:[jsxRuntime.jsx(officeUiFabricReact.Icon,{className:"ms-fontColor-red",iconName:"warning"},void 0),jsxRuntime.jsxs(WarningMessage,{children:[jsxRuntime.jsx(FormattedMessage$1,{id:"Profile.notificationSettings.conversationsDisabled"},void 0),!props.hideProfileUrl&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:["\u00A0",jsxRuntime.jsx(Link$2,__assign({to:buildPath('/user')},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Profile.notificationSettings.conversationsDisabledChangeSettings"},void 0)}),void 0)]},void 0)]},void 0)]}),void 0)]}),void 0);function handleCommentCreated(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,updateFollow(true)];case 1:_a.sent();return [2/*return*/];}});});}function handleOnChange(newFollowState){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,updateFollow(newFollowState)];case 1:_a.sent();if(currentToastIdRef.current){dismissToast(currentToastIdRef.current);}currentToastIdRef.current=showToast(newFollowState?'Comment.followSuccessful':'Comment.unfollowSuccessful');return [2/*return*/];}});});}function updateFollow(newFollowState){return __awaiter(this,void 0,void 0,function(){var error_1;return __generator(this,function(_a){switch(_a.label){case 0:if(isSavingRef.current){return [2/*return*/];}if(newFollowState===isFollowing){return [2/*return*/];}setIsFollowing(newFollowState);isSavingRef.current=true;_a.label=1;case 1:_a.trys.push([1,3,4,5]);return [4/*yield*/,toggleFollowComments(props.itemId,props.type,props.scope,newFollowState)];case 2:_a.sent();return [3/*break*/,5];case 3:error_1=_a.sent();logger.error(error_1);showError('Generic.error');return [3/*break*/,5];case 4:isSavingRef.current=false;return [7/*endfinally*/];case 5:return [2/*return*/];}});});}function hasDisabledNotificationSettings(){var notificationSettings=user.notificationTypeSettings||{};return notificationSettings.comments===NotificationType.None;}};var Host$V=_styled__default["default"].div.withConfig({displayName:"FollowComments__Host",componentId:"sc-1vcax52-0"})(templateObject_1$2h||(templateObject_1$2h=__makeTemplateObject([""],[""])));var WarningContainer=_styled__default["default"].div.withConfig({displayName:"FollowComments__WarningContainer",componentId:"sc-1vcax52-1"})(templateObject_2$1u||(templateObject_2$1u=__makeTemplateObject(["\n margin-top: ","px;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n width: 100%;\n i {\n font-size: 1.5em;\n margin-right: 7px;\n }\n"],["\n margin-top: ","px;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n width: 100%;\n i {\n font-size: 1.5em;\n margin-right: 7px;\n }\n"])),spacingS);var WarningMessage=_styled__default["default"].div.withConfig({displayName:"FollowComments__WarningMessage",componentId:"sc-1vcax52-2"})(templateObject_3$10||(templateObject_3$10=__makeTemplateObject(["\n flex: 1;\n"],["\n flex: 1;\n"])));var templateObject_1$2h,templateObject_2$1u,templateObject_3$10;// a string of all valid unicode whitespaces
|
|
125514
125522
|
// eslint-disable-next-line max-len
|
|
125515
125523
|
var whitespaces$3='\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';var requireObjectCoercible$5=requireObjectCoercible$b;var whitespaces$2$1=whitespaces$3;var whitespace$1='['+whitespaces$2$1+']';var ltrim$1=RegExp('^'+whitespace$1+whitespace$1+'*');var rtrim$1=RegExp(whitespace$1+whitespace$1+'*$');// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
125516
125524
|
var createMethod$1$1=function(TYPE){return function($this){var string=String(requireObjectCoercible$5($this));if(TYPE&1)string=string.replace(ltrim$1,'');if(TYPE&2)string=string.replace(rtrim$1,'');return string;};};var stringTrim$1={// `String.prototype.{ trimLeft, trimStart }` methods
|
|
@@ -125521,9 +125529,9 @@
|
|
|
125521
125529
|
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
125522
125530
|
trim:createMethod$1$1(3)};var fails$9=fails$i;var whitespaces$1$1=whitespaces$3;var non$1='\u200B\u0085\u180E';// check that a method works with the correct list
|
|
125523
125531
|
// of whitespaces and has a correct name
|
|
125524
|
-
var stringTrimForced$1=function(METHOD_NAME){return fails$9(function(){return !!whitespaces$1$1[METHOD_NAME]()||non$1[METHOD_NAME]()!=non$1||whitespaces$1$1[METHOD_NAME].name!==METHOD_NAME;});};var $$
|
|
125532
|
+
var stringTrimForced$1=function(METHOD_NAME){return fails$9(function(){return !!whitespaces$1$1[METHOD_NAME]()||non$1[METHOD_NAME]()!=non$1||whitespaces$1$1[METHOD_NAME].name!==METHOD_NAME;});};var $$d=_export;var $trim$1=stringTrim$1.trim;var forcedStringTrimMethod$1=stringTrimForced$1;// `String.prototype.trim` method
|
|
125525
125533
|
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
125526
|
-
$$
|
|
125534
|
+
$$d({target:'String',proto:true,forced:forcedStringTrimMethod$1('trim')},{trim:function trim(){return $trim$1(this);}});function canSaveInput(allowSaveWithoutContent,attachments,content){if(attachments.some(function(a){return a.isUploadInProgress||a.hasError;})){return false;}if(allowSaveWithoutContent&&attachments.some(function(a){return a.type===AttachmentType.Giphy||a.type===AttachmentType.Image;})){return true;}return content&&content.trim().length!==0;}var internalObjectKeys=objectKeysInternal;var enumBugKeys$1=enumBugKeys$3;// `Object.keys` method
|
|
125527
125535
|
// https://tc39.github.io/ecma262/#sec-object.keys
|
|
125528
125536
|
var objectKeys$2=Object.keys||function keys(O){return internalObjectKeys(O,enumBugKeys$1);};var DESCRIPTORS$6=descriptors;var definePropertyModule$3=objectDefineProperty;var anObject$a=anObject$h;var objectKeys$1=objectKeys$2;// `Object.defineProperties` method
|
|
125529
125537
|
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
|
@@ -125540,26 +125548,26 @@
|
|
|
125540
125548
|
var activeXDocument;var NullProtoObject=function(){try{/* global ActiveXObject */activeXDocument=document.domain&&new ActiveXObject('htmlfile');}catch(error){/* ignore */}NullProtoObject=activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();var length=enumBugKeys.length;while(length--)delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];return NullProtoObject();};hiddenKeys[IE_PROTO$1]=true;// `Object.create` method
|
|
125541
125549
|
// https://tc39.github.io/ecma262/#sec-object.create
|
|
125542
125550
|
var objectCreate=Object.create||function create(O,Properties){var result;if(O!==null){EmptyConstructor[PROTOTYPE]=anObject$9(O);result=new EmptyConstructor();EmptyConstructor[PROTOTYPE]=null;// add "__proto__" for Object.getPrototypeOf polyfill
|
|
125543
|
-
result[IE_PROTO$1]=O;}else result=NullProtoObject();return Properties===undefined?result:defineProperties$1(result,Properties);};var wellKnownSymbol$
|
|
125551
|
+
result[IE_PROTO$1]=O;}else result=NullProtoObject();return Properties===undefined?result:defineProperties$1(result,Properties);};var wellKnownSymbol$g=wellKnownSymbol$l;var create$2=objectCreate;var definePropertyModule$2=objectDefineProperty;var UNSCOPABLES=wellKnownSymbol$g('unscopables');var ArrayPrototype$1=Array.prototype;// Array.prototype[@@unscopables]
|
|
125544
125552
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
125545
125553
|
if(ArrayPrototype$1[UNSCOPABLES]==undefined){definePropertyModule$2.f(ArrayPrototype$1,UNSCOPABLES,{configurable:true,value:create$2(null)});}// add a key to Array.prototype[@@unscopables]
|
|
125546
|
-
var addToUnscopables$
|
|
125554
|
+
var addToUnscopables$2=function(key){ArrayPrototype$1[UNSCOPABLES][key]=true;};var iterators={};var requireObjectCoercible$4=requireObjectCoercible$b;// `ToObject` abstract operation
|
|
125547
125555
|
// https://tc39.github.io/ecma262/#sec-toobject
|
|
125548
|
-
var toObject$
|
|
125556
|
+
var toObject$7=function(argument){return Object(requireObjectCoercible$4(argument));};var fails$8=fails$i;var correctPrototypeGetter=!fails$8(function(){function F(){/* empty */}F.prototype.constructor=null;return Object.getPrototypeOf(new F())!==F.prototype;});var has$5=has$c;var toObject$6=toObject$7;var sharedKey=sharedKey$3;var CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter;var IE_PROTO=sharedKey('IE_PROTO');var ObjectPrototype=Object.prototype;// `Object.getPrototypeOf` method
|
|
125549
125557
|
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
|
|
125550
|
-
var objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?Object.getPrototypeOf:function(O){O=toObject$
|
|
125558
|
+
var objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?Object.getPrototypeOf:function(O){O=toObject$6(O);if(has$5(O,IE_PROTO))return O[IE_PROTO];if(typeof O.constructor=='function'&&O instanceof O.constructor){return O.constructor.prototype;}return O instanceof Object?ObjectPrototype:null;};var getPrototypeOf$1=objectGetPrototypeOf;var createNonEnumerableProperty$2=createNonEnumerableProperty$8;var has$4=has$c;var wellKnownSymbol$f=wellKnownSymbol$l;var ITERATOR$7=wellKnownSymbol$f('iterator');var BUGGY_SAFARI_ITERATORS$1=false;var returnThis$2=function(){return this;};// `%IteratorPrototype%` object
|
|
125551
125559
|
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
|
|
125552
125560
|
var IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator;if([].keys){arrayIterator=[].keys();// Safari 8 has buggy iterators w/o `next`
|
|
125553
125561
|
if(!('next'in arrayIterator))BUGGY_SAFARI_ITERATORS$1=true;else {PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator));if(PrototypeOfArrayIteratorPrototype!==Object.prototype)IteratorPrototype$2=PrototypeOfArrayIteratorPrototype;}}if(IteratorPrototype$2==undefined)IteratorPrototype$2={};// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
|
125554
|
-
if(!has$4(IteratorPrototype$2,ITERATOR$7)){createNonEnumerableProperty$2(IteratorPrototype$2,ITERATOR$7,returnThis$2);}var iteratorsCore={IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1};var defineProperty$4=objectDefineProperty.f;var has$3=has$c;var wellKnownSymbol$
|
|
125562
|
+
if(!has$4(IteratorPrototype$2,ITERATOR$7)){createNonEnumerableProperty$2(IteratorPrototype$2,ITERATOR$7,returnThis$2);}var iteratorsCore={IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1};var defineProperty$4=objectDefineProperty.f;var has$3=has$c;var wellKnownSymbol$e=wellKnownSymbol$l;var TO_STRING_TAG$3=wellKnownSymbol$e('toStringTag');var setToStringTag$5=function(it,TAG,STATIC){if(it&&!has$3(it=STATIC?it:it.prototype,TO_STRING_TAG$3)){defineProperty$4(it,TO_STRING_TAG$3,{configurable:true,value:TAG});}};var IteratorPrototype$1=iteratorsCore.IteratorPrototype;var create$1=objectCreate;var createPropertyDescriptor$2=createPropertyDescriptor$5;var setToStringTag$4=setToStringTag$5;var Iterators$4=iterators;var returnThis$1=function(){return this;};var createIteratorConstructor$2=function(IteratorConstructor,NAME,next){var TO_STRING_TAG=NAME+' Iterator';IteratorConstructor.prototype=create$1(IteratorPrototype$1,{next:createPropertyDescriptor$2(1,next)});setToStringTag$4(IteratorConstructor,TO_STRING_TAG,false);Iterators$4[TO_STRING_TAG]=returnThis$1;return IteratorConstructor;};var isObject$6=isObject$c;var aPossiblePrototype$1=function(it){if(!isObject$6(it)&&it!==null){throw TypeError("Can't set "+String(it)+' as a prototype');}return it;};var anObject$8=anObject$h;var aPossiblePrototype=aPossiblePrototype$1;// `Object.setPrototypeOf` method
|
|
125555
125563
|
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
|
|
125556
125564
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
125557
|
-
/* eslint-disable no-proto */var objectSetPrototypeOf=Object.setPrototypeOf||('__proto__'in{}?function(){var CORRECT_SETTER=false;var test={};var setter;try{setter=Object.getOwnPropertyDescriptor(Object.prototype,'__proto__').set;setter.call(test,[]);CORRECT_SETTER=test instanceof Array;}catch(error){/* empty */}return function setPrototypeOf(O,proto){anObject$8(O);aPossiblePrototype(proto);if(CORRECT_SETTER)setter.call(O,proto);else O.__proto__=proto;return O;};}():undefined);var $$
|
|
125565
|
+
/* eslint-disable no-proto */var objectSetPrototypeOf=Object.setPrototypeOf||('__proto__'in{}?function(){var CORRECT_SETTER=false;var test={};var setter;try{setter=Object.getOwnPropertyDescriptor(Object.prototype,'__proto__').set;setter.call(test,[]);CORRECT_SETTER=test instanceof Array;}catch(error){/* empty */}return function setPrototypeOf(O,proto){anObject$8(O);aPossiblePrototype(proto);if(CORRECT_SETTER)setter.call(O,proto);else O.__proto__=proto;return O;};}():undefined);var $$c=_export;var createIteratorConstructor$1=createIteratorConstructor$2;var getPrototypeOf=objectGetPrototypeOf;var setPrototypeOf$1=objectSetPrototypeOf;var setToStringTag$3=setToStringTag$5;var createNonEnumerableProperty$1=createNonEnumerableProperty$8;var redefine$6=redefine$9.exports;var wellKnownSymbol$d=wellKnownSymbol$l;var Iterators$3=iterators;var IteratorsCore=iteratorsCore;var IteratorPrototype=IteratorsCore.IteratorPrototype;var BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS;var ITERATOR$6=wellKnownSymbol$d('iterator');var KEYS='keys';var VALUES='values';var ENTRIES='entries';var returnThis=function(){return this;};var defineIterator$2=function(Iterable,NAME,IteratorConstructor,next,DEFAULT,IS_SET,FORCED){createIteratorConstructor$1(IteratorConstructor,NAME,next);var getIterationMethod=function(KIND){if(KIND===DEFAULT&&defaultIterator)return defaultIterator;if(!BUGGY_SAFARI_ITERATORS&&KIND in IterablePrototype)return IterablePrototype[KIND];switch(KIND){case KEYS:return function keys(){return new IteratorConstructor(this,KIND);};case VALUES:return function values(){return new IteratorConstructor(this,KIND);};case ENTRIES:return function entries(){return new IteratorConstructor(this,KIND);};}return function(){return new IteratorConstructor(this);};};var TO_STRING_TAG=NAME+' Iterator';var INCORRECT_VALUES_NAME=false;var IterablePrototype=Iterable.prototype;var nativeIterator=IterablePrototype[ITERATOR$6]||IterablePrototype['@@iterator']||DEFAULT&&IterablePrototype[DEFAULT];var defaultIterator=!BUGGY_SAFARI_ITERATORS&&nativeIterator||getIterationMethod(DEFAULT);var anyNativeIterator=NAME=='Array'?IterablePrototype.entries||nativeIterator:nativeIterator;var CurrentIteratorPrototype,methods,KEY;// fix native
|
|
125558
125566
|
if(anyNativeIterator){CurrentIteratorPrototype=getPrototypeOf(anyNativeIterator.call(new Iterable()));if(IteratorPrototype!==Object.prototype&&CurrentIteratorPrototype.next){if(getPrototypeOf(CurrentIteratorPrototype)!==IteratorPrototype){if(setPrototypeOf$1){setPrototypeOf$1(CurrentIteratorPrototype,IteratorPrototype);}else if(typeof CurrentIteratorPrototype[ITERATOR$6]!='function'){createNonEnumerableProperty$1(CurrentIteratorPrototype,ITERATOR$6,returnThis);}}// Set @@toStringTag to native iterators
|
|
125559
125567
|
setToStringTag$3(CurrentIteratorPrototype,TO_STRING_TAG,true);}}// fix Array#{values, @@iterator}.name in V8 / FF
|
|
125560
125568
|
if(DEFAULT==VALUES&&nativeIterator&&nativeIterator.name!==VALUES){INCORRECT_VALUES_NAME=true;defaultIterator=function values(){return nativeIterator.call(this);};}// define iterator
|
|
125561
125569
|
if(IterablePrototype[ITERATOR$6]!==defaultIterator){createNonEnumerableProperty$1(IterablePrototype,ITERATOR$6,defaultIterator);}Iterators$3[NAME]=defaultIterator;// export additional methods
|
|
125562
|
-
if(DEFAULT){methods={values:getIterationMethod(VALUES),keys:IS_SET?defaultIterator:getIterationMethod(KEYS),entries:getIterationMethod(ENTRIES)};if(FORCED)for(KEY in methods){if(BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME||!(KEY in IterablePrototype)){redefine$6(IterablePrototype,KEY,methods[KEY]);}}else $$
|
|
125570
|
+
if(DEFAULT){methods={values:getIterationMethod(VALUES),keys:IS_SET?defaultIterator:getIterationMethod(KEYS),entries:getIterationMethod(ENTRIES)};if(FORCED)for(KEY in methods){if(BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME||!(KEY in IterablePrototype)){redefine$6(IterablePrototype,KEY,methods[KEY]);}}else $$c({target:NAME,proto:true,forced:BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME},methods);}return methods;};var toIndexedObject=toIndexedObject$4;var addToUnscopables$1=addToUnscopables$2;var Iterators$2=iterators;var InternalStateModule$4=internalState;var defineIterator$1=defineIterator$2;var ARRAY_ITERATOR='Array Iterator';var setInternalState$5=InternalStateModule$4.set;var getInternalState$2=InternalStateModule$4.getterFor(ARRAY_ITERATOR);// `Array.prototype.entries` method
|
|
125563
125571
|
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
|
|
125564
125572
|
// `Array.prototype.keys` method
|
|
125565
125573
|
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
|
|
@@ -125578,39 +125586,39 @@
|
|
|
125578
125586
|
// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
|
|
125579
125587
|
// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
|
|
125580
125588
|
Iterators$2.Arguments=Iterators$2.Array;// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
125581
|
-
addToUnscopables('keys');addToUnscopables('values');addToUnscopables('entries');// iterable DOM collections
|
|
125589
|
+
addToUnscopables$1('keys');addToUnscopables$1('values');addToUnscopables$1('entries');// iterable DOM collections
|
|
125582
125590
|
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
125583
|
-
var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};var global$b=global$m;var DOMIterables=domIterables;var ArrayIteratorMethods=es_array_iterator;var createNonEnumerableProperty$9=createNonEnumerableProperty$8;var wellKnownSymbol$
|
|
125591
|
+
var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};var global$b=global$m;var DOMIterables=domIterables;var ArrayIteratorMethods=es_array_iterator;var createNonEnumerableProperty$9=createNonEnumerableProperty$8;var wellKnownSymbol$c=wellKnownSymbol$l;var ITERATOR$5=wellKnownSymbol$c('iterator');var TO_STRING_TAG$2=wellKnownSymbol$c('toStringTag');var ArrayValues=ArrayIteratorMethods.values;for(var COLLECTION_NAME in DOMIterables){var Collection=global$b[COLLECTION_NAME];var CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype){// some Chrome versions have non-configurable methods on DOMTokenList
|
|
125584
125592
|
if(CollectionPrototype[ITERATOR$5]!==ArrayValues)try{createNonEnumerableProperty$9(CollectionPrototype,ITERATOR$5,ArrayValues);}catch(error){CollectionPrototype[ITERATOR$5]=ArrayValues;}if(!CollectionPrototype[TO_STRING_TAG$2]){createNonEnumerableProperty$9(CollectionPrototype,TO_STRING_TAG$2,COLLECTION_NAME);}if(DOMIterables[COLLECTION_NAME])for(var METHOD_NAME in ArrayIteratorMethods){// some Chrome versions have non-configurable methods on DOMTokenList
|
|
125585
125593
|
if(CollectionPrototype[METHOD_NAME]!==ArrayIteratorMethods[METHOD_NAME])try{createNonEnumerableProperty$9(CollectionPrototype,METHOD_NAME,ArrayIteratorMethods[METHOD_NAME]);}catch(error){CollectionPrototype[METHOD_NAME]=ArrayIteratorMethods[METHOD_NAME];}}}}var charAt$2=stringMultibyte$1.charAt;var InternalStateModule$3=internalState;var defineIterator=defineIterator$2;var STRING_ITERATOR='String Iterator';var setInternalState$4=InternalStateModule$3.set;var getInternalState$1=InternalStateModule$3.getterFor(STRING_ITERATOR);// `String.prototype[@@iterator]` method
|
|
125586
125594
|
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
|
|
125587
125595
|
defineIterator(String,'String',function(iterated){setInternalState$4(this,{type:STRING_ITERATOR,string:String(iterated),index:0});// `%StringIteratorPrototype%.next` method
|
|
125588
125596
|
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
|
|
125589
|
-
},function next(){var state=getInternalState$1(this);var string=state.string;var index=state.index;var point;if(index>=string.length)return {value:undefined,done:true};point=charAt$2(string,index);state.index+=point.length;return {value:point,done:false};});var fails$7=fails$i;var wellKnownSymbol$
|
|
125597
|
+
},function next(){var state=getInternalState$1(this);var string=state.string;var index=state.index;var point;if(index>=string.length)return {value:undefined,done:true};point=charAt$2(string,index);state.index+=point.length;return {value:point,done:false};});var fails$7=fails$i;var wellKnownSymbol$b=wellKnownSymbol$l;var IS_PURE=isPure;var ITERATOR$4=wellKnownSymbol$b('iterator');var nativeUrl=!fails$7(function(){var url=new URL('b?a=1&b=2&c=3','http://a');var searchParams=url.searchParams;var result='';url.pathname='c%20d';searchParams.forEach(function(value,key){searchParams['delete']('b');result+=key+value;});return IS_PURE&&!url.toJSON||!searchParams.sort||url.href!=='http://a/c%20d?a=1&c=3'||searchParams.get('c')!=='3'||String(new URLSearchParams('?a=1'))!=='a=1'||!searchParams[ITERATOR$4]// throws in Edge
|
|
125590
125598
|
||new URL('https://a@b').username!=='a'||new URLSearchParams(new URLSearchParams('a=b')).get('a')!=='b'// not punycoded in Edge
|
|
125591
125599
|
||new URL('http://тест').host!=='xn--e1aybc'// not escaped in Chrome 62-
|
|
125592
125600
|
||new URL('http://a#б').hash!=='#%D0%B1'// fails in Chrome 66-
|
|
125593
125601
|
||result!=='a1c3'// throws in Safari
|
|
125594
|
-
||new URL('http://x',undefined).host!=='x';});var anInstance$3=function(it,Constructor,name){if(!(it instanceof Constructor)){throw TypeError('Incorrect '+(name?name+' ':'')+'invocation');}return it;};var DESCRIPTORS$5=descriptors;var fails$6=fails$i;var objectKeys=objectKeys$2;var getOwnPropertySymbolsModule=objectGetOwnPropertySymbols;var propertyIsEnumerableModule=objectPropertyIsEnumerable;var toObject$
|
|
125602
|
+
||new URL('http://x',undefined).host!=='x';});var anInstance$3=function(it,Constructor,name){if(!(it instanceof Constructor)){throw TypeError('Incorrect '+(name?name+' ':'')+'invocation');}return it;};var DESCRIPTORS$5=descriptors;var fails$6=fails$i;var objectKeys=objectKeys$2;var getOwnPropertySymbolsModule=objectGetOwnPropertySymbols;var propertyIsEnumerableModule=objectPropertyIsEnumerable;var toObject$5=toObject$7;var IndexedObject$1=indexedObject;var nativeAssign=Object.assign;var defineProperty$3=Object.defineProperty;// `Object.assign` method
|
|
125595
125603
|
// https://tc39.github.io/ecma262/#sec-object.assign
|
|
125596
125604
|
var objectAssign=!nativeAssign||fails$6(function(){// should have correct order of operations (Edge bug)
|
|
125597
125605
|
if(DESCRIPTORS$5&&nativeAssign({b:1},nativeAssign(defineProperty$3({},'a',{enumerable:true,get:function(){defineProperty$3(this,'b',{value:3,enumerable:false});}}),{b:2})).b!==1)return true;// should work with symbols and should have deterministic property order (V8 bug)
|
|
125598
125606
|
var A={};var B={};// eslint-disable-next-line no-undef
|
|
125599
125607
|
var symbol=Symbol();var alphabet='abcdefghijklmnopqrst';A[symbol]=7;alphabet.split('').forEach(function(chr){B[chr]=chr;});return nativeAssign({},A)[symbol]!=7||objectKeys(nativeAssign({},B)).join('')!=alphabet;})?function assign(target,source){// eslint-disable-line no-unused-vars
|
|
125600
|
-
var T=toObject$
|
|
125601
|
-
var functionBindContext=function(fn,that,length){aFunction$
|
|
125608
|
+
var T=toObject$5(target);var argumentsLength=arguments.length;var index=1;var getOwnPropertySymbols=getOwnPropertySymbolsModule.f;var propertyIsEnumerable=propertyIsEnumerableModule.f;while(argumentsLength>index){var S=IndexedObject$1(arguments[index++]);var keys=getOwnPropertySymbols?objectKeys(S).concat(getOwnPropertySymbols(S)):objectKeys(S);var length=keys.length;var j=0;var key;while(length>j){key=keys[j++];if(!DESCRIPTORS$5||propertyIsEnumerable.call(S,key))T[key]=S[key];}}return T;}:nativeAssign;var aFunction$5=aFunction$7;// optional / simple context binding
|
|
125609
|
+
var functionBindContext=function(fn,that,length){aFunction$5(fn);if(that===undefined)return fn;switch(length){case 0:return function(){return fn.call(that);};case 1:return function(a){return fn.call(that,a);};case 2:return function(a,b){return fn.call(that,a,b);};case 3:return function(a,b,c){return fn.call(that,a,b,c);};}return function/* ...args */(){return fn.apply(that,arguments);};};var anObject$7=anObject$h;// call something on iterator step with safe closing on error
|
|
125602
125610
|
var callWithSafeIterationClosing$2=function(iterator,fn,value,ENTRIES){try{return ENTRIES?fn(anObject$7(value)[0],value[1]):fn(value);// 7.4.6 IteratorClose(iterator, completion)
|
|
125603
|
-
}catch(error){var returnMethod=iterator['return'];if(returnMethod!==undefined)anObject$7(returnMethod.call(iterator));throw error;}};var wellKnownSymbol$
|
|
125604
|
-
var isArrayIteratorMethod$2=function(it){return it!==undefined&&(Iterators$1.Array===it||ArrayPrototype[ITERATOR$3]===it);};var toPrimitive=toPrimitive$3;var definePropertyModule$1=objectDefineProperty;var createPropertyDescriptor$1=createPropertyDescriptor$5;var createProperty$1=function(object,key,value){var propertyKey=toPrimitive(key);if(propertyKey in object)definePropertyModule$1.f(object,propertyKey,createPropertyDescriptor$1(0,value));else object[propertyKey]=value;};var wellKnownSymbol$
|
|
125611
|
+
}catch(error){var returnMethod=iterator['return'];if(returnMethod!==undefined)anObject$7(returnMethod.call(iterator));throw error;}};var wellKnownSymbol$a=wellKnownSymbol$l;var Iterators$1=iterators;var ITERATOR$3=wellKnownSymbol$a('iterator');var ArrayPrototype=Array.prototype;// check on default Array iterator
|
|
125612
|
+
var isArrayIteratorMethod$2=function(it){return it!==undefined&&(Iterators$1.Array===it||ArrayPrototype[ITERATOR$3]===it);};var toPrimitive=toPrimitive$3;var definePropertyModule$1=objectDefineProperty;var createPropertyDescriptor$1=createPropertyDescriptor$5;var createProperty$1=function(object,key,value){var propertyKey=toPrimitive(key);if(propertyKey in object)definePropertyModule$1.f(object,propertyKey,createPropertyDescriptor$1(0,value));else object[propertyKey]=value;};var wellKnownSymbol$9=wellKnownSymbol$l;var TO_STRING_TAG$1=wellKnownSymbol$9('toStringTag');var test$2={};test$2[TO_STRING_TAG$1]='z';var toStringTagSupport=String(test$2)==='[object z]';var TO_STRING_TAG_SUPPORT=toStringTagSupport;var classofRaw=classofRaw$1;var wellKnownSymbol$8=wellKnownSymbol$l;var TO_STRING_TAG=wellKnownSymbol$8('toStringTag');// ES3 wrong here
|
|
125605
125613
|
var CORRECT_ARGUMENTS=classofRaw(function(){return arguments;}())=='Arguments';// fallback for IE11 Script Access Denied error
|
|
125606
125614
|
var tryGet=function(it,key){try{return it[key];}catch(error){/* empty */}};// getting tag from ES6+ `Object.prototype.toString`
|
|
125607
125615
|
var classof$6=TO_STRING_TAG_SUPPORT?classofRaw:function(it){var O,tag,result;return it===undefined?'Undefined':it===null?'Null'// @@toStringTag case
|
|
125608
125616
|
:typeof(tag=tryGet(O=Object(it),TO_STRING_TAG))=='string'?tag// builtinTag case
|
|
125609
125617
|
:CORRECT_ARGUMENTS?classofRaw(O)// ES3 arguments fallback
|
|
125610
|
-
:(result=classofRaw(O))=='Object'&&typeof O.callee=='function'?'Arguments':result;};var classof$5=classof$6;var Iterators=iterators;var wellKnownSymbol$
|
|
125618
|
+
:(result=classofRaw(O))=='Object'&&typeof O.callee=='function'?'Arguments':result;};var classof$5=classof$6;var Iterators=iterators;var wellKnownSymbol$7=wellKnownSymbol$l;var ITERATOR$2=wellKnownSymbol$7('iterator');var getIteratorMethod$4=function(it){if(it!=undefined)return it[ITERATOR$2]||it['@@iterator']||Iterators[classof$5(it)];};var bind$5=functionBindContext;var toObject$4=toObject$7;var callWithSafeIterationClosing$1=callWithSafeIterationClosing$2;var isArrayIteratorMethod$1=isArrayIteratorMethod$2;var toLength$6=toLength$a;var createProperty=createProperty$1;var getIteratorMethod$3=getIteratorMethod$4;// `Array.from` method implementation
|
|
125611
125619
|
// https://tc39.github.io/ecma262/#sec-array.from
|
|
125612
|
-
var arrayFrom$1=function from(arrayLike/* , mapfn = undefined, thisArg = undefined */){var O=toObject$
|
|
125613
|
-
if(iteratorMethod!=undefined&&!(C==Array&&isArrayIteratorMethod$1(iteratorMethod))){iterator=iteratorMethod.call(O);next=iterator.next;result=new C();for(;!(step=next.call(iterator)).done;index++){value=mapping?callWithSafeIterationClosing$1(iterator,mapfn,[step.value,index],true):step.value;createProperty(result,index,value);}}else {length=toLength$
|
|
125620
|
+
var arrayFrom$1=function from(arrayLike/* , mapfn = undefined, thisArg = undefined */){var O=toObject$4(arrayLike);var C=typeof this=='function'?this:Array;var argumentsLength=arguments.length;var mapfn=argumentsLength>1?arguments[1]:undefined;var mapping=mapfn!==undefined;var iteratorMethod=getIteratorMethod$3(O);var index=0;var length,result,step,iterator,next,value;if(mapping)mapfn=bind$5(mapfn,argumentsLength>2?arguments[2]:undefined,2);// if the target is not iterable or it's an array with the default iterator - use a simple case
|
|
125621
|
+
if(iteratorMethod!=undefined&&!(C==Array&&isArrayIteratorMethod$1(iteratorMethod))){iterator=iteratorMethod.call(O);next=iterator.next;result=new C();for(;!(step=next.call(iterator)).done;index++){value=mapping?callWithSafeIterationClosing$1(iterator,mapfn,[step.value,index],true):step.value;createProperty(result,index,value);}}else {length=toLength$6(O.length);result=new C(length);for(;length>index;index++){value=mapping?mapfn(O[index],index):O[index];createProperty(result,index,value);}}result.length=index;return result;};// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
|
|
125614
125622
|
var maxInt=2147483647;// aka. 0x7FFFFFFF or 2^31-1
|
|
125615
125623
|
var base=36;var tMin=1;var tMax=26;var skew=38;var damp=700;var initialBias=72;var initialN=128;// 0x80
|
|
125616
125624
|
var delimiter='-';// '\x2D'
|
|
@@ -125649,9 +125657,9 @@
|
|
|
125649
125657
|
var m=maxInt;for(i=0;i<input.length;i++){currentValue=input[i];if(currentValue>=n&¤tValue<m){m=currentValue;}}// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
|
|
125650
125658
|
var handledCPCountPlusOne=handledCPCount+1;if(m-n>floor$2((maxInt-delta)/handledCPCountPlusOne)){throw RangeError(OVERFLOW_ERROR);}delta+=(m-n)*handledCPCountPlusOne;n=m;for(i=0;i<input.length;i++){currentValue=input[i];if(currentValue<n&&++delta>maxInt){throw RangeError(OVERFLOW_ERROR);}if(currentValue==n){// Represent delta as a generalized variable-length integer.
|
|
125651
125659
|
var q=delta;for(var k=base;;k+=base){var t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t)break;var qMinusT=q-t;var baseMinusT=base-t;output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT)));q=floor$2(qMinusT/baseMinusT);}output.push(stringFromCharCode(digitToBasic(q)));bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength);delta=0;++handledCPCount;}}++delta;++n;}return output.join('');};var stringPunycodeToAscii=function(input){var encoded=[];var labels=input.toLowerCase().replace(regexSeparators,'\u002E').split('.');var i,label;for(i=0;i<labels.length;i++){label=labels[i];encoded.push(regexNonASCII.test(label)?'xn--'+encode(label):label);}return encoded.join('.');};var redefine$5=redefine$9.exports;var redefineAll$2=function(target,src,options){for(var key in src)redefine$5(target,key,src[key],options);return target;};var anObject$6=anObject$h;var getIteratorMethod$2=getIteratorMethod$4;var getIterator$1=function(it){var iteratorMethod=getIteratorMethod$2(it);if(typeof iteratorMethod!='function'){throw TypeError(String(it)+' is not iterable');}return anObject$6(iteratorMethod.call(it));};// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
125652
|
-
var $$
|
|
125660
|
+
var $$b=_export;var getBuiltIn$3=getBuiltIn$6;var USE_NATIVE_URL$1=nativeUrl;var redefine$4=redefine$9.exports;var redefineAll$1=redefineAll$2;var setToStringTag$2=setToStringTag$5;var createIteratorConstructor=createIteratorConstructor$2;var InternalStateModule$2=internalState;var anInstance$2=anInstance$3;var hasOwn=has$c;var bind$4=functionBindContext;var classof$4=classof$6;var anObject$5=anObject$h;var isObject$5=isObject$c;var create=objectCreate;var createPropertyDescriptor=createPropertyDescriptor$5;var getIterator=getIterator$1;var getIteratorMethod$1=getIteratorMethod$4;var wellKnownSymbol$6=wellKnownSymbol$l;var $fetch$1=getBuiltIn$3('fetch');var Headers$1=getBuiltIn$3('Headers');var ITERATOR$1=wellKnownSymbol$6('iterator');var URL_SEARCH_PARAMS='URLSearchParams';var URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+'Iterator';var setInternalState$3=InternalStateModule$2.set;var getInternalParamsState=InternalStateModule$2.getterFor(URL_SEARCH_PARAMS);var getInternalIteratorState=InternalStateModule$2.getterFor(URL_SEARCH_PARAMS_ITERATOR);var plus=/\+/g;var sequences=Array(4);var percentSequence=function(bytes){return sequences[bytes-1]||(sequences[bytes-1]=RegExp('((?:%[\\da-f]{2}){'+bytes+'})','gi'));};var percentDecode=function(sequence){try{return decodeURIComponent(sequence);}catch(error){return sequence;}};var deserialize=function(it){var result=it.replace(plus,' ');var bytes=4;try{return decodeURIComponent(result);}catch(error){while(bytes){result=result.replace(percentSequence(bytes--),percentDecode);}return result;}};var find=/[!'()~]|%20/g;var replace={'!':'%21',"'":'%27','(':'%28',')':'%29','~':'%7E','%20':'+'};var replacer=function(match){return replace[match];};var serialize=function(it){return encodeURIComponent(it).replace(find,replacer);};var parseSearchParams=function(result,query){if(query){var attributes=query.split('&');var index=0;var attribute,entry;while(index<attributes.length){attribute=attributes[index++];if(attribute.length){entry=attribute.split('=');result.push({key:deserialize(entry.shift()),value:deserialize(entry.join('='))});}}}};var updateSearchParams=function(query){this.entries.length=0;parseSearchParams(this.entries,query);};var validateArgumentsLength=function(passed,required){if(passed<required)throw TypeError('Not enough arguments');};var URLSearchParamsIterator=createIteratorConstructor(function Iterator(params,kind){setInternalState$3(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator(getInternalParamsState(params).entries),kind:kind});},'Iterator',function next(){var state=getInternalIteratorState(this);var kind=state.kind;var step=state.iterator.next();var entry=step.value;if(!step.done){step.value=kind==='keys'?entry.key:kind==='values'?entry.value:[entry.key,entry.value];}return step;});// `URLSearchParams` constructor
|
|
125653
125661
|
// https://url.spec.whatwg.org/#interface-urlsearchparams
|
|
125654
|
-
var URLSearchParamsConstructor=function/* init */URLSearchParams(){anInstance$2(this,URLSearchParamsConstructor,URL_SEARCH_PARAMS);var init=arguments.length>0?arguments[0]:undefined;var that=this;var entries=[];var iteratorMethod,iterator,next,step,entryIterator,entryNext,first,second,key;setInternalState$3(that,{type:URL_SEARCH_PARAMS,entries:entries,updateURL:function(){/* empty */},updateSearchParams:updateSearchParams});if(init!==undefined){if(isObject$
|
|
125662
|
+
var URLSearchParamsConstructor=function/* init */URLSearchParams(){anInstance$2(this,URLSearchParamsConstructor,URL_SEARCH_PARAMS);var init=arguments.length>0?arguments[0]:undefined;var that=this;var entries=[];var iteratorMethod,iterator,next,step,entryIterator,entryNext,first,second,key;setInternalState$3(that,{type:URL_SEARCH_PARAMS,entries:entries,updateURL:function(){/* empty */},updateSearchParams:updateSearchParams});if(init!==undefined){if(isObject$5(init)){iteratorMethod=getIteratorMethod$1(init);if(typeof iteratorMethod==='function'){iterator=iteratorMethod.call(init);next=iterator.next;while(!(step=next.call(iterator)).done){entryIterator=getIterator(anObject$5(step.value));entryNext=entryIterator.next;if((first=entryNext.call(entryIterator)).done||(second=entryNext.call(entryIterator)).done||!entryNext.call(entryIterator).done)throw TypeError('Expected sequence with length 2');entries.push({key:first.value+'',value:second.value+''});}}else for(key in init)if(hasOwn(init,key))entries.push({key:key,value:init[key]+''});}else {parseSearchParams(entries,typeof init==='string'?init.charAt(0)==='?'?init.slice(1):init:init+'');}}};var URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;redefineAll$1(URLSearchParamsPrototype,{// `URLSearchParams.prototype.appent` method
|
|
125655
125663
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
|
|
125656
125664
|
append:function append(name,value){validateArgumentsLength(arguments.length,2);var state=getInternalParamsState(this);state.entries.push({key:name+'',value:value+''});state.updateURL();},// `URLSearchParams.prototype.delete` method
|
|
125657
125665
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
|
|
@@ -125667,16 +125675,16 @@
|
|
|
125667
125675
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-sort
|
|
125668
125676
|
sort:function sort(){var state=getInternalParamsState(this);var entries=state.entries;// Array#sort is not stable in some engines
|
|
125669
125677
|
var slice=entries.slice();var entry,entriesIndex,sliceIndex;entries.length=0;for(sliceIndex=0;sliceIndex<slice.length;sliceIndex++){entry=slice[sliceIndex];for(entriesIndex=0;entriesIndex<sliceIndex;entriesIndex++){if(entries[entriesIndex].key>entry.key){entries.splice(entriesIndex,0,entry);break;}}if(entriesIndex===sliceIndex)entries.push(entry);}state.updateURL();},// `URLSearchParams.prototype.forEach` method
|
|
125670
|
-
forEach:function forEach(callback/* , thisArg */){var entries=getInternalParamsState(this).entries;var boundFunction=bind$
|
|
125678
|
+
forEach:function forEach(callback/* , thisArg */){var entries=getInternalParamsState(this).entries;var boundFunction=bind$4(callback,arguments.length>1?arguments[1]:undefined,3);var index=0;var entry;while(index<entries.length){entry=entries[index++];boundFunction(entry.value,entry.key,this);}},// `URLSearchParams.prototype.keys` method
|
|
125671
125679
|
keys:function keys(){return new URLSearchParamsIterator(this,'keys');},// `URLSearchParams.prototype.values` method
|
|
125672
125680
|
values:function values(){return new URLSearchParamsIterator(this,'values');},// `URLSearchParams.prototype.entries` method
|
|
125673
125681
|
entries:function entries(){return new URLSearchParamsIterator(this,'entries');}},{enumerable:true});// `URLSearchParams.prototype[@@iterator]` method
|
|
125674
125682
|
redefine$4(URLSearchParamsPrototype,ITERATOR$1,URLSearchParamsPrototype.entries);// `URLSearchParams.prototype.toString` method
|
|
125675
125683
|
// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
|
|
125676
|
-
redefine$4(URLSearchParamsPrototype,'toString',function toString(){var entries=getInternalParamsState(this).entries;var result=[];var index=0;var entry;while(index<entries.length){entry=entries[index++];result.push(serialize(entry.key)+'='+serialize(entry.value));}return result.join('&');},{enumerable:true});setToStringTag$2(URLSearchParamsConstructor,URL_SEARCH_PARAMS);$$
|
|
125684
|
+
redefine$4(URLSearchParamsPrototype,'toString',function toString(){var entries=getInternalParamsState(this).entries;var result=[];var index=0;var entry;while(index<entries.length){entry=entries[index++];result.push(serialize(entry.key)+'='+serialize(entry.value));}return result.join('&');},{enumerable:true});setToStringTag$2(URLSearchParamsConstructor,URL_SEARCH_PARAMS);$$b({global:true,forced:!USE_NATIVE_URL$1},{URLSearchParams:URLSearchParamsConstructor});// Wrap `fetch` for correct work with polyfilled `URLSearchParams`
|
|
125677
125685
|
// https://github.com/zloirock/core-js/issues/674
|
|
125678
|
-
if(!USE_NATIVE_URL$1&&typeof $fetch$1=='function'&&typeof Headers$1=='function'){$$
|
|
125679
|
-
var $$
|
|
125686
|
+
if(!USE_NATIVE_URL$1&&typeof $fetch$1=='function'&&typeof Headers$1=='function'){$$b({global:true,enumerable:true,forced:true},{fetch:function fetch(input/* , init */){var args=[input];var init,body,headers;if(arguments.length>1){init=arguments[1];if(isObject$5(init)){body=init.body;if(classof$4(body)===URL_SEARCH_PARAMS){headers=init.headers?new Headers$1(init.headers):new Headers$1();if(!headers.has('content-type')){headers.set('content-type','application/x-www-form-urlencoded;charset=UTF-8');}init=create(init,{body:createPropertyDescriptor(0,String(body)),headers:createPropertyDescriptor(0,headers)});}}args.push(init);}return $fetch$1.apply(this,args);}});}var web_urlSearchParams={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState};// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
125687
|
+
var $$a=_export;var DESCRIPTORS$4=descriptors;var USE_NATIVE_URL=nativeUrl;var global$a=global$m;var defineProperties=objectDefineProperties;var redefine$3=redefine$9.exports;var anInstance$1=anInstance$3;var has$2=has$c;var assign$1=objectAssign;var arrayFrom=arrayFrom$1;var codeAt=stringMultibyte$1.codeAt;var toASCII=stringPunycodeToAscii;var setToStringTag$1=setToStringTag$5;var URLSearchParamsModule=web_urlSearchParams;var InternalStateModule$1=internalState;var NativeURL=global$a.URL;var URLSearchParams$1=URLSearchParamsModule.URLSearchParams;var getInternalSearchParamsState=URLSearchParamsModule.getState;var setInternalState$2=InternalStateModule$1.set;var getInternalURLState=InternalStateModule$1.getterFor('URL');var floor$1=Math.floor;var pow=Math.pow;var INVALID_AUTHORITY='Invalid authority';var INVALID_SCHEME='Invalid scheme';var INVALID_HOST='Invalid host';var INVALID_PORT='Invalid port';var ALPHA=/[A-Za-z]/;var ALPHANUMERIC=/[\d+-.A-Za-z]/;var DIGIT=/\d/;var HEX_START=/^(0x|0X)/;var OCT=/^[0-7]+$/;var DEC=/^\d+$/;var HEX=/^[\dA-Fa-f]+$/;// eslint-disable-next-line no-control-regex
|
|
125680
125688
|
var FORBIDDEN_HOST_CODE_POINT=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/;// eslint-disable-next-line no-control-regex
|
|
125681
125689
|
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/;// eslint-disable-next-line no-control-regex
|
|
125682
125690
|
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;// eslint-disable-next-line no-control-regex
|
|
@@ -125723,10 +125731,10 @@
|
|
|
125723
125731
|
if(nativeCreateObjectURL)redefine$3(URLConstructor,'createObjectURL',function createObjectURL(blob){return nativeCreateObjectURL.apply(NativeURL,arguments);});// `URL.revokeObjectURL` method
|
|
125724
125732
|
// https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
|
|
125725
125733
|
// eslint-disable-next-line no-unused-vars
|
|
125726
|
-
if(nativeRevokeObjectURL)redefine$3(URLConstructor,'revokeObjectURL',function revokeObjectURL(url){return nativeRevokeObjectURL.apply(NativeURL,arguments);});}setToStringTag$1(URLConstructor,'URL');$$
|
|
125734
|
+
if(nativeRevokeObjectURL)redefine$3(URLConstructor,'revokeObjectURL',function revokeObjectURL(url){return nativeRevokeObjectURL.apply(NativeURL,arguments);});}setToStringTag$1(URLConstructor,'URL');$$a({global:true,forced:!USE_NATIVE_URL,sham:!DESCRIPTORS$4},{URL:URLConstructor});var $$9=_export;var getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f;var toLength$5=toLength$a;var notARegExp=notARegexp;var requireObjectCoercible$3=requireObjectCoercible$b;var correctIsRegExpLogic=correctIsRegexpLogic;var nativeStartsWith=''.startsWith;var min$2=Math.min;var CORRECT_IS_REGEXP_LOGIC=correctIsRegExpLogic('startsWith');// https://github.com/zloirock/core-js/pull/702
|
|
125727
125735
|
var MDN_POLYFILL_BUG=!CORRECT_IS_REGEXP_LOGIC&&!!function(){var descriptor=getOwnPropertyDescriptor$1(String.prototype,'startsWith');return descriptor&&!descriptor.writable;}();// `String.prototype.startsWith` method
|
|
125728
125736
|
// https://tc39.github.io/ecma262/#sec-string.prototype.startswith
|
|
125729
|
-
$$
|
|
125737
|
+
$$9({target:'String',proto:true,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{startsWith:function startsWith(searchString/* , position = 0 */){var that=String(requireObjectCoercible$3(this));notARegExp(searchString);var index=toLength$5(min$2(arguments.length>1?arguments[1]:undefined,that.length));var search=String(searchString);return nativeStartsWith?nativeStartsWith.call(that,search,index):that.slice(index,index+search.length)===search;}});var mentionRegex=/[@#](\[(.+?)]\((.+?)\))/gi;var CommentInput=/*#__PURE__*/React$d.forwardRef(function(_a,ref){var disabled=_a.disabled,onEnter=_a.onEnter,onCtrlEnter=_a.onCtrlEnter,buttons=_a.buttons,content=_a.content,onChange=_a.onChange,onFocus=_a.onFocus,autoFocus=_a.autoFocus,className=_a.className,mentionSearchHandler=_a.mentionSearchHandler,inputTheme=_a.inputTheme,placeHolderStringResourceKey=_a.placeHolderStringResourceKey,placeHolderStringResourceValues=_a.placeHolderStringResourceValues;var formatMessage=useIntl().formatMessage;var handleSearch=useMentionsSearch(mentionSearchHandler,handleSearchComplete);var inputRef=React$d.useRef(null);var hostRef=React$d.useRef(null);// exists only for e2e tests, so we know when the focus has been set
|
|
125730
125738
|
var _b=React$d.useState(false),didInitialFocus=_b[0],setDidInitialFocus=_b[1];var screenSize=useWindowSize$2();var inputPlaceholder=screenSize.width>maxScreenSize.medium?'PostMessage.inputPlaceholder':'PostMessage.inputPlaceholder.mobile';React$d.useImperativeHandle(ref,function(){return inputRef.current;},[inputRef]);React$d.useEffect(function(){if(autoFocus&&inputRef.current&&!didInitialFocus&&!disabled){// HACK: it seems as the react-mentions input does not like setting the focus
|
|
125731
125739
|
// right away. Postpone it for a couple of ms
|
|
125732
125740
|
// Unfortunately autoFocus={true} is not supported
|
|
@@ -125750,17 +125758,17 @@
|
|
|
125750
125758
|
// the mention library is not entirely correct, therefore we add our own
|
|
125751
125759
|
// top / bottom values
|
|
125752
125760
|
if(inputBox.top<500){suggestionsContainer.style.top=inputBox.height-10+"px";}else {suggestionsContainer.style.bottom=inputBox.height+"px";suggestionsContainer.style.top='unset';}}function getPlaceholder(){var placeholder=formatMessage({id:placeHolderStringResourceKey||inputPlaceholder},placeHolderStringResourceValues);if(!onCtrlEnter){return placeholder;}var browserHint=formatMessage({id:'PostMessage.inputPlaceholderHint'},{keyName:'CTRL'});return placeholder+" "+browserHint;}});function useMentionsSearch(mentionSearchHandler,handleSearchComplete){var _this=this;var searchSubject=React$d.useRef(new Subject());React$d.useEffect(function(){var subscription=searchSubject.current.pipe(debounceTime(500),switchMap(function(args){return __awaiter(_this,void 0,void 0,function(){var users;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,mentionSearchHandler(args.searchText)];case 1:users=_a.sent();args.updateSuggestions(users.map(function(u){return {id:u.id,upn:u.userPrincipalName,displayName:u.displayName,display:'@'+u.displayName};}));return [2/*return*/,users];}});});})).subscribe(function(){return handleSearchComplete();});return function(){subscription&&subscription.unsubscribe();};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125753
|
-
},[]);return function(searchText,updateSuggestions){searchSubject.current.next({searchText:searchText,updateSuggestions:updateSuggestions});};}function getBackgroundColor(theme){switch(theme){case'dark':return defaultPageBackgroundColor;default:case'light':return '#fff';}}var Host$U=_styled__default["default"].div.withConfig({displayName:"CommentInput__Host",componentId:"sc-777bqz-0"})(templateObject_1$2g||(templateObject_1$2g=__makeTemplateObject(["\n display: flex;\n position: relative;\n flex-wrap: wrap;\n flex: 1 1 auto;\n background-color: ",";\n border: 1px solid #656565;\n\n textarea {\n font-family: 'Roboto', sans-serif !important;\n font-size: 14px;\n line-height: ","px;\n }\n\n .comment-input__suggestions {\n @media (max-width: ","px) {\n max-height: 300px;\n overflow-y: auto;\n padding-right: ","px;\n }\n\n &__list {\n background-color: white;\n border: 1px solid rgba(0, 0, 0, 0.15);\n width: 100%;\n }\n &__item {\n padding: 5px 15px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.15);\n\n &:last-of-type {\n border-bottom: none;\n }\n\n &--focused {\n background-color: ",";\n }\n }\n }\n"],["\n display: flex;\n position: relative;\n flex-wrap: wrap;\n flex: 1 1 auto;\n background-color: ",";\n border: 1px solid #656565;\n\n textarea {\n font-family: 'Roboto', sans-serif !important;\n font-size: 14px;\n line-height: ","px;\n }\n\n .comment-input__suggestions {\n @media (max-width: ","px) {\n max-height: 300px;\n overflow-y: auto;\n padding-right: ","px;\n }\n\n &__list {\n background-color: white;\n border: 1px solid rgba(0, 0, 0, 0.15);\n width: 100%;\n }\n &__item {\n padding: 5px 15px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.15);\n\n &:last-of-type {\n border-bottom: none;\n }\n\n &--focused {\n background-color: ",";\n }\n }\n }\n"])),function(_a){var scheme=_a.scheme;return getBackgroundColor(scheme);},spacingM,maxScreenSize.medium,spacingXxs,defaultPageBackgroundColor);var Buttons$3=_styled__default["default"].div.withConfig({displayName:"CommentInput__Buttons",componentId:"sc-777bqz-1"})(templateObject_2$
|
|
125761
|
+
},[]);return function(searchText,updateSuggestions){searchSubject.current.next({searchText:searchText,updateSuggestions:updateSuggestions});};}function getBackgroundColor(theme){switch(theme){case'dark':return defaultPageBackgroundColor;default:case'light':return '#fff';}}var Host$U=_styled__default["default"].div.withConfig({displayName:"CommentInput__Host",componentId:"sc-777bqz-0"})(templateObject_1$2g||(templateObject_1$2g=__makeTemplateObject(["\n display: flex;\n position: relative;\n flex-wrap: wrap;\n flex: 1 1 auto;\n background-color: ",";\n border: 1px solid #656565;\n\n textarea {\n font-family: 'Roboto', sans-serif !important;\n font-size: 14px;\n line-height: ","px;\n }\n\n .comment-input__suggestions {\n @media (max-width: ","px) {\n max-height: 300px;\n overflow-y: auto;\n padding-right: ","px;\n }\n\n &__list {\n background-color: white;\n border: 1px solid rgba(0, 0, 0, 0.15);\n width: 100%;\n }\n &__item {\n padding: 5px 15px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.15);\n\n &:last-of-type {\n border-bottom: none;\n }\n\n &--focused {\n background-color: ",";\n }\n }\n }\n"],["\n display: flex;\n position: relative;\n flex-wrap: wrap;\n flex: 1 1 auto;\n background-color: ",";\n border: 1px solid #656565;\n\n textarea {\n font-family: 'Roboto', sans-serif !important;\n font-size: 14px;\n line-height: ","px;\n }\n\n .comment-input__suggestions {\n @media (max-width: ","px) {\n max-height: 300px;\n overflow-y: auto;\n padding-right: ","px;\n }\n\n &__list {\n background-color: white;\n border: 1px solid rgba(0, 0, 0, 0.15);\n width: 100%;\n }\n &__item {\n padding: 5px 15px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.15);\n\n &:last-of-type {\n border-bottom: none;\n }\n\n &--focused {\n background-color: ",";\n }\n }\n }\n"])),function(_a){var scheme=_a.scheme;return getBackgroundColor(scheme);},spacingM,maxScreenSize.medium,spacingXxs,defaultPageBackgroundColor);var Buttons$3=_styled__default["default"].div.withConfig({displayName:"CommentInput__Buttons",componentId:"sc-777bqz-1"})(templateObject_2$1t||(templateObject_2$1t=__makeTemplateObject(["\n display: flex;\n align-items: flex-end;\n padding-bottom: 2px;\n margin: 0 ","px 0 ","px;\n\n && button {\n background-color: transparent;\n\n i {\n font-size: 22px;\n }\n }\n"],["\n display: flex;\n align-items: flex-end;\n padding-bottom: 2px;\n margin: 0 ","px 0 ","px;\n\n && button {\n background-color: transparent;\n\n i {\n font-size: 22px;\n }\n }\n"])),spacingXs,spacingXxs);var InputContainer=_styled__default["default"].div.withConfig({displayName:"CommentInput__InputContainer",componentId:"sc-777bqz-2"})(templateObject_3$$||(templateObject_3$$=__makeTemplateObject(["\n flex: 1;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n .comment-input {\n &__control {\n background-color: transparent;\n font-size: 14px;\n font-weight: normal;\n border: none;\n }\n &__input {\n /*\n * on small screens the MentionsInput renders a margin-left: -3px directly on the element\n * Use !important to remove the minus margin to match our layout.\n */\n margin: 0 !important;\n padding: 5px;\n outline: 0;\n border: 0;\n }\n &__highlighter {\n padding: 5px;\n border: 0;\n font-family: 'Roboto', sans-serif !important;\n font-size: 14px;\n line-height: ","px;\n\n strong {\n ","\n }\n }\n }\n"],["\n flex: 1;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n .comment-input {\n &__control {\n background-color: transparent;\n font-size: 14px;\n font-weight: normal;\n border: none;\n }\n &__input {\n /*\n * on small screens the MentionsInput renders a margin-left: -3px directly on the element\n * Use !important to remove the minus margin to match our layout.\n */\n margin: 0 !important;\n padding: 5px;\n outline: 0;\n border: 0;\n }\n &__highlighter {\n padding: 5px;\n border: 0;\n font-family: 'Roboto', sans-serif !important;\n font-size: 14px;\n line-height: ","px;\n\n strong {\n ","\n }\n }\n }\n"])),spacingM,"background-color: "+defaultPageBackgroundColor+";");var templateObject_1$2g,templateObject_2$1t,templateObject_3$$;var DropTarget=_styled__default["default"].div.withConfig({displayName:"DropInfo__DropTarget",componentId:"sc-1ky6ew9-0"})(templateObject_1$2f||(templateObject_1$2f=__makeTemplateObject(["\n position: ",";\n top: ",";\n left: 0;\n right: 0;\n bottom: 0;\n z-index: ",";\n\n background-color: ",";\n\n display: flex;\n justify-content: center;\n"],["\n position: ",";\n top: ",";\n left: 0;\n right: 0;\n bottom: 0;\n z-index: ",";\n\n background-color: ",";\n\n display: flex;\n justify-content: center;\n"])),function(_a){var isLarge=_a.isLarge,isActive=_a.isActive;return isLarge&&isActive?'fixed':'absolute';},function(_a){var isLarge=_a.isLarge;return isLarge?headerHeight+"px":'0';},function(_a){var isActive=_a.isActive;return isActive?300:0;},function(_a){var isActive=_a.isActive;return isActive?'rgba(253, 253, 253, 0.95)':'transparent';});var DropInfo=function DropInfo(_a){var isLarge=_a.isLarge;return jsxRuntime.jsx(Host$T,__assign({isLarge:isLarge},{children:jsxRuntime.jsxs(CenteredContainer,__assign({isLarge:isLarge},{children:[jsxRuntime.jsx(StyledIcon$8,{isLarge:isLarge,iconName:"bulkUpload",className:"ms-fontColor-accent"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.dragToUploadTitle",tagName:"h2"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.dragToUploadDescription",tagName:"p"},void 0)]}),void 0)}),void 0);};var Host$T=_styled__default["default"].div.withConfig({displayName:"DropInfo__Host",componentId:"sc-1ky6ew9-1"})(templateObject_2$1s||(templateObject_2$1s=__makeTemplateObject(["\n ",";\n ",";\n"],["\n ",";\n ",";\n"])),function(_a){var isLarge=_a.isLarge;return !isLarge&&'display: flex';},function(_a){var isLarge=_a.isLarge;return !isLarge&&'align-items: center';});var CenteredContainer=_styled__default["default"].div.withConfig({displayName:"DropInfo__CenteredContainer",componentId:"sc-1ky6ew9-2"})(templateObject_3$_||(templateObject_3$_=__makeTemplateObject(["\n position: relative;\n top: ",";\n\n display: flex;\n flex-direction: column;\n align-items: center;\n\n h2 {\n margin-bottom: 0;\n }\n p {\n margin-top: 3px;\n }\n"],["\n position: relative;\n top: ",";\n\n display: flex;\n flex-direction: column;\n align-items: center;\n\n h2 {\n margin-bottom: 0;\n }\n p {\n margin-top: 3px;\n }\n"])),function(_a){var isLarge=_a.isLarge;return isLarge?'20%':0;});var StyledIcon$8=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"DropInfo__StyledIcon",componentId:"sc-1ky6ew9-3"})(templateObject_4$J||(templateObject_4$J=__makeTemplateObject(["\n font-size: ",";\n"],["\n font-size: ",";\n"])),function(p){return p.isLarge?'100px':'50px';});var templateObject_1$2f,templateObject_2$1s,templateObject_3$_,templateObject_4$J;var KeywordsPicker=function KeywordsPicker(props){var _a;var _b=React$d.useContext(LazySubscriptionContext),allKeywords=_b.allKeywords,selectedKeywordGroups=_b.selectedKeywordGroups;var availableKeywords=(_a=props.availableKeywords)!==null&&_a!==void 0?_a:allKeywords;if(!allKeywords||!selectedKeywordGroups||!availableKeywords){return null;}return jsxRuntime.jsx(KeywordsPickerInternal,__assign({},props,{availableKeywords:availableKeywords,selectedKeywordGroups:selectedKeywordGroups}),void 0);};var KeywordsPickerInternal=function KeywordsPickerInternal(_a){var selectedKeywordGroups=_a.selectedKeywordGroups,defaultKeywords=_a.defaultKeywords,availableKeywords=_a.availableKeywords,mandatoryKeywords=_a.mandatoryKeywords,onChangeKeywords=_a.onChangeKeywords;var pickerInputId=createId();var user=useCurrentUser();var mandatoryKeywordIds=(mandatoryKeywords===null||mandatoryKeywords===void 0?void 0:mandatoryKeywords.map(function(k){return k.id;}))||[];var _b=React$d.useState(),selectedItems=_b[0],setSelectedItems=_b[1];React$d.useEffect(function(){init();// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125754
125762
|
},[]);var allSuggestions=getAllSuggestions();var noKeywords=availableKeywords.length===0;return jsxRuntime.jsxs(Host$S,__assign({"data-keywords-picker":true},{children:[noKeywords&&jsxRuntime.jsx(FormattedMessage$1,{id:"KeywordPicker.noGroupsDefined"},void 0),!noKeywords&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(LabelHost,{children:[jsxRuntime.jsx("label",__assign({htmlFor:pickerInputId},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Keywords.picker.selectKeywords"},void 0)}),void 0),(mandatoryKeywords===null||mandatoryKeywords===void 0?void 0:mandatoryKeywords.length)>0&&jsxRuntime.jsx(MandatoryKeywordsInfoIcon,{},void 0)]},void 0),jsxRuntime.jsx(StyledTagPicker,{onResolveSuggestions:handleResolveKeywords,inputProps:{id:pickerInputId},selectedItems:selectedItems,onEmptyResolveSuggestions:getAllSuggestions,onChange:handleOnChange,pickerCalloutProps:{preventDismissOnResize:true},onRenderItem:function(item){return jsxRuntime.jsx(Tag,{item:item.item,onRemoveItem:removeItem},item.key);}},void 0)]},void 0)]}),void 0);function handleResolveKeywords(searchText,selectedItems){searchText=searchText===null||searchText===void 0?void 0:searchText.toLowerCase();return allSuggestions===null||allSuggestions===void 0?void 0:allSuggestions.filter(function(k){return (searchText.length===0||k.name.toLowerCase().indexOf(searchText)>-1)&&selectedItems.every(function(i){return i.name.toLowerCase().indexOf(searchText)===-1;});});}function init(){var flatDefaultKeywords=getFlatKeywordList(defaultKeywords)||[];var filteredKeywords=ensureMandatoryKeywords(mandatoryKeywords,flatDefaultKeywords);var availableKeywordIds=availableKeywords.map(function(k){return k.id;});filteredKeywords=filteredKeywords.filter(function(k){return availableKeywordIds.includes(k.id);});// it is possible an older post does not have any/all mandatory or available keywords of its group
|
|
125755
125763
|
// here we detect this (if the post is getting edited) and update the keywords accordingly
|
|
125756
125764
|
if(filteredKeywords.length!==flatDefaultKeywords.length){onChangeKeywords(filteredKeywords);}setSelectedItems(filteredKeywords.map(function(k){return {name:getKeywordDisplayValue(selectedKeywordGroups,user,k.groupId,k.name),key:k.id,isMandatory:mandatoryKeywordIds.includes(k.id)};}));}function getAllSuggestions(selectedItems){return availableKeywords===null||availableKeywords===void 0?void 0:availableKeywords.filter(function(k){return (selectedItems||[]).every(function(i){return i.key!==k.id;});}).map(function(k){return {key:k.id,name:getKeywordDisplayValue(selectedKeywordGroups,user,k.groupId,k.name)};});}function handleOnChange(items){var itemKeys=items.map(function(i){return i.key;});// this prevents the user from removing a mandatory keyword by using the backspace button
|
|
125757
|
-
if(!mandatoryKeywordIds.every(function(id){return itemKeys.includes(id);})){return;}updateKeywords(items);}function removeItem(item){var filteredSelectedItems=selectedItems.filter(function(i){return i.key!==item.key;});updateKeywords(filteredSelectedItems);}function updateKeywords(items){setSelectedItems(items);var selectedItemIds=items.map(function(i){return i.key;});onChangeKeywords(availableKeywords.filter(function(k){return selectedItemIds.includes(k.id);}));}};var MandatoryKeywordsInfoIcon=function MandatoryKeywordsInfoIcon(){var formatMessage=useIntl().formatMessage;var _a=React$d.useState(false),showCallout=_a[0],setShowCallout=_a[1];var infoButtonRef=React$d.useRef();return jsxRuntime.jsxs("div",__assign({ref:infoButtonRef},{children:[jsxRuntime.jsx(StyledIconButton$7,{iconProps:{iconName:'Info'},onClick:function(){return setShowCallout(!showCallout);},ariaLabel:formatMessage({id:'Keywords.picker.tooltipAriaLabel'})},void 0),showCallout&&jsxRuntime.jsx(StyledCallout$1,__assign({onDismiss:function(){return setShowCallout(false);},target:infoButtonRef.current},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Keywords.picker.tooltip"},void 0)}),void 0)]}),void 0);};var Tag=function Tag(_a){var item=_a.item,onRemoveItem=_a.onRemoveItem;var formatMessage=useIntl().formatMessage;var canBeRemoved=!item.isMandatory;return jsxRuntime.jsxs(TagWrapper,__assign({"data-keyword-tag":item.name},{children:[jsxRuntime.jsx(KeywordName,{children:item.name},void 0),canBeRemoved&&jsxRuntime.jsx(RemoveTagButton,{iconProps:{iconName:'Cancel'},onClick:function(){return onRemoveItem(item);},ariaLabel:formatMessage({id:'AriaLabel.removeKeywordButton'}),"data-remove-keyword-button":true},void 0)]}),void 0);};var Host$S=_styled__default["default"].div.withConfig({displayName:"KeywordsPicker__Host",componentId:"sc-5ec8mr-0"})(templateObject_1$2e||(templateObject_1$2e=__makeTemplateObject(["\n margin-top: ","px;\n padding: ","px;\n background-color: ",";\n"],["\n margin-top: ","px;\n padding: ","px;\n background-color: ",";\n"])),spacingS,spacingS,function(p){return p.theme.palette.white;});var LabelHost=_styled__default["default"].div.withConfig({displayName:"KeywordsPicker__LabelHost",componentId:"sc-5ec8mr-1"})(templateObject_2$
|
|
125765
|
+
if(!mandatoryKeywordIds.every(function(id){return itemKeys.includes(id);})){return;}updateKeywords(items);}function removeItem(item){var filteredSelectedItems=selectedItems.filter(function(i){return i.key!==item.key;});updateKeywords(filteredSelectedItems);}function updateKeywords(items){setSelectedItems(items);var selectedItemIds=items.map(function(i){return i.key;});onChangeKeywords(availableKeywords.filter(function(k){return selectedItemIds.includes(k.id);}));}};var MandatoryKeywordsInfoIcon=function MandatoryKeywordsInfoIcon(){var formatMessage=useIntl().formatMessage;var _a=React$d.useState(false),showCallout=_a[0],setShowCallout=_a[1];var infoButtonRef=React$d.useRef();return jsxRuntime.jsxs("div",__assign({ref:infoButtonRef},{children:[jsxRuntime.jsx(StyledIconButton$7,{iconProps:{iconName:'Info'},onClick:function(){return setShowCallout(!showCallout);},ariaLabel:formatMessage({id:'Keywords.picker.tooltipAriaLabel'})},void 0),showCallout&&jsxRuntime.jsx(StyledCallout$1,__assign({onDismiss:function(){return setShowCallout(false);},target:infoButtonRef.current},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Keywords.picker.tooltip"},void 0)}),void 0)]}),void 0);};var Tag=function Tag(_a){var item=_a.item,onRemoveItem=_a.onRemoveItem;var formatMessage=useIntl().formatMessage;var canBeRemoved=!item.isMandatory;return jsxRuntime.jsxs(TagWrapper,__assign({"data-keyword-tag":item.name},{children:[jsxRuntime.jsx(KeywordName,{children:item.name},void 0),canBeRemoved&&jsxRuntime.jsx(RemoveTagButton,{iconProps:{iconName:'Cancel'},onClick:function(){return onRemoveItem(item);},ariaLabel:formatMessage({id:'AriaLabel.removeKeywordButton'}),"data-remove-keyword-button":true},void 0)]}),void 0);};var Host$S=_styled__default["default"].div.withConfig({displayName:"KeywordsPicker__Host",componentId:"sc-5ec8mr-0"})(templateObject_1$2e||(templateObject_1$2e=__makeTemplateObject(["\n margin-top: ","px;\n padding: ","px;\n background-color: ",";\n"],["\n margin-top: ","px;\n padding: ","px;\n background-color: ",";\n"])),spacingS,spacingS,function(p){return p.theme.palette.white;});var LabelHost=_styled__default["default"].div.withConfig({displayName:"KeywordsPicker__LabelHost",componentId:"sc-5ec8mr-1"})(templateObject_2$1r||(templateObject_2$1r=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var StyledIconButton$7=_styled__default["default"](IconButton).withConfig({displayName:"KeywordsPicker__StyledIconButton",componentId:"sc-5ec8mr-2"})(templateObject_3$Z||(templateObject_3$Z=__makeTemplateObject(["\n height: 100%;\n"],["\n height: 100%;\n"])));var StyledCallout$1=_styled__default["default"](Callout).withConfig({displayName:"KeywordsPicker__StyledCallout",componentId:"sc-5ec8mr-3"})(templateObject_4$I||(templateObject_4$I=__makeTemplateObject(["\n padding: ","px;\n"],["\n padding: ","px;\n"])),spacingS);var TagWrapper=_styled__default["default"].div.withConfig({displayName:"KeywordsPicker__TagWrapper",componentId:"sc-5ec8mr-4"})(templateObject_5$C||(templateObject_5$C=__makeTemplateObject(["\n background-color: ",";\n line-height: 26px;\n margin-right: ","px;\n display: flex;\n font-size: ","px;\n"],["\n background-color: ",";\n line-height: 26px;\n margin-right: ","px;\n display: flex;\n font-size: ","px;\n"])),function(p){return p.theme.palette.neutralLight;},spacingXxs+1,fontSizeSmall);var KeywordName=_styled__default["default"].span.withConfig({displayName:"KeywordsPicker__KeywordName",componentId:"sc-5ec8mr-5"})(templateObject_6$q||(templateObject_6$q=__makeTemplateObject(["\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n min-width: ","px;\n margin: 0 ","px;\n"],["\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n min-width: ","px;\n margin: 0 ","px;\n"])),spacingL,spacingXs+2);var RemoveTagButton=_styled__default["default"](IconButton).withConfig({displayName:"KeywordsPicker__RemoveTagButton",componentId:"sc-5ec8mr-6"})(templateObject_7$l||(templateObject_7$l=__makeTemplateObject(["\n padding: 0 ","px;\n border-radius: 0 ","px ","px 0;\n width: ","px;\n height: auto;\n i {\n font-size: ","px;\n }\n"],["\n padding: 0 ","px;\n border-radius: 0 ","px ","px 0;\n width: ","px;\n height: auto;\n i {\n font-size: ","px;\n }\n"])),spacingXxs+1,spacingXxs-1,spacingXxs-1,spacingL,fontSizeSmaller);var StyledTagPicker=_styled__default["default"](officeUiFabricReact.TagPicker).withConfig({displayName:"KeywordsPicker__StyledTagPicker",componentId:"sc-5ec8mr-7"})(templateObject_8$j||(templateObject_8$j=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var templateObject_1$2e,templateObject_2$1r,templateObject_3$Z,templateObject_4$I,templateObject_5$C,templateObject_6$q,templateObject_7$l,templateObject_8$j;var hasValidGenericUrlVideoSourcePrefix=function hasValidGenericUrlVideoSourcePrefix(url){return url&&getAdditionalVideoSources().filter(function(s){return url.startsWith(s.prefix);}).length>0;};var VideoUrlParser=/** @class */function(){function VideoUrlParser(url){this.url=url;this.source=null;this.id=null;this.isDirectVideoUrl=false;this.videoProperties=null;this.thumbnailUrl=null;if(hasValidGenericUrlVideoSourcePrefix(this.url)){this.source=VideoSource.GenericUrl;this.id=url;}else if(VideoUrlParser.microsoftStreamRegex.test(this.url)){this.source=VideoSource.MicrosoftStream;this.id=VideoUrlParser.microsoftStreamRegex.exec(this.url)[1];}else if(VideoUrlParser.ytRegex.test(this.url)){this.source=VideoSource.YouTube;this.id=VideoUrlParser.ytRegex.exec(this.url)[1];}else if(VideoUrlParser.vimeoRegex.test(this.url)){this.source=VideoSource.Vimeo;this.id=VideoUrlParser.vimeoRegex.exec(this.url)[1];}else if(VideoUrlParser.vimeoDirectLinkRegex.test(this.url)){this.source=VideoSource.Vimeo;this.id=VideoUrlParser.vimeoDirectLinkRegex.exec(this.url)[1];this.isDirectVideoUrl=true;}else if(VideoUrlParser.kalturaRegex.test(this.url)){var regexMatches=VideoUrlParser.kalturaRegex.exec(this.url);this.source=VideoSource.Kaltura;this.id=regexMatches[1];this.videoProperties={sp:regexMatches[2],uiconfId:regexMatches[3],partnerId:regexMatches[4],entryId:regexMatches[5]};this.thumbnailUrl="https://cdnsecakmi.kaltura.com/p/"+this.id+"/thumbnail/entry_id/"+this.videoProperties.entryId+"/width/1000";}}//TODO handle the different error messages for cloud and onprem versions, i.e. what sources are permitted (see task 23570)
|
|
125758
125766
|
VideoUrlParser.prototype.isValid=function(){return this.source!=null&&this.id!=null;};VideoUrlParser.ytRegex=/^.*(?:(?:youtu.be\/)|(?:v\/)|(?:\/u\/\w\/)|(?:embed\/)|(?:watch\?))\??v?=?([^#&?]*).*$/;VideoUrlParser.vimeoRegex=/.*?(?:vimeo.com\/){1}(?:video\/)?(\d+)/;// match first GUID after domain
|
|
125759
125767
|
VideoUrlParser.microsoftStreamRegex=/.*web\.microsoftstream\.com.+?([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/i;VideoUrlParser.vimeoDirectLinkRegex=/.*?(?:player\.vimeo\.com\/external\/){1}(\d+)/;VideoUrlParser.kalturaRegex=/.+cdnapisec\.kaltura\.com\/p\/([0-9]+)\/sp\/([0-9]+)\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(?:.*entry_id=(.+?(?=&|$)))/;return VideoUrlParser;}();// we should probably provide a better fix for this => #38316
|
|
125760
|
-
function getAdditionalVideoSources(){return [];}var isObject$
|
|
125768
|
+
function getAdditionalVideoSources(){return [];}var isObject$4=isObject$c;var setPrototypeOf=objectSetPrototypeOf;// makes subclassing work correct for wrapped built-ins
|
|
125761
125769
|
var inheritIfRequired$1=function($this,dummy,Wrapper){var NewTarget,NewTargetPrototype;if(// it can work only with native `setPrototypeOf`
|
|
125762
125770
|
setPrototypeOf&&// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
|
125763
|
-
typeof(NewTarget=dummy.constructor)=='function'&&NewTarget!==Wrapper&&isObject$
|
|
125771
|
+
typeof(NewTarget=dummy.constructor)=='function'&&NewTarget!==Wrapper&&isObject$4(NewTargetPrototype=NewTarget.prototype)&&NewTargetPrototype!==Wrapper.prototype)setPrototypeOf($this,NewTargetPrototype);return $this;};var getBuiltIn$2=getBuiltIn$6;var definePropertyModule=objectDefineProperty;var wellKnownSymbol$5=wellKnownSymbol$l;var DESCRIPTORS$3=descriptors;var SPECIES$2=wellKnownSymbol$5('species');var setSpecies$2=function(CONSTRUCTOR_NAME){var Constructor=getBuiltIn$2(CONSTRUCTOR_NAME);var defineProperty=definePropertyModule.f;if(DESCRIPTORS$3&&Constructor&&!Constructor[SPECIES$2]){defineProperty(Constructor,SPECIES$2,{configurable:true,get:function(){return this;}});}};var DESCRIPTORS$2=descriptors;var global$9=global$m;var isForced$1=isForced_1;var inheritIfRequired=inheritIfRequired$1;var defineProperty$2=objectDefineProperty.f;var getOwnPropertyNames=objectGetOwnPropertyNames.f;var isRegExp$1=isRegexp;var getFlags=regexpFlags$1$1;var stickyHelpers$2=regexpStickyHelpers$1;var redefine$2=redefine$9.exports;var fails$5=fails$i;var setInternalState$1=internalState.set;var setSpecies$1=setSpecies$2;var wellKnownSymbol$4=wellKnownSymbol$l;var MATCH=wellKnownSymbol$4('match');var NativeRegExp=global$9.RegExp;var RegExpPrototype$2=NativeRegExp.prototype;var re1=/a/g;var re2=/a/g;// "new" should create a new object, old webkit bug
|
|
125764
125772
|
var CORRECT_NEW=new NativeRegExp(re1)!==re1;var UNSUPPORTED_Y$2=stickyHelpers$2.UNSUPPORTED_Y;var FORCED$3=DESCRIPTORS$2&&isForced$1('RegExp',!CORRECT_NEW||UNSUPPORTED_Y$2||fails$5(function(){re2[MATCH]=false;// RegExp constructor can alter flags and IsRegExp works correct with @@match
|
|
125765
125773
|
return NativeRegExp(re1)!=re1||NativeRegExp(re2)==re2||NativeRegExp(re1,'i')!='/a/i';}));// `RegExp` constructor
|
|
125766
125774
|
// https://tc39.github.io/ecma262/#sec-regexp-constructor
|
|
@@ -125769,9 +125777,9 @@
|
|
|
125769
125777
|
var INCORRECT_NAME$1=nativeToString$1.name!=TO_STRING$1;// `RegExp.prototype.toString` method
|
|
125770
125778
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
|
|
125771
125779
|
if(NOT_GENERIC$1||INCORRECT_NAME$1){redefine$1$1(RegExp.prototype,TO_STRING$1,function toString(){var R=anObject$4(this);var p=String(R.source);var rf=R.flags;var f=String(rf===undefined&&R instanceof RegExp&&!('flags'in RegExpPrototype$1)?flags$1.call(R):rf);return '/'+p+'/'+f;},{unsafe:true});}// Sources: https://webapps.stackexchange.com/questions/54443/format-for-id-of-youtube-video
|
|
125772
|
-
var videoRegex=/((https?:\/\/)?((www\.)?)?)(((youtube\.com|youtu\.?be)\/[^\s]{11,}.*?)|((vimeo\.com)\/(?:video\/)?[\d]{3,})|((player\.vimeo\.com\/external)\/(\S+)))/g;function getAllVideosFromString(content){var matches,url,type;return __generator(this,function(_a){switch(_a.label){case 0:videoRegex.lastIndex=0;_a.label=1;case 1:matches=videoRegex.exec(content);url=matches===null||matches===void 0?void 0:matches[0];if(!url){return [3/*break*/,3];}type=matches.filter(function(m){return !!m;}).some(function(m){return m.indexOf('vimeo')>-1;})?AttachmentType.VimeoVideo:AttachmentType.YouTubeVideo;return [4/*yield*/,{url:url,type:type}];case 2:_a.sent();return [3/*break*/,1];case 3:return [2/*return*/];}});}function getEmbeddedObjectsFromString(content){var embeddedObjectRegex,matches,url,subscriptionIdentifier,type,id;return __generator(this,function(_a){switch(_a.label){case 0:embeddedObjectRegex=new RegExp("/([^/]{3,})(/(redirect/)?(news|events|pages|posts)/([^\\s/?]+).*?)",'g');_a.label=1;case 1:matches=embeddedObjectRegex.exec(content);url=matches===null||matches===void 0?void 0:matches[2];if(!url){return [3/*break*/,3];}subscriptionIdentifier=matches[1];type=AttachmentType.News;switch(matches[4]){case'news':type=AttachmentType.News;break;case'events':type=AttachmentType.Event;break;case'pages':type=AttachmentType.Page;break;case'posts':type=AttachmentType.Post;break;default:type=AttachmentType.News;}id=matches[5];return [4/*yield*/,{url:url,subscriptionIdentifier:subscriptionIdentifier,type:type,id:id}];case 2:_a.sent();return [3/*break*/,1];case 3:return [2/*return*/];}});}var global$8=global$m;var nativePromiseConstructor=global$8.Promise;var iterate$2={exports:{}};var anObject$3=anObject$h;var isArrayIteratorMethod=isArrayIteratorMethod$2;var toLength$
|
|
125773
|
-
if(isArrayIteratorMethod(iterFn)){for(index=0,length=toLength$
|
|
125774
|
-
Array.from(iteratorWithReturn,function(){throw 2;});}catch(error){/* empty */}var checkCorrectnessOfIteration$1=function(exec,SKIP_CLOSING){if(!SKIP_CLOSING&&!SAFE_CLOSING)return false;var ITERATION_SUPPORT=false;try{var object={};object[ITERATOR]=function(){return {next:function(){return {done:ITERATION_SUPPORT=true};}};};exec(object);}catch(error){/* empty */}return ITERATION_SUPPORT;};var getBuiltIn$1=getBuiltIn$6;var engineUserAgent=getBuiltIn$1('navigator','userAgent')||'';var userAgent$1=engineUserAgent;var engineIsIos=/(iphone|ipod|ipad).*applewebkit/i.test(userAgent$1);var global$7=global$m;var fails$3$1=fails$i;var classof$3=classofRaw$1;var bind$
|
|
125780
|
+
var videoRegex=/((https?:\/\/)?((www\.)?)?)(((youtube\.com|youtu\.?be)\/[^\s]{11,}.*?)|((vimeo\.com)\/(?:video\/)?[\d]{3,})|((player\.vimeo\.com\/external)\/(\S+)))/g;function getAllVideosFromString(content){var matches,url,type;return __generator(this,function(_a){switch(_a.label){case 0:videoRegex.lastIndex=0;_a.label=1;case 1:matches=videoRegex.exec(content);url=matches===null||matches===void 0?void 0:matches[0];if(!url){return [3/*break*/,3];}type=matches.filter(function(m){return !!m;}).some(function(m){return m.indexOf('vimeo')>-1;})?AttachmentType.VimeoVideo:AttachmentType.YouTubeVideo;return [4/*yield*/,{url:url,type:type}];case 2:_a.sent();return [3/*break*/,1];case 3:return [2/*return*/];}});}function getEmbeddedObjectsFromString(content){var embeddedObjectRegex,matches,url,subscriptionIdentifier,type,id;return __generator(this,function(_a){switch(_a.label){case 0:embeddedObjectRegex=new RegExp("/([^/]{3,})(/(redirect/)?(news|events|pages|posts)/([^\\s/?]+).*?)",'g');_a.label=1;case 1:matches=embeddedObjectRegex.exec(content);url=matches===null||matches===void 0?void 0:matches[2];if(!url){return [3/*break*/,3];}subscriptionIdentifier=matches[1];type=AttachmentType.News;switch(matches[4]){case'news':type=AttachmentType.News;break;case'events':type=AttachmentType.Event;break;case'pages':type=AttachmentType.Page;break;case'posts':type=AttachmentType.Post;break;default:type=AttachmentType.News;}id=matches[5];return [4/*yield*/,{url:url,subscriptionIdentifier:subscriptionIdentifier,type:type,id:id}];case 2:_a.sent();return [3/*break*/,1];case 3:return [2/*return*/];}});}var global$8=global$m;var nativePromiseConstructor=global$8.Promise;var iterate$2={exports:{}};var anObject$3=anObject$h;var isArrayIteratorMethod=isArrayIteratorMethod$2;var toLength$4=toLength$a;var bind$3=functionBindContext;var getIteratorMethod=getIteratorMethod$4;var callWithSafeIterationClosing=callWithSafeIterationClosing$2;var Result=function(stopped,result){this.stopped=stopped;this.result=result;};var iterate$1=iterate$2.exports=function(iterable,fn,that,AS_ENTRIES,IS_ITERATOR){var boundFunction=bind$3(fn,that,AS_ENTRIES?2:1);var iterator,iterFn,index,length,result,next,step;if(IS_ITERATOR){iterator=iterable;}else {iterFn=getIteratorMethod(iterable);if(typeof iterFn!='function')throw TypeError('Target is not iterable');// optimisation for array iterators
|
|
125781
|
+
if(isArrayIteratorMethod(iterFn)){for(index=0,length=toLength$4(iterable.length);length>index;index++){result=AS_ENTRIES?boundFunction(anObject$3(step=iterable[index])[0],step[1]):boundFunction(iterable[index]);if(result&&result instanceof Result)return result;}return new Result(false);}iterator=iterFn.call(iterable);}next=iterator.next;while(!(step=next.call(iterator)).done){result=callWithSafeIterationClosing(iterator,boundFunction,step.value,AS_ENTRIES);if(typeof result=='object'&&result&&result instanceof Result)return result;}return new Result(false);};iterate$1.stop=function(result){return new Result(true,result);};var wellKnownSymbol$3=wellKnownSymbol$l;var ITERATOR=wellKnownSymbol$3('iterator');var SAFE_CLOSING=false;try{var called=0;var iteratorWithReturn={next:function(){return {done:!!called++};},'return':function(){SAFE_CLOSING=true;}};iteratorWithReturn[ITERATOR]=function(){return this;};// eslint-disable-next-line no-throw-literal
|
|
125782
|
+
Array.from(iteratorWithReturn,function(){throw 2;});}catch(error){/* empty */}var checkCorrectnessOfIteration$1=function(exec,SKIP_CLOSING){if(!SKIP_CLOSING&&!SAFE_CLOSING)return false;var ITERATION_SUPPORT=false;try{var object={};object[ITERATOR]=function(){return {next:function(){return {done:ITERATION_SUPPORT=true};}};};exec(object);}catch(error){/* empty */}return ITERATION_SUPPORT;};var getBuiltIn$1=getBuiltIn$6;var engineUserAgent=getBuiltIn$1('navigator','userAgent')||'';var userAgent$1=engineUserAgent;var engineIsIos=/(iphone|ipod|ipad).*applewebkit/i.test(userAgent$1);var global$7=global$m;var fails$3$1=fails$i;var classof$3=classofRaw$1;var bind$2=functionBindContext;var html=html$2;var createElement=documentCreateElement$1;var IS_IOS$1=engineIsIos;var location$1=global$7.location;var set$2=global$7.setImmediate;var clear=global$7.clearImmediate;var process$3=global$7.process;var MessageChannel$1=global$7.MessageChannel;var Dispatch=global$7.Dispatch;var counter=0;var queue={};var ONREADYSTATECHANGE='onreadystatechange';var defer,channel,port;var run=function(id){// eslint-disable-next-line no-prototype-builtins
|
|
125775
125783
|
if(queue.hasOwnProperty(id)){var fn=queue[id];delete queue[id];fn();}};var runner=function(id){return function(){run(id);};};var listener=function(event){run(event.data);};var post=function(id){// old engines have not location.origin
|
|
125776
125784
|
global$7.postMessage(id+'',location$1.protocol+'//'+location$1.host);};// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
125777
125785
|
if(!set$2||!clear){set$2=function setImmediate(fn){var args=[];var i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){// eslint-disable-next-line no-new-func
|
|
@@ -125779,7 +125787,7 @@
|
|
|
125779
125787
|
if(classof$3(process$3)=='process'){defer=function(id){process$3.nextTick(runner(id));};// Sphere (JS game engine) Dispatch API
|
|
125780
125788
|
}else if(Dispatch&&Dispatch.now){defer=function(id){Dispatch.now(runner(id));};// Browsers with MessageChannel, includes WebWorkers
|
|
125781
125789
|
// except iOS - https://github.com/zloirock/core-js/issues/624
|
|
125782
|
-
}else if(MessageChannel$1&&!IS_IOS$1){channel=new MessageChannel$1();port=channel.port2;channel.port1.onmessage=listener;defer=bind$
|
|
125790
|
+
}else if(MessageChannel$1&&!IS_IOS$1){channel=new MessageChannel$1();port=channel.port2;channel.port1.onmessage=listener;defer=bind$2(port.postMessage,port,1);// Browsers with postMessage, skip WebWorkers
|
|
125783
125791
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
125784
125792
|
}else if(global$7.addEventListener&&typeof postMessage=='function'&&!global$7.importScripts&&!fails$3$1(post)&&location$1.protocol!=='file:'){defer=post;global$7.addEventListener('message',listener,false);// IE8-
|
|
125785
125793
|
}else if(ONREADYSTATECHANGE in createElement('script')){defer=function(id){html.appendChild(createElement('script'))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run(id);};};// Rest old browsers
|
|
@@ -125796,8 +125804,8 @@
|
|
|
125796
125804
|
// - onreadystatechange
|
|
125797
125805
|
// - setTimeout
|
|
125798
125806
|
}else {notify$1=function(){// strange IE + webpack dev server bug - use .call(global)
|
|
125799
|
-
macrotask.call(global$6,flush);};}}var microtask$1=queueMicrotask||function(fn){var task={fn:fn,next:undefined};if(last)last.next=task;if(!head){head=task;notify$1();}last=task;};var newPromiseCapability$2={};var aFunction$
|
|
125800
|
-
newPromiseCapability$2.f=function(C){return new PromiseCapability(C);};var anObject$2$1=anObject$h;var isObject$
|
|
125807
|
+
macrotask.call(global$6,flush);};}}var microtask$1=queueMicrotask||function(fn){var task={fn:fn,next:undefined};if(last)last.next=task;if(!head){head=task;notify$1();}last=task;};var newPromiseCapability$2={};var aFunction$4=aFunction$7;var PromiseCapability=function(C){var resolve,reject;this.promise=new C(function($$resolve,$$reject){if(resolve!==undefined||reject!==undefined)throw TypeError('Bad Promise constructor');resolve=$$resolve;reject=$$reject;});this.resolve=aFunction$4(resolve);this.reject=aFunction$4(reject);};// 25.4.1.5 NewPromiseCapability(C)
|
|
125808
|
+
newPromiseCapability$2.f=function(C){return new PromiseCapability(C);};var anObject$2$1=anObject$h;var isObject$3=isObject$c;var newPromiseCapability$1=newPromiseCapability$2;var promiseResolve$1=function(C,x){anObject$2$1(C);if(isObject$3(x)&&x.constructor===C)return x;var promiseCapability=newPromiseCapability$1.f(C);var resolve=promiseCapability.resolve;resolve(x);return promiseCapability.promise;};var global$5=global$m;var hostReportErrors$1=function(a,b){var console=global$5.console;if(console&&console.error){arguments.length===1?console.error(a):console.error(a,b);}};var perform$1=function(exec){try{return {error:false,value:exec()};}catch(error){return {error:true,value:error};}};var global$4=global$m;var userAgent=engineUserAgent;var process$1=global$4.process;var versions=process$1&&process$1.versions;var v8=versions&&versions.v8;var match,version;if(v8){match=v8.split('.');version=match[0]+match[1];}else if(userAgent){match=userAgent.match(/Edge\/(\d+)/);if(!match||match[1]>=74){match=userAgent.match(/Chrome\/(\d+)/);if(match)version=match[1];}}var engineV8Version=version&&+version;var $$8=_export;var global$3=global$m;var getBuiltIn=getBuiltIn$6;var NativePromise=nativePromiseConstructor;var redefine$a=redefine$9.exports;var redefineAll=redefineAll$2;var setToStringTag=setToStringTag$5;var setSpecies=setSpecies$2;var isObject$2=isObject$c;var aFunction$3=aFunction$7;var anInstance=anInstance$3;var classof$1=classofRaw$1;var inspectSource=inspectSource$3;var iterate=iterate$2.exports;var checkCorrectnessOfIteration=checkCorrectnessOfIteration$1;var speciesConstructor=speciesConstructor$2;var task=task$1.set;var microtask=microtask$1;var promiseResolve=promiseResolve$1;var hostReportErrors=hostReportErrors$1;var newPromiseCapabilityModule=newPromiseCapability$2;var perform=perform$1;var InternalStateModule=internalState;var isForced=isForced_1;var wellKnownSymbol$2=wellKnownSymbol$l;var V8_VERSION=engineV8Version;var SPECIES$1=wellKnownSymbol$2('species');var PROMISE='Promise';var getInternalState=InternalStateModule.get;var setInternalState=InternalStateModule.set;var getInternalPromiseState=InternalStateModule.getterFor(PROMISE);var PromiseConstructor=NativePromise;var TypeError$1=global$3.TypeError;var document$1=global$3.document;var process$4=global$3.process;var $fetch=getBuiltIn('fetch');var newPromiseCapability=newPromiseCapabilityModule.f;var newGenericPromiseCapability=newPromiseCapability;var IS_NODE=classof$1(process$4)=='process';var DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$3.dispatchEvent);var UNHANDLED_REJECTION='unhandledrejection';var REJECTION_HANDLED='rejectionhandled';var PENDING=0;var FULFILLED=1;var REJECTED=2;var HANDLED=1;var UNHANDLED=2;var Internal,OwnPromiseCapability,PromiseWrapper,nativeThen;var FORCED$2=isForced(PROMISE,function(){var GLOBAL_CORE_JS_PROMISE=inspectSource(PromiseConstructor)!==String(PromiseConstructor);if(!GLOBAL_CORE_JS_PROMISE){// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
125801
125809
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
125802
125810
|
// We can't detect it synchronously, so just check versions
|
|
125803
125811
|
if(V8_VERSION===66)return true;// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
@@ -125805,31 +125813,31 @@
|
|
|
125805
125813
|
// deoptimization and performance degradation
|
|
125806
125814
|
// https://github.com/zloirock/core-js/issues/679
|
|
125807
125815
|
if(V8_VERSION>=51&&/native code/.test(PromiseConstructor))return false;// Detect correctness of subclassing with @@species support
|
|
125808
|
-
var promise=PromiseConstructor.resolve(1);var FakePromise=function(exec){exec(function(){/* empty */},function(){/* empty */});};var constructor=promise.constructor={};constructor[SPECIES$
|
|
125809
|
-
var isThenable=function(it){var then;return isObject$
|
|
125816
|
+
var promise=PromiseConstructor.resolve(1);var FakePromise=function(exec){exec(function(){/* empty */},function(){/* empty */});};var constructor=promise.constructor={};constructor[SPECIES$1]=FakePromise;return !(promise.then(function(){/* empty */})instanceof FakePromise);});var INCORRECT_ITERATION=FORCED$2||!checkCorrectnessOfIteration(function(iterable){PromiseConstructor.all(iterable)['catch'](function(){/* empty */});});// helpers
|
|
125817
|
+
var isThenable=function(it){var then;return isObject$2(it)&&typeof(then=it.then)=='function'?then:false;};var notify=function(promise,state,isReject){if(state.notified)return;state.notified=true;var chain=state.reactions;microtask(function(){var value=state.value;var ok=state.state==FULFILLED;var index=0;// variable length - can't use forEach
|
|
125810
125818
|
while(chain.length>index){var reaction=chain[index++];var handler=ok?reaction.ok:reaction.fail;var resolve=reaction.resolve;var reject=reaction.reject;var domain=reaction.domain;var result,then,exited;try{if(handler){if(!ok){if(state.rejection===UNHANDLED)onHandleUnhandled(promise,state);state.rejection=HANDLED;}if(handler===true)result=value;else {if(domain)domain.enter();result=handler(value);// can throw
|
|
125811
125819
|
if(domain){domain.exit();exited=true;}}if(result===reaction.promise){reject(TypeError$1('Promise-chain cycle'));}else if(then=isThenable(result)){then.call(result,resolve,reject);}else resolve(result);}else reject(value);}catch(error){if(domain&&!exited)domain.exit();reject(error);}}state.reactions=[];state.notified=false;if(isReject&&!state.rejection)onUnhandled(promise,state);});};var dispatchEvent=function(name,promise,reason){var event,handler;if(DISPATCH_EVENT){event=document$1.createEvent('Event');event.promise=promise;event.reason=reason;event.initEvent(name,false,true);global$3.dispatchEvent(event);}else event={promise:promise,reason:reason};if(handler=global$3['on'+name])handler(event);else if(name===UNHANDLED_REJECTION)hostReportErrors('Unhandled promise rejection',reason);};var onUnhandled=function(promise,state){task.call(global$3,function(){var value=state.value;var IS_UNHANDLED=isUnhandled(state);var result;if(IS_UNHANDLED){result=perform(function(){if(IS_NODE){process$4.emit('unhandledRejection',value,promise);}else dispatchEvent(UNHANDLED_REJECTION,promise,value);});// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
125812
|
-
state.rejection=IS_NODE||isUnhandled(state)?UNHANDLED:HANDLED;if(result.error)throw result.value;}});};var isUnhandled=function(state){return state.rejection!==HANDLED&&!state.parent;};var onHandleUnhandled=function(promise,state){task.call(global$3,function(){if(IS_NODE){process$4.emit('rejectionHandled',promise);}else dispatchEvent(REJECTION_HANDLED,promise,state.value);});};var bind=function(fn,promise,state,unwrap){return function(value){fn(promise,state,value,unwrap);};};var internalReject=function(promise,state,value,unwrap){if(state.done)return;state.done=true;if(unwrap)state=unwrap;state.value=value;state.state=REJECTED;notify(promise,state,true);};var internalResolve=function(promise,state,value,unwrap){if(state.done)return;state.done=true;if(unwrap)state=unwrap;try{if(promise===value)throw TypeError$1("Promise can't be resolved itself");var then=isThenable(value);if(then){microtask(function(){var wrapper={done:false};try{then.call(value,bind(internalResolve,promise,wrapper,state),bind(internalReject,promise,wrapper,state));}catch(error){internalReject(promise,wrapper,error,state);}});}else {state.value=value;state.state=FULFILLED;notify(promise,state,false);}}catch(error){internalReject(promise,{done:false},error,state);}};// constructor polyfill
|
|
125820
|
+
state.rejection=IS_NODE||isUnhandled(state)?UNHANDLED:HANDLED;if(result.error)throw result.value;}});};var isUnhandled=function(state){return state.rejection!==HANDLED&&!state.parent;};var onHandleUnhandled=function(promise,state){task.call(global$3,function(){if(IS_NODE){process$4.emit('rejectionHandled',promise);}else dispatchEvent(REJECTION_HANDLED,promise,state.value);});};var bind$1=function(fn,promise,state,unwrap){return function(value){fn(promise,state,value,unwrap);};};var internalReject=function(promise,state,value,unwrap){if(state.done)return;state.done=true;if(unwrap)state=unwrap;state.value=value;state.state=REJECTED;notify(promise,state,true);};var internalResolve=function(promise,state,value,unwrap){if(state.done)return;state.done=true;if(unwrap)state=unwrap;try{if(promise===value)throw TypeError$1("Promise can't be resolved itself");var then=isThenable(value);if(then){microtask(function(){var wrapper={done:false};try{then.call(value,bind$1(internalResolve,promise,wrapper,state),bind$1(internalReject,promise,wrapper,state));}catch(error){internalReject(promise,wrapper,error,state);}});}else {state.value=value;state.state=FULFILLED;notify(promise,state,false);}}catch(error){internalReject(promise,{done:false},error,state);}};// constructor polyfill
|
|
125813
125821
|
if(FORCED$2){// 25.4.3.1 Promise(executor)
|
|
125814
|
-
PromiseConstructor=function Promise(executor){anInstance(this,PromiseConstructor,PROMISE);aFunction$
|
|
125822
|
+
PromiseConstructor=function Promise(executor){anInstance(this,PromiseConstructor,PROMISE);aFunction$3(executor);Internal.call(this);var state=getInternalState(this);try{executor(bind$1(internalResolve,this,state),bind$1(internalReject,this,state));}catch(error){internalReject(this,state,error);}};// eslint-disable-next-line no-unused-vars
|
|
125815
125823
|
Internal=function Promise(executor){setInternalState(this,{type:PROMISE,done:false,notified:false,parent:false,reactions:[],rejection:false,state:PENDING,value:undefined});};Internal.prototype=redefineAll(PromiseConstructor.prototype,{// `Promise.prototype.then` method
|
|
125816
125824
|
// https://tc39.github.io/ecma262/#sec-promise.prototype.then
|
|
125817
125825
|
then:function then(onFulfilled,onRejected){var state=getInternalPromiseState(this);var reaction=newPromiseCapability(speciesConstructor(this,PromiseConstructor));reaction.ok=typeof onFulfilled=='function'?onFulfilled:true;reaction.fail=typeof onRejected=='function'&&onRejected;reaction.domain=IS_NODE?process$4.domain:undefined;state.parent=true;state.reactions.push(reaction);if(state.state!=PENDING)notify(this,state,false);return reaction.promise;},// `Promise.prototype.catch` method
|
|
125818
125826
|
// https://tc39.github.io/ecma262/#sec-promise.prototype.catch
|
|
125819
|
-
'catch':function(onRejected){return this.then(undefined,onRejected);}});OwnPromiseCapability=function(){var promise=new Internal();var state=getInternalState(promise);this.promise=promise;this.resolve=bind(internalResolve,promise,state);this.reject=bind(internalReject,promise,state);};newPromiseCapabilityModule.f=newPromiseCapability=function(C){return C===PromiseConstructor||C===PromiseWrapper?new OwnPromiseCapability(C):newGenericPromiseCapability(C);};if(typeof NativePromise=='function'){nativeThen=NativePromise.prototype.then;// wrap native Promise#then for native async functions
|
|
125827
|
+
'catch':function(onRejected){return this.then(undefined,onRejected);}});OwnPromiseCapability=function(){var promise=new Internal();var state=getInternalState(promise);this.promise=promise;this.resolve=bind$1(internalResolve,promise,state);this.reject=bind$1(internalReject,promise,state);};newPromiseCapabilityModule.f=newPromiseCapability=function(C){return C===PromiseConstructor||C===PromiseWrapper?new OwnPromiseCapability(C):newGenericPromiseCapability(C);};if(typeof NativePromise=='function'){nativeThen=NativePromise.prototype.then;// wrap native Promise#then for native async functions
|
|
125820
125828
|
redefine$a(NativePromise.prototype,'then',function then(onFulfilled,onRejected){var that=this;return new PromiseConstructor(function(resolve,reject){nativeThen.call(that,resolve,reject);}).then(onFulfilled,onRejected);// https://github.com/zloirock/core-js/issues/640
|
|
125821
125829
|
},{unsafe:true});// wrap fetch result
|
|
125822
|
-
if(typeof $fetch=='function')$$
|
|
125823
|
-
fetch:function fetch(input/* , init */){return promiseResolve(PromiseConstructor,$fetch.apply(global$3,arguments));}});}}$$
|
|
125824
|
-
$$
|
|
125830
|
+
if(typeof $fetch=='function')$$8({global:true,enumerable:true,forced:true},{// eslint-disable-next-line no-unused-vars
|
|
125831
|
+
fetch:function fetch(input/* , init */){return promiseResolve(PromiseConstructor,$fetch.apply(global$3,arguments));}});}}$$8({global:true,wrap:true,forced:FORCED$2},{Promise:PromiseConstructor});setToStringTag(PromiseConstructor,PROMISE,false);setSpecies(PROMISE);PromiseWrapper=getBuiltIn(PROMISE);// statics
|
|
125832
|
+
$$8({target:PROMISE,stat:true,forced:FORCED$2},{// `Promise.reject` method
|
|
125825
125833
|
// https://tc39.github.io/ecma262/#sec-promise.reject
|
|
125826
|
-
reject:function reject(r){var capability=newPromiseCapability(this);capability.reject.call(undefined,r);return capability.promise;}});$$
|
|
125834
|
+
reject:function reject(r){var capability=newPromiseCapability(this);capability.reject.call(undefined,r);return capability.promise;}});$$8({target:PROMISE,stat:true,forced:FORCED$2},{// `Promise.resolve` method
|
|
125827
125835
|
// https://tc39.github.io/ecma262/#sec-promise.resolve
|
|
125828
|
-
resolve:function resolve(x){return promiseResolve(this,x);}});$$
|
|
125836
|
+
resolve:function resolve(x){return promiseResolve(this,x);}});$$8({target:PROMISE,stat:true,forced:INCORRECT_ITERATION},{// `Promise.all` method
|
|
125829
125837
|
// https://tc39.github.io/ecma262/#sec-promise.all
|
|
125830
|
-
all:function all(iterable){var C=this;var capability=newPromiseCapability(C);var resolve=capability.resolve;var reject=capability.reject;var result=perform(function(){var $promiseResolve=aFunction$
|
|
125838
|
+
all:function all(iterable){var C=this;var capability=newPromiseCapability(C);var resolve=capability.resolve;var reject=capability.reject;var result=perform(function(){var $promiseResolve=aFunction$3(C.resolve);var values=[];var counter=0;var remaining=1;iterate(iterable,function(promise){var index=counter++;var alreadyCalled=false;values.push(undefined);remaining++;$promiseResolve.call(C,promise).then(function(value){if(alreadyCalled)return;alreadyCalled=true;values[index]=value;--remaining||resolve(values);},reject);});--remaining||resolve(values);});if(result.error)reject(result.value);return capability.promise;},// `Promise.race` method
|
|
125831
125839
|
// https://tc39.github.io/ecma262/#sec-promise.race
|
|
125832
|
-
race:function race(iterable){var C=this;var capability=newPromiseCapability(C);var reject=capability.reject;var result=perform(function(){var $promiseResolve=aFunction$
|
|
125840
|
+
race:function race(iterable){var C=this;var capability=newPromiseCapability(C);var reject=capability.reject;var result=perform(function(){var $promiseResolve=aFunction$3(C.resolve);iterate(iterable,function(promise){$promiseResolve.call(C,promise).then(capability.resolve,reject);});});if(result.error)reject(result.value);return capability.promise;}});function useEventsApi(){var api=useApi();return React$d.useMemo(function(){return {getEvents:getEvents,getEvent:getEvent,getEventRecurrences:getEventRecurrences};function getEvents(filter,sortFieldBuilder){var queryString$1=queryString.stringify(__assign(__assign({},filter&&__assign({},filter)),sortFieldBuilder&&__assign({},sortFieldBuilder)));return api.custom("events?"+queryString$1).get().then(function(r){return r.body().data();});}function getEvent(id){return api.all('events').get(id).then(function(response){var eventItem=response.body().data();itemStatisticsCache[eventItem.id]=Promise.resolve(__assign({},eventItem.statistics));return eventItem;});}function getEventRecurrences(eventId,from,to){return api.all("editor/events/"+eventId+"/recurrences?"+queryString.stringify({from:from,to:to})).getAll().then(function(res){return res.body().map(function(e){return e.data();});});}},[api]);}// `SameValue` abstract operation
|
|
125833
125841
|
// https://tc39.github.io/ecma262/#sec-samevalue
|
|
125834
125842
|
var sameValue$1=Object.is||function is(x,y){// eslint-disable-next-line no-self-compare
|
|
125835
125843
|
return x===y?x!==0||1/x===1/y:x!=x&&y!=y;};var fixRegExpWellKnownSymbolLogic$1=fixRegexpWellKnownSymbolLogic$1;var anObject$1$1=anObject$h;var requireObjectCoercible$2$1=requireObjectCoercible$b;var sameValue=sameValue$1;var regExpExec$1=regexpExecAbstract$1;// @@search logic
|
|
@@ -125837,9 +125845,9 @@
|
|
|
125837
125845
|
// https://tc39.github.io/ecma262/#sec-string.prototype.search
|
|
125838
125846
|
function search(regexp){var O=requireObjectCoercible$2$1(this);var searcher=regexp==undefined?undefined:regexp[SEARCH];return searcher!==undefined?searcher.call(regexp,O):new RegExp(regexp)[SEARCH](String(O));},// `RegExp.prototype[@@search]` method
|
|
125839
125847
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
|
|
125840
|
-
function(regexp){var res=maybeCallNative(nativeSearch,regexp,this);if(res.done)return res.value;var rx=anObject$1$1(regexp);var S=String(this);var previousLastIndex=rx.lastIndex;if(!sameValue(previousLastIndex,0))rx.lastIndex=0;var result=regExpExec$1(rx,S);if(!sameValue(rx.lastIndex,previousLastIndex))rx.lastIndex=previousLastIndex;return result===null?-1:result.index;}];});var $$
|
|
125848
|
+
function(regexp){var res=maybeCallNative(nativeSearch,regexp,this);if(res.done)return res.value;var rx=anObject$1$1(regexp);var S=String(this);var previousLastIndex=rx.lastIndex;if(!sameValue(previousLastIndex,0))rx.lastIndex=0;var result=regExpExec$1(rx,S);if(!sameValue(rx.lastIndex,previousLastIndex))rx.lastIndex=previousLastIndex;return result===null?-1:result.index;}];});var $$7=_export;var assign=objectAssign;// `Object.assign` method
|
|
125841
125849
|
// https://tc39.github.io/ecma262/#sec-object.assign
|
|
125842
|
-
$$
|
|
125850
|
+
$$7({target:'Object',stat:true,forced:Object.assign!==assign},{assign:assign});var defaultPageSize$2=10;function fetchNewsItems(path,cacheKey,api,storage,paginationToken,filterDefinition,isArray){var _this=this;if(isArray===void 0){isArray=false;}var hasSimpleFilters=filterDefinition.beforeDate!=null||filterDefinition.keywords!=null||filterDefinition.author!=null||filterDefinition.owner!=null||filterDefinition.bookmarksOnly!=null||filterDefinition.source!=null||filterDefinition.state!=null||filterDefinition.groupId!=null||filterDefinition.includePromoted!=null||filterDefinition.unreadOnly!=null;var isSearchActive=filterDefinition.search&&filterDefinition.search.length>0;var hasChannels=filterDefinition.channels!=null&&filterDefinition.channels.length>0;var pageSize=filterDefinition.pageSize;var hasAnyFilteringApplied=hasChannels||hasSimpleFilters||isSearchActive;// Note: caching is done only for the first page (paginationToken == null)
|
|
125843
125851
|
var canCache=!hasAnyFilteringApplied&&paginationToken==null;if(isSearchActive){filterDefinition.search=filterDefinition.search.trim();}if(!hasAnyFilteringApplied){filterDefinition=null;}var params=Object.assign({},{token:paginationToken,pageSize:pageSize!==null&&pageSize!==void 0?pageSize:defaultPageSize$2},filterDefinition);var endpoint=api.all(path);var apiLoader=isArray?endpoint.getAll(params).then(function(res){return {items:res.body().map(function(r){return r.data();})};}):endpoint.get('',params).then(function(res){return res.body().data();});if(!canCache){return from(apiLoader);}return new Observable(function(observer){(function(){return __awaiter(_this,void 0,void 0,function(){var cachedPage,apiPage_1,err_1;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,3,,4]);return [4/*yield*/,storage.getObject(cacheKey)];case 1:cachedPage=_a.sent();if(cachedPage){validateFileAccessTokens(cachedPage,function(isTokenValid,item){if(!isTokenValid){// prevent executing requests resulting in 401 if we already know the token is not valid anymore
|
|
125844
125852
|
item.fileAccessToken=null;}});observer.next(cachedPage);}return [4/*yield*/,apiLoader];case 2:apiPage_1=_a.sent();// no need to wait for updating the cache
|
|
125845
125853
|
storage.set(cacheKey,apiPage_1).then(function(){return null;});if(!cachedPage){observer.next(apiPage_1);observer.complete();return [2/*return*/];}validateFileAccessTokens(cachedPage,function(isTokenValid,cachedItem){var apiItem=apiPage_1.items.find(function(i){return i.id===cachedItem.id;});if(apiItem&&isTokenValid){// prevent reload of the image if the old token is still valid
|
|
@@ -125865,15 +125873,15 @@
|
|
|
125865
125873
|
// ></iframe>;
|
|
125866
125874
|
var _a=this.videoProperties||{},sp=_a.sp,uiconfId=_a.uiconfId,partnerId=_a.partnerId,entryId=_a.entryId;var iframe=document.createElement('iframe');iframe.setAttribute('aria-label',this.iframeAreaLabel);iframe.setAttribute('src',"https://cdnapisec.kaltura.com/p/"+this.videoInfo.id+"/sp/"+sp+"/embedIframeJs/uiconf_id/"+uiconfId+"/partner_id/"+partnerId+"?iframeembed=true&playerId=kaltura_player&entry_id="+entryId);iframe.setAttribute('frameborder','0');iframe.setAttribute('allowfullscreen','');return iframe;};VideoElementGenerator.prototype.getGenericURLVideoElement=function(){var _a;// for generic URL videos, we treat the id as the URL
|
|
125867
125875
|
var video=document.createElement('video');video.setAttribute('controls','');var source=document.createElement('source');source.setAttribute('src',(_a=this.videoInfo.url)!==null&&_a!==void 0?_a:this.videoInfo.id);if(this.autoplay){video.setAttribute('autoplay','');}if(this.width){video.setAttribute('width',this.width);}var noVideo=document.createTextNode('Your browser does not support the video tag');video.appendChild(source);video.appendChild(noVideo);return video;};VideoElementGenerator.prototype.getVideoElement=function(src){var iframe=document.createElement('iframe');iframe.setAttribute('src',src);iframe.setAttribute('frameborder','0');iframe.setAttribute('webkitallowfullscreen','');iframe.setAttribute('mozallowfullscreen','');iframe.setAttribute('allowfullscreen','');iframe.setAttribute('aria-label',this.iframeAreaLabel);return iframe;};VideoElementGenerator.prototype.getNotSupportedElement=function(){var content=document.createElement('div');content.innerText="The selected video cannot be played. The source is not supported.";return content;};VideoElementGenerator.getVideoElement=function(videoInfo,autoplay,width,iframeAreaLabel,videoProperties){var generator=new VideoElementGenerator(videoInfo,iframeAreaLabel||'',autoplay,width,videoProperties);switch(videoInfo.source){case VideoSource.YouTube:return generator.getYouTubeVideoElement();case VideoSource.Vimeo:return videoInfo.isDirectUrl?generator.getExternalVimeoVideoElement():generator.getVimeoVideoElement();case VideoSource.MicrosoftStream:return generator.getMicrosoftStreamVideoElement();case VideoSource.GenericUrl:return generator.getGenericURLVideoElement();case VideoSource.Kaltura:return generator.getKalturaVideoElement();default:return generator.getNotSupportedElement();}};VideoElementGenerator.getVideoType=function(videoInfo){switch(videoInfo.source){case VideoSource.YouTube:return 'YouTube';case VideoSource.Vimeo:return 'Vimeo';case VideoSource.MicrosoftStream:return 'Microsoft Stream';case VideoSource.GenericUrl:return 'Generic';case VideoSource.Kaltura:return 'Kaltura';default:return '';}};return VideoElementGenerator;}();var VideoView=function VideoView(_a){var videoInfo=_a.videoInfo,autoplay=_a.autoplay,width=_a.width,className=_a.className;var formatMessage=useIntl().formatMessage;var container=React$d.useRef();React$d.useEffect(function(){renderContents();// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125868
|
-
},[videoInfo.id,videoInfo.source]);return jsxRuntime.jsx(Host$R,{className:classNames(className,inlineObjectsClassNames.video,videoInfo.source===VideoSource.YouTube?inlineObjectsClassNames.video+"--youtube":null),ref:container,"data-is-direct-url":!!videoInfo.isDirectUrl,applyBackground:videoInfo.source===VideoSource.Vimeo&&!videoInfo.isDirectUrl},void 0);function renderContents(){var _a;if(!container.current){return;}var videoProperties=(_a=new VideoUrlParser(videoInfo.url))===null||_a===void 0?void 0:_a.videoProperties;var iframeAreaLabel=formatMessage({id:'AriaLabel.videoElementGenerator.videoPreview'},{type:VideoElementGenerator.getVideoType(videoInfo)});container.current.innerHTML='';container.current.appendChild(VideoElementGenerator.getVideoElement(videoInfo,autoplay,width,iframeAreaLabel,videoProperties));}};var Host$R=_styled__default["default"].div.withConfig({displayName:"VideoView__Host",componentId:"sc-1t89fhn-0"})(templateObject_2$
|
|
125869
|
-
var createMethod$4=function(IS_RIGHT){return function(that,callbackfn,argumentsLength,memo){aFunction$
|
|
125876
|
+
},[videoInfo.id,videoInfo.source]);return jsxRuntime.jsx(Host$R,{className:classNames(className,inlineObjectsClassNames.video,videoInfo.source===VideoSource.YouTube?inlineObjectsClassNames.video+"--youtube":null),ref:container,"data-is-direct-url":!!videoInfo.isDirectUrl,applyBackground:videoInfo.source===VideoSource.Vimeo&&!videoInfo.isDirectUrl},void 0);function renderContents(){var _a;if(!container.current){return;}var videoProperties=(_a=new VideoUrlParser(videoInfo.url))===null||_a===void 0?void 0:_a.videoProperties;var iframeAreaLabel=formatMessage({id:'AriaLabel.videoElementGenerator.videoPreview'},{type:VideoElementGenerator.getVideoType(videoInfo)});container.current.innerHTML='';container.current.appendChild(VideoElementGenerator.getVideoElement(videoInfo,autoplay,width,iframeAreaLabel,videoProperties));}};var Host$R=_styled__default["default"].div.withConfig({displayName:"VideoView__Host",componentId:"sc-1t89fhn-0"})(templateObject_2$1q||(templateObject_2$1q=__makeTemplateObject(["\n ","\n\n &.video-view-container {\n position: relative;\n width: 100%;\n display: block;\n overflow: hidden;\n z-index: 1;\n\n &:after {\n content: '';\n display: block;\n padding-bottom: calc(9 / 16 * 100%);\n font-size: 0; // fix for firefox\n }\n\n > * {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n &[data-is-direct-url='true'] {\n > [data-external-vimeo] {\n display: flex;\n\n > video {\n height: 100%;\n max-width: 100%;\n margin: 0 auto;\n }\n }\n }\n }\n"],["\n ","\n\n &.video-view-container {\n position: relative;\n width: 100%;\n display: block;\n overflow: hidden;\n z-index: 1;\n\n &:after {\n content: '';\n display: block;\n padding-bottom: calc(9 / 16 * 100%);\n font-size: 0; // fix for firefox\n }\n\n > * {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n &[data-is-direct-url='true'] {\n > [data-external-vimeo] {\n display: flex;\n\n > video {\n height: 100%;\n max-width: 100%;\n margin: 0 auto;\n }\n }\n }\n }\n"])),function(p){return p.applyBackground&&_styled.css(templateObject_1$2d||(templateObject_1$2d=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.black);});var templateObject_1$2d,templateObject_2$1q;var VideoWithThumbnailView=function VideoWithThumbnailView(_a){var videoInfo=_a.videoInfo,videoThumbnailUrl=_a.videoThumbnailUrl,className=_a.className;var _b=React$d.useState(!videoInfo.isDirectUrl),showPlayer=_b[0],setShowPlayer=_b[1];if(showPlayer){return jsxRuntime.jsx(VideoView,{videoInfo:videoInfo,autoplay:videoInfo.isDirectUrl,className:className},void 0);}if(videoThumbnailUrl){return jsxRuntime.jsxs(Host$Q,__assign({className:className},{children:[jsxRuntime.jsx(StyledImage,{src:videoThumbnailUrl,imageFit:officeUiFabricReact.ImageFit.cover,maximizeFrame:true},void 0),jsxRuntime.jsx(PlayButton,{onClick:function(){return setShowPlayer(true);},iconProps:{iconName:'MSNVideosSolid'}},void 0)]}),void 0);}return null;};var Host$Q=_styled__default["default"].div.withConfig({displayName:"VideoWithThumbnailView__Host",componentId:"sc-z8lt34-0"})(templateObject_1$2c||(templateObject_1$2c=__makeTemplateObject(["\n width: 100%;\n display: block;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n padding-bottom: calc(9 / 16 * 100%);\n }\n"],["\n width: 100%;\n display: block;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n padding-bottom: calc(9 / 16 * 100%);\n }\n"])));var StyledImage=_styled__default["default"](officeUiFabricReact.Image).withConfig({displayName:"VideoWithThumbnailView__StyledImage",componentId:"sc-z8lt34-1"})(templateObject_2$1p||(templateObject_2$1p=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n"])));var PlayButton=_styled__default["default"](officeUiFabricReact.IconButton).withConfig({displayName:"VideoWithThumbnailView__PlayButton",componentId:"sc-z8lt34-2"})(templateObject_3$Y||(templateObject_3$Y=__makeTemplateObject(["\n && {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n\n // overlay styling\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n // play icon styling\n i {\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n\n i {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n }\n"],["\n && {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n\n // overlay styling\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n // play icon styling\n i {\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n\n i {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n }\n"])));var templateObject_1$2c,templateObject_2$1p,templateObject_3$Y;var VideoList=function VideoList(_a){var attachments=_a.attachments,onDeleteClick=_a.onDeleteClick,className=_a.className;var formatMessage=useIntl().formatMessage;var videos=attachments.filter(function(a){return a.type===AttachmentType.YouTubeVideo||a.type===AttachmentType.VimeoVideo;});if(videos.length===0){return null;}if(onDeleteClick){return jsxRuntime.jsx(Host$P,__assign({className:className,"data-video-attachment-list":true},{children:videos.map(function(video){return jsxRuntime.jsx(AttachmentHost,__assign({domIdentifier:"video",deleteButton:jsxRuntime.jsx(DeleteAttachmentButton,{"data-remove-attachment-button":video.id,iconProps:{iconName:'ChromeClose'},onClick:function(){onDeleteClick(video);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsxRuntime.jsx(VideoPreview,{video:video},void 0)}),video.id);})}),void 0);}var video=videos[0];return jsxRuntime.jsx(PreviewHost$1,__assign({className:className,domIdentifier:"video-url-preview-"+video.id},{children:jsxRuntime.jsx(VideoPreview,{video:video},void 0)}),void 0);};var VideoPreview=function VideoPreview(_a){var video=_a.video;var getVideoThumbnailUrl=useVideosApi().getVideoThumbnailUrl;var token=useCurrentToken();var user=useCurrentUser();var parser=new VideoUrlParser(video.url);var source=video.type===AttachmentType.YouTubeVideo?VideoSource.YouTube:VideoSource.Vimeo;var videoThumbnailUrl=parser.isDirectVideoUrl?getVideoThumbnailUrl(token,user.subscription.id,source,video.id):null;return jsxRuntime.jsx(VideoWithThumbnailView,{videoInfo:{id:video.id,source:source,url:video.url,isDirectUrl:parser.isDirectVideoUrl},videoThumbnailUrl:videoThumbnailUrl},void 0);};var Host$P=_styled__default["default"].div.withConfig({displayName:"VideoList__Host",componentId:"sc-1cep2pw-0"})(templateObject_1$2b||(templateObject_1$2b=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n"],["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n"])),spacingM);var PreviewHost$1=_styled__default["default"](AttachmentHost).withConfig({displayName:"VideoList__PreviewHost",componentId:"sc-1cep2pw-1"})(templateObject_2$1o||(templateObject_2$1o=__makeTemplateObject(["\n margin: ","px 0 0 0;\n"],["\n margin: ","px 0 0 0;\n"])),spacingM);var templateObject_1$2b,templateObject_2$1o;var aFunction$2=aFunction$7;var toObject$3=toObject$7;var IndexedObject=indexedObject;var toLength$3=toLength$a;// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
125877
|
+
var createMethod$4=function(IS_RIGHT){return function(that,callbackfn,argumentsLength,memo){aFunction$2(callbackfn);var O=toObject$3(that);var self=IndexedObject(O);var length=toLength$3(O.length);var index=IS_RIGHT?length-1:0;var i=IS_RIGHT?-1:1;if(argumentsLength<2)while(true){if(index in self){memo=self[index];index+=i;break;}index+=i;if(IS_RIGHT?index<0:length<=index){throw TypeError('Reduce of empty array with no initial value');}}for(;IS_RIGHT?index>=0:length>index;index+=i)if(index in self){memo=callbackfn(memo,self[index],index,O);}return memo;};};var arrayReduce={// `Array.prototype.reduce` method
|
|
125870
125878
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
125871
125879
|
left:createMethod$4(false),// `Array.prototype.reduceRight` method
|
|
125872
125880
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
|
|
125873
125881
|
right:createMethod$4(true)};var fails$2$1=fails$i;var arrayMethodIsStrict$2=function(METHOD_NAME,argument){var method=[][METHOD_NAME];return !!method&&fails$2$1(function(){// eslint-disable-next-line no-useless-call,no-throw-literal
|
|
125874
|
-
method.call(null,argument||function(){throw 1;},1);});};var DESCRIPTORS$1=descriptors;var fails$1$1=fails$i;var has$1=has$c;var defineProperty$1=Object.defineProperty;var cache={};var thrower=function(it){throw it;};var arrayMethodUsesToLength$1=function(METHOD_NAME,options){if(has$1(cache,METHOD_NAME))return cache[METHOD_NAME];if(!options)options={};var method=[][METHOD_NAME];var ACCESSORS=has$1(options,'ACCESSORS')?options.ACCESSORS:false;var argument0=has$1(options,0)?options[0]:thrower;var argument1=has$1(options,1)?options[1]:undefined;return cache[METHOD_NAME]=!!method&&!fails$1$1(function(){if(ACCESSORS&&!DESCRIPTORS$1)return true;var O={length:-1};if(ACCESSORS)defineProperty$1(O,1,{enumerable:true,get:thrower});else O[1]=1;method.call(O,argument0,argument1);});};var $$
|
|
125882
|
+
method.call(null,argument||function(){throw 1;},1);});};var DESCRIPTORS$1=descriptors;var fails$1$1=fails$i;var has$1=has$c;var defineProperty$1=Object.defineProperty;var cache={};var thrower=function(it){throw it;};var arrayMethodUsesToLength$1=function(METHOD_NAME,options){if(has$1(cache,METHOD_NAME))return cache[METHOD_NAME];if(!options)options={};var method=[][METHOD_NAME];var ACCESSORS=has$1(options,'ACCESSORS')?options.ACCESSORS:false;var argument0=has$1(options,0)?options[0]:thrower;var argument1=has$1(options,1)?options[1]:undefined;return cache[METHOD_NAME]=!!method&&!fails$1$1(function(){if(ACCESSORS&&!DESCRIPTORS$1)return true;var O={length:-1};if(ACCESSORS)defineProperty$1(O,1,{enumerable:true,get:thrower});else O[1]=1;method.call(O,argument0,argument1);});};var $$6=_export;var $reduce=arrayReduce.left;var arrayMethodIsStrict$1=arrayMethodIsStrict$2;var arrayMethodUsesToLength=arrayMethodUsesToLength$1;var STRICT_METHOD$1=arrayMethodIsStrict$1('reduce');var USES_TO_LENGTH=arrayMethodUsesToLength('reduce',{1:0});// `Array.prototype.reduce` method
|
|
125875
125883
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
125876
|
-
$$5({target:'Array',proto:true,forced:!STRICT_METHOD$1||!USES_TO_LENGTH},{reduce:function reduce(callbackfn/* , initialValue */){return $reduce(this,callbackfn,arguments.length,arguments.length>1?arguments[1]:undefined);}});var KeywordsInfo=function KeywordsInfo(_a){var keywords=_a.keywords,language=_a.language,className=_a.className,filterBaseUrl=_a.filterBaseUrl;var selectedKeywordGroups=React$d.useContext(LazySubscriptionContext).selectedKeywordGroups;if(selectedKeywordGroups==null){return null;}var availableKeywordGroups=selectedKeywordGroups===null||selectedKeywordGroups===void 0?void 0:selectedKeywordGroups.reduce(function(result,next){var _a;return __assign(__assign({},result),(_a={},_a[next.id]=next,_a));},{});var flatKeywords=getFlatKeywordList(keywords);var hasKeywords=flatKeywords&&flatKeywords.length>0;if(!hasKeywords){return null;}return jsxRuntime.jsx(Host$O,__assign({"data-keywords":true},{children:renderKeywords()}),void 0);function renderKeywords(){var keywordsGroupsIds=Object.keys(keywords||[]);return keywordsGroupsIds.filter(function(id){return availableKeywordGroups[id];}).map(function(groupId){return keywords[groupId].length>0&&jsxRuntime.jsx(KeywordsGroup,{groupId:groupId,groupName:availableKeywordGroups[groupId].name,language:language,keywords:keywords,className:className,filterBaseUrl:filterBaseUrl},groupId);});}};var KeywordsGroup=function KeywordsGroup(_a){var groupId=_a.groupId,groupName=_a.groupName,keywords=_a.keywords,language=_a.language,className=_a.className,filterBaseUrl=_a.filterBaseUrl;return jsxRuntime.jsxs(KeywordsList$1,__assign({className:classNames('ms-fontColor-neutralSecondaryAlt',className)},{children:[jsxRuntime.jsxs(KeywordsListTitle,{children:[jsxRuntime.jsx(KeywordTitle,{groupName:groupName,language:language},void 0),":"]},void 0),keywords[groupId].map(function(k){var Title=jsxRuntime.jsx(KeywordTitle,{groupName:groupName,keywordName:k.name,language:language},void 0);return jsxRuntime.jsx(KeywordsListItem,{children:filterBaseUrl?jsxRuntime.jsx(ReactRouterDom.NavLink,__assign({"data-keyword":true,className:"ms-fontColor-neutralSecondaryAlt",to:filterBaseUrl+"?"+queryString.stringify({keywords:k.id})},{children:Title}),void 0):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[" ",Title," "]},void 0)},groupName+k.name);})]}),void 0);};var Host$O=_styled__default["default"].div.withConfig({displayName:"KeywordsInfo__Host",componentId:"sc-woteiy-0"})(templateObject_1$2a||(templateObject_1$2a=__makeTemplateObject(["\n padding-right: ","px;\n flex: 1; /* IE fix */\n @media (min-width: 700px) {\n padding-right: ","px;\n }\n"],["\n padding-right: ","px;\n flex: 1; /* IE fix */\n @media (min-width: 700px) {\n padding-right: ","px;\n }\n"])),spacingM,spacingXl);var KeywordsList$1=_styled__default["default"].dl.withConfig({displayName:"KeywordsInfo__KeywordsList",componentId:"sc-woteiy-1"})(templateObject_2$1m||(templateObject_2$1m=__makeTemplateObject(["\n width: 100%;\n margin: 0;\n\n + dl {\n margin-top: 5px;\n }\n"],["\n width: 100%;\n margin: 0;\n\n + dl {\n margin-top: 5px;\n }\n"])));var KeywordsListTitle=_styled__default["default"].dt.withConfig({displayName:"KeywordsInfo__KeywordsListTitle",componentId:"sc-woteiy-2"})(templateObject_3$X||(templateObject_3$X=__makeTemplateObject(["\n display: inline-block;\n padding-right: 5px;\n word-break: normal;\n"],["\n display: inline-block;\n padding-right: 5px;\n word-break: normal;\n"])));var KeywordsListItem=_styled__default["default"].dd.withConfig({displayName:"KeywordsInfo__KeywordsListItem",componentId:"sc-woteiy-3"})(templateObject_4$H||(templateObject_4$H=__makeTemplateObject(["\n display: inline-block;\n margin: 0;\n\n text-decoration: underline;\n\n &:not(:last-child) span::after {\n content: ',';\n padding-right: 5px;\n }\n"],["\n display: inline-block;\n margin: 0;\n\n text-decoration: underline;\n\n &:not(:last-child) span::after {\n content: ',';\n padding-right: 5px;\n }\n"])));var Keywords$3=function Keywords(_a){var keywords=_a.item.keywords,filterBaseUrl=_a.filterBaseUrl,className=_a.className,useGridKeywordTitle=_a.useGridKeywordTitle;var location=ReactRouterDom.useLocation();var currentParamsObject=queryString.parse(location.search);var selectedKeywordGroups=React$d.useContext(LazySubscriptionContext).selectedKeywordGroups;if(selectedKeywordGroups==null){return null;}var availableKeywordGroups=selectedKeywordGroups===null||selectedKeywordGroups===void 0?void 0:selectedKeywordGroups.reduce(function(result,next){var _a;return __assign(__assign({},result),(_a={},_a[next.id]=next,_a));},{});var keywordsGroupsIds=Object.keys(keywords||[]);return jsxRuntime.jsx("span",__assign({className:className},{children:keywordsGroupsIds.filter(function(id){return availableKeywordGroups[id];}).map(function(groupId){return keywords[groupId].map(function(keyword){currentParamsObject.keywords=keyword.id;if(filterBaseUrl){return jsxRuntime.jsx(ReactRouterDom.NavLink,__assign({"data-keyword":true,to:filterBaseUrl+"?"+queryString.stringify(currentParamsObject)},{children:useGridKeywordTitle?jsxRuntime.jsx(GridKeywordTitle,{keywordName:keyword.name,groupId:groupId},void 0):jsxRuntime.jsx(KeywordTitle,{keywordName:keyword.name,groupId:groupId,underlined:true},void 0)}),groupId+keyword.id);}return useGridKeywordTitle?jsxRuntime.jsx(GridKeywordTitle,{keywordName:keyword.name,groupId:groupId},groupId+keyword.id):jsxRuntime.jsx(KeywordTitle,{keywordName:keyword.name,groupId:groupId},groupId+keyword.id);});}).reduce(function(result,next){return result.concat(next);},[])}),void 0);};var FlatKeywords=_styled__default["default"](Keywords$3).withConfig({displayName:"KeywordsInfo__FlatKeywords",componentId:"sc-woteiy-4"})(templateObject_5$B||(templateObject_5$B=__makeTemplateObject(["\n > a,\n > a:link,\n > a:visited,\n > span {\n color: ",";\n\n &:not(:last-child) {\n &::after {\n content: ', ';\n }\n }\n }\n\n a {\n position: relative;\n z-index: 1;\n }\n"],["\n > a,\n > a:link,\n > a:visited,\n > span {\n color: ",";\n\n &:not(:last-child) {\n &::after {\n content: ', ';\n }\n }\n }\n\n a {\n position: relative;\n z-index: 1;\n }\n"])),function(p){return p.theme.palette.neutralSecondaryAlt;});var templateObject_1$2a,templateObject_2$1m,templateObject_3$X,templateObject_4$H,templateObject_5$B;var NewsService=/** @class */function(){function NewsService(){}NewsService.getNewsRoute=function(baseRoute,newsId,newsTitle,isExternalContent){var route=baseRoute+"/"+encodeURIComponent(newsId);if(newsTitle){route=route+"/"+slugify(newsTitle,{remove:/[%.#]/});}return isExternalContent?route+"?"+queryString.stringify({noRedirect:true}):route;};NewsService.getItemContentLanguages=function(item,languages){if(!item){return [];}return NewsService.getContentLanguages(item.contents,languages);};NewsService.getContentLanguages=function(contents,languages,contentValidator){if(!contents){return [];}var allLanguages=Object.keys(contents);if(!allLanguages.length){return [];}var activeLanguages=allLanguages.filter(function(l){return contents[l].active&&languages.find(function(sl){return sl.code===l;})&&(!contentValidator||contentValidator(contents[l]));});if(contentValidator){return activeLanguages;}return activeLanguages.length?activeLanguages:[allLanguages[0]];};NewsService.getLanguageForPublishableItem=function(item,user,contentValidator){if(!user||!item||!item.contents||!user.subscription){return null;}return NewsService.getLanguageForContent(item.contents,user,contentValidator);};NewsService.getLanguageForContent=function(contents,user,contentValidator){if(!contents){return null;}var activeLanguages=NewsService.getContentLanguages(contents,user.subscription.languages,contentValidator);return NewsService.getUserPreferredLanguage(activeLanguages,user);};NewsService.getUserPreferredLanguage=function(languages,user){if(!languages){return null;}var preferredLanguage=getPreferredContentLanguage(user);var subscription=user.subscription;if(languages.find(function(l){return l===preferredLanguage;})){return preferredLanguage;}if(languages.find(function(l){return l===subscription.defaultLanguage;})){return subscription.defaultLanguage;}return languages[0];};return NewsService;}();var ClickableOverlay=function ClickableOverlay(_a){var title=_a.title,itemId=_a.itemId,itemType=_a.itemType,baseRoute=_a.baseRoute,ariaLabelResourceKey=_a.ariaLabelResourceKey,onClick=_a.onClick,openTargetInNewWindow=_a.openTargetInNewWindow,isExternalContent=_a.isExternalContent;var formatMessage=useIntl().formatMessage;var targetRoute=itemType===ItemResourceTypes.Posts||itemType===ItemResourceTypes.Comments?baseRoute:NewsService.getNewsRoute(baseRoute,itemId,title,isExternalContent);if(openTargetInNewWindow){return jsxRuntime.jsx(ExternalLink$1,{href:targetRoute,target:"_blank",rel:"noopener noreferrer",onClick:onClick,"aria-label":ariaLabelResourceKey?formatMessage({id:ariaLabelResourceKey}):formatMessage({id:'AriaLabel.readMoreAbout'},{title:title}),"data-clickable-overlay":true},void 0);}return jsxRuntime.jsx(StyledLink$1,{to:targetRoute,onClick:onClick,"aria-label":ariaLabelResourceKey?formatMessage({id:ariaLabelResourceKey}):formatMessage({id:'AriaLabel.readMoreAbout'},{title:title}),"data-clickable-overlay":true},void 0);};var Style=_styled.css(templateObject_1$29||(templateObject_1$29=__makeTemplateObject(["\n width: 0;\n height: 0;\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 1;\n }\n"],["\n width: 0;\n height: 0;\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 1;\n }\n"])));var StyledLink$1=_styled__default["default"](ReactRouterDom.Link).withConfig({displayName:"ClickableOverlay__StyledLink",componentId:"sc-yfxl9c-0"})(templateObject_2$1l||(templateObject_2$1l=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),Style);var ExternalLink$1=_styled__default["default"].a.withConfig({displayName:"ClickableOverlay__ExternalLink",componentId:"sc-yfxl9c-1"})(templateObject_3$W||(templateObject_3$W=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),Style);var templateObject_1$29,templateObject_2$1l,templateObject_3$W;var PostItemTile=function PostItemTile(_a){var post=_a.post,readOnly=_a.readOnly,backgroundColor=_a.backgroundColor,className=_a.className;var features=useFeatures();var buildPath=useSubscriptionHandlePathBuilder().buildPath;return jsxRuntime.jsxs(PostHost,__assign({className:className,backgroundColor:backgroundColor},{children:[!readOnly&&jsxRuntime.jsx(ClickableOverlay,{baseRoute:buildPath("/posts/"+post.id),itemId:post.id,itemType:ItemResourceTypes.Posts,ariaLabelResourceKey:"AriaLabel.itemLink"},void 0),jsxRuntime.jsxs(Header$3,{children:[jsxRuntime.jsx(StyledPersonaCard$3,__assign({upn:post.author.userPrincipalName,domIdentifier:"avatar"},{children:jsxRuntime.jsx(Avatar,{upn:post.author.userPrincipalName,text:post.author.displayName,size:officeUiFabricReact.PersonaSize.size40,hidePersonaDetails:true},void 0)}),void 0),jsxRuntime.jsxs(HeaderMetadata$2,{children:[jsxRuntime.jsx(PostDisplayName$1,__assign({"data-author":true},{children:post.author.displayName}),void 0),jsxRuntime.jsx(PostDateTime$1,{className:"ms-fontColor-neutralTertiary",value:post.publishingDate},void 0),jsxRuntime.jsx(Modified,{modified:post.modified},void 0)]},void 0)]},void 0),jsxRuntime.jsx(Content$8,{children:jsxRuntime.jsx(ContentDisplay,{content:post.content,handlers:[ContentDisplayHandler.LineBreak,ContentDisplayHandler.Link,ContentDisplayHandler.Mention,ContentDisplayHandler.Hashtag]},void 0)},void 0),features.keywords&&features.postKeywords&&post.keywords&&jsxRuntime.jsx(StyledKeywordsInfo$1,{keywords:post.keywords},void 0)]}),void 0);};var PostHost=_styled__default["default"].div.withConfig({displayName:"PostItemTile__PostHost",componentId:"sc-yu434m-0"})(templateObject_3$V||(templateObject_3$V=__makeTemplateObject(["\n ","\n\n display: flex;\n flex-direction: column;\n\n font-size: ","px;\n padding: ","px;\n\n position: relative;\n"],["\n ","\n\n display: flex;\n flex-direction: column;\n\n font-size: ","px;\n padding: ","px;\n\n position: relative;\n"])),function(p){return p.backgroundColor?_styled.css(templateObject_1$28||(templateObject_1$28=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.backgroundColor):_styled.css(templateObject_2$1k||(templateObject_2$1k=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.white);},fontSizeSmall,spacingM);var Header$3=_styled__default["default"].div.withConfig({displayName:"PostItemTile__Header",componentId:"sc-yu434m-1"})(templateObject_4$G||(templateObject_4$G=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledPersonaCard$3=_styled__default["default"](PersonaCard).withConfig({displayName:"PostItemTile__StyledPersonaCard",componentId:"sc-yu434m-2"})(templateObject_5$A||(templateObject_5$A=__makeTemplateObject(["\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var HeaderMetadata$2=_styled__default["default"].div.withConfig({displayName:"PostItemTile__HeaderMetadata",componentId:"sc-yu434m-3"})(templateObject_6$p||(templateObject_6$p=__makeTemplateObject(["\n flex: 1;\n font-size: ","px;\n padding-left: ","px;\n white-space: nowrap;\n"],["\n flex: 1;\n font-size: ","px;\n padding-left: ","px;\n white-space: nowrap;\n"])),fontSizeSmall,spacingS);var PostDisplayName$1=_styled__default["default"].div.withConfig({displayName:"PostItemTile__PostDisplayName",componentId:"sc-yu434m-4"})(templateObject_7$k||(templateObject_7$k=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var PostDateTime$1=_styled__default["default"](DateTime).withConfig({displayName:"PostItemTile__PostDateTime",componentId:"sc-yu434m-5"})(templateObject_8$i||(templateObject_8$i=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeSmaller);var Content$8=_styled__default["default"].div.withConfig({displayName:"PostItemTile__Content",componentId:"sc-yu434m-6"})(templateObject_9$e||(templateObject_9$e=__makeTemplateObject(["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var StyledKeywordsInfo$1=_styled__default["default"](KeywordsInfo).withConfig({displayName:"PostItemTile__StyledKeywordsInfo",componentId:"sc-yu434m-7"})(templateObject_10$c||(templateObject_10$c=__makeTemplateObject(["\n margin-top: ","px;\n\n dd {\n text-decoration: none;\n }\n"],["\n margin-top: ","px;\n\n dd {\n text-decoration: none;\n }\n"])),spacingM);var templateObject_1$28,templateObject_2$1k,templateObject_3$V,templateObject_4$G,templateObject_5$A,templateObject_6$p,templateObject_7$k,templateObject_8$i,templateObject_9$e,templateObject_10$c;var EventLocationLink=function EventLocationLink(_a){var location=_a.location,alternativeCaption=_a.alternativeCaption,className=_a.className;var locationLink=location.url||getGoogleMapsSearchLink(location.locationOnMap);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:locationLink?jsxRuntime.jsx(TextLink,__assign({url:locationLink,ariaLabel:alternativeCaption||location.name},{children:alternativeCaption||location.name}),void 0):jsxRuntime.jsx("span",__assign({className:className},{children:alternativeCaption||location.name}),void 0)},void 0);};var EventLocationInfo=function EventLocationInfo(_a){var locations=_a.locations,className=_a.className;if(!locations||locations.length===0){return null;}var isMultiLine=locations.length>1;return jsxRuntime.jsx(Host$N,__assign({className:className},{children:jsxRuntime.jsxs(ListWrapper,__assign({"data-event-locations":true,isMultiLine:isMultiLine},{children:[jsxRuntime.jsx(Label,{resourceKey:"Events.locationsLabel",count:locations.length},void 0),jsxRuntime.jsx(List$2,__assign({isMultiLine:isMultiLine},{children:locations.map(function(l){return jsxRuntime.jsx("li",{children:jsxRuntime.jsx(EventLocationLink,{location:l},void 0)},l.locationId);})}),void 0)]}),void 0)}),void 0);};var EventPeopleInfo=function EventPeopleInfo(_a){var item=_a.item,className=_a.className,hideAnnouncer=_a.hideAnnouncer;var author=item.owner||item.author;var contactsCount=item.contacts&&item.contacts.length;if(hideAnnouncer&&contactsCount===0){return null;}var isMultiLine=contactsCount>1;return jsxRuntime.jsxs(Host$N,__assign({className:className},{children:[contactsCount>0&&jsxRuntime.jsxs(Contacts$1,__assign({"data-event-people":"contacts",isMultiLine:isMultiLine,hideAnnouncer:hideAnnouncer},{children:[jsxRuntime.jsx(Label,{resourceKey:"Events.contactsLabel",count:contactsCount},void 0),jsxRuntime.jsx(List$2,__assign({isMultiLine:isMultiLine},{children:item.contacts.map(function(c){return jsxRuntime.jsx("li",{children:jsxRuntime.jsx(EventUser,{user:c,className:"ms-fontColor-accent"},void 0)},c.userPrincipalName);})}),void 0)]}),void 0),!hideAnnouncer&&author&&jsxRuntime.jsxs(ListWrapper,__assign({"data-event-people":"author",isMultiLine:false},{children:[jsxRuntime.jsx(Label,{resourceKey:"Events.authorLabel"},void 0),jsxRuntime.jsx(EventUser,{user:author,className:"ms-fontColor-accent"},void 0)]}),void 0)]}),void 0);};var EventUser=function EventUser(_a){var user=_a.user,className=_a.className;return jsxRuntime.jsx("div",__assign({className:className},{children:jsxRuntime.jsx(StyledPersonaCard$2,__assign({upn:user.userPrincipalName},{children:user.displayName}),void 0)}),void 0);};var Label=function Label(_a){var resourceKey=_a.resourceKey,count=_a.count;return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(FormattedMessage$1,{id:resourceKey,values:{count:count||1}},void 0),":\u00A0"]},void 0);};var EventChannelsDisplay=function EventChannelsDisplay(_a){var _b;var item=_a.item,language=_a.language,className=_a.className,allowFilterByChannels=_a.allowFilterByChannels,channelBackgroundColor=_a.channelBackgroundColor;var buildPath=useSubscriptionHandlePathBuilder().buildPath;if(!((_b=item===null||item===void 0?void 0:item.channels)===null||_b===void 0?void 0:_b.length)){return null;}return jsxRuntime.jsx(Channels$2,{channels:item.channels.map(function(c){return c.name;}),language:language,buildChannelFilterUrl:allowFilterByChannels?function(c){return buildPath("/events?"+queryString.stringify({channels:c}));}:null,channelBackgroundColor:channelBackgroundColor,className:className},void 0);};var Host$N=_styled__default["default"].div.withConfig({displayName:"EventMetaInfo__Host",componentId:"sc-l9y854-0"})(templateObject_1$27||(templateObject_1$27=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n font-size: ","px;\n"],["\n display: flex;\n flex-wrap: wrap;\n font-size: ","px;\n"])),fontSizeSmall);var ListWrapper=_styled__default["default"].div.withConfig({displayName:"EventMetaInfo__ListWrapper",componentId:"sc-l9y854-1"})(templateObject_2$1j||(templateObject_2$1j=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n text-align: left;\n\n flex-direction: ",";\n\n ","\n"],["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n text-align: left;\n\n flex-direction: ",";\n\n ","\n"])),function(_a){var isMultiLine=_a.isMultiLine;return isMultiLine?'column':'row';},function(_a){var isMultiLine=_a.isMultiLine;return isMultiLine&&'> div:first-child { padding-bottom: 3px }';});var Contacts$1=_styled__default["default"](ListWrapper).withConfig({displayName:"EventMetaInfo__Contacts",componentId:"sc-l9y854-2"})(templateObject_3$U||(templateObject_3$U=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),function(p){return !p.hideAnnouncer?spacingXs:0;});var StyledPersonaCard$2=_styled__default["default"](PersonaCard).withConfig({displayName:"EventMetaInfo__StyledPersonaCard",componentId:"sc-l9y854-3"})(templateObject_4$F||(templateObject_4$F=__makeTemplateObject(["\n text-decoration: underline;\n"],["\n text-decoration: underline;\n"])));var List$2=_styled__default["default"].ul.withConfig({displayName:"EventMetaInfo__List",componentId:"sc-l9y854-4"})(templateObject_6$o||(templateObject_6$o=__makeTemplateObject(["\n ",";\n\n &&& {\n padding: 0;\n margin: 0;\n list-style: none;\n }\n\n > li {\n margin-top: ","px;\n }\n"],["\n ",";\n\n &&& {\n padding: 0;\n margin: 0;\n list-style: none;\n }\n\n > li {\n margin-top: ","px;\n }\n"])),function(_a){var isMultiLine=_a.isMultiLine;return !isMultiLine&&_styled.css(templateObject_5$z||(templateObject_5$z=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n align-items: center;\n "],["\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n align-items: center;\n "])));},function(_a){var isMultiLine=_a.isMultiLine;return isMultiLine?3:0;});var Channels$2=_styled__default["default"](ClickableChannelTitles).withConfig({displayName:"EventMetaInfo__Channels",componentId:"sc-l9y854-5"})(templateObject_7$j||(templateObject_7$j=__makeTemplateObject(["\n &&& li {\n margin-top: ","px;\n }\n"],["\n &&& li {\n margin-top: ","px;\n }\n"])),spacingS);var templateObject_1$27,templateObject_2$1j,templateObject_3$U,templateObject_4$F,templateObject_5$z,templateObject_6$o,templateObject_7$j;var BannerImage=function BannerImage(_a){var imageUrl=_a.imageUrl,children=_a.children,className=_a.className,openImageUrl=_a.openImageUrl;return jsxRuntime.jsxs(Host$M,__assign({onClick:function(){return openImageUrl&&showPhoto();},className:classNames('bannerImage',className)},{children:[jsxRuntime.jsx(officeUiFabricReact.Image,{src:imageUrl,imageFit:officeUiFabricReact.ImageFit.cover,maximizeFrame:true,alt:""},void 0),children]}),void 0);};var Host$M=_styled__default["default"].div.withConfig({displayName:"BannerImage__Host",componentId:"sc-1wfmp37-0"})(templateObject_1$26||(templateObject_1$26=__makeTemplateObject(["\n position: relative;\n height: inherit;\n\n /*\n The UI Fabric image component has a bug that it shows 1px on the left/ top\n or right side of the background when applying their cross browser image-fit: cover.\n This result in 1px gray/white \"border\".\n We just add 1px to the image width & height to cover this gap\n */\n .ms-Image {\n img {\n width: calc(100% + 1px);\n height: calc(100% + 1px);\n }\n }\n"],["\n position: relative;\n height: inherit;\n\n /*\n The UI Fabric image component has a bug that it shows 1px on the left/ top\n or right side of the background when applying their cross browser image-fit: cover.\n This result in 1px gray/white \"border\".\n We just add 1px to the image width & height to cover this gap\n */\n .ms-Image {\n img {\n width: calc(100% + 1px);\n height: calc(100% + 1px);\n }\n }\n"])));var templateObject_1$26;function useImageEditorApi(){var api=useApi();var _a=useApiFactory(),createApiUrl=_a.createApiUrl,fetchFromApi=_a.fetchFromApi;var onRequestToken=React$d.useContext(AuthenticationContext).onRequestToken;return React$d.useMemo(function(){return {getImageInfo:getImageInfo,getImageEditorUrl:getImageEditorUrl,getOriginalImageEditorUrlWithToken:getOriginalImageEditorUrlWithToken,getImageEditorUrlWithToken:getImageEditorUrlWithToken,uploadImage:uploadImage};/**
|
|
125884
|
+
$$6({target:'Array',proto:true,forced:!STRICT_METHOD$1||!USES_TO_LENGTH},{reduce:function reduce(callbackfn/* , initialValue */){return $reduce(this,callbackfn,arguments.length,arguments.length>1?arguments[1]:undefined);}});var KeywordsInfo=function KeywordsInfo(_a){var keywords=_a.keywords,language=_a.language,className=_a.className,filterBaseUrl=_a.filterBaseUrl;var selectedKeywordGroups=React$d.useContext(LazySubscriptionContext).selectedKeywordGroups;if(selectedKeywordGroups==null){return null;}var availableKeywordGroups=selectedKeywordGroups===null||selectedKeywordGroups===void 0?void 0:selectedKeywordGroups.reduce(function(result,next){var _a;return __assign(__assign({},result),(_a={},_a[next.id]=next,_a));},{});var flatKeywords=getFlatKeywordList(keywords);var hasKeywords=flatKeywords&&flatKeywords.length>0;if(!hasKeywords){return null;}return jsxRuntime.jsx(Host$O,__assign({"data-keywords":true},{children:renderKeywords()}),void 0);function renderKeywords(){var keywordsGroupsIds=Object.keys(keywords||[]);return keywordsGroupsIds.filter(function(id){return availableKeywordGroups[id];}).map(function(groupId){return keywords[groupId].length>0&&jsxRuntime.jsx(KeywordsGroup,{groupId:groupId,groupName:availableKeywordGroups[groupId].name,language:language,keywords:keywords,className:className,filterBaseUrl:filterBaseUrl},groupId);});}};var KeywordsGroup=function KeywordsGroup(_a){var groupId=_a.groupId,groupName=_a.groupName,keywords=_a.keywords,language=_a.language,className=_a.className,filterBaseUrl=_a.filterBaseUrl;return jsxRuntime.jsxs(KeywordsList$1,__assign({className:classNames('ms-fontColor-neutralSecondaryAlt',className)},{children:[jsxRuntime.jsxs(KeywordsListTitle,{children:[jsxRuntime.jsx(KeywordTitle,{groupName:groupName,language:language},void 0),":"]},void 0),keywords[groupId].map(function(k){var Title=jsxRuntime.jsx(KeywordTitle,{groupName:groupName,keywordName:k.name,language:language},void 0);return jsxRuntime.jsx(KeywordsListItem,{children:filterBaseUrl?jsxRuntime.jsx(ReactRouterDom.NavLink,__assign({"data-keyword":true,className:"ms-fontColor-neutralSecondaryAlt",to:filterBaseUrl+"?"+queryString.stringify({keywords:k.id})},{children:Title}),void 0):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[" ",Title," "]},void 0)},groupName+k.name);})]}),void 0);};var Host$O=_styled__default["default"].div.withConfig({displayName:"KeywordsInfo__Host",componentId:"sc-woteiy-0"})(templateObject_1$2a||(templateObject_1$2a=__makeTemplateObject(["\n padding-right: ","px;\n flex: 1; /* IE fix */\n @media (min-width: 700px) {\n padding-right: ","px;\n }\n"],["\n padding-right: ","px;\n flex: 1; /* IE fix */\n @media (min-width: 700px) {\n padding-right: ","px;\n }\n"])),spacingM,spacingXl);var KeywordsList$1=_styled__default["default"].dl.withConfig({displayName:"KeywordsInfo__KeywordsList",componentId:"sc-woteiy-1"})(templateObject_2$1n||(templateObject_2$1n=__makeTemplateObject(["\n width: 100%;\n margin: 0;\n\n + dl {\n margin-top: 5px;\n }\n"],["\n width: 100%;\n margin: 0;\n\n + dl {\n margin-top: 5px;\n }\n"])));var KeywordsListTitle=_styled__default["default"].dt.withConfig({displayName:"KeywordsInfo__KeywordsListTitle",componentId:"sc-woteiy-2"})(templateObject_3$X||(templateObject_3$X=__makeTemplateObject(["\n display: inline-block;\n padding-right: 5px;\n word-break: normal;\n"],["\n display: inline-block;\n padding-right: 5px;\n word-break: normal;\n"])));var KeywordsListItem=_styled__default["default"].dd.withConfig({displayName:"KeywordsInfo__KeywordsListItem",componentId:"sc-woteiy-3"})(templateObject_4$H||(templateObject_4$H=__makeTemplateObject(["\n display: inline-block;\n margin: 0;\n\n text-decoration: underline;\n\n &:not(:last-child) span::after {\n content: ',';\n padding-right: 5px;\n }\n"],["\n display: inline-block;\n margin: 0;\n\n text-decoration: underline;\n\n &:not(:last-child) span::after {\n content: ',';\n padding-right: 5px;\n }\n"])));var Keywords$3=function Keywords(_a){var keywords=_a.item.keywords,filterBaseUrl=_a.filterBaseUrl,className=_a.className,useGridKeywordTitle=_a.useGridKeywordTitle;var location=ReactRouterDom.useLocation();var currentParamsObject=queryString.parse(location.search);var selectedKeywordGroups=React$d.useContext(LazySubscriptionContext).selectedKeywordGroups;if(selectedKeywordGroups==null){return null;}var availableKeywordGroups=selectedKeywordGroups===null||selectedKeywordGroups===void 0?void 0:selectedKeywordGroups.reduce(function(result,next){var _a;return __assign(__assign({},result),(_a={},_a[next.id]=next,_a));},{});var keywordsGroupsIds=Object.keys(keywords||[]);return jsxRuntime.jsx("span",__assign({className:className},{children:keywordsGroupsIds.filter(function(id){return availableKeywordGroups[id];}).map(function(groupId){return keywords[groupId].map(function(keyword){currentParamsObject.keywords=keyword.id;if(filterBaseUrl){return jsxRuntime.jsx(ReactRouterDom.NavLink,__assign({"data-keyword":true,to:filterBaseUrl+"?"+queryString.stringify(currentParamsObject)},{children:useGridKeywordTitle?jsxRuntime.jsx(GridKeywordTitle,{keywordName:keyword.name,groupId:groupId},void 0):jsxRuntime.jsx(KeywordTitle,{keywordName:keyword.name,groupId:groupId,underlined:true},void 0)}),groupId+keyword.id);}return useGridKeywordTitle?jsxRuntime.jsx(GridKeywordTitle,{keywordName:keyword.name,groupId:groupId},groupId+keyword.id):jsxRuntime.jsx(KeywordTitle,{keywordName:keyword.name,groupId:groupId},groupId+keyword.id);});}).reduce(function(result,next){return result.concat(next);},[])}),void 0);};var FlatKeywords=_styled__default["default"](Keywords$3).withConfig({displayName:"KeywordsInfo__FlatKeywords",componentId:"sc-woteiy-4"})(templateObject_5$B||(templateObject_5$B=__makeTemplateObject(["\n > a,\n > a:link,\n > a:visited,\n > span {\n color: ",";\n\n &:not(:last-child) {\n &::after {\n content: ', ';\n }\n }\n }\n\n a {\n position: relative;\n z-index: 1;\n }\n"],["\n > a,\n > a:link,\n > a:visited,\n > span {\n color: ",";\n\n &:not(:last-child) {\n &::after {\n content: ', ';\n }\n }\n }\n\n a {\n position: relative;\n z-index: 1;\n }\n"])),function(p){return p.theme.palette.neutralSecondaryAlt;});var templateObject_1$2a,templateObject_2$1n,templateObject_3$X,templateObject_4$H,templateObject_5$B;var NewsService=/** @class */function(){function NewsService(){}NewsService.getNewsRoute=function(baseRoute,newsId,newsTitle,isExternalContent){var route=baseRoute+"/"+encodeURIComponent(newsId);if(newsTitle){route=route+"/"+slugify(newsTitle,{remove:/[%.#]/});}return isExternalContent?route+"?"+queryString.stringify({noRedirect:true}):route;};NewsService.getItemContentLanguages=function(item,languages){if(!item){return [];}return NewsService.getContentLanguages(item.contents,languages);};NewsService.getContentLanguages=function(contents,languages,contentValidator){if(!contents){return [];}var allLanguages=Object.keys(contents);if(!allLanguages.length){return [];}var activeLanguages=allLanguages.filter(function(l){return contents[l].active&&languages.find(function(sl){return sl.code===l;})&&(!contentValidator||contentValidator(contents[l]));});if(contentValidator){return activeLanguages;}return activeLanguages.length?activeLanguages:[allLanguages[0]];};NewsService.getLanguageForPublishableItem=function(item,user,contentValidator){if(!user||!item||!item.contents||!user.subscription){return null;}return NewsService.getLanguageForContent(item.contents,user,contentValidator);};NewsService.getLanguageForContent=function(contents,user,contentValidator){if(!contents){return null;}var activeLanguages=NewsService.getContentLanguages(contents,user.subscription.languages,contentValidator);return NewsService.getUserPreferredLanguage(activeLanguages,user);};NewsService.getUserPreferredLanguage=function(languages,user){if(!languages){return null;}var preferredLanguage=getPreferredContentLanguage(user);var subscription=user.subscription;if(languages.find(function(l){return l===preferredLanguage;})){return preferredLanguage;}if(languages.find(function(l){return l===subscription.defaultLanguage;})){return subscription.defaultLanguage;}return languages[0];};return NewsService;}();var ClickableOverlay=function ClickableOverlay(_a){var title=_a.title,itemId=_a.itemId,itemType=_a.itemType,baseRoute=_a.baseRoute,ariaLabelResourceKey=_a.ariaLabelResourceKey,onClick=_a.onClick,openTargetInNewWindow=_a.openTargetInNewWindow,isExternalContent=_a.isExternalContent;var formatMessage=useIntl().formatMessage;var targetRoute=itemType===ItemResourceTypes.Posts||itemType===ItemResourceTypes.Comments?baseRoute:NewsService.getNewsRoute(baseRoute,itemId,title,isExternalContent);if(openTargetInNewWindow){return jsxRuntime.jsx(ExternalLink$1,{href:targetRoute,target:"_blank",rel:"noopener noreferrer",onClick:onClick,"aria-label":ariaLabelResourceKey?formatMessage({id:ariaLabelResourceKey}):formatMessage({id:'AriaLabel.readMoreAbout'},{title:title}),"data-clickable-overlay":true},void 0);}return jsxRuntime.jsx(StyledLink$1,{to:targetRoute,onClick:onClick,"aria-label":ariaLabelResourceKey?formatMessage({id:ariaLabelResourceKey}):formatMessage({id:'AriaLabel.readMoreAbout'},{title:title}),"data-clickable-overlay":true},void 0);};var Style=_styled.css(templateObject_1$29||(templateObject_1$29=__makeTemplateObject(["\n width: 0;\n height: 0;\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 1;\n }\n"],["\n width: 0;\n height: 0;\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 1;\n }\n"])));var StyledLink$1=_styled__default["default"](ReactRouterDom.Link).withConfig({displayName:"ClickableOverlay__StyledLink",componentId:"sc-yfxl9c-0"})(templateObject_2$1m||(templateObject_2$1m=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),Style);var ExternalLink$1=_styled__default["default"].a.withConfig({displayName:"ClickableOverlay__ExternalLink",componentId:"sc-yfxl9c-1"})(templateObject_3$W||(templateObject_3$W=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),Style);var templateObject_1$29,templateObject_2$1m,templateObject_3$W;var PostItemTile=function PostItemTile(_a){var post=_a.post,readOnly=_a.readOnly,backgroundColor=_a.backgroundColor,className=_a.className;var features=useFeatures();var buildPath=useSubscriptionHandlePathBuilder().buildPath;return jsxRuntime.jsxs(PostHost,__assign({className:className,backgroundColor:backgroundColor},{children:[!readOnly&&jsxRuntime.jsx(ClickableOverlay,{baseRoute:buildPath("/posts/"+post.id),itemId:post.id,itemType:ItemResourceTypes.Posts,ariaLabelResourceKey:"AriaLabel.itemLink"},void 0),jsxRuntime.jsxs(Header$3,{children:[jsxRuntime.jsx(StyledPersonaCard$3,__assign({upn:post.author.userPrincipalName,domIdentifier:"avatar"},{children:jsxRuntime.jsx(Avatar,{upn:post.author.userPrincipalName,text:post.author.displayName,size:officeUiFabricReact.PersonaSize.size40,hidePersonaDetails:true},void 0)}),void 0),jsxRuntime.jsxs(HeaderMetadata$2,{children:[jsxRuntime.jsx(PostDisplayName$1,__assign({"data-author":true},{children:post.author.displayName}),void 0),jsxRuntime.jsx(PostDateTime$1,{className:"ms-fontColor-neutralTertiary",value:post.publishingDate},void 0),jsxRuntime.jsx(Modified,{modified:post.modified},void 0)]},void 0)]},void 0),jsxRuntime.jsx(Content$8,{children:jsxRuntime.jsx(ContentDisplay,{content:post.content,handlers:[ContentDisplayHandler.LineBreak,ContentDisplayHandler.Link,ContentDisplayHandler.Mention,ContentDisplayHandler.Hashtag]},void 0)},void 0),features.keywords&&features.postKeywords&&post.keywords&&jsxRuntime.jsx(StyledKeywordsInfo$1,{keywords:post.keywords},void 0)]}),void 0);};var PostHost=_styled__default["default"].div.withConfig({displayName:"PostItemTile__PostHost",componentId:"sc-yu434m-0"})(templateObject_3$V||(templateObject_3$V=__makeTemplateObject(["\n ","\n\n display: flex;\n flex-direction: column;\n\n font-size: ","px;\n padding: ","px;\n\n position: relative;\n"],["\n ","\n\n display: flex;\n flex-direction: column;\n\n font-size: ","px;\n padding: ","px;\n\n position: relative;\n"])),function(p){return p.backgroundColor?_styled.css(templateObject_1$28||(templateObject_1$28=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.backgroundColor):_styled.css(templateObject_2$1l||(templateObject_2$1l=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.white);},fontSizeSmall,spacingM);var Header$3=_styled__default["default"].div.withConfig({displayName:"PostItemTile__Header",componentId:"sc-yu434m-1"})(templateObject_4$G||(templateObject_4$G=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledPersonaCard$3=_styled__default["default"](PersonaCard).withConfig({displayName:"PostItemTile__StyledPersonaCard",componentId:"sc-yu434m-2"})(templateObject_5$A||(templateObject_5$A=__makeTemplateObject(["\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var HeaderMetadata$2=_styled__default["default"].div.withConfig({displayName:"PostItemTile__HeaderMetadata",componentId:"sc-yu434m-3"})(templateObject_6$p||(templateObject_6$p=__makeTemplateObject(["\n flex: 1;\n font-size: ","px;\n padding-left: ","px;\n white-space: nowrap;\n"],["\n flex: 1;\n font-size: ","px;\n padding-left: ","px;\n white-space: nowrap;\n"])),fontSizeSmall,spacingS);var PostDisplayName$1=_styled__default["default"].div.withConfig({displayName:"PostItemTile__PostDisplayName",componentId:"sc-yu434m-4"})(templateObject_7$k||(templateObject_7$k=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var PostDateTime$1=_styled__default["default"](DateTime).withConfig({displayName:"PostItemTile__PostDateTime",componentId:"sc-yu434m-5"})(templateObject_8$i||(templateObject_8$i=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeSmaller);var Content$8=_styled__default["default"].div.withConfig({displayName:"PostItemTile__Content",componentId:"sc-yu434m-6"})(templateObject_9$e||(templateObject_9$e=__makeTemplateObject(["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var StyledKeywordsInfo$1=_styled__default["default"](KeywordsInfo).withConfig({displayName:"PostItemTile__StyledKeywordsInfo",componentId:"sc-yu434m-7"})(templateObject_10$c||(templateObject_10$c=__makeTemplateObject(["\n margin-top: ","px;\n\n dd {\n text-decoration: none;\n }\n"],["\n margin-top: ","px;\n\n dd {\n text-decoration: none;\n }\n"])),spacingM);var templateObject_1$28,templateObject_2$1l,templateObject_3$V,templateObject_4$G,templateObject_5$A,templateObject_6$p,templateObject_7$k,templateObject_8$i,templateObject_9$e,templateObject_10$c;var EventLocationLink=function EventLocationLink(_a){var location=_a.location,alternativeCaption=_a.alternativeCaption,className=_a.className;var locationLink=location.url||getGoogleMapsSearchLink(location.locationOnMap);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:locationLink?jsxRuntime.jsx(TextLink,__assign({url:locationLink,ariaLabel:alternativeCaption||location.name},{children:alternativeCaption||location.name}),void 0):jsxRuntime.jsx("span",__assign({className:className},{children:alternativeCaption||location.name}),void 0)},void 0);};var EventLocationInfo=function EventLocationInfo(_a){var locations=_a.locations,className=_a.className;if(!locations||locations.length===0){return null;}var isMultiLine=locations.length>1;return jsxRuntime.jsx(Host$N,__assign({className:className},{children:jsxRuntime.jsxs(ListWrapper,__assign({"data-event-locations":true,isMultiLine:isMultiLine},{children:[jsxRuntime.jsx(Label,{resourceKey:"Events.locationsLabel",count:locations.length},void 0),jsxRuntime.jsx(List$2,__assign({isMultiLine:isMultiLine},{children:locations.map(function(l){return jsxRuntime.jsx("li",{children:jsxRuntime.jsx(EventLocationLink,{location:l},void 0)},l.locationId);})}),void 0)]}),void 0)}),void 0);};var EventPeopleInfo=function EventPeopleInfo(_a){var item=_a.item,className=_a.className,hideAnnouncer=_a.hideAnnouncer;var author=item.owner||item.author;var contactsCount=item.contacts&&item.contacts.length;if(hideAnnouncer&&contactsCount===0){return null;}var isMultiLine=contactsCount>1;return jsxRuntime.jsxs(Host$N,__assign({className:className},{children:[contactsCount>0&&jsxRuntime.jsxs(Contacts$1,__assign({"data-event-people":"contacts",isMultiLine:isMultiLine,hideAnnouncer:hideAnnouncer},{children:[jsxRuntime.jsx(Label,{resourceKey:"Events.contactsLabel",count:contactsCount},void 0),jsxRuntime.jsx(List$2,__assign({isMultiLine:isMultiLine},{children:item.contacts.map(function(c){return jsxRuntime.jsx("li",{children:jsxRuntime.jsx(EventUser,{user:c,className:"ms-fontColor-accent"},void 0)},c.userPrincipalName);})}),void 0)]}),void 0),!hideAnnouncer&&author&&jsxRuntime.jsxs(ListWrapper,__assign({"data-event-people":"author",isMultiLine:false},{children:[jsxRuntime.jsx(Label,{resourceKey:"Events.authorLabel"},void 0),jsxRuntime.jsx(EventUser,{user:author,className:"ms-fontColor-accent"},void 0)]}),void 0)]}),void 0);};var EventUser=function EventUser(_a){var user=_a.user,className=_a.className;return jsxRuntime.jsx("div",__assign({className:className},{children:jsxRuntime.jsx(StyledPersonaCard$2,__assign({upn:user.userPrincipalName},{children:user.displayName}),void 0)}),void 0);};var Label=function Label(_a){var resourceKey=_a.resourceKey,count=_a.count;return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(FormattedMessage$1,{id:resourceKey,values:{count:count||1}},void 0),":\u00A0"]},void 0);};var EventChannelsDisplay=function EventChannelsDisplay(_a){var _b;var item=_a.item,language=_a.language,className=_a.className,allowFilterByChannels=_a.allowFilterByChannels,channelBackgroundColor=_a.channelBackgroundColor;var buildPath=useSubscriptionHandlePathBuilder().buildPath;if(!((_b=item===null||item===void 0?void 0:item.channels)===null||_b===void 0?void 0:_b.length)){return null;}return jsxRuntime.jsx(Channels$2,{channels:item.channels.map(function(c){return c.name;}),language:language,buildChannelFilterUrl:allowFilterByChannels?function(c){return buildPath("/events?"+queryString.stringify({channels:c}));}:null,channelBackgroundColor:channelBackgroundColor,className:className},void 0);};var Host$N=_styled__default["default"].div.withConfig({displayName:"EventMetaInfo__Host",componentId:"sc-l9y854-0"})(templateObject_1$27||(templateObject_1$27=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n font-size: ","px;\n"],["\n display: flex;\n flex-wrap: wrap;\n font-size: ","px;\n"])),fontSizeSmall);var ListWrapper=_styled__default["default"].div.withConfig({displayName:"EventMetaInfo__ListWrapper",componentId:"sc-l9y854-1"})(templateObject_2$1k||(templateObject_2$1k=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n text-align: left;\n\n flex-direction: ",";\n\n ","\n"],["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n text-align: left;\n\n flex-direction: ",";\n\n ","\n"])),function(_a){var isMultiLine=_a.isMultiLine;return isMultiLine?'column':'row';},function(_a){var isMultiLine=_a.isMultiLine;return isMultiLine&&'> div:first-child { padding-bottom: 3px }';});var Contacts$1=_styled__default["default"](ListWrapper).withConfig({displayName:"EventMetaInfo__Contacts",componentId:"sc-l9y854-2"})(templateObject_3$U||(templateObject_3$U=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),function(p){return !p.hideAnnouncer?spacingXs:0;});var StyledPersonaCard$2=_styled__default["default"](PersonaCard).withConfig({displayName:"EventMetaInfo__StyledPersonaCard",componentId:"sc-l9y854-3"})(templateObject_4$F||(templateObject_4$F=__makeTemplateObject(["\n text-decoration: underline;\n"],["\n text-decoration: underline;\n"])));var List$2=_styled__default["default"].ul.withConfig({displayName:"EventMetaInfo__List",componentId:"sc-l9y854-4"})(templateObject_6$o||(templateObject_6$o=__makeTemplateObject(["\n ",";\n\n &&& {\n padding: 0;\n margin: 0;\n list-style: none;\n }\n\n > li {\n margin-top: ","px;\n }\n"],["\n ",";\n\n &&& {\n padding: 0;\n margin: 0;\n list-style: none;\n }\n\n > li {\n margin-top: ","px;\n }\n"])),function(_a){var isMultiLine=_a.isMultiLine;return !isMultiLine&&_styled.css(templateObject_5$z||(templateObject_5$z=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n align-items: center;\n "],["\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n align-items: center;\n "])));},function(_a){var isMultiLine=_a.isMultiLine;return isMultiLine?3:0;});var Channels$2=_styled__default["default"](ClickableChannelTitles).withConfig({displayName:"EventMetaInfo__Channels",componentId:"sc-l9y854-5"})(templateObject_7$j||(templateObject_7$j=__makeTemplateObject(["\n &&& li {\n margin-top: ","px;\n }\n"],["\n &&& li {\n margin-top: ","px;\n }\n"])),spacingS);var templateObject_1$27,templateObject_2$1k,templateObject_3$U,templateObject_4$F,templateObject_5$z,templateObject_6$o,templateObject_7$j;var BannerImage=function BannerImage(_a){var imageUrl=_a.imageUrl,children=_a.children,className=_a.className,openImageUrl=_a.openImageUrl;return jsxRuntime.jsxs(Host$M,__assign({onClick:function(){return openImageUrl&&showPhoto();},className:classNames('bannerImage',className)},{children:[jsxRuntime.jsx(officeUiFabricReact.Image,{src:imageUrl,imageFit:officeUiFabricReact.ImageFit.cover,maximizeFrame:true,alt:""},void 0),children]}),void 0);};var Host$M=_styled__default["default"].div.withConfig({displayName:"BannerImage__Host",componentId:"sc-1wfmp37-0"})(templateObject_1$26||(templateObject_1$26=__makeTemplateObject(["\n position: relative;\n height: inherit;\n\n /*\n The UI Fabric image component has a bug that it shows 1px on the left/ top\n or right side of the background when applying their cross browser image-fit: cover.\n This result in 1px gray/white \"border\".\n We just add 1px to the image width & height to cover this gap\n */\n .ms-Image {\n img {\n width: calc(100% + 1px);\n height: calc(100% + 1px);\n }\n }\n"],["\n position: relative;\n height: inherit;\n\n /*\n The UI Fabric image component has a bug that it shows 1px on the left/ top\n or right side of the background when applying their cross browser image-fit: cover.\n This result in 1px gray/white \"border\".\n We just add 1px to the image width & height to cover this gap\n */\n .ms-Image {\n img {\n width: calc(100% + 1px);\n height: calc(100% + 1px);\n }\n }\n"])));var templateObject_1$26;function useImageEditorApi(){var api=useApi();var _a=useApiFactory(),createApiUrl=_a.createApiUrl,fetchFromApi=_a.fetchFromApi;var onRequestToken=React$d.useContext(AuthenticationContext).onRequestToken;return React$d.useMemo(function(){return {getImageInfo:getImageInfo,getImageEditorUrl:getImageEditorUrl,getOriginalImageEditorUrlWithToken:getOriginalImageEditorUrlWithToken,getImageEditorUrlWithToken:getImageEditorUrlWithToken,uploadImage:uploadImage};/**
|
|
125877
125885
|
* Retrieve information on a given image. Does not return the actual image.
|
|
125878
125886
|
*/function getImageInfo(itemId,identifier,resourceType){var path="editor/"+resourceType+"/"+itemId+"/images/"+identifier;return api.custom(path+"/info").get().then(function(res){return res.body().data();});}function getImageEditorUrl(itemId,subscriptionId,identifier,resourceType){return __awaiter(this,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,onRequestToken()];case 1:token=_a.sent();return [2/*return*/,getImageEditorUrlWithToken(token,itemId,subscriptionId,identifier,resourceType)];}});});}function getImageEditorUrlWithToken(token,itemId,subscriptionId,identifier,resourceType,width,height){var url=width?"/editor/"+resourceType+"/"+itemId+"/images/"+identifier+"/"+width+"/"+(height||''):"/editor/"+resourceType+"/"+itemId+"/images/"+identifier;return createApiUrl(url,{access_token:token,subscriptionId:subscriptionId});}function getOriginalImageEditorUrlWithToken(token,itemId,subscriptionId,identifier,resourceType){return createApiUrl("/editor/"+resourceType+"/"+itemId+"/images/"+identifier+"/original",{access_token:token,subscriptionId:subscriptionId});}function uploadImage(subscriptionId,resourceType,newImage){return __awaiter(this,void 0,void 0,function(){var fd,token,config;return __generator(this,function(_a){switch(_a.label){case 0:// validate or set defaults
|
|
125879
125887
|
if(!newImage.identifier){// identifer defaults to 'banner'
|
|
@@ -125881,11 +125889,11 @@
|
|
|
125881
125889
|
// any promise failures are expected be handled from the code consuming the observable
|
|
125882
125890
|
return [4/*yield*/,fetchFromApi("/editor/"+resourceType+"/"+newImage.itemId+"/images/"+newImage.identifier+"/"+newImage.variant,config)];case 2:// error handling is not done here
|
|
125883
125891
|
// any promise failures are expected be handled from the code consuming the observable
|
|
125884
|
-
_a.sent();return [2/*return*/,{itemId:newImage.itemId,identifier:newImage.identifier,mimeType:newImage.image.type,extension:newImage.image.name.split('.').pop()}];}});});}},[api,createApiUrl,fetchFromApi,onRequestToken]);}var PublishableItemBanner=function PublishableItemBanner(props){var getImageUrlWithToken=useNewsApi().getImageUrlWithToken;var _a=useVideosApi(),getBannerVideoThumbnailUrl=_a.getBannerVideoThumbnailUrl,getVideoThumbnailUrl=_a.getVideoThumbnailUrl;var getImageEditorUrlWithToken=useImageEditorApi().getImageEditorUrlWithToken;var _b=React$d.useState(false),showPlayer=_b[0],setShowPlayer=_b[1];var user=useCurrentUser();var features=useFeatures();var onOpenExternalLink=React$d.useContext(LinkContext).onOpenExternalLink;var formatMessage=useIntl().formatMessage;React$d.useEffect(function(){if(props.hidePlayerIfActive){setShowPlayer(false);}},[props.hidePlayerIfActive]);if(!props.token||!props.bannerInfo){return null;}var isEdit=props.mode==='edit';var isImage=props.bannerInfo.type==='image';var imageUrl=getImageUrl(isEdit,isImage,props.width,props.height);var isStreamVideo=props.bannerInfo.videoSource===VideoSource.MicrosoftStream;var streamVideoUrl=isStreamVideo&&getMicrosoftStreamVideoUrl(props.bannerInfo.videoId);var isPlayableVideo=!isImage&&!(isStreamVideo&&env.isNativeMobileApp);if(isPlayableVideo&&showPlayer){return jsxRuntime.jsx(StyledVideoView,{videoInfo:{id:props.bannerInfo.videoId,source:props.bannerInfo.videoSource,url:props.bannerInfo.videoUrl,isDirectUrl:props.bannerInfo.isDirectVideoUrl},autoplay:true,className:props.className},void 0);}return jsxRuntime.jsxs(StyledBannerImage,__assign({isVideo:!isImage,imageUrl:imageUrl,openImageUrl:props.canOpenImage&&env.isNativeMobileApp?getImageUrl(isEdit,true,'default'):null,className:props.className},{children:[isPlayableVideo&&jsxRuntime.jsx(VideoButtonOverlay,{onClick:handlePlayClick,iconProps:{iconName:'MSNVideosSolid',className:'video-icon'},ariaLabel:formatMessage({id:'Generic.watchVideo'})},void 0),isStreamVideo&&env.isNativeMobileApp&&(features.inAppBrowser?jsxRuntime.jsx(VideoLinkOverlay,__assign({url:streamVideoUrl,onClick:function(e){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:e.stopPropagation();e.preventDefault();return [4/*yield*/,onOpenExternalLink(streamVideoUrl)];case 1:_a.sent();return [2/*return*/];}});});},ariaLabel:formatMessage({id:'Generic.watchMicrosoftStream'})},{children:jsxRuntime.jsx(VideoIcon,{iconName:"MSNVideosSolid",className:"video-icon"},void 0)}),void 0):jsxRuntime.jsx(VideoLinkOverlay,__assign({url:streamVideoUrl,ariaLabel:formatMessage({id:'Generic.watchMicrosoftStream'})},{children:jsxRuntime.jsx(VideoIcon,{iconName:"MSNVideosSolid",className:"video-icon"},void 0)}),void 0))]}),void 0);function getImageUrl(isEdit,isImage,width,height){var _a;if(isImage){return isEdit?getImageEditorUrlWithToken(props.token,props.itemId,user.subscription.id,props.bannerInfo.imageId,props.resourceType):getImageUrlWithToken(props.token,props.itemId,user.subscription.id,props.resourceType,props.bannerInfo.imageId,width,height);}else {return (_a=new VideoUrlParser(props.bannerInfo.videoUrl).thumbnailUrl)!==null&&_a!==void 0?_a:isEdit?getVideoThumbnailUrl(props.token,user.subscription.id,props.bannerInfo.videoSource,props.bannerInfo.videoId):getBannerVideoThumbnailUrl(props.token,props.itemId,user.subscription.id,props.resourceType);}}function handlePlayClick(e){var _a;e.stopPropagation();e.preventDefault();setShowPlayer(true);(_a=props.onPlayButtonClick)===null||_a===void 0?void 0:_a.call(props);}};var StyledBannerImage=_styled__default["default"](BannerImage).withConfig({displayName:"PublishableItemBanner__StyledBannerImage",componentId:"sc-bjnycc-0"})(templateObject_2$1i||(templateObject_2$1i=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.isVideo&&_styled.css(templateObject_1$25||(templateObject_1$25=__makeTemplateObject(["\n position: relative;\n "],["\n position: relative;\n "])));});var BannerVideoOverlay=_styled.css(templateObject_3$T||(templateObject_3$T=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n .video-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &:hover {\n .video-icon {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n .video-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &:hover {\n .video-icon {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n"])));var VideoIconStyle=_styled.css(templateObject_4$E||(templateObject_4$E=__makeTemplateObject(["\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n"],["\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n"])));var VideoButtonOverlay=_styled__default["default"](officeUiFabricReact.IconButton).withConfig({displayName:"PublishableItemBanner__VideoButtonOverlay",componentId:"sc-bjnycc-1"})(templateObject_5$y||(templateObject_5$y=__makeTemplateObject(["\n && {\n width: 100%;\n height: 100%;\n border: 0;\n margin: 0;\n padding: 0;\n z-index: 1;\n border-radius: 0;\n\n ","\n\n i.video-icon {\n ","\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n }\n }\n"],["\n && {\n width: 100%;\n height: 100%;\n border: 0;\n margin: 0;\n padding: 0;\n z-index: 1;\n border-radius: 0;\n\n ","\n\n i.video-icon {\n ","\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n }\n }\n"])),BannerVideoOverlay,VideoIconStyle);var VideoLinkOverlay=_styled__default["default"](ExternalLinkHandler).withConfig({displayName:"PublishableItemBanner__VideoLinkOverlay",componentId:"sc-bjnycc-2"})(templateObject_6$n||(templateObject_6$n=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),BannerVideoOverlay);var VideoIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PublishableItemBanner__VideoIcon",componentId:"sc-bjnycc-3"})(templateObject_7$i||(templateObject_7$i=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),VideoIconStyle);var StyledVideoView=_styled__default["default"](VideoView).withConfig({displayName:"PublishableItemBanner__StyledVideoView",componentId:"sc-bjnycc-4"})(templateObject_8$h||(templateObject_8$h=__makeTemplateObject(["\n height: 100%;\n"],["\n height: 100%;\n"])));var templateObject_1$25,templateObject_2$1i,templateObject_3$T,templateObject_4$E,templateObject_5$y,templateObject_6$n,templateObject_7$i,templateObject_8$h;var EventCardBanner=function EventCardBanner(_a){var item=_a.item,bannerWidth=_a.bannerWidth,bannerHostDefaultWidth=_a.bannerHostDefaultWidth,showPlaceholder=_a.showPlaceholder;if(!item.bannerInfo&&!showPlaceholder){return null;}return jsxRuntime.jsx("div",{children:jsxRuntime.jsx(LeftBannerWrapper,__assign({defaultWidth:bannerHostDefaultWidth,showPlaceholder:showPlaceholder},{children:jsxRuntime.jsx(PublishableItemBanner,{itemId:item.id,bannerInfo:item.bannerInfo,mode:"read",width:bannerWidth,token:item.fileAccessToken,resourceType:ItemResourceTypes.Events},void 0)}),void 0)},void 0);};var FeedbackCountButton=function FeedbackCountButton(_a){var className=_a.className,isActive=_a.isActive,activeIconName=_a.activeIconName,count=_a.count,iconName=_a.iconName,onClick=_a.onClick,readOnly=_a.readOnly,tooltipResourceKey=_a.tooltipResourceKey,tooltipResourceKeyValues=_a.tooltipResourceKeyValues,activeTooltipResourceKey=_a.activeTooltipResourceKey,activeTooltipResourceKeyValues=_a.activeTooltipResourceKeyValues,ariaLabel=_a.ariaLabel,feedbackType=_a.feedbackType,highlight=_a.highlight,hideZeroCount=_a.hideZeroCount,doNotRenderZeroCount=_a.doNotRenderZeroCount,hideTooltip=_a.hideTooltip;var resourceKey=isActive?activeTooltipResourceKey||tooltipResourceKey:tooltipResourceKey;var resourceValues=isActive?activeTooltipResourceKeyValues||tooltipResourceKeyValues:tooltipResourceKeyValues;return jsxRuntime.jsxs(CountButtonHost,__assign({className:className,"data-feedback":feedbackType,"data-feedback-button-isactive":isActive!==null&&isActive!==void 0?isActive:false,"data-feedback-count":count},{children:[jsxRuntime.jsx(IEMarginFix,{},void 0),jsxRuntime.jsx(PreloadIcons,{icons:[activeIconName,iconName]},void 0),jsxRuntime.jsx(TooltipHost,__assign({resourceKey:resourceKey,values:resourceValues,hidden:hideTooltip},{children:onClick?jsxRuntime.jsx(StyledIconButton$6,__assign({onClick:onClick,iconProps:{iconName:isActive?activeIconName:iconName},"data-feedback-button":feedbackType,disabled:readOnly,highlight:highlight,"data-unread-comment-highlight":highlight,ariaLabel:ariaLabel},{children:jsxRuntime.jsx(CountDisplay,{count:count,doNotRenderZeroCount:doNotRenderZeroCount,hideZeroCount:hideZeroCount},void 0)}),void 0):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(StyledIcon$7,{iconName:isActive?activeIconName:iconName,highlight:highlight,"data-unread-comment-highlight":highlight},void 0),jsxRuntime.jsx(CountDisplay,{count:count,doNotRenderZeroCount:doNotRenderZeroCount,hideZeroCount:hideZeroCount,ariaLabel:ariaLabel},void 0)]},void 0)}),void 0)]}),void 0);};var CountDisplay=function CountDisplay(_a){var count=_a.count,hideZeroCount=_a.hideZeroCount,doNotRenderZeroCount=_a.doNotRenderZeroCount,ariaLabel=_a.ariaLabel;var shouldNotRenderZeroCount=doNotRenderZeroCount&&!count;if(shouldNotRenderZeroCount){return null;}var shouldHideZeroCount=hideZeroCount&&!count;return jsxRuntime.jsx(CountLabel,__assign({isHidden:shouldHideZeroCount,"aria-label":ariaLabel},{children:count}),void 0);};var TooltipHost=_styled__default["default"](Tooltip).withConfig({displayName:"FeedbackCountButton__TooltipHost",componentId:"sc-vg1ry1-0"})(templateObject_1$24||(templateObject_1$24=__makeTemplateObject(["\n && {\n display: flex;\n height: 100%;\n align-items: center;\n }\n"],["\n && {\n display: flex;\n height: 100%;\n align-items: center;\n }\n"])));var CountButtonHost=_styled__default["default"].div.withConfig({displayName:"FeedbackCountButton__CountButtonHost",componentId:"sc-vg1ry1-1"})(templateObject_2$1h||(templateObject_2$1h=__makeTemplateObject(["\n display: flex;\n align-items: center;\n min-width: 60px;\n height: ","px; // ensure same height for feedback buttons\n\n margin-right: 9px;\n"],["\n display: flex;\n align-items: center;\n min-width: 60px;\n height: ","px; // ensure same height for feedback buttons\n\n margin-right: 9px;\n"])),feedbackButtonHeight);var IEMarginFix=_styled.createGlobalStyle(templateObject_3$S||(templateObject_3$S=__makeTemplateObject(["\n .browser-name-ie {\n "," {\n margin-right: 20px;\n }\n }\n"],["\n .browser-name-ie {\n "," {\n margin-right: 20px;\n }\n }\n"])),CountButtonHost);var StyledIconButton$6=_styled__default["default"](IconButton).withConfig({displayName:"FeedbackCountButton__StyledIconButton",componentId:"sc-vg1ry1-2"})(templateObject_4$D||(templateObject_4$D=__makeTemplateObject(["\n && {\n margin: 0;\n padding: 0;\n width: 100%;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 22px;\n margin: 0;\n ","\n }\n\n user-select: none;\n"],["\n && {\n margin: 0;\n padding: 0;\n width: 100%;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 22px;\n margin: 0;\n ","\n }\n\n user-select: none;\n"])),function(p){return p.highlight&&unreadCommentHighlight;});var StyledIcon$7=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"FeedbackCountButton__StyledIcon",componentId:"sc-vg1ry1-3"})(templateObject_5$x||(templateObject_5$x=__makeTemplateObject(["\n font-size: 22px;\n user-select: none;\n\n ","\n"],["\n font-size: 22px;\n user-select: none;\n\n ","\n"])),function(p){return p.highlight&&unreadCommentHighlight;});var CountLabel=_styled__default["default"].span.withConfig({displayName:"FeedbackCountButton__CountLabel",componentId:"sc-vg1ry1-4"})(templateObject_8$g||(templateObject_8$g=__makeTemplateObject(["\n margin-left: 7px;\n word-break: normal;\n align-self: center;\n ","\n ","\n"],["\n margin-left: 7px;\n word-break: normal;\n align-self: center;\n ","\n ","\n"])),function(p){return p.isHidden&&_styled.css(templateObject_6$m||(templateObject_6$m=__makeTemplateObject(["\n visibility: hidden;\n "],["\n visibility: hidden;\n "])));},function(p){return p.isDisabled&&_styled.css(templateObject_7$h||(templateObject_7$h=__makeTemplateObject(["\n color: ",";\n "],["\n color: ",";\n "])),p.theme.palette.neutralQuaternary);});var PreloadIcons=function PreloadIcons(_a){var icons=_a.icons;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:icons.filter(function(i){return i;}).map(function(i){return jsxRuntime.jsx(PreloadIcon,{iconName:i},i);})},void 0);};var PreloadIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"FeedbackCountButton__PreloadIcon",componentId:"sc-vg1ry1-5"})(templateObject_9$d||(templateObject_9$d=__makeTemplateObject(["\n position: fixed;\n left: -500px;\n"],["\n position: fixed;\n left: -500px;\n"])));var templateObject_1$24,templateObject_2$1h,templateObject_3$S,templateObject_4$D,templateObject_5$x,templateObject_6$m,templateObject_7$h,templateObject_8$g,templateObject_9$d;var EventCardCommentCount=function EventCardCommentCount(_a){var item=_a.item;var formatMessage=useIntl().formatMessage;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(IEFix$1,{},void 0),jsxRuntime.jsx(StyledFeedbackCountButton,{tooltipResourceKey:"Events.numberOfComments",tooltipResourceKeyValues:{count:item.statistics.commentCount},ariaLabel:formatMessage({id:'AriaLabel.commentsButton'}),iconName:"Chat",count:item.statistics.commentCount,feedbackType:"comment",highlight:item.hasNewComments,className:"event-card-comments"},void 0)]},void 0);};var StyledFeedbackCountButton=_styled__default["default"](FeedbackCountButton).withConfig({displayName:"EventCardCommentCount__StyledFeedbackCountButton",componentId:"sc-3prmx8-0"})(templateObject_1$23||(templateObject_1$23=__makeTemplateObject(["\n && {\n min-width: 0;\n margin-right: 0;\n }\n"],["\n && {\n min-width: 0;\n margin-right: 0;\n }\n"])));var IEFix$1=_styled.createGlobalStyle(templateObject_2$1g||(templateObject_2$1g=__makeTemplateObject(["\n .browser-name-ie {\n .event-card-comments {\n margin-right: 0 !important;\n }\n }\n"],["\n .browser-name-ie {\n .event-card-comments {\n margin-right: 0 !important;\n }\n }\n"])));var templateObject_1$23,templateObject_2$1g;var EventCancelInformation=function EventCancelInformation(_a){var _b;var item=_a.item,language=_a.language,className=_a.className;var user=useCurrentUser();if(!((_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled)){return null;}var contents=item.cancelInformation.reasons||{};var reason=contents[language]||contents[NewsService.getUserPreferredLanguage(Object.keys(contents),user)]||Object.values(contents)[0];return jsxRuntime.jsxs(Host$L,__assign({className:className,"data-event-cancelled-info":true},{children:[jsxRuntime.jsxs(TitleContainer,{children:[jsxRuntime.jsx(CancelIcon,{iconName:"RemoveEvent"},void 0),jsxRuntime.jsx(Title$8,{id:"Events.cancel.cancelled"},void 0)]},void 0),reason]}),void 0);};var Host$L=_styled__default["default"].div.withConfig({displayName:"EventCancelInformation__Host",componentId:"sc-rh6578-0"})(templateObject_1$22||(templateObject_1$22=__makeTemplateObject(["\n position: relative;\n padding: ","px;\n margin-top: ","px;\n\n font-size: ","px;\n\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ",";\n opacity: 0.1;\n }\n"],["\n position: relative;\n padding: ","px;\n margin-top: ","px;\n\n font-size: ","px;\n\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ",";\n opacity: 0.1;\n }\n"])),spacingM,spacingS,fontSizeSmall,function(p){return p.theme.palette.red;});var TitleContainer=_styled__default["default"].div.withConfig({displayName:"EventCancelInformation__TitleContainer",componentId:"sc-rh6578-1"})(templateObject_2$1f||(templateObject_2$1f=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n\n color: ",";\n\n *:not(:first-child) {\n padding-left: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n\n color: ",";\n\n *:not(:first-child) {\n padding-left: ","px;\n }\n"])),spacingXs,function(p){return p.theme.palette.redDark;},spacingXs);var CancelIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"EventCancelInformation__CancelIcon",componentId:"sc-rh6578-2"})(templateObject_3$R||(templateObject_3$R=__makeTemplateObject(["\n font-size: 20px;\n"],["\n font-size: 20px;\n"])));var Title$8=_styled__default["default"](FormattedMessageWithStyle).withConfig({displayName:"EventCancelInformation__Title",componentId:"sc-rh6578-3"})(templateObject_4$C||(templateObject_4$C=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var templateObject_1$22,templateObject_2$1f,templateObject_3$R,templateObject_4$C;var EventUserRegistrationContext=/*#__PURE__*/React$d.createContext(null);function getDeadlineInfos(item){var hasDeadline=item.registrationSettings.deadline!=null;var isPastDeadline=hasDeadline&&moment(item.registrationSettings.deadline).isBefore(moment());return {hasDeadline:hasDeadline,isPastDeadline:isPastDeadline};}var EventRegistrationButton=function EventRegistrationButton(_a){var isRegistered=_a.isRegistered,className=_a.className,disabled=_a.disabled,onClick=_a.onClick,showInfoMessage=_a.showInfoMessage,infoMessageResourceKey=_a.infoMessageResourceKey;var formatMessage=useIntl().formatMessage;return jsxRuntime.jsxs(Host$K,__assign({className:className,"aria-label":formatMessage({id:'Events.registration.sectionLabel'})},{children:[jsxRuntime.jsx(RegisterButton,{text:formatMessage({id:isRegistered?'Events.registration.deregisterButtonCaption':'Events.registration.registerButtonCaption'}),disabled:disabled,"data-event-register-button":!!isRegistered,onClick:function(e){e.preventDefault();onClick();},isRegistered:isRegistered},void 0),showInfoMessage&&jsxRuntime.jsxs(InfoMessage,__assign({"data-event-register-info":true},{children:[jsxRuntime.jsx(officeUiFabricReact.Icon,{iconName:"Info"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:infoMessageResourceKey},void 0)]}),void 0)]}),void 0);};var Host$K=_styled__default["default"].div.withConfig({displayName:"EventRegistrationButton__Host",componentId:"sc-rvaf0t-0"})(templateObject_1$21||(templateObject_1$21=__makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"],["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"])));var RegisterButton=_styled__default["default"](officeUiFabricReact.PrimaryButton).withConfig({displayName:"EventRegistrationButton__RegisterButton",componentId:"sc-rvaf0t-1"})(templateObject_4$B||(templateObject_4$B=__makeTemplateObject(["\n && {\n min-width: 200px;\n border: 0;\n &:hover {\n border: 0;\n }\n ","\n ","\n }\n"],["\n && {\n min-width: 200px;\n border: 0;\n &:hover {\n border: 0;\n }\n ","\n ","\n }\n"])),function(p){return p.disabled&&_styled.css(templateObject_2$1e||(templateObject_2$1e=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.neutralQuaternaryAlt);},function(p){return p.isRegistered&&_styled.css(templateObject_3$Q||(templateObject_3$Q=__makeTemplateObject(["\n &:not([disabled]) {\n background-color: ",";\n color: #fff;\n\n &:hover {\n background-color: ",";\n }\n }\n "],["\n &:not([disabled]) {\n background-color: ",";\n color: #fff;\n\n &:hover {\n background-color: ",";\n }\n }\n "])),p.theme.palette.red,p.theme.palette.redDark);});var InfoMessage=_styled__default["default"].span.withConfig({displayName:"EventRegistrationButton__InfoMessage",componentId:"sc-rvaf0t-2"})(templateObject_5$w||(templateObject_5$w=__makeTemplateObject(["\n display: flex;\n align-items: center;\n font-style: italic;\n margin-top: ","px;\n font-size: ","px;\n\n i {\n padding-right: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n font-style: italic;\n margin-top: ","px;\n font-size: ","px;\n\n i {\n padding-right: ","px;\n }\n"])),spacingXs,fontSizeSmall,spacingXs);var templateObject_1$21,templateObject_2$1e,templateObject_3$Q,templateObject_4$B,templateObject_5$w;var $$4=_export;var DESCRIPTORS=descriptors;var global$2=global$m;var has=has$c;var isObject=isObject$b;var defineProperty=objectDefineProperty.f;var copyConstructorProperties=copyConstructorProperties$2;var NativeSymbol=global$2.Symbol;if(DESCRIPTORS&&typeof NativeSymbol=='function'&&(!('description'in NativeSymbol.prototype)||// Safari 12 bug
|
|
125892
|
+
_a.sent();return [2/*return*/,{itemId:newImage.itemId,identifier:newImage.identifier,mimeType:newImage.image.type,extension:newImage.image.name.split('.').pop()}];}});});}},[api,createApiUrl,fetchFromApi,onRequestToken]);}var PublishableItemBanner=function PublishableItemBanner(props){var getImageUrlWithToken=useNewsApi().getImageUrlWithToken;var _a=useVideosApi(),getBannerVideoThumbnailUrl=_a.getBannerVideoThumbnailUrl,getVideoThumbnailUrl=_a.getVideoThumbnailUrl;var getImageEditorUrlWithToken=useImageEditorApi().getImageEditorUrlWithToken;var _b=React$d.useState(false),showPlayer=_b[0],setShowPlayer=_b[1];var user=useCurrentUser();var features=useFeatures();var onOpenExternalLink=React$d.useContext(LinkContext).onOpenExternalLink;var formatMessage=useIntl().formatMessage;React$d.useEffect(function(){if(props.hidePlayerIfActive){setShowPlayer(false);}},[props.hidePlayerIfActive]);if(!props.token||!props.bannerInfo){return null;}var isEdit=props.mode==='edit';var isImage=props.bannerInfo.type==='image';var imageUrl=getImageUrl(isEdit,isImage,props.width,props.height);var isStreamVideo=props.bannerInfo.videoSource===VideoSource.MicrosoftStream;var streamVideoUrl=isStreamVideo&&getMicrosoftStreamVideoUrl(props.bannerInfo.videoId);var isPlayableVideo=!isImage&&!(isStreamVideo&&env.isNativeMobileApp);if(isPlayableVideo&&showPlayer){return jsxRuntime.jsx(StyledVideoView,{videoInfo:{id:props.bannerInfo.videoId,source:props.bannerInfo.videoSource,url:props.bannerInfo.videoUrl,isDirectUrl:props.bannerInfo.isDirectVideoUrl},autoplay:true,className:props.className},void 0);}return jsxRuntime.jsxs(StyledBannerImage,__assign({isVideo:!isImage,imageUrl:imageUrl,openImageUrl:props.canOpenImage&&env.isNativeMobileApp?getImageUrl(isEdit,true,'default'):null,className:props.className},{children:[isPlayableVideo&&jsxRuntime.jsx(VideoButtonOverlay,{onClick:handlePlayClick,iconProps:{iconName:'MSNVideosSolid',className:'video-icon'},ariaLabel:formatMessage({id:'Generic.watchVideo'})},void 0),isStreamVideo&&env.isNativeMobileApp&&(features.inAppBrowser?jsxRuntime.jsx(VideoLinkOverlay,__assign({url:streamVideoUrl,onClick:function(e){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:e.stopPropagation();e.preventDefault();return [4/*yield*/,onOpenExternalLink(streamVideoUrl)];case 1:_a.sent();return [2/*return*/];}});});},ariaLabel:formatMessage({id:'Generic.watchMicrosoftStream'})},{children:jsxRuntime.jsx(VideoIcon,{iconName:"MSNVideosSolid",className:"video-icon"},void 0)}),void 0):jsxRuntime.jsx(VideoLinkOverlay,__assign({url:streamVideoUrl,ariaLabel:formatMessage({id:'Generic.watchMicrosoftStream'})},{children:jsxRuntime.jsx(VideoIcon,{iconName:"MSNVideosSolid",className:"video-icon"},void 0)}),void 0))]}),void 0);function getImageUrl(isEdit,isImage,width,height){var _a;if(isImage){return isEdit?getImageEditorUrlWithToken(props.token,props.itemId,user.subscription.id,props.bannerInfo.imageId,props.resourceType):getImageUrlWithToken(props.token,props.itemId,user.subscription.id,props.resourceType,props.bannerInfo.imageId,width,height);}else {return (_a=new VideoUrlParser(props.bannerInfo.videoUrl).thumbnailUrl)!==null&&_a!==void 0?_a:isEdit?getVideoThumbnailUrl(props.token,user.subscription.id,props.bannerInfo.videoSource,props.bannerInfo.videoId):getBannerVideoThumbnailUrl(props.token,props.itemId,user.subscription.id,props.resourceType);}}function handlePlayClick(e){var _a;e.stopPropagation();e.preventDefault();setShowPlayer(true);(_a=props.onPlayButtonClick)===null||_a===void 0?void 0:_a.call(props);}};var StyledBannerImage=_styled__default["default"](BannerImage).withConfig({displayName:"PublishableItemBanner__StyledBannerImage",componentId:"sc-bjnycc-0"})(templateObject_2$1j||(templateObject_2$1j=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.isVideo&&_styled.css(templateObject_1$25||(templateObject_1$25=__makeTemplateObject(["\n position: relative;\n "],["\n position: relative;\n "])));});var BannerVideoOverlay=_styled.css(templateObject_3$T||(templateObject_3$T=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n .video-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &:hover {\n .video-icon {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n .video-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &:hover {\n .video-icon {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n"])));var VideoIconStyle=_styled.css(templateObject_4$E||(templateObject_4$E=__makeTemplateObject(["\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n"],["\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n"])));var VideoButtonOverlay=_styled__default["default"](officeUiFabricReact.IconButton).withConfig({displayName:"PublishableItemBanner__VideoButtonOverlay",componentId:"sc-bjnycc-1"})(templateObject_5$y||(templateObject_5$y=__makeTemplateObject(["\n && {\n width: 100%;\n height: 100%;\n border: 0;\n margin: 0;\n padding: 0;\n z-index: 1;\n border-radius: 0;\n\n ","\n\n i.video-icon {\n ","\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n }\n }\n"],["\n && {\n width: 100%;\n height: 100%;\n border: 0;\n margin: 0;\n padding: 0;\n z-index: 1;\n border-radius: 0;\n\n ","\n\n i.video-icon {\n ","\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n }\n }\n"])),BannerVideoOverlay,VideoIconStyle);var VideoLinkOverlay=_styled__default["default"](ExternalLinkHandler).withConfig({displayName:"PublishableItemBanner__VideoLinkOverlay",componentId:"sc-bjnycc-2"})(templateObject_6$n||(templateObject_6$n=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),BannerVideoOverlay);var VideoIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PublishableItemBanner__VideoIcon",componentId:"sc-bjnycc-3"})(templateObject_7$i||(templateObject_7$i=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),VideoIconStyle);var StyledVideoView=_styled__default["default"](VideoView).withConfig({displayName:"PublishableItemBanner__StyledVideoView",componentId:"sc-bjnycc-4"})(templateObject_8$h||(templateObject_8$h=__makeTemplateObject(["\n height: 100%;\n"],["\n height: 100%;\n"])));var templateObject_1$25,templateObject_2$1j,templateObject_3$T,templateObject_4$E,templateObject_5$y,templateObject_6$n,templateObject_7$i,templateObject_8$h;var EventCardBanner=function EventCardBanner(_a){var item=_a.item,bannerWidth=_a.bannerWidth,bannerHostDefaultWidth=_a.bannerHostDefaultWidth,showPlaceholder=_a.showPlaceholder;if(!item.bannerInfo&&!showPlaceholder){return null;}return jsxRuntime.jsx("div",{children:jsxRuntime.jsx(LeftBannerWrapper,__assign({defaultWidth:bannerHostDefaultWidth,showPlaceholder:showPlaceholder},{children:jsxRuntime.jsx(PublishableItemBanner,{itemId:item.id,bannerInfo:item.bannerInfo,mode:"read",width:bannerWidth,token:item.fileAccessToken,resourceType:ItemResourceTypes.Events},void 0)}),void 0)},void 0);};var FeedbackCountButton=function FeedbackCountButton(_a){var className=_a.className,isActive=_a.isActive,activeIconName=_a.activeIconName,count=_a.count,iconName=_a.iconName,onClick=_a.onClick,readOnly=_a.readOnly,tooltipResourceKey=_a.tooltipResourceKey,tooltipResourceKeyValues=_a.tooltipResourceKeyValues,activeTooltipResourceKey=_a.activeTooltipResourceKey,activeTooltipResourceKeyValues=_a.activeTooltipResourceKeyValues,ariaLabel=_a.ariaLabel,feedbackType=_a.feedbackType,highlight=_a.highlight,hideZeroCount=_a.hideZeroCount,doNotRenderZeroCount=_a.doNotRenderZeroCount,hideTooltip=_a.hideTooltip;var resourceKey=isActive?activeTooltipResourceKey||tooltipResourceKey:tooltipResourceKey;var resourceValues=isActive?activeTooltipResourceKeyValues||tooltipResourceKeyValues:tooltipResourceKeyValues;return jsxRuntime.jsxs(CountButtonHost,__assign({className:className,"data-feedback":feedbackType,"data-feedback-button-isactive":isActive!==null&&isActive!==void 0?isActive:false,"data-feedback-count":count},{children:[jsxRuntime.jsx(IEMarginFix,{},void 0),jsxRuntime.jsx(PreloadIcons,{icons:[activeIconName,iconName]},void 0),jsxRuntime.jsx(TooltipHost,__assign({resourceKey:resourceKey,values:resourceValues,hidden:hideTooltip},{children:onClick?jsxRuntime.jsx(StyledIconButton$6,__assign({onClick:onClick,iconProps:{iconName:isActive?activeIconName:iconName},"data-feedback-button":feedbackType,disabled:readOnly,highlight:highlight,"data-unread-comment-highlight":highlight,ariaLabel:ariaLabel},{children:jsxRuntime.jsx(CountDisplay,{count:count,doNotRenderZeroCount:doNotRenderZeroCount,hideZeroCount:hideZeroCount},void 0)}),void 0):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(StyledIcon$7,{iconName:isActive?activeIconName:iconName,highlight:highlight,"data-unread-comment-highlight":highlight},void 0),jsxRuntime.jsx(CountDisplay,{count:count,doNotRenderZeroCount:doNotRenderZeroCount,hideZeroCount:hideZeroCount,ariaLabel:ariaLabel},void 0)]},void 0)}),void 0)]}),void 0);};var CountDisplay=function CountDisplay(_a){var count=_a.count,hideZeroCount=_a.hideZeroCount,doNotRenderZeroCount=_a.doNotRenderZeroCount,ariaLabel=_a.ariaLabel;var shouldNotRenderZeroCount=doNotRenderZeroCount&&!count;if(shouldNotRenderZeroCount){return null;}var shouldHideZeroCount=hideZeroCount&&!count;return jsxRuntime.jsx(CountLabel,__assign({isHidden:shouldHideZeroCount,"aria-label":ariaLabel},{children:count}),void 0);};var TooltipHost=_styled__default["default"](Tooltip).withConfig({displayName:"FeedbackCountButton__TooltipHost",componentId:"sc-vg1ry1-0"})(templateObject_1$24||(templateObject_1$24=__makeTemplateObject(["\n && {\n display: flex;\n height: 100%;\n align-items: center;\n }\n"],["\n && {\n display: flex;\n height: 100%;\n align-items: center;\n }\n"])));var CountButtonHost=_styled__default["default"].div.withConfig({displayName:"FeedbackCountButton__CountButtonHost",componentId:"sc-vg1ry1-1"})(templateObject_2$1i||(templateObject_2$1i=__makeTemplateObject(["\n display: flex;\n align-items: center;\n min-width: 60px;\n height: ","px; // ensure same height for feedback buttons\n\n margin-right: 9px;\n"],["\n display: flex;\n align-items: center;\n min-width: 60px;\n height: ","px; // ensure same height for feedback buttons\n\n margin-right: 9px;\n"])),feedbackButtonHeight);var IEMarginFix=_styled.createGlobalStyle(templateObject_3$S||(templateObject_3$S=__makeTemplateObject(["\n .browser-name-ie {\n "," {\n margin-right: 20px;\n }\n }\n"],["\n .browser-name-ie {\n "," {\n margin-right: 20px;\n }\n }\n"])),CountButtonHost);var StyledIconButton$6=_styled__default["default"](IconButton).withConfig({displayName:"FeedbackCountButton__StyledIconButton",componentId:"sc-vg1ry1-2"})(templateObject_4$D||(templateObject_4$D=__makeTemplateObject(["\n && {\n margin: 0;\n padding: 0;\n width: 100%;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 22px;\n margin: 0;\n ","\n }\n\n user-select: none;\n"],["\n && {\n margin: 0;\n padding: 0;\n width: 100%;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 22px;\n margin: 0;\n ","\n }\n\n user-select: none;\n"])),function(p){return p.highlight&&unreadCommentHighlight;});var StyledIcon$7=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"FeedbackCountButton__StyledIcon",componentId:"sc-vg1ry1-3"})(templateObject_5$x||(templateObject_5$x=__makeTemplateObject(["\n font-size: 22px;\n user-select: none;\n\n ","\n"],["\n font-size: 22px;\n user-select: none;\n\n ","\n"])),function(p){return p.highlight&&unreadCommentHighlight;});var CountLabel=_styled__default["default"].span.withConfig({displayName:"FeedbackCountButton__CountLabel",componentId:"sc-vg1ry1-4"})(templateObject_8$g||(templateObject_8$g=__makeTemplateObject(["\n margin-left: 7px;\n word-break: normal;\n align-self: center;\n ","\n ","\n"],["\n margin-left: 7px;\n word-break: normal;\n align-self: center;\n ","\n ","\n"])),function(p){return p.isHidden&&_styled.css(templateObject_6$m||(templateObject_6$m=__makeTemplateObject(["\n visibility: hidden;\n "],["\n visibility: hidden;\n "])));},function(p){return p.isDisabled&&_styled.css(templateObject_7$h||(templateObject_7$h=__makeTemplateObject(["\n color: ",";\n "],["\n color: ",";\n "])),p.theme.palette.neutralQuaternary);});var PreloadIcons=function PreloadIcons(_a){var icons=_a.icons;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:icons.filter(function(i){return i;}).map(function(i){return jsxRuntime.jsx(PreloadIcon,{iconName:i},i);})},void 0);};var PreloadIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"FeedbackCountButton__PreloadIcon",componentId:"sc-vg1ry1-5"})(templateObject_9$d||(templateObject_9$d=__makeTemplateObject(["\n position: fixed;\n left: -500px;\n"],["\n position: fixed;\n left: -500px;\n"])));var templateObject_1$24,templateObject_2$1i,templateObject_3$S,templateObject_4$D,templateObject_5$x,templateObject_6$m,templateObject_7$h,templateObject_8$g,templateObject_9$d;var EventCardCommentCount=function EventCardCommentCount(_a){var item=_a.item;var formatMessage=useIntl().formatMessage;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(IEFix$1,{},void 0),jsxRuntime.jsx(StyledFeedbackCountButton,{tooltipResourceKey:"Events.numberOfComments",tooltipResourceKeyValues:{count:item.statistics.commentCount},ariaLabel:formatMessage({id:'AriaLabel.commentsButton'}),iconName:"Chat",count:item.statistics.commentCount,feedbackType:"comment",highlight:item.hasNewComments,className:"event-card-comments"},void 0)]},void 0);};var StyledFeedbackCountButton=_styled__default["default"](FeedbackCountButton).withConfig({displayName:"EventCardCommentCount__StyledFeedbackCountButton",componentId:"sc-3prmx8-0"})(templateObject_1$23||(templateObject_1$23=__makeTemplateObject(["\n && {\n min-width: 0;\n margin-right: 0;\n }\n"],["\n && {\n min-width: 0;\n margin-right: 0;\n }\n"])));var IEFix$1=_styled.createGlobalStyle(templateObject_2$1h||(templateObject_2$1h=__makeTemplateObject(["\n .browser-name-ie {\n .event-card-comments {\n margin-right: 0 !important;\n }\n }\n"],["\n .browser-name-ie {\n .event-card-comments {\n margin-right: 0 !important;\n }\n }\n"])));var templateObject_1$23,templateObject_2$1h;var EventCancelInformation=function EventCancelInformation(_a){var _b;var item=_a.item,language=_a.language,className=_a.className;var user=useCurrentUser();if(!((_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled)){return null;}var contents=item.cancelInformation.reasons||{};var reason=contents[language]||contents[NewsService.getUserPreferredLanguage(Object.keys(contents),user)]||Object.values(contents)[0];return jsxRuntime.jsxs(Host$L,__assign({className:className,"data-event-cancelled-info":true},{children:[jsxRuntime.jsxs(TitleContainer,{children:[jsxRuntime.jsx(CancelIcon,{iconName:"RemoveEvent"},void 0),jsxRuntime.jsx(Title$8,{id:"Events.cancel.cancelled"},void 0)]},void 0),reason]}),void 0);};var Host$L=_styled__default["default"].div.withConfig({displayName:"EventCancelInformation__Host",componentId:"sc-rh6578-0"})(templateObject_1$22||(templateObject_1$22=__makeTemplateObject(["\n position: relative;\n padding: ","px;\n margin-top: ","px;\n\n font-size: ","px;\n\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ",";\n opacity: 0.1;\n }\n"],["\n position: relative;\n padding: ","px;\n margin-top: ","px;\n\n font-size: ","px;\n\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ",";\n opacity: 0.1;\n }\n"])),spacingM,spacingS,fontSizeSmall,function(p){return p.theme.palette.red;});var TitleContainer=_styled__default["default"].div.withConfig({displayName:"EventCancelInformation__TitleContainer",componentId:"sc-rh6578-1"})(templateObject_2$1g||(templateObject_2$1g=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n\n color: ",";\n\n *:not(:first-child) {\n padding-left: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n\n color: ",";\n\n *:not(:first-child) {\n padding-left: ","px;\n }\n"])),spacingXs,function(p){return p.theme.palette.redDark;},spacingXs);var CancelIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"EventCancelInformation__CancelIcon",componentId:"sc-rh6578-2"})(templateObject_3$R||(templateObject_3$R=__makeTemplateObject(["\n font-size: 20px;\n"],["\n font-size: 20px;\n"])));var Title$8=_styled__default["default"](FormattedMessageWithStyle).withConfig({displayName:"EventCancelInformation__Title",componentId:"sc-rh6578-3"})(templateObject_4$C||(templateObject_4$C=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var templateObject_1$22,templateObject_2$1g,templateObject_3$R,templateObject_4$C;var EventUserRegistrationContext=/*#__PURE__*/React$d.createContext(null);function getDeadlineInfos(item){var hasDeadline=item.registrationSettings.deadline!=null;var isPastDeadline=hasDeadline&&moment(item.registrationSettings.deadline).isBefore(moment());return {hasDeadline:hasDeadline,isPastDeadline:isPastDeadline};}var EventRegistrationButton=function EventRegistrationButton(_a){var isRegistered=_a.isRegistered,className=_a.className,disabled=_a.disabled,onClick=_a.onClick,showInfoMessage=_a.showInfoMessage,infoMessageResourceKey=_a.infoMessageResourceKey;var formatMessage=useIntl().formatMessage;return jsxRuntime.jsxs(Host$K,__assign({className:className,"aria-label":formatMessage({id:'Events.registration.sectionLabel'})},{children:[jsxRuntime.jsx(RegisterButton,{text:formatMessage({id:isRegistered?'Events.registration.deregisterButtonCaption':'Events.registration.registerButtonCaption'}),disabled:disabled,"data-event-register-button":!!isRegistered,onClick:function(e){e.preventDefault();onClick();},isRegistered:isRegistered},void 0),showInfoMessage&&jsxRuntime.jsxs(InfoMessage,__assign({"data-event-register-info":true},{children:[jsxRuntime.jsx(officeUiFabricReact.Icon,{iconName:"Info"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:infoMessageResourceKey},void 0)]}),void 0)]}),void 0);};var Host$K=_styled__default["default"].div.withConfig({displayName:"EventRegistrationButton__Host",componentId:"sc-rvaf0t-0"})(templateObject_1$21||(templateObject_1$21=__makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"],["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"])));var RegisterButton=_styled__default["default"](officeUiFabricReact.PrimaryButton).withConfig({displayName:"EventRegistrationButton__RegisterButton",componentId:"sc-rvaf0t-1"})(templateObject_4$B||(templateObject_4$B=__makeTemplateObject(["\n && {\n min-width: 200px;\n border: 0;\n &:hover {\n border: 0;\n }\n ","\n ","\n }\n"],["\n && {\n min-width: 200px;\n border: 0;\n &:hover {\n border: 0;\n }\n ","\n ","\n }\n"])),function(p){return p.disabled&&_styled.css(templateObject_2$1f||(templateObject_2$1f=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.neutralQuaternaryAlt);},function(p){return p.isRegistered&&_styled.css(templateObject_3$Q||(templateObject_3$Q=__makeTemplateObject(["\n &:not([disabled]) {\n background-color: ",";\n color: #fff;\n\n &:hover {\n background-color: ",";\n }\n }\n "],["\n &:not([disabled]) {\n background-color: ",";\n color: #fff;\n\n &:hover {\n background-color: ",";\n }\n }\n "])),p.theme.palette.red,p.theme.palette.redDark);});var InfoMessage=_styled__default["default"].span.withConfig({displayName:"EventRegistrationButton__InfoMessage",componentId:"sc-rvaf0t-2"})(templateObject_5$w||(templateObject_5$w=__makeTemplateObject(["\n display: flex;\n align-items: center;\n font-style: italic;\n margin-top: ","px;\n font-size: ","px;\n\n i {\n padding-right: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n font-style: italic;\n margin-top: ","px;\n font-size: ","px;\n\n i {\n padding-right: ","px;\n }\n"])),spacingXs,fontSizeSmall,spacingXs);var templateObject_1$21,templateObject_2$1f,templateObject_3$Q,templateObject_4$B,templateObject_5$w;var $$5=_export;var DESCRIPTORS=descriptors;var global$2=global$m;var has=has$c;var isObject$1=isObject$c;var defineProperty=objectDefineProperty.f;var copyConstructorProperties=copyConstructorProperties$2;var NativeSymbol=global$2.Symbol;if(DESCRIPTORS&&typeof NativeSymbol=='function'&&(!('description'in NativeSymbol.prototype)||// Safari 12 bug
|
|
125885
125893
|
NativeSymbol().description!==undefined)){var EmptyStringDescriptionStore={};// wrap Symbol constructor for correct work with undefined description
|
|
125886
125894
|
var SymbolWrapper=function Symbol(){var description=arguments.length<1||arguments[0]===undefined?undefined:String(arguments[0]);var result=this instanceof SymbolWrapper?new NativeSymbol(description)// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
125887
|
-
:description===undefined?NativeSymbol():NativeSymbol(description);if(description==='')EmptyStringDescriptionStore[result]=true;return result;};copyConstructorProperties(SymbolWrapper,NativeSymbol);var symbolPrototype=SymbolWrapper.prototype=NativeSymbol.prototype;symbolPrototype.constructor=SymbolWrapper;var symbolToString=symbolPrototype.toString;var native=String(NativeSymbol('test'))=='Symbol(test)';var regexp=/^Symbol\((.*)\)[^)]+$/;defineProperty(symbolPrototype,'description',{configurable:true,get:function description(){var symbol=isObject(this)?this.valueOf():this;var string=symbolToString.call(symbol);if(has(EmptyStringDescriptionStore,symbol))return '';var desc=native?string.slice(7,-1):string.replace(regexp,'$1');return desc===''?undefined:desc;}});$$
|
|
125888
|
-
return null;}return jsxRuntime.jsx(MessageContainer,__assign({domIdentifier:"multi-location-no-seats-left",className:className},{children:jsxRuntime.jsx(NoSeatsMessage,{id:"Events.registration.locations.noSeatsLeft"},void 0)}),void 0);}var location=locations[0];if(hasAnySeatsLeft){return jsxRuntime.jsx(MessageContainer,__assign({domIdentifier:"one-location-number-of-seats-left",className:className},{children:jsxRuntime.jsx(SeatsInfoMessage,{id:"Events.registration.locations.seatsLeftInLocation",values:{available:location.seatsLeft,b:function(text){return jsxRuntime.jsx("span",{children:text},void 0);}}},void 0)}),void 0);}return jsxRuntime.jsx(MessageContainer,__assign({domIdentifier:"one-location-no-seats-left",className:className},{children:jsxRuntime.jsx(NoSeatsMessage,{id:"Events.registration.locations.leftSeats",values:{total:location.maxNumberOfSeats,available:location.seatsLeft,b:function(text){return jsxRuntime.jsx("span",{children:text},void 0);}}},void 0)}),void 0);};var SeatsInfoMessage=_styled__default["default"](FormattedMessageWithStyle)(templateObject_1$20||(templateObject_1$20=__makeTemplateObject(["\n font-size: ","px;\n\n span {\n font-weight: bold;\n }\n"],["\n font-size: ","px;\n\n span {\n font-weight: bold;\n }\n"])),fontSizeSmall);var NoSeatsMessage=_styled__default["default"](FormattedMessageWithStyle)(templateObject_2$1d||(templateObject_2$1d=__makeTemplateObject(["\n color: ",";\n font-size: ","px;\n\n span {\n font-weight: bold;\n }\n"],["\n color: ",";\n font-size: ","px;\n\n span {\n font-weight: bold;\n }\n"])),function(p){return p.theme.palette.neutralSecondaryAlt;},fontSizeSmall);var MessageContainer=function MessageContainer(_a){var domIdentifier=_a.domIdentifier,className=_a.className,children=_a.children;return jsxRuntime.jsx("div",__assign({"data-seats-info":domIdentifier,className:className},{children:children}),void 0);};var templateObject_1$20,templateObject_2$1d;var EventRegistrationInfoDescription=_styled__default["default"](FormattedMessageWithStyle).withConfig({displayName:"EventRegistrationInfoDescription",componentId:"sc-1shfbk2-0"})(templateObject_1$1$||(templateObject_1$1$=__makeTemplateObject(["\n font-size: ","px;\n\n time {\n font-weight: bold;\n }\n"],["\n font-size: ","px;\n\n time {\n font-weight: bold;\n }\n"])),fontSizeSmall);var templateObject_1$1$;var EventRegistrationRegisterStatusInfo=function EventRegistrationRegisterStatusInfo(_a){var isRegistered=_a.isRegistered,onBehalfOfUpn=_a.onBehalfOfUpn,className=_a.className;if(!isRegistered){return null;}return jsxRuntime.jsx(EventRegistrationInfoDescription,{className:className,id:onBehalfOfUpn?'Events.registration.onBehalfOfIsRegistered':'Events.registration.userIsRegistered'},void 0);};var EventRegistrationDeadlineInfo=function EventRegistrationDeadlineInfo(_a){var item=_a.item,isRegistered=_a.isRegistered,className=_a.className;var _b=getDeadlineInfos(item),isPastDeadline=_b.isPastDeadline,hasDeadline=_b.hasDeadline;if(isRegistered||!hasDeadline){return null;}return jsxRuntime.jsx(EventRegistrationInfoDescription,{className:className,id:"Events.registration.deadline.title",values:{isPast:isPastDeadline,deadlineRelative:hasDeadline&&jsxRuntime.jsx(DateTime,{value:item.registrationSettings.deadline,showAsRelative:true},void 0)}},void 0);};var EventUserRegistrationFullSeriesDialog=function EventUserRegistrationFullSeriesDialog(_a){var item=_a.item,visible=_a.visible,isRegistered=_a.isRegistered,onClick=_a.onClick,onDismiss=_a.onDismiss;var formatMessage=useIntl().formatMessage;var recurrenceSettingsEndDate=item.recurrenceSettings.endDate;return jsxRuntime.jsxs(Dialog,__assign({hidden:!visible,modalProps:{isBlocking:false},dialogContentProps:{type:officeUiFabricReact.DialogType.normal,title:formatMessage({id:isRegistered?'Events.registration.recurringEvent.deregister':'Events.registration.recurringEvent.register'})},onDismiss:onDismiss},{children:[jsxRuntime.jsxs(DialogContent$1,__assign({"data-registration-full-series":true},{children:[recurrenceSettingsEndDate&&jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.lastOccurrence",values:{date:moment(recurrenceSettingsEndDate).format('L')},tagName:"p"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:isRegistered?'Events.registration.fullSeriesDeregistered':'Events.registration.fullSeriesRegistered',tagName:"p"},void 0)]}),void 0),jsxRuntime.jsxs(officeUiFabricReact.DialogFooter,{children:[jsxRuntime.jsx(officeUiFabricReact.DefaultButton,__assign({onClick:onDismiss,"data-button":"cancel"},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.Cancel"},void 0)}),void 0),jsxRuntime.jsx(officeUiFabricReact.PrimaryButton,__assign({onClick:function(){return onClick(!isRegistered);},"data-button":"save"},{children:jsxRuntime.jsx(FormattedMessage$1,{id:isRegistered?'Events.registration.deregisterButtonCaption':'Events.registration.registerButtonCaption'},void 0)}),void 0)]},void 0)]}),void 0);};var DialogContent$1=_styled__default["default"].div.withConfig({displayName:"EventUserRegistrationFullSeriesDialog__DialogContent",componentId:"sc-8ec3oi-0"})(templateObject_1$1_||(templateObject_1$1_=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n > p {\n margin-top: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n > p {\n margin-top: 0;\n }\n"])));var templateObject_1$1_;var feedbackCache={};function useFeedbackApi(){var api=useApi();return React$d.useMemo(function(){return {getFeedback:getFeedback,setFeedback:setFeedback,unsetFeedback:unsetFeedback,updatePollAnswers:updatePollAnswers,getPollResult:getPollResult,getLikers:getLikers};function getFeedback(type,itemId,onBehalfOfUpn){var cacheKey=itemId+(onBehalfOfUpn||'');if(feedbackCache[cacheKey]!=null){return feedbackCache[cacheKey];}return feedbackCache[cacheKey]=api.custom(type+"/"+itemId+"/feedback?"+queryString.stringify({onBehalfOfUpn:onBehalfOfUpn})).get().then(function(result){return result.body().data();});}function setFeedback(type,itemId,feedbackType){delete feedbackCache[itemId];return api.custom(type+"/"+itemId+"/feedback/"+feedbackType).put({}).then(function(){return null;});}function unsetFeedback(type,itemId,feedbackType){delete feedbackCache[itemId];return api.custom(type+"/"+itemId+"/feedback/"+feedbackType).delete().then(function(){return null;});}function updatePollAnswers(type,itemId,answers){delete feedbackCache[itemId];return api.custom(type+"/"+itemId+"/feedback/poll/answers").put(answers).then(function(){return null;});}function getPollResult(type,itemId){return api.custom(type+"/"+itemId+"/feedback/poll/result").get().then(function(result){return result.body().data();});}function getLikers(type,itemId,filter){return api.custom(type+"/"+itemId+"/feedback/likes").get(filter).then(function(result){return result.body().data();});}},[api]);}function useEventRegistrationApi(){var api=useApi();return React$d.useMemo(function(){return {setEventRegistration:setEventRegistration,getEventRegistrationResults:getEventRegistrationResults,getParticipants:getParticipants};function setEventRegistration(itemId,response,pollAnswers,locationId,onBehalfOfUpn){var cacheKey=itemId+(onBehalfOfUpn||'');delete feedbackCache[cacheKey];return api.custom("events/"+itemId+"/feedback/registration").put({response:response,pollAnswers:pollAnswers,locationId:locationId,onBehalfOfUpn:onBehalfOfUpn}).then(function(){return null;});}function getEventRegistrationResults(itemId){return api.custom("events/"+itemId+"/feedback/registration/result").get().then(function(result){return result.body().data();});}function getParticipants(eventId){return api.custom("events/"+eventId+"/feedback/registration/participants").get().then(function(result){return result.body().data();}).then(function(r){return r.participants;});}},[api]);}var EventUserRegistration=function EventUserRegistration(_a){var _b,_c;var disabled=_a.disabled,hideInfoMessage=_a.hideInfoMessage,className=_a.className;var history=ReactRouterDom.useHistory();var user=useCurrentUserContext().user;var refreshUserDetails=useRefreshUserDetails();var _d=React$d.useState(false),isSaving=_d[0],setIsSaving=_d[1];var _e=React$d.useState(false),showRegisterFullSeriesDialog=_e[0],setShowRegisterFullSeriesDialog=_e[1];var toastHandleRef=React$d.useRef(null);var buildPath=useSubscriptionHandlePathBuilder().buildPath;var followPublicPublishableItemComments=useManageCurrentUserApi().followPublicPublishableItemComments;var setEventRegistration=useEventRegistrationApi().setEventRegistration;var _f=React$d.useContext(EventUserRegistrationContext),hasPollContext=_f.hasPollContext,submitPoll=_f.submitPoll,answers=_f.answers,hasMissingAnswers=_f.hasMissingAnswers,reset=_f.reset,isLoading=_f.isLoading,onBehalfOfUpn=_f.onBehalfOfUpn,item=_f.item,eventResponse=_f.eventResponse,setEventResponse=_f.setEventResponse,seatsInfo=_f.seatsInfo;var _g=useNotificationContext(),dismissToast=_g.dismissToast,showToast=_g.showToast,showError=_g.showError;useListener(RegisterFullSeriesTriggerAction.type,function(action){if(action.recurrenceSeriesId===item.recurrenceSeriesId){setEventResponse(action.response);}return false;},[]);if(isLoading||!item.registrationSettings||!item.registrationSettings.enabled||((_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled)){return null;}var isRegistered=eventResponse===EventResponse.Registered;var isFullSeriesRegistrationModeEnabled=((_c=item.registrationSettings)===null||_c===void 0?void 0:_c.seriesMode)===SeriesRegistrationMode.FullSeries;var hasPoll=item.poll&&item.poll.questions&&item.poll.questions.length>0||item.locations&&item.locations.length>1;var showInfoMessage=!hideInfoMessage&&isFullSeriesRegistrationModeEnabled&&hasPollContext;return jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx(DeadlineInfo,{item:item,isRegistered:isRegistered},void 0),jsxRuntime.jsx(SeatsInfo,{hasAnySeatsLeft:seatsInfo.hasAnySeatsLeft,locations:seatsInfo.locations},void 0),jsxRuntime.jsx(StatusInfo,{isRegistered:isRegistered,onBehalfOfUpn:onBehalfOfUpn},void 0),jsxRuntime.jsx(EventRegistrationButton,{isRegistered:isRegistered,disabled:isButtonDisabled(),onClick:function(){return handleClick(!isRegistered);},showInfoMessage:showInfoMessage,infoMessageResourceKey:isRegistered?'Events.registration.fullSeriesDeregistered':'Events.registration.fullSeriesRegistered'},void 0),showRegisterFullSeriesDialog&&jsxRuntime.jsx(EventUserRegistrationFullSeriesDialog,{item:item,visible:showRegisterFullSeriesDialog,onClick:handleRegisterFullSeriesClick,onDismiss:function(){return setShowRegisterFullSeriesDialog(false);},isRegistered:isRegistered},void 0)]}),void 0);function isButtonDisabled(){if(disabled||isLoading||isSaving){return true;}var isPastDeadline=getDeadlineInfos(item).isPastDeadline;if(isRegistered){return !onBehalfOfUpn&&isPastDeadline;}if(hasMissingAnswers){return true;}if(onBehalfOfUpn){return false;}return !seatsInfo.hasAnySeatsLeft||isPastDeadline;}function handleClick(doRegister){return __awaiter(this,void 0,void 0,function(){var language,contents,targetRoute;return __generator(this,function(_a){switch(_a.label){case 0:if(!doRegister){if(isFullSeriesRegistrationModeEnabled&&!hasPollContext){setShowRegisterFullSeriesDialog(true);return [2/*return*/];}deregister();return [2/*return*/];}if(isFullSeriesRegistrationModeEnabled&&!hasPoll&&!hasPollContext){setShowRegisterFullSeriesDialog(true);return [2/*return*/];}if(hasPoll&&!hasPollContext){language=NewsService.getLanguageForPublishableItem(item,user);contents=item.contents[language];targetRoute=NewsService.getNewsRoute('events',item.id,contents.title);history.push(buildPath(targetRoute));return [2/*return*/];}return [4/*yield*/,register()];case 1:_a.sent();return [2/*return*/];}});});}function handleRegisterFullSeriesClick(doRegister){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:setShowRegisterFullSeriesDialog(false);if(!doRegister)return [3/*break*/,2];return [4/*yield*/,register()];case 1:_b.sent();return [3/*break*/,4];case 2:return [4/*yield*/,deregister()];case 3:_b.sent();_b.label=4;case 4:triggerEvent(RegisterFullSeriesTriggerAction.create(item.recurrenceSeriesId,doRegister?EventResponse.Registered:EventResponse.NotSet));return [2/*return*/];}});});}function register(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,submitPoll(function(){return toggleRegistration(true,answers,onBehalfOfUpn);})];case 1:_a.sent();return [2/*return*/];}});});}function deregister(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,toggleRegistration(false,null,onBehalfOfUpn)];case 1:_a.sent();return [4/*yield*/,reset()];case 2:_a.sent();return [2/*return*/];}});});}function toggleRegistration(doRegister,answersToSet,onBehalfOfUpn){return __awaiter(this,void 0,void 0,function(){var newResponse,locationQuestionId_1,locationId,registerOnBehalfOfUserStringResource,error_1;return __generator(this,function(_a){switch(_a.label){case 0:if(isSaving){return [2/*return*/];}setIsSaving(true);_a.label=1;case 1:_a.trys.push([1,3,4,5]);newResponse=doRegister?EventResponse.Registered:EventResponse.NotSet;setEventResponse(newResponse);if(!answersToSet){answersToSet=[];}locationQuestionId_1=getLocationQuestionId(item);locationId=answersToSet.filter(function(a){return a.questionId===locationQuestionId_1;}).map(function(a){return a.choiceIds[0];})[0];answersToSet=answersToSet.filter(function(a){return a.questionId!==locationQuestionId_1;});return [4/*yield*/,setEventRegistration(item.id,newResponse,answersToSet,locationId,onBehalfOfUpn)];case 2:_a.sent();refreshUserDetails();triggerEvent(EventResponseTriggerAction.create(item.id,newResponse,locationId,onBehalfOfUpn));if(doRegister&&!onBehalfOfUpn){followPublicPublishableItemComments(item.id,ItemResourceTypes.Events);triggerEvent(FollowCommentsTriggerAction.create(item.id,true));}dismissToast(toastHandleRef.current);registerOnBehalfOfUserStringResource=isHiddenMail(onBehalfOfUpn)?'Events.registration.onBehalfOfRegistrationSuccess.hiddenMail':'Events.registration.onBehalfOfRegistrationSuccess';toastHandleRef.current=showToast(doRegister?onBehalfOfUpn?registerOnBehalfOfUserStringResource:'Events.registration.registrationSuccess':onBehalfOfUpn?'Events.registration.onBehalfOfDeregistrationSuccess':'Events.registration.deregistrationSuccess',{mail:onBehalfOfUpn});return [3/*break*/,5];case 3:error_1=_a.sent();logger.error(error_1);showError('Generic.error');setEventResponse(eventResponse);return [3/*break*/,5];case 4:setIsSaving(false);return [7/*endfinally*/];case 5:return [2/*return*/];}});});}};var DeadlineInfo=_styled__default["default"](EventRegistrationDeadlineInfo).withConfig({displayName:"EventUserRegistration__DeadlineInfo",componentId:"sc-1mvozes-0"})(templateObject_1$1Z||(templateObject_1$1Z=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);var SeatsInfo=_styled__default["default"](EventRegistrationLocationSeatsInfo).withConfig({displayName:"EventUserRegistration__SeatsInfo",componentId:"sc-1mvozes-1"})(templateObject_2$1c||(templateObject_2$1c=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);var StatusInfo=_styled__default["default"](EventRegistrationRegisterStatusInfo).withConfig({displayName:"EventUserRegistration__StatusInfo",componentId:"sc-1mvozes-2"})(templateObject_3$P||(templateObject_3$P=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);var templateObject_1$1Z,templateObject_2$1c,templateObject_3$P;var EventCardUserRegistration=function EventCardUserRegistration(_a){var item=_a.item,disabled=_a.disabled,className=_a.className;var _b=React$d.useState(item.userResponse),eventResponse=_b[0],setEventResponse=_b[1];var isRegistered=eventResponse===EventResponse.Registered;// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125895
|
+
:description===undefined?NativeSymbol():NativeSymbol(description);if(description==='')EmptyStringDescriptionStore[result]=true;return result;};copyConstructorProperties(SymbolWrapper,NativeSymbol);var symbolPrototype=SymbolWrapper.prototype=NativeSymbol.prototype;symbolPrototype.constructor=SymbolWrapper;var symbolToString=symbolPrototype.toString;var native=String(NativeSymbol('test'))=='Symbol(test)';var regexp=/^Symbol\((.*)\)[^)]+$/;defineProperty(symbolPrototype,'description',{configurable:true,get:function description(){var symbol=isObject$1(this)?this.valueOf():this;var string=symbolToString.call(symbol);if(has(EmptyStringDescriptionStore,symbol))return '';var desc=native?string.slice(7,-1):string.replace(regexp,'$1');return desc===''?undefined:desc;}});$$5({global:true,forced:true},{Symbol:SymbolWrapper});}function getLocationQuestionId(item){return "location_id_"+item.id;}function getLocationPollDefinitions(item,formatMessage,result,isOnBehalfOf){if(!item.locations||item.locations.length<2){return {};}var locationQuestionId=getLocationQuestionId(item);return {translations:__spreadArray([{language:'en',id:locationQuestionId,text:formatMessage({id:!isOnBehalfOf?'Events.registration.locations.questionTitle':'Events.registration.locations.onBehalfOfQuestionTitle'})}],item.locations.map(function(l){return {language:'en',id:l.locationId,text:l.name};})),question:{questionId:locationQuestionId,isMultiChoice:false,choices:item.locations.map(function(l){return getLocationChoice(locationQuestionId,l,result,formatMessage,isOnBehalfOf);})}};}function getLocationChoice(locationQuestionId,location,result,formatMessage,isOnBehalfOf){var _a,_b,_c,_d,_e;var choice={choiceId:location.locationId};if(!location.maxNumberOfSeats){return choice;}var takenSeats=(_e=(_d=(_c=(_b=(_a=result===null||result===void 0?void 0:result.answers)===null||_a===void 0?void 0:_a.find(function(a){return a.questionId===locationQuestionId;}))===null||_b===void 0?void 0:_b.choices)===null||_c===void 0?void 0:_c.find(function(c){return c.choiceId===location.locationId;}))===null||_d===void 0?void 0:_d.count)!==null&&_e!==void 0?_e:0;var availableSeats=Math.max(location.maxNumberOfSeats-takenSeats,0);choice.description=formatMessage({id:'Events.registration.locations.leftSeats'},{total:location.maxNumberOfSeats,available:availableSeats,b:function(text){return jsxRuntime.jsx("strong",{children:text},void 0);}});if(availableSeats===0){choice.disabled=!isOnBehalfOf;}return choice;}var EventRegistrationLocationSeatsInfo=function EventRegistrationLocationSeatsInfo(_a){var hasAnySeatsLeft=_a.hasAnySeatsLeft,locations=_a.locations,className=_a.className;if(!(locations===null||locations===void 0?void 0:locations.length)){return null;}if(locations.length>1){if(hasAnySeatsLeft){// in this case we don't want to render anything, because it's already rendered by the poll anyway
|
|
125896
|
+
return null;}return jsxRuntime.jsx(MessageContainer,__assign({domIdentifier:"multi-location-no-seats-left",className:className},{children:jsxRuntime.jsx(NoSeatsMessage,{id:"Events.registration.locations.noSeatsLeft"},void 0)}),void 0);}var location=locations[0];if(hasAnySeatsLeft){return jsxRuntime.jsx(MessageContainer,__assign({domIdentifier:"one-location-number-of-seats-left",className:className},{children:jsxRuntime.jsx(SeatsInfoMessage,{id:"Events.registration.locations.seatsLeftInLocation",values:{available:location.seatsLeft,b:function(text){return jsxRuntime.jsx("span",{children:text},void 0);}}},void 0)}),void 0);}return jsxRuntime.jsx(MessageContainer,__assign({domIdentifier:"one-location-no-seats-left",className:className},{children:jsxRuntime.jsx(NoSeatsMessage,{id:"Events.registration.locations.leftSeats",values:{total:location.maxNumberOfSeats,available:location.seatsLeft,b:function(text){return jsxRuntime.jsx("span",{children:text},void 0);}}},void 0)}),void 0);};var SeatsInfoMessage=_styled__default["default"](FormattedMessageWithStyle)(templateObject_1$20||(templateObject_1$20=__makeTemplateObject(["\n font-size: ","px;\n\n span {\n font-weight: bold;\n }\n"],["\n font-size: ","px;\n\n span {\n font-weight: bold;\n }\n"])),fontSizeSmall);var NoSeatsMessage=_styled__default["default"](FormattedMessageWithStyle)(templateObject_2$1e||(templateObject_2$1e=__makeTemplateObject(["\n color: ",";\n font-size: ","px;\n\n span {\n font-weight: bold;\n }\n"],["\n color: ",";\n font-size: ","px;\n\n span {\n font-weight: bold;\n }\n"])),function(p){return p.theme.palette.neutralSecondaryAlt;},fontSizeSmall);var MessageContainer=function MessageContainer(_a){var domIdentifier=_a.domIdentifier,className=_a.className,children=_a.children;return jsxRuntime.jsx("div",__assign({"data-seats-info":domIdentifier,className:className},{children:children}),void 0);};var templateObject_1$20,templateObject_2$1e;var EventRegistrationInfoDescription=_styled__default["default"](FormattedMessageWithStyle).withConfig({displayName:"EventRegistrationInfoDescription",componentId:"sc-1shfbk2-0"})(templateObject_1$1$||(templateObject_1$1$=__makeTemplateObject(["\n font-size: ","px;\n\n time {\n font-weight: bold;\n }\n"],["\n font-size: ","px;\n\n time {\n font-weight: bold;\n }\n"])),fontSizeSmall);var templateObject_1$1$;var EventRegistrationRegisterStatusInfo=function EventRegistrationRegisterStatusInfo(_a){var isRegistered=_a.isRegistered,onBehalfOfUpn=_a.onBehalfOfUpn,className=_a.className;if(!isRegistered){return null;}return jsxRuntime.jsx(EventRegistrationInfoDescription,{className:className,id:onBehalfOfUpn?'Events.registration.onBehalfOfIsRegistered':'Events.registration.userIsRegistered'},void 0);};var EventRegistrationDeadlineInfo=function EventRegistrationDeadlineInfo(_a){var item=_a.item,isRegistered=_a.isRegistered,className=_a.className;var _b=getDeadlineInfos(item),isPastDeadline=_b.isPastDeadline,hasDeadline=_b.hasDeadline;if(isRegistered||!hasDeadline){return null;}return jsxRuntime.jsx(EventRegistrationInfoDescription,{className:className,id:"Events.registration.deadline.title",values:{isPast:isPastDeadline,deadlineRelative:hasDeadline&&jsxRuntime.jsx(DateTime,{value:item.registrationSettings.deadline,showAsRelative:true},void 0)}},void 0);};var EventUserRegistrationFullSeriesDialog=function EventUserRegistrationFullSeriesDialog(_a){var item=_a.item,visible=_a.visible,isRegistered=_a.isRegistered,onClick=_a.onClick,onDismiss=_a.onDismiss;var formatMessage=useIntl().formatMessage;var recurrenceSettingsEndDate=item.recurrenceSettings.endDate;return jsxRuntime.jsxs(Dialog,__assign({hidden:!visible,modalProps:{isBlocking:false},dialogContentProps:{type:officeUiFabricReact.DialogType.normal,title:formatMessage({id:isRegistered?'Events.registration.recurringEvent.deregister':'Events.registration.recurringEvent.register'})},onDismiss:onDismiss},{children:[jsxRuntime.jsxs(DialogContent$1,__assign({"data-registration-full-series":true},{children:[recurrenceSettingsEndDate&&jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.lastOccurrence",values:{date:moment(recurrenceSettingsEndDate).format('L')},tagName:"p"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:isRegistered?'Events.registration.fullSeriesDeregistered':'Events.registration.fullSeriesRegistered',tagName:"p"},void 0)]}),void 0),jsxRuntime.jsxs(officeUiFabricReact.DialogFooter,{children:[jsxRuntime.jsx(officeUiFabricReact.DefaultButton,__assign({onClick:onDismiss,"data-button":"cancel"},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.Cancel"},void 0)}),void 0),jsxRuntime.jsx(officeUiFabricReact.PrimaryButton,__assign({onClick:function(){return onClick(!isRegistered);},"data-button":"save"},{children:jsxRuntime.jsx(FormattedMessage$1,{id:isRegistered?'Events.registration.deregisterButtonCaption':'Events.registration.registerButtonCaption'},void 0)}),void 0)]},void 0)]}),void 0);};var DialogContent$1=_styled__default["default"].div.withConfig({displayName:"EventUserRegistrationFullSeriesDialog__DialogContent",componentId:"sc-8ec3oi-0"})(templateObject_1$1_||(templateObject_1$1_=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n > p {\n margin-top: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n > p {\n margin-top: 0;\n }\n"])));var templateObject_1$1_;var feedbackCache={};function useFeedbackApi(){var api=useApi();return React$d.useMemo(function(){return {getFeedback:getFeedback,setFeedback:setFeedback,unsetFeedback:unsetFeedback,updatePollAnswers:updatePollAnswers,getPollResult:getPollResult,getLikers:getLikers};function getFeedback(type,itemId,onBehalfOfUpn){var cacheKey=itemId+(onBehalfOfUpn||'');if(feedbackCache[cacheKey]!=null){return feedbackCache[cacheKey];}return feedbackCache[cacheKey]=api.custom(type+"/"+itemId+"/feedback?"+queryString.stringify({onBehalfOfUpn:onBehalfOfUpn})).get().then(function(result){return result.body().data();});}function setFeedback(type,itemId,feedbackType){delete feedbackCache[itemId];return api.custom(type+"/"+itemId+"/feedback/"+feedbackType).put({}).then(function(){return null;});}function unsetFeedback(type,itemId,feedbackType){delete feedbackCache[itemId];return api.custom(type+"/"+itemId+"/feedback/"+feedbackType).delete().then(function(){return null;});}function updatePollAnswers(type,itemId,answers){delete feedbackCache[itemId];return api.custom(type+"/"+itemId+"/feedback/poll/answers").put(answers).then(function(){return null;});}function getPollResult(type,itemId){return api.custom(type+"/"+itemId+"/feedback/poll/result").get().then(function(result){return result.body().data();});}function getLikers(type,itemId,filter){return api.custom(type+"/"+itemId+"/feedback/likes").get(filter).then(function(result){return result.body().data();});}},[api]);}function useEventRegistrationApi(){var api=useApi();return React$d.useMemo(function(){return {setEventRegistration:setEventRegistration,getEventRegistrationResults:getEventRegistrationResults,getParticipants:getParticipants};function setEventRegistration(itemId,response,pollAnswers,locationId,onBehalfOfUpn){var cacheKey=itemId+(onBehalfOfUpn||'');delete feedbackCache[cacheKey];return api.custom("events/"+itemId+"/feedback/registration").put({response:response,pollAnswers:pollAnswers,locationId:locationId,onBehalfOfUpn:onBehalfOfUpn}).then(function(){return null;});}function getEventRegistrationResults(itemId){return api.custom("events/"+itemId+"/feedback/registration/result").get().then(function(result){return result.body().data();});}function getParticipants(eventId){return api.custom("events/"+eventId+"/feedback/registration/participants").get().then(function(result){return result.body().data();}).then(function(r){return r.participants;});}},[api]);}var EventUserRegistration=function EventUserRegistration(_a){var _b,_c;var disabled=_a.disabled,hideInfoMessage=_a.hideInfoMessage,className=_a.className;var history=ReactRouterDom.useHistory();var user=useCurrentUserContext().user;var refreshUserDetails=useRefreshUserDetails();var _d=React$d.useState(false),isSaving=_d[0],setIsSaving=_d[1];var _e=React$d.useState(false),showRegisterFullSeriesDialog=_e[0],setShowRegisterFullSeriesDialog=_e[1];var toastHandleRef=React$d.useRef(null);var buildPath=useSubscriptionHandlePathBuilder().buildPath;var followPublicPublishableItemComments=useManageCurrentUserApi().followPublicPublishableItemComments;var setEventRegistration=useEventRegistrationApi().setEventRegistration;var _f=React$d.useContext(EventUserRegistrationContext),hasPollContext=_f.hasPollContext,submitPoll=_f.submitPoll,answers=_f.answers,hasMissingAnswers=_f.hasMissingAnswers,reset=_f.reset,isLoading=_f.isLoading,onBehalfOfUpn=_f.onBehalfOfUpn,item=_f.item,eventResponse=_f.eventResponse,setEventResponse=_f.setEventResponse,seatsInfo=_f.seatsInfo;var _g=useNotificationContext(),dismissToast=_g.dismissToast,showToast=_g.showToast,showError=_g.showError;useListener(RegisterFullSeriesTriggerAction.type,function(action){if(action.recurrenceSeriesId===item.recurrenceSeriesId){setEventResponse(action.response);}return false;},[]);if(isLoading||!item.registrationSettings||!item.registrationSettings.enabled||((_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled)){return null;}var isRegistered=eventResponse===EventResponse.Registered;var isFullSeriesRegistrationModeEnabled=((_c=item.registrationSettings)===null||_c===void 0?void 0:_c.seriesMode)===SeriesRegistrationMode.FullSeries;var hasPoll=item.poll&&item.poll.questions&&item.poll.questions.length>0||item.locations&&item.locations.length>1;var showInfoMessage=!hideInfoMessage&&isFullSeriesRegistrationModeEnabled&&hasPollContext;return jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx(DeadlineInfo,{item:item,isRegistered:isRegistered},void 0),jsxRuntime.jsx(SeatsInfo,{hasAnySeatsLeft:seatsInfo.hasAnySeatsLeft,locations:seatsInfo.locations},void 0),jsxRuntime.jsx(StatusInfo,{isRegistered:isRegistered,onBehalfOfUpn:onBehalfOfUpn},void 0),jsxRuntime.jsx(EventRegistrationButton,{isRegistered:isRegistered,disabled:isButtonDisabled(),onClick:function(){return handleClick(!isRegistered);},showInfoMessage:showInfoMessage,infoMessageResourceKey:isRegistered?'Events.registration.fullSeriesDeregistered':'Events.registration.fullSeriesRegistered'},void 0),showRegisterFullSeriesDialog&&jsxRuntime.jsx(EventUserRegistrationFullSeriesDialog,{item:item,visible:showRegisterFullSeriesDialog,onClick:handleRegisterFullSeriesClick,onDismiss:function(){return setShowRegisterFullSeriesDialog(false);},isRegistered:isRegistered},void 0)]}),void 0);function isButtonDisabled(){if(disabled||isLoading||isSaving){return true;}var isPastDeadline=getDeadlineInfos(item).isPastDeadline;if(isRegistered){return !onBehalfOfUpn&&isPastDeadline;}if(hasMissingAnswers){return true;}if(onBehalfOfUpn){return false;}return !seatsInfo.hasAnySeatsLeft||isPastDeadline;}function handleClick(doRegister){return __awaiter(this,void 0,void 0,function(){var language,contents,targetRoute;return __generator(this,function(_a){switch(_a.label){case 0:if(!doRegister){if(isFullSeriesRegistrationModeEnabled&&!hasPollContext){setShowRegisterFullSeriesDialog(true);return [2/*return*/];}deregister();return [2/*return*/];}if(isFullSeriesRegistrationModeEnabled&&!hasPoll&&!hasPollContext){setShowRegisterFullSeriesDialog(true);return [2/*return*/];}if(hasPoll&&!hasPollContext){language=NewsService.getLanguageForPublishableItem(item,user);contents=item.contents[language];targetRoute=NewsService.getNewsRoute('events',item.id,contents.title);history.push(buildPath(targetRoute));return [2/*return*/];}return [4/*yield*/,register()];case 1:_a.sent();return [2/*return*/];}});});}function handleRegisterFullSeriesClick(doRegister){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:setShowRegisterFullSeriesDialog(false);if(!doRegister)return [3/*break*/,2];return [4/*yield*/,register()];case 1:_b.sent();return [3/*break*/,4];case 2:return [4/*yield*/,deregister()];case 3:_b.sent();_b.label=4;case 4:triggerEvent(RegisterFullSeriesTriggerAction.create(item.recurrenceSeriesId,doRegister?EventResponse.Registered:EventResponse.NotSet));return [2/*return*/];}});});}function register(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,submitPoll(function(){return toggleRegistration(true,answers,onBehalfOfUpn);})];case 1:_a.sent();return [2/*return*/];}});});}function deregister(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,toggleRegistration(false,null,onBehalfOfUpn)];case 1:_a.sent();return [4/*yield*/,reset()];case 2:_a.sent();return [2/*return*/];}});});}function toggleRegistration(doRegister,answersToSet,onBehalfOfUpn){return __awaiter(this,void 0,void 0,function(){var newResponse,locationQuestionId_1,locationId,registerOnBehalfOfUserStringResource,error_1;return __generator(this,function(_a){switch(_a.label){case 0:if(isSaving){return [2/*return*/];}setIsSaving(true);_a.label=1;case 1:_a.trys.push([1,3,4,5]);newResponse=doRegister?EventResponse.Registered:EventResponse.NotSet;setEventResponse(newResponse);if(!answersToSet){answersToSet=[];}locationQuestionId_1=getLocationQuestionId(item);locationId=answersToSet.filter(function(a){return a.questionId===locationQuestionId_1;}).map(function(a){return a.choiceIds[0];})[0];answersToSet=answersToSet.filter(function(a){return a.questionId!==locationQuestionId_1;});return [4/*yield*/,setEventRegistration(item.id,newResponse,answersToSet,locationId,onBehalfOfUpn)];case 2:_a.sent();refreshUserDetails();triggerEvent(EventResponseTriggerAction.create(item.id,newResponse,locationId,onBehalfOfUpn));if(doRegister&&!onBehalfOfUpn){followPublicPublishableItemComments(item.id,ItemResourceTypes.Events);triggerEvent(FollowCommentsTriggerAction.create(item.id,true));}dismissToast(toastHandleRef.current);registerOnBehalfOfUserStringResource=isHiddenMail(onBehalfOfUpn)?'Events.registration.onBehalfOfRegistrationSuccess.hiddenMail':'Events.registration.onBehalfOfRegistrationSuccess';toastHandleRef.current=showToast(doRegister?onBehalfOfUpn?registerOnBehalfOfUserStringResource:'Events.registration.registrationSuccess':onBehalfOfUpn?'Events.registration.onBehalfOfDeregistrationSuccess':'Events.registration.deregistrationSuccess',{mail:onBehalfOfUpn});return [3/*break*/,5];case 3:error_1=_a.sent();logger.error(error_1);showError('Generic.error');setEventResponse(eventResponse);return [3/*break*/,5];case 4:setIsSaving(false);return [7/*endfinally*/];case 5:return [2/*return*/];}});});}};var DeadlineInfo=_styled__default["default"](EventRegistrationDeadlineInfo).withConfig({displayName:"EventUserRegistration__DeadlineInfo",componentId:"sc-1mvozes-0"})(templateObject_1$1Z||(templateObject_1$1Z=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);var SeatsInfo=_styled__default["default"](EventRegistrationLocationSeatsInfo).withConfig({displayName:"EventUserRegistration__SeatsInfo",componentId:"sc-1mvozes-1"})(templateObject_2$1d||(templateObject_2$1d=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);var StatusInfo=_styled__default["default"](EventRegistrationRegisterStatusInfo).withConfig({displayName:"EventUserRegistration__StatusInfo",componentId:"sc-1mvozes-2"})(templateObject_3$P||(templateObject_3$P=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);var templateObject_1$1Z,templateObject_2$1d,templateObject_3$P;var EventCardUserRegistration=function EventCardUserRegistration(_a){var item=_a.item,disabled=_a.disabled,className=_a.className;var _b=React$d.useState(item.userResponse),eventResponse=_b[0],setEventResponse=_b[1];var isRegistered=eventResponse===EventResponse.Registered;// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125889
125897
|
var seatsInfo=React$d.useMemo(getSeatsInfo,[isRegistered,item.id]);return jsxRuntime.jsx(EventUserRegistrationContext.Provider,__assign({value:{hasPollContext:false,item:item,submitPoll:function(savePollAnswers){return savePollAnswers();},reset:function(){return Promise.resolve();},answers:null,hasMissingAnswers:false,onBehalfOfUpn:null,isLoading:false,eventResponse:eventResponse,setEventResponse:setEventResponse,seatsInfo:seatsInfo}},{children:jsxRuntime.jsx(EventUserRegistration,{disabled:disabled,className:className},void 0)}),void 0);function getSeatsInfo(){var _a;if(!item.registrationSettings||!item.registrationSettings.enabled||((_a=item.cancelInformation)===null||_a===void 0?void 0:_a.isCancelled)||isRegistered){return {hasAnySeatsLeft:true};}var locationsWithSeats=item.locations.filter(function(l){return l.maxNumberOfSeats>0;});var hasLocationsWithoutSeats=locationsWithSeats.length!==item.locations.length;if(!locationsWithSeats.length||hasLocationsWithoutSeats){return {hasAnySeatsLeft:true};}var participantsCount=getTotalParticipants();if(locationsWithSeats.length===1){var location_1=locationsWithSeats[0];var seatsLeft=Math.max(location_1.maxNumberOfSeats-participantsCount,0);return {hasAnySeatsLeft:seatsLeft>0,locations:[__assign(__assign({},location_1),{seatsLeft:seatsLeft})]};}// in this case we don't really know if we have any left seats or not
|
|
125890
125898
|
// since to get this information we need to load all results of all items
|
|
125891
125899
|
// we don't want to do this, so we just return "true"
|
|
@@ -125893,12 +125901,12 @@
|
|
|
125893
125901
|
return {hasAnySeatsLeft:true,locations:undefined};}function getTotalParticipants(){if(item.userResponse!==eventResponse){return (item.statistics.participantsCount||0)+(eventResponse===EventResponse.Registered?1:-1);}return item.statistics.participantsCount||0;}};var pageSize=50;var defaultShimmerCount=7;var LikersList=function LikersList(_a){var itemId=_a.itemId,itemType=_a.itemType,likersCount=_a.likersCount,className=_a.className;var getLikers=useFeedbackApi().getLikers;var initialPageSize=Math.min(likersCount,pageSize);var _b=usePromise$2(loadLikers,null,[itemId]),likersInfo=_b[0],isLoading=_b[1],loadNextPage=_b[5];var isInitialLoading=!(likersInfo===null||likersInfo===void 0?void 0:likersInfo.likers)&&isLoading;var isLoadingNextPage=(likersInfo===null||likersInfo===void 0?void 0:likersInfo.likers)&&isLoading;var scrollContainer=React$d.useRef(null);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(LikersListShimmer,__assign({count:Math.min(likersCount,defaultShimmerCount),isLoading:isInitialLoading&&likersCount>0},{children:jsxRuntime.jsxs(List$1,__assign({className:className,"data-likers-list":true,ref:scrollContainer,onScroll:handleScroll},{children:[likersInfo===null||likersInfo===void 0?void 0:likersInfo.likers.map(function(i){return jsxRuntime.jsx("li",{children:jsxRuntime.jsx(PersonaCard,__assign({upn:i.userPrincipalName},{children:jsxRuntime.jsx(StyledAvatar$2,{"data-liker":i.userPrincipalName,upn:i.userPrincipalName,text:i.displayName},void 0)}),void 0)},i.id);}),isLoadingNextPage&&jsxRuntime.jsx(StyledSpinner$3,{},void 0),likersInfo&&!likersInfo.token&&likersInfo.likers.length>defaultShimmerCount&&jsxRuntime.jsx(UsersLoadedIndicator,{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.finishedLoadingLikers"},void 0)},void 0)]}),void 0)}),void 0),(likersInfo===null||likersInfo===void 0?void 0:likersInfo.likers)&&!likersInfo.likers.length&&jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.nobodyLikesThis"},void 0)]},void 0);function loadLikers(likersInfo){if(likersInfo===void 0){likersInfo={likers:[],token:null};}return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getLikers(itemType,itemId,{pageSize:!likersInfo.token?initialPageSize:pageSize,token:likersInfo.token})];case 1:result=_a.sent();return [2/*return*/,{likers:likersInfo.likers.concat(result.items),token:result.paginationToken}];}});});}function handleScroll(){return __awaiter(this,void 0,void 0,function(){var container,err_1;return __generator(this,function(_a){switch(_a.label){case 0:container=scrollContainer.current;if(!container){return [2/*return*/];}// check if we reached the end of the pagination
|
|
125894
125902
|
// or we are already loading the next page
|
|
125895
125903
|
if(likersInfo.token==null||isLoading){return [2/*return*/];}// check if user scrolled enough
|
|
125896
|
-
if(container.scrollHeight-container.scrollTop>container.clientHeight+300){return [2/*return*/];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,loadNextPage(likersInfo)];case 2:_a.sent();return [3/*break*/,4];case 3:err_1=_a.sent();logger.error(err_1);return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var StyledAvatar$2=_styled__default["default"](Avatar).withConfig({displayName:"LikersList__StyledAvatar",componentId:"sc-a990fb-0"})(templateObject_1$1Y||(templateObject_1$1Y=__makeTemplateObject(["\n .ms-Persona-primaryText {\n white-space: initial;\n }\n"],["\n .ms-Persona-primaryText {\n white-space: initial;\n }\n"])));var List$1=_styled__default["default"].ul.withConfig({displayName:"LikersList__List",componentId:"sc-a990fb-1"})(templateObject_2$1b||(templateObject_2$1b=__makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 4px;\n\n max-height: ","px;\n overflow-y: auto;\n\n display: flex;\n flex-direction: column;\n\n li {\n display: flex;\n flex: 1 1 auto;\n margin-top: ","px;\n }\n"],["\n list-style: none;\n margin: 0;\n padding: 4px;\n\n max-height: ","px;\n overflow-y: auto;\n\n display: flex;\n flex-direction: column;\n\n li {\n display: flex;\n flex: 1 1 auto;\n margin-top: ","px;\n }\n"])),defaultShimmerCount*58,spacingS);var StyledSpinner$3=_styled__default["default"](Spinner).withConfig({displayName:"LikersList__StyledSpinner",componentId:"sc-a990fb-2"})(templateObject_3$O||(templateObject_3$O=__makeTemplateObject(["\n margin: ","px 0;\n\n & > .ms-Spinner {\n height: 38px;\n }\n"],["\n margin: ","px 0;\n\n & > .ms-Spinner {\n height: 38px;\n }\n"])),spacingS);var LikersListShimmer=function LikersListShimmer(_a){var count=_a.count,isLoading=_a.isLoading,children=_a.children;return jsxRuntime.jsx(officeUiFabricReact.Shimmer,__assign({isDataLoaded:!isLoading,customElementsGroup:Array.from(Array(count)).map(function(_,i){return jsxRuntime.jsx(UserShimmer,{},i);})},{children:children}),void 0);};var UserShimmer=function UserShimmer(){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(officeUiFabricReact.ShimmerElementsGroup,{shimmerElements:[{type:officeUiFabricReact.ShimmerElementType.gap,height:10,width:'100%'}]},void 0),jsxRuntime.jsx(officeUiFabricReact.ShimmerElementsGroup,{shimmerElements:[{type:officeUiFabricReact.ShimmerElementType.circle,height:48,verticalAlign:'bottom'},{type:officeUiFabricReact.ShimmerElementType.gap,height:15},{type:officeUiFabricReact.ShimmerElementType.gap,height:15},{type:officeUiFabricReact.ShimmerElementType.line,height:18}]},void 0)]},void 0);};var UsersLoadedIndicator=_styled__default["default"].div.withConfig({displayName:"LikersList__UsersLoadedIndicator",componentId:"sc-a990fb-3"})(templateObject_4$A||(templateObject_4$A=__makeTemplateObject(["\n margin-top: ","px;\n font-style: italic;\n display: flex;\n justify-content: center;\n"],["\n margin-top: ","px;\n font-style: italic;\n display: flex;\n justify-content: center;\n"])),spacingM);var templateObject_1$1Y,templateObject_2$1b,templateObject_3$O,templateObject_4$A;_styled__default["default"].div.withConfig({displayName:"LongPressLikeButton__ButtonHost",componentId:"sc-1n5c9rg-0"})(templateObject_1$1X||(templateObject_1$1X=__makeTemplateObject(["\n * {\n // try to fix ios behavior\n -webkit-touch-callout: none !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n -webkit-text-size-adjust: none;\n }\n"],["\n * {\n // try to fix ios behavior\n -webkit-touch-callout: none !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n -webkit-text-size-adjust: none;\n }\n"])));_styled.createGlobalStyle(templateObject_2$1a||(templateObject_2$1a=__makeTemplateObject(["\n .dialog-likers-list {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n }\n"],["\n .dialog-likers-list {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n }\n"])),maxScreenSize.small);var templateObject_1$1X,templateObject_2$1a;var HoverLikeButton=function HoverLikeButton(_a){var itemId=_a.itemId,itemType=_a.itemType,likersCount=_a.likersCount,children=_a.children;var _b=React$d.useState(false),showCallout=_b[0],setshowCallout=_b[1];var buttonRef=React$d.useRef(null);var timeout=React$d.useRef(null);React$d.useEffect(function(){return function(){return window.clearTimeout(timeout.current);};},[]);return jsxRuntime.jsxs("div",__assign({ref:buttonRef,onMouseEnter:handleOnMouseEnter,onMouseLeave:handleOnMouseLeave},{children:[jsxRuntime.jsx("div",{children:children},void 0),showCallout&&jsxRuntime.jsx(LikersCallout,{itemId:itemId,itemType:itemType,target:buttonRef.current,likersCount:likersCount,onDismiss:function(){return setshowCallout(false);}},void 0)]}),void 0);function handleOnMouseEnter(){if(!likersCount){return;}window.clearTimeout(timeout.current);timeout.current=window.setTimeout(function(){setshowCallout(true);},1000);}function handleOnMouseLeave(){window.clearTimeout(timeout.current);}};var LikersCallout=function LikersCallout(_a){var itemId=_a.itemId,itemType=_a.itemType,onDismiss=_a.onDismiss,target=_a.target,likersCount=_a.likersCount;return jsxRuntime.jsxs(StyledCallout,__assign({target:target,onDismiss:onDismiss,directionalHint:DirectionalHint.DirectionalHint.leftCenter},{children:[jsxRuntime.jsxs(LikedBy,{children:[jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.likers"},void 0),":"]},void 0),jsxRuntime.jsx(LikersList,{itemId:itemId,itemType:itemType,likersCount:likersCount},void 0)]}),void 0);};var StyledCallout=_styled__default["default"](Callout).withConfig({displayName:"HoverLikeButton__StyledCallout",componentId:"sc-1f0a2ni-0"})(templateObject_1$1W||(templateObject_1$1W=__makeTemplateObject(["\n padding: ","px;\n .ms-Callout-main {\n min-height: ","px;\n overflow-y: hidden;\n width: 225px;\n\n .ms-TooltipHost {\n white-space: initial;\n }\n }\n"],["\n padding: ","px;\n .ms-Callout-main {\n min-height: ","px;\n overflow-y: hidden;\n width: 225px;\n\n .ms-TooltipHost {\n white-space: initial;\n }\n }\n"])),spacingM,spacingXl);var LikedBy=_styled__default["default"].span.withConfig({displayName:"HoverLikeButton__LikedBy",componentId:"sc-1f0a2ni-1"})(templateObject_2$19||(templateObject_2$19=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var templateObject_1$1W,templateObject_2$19;var LikeButton=function LikeButton(_a){var itemId=_a.itemId,itemType=_a.itemType,isActive=_a.isActive,count=_a.count,onClick=_a.onClick,isDemoContent=_a.isDemoContent,doNotRenderZeroCount=_a.doNotRenderZeroCount,readOnly=_a.readOnly,className=_a.className;var features=useFeatures();var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var likeButton=jsxRuntime.jsx(FeedbackCountButton,{className:className,tooltipResourceKey:"Generic.like",activeTooltipResourceKey:"Generic.unlike",ariaLabel:formatMessage({id:isActive?'AriaLabel.unlikeItemButton':'AriaLabel.likeItemButton'}),iconName:"Like",activeIconName:"LikeSolid",isActive:isActive,onClick:onClick,count:count,feedbackType:"like",doNotRenderZeroCount:doNotRenderZeroCount,readOnly:readOnly,hideTooltip:features.showLikers},void 0);if(!features.showLikers||isDemoContent||user.isPublicUser){return likeButton;}return jsxRuntime.jsx(HoverLikeButton,__assign({itemId:itemId,itemType:itemType,likersCount:count},{children:likeButton}),void 0);};function hasFeedbackType(feedbackSettings,feedbackType){return feedbackSettings&&feedbackSettings.feedbackOptions&&feedbackSettings.feedbackOptions.findIndex(function(f){return f===feedbackType;})>-1;}var CardLikeButton=function CardLikeButton(_a){var _b,_c,_d;var item=_a.item,itemResourceType=_a.itemResourceType,className=_a.className;var _e=React$d.useState(item.isLiked),isLiked=_e[0],setIsLiked=_e[1];var _f=React$d.useState((_c=(_b=item.statistics)===null||_b===void 0?void 0:_b.likeCount)!==null&&_c!==void 0?_c:0),likeCount=_f[0],setLikeCount=_f[1];var _g=React$d.useState(false),isSaving=_g[0],setIsSaving=_g[1];var features=useFeatures();var _h=useFeedbackApi(),setFeedback=_h.setFeedback,unsetFeedback=_h.unsetFeedback;var metadata=(_d=item.metadata)!==null&&_d!==void 0?_d:{};var hasLikesEnabled=hasFeedbackType(metadata.feedbackSettings,'like');var showError=useNotificationContext().showError;if(!features.likes||!hasLikesEnabled){return null;}return jsxRuntime.jsx(StyledLikeButton$2,{itemId:item.id,itemType:itemResourceType,isActive:isLiked,count:likeCount,onClick:handleClick,doNotRenderZeroCount:true,className:className,isDemoContent:item.isDemoContent},void 0);function handleClick(){return __awaiter(this,void 0,void 0,function(){var isNowLiked,oldCount;return __generator(this,function(_b){switch(_b.label){case 0:if(isSaving){return [2/*return*/];}isNowLiked=!isLiked;oldCount=likeCount;_b.label=1;case 1:_b.trys.push([1,6,7,8]);setIsSaving(true);setIsLiked(isNowLiked);setLikeCount(isNowLiked?oldCount+1:oldCount-1);if(!isNowLiked)return [3/*break*/,3];return [4/*yield*/,setFeedback(itemResourceType,item.id,'like')];case 2:_b.sent();return [3/*break*/,5];case 3:return [4/*yield*/,unsetFeedback(itemResourceType,item.id,'like')];case 4:_b.sent();_b.label=5;case 5:return [3/*break*/,8];case 6:_b.sent();setIsLiked(!isNowLiked);showError('NewsArticle.setFeedback_error');setLikeCount(oldCount);return [3/*break*/,8];case 7:setIsSaving(false);return [7/*endfinally*/];case 8:return [2/*return*/];}});});}};var StyledLikeButton$2=_styled__default["default"](LikeButton).withConfig({displayName:"CardLikeButton__StyledLikeButton",componentId:"sc-10mlzn4-0"})(templateObject_1$1V||(templateObject_1$1V=__makeTemplateObject(["\n min-width: 1px;\n margin: 0 4px;\n font-size: 0.9rem;\n font-weight: normal;\n\n i {\n font-size: 22px;\n font-weight: 400;\n }\n"],["\n min-width: 1px;\n margin: 0 4px;\n font-size: 0.9rem;\n font-weight: normal;\n\n i {\n font-size: 22px;\n font-weight: 400;\n }\n"])));var templateObject_1$1V;var EventRecurrenceSeriesInfo=function EventRecurrenceSeriesInfo(_a){var _b;var eventItem=_a.eventItem,className=_a.className;if(!(eventItem===null||eventItem===void 0?void 0:eventItem.recurrenceSeriesId)){return null;}var endDate=(_b=eventItem.recurrenceSettings)===null||_b===void 0?void 0:_b.endDate;return jsxRuntime.jsx(Host$J,__assign({className:className},{children:jsxRuntime.jsx(StyledTooltip$3,__assign({resourceKey:"Events.editor.recurrence.iconTooltip",values:{endDate:moment(endDate).format('LL')},hidden:!endDate},{children:jsxRuntime.jsxs(Container$2,{children:[jsxRuntime.jsx(StyledIcon$6,{iconName:"RecurringEvent"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:"Events.editor.recurrence.series"},void 0)]},void 0)}),void 0)}),void 0);};var Host$J=_styled__default["default"].div.withConfig({displayName:"EventRecurrenceSeriesInfo__Host",componentId:"sc-12fly5n-0"})(templateObject_1$1U||(templateObject_1$1U=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n"],["\n display: flex;\n font-size: ","px;\n"])),fontSizeSmall);var StyledTooltip$3=_styled__default["default"](Tooltip).withConfig({displayName:"EventRecurrenceSeriesInfo__StyledTooltip",componentId:"sc-12fly5n-1"})(templateObject_2$18||(templateObject_2$18=__makeTemplateObject(["\n z-index: 1;\n"],["\n z-index: 1;\n"])));var Container$2=_styled__default["default"].div.withConfig({displayName:"EventRecurrenceSeriesInfo__Container",componentId:"sc-12fly5n-2"})(templateObject_3$N||(templateObject_3$N=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledIcon$6=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"EventRecurrenceSeriesInfo__StyledIcon",componentId:"sc-12fly5n-3"})(templateObject_4$z||(templateObject_4$z=__makeTemplateObject(["\n font-size: ","px;\n padding-right: ","px;\n"],["\n font-size: ","px;\n padding-right: ","px;\n"])),fontSizeMedium,spacingXs);var templateObject_1$1U,templateObject_2$18,templateObject_3$N,templateObject_4$z;var EventRecurrenceSeriesInfoNavLink=function EventRecurrenceSeriesInfoNavLink(_a){var recurrenceSeriesId=_a.recurrenceSeriesId,title=_a.title,children=_a.children,className=_a.className;var buildPath=useSubscriptionHandlePathBuilder().buildPath;if(!recurrenceSeriesId){return null;}return jsxRuntime.jsx(StyledNavLink$2,__assign({to:buildPath("/events/upcoming?"+queryString.stringify({seriesId:recurrenceSeriesId,seriesTitle:title})),className:className},{children:children}),void 0);};var StyledNavLink$2=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"EventRecurrenceSeriesInfoNavLink__StyledNavLink",componentId:"sc-1szm15-0"})(templateObject_1$1T||(templateObject_1$1T=__makeTemplateObject(["\n &&& {\n color: ",";\n text-decoration: none;\n }\n"],["\n &&& {\n color: ",";\n text-decoration: none;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1T;var EventCard=function EventCard(_a){var _b,_c,_d,_e,_f;var item=_a.item,language=_a.language,styleDefinition=_a.styleDefinition,allowFilterByChannels=_a.allowFilterByChannels,showFeedbackButtons=_a.showFeedbackButtons,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var windowSize=useWindowSize$2();var highlight=!!user.unreadEvents.find(function(e){return e.itemId===item.id||e.itemId===item.recurrenceSeriesId;});var userLanguage=getPreferredContentLanguage(user);var contents=item.contents[language];var targetRoute=NewsService.getNewsRoute(buildPath('/events'),item.id,contents.title);var isCancelled=(_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled;var hasNoRegistration=!isCancelled&&!((_c=item.registrationSettings)===null||_c===void 0?void 0:_c.enabled);var hasManyLocationsAndContacts=((_d=item.locations)===null||_d===void 0?void 0:_d.length)+((_e=item.contacts)===null||_e===void 0?void 0:_e.length)>=6;var bannerOnTheLeft=windowSize.width>767;var bannerWidth=bannerOnTheLeft&&hasManyLocationsAndContacts?750:450;return jsxRuntime.jsxs(Host$I,__assign({className:className,highlight:highlight,styleDefinition:styleDefinition,"data-item-id":item.id,"data-card-highlight":highlight,"data-no-registration":hasNoRegistration,"data-banner":(_f=item.bannerInfo)===null||_f===void 0?void 0:_f.type},{children:[jsxRuntime.jsx(IEFix,{},void 0),!readOnly&&jsxRuntime.jsx(ClickableOverlay,{baseRoute:buildPath('/events'),title:contents.title,itemId:item.id,itemType:ItemResourceTypes.Events},void 0),jsxRuntime.jsx(EventCardBanner,{item:item,bannerWidth:bannerWidth,bannerHostDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerHostWidth,showPlaceholder:!item.bannerInfo&&(styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showPlaceholderIfNoBannerInfo)},void 0),jsxRuntime.jsxs(Content$7,{children:[jsxRuntime.jsxs(Header$2,__assign({"data-card-header":true},{children:[jsxRuntime.jsx(Dates,{startDate:item.startDate,endDate:item.endDate,isCancelled:isCancelled,className:"event-card-dates"},void 0),showFeedbackButtons&&jsxRuntime.jsx(Feedback,{item:item,type:"header",targetRoute:targetRoute},void 0)]}),void 0),readOnly?jsxRuntime.jsx(RecurrenceSeriesInfo$1,{eventItem:item},void 0):jsxRuntime.jsx(EventRecurrenceSeriesInfoNavLink,{recurrenceSeriesId:item.recurrenceSeriesId,title:contents.title,children:jsxRuntime.jsx(RecurrenceSeriesInfo$1,{eventItem:item},void 0)},void 0),jsxRuntime.jsx(Title$7,{children:readOnly?contents.title:jsxRuntime.jsx(StyledLink,__assign({to:targetRoute},{children:contents.title}),void 0)},void 0),jsxRuntime.jsxs(Footer$1,{children:[jsxRuntime.jsxs(FooterStart,{children:[jsxRuntime.jsx(Locations,{locations:item.locations},void 0),jsxRuntime.jsx(Contacts,{item:item,hideAnnouncer:true},void 0),jsxRuntime.jsx(EventChannelsDisplay,{item:item,language:userLanguage,allowFilterByChannels:allowFilterByChannels,channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0),jsxRuntime.jsxs(FooterEnd,{children:[jsxRuntime.jsx(Registration,{item:item,disabled:readOnly},void 0),jsxRuntime.jsx(CancelInfo,{item:item},void 0),showFeedbackButtons&&jsxRuntime.jsx(Feedback,{item:item,type:"footer",targetRoute:targetRoute},void 0)]},void 0)]},void 0)]},void 0)]}),void 0);};var Host$I=_styled__default["default"].article.withConfig({displayName:"EventCard__Host",componentId:"sc-19skrau-0"})(templateObject_4$y||(templateObject_4$y=__makeTemplateObject(["\n ","\n\n display: flex;\n width: 100%;\n position: relative;\n\n @media (max-width: ","px) {\n flex-direction: column;\n }\n\n ","\n\n color: ",";\n"],["\n ","\n\n display: flex;\n width: 100%;\n position: relative;\n\n @media (max-width: ","px) {\n flex-direction: column;\n }\n\n ","\n\n color: ",";\n"])),function(p){return p.styleDefinition?_styled.css(templateObject_1$1S||(templateObject_1$1S=__makeTemplateObject(["\n background-color: ",";\n ",";\n "],["\n background-color: ",";\n ",";\n "])),p.styleDefinition.backgroundColor||p.theme.palette.white,!p.styleDefinition.noShadow&&CardBorderInline(2,2)):_styled.css(templateObject_2$17||(templateObject_2$17=__makeTemplateObject(["\n ",";\n background-color: ",";\n "],["\n ",";\n background-color: ",";\n "])),CardBorderInline(2,2),p.theme.palette.white);},maxScreenSize.medium,function(p){return p.highlight&&_styled.css(templateObject_3$M||(templateObject_3$M=__makeTemplateObject(["\n position: relative;\n\n &::after {\n ",";\n }\n "],["\n position: relative;\n\n &::after {\n ",";\n }\n "])),BannerHighlightStyle$1);},function(p){return p.theme.textColors.default;});var BannerHighlightStyle$1=_styled.css(templateObject_5$v||(templateObject_5$v=__makeTemplateObject(["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n"],["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n"])),spacingXs,function(p){return p.theme.palette.accent;});var StyledLink=_styled__default["default"](ReactRouterDom.Link).withConfig({displayName:"EventCard__StyledLink",componentId:"sc-19skrau-1"})(templateObject_6$l||(templateObject_6$l=__makeTemplateObject(["\n &&& {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n"],["\n &&& {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n"])),function(p){return p.theme.textColors.default;});var Title$7=_styled__default["default"].h3.withConfig({displayName:"EventCard__Title",componentId:"sc-19skrau-2"})(templateObject_7$g||(templateObject_7$g=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeMedium);var Header$2=_styled__default["default"].div.withConfig({displayName:"EventCard__Header",componentId:"sc-19skrau-3"})(templateObject_8$f||(templateObject_8$f=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: flex-start;\n > *:not(:first-child) {\n padding-top: ","px;\n }\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: flex-start;\n > *:not(:first-child) {\n padding-top: ","px;\n }\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),maxScreenSize.medium,spacingXs);var RecurrenceSeriesInfo$1=_styled__default["default"](EventRecurrenceSeriesInfo).withConfig({displayName:"EventCard__RecurrenceSeriesInfo",componentId:"sc-19skrau-4"})(templateObject_9$c||(templateObject_9$c=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var Content$7=_styled__default["default"].div.withConfig({displayName:"EventCard__Content",componentId:"sc-19skrau-5"})(templateObject_10$b||(templateObject_10$b=__makeTemplateObject(["\n padding: ","px;\n flex-grow: 1;\n\n color: ",";\n"],["\n padding: ","px;\n flex-grow: 1;\n\n color: ",";\n"])),spacingM,function(p){return p.theme.textColors.default;});var Footer$1=_styled__default["default"].div.withConfig({displayName:"EventCard__Footer",componentId:"sc-19skrau-6"})(templateObject_11$7||(templateObject_11$7=__makeTemplateObject(["\n margin-top: ","px;\n\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: stretch;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n margin-top: ","px;\n\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: stretch;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingM,maxScreenSize.medium);var FooterStart=_styled__default["default"].div.withConfig({displayName:"EventCard__FooterStart",componentId:"sc-19skrau-7"})(templateObject_12$6||(templateObject_12$6=__makeTemplateObject(["\n flex: 1 1 100%;\n\n margin-right: ","px;\n\n > *:first-child:not(:only-child) {\n margin-bottom: ","px;\n }\n\n @media (max-width: ","px) {\n flex: 1 1 auto;\n }\n"],["\n flex: 1 1 100%;\n\n margin-right: ","px;\n\n > *:first-child:not(:only-child) {\n margin-bottom: ","px;\n }\n\n @media (max-width: ","px) {\n flex: 1 1 auto;\n }\n"])),spacingXs,spacingS,maxScreenSize.medium);var FooterEnd=_styled__default["default"].div.withConfig({displayName:"EventCard__FooterEnd",componentId:"sc-19skrau-8"})(templateObject_13$5||(templateObject_13$5=__makeTemplateObject(["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"],["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"])),maxScreenSize.medium,spacingS);var HeaderFeedback=_styled.css(templateObject_14$5||(templateObject_14$5=__makeTemplateObject(["\n display: none;\n @media (min-width: ","px) {\n display: flex;\n align-items: center;\n }\n"],["\n display: none;\n @media (min-width: ","px) {\n display: flex;\n align-items: center;\n }\n"])),minScreenSize.medium);var FooterFeedback=_styled.css(templateObject_15$5||(templateObject_15$5=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"])),spacingS,minScreenSize.medium);var FeedbackHost=_styled__default["default"].div.withConfig({displayName:"EventCard__FeedbackHost",componentId:"sc-19skrau-9"})(templateObject_16$5||(templateObject_16$5=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),function(_a){var isHeader=_a.isHeader;return isHeader?HeaderFeedback:FooterFeedback;});var Feedback=function Feedback(_a){var item=_a.item,type=_a.type,targetRoute=_a.targetRoute;var user=useCurrentUser();var showCommentCount=item.statistics&&item.statistics.commentCount>0&&hasFeedbackType(item.metadata.feedbackSettings,'comment')&&!user.isPublicUser;return jsxRuntime.jsxs(FeedbackHost,__assign({isHeader:type==='header'},{children:[jsxRuntime.jsx(EventCardLikeButton,{item:item,itemResourceType:ItemResourceTypes.Events},void 0),showCommentCount&&jsxRuntime.jsx(StyledLink,__assign({to:targetRoute+"#comments","aria-hidden":"true"},{children:jsxRuntime.jsx(EventCardCommentCount,{item:item},void 0)}),void 0)]}),void 0);};var EventCardLikeButton=_styled__default["default"](CardLikeButton).withConfig({displayName:"EventCard__EventCardLikeButton",componentId:"sc-19skrau-10"})(templateObject_17$4||(templateObject_17$4=__makeTemplateObject(["\n && {\n button {\n min-height: 23px;\n display: flex;\n margin-right: 9px;\n font-size: 1rem;\n }\n }\n"],["\n && {\n button {\n min-height: 23px;\n display: flex;\n margin-right: 9px;\n font-size: 1rem;\n }\n }\n"])));var Registration=_styled__default["default"](EventCardUserRegistration).withConfig({displayName:"EventCard__Registration",componentId:"sc-19skrau-11"})(templateObject_18$3||(templateObject_18$3=__makeTemplateObject(["\n && {\n margin-top: ","px;\n button {\n width: 100%;\n }\n\n @media (min-width: ","px) {\n text-align: right;\n button {\n width: initial;\n }\n }\n }\n"],["\n && {\n margin-top: ","px;\n button {\n width: 100%;\n }\n\n @media (min-width: ","px) {\n text-align: right;\n button {\n width: initial;\n }\n }\n }\n"])),spacingS,minScreenSize.medium);var Dates=_styled__default["default"](DateTimeRange).withConfig({displayName:"EventCard__Dates",componentId:"sc-19skrau-12"})(templateObject_19$3||(templateObject_19$3=__makeTemplateObject(["\n flex: 1;\n font-size: ","px;\n font-weight: 500;\n opacity: ",";\n padding-right: ","px;\n"],["\n flex: 1;\n font-size: ","px;\n font-weight: 500;\n opacity: ",";\n padding-right: ","px;\n"])),fontSizeSmall,function(_a){var isCancelled=_a.isCancelled;return isCancelled?0.4:1;},spacingS);var Locations=_styled__default["default"](EventLocationInfo).withConfig({displayName:"EventCard__Locations",componentId:"sc-19skrau-13"})(templateObject_20$1||(templateObject_20$1=__makeTemplateObject([""],[""])));var Contacts=_styled__default["default"](EventPeopleInfo).withConfig({displayName:"EventCard__Contacts",componentId:"sc-19skrau-14"})(templateObject_21$1||(templateObject_21$1=__makeTemplateObject(["\n flex-direction: column;\n"],["\n flex-direction: column;\n"])));var CancelInfo=_styled__default["default"](EventCancelInformation).withConfig({displayName:"EventCard__CancelInfo",componentId:"sc-19skrau-15"})(templateObject_22$1||(templateObject_22$1=__makeTemplateObject(["\n margin: 0 -","px;\n @media (min-width: ","px) {\n margin: 0;\n }\n"],["\n margin: 0 -","px;\n @media (min-width: ","px) {\n margin: 0;\n }\n"])),spacingM,minScreenSize.medium);var IEFix=_styled.createGlobalStyle(templateObject_23$1||(templateObject_23$1=__makeTemplateObject(["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"],["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"])));var templateObject_1$1S,templateObject_2$17,templateObject_3$M,templateObject_4$y,templateObject_5$v,templateObject_6$l,templateObject_7$g,templateObject_8$f,templateObject_9$c,templateObject_10$b,templateObject_11$7,templateObject_12$6,templateObject_13$5,templateObject_14$5,templateObject_15$5,templateObject_16$5,templateObject_17$4,templateObject_18$3,templateObject_19$3,templateObject_20$1,templateObject_21$1,templateObject_22$1,templateObject_23$1;var $$3=_export;var aFunction=aFunction$6;var toObject$1=toObject$6;var fails$j=fails$i;var arrayMethodIsStrict=arrayMethodIsStrict$2;var test$1=[];var nativeSort=test$1.sort;// IE8-
|
|
125904
|
+
if(container.scrollHeight-container.scrollTop>container.clientHeight+300){return [2/*return*/];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,loadNextPage(likersInfo)];case 2:_a.sent();return [3/*break*/,4];case 3:err_1=_a.sent();logger.error(err_1);return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var StyledAvatar$2=_styled__default["default"](Avatar).withConfig({displayName:"LikersList__StyledAvatar",componentId:"sc-a990fb-0"})(templateObject_1$1Y||(templateObject_1$1Y=__makeTemplateObject(["\n .ms-Persona-primaryText {\n white-space: initial;\n }\n"],["\n .ms-Persona-primaryText {\n white-space: initial;\n }\n"])));var List$1=_styled__default["default"].ul.withConfig({displayName:"LikersList__List",componentId:"sc-a990fb-1"})(templateObject_2$1c||(templateObject_2$1c=__makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 4px;\n\n max-height: ","px;\n overflow-y: auto;\n\n display: flex;\n flex-direction: column;\n\n li {\n display: flex;\n flex: 1 1 auto;\n margin-top: ","px;\n }\n"],["\n list-style: none;\n margin: 0;\n padding: 4px;\n\n max-height: ","px;\n overflow-y: auto;\n\n display: flex;\n flex-direction: column;\n\n li {\n display: flex;\n flex: 1 1 auto;\n margin-top: ","px;\n }\n"])),defaultShimmerCount*58,spacingS);var StyledSpinner$3=_styled__default["default"](Spinner).withConfig({displayName:"LikersList__StyledSpinner",componentId:"sc-a990fb-2"})(templateObject_3$O||(templateObject_3$O=__makeTemplateObject(["\n margin: ","px 0;\n\n & > .ms-Spinner {\n height: 38px;\n }\n"],["\n margin: ","px 0;\n\n & > .ms-Spinner {\n height: 38px;\n }\n"])),spacingS);var LikersListShimmer=function LikersListShimmer(_a){var count=_a.count,isLoading=_a.isLoading,children=_a.children;return jsxRuntime.jsx(officeUiFabricReact.Shimmer,__assign({isDataLoaded:!isLoading,customElementsGroup:Array.from(Array(count)).map(function(_,i){return jsxRuntime.jsx(UserShimmer,{},i);})},{children:children}),void 0);};var UserShimmer=function UserShimmer(){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(officeUiFabricReact.ShimmerElementsGroup,{shimmerElements:[{type:officeUiFabricReact.ShimmerElementType.gap,height:10,width:'100%'}]},void 0),jsxRuntime.jsx(officeUiFabricReact.ShimmerElementsGroup,{shimmerElements:[{type:officeUiFabricReact.ShimmerElementType.circle,height:48,verticalAlign:'bottom'},{type:officeUiFabricReact.ShimmerElementType.gap,height:15},{type:officeUiFabricReact.ShimmerElementType.gap,height:15},{type:officeUiFabricReact.ShimmerElementType.line,height:18}]},void 0)]},void 0);};var UsersLoadedIndicator=_styled__default["default"].div.withConfig({displayName:"LikersList__UsersLoadedIndicator",componentId:"sc-a990fb-3"})(templateObject_4$A||(templateObject_4$A=__makeTemplateObject(["\n margin-top: ","px;\n font-style: italic;\n display: flex;\n justify-content: center;\n"],["\n margin-top: ","px;\n font-style: italic;\n display: flex;\n justify-content: center;\n"])),spacingM);var templateObject_1$1Y,templateObject_2$1c,templateObject_3$O,templateObject_4$A;_styled__default["default"].div.withConfig({displayName:"LongPressLikeButton__ButtonHost",componentId:"sc-1n5c9rg-0"})(templateObject_1$1X||(templateObject_1$1X=__makeTemplateObject(["\n * {\n // try to fix ios behavior\n -webkit-touch-callout: none !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n -webkit-text-size-adjust: none;\n }\n"],["\n * {\n // try to fix ios behavior\n -webkit-touch-callout: none !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n -webkit-text-size-adjust: none;\n }\n"])));_styled.createGlobalStyle(templateObject_2$1b||(templateObject_2$1b=__makeTemplateObject(["\n .dialog-likers-list {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n }\n"],["\n .dialog-likers-list {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n }\n"])),maxScreenSize.small);var templateObject_1$1X,templateObject_2$1b;var HoverLikeButton=function HoverLikeButton(_a){var itemId=_a.itemId,itemType=_a.itemType,likersCount=_a.likersCount,children=_a.children;var _b=React$d.useState(false),showCallout=_b[0],setshowCallout=_b[1];var buttonRef=React$d.useRef(null);var timeout=React$d.useRef(null);React$d.useEffect(function(){return function(){return window.clearTimeout(timeout.current);};},[]);return jsxRuntime.jsxs("div",__assign({ref:buttonRef,onMouseEnter:handleOnMouseEnter,onMouseLeave:handleOnMouseLeave},{children:[jsxRuntime.jsx("div",{children:children},void 0),showCallout&&jsxRuntime.jsx(LikersCallout,{itemId:itemId,itemType:itemType,target:buttonRef.current,likersCount:likersCount,onDismiss:function(){return setshowCallout(false);}},void 0)]}),void 0);function handleOnMouseEnter(){if(!likersCount){return;}window.clearTimeout(timeout.current);timeout.current=window.setTimeout(function(){setshowCallout(true);},1000);}function handleOnMouseLeave(){window.clearTimeout(timeout.current);}};var LikersCallout=function LikersCallout(_a){var itemId=_a.itemId,itemType=_a.itemType,onDismiss=_a.onDismiss,target=_a.target,likersCount=_a.likersCount;return jsxRuntime.jsxs(StyledCallout,__assign({target:target,onDismiss:onDismiss,directionalHint:DirectionalHint.DirectionalHint.leftCenter},{children:[jsxRuntime.jsxs(LikedBy,{children:[jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.likers"},void 0),":"]},void 0),jsxRuntime.jsx(LikersList,{itemId:itemId,itemType:itemType,likersCount:likersCount},void 0)]}),void 0);};var StyledCallout=_styled__default["default"](Callout).withConfig({displayName:"HoverLikeButton__StyledCallout",componentId:"sc-1f0a2ni-0"})(templateObject_1$1W||(templateObject_1$1W=__makeTemplateObject(["\n padding: ","px;\n .ms-Callout-main {\n min-height: ","px;\n overflow-y: hidden;\n width: 225px;\n\n .ms-TooltipHost {\n white-space: initial;\n }\n }\n"],["\n padding: ","px;\n .ms-Callout-main {\n min-height: ","px;\n overflow-y: hidden;\n width: 225px;\n\n .ms-TooltipHost {\n white-space: initial;\n }\n }\n"])),spacingM,spacingXl);var LikedBy=_styled__default["default"].span.withConfig({displayName:"HoverLikeButton__LikedBy",componentId:"sc-1f0a2ni-1"})(templateObject_2$1a||(templateObject_2$1a=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var templateObject_1$1W,templateObject_2$1a;var LikeButton=function LikeButton(_a){var itemId=_a.itemId,itemType=_a.itemType,isActive=_a.isActive,count=_a.count,onClick=_a.onClick,isDemoContent=_a.isDemoContent,doNotRenderZeroCount=_a.doNotRenderZeroCount,readOnly=_a.readOnly,className=_a.className;var features=useFeatures();var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var likeButton=jsxRuntime.jsx(FeedbackCountButton,{className:className,tooltipResourceKey:"Generic.like",activeTooltipResourceKey:"Generic.unlike",ariaLabel:formatMessage({id:isActive?'AriaLabel.unlikeItemButton':'AriaLabel.likeItemButton'}),iconName:"Like",activeIconName:"LikeSolid",isActive:isActive,onClick:onClick,count:count,feedbackType:"like",doNotRenderZeroCount:doNotRenderZeroCount,readOnly:readOnly,hideTooltip:features.showLikers},void 0);if(!features.showLikers||isDemoContent||user.isPublicUser){return likeButton;}return jsxRuntime.jsx(HoverLikeButton,__assign({itemId:itemId,itemType:itemType,likersCount:count},{children:likeButton}),void 0);};function hasFeedbackType(feedbackSettings,feedbackType){return feedbackSettings&&feedbackSettings.feedbackOptions&&feedbackSettings.feedbackOptions.findIndex(function(f){return f===feedbackType;})>-1;}var CardLikeButton=function CardLikeButton(_a){var _b,_c,_d;var item=_a.item,itemResourceType=_a.itemResourceType,className=_a.className;var _e=React$d.useState(item.isLiked),isLiked=_e[0],setIsLiked=_e[1];var _f=React$d.useState((_c=(_b=item.statistics)===null||_b===void 0?void 0:_b.likeCount)!==null&&_c!==void 0?_c:0),likeCount=_f[0],setLikeCount=_f[1];var _g=React$d.useState(false),isSaving=_g[0],setIsSaving=_g[1];var features=useFeatures();var _h=useFeedbackApi(),setFeedback=_h.setFeedback,unsetFeedback=_h.unsetFeedback;var metadata=(_d=item.metadata)!==null&&_d!==void 0?_d:{};var hasLikesEnabled=hasFeedbackType(metadata.feedbackSettings,'like');var showError=useNotificationContext().showError;if(!features.likes||!hasLikesEnabled){return null;}return jsxRuntime.jsx(StyledLikeButton$2,{itemId:item.id,itemType:itemResourceType,isActive:isLiked,count:likeCount,onClick:handleClick,doNotRenderZeroCount:true,className:className,isDemoContent:item.isDemoContent},void 0);function handleClick(){return __awaiter(this,void 0,void 0,function(){var isNowLiked,oldCount;return __generator(this,function(_b){switch(_b.label){case 0:if(isSaving){return [2/*return*/];}isNowLiked=!isLiked;oldCount=likeCount;_b.label=1;case 1:_b.trys.push([1,6,7,8]);setIsSaving(true);setIsLiked(isNowLiked);setLikeCount(isNowLiked?oldCount+1:oldCount-1);if(!isNowLiked)return [3/*break*/,3];return [4/*yield*/,setFeedback(itemResourceType,item.id,'like')];case 2:_b.sent();return [3/*break*/,5];case 3:return [4/*yield*/,unsetFeedback(itemResourceType,item.id,'like')];case 4:_b.sent();_b.label=5;case 5:return [3/*break*/,8];case 6:_b.sent();setIsLiked(!isNowLiked);showError('NewsArticle.setFeedback_error');setLikeCount(oldCount);return [3/*break*/,8];case 7:setIsSaving(false);return [7/*endfinally*/];case 8:return [2/*return*/];}});});}};var StyledLikeButton$2=_styled__default["default"](LikeButton).withConfig({displayName:"CardLikeButton__StyledLikeButton",componentId:"sc-10mlzn4-0"})(templateObject_1$1V||(templateObject_1$1V=__makeTemplateObject(["\n min-width: 1px;\n margin: 0 4px;\n font-size: 0.9rem;\n font-weight: normal;\n\n i {\n font-size: 22px;\n font-weight: 400;\n }\n"],["\n min-width: 1px;\n margin: 0 4px;\n font-size: 0.9rem;\n font-weight: normal;\n\n i {\n font-size: 22px;\n font-weight: 400;\n }\n"])));var templateObject_1$1V;var EventRecurrenceSeriesInfo=function EventRecurrenceSeriesInfo(_a){var _b;var eventItem=_a.eventItem,className=_a.className;if(!(eventItem===null||eventItem===void 0?void 0:eventItem.recurrenceSeriesId)){return null;}var endDate=(_b=eventItem.recurrenceSettings)===null||_b===void 0?void 0:_b.endDate;return jsxRuntime.jsx(Host$J,__assign({className:className},{children:jsxRuntime.jsx(StyledTooltip$3,__assign({resourceKey:"Events.editor.recurrence.iconTooltip",values:{endDate:moment(endDate).format('LL')},hidden:!endDate},{children:jsxRuntime.jsxs(Container$2,{children:[jsxRuntime.jsx(StyledIcon$6,{iconName:"RecurringEvent"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:"Events.editor.recurrence.series"},void 0)]},void 0)}),void 0)}),void 0);};var Host$J=_styled__default["default"].div.withConfig({displayName:"EventRecurrenceSeriesInfo__Host",componentId:"sc-12fly5n-0"})(templateObject_1$1U||(templateObject_1$1U=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n"],["\n display: flex;\n font-size: ","px;\n"])),fontSizeSmall);var StyledTooltip$3=_styled__default["default"](Tooltip).withConfig({displayName:"EventRecurrenceSeriesInfo__StyledTooltip",componentId:"sc-12fly5n-1"})(templateObject_2$19||(templateObject_2$19=__makeTemplateObject(["\n z-index: 1;\n"],["\n z-index: 1;\n"])));var Container$2=_styled__default["default"].div.withConfig({displayName:"EventRecurrenceSeriesInfo__Container",componentId:"sc-12fly5n-2"})(templateObject_3$N||(templateObject_3$N=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledIcon$6=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"EventRecurrenceSeriesInfo__StyledIcon",componentId:"sc-12fly5n-3"})(templateObject_4$z||(templateObject_4$z=__makeTemplateObject(["\n font-size: ","px;\n padding-right: ","px;\n"],["\n font-size: ","px;\n padding-right: ","px;\n"])),fontSizeMedium,spacingXs);var templateObject_1$1U,templateObject_2$19,templateObject_3$N,templateObject_4$z;var EventRecurrenceSeriesInfoNavLink=function EventRecurrenceSeriesInfoNavLink(_a){var recurrenceSeriesId=_a.recurrenceSeriesId,title=_a.title,children=_a.children,className=_a.className;var buildPath=useSubscriptionHandlePathBuilder().buildPath;if(!recurrenceSeriesId){return null;}return jsxRuntime.jsx(StyledNavLink$2,__assign({to:buildPath("/events/upcoming?"+queryString.stringify({seriesId:recurrenceSeriesId,seriesTitle:title})),className:className},{children:children}),void 0);};var StyledNavLink$2=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"EventRecurrenceSeriesInfoNavLink__StyledNavLink",componentId:"sc-1szm15-0"})(templateObject_1$1T||(templateObject_1$1T=__makeTemplateObject(["\n &&& {\n color: ",";\n text-decoration: none;\n }\n"],["\n &&& {\n color: ",";\n text-decoration: none;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1T;var EventCard=function EventCard(_a){var _b,_c,_d,_e,_f;var item=_a.item,language=_a.language,styleDefinition=_a.styleDefinition,allowFilterByChannels=_a.allowFilterByChannels,showFeedbackButtons=_a.showFeedbackButtons,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var windowSize=useWindowSize$2();var highlight=!!user.unreadEvents.find(function(e){return e.itemId===item.id||e.itemId===item.recurrenceSeriesId;});var userLanguage=getPreferredContentLanguage(user);var contents=item.contents[language];var targetRoute=NewsService.getNewsRoute(buildPath('/events'),item.id,contents.title);var isCancelled=(_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled;var hasNoRegistration=!isCancelled&&!((_c=item.registrationSettings)===null||_c===void 0?void 0:_c.enabled);var hasManyLocationsAndContacts=((_d=item.locations)===null||_d===void 0?void 0:_d.length)+((_e=item.contacts)===null||_e===void 0?void 0:_e.length)>=6;var bannerOnTheLeft=windowSize.width>767;var bannerWidth=bannerOnTheLeft&&hasManyLocationsAndContacts?750:450;return jsxRuntime.jsxs(Host$I,__assign({className:className,highlight:highlight,styleDefinition:styleDefinition,"data-item-id":item.id,"data-card-highlight":highlight,"data-no-registration":hasNoRegistration,"data-banner":(_f=item.bannerInfo)===null||_f===void 0?void 0:_f.type},{children:[jsxRuntime.jsx(IEFix,{},void 0),!readOnly&&jsxRuntime.jsx(ClickableOverlay,{baseRoute:buildPath('/events'),title:contents.title,itemId:item.id,itemType:ItemResourceTypes.Events},void 0),jsxRuntime.jsx(EventCardBanner,{item:item,bannerWidth:bannerWidth,bannerHostDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerHostWidth,showPlaceholder:!item.bannerInfo&&(styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showPlaceholderIfNoBannerInfo)},void 0),jsxRuntime.jsxs(Content$7,{children:[jsxRuntime.jsxs(Header$2,__assign({"data-card-header":true},{children:[jsxRuntime.jsx(Dates,{startDate:item.startDate,endDate:item.endDate,isCancelled:isCancelled,className:"event-card-dates"},void 0),showFeedbackButtons&&jsxRuntime.jsx(Feedback,{item:item,type:"header",targetRoute:targetRoute},void 0)]}),void 0),readOnly?jsxRuntime.jsx(RecurrenceSeriesInfo$1,{eventItem:item},void 0):jsxRuntime.jsx(EventRecurrenceSeriesInfoNavLink,{recurrenceSeriesId:item.recurrenceSeriesId,title:contents.title,children:jsxRuntime.jsx(RecurrenceSeriesInfo$1,{eventItem:item},void 0)},void 0),jsxRuntime.jsx(Title$7,{children:readOnly?contents.title:jsxRuntime.jsx(StyledLink,__assign({to:targetRoute},{children:contents.title}),void 0)},void 0),jsxRuntime.jsxs(Footer$1,{children:[jsxRuntime.jsxs(FooterStart,{children:[jsxRuntime.jsx(Locations,{locations:item.locations},void 0),jsxRuntime.jsx(Contacts,{item:item,hideAnnouncer:true},void 0),jsxRuntime.jsx(EventChannelsDisplay,{item:item,language:userLanguage,allowFilterByChannels:allowFilterByChannels,channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0),jsxRuntime.jsxs(FooterEnd,{children:[jsxRuntime.jsx(Registration,{item:item,disabled:readOnly},void 0),jsxRuntime.jsx(CancelInfo,{item:item},void 0),showFeedbackButtons&&jsxRuntime.jsx(Feedback,{item:item,type:"footer",targetRoute:targetRoute},void 0)]},void 0)]},void 0)]},void 0)]}),void 0);};var Host$I=_styled__default["default"].article.withConfig({displayName:"EventCard__Host",componentId:"sc-19skrau-0"})(templateObject_4$y||(templateObject_4$y=__makeTemplateObject(["\n ","\n\n display: flex;\n width: 100%;\n position: relative;\n\n @media (max-width: ","px) {\n flex-direction: column;\n }\n\n ","\n\n color: ",";\n"],["\n ","\n\n display: flex;\n width: 100%;\n position: relative;\n\n @media (max-width: ","px) {\n flex-direction: column;\n }\n\n ","\n\n color: ",";\n"])),function(p){return p.styleDefinition?_styled.css(templateObject_1$1S||(templateObject_1$1S=__makeTemplateObject(["\n background-color: ",";\n ",";\n "],["\n background-color: ",";\n ",";\n "])),p.styleDefinition.backgroundColor||p.theme.palette.white,!p.styleDefinition.noShadow&&CardBorderInline(2,2)):_styled.css(templateObject_2$18||(templateObject_2$18=__makeTemplateObject(["\n ",";\n background-color: ",";\n "],["\n ",";\n background-color: ",";\n "])),CardBorderInline(2,2),p.theme.palette.white);},maxScreenSize.medium,function(p){return p.highlight&&_styled.css(templateObject_3$M||(templateObject_3$M=__makeTemplateObject(["\n position: relative;\n\n &::after {\n ",";\n }\n "],["\n position: relative;\n\n &::after {\n ",";\n }\n "])),BannerHighlightStyle$1);},function(p){return p.theme.textColors.default;});var BannerHighlightStyle$1=_styled.css(templateObject_5$v||(templateObject_5$v=__makeTemplateObject(["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n"],["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n"])),spacingXs,function(p){return p.theme.palette.accent;});var StyledLink=_styled__default["default"](ReactRouterDom.Link).withConfig({displayName:"EventCard__StyledLink",componentId:"sc-19skrau-1"})(templateObject_6$l||(templateObject_6$l=__makeTemplateObject(["\n &&& {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n"],["\n &&& {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n"])),function(p){return p.theme.textColors.default;});var Title$7=_styled__default["default"].h3.withConfig({displayName:"EventCard__Title",componentId:"sc-19skrau-2"})(templateObject_7$g||(templateObject_7$g=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeMedium);var Header$2=_styled__default["default"].div.withConfig({displayName:"EventCard__Header",componentId:"sc-19skrau-3"})(templateObject_8$f||(templateObject_8$f=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: flex-start;\n > *:not(:first-child) {\n padding-top: ","px;\n }\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: flex-start;\n > *:not(:first-child) {\n padding-top: ","px;\n }\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),maxScreenSize.medium,spacingXs);var RecurrenceSeriesInfo$1=_styled__default["default"](EventRecurrenceSeriesInfo).withConfig({displayName:"EventCard__RecurrenceSeriesInfo",componentId:"sc-19skrau-4"})(templateObject_9$c||(templateObject_9$c=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var Content$7=_styled__default["default"].div.withConfig({displayName:"EventCard__Content",componentId:"sc-19skrau-5"})(templateObject_10$b||(templateObject_10$b=__makeTemplateObject(["\n padding: ","px;\n flex-grow: 1;\n\n color: ",";\n"],["\n padding: ","px;\n flex-grow: 1;\n\n color: ",";\n"])),spacingM,function(p){return p.theme.textColors.default;});var Footer$1=_styled__default["default"].div.withConfig({displayName:"EventCard__Footer",componentId:"sc-19skrau-6"})(templateObject_11$7||(templateObject_11$7=__makeTemplateObject(["\n margin-top: ","px;\n\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: stretch;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n margin-top: ","px;\n\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: stretch;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingM,maxScreenSize.medium);var FooterStart=_styled__default["default"].div.withConfig({displayName:"EventCard__FooterStart",componentId:"sc-19skrau-7"})(templateObject_12$6||(templateObject_12$6=__makeTemplateObject(["\n flex: 1 1 100%;\n\n margin-right: ","px;\n\n > *:first-child:not(:only-child) {\n margin-bottom: ","px;\n }\n\n @media (max-width: ","px) {\n flex: 1 1 auto;\n }\n"],["\n flex: 1 1 100%;\n\n margin-right: ","px;\n\n > *:first-child:not(:only-child) {\n margin-bottom: ","px;\n }\n\n @media (max-width: ","px) {\n flex: 1 1 auto;\n }\n"])),spacingXs,spacingS,maxScreenSize.medium);var FooterEnd=_styled__default["default"].div.withConfig({displayName:"EventCard__FooterEnd",componentId:"sc-19skrau-8"})(templateObject_13$5||(templateObject_13$5=__makeTemplateObject(["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"],["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"])),maxScreenSize.medium,spacingS);var HeaderFeedback=_styled.css(templateObject_14$5||(templateObject_14$5=__makeTemplateObject(["\n display: none;\n @media (min-width: ","px) {\n display: flex;\n align-items: center;\n }\n"],["\n display: none;\n @media (min-width: ","px) {\n display: flex;\n align-items: center;\n }\n"])),minScreenSize.medium);var FooterFeedback=_styled.css(templateObject_15$5||(templateObject_15$5=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"])),spacingS,minScreenSize.medium);var FeedbackHost=_styled__default["default"].div.withConfig({displayName:"EventCard__FeedbackHost",componentId:"sc-19skrau-9"})(templateObject_16$5||(templateObject_16$5=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),function(_a){var isHeader=_a.isHeader;return isHeader?HeaderFeedback:FooterFeedback;});var Feedback=function Feedback(_a){var item=_a.item,type=_a.type,targetRoute=_a.targetRoute;var user=useCurrentUser();var showCommentCount=item.statistics&&item.statistics.commentCount>0&&hasFeedbackType(item.metadata.feedbackSettings,'comment')&&!user.isPublicUser;return jsxRuntime.jsxs(FeedbackHost,__assign({isHeader:type==='header'},{children:[jsxRuntime.jsx(EventCardLikeButton,{item:item,itemResourceType:ItemResourceTypes.Events},void 0),showCommentCount&&jsxRuntime.jsx(StyledLink,__assign({to:targetRoute+"#comments","aria-hidden":"true"},{children:jsxRuntime.jsx(EventCardCommentCount,{item:item},void 0)}),void 0)]}),void 0);};var EventCardLikeButton=_styled__default["default"](CardLikeButton).withConfig({displayName:"EventCard__EventCardLikeButton",componentId:"sc-19skrau-10"})(templateObject_17$4||(templateObject_17$4=__makeTemplateObject(["\n && {\n button {\n min-height: 23px;\n display: flex;\n margin-right: 9px;\n font-size: 1rem;\n }\n }\n"],["\n && {\n button {\n min-height: 23px;\n display: flex;\n margin-right: 9px;\n font-size: 1rem;\n }\n }\n"])));var Registration=_styled__default["default"](EventCardUserRegistration).withConfig({displayName:"EventCard__Registration",componentId:"sc-19skrau-11"})(templateObject_18$3||(templateObject_18$3=__makeTemplateObject(["\n && {\n margin-top: ","px;\n button {\n width: 100%;\n }\n\n @media (min-width: ","px) {\n text-align: right;\n button {\n width: initial;\n }\n }\n }\n"],["\n && {\n margin-top: ","px;\n button {\n width: 100%;\n }\n\n @media (min-width: ","px) {\n text-align: right;\n button {\n width: initial;\n }\n }\n }\n"])),spacingS,minScreenSize.medium);var Dates=_styled__default["default"](DateTimeRange).withConfig({displayName:"EventCard__Dates",componentId:"sc-19skrau-12"})(templateObject_19$3||(templateObject_19$3=__makeTemplateObject(["\n flex: 1;\n font-size: ","px;\n font-weight: 500;\n opacity: ",";\n padding-right: ","px;\n"],["\n flex: 1;\n font-size: ","px;\n font-weight: 500;\n opacity: ",";\n padding-right: ","px;\n"])),fontSizeSmall,function(_a){var isCancelled=_a.isCancelled;return isCancelled?0.4:1;},spacingS);var Locations=_styled__default["default"](EventLocationInfo).withConfig({displayName:"EventCard__Locations",componentId:"sc-19skrau-13"})(templateObject_20$1||(templateObject_20$1=__makeTemplateObject([""],[""])));var Contacts=_styled__default["default"](EventPeopleInfo).withConfig({displayName:"EventCard__Contacts",componentId:"sc-19skrau-14"})(templateObject_21$1||(templateObject_21$1=__makeTemplateObject(["\n flex-direction: column;\n"],["\n flex-direction: column;\n"])));var CancelInfo=_styled__default["default"](EventCancelInformation).withConfig({displayName:"EventCard__CancelInfo",componentId:"sc-19skrau-15"})(templateObject_22$1||(templateObject_22$1=__makeTemplateObject(["\n margin: 0 -","px;\n @media (min-width: ","px) {\n margin: 0;\n }\n"],["\n margin: 0 -","px;\n @media (min-width: ","px) {\n margin: 0;\n }\n"])),spacingM,minScreenSize.medium);var IEFix=_styled.createGlobalStyle(templateObject_23$1||(templateObject_23$1=__makeTemplateObject(["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"],["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"])));var templateObject_1$1S,templateObject_2$18,templateObject_3$M,templateObject_4$y,templateObject_5$v,templateObject_6$l,templateObject_7$g,templateObject_8$f,templateObject_9$c,templateObject_10$b,templateObject_11$7,templateObject_12$6,templateObject_13$5,templateObject_14$5,templateObject_15$5,templateObject_16$5,templateObject_17$4,templateObject_18$3,templateObject_19$3,templateObject_20$1,templateObject_21$1,templateObject_22$1,templateObject_23$1;var $$4=_export;var aFunction$1=aFunction$7;var toObject$2=toObject$7;var fails$j=fails$i;var arrayMethodIsStrict=arrayMethodIsStrict$2;var test$1=[];var nativeSort=test$1.sort;// IE8-
|
|
125897
125905
|
var FAILS_ON_UNDEFINED=fails$j(function(){test$1.sort(undefined);});// V8 bug
|
|
125898
125906
|
var FAILS_ON_NULL=fails$j(function(){test$1.sort(null);});// Old WebKit
|
|
125899
125907
|
var STRICT_METHOD=arrayMethodIsStrict('sort');var FORCED$1=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD;// `Array.prototype.sort` method
|
|
125900
125908
|
// https://tc39.github.io/ecma262/#sec-array.prototype.sort
|
|
125901
|
-
$$
|
|
125909
|
+
$$4({target:'Array',proto:true,forced:FORCED$1},{sort:function sort(comparefn){return comparefn===undefined?nativeSort.call(toObject$2(this)):nativeSort.call(toObject$2(this),aFunction$1(comparefn));}});function useExternalContentHandler(){var _this=this;var history=ReactRouterDom.useHistory();var onRequestToken=React$d.useContext(AuthenticationContext).onRequestToken;var trackExternalItem=useNewsApi().trackExternalItem;var createApiUrl=useApiFactory().createApiUrl;var currentUser=useCurrentUser();var webAppUrls=useSubscriptionWebAppUrls();var _a=React$d.useContext(LinkContext),onOpenExternalLink=_a.onOpenExternalLink,tryGetInternalLink=_a.tryGetInternalLink;var refreshUserDetails=useRefreshUserDetails();return function(item,itemType,openInNewTab){return __awaiter(_this,void 0,void 0,function(){var language,externalContentUrl,internalLink,token;return __generator(this,function(_a){switch(_a.label){case 0:if(!(item===null||item===void 0?void 0:item.useExternalContent)){return [2/*return*/,null];}language=getPreferredContentLanguage(currentUser);externalContentUrl=getExternalContentUrl(item,language);if(!externalContentUrl){return [2/*return*/,null];}internalLink=tryGetInternalLink(externalContentUrl,webAppUrls);if(internalLink){// no API redirect; only the unread & page views tracking
|
|
125902
125910
|
trackExternalItem(item.id,itemType).then(function(){return refreshUserDetails();},logger.error);history.push(internalLink);return [2/*return*/,true];}return [4/*yield*/,onRequestToken()];case 1:token=_a.sent();if(!token){return [2/*return*/,false];}return [4/*yield*/,redirectToExternalContent(item.id,itemType,token,openInNewTab)];case 2:_a.sent();refreshUserDetails();return [2/*return*/,true];}});});};function redirectToExternalContent(itemId,itemType,token,openNewTab){return __awaiter(this,void 0,void 0,function(){var apiExternalContentRedirectRoute;return __generator(this,function(_a){switch(_a.label){case 0:apiExternalContentRedirectRoute=createApiUrl("/"+itemType+"/"+encodeURIComponent(itemId)+"/external_url",{access_token:token});return [4/*yield*/,onOpenExternalLink(apiExternalContentRedirectRoute,openNewTab)];case 1:_a.sent();return [2/*return*/];}});});}}function useExternalContentClickHandler(){var _this=this;var handleExternalContent=useExternalContentHandler();return function(e,item,itemType){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:if(!item.useExternalContent){return [2/*return*/];}e.stopPropagation();e.preventDefault();return [4/*yield*/,handleExternalContent(item,itemType,true)];case 1:_a.sent();return [2/*return*/];}});});};}function useExternalContentRedirectHandler(item,resourceType,noRedirect){var _this=this;var handleExternalContent=useExternalContentHandler();React$d.useEffect(function(){if(noRedirect){return;}(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,handleExternalContent(item,resourceType)];case 1:return [2/*return*/,_a.sent()];}});});})();// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125903
125911
|
},[item===null||item===void 0?void 0:item.id]);}function usePagesClickHandler(){var user=useCurrentUser();var userToken=useCurrentToken();var onOpenExternalLink=React$d.useContext(LinkContext).onOpenExternalLink;var getDocumentFileUrl=usePagesApi().getDocumentFileUrl;var createApiUrl=useApiFactory().createApiUrl;var handleExternalContent=useExternalContentHandler();var _a=useFileAccessTokenApi(),exchangeShortLivedToken=_a.exchangeShortLivedToken,getPublishableItemShortLivedToken=_a.getPublishableItemShortLivedToken,createDownloadClickHandler=_a.createDownloadClickHandler;return React$d.useMemo(function(){return {createPageClickHandler:createPageClickHandler,createDocumentClickHandler:createDocumentClickHandler};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125904
125912
|
},[user.subscription.id,userToken,getDocumentFileUrl,handleExternalContent]);function createPageClickHandler(page,basePath,additionalOnClick,ignoreExternalContent){var _this=this;if(!page.useExternalContent||// we don't want the editor view to open the external page
|
|
@@ -125913,11 +125921,11 @@
|
|
|
125913
125921
|
// we just use the id for that, because this one is always different
|
|
125914
125922
|
var fallbackCompare=function fallbackCompare(){var _a;return ((_a=a.id)===null||_a===void 0?void 0:_a.localeCompare(b===null||b===void 0?void 0:b.id))||0;};if(firstGroupIdOfA===firstGroupIdOfB){return a.position-b.position||fallbackCompare();}return groupPositions[firstGroupIdOfA]-groupPositions[firstGroupIdOfB]||fallbackCompare();}function useInlinePageDocument(documentData,page,basePath){if(basePath===void 0){basePath='pages';}var extension=documentData.extension,fileId=documentData.fileId,originalFileName=documentData.fileName,pageId=documentData.pageId,originalTitle=documentData.title;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var createDocumentClickHandler=usePagesClickHandler().createDocumentClickHandler;var _a=React$d.useMemo(function(){var iconName=getFileIconByExtension(extension);var fileUrl=NewsService.getNewsRoute(buildPath(basePath),pageId,null);return {iconName:iconName,fileUrl:fileUrl};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125915
125923
|
},[extension,pageId]),fileUrl=_a.fileUrl,iconName=_a.iconName;var _b=React$d.useMemo(function(){if(!(page===null||page===void 0?void 0:page.id)){return {title:originalTitle,fileName:originalFileName};}var _a=getFileInfo(page,user),fileInfo=_a.fileInfo,language=_a.language;var onPageDocumentDownloadClick=createDocumentClickHandler(pageId,fileId,language,fileInfo.shouldOpenInBrowser,page.fileAccessToken,basePath);return {title:getTitle(page,user,formatMessage,language),fileName:fileInfo.fileName,onPageDocumentDownloadClick:onPageDocumentDownloadClick};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125916
|
-
},[page===null||page===void 0?void 0:page.id,createDocumentClickHandler]),fileName=_b.fileName,title=_b.title,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return {fileUrl:fileUrl,iconName:iconName,fileName:fileName,title:title,onPageDocumentDownloadClick:onPageDocumentDownloadClick};}function getFileInfo(page,user){var _a=getContentForPage(page,user),content=_a.content,language=_a.language;return {fileInfo:content===null||content===void 0?void 0:content.fileInfo,language:language};}function getContentForPage(page,user){var language=getLanguageForPage(page,user);return {content:page.contents[language],language:language};}function getLanguageForPage(page,user){if(!user||!page||!page.contents||!user.subscription){return null;}var language=NewsService.getLanguageForContent(page.contents,user,function(c){var _a;return page.pageType!==PageType.Document||((_a=c.fileInfo)===null||_a===void 0?void 0:_a.fileId)!=null;});if(language){return language;}return NewsService.getLanguageForContent(page.contents,user);}function convertToNavigationNode(page){var _a,_b,_c,_d;var parent=(_b=(_a=page===null||page===void 0?void 0:page.navigationContext)===null||_a===void 0?void 0:_a.parent)!==null&&_b!==void 0?_b:{id:page.parentId,contents:{}};return {id:page.id,pageType:page.pageType,parent:parent,position:page.position,status:page.status,groupIds:page.groupIds,hasHiddenAncestor:page.hasHiddenAncestor,isUnlinked:page.isUnlinked,hasPublishedVersion:page.isCurrentPublishedVersion||!!page.publishedVersionId,contents:Object.values(page.contents||{}).filter(function(c){return c.active;}).reduce(function(acc,next){acc[next.language]=next;return acc;},{}),firstChildId:page.firstChildId||((_d=(_c=page.navigationContext)===null||_c===void 0?void 0:_c.children)===null||_d===void 0?void 0:_d[0].id),children:undefined,isSearchMatch:undefined,hasAnyPageChild:undefined,useExternalContent:page.useExternalContent,topLevelFolderName:undefined};}var HostBaseStyle=function HostBaseStyle(backgroundColor){return _styled.css(templateObject_3$L||(templateObject_3$L=__makeTemplateObject(["\n ","\n\n display: flex;\n width: 100%;\n "],["\n ","\n\n display: flex;\n width: 100%;\n "])),function(p){return backgroundColor?_styled.css(templateObject_1$1R||(templateObject_1$1R=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),backgroundColor||p.theme.palette.white):_styled.css(templateObject_2$16||(templateObject_2$16=__makeTemplateObject(["\n ",";\n background-color: ",";\n "],["\n ",";\n background-color: ",";\n "])),CardBorderInline(2,2),p.theme.palette.white);});};var ContentStyle=_styled.css(templateObject_4$x||(templateObject_4$x=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n font-size: ","px;\n"],["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n font-size: ","px;\n"])),fontSizeMedium);var MetaInfoStyle=function MetaInfoStyle(marginBottomOnEmpty){return _styled.css(templateObject_5$u||(templateObject_5$u=__makeTemplateObject(["\n font-size: ","px;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n\n &:empty {\n margin-bottom: ","px;\n }\n"],["\n font-size: ","px;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n\n &:empty {\n margin-bottom: ","px;\n }\n"])),fontSizeSmall,marginBottomOnEmpty||spacingM);};var BorderRadiusStyle=function BorderRadiusStyle(roundedCornerSize,rightSideOnly){var radius=roundedCornerSize||inlinePageBannerRoundedCornerSize;return _styled.css(templateObject_8$e||(templateObject_8$e=__makeTemplateObject(["\n ","\n "],["\n ","\n "])),rightSideOnly?_styled.css(templateObject_6$k||(templateObject_6$k=__makeTemplateObject(["\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n "],["\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n "])),radius,radius):_styled.css(templateObject_7$f||(templateObject_7$f=__makeTemplateObject(["\n border-radius: ","px;\n "],["\n border-radius: ","px;\n "])),radius));};var templateObject_1$1R,templateObject_2$16,templateObject_3$L,templateObject_4$x,templateObject_5$u,templateObject_6$k,templateObject_7$f,templateObject_8$e;var ExternalContentIcon=function ExternalContentIcon(_a){var tooltipResourceKey=_a.tooltipResourceKey,tooltipResourceValues=_a.tooltipResourceValues,className=_a.className;return jsxRuntime.jsx(StyledTooltip$2,__assign({className:className,resourceKey:tooltipResourceKey,values:{url:tooltipResourceValues},width:400},{children:jsxRuntime.jsx(StyledIcon$5,{iconName:"NavigateExternalInline","data-external-content":true},void 0)}),void 0);};var StyledTooltip$2=_styled__default["default"](Tooltip).withConfig({displayName:"ExternalContentIcon__StyledTooltip",componentId:"sc-8h84ua-0"})(templateObject_1$1Q||(templateObject_1$1Q=__makeTemplateObject(["\n display: inline-flex;\n z-index: 1;\n"],["\n display: inline-flex;\n z-index: 1;\n"])));var StyledIcon$5=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"ExternalContentIcon__StyledIcon",componentId:"sc-8h84ua-1"})(templateObject_2$15||(templateObject_2$15=__makeTemplateObject(["\n margin-left: ","px;\n"],["\n margin-left: ","px;\n"])),spacingXs);var templateObject_1$1Q,templateObject_2$15;var Title$6=function Title(_a){var title=_a.title,targetRoute=_a.targetRoute,readOnly=_a.readOnly,openTargetInNewWindow=_a.openTargetInNewWindow,isDownloadLink=_a.isDownloadLink,isExternalContent=_a.isExternalContent,onClick=_a.onClick,resourceKey=_a.resourceKey,resourceValues=_a.resourceValues,className=_a.className;return jsxRuntime.jsx(TitleHost,__assign({className:className},{children:readOnly?jsxRuntime.jsx("span",{children:title},void 0):isDownloadLink?jsxRuntime.jsx("a",__assign({href:targetRoute,rel:"noopener noreferrer",onClick:onClick},{children:jsxRuntime.jsx("span",{children:title},void 0)}),void 0):openTargetInNewWindow?jsxRuntime.jsxs("a",__assign({href:targetRoute,target:"_blank",rel:"noopener noreferrer",onClick:onClick},{children:[jsxRuntime.jsx("span",{children:title},void 0),isExternalContent&&jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0):jsxRuntime.jsxs(ReactRouterDom.Link,__assign({to:targetRoute,onClick:onClick},{children:[jsxRuntime.jsx("span",{children:title},void 0),isExternalContent&&jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0)}),void 0);};var TitleHost=_styled__default["default"].h3.withConfig({displayName:"Title__TitleHost",componentId:"sc-1wpb7iz-0"})(templateObject_1$1P||(templateObject_1$1P=__makeTemplateObject(["\n font-size: ","px;\n z-index: 1;\n\n &&& {\n margin: 0 0 ","px 0;\n\n a {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n }\n"],["\n font-size: ","px;\n z-index: 1;\n\n &&& {\n margin: 0 0 ","px 0;\n\n a {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n }\n"])),fontSizeMedium,spacingS,function(p){return p.theme.textColors.default;});var templateObject_1$1P;function getBreadcrumbsItems(page,target,handleOnClick,getTitle,formatMessage,hideCurrentPageNode,hideHomeNode){var ancestors=[];var parent=page.navigationContext.parent;while(parent!=null&&parent.id!=null){ancestors.unshift({title:getTitle(parent),id:parent.id});parent=parent.parent;}var parentNode=ancestors.find(function(a){return a.id===page.parentId;});var items=hideHomeNode?[]:[{key:'home',text:formatMessage({id:'Generic.home'}),href:target}];var ancestorItems=ancestors.map(function(node){return {key:node.id,text:node.title,href:NewsService.getNewsRoute(target,node.id,node.title),onClick:handleOnClick};});if(hideCurrentPageNode){return {breadcrumbItems:__spreadArray(__spreadArray([],items),ancestorItems),ancestors:ancestors,parentNode:parentNode};}var currentItem={key:'current',text:getTitle(page),isCurrentItem:true};return {breadcrumbItems:__spreadArray(__spreadArray(__spreadArray([],items),ancestorItems),[currentItem]),ancestors:ancestors,parentNode:parentNode};}var ListItemBreadcrumb=function ListItemBreadcrumb(_a){var page=_a.page,languageOverride=_a.language,className=_a.className;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;if(!page||!page.navigationContext){return null;}var breadcrumbItems=getBreadcrumbsItems(page,null,function(){},function(page){return getTitle(page,user,formatMessage,languageOverride);},formatMessage,true,true).breadcrumbItems;return jsxRuntime.jsx(Host$H,__assign({className:className},{children:breadcrumbItems.map(function(b,i){return jsxRuntime.jsxs(React$d.Fragment,{children:[i!==0&&jsxRuntime.jsx(RightChevronIcon,{iconName:"ChevronRight"},void 0),jsxRuntime.jsx("span",{children:b.text},void 0)]},b.key);})}),void 0);};var Host$H=_styled__default["default"].p.withConfig({displayName:"ListItemBreadcrumb__Host",componentId:"sc-c9uoz1-0"})(templateObject_1$1O||(templateObject_1$1O=__makeTemplateObject(["\n padding: 0;\n margin: ","px 0 0;\n font-size: ","px;\n\n color: ",";\n text-align: start;\n\n > span,\n i {\n vertical-align: middle;\n line-height: 1;\n }\n"],["\n padding: 0;\n margin: ","px 0 0;\n font-size: ","px;\n\n color: ",";\n text-align: start;\n\n > span,\n i {\n vertical-align: middle;\n line-height: 1;\n }\n"])),spacingXxs,fontSizeSmall,function(p){return p.theme.palette.neutralTertiary;});var RightChevronIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"ListItemBreadcrumb__RightChevronIcon",componentId:"sc-c9uoz1-1"})(templateObject_2$14||(templateObject_2$14=__makeTemplateObject(["\n &&& {\n font-weight: bold;\n margin: 0 ","px;\n font-size: ","px;\n }\n"],["\n &&& {\n font-weight: bold;\n margin: 0 ","px;\n font-size: ","px;\n }\n"])),spacingXxs,fontSizeSmaller-2);var templateObject_1$1O,templateObject_2$14;var PageItemTile=function PageItemTile(_a){var _b,_c;var item=_a.item,baseRoute=_a.baseRoute,filterBaseUrl=_a.filterBaseUrl,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,additionalMetadata=_a.additionalMetadata,buttons=_a.buttons,additionalContent=_a.additionalContent,showBannerPlaceholder=_a.showBannerPlaceholder,showBreadcrumb=_a.showBreadcrumb,showIntro=_a.showIntro,className=_a.className;var user=useCurrentUserContext().user;var intl=useIntl();var createPageClickHandler=usePagesClickHandler().createPageClickHandler;var title=getTitle(item,user,intl.formatMessage);var language=getLanguageForPage(item,user);var content=item.contents[language];var hasKeywords=Object.keys((_b=item.keywords)!==null&&_b!==void 0?_b:[]).length>0;var targetRoute=NewsService.getNewsRoute(baseRoute,item.id,title);var clickHandler=createPageClickHandler(item);var isDocument=item.pageType===PageType.Document;var isEditor=baseRoute.includes('/editor');var preferredContentLanguage=getPreferredContentLanguage(user);var url=item.useExternalContent&&getExternalContentUrl(item,preferredContentLanguage);return jsxRuntime.jsxs(Host$G,__assign({"data-item-id":item.id,className:className},{children:[!readOnly&&jsxRuntime.jsx(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.Pages,baseRoute:baseRoute,title:title,isExternalContent:item.useExternalContent},void 0),jsxRuntime.jsxs(Inner$3,__assign({styleDefinition:styleDefinition,hasBanner:item.bannerInfo!=null||showBannerPlaceholder||isDocument},{children:[jsxRuntime.jsx(Banner$2,{item:item,language:language,bannerDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerDefaultWidth,applyRoundedCorners:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.applyRoundedCorners,showBannerPlaceholder:showBannerPlaceholder,isEditor:isEditor,bannerFontSize:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerFontSize},void 0),jsxRuntime.jsxs(Content$6,__assign({padding:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.contentPadding,"data-page-tile-content":true},{children:[jsxRuntime.jsxs(MetaInfo$3,__assign({paddingRight:showBreadcrumb&&!isDocument&&readOnly?spacingM:0},{children:[showBreadcrumb&&jsxRuntime.jsx(StyledListItemBreadcrumb,{page:item},void 0),!showBreadcrumb&&item.modified&&jsxRuntime.jsx(DateTime,{value:item.modified},void 0),additionalMetadata]}),void 0),jsxRuntime.jsxs(MainContent,{children:[jsxRuntime.jsxs(TitleAndIntro,__assign({addDownloadButtonSafetySpace:isDocument},{children:[jsxRuntime.jsx(StyledTitle$1,{title:title,targetRoute:targetRoute,readOnly:readOnly,onClick:clickHandler,fontSize:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.titleFontSize,margin:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.titleMargin,isExternalContent:item.useExternalContent,resourceKey:item.useExternalContent?'ExternalLinkButton.pages.navigateTo':undefined,resourceValues:url!==null&&url!==void 0?url:undefined},void 0),showIntro&&((_c=content.intro)===null||_c===void 0?void 0:_c.length)>0&&jsxRuntime.jsx(Intro$2,{children:content.intro},void 0)]}),void 0),additionalContent]},void 0),hasKeywords&&jsxRuntime.jsx(Keywords$2,{children:jsxRuntime.jsx(FlatKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0)},void 0),buttons&&jsxRuntime.jsx(Buttons$2,{children:buttons},void 0)]}),void 0)]}),void 0)]}),void 0);};var StyledTitle$1=_styled__default["default"](Title$6).withConfig({displayName:"PageItemTile__StyledTitle",componentId:"sc-lcm8k6-0"})(templateObject_5$t||(templateObject_5$t=__makeTemplateObject(["\n // for embedded pages we do not pass in a custom font size and we want to truncate the title to 2 lines\n ","\n\n ",";\n\n ",";\n\n width: 100%;\n\n a:focus {\n outline-offset: 0 !important;\n }\n"],["\n // for embedded pages we do not pass in a custom font size and we want to truncate the title to 2 lines\n ","\n\n ",";\n\n ",";\n\n width: 100%;\n\n a:focus {\n outline-offset: 0 !important;\n }\n"])),function(p){return !p.fontSize&&_styled.css(templateObject_1$1N||(templateObject_1$1N=__makeTemplateObject(["\n a {\n display: inline-flex;\n }\n\n span {\n ","\n }\n "],["\n a {\n display: inline-flex;\n }\n\n span {\n ","\n }\n "])),LineClamp(2,fontSizeMedium,1.4));},function(p){return p.fontSize&&_styled.css(templateObject_2$13||(templateObject_2$13=__makeTemplateObject(["\n &&& {\n font-size: ","px;\n line-height: 20px;\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n }\n\n a {\n display: inline-flex;\n max-width: 100%;\n }\n\n span {\n // we pass a custom font size (smaller) for inline page lists and here we want to keep the title to single line\n display: block;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "],["\n &&& {\n font-size: ","px;\n line-height: 20px;\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n }\n\n a {\n display: inline-flex;\n max-width: 100%;\n }\n\n span {\n // we pass a custom font size (smaller) for inline page lists and here we want to keep the title to single line\n display: block;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "])),p.fontSize,fontSizeNormal,fontSizeNormal);},function(p){return p.margin?_styled.css(templateObject_3$K||(templateObject_3$K=__makeTemplateObject(["\n margin: "," !important;\n "],["\n margin: "," !important;\n "])),p.margin):_styled.css(templateObject_4$w||(templateObject_4$w=__makeTemplateObject(["\n margin: 0 !important;\n "],["\n margin: 0 !important;\n "])));});var Intro$2=_styled__default["default"].div.withConfig({displayName:"PageItemTile__Intro",componentId:"sc-lcm8k6-1"})(templateObject_6$j||(templateObject_6$j=__makeTemplateObject(["\n margin: ","px 0 ","px;\n ","\n"],["\n margin: ","px 0 ","px;\n ","\n"])),spacingXs-1,spacingS+5,LineClamp(10,fontSizeSmall,1.4));var Host$G=_styled__default["default"].article.withConfig({displayName:"PageItemTile__Host",componentId:"sc-lcm8k6-2"})(templateObject_7$e||(templateObject_7$e=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));var Inner$3=_styled__default["default"].div.withConfig({displayName:"PageItemTile__Inner",componentId:"sc-lcm8k6-3"})(templateObject_11$6||(templateObject_11$6=__makeTemplateObject(["\n ","\n ","\n ","\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n ","\n ","\n ","\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),function(p){var _a;return HostBaseStyle((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.backgroundColor);},function(p){var _a;return ((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.applyRoundedCorners)&&BorderRadiusStyle();},function(p){var _a;return ((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.height)?_styled.css(templateObject_8$d||(templateObject_8$d=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.styleDefinition.height):_styled.css(templateObject_9$b||(templateObject_9$b=__makeTemplateObject(["\n height: auto;\n min-height: 138px;\n "],["\n height: auto;\n min-height: 138px;\n "])));},function(p){var _a;return p.hasBanner&&_styled.css(templateObject_10$a||(templateObject_10$a=__makeTemplateObject(["\n [data-page-tile-content] {\n max-width: calc(100% - ","px)};\n }\n "],["\n [data-page-tile-content] {\n max-width: calc(100% - ","px)};\n }\n "])),(_a=p.styleDefinition)===null||_a===void 0?void 0:_a.bannerDefaultWidth);});var Content$6=_styled__default["default"].div.withConfig({displayName:"PageItemTile__Content",componentId:"sc-lcm8k6-4"})(templateObject_14$4||(templateObject_14$4=__makeTemplateObject(["\n ","\n ","\n\n box-sizing: border-box;\n max-width: 100%;\n"],["\n ","\n ","\n\n box-sizing: border-box;\n max-width: 100%;\n"])),ContentStyle,function(p){return p.padding?_styled.css(templateObject_12$5||(templateObject_12$5=__makeTemplateObject(["\n padding: ",";\n "],["\n padding: ",";\n "])),p.padding):_styled.css(templateObject_13$4||(templateObject_13$4=__makeTemplateObject(["\n padding: ","px;\n "],["\n padding: ","px;\n "])),spacingM);});var MetaInfo$3=_styled__default["default"].div.withConfig({displayName:"PageItemTile__MetaInfo",componentId:"sc-lcm8k6-5"})(templateObject_15$4||(templateObject_15$4=__makeTemplateObject(["\n "," /* font-size of date */\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n color: ",";\n\n padding-left: 2px;\n padding-right: ","px;\n"],["\n "," /* font-size of date */\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n color: ",";\n\n padding-left: 2px;\n padding-right: ","px;\n"])),MetaInfoStyle(17),function(p){return p.theme.textColors.default;},function(p){return p.paddingRight;});var MainContent=_styled__default["default"].div.withConfig({displayName:"PageItemTile__MainContent",componentId:"sc-lcm8k6-6"})(templateObject_16$4||(templateObject_16$4=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-left: 2px;\n"],["\n display: flex;\n align-items: center;\n padding-left: 2px;\n"])));var DownloadButtonWidth=32;var TitleAndIntro=_styled__default["default"].div.withConfig({displayName:"PageItemTile__TitleAndIntro",componentId:"sc-lcm8k6-7"})(templateObject_17$3||(templateObject_17$3=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: calc(\n 100% -\n ","px\n );\n"],["\n display: flex;\n flex-direction: column;\n width: calc(\n 100% -\n ","px\n );\n"])),function(p){return p.addDownloadButtonSafetySpace?DownloadButtonWidth:0;});var StyledListItemBreadcrumb=_styled__default["default"](ListItemBreadcrumb).withConfig({displayName:"PageItemTile__StyledListItemBreadcrumb",componentId:"sc-lcm8k6-8"})(templateObject_18$2||(templateObject_18$2=__makeTemplateObject(["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n &&& {\n // this is needed because draft.js adds a 1rem margin bottom here somehow (because the breadcrumb is a <p> maybe) and it breaks the view\n margin-bottom: 0;\n }\n"],["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n &&& {\n // this is needed because draft.js adds a 1rem margin bottom here somehow (because the breadcrumb is a <p> maybe) and it breaks the view\n margin-bottom: 0;\n }\n"])));var Keywords$2=_styled__default["default"].span.withConfig({displayName:"PageItemTile__Keywords",componentId:"sc-lcm8k6-9"})(templateObject_19$2||(templateObject_19$2=__makeTemplateObject(["\n display: block;\n margin-top: auto;\n\n > span {\n font-size: ","px;\n line-height: 20px;\n height: 20px;\n display: inline-block;\n padding: 0 2px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n && {\n a:link,\n a:visited {\n color: "," !important;\n\n &:focus {\n outline-offset: 0 !important;\n }\n }\n }\n"],["\n display: block;\n margin-top: auto;\n\n > span {\n font-size: ","px;\n line-height: 20px;\n height: 20px;\n display: inline-block;\n padding: 0 2px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n && {\n a:link,\n a:visited {\n color: "," !important;\n\n &:focus {\n outline-offset: 0 !important;\n }\n }\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});var Buttons$2=_styled__default["default"].div.withConfig({displayName:"PageItemTile__Buttons",componentId:"sc-lcm8k6-10"})(templateObject_20$2||(templateObject_20$2=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingS);var Banner$2=function Banner(_a){var _b,_c;var item=_a.item,language=_a.language,bannerDefaultWidth=_a.bannerDefaultWidth,bannerFontSize=_a.bannerFontSize,applyRoundedCorners=_a.applyRoundedCorners,showBannerPlaceholder=_a.showBannerPlaceholder,isEditor=_a.isEditor;var bannerInfo=item.bannerInfo;var isDocument=item.pageType===PageType.Document;var fileIcon=getFileIconByExtension(((_c=(_b=item.contents[language])===null||_b===void 0?void 0:_b.fileInfo)===null||_c===void 0?void 0:_c.extension)||'');if(isDocument){return jsxRuntime.jsx(BannerHost$1,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsxRuntime.jsx(FileIcon$1,{iconName:fileIcon,fontSize:bannerFontSize,color:getIconColor(fileIcon)},void 0)}),void 0);}if(!bannerInfo&&!showBannerPlaceholder){return null;}if(bannerDefaultWidth<100){return jsxRuntime.jsx(SmallBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsxRuntime.jsx(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:isEditor?'edit':'read',width:200,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0);}return jsxRuntime.jsx("div",{children:jsxRuntime.jsx(LargeBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsxRuntime.jsx(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:450,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0)},void 0);};var BannerHost$1=_styled__default["default"].div.withConfig({displayName:"PageItemTile__BannerHost",componentId:"sc-lcm8k6-11"})(templateObject_23$2||(templateObject_23$2=__makeTemplateObject(["\n display: flex;\n width: ","px;\n justify-content: center;\n align-items: center;\n background-color: ",";\n\n ","\n\n @media (max-width: ","px) {\n ","\n }\n"],["\n display: flex;\n width: ","px;\n justify-content: center;\n align-items: center;\n background-color: ",";\n\n ","\n\n @media (max-width: ","px) {\n ","\n }\n"])),function(p){return p.defaultWidth;},function(p){return p.theme.palette.neutralQuaternaryAlt;},function(p){return p.applyRoundedCorners&&_styled.css(templateObject_21$2||(templateObject_21$2=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5));},maxScreenSize.medium,function(p){return p.defaultWidth>100&&_styled.css(templateObject_22$2||(templateObject_22$2=__makeTemplateObject(["\n width: auto;\n height: 100px;\n "],["\n width: auto;\n height: 100px;\n "])));});var FileIcon$1=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PageItemTile__FileIcon",componentId:"sc-lcm8k6-12"})(templateObject_24$1||(templateObject_24$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),function(p){return p.fontSize||30;},function(p){return p.color||p.theme.textColors.default;});var SmallBannerWrapper=_styled__default["default"].div.withConfig({displayName:"PageItemTile__SmallBannerWrapper",componentId:"sc-lcm8k6-13"})(templateObject_26$1||(templateObject_26$1=__makeTemplateObject(["\n background-color: ",";\n\n width: ","px;\n height: 100%;\n\n .video-view-container {\n height: 100%;\n }\n\n &&& .video-icon {\n font-size: 35px;\n margin: 0;\n }\n\n ","\n"],["\n background-color: ",";\n\n width: ","px;\n height: 100%;\n\n .video-view-container {\n height: 100%;\n }\n\n &&& .video-icon {\n font-size: 35px;\n margin: 0;\n }\n\n ","\n"])),function(p){return p.theme.palette.accent;},function(p){return p.defaultWidth;},function(p){return p.applyRoundedCorners&&_styled.css(templateObject_25$1||(templateObject_25$1=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5));});var LargeBannerWrapper=_styled__default["default"](LeftBannerWrapper).withConfig({displayName:"PageItemTile__LargeBannerWrapper",componentId:"sc-lcm8k6-14"})(templateObject_28$1||(templateObject_28$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.applyRoundedCorners&&_styled.css(templateObject_27$1||(templateObject_27$1=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5,true));});var templateObject_1$1N,templateObject_2$13,templateObject_3$K,templateObject_4$w,templateObject_5$t,templateObject_6$j,templateObject_7$e,templateObject_8$d,templateObject_9$b,templateObject_10$a,templateObject_11$6,templateObject_12$5,templateObject_13$4,templateObject_14$4,templateObject_15$4,templateObject_16$4,templateObject_17$3,templateObject_18$2,templateObject_19$2,templateObject_20$2,templateObject_21$2,templateObject_22$2,templateObject_23$2,templateObject_24$1,templateObject_25$1,templateObject_26$1,templateObject_27$1,templateObject_28$1;var global$1=global$m;var trim=stringTrim$1.trim;var whitespaces$4=whitespaces$3;var $parseInt=global$1.parseInt;var hex=/^[+-]?0[Xx]/;var FORCED=$parseInt(whitespaces$4+'08')!==8||$parseInt(whitespaces$4+'0x16')!==22;// `parseInt` method
|
|
125924
|
+
},[page===null||page===void 0?void 0:page.id,createDocumentClickHandler]),fileName=_b.fileName,title=_b.title,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return {fileUrl:fileUrl,iconName:iconName,fileName:fileName,title:title,onPageDocumentDownloadClick:onPageDocumentDownloadClick};}function getFileInfo(page,user){var _a=getContentForPage(page,user),content=_a.content,language=_a.language;return {fileInfo:content===null||content===void 0?void 0:content.fileInfo,language:language};}function getContentForPage(page,user){var language=getLanguageForPage(page,user);return {content:page.contents[language],language:language};}function getLanguageForPage(page,user){if(!user||!page||!page.contents||!user.subscription){return null;}var language=NewsService.getLanguageForContent(page.contents,user,function(c){var _a;return page.pageType!==PageType.Document||((_a=c.fileInfo)===null||_a===void 0?void 0:_a.fileId)!=null;});if(language){return language;}return NewsService.getLanguageForContent(page.contents,user);}function convertToNavigationNode(page){var _a,_b,_c,_d;var parent=(_b=(_a=page===null||page===void 0?void 0:page.navigationContext)===null||_a===void 0?void 0:_a.parent)!==null&&_b!==void 0?_b:{id:page.parentId,contents:{}};return {id:page.id,pageType:page.pageType,parent:parent,position:page.position,status:page.status,groupIds:page.groupIds,hasHiddenAncestor:page.hasHiddenAncestor,isUnlinked:page.isUnlinked,hasPublishedVersion:page.isCurrentPublishedVersion||!!page.publishedVersionId,contents:Object.values(page.contents||{}).filter(function(c){return c.active;}).reduce(function(acc,next){acc[next.language]=next;return acc;},{}),firstChildId:page.firstChildId||((_d=(_c=page.navigationContext)===null||_c===void 0?void 0:_c.children)===null||_d===void 0?void 0:_d[0].id),children:undefined,isSearchMatch:undefined,hasAnyPageChild:undefined,useExternalContent:page.useExternalContent,topLevelFolderName:undefined};}var HostBaseStyle=function HostBaseStyle(backgroundColor){return _styled.css(templateObject_3$L||(templateObject_3$L=__makeTemplateObject(["\n ","\n\n display: flex;\n width: 100%;\n "],["\n ","\n\n display: flex;\n width: 100%;\n "])),function(p){return backgroundColor?_styled.css(templateObject_1$1R||(templateObject_1$1R=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),backgroundColor||p.theme.palette.white):_styled.css(templateObject_2$17||(templateObject_2$17=__makeTemplateObject(["\n ",";\n background-color: ",";\n "],["\n ",";\n background-color: ",";\n "])),CardBorderInline(2,2),p.theme.palette.white);});};var ContentStyle=_styled.css(templateObject_4$x||(templateObject_4$x=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n font-size: ","px;\n"],["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n font-size: ","px;\n"])),fontSizeMedium);var MetaInfoStyle=function MetaInfoStyle(marginBottomOnEmpty){return _styled.css(templateObject_5$u||(templateObject_5$u=__makeTemplateObject(["\n font-size: ","px;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n\n &:empty {\n margin-bottom: ","px;\n }\n"],["\n font-size: ","px;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n\n &:empty {\n margin-bottom: ","px;\n }\n"])),fontSizeSmall,marginBottomOnEmpty||spacingM);};var BorderRadiusStyle=function BorderRadiusStyle(roundedCornerSize,rightSideOnly){var radius=roundedCornerSize||inlinePageBannerRoundedCornerSize;return _styled.css(templateObject_8$e||(templateObject_8$e=__makeTemplateObject(["\n ","\n "],["\n ","\n "])),rightSideOnly?_styled.css(templateObject_6$k||(templateObject_6$k=__makeTemplateObject(["\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n "],["\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n "])),radius,radius):_styled.css(templateObject_7$f||(templateObject_7$f=__makeTemplateObject(["\n border-radius: ","px;\n "],["\n border-radius: ","px;\n "])),radius));};var templateObject_1$1R,templateObject_2$17,templateObject_3$L,templateObject_4$x,templateObject_5$u,templateObject_6$k,templateObject_7$f,templateObject_8$e;var ExternalContentIcon=function ExternalContentIcon(_a){var tooltipResourceKey=_a.tooltipResourceKey,tooltipResourceValues=_a.tooltipResourceValues,className=_a.className;return jsxRuntime.jsx(StyledTooltip$2,__assign({className:className,resourceKey:tooltipResourceKey,values:{url:tooltipResourceValues},width:400},{children:jsxRuntime.jsx(StyledIcon$5,{iconName:"NavigateExternalInline","data-external-content":true},void 0)}),void 0);};var StyledTooltip$2=_styled__default["default"](Tooltip).withConfig({displayName:"ExternalContentIcon__StyledTooltip",componentId:"sc-8h84ua-0"})(templateObject_1$1Q||(templateObject_1$1Q=__makeTemplateObject(["\n display: inline-flex;\n z-index: 1;\n"],["\n display: inline-flex;\n z-index: 1;\n"])));var StyledIcon$5=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"ExternalContentIcon__StyledIcon",componentId:"sc-8h84ua-1"})(templateObject_2$16||(templateObject_2$16=__makeTemplateObject(["\n margin-left: ","px;\n"],["\n margin-left: ","px;\n"])),spacingXs);var templateObject_1$1Q,templateObject_2$16;var Title$6=function Title(_a){var title=_a.title,targetRoute=_a.targetRoute,readOnly=_a.readOnly,openTargetInNewWindow=_a.openTargetInNewWindow,isDownloadLink=_a.isDownloadLink,isExternalContent=_a.isExternalContent,onClick=_a.onClick,resourceKey=_a.resourceKey,resourceValues=_a.resourceValues,className=_a.className;return jsxRuntime.jsx(TitleHost,__assign({expandClickArea:!isExternalContent,className:className},{children:readOnly?jsxRuntime.jsx("span",{children:title},void 0):isDownloadLink?jsxRuntime.jsx("a",__assign({href:targetRoute,rel:"noopener noreferrer",onClick:onClick},{children:jsxRuntime.jsx("span",{children:title},void 0)}),void 0):openTargetInNewWindow?jsxRuntime.jsxs("a",__assign({href:targetRoute,target:"_blank",rel:"noopener noreferrer",onClick:onClick},{children:[jsxRuntime.jsx("span",{children:title},void 0),isExternalContent&&jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0):jsxRuntime.jsxs(ReactRouterDom.Link,__assign({to:targetRoute,onClick:onClick},{children:[jsxRuntime.jsx("span",{children:title},void 0),isExternalContent&&jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0)}),void 0);};var TitleHost=_styled__default["default"].h3.withConfig({displayName:"Title__TitleHost",componentId:"sc-1wpb7iz-0"})(templateObject_2$15||(templateObject_2$15=__makeTemplateObject(["\n font-size: ","px;\n z-index: 1;\n\n ","\n\n &&& {\n margin: 0 0 ","px 0;\n\n a {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n }\n"],["\n font-size: ","px;\n z-index: 1;\n\n ","\n\n &&& {\n margin: 0 0 ","px 0;\n\n a {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n }\n"])),fontSizeMedium,function(p){return p.expandClickArea&&_styled.css(templateObject_1$1P||(templateObject_1$1P=__makeTemplateObject(["\n position: relative;\n\n a::before {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n "],["\n position: relative;\n\n a::before {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n "])));},spacingS,function(p){return p.theme.textColors.default;});var templateObject_1$1P,templateObject_2$15;function getBreadcrumbsItems(page,target,handleOnClick,getTitle,formatMessage,hideCurrentPageNode,hideHomeNode){var ancestors=[];var parent=page.navigationContext.parent;while(parent!=null&&parent.id!=null){ancestors.unshift({title:getTitle(parent),id:parent.id});parent=parent.parent;}var parentNode=ancestors.find(function(a){return a.id===page.parentId;});var items=hideHomeNode?[]:[{key:'home',text:formatMessage({id:'Generic.home'}),href:target}];var ancestorItems=ancestors.map(function(node){return {key:node.id,text:node.title,href:NewsService.getNewsRoute(target,node.id,node.title),onClick:handleOnClick};});if(hideCurrentPageNode){return {breadcrumbItems:__spreadArray(__spreadArray([],items),ancestorItems),ancestors:ancestors,parentNode:parentNode};}var currentItem={key:'current',text:getTitle(page),isCurrentItem:true};return {breadcrumbItems:__spreadArray(__spreadArray(__spreadArray([],items),ancestorItems),[currentItem]),ancestors:ancestors,parentNode:parentNode};}var ListItemBreadcrumb=function ListItemBreadcrumb(_a){var page=_a.page,languageOverride=_a.language,className=_a.className;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;if(!page||!page.navigationContext){return null;}var breadcrumbItems=getBreadcrumbsItems(page,null,function(){},function(page){return getTitle(page,user,formatMessage,languageOverride);},formatMessage,true,true).breadcrumbItems;return jsxRuntime.jsx(Host$H,__assign({className:className},{children:breadcrumbItems.map(function(b,i){return jsxRuntime.jsxs(React$d.Fragment,{children:[i!==0&&jsxRuntime.jsx(RightChevronIcon,{iconName:"ChevronRight"},void 0),jsxRuntime.jsx("span",{children:b.text},void 0)]},b.key);})}),void 0);};var Host$H=_styled__default["default"].p.withConfig({displayName:"ListItemBreadcrumb__Host",componentId:"sc-c9uoz1-0"})(templateObject_1$1O||(templateObject_1$1O=__makeTemplateObject(["\n padding: 0;\n margin: ","px 0 0;\n font-size: ","px;\n\n color: ",";\n text-align: start;\n\n > span,\n i {\n vertical-align: middle;\n line-height: 1;\n }\n"],["\n padding: 0;\n margin: ","px 0 0;\n font-size: ","px;\n\n color: ",";\n text-align: start;\n\n > span,\n i {\n vertical-align: middle;\n line-height: 1;\n }\n"])),spacingXxs,fontSizeSmall,function(p){return p.theme.palette.neutralTertiary;});var RightChevronIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"ListItemBreadcrumb__RightChevronIcon",componentId:"sc-c9uoz1-1"})(templateObject_2$14||(templateObject_2$14=__makeTemplateObject(["\n &&& {\n font-weight: bold;\n margin: 0 ","px;\n font-size: ","px;\n }\n"],["\n &&& {\n font-weight: bold;\n margin: 0 ","px;\n font-size: ","px;\n }\n"])),spacingXxs,fontSizeSmaller-2);var templateObject_1$1O,templateObject_2$14;var PageItemTile=function PageItemTile(_a){var _b,_c;var item=_a.item,baseRoute=_a.baseRoute,filterBaseUrl=_a.filterBaseUrl,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,additionalMetadata=_a.additionalMetadata,buttons=_a.buttons,additionalContent=_a.additionalContent,showBannerPlaceholder=_a.showBannerPlaceholder,showBreadcrumb=_a.showBreadcrumb,showIntro=_a.showIntro,className=_a.className;var user=useCurrentUserContext().user;var intl=useIntl();var createPageClickHandler=usePagesClickHandler().createPageClickHandler;var title=getTitle(item,user,intl.formatMessage);var language=getLanguageForPage(item,user);var content=item.contents[language];var hasKeywords=Object.keys((_b=item.keywords)!==null&&_b!==void 0?_b:[]).length>0;var targetRoute=NewsService.getNewsRoute(baseRoute,item.id,title);var clickHandler=createPageClickHandler(item);var isDocument=item.pageType===PageType.Document;var isEditor=baseRoute.includes('/editor');var preferredContentLanguage=getPreferredContentLanguage(user);var url=item.useExternalContent&&getExternalContentUrl(item,preferredContentLanguage);return jsxRuntime.jsxs(Host$G,__assign({"data-item-id":item.id,className:className},{children:[!readOnly&&jsxRuntime.jsx(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.Pages,baseRoute:baseRoute,title:title,isExternalContent:item.useExternalContent},void 0),jsxRuntime.jsxs(Inner$3,__assign({styleDefinition:styleDefinition,hasBanner:item.bannerInfo!=null||showBannerPlaceholder||isDocument},{children:[jsxRuntime.jsx(Banner$2,{item:item,language:language,bannerDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerDefaultWidth,applyRoundedCorners:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.applyRoundedCorners,showBannerPlaceholder:showBannerPlaceholder,isEditor:isEditor,bannerFontSize:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerFontSize},void 0),jsxRuntime.jsxs(Content$6,__assign({padding:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.contentPadding,"data-page-tile-content":true},{children:[jsxRuntime.jsxs(MetaInfo$3,__assign({paddingRight:showBreadcrumb&&!isDocument&&readOnly?spacingM:0},{children:[showBreadcrumb&&jsxRuntime.jsx(StyledListItemBreadcrumb,{page:item},void 0),!showBreadcrumb&&item.modified&&jsxRuntime.jsx(DateTime,{value:item.modified},void 0),additionalMetadata]}),void 0),jsxRuntime.jsxs(MainContent,{children:[jsxRuntime.jsxs(TitleAndIntro,__assign({addDownloadButtonSafetySpace:isDocument},{children:[jsxRuntime.jsx(StyledTitle$1,{title:title,targetRoute:targetRoute,readOnly:readOnly,onClick:clickHandler,fontSize:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.titleFontSize,margin:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.titleMargin,isExternalContent:item.useExternalContent,resourceKey:item.useExternalContent?'ExternalLinkButton.pages.navigateTo':undefined,resourceValues:url!==null&&url!==void 0?url:undefined},void 0),showIntro&&((_c=content.intro)===null||_c===void 0?void 0:_c.length)>0&&jsxRuntime.jsx(Intro$2,{children:content.intro},void 0)]}),void 0),additionalContent]},void 0),hasKeywords&&jsxRuntime.jsx(Keywords$2,{children:jsxRuntime.jsx(FlatKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0)},void 0),buttons&&jsxRuntime.jsx(Buttons$2,{children:buttons},void 0)]}),void 0)]}),void 0)]}),void 0);};var StyledTitle$1=_styled__default["default"](Title$6).withConfig({displayName:"PageItemTile__StyledTitle",componentId:"sc-lcm8k6-0"})(templateObject_5$t||(templateObject_5$t=__makeTemplateObject(["\n // for embedded pages we do not pass in a custom font size and we want to truncate the title to 2 lines\n ","\n\n ",";\n\n ",";\n\n width: 100%;\n\n a:focus {\n outline-offset: 0 !important;\n }\n"],["\n // for embedded pages we do not pass in a custom font size and we want to truncate the title to 2 lines\n ","\n\n ",";\n\n ",";\n\n width: 100%;\n\n a:focus {\n outline-offset: 0 !important;\n }\n"])),function(p){return !p.fontSize&&_styled.css(templateObject_1$1N||(templateObject_1$1N=__makeTemplateObject(["\n a {\n display: inline-flex;\n }\n\n span {\n ","\n }\n "],["\n a {\n display: inline-flex;\n }\n\n span {\n ","\n }\n "])),LineClamp(2,fontSizeMedium,1.4));},function(p){return p.fontSize&&_styled.css(templateObject_2$13||(templateObject_2$13=__makeTemplateObject(["\n &&& {\n font-size: ","px;\n line-height: 20px;\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n }\n\n a {\n display: inline-flex;\n max-width: 100%;\n }\n\n span {\n // we pass a custom font size (smaller) for inline page lists and here we want to keep the title to single line\n display: block;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "],["\n &&& {\n font-size: ","px;\n line-height: 20px;\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n }\n\n a {\n display: inline-flex;\n max-width: 100%;\n }\n\n span {\n // we pass a custom font size (smaller) for inline page lists and here we want to keep the title to single line\n display: block;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "])),p.fontSize,fontSizeNormal,fontSizeNormal);},function(p){return p.margin?_styled.css(templateObject_3$K||(templateObject_3$K=__makeTemplateObject(["\n margin: "," !important;\n "],["\n margin: "," !important;\n "])),p.margin):_styled.css(templateObject_4$w||(templateObject_4$w=__makeTemplateObject(["\n margin: 0 !important;\n "],["\n margin: 0 !important;\n "])));});var Intro$2=_styled__default["default"].div.withConfig({displayName:"PageItemTile__Intro",componentId:"sc-lcm8k6-1"})(templateObject_6$j||(templateObject_6$j=__makeTemplateObject(["\n margin: ","px 0 ","px;\n ","\n"],["\n margin: ","px 0 ","px;\n ","\n"])),spacingXs-1,spacingS+5,LineClamp(10,fontSizeSmall,1.4));var Host$G=_styled__default["default"].article.withConfig({displayName:"PageItemTile__Host",componentId:"sc-lcm8k6-2"})(templateObject_7$e||(templateObject_7$e=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));var Inner$3=_styled__default["default"].div.withConfig({displayName:"PageItemTile__Inner",componentId:"sc-lcm8k6-3"})(templateObject_11$6||(templateObject_11$6=__makeTemplateObject(["\n ","\n ","\n ","\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n ","\n ","\n ","\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),function(p){var _a;return HostBaseStyle((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.backgroundColor);},function(p){var _a;return ((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.applyRoundedCorners)&&BorderRadiusStyle();},function(p){var _a;return ((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.height)?_styled.css(templateObject_8$d||(templateObject_8$d=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.styleDefinition.height):_styled.css(templateObject_9$b||(templateObject_9$b=__makeTemplateObject(["\n height: auto;\n min-height: 138px;\n "],["\n height: auto;\n min-height: 138px;\n "])));},function(p){var _a;return p.hasBanner&&_styled.css(templateObject_10$a||(templateObject_10$a=__makeTemplateObject(["\n [data-page-tile-content] {\n max-width: calc(100% - ","px)};\n }\n "],["\n [data-page-tile-content] {\n max-width: calc(100% - ","px)};\n }\n "])),(_a=p.styleDefinition)===null||_a===void 0?void 0:_a.bannerDefaultWidth);});var Content$6=_styled__default["default"].div.withConfig({displayName:"PageItemTile__Content",componentId:"sc-lcm8k6-4"})(templateObject_14$4||(templateObject_14$4=__makeTemplateObject(["\n ","\n ","\n\n box-sizing: border-box;\n max-width: 100%;\n"],["\n ","\n ","\n\n box-sizing: border-box;\n max-width: 100%;\n"])),ContentStyle,function(p){return p.padding?_styled.css(templateObject_12$5||(templateObject_12$5=__makeTemplateObject(["\n padding: ",";\n "],["\n padding: ",";\n "])),p.padding):_styled.css(templateObject_13$4||(templateObject_13$4=__makeTemplateObject(["\n padding: ","px;\n "],["\n padding: ","px;\n "])),spacingM);});var MetaInfo$3=_styled__default["default"].div.withConfig({displayName:"PageItemTile__MetaInfo",componentId:"sc-lcm8k6-5"})(templateObject_15$4||(templateObject_15$4=__makeTemplateObject(["\n "," /* font-size of date */\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n color: ",";\n\n padding-left: 2px;\n padding-right: ","px;\n"],["\n "," /* font-size of date */\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n color: ",";\n\n padding-left: 2px;\n padding-right: ","px;\n"])),MetaInfoStyle(17),function(p){return p.theme.textColors.default;},function(p){return p.paddingRight;});var MainContent=_styled__default["default"].div.withConfig({displayName:"PageItemTile__MainContent",componentId:"sc-lcm8k6-6"})(templateObject_16$4||(templateObject_16$4=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-left: 2px;\n"],["\n display: flex;\n align-items: center;\n padding-left: 2px;\n"])));var DownloadButtonWidth=32;var TitleAndIntro=_styled__default["default"].div.withConfig({displayName:"PageItemTile__TitleAndIntro",componentId:"sc-lcm8k6-7"})(templateObject_17$3||(templateObject_17$3=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: calc(\n 100% -\n ","px\n );\n"],["\n display: flex;\n flex-direction: column;\n width: calc(\n 100% -\n ","px\n );\n"])),function(p){return p.addDownloadButtonSafetySpace?DownloadButtonWidth:0;});var StyledListItemBreadcrumb=_styled__default["default"](ListItemBreadcrumb).withConfig({displayName:"PageItemTile__StyledListItemBreadcrumb",componentId:"sc-lcm8k6-8"})(templateObject_18$2||(templateObject_18$2=__makeTemplateObject(["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n &&& {\n // this is needed because draft.js adds a 1rem margin bottom here somehow (because the breadcrumb is a <p> maybe) and it breaks the view\n margin-bottom: 0;\n }\n"],["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n &&& {\n // this is needed because draft.js adds a 1rem margin bottom here somehow (because the breadcrumb is a <p> maybe) and it breaks the view\n margin-bottom: 0;\n }\n"])));var Keywords$2=_styled__default["default"].span.withConfig({displayName:"PageItemTile__Keywords",componentId:"sc-lcm8k6-9"})(templateObject_19$2||(templateObject_19$2=__makeTemplateObject(["\n display: block;\n margin-top: auto;\n\n > span {\n font-size: ","px;\n line-height: 20px;\n height: 20px;\n display: inline-block;\n padding: 0 2px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n && {\n a:link,\n a:visited {\n color: "," !important;\n\n &:focus {\n outline-offset: 0 !important;\n }\n }\n }\n"],["\n display: block;\n margin-top: auto;\n\n > span {\n font-size: ","px;\n line-height: 20px;\n height: 20px;\n display: inline-block;\n padding: 0 2px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n && {\n a:link,\n a:visited {\n color: "," !important;\n\n &:focus {\n outline-offset: 0 !important;\n }\n }\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});var Buttons$2=_styled__default["default"].div.withConfig({displayName:"PageItemTile__Buttons",componentId:"sc-lcm8k6-10"})(templateObject_20$2||(templateObject_20$2=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingS);var Banner$2=function Banner(_a){var _b,_c;var item=_a.item,language=_a.language,bannerDefaultWidth=_a.bannerDefaultWidth,bannerFontSize=_a.bannerFontSize,applyRoundedCorners=_a.applyRoundedCorners,showBannerPlaceholder=_a.showBannerPlaceholder,isEditor=_a.isEditor;var bannerInfo=item.bannerInfo;var isDocument=item.pageType===PageType.Document;var fileIcon=getFileIconByExtension(((_c=(_b=item.contents[language])===null||_b===void 0?void 0:_b.fileInfo)===null||_c===void 0?void 0:_c.extension)||'');if(isDocument){return jsxRuntime.jsx(BannerHost$1,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsxRuntime.jsx(FileIcon$1,{iconName:fileIcon,fontSize:bannerFontSize,color:getIconColor(fileIcon)},void 0)}),void 0);}if(!bannerInfo&&!showBannerPlaceholder){return null;}if(bannerDefaultWidth<100){return jsxRuntime.jsx(SmallBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsxRuntime.jsx(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:isEditor?'edit':'read',width:200,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0);}return jsxRuntime.jsx("div",{children:jsxRuntime.jsx(LargeBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsxRuntime.jsx(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:450,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0)},void 0);};var BannerHost$1=_styled__default["default"].div.withConfig({displayName:"PageItemTile__BannerHost",componentId:"sc-lcm8k6-11"})(templateObject_23$2||(templateObject_23$2=__makeTemplateObject(["\n display: flex;\n width: ","px;\n justify-content: center;\n align-items: center;\n background-color: ",";\n\n ","\n\n @media (max-width: ","px) {\n ","\n }\n"],["\n display: flex;\n width: ","px;\n justify-content: center;\n align-items: center;\n background-color: ",";\n\n ","\n\n @media (max-width: ","px) {\n ","\n }\n"])),function(p){return p.defaultWidth;},function(p){return p.theme.palette.neutralQuaternaryAlt;},function(p){return p.applyRoundedCorners&&_styled.css(templateObject_21$2||(templateObject_21$2=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5));},maxScreenSize.medium,function(p){return p.defaultWidth>100&&_styled.css(templateObject_22$2||(templateObject_22$2=__makeTemplateObject(["\n width: auto;\n height: 100px;\n "],["\n width: auto;\n height: 100px;\n "])));});var FileIcon$1=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PageItemTile__FileIcon",componentId:"sc-lcm8k6-12"})(templateObject_24$1||(templateObject_24$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),function(p){return p.fontSize||30;},function(p){return p.color||p.theme.textColors.default;});var SmallBannerWrapper=_styled__default["default"].div.withConfig({displayName:"PageItemTile__SmallBannerWrapper",componentId:"sc-lcm8k6-13"})(templateObject_26$1||(templateObject_26$1=__makeTemplateObject(["\n background-color: ",";\n\n width: ","px;\n height: 100%;\n\n .video-view-container {\n height: 100%;\n }\n\n &&& .video-icon {\n font-size: 35px;\n margin: 0;\n }\n\n ","\n"],["\n background-color: ",";\n\n width: ","px;\n height: 100%;\n\n .video-view-container {\n height: 100%;\n }\n\n &&& .video-icon {\n font-size: 35px;\n margin: 0;\n }\n\n ","\n"])),function(p){return p.theme.palette.accent;},function(p){return p.defaultWidth;},function(p){return p.applyRoundedCorners&&_styled.css(templateObject_25$1||(templateObject_25$1=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5));});var LargeBannerWrapper=_styled__default["default"](LeftBannerWrapper).withConfig({displayName:"PageItemTile__LargeBannerWrapper",componentId:"sc-lcm8k6-14"})(templateObject_28$1||(templateObject_28$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.applyRoundedCorners&&_styled.css(templateObject_27$1||(templateObject_27$1=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5,true));});var templateObject_1$1N,templateObject_2$13,templateObject_3$K,templateObject_4$w,templateObject_5$t,templateObject_6$j,templateObject_7$e,templateObject_8$d,templateObject_9$b,templateObject_10$a,templateObject_11$6,templateObject_12$5,templateObject_13$4,templateObject_14$4,templateObject_15$4,templateObject_16$4,templateObject_17$3,templateObject_18$2,templateObject_19$2,templateObject_20$2,templateObject_21$2,templateObject_22$2,templateObject_23$2,templateObject_24$1,templateObject_25$1,templateObject_26$1,templateObject_27$1,templateObject_28$1;var global$1=global$m;var trim=stringTrim$1.trim;var whitespaces$4=whitespaces$3;var $parseInt=global$1.parseInt;var hex=/^[+-]?0[Xx]/;var FORCED=$parseInt(whitespaces$4+'08')!==8||$parseInt(whitespaces$4+'0x16')!==22;// `parseInt` method
|
|
125917
125925
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
125918
|
-
var numberParseInt=FORCED?function parseInt(string,radix){var S=trim(String(string));return $parseInt(S,radix>>>0||(hex.test(S)?16:10));}:$parseInt;var $$
|
|
125926
|
+
var numberParseInt=FORCED?function parseInt(string,radix){var S=trim(String(string));return $parseInt(S,radix>>>0||(hex.test(S)?16:10));}:$parseInt;var $$3=_export;var parseIntImplementation=numberParseInt;// `parseInt` method
|
|
125919
125927
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
125920
|
-
$$2({global:true,forced:parseInt!=parseIntImplementation},{parseInt:parseIntImplementation});function getMaxImageWidth(defaultMaxWidth){return defaultMaxWidth!==null&&defaultMaxWidth!==void 0?defaultMaxWidth:maxContentWidth;}function getImageWidth(image){var width=typeof image==='string'?parseInt(image):image===null||image===void 0?void 0:image.width;if(!width||isNaN(width)){return getMaxImageWidth();}return Math.min(width,getMaxImageWidth());}function getNewsCardIcon(item,intl){if(hasFlag(item.knownState,KnownNewsState.Alert)){return {name:'Warning',backgroundColor:'red',tooltipText:intl.formatMessage({id:'NewsArticle.alert'})};}if(hasFlag(item.knownState,KnownNewsState.Unconfirmed)){return {name:'Completed',backgroundColor:'green',tooltipText:intl.formatMessage({id:'NewsArticle.confirmationRequired'})};}return null;}var ItemTileLayoutMode;(function(ItemTileLayoutMode){ItemTileLayoutMode["BannerTopMode"]="bannerTop";ItemTileLayoutMode["BannerLeftMode"]="bannerLeft";})(ItemTileLayoutMode||(ItemTileLayoutMode={}));var NewsItemTile=function NewsItemTile(_a){var item=_a.item,baseRoute=_a.baseRoute,layoutMode=_a.layoutMode,filterBaseUrl=_a.filterBaseUrl,dateLabelResourceKey=_a.dateLabelResourceKey,buttons=_a.buttons,openTargetInNewWindow=_a.openTargetInNewWindow,onClick=_a.onClick,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUserContext().user;var token=useCurrentToken();var intl=useIntl();var features=useFeatures();var title=getTitle(item,user,intl.formatMessage);var headline=getHeadline(item,user);var language=NewsService.getLanguageForPublishableItem(item,user);var handleExternalContentClick=useExternalContentClickHandler();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var targetRoute=NewsService.getNewsRoute(item.useExternalContent?buildPath('/redirect/news'):baseRoute,item.id,title);var hasKeywords=Object.keys(item.keywords).length>0;var content=item.contents[language];var hasIntro=content.intro&&content.intro.length>0;var icon=getNewsCardIcon(item,intl);var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);return jsxRuntime.jsxs(Host$F,__assign({hasBanner:item.bannerInfo!=null,layoutMode:layoutMode,styleDefinition:styleDefinition,"data-item-id":item.id,className:className},{children:[!readOnly&&jsxRuntime.jsx(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.News,baseRoute:baseRoute,onClick:onClick,title:title,openTargetInNewWindow:openTargetInNewWindow,isExternalContent:item.useExternalContent},void 0),jsxRuntime.jsx(Banner$1$1,{item:item,token:item.fileAccessToken||token,resourceType:ItemResourceTypes.News,layoutMode:layoutMode,bannerDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerDefaultWidth,showPlaceholderIfNoBannerInfo:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showPlaceholderIfNoBannerInfo},void 0),jsxRuntime.jsxs(Content$5,{children:[jsxRuntime.jsxs(MetaInfoAndIcon,{children:[jsxRuntime.jsxs(MetaInfo$2,__assign({showChannelsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:[dateLabelResourceKey&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(FormattedMessage$1,{id:dateLabelResourceKey},void 0),":\u00A0"]},void 0),jsxRuntime.jsx(DateTime,{value:item.publishingDate},void 0),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:["\u2002",jsxRuntime.jsx(ClickableChannelTitles,{channels:item.channels.map(function(c){return c.name;}),language:getPreferredContentLanguage(user),channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0)]}),void 0),icon&&jsxRuntime.jsx(NewsCardIcon$1,{children:jsxRuntime.jsx(Tooltip,__assign({text:icon.tooltipText},{children:jsxRuntime.jsx(StyledIcon$4$1,{iconName:icon.name,backgroundColor:icon.backgroundColor},void 0)}),item.id+"-"+icon.name)},void 0)]},void 0),features.contentHeadline&&!!headline&&jsxRuntime.jsx(Headline$2,{children:headline},void 0),jsxRuntime.jsx(StyledTitle$2,{title:title,targetRoute:targetRoute,readOnly:readOnly,openTargetInNewWindow:openTargetInNewWindow,onClick:function(e){if(onClick){onClick(e,true);}else {handleExternalContentClick(e,item,ItemResourceTypes.News);}},isExternalContent:item.useExternalContent,resourceKey:"ExternalLinkButton.news.navigateTo",resourceValues:url},void 0),hasIntro&&jsxRuntime.jsx(Intro$1$1,{children:content.intro},void 0),hasKeywords&&jsxRuntime.jsx(StyledKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0),buttons&&jsxRuntime.jsx(Footer,__assign({alignItemsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:buttons}),void 0)]},void 0)]}),void 0);};var Host$F=_styled__default["default"].article.withConfig({displayName:"NewsItemTile__Host",componentId:"sc-15drgb8-0"})(templateObject_4$v||(templateObject_4$v=__makeTemplateObject(["\n ","\n ",";\n\n ","\n\n ","\n\n ","\n\n position: relative;\n"],["\n ","\n ",";\n\n ","\n\n ","\n\n ","\n\n position: relative;\n"])),function(p){var _a;return HostBaseStyle((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.backgroundColor);},function(p){var _a;return !((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.noShadow)&&CardBorderInline(2,2);},function(p){return p.hasBanner&&_styled.css(templateObject_1$1M||(templateObject_1$1M=__makeTemplateObject(["\n min-height: 138px;\n "],["\n min-height: 138px;\n "])));},function(p){return (!p.layoutMode||p.layoutMode===ItemTileLayoutMode.BannerLeftMode)&&_styled.css(templateObject_2$12||(templateObject_2$12=__makeTemplateObject(["\n @media (max-width: ","px) {\n flex-direction: column;\n }\n "],["\n @media (max-width: ","px) {\n flex-direction: column;\n }\n "])),maxScreenSize.medium);},function(p){return p.layoutMode===ItemTileLayoutMode.BannerTopMode&&_styled.css(templateObject_3$J||(templateObject_3$J=__makeTemplateObject(["\n flex-direction: column;\n "],["\n flex-direction: column;\n "])));});var StyledTitle$2=_styled__default["default"](Title$6).withConfig({displayName:"NewsItemTile__StyledTitle",componentId:"sc-15drgb8-1"})(templateObject_5$s||(templateObject_5$s=__makeTemplateObject(["\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"],["\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"])),fontSizeMedium,fontSizeSmall);var Content$5=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__Content",componentId:"sc-15drgb8-2"})(templateObject_6$i||(templateObject_6$i=__makeTemplateObject(["\n ","\n padding: ","px;\n"],["\n ","\n padding: ","px;\n"])),ContentStyle,spacingM);var Headline$2=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__Headline",componentId:"sc-15drgb8-3"})(templateObject_7$d||(templateObject_7$d=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n margin-bottom: ","px;\n"],["\n font-size: ","px;\n font-weight: bold;\n margin-bottom: ","px;\n"])),fontSizeSmall,spacingS);var Intro$1$1=_styled__default["default"].p.withConfig({displayName:"NewsItemTile__Intro",componentId:"sc-15drgb8-4"})(templateObject_8$c||(templateObject_8$c=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n"])),fontSizeNormal);var MetaInfoAndIcon=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__MetaInfoAndIcon",componentId:"sc-15drgb8-5"})(templateObject_9$a||(templateObject_9$a=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var MetaInfo$2=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__MetaInfo",componentId:"sc-15drgb8-6"})(templateObject_11$5||(templateObject_11$5=__makeTemplateObject(["\n ","\n color: ",";\n margin-bottom: ","px;\n\n ","\n"],["\n ","\n color: ",";\n margin-bottom: ","px;\n\n ","\n"])),MetaInfoStyle(),function(p){return p.theme.palette.neutralTertiary;},spacingS,function(p){return p.showChannelsToTheRight&&_styled.css(templateObject_10$9||(templateObject_10$9=__makeTemplateObject(["\n width: 100%;\n\n time {\n margin-right: auto;\n }\n "],["\n width: 100%;\n\n time {\n margin-right: auto;\n }\n "])));});var NewsCardIcon$1=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__NewsCardIcon",componentId:"sc-15drgb8-7"})(templateObject_12$4||(templateObject_12$4=__makeTemplateObject(["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"],["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"])));var StyledIcon$4$1=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"NewsItemTile__StyledIcon",componentId:"sc-15drgb8-8"})(templateObject_13$3||(templateObject_13$3=__makeTemplateObject(["\n font-size: ","px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ","px;\n cursor: pointer;\n\n background-color: ",";\n color: ",";\n"],["\n font-size: ","px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ","px;\n cursor: pointer;\n\n background-color: ",";\n color: ",";\n"])),fontSizeSmaller,spacingXs,function(p){return p.backgroundColor;},function(p){return p.theme.palette.white;});var StyledKeywords=_styled__default["default"](FlatKeywords).withConfig({displayName:"NewsItemTile__StyledKeywords",componentId:"sc-15drgb8-9"})(templateObject_14$3||(templateObject_14$3=__makeTemplateObject(["\n margin-top: ","px;\n font-size: ","px;\n\n && a {\n &,\n :link,\n :visited {\n color: ",";\n }\n }\n"],["\n margin-top: ","px;\n font-size: ","px;\n\n && a {\n &,\n :link,\n :visited {\n color: ",";\n }\n }\n"])),spacingS,fontSizeSmall,function(p){return p.theme.palette.neutralTertiary;});var Footer=_styled__default["default"].footer.withConfig({displayName:"NewsItemTile__Footer",componentId:"sc-15drgb8-10"})(templateObject_16$3||(templateObject_16$3=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n margin-right: ","px;\n\n i {\n font-size: 22px;\n }\n }\n"],["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n margin-right: ","px;\n\n i {\n font-size: 22px;\n }\n }\n"])),spacingS,function(p){return p.alignItemsToTheRight&&_styled.css(templateObject_15$3||(templateObject_15$3=__makeTemplateObject(["\n justify-content: flex-end;\n "],["\n justify-content: flex-end;\n "])));},spacingS+5);var Banner$1$1=function Banner(_a){var item=_a.item,token=_a.token,resourceType=_a.resourceType,layoutMode=_a.layoutMode,bannerDefaultWidth=_a.bannerDefaultWidth,showPlaceholderIfNoBannerInfo=_a.showPlaceholderIfNoBannerInfo;var bannerInfo=item.bannerInfo;if(!bannerInfo&&!showPlaceholderIfNoBannerInfo){return null;}var banner=getBanner();return jsxRuntime.jsx("div",{children:banner},void 0);function getBanner(){if(layoutMode===ItemTileLayoutMode.BannerTopMode){return jsxRuntime.jsx(TopBannerWrapper,__assign({showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsxRuntime.jsx(TopBannerInner,{children:jsxRuntime.jsx(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:getMaxImageWidth(),token:item.fileAccessToken||token,resourceType:resourceType},void 0)},void 0)}),void 0);}return jsxRuntime.jsx(LeftBannerWrapper,__assign({defaultWidth:bannerDefaultWidth!==null&&bannerDefaultWidth!==void 0?bannerDefaultWidth:150,showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsxRuntime.jsx(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:getMaxImageWidth(450),token:item.fileAccessToken||token,resourceType:resourceType},void 0)}),void 0);}};var TopBannerWrapper=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__TopBannerWrapper",componentId:"sc-15drgb8-11"})(templateObject_18$1||(templateObject_18$1=__makeTemplateObject(["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"],["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"])),bannerAspectRatio,function(p){return p.showPlaceholder&&_styled.css(templateObject_17$2||(templateObject_17$2=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.accent);});var TopBannerInner=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__TopBannerInner",componentId:"sc-15drgb8-12"})(templateObject_19$1||(templateObject_19$1=__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));var templateObject_1$1M,templateObject_2$12,templateObject_3$J,templateObject_4$v,templateObject_5$s,templateObject_6$i,templateObject_7$d,templateObject_8$c,templateObject_9$a,templateObject_10$9,templateObject_11$5,templateObject_12$4,templateObject_13$3,templateObject_14$3,templateObject_15$3,templateObject_16$3,templateObject_17$2,templateObject_18$1,templateObject_19$1;var DocumentDownloadButton=function DocumentDownloadButton(_a){var _b;var page=_a.page,basePath=_a.basePath,onClick=_a.onClick,className=_a.className;var formatMessage=useIntl().formatMessage;var currentUser=useCurrentUser();var createDocumentClickHandler=usePagesClickHandler().createDocumentClickHandler;if(page.pageType!==PageType.Document){return null;}var _c=getContentForPage(page,currentUser),content=_c.content,language=_c.language;var fileInfo=content===null||content===void 0?void 0:content.fileInfo;var title=content===null||content===void 0?void 0:content.title;if(!fileInfo||!language){return null;}return jsxRuntime.jsx(StyledTooltip$1,__assign({resourceKey:'Pages.documents.downloadButton.tooltip',values:{fileName:title||fileInfo.fileName},className:className},{children:jsxRuntime.jsx(IconButton,{iconProps:{iconName:'Download'},onClick:createDocumentClickHandler(page.id,fileInfo.fileId,language,fileInfo.shouldOpenInBrowser,(_b=page)===null||_b===void 0?void 0:_b.fileAccessToken,basePath,onClick),ariaLabel:formatMessage({id:'Pages.documents.downloadButton.tooltip'},{fileName:title||fileInfo.fileName})},void 0)}),void 0);};var StyledTooltip$1=_styled__default["default"](Tooltip).withConfig({displayName:"DocumentDownloadButton__StyledTooltip",componentId:"sc-1lgs2rp-0"})(templateObject_1$1L||(templateObject_1$1L=__makeTemplateObject(["\n display: inline-flex;\n\n > button {\n border: 0;\n padding: 0;\n height: 28px; // this is needed for the focus indicator\n\n i {\n color: ",";\n }\n }\n"],["\n display: inline-flex;\n\n > button {\n border: 0;\n padding: 0;\n height: 28px; // this is needed for the focus indicator\n\n i {\n color: ",";\n }\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1L;var EmbeddedObjectTile=function EmbeddedObjectTile(_a){var _b;var id=_a.id,type=_a.type,readOnly=_a.readOnly,previewTheme=_a.previewTheme,buttons=_a.buttons,groupIds=_a.groupIds,className=_a.className;var getPost=usePostsApi().getPost;var getNews=useNewsApi().get;var loadPage=usePagesApi().loadPage;var getEvent=useEventsApi().getEvent;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _c=usePromise$2(fetchItem),item=_c[0],isLoading=_c[1],error=_c[2];var useDarkTheme=previewTheme==='dark';var palette=React$d.useContext(ThemeContext$1).theme.palette;var user=useCurrentUser();var backgroundColor=useDarkTheme?palette.neutralLight:palette.white;if(isLoading){return jsxRuntime.jsx(SpinnerHost,{children:jsxRuntime.jsx(StyledSpinner$2,{size:officeUiFabricReact.SpinnerSize.large},void 0)},void 0);}if(((_b=error===null||error===void 0?void 0:error.response)===null||_b===void 0?void 0:_b.statusCode)===403){return jsxRuntime.jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-access-denied":true},{children:[buttons,jsxRuntime.jsx(EmbeddedObjectWarningTile,{iconName:"LockSolid",iconLabel:"Generic.noAccess",messageResourceKey:"Generic.noAccessReason"},void 0)]}),void 0);}if(error||!item){return jsxRuntime.jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-not-found":true},{children:[buttons,jsxRuntime.jsx(EmbeddedObjectWarningTile,{iconName:"AlertSolid",iconLabel:"Generic.itemNotFound",messageResourceKey:"Generic.deletedItemReason"},void 0)]}),void 0);}var itemGroupIds=getItemGroupIds();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-embedded-object-id":id},{children:[buttons,renderEmbeddedObjectTile()]}),void 0),groupIds&&groupIds.every(function(gid){return !itemGroupIds.includes(gid);})&&jsxRuntime.jsx(DifferentGroupWarning,__assign({"data-warning-different-group":true},{children:jsxRuntime.jsx(EmbeddedObjectWarningTile,{messageResourceKey:"Generic.differentGroupWarning"},void 0)}),void 0)]},void 0);function getItemGroupIds(){var _a,_b;var groupIds=(_a=item)===null||_a===void 0?void 0:_a.groupIds;if(groupIds){return groupIds;}var groupId=(_b=item)===null||_b===void 0?void 0:_b.groupId;return groupId?[groupId]:null;}function fetchItem(){return __awaiter(this,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:_a=type;switch(_a){case AttachmentType.Post:return [3/*break*/,1];case AttachmentType.News:return [3/*break*/,3];case AttachmentType.Page:return [3/*break*/,5];case AttachmentType.Event:return [3/*break*/,7];}return [3/*break*/,9];case 1:return [4/*yield*/,getPost(id)];case 2:return [2/*return*/,_b.sent()];case 3:return [4/*yield*/,getNews(id).toPromise()];case 4:return [2/*return*/,_b.sent()];case 5:return [4/*yield*/,loadPage(id)];case 6:return [2/*return*/,_b.sent()];case 7:return [4/*yield*/,getEvent(id)];case 8:return [2/*return*/,_b.sent()];case 9:throw Error('Invalid type');}});});}function renderEmbeddedObjectTile(){var _a;if(type===AttachmentType.Post){return jsxRuntime.jsx(PostItemTile,{post:item,backgroundColor:backgroundColor,readOnly:readOnly},void 0);}if(type===AttachmentType.News){var newsItem=item;return jsxRuntime.jsx(NewsItemTile,{item:newsItem,baseRoute:buildPath('news'),styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white},readOnly:readOnly},void 0);}if(type===AttachmentType.Page){var pageItem=item;return jsxRuntime.jsx(StyledPageItemTile$1,{item:pageItem,baseRoute:buildPath('pages'),styleDefinition:{backgroundColor:backgroundColor,bannerDefaultWidth:150,bannerFontSize:60},readOnly:readOnly,isBannerClickable:((_a=pageItem.bannerInfo)===null||_a===void 0?void 0:_a.type)==='video',additionalMetadata:jsxRuntime.jsx(StyledDocumentDownloadButton$3,{page:item,marginRight:readOnly?spacingM:0},void 0),showBreadcrumb:true,showIntro:true},void 0);}var language=NewsService.getLanguageForPublishableItem(item,user);return jsxRuntime.jsx(EventCard,{item:item,language:language,styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white,bannerHostWidth:150},readOnly:readOnly},void 0);}};var Host$E=_styled__default["default"].div.withConfig({displayName:"EmbeddedObjectTile__Host",componentId:"sc-yfh5nh-0"})(templateObject_3$I||(templateObject_3$I=__makeTemplateObject(["\n width: 100%;\n ","\n"],["\n width: 100%;\n ","\n"])),function(p){return p.backgroundColor?_styled.css(templateObject_1$1K||(templateObject_1$1K=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.backgroundColor):_styled.css(templateObject_2$11||(templateObject_2$11=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),function(p){return p.theme.palette.white;});});var DifferentGroupWarning=_styled__default["default"].div.withConfig({displayName:"EmbeddedObjectTile__DifferentGroupWarning",componentId:"sc-yfh5nh-1"})(templateObject_4$u||(templateObject_4$u=__makeTemplateObject(["\n background-color: ",";\n color: ",";\n font-size: ","px;\n"],["\n background-color: ",";\n color: ",";\n font-size: ","px;\n"])),function(p){return p.theme.semanticColors.errorBackground;},function(p){return p.theme.palette.red;},fontSizeSmall);var EmbeddedObjectWarningTile=function EmbeddedObjectWarningTile(_a){var messageResourceKey=_a.messageResourceKey,iconName=_a.iconName,iconLabel=_a.iconLabel;return jsxRuntime.jsxs(WarningHost,{children:[(iconName||iconLabel)&&jsxRuntime.jsxs(Title$5,{children:[iconName&&jsxRuntime.jsx(StyleIcon,{iconName:iconName},void 0),iconLabel&&jsxRuntime.jsx(FormattedMessageWithStyle,{id:iconLabel},void 0)]},void 0),jsxRuntime.jsx(FormattedMessageWithStyle,{id:messageResourceKey},void 0)]},void 0);};var WarningHost=_styled__default["default"].div.withConfig({displayName:"EmbeddedObjectTile__WarningHost",componentId:"sc-yfh5nh-2"})(templateObject_5$r||(templateObject_5$r=__makeTemplateObject(["\n padding: ","px;\n"],["\n padding: ","px;\n"])),spacingM);var Title$5=_styled__default["default"].div.withConfig({displayName:"EmbeddedObjectTile__Title",componentId:"sc-yfh5nh-3"})(templateObject_6$h||(templateObject_6$h=__makeTemplateObject(["\n display: flex;\n align-items: center;\n font-weight: bold;\n font-size: ","px;\n margin-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n font-weight: bold;\n font-size: ","px;\n margin-bottom: ","px;\n"])),fontSizeMedium,spacingS);var SpinnerHost=_styled__default["default"].div.withConfig({displayName:"EmbeddedObjectTile__SpinnerHost",componentId:"sc-yfh5nh-4"})(templateObject_7$c||(templateObject_7$c=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ","px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ","px;\n"])),spacingL);var StyledSpinner$2=_styled__default["default"](Spinner).withConfig({displayName:"EmbeddedObjectTile__StyledSpinner",componentId:"sc-yfh5nh-5"})(templateObject_8$b||(templateObject_8$b=__makeTemplateObject(["\n margin-top: 0;\n margin-bottom: ","px;\n"],["\n margin-top: 0;\n margin-bottom: ","px;\n"])),spacingL);var StyleIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"EmbeddedObjectTile__StyleIcon",componentId:"sc-yfh5nh-6"})(templateObject_9$9||(templateObject_9$9=__makeTemplateObject(["\n padding-right: ","px;\n"],["\n padding-right: ","px;\n"])),spacingS);var StyledPageItemTile$1=_styled__default["default"](PageItemTile).withConfig({displayName:"EmbeddedObjectTile__StyledPageItemTile",componentId:"sc-yfh5nh-7"})(templateObject_11$4||(templateObject_11$4=__makeTemplateObject(["\n ","\n\n @media (max-width: ","px) {\n > div {\n flex-direction: column;\n }\n\n [data-page-tile-content] {\n max-width: 100%;\n }\n }\n"],["\n ","\n\n @media (max-width: ","px) {\n > div {\n flex-direction: column;\n }\n\n [data-page-tile-content] {\n max-width: 100%;\n }\n }\n"])),function(p){return p.isBannerClickable&&_styled.css(templateObject_10$8||(templateObject_10$8=__makeTemplateObject(["\n [data-page-tile-content] {\n position: relative;\n }\n "],["\n [data-page-tile-content] {\n position: relative;\n }\n "])));},maxScreenSize.medium);var StyledDocumentDownloadButton$3=_styled__default["default"](DocumentDownloadButton).withConfig({displayName:"EmbeddedObjectTile__StyledDocumentDownloadButton",componentId:"sc-yfh5nh-8"})(templateObject_12$3||(templateObject_12$3=__makeTemplateObject(["\n margin-left: auto;\n z-index: 1;\n\n > button i {\n margin: 0;\n color: ",";\n }\n\n margin-right: ","px;\n\n @media (max-width: ","px) {\n margin-right: 0;\n }\n"],["\n margin-left: auto;\n z-index: 1;\n\n > button i {\n margin: 0;\n color: ",";\n }\n\n margin-right: ","px;\n\n @media (max-width: ","px) {\n margin-right: 0;\n }\n"])),function(p){return p.theme.textColors.default;},function(p){return p.marginRight;},maxScreenSize.medium);var templateObject_1$1K,templateObject_2$11,templateObject_3$I,templateObject_4$u,templateObject_5$r,templateObject_6$h,templateObject_7$c,templateObject_8$b,templateObject_9$9,templateObject_10$8,templateObject_11$4,templateObject_12$3;var EmbeddedObjectList=function EmbeddedObjectList(_a){var attachments=_a.attachments,className=_a.className,onDeleteClick=_a.onDeleteClick,previewTheme=_a.previewTheme;var formatMessage=useIntl().formatMessage;var embeddedObjects=attachments.filter(function(f){return f.type===AttachmentType.Post||f.type===AttachmentType.News||f.type===AttachmentType.Page||f.type===AttachmentType.Event;});if(embeddedObjects.length===0){return null;}if(onDeleteClick){return jsxRuntime.jsx(Host$D,__assign({className:className,"data-embedded-object-attachment-list":true},{children:embeddedObjects.map(function(o){return jsxRuntime.jsx(AttachmentHost,__assign({domIdentifier:"embedded-object",deleteButton:jsxRuntime.jsx(DeleteAttachmentButton,{"data-remove-attachment-button":o.id,iconProps:{iconName:'ChromeClose'},onClick:function(){onDeleteClick(o);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsxRuntime.jsx(EmbeddedObjectTile,{id:o.id,type:o.type,previewTheme:previewTheme,readOnly:true},o.id)}),o.id);})}),void 0);}return jsxRuntime.jsx(PreviewHost,__assign({className:className,domIdentifier:"embedded-object-preview-"+embeddedObjects[0].id},{children:jsxRuntime.jsx(EmbeddedObjectTile,{id:embeddedObjects[0].id,type:embeddedObjects[0].type,previewTheme:previewTheme},void 0)}),void 0);};var Host$D=_styled__default["default"].div.withConfig({displayName:"EmbeddedObjectList__Host",componentId:"sc-axja9n-0"})(templateObject_1$1J||(templateObject_1$1J=__makeTemplateObject(["\n display: inline-flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n\n > div {\n margin-top: ","px;\n }\n"],["\n display: inline-flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n\n > div {\n margin-top: ","px;\n }\n"])),spacingM,spacingM);var PreviewHost=_styled__default["default"](AttachmentHost).withConfig({displayName:"EmbeddedObjectList__PreviewHost",componentId:"sc-axja9n-1"})(templateObject_2$10||(templateObject_2$10=__makeTemplateObject(["\n margin: ","px 0 0 0;\n"],["\n margin: ","px 0 0 0;\n"])),spacingM);var templateObject_1$1J,templateObject_2$10;var ImageAttachmentList=function ImageAttachmentList(_a){var images=_a.images,onDeleteClick=_a.onDeleteClick,disabled=_a.disabled,imageBackgroundColor=_a.imageBackgroundColor,className=_a.className;if(!images||images.length===0){return null;}return jsxRuntime.jsx(List,__assign({className:className},{children:images.map(function(i){return jsxRuntime.jsx(ListItem$1,{children:jsxRuntime.jsx(ImageAttachmentPreview,{attachment:i,disabled:disabled,onDeleteClick:function(){return onDeleteClick(i);},backgroundColor:imageBackgroundColor},void 0)},i.id);})}),void 0);};var List=_styled__default["default"].ul.withConfig({displayName:"ImageAttachmentList__List",componentId:"sc-7el1kj-0"})(templateObject_1$1I||(templateObject_1$1I=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n"],["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n"])));var ListItem$1=_styled__default["default"].li.withConfig({displayName:"ImageAttachmentList__ListItem",componentId:"sc-7el1kj-1"})(templateObject_2$$||(templateObject_2$$=__makeTemplateObject(["\n width: calc(100% - ","px);\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n }\n"],["\n width: calc(100% - ","px);\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n }\n"])),spacingS-5,minScreenSize.medium,spacingS-5);var ImageAttachmentPreview=function ImageAttachmentPreview(_a){var attachment=_a.attachment,onDeleteClick=_a.onDeleteClick,disabled=_a.disabled,backgroundColor=_a.backgroundColor;var formatMessage=useIntl().formatMessage;return jsxRuntime.jsxs(AttachmentHost,__assign({domIdentifier:"image",backgroundColor:backgroundColor,deleteButton:!disabled&&jsxRuntime.jsx(StyledDeleteAttachmentButton,{iconProps:{iconName:'Delete'},onClick:onDeleteClick,disabled:attachment.isUploadInProgress,ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:[attachment.hasError&&jsxRuntime.jsx(AttachmentOverlay,{children:jsxRuntime.jsx("div",{children:jsxRuntime.jsx(WarningIcon,{iconName:"Warning"},void 0)},void 0)},void 0),attachment.isUploadInProgress&&jsxRuntime.jsx(AttachmentOverlay,{children:jsxRuntime.jsx(CenteredSpinner,{size:officeUiFabricReact.SpinnerSize.large},void 0)},void 0),jsxRuntime.jsx(officeUiFabricReact.Image,{src:attachment.previewUrl,height:225,imageFit:officeUiFabricReact.ImageFit.centerCover,title:attachment.filename},void 0)]}),void 0);};var AttachmentOverlay=_styled__default["default"].div.withConfig({displayName:"ImageAttachmentList__AttachmentOverlay",componentId:"sc-7el1kj-2"})(templateObject_3$H||(templateObject_3$H=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 2;\n\n background-color: rgba(146, 146, 146, 0.33);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: ","px;\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 2;\n\n background-color: rgba(146, 146, 146, 0.33);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: ","px;\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n"])),attachmentRoundedCornerSize);var CenteredSpinner=_styled__default["default"](Spinner).withConfig({displayName:"ImageAttachmentList__CenteredSpinner",componentId:"sc-7el1kj-3"})(templateObject_4$t||(templateObject_4$t=__makeTemplateObject(["\n margin-top: auto;\n height: 100%;\n"],["\n margin-top: auto;\n height: 100%;\n"])));var WarningIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"ImageAttachmentList__WarningIcon",componentId:"sc-7el1kj-4"})(templateObject_5$q||(templateObject_5$q=__makeTemplateObject(["\n font-size: 100px;\n color: ",";\n"],["\n font-size: 100px;\n color: ",";\n"])),function(p){return p.theme.palette.redDark;});var StyledDeleteAttachmentButton=_styled__default["default"](DeleteAttachmentButton).withConfig({displayName:"ImageAttachmentList__StyledDeleteAttachmentButton",componentId:"sc-7el1kj-5"})(templateObject_6$g||(templateObject_6$g=__makeTemplateObject(["\n && {\n i {\n font-size: ","px;\n margin: 0;\n }\n }\n"],["\n && {\n i {\n font-size: ","px;\n margin: 0;\n }\n }\n"])),fontSizeMedium);var templateObject_1$1I,templateObject_2$$,templateObject_3$H,templateObject_4$t,templateObject_5$q,templateObject_6$g;var AttachmentList=function AttachmentList(_a){var className=_a.className,files=_a.files,onDeleteAttachmentClick=_a.onDeleteAttachmentClick,disabled=_a.disabled,previewTheme=_a.previewTheme,disableVideoPreview=_a.disableVideoPreview,disableEmbeddedObjectPreview=_a.disableEmbeddedObjectPreview;var attachedImages=files.filter(function(f){return f.type===AttachmentType.Image;});var attachedFiles=files.filter(function(f){return f.type===AttachmentType.File;});var palette=React$d.useContext(ThemeContext$1).theme.palette;return jsxRuntime.jsxs(Host$C,__assign({className:className,hasItems:files.length>0,"data-attachment-list":true},{children:[jsxRuntime.jsx(GifEditList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsxRuntime.jsx(ImageAttachmentList,{images:attachedImages,disabled:disabled,onDeleteClick:function(i){return onDeleteAttachmentClick(i);},imageBackgroundColor:previewTheme==='dark'?palette.neutralLight:palette.white},void 0),!disableVideoPreview&&jsxRuntime.jsx(VideoList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);}},void 0),!disableEmbeddedObjectPreview&&jsxRuntime.jsx(EmbeddedObjectList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsxRuntime.jsx(FilesList$1,{files:attachedFiles,onDeleteClick:function(f){return onDeleteAttachmentClick(f);},disabled:disabled},void 0),jsxRuntime.jsx("div",{style:{clear:'both'}},void 0)]}),void 0);};var FilesList$1=_styled__default["default"](FileAttachmentList).withConfig({displayName:"AttachmentList__FilesList",componentId:"sc-1s0cqp9-0"})(templateObject_1$1H||(templateObject_1$1H=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var Host$C=_styled__default["default"].div.withConfig({displayName:"AttachmentList__Host",componentId:"sc-1s0cqp9-1"})(templateObject_2$_||(templateObject_2$_=__makeTemplateObject(["\n margin-top: ",";\n"],["\n margin-top: ",";\n"])),function(_a){var hasItems=_a.hasItems;return hasItems?'8px':'0';});var templateObject_1$1H,templateObject_2$_;var RichCommentInputWithAttachmentList=/*#__PURE__*/React$d.forwardRef(function(props,ref){var _a;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(RichCommentInput,__assign({},props,{ref:ref}),void 0),jsxRuntime.jsx(AttachmentList,{files:props.attachments,disabled:props.disabled,onDeleteAttachmentClick:props.onDeleteAttachment,previewTheme:(_a=props.inputTheme)!==null&&_a!==void 0?_a:props.attachmentPreviewTheme,disableVideoPreview:props.disableVideoPreview,disableEmbeddedObjectPreview:props.disableEmbeddedObjectPreview},void 0)]},void 0);});var CreateComment=function CreateComment(_a){var className=_a.className,onPost=_a.onPost,autoFocus=_a.autoFocus,readOnly=_a.readOnly,initialContent=_a.content,allowAttachments=_a.allowAttachments,mentionSearchHandler=_a.mentionSearchHandler,useLargeDropTarget=_a.useLargeDropTarget,placeHolderStringResourceKey=_a.placeHolderStringResourceKey,placeHolderStringResourceValues=_a.placeHolderStringResourceValues,_b=_a.focusAfterPost,focusAfterPost=_b===void 0?true:_b,onAttachmentsChanged=_a.onAttachmentsChanged,_c=_a.attachments,attachments=_c===void 0?[]:_c,deletedAttachmentUrls=_a.deletedAttachmentUrls,onDeleteAttachment=_a.onDeleteAttachment,disableDragAndDrop=_a.disableDragAndDrop,allowKeywords=_a.allowKeywords,allowSaveWithoutContent=_a.allowSaveWithoutContent,saveOnEnter=_a.saveOnEnter,saveOnCtrlEnter=_a.saveOnCtrlEnter,keywordSettings=_a.keywordSettings;var availableKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.availableKeywords)||[];var defaultKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.defaultKeywords)||[];var mandatoryKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.mandatoryKeywords)||[];var _d=React$d.useState(false),isSaving=_d[0],setIsSaving=_d[1];var _e=React$d.useState(initialContent||''),content=_e[0],setContent=_e[1];var _f=React$d.useState(null),selectedKeywords=_f[0],setSelectedKeywords=_f[1];var _g=React$d.useState(false),showKeywordsPicker=_g[0],setShowKeywordsPicker=_g[1];var inputRef=React$d.useRef(null);var formatMessage=useIntl().formatMessage;var isReadOnly=readOnly||isSaving;var ignoreRef=React$d.useRef(false);React$d.useEffect(function(){return function(){ignoreRef.current=true;};},[]);var initialSelectedKeywords=defaultKeywords.concat(mandatoryKeywords);var initialSelectedKeywordIds=initialSelectedKeywords.map(function(k){return k.id;}).join('-');React$d.useEffect(function(){setSelectedKeywords(initialSelectedKeywords);if(initialSelectedKeywords.length===0){setShowKeywordsPicker(false);}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125928
|
+
$$3({global:true,forced:parseInt!=parseIntImplementation},{parseInt:parseIntImplementation});function getMaxImageWidth(defaultMaxWidth){return defaultMaxWidth!==null&&defaultMaxWidth!==void 0?defaultMaxWidth:maxContentWidth;}function getImageWidth(image){var width=typeof image==='string'?parseInt(image):image===null||image===void 0?void 0:image.width;if(!width||isNaN(width)){return getMaxImageWidth();}return Math.min(width,getMaxImageWidth());}function getNewsCardIcon(item,intl){if(hasFlag(item.knownState,KnownNewsState.Alert)){return {name:'Warning',backgroundColor:'red',tooltipText:intl.formatMessage({id:'NewsArticle.alert'})};}if(hasFlag(item.knownState,KnownNewsState.Unconfirmed)){return {name:'Completed',backgroundColor:'green',tooltipText:intl.formatMessage({id:'NewsArticle.confirmationRequired'})};}return null;}var ItemTileLayoutMode;(function(ItemTileLayoutMode){ItemTileLayoutMode["BannerTopMode"]="bannerTop";ItemTileLayoutMode["BannerLeftMode"]="bannerLeft";})(ItemTileLayoutMode||(ItemTileLayoutMode={}));var NewsItemTile=function NewsItemTile(_a){var item=_a.item,baseRoute=_a.baseRoute,layoutMode=_a.layoutMode,filterBaseUrl=_a.filterBaseUrl,dateLabelResourceKey=_a.dateLabelResourceKey,buttons=_a.buttons,openTargetInNewWindow=_a.openTargetInNewWindow,onClick=_a.onClick,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUserContext().user;var token=useCurrentToken();var intl=useIntl();var features=useFeatures();var title=getTitle(item,user,intl.formatMessage);var headline=getHeadline(item,user);var language=NewsService.getLanguageForPublishableItem(item,user);var handleExternalContentClick=useExternalContentClickHandler();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var targetRoute=NewsService.getNewsRoute(item.useExternalContent?buildPath('/redirect/news'):baseRoute,item.id,title);var hasKeywords=Object.keys(item.keywords).length>0;var content=item.contents[language];var hasIntro=content.intro&&content.intro.length>0;var icon=getNewsCardIcon(item,intl);var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);return jsxRuntime.jsxs(Host$F,__assign({hasBanner:item.bannerInfo!=null,layoutMode:layoutMode,styleDefinition:styleDefinition,"data-item-id":item.id,className:className},{children:[!readOnly&&jsxRuntime.jsx(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.News,baseRoute:baseRoute,onClick:onClick,title:title,openTargetInNewWindow:openTargetInNewWindow,isExternalContent:item.useExternalContent},void 0),jsxRuntime.jsx(Banner$1$1,{item:item,token:item.fileAccessToken||token,resourceType:ItemResourceTypes.News,layoutMode:layoutMode,bannerDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerDefaultWidth,showPlaceholderIfNoBannerInfo:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showPlaceholderIfNoBannerInfo},void 0),jsxRuntime.jsxs(Content$5,{children:[jsxRuntime.jsxs(MetaInfoAndIcon,{children:[jsxRuntime.jsxs(MetaInfo$2,__assign({showChannelsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:[dateLabelResourceKey&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(FormattedMessage$1,{id:dateLabelResourceKey},void 0),":\u00A0"]},void 0),jsxRuntime.jsx(DateTime,{value:item.publishingDate},void 0),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:["\u2002",jsxRuntime.jsx(ClickableChannelTitles,{channels:item.channels.map(function(c){return c.name;}),language:getPreferredContentLanguage(user),channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0)]}),void 0),icon&&jsxRuntime.jsx(NewsCardIcon$1,{children:jsxRuntime.jsx(Tooltip,__assign({text:icon.tooltipText},{children:jsxRuntime.jsx(StyledIcon$4$1,{iconName:icon.name,backgroundColor:icon.backgroundColor},void 0)}),item.id+"-"+icon.name)},void 0)]},void 0),features.contentHeadline&&!!headline&&jsxRuntime.jsx(Headline$2,{children:headline},void 0),jsxRuntime.jsx(StyledTitle$2,{title:title,targetRoute:targetRoute,readOnly:readOnly,openTargetInNewWindow:openTargetInNewWindow,onClick:function(e){if(onClick){onClick(e,true);}else {handleExternalContentClick(e,item,ItemResourceTypes.News);}},isExternalContent:item.useExternalContent,resourceKey:"ExternalLinkButton.news.navigateTo",resourceValues:url},void 0),hasIntro&&jsxRuntime.jsx(Intro$1$1,{children:content.intro},void 0),hasKeywords&&jsxRuntime.jsx(StyledKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0),buttons&&jsxRuntime.jsx(Footer,__assign({alignItemsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:buttons}),void 0)]},void 0)]}),void 0);};var Host$F=_styled__default["default"].article.withConfig({displayName:"NewsItemTile__Host",componentId:"sc-15drgb8-0"})(templateObject_4$v||(templateObject_4$v=__makeTemplateObject(["\n ","\n ",";\n\n ","\n\n ","\n\n ","\n\n position: relative;\n"],["\n ","\n ",";\n\n ","\n\n ","\n\n ","\n\n position: relative;\n"])),function(p){var _a;return HostBaseStyle((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.backgroundColor);},function(p){var _a;return !((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.noShadow)&&CardBorderInline(2,2);},function(p){return p.hasBanner&&_styled.css(templateObject_1$1M||(templateObject_1$1M=__makeTemplateObject(["\n min-height: 138px;\n "],["\n min-height: 138px;\n "])));},function(p){return (!p.layoutMode||p.layoutMode===ItemTileLayoutMode.BannerLeftMode)&&_styled.css(templateObject_2$12||(templateObject_2$12=__makeTemplateObject(["\n @media (max-width: ","px) {\n flex-direction: column;\n }\n "],["\n @media (max-width: ","px) {\n flex-direction: column;\n }\n "])),maxScreenSize.medium);},function(p){return p.layoutMode===ItemTileLayoutMode.BannerTopMode&&_styled.css(templateObject_3$J||(templateObject_3$J=__makeTemplateObject(["\n flex-direction: column;\n "],["\n flex-direction: column;\n "])));});var StyledTitle$2=_styled__default["default"](Title$6).withConfig({displayName:"NewsItemTile__StyledTitle",componentId:"sc-15drgb8-1"})(templateObject_5$s||(templateObject_5$s=__makeTemplateObject(["\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"],["\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"])),fontSizeMedium,fontSizeSmall);var Content$5=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__Content",componentId:"sc-15drgb8-2"})(templateObject_6$i||(templateObject_6$i=__makeTemplateObject(["\n ","\n padding: ","px;\n"],["\n ","\n padding: ","px;\n"])),ContentStyle,spacingM);var Headline$2=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__Headline",componentId:"sc-15drgb8-3"})(templateObject_7$d||(templateObject_7$d=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n margin-bottom: ","px;\n"],["\n font-size: ","px;\n font-weight: bold;\n margin-bottom: ","px;\n"])),fontSizeSmall,spacingS);var Intro$1$1=_styled__default["default"].p.withConfig({displayName:"NewsItemTile__Intro",componentId:"sc-15drgb8-4"})(templateObject_8$c||(templateObject_8$c=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n"])),fontSizeNormal);var MetaInfoAndIcon=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__MetaInfoAndIcon",componentId:"sc-15drgb8-5"})(templateObject_9$a||(templateObject_9$a=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var MetaInfo$2=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__MetaInfo",componentId:"sc-15drgb8-6"})(templateObject_11$5||(templateObject_11$5=__makeTemplateObject(["\n ","\n color: ",";\n margin-bottom: ","px;\n\n ","\n"],["\n ","\n color: ",";\n margin-bottom: ","px;\n\n ","\n"])),MetaInfoStyle(),function(p){return p.theme.palette.neutralTertiary;},spacingS,function(p){return p.showChannelsToTheRight&&_styled.css(templateObject_10$9||(templateObject_10$9=__makeTemplateObject(["\n width: 100%;\n\n time {\n margin-right: auto;\n }\n "],["\n width: 100%;\n\n time {\n margin-right: auto;\n }\n "])));});var NewsCardIcon$1=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__NewsCardIcon",componentId:"sc-15drgb8-7"})(templateObject_12$4||(templateObject_12$4=__makeTemplateObject(["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"],["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"])));var StyledIcon$4$1=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"NewsItemTile__StyledIcon",componentId:"sc-15drgb8-8"})(templateObject_13$3||(templateObject_13$3=__makeTemplateObject(["\n font-size: ","px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ","px;\n cursor: pointer;\n\n background-color: ",";\n color: ",";\n"],["\n font-size: ","px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ","px;\n cursor: pointer;\n\n background-color: ",";\n color: ",";\n"])),fontSizeSmaller,spacingXs,function(p){return p.backgroundColor;},function(p){return p.theme.palette.white;});var StyledKeywords=_styled__default["default"](FlatKeywords).withConfig({displayName:"NewsItemTile__StyledKeywords",componentId:"sc-15drgb8-9"})(templateObject_14$3||(templateObject_14$3=__makeTemplateObject(["\n margin-top: ","px;\n font-size: ","px;\n\n && a {\n &,\n :link,\n :visited {\n color: ",";\n }\n }\n"],["\n margin-top: ","px;\n font-size: ","px;\n\n && a {\n &,\n :link,\n :visited {\n color: ",";\n }\n }\n"])),spacingS,fontSizeSmall,function(p){return p.theme.palette.neutralTertiary;});var Footer=_styled__default["default"].footer.withConfig({displayName:"NewsItemTile__Footer",componentId:"sc-15drgb8-10"})(templateObject_16$3||(templateObject_16$3=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n margin-right: ","px;\n\n i {\n font-size: 22px;\n }\n }\n"],["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n margin-right: ","px;\n\n i {\n font-size: 22px;\n }\n }\n"])),spacingS,function(p){return p.alignItemsToTheRight&&_styled.css(templateObject_15$3||(templateObject_15$3=__makeTemplateObject(["\n justify-content: flex-end;\n "],["\n justify-content: flex-end;\n "])));},spacingS+5);var Banner$1$1=function Banner(_a){var item=_a.item,token=_a.token,resourceType=_a.resourceType,layoutMode=_a.layoutMode,bannerDefaultWidth=_a.bannerDefaultWidth,showPlaceholderIfNoBannerInfo=_a.showPlaceholderIfNoBannerInfo;var bannerInfo=item.bannerInfo;if(!bannerInfo&&!showPlaceholderIfNoBannerInfo){return null;}var banner=getBanner();return jsxRuntime.jsx("div",{children:banner},void 0);function getBanner(){if(layoutMode===ItemTileLayoutMode.BannerTopMode){return jsxRuntime.jsx(TopBannerWrapper,__assign({showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsxRuntime.jsx(TopBannerInner,{children:jsxRuntime.jsx(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:getMaxImageWidth(),token:item.fileAccessToken||token,resourceType:resourceType},void 0)},void 0)}),void 0);}return jsxRuntime.jsx(LeftBannerWrapper,__assign({defaultWidth:bannerDefaultWidth!==null&&bannerDefaultWidth!==void 0?bannerDefaultWidth:150,showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsxRuntime.jsx(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:getMaxImageWidth(450),token:item.fileAccessToken||token,resourceType:resourceType},void 0)}),void 0);}};var TopBannerWrapper=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__TopBannerWrapper",componentId:"sc-15drgb8-11"})(templateObject_18$1||(templateObject_18$1=__makeTemplateObject(["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"],["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"])),bannerAspectRatio,function(p){return p.showPlaceholder&&_styled.css(templateObject_17$2||(templateObject_17$2=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.accent);});var TopBannerInner=_styled__default["default"].div.withConfig({displayName:"NewsItemTile__TopBannerInner",componentId:"sc-15drgb8-12"})(templateObject_19$1||(templateObject_19$1=__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));var templateObject_1$1M,templateObject_2$12,templateObject_3$J,templateObject_4$v,templateObject_5$s,templateObject_6$i,templateObject_7$d,templateObject_8$c,templateObject_9$a,templateObject_10$9,templateObject_11$5,templateObject_12$4,templateObject_13$3,templateObject_14$3,templateObject_15$3,templateObject_16$3,templateObject_17$2,templateObject_18$1,templateObject_19$1;var DocumentDownloadButton=function DocumentDownloadButton(_a){var _b;var page=_a.page,basePath=_a.basePath,onClick=_a.onClick,className=_a.className;var formatMessage=useIntl().formatMessage;var currentUser=useCurrentUser();var createDocumentClickHandler=usePagesClickHandler().createDocumentClickHandler;if(page.pageType!==PageType.Document){return null;}var _c=getContentForPage(page,currentUser),content=_c.content,language=_c.language;var fileInfo=content===null||content===void 0?void 0:content.fileInfo;var title=content===null||content===void 0?void 0:content.title;if(!fileInfo||!language){return null;}return jsxRuntime.jsx(StyledTooltip$1,__assign({resourceKey:'Pages.documents.downloadButton.tooltip',values:{fileName:title||fileInfo.fileName},className:className},{children:jsxRuntime.jsx(IconButton,{iconProps:{iconName:'Download'},onClick:createDocumentClickHandler(page.id,fileInfo.fileId,language,fileInfo.shouldOpenInBrowser,(_b=page)===null||_b===void 0?void 0:_b.fileAccessToken,basePath,onClick),ariaLabel:formatMessage({id:'Pages.documents.downloadButton.tooltip'},{fileName:title||fileInfo.fileName})},void 0)}),void 0);};var StyledTooltip$1=_styled__default["default"](Tooltip).withConfig({displayName:"DocumentDownloadButton__StyledTooltip",componentId:"sc-1lgs2rp-0"})(templateObject_1$1L||(templateObject_1$1L=__makeTemplateObject(["\n display: inline-flex;\n\n > button {\n border: 0;\n padding: 0;\n height: 28px; // this is needed for the focus indicator\n\n i {\n color: ",";\n }\n }\n"],["\n display: inline-flex;\n\n > button {\n border: 0;\n padding: 0;\n height: 28px; // this is needed for the focus indicator\n\n i {\n color: ",";\n }\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1L;var EmbeddedObjectTile=function EmbeddedObjectTile(_a){var _b;var id=_a.id,type=_a.type,readOnly=_a.readOnly,previewTheme=_a.previewTheme,buttons=_a.buttons,groupIds=_a.groupIds,className=_a.className;var getPost=usePostsApi().getPost;var getNews=useNewsApi().get;var loadPage=usePagesApi().loadPage;var getEvent=useEventsApi().getEvent;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _c=usePromise$2(fetchItem),item=_c[0],isLoading=_c[1],error=_c[2];var useDarkTheme=previewTheme==='dark';var palette=React$d.useContext(ThemeContext$1).theme.palette;var user=useCurrentUser();var backgroundColor=useDarkTheme?palette.neutralLight:palette.white;if(isLoading){return jsxRuntime.jsx(SpinnerHost,{children:jsxRuntime.jsx(StyledSpinner$2,{size:officeUiFabricReact.SpinnerSize.large},void 0)},void 0);}if(((_b=error===null||error===void 0?void 0:error.response)===null||_b===void 0?void 0:_b.statusCode)===403){return jsxRuntime.jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-access-denied":true},{children:[buttons,jsxRuntime.jsx(EmbeddedObjectWarningTile,{iconName:"LockSolid",iconLabel:"Generic.noAccess",messageResourceKey:"Generic.noAccessReason"},void 0)]}),void 0);}if(error||!item){return jsxRuntime.jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-not-found":true},{children:[buttons,jsxRuntime.jsx(EmbeddedObjectWarningTile,{iconName:"AlertSolid",iconLabel:"Generic.itemNotFound",messageResourceKey:"Generic.deletedItemReason"},void 0)]}),void 0);}var itemGroupIds=getItemGroupIds();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-embedded-object-id":id},{children:[buttons,renderEmbeddedObjectTile()]}),void 0),groupIds&&groupIds.every(function(gid){return !itemGroupIds.includes(gid);})&&jsxRuntime.jsx(DifferentGroupWarning,__assign({"data-warning-different-group":true},{children:jsxRuntime.jsx(EmbeddedObjectWarningTile,{messageResourceKey:"Generic.differentGroupWarning"},void 0)}),void 0)]},void 0);function getItemGroupIds(){var _a,_b;var groupIds=(_a=item)===null||_a===void 0?void 0:_a.groupIds;if(groupIds){return groupIds;}var groupId=(_b=item)===null||_b===void 0?void 0:_b.groupId;return groupId?[groupId]:null;}function fetchItem(){return __awaiter(this,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:_a=type;switch(_a){case AttachmentType.Post:return [3/*break*/,1];case AttachmentType.News:return [3/*break*/,3];case AttachmentType.Page:return [3/*break*/,5];case AttachmentType.Event:return [3/*break*/,7];}return [3/*break*/,9];case 1:return [4/*yield*/,getPost(id)];case 2:return [2/*return*/,_b.sent()];case 3:return [4/*yield*/,getNews(id).toPromise()];case 4:return [2/*return*/,_b.sent()];case 5:return [4/*yield*/,loadPage(id)];case 6:return [2/*return*/,_b.sent()];case 7:return [4/*yield*/,getEvent(id)];case 8:return [2/*return*/,_b.sent()];case 9:throw Error('Invalid type');}});});}function renderEmbeddedObjectTile(){var _a;if(type===AttachmentType.Post){return jsxRuntime.jsx(PostItemTile,{post:item,backgroundColor:backgroundColor,readOnly:readOnly},void 0);}if(type===AttachmentType.News){var newsItem=item;return jsxRuntime.jsx(NewsItemTile,{item:newsItem,baseRoute:buildPath('news'),styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white},readOnly:readOnly},void 0);}if(type===AttachmentType.Page){var pageItem=item;return jsxRuntime.jsx(StyledPageItemTile$1,{item:pageItem,baseRoute:buildPath('pages'),styleDefinition:{backgroundColor:backgroundColor,bannerDefaultWidth:150,bannerFontSize:60},readOnly:readOnly,isBannerClickable:((_a=pageItem.bannerInfo)===null||_a===void 0?void 0:_a.type)==='video',additionalMetadata:jsxRuntime.jsx(StyledDocumentDownloadButton$3,{page:item,marginRight:readOnly?spacingM:0},void 0),showBreadcrumb:true,showIntro:true},void 0);}var language=NewsService.getLanguageForPublishableItem(item,user);return jsxRuntime.jsx(EventCard,{item:item,language:language,styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white,bannerHostWidth:150},readOnly:readOnly},void 0);}};var Host$E=_styled__default["default"].div.withConfig({displayName:"EmbeddedObjectTile__Host",componentId:"sc-yfh5nh-0"})(templateObject_3$I||(templateObject_3$I=__makeTemplateObject(["\n width: 100%;\n ","\n"],["\n width: 100%;\n ","\n"])),function(p){return p.backgroundColor?_styled.css(templateObject_1$1K||(templateObject_1$1K=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.backgroundColor):_styled.css(templateObject_2$11||(templateObject_2$11=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),function(p){return p.theme.palette.white;});});var DifferentGroupWarning=_styled__default["default"].div.withConfig({displayName:"EmbeddedObjectTile__DifferentGroupWarning",componentId:"sc-yfh5nh-1"})(templateObject_4$u||(templateObject_4$u=__makeTemplateObject(["\n background-color: ",";\n color: ",";\n font-size: ","px;\n"],["\n background-color: ",";\n color: ",";\n font-size: ","px;\n"])),function(p){return p.theme.semanticColors.errorBackground;},function(p){return p.theme.palette.red;},fontSizeSmall);var EmbeddedObjectWarningTile=function EmbeddedObjectWarningTile(_a){var messageResourceKey=_a.messageResourceKey,iconName=_a.iconName,iconLabel=_a.iconLabel;return jsxRuntime.jsxs(WarningHost,{children:[(iconName||iconLabel)&&jsxRuntime.jsxs(Title$5,{children:[iconName&&jsxRuntime.jsx(StyleIcon,{iconName:iconName},void 0),iconLabel&&jsxRuntime.jsx(FormattedMessageWithStyle,{id:iconLabel},void 0)]},void 0),jsxRuntime.jsx(FormattedMessageWithStyle,{id:messageResourceKey},void 0)]},void 0);};var WarningHost=_styled__default["default"].div.withConfig({displayName:"EmbeddedObjectTile__WarningHost",componentId:"sc-yfh5nh-2"})(templateObject_5$r||(templateObject_5$r=__makeTemplateObject(["\n padding: ","px;\n"],["\n padding: ","px;\n"])),spacingM);var Title$5=_styled__default["default"].div.withConfig({displayName:"EmbeddedObjectTile__Title",componentId:"sc-yfh5nh-3"})(templateObject_6$h||(templateObject_6$h=__makeTemplateObject(["\n display: flex;\n align-items: center;\n font-weight: bold;\n font-size: ","px;\n margin-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n font-weight: bold;\n font-size: ","px;\n margin-bottom: ","px;\n"])),fontSizeMedium,spacingS);var SpinnerHost=_styled__default["default"].div.withConfig({displayName:"EmbeddedObjectTile__SpinnerHost",componentId:"sc-yfh5nh-4"})(templateObject_7$c||(templateObject_7$c=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ","px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ","px;\n"])),spacingL);var StyledSpinner$2=_styled__default["default"](Spinner).withConfig({displayName:"EmbeddedObjectTile__StyledSpinner",componentId:"sc-yfh5nh-5"})(templateObject_8$b||(templateObject_8$b=__makeTemplateObject(["\n margin-top: 0;\n margin-bottom: ","px;\n"],["\n margin-top: 0;\n margin-bottom: ","px;\n"])),spacingL);var StyleIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"EmbeddedObjectTile__StyleIcon",componentId:"sc-yfh5nh-6"})(templateObject_9$9||(templateObject_9$9=__makeTemplateObject(["\n padding-right: ","px;\n"],["\n padding-right: ","px;\n"])),spacingS);var StyledPageItemTile$1=_styled__default["default"](PageItemTile).withConfig({displayName:"EmbeddedObjectTile__StyledPageItemTile",componentId:"sc-yfh5nh-7"})(templateObject_11$4||(templateObject_11$4=__makeTemplateObject(["\n ","\n\n @media (max-width: ","px) {\n > div {\n flex-direction: column;\n }\n\n [data-page-tile-content] {\n max-width: 100%;\n }\n }\n"],["\n ","\n\n @media (max-width: ","px) {\n > div {\n flex-direction: column;\n }\n\n [data-page-tile-content] {\n max-width: 100%;\n }\n }\n"])),function(p){return p.isBannerClickable&&_styled.css(templateObject_10$8||(templateObject_10$8=__makeTemplateObject(["\n [data-page-tile-content] {\n position: relative;\n }\n "],["\n [data-page-tile-content] {\n position: relative;\n }\n "])));},maxScreenSize.medium);var StyledDocumentDownloadButton$3=_styled__default["default"](DocumentDownloadButton).withConfig({displayName:"EmbeddedObjectTile__StyledDocumentDownloadButton",componentId:"sc-yfh5nh-8"})(templateObject_12$3||(templateObject_12$3=__makeTemplateObject(["\n margin-left: auto;\n z-index: 1;\n\n > button i {\n margin: 0;\n color: ",";\n }\n\n margin-right: ","px;\n\n @media (max-width: ","px) {\n margin-right: 0;\n }\n"],["\n margin-left: auto;\n z-index: 1;\n\n > button i {\n margin: 0;\n color: ",";\n }\n\n margin-right: ","px;\n\n @media (max-width: ","px) {\n margin-right: 0;\n }\n"])),function(p){return p.theme.textColors.default;},function(p){return p.marginRight;},maxScreenSize.medium);var templateObject_1$1K,templateObject_2$11,templateObject_3$I,templateObject_4$u,templateObject_5$r,templateObject_6$h,templateObject_7$c,templateObject_8$b,templateObject_9$9,templateObject_10$8,templateObject_11$4,templateObject_12$3;var EmbeddedObjectList=function EmbeddedObjectList(_a){var attachments=_a.attachments,className=_a.className,onDeleteClick=_a.onDeleteClick,previewTheme=_a.previewTheme;var formatMessage=useIntl().formatMessage;var embeddedObjects=attachments.filter(function(f){return f.type===AttachmentType.Post||f.type===AttachmentType.News||f.type===AttachmentType.Page||f.type===AttachmentType.Event;});if(embeddedObjects.length===0){return null;}if(onDeleteClick){return jsxRuntime.jsx(Host$D,__assign({className:className,"data-embedded-object-attachment-list":true},{children:embeddedObjects.map(function(o){return jsxRuntime.jsx(AttachmentHost,__assign({domIdentifier:"embedded-object",deleteButton:jsxRuntime.jsx(DeleteAttachmentButton,{"data-remove-attachment-button":o.id,iconProps:{iconName:'ChromeClose'},onClick:function(){onDeleteClick(o);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsxRuntime.jsx(EmbeddedObjectTile,{id:o.id,type:o.type,previewTheme:previewTheme,readOnly:true},o.id)}),o.id);})}),void 0);}return jsxRuntime.jsx(PreviewHost,__assign({className:className,domIdentifier:"embedded-object-preview-"+embeddedObjects[0].id},{children:jsxRuntime.jsx(EmbeddedObjectTile,{id:embeddedObjects[0].id,type:embeddedObjects[0].type,previewTheme:previewTheme},void 0)}),void 0);};var Host$D=_styled__default["default"].div.withConfig({displayName:"EmbeddedObjectList__Host",componentId:"sc-axja9n-0"})(templateObject_1$1J||(templateObject_1$1J=__makeTemplateObject(["\n display: inline-flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n\n > div {\n margin-top: ","px;\n }\n"],["\n display: inline-flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n\n > div {\n margin-top: ","px;\n }\n"])),spacingM,spacingM);var PreviewHost=_styled__default["default"](AttachmentHost).withConfig({displayName:"EmbeddedObjectList__PreviewHost",componentId:"sc-axja9n-1"})(templateObject_2$10||(templateObject_2$10=__makeTemplateObject(["\n margin: ","px 0 0 0;\n"],["\n margin: ","px 0 0 0;\n"])),spacingM);var templateObject_1$1J,templateObject_2$10;var ImageAttachmentList=function ImageAttachmentList(_a){var images=_a.images,onDeleteClick=_a.onDeleteClick,disabled=_a.disabled,imageBackgroundColor=_a.imageBackgroundColor,className=_a.className;if(!images||images.length===0){return null;}return jsxRuntime.jsx(List,__assign({className:className},{children:images.map(function(i){return jsxRuntime.jsx(ListItem$1,{children:jsxRuntime.jsx(ImageAttachmentPreview,{attachment:i,disabled:disabled,onDeleteClick:function(){return onDeleteClick(i);},backgroundColor:imageBackgroundColor},void 0)},i.id);})}),void 0);};var List=_styled__default["default"].ul.withConfig({displayName:"ImageAttachmentList__List",componentId:"sc-7el1kj-0"})(templateObject_1$1I||(templateObject_1$1I=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n"],["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n"])));var ListItem$1=_styled__default["default"].li.withConfig({displayName:"ImageAttachmentList__ListItem",componentId:"sc-7el1kj-1"})(templateObject_2$$||(templateObject_2$$=__makeTemplateObject(["\n width: calc(100% - ","px);\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n }\n"],["\n width: calc(100% - ","px);\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n }\n"])),spacingS-5,minScreenSize.medium,spacingS-5);var ImageAttachmentPreview=function ImageAttachmentPreview(_a){var attachment=_a.attachment,onDeleteClick=_a.onDeleteClick,disabled=_a.disabled,backgroundColor=_a.backgroundColor;var formatMessage=useIntl().formatMessage;return jsxRuntime.jsxs(AttachmentHost,__assign({domIdentifier:"image",backgroundColor:backgroundColor,deleteButton:!disabled&&jsxRuntime.jsx(StyledDeleteAttachmentButton,{iconProps:{iconName:'Delete'},onClick:onDeleteClick,disabled:attachment.isUploadInProgress,ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:[attachment.hasError&&jsxRuntime.jsx(AttachmentOverlay,{children:jsxRuntime.jsx("div",{children:jsxRuntime.jsx(WarningIcon,{iconName:"Warning"},void 0)},void 0)},void 0),attachment.isUploadInProgress&&jsxRuntime.jsx(AttachmentOverlay,{children:jsxRuntime.jsx(CenteredSpinner,{size:officeUiFabricReact.SpinnerSize.large},void 0)},void 0),jsxRuntime.jsx(officeUiFabricReact.Image,{src:attachment.previewUrl,height:225,imageFit:officeUiFabricReact.ImageFit.centerCover,title:attachment.filename},void 0)]}),void 0);};var AttachmentOverlay=_styled__default["default"].div.withConfig({displayName:"ImageAttachmentList__AttachmentOverlay",componentId:"sc-7el1kj-2"})(templateObject_3$H||(templateObject_3$H=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 2;\n\n background-color: rgba(146, 146, 146, 0.33);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: ","px;\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 2;\n\n background-color: rgba(146, 146, 146, 0.33);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: ","px;\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n"])),attachmentRoundedCornerSize);var CenteredSpinner=_styled__default["default"](Spinner).withConfig({displayName:"ImageAttachmentList__CenteredSpinner",componentId:"sc-7el1kj-3"})(templateObject_4$t||(templateObject_4$t=__makeTemplateObject(["\n margin-top: auto;\n height: 100%;\n"],["\n margin-top: auto;\n height: 100%;\n"])));var WarningIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"ImageAttachmentList__WarningIcon",componentId:"sc-7el1kj-4"})(templateObject_5$q||(templateObject_5$q=__makeTemplateObject(["\n font-size: 100px;\n color: ",";\n"],["\n font-size: 100px;\n color: ",";\n"])),function(p){return p.theme.palette.redDark;});var StyledDeleteAttachmentButton=_styled__default["default"](DeleteAttachmentButton).withConfig({displayName:"ImageAttachmentList__StyledDeleteAttachmentButton",componentId:"sc-7el1kj-5"})(templateObject_6$g||(templateObject_6$g=__makeTemplateObject(["\n && {\n i {\n font-size: ","px;\n margin: 0;\n }\n }\n"],["\n && {\n i {\n font-size: ","px;\n margin: 0;\n }\n }\n"])),fontSizeMedium);var templateObject_1$1I,templateObject_2$$,templateObject_3$H,templateObject_4$t,templateObject_5$q,templateObject_6$g;var AttachmentList=function AttachmentList(_a){var className=_a.className,files=_a.files,onDeleteAttachmentClick=_a.onDeleteAttachmentClick,disabled=_a.disabled,previewTheme=_a.previewTheme,disableVideoPreview=_a.disableVideoPreview,disableEmbeddedObjectPreview=_a.disableEmbeddedObjectPreview;var attachedImages=files.filter(function(f){return f.type===AttachmentType.Image;});var attachedFiles=files.filter(function(f){return f.type===AttachmentType.File;});var palette=React$d.useContext(ThemeContext$1).theme.palette;return jsxRuntime.jsxs(Host$C,__assign({className:className,hasItems:files.length>0,"data-attachment-list":true},{children:[jsxRuntime.jsx(GifEditList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsxRuntime.jsx(ImageAttachmentList,{images:attachedImages,disabled:disabled,onDeleteClick:function(i){return onDeleteAttachmentClick(i);},imageBackgroundColor:previewTheme==='dark'?palette.neutralLight:palette.white},void 0),!disableVideoPreview&&jsxRuntime.jsx(VideoList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);}},void 0),!disableEmbeddedObjectPreview&&jsxRuntime.jsx(EmbeddedObjectList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsxRuntime.jsx(FilesList$1,{files:attachedFiles,onDeleteClick:function(f){return onDeleteAttachmentClick(f);},disabled:disabled},void 0),jsxRuntime.jsx("div",{style:{clear:'both'}},void 0)]}),void 0);};var FilesList$1=_styled__default["default"](FileAttachmentList).withConfig({displayName:"AttachmentList__FilesList",componentId:"sc-1s0cqp9-0"})(templateObject_1$1H||(templateObject_1$1H=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var Host$C=_styled__default["default"].div.withConfig({displayName:"AttachmentList__Host",componentId:"sc-1s0cqp9-1"})(templateObject_2$_||(templateObject_2$_=__makeTemplateObject(["\n margin-top: ",";\n"],["\n margin-top: ",";\n"])),function(_a){var hasItems=_a.hasItems;return hasItems?'8px':'0';});var templateObject_1$1H,templateObject_2$_;var RichCommentInputWithAttachmentList=/*#__PURE__*/React$d.forwardRef(function(props,ref){var _a;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(RichCommentInput,__assign({},props,{ref:ref}),void 0),jsxRuntime.jsx(AttachmentList,{files:props.attachments,disabled:props.disabled,onDeleteAttachmentClick:props.onDeleteAttachment,previewTheme:(_a=props.inputTheme)!==null&&_a!==void 0?_a:props.attachmentPreviewTheme,disableVideoPreview:props.disableVideoPreview,disableEmbeddedObjectPreview:props.disableEmbeddedObjectPreview},void 0)]},void 0);});var CreateComment=function CreateComment(_a){var className=_a.className,onPost=_a.onPost,autoFocus=_a.autoFocus,readOnly=_a.readOnly,initialContent=_a.content,allowAttachments=_a.allowAttachments,mentionSearchHandler=_a.mentionSearchHandler,useLargeDropTarget=_a.useLargeDropTarget,placeHolderStringResourceKey=_a.placeHolderStringResourceKey,placeHolderStringResourceValues=_a.placeHolderStringResourceValues,_b=_a.focusAfterPost,focusAfterPost=_b===void 0?true:_b,onAttachmentsChanged=_a.onAttachmentsChanged,_c=_a.attachments,attachments=_c===void 0?[]:_c,deletedAttachmentUrls=_a.deletedAttachmentUrls,onDeleteAttachment=_a.onDeleteAttachment,disableDragAndDrop=_a.disableDragAndDrop,allowKeywords=_a.allowKeywords,allowSaveWithoutContent=_a.allowSaveWithoutContent,saveOnEnter=_a.saveOnEnter,saveOnCtrlEnter=_a.saveOnCtrlEnter,keywordSettings=_a.keywordSettings;var availableKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.availableKeywords)||[];var defaultKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.defaultKeywords)||[];var mandatoryKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.mandatoryKeywords)||[];var _d=React$d.useState(false),isSaving=_d[0],setIsSaving=_d[1];var _e=React$d.useState(initialContent||''),content=_e[0],setContent=_e[1];var _f=React$d.useState(null),selectedKeywords=_f[0],setSelectedKeywords=_f[1];var _g=React$d.useState(false),showKeywordsPicker=_g[0],setShowKeywordsPicker=_g[1];var inputRef=React$d.useRef(null);var formatMessage=useIntl().formatMessage;var isReadOnly=readOnly||isSaving;var ignoreRef=React$d.useRef(false);React$d.useEffect(function(){return function(){ignoreRef.current=true;};},[]);var initialSelectedKeywords=defaultKeywords.concat(mandatoryKeywords);var initialSelectedKeywordIds=initialSelectedKeywords.map(function(k){return k.id;}).join('-');React$d.useEffect(function(){setSelectedKeywords(initialSelectedKeywords);if(initialSelectedKeywords.length===0){setShowKeywordsPicker(false);}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125921
125929
|
},[initialSelectedKeywordIds]);return jsxRuntime.jsx("div",__assign({className:className},{children:jsxRuntime.jsx(RichCommentInputWithAttachmentList,{defaultKeywords:getGroupedKeywords(selectedKeywords!==null&&selectedKeywords!==void 0?selectedKeywords:defaultKeywords),ref:inputRef,content:content,attachments:attachments,deletedAttachmentUrls:deletedAttachmentUrls,onAttachmentsChange:onAttachmentsChanged,onDeleteAttachment:onDeleteAttachment,onEnter:saveOnEnter&&handleSave,onCtrlEnter:saveOnCtrlEnter&&handleSave,onChange:function(value){return setContent(value);},onFocus:function(){if(initialSelectedKeywords.length>0){setShowKeywordsPicker(true);}},disabled:isReadOnly,autoFocus:autoFocus,mentionSearchHandler:mentionSearchHandler,allowAttachments:allowAttachments,allowKeywords:allowKeywords,availableKeywords:availableKeywords,mandatoryKeywords:mandatoryKeywords,onKeywordsChange:function(keywords){return setSelectedKeywords(keywords);},showKeywordsPicker:showKeywordsPicker,disableDragAndDrop:disableDragAndDrop,useLargeDropTarget:useLargeDropTarget,placeHolderStringResourceKey:placeHolderStringResourceKey,placeHolderStringResourceValues:placeHolderStringResourceValues,buttons:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[allowKeywords&&jsxRuntime.jsx(IconButton,{iconProps:{iconName:'Tag'},onClick:function(){setShowKeywordsPicker(!showKeywordsPicker);},disabled:isReadOnly,"data-button-type":"keywords",ariaLabel:formatMessage({id:'AriaLabel.keywordsButton'})},void 0),jsxRuntime.jsx(IconButton,{iconProps:{iconName:'Send'},disabled:isSaveDisabled(),onClick:handleSave,"data-button-type":"save",ariaLabel:formatMessage({id:'AriaLabel.sendButton'})},'saveButton'+isSaveDisabled())]},void 0)},void 0)}),void 0);function handleSave(){return __awaiter(this,void 0,void 0,function(){var groupedKeywords;return __generator(this,function(_a){switch(_a.label){case 0:if(isSaveDisabled()){return [2/*return*/];}setIsSaving(true);groupedKeywords=getGroupedKeywords(selectedKeywords);return [4/*yield*/,onPost({content:content.trim()},groupedKeywords)];case 1:_a.sent();setShowKeywordsPicker(false);setSelectedKeywords(defaultKeywords||[]);if(!ignoreRef.current){setIsSaving(false);setContent('');if(focusAfterPost){inputRef.current.focus();}}return [2/*return*/];}});});}function isSaveDisabled(){return isReadOnly||!canSaveInput(allowSaveWithoutContent,attachments,content);}};var gutter=2;_styled__default["default"].div.withConfig({displayName:"LegacyPostPhotoGallery__Gallery",componentId:"sc-ir1n2k-0"})(templateObject_1$1G||(templateObject_1$1G=__makeTemplateObject(["\n overflow: hidden;\n\n margin-left: -","px;\n margin-right: -","px;\n"],["\n overflow: hidden;\n\n margin-left: -","px;\n margin-right: -","px;\n"])),gutter,gutter);_styled__default["default"].a.withConfig({displayName:"LegacyPostPhotoGallery__ImageItem",componentId:"sc-ir1n2k-1"})(templateObject_2$Z||(templateObject_2$Z=__makeTemplateObject(["\n background-color: #eee;\n box-sizing: border-box;\n float: left;\n margin: ","px;\n overflow: hidden;\n position: relative;\n width: 100%;\n height: 200px;\n cursor: pointer;\n\n :hover {\n opacity: 0.9;\n }\n\n > * {\n height: 100%;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n height: 200px;\n }\n\n @media (min-width: ","px) {\n width: calc(25% - ","px);\n height: 150px;\n }\n"],["\n background-color: #eee;\n box-sizing: border-box;\n float: left;\n margin: ","px;\n overflow: hidden;\n position: relative;\n width: 100%;\n height: 200px;\n cursor: pointer;\n\n :hover {\n opacity: 0.9;\n }\n\n > * {\n height: 100%;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n height: 200px;\n }\n\n @media (min-width: ","px) {\n width: calc(25% - ","px);\n height: 150px;\n }\n"])),gutter,minScreenSize.small,gutter*2,minScreenSize.medium,gutter*2);var templateObject_1$1G,templateObject_2$Z;var ImagesAndFilesList=function ImagesAndFilesList(_a){var item=_a.item,basePath=_a.basePath,imagesGridBackgroundColor=_a.imagesGridBackgroundColor,className=_a.className;var user=useCurrentUser();var _b=useAttachmentsApi(),getImageUrl=_b.getImageUrl,getFileUrl=_b.getFileUrl;var subscriptionId=user.subscription.id;var files=item.attachments.filter(function(a){return a.type===AttachmentType.File;});var images=item.attachments.filter(function(a){return a.type===AttachmentType.Image;});var maxContentWidth=minScreenSize.medium-spacingX;var galleryDetails=React$d.useMemo(function(){var galleryImages=images.map(function(a){var _a;return {previewUrl:(_a=a.previewUrl)!==null&&_a!==void 0?_a:getImageUrl(basePath,subscriptionId,item,a.id,maxContentWidth),imageId:a.id,width:a.width,height:a.height};});return {galleryId:createId(),images:galleryImages};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125922
125930
|
},[item.attachments,item.fileAccessToken,item.attachmentContainerId]);if(images.length===0&&files.length===0){return null;}return jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx(PhotoGrid,{images:galleryDetails.images,imageUrlResolver:function(imageId,width,height){return getImageUrl(basePath,subscriptionId,item,imageId,width,height);},gridBackgroundColor:imagesGridBackgroundColor},void 0),jsxRuntime.jsx(FilesList,{files:files,getFileUrl:function(attachmentId,token){return getFileUrl(basePath,subscriptionId,item,attachmentId,token);},fileAccessToken:item.fileAccessToken},void 0)]}),void 0);};var FilesList=_styled__default["default"](FileAttachmentList).withConfig({displayName:"ImagesAndFilesList__FilesList",componentId:"sc-1wjy8l6-0"})(templateObject_1$1F||(templateObject_1$1F=__makeTemplateObject(["\n :not(:first-child) {\n margin-top: ","px;\n }\n"],["\n :not(:first-child) {\n margin-top: ","px;\n }\n"])),spacingM);var templateObject_1$1F;var EditComment=function EditComment(_a){var content=_a.content,files=_a.files,deletedFileUrls=_a.deletedFileUrls,onSave=_a.onSave,onCancel=_a.onCancel,className=_a.className,mentionSearchHandler=_a.mentionSearchHandler,allowAttachments=_a.allowAttachments,inputTheme=_a.inputTheme,onAttachmentAdded=_a.onAttachmentAdded,onDeleteAttachment=_a.onDeleteAttachment,allowKeywords=_a.allowKeywords,availableKeywords=_a.availableKeywords,mandatoryKeywords=_a.mandatoryKeywords,keywords=_a.keywords,allowSaveWithoutContent=_a.allowSaveWithoutContent,saveOnEnter=_a.saveOnEnter,saveOnCtrlEnter=_a.saveOnCtrlEnter;var formatMessage=useIntl().formatMessage;var _b=React$d.useState(content||''),newContent=_b[0],setContent=_b[1];var _c=React$d.useState(false),showKeywordsPicker=_c[0],setShowKeywordsPicker=_c[1];var _d=React$d.useState(getFlatKeywordList(keywords)||[]),selectedKeywords=_d[0],setSelectedKeywords=_d[1];var hasMandatoryKeywords=(mandatoryKeywords===null||mandatoryKeywords===void 0?void 0:mandatoryKeywords.length)>0;var automaticallyShowKeywordsPicker=allowKeywords&&(hasMandatoryKeywords||selectedKeywords.length!==0);return jsxRuntime.jsx(RichCommentInputWithAttachmentList,{className:className,content:newContent,attachments:files,deletedAttachmentUrls:deletedFileUrls,autoFocus:true,mentionSearchHandler:mentionSearchHandler,onChange:function(value){return setContent(value);},onEnter:saveOnEnter&&handleSave,onCtrlEnter:saveOnCtrlEnter&&handleSave,onAttachmentsChange:onAttachmentAdded,onDeleteAttachment:onDeleteAttachment,allowAttachments:allowAttachments,allowKeywords:allowKeywords,availableKeywords:availableKeywords,mandatoryKeywords:mandatoryKeywords,defaultKeywords:keywords,onKeywordsChange:function(keywords){return setSelectedKeywords(keywords);},showKeywordsPicker:showKeywordsPicker||automaticallyShowKeywordsPicker,inputTheme:inputTheme,buttons:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[allowKeywords&&jsxRuntime.jsx(IconButton,{iconProps:{iconName:'Tag'},onClick:function(){setShowKeywordsPicker(!showKeywordsPicker);},"data-button-type":"keywords","aria-label":formatMessage({id:'AriaLabel.keywordsButton'})},void 0),jsxRuntime.jsx(IconButton,{iconProps:{iconName:'CheckMark'},disabled:!canSaveInput(allowSaveWithoutContent,files,newContent),onClick:handleSave,"data-button":"save",ariaLabel:formatMessage({id:'AriaLabel.sendButton'})},void 0),jsxRuntime.jsx(IconButton,{iconProps:{iconName:'Cancel'},onClick:onCancel,"data-button":"cancel",ariaLabel:formatMessage({id:'AriaLabel.cancelButton'})},void 0)]},void 0)},void 0);function handleSave(){var groupedKeywords=getGroupedKeywords(selectedKeywords);onSave(newContent.trim(),groupedKeywords);setShowKeywordsPicker(false);}};function useAttachmentUploader(initialAttachments,containerId,basePath){var ignoreRef=React$d.useRef(false);var warningToastHandle=React$d.useRef();var _a=useAttachmentsApi(),uploadFile=_a.uploadFile,uploadImage=_a.uploadImage;var showToastWarning=useNotificationContext().showToastWarning;React$d.useEffect(function(){return function(){ignoreRef.current=true;};},[]);var user=useCurrentUser();var _b=React$d.useState(initialAttachments),attachments=_b[0],setAttachments=_b[1];var _c=React$d.useState([]),deletedAttachmentUrls=_c[0],setDeletedAttachmentUrls=_c[1];// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125923
125931
|
var handleAttachmentCallback=React$d.useCallback(handleAttachmentsAdded,[attachments,setAttachments,basePath,containerId]);return [attachments,handleAttachmentCallback,clearAttachments,deletedAttachmentUrls,deleteAttachment];function handleAttachmentsAdded(updatedAttachments){return __awaiter(this,void 0,void 0,function(){var newAttachments,_loop_1,_i,newAttachments_1,newAttachment;return __generator(this,function(_a){newAttachments=updatedAttachments.filter(function(a){return attachments.every(function(old){return old.id!==a.id;});});setAttachments(updatedAttachments.map(function(a){return __assign(__assign({},a),{isUploadInProgress:(a.type===AttachmentType.Image||a.type===AttachmentType.File)&&!!newAttachments.find(function(x){return x.id===a.id;})});}));_loop_1=function(newAttachment){(newAttachment.type===AttachmentType.Image||newAttachment.type===AttachmentType.File)&&uploadAttachment(basePath,newAttachment).then(function(response){if((response===null||response===void 0?void 0:response.status)!==200&&(response===null||response===void 0?void 0:response.status)!==204){throw new Error("Request failed with status "+(response===null||response===void 0?void 0:response.status));}})// todo: add proper error handling when uploading a attachment fails
|
|
@@ -125969,33 +125977,33 @@
|
|
|
125969
125977
|
// Delay the pollResult a bit so the users sees the animation
|
|
125970
125978
|
var delayedFetchPollResult=useDebouncedCallback(fetchPollResults,500)[0];if(isLoading){return null;}var actualQuestions=__spreadArray(__spreadArray([],questionDefinitions),(additionalQuestions===null||additionalQuestions===void 0?void 0:additionalQuestions.questions)||[]);var hasMissingAnswers=!!userAnswers.find(function(a){return a.choiceIds.length===0;});var hasMissingUnsavedAnswer=unsavedQuestionsIds.length>0||userAnswers.some(function(a){return !a.choiceIds.length;});showResult=(showResult||!hasMissingUnsavedAnswer)&&actualQuestions.length>0;return jsxRuntime.jsx(PollUserContext.Provider,__assign({value:{item:item,resourceType:resourceType,questions:actualQuestions,answers:userAnswers,addAnswer:handleAddAnswer,setAnswers:setUserAnswers,pollResult:pollResult,isLoadingPollResult:isLoadingPollResult,showResult:showResult,hasMissingAnswers:hasMissingAnswers,hasMissingUnsavedAnswer:hasMissingUnsavedAnswer,submitPoll:handleSubmitPoll,getQuestionResult:getQuestionResult,reset:reset,onBehalfOfUpn:onBehalfOfUpn,fetchPollResults:fetchPollResults}},{children:jsxRuntime.jsx(PollTranslationContextProvider,__assign({contents:item.contents,language:language,additionalTranslations:additionalQuestions===null||additionalQuestions===void 0?void 0:additionalQuestions.translations},{children:children}),void 0)}),void 0);function handleAddAnswer(questionId,selectedChoiceIds){setUnsavedQuestionsIds(function(a){return __spreadArray(__spreadArray([],a),[questionId]);});setUserAnswers(function(answers){return answers.map(function(a){return a.questionId===questionId?__assign(__assign({},a),{choiceIds:__spreadArray([],selectedChoiceIds)}):a;});});}function handleSubmitPoll(savePollAnswers){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);setUnsavedQuestionsIds([]);return [4/*yield*/,savePollAnswers()];case 1:_a.sent();delayedFetchPollResult();return [3/*break*/,3];case 2:_a.sent();showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}function reset(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){setUnsavedQuestionsIds([]);setUserAnswers(createUsersAnswersFromFeedback({records:[]}));fetchPollResults();return [2/*return*/];});});}function loadUserAnswers(){return __awaiter(this,void 0,void 0,function(){var feedback,error_2;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);return [4/*yield*/,getFeedback(resourceType,itemId,onBehalfOfUpn)];case 1:feedback=_a.sent();return [3/*break*/,3];case 2:error_2=_a.sent();// if we got a 404, the user doesn't exist, in this case we simply treat the feedback as it is not set yet
|
|
125971
125979
|
if((error_2===null||error_2===void 0?void 0:error_2.response.statusCode)!==404){throw error_2;}feedback={records:[]};return [3/*break*/,3];case 3:return [2/*return*/,createUsersAnswersFromFeedback(feedback)];}});});}function createUsersAnswersFromFeedback(feedback){var pollFeedback=feedback.records.find(function(r){return r.type==='poll';});var answers=pollFeedback?pollFeedback.answers:[];return questionDefinitions.map(function(q){return {questionId:q.questionId,choiceIds:answers.filter(function(a){return a.questionId===q.questionId;}).map(function(a){return a.choiceIds;})[0]||[]};}).concat(getAdditionalUserAnswers?getAdditionalUserAnswers(feedback.records)||[]:[]);}function getQuestionResult(questionId){var userSelectedChoices=userAnswers.filter(function(a){return a.questionId===questionId;}).map(function(a){return a.choiceIds;})[0]||[];return {showResults:showResult||unsavedQuestionsIds.every(function(id){return id!==questionId;})&&userSelectedChoices.length>0,userSelectedChoices:userSelectedChoices,totalFeedbackCount:pollResult.totalFeedbackCount,choiceResults:pollResult.answers.filter(function(a){return a.questionId===questionId;}).reduce(function(result,answer){return __spreadArray(__spreadArray([],result),answer.choices);},[]).reduce(function(result,next){var _a;return __assign(__assign({},result),(_a={},_a[next.choiceId]=next.count,_a));},{})};}};var DetailViewSectionPadding=_styled.css(templateObject_1$1a||(templateObject_1$1a=__makeTemplateObject(["\n padding: ","px ","px 0 ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"],["\n padding: ","px ","px 0 ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"])),spacingXs,spacingM,spacingM,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$1a;var PollResultFeedbackCount=function PollResultFeedbackCount(){var _a=React$d.useContext(PollUserContext),showResult=_a.showResult,pollResult=_a.pollResult;if(!showResult){return null;}return jsxRuntime.jsx("div",__assign({className:"ms-fontColor-neutralTertiary","data-poll-result-total-count":pollResult.totalFeedbackCount},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Polls.editor.totalFeedbackCount",values:{count:pollResult.totalFeedbackCount},tagName:"span"},void 0)}),void 0);};var DetailViewPoll=function DetailViewPoll(){var _a=useDetailViewContext(),item=_a.item,contentLanguage=_a.contentLanguage,resourceType=_a.resourceType,isReadOnly=_a.isReadOnly;var features=useFeatures();var getPollResult=useFeedbackApi().getPollResult;if(!features.polls||item==null||item.poll==null||item.poll.questions==null||item.poll.questions.length===0){return null;}return jsxRuntime.jsx(PollUserContextProvider,__assign({item:item,resourceType:resourceType,language:contentLanguage,getPollResults:function(itemId){return getPollResult(resourceType,itemId);}},{children:jsxRuntime.jsxs(StyledPollDisplay$1,{children:[jsxRuntime.jsx(PollResultFeedbackCount,{},void 0),jsxRuntime.jsx(DetailViewPollsSubmitButton,{isReadOnly:isReadOnly},void 0),jsxRuntime.jsx(StyledPollResultExport,{},void 0)]},void 0)}),void 0);};var StyledPollResultExport=_styled__default["default"](DetailViewPollExportButton).withConfig({displayName:"DetailViewPoll__StyledPollResultExport",componentId:"sc-gvqgh8-0"})(templateObject_1$19||(templateObject_1$19=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var StyledPollDisplay$1=_styled__default["default"](PollDisplay).withConfig({displayName:"DetailViewPoll__StyledPollDisplay",componentId:"sc-gvqgh8-1"})(templateObject_2$I||(templateObject_2$I=__makeTemplateObject(["\n ",";\n margin-bottom: ","px;\n\n max-width: 500px;\n"],["\n ",";\n margin-bottom: ","px;\n\n max-width: 500px;\n"])),DetailViewSectionPadding,spacingL);var templateObject_1$19,templateObject_2$I;var EventDetailViewResponseExportButton=function EventDetailViewResponseExportButton(_a){var className=_a.className;var features=useFeatures();if(!features.events){return null;}return jsxRuntime.jsx(DetailViewCsvExportButton,{className:className,path:"feedback/registration/result/export",stringResource:"Events.registration.exportResultsAsCsv"},void 0);};var FeedbackItemType;(function(FeedbackItemType){FeedbackItemType["comment"]="comment";FeedbackItemType["like"]="like";FeedbackItemType["confirm"]="confirm";FeedbackItemType["poll"]="poll";FeedbackItemType["eventRegistration"]="eventRegistration";})(FeedbackItemType||(FeedbackItemType={}));var EventRegistrationContextProvider=function EventRegistrationContextProvider(_a){var _b;var onBehalfOfUpn=_a.onBehalfOfUpn,children=_a.children;var formatMessage=useIntl().formatMessage;var features=useFeatures();var _c=useDetailViewContext(),item=_c.item,contentLanguage=_c.contentLanguage;var getEventRegistrationResults=useEventRegistrationApi().getEventRegistrationResults;if(!features.events||item==null){return null;}var locationQuestionId=getLocationQuestionId(item);var isCancelled=(_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled;return jsxRuntime.jsx(PollUserContextProvider,__assign({item:item,onBehalfOfUpn:onBehalfOfUpn,resourceType:ItemResourceTypes.Events,language:contentLanguage,getAdditionalQuestions:function(result){return getAdditionalQuestions(result);},getAdditionalUserAnswers:extractLocationAnswers,getPollResults:getRegistrationResult,showResult:!!isCancelled},{children:children}),void 0);function getAdditionalQuestions(result){var _a=getLocationPollDefinitions(item,formatMessage,result,!!onBehalfOfUpn),question=_a.question,translations=_a.translations;return {questions:question?[question]:null,translations:translations};}function extractLocationAnswers(records){if(!item.locations||item.locations.length<2){return null;}var eventResponse=records.find(function(r){return r.type===FeedbackItemType.eventRegistration;});return [{questionId:locationQuestionId,choiceIds:eventResponse&&eventResponse.locationId?[eventResponse.locationId]:[]}];}function getRegistrationResult(itemId){return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getEventRegistrationResults(itemId)];case 1:result=_a.sent();return [2/*return*/,{totalFeedbackCount:result.totalFeedbackCount,answers:result.answers.concat([{questionId:locationQuestionId,choices:result.locationAnswers.map(function(l){return {choiceId:l.locationId,count:l.count};})}])}];}});});}};var EventDetailViewUserRegistration=function EventDetailViewUserRegistration(_a){var className=_a.className,hideInfoMessage=_a.hideInfoMessage;var pollUserContext=React$d.useContext(PollUserContext);var getFeedback=useFeedbackApi().getFeedback;var item=pollUserContext.item;var isLoadingPollResult=pollUserContext.isLoadingPollResult,pollResult=pollUserContext.pollResult,onBehalfOfUpn=pollUserContext.onBehalfOfUpn;var _b=usePromise$2(getEventResponse,item.userResponse,[item]),eventResponse=_b[0],isLoading=_b[1],setEventResponse=_b[3];// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125972
|
-
var seatsResult=React$d.useMemo(getSeatsLeft,[isLoading,isLoadingPollResult,pollResult,item.id]);return jsxRuntime.jsx(EventUserRegistrationContext.Provider,__assign({value:__assign(__assign({},pollUserContext),{hasPollContext:true,eventResponse:eventResponse,setEventResponse:setEventResponse,isLoading:isLoadingPollResult||isLoading,seatsInfo:seatsResult})},{children:jsxRuntime.jsx(EventUserRegistration,{className:className,hideInfoMessage:hideInfoMessage},void 0)}),void 0);function getEventResponse(){return __awaiter(this,void 0,void 0,function(){var feedback,eventRecord;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getFeedback(ItemResourceTypes.Events,item.id,onBehalfOfUpn)];case 1:feedback=_a.sent();eventRecord=feedback&&feedback.records.find(function(r){return r.type==='eventRegistration';});return [2/*return*/,eventRecord?eventRecord.eventResponse:EventResponse.NotSet];}});});}function getSeatsLeft(){var _a,_b,_c,_d;if(isLoading||!item.registrationSettings||!item.registrationSettings.enabled||((_a=item.cancelInformation)===null||_a===void 0?void 0:_a.isCancelled)||!((_b=pollResult===null||pollResult===void 0?void 0:pollResult.answers)===null||_b===void 0?void 0:_b.length)||isLoadingPollResult){return {hasAnySeatsLeft:true};}var locationsWithSeats=item.locations.filter(function(l){return l.maxNumberOfSeats>0;});var hasLocationsWithoutSeats=locationsWithSeats.length!==item.locations.length;if(!locationsWithSeats.length||hasLocationsWithoutSeats){return {hasAnySeatsLeft:true};}var locationAnswers=(_d=(_c=pollResult.answers.find(function(a){return a.questionId===getLocationQuestionId(item);}))===null||_c===void 0?void 0:_c.choices)===null||_d===void 0?void 0:_d.reduce(function(prev,curr){prev[curr.choiceId]=curr.count;return prev;},{});var locationsWithSeatsLeft=locationsWithSeats.map(function(l){return __assign(__assign({},l),{seatsLeft:Math.max(l.maxNumberOfSeats-(locationAnswers[l.locationId]||0),0)});});return {hasAnySeatsLeft:locationsWithSeatsLeft.some(function(l){return l.seatsLeft>0;}),locations:locationsWithSeatsLeft};}};var EventRegistrationRegisterSomeoneElseDialog=function EventRegistrationRegisterSomeoneElseDialog(_a){var show=_a.show,onDismiss=_a.onDismiss,onUpdate=_a.onUpdate;var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var features=useFeatures();var _b=React$d.useState(),onBehalfOfUser=_b[0],setOnBehalfOfUser=_b[1];var item=useDetailViewContext().item;var isGroupAdmin=hasMinRoleInAllGroups(GroupRoles.Admin,user,item);useListener(EventResponseTriggerAction.type,function(action){if(action.itemId!==item.id){return false;}onUpdate({upn:onBehalfOfUser.userPrincipalName,displayName:onBehalfOfUser.displayName,locationId:action.locationId},action.response);onDismiss();return true;},[item.id,onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.userPrincipalName]);return jsxRuntime.jsx(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:true,className:'dialog-register-user'},dialogContentProps:{type:officeUiFabricReact.DialogType.close,title:formatMessage({id:'Events.registration.registerSomeoneElse.title'})},onDismiss:onDismiss},{children:jsxRuntime.jsxs(Host$r,__assign({className:"dialog-content-host"},{children:[jsxRuntime.jsx(DialogGlobalStyle$2,{},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.peoplePickerLabel"},void 0),jsxRuntime.jsx(StyledPeoplePicker,{accountType:AccountType.User,allowMailItems:isGroupAdmin&&features.userInvitation,localOnly:!isGroupAdmin,includePendingInvitationUsers:true,includePendingRegistrationUsers:true,selectionMode:officeUiFabricReact.SelectionMode.single,selectedItems:onBehalfOfUser?[onBehalfOfUser]:[],onChange:function(accounts){return setOnBehalfOfUser(accounts[0]);},placeholderStringResourceKey:"Events.registration.registerSomeoneElse.peoplePickerPlaceholder",excludedItems:[user]},void 0),onBehalfOfUser&&jsxRuntime.jsxs(EventRegistrationContextProvider,__assign({onBehalfOfUpn:onBehalfOfUser.userPrincipalName},{children:[jsxRuntime.jsxs(DialogMainContent,__assign({isScrollable:!env.isAnyMobileApp},{children:[!(onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.id)&&jsxRuntime.jsx(InvitationInfoMessage,{subscriptionName:getSubscriptionName(user.subscription)},void 0),jsxRuntime.jsx(StyledPollDisplay,{},void 0)]}),void 0),jsxRuntime.jsx(officeUiFabricReact.DialogFooter,{children:jsxRuntime.jsxs(Buttons,{children:[jsxRuntime.jsx(CancelButton,{onClick:onDismiss},void 0),jsxRuntime.jsx(EventDetailViewUserRegistration,{hideInfoMessage:true},void 0)]},void 0)},void 0)]}),onBehalfOfUser.userPrincipalName)]}),void 0)}),void 0);};var Host$r=_styled__default["default"].div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Host",componentId:"sc-1rziepe-0"})(templateObject_1$18||(templateObject_1$18=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"])),minScreenSize.small);var Buttons=_styled__default["default"].div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Buttons",componentId:"sc-1rziepe-1"})(templateObject_2$H||(templateObject_2$H=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"],["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"])));var StyledPeoplePicker=_styled__default["default"](PeoplePicker).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPeoplePicker",componentId:"sc-1rziepe-2"})(templateObject_3$u||(templateObject_3$u=__makeTemplateObject(["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"],["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"])),spacingS,spacingM);var DialogMainContent=_styled__default["default"].div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__DialogMainContent",componentId:"sc-1rziepe-3"})(templateObject_5$j||(templateObject_5$j=__makeTemplateObject(["\n ","\n margin-bottom: auto;\n"],["\n ","\n margin-bottom: auto;\n"])),function(p){return p.isScrollable&&_styled.css(templateObject_4$k||(templateObject_4$k=__makeTemplateObject(["\n max-height: 300px;\n overflow: auto;\n "],["\n max-height: 300px;\n overflow: auto;\n "])));});var StyledPollDisplay=_styled__default["default"](PollDisplay).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPollDisplay",componentId:"sc-1rziepe-4"})(templateObject_6$b||(templateObject_6$b=__makeTemplateObject(["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"],["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"])));var CancelButton=function CancelButton(_a){var onClick=_a.onClick;return jsxRuntime.jsx(StyledCancelButton,__assign({onClick:onClick},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.Cancel"},void 0)}),void 0);};var InvitationInfoMessage=function InvitationInfoMessage(_a){var subscriptionName=_a.subscriptionName;return jsxRuntime.jsxs(InfoMessageHost,{children:[jsxRuntime.jsx(InfoIcon,{iconName:"info"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.userWillBeInvited",values:{subscriptionName:subscriptionName}},void 0)]},void 0);};var InfoMessageHost=_styled__default["default"].div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoMessageHost",componentId:"sc-1rziepe-5"})(templateObject_7$8||(templateObject_7$8=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"])),spacingM);var InfoIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoIcon",componentId:"sc-1rziepe-6"})(templateObject_8$7||(templateObject_8$7=__makeTemplateObject(["\n padding-right: ","px;\n"],["\n padding-right: ","px;\n"])),spacingS);var StyledCancelButton=_styled__default["default"](officeUiFabricReact.DefaultButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledCancelButton",componentId:"sc-1rziepe-7"})(templateObject_9$5||(templateObject_9$5=__makeTemplateObject(["\n && {\n margin-right: ","px;\n }\n"],["\n && {\n margin-right: ","px;\n }\n"])),spacingM);var DialogGlobalStyle$2=_styled.createGlobalStyle(templateObject_10$4||(templateObject_10$4=__makeTemplateObject(["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"],["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$18,templateObject_2$H,templateObject_3$u,templateObject_4$k,templateObject_5$j,templateObject_6$b,templateObject_7$8,templateObject_8$7,templateObject_9$5,templateObject_10$4;var EventRegistrationRegisterSomeoneElseButton=function EventRegistrationRegisterSomeoneElseButton(_a){var item=_a.item,onRegister=_a.onRegister,onDeregister=_a.onDeregister;var user=useCurrentUser();var _b=React$d.useState(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(StyledButton$1,__assign({iconProps:{iconName:'AddFriend'},onClick:function(){return setShowDialog(true);}},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.title"},void 0)}),void 0),showDialog&&jsxRuntime.jsx(EventRegistrationRegisterSomeoneElseDialog,{onDismiss:handleDismiss,onUpdate:handleUpdate,show:showDialog},void 0)]},void 0);function handleDismiss(){setShowDialog(false);}function handleUpdate(participant,response){if(response===EventResponse.Registered){onRegister===null||onRegister===void 0?void 0:onRegister(participant);}else {onDeregister===null||onDeregister===void 0?void 0:onDeregister(participant);}}};var StyledButton$1=_styled__default["default"](ActionButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseButton__StyledButton",componentId:"sc-mgwolr-0"})(templateObject_1$17||(templateObject_1$17=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"])),spacingS);var templateObject_1$17;var EventRegistrationDeregisterPersonButton=function EventRegistrationDeregisterPersonButton(_a){var item=_a.item,participant=_a.participant,onDeregistered=_a.onDeregistered;var user=useCurrentUserContext().user;var refreshUserDetails=useRefreshUserDetails();var setEventRegistration=useEventRegistrationApi().setEventRegistration;var showToast=useNotificationContext().showToast;var formatMessage=useIntl().formatMessage;var _b=React$d.useState(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Tooltip,__assign({resourceKey:"Events.registration.deRegisterSomeoneElse.title",values:{name:participant.displayName}},{children:jsxRuntime.jsx(IconButton,{iconProps:{iconName:'Delete'},onClick:function(){return setShowDialog(true);},ariaLabel:formatMessage({id:'Events.registration.deRegisterSomeoneElse.title'},{name:participant.displayName})},void 0)}),void 0),showDialog&&jsxRuntime.jsx(ConfirmDialog,{showDialog:showDialog,titleResourceKey:"Events.registration.deRegisterSomeoneElse.confirmTitle",titleResourceValues:{name:participant.displayName},onConfirm:deRegister,onClose:function(){return setShowDialog(false);}},void 0)]},void 0);function deRegister(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:onDeregistered();return [4/*yield*/,setEventRegistration(item.id,EventResponse.NotSet,null,null,participant.upn)];case 1:_a.sent();refreshUserDetails();showToast('Events.registration.onBehalfOfDeregistrationSuccess',{mail:participant.displayName});return [2/*return*/];}});});}};var EventRegistrationParticipantsDialog=function EventRegistrationParticipantsDialog(_a){var numberOfParticipants=_a.numberOfParticipants,show=_a.show,onDismiss=_a.onDismiss;var formatMessage=useIntl().formatMessage;return jsxRuntime.jsx(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:false,className:'dialog-event-participants'},dialogContentProps:{type:officeUiFabricReact.DialogType.close,title:formatMessage({id:'Events.registration.participants'},{count:numberOfParticipants})},onDismiss:onDismiss},{children:jsxRuntime.jsxs(Host$q,__assign({className:"dialog-content-host"},{children:[jsxRuntime.jsx(DialogGlobalStyle$1,{},void 0),jsxRuntime.jsx(ParticipantsList,{},void 0)]}),void 0)}),void 0);};var Host$q=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsDialog__Host",componentId:"sc-1biaauh-0"})(templateObject_1$16||(templateObject_1$16=__makeTemplateObject(["\n @media (min-width: ","px) {\n width: 400px;\n }\n"],["\n @media (min-width: ","px) {\n width: 400px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle$1=_styled.createGlobalStyle(templateObject_2$G||(templateObject_2$G=__makeTemplateObject(["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"],["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"])),maxScreenSize.small);var ParticipantsList=function ParticipantsList(){var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var getParticipants=useEventRegistrationApi().getParticipants;var textColors=React$d.useContext(ThemeContext$1).theme.textColors;var _a=React$d.useContext(PollUserContext),fetchPollResults=_a.fetchPollResults,publishableItem=_a.item;var item=publishableItem;var _b=usePromise$2(getSortedParticipants,[],[item.id]),unfilteredParticipants=_b[0],isLoading=_b[1],setParticipants=_b[3];var handleSearchDebounced=useDebouncedCallback(handleSearch,300)[0];var _c=React$d.useState(),filteredParticipants=_c[0],setFilteredParticipants=_c[1];var participants=filteredParticipants||unfilteredParticipants;return jsxRuntime.jsxs(ListHost,{children:[jsxRuntime.jsx(EventRegistrationRegisterSomeoneElseButton,{item:item,onDeregister:handleDeregister,onRegister:handleRegister},void 0),jsxRuntime.jsx(SearchArea,{children:jsxRuntime.jsx(StyledSearchBox$1,{placeholder:formatMessage({id:'Events.registration.participants.search.placeholder'}),disabled:isLoading,onChange:function(_,value){return handleSearchDebounced(unfilteredParticipants,value);},iconProps:{style:{color:textColors.default}}},void 0)},void 0),isLoading&&jsxRuntime.jsx(Spinner,{},void 0),jsxRuntime.jsx(ListContainer,__assign({isScrollable:!env.isAnyMobileApp},{children:participants.map(function(p){var showDeregisterButton=p.upn!==user.userPrincipalName;return jsxRuntime.jsxs(ListRow,{children:[jsxRuntime.jsx(PersonaCardWrapper,__assign({showDeregisterButton:showDeregisterButton},{children:jsxRuntime.jsx(StyledPersonaCard,__assign({upn:p.upn},{children:jsxRuntime.jsx(StyledAvatar,{upn:p.upn,text:p.displayName,secondaryText:p.location&&formatMessage({id:'Events.registration.participants.location'},{location:p.location})},void 0)}),void 0)}),void 0),showDeregisterButton&&jsxRuntime.jsx(EventRegistrationDeregisterPersonButton,{item:item,participant:p,onDeregistered:function(){return handleDeregister(p);}},void 0)]},p.upn);})}),void 0),!isLoading&&!participants.length&&jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.noResultsFound"},void 0)]},void 0);function getSortedParticipants(){return __awaiter(this,void 0,void 0,function(){var numberOfLocations,locationsMap,participants;return __generator(this,function(_a){switch(_a.label){case 0:numberOfLocations=item===null||item===void 0?void 0:item.locations.length;locationsMap=getLocations();return [4/*yield*/,getParticipants(item.id)];case 1:participants=_a.sent()||[];return [2/*return*/,participants.map(function(p){return __assign(__assign({},p),{location:numberOfLocations>1?locationsMap[p.locationId]||'':''});}).sort(function(a,b){var locationCompare=(locationsMap[a.locationId]||'').localeCompare(locationsMap[b.locationId]||'');if(locationCompare!==0){return locationCompare;}return a.displayName.localeCompare(b.displayName);})];}});});}function getLocations(){var _a;return ((_a=item.locations)===null||_a===void 0?void 0:_a.reduce(function(prev,curr){prev[curr.locationId]=curr.name;return prev;},{}))||{};}function handleSearch(unfilteredParticipants,searchValue){if(!searchValue){setFilteredParticipants(null);return;}var filter=new RegExp(searchValue,'i');setFilteredParticipants(unfilteredParticipants.filter(function(p){return (p.displayName+"|"+p.upn+"|"+p.location).search(filter)>-1;}));}function handleDeregister(participant){setParticipants(function(ps){return ps.filter(function(p){return p.upn!==participant.upn;});});fetchPollResults();setFilteredParticipants(null);}function handleRegister(participant){setParticipants(function(ps){return ps.concat([__assign(__assign({},participant),{location:getLocations()[participant.locationId]||''})]);});fetchPollResults();setFilteredParticipants(null);}};var ListContainer=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListContainer",componentId:"sc-1biaauh-1"})(templateObject_4$j||(templateObject_4$j=__makeTemplateObject(["\n padding: 4px;\n\n ","\n"],["\n padding: 4px;\n\n ","\n"])),function(p){return p.isScrollable&&_styled.css(templateObject_3$t||(templateObject_3$t=__makeTemplateObject(["\n max-height: 382px;\n overflow: auto;\n "],["\n max-height: 382px;\n overflow: auto;\n "])));});var SearchArea=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsDialog__SearchArea",componentId:"sc-1biaauh-2"})(templateObject_5$i||(templateObject_5$i=__makeTemplateObject(["\n margin-bottom: ","px;\n display: flex;\n"],["\n margin-bottom: ","px;\n display: flex;\n"])),spacingM);var StyledSearchBox$1=_styled__default["default"](officeUiFabricReact.SearchBox).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledSearchBox",componentId:"sc-1biaauh-3"})(templateObject_6$a||(templateObject_6$a=__makeTemplateObject(["\n flex-grow: 1;\n"],["\n flex-grow: 1;\n"])));var ListRow=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListRow",componentId:"sc-1biaauh-4"})(templateObject_7$7||(templateObject_7$7=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"])),spacingS);var PersonaCardWrapper=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsDialog__PersonaCardWrapper",componentId:"sc-1biaauh-5"})(templateObject_8$6||(templateObject_8$6=__makeTemplateObject(["\n width: calc(100% - ","px);\n"],["\n width: calc(100% - ","px);\n"])),function(p){return p.showDeregisterButton?32:0;});var StyledPersonaCard=_styled__default["default"](PersonaCard).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledPersonaCard",componentId:"sc-1biaauh-6"})(templateObject_9$4||(templateObject_9$4=__makeTemplateObject(["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"],["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"])));var StyledAvatar=_styled__default["default"](Avatar).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledAvatar",componentId:"sc-1biaauh-7"})(templateObject_10$3||(templateObject_10$3=__makeTemplateObject(["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"],["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"])));var ListHost=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListHost",componentId:"sc-1biaauh-8"})(templateObject_11$2$1||(templateObject_11$2$1=__makeTemplateObject([""],[""])));var templateObject_1$16,templateObject_2$G,templateObject_3$t,templateObject_4$j,templateObject_5$i,templateObject_6$a,templateObject_7$7,templateObject_8$6,templateObject_9$4,templateObject_10$3,templateObject_11$2$1;var EventRegistrationParticipantsLink=function EventRegistrationParticipantsLink(){var _a;var user=useCurrentUser();var _b=React$d.useContext(PollUserContext),pollResult=_b.pollResult,publishableItem=_b.item;var item=publishableItem;var _c=React$d.useState(false),showParticipants=_c[0],setShowParticipants=_c[1];var palette=React$d.useContext(ThemeContext$1).theme.palette;if(user.isPublicUser||(pollResult===null||pollResult===void 0?void 0:pollResult.totalFeedbackCount)==null){return null;}var isUserAuthor=hasMinRoleInAllGroups(GroupRoles.Author,user,item);var canOpenParticipantsDialog=isUserAuthor||pollResult.totalFeedbackCount>0&&((_a=item.registrationSettings)===null||_a===void 0?void 0:_a.showParticipantsToEverybody);return jsxRuntime.jsxs("div",__assign({"data-poll-result-total-count":pollResult.totalFeedbackCount},{children:[!canOpenParticipantsDialog?jsxRuntime.jsx(NoParticipantsContainer,{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.participants.count",values:{count:pollResult.totalFeedbackCount}},void 0)},void 0):jsxRuntime.jsx(ParticipantsButton,__assign({onClick:function(){return setShowParticipants(true);},color:palette.accent},{children:jsxRuntime.jsx(FormattedMessage$1,{id:isUserAuthor?'Events.registration.participants.viewAndManage':'Events.registration.participants.count',values:{count:pollResult.totalFeedbackCount}},void 0)}),void 0),jsxRuntime.jsx(EventRegistrationParticipantsDialog,{numberOfParticipants:pollResult.totalFeedbackCount,show:showParticipants,onDismiss:function(){return setShowParticipants(false);}},void 0)]}),void 0);};var NoParticipantsContainer=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsLink__NoParticipantsContainer",componentId:"sc-44nkgi-0"})(templateObject_1$15||(templateObject_1$15=__makeTemplateObject(["\n color: ",";\n font-size: ","px;\n"],["\n color: ",";\n font-size: ","px;\n"])),function(p){return p.theme.palette.neutralTertiary;},fontSizeSmall);var ParticipantsButton=_styled__default["default"](ActionButton).withConfig({displayName:"EventRegistrationParticipantsLink__ParticipantsButton",componentId:"sc-44nkgi-1"})(templateObject_2$F||(templateObject_2$F=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"])),fontSizeSmall);var templateObject_1$15,templateObject_2$F;var EventDetailViewRegistrationPoll=function EventDetailViewRegistrationPoll(){return jsxRuntime.jsx(EventRegistrationContextProvider,{children:jsxRuntime.jsxs(StyledPollDisplay$1,{children:[jsxRuntime.jsx(EventRegistrationParticipantsLink,{},void 0),jsxRuntime.jsx(StyledEventUserRegistration,{},void 0),jsxRuntime.jsx(StyledResponseExportButton,{},void 0)]},void 0)},void 0);};var StyledEventUserRegistration=_styled__default["default"](EventDetailViewUserRegistration).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledEventUserRegistration",componentId:"sc-1kxjndz-0"})(templateObject_1$14||(templateObject_1$14=__makeTemplateObject(["\n && {\n margin-top: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n }\n"])),spacingS);var StyledResponseExportButton=_styled__default["default"](EventDetailViewResponseExportButton).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledResponseExportButton",componentId:"sc-1kxjndz-1"})(templateObject_2$E||(templateObject_2$E=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var templateObject_1$14,templateObject_2$E;var EventDetailViewRegistration=function EventDetailViewRegistration(){var item=useDetailViewContext().item;var isRegistrationEnabled=item.registrationSettings&&item.registrationSettings.enabled;if(isRegistrationEnabled){return jsxRuntime.jsx(EventDetailViewRegistrationPoll,{},void 0);}return jsxRuntime.jsx(DetailViewPoll,{},void 0);};var fixRegExpWellKnownSymbolLogic$4=fixRegexpWellKnownSymbolLogic$1;var anObject$i=anObject$h;var toObject=toObject$6;var toLength$9=toLength$8;var toInteger$5=toInteger$4;var requireObjectCoercible$1$1=requireObjectCoercible$b;var advanceStringIndex$4=advanceStringIndex$3;var regExpExec$3=regexpExecAbstract$1;var max$1=Math.max;var min$1=Math.min;var floor=Math.floor;var SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d\d?|<[^>]*>)/g;var SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d\d?)/g;var maybeToString=function(it){return it===undefined?it:String(it);};// @@replace logic
|
|
125980
|
+
var seatsResult=React$d.useMemo(getSeatsLeft,[isLoading,isLoadingPollResult,pollResult,item.id]);return jsxRuntime.jsx(EventUserRegistrationContext.Provider,__assign({value:__assign(__assign({},pollUserContext),{hasPollContext:true,eventResponse:eventResponse,setEventResponse:setEventResponse,isLoading:isLoadingPollResult||isLoading,seatsInfo:seatsResult})},{children:jsxRuntime.jsx(EventUserRegistration,{className:className,hideInfoMessage:hideInfoMessage},void 0)}),void 0);function getEventResponse(){return __awaiter(this,void 0,void 0,function(){var feedback,eventRecord;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getFeedback(ItemResourceTypes.Events,item.id,onBehalfOfUpn)];case 1:feedback=_a.sent();eventRecord=feedback&&feedback.records.find(function(r){return r.type==='eventRegistration';});return [2/*return*/,eventRecord?eventRecord.eventResponse:EventResponse.NotSet];}});});}function getSeatsLeft(){var _a,_b,_c,_d;if(isLoading||!item.registrationSettings||!item.registrationSettings.enabled||((_a=item.cancelInformation)===null||_a===void 0?void 0:_a.isCancelled)||!((_b=pollResult===null||pollResult===void 0?void 0:pollResult.answers)===null||_b===void 0?void 0:_b.length)||isLoadingPollResult){return {hasAnySeatsLeft:true};}var locationsWithSeats=item.locations.filter(function(l){return l.maxNumberOfSeats>0;});var hasLocationsWithoutSeats=locationsWithSeats.length!==item.locations.length;if(!locationsWithSeats.length||hasLocationsWithoutSeats){return {hasAnySeatsLeft:true};}var locationAnswers=(_d=(_c=pollResult.answers.find(function(a){return a.questionId===getLocationQuestionId(item);}))===null||_c===void 0?void 0:_c.choices)===null||_d===void 0?void 0:_d.reduce(function(prev,curr){prev[curr.choiceId]=curr.count;return prev;},{});var locationsWithSeatsLeft=locationsWithSeats.map(function(l){return __assign(__assign({},l),{seatsLeft:Math.max(l.maxNumberOfSeats-(locationAnswers[l.locationId]||0),0)});});return {hasAnySeatsLeft:locationsWithSeatsLeft.some(function(l){return l.seatsLeft>0;}),locations:locationsWithSeatsLeft};}};var EventRegistrationRegisterSomeoneElseDialog=function EventRegistrationRegisterSomeoneElseDialog(_a){var show=_a.show,onDismiss=_a.onDismiss,onUpdate=_a.onUpdate;var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var features=useFeatures();var _b=React$d.useState(),onBehalfOfUser=_b[0],setOnBehalfOfUser=_b[1];var item=useDetailViewContext().item;var isGroupAdmin=hasMinRoleInAllGroups(GroupRoles.Admin,user,item);useListener(EventResponseTriggerAction.type,function(action){if(action.itemId!==item.id){return false;}onUpdate({upn:onBehalfOfUser.userPrincipalName,displayName:onBehalfOfUser.displayName,locationId:action.locationId},action.response);onDismiss();return true;},[item.id,onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.userPrincipalName]);return jsxRuntime.jsx(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:true,className:'dialog-register-user'},dialogContentProps:{type:officeUiFabricReact.DialogType.close,title:formatMessage({id:'Events.registration.registerSomeoneElse.title'})},onDismiss:onDismiss},{children:jsxRuntime.jsxs(Host$r,__assign({className:"dialog-content-host"},{children:[jsxRuntime.jsx(DialogGlobalStyle$2,{},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.peoplePickerLabel"},void 0),jsxRuntime.jsx(StyledPeoplePicker,{accountType:AccountType.User,allowMailItems:isGroupAdmin&&features.userInvitation,localOnly:!isGroupAdmin,includePendingInvitationUsers:true,includePendingRegistrationUsers:true,selectionMode:officeUiFabricReact.SelectionMode.single,selectedItems:onBehalfOfUser?[onBehalfOfUser]:[],onChange:function(accounts){return setOnBehalfOfUser(accounts[0]);},placeholderStringResourceKey:"Events.registration.registerSomeoneElse.peoplePickerPlaceholder",excludedItems:[user]},void 0),onBehalfOfUser&&jsxRuntime.jsxs(EventRegistrationContextProvider,__assign({onBehalfOfUpn:onBehalfOfUser.userPrincipalName},{children:[jsxRuntime.jsxs(DialogMainContent,__assign({isScrollable:!env.isAnyMobileApp},{children:[!(onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.id)&&jsxRuntime.jsx(InvitationInfoMessage,{subscriptionName:getSubscriptionName(user.subscription)},void 0),jsxRuntime.jsx(StyledPollDisplay,{},void 0)]}),void 0),jsxRuntime.jsx(officeUiFabricReact.DialogFooter,{children:jsxRuntime.jsxs(Buttons,{children:[jsxRuntime.jsx(CancelButton,{onClick:onDismiss},void 0),jsxRuntime.jsx(EventDetailViewUserRegistration,{hideInfoMessage:true},void 0)]},void 0)},void 0)]}),onBehalfOfUser.userPrincipalName)]}),void 0)}),void 0);};var Host$r=_styled__default["default"].div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Host",componentId:"sc-1rziepe-0"})(templateObject_1$18||(templateObject_1$18=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"])),minScreenSize.small);var Buttons=_styled__default["default"].div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Buttons",componentId:"sc-1rziepe-1"})(templateObject_2$H||(templateObject_2$H=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"],["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"])));var StyledPeoplePicker=_styled__default["default"](PeoplePicker).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPeoplePicker",componentId:"sc-1rziepe-2"})(templateObject_3$u||(templateObject_3$u=__makeTemplateObject(["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"],["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"])),spacingS,spacingM);var DialogMainContent=_styled__default["default"].div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__DialogMainContent",componentId:"sc-1rziepe-3"})(templateObject_5$j||(templateObject_5$j=__makeTemplateObject(["\n ","\n margin-bottom: auto;\n"],["\n ","\n margin-bottom: auto;\n"])),function(p){return p.isScrollable&&_styled.css(templateObject_4$k||(templateObject_4$k=__makeTemplateObject(["\n max-height: 300px;\n overflow: auto;\n "],["\n max-height: 300px;\n overflow: auto;\n "])));});var StyledPollDisplay=_styled__default["default"](PollDisplay).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPollDisplay",componentId:"sc-1rziepe-4"})(templateObject_6$b||(templateObject_6$b=__makeTemplateObject(["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"],["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"])));var CancelButton=function CancelButton(_a){var onClick=_a.onClick;return jsxRuntime.jsx(StyledCancelButton,__assign({onClick:onClick},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.Cancel"},void 0)}),void 0);};var InvitationInfoMessage=function InvitationInfoMessage(_a){var subscriptionName=_a.subscriptionName;return jsxRuntime.jsxs(InfoMessageHost,{children:[jsxRuntime.jsx(InfoIcon,{iconName:"info"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.userWillBeInvited",values:{subscriptionName:subscriptionName}},void 0)]},void 0);};var InfoMessageHost=_styled__default["default"].div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoMessageHost",componentId:"sc-1rziepe-5"})(templateObject_7$8||(templateObject_7$8=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"])),spacingM);var InfoIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoIcon",componentId:"sc-1rziepe-6"})(templateObject_8$7||(templateObject_8$7=__makeTemplateObject(["\n padding-right: ","px;\n"],["\n padding-right: ","px;\n"])),spacingS);var StyledCancelButton=_styled__default["default"](officeUiFabricReact.DefaultButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledCancelButton",componentId:"sc-1rziepe-7"})(templateObject_9$5||(templateObject_9$5=__makeTemplateObject(["\n && {\n margin-right: ","px;\n }\n"],["\n && {\n margin-right: ","px;\n }\n"])),spacingM);var DialogGlobalStyle$2=_styled.createGlobalStyle(templateObject_10$4||(templateObject_10$4=__makeTemplateObject(["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"],["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$18,templateObject_2$H,templateObject_3$u,templateObject_4$k,templateObject_5$j,templateObject_6$b,templateObject_7$8,templateObject_8$7,templateObject_9$5,templateObject_10$4;var EventRegistrationRegisterSomeoneElseButton=function EventRegistrationRegisterSomeoneElseButton(_a){var item=_a.item,onRegister=_a.onRegister,onDeregister=_a.onDeregister;var user=useCurrentUser();var _b=React$d.useState(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(StyledButton$1,__assign({iconProps:{iconName:'AddFriend'},onClick:function(){return setShowDialog(true);}},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.title"},void 0)}),void 0),showDialog&&jsxRuntime.jsx(EventRegistrationRegisterSomeoneElseDialog,{onDismiss:handleDismiss,onUpdate:handleUpdate,show:showDialog},void 0)]},void 0);function handleDismiss(){setShowDialog(false);}function handleUpdate(participant,response){if(response===EventResponse.Registered){onRegister===null||onRegister===void 0?void 0:onRegister(participant);}else {onDeregister===null||onDeregister===void 0?void 0:onDeregister(participant);}}};var StyledButton$1=_styled__default["default"](ActionButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseButton__StyledButton",componentId:"sc-mgwolr-0"})(templateObject_1$17||(templateObject_1$17=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"])),spacingS);var templateObject_1$17;var EventRegistrationDeregisterPersonButton=function EventRegistrationDeregisterPersonButton(_a){var item=_a.item,participant=_a.participant,onDeregistered=_a.onDeregistered;var user=useCurrentUserContext().user;var refreshUserDetails=useRefreshUserDetails();var setEventRegistration=useEventRegistrationApi().setEventRegistration;var showToast=useNotificationContext().showToast;var formatMessage=useIntl().formatMessage;var _b=React$d.useState(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Tooltip,__assign({resourceKey:"Events.registration.deRegisterSomeoneElse.title",values:{name:participant.displayName}},{children:jsxRuntime.jsx(IconButton,{iconProps:{iconName:'Delete'},onClick:function(){return setShowDialog(true);},ariaLabel:formatMessage({id:'Events.registration.deRegisterSomeoneElse.title'},{name:participant.displayName})},void 0)}),void 0),showDialog&&jsxRuntime.jsx(ConfirmDialog,{showDialog:showDialog,titleResourceKey:"Events.registration.deRegisterSomeoneElse.confirmTitle",titleResourceValues:{name:participant.displayName},onConfirm:deRegister,onClose:function(){return setShowDialog(false);}},void 0)]},void 0);function deRegister(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:onDeregistered();return [4/*yield*/,setEventRegistration(item.id,EventResponse.NotSet,null,null,participant.upn)];case 1:_a.sent();refreshUserDetails();showToast('Events.registration.onBehalfOfDeregistrationSuccess',{mail:participant.displayName});return [2/*return*/];}});});}};var EventRegistrationParticipantsDialog=function EventRegistrationParticipantsDialog(_a){var numberOfParticipants=_a.numberOfParticipants,show=_a.show,onDismiss=_a.onDismiss;var formatMessage=useIntl().formatMessage;return jsxRuntime.jsx(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:false,className:'dialog-event-participants'},dialogContentProps:{type:officeUiFabricReact.DialogType.close,title:formatMessage({id:'Events.registration.participants'},{count:numberOfParticipants})},onDismiss:onDismiss},{children:jsxRuntime.jsxs(Host$q,__assign({className:"dialog-content-host"},{children:[jsxRuntime.jsx(DialogGlobalStyle$1,{},void 0),jsxRuntime.jsx(ParticipantsList,{},void 0)]}),void 0)}),void 0);};var Host$q=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsDialog__Host",componentId:"sc-1biaauh-0"})(templateObject_1$16||(templateObject_1$16=__makeTemplateObject(["\n @media (min-width: ","px) {\n width: 400px;\n }\n"],["\n @media (min-width: ","px) {\n width: 400px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle$1=_styled.createGlobalStyle(templateObject_2$G||(templateObject_2$G=__makeTemplateObject(["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"],["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"])),maxScreenSize.small);var ParticipantsList=function ParticipantsList(){var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var getParticipants=useEventRegistrationApi().getParticipants;var textColors=React$d.useContext(ThemeContext$1).theme.textColors;var _a=React$d.useContext(PollUserContext),fetchPollResults=_a.fetchPollResults,publishableItem=_a.item;var item=publishableItem;var _b=usePromise$2(getSortedParticipants,[],[item.id]),unfilteredParticipants=_b[0],isLoading=_b[1],setParticipants=_b[3];var handleSearchDebounced=useDebouncedCallback(handleSearch,300)[0];var _c=React$d.useState(),filteredParticipants=_c[0],setFilteredParticipants=_c[1];var participants=filteredParticipants||unfilteredParticipants;return jsxRuntime.jsxs(ListHost,{children:[jsxRuntime.jsx(EventRegistrationRegisterSomeoneElseButton,{item:item,onDeregister:handleDeregister,onRegister:handleRegister},void 0),jsxRuntime.jsx(SearchArea,{children:jsxRuntime.jsx(StyledSearchBox$1,{placeholder:formatMessage({id:'Events.registration.participants.search.placeholder'}),disabled:isLoading,onChange:function(_,value){return handleSearchDebounced(unfilteredParticipants,value);},iconProps:{style:{color:textColors.default}}},void 0)},void 0),isLoading&&jsxRuntime.jsx(Spinner,{},void 0),jsxRuntime.jsx(ListContainer,__assign({isScrollable:!env.isAnyMobileApp},{children:participants.map(function(p){var showDeregisterButton=p.upn!==user.userPrincipalName;return jsxRuntime.jsxs(ListRow,{children:[jsxRuntime.jsx(PersonaCardWrapper,__assign({showDeregisterButton:showDeregisterButton},{children:jsxRuntime.jsx(StyledPersonaCard,__assign({upn:p.upn},{children:jsxRuntime.jsx(StyledAvatar,{upn:p.upn,text:p.displayName,secondaryText:p.location&&formatMessage({id:'Events.registration.participants.location'},{location:p.location})},void 0)}),void 0)}),void 0),showDeregisterButton&&jsxRuntime.jsx(EventRegistrationDeregisterPersonButton,{item:item,participant:p,onDeregistered:function(){return handleDeregister(p);}},void 0)]},p.upn);})}),void 0),!isLoading&&!participants.length&&jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.noResultsFound"},void 0)]},void 0);function getSortedParticipants(){return __awaiter(this,void 0,void 0,function(){var numberOfLocations,locationsMap,participants;return __generator(this,function(_a){switch(_a.label){case 0:numberOfLocations=item===null||item===void 0?void 0:item.locations.length;locationsMap=getLocations();return [4/*yield*/,getParticipants(item.id)];case 1:participants=_a.sent()||[];return [2/*return*/,participants.map(function(p){return __assign(__assign({},p),{location:numberOfLocations>1?locationsMap[p.locationId]||'':''});}).sort(function(a,b){var locationCompare=(locationsMap[a.locationId]||'').localeCompare(locationsMap[b.locationId]||'');if(locationCompare!==0){return locationCompare;}return a.displayName.localeCompare(b.displayName);})];}});});}function getLocations(){var _a;return ((_a=item.locations)===null||_a===void 0?void 0:_a.reduce(function(prev,curr){prev[curr.locationId]=curr.name;return prev;},{}))||{};}function handleSearch(unfilteredParticipants,searchValue){if(!searchValue){setFilteredParticipants(null);return;}var filter=new RegExp(searchValue,'i');setFilteredParticipants(unfilteredParticipants.filter(function(p){return (p.displayName+"|"+p.upn+"|"+p.location).search(filter)>-1;}));}function handleDeregister(participant){setParticipants(function(ps){return ps.filter(function(p){return p.upn!==participant.upn;});});fetchPollResults();setFilteredParticipants(null);}function handleRegister(participant){setParticipants(function(ps){return ps.concat([__assign(__assign({},participant),{location:getLocations()[participant.locationId]||''})]);});fetchPollResults();setFilteredParticipants(null);}};var ListContainer=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListContainer",componentId:"sc-1biaauh-1"})(templateObject_4$j||(templateObject_4$j=__makeTemplateObject(["\n padding: 4px;\n\n ","\n"],["\n padding: 4px;\n\n ","\n"])),function(p){return p.isScrollable&&_styled.css(templateObject_3$t||(templateObject_3$t=__makeTemplateObject(["\n max-height: 382px;\n overflow: auto;\n "],["\n max-height: 382px;\n overflow: auto;\n "])));});var SearchArea=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsDialog__SearchArea",componentId:"sc-1biaauh-2"})(templateObject_5$i||(templateObject_5$i=__makeTemplateObject(["\n margin-bottom: ","px;\n display: flex;\n"],["\n margin-bottom: ","px;\n display: flex;\n"])),spacingM);var StyledSearchBox$1=_styled__default["default"](officeUiFabricReact.SearchBox).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledSearchBox",componentId:"sc-1biaauh-3"})(templateObject_6$a||(templateObject_6$a=__makeTemplateObject(["\n flex-grow: 1;\n"],["\n flex-grow: 1;\n"])));var ListRow=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListRow",componentId:"sc-1biaauh-4"})(templateObject_7$7||(templateObject_7$7=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"])),spacingS);var PersonaCardWrapper=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsDialog__PersonaCardWrapper",componentId:"sc-1biaauh-5"})(templateObject_8$6||(templateObject_8$6=__makeTemplateObject(["\n width: calc(100% - ","px);\n"],["\n width: calc(100% - ","px);\n"])),function(p){return p.showDeregisterButton?32:0;});var StyledPersonaCard=_styled__default["default"](PersonaCard).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledPersonaCard",componentId:"sc-1biaauh-6"})(templateObject_9$4||(templateObject_9$4=__makeTemplateObject(["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"],["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"])));var StyledAvatar=_styled__default["default"](Avatar).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledAvatar",componentId:"sc-1biaauh-7"})(templateObject_10$3||(templateObject_10$3=__makeTemplateObject(["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"],["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"])));var ListHost=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListHost",componentId:"sc-1biaauh-8"})(templateObject_11$2$1||(templateObject_11$2$1=__makeTemplateObject([""],[""])));var templateObject_1$16,templateObject_2$G,templateObject_3$t,templateObject_4$j,templateObject_5$i,templateObject_6$a,templateObject_7$7,templateObject_8$6,templateObject_9$4,templateObject_10$3,templateObject_11$2$1;var EventRegistrationParticipantsLink=function EventRegistrationParticipantsLink(){var _a;var user=useCurrentUser();var _b=React$d.useContext(PollUserContext),pollResult=_b.pollResult,publishableItem=_b.item;var item=publishableItem;var _c=React$d.useState(false),showParticipants=_c[0],setShowParticipants=_c[1];var palette=React$d.useContext(ThemeContext$1).theme.palette;if(user.isPublicUser||(pollResult===null||pollResult===void 0?void 0:pollResult.totalFeedbackCount)==null){return null;}var isUserAuthor=hasMinRoleInAllGroups(GroupRoles.Author,user,item);var canOpenParticipantsDialog=isUserAuthor||pollResult.totalFeedbackCount>0&&((_a=item.registrationSettings)===null||_a===void 0?void 0:_a.showParticipantsToEverybody);return jsxRuntime.jsxs("div",__assign({"data-poll-result-total-count":pollResult.totalFeedbackCount},{children:[!canOpenParticipantsDialog?jsxRuntime.jsx(NoParticipantsContainer,{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.participants.count",values:{count:pollResult.totalFeedbackCount}},void 0)},void 0):jsxRuntime.jsx(ParticipantsButton,__assign({onClick:function(){return setShowParticipants(true);},color:palette.accent},{children:jsxRuntime.jsx(FormattedMessage$1,{id:isUserAuthor?'Events.registration.participants.viewAndManage':'Events.registration.participants.count',values:{count:pollResult.totalFeedbackCount}},void 0)}),void 0),jsxRuntime.jsx(EventRegistrationParticipantsDialog,{numberOfParticipants:pollResult.totalFeedbackCount,show:showParticipants,onDismiss:function(){return setShowParticipants(false);}},void 0)]}),void 0);};var NoParticipantsContainer=_styled__default["default"].div.withConfig({displayName:"EventRegistrationParticipantsLink__NoParticipantsContainer",componentId:"sc-44nkgi-0"})(templateObject_1$15||(templateObject_1$15=__makeTemplateObject(["\n color: ",";\n font-size: ","px;\n"],["\n color: ",";\n font-size: ","px;\n"])),function(p){return p.theme.palette.neutralTertiary;},fontSizeSmall);var ParticipantsButton=_styled__default["default"](ActionButton).withConfig({displayName:"EventRegistrationParticipantsLink__ParticipantsButton",componentId:"sc-44nkgi-1"})(templateObject_2$F||(templateObject_2$F=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"])),fontSizeSmall);var templateObject_1$15,templateObject_2$F;var EventDetailViewRegistrationPoll=function EventDetailViewRegistrationPoll(){return jsxRuntime.jsx(EventRegistrationContextProvider,{children:jsxRuntime.jsxs(StyledPollDisplay$1,{children:[jsxRuntime.jsx(EventRegistrationParticipantsLink,{},void 0),jsxRuntime.jsx(StyledEventUserRegistration,{},void 0),jsxRuntime.jsx(StyledResponseExportButton,{},void 0)]},void 0)},void 0);};var StyledEventUserRegistration=_styled__default["default"](EventDetailViewUserRegistration).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledEventUserRegistration",componentId:"sc-1kxjndz-0"})(templateObject_1$14||(templateObject_1$14=__makeTemplateObject(["\n && {\n margin-top: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n }\n"])),spacingS);var StyledResponseExportButton=_styled__default["default"](EventDetailViewResponseExportButton).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledResponseExportButton",componentId:"sc-1kxjndz-1"})(templateObject_2$E||(templateObject_2$E=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var templateObject_1$14,templateObject_2$E;var EventDetailViewRegistration=function EventDetailViewRegistration(){var item=useDetailViewContext().item;var isRegistrationEnabled=item.registrationSettings&&item.registrationSettings.enabled;if(isRegistrationEnabled){return jsxRuntime.jsx(EventDetailViewRegistrationPoll,{},void 0);}return jsxRuntime.jsx(DetailViewPoll,{},void 0);};var fixRegExpWellKnownSymbolLogic$4=fixRegexpWellKnownSymbolLogic$1;var anObject$i=anObject$h;var toObject$1=toObject$7;var toLength$2=toLength$a;var toInteger$5=toInteger$4;var requireObjectCoercible$1$1=requireObjectCoercible$b;var advanceStringIndex$4=advanceStringIndex$3;var regExpExec$3=regexpExecAbstract$1;var max$1=Math.max;var min$1=Math.min;var floor=Math.floor;var SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d\d?|<[^>]*>)/g;var SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d\d?)/g;var maybeToString=function(it){return it===undefined?it:String(it);};// @@replace logic
|
|
125973
125981
|
fixRegExpWellKnownSymbolLogic$4('replace',2,function(REPLACE,nativeReplace,maybeCallNative,reason){var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;var REPLACE_KEEPS_$0=reason.REPLACE_KEEPS_$0;var UNSAFE_SUBSTITUTE=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?'$':'$0';return [// `String.prototype.replace` method
|
|
125974
125982
|
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
|
125975
125983
|
function replace(searchValue,replaceValue){var O=requireObjectCoercible$1$1(this);var replacer=searchValue==undefined?undefined:searchValue[REPLACE];return replacer!==undefined?replacer.call(searchValue,O,replaceValue):nativeReplace.call(String(O),searchValue,replaceValue);},// `RegExp.prototype[@@replace]` method
|
|
125976
125984
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
|
125977
|
-
function(regexp,replaceValue){if(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE&&REPLACE_KEEPS_$0||typeof replaceValue==='string'&&replaceValue.indexOf(UNSAFE_SUBSTITUTE)===-1){var res=maybeCallNative(nativeReplace,regexp,this,replaceValue);if(res.done)return res.value;}var rx=anObject$i(regexp);var S=String(this);var functionalReplace=typeof replaceValue==='function';if(!functionalReplace)replaceValue=String(replaceValue);var global=rx.global;if(global){var fullUnicode=rx.unicode;rx.lastIndex=0;}var results=[];while(true){var result=regExpExec$3(rx,S);if(result===null)break;results.push(result);if(!global)break;var matchStr=String(result[0]);if(matchStr==='')rx.lastIndex=advanceStringIndex$4(S,toLength$
|
|
125985
|
+
function(regexp,replaceValue){if(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE&&REPLACE_KEEPS_$0||typeof replaceValue==='string'&&replaceValue.indexOf(UNSAFE_SUBSTITUTE)===-1){var res=maybeCallNative(nativeReplace,regexp,this,replaceValue);if(res.done)return res.value;}var rx=anObject$i(regexp);var S=String(this);var functionalReplace=typeof replaceValue==='function';if(!functionalReplace)replaceValue=String(replaceValue);var global=rx.global;if(global){var fullUnicode=rx.unicode;rx.lastIndex=0;}var results=[];while(true){var result=regExpExec$3(rx,S);if(result===null)break;results.push(result);if(!global)break;var matchStr=String(result[0]);if(matchStr==='')rx.lastIndex=advanceStringIndex$4(S,toLength$2(rx.lastIndex),fullUnicode);}var accumulatedResult='';var nextSourcePosition=0;for(var i=0;i<results.length;i++){result=results[i];var matched=String(result[0]);var position=max$1(min$1(toInteger$5(result.index),S.length),0);var captures=[];// NOTE: This is equivalent to
|
|
125978
125986
|
// captures = result.slice(1).map(maybeToString)
|
|
125979
125987
|
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
125980
125988
|
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
125981
125989
|
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
125982
125990
|
for(var j=1;j<result.length;j++)captures.push(maybeToString(result[j]));var namedCaptures=result.groups;if(functionalReplace){var replacerArgs=[matched].concat(captures,position,S);if(namedCaptures!==undefined)replacerArgs.push(namedCaptures);var replacement=String(replaceValue.apply(undefined,replacerArgs));}else {replacement=getSubstitution(matched,S,position,captures,namedCaptures,replaceValue);}if(position>=nextSourcePosition){accumulatedResult+=S.slice(nextSourcePosition,position)+replacement;nextSourcePosition=position+matched.length;}}return accumulatedResult+S.slice(nextSourcePosition);}];// https://tc39.github.io/ecma262/#sec-getsubstitution
|
|
125983
|
-
function getSubstitution(matched,str,position,captures,namedCaptures,replacement){var tailPos=position+matched.length;var m=captures.length;var symbols=SUBSTITUTION_SYMBOLS_NO_NAMED;if(namedCaptures!==undefined){namedCaptures=toObject(namedCaptures);symbols=SUBSTITUTION_SYMBOLS;}return nativeReplace.call(replacement,symbols,function(match,ch){var capture;switch(ch.charAt(0)){case'$':return '$';case'&':return matched;case'`':return str.slice(0,position);case"'":return str.slice(tailPos);case'<':capture=namedCaptures[ch.slice(1,-1)];break;default:// \d\d?
|
|
125991
|
+
function getSubstitution(matched,str,position,captures,namedCaptures,replacement){var tailPos=position+matched.length;var m=captures.length;var symbols=SUBSTITUTION_SYMBOLS_NO_NAMED;if(namedCaptures!==undefined){namedCaptures=toObject$1(namedCaptures);symbols=SUBSTITUTION_SYMBOLS;}return nativeReplace.call(replacement,symbols,function(match,ch){var capture;switch(ch.charAt(0)){case'$':return '$';case'&':return matched;case'`':return str.slice(0,position);case"'":return str.slice(tailPos);case'<':capture=namedCaptures[ch.slice(1,-1)];break;default:// \d\d?
|
|
125984
125992
|
var n=+ch;if(n===0)return match;if(n>m){var f=floor(n/10);if(f===0)return match;if(f<=m)return captures[f-1]===undefined?ch.charAt(1):captures[f-1]+ch.charAt(1);return match;}capture=captures[n-1];}return capture===undefined?'':capture;});}});var classof$a=classofRaw$1;// `IsArray` abstract operation
|
|
125985
125993
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
125986
|
-
var isArray$
|
|
125994
|
+
var isArray$3=Array.isArray||function isArray(arg){return classof$a(arg)=='Array';};var $$2=_export;var isArray$2=isArray$3;var nativeReverse=[].reverse;var test=[1,2];// `Array.prototype.reverse` method
|
|
125987
125995
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reverse
|
|
125988
125996
|
// fix for Safari 12.0 bug
|
|
125989
125997
|
// https://bugs.webkit.org/show_bug.cgi?id=188794
|
|
125990
|
-
$$
|
|
125991
|
-
if(isArray(this))this.length=this.length;return nativeReverse.call(this);}});var CommentList=function CommentList(_a){var type=_a.type,baseAttachmentPath=_a.baseAttachmentPath,items=_a.items,groupIds=_a.groupIds,isLoading=_a.isLoading,onCommentDeleted=_a.onCommentDeleted,scope=_a.scope,mentionSearchHandler=_a.mentionSearchHandler,noItemsYetStringResourceKey=_a.noItemsYetStringResourceKey,getHashtagFilterRoute=_a.getHashtagFilterRoute,onReply=_a.onReply,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUser();var _b=React$d.useState(true),isDialogHidden=_b[0],setIsDialogHidden=_b[1];var commentRef=React$d.useRef(null);var deleteComment=useCommentApi().deleteComment;var showError=useNotificationContext().showError;return jsxRuntime.jsxs("div",__assign({className:classNames(className,'comment-list'),"data-list":"comments"},{children:[jsxRuntime.jsx(ConfirmDialog,{onClose:function(){return setIsDialogHidden(true);},onConfirm:handleDelete,showDialog:!isDialogHidden,titleResourceKey:"Comment.delete.title",infoResourceKey:"Comment.delete.description"},void 0),jsxRuntime.jsx(OpacityAnimation,__assign({leaveDuration:500},{children:items!=null&&items.map(function(comment){var _a;var showAutoTranslate=comment.sender.id!==user.id;return jsxRuntime.jsx(CommentDisplay,{readOnly:readOnly,scope:scope,message:comment,showDelete:canDelete(comment),showEdit:canEdit(comment),onDelete:showDialog,showAutoTranslate:showAutoTranslate,mentionSearchHandler:mentionSearchHandler,type:type,baseAttachmentPath:baseAttachmentPath,getHashtagFilterRoute:getHashtagFilterRoute,highlight:comment.isUnread,isInitialLiked:comment.isLiked,onReply:onReply,replyCount:comment.threadId==null?(_a=comment.statistics)===null||_a===void 0?void 0:_a.replyCount:null},comment.receivedDateTime+comment.sender.id);})}),void 0),items!=null&&items.length===0&&!isLoading&&jsxRuntime.jsx("p",__assign({className:"ms-font-m ms-fontColor-neutralSecondary"},{children:jsxRuntime.jsx(FormattedMessage$1,{id:noItemsYetStringResourceKey},void 0)}),void 0)]}),void 0);function handleDelete(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:if(commentRef.current==null){return [2/*return*/];}onCommentDeleted&&onCommentDeleted(commentRef.current);_b.label=1;case 1:_b.trys.push([1,3,,4]);return [4/*yield*/,deleteComment(type,commentRef.current.conversationScope,commentRef.current.parentItemId,commentRef.current.id)];case 2:_b.sent();return [3/*break*/,4];case 3:_b.sent();showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}function showDialog(comment){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){commentRef.current=comment;setIsDialogHidden(false);return [2/*return*/];});});}function canDelete(comment){return canEdit(comment)||hasMinRoleInAllGroups(GroupRoles.Admin,user,groupIds);}function canEdit(comment){return comment.sender&&comment.sender.id===user.id;}};var CreateCommentWithAttachments=function CreateCommentWithAttachments(props){var ignoreRef=React$d.useRef(false);React$d.useEffect(function(){return function(){ignoreRef.current=true;};},[]);var _a=React$d.useState(createId()),attachmentContainerId=_a[0],setAttachmentContainerId=_a[1];var _b=useAttachmentUploader([],attachmentContainerId,props.baseAttachmentPath),attachments=_b[0],handleAttachmentsAdded=_b[1],clearAttachments=_b[2],deletedAttachmentUrls=_b[3],onDeleteAttachment=_b[4];return jsxRuntime.jsx(CreateComment,__assign({},props,{onPost:handlePost,onAttachmentsChanged:handleAttachmentsAdded,attachments:attachments,deletedAttachmentUrls:deletedAttachmentUrls,onDeleteAttachment:onDeleteAttachment,allowAttachments:!!props.baseAttachmentPath,allowKeywords:props.allowKeywords,placeHolderStringResourceKey:props.placeHolderStringResourceKey,placeHolderStringResourceValues:props.placeHolderStringResourceValues}),void 0);function handlePost(message,keywords){return __awaiter(this,void 0,void 0,function(){var newAttachments;return __generator(this,function(_a){switch(_a.label){case 0:newAttachments=__spreadArray([],attachments);clearAttachments();return [4/*yield*/,props.onPost(message,attachmentContainerId,newAttachments,keywords)];case 1:_a.sent();if(!ignoreRef.current){setAttachmentContainerId(createId());}return [2/*return*/];}});});}};var SortOrder;(function(SortOrder){SortOrder[SortOrder["Asc"]=0]="Asc";SortOrder[SortOrder["Desc"]=1]="Desc";})(SortOrder||(SortOrder={}));var PagedCommentsSection=function PagedCommentsSection(_a){var type=_a.type,baseAttachmentPath=_a.baseAttachmentPath,itemId=_a.itemId,groupIds=_a.groupIds,readOnly=_a.readOnly,loadInReadOnlyMode=_a.loadInReadOnlyMode,scope=_a.scope,_b=_a.initialPageSize,initialPageSize=_b===void 0?2:_b,_c=_a.pageSize,pageSize=_c===void 0?5:_c,mentionSearchHandler=_a.mentionSearchHandler,initialComments=_a.initialComments,onCommentAdded=_a.onCommentAdded,onCommentDeleted=_a.onCommentDeleted,noItemsYetStringResourceKey=_a.noItemsYetStringResourceKey,autoFocusReplyField=_a.autoFocusReplyField,getHashtagFilterRoute=_a.getHashtagFilterRoute,buttons=_a.buttons,threadId=_a.threadId,placeHolderStringResourceKey=_a.placeHolderStringResourceKey,placeHolderStringResourceValues=_a.placeHolderStringResourceValues,showReplyBox=_a.showReplyBox,title=_a.title,onThreadReply=_a.onThreadReply,className=_a.className;var refreshStatistics=useNewsApi().refreshStatistics;var createComment=useCommentApi().createComment;var user=useCurrentUser();var features=useFeatures();var history=ReactRouterDom.useHistory();var location=ReactRouterDom.useLocation();var formatMessage=useIntl().formatMessage;var showError=useNotificationContext().showError;var _d=React$d.useState((initialComments===null||initialComments===void 0?void 0:initialComments.items.length)===0||type!==ItemResourceTypes.Posts||showReplyBox),showNewComment=_d[0],setShowNewComment=_d[1];var _e=React$d.useState(),commentToReplyTo=_e[0],setCommentToReplyTo=_e[1];var _f=React$d.useState(autoFocusReplyField),autoFocusNewCommentInput=_f[0],setAutoFocusNewCommentInput=_f[1];var preventLoading=readOnly&&!loadInReadOnlyMode;var _g=usePageLoader(type,scope,itemId,pageSize,initialPageSize,initialComments,preventLoading,threadId),comments=_g[0],isLoading=_g[1],hasNextPage=_g[2],loadNextPage=_g[3],setComments=_g[4],hasMoreUnreadComments=_g[5];var commentIdsString=(comments!==null&&comments!==void 0?comments:[]).map(function(c){return c.id;}).join(',');React$d.useEffect(function(){var _a;if(commentIdsString.length>0&&((_a=location.state)===null||_a===void 0?void 0:_a.parentCommentId)){if(autoFocusNewCommentInput){return;}var commentContainer=document.getElementById(location.state.parentCommentId);commentContainer===null||commentContainer===void 0?void 0:commentContainer.scrollIntoView(true);history.replace(__assign(__assign({},location),{state:__assign(__assign({},location.state),{parentCommentId:null})}));}// comments changes implicitly 'validates' location state changes
|
|
125998
|
+
$$2({target:'Array',proto:true,forced:String(test)===String(test.reverse())},{reverse:function reverse(){// eslint-disable-next-line no-self-assign
|
|
125999
|
+
if(isArray$2(this))this.length=this.length;return nativeReverse.call(this);}});var CommentList=function CommentList(_a){var type=_a.type,baseAttachmentPath=_a.baseAttachmentPath,items=_a.items,groupIds=_a.groupIds,isLoading=_a.isLoading,onCommentDeleted=_a.onCommentDeleted,scope=_a.scope,mentionSearchHandler=_a.mentionSearchHandler,noItemsYetStringResourceKey=_a.noItemsYetStringResourceKey,getHashtagFilterRoute=_a.getHashtagFilterRoute,onReply=_a.onReply,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUser();var _b=React$d.useState(true),isDialogHidden=_b[0],setIsDialogHidden=_b[1];var commentRef=React$d.useRef(null);var deleteComment=useCommentApi().deleteComment;var showError=useNotificationContext().showError;return jsxRuntime.jsxs("div",__assign({className:classNames(className,'comment-list'),"data-list":"comments"},{children:[jsxRuntime.jsx(ConfirmDialog,{onClose:function(){return setIsDialogHidden(true);},onConfirm:handleDelete,showDialog:!isDialogHidden,titleResourceKey:"Comment.delete.title",infoResourceKey:"Comment.delete.description"},void 0),jsxRuntime.jsx(OpacityAnimation,__assign({leaveDuration:500},{children:items!=null&&items.map(function(comment){var _a;var showAutoTranslate=comment.sender.id!==user.id;return jsxRuntime.jsx(CommentDisplay,{readOnly:readOnly,scope:scope,message:comment,showDelete:canDelete(comment),showEdit:canEdit(comment),onDelete:showDialog,showAutoTranslate:showAutoTranslate,mentionSearchHandler:mentionSearchHandler,type:type,baseAttachmentPath:baseAttachmentPath,getHashtagFilterRoute:getHashtagFilterRoute,highlight:comment.isUnread,isInitialLiked:comment.isLiked,onReply:onReply,replyCount:comment.threadId==null?(_a=comment.statistics)===null||_a===void 0?void 0:_a.replyCount:null},comment.receivedDateTime+comment.sender.id);})}),void 0),items!=null&&items.length===0&&!isLoading&&jsxRuntime.jsx("p",__assign({className:"ms-font-m ms-fontColor-neutralSecondary"},{children:jsxRuntime.jsx(FormattedMessage$1,{id:noItemsYetStringResourceKey},void 0)}),void 0)]}),void 0);function handleDelete(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:if(commentRef.current==null){return [2/*return*/];}onCommentDeleted&&onCommentDeleted(commentRef.current);_b.label=1;case 1:_b.trys.push([1,3,,4]);return [4/*yield*/,deleteComment(type,commentRef.current.conversationScope,commentRef.current.parentItemId,commentRef.current.id)];case 2:_b.sent();return [3/*break*/,4];case 3:_b.sent();showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}function showDialog(comment){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){commentRef.current=comment;setIsDialogHidden(false);return [2/*return*/];});});}function canDelete(comment){return canEdit(comment)||hasMinRoleInAllGroups(GroupRoles.Admin,user,groupIds);}function canEdit(comment){return comment.sender&&comment.sender.id===user.id;}};var CreateCommentWithAttachments=function CreateCommentWithAttachments(props){var ignoreRef=React$d.useRef(false);React$d.useEffect(function(){return function(){ignoreRef.current=true;};},[]);var _a=React$d.useState(createId()),attachmentContainerId=_a[0],setAttachmentContainerId=_a[1];var _b=useAttachmentUploader([],attachmentContainerId,props.baseAttachmentPath),attachments=_b[0],handleAttachmentsAdded=_b[1],clearAttachments=_b[2],deletedAttachmentUrls=_b[3],onDeleteAttachment=_b[4];return jsxRuntime.jsx(CreateComment,__assign({},props,{onPost:handlePost,onAttachmentsChanged:handleAttachmentsAdded,attachments:attachments,deletedAttachmentUrls:deletedAttachmentUrls,onDeleteAttachment:onDeleteAttachment,allowAttachments:!!props.baseAttachmentPath,allowKeywords:props.allowKeywords,placeHolderStringResourceKey:props.placeHolderStringResourceKey,placeHolderStringResourceValues:props.placeHolderStringResourceValues}),void 0);function handlePost(message,keywords){return __awaiter(this,void 0,void 0,function(){var newAttachments;return __generator(this,function(_a){switch(_a.label){case 0:newAttachments=__spreadArray([],attachments);clearAttachments();return [4/*yield*/,props.onPost(message,attachmentContainerId,newAttachments,keywords)];case 1:_a.sent();if(!ignoreRef.current){setAttachmentContainerId(createId());}return [2/*return*/];}});});}};var SortOrder;(function(SortOrder){SortOrder[SortOrder["Asc"]=0]="Asc";SortOrder[SortOrder["Desc"]=1]="Desc";})(SortOrder||(SortOrder={}));var PagedCommentsSection=function PagedCommentsSection(_a){var type=_a.type,baseAttachmentPath=_a.baseAttachmentPath,itemId=_a.itemId,groupIds=_a.groupIds,readOnly=_a.readOnly,loadInReadOnlyMode=_a.loadInReadOnlyMode,scope=_a.scope,_b=_a.initialPageSize,initialPageSize=_b===void 0?2:_b,_c=_a.pageSize,pageSize=_c===void 0?5:_c,mentionSearchHandler=_a.mentionSearchHandler,initialComments=_a.initialComments,onCommentAdded=_a.onCommentAdded,onCommentDeleted=_a.onCommentDeleted,noItemsYetStringResourceKey=_a.noItemsYetStringResourceKey,autoFocusReplyField=_a.autoFocusReplyField,getHashtagFilterRoute=_a.getHashtagFilterRoute,buttons=_a.buttons,threadId=_a.threadId,placeHolderStringResourceKey=_a.placeHolderStringResourceKey,placeHolderStringResourceValues=_a.placeHolderStringResourceValues,showReplyBox=_a.showReplyBox,title=_a.title,onThreadReply=_a.onThreadReply,className=_a.className;var refreshStatistics=useNewsApi().refreshStatistics;var createComment=useCommentApi().createComment;var user=useCurrentUser();var features=useFeatures();var history=ReactRouterDom.useHistory();var location=ReactRouterDom.useLocation();var formatMessage=useIntl().formatMessage;var showError=useNotificationContext().showError;var _d=React$d.useState((initialComments===null||initialComments===void 0?void 0:initialComments.items.length)===0||type!==ItemResourceTypes.Posts||showReplyBox),showNewComment=_d[0],setShowNewComment=_d[1];var _e=React$d.useState(),commentToReplyTo=_e[0],setCommentToReplyTo=_e[1];var _f=React$d.useState(autoFocusReplyField),autoFocusNewCommentInput=_f[0],setAutoFocusNewCommentInput=_f[1];var preventLoading=readOnly&&!loadInReadOnlyMode;var _g=usePageLoader(type,scope,itemId,pageSize,initialPageSize,initialComments,preventLoading,threadId),comments=_g[0],isLoading=_g[1],hasNextPage=_g[2],loadNextPage=_g[3],setComments=_g[4],hasMoreUnreadComments=_g[5];var commentIdsString=(comments!==null&&comments!==void 0?comments:[]).map(function(c){return c.id;}).join(',');React$d.useEffect(function(){var _a;if(commentIdsString.length>0&&((_a=location.state)===null||_a===void 0?void 0:_a.parentCommentId)){if(autoFocusNewCommentInput){return;}var commentContainer=document.getElementById(location.state.parentCommentId);commentContainer===null||commentContainer===void 0?void 0:commentContainer.scrollIntoView(true);history.replace(__assign(__assign({},location),{state:__assign(__assign({},location.state),{parentCommentId:null})}));}// comments changes implicitly 'validates' location state changes
|
|
125992
126000
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125993
126001
|
},[commentIdsString]);var showSpinner=!preventLoading&&isLoading;var showLoadMore=!preventLoading&&hasNextPage&&!isLoading;var showComments=!preventLoading&&(comments===null||comments===void 0?void 0:comments.length)>0;return jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsxs(TitleAndSpinner,{children:[title,showSpinner&&jsxRuntime.jsx(StyledSpinner$1,{},void 0)]},void 0),showLoadMore&&jsxRuntime.jsx(LoadMoreContainer,__assign({"data-load-more-comments-container":true,"data-show-highlight":hasMoreUnreadComments,highlight:hasMoreUnreadComments},{children:jsxRuntime.jsx(LoadMore,{text:formatMessage({id:type===ItemResourceTypes.Posts||threadId!=null?'Post.comments.loadMore':'Comment.loadMore'}),onClick:function(){return loadNextPage();},iconProps:{iconName:'ScrollUpDown'},"data-load-more-comments":true},void 0)}),void 0),showComments&&jsxRuntime.jsx(CommentList,{scope:ConversationScope.Public,items:comments,groupIds:groupIds,isLoading:isLoading,onCommentDeleted:handleCommentDeleted,mentionSearchHandler:mentionSearchHandler,type:type,baseAttachmentPath:baseAttachmentPath,noItemsYetStringResourceKey:noItemsYetStringResourceKey,getHashtagFilterRoute:getHashtagFilterRoute,onReply:handleOnReply,readOnly:readOnly},void 0),!showNewComment&&jsxRuntime.jsx(ReplyButton,{iconProps:{iconName:'Reply'},text:formatMessage({id:'Post.comments.addReply'}),onClick:showNewCommentInput,"data-add-comment":true},void 0),showNewComment&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(NewComment// the key is required to autofocus the reply field when replying to comments
|
|
125994
126002
|
,{readOnly:readOnly,onPost:handleCommentCreated,mentionSearchHandler:mentionSearchHandler,autoFocus:autoFocusNewCommentInput,focusAfterPost:!env.isNativeMobileApp,baseAttachmentPath:baseAttachmentPath,placeHolderStringResourceKey:placeHolderStringResourceKey,placeHolderStringResourceValues:placeHolderStringResourceValues,content:getContent(),allowSaveWithoutContent:true,saveOnCtrlEnter:true},commentToReplyTo===null||commentToReplyTo===void 0?void 0:commentToReplyTo.commentId),!readOnly&&buttons]},void 0)]}),void 0);function getContent(){var _a;return ((_a=commentToReplyTo===null||commentToReplyTo===void 0?void 0:commentToReplyTo.commentSender)===null||_a===void 0?void 0:_a.id)&&commentToReplyTo.commentSender.id!==user.id?constructUserMention(commentToReplyTo.commentSender):null;}function handleOnReply(commentId,commentSender){if(features.replyToComments){history.replace(__assign(__assign({},location),{state:{parentCommentId:"Comment-"+commentId}}));onThreadReply===null||onThreadReply===void 0?void 0:onThreadReply(commentId);setCommentToReplyTo({commentId:commentId,commentSender:commentSender});return;}showNewCommentInput();setCommentToReplyTo({commentId:commentId,commentSender:commentSender});setAutoFocusNewCommentInput(true);}function showNewCommentInput(){if(user.isPublicUser){triggerEvent(PromptPublicUserLoginAction.create());return;}setShowNewComment(true);}function handleCommentDeleted(comment){return __awaiter(this,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:setComments(function(stateComments){return stateComments.filter(function(c){return c.id!==comment.id;});});onCommentDeleted===null||onCommentDeleted===void 0?void 0:onCommentDeleted(comment);_a=!threadId;if(!_a)return [3/*break*/,2];return [4/*yield*/,refreshStatistics(itemId,{commentCount:-1})];case 1:_a=_b.sent();_b.label=2;case 2:return [2/*return*/];}});});}function handleCommentCreated(commentDelta,attachmentContainerId,attachments){return __awaiter(this,void 0,void 0,function(){var newComment,comment_1,_a,error_1;return __generator(this,function(_b){switch(_b.label){case 0:newComment={id:null,parentItemId:itemId,content:commentDelta.content,conversationScope:scope,sender:user,receivedDateTime:moment.utc().toISOString(),attachmentContainerId:attachmentContainerId,attachments:attachments,threadId:threadId,isUnread:false};setComments(function(stateComments){return __spreadArray(__spreadArray([],stateComments),[newComment]);});onCommentAdded===null||onCommentAdded===void 0?void 0:onCommentAdded();_b.label=1;case 1:_b.trys.push([1,5,6,7]);return [4/*yield*/,createComment(type,scope,itemId,__assign(__assign({},commentDelta),{attachmentContainerId:attachmentContainerId,attachments:attachments,threadId:threadId}))];case 2:comment_1=_b.sent();_a=!threadId;if(!_a)return [3/*break*/,4];return [4/*yield*/,refreshStatistics(itemId,{commentCount:1})];case 3:_a=_b.sent();_b.label=4;case 4:setComments(function(stateComments){var _a;return update$1(stateComments,(_a={},_a[stateComments.length-1]={$merge:{id:comment_1.id,fileAccessToken:comment_1.fileAccessToken}},_a));});return [3/*break*/,7];case 5:error_1=_b.sent();logger.error(error_1);showError('Comment.errorMessage');return [3/*break*/,7];case 6:setAutoFocusNewCommentInput(false);setCommentToReplyTo(null);return [7/*endfinally*/];case 7:return [2/*return*/];}});});}};var TitleAndSpinner=_styled__default["default"].div.withConfig({displayName:"PagedCommentsSection__TitleAndSpinner",componentId:"sc-1f3hft1-0"})(templateObject_1$13||(templateObject_1$13=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var ReplyButton=_styled__default["default"](ActionButton).withConfig({displayName:"PagedCommentsSection__ReplyButton",componentId:"sc-1f3hft1-1"})(templateObject_2$D||(templateObject_2$D=__makeTemplateObject(["\n && {\n padding: 0;\n height: auto;\n min-height: 20px;\n border: none;\n color: ",";\n align-self: flex-start;\n }\n"],["\n && {\n padding: 0;\n height: auto;\n min-height: 20px;\n border: none;\n color: ",";\n align-self: flex-start;\n }\n"])),function(p){return p.theme.palette.accent;});var NewComment=_styled__default["default"](CreateCommentWithAttachments).withConfig({displayName:"PagedCommentsSection__NewComment",componentId:"sc-1f3hft1-2"})(templateObject_3$s||(templateObject_3$s=__makeTemplateObject(["\n margin: 10px 0;\n position: relative;\n\n .comment-input__host {\n border: none;\n }\n"],["\n margin: 10px 0;\n position: relative;\n\n .comment-input__host {\n border: none;\n }\n"])));var LoadMoreContainer=_styled__default["default"].div.withConfig({displayName:"PagedCommentsSection__LoadMoreContainer",componentId:"sc-1f3hft1-3"})(templateObject_5$h||(templateObject_5$h=__makeTemplateObject(["\n & ~ .comment-list {\n margin-top: 15px;\n }\n\n ","\n"],["\n & ~ .comment-list {\n margin-top: 15px;\n }\n\n ","\n"])),function(p){return p.highlight&&_styled.css(templateObject_4$i||(templateObject_4$i=__makeTemplateObject(["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: -","px;\n bottom: 0;\n right: -","px;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "],["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: -","px;\n bottom: 0;\n right: -","px;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "])),postsSectionPadding,postsSectionPadding,spacingXs,function(p){return p.theme.palette.accent;});});var LoadMore=_styled__default["default"](ActionButton).withConfig({displayName:"PagedCommentsSection__LoadMore",componentId:"sc-1f3hft1-4"})(templateObject_6$9||(templateObject_6$9=__makeTemplateObject(["\n && {\n text-align: left;\n }\n"],["\n && {\n text-align: left;\n }\n"])));var StyledSpinner$1=_styled__default["default"](Spinner).withConfig({displayName:"PagedCommentsSection__StyledSpinner",componentId:"sc-1f3hft1-5"})(templateObject_7$6||(templateObject_7$6=__makeTemplateObject(["\n margin: 0 auto;\n padding: 15px 0;\n"],["\n margin: 0 auto;\n padding: 15px 0;\n"])));function usePageLoader(type,scope,itemId,pageSize,initialPageSize,initialComments,preventLoading,threadId){var _a=React$d.useState(function(){return __spreadArray([],(initialComments===null||initialComments===void 0?void 0:initialComments.items)||[]).reverse();}),comments=_a[0],setComments=_a[1];var _b=React$d.useState({token:initialComments===null||initialComments===void 0?void 0:initialComments.paginationToken,hasMoreUnreadComments:initialComments===null||initialComments===void 0?void 0:initialComments.hasMoreUnreadComments}),nextPageInfos=_b[0],setNextPageInfos=_b[1];var _c=React$d.useState(!initialComments),isLoading=_c[0],setIsLoading=_c[1];var pullToRefreshContext=React$d.useContext(PullToRefreshContext);var _d=useCommentApi(),listComments=_d.listComments,getCommentReplies=_d.getCommentReplies;// the context can be null, in case we are in the editor
|
|
125995
|
-
var refreshToken=pullToRefreshContext===null||pullToRefreshContext===void 0?void 0:pullToRefreshContext.refreshToken;var refreshUserDetails=useRefreshUserDetails();var isValid=true;React$d.useEffect(function(){if(!isValid||preventLoading){return
|
|
126003
|
+
var refreshToken=pullToRefreshContext===null||pullToRefreshContext===void 0?void 0:pullToRefreshContext.refreshToken;var refreshUserDetails=useRefreshUserDetails();var isValid=true;React$d.useEffect(function(){if(!isValid||preventLoading){return undefined;}if(!initialComments||refreshToken){// pass the pageToken explicitly since it's possible that the nextPageTokenState has not been updated yet
|
|
125996
126004
|
loadNextPage(null,initialPageSize,!!initialComments).then(function(){return null;},logger.error);}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125997
126005
|
return function(){isValid=false;};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125998
|
-
},[initialComments,itemId,refreshToken]);return [comments,isLoading,!!(nextPageInfos===null||nextPageInfos===void 0?void 0:nextPageInfos.token),loadNextPage,setComments,nextPageInfos.hasMoreUnreadComments];function loadNextPage(nextPageTokenOverride,pageSizeOverride,doNotSetIsLoading){return __awaiter(this,void 0,void 0,function(){var nextPage,_a;return __generator(this,function(_b){switch(_b.label){case 0:if(!isValid){return [2/*return*/];}if(!doNotSetIsLoading){setIsLoading(true);}if(!(threadId!=null))return [3/*break*/,2];return [4/*yield*/,getCommentReplies(type,scope,itemId,threadId,{sortOrder:SortOrder.Desc,pageSize:pageSizeOverride!==null&&pageSizeOverride!==void 0?pageSizeOverride:pageSize,token:
|
|
126006
|
+
},[initialComments,itemId,refreshToken]);return [comments,isLoading,!!(nextPageInfos===null||nextPageInfos===void 0?void 0:nextPageInfos.token),loadNextPage,setComments,nextPageInfos.hasMoreUnreadComments];function loadNextPage(nextPageTokenOverride,pageSizeOverride,doNotSetIsLoading){return __awaiter(this,void 0,void 0,function(){var token,nextPage,_a;return __generator(this,function(_b){switch(_b.label){case 0:if(!isValid){return [2/*return*/];}if(!doNotSetIsLoading){setIsLoading(true);}token=nextPageTokenOverride!==undefined?nextPageTokenOverride:nextPageInfos===null||nextPageInfos===void 0?void 0:nextPageInfos.token;if(!(threadId!=null))return [3/*break*/,2];return [4/*yield*/,getCommentReplies(type,scope,itemId,threadId,{sortOrder:SortOrder.Desc,pageSize:pageSizeOverride!==null&&pageSizeOverride!==void 0?pageSizeOverride:pageSize,token:token})];case 1:_a=_b.sent();return [3/*break*/,4];case 2:return [4/*yield*/,listComments(type,scope,itemId,{sortOrder:SortOrder.Desc,pageSize:pageSizeOverride!==null&&pageSizeOverride!==void 0?pageSizeOverride:pageSize,token:token})];case 3:_a=_b.sent();_b.label=4;case 4:nextPage=_a;if(isValid){setIsLoading(false);setComments(function(stateComments){return token!=null?__spreadArray(__spreadArray([],__spreadArray([],nextPage.items).reverse()),stateComments):nextPage.items.reverse();});// refresh the unread count every time we load a new page of comments
|
|
125999
126007
|
refreshUserDetails();setNextPageInfos({token:nextPage.paginationToken,hasMoreUnreadComments:nextPage.hasMoreUnreadComments});}return [2/*return*/];}});});}}var templateObject_1$13,templateObject_2$D,templateObject_3$s,templateObject_4$i,templateObject_5$h,templateObject_6$9,templateObject_7$6;var PublicUserFullAccessButton=function PublicUserFullAccessButton(_a){var user=_a.user,onClick=_a.onClick,descriptionResourceKeyPrefix=_a.descriptionResourceKeyPrefix,descriptionValues=_a.descriptionValues,className=_a.className;var formatMessage=useIntl().formatMessage;var history=ReactRouterDom.useHistory();var location=ReactRouterDom.useLocation();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var shouldRegister=user.subscription.allowSelfRegistration&&user.authenticationType!==AuthenticationType.public;return jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx(PublicUserButtonFocusStyle,{},void 0),descriptionResourceKeyPrefix&&jsxRuntime.jsx(Description$1,{id:descriptionResourceKeyPrefix+"."+(shouldRegister?'register':'login'),values:descriptionValues,tagName:"p"},void 0),jsxRuntime.jsx(officeUiFabricReact.PrimaryButton,{"data-public-access-button":true,text:formatMessage({id:shouldRegister?'SelfRegistration.register':'Subscription.login.caption'}),onClick:handleOnClick},void 0)]}),void 0);function handleOnClick(){onClick===null||onClick===void 0?void 0:onClick();if(shouldRegister){history.push({pathname:buildPath('/register')});}else {history.push({pathname:'/logout',search:queryString.stringify({source:getAppUrl()+buildPath("/login?"+queryString.stringify({source:location.pathname}))})});}}};var PublicUserButtonFocusStyle=_styled.createGlobalStyle(templateObject_1$12||(templateObject_1$12=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return applyFocusStyle("\n button[data-public-access-button]:focus::after {\n outline-color: "+p.theme.palette.accent+" !important;\n outline-offset: 2px;\n }\n ");});var Description$1=_styled__default["default"](FormattedMessageWithStyle).withConfig({displayName:"PublicUserFullAccessButton__Description",componentId:"sc-tjhzmp-0"})(templateObject_2$C||(templateObject_2$C=__makeTemplateObject(["\n margin-top: 0;\n color: ",";\n"],["\n margin-top: 0;\n color: ",";\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$12,templateObject_2$C;var PublishableItemComments=function PublishableItemComments(_a){var item=_a.item,readOnly=_a.readOnly,loadInReadOnlyMode=_a.loadInReadOnlyMode,type=_a.type,onThreadReply=_a.onThreadReply,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var container=React$d.useRef();var location=ReactRouterDom.useLocation();var searchAccountsByItemId=useAccountApi().searchAccountsByItemId;var user=useCurrentUser();React$d.useEffect(function(){// scroll comments container into view if there is the corresponding hash in the path.
|
|
126000
126008
|
// HACK: a regular anchor does not work, because content is rendered
|
|
126001
126009
|
// dynamically and the comments might not be in DOM at the right time.
|
|
@@ -126016,11 +126024,20 @@
|
|
|
126016
126024
|
// we don't want to add the same node again, instead we just need to
|
|
126017
126025
|
// append the children of the node
|
|
126018
126026
|
// we also know then that we don't have to traverse the tree further up and can stop
|
|
126019
|
-
var existingNode=allNodesById[node.id];if(existingNode){if(existingNode.id===page.id){existingNode.isSearchMatch=true;}ensureChildren.apply(void 0,__spreadArray([existingNode],node.children||[]));break;}allNodesById[node.id]=node;if(!((_a=node.parent)===null||_a===void 0?void 0:_a.id)){break;}ensureChildren(node.parent,node);node=node.parent;}});onSearchResultChange(Object.values(allNodesById).filter(function(n){var _a;return !((_a=n.parent)===null||_a===void 0?void 0:_a.id);}));return [2/*return*/];}});});}function ensureChildren(parent){var _a;var children=[];for(var _i=1;_i<arguments.length;_i++){children[_i-1]=arguments[_i];}if(!parent.children){parent.children=[];}parent.children=parent.children.concat(children).sort(function(a,b){return a.position-b.position;});parent.firstChildId=(_a=parent.children[0])===null||_a===void 0?void 0:_a.id;}};var StyledSearchBox=_styled__default["default"](officeUiFabricReact.SearchBox).withConfig({displayName:"PageTocSearch__StyledSearchBox",componentId:"sc-1enxv6b-0"})(templateObject_1$B||(templateObject_1$B=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);var templateObject_1$B;function filterChildren(page,activePage){if(!activePage){return true;}if(activePage.status===WorkflowStatus.deleted){return page.status===WorkflowStatus.deleted;}return page.status!==WorkflowStatus.deleted&&activePage.isUnlinked===page.isUnlinked;}var ExternalPagesLinkButton=function ExternalPagesLinkButton(_a){var item=_a.item,disabled=_a.disabled,onClick=_a.onClick,className=_a.className;var user=useCurrentUser();var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;if(!item.useExternalContent){return null;}var resourceKey="ExternalLinkButton.pages"+(!url?'.noUrl':'')+".navigateTo";return jsxRuntime.jsx(Tooltip,__assign({className:className,resourceKey:resourceKey,values:url?{url:url}:undefined,width:url?400:undefined},{children:jsxRuntime.jsx(StyledIconButton$4,{iconProps:{iconName:'NavigateExternalInline',styles:{root:{fontSize:fontSizeMedium+4+"px",height:fontSizeMedium+4+"px"}}},onClick:handleClick,disabled:disabled,"aria-label":formatMessage({id:resourceKey},url?{url:url}:undefined)},void 0)}),void 0);function handleClick(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){if(onClick){onClick(e);return [2/*return*/];}createPageClickHandler(item)(e);return [2/*return*/];});});}};var StyledIconButton$4=_styled__default["default"](IconButton).withConfig({displayName:"ExternalPagesLinkButton__StyledIconButton",componentId:"sc-1n1ybv7-0"})(templateObject_1$A||(templateObject_1$A=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$A;var PageNode=function PageNode(_a){var node=_a.node,activePage=_a.activePage,navigationContext=_a.navigationContext,loadChildren=_a.loadChildren,basePath=_a.basePath,path=_a.path,className=_a.className,isRootNode=_a.isRootNode,hide=_a.hide,onPageSelected=_a.onPageSelected,selectedPageId=_a.selectedPageId;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var nodesContainNavigation=navigationContext==null;var _b=React$d.useState(null),lazyLoadedChildren=_b[0],setLazyLoadedChildren=_b[1];var children=lazyLoadedChildren||getChildren(node.id).filter(function(n){return filterChildren(n,activePage);});var _c=React$d.useState(undefined),forceShowChildren=_c[0],setForceShowChildren=_c[1];var showChildren=forceShowChildren||children&&forceShowChildren!==false&&(nodesContainNavigation||path.some(function(p){return p===node.id;})||(activePage===null||activePage===void 0?void 0:activePage.id)===node.id);var title=getTitle(node,user,formatMessage);var isSelectedPageNode=(activePage===null||activePage===void 0?void 0:activePage.id)===node.id||selectedPageId===node.id;var iconName=getIconName();var isExpanded=iconName==='ChevronDown';var isHighlighted=isSelectedPageNode||path.some(function(p){return p===node.id;});var appBasePath=basePath?buildPath(basePath):null;var isSearchMatch=node.isSearchMatch?'true':null;var isDocument=node.pageType===PageType.Document;var detailViewUrl=""+NewsService.getNewsRoute(appBasePath,node.id,title)+(node.useExternalContent?"?"+queryString.stringify({noRedirect:true}):'');return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(NodeWrapper,__assign({isFirstLevel:isRootNode,hide:hide,className:className,isActive:isSelectedPageNode,"data-page-toc-node":true,"data-is-active":isSelectedPageNode},{children:[!!iconName?jsxRuntime.jsx(StyledIconButton$3,{iconProps:{iconName:iconName},onClick:function(){return __awaiter(void 0,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:if(!!(children===null||children===void 0?void 0:children.length))return [3/*break*/,2];_a=setLazyLoadedChildren;return [4/*yield*/,loadChildren(node.id)];case 1:_a.apply(void 0,[_b.sent()]);_b.label=2;case 2:setForceShowChildren(!showChildren);return [2/*return*/];}});});},isHighlighted:isHighlighted,isExpanded:isExpanded,ariaLabel:formatMessage({id:isExpanded?'AriaLabel.hideChildren':'AriaLabel.seeChildren'}),"data-toc-node-toggle-children":node.id},void 0):jsxRuntime.jsx(StyledIcon$2$1,{isHighlighted:isHighlighted},void 0),basePath?jsxRuntime.jsx(NodeTitleLink,__assign({onClick:createPageClickHandler(node,basePath,function(){return onPageSelected===null||onPageSelected===void 0?void 0:onPageSelected(node.id);},true),to:detailViewUrl,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):onPageSelected?jsxRuntime.jsx(NodeTitleButton,__assign({onClick:function(){return onPageSelected(node.id);},disabled:isDocument,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):jsxRuntime.jsx(NodeTitle,__assign({bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0),jsxRuntime.jsx(StyledExternalLinkButton,{item:node},void 0),jsxRuntime.jsx(StyledDocumentDownloadButton$1,{page:node,basePath:basePath},void 0)]}),void 0),children.length>0&&jsxRuntime.jsx(ChildrenList,__assign({hide:hide},{children:children.map(function(c){return jsxRuntime.jsx("li",{children:jsxRuntime.jsx(PageNode,{hide:!showChildren,basePath:basePath,node:c,activePage:activePage,navigationContext:navigationContext,loadChildren:loadChildren,path:path,isRootNode:false,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id);})}),void 0)]},void 0);function getIconName(){var _a;if(!nodesContainNavigation&&!node.firstChildId||nodesContainNavigation&&!((_a=node.children)===null||_a===void 0?void 0:_a.length)){return null;}if(showChildren){return 'ChevronDown';}return 'ChevronRight';}function getChildren(nodeId){if(nodesContainNavigation){return node.children||[];}if((activePage===null||activePage===void 0?void 0:activePage.id)===nodeId){return navigationContext.children||[];}var result=navigationContext.parent;while(result!=null&&result.id!==nodeId){result=result.parent;}return result?result.children:[];}};var NodeWrapper=_styled__default["default"].div.withConfig({displayName:"PageTocNode__NodeWrapper",componentId:"sc-1ftr1ym-0"})(templateObject_3$l||(templateObject_3$l=__makeTemplateObject(["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"],["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"])),function(p){return p.hide&&'display: none;';},function(p){return !p.isFirstLevel&&_styled.css(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n padding-left: ","px;\n margin-top: ","px;\n "],["\n padding-left: ","px;\n margin-top: ","px;\n "])),spacingS,spacingS+5);},function(p){return p.isActive&&_styled.css(templateObject_2$q||(templateObject_2$q=__makeTemplateObject(["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "],["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.neutralQuaternaryAlt;});},spacingXs,minScreenSize.small);var IconNormalSize=20;var IconLargeSize=26;var IconBubbleStyle=function IconBubbleStyle(isHighlighted){return _styled.css(templateObject_6$6||(templateObject_6$6=__makeTemplateObject(["\n ",";\n "],["\n ",";\n "])),isHighlighted?_styled.css(templateObject_4$d||(templateObject_4$d=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.accent;},function(p){return p.theme.palette.white;}):_styled.css(templateObject_5$c||(templateObject_5$c=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.neutralQuaternary;},function(p){return p.theme.palette.black;}));};var StyledIconButton$3=_styled__default["default"](officeUiFabricReact.IconButton).withConfig({displayName:"PageTocNode__StyledIconButton",componentId:"sc-1ftr1ym-1"})(templateObject_8$4$1||(templateObject_8$4$1=__makeTemplateObject(["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"],["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"])),IconLargeSize,IconLargeSize,IconLargeSize,function(p){return p.isExpanded&&_styled.css(templateObject_7$4$1||(templateObject_7$4$1=__makeTemplateObject(["\n i {\n transform: translate(0, 1px);\n }\n "],["\n i {\n transform: translate(0, 1px);\n }\n "])));},function(p){return IconBubbleStyle(p.isHighlighted);},minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledIcon$2$1=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PageTocNode__StyledIcon",componentId:"sc-1ftr1ym-2"})(templateObject_9$3||(templateObject_9$3=__makeTemplateObject(["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"],["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"])),IconLargeSize,IconLargeSize,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize,function(p){return IconBubbleStyle(p.isHighlighted);});var NodeTitleStyle=_styled.css(templateObject_11$1$1||(templateObject_11$1$1=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"],["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"])),spacingM,fontSizeNormal,function(p){return p.theme.textColors.default;},function(p){return p.bold&&_styled.css(templateObject_10$2$1||(templateObject_10$2$1=__makeTemplateObject(["\n font-weight: bold;\n "],["\n font-weight: bold;\n "])));},minScreenSize.small,fontSizeSmall);var NodeTitleLink=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PageTocNode__NodeTitleLink",componentId:"sc-1ftr1ym-3"})(templateObject_12$1$1||(templateObject_12$1$1=__makeTemplateObject(["\n ",";\n\n && {\n color: ",";\n }\n"],["\n ",";\n\n && {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.textColors.default;});var NodeTitleButton=_styled__default["default"](ActionButton).withConfig({displayName:"PageTocNode__NodeTitleButton",componentId:"sc-1ftr1ym-4"})(templateObject_13$1$1||(templateObject_13$1$1=__makeTemplateObject(["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"],["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.palette.neutralQuaternary;});var NodeTitle=_styled__default["default"].div.withConfig({displayName:"PageTocNode__NodeTitle",componentId:"sc-1ftr1ym-5"})(templateObject_14$1$1||(templateObject_14$1$1=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),NodeTitleStyle);var ChildrenList=_styled__default["default"].ul.withConfig({displayName:"PageTocNode__ChildrenList",componentId:"sc-1ftr1ym-6"})(templateObject_15$1$1||(templateObject_15$1$1=__makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"],["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"])),function(p){return p.hide&&'display: none;';},spacingS);var StyledExternalLinkButton=_styled__default["default"](ExternalPagesLinkButton).withConfig({displayName:"PageTocNode__StyledExternalLinkButton",componentId:"sc-1ftr1ym-7"})(templateObject_16$1$1||(templateObject_16$1$1=__makeTemplateObject(["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"])),spacingS,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledDocumentDownloadButton$1=_styled__default["default"](DocumentDownloadButton).withConfig({displayName:"PageTocNode__StyledDocumentDownloadButton",componentId:"sc-1ftr1ym-8"})(templateObject_17$1||(templateObject_17$1=__makeTemplateObject(["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"])),IconLargeSize,spacingS-5,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var templateObject_1$z,templateObject_2$q,templateObject_3$l,templateObject_4$d,templateObject_5$c,templateObject_6$6,templateObject_7$4$1,templateObject_8$4$1,templateObject_9$3,templateObject_10$2$1,templateObject_11$1$1,templateObject_12$1$1,templateObject_13$1$1,templateObject_14$1$1,templateObject_15$1$1,templateObject_16$1$1,templateObject_17$1;var PageTableOfContents$1=function PageTableOfContents(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onPageSelected=_a.onPageSelected,className=_a.className,selectedPageId=_a.selectedPageId,isLoading=_a.isLoading,disableScrollableList=_a.disableScrollableList;var user=useCurrentUser();var _b=getRootNodes(),rootNodes=_b.rootNodes,path=_b.path;var _c=React$d.useState(),searchResult=_c[0],setSearchResult=_c[1];if(isLoading){return jsxRuntime.jsx(Spinner,{},void 0);}if(!rootNodes||(rootNodes===null||rootNodes===void 0?void 0:rootNodes.length)===0){return jsxRuntime.jsx(FormattedMessageWithStyle,{id:"ContentEditor.parentPage.emptyToc",tagName:"div",className:className},void 0);}var activePage=activePageId&&navigationContext.siblings.find(function(p){return p.id===activePageId;});var nodesToDisplay=sortPageNodesByGroupAndPosition(user.groups,(searchResult||rootNodes).filter(function(p){return filterChildren(p,activePage);}));return jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx("div",__assign({"data-toc-search-container":true},{children:jsxRuntime.jsx(PageTocSearch,{onSearch:onSearch,onSearchResultChange:setSearchResult},void 0)}),void 0),searchResult&&!searchResult.length&&jsxRuntime.jsx(TocEmptyList,{icon:"Search",emptyMessageResources:['EmptySearchResult.info']},void 0),nodesToDisplay&&jsxRuntime.jsx(TocListContainer,__assign({"data-toc-scrollable-container":true,isScrollable:!disableScrollableList},{children:jsxRuntime.jsx(TocList,{children:nodesToDisplay.map(function(c){return jsxRuntime.jsx(ToCItem,{children:jsxRuntime.jsx(PageNode,{basePath:basePath,node:c,activePage:activePage,navigationContext:searchResult?null:navigationContext,loadChildren:loadChildren,path:path,isRootNode:true,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id+!!searchResult);})},void 0)}),void 0)]}),void 0)},void 0);function getRootNodes(){if(!(navigationContext===null||navigationContext===void 0?void 0:navigationContext.parent)){return {rootNodes:(navigationContext===null||navigationContext===void 0?void 0:navigationContext.siblings)||[],path:[]};}var path=[];var currentParent=navigationContext.parent;while(currentParent!=null&¤tParent.parent!=null){path.push(currentParent.id);currentParent=currentParent.parent;}return {rootNodes:(currentParent===null||currentParent===void 0?void 0:currentParent.children)||[],path:path};}};var TocEmptyList=_styled__default["default"](EmptyList).withConfig({displayName:"PageTableOfContents__TocEmptyList",componentId:"sc-3llzkd-0"})(templateObject_1$y||(templateObject_1$y=__makeTemplateObject(["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"],["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"])),fontSizeLarger+10);var TocListContainer=_styled__default["default"].div.withConfig({displayName:"PageTableOfContents__TocListContainer",componentId:"sc-3llzkd-1"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n padding-top: ","px;\n\n ","\n"],["\n padding-top: ","px;\n\n ","\n"])),spacingXs,function(p){return p.isScrollable&&_styled.css(templateObject_2$p||(templateObject_2$p=__makeTemplateObject(["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "],["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "])));});var TocList=_styled__default["default"].ul.withConfig({displayName:"PageTableOfContents__TocList",componentId:"sc-3llzkd-2"})(templateObject_4$c||(templateObject_4$c=__makeTemplateObject(["\n list-style: none;\n padding: 0;\n margin: 0;\n"],["\n list-style: none;\n padding: 0;\n margin: 0;\n"])));var ToCItem=_styled__default["default"].li.withConfig({displayName:"PageTableOfContents__ToCItem",componentId:"sc-3llzkd-3"})(templateObject_5$b||(templateObject_5$b=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);_styled__default["default"](PageTableOfContents$1).withConfig({displayName:"PageTableOfContents__StyledPageToC",componentId:"sc-3llzkd-4"})(templateObject_6$5$1||(templateObject_6$5$1=__makeTemplateObject(["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"],["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"])),spacingM,spacingM,spacingM);var templateObject_1$y,templateObject_2$p,templateObject_3$k,templateObject_4$c,templateObject_5$b,templateObject_6$5$1;var PageTableOfContentsDialog=function PageTableOfContentsDialog(_a){var isOpen=_a.isOpen,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onDismiss=_a.onDismiss,basePath=_a.basePath;var formatMessage=useIntl().formatMessage;if(!navigationContext){return null;}return jsxRuntime.jsx(MobileFullHeightDialog,__assign({hidden:!isOpen,modalProps:{className:'dialog-toc'},dialogContentProps:{type:officeUiFabricReact.DialogType.close},onDismiss:onDismiss,title:formatMessage({id:'Pages.pagesTableOfContents'})},{children:jsxRuntime.jsxs(DialogContent,__assign({className:"dialog-content-host","data-toc-dialog":true},{children:[jsxRuntime.jsx(DialogGlobalStyle,{},void 0),jsxRuntime.jsx(PageTableOfContents$1,{basePath:basePath,activePageId:activePageId,navigationContext:navigationContext,loadChildren:loadChildren,onSearch:onSearch,onPageSelected:onDismiss,disableScrollableList:true},void 0)]}),void 0)}),void 0);};var DialogContent=_styled__default["default"].div.withConfig({displayName:"PageTableOfContentsDialog__DialogContent",componentId:"sc-z2sdu7-0"})(templateObject_1$x||(templateObject_1$x=__makeTemplateObject(["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"],["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle=_styled.createGlobalStyle(templateObject_2$o||(templateObject_2$o=__makeTemplateObject(["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"],["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$x,templateObject_2$o;var LanguageSelector=function LanguageSelector(props){var history=ReactRouterDom.useHistory();var currentUser=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var getAllLanguagesLocalized=useLanguageApi().getAllLanguagesLocalized;var intl=useIntl();var formatMessage=intl.formatMessage;var languageDefinitions=usePromise$2(function(){return getAllLanguagesLocalized(intl);})[0];var features=useFeatures();if(languageDefinitions==null){return null;}if(props.chromeless)return jsxRuntime.jsx(ActionButton,__assign({iconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout'},className:classNames(props.className,'header-button')},{children:formatMessage({id:"Generic.languages."+props.selectedLanguage})}),void 0);return jsxRuntime.jsx(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsxRuntime.jsx(LanguageSelectorButton,{menuIconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout',isBeakVisible:props.showBeak},className:classNames(props.className,'header-button'),"data-language-selector-button":true,ariaLabel:formatMessage({id:'AriaLabel.autoTranslation'})},void 0)}),void 0);function getContextualMenuItems(){if(props.languages==null){return [];}var menuItems=[];var preferredLanguageItem=getPreferredLanguageItem();if(preferredLanguageItem){menuItems.push(preferredLanguageItem);}var activeLanguagesItems=getActiveLanguagesItems();activeLanguagesItems.sort(function(a,b){return a.text.localeCompare(b.text);});menuItems=menuItems.concat(activeLanguagesItems);if(!props.hideEditLanguagePreferences){var editLanguagePreferencesItem={key:'edit',text:formatMessage({id:'Generic.editLanguagePreferences'}),iconProps:{iconName:'PlayerSettings'},onClick:handleEditLanguagePreferences,className:'lt-reach-languageselector-menu-item'};menuItems.push(editLanguagePreferencesItem);}return menuItems;}function handleEditLanguagePreferences(){if(props.onEditLanguagePreferencesClick){props.onEditLanguagePreferencesClick();}else {history.push(buildPath('/user'));}}function getActiveLanguagesItems(){return props.languages.map(function(l){var fullLanguage=languageDefinitions.find(function(ld){return ld.code===l;});return {key:l,text:fullLanguage.localizedName,iconProps:{iconName:'World'},onClick:function(){return props.onLanguageChange(l.toString());},className:classNames('lt-reach-languageselector-menu-item',l===props.selectedLanguage&&'selected')};});}function getPreferredLanguageItem(){if(!features.automaticTranslation){return null;}if(!props.onTranslateClick){return null;}var preferredContentLanguage=getPreferredContentLanguage(currentUser);var shouldAddPreferredContentLanguage=preferredContentLanguage!=null&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguage)&&allAvailableContentLanguages.includes(preferredContentLanguage)&&props.languages.indexOf(preferredContentLanguage)<0;if(!shouldAddPreferredContentLanguage){return null;}return {key:preferredContentLanguage,text:formatMessage({id:'Generic.automaticTranslation'},{language:formatMessage({id:"Generic.languages."+preferredContentLanguage})}),iconProps:{iconName:'Robot'},onClick:function(){return props.onTranslateClick(preferredContentLanguage);},className:classNames('lt-reach-languageselector-menu-item',preferredContentLanguage===props.selectedLanguage&&'selected')};}};var LanguageSelectorButton=_styled__default["default"](IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$w||(templateObject_1$w=__makeTemplateObject(["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"],["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"])));var templateObject_1$w;_styled__default["default"].article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$v||(templateObject_1$v=__makeTemplateObject(["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"],["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"])),minScreenSize.large+1,maxContentWidth);var templateObject_1$v;_styled__default["default"](ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$u||(templateObject_1$u=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"],["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"])),fontSizeSmall);var templateObject_1$u;var StateIcon=function StateIcon(_a){var status=_a.status,isActive=_a.isActive,_b=_a.width,width=_b===void 0?16:_b,activeColor=_a.activeColor;var textColors=React$d.useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsxRuntime.jsx(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsxRuntime.jsx(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsxRuntime.jsx(Ready,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}return null;};var Draft=function Draft(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?16.25:_b;var ratio=20/16.25;return jsxRuntime.jsx("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 16.25 20",enableBackground:"new 0 0 16.25 20"},{children:jsxRuntime.jsx("path",{fill:color,d:"M10,6.25V0h0.89l5.36,5.361V6.25H10z M11.25,5h2.861L11.25,2.139V5z M10,0H9.25v1.25H10V0z M7.675,1.25H6.1\n\tV0h1.575V1.25z M4.525,1.25H2.95V0h1.575V1.25z M1.25,17.057H0v-1.567h1.25V17.057z M1.25,13.921H0v-1.568h1.25V13.921z\n\t M1.25,10.784H0V9.216h1.25V10.784z M1.25,7.647H0V6.08h1.25V7.647z M1.25,4.512H0V2.943h1.25V4.512z M13.375,\n\t 20h-1.5v-1.25h1.5V20z\n\t M10.375,20h-1.5v-1.25h1.5V20z M7.375,20h-1.5v-1.25h1.5V20z M4.375,20h-1.5v-1.25h1.5V20z M16.25,\n\t 16.964H15v-1.661h1.25V16.964z\n\t M16.25,13.643H15v-1.661h1.25V13.643z M16.25,10.321H15V8.66h1.25V10.321z M16.25,6.25H15V7h1.25V6.25z\n\t M1.25,18.75H0V20h1.25\n\tV18.75z M1.25,0H0v1.25h1.25V0z M16.25,18.75H15V20h1.25V18.75z"},void 0)}),void 0);};var Ready=function Ready(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?18.564:_b;var ratio=20/18.564;return jsxRuntime.jsx("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 18.564 20",enableBackground:"new 0 0 18.564 20"},{children:jsxRuntime.jsx("path",{fill:color,d:"M10,6.25v-5H1.25v17.5H10V20H0V0h10.889l5.361,5.361V12.5L15,13.75v-7.5H10z M18.564,14.551L13.125,20\n \tl-2.627-2.637l0.879-0.879l1.748,1.738l4.561-4.551L18.564,14.551z M11.25,5h2.861L11.25,2.139V5z"},void 0)}),void 0);};function useCommonEditorApi(){var api=useApi();return React$d.useMemo(function(){return {list:list,getTaskViewCounts:getTaskViewCounts};function list(type,filter,token,sortDefinition){var params=Object.assign({},filter,{token:token},sortDefinition);return api.custom("editor/"+type+"?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function getTaskViewCounts(type,groupId){return __awaiter(this,void 0,void 0,function(){var response;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,api.custom("editor/"+type+"/taskcounts?"+queryString.stringify({groupId:groupId})).get(groupId)];case 1:response=_a.sent();return [4/*yield*/,response.body().data()];case 2:return [2/*return*/,_a.sent()];}});});}},[api]);}var SortFieldsDefinitionBuilder=/** @class */function(){function SortFieldsDefinitionBuilder(){this.sort=[];}SortFieldsDefinitionBuilder.prototype.addSortField=function(field,direction){this.sort.push(field+":"+SortFieldsDefinitionBuilder.getSortDirectionAsString(direction));return this;};SortFieldsDefinitionBuilder.getSortDirectionAsString=function(direction){return direction===SortDirection.asc?'asc':'desc';};return SortFieldsDefinitionBuilder;}();var EventSortFieldsDefinitionBuilder=/** @class */function(_super){__extends(EventSortFieldsDefinitionBuilder,_super);function EventSortFieldsDefinitionBuilder(){return _super!==null&&_super.apply(this,arguments)||this;}EventSortFieldsDefinitionBuilder.create=function(){return new EventSortFieldsDefinitionBuilder();};return EventSortFieldsDefinitionBuilder;}(SortFieldsDefinitionBuilder);EventSortFieldsDefinitionBuilder.create().addSortField('startDate',SortDirection.desc);EventSortFieldsDefinitionBuilder.create().addSortField('publishingDate',SortDirection.desc);var BaseFilterDefinitionImpl=/** @class */function(){function BaseFilterDefinitionImpl(){}return BaseFilterDefinitionImpl;}();__spreadArray(__spreadArray([],Object.keys(new BaseFilterDefinitionImpl())),['hideChrome','teams']);_styled__default["default"].div.withConfig({displayName:"InsertVideoDialog__VideoHost",componentId:"sc-12gp7sa-0"})(templateObject_1$t||(templateObject_1$t=__makeTemplateObject(["\n max-width: 510px;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"],["\n max-width: 510px;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"])),spacingS);var templateObject_1$t;_styled__default["default"].div.withConfig({displayName:"KeywordPickerGroup__Host",componentId:"sc-pu16jm-0"})(templateObject_1$s||(templateObject_1$s=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);_styled__default["default"](ActionButton).withConfig({displayName:"KeywordPickerGroup__GroupButton",componentId:"sc-pu16jm-1"})(templateObject_2$n||(templateObject_2$n=__makeTemplateObject(["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"],["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"])),fontSizeNormal,fontSizeSmall);_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"KeywordPickerGroup__CheckMarkIcon",componentId:"sc-pu16jm-2"})(templateObject_3$j||(templateObject_3$j=__makeTemplateObject(["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"],["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"])));_styled__default["default"].span.withConfig({displayName:"KeywordPickerGroup__ButtonLabel",componentId:"sc-pu16jm-3"})(templateObject_5$a||(templateObject_5$a=__makeTemplateObject(["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"],["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"])),function(p){return !p.isSelected&&_styled.css(templateObject_4$b||(templateObject_4$b=__makeTemplateObject(["\n margin-left: 33px; // checkmark icon space\n "],["\n margin-left: 33px; // checkmark icon space\n "])));});_styled__default["default"].ul.withConfig({displayName:"KeywordPickerGroup__KeywordsList",componentId:"sc-pu16jm-4"})(templateObject_7$3$1||(templateObject_7$3$1=__makeTemplateObject(["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"],["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"])),function(p){return p.isCollapsed&&_styled.css(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n display: none;\n "],["\n display: none;\n "])));},spacingX+10);_styled__default["default"].li.withConfig({displayName:"KeywordPickerGroup__KeywordItem",componentId:"sc-pu16jm-5"})(templateObject_8$3$1||(templateObject_8$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"],["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"])));var templateObject_1$s,templateObject_2$n,templateObject_3$j,templateObject_4$b,templateObject_5$a,templateObject_6$4$1,templateObject_7$3$1,templateObject_8$3$1;_styled__default["default"].div.withConfig({displayName:"KeywordPicker__KeywordPickerTree",componentId:"sc-1ejjfwa-0"})(templateObject_1$r||(templateObject_1$r=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled__default["default"](ToggleAllButtons).withConfig({displayName:"KeywordPicker__StyledToggleAllButtons",componentId:"sc-1ejjfwa-1"})(templateObject_2$m||(templateObject_2$m=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled__default["default"].div.withConfig({displayName:"KeywordPicker__Host",componentId:"sc-1ejjfwa-2"})(templateObject_3$i||(templateObject_3$i=__makeTemplateObject(["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"],["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"])));_styled__default["default"].div.withConfig({displayName:"KeywordPicker__SearchHost",componentId:"sc-1ejjfwa-3"})(templateObject_4$a||(templateObject_4$a=__makeTemplateObject(["\n position: relative;\n margin-bottom: 8px;\n"],["\n position: relative;\n margin-bottom: 8px;\n"])));_styled__default["default"](IconButton).withConfig({displayName:"KeywordPicker__SearchCancelButton",componentId:"sc-1ejjfwa-4"})(templateObject_5$9||(templateObject_5$9=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"])));var templateObject_1$r,templateObject_2$m,templateObject_3$i,templateObject_4$a,templateObject_5$9;var $$f=_export;var requireObjectCoercible$c=requireObjectCoercible$b;var isRegExp=isRegexp;var getRegExpFlags=regexpFlags$1$1;var wellKnownSymbol$l=wellKnownSymbol$k;var REPLACE$2=wellKnownSymbol$l('replace');var RegExpPrototype$3=RegExp.prototype;// `String.prototype.replaceAll` method
|
|
126027
|
+
var existingNode=allNodesById[node.id];if(existingNode){if(existingNode.id===page.id){existingNode.isSearchMatch=true;}ensureChildren.apply(void 0,__spreadArray([existingNode],node.children||[]));break;}allNodesById[node.id]=node;if(!((_a=node.parent)===null||_a===void 0?void 0:_a.id)){break;}ensureChildren(node.parent,node);node=node.parent;}});onSearchResultChange(Object.values(allNodesById).filter(function(n){var _a;return !((_a=n.parent)===null||_a===void 0?void 0:_a.id);}));return [2/*return*/];}});});}function ensureChildren(parent){var _a;var children=[];for(var _i=1;_i<arguments.length;_i++){children[_i-1]=arguments[_i];}if(!parent.children){parent.children=[];}parent.children=parent.children.concat(children).sort(function(a,b){return a.position-b.position;});parent.firstChildId=(_a=parent.children[0])===null||_a===void 0?void 0:_a.id;}};var StyledSearchBox=_styled__default["default"](officeUiFabricReact.SearchBox).withConfig({displayName:"PageTocSearch__StyledSearchBox",componentId:"sc-1enxv6b-0"})(templateObject_1$B||(templateObject_1$B=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);var templateObject_1$B;function filterChildren(page,activePage){if(!activePage){return true;}if(activePage.status===WorkflowStatus.deleted){return page.status===WorkflowStatus.deleted;}return page.status!==WorkflowStatus.deleted&&activePage.isUnlinked===page.isUnlinked;}var ExternalPagesLinkButton=function ExternalPagesLinkButton(_a){var item=_a.item,disabled=_a.disabled,onClick=_a.onClick,className=_a.className;var user=useCurrentUser();var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;if(!item.useExternalContent){return null;}var resourceKey="ExternalLinkButton.pages"+(!url?'.noUrl':'')+".navigateTo";return jsxRuntime.jsx(Tooltip,__assign({className:className,resourceKey:resourceKey,values:url?{url:url}:undefined,width:url?400:undefined},{children:jsxRuntime.jsx(StyledIconButton$4,{iconProps:{iconName:'NavigateExternalInline',styles:{root:{fontSize:fontSizeMedium+4+"px",height:fontSizeMedium+4+"px"}}},onClick:handleClick,disabled:disabled,"aria-label":formatMessage({id:resourceKey},url?{url:url}:undefined)},void 0)}),void 0);function handleClick(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){if(onClick){onClick(e);return [2/*return*/];}createPageClickHandler(item)(e);return [2/*return*/];});});}};var StyledIconButton$4=_styled__default["default"](IconButton).withConfig({displayName:"ExternalPagesLinkButton__StyledIconButton",componentId:"sc-1n1ybv7-0"})(templateObject_1$A||(templateObject_1$A=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$A;var PageNode=function PageNode(_a){var node=_a.node,activePage=_a.activePage,navigationContext=_a.navigationContext,loadChildren=_a.loadChildren,basePath=_a.basePath,path=_a.path,className=_a.className,isRootNode=_a.isRootNode,hide=_a.hide,onPageSelected=_a.onPageSelected,selectedPageId=_a.selectedPageId;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var nodesContainNavigation=navigationContext==null;var _b=React$d.useState(null),lazyLoadedChildren=_b[0],setLazyLoadedChildren=_b[1];var children=lazyLoadedChildren||getChildren(node.id).filter(function(n){return filterChildren(n,activePage);});var _c=React$d.useState(undefined),forceShowChildren=_c[0],setForceShowChildren=_c[1];var showChildren=forceShowChildren||children&&forceShowChildren!==false&&(nodesContainNavigation||path.some(function(p){return p===node.id;})||(activePage===null||activePage===void 0?void 0:activePage.id)===node.id);var title=getTitle(node,user,formatMessage);var isSelectedPageNode=(activePage===null||activePage===void 0?void 0:activePage.id)===node.id||selectedPageId===node.id;var iconName=getIconName();var isExpanded=iconName==='ChevronDown';var isHighlighted=isSelectedPageNode||path.some(function(p){return p===node.id;});var appBasePath=basePath?buildPath(basePath):null;var isSearchMatch=node.isSearchMatch?'true':null;var isDocument=node.pageType===PageType.Document;var detailViewUrl=""+NewsService.getNewsRoute(appBasePath,node.id,title)+(node.useExternalContent?"?"+queryString.stringify({noRedirect:true}):'');return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(NodeWrapper,__assign({isFirstLevel:isRootNode,hide:hide,className:className,isActive:isSelectedPageNode,"data-page-toc-node":true,"data-is-active":isSelectedPageNode},{children:[!!iconName?jsxRuntime.jsx(StyledIconButton$3,{iconProps:{iconName:iconName},onClick:function(){return __awaiter(void 0,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:if(!!(children===null||children===void 0?void 0:children.length))return [3/*break*/,2];_a=setLazyLoadedChildren;return [4/*yield*/,loadChildren(node.id)];case 1:_a.apply(void 0,[_b.sent()]);_b.label=2;case 2:setForceShowChildren(!showChildren);return [2/*return*/];}});});},isHighlighted:isHighlighted,isExpanded:isExpanded,ariaLabel:formatMessage({id:isExpanded?'AriaLabel.hideChildren':'AriaLabel.seeChildren'}),"data-toc-node-toggle-children":node.id},void 0):jsxRuntime.jsx(StyledIcon$2$1,{isHighlighted:isHighlighted},void 0),basePath?jsxRuntime.jsx(NodeTitleLink,__assign({onClick:createPageClickHandler(node,basePath,function(){return onPageSelected===null||onPageSelected===void 0?void 0:onPageSelected(node.id);},true),to:detailViewUrl,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):onPageSelected?jsxRuntime.jsx(NodeTitleButton,__assign({onClick:function(){return onPageSelected(node.id);},disabled:isDocument,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):jsxRuntime.jsx(NodeTitle,__assign({bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0),jsxRuntime.jsx(StyledExternalLinkButton,{item:node},void 0),jsxRuntime.jsx(StyledDocumentDownloadButton$1,{page:node,basePath:basePath},void 0)]}),void 0),children.length>0&&jsxRuntime.jsx(ChildrenList,__assign({hide:hide},{children:children.map(function(c){return jsxRuntime.jsx("li",{children:jsxRuntime.jsx(PageNode,{hide:!showChildren,basePath:basePath,node:c,activePage:activePage,navigationContext:navigationContext,loadChildren:loadChildren,path:path,isRootNode:false,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id);})}),void 0)]},void 0);function getIconName(){var _a;if(!nodesContainNavigation&&!node.firstChildId||nodesContainNavigation&&!((_a=node.children)===null||_a===void 0?void 0:_a.length)){return null;}if(showChildren){return 'ChevronDown';}return 'ChevronRight';}function getChildren(nodeId){if(nodesContainNavigation){return node.children||[];}if((activePage===null||activePage===void 0?void 0:activePage.id)===nodeId){return navigationContext.children||[];}var result=navigationContext.parent;while(result!=null&&result.id!==nodeId){result=result.parent;}return result?result.children:[];}};var NodeWrapper=_styled__default["default"].div.withConfig({displayName:"PageTocNode__NodeWrapper",componentId:"sc-1ftr1ym-0"})(templateObject_3$l||(templateObject_3$l=__makeTemplateObject(["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"],["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"])),function(p){return p.hide&&'display: none;';},function(p){return !p.isFirstLevel&&_styled.css(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n padding-left: ","px;\n margin-top: ","px;\n "],["\n padding-left: ","px;\n margin-top: ","px;\n "])),spacingS,spacingS+5);},function(p){return p.isActive&&_styled.css(templateObject_2$q||(templateObject_2$q=__makeTemplateObject(["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "],["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.neutralQuaternaryAlt;});},spacingXs,minScreenSize.small);var IconNormalSize=20;var IconLargeSize=26;var IconBubbleStyle=function IconBubbleStyle(isHighlighted){return _styled.css(templateObject_6$6||(templateObject_6$6=__makeTemplateObject(["\n ",";\n "],["\n ",";\n "])),isHighlighted?_styled.css(templateObject_4$d||(templateObject_4$d=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.accent;},function(p){return p.theme.palette.white;}):_styled.css(templateObject_5$c||(templateObject_5$c=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.neutralQuaternary;},function(p){return p.theme.palette.black;}));};var StyledIconButton$3=_styled__default["default"](officeUiFabricReact.IconButton).withConfig({displayName:"PageTocNode__StyledIconButton",componentId:"sc-1ftr1ym-1"})(templateObject_8$4$1||(templateObject_8$4$1=__makeTemplateObject(["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"],["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"])),IconLargeSize,IconLargeSize,IconLargeSize,function(p){return p.isExpanded&&_styled.css(templateObject_7$4$1||(templateObject_7$4$1=__makeTemplateObject(["\n i {\n transform: translate(0, 1px);\n }\n "],["\n i {\n transform: translate(0, 1px);\n }\n "])));},function(p){return IconBubbleStyle(p.isHighlighted);},minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledIcon$2$1=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PageTocNode__StyledIcon",componentId:"sc-1ftr1ym-2"})(templateObject_9$3||(templateObject_9$3=__makeTemplateObject(["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"],["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"])),IconLargeSize,IconLargeSize,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize,function(p){return IconBubbleStyle(p.isHighlighted);});var NodeTitleStyle=_styled.css(templateObject_11$1$1||(templateObject_11$1$1=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"],["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"])),spacingM,fontSizeNormal,function(p){return p.theme.textColors.default;},function(p){return p.bold&&_styled.css(templateObject_10$2$1||(templateObject_10$2$1=__makeTemplateObject(["\n font-weight: bold;\n "],["\n font-weight: bold;\n "])));},minScreenSize.small,fontSizeSmall);var NodeTitleLink=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PageTocNode__NodeTitleLink",componentId:"sc-1ftr1ym-3"})(templateObject_12$1$1||(templateObject_12$1$1=__makeTemplateObject(["\n ",";\n\n && {\n color: ",";\n }\n"],["\n ",";\n\n && {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.textColors.default;});var NodeTitleButton=_styled__default["default"](ActionButton).withConfig({displayName:"PageTocNode__NodeTitleButton",componentId:"sc-1ftr1ym-4"})(templateObject_13$1$1||(templateObject_13$1$1=__makeTemplateObject(["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"],["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.palette.neutralQuaternary;});var NodeTitle=_styled__default["default"].div.withConfig({displayName:"PageTocNode__NodeTitle",componentId:"sc-1ftr1ym-5"})(templateObject_14$1$1||(templateObject_14$1$1=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),NodeTitleStyle);var ChildrenList=_styled__default["default"].ul.withConfig({displayName:"PageTocNode__ChildrenList",componentId:"sc-1ftr1ym-6"})(templateObject_15$1$1||(templateObject_15$1$1=__makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"],["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"])),function(p){return p.hide&&'display: none;';},spacingS);var StyledExternalLinkButton=_styled__default["default"](ExternalPagesLinkButton).withConfig({displayName:"PageTocNode__StyledExternalLinkButton",componentId:"sc-1ftr1ym-7"})(templateObject_16$1$1||(templateObject_16$1$1=__makeTemplateObject(["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"])),spacingS,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledDocumentDownloadButton$1=_styled__default["default"](DocumentDownloadButton).withConfig({displayName:"PageTocNode__StyledDocumentDownloadButton",componentId:"sc-1ftr1ym-8"})(templateObject_17$1||(templateObject_17$1=__makeTemplateObject(["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"])),IconLargeSize,spacingS-5,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var templateObject_1$z,templateObject_2$q,templateObject_3$l,templateObject_4$d,templateObject_5$c,templateObject_6$6,templateObject_7$4$1,templateObject_8$4$1,templateObject_9$3,templateObject_10$2$1,templateObject_11$1$1,templateObject_12$1$1,templateObject_13$1$1,templateObject_14$1$1,templateObject_15$1$1,templateObject_16$1$1,templateObject_17$1;var PageTableOfContents$1=function PageTableOfContents(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onPageSelected=_a.onPageSelected,className=_a.className,selectedPageId=_a.selectedPageId,isLoading=_a.isLoading,disableScrollableList=_a.disableScrollableList;var user=useCurrentUser();var _b=getRootNodes(),rootNodes=_b.rootNodes,path=_b.path;var _c=React$d.useState(),searchResult=_c[0],setSearchResult=_c[1];if(isLoading){return jsxRuntime.jsx(Spinner,{},void 0);}if(!rootNodes||(rootNodes===null||rootNodes===void 0?void 0:rootNodes.length)===0){return jsxRuntime.jsx(FormattedMessageWithStyle,{id:"ContentEditor.parentPage.emptyToc",tagName:"div",className:className},void 0);}var activePage=activePageId&&navigationContext.siblings.find(function(p){return p.id===activePageId;});var nodesToDisplay=sortPageNodesByGroupAndPosition(user.groups,(searchResult||rootNodes).filter(function(p){return filterChildren(p,activePage);}));return jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx("div",__assign({"data-toc-search-container":true},{children:jsxRuntime.jsx(PageTocSearch,{onSearch:onSearch,onSearchResultChange:setSearchResult},void 0)}),void 0),searchResult&&!searchResult.length&&jsxRuntime.jsx(TocEmptyList,{icon:"Search",emptyMessageResources:['EmptySearchResult.info']},void 0),nodesToDisplay&&jsxRuntime.jsx(TocListContainer,__assign({"data-toc-scrollable-container":true,isScrollable:!disableScrollableList},{children:jsxRuntime.jsx(TocList,{children:nodesToDisplay.map(function(c){return jsxRuntime.jsx(ToCItem,{children:jsxRuntime.jsx(PageNode,{basePath:basePath,node:c,activePage:activePage,navigationContext:searchResult?null:navigationContext,loadChildren:loadChildren,path:path,isRootNode:true,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id+!!searchResult);})},void 0)}),void 0)]}),void 0)},void 0);function getRootNodes(){if(!(navigationContext===null||navigationContext===void 0?void 0:navigationContext.parent)){return {rootNodes:(navigationContext===null||navigationContext===void 0?void 0:navigationContext.siblings)||[],path:[]};}var path=[];var currentParent=navigationContext.parent;while(currentParent!=null&¤tParent.parent!=null){path.push(currentParent.id);currentParent=currentParent.parent;}return {rootNodes:(currentParent===null||currentParent===void 0?void 0:currentParent.children)||[],path:path};}};var TocEmptyList=_styled__default["default"](EmptyList).withConfig({displayName:"PageTableOfContents__TocEmptyList",componentId:"sc-3llzkd-0"})(templateObject_1$y||(templateObject_1$y=__makeTemplateObject(["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"],["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"])),fontSizeLarger+10);var TocListContainer=_styled__default["default"].div.withConfig({displayName:"PageTableOfContents__TocListContainer",componentId:"sc-3llzkd-1"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n padding-top: ","px;\n\n ","\n"],["\n padding-top: ","px;\n\n ","\n"])),spacingXs,function(p){return p.isScrollable&&_styled.css(templateObject_2$p||(templateObject_2$p=__makeTemplateObject(["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "],["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "])));});var TocList=_styled__default["default"].ul.withConfig({displayName:"PageTableOfContents__TocList",componentId:"sc-3llzkd-2"})(templateObject_4$c||(templateObject_4$c=__makeTemplateObject(["\n list-style: none;\n padding: 0;\n margin: 0;\n"],["\n list-style: none;\n padding: 0;\n margin: 0;\n"])));var ToCItem=_styled__default["default"].li.withConfig({displayName:"PageTableOfContents__ToCItem",componentId:"sc-3llzkd-3"})(templateObject_5$b||(templateObject_5$b=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);_styled__default["default"](PageTableOfContents$1).withConfig({displayName:"PageTableOfContents__StyledPageToC",componentId:"sc-3llzkd-4"})(templateObject_6$5$1||(templateObject_6$5$1=__makeTemplateObject(["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"],["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"])),spacingM,spacingM,spacingM);var templateObject_1$y,templateObject_2$p,templateObject_3$k,templateObject_4$c,templateObject_5$b,templateObject_6$5$1;var PageTableOfContentsDialog=function PageTableOfContentsDialog(_a){var isOpen=_a.isOpen,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onDismiss=_a.onDismiss,basePath=_a.basePath;var formatMessage=useIntl().formatMessage;if(!navigationContext){return null;}return jsxRuntime.jsx(MobileFullHeightDialog,__assign({hidden:!isOpen,modalProps:{className:'dialog-toc'},dialogContentProps:{type:officeUiFabricReact.DialogType.close},onDismiss:onDismiss,title:formatMessage({id:'Pages.pagesTableOfContents'})},{children:jsxRuntime.jsxs(DialogContent,__assign({className:"dialog-content-host","data-toc-dialog":true},{children:[jsxRuntime.jsx(DialogGlobalStyle,{},void 0),jsxRuntime.jsx(PageTableOfContents$1,{basePath:basePath,activePageId:activePageId,navigationContext:navigationContext,loadChildren:loadChildren,onSearch:onSearch,onPageSelected:onDismiss,disableScrollableList:true},void 0)]}),void 0)}),void 0);};var DialogContent=_styled__default["default"].div.withConfig({displayName:"PageTableOfContentsDialog__DialogContent",componentId:"sc-z2sdu7-0"})(templateObject_1$x||(templateObject_1$x=__makeTemplateObject(["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"],["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle=_styled.createGlobalStyle(templateObject_2$o||(templateObject_2$o=__makeTemplateObject(["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"],["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$x,templateObject_2$o;var LanguageSelector=function LanguageSelector(props){var history=ReactRouterDom.useHistory();var currentUser=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var getAllLanguagesLocalized=useLanguageApi().getAllLanguagesLocalized;var intl=useIntl();var formatMessage=intl.formatMessage;var languageDefinitions=usePromise$2(function(){return getAllLanguagesLocalized(intl);})[0];var features=useFeatures();if(languageDefinitions==null){return null;}if(props.chromeless)return jsxRuntime.jsx(ActionButton,__assign({iconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout'},className:classNames(props.className,'header-button')},{children:formatMessage({id:"Generic.languages."+props.selectedLanguage})}),void 0);return jsxRuntime.jsx(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsxRuntime.jsx(LanguageSelectorButton,{menuIconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout',isBeakVisible:props.showBeak},className:classNames(props.className,'header-button'),"data-language-selector-button":true,ariaLabel:formatMessage({id:'AriaLabel.autoTranslation'})},void 0)}),void 0);function getContextualMenuItems(){if(props.languages==null){return [];}var menuItems=[];var preferredLanguageItem=getPreferredLanguageItem();if(preferredLanguageItem){menuItems.push(preferredLanguageItem);}var activeLanguagesItems=getActiveLanguagesItems();activeLanguagesItems.sort(function(a,b){return a.text.localeCompare(b.text);});menuItems=menuItems.concat(activeLanguagesItems);if(!props.hideEditLanguagePreferences){var editLanguagePreferencesItem={key:'edit',text:formatMessage({id:'Generic.editLanguagePreferences'}),iconProps:{iconName:'PlayerSettings'},onClick:handleEditLanguagePreferences,className:'lt-reach-languageselector-menu-item'};menuItems.push(editLanguagePreferencesItem);}return menuItems;}function handleEditLanguagePreferences(){if(props.onEditLanguagePreferencesClick){props.onEditLanguagePreferencesClick();}else {history.push(buildPath('/user'));}}function getActiveLanguagesItems(){return props.languages.map(function(l){var fullLanguage=languageDefinitions.find(function(ld){return ld.code===l;});return {key:l,text:fullLanguage.localizedName,iconProps:{iconName:'World'},onClick:function(){return props.onLanguageChange(l.toString());},className:classNames('lt-reach-languageselector-menu-item',l===props.selectedLanguage&&'selected')};});}function getPreferredLanguageItem(){if(!features.automaticTranslation){return null;}if(!props.onTranslateClick){return null;}var preferredContentLanguage=getPreferredContentLanguage(currentUser);var shouldAddPreferredContentLanguage=preferredContentLanguage!=null&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguage)&&allAvailableContentLanguages.includes(preferredContentLanguage)&&props.languages.indexOf(preferredContentLanguage)<0;if(!shouldAddPreferredContentLanguage){return null;}return {key:preferredContentLanguage,text:formatMessage({id:'Generic.automaticTranslation'},{language:formatMessage({id:"Generic.languages."+preferredContentLanguage})}),iconProps:{iconName:'Robot'},onClick:function(){return props.onTranslateClick(preferredContentLanguage);},className:classNames('lt-reach-languageselector-menu-item',preferredContentLanguage===props.selectedLanguage&&'selected')};}};var LanguageSelectorButton=_styled__default["default"](IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$w||(templateObject_1$w=__makeTemplateObject(["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"],["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"])));var templateObject_1$w;_styled__default["default"].article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$v||(templateObject_1$v=__makeTemplateObject(["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"],["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"])),minScreenSize.large+1,maxContentWidth);var templateObject_1$v;_styled__default["default"](ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$u||(templateObject_1$u=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"],["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"])),fontSizeSmall);var templateObject_1$u;var StateIcon=function StateIcon(_a){var status=_a.status,isActive=_a.isActive,_b=_a.width,width=_b===void 0?16:_b,activeColor=_a.activeColor;var textColors=React$d.useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsxRuntime.jsx(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsxRuntime.jsx(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsxRuntime.jsx(Ready,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}return null;};var Draft=function Draft(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?16.25:_b;var ratio=20/16.25;return jsxRuntime.jsx("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 16.25 20",enableBackground:"new 0 0 16.25 20"},{children:jsxRuntime.jsx("path",{fill:color,d:"M10,6.25V0h0.89l5.36,5.361V6.25H10z M11.25,5h2.861L11.25,2.139V5z M10,0H9.25v1.25H10V0z M7.675,1.25H6.1\n\tV0h1.575V1.25z M4.525,1.25H2.95V0h1.575V1.25z M1.25,17.057H0v-1.567h1.25V17.057z M1.25,13.921H0v-1.568h1.25V13.921z\n\t M1.25,10.784H0V9.216h1.25V10.784z M1.25,7.647H0V6.08h1.25V7.647z M1.25,4.512H0V2.943h1.25V4.512z M13.375,\n\t 20h-1.5v-1.25h1.5V20z\n\t M10.375,20h-1.5v-1.25h1.5V20z M7.375,20h-1.5v-1.25h1.5V20z M4.375,20h-1.5v-1.25h1.5V20z M16.25,\n\t 16.964H15v-1.661h1.25V16.964z\n\t M16.25,13.643H15v-1.661h1.25V13.643z M16.25,10.321H15V8.66h1.25V10.321z M16.25,6.25H15V7h1.25V6.25z\n\t M1.25,18.75H0V20h1.25\n\tV18.75z M1.25,0H0v1.25h1.25V0z M16.25,18.75H15V20h1.25V18.75z"},void 0)}),void 0);};var Ready=function Ready(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?18.564:_b;var ratio=20/18.564;return jsxRuntime.jsx("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 18.564 20",enableBackground:"new 0 0 18.564 20"},{children:jsxRuntime.jsx("path",{fill:color,d:"M10,6.25v-5H1.25v17.5H10V20H0V0h10.889l5.361,5.361V12.5L15,13.75v-7.5H10z M18.564,14.551L13.125,20\n \tl-2.627-2.637l0.879-0.879l1.748,1.738l4.561-4.551L18.564,14.551z M11.25,5h2.861L11.25,2.139V5z"},void 0)}),void 0);};function useCommonEditorApi(){var api=useApi();return React$d.useMemo(function(){return {list:list,getTaskViewCounts:getTaskViewCounts};function list(type,filter,token,sortDefinition){var params=Object.assign({},filter,{token:token},sortDefinition);return api.custom("editor/"+type+"?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function getTaskViewCounts(type,groupId){return __awaiter(this,void 0,void 0,function(){var response;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,api.custom("editor/"+type+"/taskcounts?"+queryString.stringify({groupId:groupId})).get(groupId)];case 1:response=_a.sent();return [4/*yield*/,response.body().data()];case 2:return [2/*return*/,_a.sent()];}});});}},[api]);}var SortFieldsDefinitionBuilder=/** @class */function(){function SortFieldsDefinitionBuilder(){this.sort=[];}SortFieldsDefinitionBuilder.prototype.addSortField=function(field,direction){this.sort.push(field+":"+SortFieldsDefinitionBuilder.getSortDirectionAsString(direction));return this;};SortFieldsDefinitionBuilder.getSortDirectionAsString=function(direction){return direction===SortDirection.asc?'asc':'desc';};return SortFieldsDefinitionBuilder;}();var EventSortFieldsDefinitionBuilder=/** @class */function(_super){__extends(EventSortFieldsDefinitionBuilder,_super);function EventSortFieldsDefinitionBuilder(){return _super!==null&&_super.apply(this,arguments)||this;}EventSortFieldsDefinitionBuilder.create=function(){return new EventSortFieldsDefinitionBuilder();};return EventSortFieldsDefinitionBuilder;}(SortFieldsDefinitionBuilder);EventSortFieldsDefinitionBuilder.create().addSortField('startDate',SortDirection.desc);EventSortFieldsDefinitionBuilder.create().addSortField('publishingDate',SortDirection.desc);var BaseFilterDefinitionImpl=/** @class */function(){function BaseFilterDefinitionImpl(){}return BaseFilterDefinitionImpl;}();__spreadArray(__spreadArray([],Object.keys(new BaseFilterDefinitionImpl())),['hideChrome','teams']);_styled__default["default"].div.withConfig({displayName:"InsertVideoDialog__VideoHost",componentId:"sc-12gp7sa-0"})(templateObject_1$t||(templateObject_1$t=__makeTemplateObject(["\n max-width: 510px;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"],["\n max-width: 510px;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"])),spacingS);var templateObject_1$t;_styled__default["default"].div.withConfig({displayName:"KeywordPickerGroup__Host",componentId:"sc-pu16jm-0"})(templateObject_1$s||(templateObject_1$s=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);_styled__default["default"](ActionButton).withConfig({displayName:"KeywordPickerGroup__GroupButton",componentId:"sc-pu16jm-1"})(templateObject_2$n||(templateObject_2$n=__makeTemplateObject(["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"],["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"])),fontSizeNormal,fontSizeSmall);_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"KeywordPickerGroup__CheckMarkIcon",componentId:"sc-pu16jm-2"})(templateObject_3$j||(templateObject_3$j=__makeTemplateObject(["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"],["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"])));_styled__default["default"].span.withConfig({displayName:"KeywordPickerGroup__ButtonLabel",componentId:"sc-pu16jm-3"})(templateObject_5$a||(templateObject_5$a=__makeTemplateObject(["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"],["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"])),function(p){return !p.isSelected&&_styled.css(templateObject_4$b||(templateObject_4$b=__makeTemplateObject(["\n margin-left: 33px; // checkmark icon space\n "],["\n margin-left: 33px; // checkmark icon space\n "])));});_styled__default["default"].ul.withConfig({displayName:"KeywordPickerGroup__KeywordsList",componentId:"sc-pu16jm-4"})(templateObject_7$3$1||(templateObject_7$3$1=__makeTemplateObject(["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"],["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"])),function(p){return p.isCollapsed&&_styled.css(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n display: none;\n "],["\n display: none;\n "])));},spacingX+10);_styled__default["default"].li.withConfig({displayName:"KeywordPickerGroup__KeywordItem",componentId:"sc-pu16jm-5"})(templateObject_8$3$1||(templateObject_8$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"],["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"])));var templateObject_1$s,templateObject_2$n,templateObject_3$j,templateObject_4$b,templateObject_5$a,templateObject_6$4$1,templateObject_7$3$1,templateObject_8$3$1;_styled__default["default"].div.withConfig({displayName:"KeywordPicker__KeywordPickerTree",componentId:"sc-1ejjfwa-0"})(templateObject_1$r||(templateObject_1$r=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled__default["default"](ToggleAllButtons).withConfig({displayName:"KeywordPicker__StyledToggleAllButtons",componentId:"sc-1ejjfwa-1"})(templateObject_2$m||(templateObject_2$m=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled__default["default"].div.withConfig({displayName:"KeywordPicker__Host",componentId:"sc-1ejjfwa-2"})(templateObject_3$i||(templateObject_3$i=__makeTemplateObject(["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"],["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"])));_styled__default["default"].div.withConfig({displayName:"KeywordPicker__SearchHost",componentId:"sc-1ejjfwa-3"})(templateObject_4$a||(templateObject_4$a=__makeTemplateObject(["\n position: relative;\n margin-bottom: 8px;\n"],["\n position: relative;\n margin-bottom: 8px;\n"])));_styled__default["default"](IconButton).withConfig({displayName:"KeywordPicker__SearchCancelButton",componentId:"sc-1ejjfwa-4"})(templateObject_5$9||(templateObject_5$9=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"])));var templateObject_1$r,templateObject_2$m,templateObject_3$i,templateObject_4$a,templateObject_5$9;var $$1$1=_export;var requireObjectCoercible$c=requireObjectCoercible$b;var isRegExp=isRegexp;var getRegExpFlags=regexpFlags$1$1;var wellKnownSymbol$1=wellKnownSymbol$l;var REPLACE$2=wellKnownSymbol$1('replace');var RegExpPrototype$3=RegExp.prototype;// `String.prototype.replaceAll` method
|
|
126020
126028
|
// https://github.com/tc39/proposal-string-replace-all
|
|
126021
|
-
$$f({target:'String',proto:true},{replaceAll:function replaceAll(searchValue,replaceValue){var O=requireObjectCoercible$c(this);var IS_REG_EXP,flags,replacer,string,searchString,template,result,position,index;if(searchValue!=null){IS_REG_EXP=isRegExp(searchValue);if(IS_REG_EXP){flags=String(requireObjectCoercible$c('flags'in RegExpPrototype$3?searchValue.flags:getRegExpFlags.call(searchValue)));if(!~flags.indexOf('g'))throw TypeError('`.replaceAll` does not allow non-global regexes');}replacer=searchValue[REPLACE$2];if(replacer!==undefined){return replacer.call(searchValue,O,replaceValue);}}string=String(O);searchString=String(searchValue);if(searchString==='')return replaceAll.call(string,/(?:)/g,replaceValue);template=string.split(searchString);if(typeof replaceValue!=='function'){return template.join(String(replaceValue));}result=template[0];position=result.length;for(index=1;index<template.length;index++){result+=String(replaceValue(searchString,position,string));position+=searchString.length+template[index].length;result+=template[index];}return result;}});_styled__default["default"].div.withConfig({displayName:"Textarea__Host",componentId:"sc-170lrb4-0"})(templateObject_1$q||(templateObject_1$q=__makeTemplateObject(["\n display: flex;\n align-items: flex-end;\n position: relative;\n"],["\n display: flex;\n align-items: flex-end;\n position: relative;\n"])));_styled__default["default"].textarea.withConfig({displayName:"Textarea__StyledTextarea",componentId:"sc-170lrb4-1"})(templateObject_2$l||(templateObject_2$l=__makeTemplateObject(["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"],["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"])),InputPlaceholder('font-style: italic'));_styled__default["default"](officeUiFabricReact.IconButton).withConfig({displayName:"Textarea__StyledIconButton",componentId:"sc-170lrb4-2"})(templateObject_3$h||(templateObject_3$h=__makeTemplateObject(["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"],["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"])));var templateObject_1$q,templateObject_2$l,templateObject_3$h;_styled.createGlobalStyle(templateObject_1$p||(templateObject_1$p=__makeTemplateObject(["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"],["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"])));_styled.createGlobalStyle(templateObject_2$k||(templateObject_2$k=__makeTemplateObject(["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"],["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"])),function(p){return p.theme.palette.accent;});_styled__default["default"].div.withConfig({displayName:"DateTimePicker__Host",componentId:"sc-zzs3p0-0"})(templateObject_3$g||(templateObject_3$g=__makeTemplateObject(["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"],["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"])),InputPlaceholder("\n color: inherit;\n font-style: italic;\n "));var templateObject_1$p,templateObject_2$k,templateObject_3$g;var InsertFilesDialogHost=_styled__default["default"].div.withConfig({displayName:"InsertFilesButton__InsertFilesDialogHost",componentId:"sc-1q7gx3n-0"})(templateObject_2$j||(templateObject_2$j=__makeTemplateObject(["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"],["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"])),function(p){return p.isActive&&_styled.css(templateObject_1$o||(templateObject_1$o=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "])));},spacingM);_styled__default["default"].p.withConfig({displayName:"InsertFilesButton__DragAndDropText",componentId:"sc-1q7gx3n-1"})(templateObject_3$f||(templateObject_3$f=__makeTemplateObject(["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"],["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"])),fontSizeSmall,spacingS);_styled__default["default"](officeUiFabricReact.DefaultButton).withConfig({displayName:"InsertFilesButton__SelectFileButton",componentId:"sc-1q7gx3n-2"})(templateObject_4$9$1||(templateObject_4$9$1=__makeTemplateObject(["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"],["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"])),spacingM);_styled__default["default"].div.withConfig({displayName:"InsertFilesButton__ButtonsContainer",componentId:"sc-1q7gx3n-3"})(templateObject_5$8||(templateObject_5$8=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));var templateObject_1$o,templateObject_2$j,templateObject_3$f,templateObject_4$9$1,templateObject_5$8;_styled__default["default"](InsertFilesDialogHost).withConfig({displayName:"InsertImagesButton__Host",componentId:"sc-63tjy6-0"})(templateObject_1$n||(templateObject_1$n=__makeTemplateObject(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));_styled__default["default"](officeUiFabricReact.PrimaryButton).withConfig({displayName:"InsertImagesButton__StyledButton",componentId:"sc-63tjy6-1"})(templateObject_2$i||(templateObject_2$i=__makeTemplateObject(["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"],["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"])));_styled__default["default"].div.withConfig({displayName:"InsertImagesButton__Text",componentId:"sc-63tjy6-2"})(templateObject_3$e||(templateObject_3$e=__makeTemplateObject(["\n max-width: 100%;\n font-size: large;\n"],["\n max-width: 100%;\n font-size: large;\n"])));var templateObject_1$n,templateObject_2$i,templateObject_3$e;var DateRange;(function(DateRange){DateRange[DateRange["TwoYears"]=0]="TwoYears";DateRange[DateRange["OneYear"]=1]="OneYear";DateRange[DateRange["SixMonths"]=2]="SixMonths";DateRange[DateRange["TwoMonths"]=3]="TwoMonths";DateRange[DateRange["OneMonth"]=4]="OneMonth";DateRange[DateRange["SevenDays"]=5]="SevenDays";DateRange[DateRange["YesterDay"]=6]="YesterDay";DateRange[DateRange["Today"]=7]="Today";})(DateRange||(DateRange={}));Object.keys(DateRange).length/2-1;_styled__default["default"].div.withConfig({displayName:"DateRangeSlider__Host",componentId:"sc-1o5vacm-0"})(templateObject_1$m||(templateObject_1$m=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"])));_styled__default["default"].div.withConfig({displayName:"DateRangeSlider__Value",componentId:"sc-1o5vacm-1"})(templateObject_2$h||(templateObject_2$h=__makeTemplateObject(["\n align-self: flex-end;\n margin-right: 10px;\n"],["\n align-self: flex-end;\n margin-right: 10px;\n"])));_styled__default["default"].div.withConfig({displayName:"DateRangeSlider__Labels",componentId:"sc-1o5vacm-2"})(templateObject_3$d||(templateObject_3$d=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"],["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"])));var templateObject_1$m,templateObject_2$h,templateObject_3$d;_styled__default["default"](IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$l||(templateObject_1$l=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$l;_styled__default["default"].div.withConfig({displayName:"CardStyles__Host",componentId:"sc-ovm8js-0"})(templateObject_1$k||(templateObject_1$k=__makeTemplateObject(["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"],["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"])),spacingM,spacingM,spacingM);var Intro$3=_styled__default["default"].p.withConfig({displayName:"CardStyles__Intro",componentId:"sc-ovm8js-1"})(templateObject_2$g||(templateObject_2$g=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"])),fontSizeSmall,spacingM-3);var templateObject_1$k,templateObject_2$g;_styled__default["default"].p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$j$1||(templateObject_1$j$1=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled__default["default"].h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$f||(templateObject_2$f=__makeTemplateObject(["\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"],["\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"])),spacingS);_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"NewsCard__StyledNavLink",componentId:"sc-rf9b9y-2"})(templateObject_3$c||(templateObject_3$c=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});_styled__default["default"].div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$8$1||(templateObject_4$8$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"])));_styled__default["default"](ClickableChannelTitles).withConfig({displayName:"NewsCard__Channels",componentId:"sc-rf9b9y-4"})(templateObject_5$7$1||(templateObject_5$7$1=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$j$1,templateObject_2$f,templateObject_3$c,templateObject_4$8$1,templateObject_5$7$1;_styled__default["default"].div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$i$1||(templateObject_1$i$1=__makeTemplateObject(["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"],["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"])),function(p){return p.theme.palette.neutralTertiary;});_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$e||(templateObject_2$e=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$i$1,templateObject_2$e;_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$h$1||(templateObject_1$h$1=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$d||(templateObject_2$d=__makeTemplateObject(["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"],["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"])));_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__AlertIconOuterContainer",componentId:"sc-drndfq-2"})(templateObject_3$b||(templateObject_3$b=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$7$1||(templateObject_4$7$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"])));_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PromotedNewsItem__StyledIcon",componentId:"sc-drndfq-4"})(templateObject_5$6$1||(templateObject_5$6$1=__makeTemplateObject(["\n font-size: 25px;\n color: white;\n"],["\n font-size: 25px;\n color: white;\n"])));_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__ContentContainer",componentId:"sc-drndfq-5"})(templateObject_6$3$1||(templateObject_6$3$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n"],["\n display: flex;\n width: 100%;\n"])));_styled__default["default"](DateTime).withConfig({displayName:"PromotedNewsItem__StyledDate",componentId:"sc-drndfq-6"})(templateObject_7$2$1||(templateObject_7$2$1=__makeTemplateObject(["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.small);_styled__default["default"].h2.withConfig({displayName:"PromotedNewsItem__Title",componentId:"sc-drndfq-7"})(templateObject_8$2$1||(templateObject_8$2$1=__makeTemplateObject(["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"],["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"])),maxScreenSize.xLarge,maxScreenSize.large,maxScreenSize.medium,maxScreenSize.small);_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__BookmarkContainer",componentId:"sc-drndfq-8"})(templateObject_9$2$1||(templateObject_9$2$1=__makeTemplateObject(["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"],["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"])));_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__TextContainer",componentId:"sc-drndfq-9"})(templateObject_10$1$1||(templateObject_10$1$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"],["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"])));var templateObject_1$h$1,templateObject_2$d,templateObject_3$b,templateObject_4$7$1,templateObject_5$6$1,templateObject_6$3$1,templateObject_7$2$1,templateObject_8$2$1,templateObject_9$2$1,templateObject_10$1$1;function useTranslateApi(){var api=useApi();return React$d.useMemo(function(){return {translateContents:translateContents};function translateContents(type,itemId,language){return api.custom(type+"/"+itemId+"/contents/"+language).get().then(function(res){return res.body().data();});}},[api]);}var PageTitle=function PageTitle(_a){var page=_a.page,title=_a.title,search=_a.search,className=_a.className;var user=useCurrentUser();var isDocument=page.pageType===PageType.Document;var language=getLanguageForPage(page,user);var buildPath=useSubscriptionHandlePathBuilder().buildPath;var handleExternalContentClick=useExternalContentClickHandler();var pageTitle=jsxRuntime.jsx(jsxRuntime.Fragment,{children:search?jsxRuntime.jsx(Highlighter,{searchWords:[search],autoEscape:true,textToHighlight:title},void 0):title},void 0);if(page.useExternalContent){var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(page,preferredContentLanguage);var targetRoute=NewsService.getNewsRoute(buildPath('/pages'),page.id,title);return jsxRuntime.jsx(Title$1$1,{children:jsxRuntime.jsxs(StyledNavLink,__assign({to:targetRoute,onClick:function(e){return handleExternalContentClick(e,page,ItemResourceTypes.Pages);}},{children:[pageTitle,jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:'ExternalLinkButton.pages.navigateTo',tooltipResourceValues:url},void 0)]}),void 0)},void 0);}return jsxRuntime.jsxs(Title$1$1,__assign({className:className},{children:[isDocument&&jsxRuntime.jsx(FileIcon,{iconName:getFileIconByExtension(page.contents[language].fileInfo.extension)},void 0),pageTitle]}),void 0);};var Title$1$1=_styled__default["default"].h2.withConfig({displayName:"PageTitle__Title",componentId:"sc-gsx6ad-0"})(templateObject_1$g$1||(templateObject_1$g$1=__makeTemplateObject(["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"],["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"])),spacingS+5,spacingS,fontSizeMedium);var FileIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PageTitle__FileIcon",componentId:"sc-gsx6ad-1"})(templateObject_2$c||(templateObject_2$c=__makeTemplateObject(["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"],["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"])),fontSizeMedium+4,spacingS);var StyledNavLink=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PageTitle__StyledNavLink",componentId:"sc-gsx6ad-2"})(templateObject_3$a$1||(templateObject_3$a$1=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$g$1,templateObject_2$c,templateObject_3$a$1;_styled__default["default"].div.withConfig({displayName:"PageCard__PageModifiedInfo",componentId:"sc-13xtreq-0"})(templateObject_1$f$1||(templateObject_1$f$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled__default["default"](PageTitle).withConfig({displayName:"PageCard__StyledPageTitle",componentId:"sc-13xtreq-1"})(templateObject_2$b$1||(templateObject_2$b$1=__makeTemplateObject(["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"],["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"])));_styled__default["default"](Intro$3).withConfig({displayName:"PageCard__StyledIntro",componentId:"sc-13xtreq-2"})(templateObject_3$9$1||(templateObject_3$9$1=__makeTemplateObject(["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"])),spacingS,spacingS);_styled__default["default"].div.withConfig({displayName:"PageCard__Keywords",componentId:"sc-13xtreq-3"})(templateObject_4$6$1||(templateObject_4$6$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"],["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled__default["default"].div.withConfig({displayName:"PageCard__Inner",componentId:"sc-13xtreq-4"})(templateObject_5$5$1||(templateObject_5$5$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"],["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"])),spacingM,spacingS);_styled__default["default"](DocumentDownloadButton).withConfig({displayName:"PageCard__StyledDocumentDownloadButton",componentId:"sc-13xtreq-5"})(templateObject_6$2$1||(templateObject_6$2$1=__makeTemplateObject(["\n align-self: flex-start;\n z-index: 1;\n"],["\n align-self: flex-start;\n z-index: 1;\n"])));var templateObject_1$f$1,templateObject_2$b$1,templateObject_3$9$1,templateObject_4$6$1,templateObject_5$5$1,templateObject_6$2$1;_styled__default["default"].p.withConfig({displayName:"PageListItemBody__FullContent",componentId:"sc-7voum-0"})(templateObject_1$e$1||(templateObject_1$e$1=__makeTemplateObject(["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"],["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"])),spacingM-5,fontSizeSmall);_styled__default["default"].div.withConfig({displayName:"PageListItemBody__CutContentContainer",componentId:"sc-7voum-1"})(templateObject_2$a$1||(templateObject_2$a$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"],["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"])),spacingM-5);_styled__default["default"].p.withConfig({displayName:"PageListItemBody__CutContent",componentId:"sc-7voum-2"})(templateObject_3$8$1||(templateObject_3$8$1=__makeTemplateObject(["\n padding: 0;\n margin: 0;\n ","\n"],["\n padding: 0;\n margin: 0;\n ","\n"])),LineClamp(5,fontSizeSmall,1.5));_styled__default["default"](ActionButton).withConfig({displayName:"PageListItemBody__StyledActionButton",componentId:"sc-7voum-3"})(templateObject_4$5$1||(templateObject_4$5$1=__makeTemplateObject(["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"],["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"])),spacingXs,spacingXs,spacingXs,fontSizeSmaller);var templateObject_1$e$1,templateObject_2$a$1,templateObject_3$8$1,templateObject_4$5$1;_styled__default["default"].div.withConfig({displayName:"PageListItem__Host",componentId:"sc-lz5d51-0"})(templateObject_1$d$1||(templateObject_1$d$1=__makeTemplateObject(["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"],["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"])),CardBorderInline(2,2),spacingM);_styled__default["default"].div.withConfig({displayName:"PageListItem__Keywords",componentId:"sc-lz5d51-1"})(templateObject_2$9$1||(templateObject_2$9$1=__makeTemplateObject(["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"],["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled__default["default"].div.withConfig({displayName:"PageListItem__LastUpdated",componentId:"sc-lz5d51-2"})(templateObject_3$7$1||(templateObject_3$7$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled__default["default"](PageBreadcrumb).withConfig({displayName:"PageListItem__StyledPageBreadcrumb",componentId:"sc-lz5d51-3"})(templateObject_4$4$1||(templateObject_4$4$1=__makeTemplateObject(["\n flex: 1 1 auto;\n width: ","%;\n"],["\n flex: 1 1 auto;\n width: ","%;\n"])),function(p){return p.maxWidth;});_styled__default["default"].div.withConfig({displayName:"PageListItem__Inner",componentId:"sc-lz5d51-4"})(templateObject_5$4$1||(templateObject_5$4$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var templateObject_1$d$1,templateObject_2$9$1,templateObject_3$7$1,templateObject_4$4$1,templateObject_5$4$1;var PagesDetailViewNavigation=function PagesDetailViewNavigation(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,className=_a.className;var features=useFeatures();var user=useCurrentUser();if(!features.inPageNavigation){return null;}var currentPage=navigationContext.siblings.find(function(s){return s.id===activePageId;});if(currentPage==null){return null;}// sort by group and position only the root pages
|
|
126022
|
-
var pages=!navigationContext.parent||!navigationContext.parent.id?sortPageNodesByGroupAndPosition(user.groups,navigationContext.siblings):navigationContext.siblings;var previousPage=getSibling(-1);var nextPage=getSibling(1);return jsxRuntime.jsxs(Host$2$1,__assign({className:className,"data-detail-page-navigation":activePageId},{children:[previousPage&&jsxRuntime.jsx(PageLinkButton,{isNextNode:false,basePath:basePath,page:previousPage,icon:"ChevronLeftSmall","data-detail-page-navigation-previous-node":previousPage.id,"data-detail-page-navigation-node":previousPage.id},void 0),nextPage&&jsxRuntime.jsx(PageLinkButton,{isNextNode:true,className:"next-page-link-button",basePath:basePath,page:nextPage,icon:"ChevronRightSmall","data-detail-page-navigation-next-node":nextPage.id,"data-detail-page-navigation-node":nextPage.id},void 0)]}),void 0);function getSibling(offset){var index=pages.findIndex(function(s){return s.id===activePageId;});return pages[index+offset];}};var Host$2$1=_styled__default["default"].div.withConfig({displayName:"PagesDetailViewNavigation__Host",componentId:"sc-19ae9g3-0"})(templateObject_1$c$1||(templateObject_1$c$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n"],["\n display: flex;\n flex-wrap: wrap;\n"])));var PageLinkButton=function PageLinkButton(_a){var basePath=_a.basePath,page=_a.page,icon=_a.icon,isNextNode=_a.isNextNode,className=_a.className,props=__rest(_a,["basePath","page","icon","isNextNode","className"]);var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var title=getTitle(page,user,formatMessage);return jsxRuntime.jsxs(Link,__assign({to:getUrl(),className:className},{children:[!isNextNode&&jsxRuntime.jsx(LinkIcon,{iconName:icon},void 0),jsxRuntime.jsx(Content$2$1,__assign({},props,{isNextNode:isNextNode},{children:jsxRuntime.jsx("div",__assign({title:title},{children:title}),void 0)}),void 0),isNextNode&&jsxRuntime.jsx(LinkIcon,{iconName:icon},void 0)]}),void 0);function getUrl(){var baseUrl=NewsService.getNewsRoute(basePath,page.id,title);return page.useExternalContent?baseUrl+"?"+queryString.stringify({noRedirect:true}):baseUrl;}};var Link=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PagesDetailViewNavigation__Link",componentId:"sc-19ae9g3-1"})(templateObject_2$8$1||(templateObject_2$8$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"],["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"])),spacingS,spacingS,maxScreenSize.small,spacingS,function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.textColors.default;});var LinkIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PagesDetailViewNavigation__LinkIcon",componentId:"sc-19ae9g3-2"})(templateObject_3$6$1||(templateObject_3$6$1=__makeTemplateObject(["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"],["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"])),fontSizeNormal,spacingM);var Content$2$1=_styled__default["default"].div.withConfig({displayName:"PagesDetailViewNavigation__Content",componentId:"sc-19ae9g3-3"})(templateObject_5$3$1||(templateObject_5$3$1=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"])),function(p){return p.isNextNode&&_styled.css(templateObject_4$3$1||(templateObject_4$3$1=__makeTemplateObject(["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "],["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "])));});var templateObject_1$c$1,templateObject_2$8$1,templateObject_3$6$1,templateObject_4$3$1,templateObject_5$3$1;_styled__default["default"](Dropdown).withConfig({displayName:"PagesGroupsSelector__StyledDropdown",componentId:"sc-13yd888-0"})(templateObject_1$b$1||(templateObject_1$b$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PagesGroupsSelector__DropdownOption",componentId:"sc-13yd888-1"})(templateObject_2$7$1||(templateObject_2$7$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);_styled.createGlobalStyle(templateObject_3$5$1||(templateObject_3$5$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$b$1,templateObject_2$7$1,templateObject_3$5$1;_styled__default["default"].div.withConfig({displayName:"GroupNotificationsSettings__Host",componentId:"sc-1z0rxrb-0"})(templateObject_1$a$1||(templateObject_1$a$1=__makeTemplateObject(["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"],["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"])),maxScreenSize.small);_styled__default["default"].h2.withConfig({displayName:"GroupNotificationsSettings__Title",componentId:"sc-1z0rxrb-1"})(templateObject_2$6$1||(templateObject_2$6$1=__makeTemplateObject(["\n margin-top: 0;\n"],["\n margin-top: 0;\n"])));_styled__default["default"].div.withConfig({displayName:"GroupNotificationsSettings__Infos",componentId:"sc-1z0rxrb-2"})(templateObject_3$4$1||(templateObject_3$4$1=__makeTemplateObject(["\n color: ",";\n padding-left: 55px;\n"],["\n color: ",";\n padding-left: 55px;\n"])),function(p){return p.theme.palette.neutralTertiaryAlt;});var templateObject_1$a$1,templateObject_2$6$1,templateObject_3$4$1;function getPostGroups(user){return getGroupsWithExplicitMinRole(GroupRoles.LimitedReader,user,function(g){return g.allowPosts;});}function getPostsBaseRoute(post,user){var _a;var postGroups=getPostGroups(user);var subscriptionHandle=(_a=user.subscription.subscriptionHandle)!==null&&_a!==void 0?_a:user.subscription.id;return postGroups.length>1?"/"+subscriptionHandle+"/posts/groups/"+((post===null||post===void 0?void 0:post.groupId)||''):"/"+subscriptionHandle+"/posts";}function getPostsHashtagFilterRoute(post,user,hashtag){return getPostsBaseRoute(post,user)+"?"+queryString.stringify({search:""+hashtag});}var PostReplies=function PostReplies(_a){var className=_a.className,post=_a.post,comments=_a.comments,autoFocusReplyField=_a.autoFocusReplyField,onReplyAdded=_a.onReplyAdded,onReplyDeleted=_a.onReplyDeleted,onThreadReply=_a.onThreadReply;var user=useCurrentUser();var searchPostMentionUsers=usePostsApi().searchPostMentionUsers;if(!post||!post.id){return null;}return jsxRuntime.jsx(StyledPagedCommentsSection,{className:className,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},type:ItemResourceTypes.Posts,scope:ConversationScope.Posts,itemId:post.id,groupIds:[post.groupId],readOnly:false,pageSize:5,initialPageSize:2,initialComments:comments,onCommentAdded:onReplyAdded,onCommentDeleted:onReplyDeleted,noItemsYetStringResourceKey:"Posts.replies.empty",autoFocusReplyField:autoFocusReplyField,baseAttachmentPath:"/posts/"+post.id+"/comments",getHashtagFilterRoute:function(hashtag){return getPostsHashtagFilterRoute(post,user,hashtag);},onThreadReply:onThreadReply},post.id);};var StyledPagedCommentsSection=_styled__default["default"](PagedCommentsSection).withConfig({displayName:"PostReplies__StyledPagedCommentsSection",componentId:"sc-8mrgcg-0"})(templateObject_1$9$1||(templateObject_1$9$1=__makeTemplateObject(["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"],["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"])));var templateObject_1$9$1;var PostEditor=function PostEditor(_a){var className=_a.className,post=_a.post,onBeforeSave=_a.onBeforeSave,onSaved=_a.onSaved,onCancel=_a.onCancel,keywordSettings=_a.keywordSettings;var features=useFeatures();var _b=usePostsApi(),searchPostMentionUsers=_b.searchPostMentionUsers,updatePost=_b.updatePost;var _c=React$d.useContext(LazySubscriptionContext),allKeywords=_c.allKeywords,keywordsByGroupId=_c.keywordsByGroupId;var _d=useNotificationContext(),showToast=_d.showToast,showError=_d.showError;if(allKeywords==null||keywordsByGroupId==null){return null;}return jsxRuntime.jsx(EditCommentWithAttachments,{className:className,onCancel:onCancel,content:post.content,onSave:handleSavePost,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},inputTheme:"dark",item:post,basePath:'/posts',allowKeywords:features.keywords&&features.postKeywords,availableKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.availableKeywords,mandatoryKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.mandatoryKeywords,keywords:post.keywords,saveOnCtrlEnter:true},void 0);function handleSavePost(newContent,attachments,keywords){return __awaiter(this,void 0,void 0,function(){var updatedPost,error_1;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);onBeforeSave(__assign(__assign({},post),{content:newContent,attachments:attachments,keywords:keywords}));return [4/*yield*/,updatePost(post.id,newContent,attachments,keywords)];case 1:updatedPost=_a.sent();onSaved(updatedPost);showToast('Posts.successfullyUpdated');return [3/*break*/,3];case 2:error_1=_a.sent();logger.error(error_1);showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}};_styled__default["default"](IconButton).withConfig({displayName:"PostFollowButton__StyledIconButton",componentId:"sc-1i97syp-0"})(templateObject_1$8$1||(templateObject_1$8$1=__makeTemplateObject(["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"],["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"])));var templateObject_1$8$1;var PostGroup=function PostGroup(_a){var groupId=_a.groupId,to=_a.to,className=_a.className;var intl=useIntl();var user=useCurrentUser();var group=user.groups.find(function(g){return g.id===groupId;});var groupName=getGroupName(group,user,intl);return jsxRuntime.jsx(Group,__assign({"data-post-group":groupId,title:groupName,to:to,className:className},{children:jsxRuntime.jsx("span",{children:groupName},void 0)}),void 0);};var Group=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PostGroup__Group",componentId:"sc-182l34m-0"})(templateObject_1$7$1||(templateObject_1$7$1=__makeTemplateObject(["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"],["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"])),fontSizeSmall,function(){return HighlightBubble();});var templateObject_1$7$1;_styled__default["default"].div.withConfig({displayName:"PostDisplay__Host",componentId:"sc-1tope3b-0"})(templateObject_1$6$1||(templateObject_1$6$1=__makeTemplateObject(["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"],["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"])),CardBorderInline(2,2),fontSizeSmall,spacingM);_styled__default["default"].div.withConfig({displayName:"PostDisplay__Header",componentId:"sc-1tope3b-1"})(templateObject_2$5$1||(templateObject_2$5$1=__makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n"],["\n display: flex;\n align-items: flex-start;\n"])));var avatarWidth=40;var maxButtonsWidth=120;// max 4 buttons at 30 px each (translate, notifications, like and context menu)
|
|
126023
|
-
var paddingLeft=spacingS;var postGroupWidth=250;var postGroupWidthSmall=215;_styled__default["default"].div.withConfig({displayName:"PostDisplay__HeaderMetadata",componentId:"sc-1tope3b-2"})(templateObject_3$3$1||(templateObject_3$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"],["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"])),fontSizeSmall,paddingLeft,avatarWidth,maxButtonsWidth,paddingLeft,function(p){return p.addSafetySpace?postGroupWidth:0;},maxScreenSize.medium,avatarWidth,maxButtonsWidth,paddingLeft);_styled__default["default"].div.withConfig({displayName:"PostDisplay__Content",componentId:"sc-1tope3b-3"})(templateObject_4$2$1||(templateObject_4$2$1=__makeTemplateObject(["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"],["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"])));_styled__default["default"].div.withConfig({displayName:"PostDisplay__ActionButtons",componentId:"sc-1tope3b-4"})(templateObject_5$2$1||(templateObject_5$2$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: auto;\n"],["\n display: flex;\n align-items: center;\n margin-left: auto;\n"])));_styled__default["default"].div.withConfig({displayName:"PostDisplay__PostDisplayName",componentId:"sc-1tope3b-5"})(templateObject_6$1$1||(templateObject_6$1$1=__makeTemplateObject(["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"],["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));_styled__default["default"](DateTime).withConfig({displayName:"PostDisplay__PostDateTime",componentId:"sc-1tope3b-6"})(templateObject_7$1$1||(templateObject_7$1$1=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeSmaller);_styled__default["default"](ActionButton).withConfig({displayName:"PostDisplay__AddReplyButton",componentId:"sc-1tope3b-7"})(templateObject_8$1$1||(templateObject_8$1$1=__makeTemplateObject(["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"],["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"])),spacingM,function(p){return p.theme.palette.accent;});_styled__default["default"].div.withConfig({displayName:"PostDisplay__InnerHost",componentId:"sc-1tope3b-8"})(templateObject_10$d||(templateObject_10$d=__makeTemplateObject(["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"],["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"])),postsSectionPadding,function(p){return p.highlight&&_styled.css(templateObject_9$1$1||(templateObject_9$1$1=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 6px;\n display: block;\n background-color: ",";\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 6px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.accent;});});_styled__default["default"](PostReplies).withConfig({displayName:"PostDisplay__StyledPostComments",componentId:"sc-1tope3b-9"})(templateObject_11$8||(templateObject_11$8=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});_styled__default["default"](PostEditor).withConfig({displayName:"PostDisplay__StyledPostEditor",componentId:"sc-1tope3b-10"})(templateObject_12$7||(templateObject_12$7=__makeTemplateObject(["\n margin-top: 7px;\n position: relative;\n"],["\n margin-top: 7px;\n position: relative;\n"])));_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PostDisplay__PostLink",componentId:"sc-1tope3b-11"})(templateObject_13$6||(templateObject_13$6=__makeTemplateObject(["\n display: block;\n width: 100%;\n"],["\n display: block;\n width: 100%;\n"])));_styled__default["default"](PostGroup).withConfig({displayName:"PostDisplay__StyledPostGroup",componentId:"sc-1tope3b-12"})(templateObject_14$6||(templateObject_14$6=__makeTemplateObject(["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"],["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"])),spacingM,postGroupWidth,maxScreenSize.medium,spacingS,postGroupWidthSmall);_styled__default["default"](LikeButton).withConfig({displayName:"PostDisplay__StyledLikeButton",componentId:"sc-1tope3b-13"})(templateObject_15$6||(templateObject_15$6=__makeTemplateObject(["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"],["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"])));_styled__default["default"](ImagesAndFilesList).withConfig({displayName:"PostDisplay__StyledImagesAndFilesList",componentId:"sc-1tope3b-14"})(templateObject_16$6||(templateObject_16$6=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled__default["default"](IconButton).withConfig({displayName:"PostDisplay__MenuButton",componentId:"sc-1tope3b-15"})(templateObject_17$5||(templateObject_17$5=__makeTemplateObject(["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"],["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"])));_styled__default["default"](KeywordsInfo).withConfig({displayName:"PostDisplay__StyledKeywordsInfo",componentId:"sc-1tope3b-16"})(templateObject_18$4||(templateObject_18$4=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled__default["default"](ThreadView).withConfig({displayName:"PostDisplay__StyledThreadView",componentId:"sc-1tope3b-17"})(templateObject_19$4||(templateObject_19$4=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});var templateObject_1$6$1,templateObject_2$5$1,templateObject_3$3$1,templateObject_4$2$1,templateObject_5$2$1,templateObject_6$1$1,templateObject_7$1$1,templateObject_8$1$1,templateObject_9$1$1,templateObject_10$d,templateObject_11$8,templateObject_12$7,templateObject_13$6,templateObject_14$6,templateObject_15$6,templateObject_16$6,templateObject_17$5,templateObject_18$4,templateObject_19$4;_styled__default["default"](Dropdown).withConfig({displayName:"PostGroupsSelector__StyledDropdown",componentId:"sc-g6rhck-0"})(templateObject_1$5$1||(templateObject_1$5$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PostGroupsSelector__DropdownOption",componentId:"sc-g6rhck-1"})(templateObject_2$4$1||(templateObject_2$4$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);_styled.createGlobalStyle(templateObject_3$2$1||(templateObject_3$2$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$5$1,templateObject_2$4$1,templateObject_3$2$1;gql(templateObject_1$4$1||(templateObject_1$4$1=__makeTemplateObject(["\n mutation MarkItemsAsRead($itemIds: [String]) {\n markItemsAsRead(itemIds: $itemIds)\n }\n"],["\n mutation MarkItemsAsRead($itemIds: [String]) {\n markItemsAsRead(itemIds: $itemIds)\n }\n"])));var templateObject_1$4$1;var EditorListItem=function EditorListItem(props){var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var itemDomRef=React$d.useRef();var webAppUrl=useConfiguration().webAppUrl;if(props.language==null){return null;}var item=props.item;var className=classNames(props.className,'editor-list-item',{'editor-list-item-rejected ms-borderColor-red':item.status===WorkflowStatus.rejected&&isCurrentUserItemOwner()},{'editor-list-item-selected ms-fontColor-onSecondary ms-bgColor-themeSecondary':props.isSelected},{'ms-bgColor-white':!props.isSelected},{'editor-list-item--highlighted':props.highlighted});return jsxRuntime.jsxs(ListItem,__assign({className:className,"data-item-is-published":props.isPublishedItem,"data-is-focusable":true,"data-item-is-selected":props.isSelected,"data-item-id":item.id,ref:itemDomRef},{children:[props.useExternalLink?jsxRuntime.jsx(ExternalLink,__assign({href:""+webAppUrl+props.basePath+"/"+item.id+"/"+props.language,className:"editor-list-content",target:"_blank",rel:"noopener noreferrer",onClick:function(e){var _a;return (_a=props.onClick)===null||_a===void 0?void 0:_a.call(props,e,itemDomRef.current,item,getTitle());}},{children:props.onRenderContent(item,getTitle(),props.isSelected)}),void 0):jsxRuntime.jsx(Content$9,__assign({to:props.basePath+"/"+item.id+"/"+props.language,onClick:function(e){var _a;return (_a=props.onClick)===null||_a===void 0?void 0:_a.call(props,e,itemDomRef.current,item,getTitle());},className:"editor-list-content"},{children:props.onRenderContent(item,getTitle(),props.isSelected)}),void 0),jsxRuntime.jsxs(Options,{children:[props.allowSelection&&jsxRuntime.jsx(SelectedIconOption,{children:jsxRuntime.jsx(SelectedIcon,{"data-item-select":true,iconProps:{iconName:'CompletedSolid'},ariaLabel:formatMessage({id:'AriaLabel.editor.selectItemButton'}),onClick:toggleSelect,isTouch:env.isTouchDevice,isSelected:props.isSelected,className:classNames('ms-fontColor-neutralTertiary',{'ms-fontColor-themeDarkAlt':props.isSelected})},void 0)},void 0),jsxRuntime.jsx(StatusOption,{status:item.status,isActive:props.isSelected},void 0),jsxRuntime.jsx(Option,__assign({className:"editor-list-persona"},{children:item.owner&&jsxRuntime.jsx(Avatar,{upn:item.owner.userPrincipalName,size:props.useLargeAvatar?officeUiFabricReact.PersonaSize.size48:officeUiFabricReact.PersonaSize.size32,text:props.item.owner.displayName,hidePersonaDetails:true},void 0)}),void 0)]},void 0)]}),void 0);function isCurrentUserItemOwner(){return props.item.owner&&props.item.owner.userPrincipalName===user.userPrincipalName;}function getTitle(){var title=props.item.contents[props.language].title;return title==null||title.trim().length===0?"<"+formatMessage({id:'Generic.noTitle'})+">":title;}function toggleSelect(){props.onSelect(props.item,!props.isSelected);}};var EditorItemTitle=_styled__default["default"].h2.withConfig({displayName:"EditorListItem__EditorItemTitle",componentId:"sc-zoqzrc-0"})(templateObject_1$3$1||(templateObject_1$3$1=__makeTemplateObject(["\n && {\n font-weight: 600;\n margin: 0;\n font-size: 17px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n @media (max-width: 700px) {\n font-size: 15px;\n }\n }\n"],["\n && {\n font-weight: 600;\n margin: 0;\n font-size: 17px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n @media (max-width: 700px) {\n font-size: 15px;\n }\n }\n"])));var SelectedIcon=_styled__default["default"](officeUiFabricReact.IconButton).withConfig({displayName:"EditorListItem__SelectedIcon",componentId:"sc-zoqzrc-1"})(templateObject_2$3$1||(templateObject_2$3$1=__makeTemplateObject(["\n padding: 0;\n height: 100%;\n width: auto;\n font-size: inherit;\n\n opacity: ",";\n\n &:focus {\n opacity: 1;\n }\n\n i {\n font-size: inherit;\n line-height: unset;\n height: auto;\n width: auto;\n padding: 0 19px 0 10px;\n }\n"],["\n padding: 0;\n height: 100%;\n width: auto;\n font-size: inherit;\n\n opacity: ",";\n\n &:focus {\n opacity: 1;\n }\n\n i {\n font-size: inherit;\n line-height: unset;\n height: auto;\n width: auto;\n padding: 0 19px 0 10px;\n }\n"])),function(p){return p.isSelected?1:p.isTouch?0.1:0;});var ListItem=_styled__default["default"].div.withConfig({displayName:"EditorListItem__ListItem",componentId:"sc-zoqzrc-2"})(templateObject_3$1$1||(templateObject_3$1$1=__makeTemplateObject(["\n position: relative;\n font-family: 'Roboto', sans-serif;\n text-decoration: none;\n ",";\n\n display: flex;\n flex-flow: row nowrap;\n text-align: left;\n\n a,\n a:hover,\n a:active,\n a:visited {\n color: ",";\n text-decoration: none;\n }\n\n &.editor-list-item-rejected {\n border-left-width: 10px;\n border-style: solid;\n border-top: 0;\n border-bottom: 0;\n border-right: 0;\n > .editor-list-content {\n margin-left: 6px;\n }\n }\n\n &:hover {\n "," {\n opacity: 1;\n }\n }\n"],["\n position: relative;\n font-family: 'Roboto', sans-serif;\n text-decoration: none;\n ",";\n\n display: flex;\n flex-flow: row nowrap;\n text-align: left;\n\n a,\n a:hover,\n a:active,\n a:visited {\n color: ",";\n text-decoration: none;\n }\n\n &.editor-list-item-rejected {\n border-left-width: 10px;\n border-style: solid;\n border-top: 0;\n border-bottom: 0;\n border-right: 0;\n > .editor-list-content {\n margin-left: 6px;\n }\n }\n\n &:hover {\n "," {\n opacity: 1;\n }\n }\n"])),CardBorderInline(2,2),function(p){return p.theme.textColors.default;},SelectedIcon);var Options=_styled__default["default"].div.withConfig({displayName:"EditorListItem__Options",componentId:"sc-zoqzrc-3"})(templateObject_4$1$1||(templateObject_4$1$1=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-flow: row nowrap;\n padding-right: 15px;\n\n @media (max-width: 700px) {\n padding-right: 6px;\n }\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-flow: row nowrap;\n padding-right: 15px;\n\n @media (max-width: 700px) {\n padding-right: 6px;\n }\n"])));var Option=_styled__default["default"].div.withConfig({displayName:"EditorListItem__Option",componentId:"sc-zoqzrc-4"})(templateObject_5$1$1||(templateObject_5$1$1=__makeTemplateObject(["\n padding: 6px 25px 6px 6px;\n font-size: 24px;\n text-align: center;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n\n flex: 0 1 auto;\n\n &.editor-list-persona {\n width: 32px;\n }\n > div {\n height: 24px;\n }\n\n @media (max-width: 700px) {\n padding: 5px;\n i {\n font-size: 0.9em !important;\n padding: 0;\n }\n }\n"],["\n padding: 6px 25px 6px 6px;\n font-size: 24px;\n text-align: center;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n\n flex: 0 1 auto;\n\n &.editor-list-persona {\n width: 32px;\n }\n > div {\n height: 24px;\n }\n\n @media (max-width: 700px) {\n padding: 5px;\n i {\n font-size: 0.9em !important;\n padding: 0;\n }\n }\n"])));var SelectedIconOption=_styled__default["default"](Option).withConfig({displayName:"EditorListItem__SelectedIconOption",componentId:"sc-zoqzrc-5"})(templateObject_6$r||(templateObject_6$r=__makeTemplateObject(["\n padding: 6px;\n"],["\n padding: 6px;\n"])));var LinkStyle=_styled.css(templateObject_7$m||(templateObject_7$m=__makeTemplateObject(["\n padding: ","px;\n flex: 1 0 auto;\n /* todo: This smells, but it's required to make the ellipsis work. How to avoid it?*/\n width: 100px;\n margin: ","px ","px ","px ","px;\n\n @media (max-width: 700px) {\n margin: ","px;\n }\n"],["\n padding: ","px;\n flex: 1 0 auto;\n /* todo: This smells, but it's required to make the ellipsis work. How to avoid it?*/\n width: 100px;\n margin: ","px ","px ","px ","px;\n\n @media (max-width: 700px) {\n margin: ","px;\n }\n"])),spacingXs,spacingS,spacingS,spacingS,spacingS+6,spacingXs);var Content$9=_styled__default["default"](ReactRouterDom.Link).withConfig({displayName:"EditorListItem__Content",componentId:"sc-zoqzrc-6"})(templateObject_8$k||(templateObject_8$k=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var ExternalLink=_styled__default["default"].a.withConfig({displayName:"EditorListItem__ExternalLink",componentId:"sc-zoqzrc-7"})(templateObject_9$f||(templateObject_9$f=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var StatusOption=function StatusOption(_a){var _b=_a.status,status=_b===void 0?WorkflowStatus.draft:_b,isActive=_a.isActive;if(status===WorkflowStatus.deleted){return null;}return jsxRuntime.jsx(Option,{children:status===WorkflowStatus.approved?jsxRuntime.jsx("img",{style:{width:'20px'},alt:""},void 0):jsxRuntime.jsx(Tooltip,__assign({resourceKey:'EditorList.'+status||WorkflowStatus.draft},{children:jsxRuntime.jsx(StateIcon,{status:status||WorkflowStatus.draft,width:20,isActive:isActive},void 0)}),void 0)},void 0);};var templateObject_1$3$1,templateObject_2$3$1,templateObject_3$1$1,templateObject_4$1$1,templateObject_5$1$1,templateObject_6$r,templateObject_7$m,templateObject_8$k,templateObject_9$f;var NewsEditorItem=function NewsEditorItem(_a){var title=_a.title,item=_a.item,isSelected=_a.isSelected;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(EditorItemTitle,__assign({className:classNames({'ms-fontColor-onSecondary':isSelected})},{children:title}),void 0),jsxRuntime.jsx(DateInfo,__assign({className:classNames('ms-fontSize-m',{'ms-fontColor-onSecondary':isSelected})},{children:jsxRuntime.jsx(MetaInfo$1,{dateMode:DateMode.Published,item:item,expiryDate:item.expiryDate,channels:item.channels,readOnly:true,showChannels:true,hideAvatar:true,hideDisplayName:true},void 0)}),void 0)]},void 0);};var MetaInfo$1=_styled__default["default"](ItemMetaInfo).withConfig({displayName:"NewsEditorItem__MetaInfo",componentId:"sc-1kz3wt0-0"})(templateObject_1$2$1||(templateObject_1$2$1=__makeTemplateObject(["\n [data-meta-info-details] {\n padding-left: 0;\n }\n"],["\n [data-meta-info-details] {\n padding-left: 0;\n }\n"])));var DateInfo=_styled__default["default"].div.withConfig({displayName:"NewsEditorItem__DateInfo",componentId:"sc-1kz3wt0-1"})(templateObject_2$2$1||(templateObject_2$2$1=__makeTemplateObject(["\n padding-top: 8px;\n @media (max-width: 700px) {\n font-size: 12px;\n }\n"],["\n padding-top: 8px;\n @media (max-width: 700px) {\n font-size: 12px;\n }\n"])));var templateObject_1$2$1,templateObject_2$2$1;var EventDates=_styled__default["default"].div.withConfig({displayName:"EventEditorItem__EventDates",componentId:"sc-1irp2hc-0"})(templateObject_1$1$1||(templateObject_1$1$1=__makeTemplateObject(["\n margin-top: ","px;\n font-size: ","px;\n\n display: flex;\n flex-direction: column;\n"],["\n margin-top: ","px;\n font-size: ","px;\n\n display: flex;\n flex-direction: column;\n"])),spacingS,fontSizeSmall);_styled__default["default"].div.withConfig({displayName:"EventEditorItem__EmptyEventDates",componentId:"sc-1irp2hc-1"})(templateObject_2$1$1||(templateObject_2$1$1=__makeTemplateObject(["\n font-style: italic;\n"],["\n font-style: italic;\n"])));_styled__default["default"].div.withConfig({displayName:"EventEditorItem__EventDateAndRecurrenceInfo",componentId:"sc-1irp2hc-2"})(templateObject_3$12||(templateObject_3$12=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));_styled__default["default"](EventRecurrenceSeriesInfo).withConfig({displayName:"EventEditorItem__RecurrenceSeriesInfo",componentId:"sc-1irp2hc-3"})(templateObject_4$K||(templateObject_4$K=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);_styled__default["default"](EventDates).withConfig({displayName:"EventEditorItem__DatesInfo",componentId:"sc-1irp2hc-4"})(templateObject_5$D||(templateObject_5$D=__makeTemplateObject(["\n margin-right: ","px;\n"],["\n margin-right: ","px;\n"])),spacingM);var templateObject_1$1$1,templateObject_2$1$1,templateObject_3$12,templateObject_4$K,templateObject_5$D;var CreateNewItemButton=function CreateNewItemButton(_a){var type=_a.type,groupId=_a.groupId,onClick=_a.onClick,className=_a.className;var baseRoute=useBaseRoute();var history=ReactRouterDom.useHistory();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var intl=useIntl();var user=useCurrentUser();var hasSelectedGroup=!!groupId;var groups=getGroupItems();if(hasSelectedGroup||groups.length===1){return jsxRuntime.jsx(StyledPrimaryButton,__assign({iconProps:{iconName:'AddTo'},onClick:function(){return handleOnClick(hasSelectedGroup?undefined:groups[0].key);},className:className,"data-button-create":type},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);}if(!groups.length){return null;}return jsxRuntime.jsx(MenuButton,__assign({iconProps:{iconName:'AddTo'},menuProps:{items:groups,calloutProps:{calloutMaxWidth:300},className:'lt-reach-callout'},className:className,"data-button-create":type},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);function getGroupItems(){return getGroupsWithExplicitMinRole(GroupRoles.Author,user).map(function(g){return {key:g.id,onClick:function(){return handleOnClick(g.id);},text:getGroupName(g,user,intl)};});}function openEditor(id){history.push(buildPath("/editor/"+type+"/groups/"+id+"/new"));}function handleOnClick(id){if(onClick){onClick(groupId||id);}else {hasSelectedGroup?history.push(baseRoute+"/new"):openEditor(id);}}};var MenuButton=_styled__default["default"](officeUiFabricReact.CommandBarButton).withConfig({displayName:"CreateNewItemButton__MenuButton",componentId:"sc-18o74g9-0"})(templateObject_1$2k||(templateObject_1$2k=__makeTemplateObject(["\n && {\n background-color: ",";\n &:hover {\n background-color: ",";\n i,\n span {\n color: ",";\n background-color: transparent;\n }\n }\n\n // the ms-fontColor on the button is not applied on the icons\n i,\n span {\n color: ",";\n }\n }\n\n height: 32px;\n padding: 0 ","px;\n\n i:first-child {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n && {\n background-color: ",";\n &:hover {\n background-color: ",";\n i,\n span {\n color: ",";\n background-color: transparent;\n }\n }\n\n // the ms-fontColor on the button is not applied on the icons\n i,\n span {\n color: ",";\n }\n }\n\n height: 32px;\n padding: 0 ","px;\n\n i:first-child {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),function(p){return p.theme.semanticColors.primaryButtonBackground;},function(p){return p.theme.semanticColors.primaryButtonBackgroundHovered;},function(p){return p.theme.semanticColors.primaryButtonTextHovered;},function(p){return p.theme.semanticColors.primaryButtonText;},spacingS,spacingS);var StyledPrimaryButton=_styled__default["default"](officeUiFabricReact.PrimaryButton).withConfig({displayName:"CreateNewItemButton__StyledPrimaryButton",componentId:"sc-18o74g9-1"})(templateObject_2$1v||(templateObject_2$1v=__makeTemplateObject(["\n padding: 0 ","px;\n\n i {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n padding: 0 ","px;\n\n i {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),spacingS,spacingS);var templateObject_1$2k,templateObject_2$1v;function useEditorApi(){var api=useApi();var fetchFromApi=useApiFactory().fetchFromApi;var sendBeacon=useBeaconHandler();var onRequestToken=React$d.useContext(AuthenticationContext).onRequestToken;return React$d.useMemo(function(){return {cloneItem:cloneItem,getDeletedItems:getDeletedItems,getVersion:getVersion,getVersions:getVersions,deleteDraft:deleteDraft,deleteRange:deleteRange,deletePermanently:deletePermanently,bulkSetStatus:bulkSetStatus,setStatus:setStatus,removeLease:removeLease,keepLeaseAlive:keepLeaseAlive,saveItem:saveItem,updateGroups:updateGroups};function updateGroups(itemType,itemId,groupIds){return api.custom("editor/"+itemType+"/"+itemId+"/groups").put(groupIds).then(function(response){return response.body().data();});}function cloneItem(itemType,itemId){return api.all("editor/"+itemType+"?"+queryString.stringify({cloneFromItem:itemId})).post({}).then(function(response){return response.body().data();});}function getDeletedItems(type,filter,token){var params=Object.assign({},filter,{token:token,pageSize:30});return api.all("editor/"+type+"/recyclebin").get('',params).then(function(res){return res.body().data();});}function getVersions(type,itemId){return from(api.all("editor/"+type+"/"+itemId+"/versions").getAll()).pipe(map(function(response){return response.body().map(function(group){return group.data();});}));}function getVersion(type,itemId,versionId){return api.all("editor/"+type+"/"+itemId+"/versions").get(versionId).then(function(response){return response.body().data();});}function deleteDraft(leaseId,itemId,type){var url="editor/"+type+"/"+itemId+"/draft";if(leaseId){url+="?leaseId="+leaseId;}return api.custom(url).delete();}function deleteRange(type,ids){var data=ids.map(function(id){return {id:id,status:WorkflowStatus.deleted};});return api.custom("editor/"+type).patch(data).then(function(response){return response.body().map(function(item){return item.data();});}).catch(function(){// set null as a result in case of error
|
|
126029
|
+
$$1$1({target:'String',proto:true},{replaceAll:function replaceAll(searchValue,replaceValue){var O=requireObjectCoercible$c(this);var IS_REG_EXP,flags,replacer,string,searchString,template,result,position,index;if(searchValue!=null){IS_REG_EXP=isRegExp(searchValue);if(IS_REG_EXP){flags=String(requireObjectCoercible$c('flags'in RegExpPrototype$3?searchValue.flags:getRegExpFlags.call(searchValue)));if(!~flags.indexOf('g'))throw TypeError('`.replaceAll` does not allow non-global regexes');}replacer=searchValue[REPLACE$2];if(replacer!==undefined){return replacer.call(searchValue,O,replaceValue);}}string=String(O);searchString=String(searchValue);if(searchString==='')return replaceAll.call(string,/(?:)/g,replaceValue);template=string.split(searchString);if(typeof replaceValue!=='function'){return template.join(String(replaceValue));}result=template[0];position=result.length;for(index=1;index<template.length;index++){result+=String(replaceValue(searchString,position,string));position+=searchString.length+template[index].length;result+=template[index];}return result;}});_styled__default["default"].div.withConfig({displayName:"Textarea__Host",componentId:"sc-170lrb4-0"})(templateObject_1$q||(templateObject_1$q=__makeTemplateObject(["\n display: flex;\n align-items: flex-end;\n position: relative;\n"],["\n display: flex;\n align-items: flex-end;\n position: relative;\n"])));_styled__default["default"].textarea.withConfig({displayName:"Textarea__StyledTextarea",componentId:"sc-170lrb4-1"})(templateObject_2$l||(templateObject_2$l=__makeTemplateObject(["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"],["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"])),InputPlaceholder('font-style: italic'));_styled__default["default"](officeUiFabricReact.IconButton).withConfig({displayName:"Textarea__StyledIconButton",componentId:"sc-170lrb4-2"})(templateObject_3$h||(templateObject_3$h=__makeTemplateObject(["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"],["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"])));var templateObject_1$q,templateObject_2$l,templateObject_3$h;_styled.createGlobalStyle(templateObject_1$p||(templateObject_1$p=__makeTemplateObject(["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"],["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"])));_styled.createGlobalStyle(templateObject_2$k||(templateObject_2$k=__makeTemplateObject(["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"],["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"])),function(p){return p.theme.palette.accent;});_styled__default["default"].div.withConfig({displayName:"DateTimePicker__Host",componentId:"sc-zzs3p0-0"})(templateObject_3$g||(templateObject_3$g=__makeTemplateObject(["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"],["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"])),InputPlaceholder("\n color: inherit;\n font-style: italic;\n "));var templateObject_1$p,templateObject_2$k,templateObject_3$g;var InsertFilesDialogHost=_styled__default["default"].div.withConfig({displayName:"InsertFilesButton__InsertFilesDialogHost",componentId:"sc-1q7gx3n-0"})(templateObject_2$j||(templateObject_2$j=__makeTemplateObject(["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"],["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"])),function(p){return p.isActive&&_styled.css(templateObject_1$o||(templateObject_1$o=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "])));},spacingM);_styled__default["default"].p.withConfig({displayName:"InsertFilesButton__DragAndDropText",componentId:"sc-1q7gx3n-1"})(templateObject_3$f||(templateObject_3$f=__makeTemplateObject(["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"],["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"])),fontSizeSmall,spacingS);_styled__default["default"](officeUiFabricReact.DefaultButton).withConfig({displayName:"InsertFilesButton__SelectFileButton",componentId:"sc-1q7gx3n-2"})(templateObject_4$9$1||(templateObject_4$9$1=__makeTemplateObject(["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"],["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"])),spacingM);_styled__default["default"].div.withConfig({displayName:"InsertFilesButton__ButtonsContainer",componentId:"sc-1q7gx3n-3"})(templateObject_5$8||(templateObject_5$8=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));var templateObject_1$o,templateObject_2$j,templateObject_3$f,templateObject_4$9$1,templateObject_5$8;_styled__default["default"](InsertFilesDialogHost).withConfig({displayName:"InsertImagesButton__Host",componentId:"sc-63tjy6-0"})(templateObject_1$n||(templateObject_1$n=__makeTemplateObject(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));_styled__default["default"](officeUiFabricReact.PrimaryButton).withConfig({displayName:"InsertImagesButton__StyledButton",componentId:"sc-63tjy6-1"})(templateObject_2$i||(templateObject_2$i=__makeTemplateObject(["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"],["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"])));_styled__default["default"].div.withConfig({displayName:"InsertImagesButton__Text",componentId:"sc-63tjy6-2"})(templateObject_3$e||(templateObject_3$e=__makeTemplateObject(["\n max-width: 100%;\n font-size: large;\n"],["\n max-width: 100%;\n font-size: large;\n"])));var templateObject_1$n,templateObject_2$i,templateObject_3$e;var DateRange;(function(DateRange){DateRange[DateRange["TwoYears"]=0]="TwoYears";DateRange[DateRange["OneYear"]=1]="OneYear";DateRange[DateRange["SixMonths"]=2]="SixMonths";DateRange[DateRange["TwoMonths"]=3]="TwoMonths";DateRange[DateRange["OneMonth"]=4]="OneMonth";DateRange[DateRange["SevenDays"]=5]="SevenDays";DateRange[DateRange["YesterDay"]=6]="YesterDay";DateRange[DateRange["Today"]=7]="Today";})(DateRange||(DateRange={}));Object.keys(DateRange).length/2-1;_styled__default["default"].div.withConfig({displayName:"DateRangeSlider__Host",componentId:"sc-1o5vacm-0"})(templateObject_1$m||(templateObject_1$m=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"])));_styled__default["default"].div.withConfig({displayName:"DateRangeSlider__Value",componentId:"sc-1o5vacm-1"})(templateObject_2$h||(templateObject_2$h=__makeTemplateObject(["\n align-self: flex-end;\n margin-right: 10px;\n"],["\n align-self: flex-end;\n margin-right: 10px;\n"])));_styled__default["default"].div.withConfig({displayName:"DateRangeSlider__Labels",componentId:"sc-1o5vacm-2"})(templateObject_3$d||(templateObject_3$d=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"],["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"])));var templateObject_1$m,templateObject_2$h,templateObject_3$d;_styled__default["default"](IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$l||(templateObject_1$l=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$l;_styled__default["default"].div.withConfig({displayName:"CardStyles__Host",componentId:"sc-ovm8js-0"})(templateObject_1$k||(templateObject_1$k=__makeTemplateObject(["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"],["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"])),spacingM,spacingM,spacingM);var Intro$3=_styled__default["default"].p.withConfig({displayName:"CardStyles__Intro",componentId:"sc-ovm8js-1"})(templateObject_2$g||(templateObject_2$g=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"])),fontSizeSmall,spacingM-3);var templateObject_1$k,templateObject_2$g;_styled__default["default"].p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$j$1||(templateObject_1$j$1=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled__default["default"].h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$f||(templateObject_2$f=__makeTemplateObject(["\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"],["\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"])),spacingS);_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"NewsCard__StyledNavLink",componentId:"sc-rf9b9y-2"})(templateObject_3$c||(templateObject_3$c=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});_styled__default["default"].div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$8$1||(templateObject_4$8$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"])));_styled__default["default"](ClickableChannelTitles).withConfig({displayName:"NewsCard__Channels",componentId:"sc-rf9b9y-4"})(templateObject_5$7$1||(templateObject_5$7$1=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$j$1,templateObject_2$f,templateObject_3$c,templateObject_4$8$1,templateObject_5$7$1;_styled__default["default"].div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$i$1||(templateObject_1$i$1=__makeTemplateObject(["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"],["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"])),function(p){return p.theme.palette.neutralTertiary;});_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$e||(templateObject_2$e=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$i$1,templateObject_2$e;_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$h$1||(templateObject_1$h$1=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$d||(templateObject_2$d=__makeTemplateObject(["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"],["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"])));_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__AlertIconOuterContainer",componentId:"sc-drndfq-2"})(templateObject_3$b||(templateObject_3$b=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$7$1||(templateObject_4$7$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"])));_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PromotedNewsItem__StyledIcon",componentId:"sc-drndfq-4"})(templateObject_5$6$1||(templateObject_5$6$1=__makeTemplateObject(["\n font-size: 25px;\n color: white;\n"],["\n font-size: 25px;\n color: white;\n"])));_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__ContentContainer",componentId:"sc-drndfq-5"})(templateObject_6$3$1||(templateObject_6$3$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n"],["\n display: flex;\n width: 100%;\n"])));_styled__default["default"](DateTime).withConfig({displayName:"PromotedNewsItem__StyledDate",componentId:"sc-drndfq-6"})(templateObject_7$2$1||(templateObject_7$2$1=__makeTemplateObject(["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.small);_styled__default["default"].h2.withConfig({displayName:"PromotedNewsItem__Title",componentId:"sc-drndfq-7"})(templateObject_8$2$1||(templateObject_8$2$1=__makeTemplateObject(["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"],["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"])),maxScreenSize.xLarge,maxScreenSize.large,maxScreenSize.medium,maxScreenSize.small);_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__BookmarkContainer",componentId:"sc-drndfq-8"})(templateObject_9$2$1||(templateObject_9$2$1=__makeTemplateObject(["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"],["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"])));_styled__default["default"].div.withConfig({displayName:"PromotedNewsItem__TextContainer",componentId:"sc-drndfq-9"})(templateObject_10$1$1||(templateObject_10$1$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"],["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"])));var templateObject_1$h$1,templateObject_2$d,templateObject_3$b,templateObject_4$7$1,templateObject_5$6$1,templateObject_6$3$1,templateObject_7$2$1,templateObject_8$2$1,templateObject_9$2$1,templateObject_10$1$1;function useTranslateApi(){var api=useApi();return React$d.useMemo(function(){return {translateContents:translateContents};function translateContents(type,itemId,language){return api.custom(type+"/"+itemId+"/contents/"+language).get().then(function(res){return res.body().data();});}},[api]);}var PageTitle=function PageTitle(_a){var page=_a.page,title=_a.title,search=_a.search,className=_a.className;var user=useCurrentUser();var isDocument=page.pageType===PageType.Document;var language=getLanguageForPage(page,user);var buildPath=useSubscriptionHandlePathBuilder().buildPath;var handleExternalContentClick=useExternalContentClickHandler();var pageTitle=jsxRuntime.jsx(jsxRuntime.Fragment,{children:search?jsxRuntime.jsx(Highlighter,{searchWords:[search],autoEscape:true,textToHighlight:title},void 0):title},void 0);if(page.useExternalContent){var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(page,preferredContentLanguage);var targetRoute=NewsService.getNewsRoute(buildPath('/pages'),page.id,title);return jsxRuntime.jsx(Title$1$1,{children:jsxRuntime.jsxs(StyledNavLink,__assign({to:targetRoute,onClick:function(e){return handleExternalContentClick(e,page,ItemResourceTypes.Pages);}},{children:[pageTitle,jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:'ExternalLinkButton.pages.navigateTo',tooltipResourceValues:url},void 0)]}),void 0)},void 0);}return jsxRuntime.jsxs(Title$1$1,__assign({className:className},{children:[isDocument&&jsxRuntime.jsx(FileIcon,{iconName:getFileIconByExtension(page.contents[language].fileInfo.extension)},void 0),pageTitle]}),void 0);};var Title$1$1=_styled__default["default"].h2.withConfig({displayName:"PageTitle__Title",componentId:"sc-gsx6ad-0"})(templateObject_1$g$1||(templateObject_1$g$1=__makeTemplateObject(["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"],["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"])),spacingS+5,spacingS,fontSizeMedium);var FileIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PageTitle__FileIcon",componentId:"sc-gsx6ad-1"})(templateObject_2$c||(templateObject_2$c=__makeTemplateObject(["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"],["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"])),fontSizeMedium+4,spacingS);var StyledNavLink=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PageTitle__StyledNavLink",componentId:"sc-gsx6ad-2"})(templateObject_3$a$1||(templateObject_3$a$1=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$g$1,templateObject_2$c,templateObject_3$a$1;_styled__default["default"].div.withConfig({displayName:"PageCard__PageModifiedInfo",componentId:"sc-13xtreq-0"})(templateObject_1$f$1||(templateObject_1$f$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled__default["default"](PageTitle).withConfig({displayName:"PageCard__StyledPageTitle",componentId:"sc-13xtreq-1"})(templateObject_2$b$1||(templateObject_2$b$1=__makeTemplateObject(["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"],["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"])));_styled__default["default"](Intro$3).withConfig({displayName:"PageCard__StyledIntro",componentId:"sc-13xtreq-2"})(templateObject_3$9$1||(templateObject_3$9$1=__makeTemplateObject(["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"])),spacingS,spacingS);_styled__default["default"].div.withConfig({displayName:"PageCard__Keywords",componentId:"sc-13xtreq-3"})(templateObject_4$6$1||(templateObject_4$6$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"],["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled__default["default"].div.withConfig({displayName:"PageCard__Inner",componentId:"sc-13xtreq-4"})(templateObject_5$5$1||(templateObject_5$5$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"],["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"])),spacingM,spacingS);_styled__default["default"](DocumentDownloadButton).withConfig({displayName:"PageCard__StyledDocumentDownloadButton",componentId:"sc-13xtreq-5"})(templateObject_6$2$1||(templateObject_6$2$1=__makeTemplateObject(["\n align-self: flex-start;\n z-index: 1;\n"],["\n align-self: flex-start;\n z-index: 1;\n"])));var templateObject_1$f$1,templateObject_2$b$1,templateObject_3$9$1,templateObject_4$6$1,templateObject_5$5$1,templateObject_6$2$1;_styled__default["default"].p.withConfig({displayName:"PageListItemBody__FullContent",componentId:"sc-7voum-0"})(templateObject_1$e$1||(templateObject_1$e$1=__makeTemplateObject(["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"],["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"])),spacingM-5,fontSizeSmall);_styled__default["default"].div.withConfig({displayName:"PageListItemBody__CutContentContainer",componentId:"sc-7voum-1"})(templateObject_2$a$1||(templateObject_2$a$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"],["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"])),spacingM-5);_styled__default["default"].p.withConfig({displayName:"PageListItemBody__CutContent",componentId:"sc-7voum-2"})(templateObject_3$8$1||(templateObject_3$8$1=__makeTemplateObject(["\n padding: 0;\n margin: 0;\n ","\n"],["\n padding: 0;\n margin: 0;\n ","\n"])),LineClamp(5,fontSizeSmall,1.5));_styled__default["default"](ActionButton).withConfig({displayName:"PageListItemBody__StyledActionButton",componentId:"sc-7voum-3"})(templateObject_4$5$1||(templateObject_4$5$1=__makeTemplateObject(["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"],["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"])),spacingXs,spacingXs,spacingXs,fontSizeSmaller);var templateObject_1$e$1,templateObject_2$a$1,templateObject_3$8$1,templateObject_4$5$1;_styled__default["default"].div.withConfig({displayName:"PageListItem__Host",componentId:"sc-lz5d51-0"})(templateObject_1$d$1||(templateObject_1$d$1=__makeTemplateObject(["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"],["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"])),CardBorderInline(2,2),spacingM);_styled__default["default"].div.withConfig({displayName:"PageListItem__Keywords",componentId:"sc-lz5d51-1"})(templateObject_2$9$1||(templateObject_2$9$1=__makeTemplateObject(["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"],["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled__default["default"].div.withConfig({displayName:"PageListItem__LastUpdated",componentId:"sc-lz5d51-2"})(templateObject_3$7$1||(templateObject_3$7$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled__default["default"](PageBreadcrumb).withConfig({displayName:"PageListItem__StyledPageBreadcrumb",componentId:"sc-lz5d51-3"})(templateObject_4$4$1||(templateObject_4$4$1=__makeTemplateObject(["\n flex: 1 1 auto;\n width: ","%;\n"],["\n flex: 1 1 auto;\n width: ","%;\n"])),function(p){return p.maxWidth;});_styled__default["default"].div.withConfig({displayName:"PageListItem__Inner",componentId:"sc-lz5d51-4"})(templateObject_5$4$1||(templateObject_5$4$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var templateObject_1$d$1,templateObject_2$9$1,templateObject_3$7$1,templateObject_4$4$1,templateObject_5$4$1;var PagesDetailViewNavigation=function PagesDetailViewNavigation(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,className=_a.className;var features=useFeatures();var user=useCurrentUser();if(!features.inPageNavigation){return null;}var currentPage=navigationContext.siblings.find(function(s){return s.id===activePageId;});if(currentPage==null){return null;}// sort by group and position only the root pages
|
|
126030
|
+
var pages=!navigationContext.parent||!navigationContext.parent.id?sortPageNodesByGroupAndPosition(user.groups,navigationContext.siblings):navigationContext.siblings;var previousPage=getSibling(-1);var nextPage=getSibling(1);return jsxRuntime.jsxs(Host$2$1,__assign({className:className,"data-detail-page-navigation":activePageId},{children:[previousPage&&jsxRuntime.jsx(PageLinkButton,{isNextNode:false,basePath:basePath,page:previousPage,icon:"ChevronLeftSmall","data-detail-page-navigation-previous-node":previousPage.id,"data-detail-page-navigation-node":previousPage.id},void 0),nextPage&&jsxRuntime.jsx(PageLinkButton,{isNextNode:true,className:"next-page-link-button",basePath:basePath,page:nextPage,icon:"ChevronRightSmall","data-detail-page-navigation-next-node":nextPage.id,"data-detail-page-navigation-node":nextPage.id},void 0)]}),void 0);function getSibling(offset){var index=pages.findIndex(function(s){return s.id===activePageId;});return pages[index+offset];}};var Host$2$1=_styled__default["default"].div.withConfig({displayName:"PagesDetailViewNavigation__Host",componentId:"sc-19ae9g3-0"})(templateObject_1$c$1||(templateObject_1$c$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n"],["\n display: flex;\n flex-wrap: wrap;\n"])));var PageLinkButton=function PageLinkButton(_a){var basePath=_a.basePath,page=_a.page,icon=_a.icon,isNextNode=_a.isNextNode,className=_a.className,props=__rest(_a,["basePath","page","icon","isNextNode","className"]);var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var title=getTitle(page,user,formatMessage);return jsxRuntime.jsxs(Link,__assign({to:getUrl(),className:className},{children:[!isNextNode&&jsxRuntime.jsx(LinkIcon,{iconName:icon},void 0),jsxRuntime.jsx(Content$2$1,__assign({},props,{isNextNode:isNextNode},{children:jsxRuntime.jsx("div",__assign({title:title},{children:title}),void 0)}),void 0),isNextNode&&jsxRuntime.jsx(LinkIcon,{iconName:icon},void 0)]}),void 0);function getUrl(){var baseUrl=NewsService.getNewsRoute(basePath,page.id,title);return page.useExternalContent?baseUrl+"?"+queryString.stringify({noRedirect:true}):baseUrl;}};var Link=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PagesDetailViewNavigation__Link",componentId:"sc-19ae9g3-1"})(templateObject_2$8$1||(templateObject_2$8$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"],["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"])),spacingS,spacingS,maxScreenSize.small,spacingS,function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.textColors.default;});var LinkIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PagesDetailViewNavigation__LinkIcon",componentId:"sc-19ae9g3-2"})(templateObject_3$6$1||(templateObject_3$6$1=__makeTemplateObject(["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"],["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"])),fontSizeNormal,spacingM);var Content$2$1=_styled__default["default"].div.withConfig({displayName:"PagesDetailViewNavigation__Content",componentId:"sc-19ae9g3-3"})(templateObject_5$3$1||(templateObject_5$3$1=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"])),function(p){return p.isNextNode&&_styled.css(templateObject_4$3$1||(templateObject_4$3$1=__makeTemplateObject(["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "],["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "])));});var templateObject_1$c$1,templateObject_2$8$1,templateObject_3$6$1,templateObject_4$3$1,templateObject_5$3$1;_styled__default["default"](Dropdown).withConfig({displayName:"PagesGroupsSelector__StyledDropdown",componentId:"sc-13yd888-0"})(templateObject_1$b$1||(templateObject_1$b$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PagesGroupsSelector__DropdownOption",componentId:"sc-13yd888-1"})(templateObject_2$7$1||(templateObject_2$7$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);_styled.createGlobalStyle(templateObject_3$5$1||(templateObject_3$5$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$b$1,templateObject_2$7$1,templateObject_3$5$1;_styled__default["default"].div.withConfig({displayName:"GroupNotificationsSettings__Host",componentId:"sc-1z0rxrb-0"})(templateObject_1$a$1||(templateObject_1$a$1=__makeTemplateObject(["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"],["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"])),maxScreenSize.small);_styled__default["default"].h2.withConfig({displayName:"GroupNotificationsSettings__Title",componentId:"sc-1z0rxrb-1"})(templateObject_2$6$1||(templateObject_2$6$1=__makeTemplateObject(["\n margin-top: 0;\n"],["\n margin-top: 0;\n"])));_styled__default["default"].div.withConfig({displayName:"GroupNotificationsSettings__Infos",componentId:"sc-1z0rxrb-2"})(templateObject_3$4$1||(templateObject_3$4$1=__makeTemplateObject(["\n color: ",";\n padding-left: 55px;\n"],["\n color: ",";\n padding-left: 55px;\n"])),function(p){return p.theme.palette.neutralTertiaryAlt;});var templateObject_1$a$1,templateObject_2$6$1,templateObject_3$4$1;function getPostGroups(user){return getGroupsWithExplicitMinRole(GroupRoles.LimitedReader,user,function(g){return g.allowPosts;});}function getPostsBaseRoute(post,user){var _a;var postGroups=getPostGroups(user);var subscriptionHandle=(_a=user.subscription.subscriptionHandle)!==null&&_a!==void 0?_a:user.subscription.id;return postGroups.length>1?"/"+subscriptionHandle+"/posts/groups/"+((post===null||post===void 0?void 0:post.groupId)||''):"/"+subscriptionHandle+"/posts";}function getPostsHashtagFilterRoute(post,user,hashtag){return getPostsBaseRoute(post,user)+"?"+queryString.stringify({search:""+hashtag});}var PostReplies=function PostReplies(_a){var className=_a.className,post=_a.post,comments=_a.comments,initialPageSize=_a.initialPageSize,autoFocusReplyField=_a.autoFocusReplyField,onReplyAdded=_a.onReplyAdded,onReplyDeleted=_a.onReplyDeleted,onThreadReply=_a.onThreadReply;var user=useCurrentUser();var searchPostMentionUsers=usePostsApi().searchPostMentionUsers;if(!post||!post.id){return null;}return jsxRuntime.jsx(StyledPagedCommentsSection,{className:className,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},type:ItemResourceTypes.Posts,scope:ConversationScope.Posts,itemId:post.id,groupIds:[post.groupId],readOnly:false,pageSize:5,initialPageSize:initialPageSize,initialComments:comments,onCommentAdded:onReplyAdded,onCommentDeleted:onReplyDeleted,noItemsYetStringResourceKey:"Posts.replies.empty",autoFocusReplyField:autoFocusReplyField,baseAttachmentPath:"/posts/"+post.id+"/comments",getHashtagFilterRoute:function(hashtag){return getPostsHashtagFilterRoute(post,user,hashtag);},onThreadReply:onThreadReply},post.id);};var StyledPagedCommentsSection=_styled__default["default"](PagedCommentsSection).withConfig({displayName:"PostReplies__StyledPagedCommentsSection",componentId:"sc-8mrgcg-0"})(templateObject_1$9$1||(templateObject_1$9$1=__makeTemplateObject(["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"],["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"])));var templateObject_1$9$1;var PostEditor=function PostEditor(_a){var className=_a.className,post=_a.post,onBeforeSave=_a.onBeforeSave,onSaved=_a.onSaved,onCancel=_a.onCancel,keywordSettings=_a.keywordSettings;var features=useFeatures();var _b=usePostsApi(),searchPostMentionUsers=_b.searchPostMentionUsers,updatePost=_b.updatePost;var _c=React$d.useContext(LazySubscriptionContext),allKeywords=_c.allKeywords,keywordsByGroupId=_c.keywordsByGroupId;var _d=useNotificationContext(),showToast=_d.showToast,showError=_d.showError;if(allKeywords==null||keywordsByGroupId==null){return null;}return jsxRuntime.jsx(EditCommentWithAttachments,{className:className,onCancel:onCancel,content:post.content,onSave:handleSavePost,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},inputTheme:"dark",item:post,basePath:'/posts',allowKeywords:features.keywords&&features.postKeywords,availableKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.availableKeywords,mandatoryKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.mandatoryKeywords,keywords:post.keywords,saveOnCtrlEnter:true},void 0);function handleSavePost(newContent,attachments,keywords){return __awaiter(this,void 0,void 0,function(){var updatedPost,error_1;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);onBeforeSave(__assign(__assign({},post),{content:newContent,attachments:attachments,keywords:keywords}));return [4/*yield*/,updatePost(post.id,newContent,attachments,keywords)];case 1:updatedPost=_a.sent();onSaved(updatedPost);showToast('Posts.successfullyUpdated');return [3/*break*/,3];case 2:error_1=_a.sent();logger.error(error_1);showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}};_styled__default["default"](IconButton).withConfig({displayName:"PostFollowButton__StyledIconButton",componentId:"sc-1i97syp-0"})(templateObject_1$8$1||(templateObject_1$8$1=__makeTemplateObject(["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"],["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"])));var templateObject_1$8$1;var PostGroup=function PostGroup(_a){var groupId=_a.groupId,to=_a.to,className=_a.className;var intl=useIntl();var user=useCurrentUser();var group=user.groups.find(function(g){return g.id===groupId;});var groupName=getGroupName(group,user,intl);return jsxRuntime.jsx(Group,__assign({"data-post-group":groupId,title:groupName,to:to,className:className},{children:jsxRuntime.jsx("span",{children:groupName},void 0)}),void 0);};var Group=_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PostGroup__Group",componentId:"sc-182l34m-0"})(templateObject_1$7$1||(templateObject_1$7$1=__makeTemplateObject(["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"],["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"])),fontSizeSmall,function(){return HighlightBubble();});var templateObject_1$7$1;_styled__default["default"].div.withConfig({displayName:"PostDisplay__Host",componentId:"sc-1tope3b-0"})(templateObject_1$6$1||(templateObject_1$6$1=__makeTemplateObject(["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"],["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"])),CardBorderInline(2,2),fontSizeSmall,spacingM);_styled__default["default"].div.withConfig({displayName:"PostDisplay__Header",componentId:"sc-1tope3b-1"})(templateObject_2$5$1||(templateObject_2$5$1=__makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n"],["\n display: flex;\n align-items: flex-start;\n"])));var avatarWidth=40;var maxButtonsWidth=120;// max 4 buttons at 30 px each (translate, notifications, like and context menu)
|
|
126031
|
+
var paddingLeft=spacingS;var postGroupWidth=250;var postGroupWidthSmall=215;_styled__default["default"].div.withConfig({displayName:"PostDisplay__HeaderMetadata",componentId:"sc-1tope3b-2"})(templateObject_3$3$1||(templateObject_3$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"],["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"])),fontSizeSmall,paddingLeft,avatarWidth,maxButtonsWidth,paddingLeft,function(p){return p.addSafetySpace?postGroupWidth:0;},maxScreenSize.medium,avatarWidth,maxButtonsWidth,paddingLeft);_styled__default["default"].div.withConfig({displayName:"PostDisplay__Content",componentId:"sc-1tope3b-3"})(templateObject_4$2$1||(templateObject_4$2$1=__makeTemplateObject(["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"],["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"])));_styled__default["default"].div.withConfig({displayName:"PostDisplay__ActionButtons",componentId:"sc-1tope3b-4"})(templateObject_5$2$1||(templateObject_5$2$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: auto;\n"],["\n display: flex;\n align-items: center;\n margin-left: auto;\n"])));_styled__default["default"].div.withConfig({displayName:"PostDisplay__PostDisplayName",componentId:"sc-1tope3b-5"})(templateObject_6$1$1||(templateObject_6$1$1=__makeTemplateObject(["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"],["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));_styled__default["default"](DateTime).withConfig({displayName:"PostDisplay__PostDateTime",componentId:"sc-1tope3b-6"})(templateObject_7$1$1||(templateObject_7$1$1=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeSmaller);_styled__default["default"](ActionButton).withConfig({displayName:"PostDisplay__AddReplyButton",componentId:"sc-1tope3b-7"})(templateObject_8$1$1||(templateObject_8$1$1=__makeTemplateObject(["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"],["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"])),spacingM,function(p){return p.theme.palette.accent;});_styled__default["default"].div.withConfig({displayName:"PostDisplay__InnerHost",componentId:"sc-1tope3b-8"})(templateObject_10$d||(templateObject_10$d=__makeTemplateObject(["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"],["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"])),postsSectionPadding,function(p){return p.highlight&&_styled.css(templateObject_9$1$1||(templateObject_9$1$1=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 6px;\n display: block;\n background-color: ",";\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 6px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.accent;});});_styled__default["default"](PostReplies).withConfig({displayName:"PostDisplay__StyledPostComments",componentId:"sc-1tope3b-9"})(templateObject_11$8||(templateObject_11$8=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});_styled__default["default"](PostEditor).withConfig({displayName:"PostDisplay__StyledPostEditor",componentId:"sc-1tope3b-10"})(templateObject_12$7||(templateObject_12$7=__makeTemplateObject(["\n margin-top: 7px;\n position: relative;\n"],["\n margin-top: 7px;\n position: relative;\n"])));_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PostDisplay__PostLink",componentId:"sc-1tope3b-11"})(templateObject_13$6||(templateObject_13$6=__makeTemplateObject(["\n display: block;\n width: 100%;\n"],["\n display: block;\n width: 100%;\n"])));_styled__default["default"](PostGroup).withConfig({displayName:"PostDisplay__StyledPostGroup",componentId:"sc-1tope3b-12"})(templateObject_14$6||(templateObject_14$6=__makeTemplateObject(["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"],["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"])),spacingM,postGroupWidth,maxScreenSize.medium,spacingS,postGroupWidthSmall);_styled__default["default"](LikeButton).withConfig({displayName:"PostDisplay__StyledLikeButton",componentId:"sc-1tope3b-13"})(templateObject_15$6||(templateObject_15$6=__makeTemplateObject(["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"],["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"])));_styled__default["default"](ImagesAndFilesList).withConfig({displayName:"PostDisplay__StyledImagesAndFilesList",componentId:"sc-1tope3b-14"})(templateObject_16$6||(templateObject_16$6=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled__default["default"](IconButton).withConfig({displayName:"PostDisplay__MenuButton",componentId:"sc-1tope3b-15"})(templateObject_17$5||(templateObject_17$5=__makeTemplateObject(["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"],["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"])));_styled__default["default"](KeywordsInfo).withConfig({displayName:"PostDisplay__StyledKeywordsInfo",componentId:"sc-1tope3b-16"})(templateObject_18$4||(templateObject_18$4=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled__default["default"](ThreadView).withConfig({displayName:"PostDisplay__StyledThreadView",componentId:"sc-1tope3b-17"})(templateObject_19$4||(templateObject_19$4=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});var templateObject_1$6$1,templateObject_2$5$1,templateObject_3$3$1,templateObject_4$2$1,templateObject_5$2$1,templateObject_6$1$1,templateObject_7$1$1,templateObject_8$1$1,templateObject_9$1$1,templateObject_10$d,templateObject_11$8,templateObject_12$7,templateObject_13$6,templateObject_14$6,templateObject_15$6,templateObject_16$6,templateObject_17$5,templateObject_18$4,templateObject_19$4;_styled__default["default"](Dropdown).withConfig({displayName:"PostGroupsSelector__StyledDropdown",componentId:"sc-g6rhck-0"})(templateObject_1$5$1||(templateObject_1$5$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PostGroupsSelector__DropdownOption",componentId:"sc-g6rhck-1"})(templateObject_2$4$1||(templateObject_2$4$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);_styled.createGlobalStyle(templateObject_3$2$1||(templateObject_3$2$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$5$1,templateObject_2$4$1,templateObject_3$2$1;var isArray$1=isArray$3;var toLength$1=toLength$a;var bind=functionBindContext;// `FlattenIntoArray` abstract operation
|
|
126032
|
+
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
126033
|
+
var flattenIntoArray$1=function(target,original,source,sourceLen,start,depth,mapper,thisArg){var targetIndex=start;var sourceIndex=0;var mapFn=mapper?bind(mapper,thisArg,3):false;var element;while(sourceIndex<sourceLen){if(sourceIndex in source){element=mapFn?mapFn(source[sourceIndex],sourceIndex,original):source[sourceIndex];if(depth>0&&isArray$1(element)){targetIndex=flattenIntoArray$1(target,original,element,toLength$1(element.length),targetIndex,depth-1)-1;}else {if(targetIndex>=0x1FFFFFFFFFFFFF)throw TypeError('Exceed the acceptable array length');target[targetIndex]=element;}targetIndex++;}sourceIndex++;}return targetIndex;};var flattenIntoArray_1=flattenIntoArray$1;var isObject=isObject$c;var isArray=isArray$3;var wellKnownSymbol$m=wellKnownSymbol$l;var SPECIES$5=wellKnownSymbol$m('species');// `ArraySpeciesCreate` abstract operation
|
|
126034
|
+
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
126035
|
+
var arraySpeciesCreate$1=function(originalArray,length){var C;if(isArray(originalArray)){C=originalArray.constructor;// cross-realm fallback
|
|
126036
|
+
if(typeof C=='function'&&(C===Array||isArray(C.prototype)))C=undefined;else if(isObject(C)){C=C[SPECIES$5];if(C===null)C=undefined;}}return new(C===undefined?Array:C)(length===0?0:length);};var $$g=_export;var flattenIntoArray=flattenIntoArray_1;var toObject=toObject$7;var toLength$b=toLength$a;var aFunction=aFunction$7;var arraySpeciesCreate=arraySpeciesCreate$1;// `Array.prototype.flatMap` method
|
|
126037
|
+
// https://github.com/tc39/proposal-flatMap
|
|
126038
|
+
$$g({target:'Array',proto:true},{flatMap:function flatMap(callbackfn/* , thisArg */){var O=toObject(this);var sourceLen=toLength$b(O.length);var A;aFunction(callbackfn);A=arraySpeciesCreate(O,0);A.length=flattenIntoArray(A,O,O,sourceLen,0,1,callbackfn,arguments.length>1?arguments[1]:undefined);return A;}});// this method was added to unscopables after implementation
|
|
126039
|
+
// in popular engines, so it's moved to a separate module
|
|
126040
|
+
var addToUnscopables=addToUnscopables$2;addToUnscopables('flatMap');gql(templateObject_1$4$1||(templateObject_1$4$1=__makeTemplateObject(["\n mutation MarkItemsAsRead($itemIds: [String]) {\n markItemsAsRead(itemIds: $itemIds)\n }\n"],["\n mutation MarkItemsAsRead($itemIds: [String]) {\n markItemsAsRead(itemIds: $itemIds)\n }\n"])));var templateObject_1$4$1;var EditorListItem=function EditorListItem(props){var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var itemDomRef=React$d.useRef();var webAppUrl=useConfiguration().webAppUrl;if(props.language==null){return null;}var item=props.item;var className=classNames(props.className,'editor-list-item',{'editor-list-item-rejected ms-borderColor-red':item.status===WorkflowStatus.rejected&&isCurrentUserItemOwner()},{'editor-list-item-selected ms-fontColor-onSecondary ms-bgColor-themeSecondary':props.isSelected},{'ms-bgColor-white':!props.isSelected},{'editor-list-item--highlighted':props.highlighted});return jsxRuntime.jsxs(ListItem,__assign({className:className,"data-item-is-published":props.isPublishedItem,"data-is-focusable":true,"data-item-is-selected":props.isSelected,"data-item-id":item.id,ref:itemDomRef},{children:[props.useExternalLink?jsxRuntime.jsx(ExternalLink,__assign({href:""+webAppUrl+props.basePath+"/"+item.id+"/"+props.language,className:"editor-list-content",target:"_blank",rel:"noopener noreferrer",onClick:function(e){var _a;return (_a=props.onClick)===null||_a===void 0?void 0:_a.call(props,e,itemDomRef.current,item,getTitle());}},{children:props.onRenderContent(item,getTitle(),props.isSelected)}),void 0):jsxRuntime.jsx(Content$9,__assign({to:props.basePath+"/"+item.id+"/"+props.language,onClick:function(e){var _a;return (_a=props.onClick)===null||_a===void 0?void 0:_a.call(props,e,itemDomRef.current,item,getTitle());},className:"editor-list-content"},{children:props.onRenderContent(item,getTitle(),props.isSelected)}),void 0),jsxRuntime.jsxs(Options,{children:[props.allowSelection&&jsxRuntime.jsx(SelectedIconOption,{children:jsxRuntime.jsx(SelectedIcon,{"data-item-select":true,iconProps:{iconName:'CompletedSolid'},ariaLabel:formatMessage({id:'AriaLabel.editor.selectItemButton'}),onClick:toggleSelect,isTouch:env.isTouchDevice,isSelected:props.isSelected,className:classNames('ms-fontColor-neutralTertiary',{'ms-fontColor-themeDarkAlt':props.isSelected})},void 0)},void 0),jsxRuntime.jsx(StatusOption,{status:item.status,isActive:props.isSelected},void 0),jsxRuntime.jsx(Option,__assign({className:"editor-list-persona"},{children:item.owner&&jsxRuntime.jsx(Avatar,{upn:item.owner.userPrincipalName,size:props.useLargeAvatar?officeUiFabricReact.PersonaSize.size48:officeUiFabricReact.PersonaSize.size32,text:props.item.owner.displayName,hidePersonaDetails:true},void 0)}),void 0)]},void 0)]}),void 0);function isCurrentUserItemOwner(){return props.item.owner&&props.item.owner.userPrincipalName===user.userPrincipalName;}function getTitle(){var title=props.item.contents[props.language].title;return title==null||title.trim().length===0?"<"+formatMessage({id:'Generic.noTitle'})+">":title;}function toggleSelect(){props.onSelect(props.item,!props.isSelected);}};var EditorItemTitle=_styled__default["default"].h2.withConfig({displayName:"EditorListItem__EditorItemTitle",componentId:"sc-zoqzrc-0"})(templateObject_1$3$1||(templateObject_1$3$1=__makeTemplateObject(["\n && {\n font-weight: 600;\n margin: 0;\n font-size: 17px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n @media (max-width: 700px) {\n font-size: 15px;\n }\n }\n"],["\n && {\n font-weight: 600;\n margin: 0;\n font-size: 17px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n @media (max-width: 700px) {\n font-size: 15px;\n }\n }\n"])));var SelectedIcon=_styled__default["default"](officeUiFabricReact.IconButton).withConfig({displayName:"EditorListItem__SelectedIcon",componentId:"sc-zoqzrc-1"})(templateObject_2$3$1||(templateObject_2$3$1=__makeTemplateObject(["\n padding: 0;\n height: 100%;\n width: auto;\n font-size: inherit;\n\n opacity: ",";\n\n &:focus {\n opacity: 1;\n }\n\n i {\n font-size: inherit;\n line-height: unset;\n height: auto;\n width: auto;\n padding: 0 19px 0 10px;\n }\n"],["\n padding: 0;\n height: 100%;\n width: auto;\n font-size: inherit;\n\n opacity: ",";\n\n &:focus {\n opacity: 1;\n }\n\n i {\n font-size: inherit;\n line-height: unset;\n height: auto;\n width: auto;\n padding: 0 19px 0 10px;\n }\n"])),function(p){return p.isSelected?1:p.isTouch?0.1:0;});var ListItem=_styled__default["default"].div.withConfig({displayName:"EditorListItem__ListItem",componentId:"sc-zoqzrc-2"})(templateObject_3$1$1||(templateObject_3$1$1=__makeTemplateObject(["\n position: relative;\n font-family: 'Roboto', sans-serif;\n text-decoration: none;\n ",";\n\n display: flex;\n flex-flow: row nowrap;\n text-align: left;\n\n a,\n a:hover,\n a:active,\n a:visited {\n color: ",";\n text-decoration: none;\n }\n\n &.editor-list-item-rejected {\n border-left-width: 10px;\n border-style: solid;\n border-top: 0;\n border-bottom: 0;\n border-right: 0;\n > .editor-list-content {\n margin-left: 6px;\n }\n }\n\n &:hover {\n "," {\n opacity: 1;\n }\n }\n"],["\n position: relative;\n font-family: 'Roboto', sans-serif;\n text-decoration: none;\n ",";\n\n display: flex;\n flex-flow: row nowrap;\n text-align: left;\n\n a,\n a:hover,\n a:active,\n a:visited {\n color: ",";\n text-decoration: none;\n }\n\n &.editor-list-item-rejected {\n border-left-width: 10px;\n border-style: solid;\n border-top: 0;\n border-bottom: 0;\n border-right: 0;\n > .editor-list-content {\n margin-left: 6px;\n }\n }\n\n &:hover {\n "," {\n opacity: 1;\n }\n }\n"])),CardBorderInline(2,2),function(p){return p.theme.textColors.default;},SelectedIcon);var Options=_styled__default["default"].div.withConfig({displayName:"EditorListItem__Options",componentId:"sc-zoqzrc-3"})(templateObject_4$1$1||(templateObject_4$1$1=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-flow: row nowrap;\n padding-right: 15px;\n\n @media (max-width: 700px) {\n padding-right: 6px;\n }\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-flow: row nowrap;\n padding-right: 15px;\n\n @media (max-width: 700px) {\n padding-right: 6px;\n }\n"])));var Option=_styled__default["default"].div.withConfig({displayName:"EditorListItem__Option",componentId:"sc-zoqzrc-4"})(templateObject_5$1$1||(templateObject_5$1$1=__makeTemplateObject(["\n padding: 6px 25px 6px 6px;\n font-size: 24px;\n text-align: center;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n\n flex: 0 1 auto;\n\n &.editor-list-persona {\n width: 32px;\n }\n > div {\n height: 24px;\n }\n\n @media (max-width: 700px) {\n padding: 5px;\n i {\n font-size: 0.9em !important;\n padding: 0;\n }\n }\n"],["\n padding: 6px 25px 6px 6px;\n font-size: 24px;\n text-align: center;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n\n flex: 0 1 auto;\n\n &.editor-list-persona {\n width: 32px;\n }\n > div {\n height: 24px;\n }\n\n @media (max-width: 700px) {\n padding: 5px;\n i {\n font-size: 0.9em !important;\n padding: 0;\n }\n }\n"])));var SelectedIconOption=_styled__default["default"](Option).withConfig({displayName:"EditorListItem__SelectedIconOption",componentId:"sc-zoqzrc-5"})(templateObject_6$r||(templateObject_6$r=__makeTemplateObject(["\n padding: 6px;\n"],["\n padding: 6px;\n"])));var LinkStyle=_styled.css(templateObject_7$m||(templateObject_7$m=__makeTemplateObject(["\n padding: ","px;\n flex: 1 0 auto;\n /* todo: This smells, but it's required to make the ellipsis work. How to avoid it?*/\n width: 100px;\n margin: ","px ","px ","px ","px;\n\n @media (max-width: 700px) {\n margin: ","px;\n }\n"],["\n padding: ","px;\n flex: 1 0 auto;\n /* todo: This smells, but it's required to make the ellipsis work. How to avoid it?*/\n width: 100px;\n margin: ","px ","px ","px ","px;\n\n @media (max-width: 700px) {\n margin: ","px;\n }\n"])),spacingXs,spacingS,spacingS,spacingS,spacingS+6,spacingXs);var Content$9=_styled__default["default"](ReactRouterDom.Link).withConfig({displayName:"EditorListItem__Content",componentId:"sc-zoqzrc-6"})(templateObject_8$k||(templateObject_8$k=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var ExternalLink=_styled__default["default"].a.withConfig({displayName:"EditorListItem__ExternalLink",componentId:"sc-zoqzrc-7"})(templateObject_9$f||(templateObject_9$f=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var StatusOption=function StatusOption(_a){var _b=_a.status,status=_b===void 0?WorkflowStatus.draft:_b,isActive=_a.isActive;if(status===WorkflowStatus.deleted){return null;}return jsxRuntime.jsx(Option,{children:status===WorkflowStatus.approved?jsxRuntime.jsx("img",{style:{width:'20px'},alt:""},void 0):jsxRuntime.jsx(Tooltip,__assign({resourceKey:'EditorList.'+status||WorkflowStatus.draft},{children:jsxRuntime.jsx(StateIcon,{status:status||WorkflowStatus.draft,width:20,isActive:isActive},void 0)}),void 0)},void 0);};var templateObject_1$3$1,templateObject_2$3$1,templateObject_3$1$1,templateObject_4$1$1,templateObject_5$1$1,templateObject_6$r,templateObject_7$m,templateObject_8$k,templateObject_9$f;var NewsEditorItem=function NewsEditorItem(_a){var title=_a.title,item=_a.item,isSelected=_a.isSelected;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(EditorItemTitle,__assign({className:classNames({'ms-fontColor-onSecondary':isSelected})},{children:title}),void 0),jsxRuntime.jsx(DateInfo,__assign({className:classNames('ms-fontSize-m',{'ms-fontColor-onSecondary':isSelected})},{children:jsxRuntime.jsx(MetaInfo$1,{dateMode:DateMode.Published,item:item,expiryDate:item.expiryDate,channels:item.channels,readOnly:true,showChannels:true,hideAvatar:true,hideDisplayName:true},void 0)}),void 0)]},void 0);};var MetaInfo$1=_styled__default["default"](ItemMetaInfo).withConfig({displayName:"NewsEditorItem__MetaInfo",componentId:"sc-1kz3wt0-0"})(templateObject_1$2$1||(templateObject_1$2$1=__makeTemplateObject(["\n [data-meta-info-details] {\n padding-left: 0;\n }\n"],["\n [data-meta-info-details] {\n padding-left: 0;\n }\n"])));var DateInfo=_styled__default["default"].div.withConfig({displayName:"NewsEditorItem__DateInfo",componentId:"sc-1kz3wt0-1"})(templateObject_2$2$1||(templateObject_2$2$1=__makeTemplateObject(["\n padding-top: 8px;\n @media (max-width: 700px) {\n font-size: 12px;\n }\n"],["\n padding-top: 8px;\n @media (max-width: 700px) {\n font-size: 12px;\n }\n"])));var templateObject_1$2$1,templateObject_2$2$1;var EventDates=_styled__default["default"].div.withConfig({displayName:"EventEditorItem__EventDates",componentId:"sc-1irp2hc-0"})(templateObject_1$1$1||(templateObject_1$1$1=__makeTemplateObject(["\n margin-top: ","px;\n font-size: ","px;\n\n display: flex;\n flex-direction: column;\n"],["\n margin-top: ","px;\n font-size: ","px;\n\n display: flex;\n flex-direction: column;\n"])),spacingS,fontSizeSmall);_styled__default["default"].div.withConfig({displayName:"EventEditorItem__EmptyEventDates",componentId:"sc-1irp2hc-1"})(templateObject_2$1$1||(templateObject_2$1$1=__makeTemplateObject(["\n font-style: italic;\n"],["\n font-style: italic;\n"])));_styled__default["default"].div.withConfig({displayName:"EventEditorItem__EventDateAndRecurrenceInfo",componentId:"sc-1irp2hc-2"})(templateObject_3$12||(templateObject_3$12=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));_styled__default["default"](EventRecurrenceSeriesInfo).withConfig({displayName:"EventEditorItem__RecurrenceSeriesInfo",componentId:"sc-1irp2hc-3"})(templateObject_4$K||(templateObject_4$K=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);_styled__default["default"](EventDates).withConfig({displayName:"EventEditorItem__DatesInfo",componentId:"sc-1irp2hc-4"})(templateObject_5$D||(templateObject_5$D=__makeTemplateObject(["\n margin-right: ","px;\n"],["\n margin-right: ","px;\n"])),spacingM);var templateObject_1$1$1,templateObject_2$1$1,templateObject_3$12,templateObject_4$K,templateObject_5$D;var CreateNewItemButton=function CreateNewItemButton(_a){var type=_a.type,groupId=_a.groupId,onClick=_a.onClick,className=_a.className;var baseRoute=useBaseRoute();var history=ReactRouterDom.useHistory();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var intl=useIntl();var user=useCurrentUser();var hasSelectedGroup=!!groupId;var groups=getGroupItems();if(hasSelectedGroup||groups.length===1){return jsxRuntime.jsx(StyledPrimaryButton,__assign({iconProps:{iconName:'AddTo'},onClick:function(){return handleOnClick(hasSelectedGroup?undefined:groups[0].key);},className:className,"data-button-create":type},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);}if(!groups.length){return null;}return jsxRuntime.jsx(MenuButton,__assign({iconProps:{iconName:'AddTo'},menuProps:{items:groups,calloutProps:{calloutMaxWidth:300},className:'lt-reach-callout'},className:className,"data-button-create":type},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);function getGroupItems(){return getGroupsWithExplicitMinRole(GroupRoles.Author,user).map(function(g){return {key:g.id,onClick:function(){return handleOnClick(g.id);},text:getGroupName(g,user,intl)};});}function openEditor(id){history.push(buildPath("/editor/"+type+"/groups/"+id+"/new"));}function handleOnClick(id){if(onClick){onClick(groupId||id);}else {hasSelectedGroup?history.push(baseRoute+"/new"):openEditor(id);}}};var MenuButton=_styled__default["default"](officeUiFabricReact.CommandBarButton).withConfig({displayName:"CreateNewItemButton__MenuButton",componentId:"sc-18o74g9-0"})(templateObject_1$2k||(templateObject_1$2k=__makeTemplateObject(["\n && {\n background-color: ",";\n &:hover {\n background-color: ",";\n i,\n span {\n color: ",";\n background-color: transparent;\n }\n }\n\n // the ms-fontColor on the button is not applied on the icons\n i,\n span {\n color: ",";\n }\n }\n\n height: 32px;\n padding: 0 ","px;\n\n i:first-child {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n && {\n background-color: ",";\n &:hover {\n background-color: ",";\n i,\n span {\n color: ",";\n background-color: transparent;\n }\n }\n\n // the ms-fontColor on the button is not applied on the icons\n i,\n span {\n color: ",";\n }\n }\n\n height: 32px;\n padding: 0 ","px;\n\n i:first-child {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),function(p){return p.theme.semanticColors.primaryButtonBackground;},function(p){return p.theme.semanticColors.primaryButtonBackgroundHovered;},function(p){return p.theme.semanticColors.primaryButtonTextHovered;},function(p){return p.theme.semanticColors.primaryButtonText;},spacingS,spacingS);var StyledPrimaryButton=_styled__default["default"](officeUiFabricReact.PrimaryButton).withConfig({displayName:"CreateNewItemButton__StyledPrimaryButton",componentId:"sc-18o74g9-1"})(templateObject_2$1w||(templateObject_2$1w=__makeTemplateObject(["\n padding: 0 ","px;\n\n i {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n padding: 0 ","px;\n\n i {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),spacingS,spacingS);var templateObject_1$2k,templateObject_2$1w;function useEditorApi(){var api=useApi();var fetchFromApi=useApiFactory().fetchFromApi;var sendBeacon=useBeaconHandler();var onRequestToken=React$d.useContext(AuthenticationContext).onRequestToken;return React$d.useMemo(function(){return {cloneItem:cloneItem,getDeletedItems:getDeletedItems,getVersion:getVersion,getVersions:getVersions,deleteDraft:deleteDraft,deleteRange:deleteRange,deletePermanently:deletePermanently,bulkSetStatus:bulkSetStatus,setStatus:setStatus,removeLease:removeLease,keepLeaseAlive:keepLeaseAlive,saveItem:saveItem,updateGroups:updateGroups};function updateGroups(itemType,itemId,groupIds){return api.custom("editor/"+itemType+"/"+itemId+"/groups").put(groupIds).then(function(response){return response.body().data();});}function cloneItem(itemType,itemId){return api.all("editor/"+itemType+"?"+queryString.stringify({cloneFromItem:itemId})).post({}).then(function(response){return response.body().data();});}function getDeletedItems(type,filter,token){var params=Object.assign({},filter,{token:token,pageSize:30});return api.all("editor/"+type+"/recyclebin").get('',params).then(function(res){return res.body().data();});}function getVersions(type,itemId){return from(api.all("editor/"+type+"/"+itemId+"/versions").getAll()).pipe(map(function(response){return response.body().map(function(group){return group.data();});}));}function getVersion(type,itemId,versionId){return api.all("editor/"+type+"/"+itemId+"/versions").get(versionId).then(function(response){return response.body().data();});}function deleteDraft(leaseId,itemId,type){var url="editor/"+type+"/"+itemId+"/draft";if(leaseId){url+="?leaseId="+leaseId;}return api.custom(url).delete();}function deleteRange(type,ids){var data=ids.map(function(id){return {id:id,status:WorkflowStatus.deleted};});return api.custom("editor/"+type).patch(data).then(function(response){return response.body().map(function(item){return item.data();});}).catch(function(){// set null as a result in case of error
|
|
126024
126041
|
return null;});}function deletePermanently(type,ids){var itemIds=ids.join(',');return api.custom("editor/"+type+"/recyclebin?"+queryString.stringify({itemIds:itemIds})).delete();}function bulkSetStatus(type,items){return api.custom("editor/"+type).patch(items).then(function(response){return response.body().map(function(item){return item.data();});});}function setStatus(type,itemId,status,leaseId){return __awaiter(this,void 0,void 0,function(){var path,response,ex_1;return __generator(this,function(_a){switch(_a.label){case 0:path="editor/"+type+"/"+itemId+"/status";if(leaseId!=null){path+='?'+queryString.stringify({leaseId:leaseId});}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,api.custom(path).put(status)];case 2:response=_a.sent();return [2/*return*/,response.body().data()];case 3:ex_1=_a.sent();throw ex_1.response.statusCode===409?{account:ex_1.response.data}:ex_1;case 4:return [2/*return*/];}});});}function removeLease(itemId,leaseId){return api.custom("editor/"+itemId+"/lease?"+queryString.stringify({leaseId:leaseId})).delete();}function keepLeaseAlive(itemId,leaseId,token,subscriptionId){var _this=this;var expireLeaseToken=token;// every 10 seconds
|
|
126025
126042
|
var timer=setInterval(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:// update the lease
|
|
126026
126043
|
return [4/*yield*/,api.custom("editor/"+itemId+"/lease").put({leaseId:leaseId})];case 1:// update the lease
|
|
@@ -126328,7 +126345,7 @@
|
|
|
126328
126345
|
|
|
126329
126346
|
var redefine$1 = redefine$k.exports;
|
|
126330
126347
|
var fails$2 = fails$w;
|
|
126331
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
126348
|
+
var wellKnownSymbol = wellKnownSymbol$E;
|
|
126332
126349
|
var regexpExec$1 = regexpExec$2;
|
|
126333
126350
|
var createNonEnumerableProperty = createNonEnumerableProperty$k;
|
|
126334
126351
|
|
|
@@ -126509,7 +126526,7 @@
|
|
|
126509
126526
|
|
|
126510
126527
|
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
126511
126528
|
var anObject$1 = anObject$v;
|
|
126512
|
-
var toLength = toLength$
|
|
126529
|
+
var toLength = toLength$k;
|
|
126513
126530
|
var requireObjectCoercible$1 = requireObjectCoercible$l;
|
|
126514
126531
|
var advanceStringIndex = advanceStringIndex$1;
|
|
126515
126532
|
var regExpExec = regexpExecAbstract;
|
|
@@ -127641,6 +127658,7 @@
|
|
|
127641
127658
|
var intl = useIntl();
|
|
127642
127659
|
var token = useCurrentToken();
|
|
127643
127660
|
var features = useFeatures();
|
|
127661
|
+
var buildPath = useSubscriptionHandlePathBuilder().buildPath;
|
|
127644
127662
|
|
|
127645
127663
|
if (!item) {
|
|
127646
127664
|
return null;
|
|
@@ -127650,7 +127668,6 @@
|
|
|
127650
127668
|
var headline = getHeadline(item, user);
|
|
127651
127669
|
var showHeadline = features.contentHeadline && headline != null;
|
|
127652
127670
|
var language = NewsService.getLanguageForPublishableItem(item, user);
|
|
127653
|
-
var targetRoute = NewsService.getNewsRoute(baseRoute, item.id, title);
|
|
127654
127671
|
var hasKeywords = Object.keys(item.keywords).length > 0;
|
|
127655
127672
|
var content = item.contents[language];
|
|
127656
127673
|
var hasIntro = content.intro && content.intro.length > 0;
|
|
@@ -127706,7 +127723,7 @@
|
|
|
127706
127723
|
children: headline
|
|
127707
127724
|
}, void 0), jsxRuntime.jsx(StyledTitle, {
|
|
127708
127725
|
title: title,
|
|
127709
|
-
targetRoute:
|
|
127726
|
+
targetRoute: getTargetRoute(true),
|
|
127710
127727
|
openTargetInNewWindow: openTargetInNewWindow,
|
|
127711
127728
|
onClick: onTitleClick,
|
|
127712
127729
|
isExternalContent: item.useExternalContent
|
|
@@ -127719,12 +127736,20 @@
|
|
|
127719
127736
|
}, void 0)
|
|
127720
127737
|
}, void 0), jsxRuntime.jsx(CardFooter, {
|
|
127721
127738
|
item: newsItem,
|
|
127722
|
-
targetRoute:
|
|
127739
|
+
targetRoute: getTargetRoute(),
|
|
127723
127740
|
showComments: true
|
|
127724
127741
|
}, void 0)]
|
|
127725
127742
|
}, void 0)]
|
|
127726
127743
|
}), void 0)]
|
|
127727
127744
|
}), void 0);
|
|
127745
|
+
|
|
127746
|
+
function getTargetRoute(redirect) {
|
|
127747
|
+
if (redirect) {
|
|
127748
|
+
return NewsService.getNewsRoute(item.useExternalContent ? buildPath('/redirect/news') : baseRoute, item.id, title);
|
|
127749
|
+
}
|
|
127750
|
+
|
|
127751
|
+
return NewsService.getNewsRoute(baseRoute, item.id, title);
|
|
127752
|
+
}
|
|
127728
127753
|
};
|
|
127729
127754
|
var Host$5 = _styled__default["default"].div(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n width: 100%;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n position: relative;\n\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n width: 100%;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n position: relative;\n\n ", "\n"])), function (p) {
|
|
127730
127755
|
return p.showHighlight && _styled.css(templateObject_1$a || (templateObject_1$a = __makeTemplateObject$l(["\n position: relative;\n &::after {\n ", ";\n }\n "], ["\n position: relative;\n &::after {\n ", ";\n }\n "])), BannerHighlightStyle);
|
|
@@ -128886,39 +128911,26 @@
|
|
|
128886
128911
|
}, void 0);
|
|
128887
128912
|
};
|
|
128888
128913
|
|
|
128889
|
-
var
|
|
128914
|
+
var NewsItemPreviewContextProvider = function NewsItemPreviewContextProvider(_a) {
|
|
128890
128915
|
var itemId = _a.itemId,
|
|
128891
128916
|
versionId = _a.versionId,
|
|
128892
|
-
|
|
128917
|
+
children = _a.children;
|
|
128893
128918
|
var getNews = useNewsEditorApi().getNews;
|
|
128894
128919
|
var getVersion = useEditorApi().getVersion;
|
|
128895
|
-
var itemContext = useDetailViewContext();
|
|
128896
128920
|
|
|
128897
|
-
if (!
|
|
128921
|
+
if (!itemId) {
|
|
128898
128922
|
return null;
|
|
128899
128923
|
}
|
|
128900
128924
|
|
|
128901
|
-
|
|
128902
|
-
|
|
128903
|
-
|
|
128904
|
-
|
|
128905
|
-
|
|
128906
|
-
|
|
128907
|
-
|
|
128908
|
-
return loadNewsPreview(itemId);
|
|
128909
|
-
},
|
|
128910
|
-
isReadOnly: true,
|
|
128911
|
-
type: ItemResourceTypes.News
|
|
128912
|
-
}, {
|
|
128913
|
-
children: jsxRuntime.jsx(NewsDetailPreviewInternal, {}, void 0)
|
|
128914
|
-
}), void 0)
|
|
128915
|
-
}), void 0);
|
|
128916
|
-
}
|
|
128917
|
-
|
|
128918
|
-
return jsxRuntime.jsx(Host, __assign$g({
|
|
128919
|
-
className: className
|
|
128925
|
+
return jsxRuntime.jsx(DetailViewContextProvider, __assign$g({
|
|
128926
|
+
itemId: itemId,
|
|
128927
|
+
loadItemFunc: function (itemId) {
|
|
128928
|
+
return loadNewsPreview(itemId);
|
|
128929
|
+
},
|
|
128930
|
+
isReadOnly: true,
|
|
128931
|
+
type: ItemResourceTypes.News
|
|
128920
128932
|
}, {
|
|
128921
|
-
children:
|
|
128933
|
+
children: children
|
|
128922
128934
|
}), void 0);
|
|
128923
128935
|
|
|
128924
128936
|
function loadNewsPreview(itemId) {
|
|
@@ -128953,6 +128965,36 @@
|
|
|
128953
128965
|
}
|
|
128954
128966
|
};
|
|
128955
128967
|
|
|
128968
|
+
var NewsDetailPreview = function NewsDetailPreview(_a) {
|
|
128969
|
+
var itemId = _a.itemId,
|
|
128970
|
+
versionId = _a.versionId,
|
|
128971
|
+
className = _a.className;
|
|
128972
|
+
var itemContext = useDetailViewContext();
|
|
128973
|
+
|
|
128974
|
+
if (!itemContext && !itemId) {
|
|
128975
|
+
return null;
|
|
128976
|
+
}
|
|
128977
|
+
|
|
128978
|
+
if (!itemContext) {
|
|
128979
|
+
return jsxRuntime.jsx(Host, __assign$g({
|
|
128980
|
+
className: className
|
|
128981
|
+
}, {
|
|
128982
|
+
children: jsxRuntime.jsx(NewsItemPreviewContextProvider, __assign$g({
|
|
128983
|
+
itemId: itemId,
|
|
128984
|
+
versionId: versionId
|
|
128985
|
+
}, {
|
|
128986
|
+
children: jsxRuntime.jsx(NewsDetailPreviewInternal, {}, void 0)
|
|
128987
|
+
}), void 0)
|
|
128988
|
+
}), void 0);
|
|
128989
|
+
}
|
|
128990
|
+
|
|
128991
|
+
return jsxRuntime.jsx(Host, __assign$g({
|
|
128992
|
+
className: className
|
|
128993
|
+
}, {
|
|
128994
|
+
children: jsxRuntime.jsx(NewsDetailPreviewInternal, {}, void 0)
|
|
128995
|
+
}), void 0);
|
|
128996
|
+
};
|
|
128997
|
+
|
|
128956
128998
|
var NewsDetailPreviewInternal = function NewsDetailPreviewInternal() {
|
|
128957
128999
|
return jsxRuntime.jsxs(PublishableItemDetailViewContainer, __assign$g({
|
|
128958
129000
|
preventExternalContentAutoRedirect: true
|
|
@@ -144843,7 +144885,7 @@
|
|
|
144843
144885
|
"MetadataEditor.keywordTitle": "Select keywords",
|
|
144844
144886
|
"MetadataEditor.customProperties": "Custom Fields",
|
|
144845
144887
|
"MetadataEditor.channelsLabel": "Channels",
|
|
144846
|
-
"MetadataEditor.addATranslationTitle": "
|
|
144888
|
+
"MetadataEditor.addATranslationTitle": "Manage languages",
|
|
144847
144889
|
"MetadataEditor.newsGroupTooltip": "This article is part of the group {group}",
|
|
144848
144890
|
"MetadataEditor.alerts.title": "Alert",
|
|
144849
144891
|
"MetadataEditor.alerts.enable": "Display an alert banner to readers of the selected channels",
|
|
@@ -145325,6 +145367,7 @@
|
|
|
145325
145367
|
"Languages.language": "Language",
|
|
145326
145368
|
"Languages.limitReached": "All translations have been added for the available languages.",
|
|
145327
145369
|
"Languages.setDefaultLanguage": "Set default language",
|
|
145370
|
+
"Languages.selectionPrompt": "In which languages do you want to offer this article to the readers?",
|
|
145328
145371
|
"Audience.title": "Audience Targeting",
|
|
145329
145372
|
"Audience.backToChannels": "Back to Channels",
|
|
145330
145373
|
"Audience.infoMsg1": "With audience targeting you can configure channel settings for specific user groups.",
|
|
@@ -205752,6 +205795,7 @@
|
|
|
205752
205795
|
exports.NewsGrid = NewsGrid;
|
|
205753
205796
|
exports.NewsHero = NewsHero;
|
|
205754
205797
|
exports.NewsItemContextProvider = NewsItemContextProvider;
|
|
205798
|
+
exports.NewsItemPreviewContextProvider = NewsItemPreviewContextProvider;
|
|
205755
205799
|
exports.NewsList = NewsList;
|
|
205756
205800
|
exports.PageDetail = PageDetail;
|
|
205757
205801
|
exports.ReachContextProvider = ReachContextProvider;
|