From 1bba1debb3175520100016fddfbcf7bcd0bd9aba Mon Sep 17 00:00:00 2001 From: Tomi Tavela Date: Tue, 12 May 2020 17:45:32 +0300 Subject: [PATCH 1/4] updated pnpjs and started using themes from theme-samples --- package-lock.json | 1198 +++++++++++++---- package.json | 48 +- .../@pnp/graph/directory-objects/types.d.ts | 12 +- public/@pnp/odata/queryable.d.ts | 4 +- public/@pnp/sp/fields/types.d.ts | 7 +- public/@pnp/sp/sites/types.d.ts | 5 + public/bundles/adaljsclient.es5.umd.bundle.js | 4 +- public/bundles/common.es5.umd.bundle.js | 4 +- public/bundles/config-store.es5.umd.bundle.js | 31 +- public/bundles/graph.es5.umd.bundle.js | 10 +- public/bundles/odata.es5.umd.bundle.js | 8 +- public/bundles/pnpjs.es5.umd.bundle.js | 4 +- .../bundles/sp-addinhelpers.es5.umd.bundle.js | 31 +- public/bundles/sp.es5.umd.bundle.js | 108 +- src/App.tsx | 4 +- src/components/navigation.tsx | 4 +- 16 files changed, 1132 insertions(+), 350 deletions(-) diff --git a/package-lock.json b/package-lock.json index ff219da4..892ee24f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1096,14 +1096,25 @@ "integrity": "sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg==" }, "@fluentui/react-focus": { - "version": "7.1.13", - "resolved": "https://registry.npmjs.org/@fluentui/react-focus/-/react-focus-7.1.13.tgz", - "integrity": "sha512-voY84/vRkcZGUHSwrPO6eEplc0EGKRGf06ov826NdzMq8s2BXoG2JMMdFNclFppQsCtcXOCPmfzwGHShJvGu5g==", - "requires": { - "@uifabric/merge-styles": "^7.8.11", - "@uifabric/set-version": "^7.0.9", - "@uifabric/styling": "^7.11.2", - "@uifabric/utilities": "^7.15.5", + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/@fluentui/react-focus/-/react-focus-7.11.1.tgz", + "integrity": "sha512-P+dYpJndpCVDsYsr2x6AjGwkI3M4E/zT7AcnRdb3RlVtHSVIMifXyf9TThPNERSBFQsYfMl8KR1qZqnUSV8sOg==", + "requires": { + "@uifabric/merge-styles": "^7.12.0", + "@uifabric/set-version": "^7.0.12", + "@uifabric/styling": "^7.12.5", + "@uifabric/utilities": "^7.16.4", + "tslib": "^1.10.0" + } + }, + "@fluentui/react-icons": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/@fluentui/react-icons/-/react-icons-0.1.14.tgz", + "integrity": "sha512-Z6JiMIn1RAkw2aJ4TJB4K1tjsQKV89U8xvBY9g4Q2/iK6Nm7fc/otCb25x+76XohYmw0vBw7m5eEgPHzj0HNWg==", + "requires": { + "@uifabric/set-version": "^7.0.12", + "@uifabric/styling": "^7.12.5", + "@uifabric/utilities": "^7.16.4", "tslib": "^1.10.0" } }, @@ -1142,28 +1153,28 @@ } }, "@ionic/core": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.0.7.tgz", - "integrity": "sha512-94Ebr4Uw/2aOqweGr4Xmo5csjTQwLcDuHraMC+VuQWNoCztuJI9cX/yhsAS2Yftor+vXC/uGZkubK+P+RFh1jQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.1.0.tgz", + "integrity": "sha512-L3Ps+0B0SqHlArMxPqgzmgtCs2D/cmgWw7rIDsOclh21igXZ9957kRR4BO7hzaXLbBIKjG1IzK2TAcX0uC94Sw==", "requires": { "ionicons": "^5.0.1", "tslib": "^1.10.0" } }, "@ionic/react": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ionic/react/-/react-5.0.7.tgz", - "integrity": "sha512-h77zCTYiA0lNReYoWljVkxKRMRK1ZKzDup+ExIoTcLfACT0ePtlPd2+BgBPPwUEEmt5GP964DMZe7/TLrhxUXw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@ionic/react/-/react-5.1.0.tgz", + "integrity": "sha512-aa8PHsq+s6MAP2au4nSfp/cWR/QEi0Bpv0CLsjK88ap7ynU3QAZHZD2cxmOlCtbQfY5tBRAHIFU6vbYBIJmi/g==", "requires": { - "@ionic/core": "5.0.7", + "@ionic/core": "5.1.0", "ionicons": "^5.0.1", "tslib": "*" } }, "@ionic/react-router": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ionic/react-router/-/react-router-5.0.7.tgz", - "integrity": "sha512-BQMiVQ9BXJnwL5SrZIn2T6htaOUUK1HMtAG0gPf0GJM00ELs6xGQYCQH1IJ5bvgBCc1PrXujHglvQiQBod0JRg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@ionic/react-router/-/react-router-5.1.0.tgz", + "integrity": "sha512-k9tS7PxQjkaZjNO3Fmi4wqymZJey8F2Ip07dBDo/bTwDysu4TqEftzdrRwxgnD0Gi4PVQ67RHKJuodXITWS38Q==", "requires": { "tslib": "*" } @@ -1360,9 +1371,9 @@ } }, "@microsoft/load-themed-styles": { - "version": "1.10.43", - "resolved": "https://registry.npmjs.org/@microsoft/load-themed-styles/-/load-themed-styles-1.10.43.tgz", - "integrity": "sha512-9RUeBMXPHbT/qHTRIQi9oQs3bw5JkQGBQ8ayjycq95q+1OUI9jBJPiJi2d8btpGdJWisVb3ZXxRsUx5u6f5dRA==" + "version": "1.10.45", + "resolved": "https://registry.npmjs.org/@microsoft/load-themed-styles/-/load-themed-styles-1.10.45.tgz", + "integrity": "sha512-JdwSqtXfkJXRzHfQT5gjYt9Xhoon56uQtbY6gOaLiIyzabvuv5ttzAvQceMsFowm8+Tsod8JjVjYnXRg2U6zJA==" }, "@microsoft/microsoft-graph-types": { "version": "1.5.0", @@ -1413,68 +1424,68 @@ } }, "@pnp/adaljsclient": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@pnp/adaljsclient/-/adaljsclient-2.0.4.tgz", - "integrity": "sha512-tq/WvaTX8L4L6gSPlh+Ym4ERD+zoIsZR8d6jzJ1liTgsM3ikhzwarw1diNn0vaN7/USkaPkBQ47UO5kwi2tojQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@pnp/adaljsclient/-/adaljsclient-2.0.5.tgz", + "integrity": "sha512-CYd2nVz6NWFsPlVXxWWb4rm9xdXxdo7hkxltAxzIysXF+2cXfgWpumth7k7naOCtTeyuMjL9+PzIQ9luciqFvw==", "dev": true, "requires": { - "@pnp/common": "2.0.4", + "@pnp/common": "2.0.5", "adal-angular": "1.0.17", "tslib": "1.10.0" } }, "@pnp/common": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@pnp/common/-/common-2.0.4.tgz", - "integrity": "sha512-VQT3IobLUJ3gdIfRF/vm8o77xosNmwP6u17mn4GB6RsDisKNc4B7xFMmwJ4tJCOVi2kFEGkh/YvJUi5+xoaEAQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@pnp/common/-/common-2.0.5.tgz", + "integrity": "sha512-swL2CBaqTHkk3JuB+WaHa3MEoRDV+JLyY5r6P6vtqiLnlYypb5ZWYgneRkq82SeJnbKP/xyMiCyhLd52KpY6Rg==", "dev": true, "requires": { "tslib": "1.10.0" } }, "@pnp/config-store": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@pnp/config-store/-/config-store-2.0.4.tgz", - "integrity": "sha512-8b9mm5xSw3y2DNOjY4klmwNfjMDFtK1ZRFPY7yn8Rn68oZeeTlIxyY4z6kN1msRNbFpEiiJCwEGV7P254fiz8A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@pnp/config-store/-/config-store-2.0.5.tgz", + "integrity": "sha512-J96xxv7okrR82lXpWCv8HUYJDBii0XUbCYiFaQ05LnMRjVyZH+KWFiS0kkbRSleahzKSraLLo+90GePhbk0+dw==", "dev": true, "requires": { - "@pnp/common": "2.0.4", - "@pnp/logging": "2.0.4", - "@pnp/sp": "2.0.4", + "@pnp/common": "2.0.5", + "@pnp/logging": "2.0.5", + "@pnp/sp": "2.0.5", "tslib": "1.10.0" } }, "@pnp/graph": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@pnp/graph/-/graph-2.0.4.tgz", - "integrity": "sha512-am7mFS7U788VjsufnvHShX1u5Nf8SC811cZVJ3Dcu9kYmorbxywylGOfj+5BM9xni5Jstq0A1jfqBIK6QM4p0Q==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@pnp/graph/-/graph-2.0.5.tgz", + "integrity": "sha512-wdUaU3WUUV0w55aldsOqbAD8EcQNRckXGWxGlvx1x+Q0raMQjLTo3HgpckKa3ISC/uIIYdIzviSmxVJOISJ1Pg==", "dev": true, "requires": { "@microsoft/microsoft-graph-types": "1.5.0", - "@pnp/adaljsclient": "2.0.4", - "@pnp/common": "2.0.4", - "@pnp/logging": "2.0.4", - "@pnp/odata": "2.0.4", + "@pnp/adaljsclient": "2.0.5", + "@pnp/common": "2.0.5", + "@pnp/logging": "2.0.5", + "@pnp/odata": "2.0.5", "tslib": "1.10.0" } }, "@pnp/logging": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@pnp/logging/-/logging-2.0.4.tgz", - "integrity": "sha512-V4NSIKj+KpJqNAN5oXYW+zKxnEy8OQ0C5k34jD80r8IWMsz07VM63rXsQFyHXPqe6ioT1UEMZFblvFCB5ncdrg==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@pnp/logging/-/logging-2.0.5.tgz", + "integrity": "sha512-vFuZwR4sPUcvTD/HolQvYLsaD9aO7w1mcQNKvPabG7ncYxEkI47cFnrgxxyqI2VjmyFVRvHfJTq0w6aFHeBFpQ==", "dev": true, "requires": { "tslib": "1.10.0" } }, "@pnp/nodejs": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@pnp/nodejs/-/nodejs-2.0.4.tgz", - "integrity": "sha512-h0HfFWb6E9yRlOuhDT/ORw6uRvV0SPg2+yiZzQhvZLSUUKwQOE0u5AWR/0bG4KCtpikFEsJ1kJI1PcA/vajDhA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@pnp/nodejs/-/nodejs-2.0.5.tgz", + "integrity": "sha512-LZ7IyxBG9MnH77b6soweY3EmcwjJLIBF+275L9gvnkArI2EEHH/Y+aOBbYRkui3PnCb+ntGY9RdDCJP3ZbiHNA==", "dev": true, "requires": { - "@pnp/common": "2.0.4", - "@pnp/logging": "2.0.4", + "@pnp/common": "2.0.5", + "@pnp/logging": "2.0.5", "adal-node": "0.1.28", "jsonwebtoken": "8.3.0", "node-fetch": "2.2.0", @@ -1482,52 +1493,52 @@ } }, "@pnp/odata": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@pnp/odata/-/odata-2.0.4.tgz", - "integrity": "sha512-/6Ot0+Yd5iuMcWiKPoSiMyylma4Tu4fp8ALDR5sMYzpeFoHN6Sbo3EOedtQxqo4LgB8SFlxDAwgdxE7vCGefNA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@pnp/odata/-/odata-2.0.5.tgz", + "integrity": "sha512-tB1Blv44T3TEhM7ZSL9MgOLkv7GFQmaYgNj3bcNcBYpLxtux6A83TU8vUAS9vz25rnNrCXxKZGmmXeACyOO6pQ==", "dev": true, "requires": { - "@pnp/common": "2.0.4", - "@pnp/logging": "2.0.4", + "@pnp/common": "2.0.5", + "@pnp/logging": "2.0.5", "tslib": "1.10.0" } }, "@pnp/pnpjs": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@pnp/pnpjs/-/pnpjs-2.0.4.tgz", - "integrity": "sha512-vyTxRUaWXOsN5FebiAOyOCMZuxYMTI/KdclMrCj6yS7VPEotXUqs7nIuaOX6c2Ywlv4fXjlSjhgcPeEwCuKBJA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@pnp/pnpjs/-/pnpjs-2.0.5.tgz", + "integrity": "sha512-68B0G5k3IY7wC1x4qIUvIfZt69uUP8nbKDM17xMuzIUdW7XOmM5JWUHBMY90JoKN0wrbAqzq5PV+QJjtBm1QJw==", "dev": true, "requires": { - "@pnp/common": "2.0.4", - "@pnp/config-store": "2.0.4", - "@pnp/graph": "2.0.4", - "@pnp/logging": "2.0.4", - "@pnp/odata": "2.0.4", - "@pnp/sp": "2.0.4", - "@pnp/sp-addinhelpers": "2.0.4", + "@pnp/common": "2.0.5", + "@pnp/config-store": "2.0.5", + "@pnp/graph": "2.0.5", + "@pnp/logging": "2.0.5", + "@pnp/odata": "2.0.5", + "@pnp/sp": "2.0.5", + "@pnp/sp-addinhelpers": "2.0.5", "tslib": "1.10.0" } }, "@pnp/sp": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@pnp/sp/-/sp-2.0.4.tgz", - "integrity": "sha512-SnV38mzf0tzxZoqOkkwbuOixl3yrkjn55pBm2BoalYoRz4nRk6pHZHpikjHdRFDo/KXwxIbjbKcrX+XA7xWDHA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@pnp/sp/-/sp-2.0.5.tgz", + "integrity": "sha512-i+JN/hDJY8Da1w0Zsb1lfbtl7iwmlvYD6YLdIMkmCKpsc6UmuVkYDZsDUApz5MEuIGYt497rStL7MtfnlSqGRQ==", "dev": true, "requires": { - "@pnp/common": "2.0.4", - "@pnp/logging": "2.0.4", - "@pnp/odata": "2.0.4", + "@pnp/common": "2.0.5", + "@pnp/logging": "2.0.5", + "@pnp/odata": "2.0.5", "tslib": "1.10.0" } }, "@pnp/sp-addinhelpers": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@pnp/sp-addinhelpers/-/sp-addinhelpers-2.0.4.tgz", - "integrity": "sha512-6ic3gmAdw/7yAhX81sEoJ95+QU+ghClduclpFvp6l6yEDe876yYs7lfHQY65wJRJuuWhAT1N5woDifJw8tViiQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@pnp/sp-addinhelpers/-/sp-addinhelpers-2.0.5.tgz", + "integrity": "sha512-tsaeXWUNPpu2SDR/hm7sUYFjR6maTIKiLpQgS4/+khGUvoQ5y+sfzwxCHzZ6bctMFP1+tc8iqqhehvPLbNSfPg==", "dev": true, "requires": { - "@pnp/common": "2.0.4", - "@pnp/sp": "2.0.4", + "@pnp/common": "2.0.5", + "@pnp/sp": "2.0.5", "@types/sharepoint": "2016.1.2", "tslib": "1.10.0" } @@ -1697,9 +1708,9 @@ } }, "@types/chrome": { - "version": "0.0.104", - "resolved": "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.104.tgz", - "integrity": "sha512-NDq+Vpphs5XT7IXrIHJcy27Rvf09Mes3XNsfpP2yOXUk6YiEU1QRcSLjj/A+y5jyq/kpUwC5shNET2jFeWAqEw==", + "version": "0.0.107", + "resolved": "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.107.tgz", + "integrity": "sha512-7z/4YkJu4B8ROxZhbzIx5olbRJqzoDdAoMhSzcJlElsZzv2eTxsvxNkN/QFq0ClbAFNkFf07XVoTrWFHD12QyA==", "dev": true, "requires": { "@types/filesystem": "*", @@ -1932,9 +1943,9 @@ "dev": true }, "@types/node": { - "version": "13.11.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.11.1.tgz", - "integrity": "sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g==" + "version": "13.13.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.5.tgz", + "integrity": "sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g==" }, "@types/normalize-package-data": { "version": "2.4.0", @@ -1959,9 +1970,9 @@ "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==" }, "@types/react": { - "version": "16.9.34", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.34.tgz", - "integrity": "sha512-8AJlYMOfPe1KGLKyHpflCg5z46n0b5DbRfqDksxBLBTUpB75ypDBAO9eCUcjNwE6LCUslwTz00yyG/X9gaVtow==", + "version": "16.9.35", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.35.tgz", + "integrity": "sha512-q0n0SsWcGc8nDqH2GJfWQWUOmZSJhXV64CjVN5SvcNti3TdEaA3AH0D8DwNmMdzjMAC/78tB8nAZIlV8yTz+zQ==", "dev": true, "requires": { "@types/prop-types": "*", @@ -1969,18 +1980,18 @@ } }, "@types/react-dom": { - "version": "16.9.6", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.9.6.tgz", - "integrity": "sha512-S6ihtlPMDotrlCJE9ST1fRmYrQNNwfgL61UB4I1W7M6kPulUKx9fXAleW5zpdIjUQ4fTaaog8uERezjsGUj9HQ==", + "version": "16.9.8", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.9.8.tgz", + "integrity": "sha512-ykkPQ+5nFknnlU6lDd947WbQ6TE3NNzbQAkInC2EKY1qeYdTKp7onFusmYZb+ityzx2YviqT6BXSu+LyWWJwcA==", "dev": true, "requires": { "@types/react": "*" } }, "@types/react-redux": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.7.tgz", - "integrity": "sha512-U+WrzeFfI83+evZE2dkZ/oF/1vjIYgqrb5dGgedkqVV8HEfDFujNgWCwHL89TDuWKb47U0nTBT6PLGq4IIogWg==", + "version": "7.1.8", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.8.tgz", + "integrity": "sha512-kpplH7Wg2SYU00sZVT98WBN0ou6QKrYcShRaW+5Vpe5l7bluKWJbWmAL+ieiso07OQzpcP5i1PeY3690640ZWg==", "dev": true, "requires": { "@types/hoist-non-react-statics": "^3.3.0", @@ -1999,9 +2010,9 @@ } }, "@types/react-router": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.5.tgz", - "integrity": "sha512-RZPdCtZympi6X7EkGyaU7ISiAujDYTWgqMF9owE3P6efITw27IWQykcti0BvA5h4Mu1LLl5rxrpO3r8kHyUZ/Q==", + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.7.tgz", + "integrity": "sha512-2ouP76VQafKjtuc0ShpwUebhHwJo0G6rhahW9Pb8au3tQTjYXd2jta4wv6U2tGLR/I42yuG00+UXjNYY0dTzbg==", "dev": true, "requires": { "@types/history": "*", @@ -2009,9 +2020,9 @@ } }, "@types/react-router-dom": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.1.4.tgz", - "integrity": "sha512-LO0z5qqSfWdYtCNsRm8/OMnnkv52hwADJKrAfpKIyfHclORllcgAMGypEA7ajHm38+jOonKLx8nPygNAAZGxtg==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.1.5.tgz", + "integrity": "sha512-ArBM4B1g3BWLGbaGvwBGO75GNFbLDUthrDojV2vHLih/Tq8M+tgvY1DSwkuNrPSwdp/GUL93WSEpTZs8nVyJLw==", "dev": true, "requires": { "@types/history": "*", @@ -2093,89 +2104,99 @@ "tsutils": "^3.17.1" } }, - "@uifabric/azure-themes": { - "version": "7.0.57", - "resolved": "https://registry.npmjs.org/@uifabric/azure-themes/-/azure-themes-7.0.57.tgz", - "integrity": "sha512-9RGoWb6JmpWcijfIAbNut7R7oWP4Kjn7bG0noWYvDohKbj2mwoo3YRx8eG2fBUuxJliFVil6DI+MGzoNzw/PZQ==", - "requires": { - "@uifabric/merge-styles": "^7.8.11", - "@uifabric/set-version": "^7.0.9", - "office-ui-fabric-react": "^7.105.11", - "tslib": "^1.10.0" - } - }, "@uifabric/foundation": { - "version": "7.5.25", - "resolved": "https://registry.npmjs.org/@uifabric/foundation/-/foundation-7.5.25.tgz", - "integrity": "sha512-5PcqVMjXG1or7GrZHCWQ1SRNcCUV6lPm7OoAi1AKtVrSEi69g56VjJCJ7sqc/Q587ehDN6LqK9RhLc2IhQVO+Q==", - "requires": { - "@uifabric/merge-styles": "^7.8.11", - "@uifabric/set-version": "^7.0.9", - "@uifabric/styling": "^7.11.2", - "@uifabric/utilities": "^7.15.5", + "version": "7.7.12", + "resolved": "https://registry.npmjs.org/@uifabric/foundation/-/foundation-7.7.12.tgz", + "integrity": "sha512-4VFGjLyzgdEFpmbyu3t7xsxyRtFPcrVaHYNetQ0qVLtFyqPm/YqTtThiJ08WOJb8JXJVzW5p8NWof+6AzmbRcw==", + "requires": { + "@uifabric/merge-styles": "^7.12.0", + "@uifabric/set-version": "^7.0.12", + "@uifabric/styling": "^7.12.5", + "@uifabric/utilities": "^7.16.4", "tslib": "^1.10.0" } }, "@uifabric/icons": { - "version": "7.3.24", - "resolved": "https://registry.npmjs.org/@uifabric/icons/-/icons-7.3.24.tgz", - "integrity": "sha512-0CkTEgY8xwvNs+zUQcvWKLnuYxudjJfPI016385bqizE9dkCMyAfXer/7sgyrp6FjxNUrHGyQUKvdVoT3zSNYA==", + "version": "7.3.38", + "resolved": "https://registry.npmjs.org/@uifabric/icons/-/icons-7.3.38.tgz", + "integrity": "sha512-R6QCmX7dyj6cG8yjUkeIJX4IUujUdPXFPXJSbMxQlUQqIu9UxgyAi9+X0AhFgX1Oafrw6U2/UDl9s/Wd6WMBCQ==", "requires": { - "@uifabric/set-version": "^7.0.9", - "@uifabric/styling": "^7.11.2", + "@uifabric/set-version": "^7.0.12", + "@uifabric/styling": "^7.12.5", "tslib": "^1.10.0" } }, "@uifabric/merge-styles": { - "version": "7.8.11", - "resolved": "https://registry.npmjs.org/@uifabric/merge-styles/-/merge-styles-7.8.11.tgz", - "integrity": "sha512-U1gYewj/j6ZGBSXD84Ekp+En4N5hH79TsK9hWJq2wKJKK3h0MKmY50WyFKWIL2/kS+wM7zIR6irK0xY+mfjB2g==", + "version": "7.12.0", + "resolved": "https://registry.npmjs.org/@uifabric/merge-styles/-/merge-styles-7.12.0.tgz", + "integrity": "sha512-MQt2AqJJAn0boaGm9nBk4d7LntOCCiowgF35bK01WLD2fOymDKr7QberkqfzTzajPN/+9d+KQXguEBUUZd0deQ==", "requires": { - "@uifabric/set-version": "^7.0.9", + "@uifabric/set-version": "^7.0.12", "tslib": "^1.10.0" } }, "@uifabric/react-hooks": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@uifabric/react-hooks/-/react-hooks-7.1.2.tgz", - "integrity": "sha512-gFsjCeh+g0rZYSx13WIJcA2HLxNKiY4RQsxLuOq1cMsBgiUGix8ofMPd3S5ys+qfVdl+XwoqlV/25PgvIRrpUA==", + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/@uifabric/react-hooks/-/react-hooks-7.3.3.tgz", + "integrity": "sha512-XhmmrTChLc/iABuw90d74y5WgUes1nkSpIGNwIJbQqNGYVxSydjdNZ4fYez76xfEs6pgl4pHwOsjFvG+5HWrsw==", "requires": { - "@uifabric/set-version": "^7.0.9", - "@uifabric/utilities": "^7.15.5", + "@uifabric/set-version": "^7.0.12", + "@uifabric/utilities": "^7.16.4", "tslib": "^1.10.0" } }, "@uifabric/set-version": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@uifabric/set-version/-/set-version-7.0.9.tgz", - "integrity": "sha512-YJL6WLBlFKDJcLSw1ihqW5PTFi2XMoluEvwGd2qtzp2IVbHvdbk7uIdWuTALo3dFNNqWPN8shSNUdHVATE/1jQ==", + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@uifabric/set-version/-/set-version-7.0.12.tgz", + "integrity": "sha512-XNqfKwNUoHnkW5sj15Zd0cNf5ga9fFjbTUrvc/ix74tkUPc2vrV3qBteW61IaNTNKWOFns5kewvhCK2jU4LnRg==", "requires": { "tslib": "^1.10.0" } }, "@uifabric/styling": { - "version": "7.11.2", - "resolved": "https://registry.npmjs.org/@uifabric/styling/-/styling-7.11.2.tgz", - "integrity": "sha512-0so6oM6d0WOogDiOxT5bbfOrkGEvhrmRukSrgr1mY/3tkQ3gue/XW4yus0fNi7H9R8wZa2rIPQaUcZBW3Hrc0g==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@uifabric/styling/-/styling-7.12.5.tgz", + "integrity": "sha512-oFx7Rjx3+wMJfhSiDJR2yP2/5eirsdZ2EObPdpeod9VrM0BrOjPDEiKgnUnj/5OQFwcc4cyWvBpFGdML+Ix+SQ==", "requires": { "@microsoft/load-themed-styles": "^1.10.26", - "@uifabric/merge-styles": "^7.8.11", - "@uifabric/set-version": "^7.0.9", - "@uifabric/utilities": "^7.15.5", + "@uifabric/merge-styles": "^7.12.0", + "@uifabric/set-version": "^7.0.12", + "@uifabric/utilities": "^7.16.4", + "tslib": "^1.10.0" + } + }, + "@uifabric/theme-samples": { + "version": "7.0.72", + "resolved": "https://registry.npmjs.org/@uifabric/theme-samples/-/theme-samples-7.0.72.tgz", + "integrity": "sha512-qGXm8ZLV6OE8MX77Sh1rxo7XagYW/BnSk5H7YiQL1Z1810uPWam+gQfd3o488NTHnPDJQB5flnSflY36vMObEw==", + "requires": { + "@uifabric/set-version": "^7.0.12", + "@uifabric/variants": "^7.1.62", + "office-ui-fabric-react": "^7.112.0", "tslib": "^1.10.0" } }, "@uifabric/utilities": { - "version": "7.15.6", - "resolved": "https://registry.npmjs.org/@uifabric/utilities/-/utilities-7.15.6.tgz", - "integrity": "sha512-8dLJQ+KeKMC9/Dm1atxIDAfBbBSO11q5VlTUgACGzCM1js3bt50aJWh2MsfjAhYauXS9fJJu1ngRdNEdlRRvcQ==", + "version": "7.16.4", + "resolved": "https://registry.npmjs.org/@uifabric/utilities/-/utilities-7.16.4.tgz", + "integrity": "sha512-XTbnhvCbE5vd9lLqZyEfSZN/DyGxPHy8MrdCB0cHd/YNeuJiECw3WH/MfggCvLmkaCU/g0eQ3bkVSAoYQm5yIw==", "requires": { - "@uifabric/merge-styles": "^7.8.11", - "@uifabric/set-version": "^7.0.9", + "@uifabric/merge-styles": "^7.12.0", + "@uifabric/set-version": "^7.0.12", "prop-types": "^15.7.2", "tslib": "^1.10.0" } }, + "@uifabric/variants": { + "version": "7.1.62", + "resolved": "https://registry.npmjs.org/@uifabric/variants/-/variants-7.1.62.tgz", + "integrity": "sha512-bhJo8xe2EnNcJhT+jVSKpc74V3rfWGIeKZhs7bBMaBF+4v0pMXC2fx8aM25RtZQ3n7HXDRVtjGZB9IOpmGR0zA==", + "requires": { + "@uifabric/set-version": "^7.0.12", + "office-ui-fabric-react": "^7.112.0", + "tslib": "^1.10.0" + } + }, "@webassemblyjs/ast": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", @@ -2430,9 +2451,9 @@ }, "dependencies": { "@types/node": { - "version": "8.10.59", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.59.tgz", - "integrity": "sha512-8RkBivJrDCyPpBXhVZcjh7cQxVBSmRk9QM7hOketZzp6Tg79c0N8kkpAIito9bnJ3HCVCHVYz+KHTEbfQNfeVQ==", + "version": "8.10.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.60.tgz", + "integrity": "sha512-YjPbypHFuiOV0bTgeF07HpEEqhmHaZqYNSdCKeBJa+yFoQ/7BC+FpJcwmi34xUIIRVFktnUyP1dPU8U0612GOg==", "dev": true } } @@ -7805,11 +7826,6 @@ "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.2.6.tgz", "integrity": "sha512-QX7WQWZUAooS9tOCYg4kKLcnjBreA4Xyu11EVx6zp4BbKijnMK+NtzkB47las/E0luFE84hGscOZm5vd13KzZA==" }, - "gud": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", - "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==" - }, "gulp": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", @@ -11164,13 +11180,12 @@ "dev": true }, "mini-create-react-context": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.3.2.tgz", - "integrity": "sha512-2v+OeetEyliMt5VHMXsBhABoJ0/M4RCe7fatd/fBy6SMiKazUSEt3gxxypfnk2SHMkdBYvorHRoQxuGoiwbzAw==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.0.tgz", + "integrity": "sha512-b0TytUgFSbgFJGzJqXPKCFCBWigAjpjo+Fl7Vf7ZbKRDptszpppKxXH6DRXEABZ/gcEQczeb0iZ7JvL8e8jjCA==", "requires": { - "@babel/runtime": "^7.4.0", - "gud": "^1.0.0", - "tiny-warning": "^1.0.2" + "@babel/runtime": "^7.5.5", + "tiny-warning": "^1.0.3" } }, "mini-css-extract-plugin": { @@ -11215,9 +11230,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "minimist-options": { "version": "4.0.2", @@ -11314,18 +11329,11 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } + "minimist": "^1.2.5" } }, "monaco-editor": { @@ -11847,19 +11855,20 @@ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" }, "office-ui-fabric-react": { - "version": "7.106.0", - "resolved": "https://registry.npmjs.org/office-ui-fabric-react/-/office-ui-fabric-react-7.106.0.tgz", - "integrity": "sha512-tTzcyu67Fcy9g3loHk+PbS5CAY/f+M2TVhNpRoB5QnyU/OOzFqaefUwWRI02xHVIAtXoscDtQzEG/FYyn0V+MA==", + "version": "7.112.0", + "resolved": "https://registry.npmjs.org/office-ui-fabric-react/-/office-ui-fabric-react-7.112.0.tgz", + "integrity": "sha512-PXl3otHvPZt+gqEPu1gz5tEOfGsQcZt0r4u4kbQmYsNAB4kKwvMnLytKUayDToTog/6B2DpzWhkkUSEYDxCcOA==", "requires": { - "@fluentui/react-focus": "^7.1.13", + "@fluentui/react-focus": "^7.11.1", + "@fluentui/react-icons": "^0.1.14", "@microsoft/load-themed-styles": "^1.10.26", - "@uifabric/foundation": "^7.5.25", - "@uifabric/icons": "^7.3.24", - "@uifabric/merge-styles": "^7.8.11", - "@uifabric/react-hooks": "^7.1.2", - "@uifabric/set-version": "^7.0.9", - "@uifabric/styling": "^7.11.2", - "@uifabric/utilities": "^7.15.6", + "@uifabric/foundation": "^7.7.12", + "@uifabric/icons": "^7.3.38", + "@uifabric/merge-styles": "^7.12.0", + "@uifabric/react-hooks": "^7.3.3", + "@uifabric/set-version": "^7.0.12", + "@uifabric/styling": "^7.12.5", + "@uifabric/utilities": "^7.16.4", "prop-types": "^15.7.2", "tslib": "^1.10.0" } @@ -12450,9 +12459,9 @@ } }, "portfinder": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz", - "integrity": "sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==", + "version": "1.0.26", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.26.tgz", + "integrity": "sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ==", "requires": { "async": "^2.6.2", "debug": "^3.1.1", @@ -13865,15 +13874,15 @@ } }, "react-router": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.1.2.tgz", - "integrity": "sha512-yjEuMFy1ONK246B+rsa0cUam5OeAQ8pyclRDgpxuSCrAlJ1qN9uZ5IgyKC7gQg0w8OM50NXHEegPh/ks9YuR2A==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz", + "integrity": "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==", "requires": { "@babel/runtime": "^7.1.2", "history": "^4.9.0", "hoist-non-react-statics": "^3.1.0", "loose-envify": "^1.3.1", - "mini-create-react-context": "^0.3.0", + "mini-create-react-context": "^0.4.0", "path-to-regexp": "^1.7.0", "prop-types": "^15.6.2", "react-is": "^16.6.0", @@ -13882,15 +13891,15 @@ } }, "react-router-dom": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.1.2.tgz", - "integrity": "sha512-7BPHAaIwWpZS074UKaw1FjVdZBSVWEk8IuDXdB+OkLb8vd/WRQIpA4ag9WQk61aEfQs47wHyjWUoUGGZxpQXew==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.0.tgz", + "integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==", "requires": { "@babel/runtime": "^7.1.2", "history": "^4.9.0", "loose-envify": "^1.3.1", "prop-types": "^15.6.2", - "react-router": "5.1.2", + "react-router": "5.2.0", "tiny-invariant": "^1.0.2", "tiny-warning": "^1.0.0" } @@ -16319,9 +16328,9 @@ "dev": true }, "ts-loader": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-7.0.0.tgz", - "integrity": "sha512-qq9iPK235Xf/uPS1I72CIwB8qpbW0rys3entnXO+rIo2km50lMmeHKCNn1m047W6Sk4kceF6n5NWEnq/V8xdYQ==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-7.0.4.tgz", + "integrity": "sha512-5du6OQHl+4ZjO4crEyoYUyWSrmmo7bAO+inkaILZ68mvahqrfoa4nn0DRmpQ4ruT4l+cuJCgF0xD7SBIyLeeow==", "dev": true, "requires": { "chalk": "^2.3.0", @@ -16387,9 +16396,9 @@ "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" }, "tslint": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.1.tgz", - "integrity": "sha512-kd6AQ/IgPRpLn6g5TozqzPdGNZ0q0jtXW4//hRcj10qLYBaa3mTUU2y2MCG+RXZm8Zx+KZi0eA+YCrMyNlF4UA==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.2.tgz", + "integrity": "sha512-UyNrLdK3E0fQG/xWNqAFAC5ugtFyPO4JJR1KyyfQAyzR8W0fTRrC91A8Wej4BntFzcvETdCSDa/4PnNYJQLYiA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -16475,12 +16484,12 @@ } }, "tslint-react": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/tslint-react/-/tslint-react-4.2.0.tgz", - "integrity": "sha512-lO22+FKr9ZZGueGiuALzvZE/8ANoDoCHGCknX1Ge3ALrfcLQHQ1VGdyb1scZXQFdEQEfwBTIU40r5BUlJpn0JA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tslint-react/-/tslint-react-5.0.0.tgz", + "integrity": "sha512-/IbcSmoBPlFic8kQaRfQ4knTY4mivwo5LVzvozvX6Dyu2ynEnrh1dIcR2ujjyp/IodXqY/H5GbxFxSMo/Kf2Hg==", "dev": true, "requires": { - "tsutils": "^3.9.1" + "tsutils": "^3.17.1" } }, "tslint-react-recommended": { @@ -17644,16 +17653,16 @@ "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==" }, "webpack": { - "version": "4.42.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.42.1.tgz", - "integrity": "sha512-SGfYMigqEfdGchGhFFJ9KyRpQKnipvEvjc1TwrXEPCM6H5Wywu10ka8o3KGrMzSMxMQKt8aCHUFh5DaQ9UmyRg==", + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.43.0.tgz", + "integrity": "sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g==", "dev": true, "requires": { "@webassemblyjs/ast": "1.9.0", "@webassemblyjs/helper-module-context": "1.9.0", "@webassemblyjs/wasm-edit": "1.9.0", "@webassemblyjs/wasm-parser": "1.9.0", - "acorn": "^6.2.1", + "acorn": "^6.4.1", "ajv": "^6.10.2", "ajv-keywords": "^3.4.1", "chrome-trace-event": "^1.0.2", @@ -17670,7 +17679,7 @@ "schema-utils": "^1.0.0", "tapable": "^1.1.3", "terser-webpack-plugin": "^1.4.3", - "watchpack": "^1.6.0", + "watchpack": "^1.6.1", "webpack-sources": "^1.4.1" }, "dependencies": { @@ -17680,6 +17689,12 @@ "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", "dev": true }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, "cacache": { "version": "12.0.4", "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", @@ -17703,6 +17718,26 @@ "y18n": "^4.0.0" } }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, "eslint-scope": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", @@ -17713,62 +17748,701 @@ "estraverse": "^4.1.1" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "mkdirp": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", - "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "terser-webpack-plugin": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", - "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", + "fsevents": { + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.12.tgz", + "integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==", "dev": true, + "optional": true, "requires": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^2.1.2", - "source-map": "^0.6.1", - "terser": "^4.1.2", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" + "bindings": "^1.5.0", + "nan": "^2.12.1", + "node-pre-gyp": "*" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "3.2.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.9.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "0.5.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.3.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.14.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4.4.2" + } + }, + "nopt": { + "version": "4.0.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "readable-stream": { + "version": "2.3.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.7.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.1", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.13", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.1.1", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "ssri": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "terser-webpack-plugin": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", + "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", + "dev": true, + "requires": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^2.1.2", + "source-map": "^0.6.1", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + } + }, + "watchpack": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.1.tgz", + "integrity": "sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA==", + "dev": true, + "requires": { + "chokidar": "^2.1.8", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" } } } diff --git a/package.json b/package.json index ac37db60..75e4f733 100644 --- a/package.json +++ b/package.json @@ -3,17 +3,17 @@ "version": "6.0.4", "private": true, "dependencies": { - "@ionic/react": "^5.0.7", - "@ionic/react-router": "^5.0.7", - "@uifabric/azure-themes": "^7.0.57", + "@ionic/react": "^5.1.0", + "@ionic/react-router": "^5.1.0", + "@uifabric/theme-samples": "^7.0.72", "gsap": "^3.2.6", "ionicons": "^5.0.1", "monaco-editor": "^0.20.0", - "office-ui-fabric-react": "^7.106.0", + "office-ui-fabric-react": "^7.112.0", "react": "^16.13.1", "react-dom": "^16.13.1", "react-redux": "^7.2.0", - "react-router-dom": "^5.1.2", + "react-router-dom": "^5.2.0", "react-scripts": "^3.4.1", "redux": "^4.0.5", "redux-thunk": "^2.3.0", @@ -41,37 +41,37 @@ ] }, "devDependencies": { - "@pnp/common": "^2.0.4", - "@pnp/config-store": "^2.0.4", - "@pnp/graph": "^2.0.4", - "@pnp/logging": "^2.0.4", - "@pnp/nodejs": "^2.0.4", - "@pnp/odata": "^2.0.4", - "@pnp/pnpjs": "^2.0.4", - "@pnp/sp": "^2.0.4", - "@pnp/sp-addinhelpers": "^2.0.4", + "@pnp/common": "^2.0.5", + "@pnp/config-store": "^2.0.5", + "@pnp/graph": "^2.0.5", + "@pnp/logging": "^2.0.5", + "@pnp/nodejs": "^2.0.5", + "@pnp/odata": "^2.0.5", + "@pnp/pnpjs": "^2.0.5", + "@pnp/sp": "^2.0.5", + "@pnp/sp-addinhelpers": "^2.0.5", "@pnp/sp-clientsvc": "^1.3.11", "@pnp/sp-taxonomy": "^1.3.11", - "@types/chrome": "0.0.104", + "@types/chrome": "0.0.107", "@types/jest": "25.2.1", - "@types/node": "13.11.1", - "@types/react": "^16.9.34", - "@types/react-dom": "16.9.6", - "@types/react-redux": "^7.1.7", + "@types/node": "13.13.5", + "@types/react": "^16.9.35", + "@types/react-dom": "16.9.8", + "@types/react-redux": "^7.1.8", "@types/react-resize-detector": "^4.2.0", - "@types/react-router-dom": "^5.1.4", + "@types/react-router-dom": "^5.1.5", "cra-build-watch": "^3.2.0", "del": "^5.1.0", "gulp": "^4.0.2", "gulp-rename": "^2.0.0", "gulp-replace": "^1.0.0", "redux-devtools-extension": "^2.13.8", - "ts-loader": "^7.0.0", - "tslint": "^6.1.1", + "ts-loader": "^7.0.4", + "tslint": "^6.1.2", "tslint-eslint-rules": "^5.4.0", - "tslint-react": "^4.2.0", + "tslint-react": "^5.0.0", "tslint-react-recommended": "^1.0.15", - "webpack": "^4.42.1", + "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } } diff --git a/public/@pnp/graph/directory-objects/types.d.ts b/public/@pnp/graph/directory-objects/types.d.ts index d506076b..f24afed6 100644 --- a/public/@pnp/graph/directory-objects/types.d.ts +++ b/public/@pnp/graph/directory-objects/types.d.ts @@ -10,25 +10,19 @@ export declare class _DirectoryObject extends _G * * @param securityEnabledOnly */ - getMemberObjects(securityEnabledOnly?: boolean): Promise<{ - value: string[]; - }>; + getMemberObjects(securityEnabledOnly?: boolean): Promise; /** * Returns all the groups that the specified Directory Object is a member of. The check is transitive * * @param securityEnabledOnly */ - getMemberGroups(securityEnabledOnly?: boolean): Promise<{ - value: string[]; - }>; + getMemberGroups(securityEnabledOnly?: boolean): Promise; /** * Check for membership in a specified list of groups, and returns from that list those groups of which the specified user, group, or directory object is a member. * This function is transitive. * @param groupIds A collection that contains the object IDs of the groups in which to check membership. Up to 20 groups may be specified. */ - checkMemberGroups(groupIds: String[]): Promise<{ - value: string[]; - }>; + checkMemberGroups(groupIds: String[]): Promise; } export interface IDirectoryObject extends _DirectoryObject, IDeleteable { } diff --git a/public/@pnp/odata/queryable.d.ts b/public/@pnp/odata/queryable.d.ts index d2dbf6f2..e84dc43f 100644 --- a/public/@pnp/odata/queryable.d.ts +++ b/public/@pnp/odata/queryable.d.ts @@ -57,9 +57,9 @@ export declare abstract class Queryable implements IQue */ toUrl(): string; /** - * Directly concatonates the supplied string to the current url, not normalizing "/" chars + * Directly concatenates the supplied string to the current url, not normalizing "/" chars * - * @param pathPart The string to concatonate to the url + * @param pathPart The string to concatenate to the url */ concat(pathPart: string): this; /** diff --git a/public/@pnp/sp/fields/types.d.ts b/public/@pnp/sp/fields/types.d.ts index 84fc026f..13590d44 100644 --- a/public/@pnp/sp/fields/types.d.ts +++ b/public/@pnp/sp/fields/types.d.ts @@ -1,4 +1,4 @@ -import { _SharePointQueryableInstance, _SharePointQueryableCollection } from "../sharepointqueryable"; +import { _SharePointQueryableInstance, _SharePointQueryableCollection, IDeleteable } from "../sharepointqueryable"; import { ITypedHash } from "@pnp/common"; export declare class _Fields extends _SharePointQueryableCollection { /** @@ -164,11 +164,12 @@ export interface IFields extends _Fields { } export declare const Fields: import("../sharepointqueryable").ISPInvokableFactory; export declare class _Field extends _SharePointQueryableInstance { + delete: (this: import("../sharepointqueryable").ISharePointQueryable) => Promise; /** * Updates this field instance with the supplied properties * * @param properties A plain object hash of values to update for the list - * @param fieldType The type value, required to update child field type properties + * @param fieldType The type value such as SP.FieldLookup. Optional, looked up from the field if not provided */ update(properties: Partial, fieldType?: string): Promise; /** @@ -184,7 +185,7 @@ export declare class _Field extends _SharePointQueryableInstance { */ setShowInNewForm(show: boolean): Promise; } -export interface IField extends _Field { +export interface IField extends _Field, IDeleteable { } export declare const Field: import("../sharepointqueryable").ISPInvokableFactory; /** diff --git a/public/@pnp/sp/sites/types.d.ts b/public/@pnp/sp/sites/types.d.ts index 14894c73..133aa3af 100644 --- a/public/@pnp/sp/sites/types.d.ts +++ b/public/@pnp/sp/sites/types.d.ts @@ -66,6 +66,11 @@ export declare class _Site extends _SharePointQueryableInstance { */ createCommunicationSite(title: string, lcid: number, shareByEmailEnabled: boolean, url: string, description?: string, classification?: string, siteDesignId?: string, hubSiteId?: string, owner?: string): Promise; createCommunicationSiteFromProps(props: ICreateCommSiteProps): Promise; + /** + * + * @param url Site Url that you want to check if exists + */ + exists(url: string): Promise; /** * Creates a Modern team site backed by Office 365 group. For use in SP Online only. This will not work with App-only tokens * diff --git a/public/bundles/adaljsclient.es5.umd.bundle.js b/public/bundles/adaljsclient.es5.umd.bundle.js index eb121b7a..29061165 100644 --- a/public/bundles/adaljsclient.es5.umd.bundle.js +++ b/public/bundles/adaljsclient.es5.umd.bundle.js @@ -1054,7 +1054,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._local === null) { - this._local = storage_PnPClientStorageWrapper.bind(localStorage); + this._local = new storage_PnPClientStorageWrapper(typeof (localStorage) === "undefined" ? new MemoryStorage() : localStorage); } return this._local; }, @@ -1067,7 +1067,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._session === null) { - this._session = storage_PnPClientStorageWrapper.bind(sessionStorage); + this._session = new storage_PnPClientStorageWrapper(typeof (sessionStorage) === "undefined" ? new MemoryStorage() : sessionStorage); } return this._session; }, diff --git a/public/bundles/common.es5.umd.bundle.js b/public/bundles/common.es5.umd.bundle.js index ea360c85..a33e88d5 100644 --- a/public/bundles/common.es5.umd.bundle.js +++ b/public/bundles/common.es5.umd.bundle.js @@ -1074,7 +1074,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._local === null) { - this._local = storage_PnPClientStorageWrapper.bind(localStorage); + this._local = new storage_PnPClientStorageWrapper(typeof (localStorage) === "undefined" ? new MemoryStorage() : localStorage); } return this._local; }, @@ -1087,7 +1087,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._session === null) { - this._session = storage_PnPClientStorageWrapper.bind(sessionStorage); + this._session = new storage_PnPClientStorageWrapper(typeof (sessionStorage) === "undefined" ? new MemoryStorage() : sessionStorage); } return this._session; }, diff --git a/public/bundles/config-store.es5.umd.bundle.js b/public/bundles/config-store.es5.umd.bundle.js index 7737434a..1003bec1 100644 --- a/public/bundles/config-store.es5.umd.bundle.js +++ b/public/bundles/config-store.es5.umd.bundle.js @@ -1048,7 +1048,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._local === null) { - this._local = storage_PnPClientStorageWrapper.bind(localStorage); + this._local = new storage_PnPClientStorageWrapper(typeof (localStorage) === "undefined" ? new MemoryStorage() : localStorage); } return this._local; }, @@ -1061,7 +1061,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._session === null) { - this._session = storage_PnPClientStorageWrapper.bind(sessionStorage); + this._session = new storage_PnPClientStorageWrapper(typeof (sessionStorage) === "undefined" ? new MemoryStorage() : sessionStorage); } return this._session; }, @@ -1823,9 +1823,9 @@ var queryable_Queryable = /** @class */ (function () { return this.data.url; }; /** - * Directly concatonates the supplied string to the current url, not normalizing "/" chars + * Directly concatenates the supplied string to the current url, not normalizing "/" chars * - * @param pathPart The string to concatonate to the url + * @param pathPart The string to concatenate to the url */ Queryable.prototype.concat = function (pathPart) { this.data.url += pathPart; @@ -2643,7 +2643,7 @@ var sphttpclient_SPHttpClient = /** @class */ (function () { } if (!headers.has("X-ClientService-ClientTag")) { methodName = tag.getClientTag(headers); - clientTag = "PnPCoreJS:2.0.4:" + methodName; + clientTag = "PnPCoreJS:2.0.5:" + methodName; if (clientTag.length > 32) { clientTag = clientTag.substr(0, 32); } @@ -3417,7 +3417,7 @@ var batch_SPBatch = /** @class */ (function (_super) { headers.append("Content-Type", "application/json;odata=verbose;charset=utf-8"); } if (!headers.has("X-ClientService-ClientTag")) { - headers.append("X-ClientService-ClientTag", "PnPCoreJS:@pnp-2.0.4:batch"); + headers.append("X-ClientService-ClientTag", "PnPCoreJS:@pnp-2.0.5:batch"); } // write headers into batch body headers.forEach(function (value, name) { @@ -3783,6 +3783,25 @@ var types_Site = /** @class */ (function (_super) { }); }); }; + /** + * + * @param url Site Url that you want to check if exists + */ + _Site.prototype.exists = function (url) { + return __awaiter(this, void 0, void 0, function () { + var postBody, value; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + postBody = body({ url: url }); + return [4 /*yield*/, spPost(Site(extractWebUrl(this.toUrl()), "/_api/SP.Site.Exists"), postBody)]; + case 1: + value = _a.sent(); + return [2 /*return*/, value]; + } + }); + }); + }; /** * Creates a Modern team site backed by Office 365 group. For use in SP Online only. This will not work with App-only tokens * diff --git a/public/bundles/graph.es5.umd.bundle.js b/public/bundles/graph.es5.umd.bundle.js index 95942bb9..2be53f84 100644 --- a/public/bundles/graph.es5.umd.bundle.js +++ b/public/bundles/graph.es5.umd.bundle.js @@ -1123,7 +1123,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._local === null) { - this._local = storage_PnPClientStorageWrapper.bind(localStorage); + this._local = new storage_PnPClientStorageWrapper(typeof (localStorage) === "undefined" ? new MemoryStorage() : localStorage); } return this._local; }, @@ -1136,7 +1136,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._session === null) { - this._session = storage_PnPClientStorageWrapper.bind(sessionStorage); + this._session = new storage_PnPClientStorageWrapper(typeof (sessionStorage) === "undefined" ? new MemoryStorage() : sessionStorage); } return this._session; }, @@ -1747,9 +1747,9 @@ var queryable_Queryable = /** @class */ (function () { return this.data.url; }; /** - * Directly concatonates the supplied string to the current url, not normalizing "/" chars + * Directly concatenates the supplied string to the current url, not normalizing "/" chars * - * @param pathPart The string to concatonate to the url + * @param pathPart The string to concatenate to the url */ Queryable.prototype.concat = function (pathPart) { this.data.url += pathPart; @@ -2656,7 +2656,7 @@ var graphhttpclient_GraphHttpClient = /** @class */ (function () { } if (!headers.has("SdkVersion")) { // this marks the requests for understanding by the service - headers.append("SdkVersion", "PnPCoreJS/2.0.4"); + headers.append("SdkVersion", "PnPCoreJS/2.0.5"); } var opts = util_assign(options, { headers: headers }); return this.fetchRaw(url, opts); diff --git a/public/bundles/odata.es5.umd.bundle.js b/public/bundles/odata.es5.umd.bundle.js index 7d91109f..651f510f 100644 --- a/public/bundles/odata.es5.umd.bundle.js +++ b/public/bundles/odata.es5.umd.bundle.js @@ -1074,7 +1074,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._local === null) { - this._local = storage_PnPClientStorageWrapper.bind(localStorage); + this._local = new storage_PnPClientStorageWrapper(typeof (localStorage) === "undefined" ? new MemoryStorage() : localStorage); } return this._local; }, @@ -1087,7 +1087,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._session === null) { - this._session = storage_PnPClientStorageWrapper.bind(sessionStorage); + this._session = new storage_PnPClientStorageWrapper(typeof (sessionStorage) === "undefined" ? new MemoryStorage() : sessionStorage); } return this._session; }, @@ -1698,9 +1698,9 @@ var queryable_Queryable = /** @class */ (function () { return this.data.url; }; /** - * Directly concatonates the supplied string to the current url, not normalizing "/" chars + * Directly concatenates the supplied string to the current url, not normalizing "/" chars * - * @param pathPart The string to concatonate to the url + * @param pathPart The string to concatenate to the url */ Queryable.prototype.concat = function (pathPart) { this.data.url += pathPart; diff --git a/public/bundles/pnpjs.es5.umd.bundle.js b/public/bundles/pnpjs.es5.umd.bundle.js index bfe602f5..44ee62b3 100644 --- a/public/bundles/pnpjs.es5.umd.bundle.js +++ b/public/bundles/pnpjs.es5.umd.bundle.js @@ -1,6 +1,6 @@ /** * @license - * v2.0.4 + * v2.0.5 * MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE) * Copyright (c) 2020 Microsoft * docs: https://pnp.github.io/pnpjs/ @@ -9,4 +9,4 @@ */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.pnp=t():e.pnp=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));var r=void 0===e?window:e}).call(this,n(2))},function(e,t,n){ /*! adal-angular v1.0.17 2018-02-27 */ -var r=function(){"use strict";return r=function(e){if(this.REQUEST_TYPE={LOGIN:"LOGIN",RENEW_TOKEN:"RENEW_TOKEN",UNKNOWN:"UNKNOWN"},this.RESPONSE_TYPE={ID_TOKEN_TOKEN:"id_token token",TOKEN:"token"},this.CONSTANTS={ACCESS_TOKEN:"access_token",EXPIRES_IN:"expires_in",ID_TOKEN:"id_token",ERROR_DESCRIPTION:"error_description",SESSION_STATE:"session_state",ERROR:"error",STORAGE:{TOKEN_KEYS:"adal.token.keys",ACCESS_TOKEN_KEY:"adal.access.token.key",EXPIRATION_KEY:"adal.expiration.key",STATE_LOGIN:"adal.state.login",STATE_RENEW:"adal.state.renew",NONCE_IDTOKEN:"adal.nonce.idtoken",SESSION_STATE:"adal.session.state",USERNAME:"adal.username",IDTOKEN:"adal.idtoken",ERROR:"adal.error",ERROR_DESCRIPTION:"adal.error.description",LOGIN_REQUEST:"adal.login.request",LOGIN_ERROR:"adal.login.error",RENEW_STATUS:"adal.token.renew.status",ANGULAR_LOGIN_REQUEST:"adal.angular.login.request"},RESOURCE_DELIMETER:"|",CACHE_DELIMETER:"||",LOADFRAME_TIMEOUT:6e3,TOKEN_RENEW_STATUS_CANCELED:"Canceled",TOKEN_RENEW_STATUS_COMPLETED:"Completed",TOKEN_RENEW_STATUS_IN_PROGRESS:"In Progress",LOGGING_LEVEL:{ERROR:0,WARN:1,INFO:2,VERBOSE:3},LEVEL_STRING_MAP:{0:"ERROR:",1:"WARNING:",2:"INFO:",3:"VERBOSE:"},POPUP_WIDTH:483,POPUP_HEIGHT:600},r.prototype._singletonInstance)return r.prototype._singletonInstance;if(r.prototype._singletonInstance=this,this.instance="https://login.microsoftonline.com/",this.config={},this.callback=null,this.popUp=!1,this.isAngular=!1,this._user=null,this._activeRenewals={},this._loginInProgress=!1,this._acquireTokenInProgress=!1,this._renewStates=[],this._callBackMappedToRenewStates={},this._callBacksMappedToRenewStates={},this._openedWindows=[],this._requestType=this.REQUEST_TYPE.LOGIN,window._adalInstance=this,e.displayCall&&"function"!=typeof e.displayCall)throw new Error("displayCall is not a function");if(!e.clientId)throw new Error("clientId is required");this.config=this._cloneConfig(e),void 0===this.config.navigateToLoginRequestUrl&&(this.config.navigateToLoginRequestUrl=!0),this.config.popUp&&(this.popUp=!0),this.config.callback&&"function"==typeof this.config.callback&&(this.callback=this.config.callback),this.config.instance&&(this.instance=this.config.instance),this.config.loginResource||(this.config.loginResource=this.config.clientId),this.config.redirectUri||(this.config.redirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.postLogoutRedirectUri||(this.config.postLogoutRedirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.anonymousEndpoints||(this.config.anonymousEndpoints=[]),this.config.isAngular&&(this.isAngular=this.config.isAngular),this.config.loadFrameTimeout&&(this.CONSTANTS.LOADFRAME_TIMEOUT=this.config.loadFrameTimeout)},"undefined"!=typeof window&&(window.Logging={piiLoggingEnabled:!1,level:0,log:function(e){}}),r.prototype.login=function(){if(this._loginInProgress)this.info("Login in progress");else{this._loginInProgress=!0;var e=this._guid();this.config.state=e,this._idTokenNonce=this._guid();var t=this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST);t&&""!==t?this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""):t=window.location.href,this.verbose("Expected state: "+e+" startPage:"+t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,e,!0),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var n=this._getNavigateUrl("id_token",null)+"&nonce="+encodeURIComponent(this._idTokenNonce);this.config.displayCall?this.config.displayCall(n):this.popUp?(this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._renewStates.push(e),this.registerCallback(e,this.config.clientId,this.callback),this._loginPopup(n)):this.promptUser(n)}},r.prototype._openPopup=function(e,t,n,r){try{var i=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,s=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,u=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a=s/2-n/2+i,c=u/2-r/2+o,l=window.open(e,t,"width="+n+", height="+r+", top="+c+", left="+a);return l.focus&&l.focus(),l}catch(e){return this.warn("Error opening popup, "+e.message),this._loginInProgress=!1,this._acquireTokenInProgress=!1,null}},r.prototype._handlePopupError=function(e,t,n,r,i){this.warn(r),this._saveItem(this.CONSTANTS.STORAGE.ERROR,n),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,r),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,i),t&&this._activeRenewals[t]&&(this._activeRenewals[t]=null),this._loginInProgress=!1,this._acquireTokenInProgress=!1,e&&e(r,null,n)},r.prototype._loginPopup=function(e,t,n){var r=this._openPopup(e,"login",this.CONSTANTS.POPUP_WIDTH,this.CONSTANTS.POPUP_HEIGHT),i=n||this.callback;if(null!=r){if(this._openedWindows.push(r),-1!=this.config.redirectUri.indexOf("#"))var o=this.config.redirectUri.split("#")[0];else o=this.config.redirectUri;var s=this,u=window.setInterval((function(){if(!r||r.closed||void 0===r.closed){var e="Popup Window closed",n="Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge";return s.isAngular&&s._broadcast("adal:popUpClosed",n+s.CONSTANTS.RESOURCE_DELIMETER+e),s._handlePopupError(i,t,e,n,n),void window.clearInterval(u)}try{var a=r.location;if(-1!=encodeURI(a.href).indexOf(encodeURI(o)))return s.isAngular?s._broadcast("adal:popUpHashChanged",a.hash):s.handleWindowCallback(a.hash),window.clearInterval(u),s._loginInProgress=!1,s._acquireTokenInProgress=!1,s.info("Closing popup window"),s._openedWindows=[],void r.close()}catch(e){}}),1)}else{var a="Popup Window is null. This can happen if you are using IE";this._handlePopupError(i,t,"Error opening popup",a,a)}},r.prototype._broadcast=function(e,t){!function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}if("function"==typeof window.CustomEvent)return!1;e.prototype=window.Event.prototype,window.CustomEvent=e}();var n=new CustomEvent(e,{detail:t});window.dispatchEvent(n)},r.prototype.loginInProgress=function(){return this._loginInProgress},r.prototype._hasResource=function(e){var t=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);return t&&!this._isEmpty(t)&&t.indexOf(e+this.CONSTANTS.RESOURCE_DELIMETER)>-1},r.prototype.getCachedToken=function(e){if(!this._hasResource(e))return null;var t=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e),n=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e),r=this.config.expireOffsetSeconds||300;return n&&n>this._now()+r?t:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e,0),null)},r.prototype.getCachedUser=function(){if(this._user)return this._user;var e=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(e),this._user},r.prototype.registerCallback=function(e,t,n){this._activeRenewals[t]=e,this._callBacksMappedToRenewStates[e]||(this._callBacksMappedToRenewStates[e]=[]);var r=this;this._callBacksMappedToRenewStates[e].push(n),this._callBackMappedToRenewStates[e]||(this._callBackMappedToRenewStates[e]=function(n,i,o,s){r._activeRenewals[t]=null;for(var u=0;u-1)){var t=this._user.profile.upn.split("@");e+="&domain_hint="+encodeURIComponent(t[t.length-1])}return e},r.prototype._createUser=function(e){var t=null,n=this._extractIdToken(e);return n&&n.hasOwnProperty("aud")&&(n.aud.toLowerCase()===this.config.clientId.toLowerCase()?(t={userName:"",profile:n},n.hasOwnProperty("upn")?t.userName=n.upn:n.hasOwnProperty("email")&&(t.userName=n.email)):this.warn("IdToken has invalid aud field")),t},r.prototype._getHash=function(e){return e.indexOf("#/")>-1?e=e.substring(e.indexOf("#/")+2):e.indexOf("#")>-1&&(e=e.substring(1)),e},r.prototype.isCallback=function(e){e=this._getHash(e);var t=this._deserialize(e);return t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},r.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},r.prototype.getRequestInfo=function(e){e=this._getHash(e);var t=this._deserialize(e),n={valid:!1,parameters:{},stateMatch:!1,stateResponse:"",requestType:this.REQUEST_TYPE.UNKNOWN};if(t&&(n.parameters=t,t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){n.valid=!0;var r;if(!t.hasOwnProperty("state"))return this.warn("No state returned"),n;if(this.verbose("State: "+t.state),r=t.state,n.stateResponse=r,this._matchState(n))return n;if(!n.stateMatch&&window.parent){n.requestType=this._requestType;for(var i=this._renewStates,o=0;o-1&&t+1-1)return null;if(this.config&&this.config.endpoints)for(var n in this.config.endpoints)if(e.indexOf(n)>-1)return this.config.endpoints[n];return e.indexOf("http://")>-1||e.indexOf("https://")>-1?this._getHostFromUri(e)===this._getHostFromUri(this.config.redirectUri)?this.config.loginResource:null:this.config.loginResource},r.prototype._getHostFromUri=function(e){var t=String(e).replace(/^(https?:)\/\//,"");return t.split("/")[0]},r.prototype.handleWindowCallback=function(e){if(null==e&&(e=window.location.hash),this.isCallback(e)){var t=null,n=!1;this._openedWindows.length>0&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(t=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,n=!0):window.parent&&window.parent._adalInstance&&(t=window.parent._adalInstance);var r,i,o=t.getRequestInfo(e),s=null;i=n||window.parent!==window?t._callBackMappedToRenewStates[o.stateResponse]:t.callback,t.info("Returned from redirect url"),t.saveTokenFromHash(o),o.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?t.verbose("Window is in iframe, acquiring token silently"):t.verbose("acquiring token interactive in progress"),r=o.parameters[t.CONSTANTS.ACCESS_TOKEN]||o.parameters[t.CONSTANTS.ID_TOKEN],s=t.CONSTANTS.ACCESS_TOKEN):o.requestType===this.REQUEST_TYPE.LOGIN&&(r=o.parameters[t.CONSTANTS.ID_TOKEN],s=t.CONSTANTS.ID_TOKEN);var u=o.parameters[t.CONSTANTS.ERROR_DESCRIPTION],a=o.parameters[t.CONSTANTS.ERROR];try{i&&i(u,r,a,s)}catch(e){t.error("Error occurred in user defined callback function: "+e)}window.parent!==window||n||(t.config.navigateToLoginRequestUrl?window.location.href=t._getItem(t.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash="")}},r.prototype._getNavigateUrl=function(e,t){var n="common";this.config.tenant&&(n=this.config.tenant);var r=this.instance+n+"/oauth2/authorize"+this._serialize(e,this.config,t)+this._addLibMetadata();return this.info("Navigate url:"+r),r},r.prototype._extractIdToken=function(e){var t=this._decodeJwt(e);if(!t)return null;try{var n=t.JWSPayload,r=this._base64DecodeStringUrlSafe(n);return r?JSON.parse(r):(this.info("The returned id_token could not be base64 url safe decoded."),null)}catch(e){this.error("The returned id_token could not be decoded",e)}return null},r.prototype._base64DecodeStringUrlSafe=function(e){return e=e.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(e))):decodeURIComponent(escape(this._decode(e)))},r.prototype._decode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=(e=String(e).replace(/=+$/,"")).length;if(n%4==1)throw new Error("The token to be decoded is not correctly encoded.");for(var r,i,o,s,u,a,c,l,p="",d=0;d>16&255,c=u>>8&255,p+=String.fromCharCode(a,c);break}if(d+1===n-1){a=(u=r<<18|i<<12)>>16&255,p+=String.fromCharCode(a);break}a=(u=r<<18|i<<12|o<<6|s)>>16&255,c=u>>8&255,l=255&u,p+=String.fromCharCode(a,c,l)}return p},r.prototype._decodeJwt=function(e){if(this._isEmpty(e))return null;var t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);return!t||t.length<4?(this.warn("The returned id_token is not parseable."),null):{header:t[1],JWSPayload:t[2],JWSSig:t[3]}},r.prototype._convertUrlSafeToRegularBase64EncodedString=function(e){return e.replace("-","+").replace("_","/")},r.prototype._serialize=function(e,t,n){var r=[];if(null!==t){r.push("?response_type="+e),r.push("client_id="+encodeURIComponent(t.clientId)),n&&r.push("resource="+encodeURIComponent(n)),r.push("redirect_uri="+encodeURIComponent(t.redirectUri)),r.push("state="+encodeURIComponent(t.state)),t.hasOwnProperty("slice")&&r.push("slice="+encodeURIComponent(t.slice)),t.hasOwnProperty("extraQueryParameter")&&r.push(t.extraQueryParameter);var i=t.correlationId?t.correlationId:this._guid();r.push("client-request-id="+encodeURIComponent(i))}return r.join("&")},r.prototype._deserialize=function(e){var t,n=/\+/g,r=/([^&=]+)=([^&]*)/g,i=function(e){return decodeURIComponent(e.replace(n," "))},o={};for(t=r.exec(e);t;)o[i(t[1])]=i(t[2]),t=r.exec(e);return o},r.prototype._decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},r.prototype._guid=function(){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues){var t=new Uint8Array(16);return e.getRandomValues(t),t[6]|=64,t[6]&=79,t[8]|=128,t[8]&=191,this._decimalToHex(t[0])+this._decimalToHex(t[1])+this._decimalToHex(t[2])+this._decimalToHex(t[3])+"-"+this._decimalToHex(t[4])+this._decimalToHex(t[5])+"-"+this._decimalToHex(t[6])+this._decimalToHex(t[7])+"-"+this._decimalToHex(t[8])+this._decimalToHex(t[9])+"-"+this._decimalToHex(t[10])+this._decimalToHex(t[11])+this._decimalToHex(t[12])+this._decimalToHex(t[13])+this._decimalToHex(t[14])+this._decimalToHex(t[15])}for(var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",r="0123456789abcdef",i=0,o="",s=0;s<36;s++)"-"!==n[s]&&"4"!==n[s]&&(i=16*Math.random()|0),"x"===n[s]?o+=r[i]:"y"===n[s]?(i&=3,o+=r[i|=8]):o+=n[s];return o},r.prototype._expiresIn=function(e){return e||(e=3599),this._now()+parseInt(e,10)},r.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},r.prototype._addAdalFrame=function(e){if(void 0!==e){this.info("Add adal frame to document:"+e);var t=document.getElementById(e);if(!t){if(document.createElement&&document.documentElement&&(window.opera||-1===window.navigator.userAgent.indexOf("MSIE 5.0"))){var n=document.createElement("iframe");n.setAttribute("id",e),n.setAttribute("aria-hidden","true"),n.style.visibility="hidden",n.style.position="absolute",n.style.width=n.style.height=n.borderWidth="0px",t=document.getElementsByTagName("body")[0].appendChild(n)}else document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeEnd",'');window.frames&&window.frames[e]&&(t=window.frames[e])}return t}},r.prototype._saveItem=function(e,t,n){if(this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation){if(!this._supportsLocalStorage())return this.info("Local storage is not supported"),!1;if(n){var r=this._getItem(e)||"";localStorage.setItem(e,r+t+this.CONSTANTS.CACHE_DELIMETER)}else localStorage.setItem(e,t);return!0}return this._supportsSessionStorage()?(sessionStorage.setItem(e,t),!0):(this.info("Session storage is not supported"),!1)},r.prototype._getItem=function(e){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?localStorage.getItem(e):(this.info("Local storage is not supported"),null):this._supportsSessionStorage()?sessionStorage.getItem(e):(this.info("Session storage is not supported"),null)},r.prototype._supportsLocalStorage=function(){try{return!!window.localStorage&&(window.localStorage.setItem("storageTest","A"),"A"==window.localStorage.getItem("storageTest")&&(window.localStorage.removeItem("storageTest"),!window.localStorage.getItem("storageTest")))}catch(e){return!1}},r.prototype._supportsSessionStorage=function(){try{return!!window.sessionStorage&&(window.sessionStorage.setItem("storageTest","A"),"A"==window.sessionStorage.getItem("storageTest")&&(window.sessionStorage.removeItem("storageTest"),!window.sessionStorage.getItem("storageTest")))}catch(e){return!1}},r.prototype._cloneConfig=function(e){if(null===e||"object"!=typeof e)return e;var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},r.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()},r.prototype.log=function(e,t,n,r){if(e<=Logging.level){if(!Logging.piiLoggingEnabled&&r)return;var i=(new Date).toUTCString(),o="";o=this.config.correlationId?i+":"+this.config.correlationId+"-"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[e]+" "+t:i+":"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[e]+" "+t,n&&(o+="\nstack:\n"+n.stack),Logging.log(o)}},r.prototype.error=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t)},r.prototype.warn=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null)},r.prototype.info=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null)},r.prototype.verbose=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null)},r.prototype.errorPii=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t,!0)},r.prototype.warnPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null,!0)},r.prototype.infoPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null,!0)},r.prototype.verbosePii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null,!0)},r.prototype._libVersion=function(){return"1.0.17"},e.exports&&(e.exports=r,e.exports.inject=function(e){return new r(e)}),r}()},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"App",(function(){return Un})),n.d(r,"AppCatalog",(function(){return Nn})),n.d(r,"Attachment",(function(){return kn})),n.d(r,"Attachments",(function(){return Dn})),n.d(r,"ClientsidePageFromFile",(function(){return Xn})),n.d(r,"CreateClientsidePage",(function(){return Jn})),n.d(r,"CanvasColumn",(function(){return Yn})),n.d(r,"CanvasSection",(function(){return $n})),n.d(r,"ClientsideText",(function(){return er})),n.d(r,"ClientsideWebpart",(function(){return tr})),n.d(r,"ColumnControl",(function(){return Zn})),n.d(r,"PromotedState",(function(){return jn})),n.d(r,"Comment",(function(){return Wn})),n.d(r,"Comments",(function(){return qn})),n.d(r,"Replies",(function(){return Hn})),n.d(r,"ContentType",(function(){return cr})),n.d(r,"ContentTypes",(function(){return ur})),n.d(r,"FieldLink",(function(){return hr})),n.d(r,"FieldLinks",(function(){return pr})),n.d(r,"Feature",(function(){return vr})),n.d(r,"Features",(function(){return yr})),n.d(r,"Fields",(function(){return Cr})),n.d(r,"Field",(function(){return Rr})),n.d(r,"AddFieldOptions",(function(){return Tr})),n.d(r,"CalendarType",(function(){return wr})),n.d(r,"ChoiceFieldFormatType",(function(){return _r})),n.d(r,"DateTimeFieldFormatType",(function(){return br})),n.d(r,"DateTimeFieldFriendlyFormatType",(function(){return Sr})),n.d(r,"FieldTypes",(function(){return mr})),n.d(r,"FieldUserSelectionMode",(function(){return Ir})),n.d(r,"UrlFieldFormatType",(function(){return Pr})),n.d(r,"File",(function(){return In})),n.d(r,"Files",(function(){return wn})),n.d(r,"CheckinType",(function(){return Zt})),n.d(r,"MoveOperations",(function(){return en})),n.d(r,"TemplateFileType",(function(){return tn})),n.d(r,"Version",(function(){return En})),n.d(r,"Versions",(function(){return On})),n.d(r,"Folder",(function(){return or})),n.d(r,"Folders",(function(){return rr})),n.d(r,"Form",(function(){return xr})),n.d(r,"Forms",(function(){return Ar})),n.d(r,"HubSite",(function(){return Fr})),n.d(r,"HubSites",(function(){return Lr})),n.d(r,"Item",(function(){return At})),n.d(r,"Items",(function(){return Rt})),n.d(r,"ItemVersion",(function(){return Lt})),n.d(r,"ItemVersions",(function(){return xt})),n.d(r,"PagedItemCollection",(function(){return kt})),n.d(r,"List",(function(){return Ct})),n.d(r,"Lists",(function(){return _t})),n.d(r,"ControlMode",(function(){return Pt})),n.d(r,"RenderListDataOptions",(function(){return wt})),n.d(r,"Navigation",(function(){return Wr})),n.d(r,"NavigationNode",(function(){return qr})),n.d(r,"NavigationNodes",(function(){return jr})),n.d(r,"NavigationService",(function(){return Hr})),n.d(r,"spODataEntity",(function(){return lt})),n.d(r,"spODataEntityArray",(function(){return pt})),n.d(r,"Profiles",(function(){return zr})),n.d(r,"UrlZone",(function(){return Kr})),n.d(r,"RegionalSettings",(function(){return ei})),n.d(r,"TimeZone",(function(){return ni})),n.d(r,"TimeZones",(function(){return ii})),n.d(r,"RelatedItemManager",(function(){return hi})),n.d(r,"SortDirection",(function(){return mi})),n.d(r,"ReorderingRuleMatchType",(function(){return bi})),n.d(r,"QueryPropertyValueType",(function(){return Si})),n.d(r,"SearchBuiltInSourceId",(function(){return Ci})),n.d(r,"SearchQueryBuilder",(function(){return vi})),n.d(r,"SearchResults",(function(){return Ii})),n.d(r,"Search",(function(){return Pi})),n.d(r,"Suggest",(function(){return Oi})),n.d(r,"RoleAssignment",(function(){return Ki})),n.d(r,"RoleAssignments",(function(){return Vi})),n.d(r,"RoleDefinition",(function(){return Ji})),n.d(r,"RoleDefinitions",(function(){return zi})),n.d(r,"PermissionKind",(function(){return Ei})),n.d(r,"SPSharedObjectType",(function(){return Ni})),n.d(r,"SharingDomainRestrictionMode",(function(){return Ai})),n.d(r,"SharingLinkKind",(function(){return xi})),n.d(r,"SharingOperationStatusCode",(function(){return Ui})),n.d(r,"SharingRole",(function(){return Ri})),n.d(r,"RoleType",(function(){return Di})),n.d(r,"SiteDesigns",(function(){return vo})),n.d(r,"SiteGroup",(function(){return Gi})),n.d(r,"SiteGroups",(function(){return Mi})),n.d(r,"SiteScripts",(function(){return To})),n.d(r,"SiteUser",(function(){return Bi})),n.d(r,"SiteUsers",(function(){return ki})),n.d(r,"Site",(function(){return gt})),n.d(r,"MySocial",(function(){return Ao})),n.d(r,"Social",(function(){return Eo})),n.d(r,"SocialActorType",(function(){return Po})),n.d(r,"SocialActorTypes",(function(){return Io})),n.d(r,"SocialFollowResult",(function(){return _o})),n.d(r,"SocialStatusCode",(function(){return Oo})),n.d(r,"Utilities",(function(){return Do})),n.d(r,"Subscription",(function(){return jo})),n.d(r,"Subscriptions",(function(){return Fo})),n.d(r,"UserCustomAction",(function(){return pi})),n.d(r,"UserCustomActions",(function(){return ci})),n.d(r,"UserCustomActionRegistrationType",(function(){return si})),n.d(r,"UserCustomActionScope",(function(){return ui})),n.d(r,"View",(function(){return Vo})),n.d(r,"ViewFields",(function(){return Ko})),n.d(r,"Views",(function(){return Go})),n.d(r,"ViewScope",(function(){return Mo})),n.d(r,"WebPartsPersonalizationScope",(function(){return Qo})),n.d(r,"WebPartDefinitions",(function(){return Yo})),n.d(r,"WebPartDefinition",(function(){return es})),n.d(r,"LimitedWebPartManager",(function(){return Xo})),n.d(r,"Web",(function(){return St})),n.d(r,"Webs",(function(){return mt})),n.d(r,"SharePointQueryableInstance",(function(){return rt})),n.d(r,"SharePointQueryableCollection",(function(){return tt})),n.d(r,"SharePointQueryable",(function(){return Ze})),n.d(r,"spInvokableFactory",(function(){return $e})),n.d(r,"SPBatch",(function(){return dt})),n.d(r,"defaultPath",(function(){return st})),n.d(r,"spGet",(function(){return He})),n.d(r,"spPost",(function(){return Ke})),n.d(r,"spDelete",(function(){return Qe})),n.d(r,"spPatch",(function(){return ze})),n.d(r,"spPostDelete",(function(){return Xe})),n.d(r,"spPostDeleteETag",(function(){return Je})),n.d(r,"SPHttpClient",(function(){return Me})),n.d(r,"SPRest",(function(){return ht})),n.d(r,"sp",(function(){return ts})),n.d(r,"PrincipalType",(function(){return qt})),n.d(r,"PrincipalSource",(function(){return Gt})),n.d(r,"PageType",(function(){return Wt})),n.d(r,"toAbsoluteUrl",(function(){return Ge})),n.d(r,"extractWebUrl",(function(){return Be})),n.d(r,"objectToSPKeyValueCollection",(function(){return Vt})),n.d(r,"stripInvalidFileFolderChars",(function(){return zt})),n.d(r,"containsInvalidFileFolderChars",(function(){return Qt}));var i={};n.r(i),n.d(i,"Attachment",(function(){return vs})),n.d(i,"Attachments",(function(){return ms})),n.d(i,"Calendar",(function(){return Es})),n.d(i,"Calendars",(function(){return Cs})),n.d(i,"Event",(function(){return Rs})),n.d(i,"Events",(function(){return Ns})),n.d(i,"Contact",(function(){return Ls})),n.d(i,"ContactFolder",(function(){return Fs})),n.d(i,"ContactFolders",(function(){return Bs})),n.d(i,"Contacts",(function(){return ks})),n.d(i,"Conversation",(function(){return cs})),n.d(i,"Conversations",(function(){return ls})),n.d(i,"Post",(function(){return fs})),n.d(i,"Posts",(function(){return ys})),n.d(i,"Senders",(function(){return gs})),n.d(i,"Thread",(function(){return ps})),n.d(i,"Threads",(function(){return ds})),n.d(i,"DirectoryObjectTypes",(function(){return bs})),n.d(i,"DirectoryObject",(function(){return ws})),n.d(i,"DirectoryObjects",(function(){return Ps})),n.d(i,"Group",(function(){return _s})),n.d(i,"GroupType",(function(){return Ss})),n.d(i,"Groups",(function(){return Os})),n.d(i,"Insights",(function(){return js})),n.d(i,"SharedInsight",(function(){return Vs})),n.d(i,"SharedInsights",(function(){return Hs})),n.d(i,"TrendingInsight",(function(){return Ms})),n.d(i,"TrendingInsights",(function(){return qs})),n.d(i,"UsedInsight",(function(){return Gs})),n.d(i,"UsedInsights",(function(){return Ws})),n.d(i,"Resource",(function(){return Ks})),n.d(i,"Invitations",(function(){return Qs})),n.d(i,"Member",(function(){return zs})),n.d(i,"Members",(function(){return Xs})),n.d(i,"MailFolder",(function(){return Ys})),n.d(i,"MailFolders",(function(){return Zs})),n.d(i,"MailboxSettings",(function(){return eu})),n.d(i,"Message",(function(){return Js})),n.d(i,"Messages",(function(){return $s})),n.d(i,"Drive",(function(){return tu})),n.d(i,"DriveItem",(function(){return iu})),n.d(i,"DriveItems",(function(){return ou})),n.d(i,"Drives",(function(){return nu})),n.d(i,"Root",(function(){return ru})),n.d(i,"Notebook",(function(){return uu})),n.d(i,"Notebooks",(function(){return au})),n.d(i,"OneNote",(function(){return su})),n.d(i,"Section",(function(){return cu})),n.d(i,"Sections",(function(){return lu})),n.d(i,"Photo",(function(){return pu})),n.d(i,"Bucket",(function(){return vu})),n.d(i,"Buckets",(function(){return mu})),n.d(i,"Plan",(function(){return hu})),n.d(i,"Planner",(function(){return du})),n.d(i,"Plans",(function(){return fu})),n.d(i,"Task",(function(){return yu})),n.d(i,"Tasks",(function(){return gu})),n.d(i,"Subscription",(function(){return bu})),n.d(i,"Subscriptions",(function(){return Su})),n.d(i,"Channel",(function(){return Pu})),n.d(i,"Channels",(function(){return Iu})),n.d(i,"Tab",(function(){return _u})),n.d(i,"Tabs",(function(){return Ou})),n.d(i,"Team",(function(){return Tu})),n.d(i,"Teams",(function(){return wu})),n.d(i,"User",(function(){return Us})),n.d(i,"Users",(function(){return xs})),n.d(i,"People",(function(){return Ds})),n.d(i,"graph",(function(){return Sn})),n.d(i,"GraphRest",(function(){return bn}));var o,s=function(){function e(){}return Object.defineProperty(e,"activeLogLevel",{get:function(){return e.instance.activeLogLevel},set:function(t){e.instance.activeLogLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return void 0!==e._instance&&null!==e._instance||(e._instance=new u),e._instance},enumerable:!0,configurable:!0}),e.subscribe=function(){for(var t=[],n=0;n=0;u--)(i=e[u])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function D(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,u)}a((r=r.apply(e,t||[])).next())}))}function L(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function F(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function B(){for(var e=[],t=0;t0&&(n=60*this.defaultTimeoutMinutes),t=p(new Date,"second",n)}return w({pnp:1,expiration:t,value:e})},e.prototype.cacheExpirationHandler=function(){var e=this;this.enabled&&this.deleteExpired().then((function(t){setTimeout(l(e,e.cacheExpirationHandler),N.cacheExpirationIntervalMilliseconds)})).catch(console.error)},e}(),Q=function(){function e(e){void 0===e&&(e=new Map),this._store=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this._store.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this._store.clear()},e.prototype.getItem=function(e){return this._store.get(e)},e.prototype.key=function(e){return Array.from(this._store)[e][0]},e.prototype.removeItem=function(e){this._store.delete(e)},e.prototype.setItem=function(e,t){this._store.set(e,t)},e}(),z=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this._local=e,this._session=t}return Object.defineProperty(e.prototype,"local",{get:function(){return null===this._local&&(this._local=K.bind(localStorage)),this._local},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"session",{get:function(){return null===this._session&&(this._session=K.bind(sessionStorage)),this._session},enumerable:!0,configurable:!0}),e}(),X=function(){function e(e){void 0===e&&(e=new Map),this._settings=e}return e.prototype.add=function(e,t){this._settings.set(e,t)},e.prototype.addJSON=function(e,t){this._settings.set(e,w(t))},e.prototype.apply=function(e){var t=this;return new Promise((function(n,r){try{t._settings=C(t._settings,O(e)),n()}catch(e){r(e)}}))},e.prototype.load=function(e){var t=this;return new Promise((function(n,r){e.getConfiguration().then((function(e){t._settings=C(t._settings,O(e)),n()})).catch(r)}))},e.prototype.get=function(e){return this._settings.get(e)||null},e.prototype.getJSON=function(e){var t=this.get(e);return null==t?t:JSON.parse(t)},e}(),J=function(){function e(e,t,n){this.wrappedProvider=e,this.cacheKey=t,this.wrappedProvider=e,this.store=n||this.selectPnPCache()}return e.prototype.getWrappedProvider=function(){return this.wrappedProvider},e.prototype.getConfiguration=function(){var e=this;return this.store&&this.store.enabled?this.store.getOrPut(this.cacheKey,(function(){return e.wrappedProvider.getConfiguration().then((function(t){return e.store.put(e.cacheKey,t),t}))})):this.wrappedProvider.getConfiguration()},e.prototype.selectPnPCache=function(){var e=new z;if(e.local&&e.local.enabled)return e.local;if(e.session&&e.session.enabled)return e.session;throw Error("Cannot create a caching configuration provider since cache is not available.")},e}(),$=function(){function e(e){void 0===e&&(e=f()),this._batchId=e,this._reqs=[],this._deps=[],this._rDeps=[],this._index=-1}return Object.defineProperty(e.prototype,"batchId",{get:function(){return this._batchId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._reqs.sort((function(e,t){return e.index-t.index}))},enumerable:!0,configurable:!0}),e.prototype.track=function(e){e.data.batch=this,(void 0===e.data.batchIndex||e.data.batchIndex<0)&&(e.data.batchIndex=++this._index)},e.prototype.add=function(e){var t={id:e.requestId,index:e.batchIndex,method:e.method.toUpperCase(),options:e.options,parser:e.parser,reject:null,resolve:null,url:e.url},n=new Promise((function(e,n){t.resolve=e,t.reject=n}));return this._reqs.push(t),n},e.prototype.addDependency=function(){var e=function(){};return this._deps.push(new Promise((function(t){e=t}))),e},e.prototype.addResolveBatchDependency=function(e){this._rDeps.push(e)},e.prototype.execute=function(){var e=this;return Promise.all(this._deps).then((function(){return Promise.all(e._deps)})).then((function(){return e.executeImpl()})).then((function(){return Promise.all(e._rDeps)})).then((function(){}))},e}(),Y=function(){function e(e,t,n){void 0===t&&(t=N.defaultCachingStore),void 0===n&&(n=p(new Date,"second",N.defaultCachingTimeoutSeconds)),this.key=e,this.storeName=t,this.expiration=n}return Object.defineProperty(e.prototype,"store",{get:function(){return"local"===this.storeName?e.storage.local:e.storage.session},enumerable:!0,configurable:!0}),e.storage=new z,e}(),Z=function(){function e(e,t){this.parser=e,this.cacheOptions=t}return e.prototype.parse=function(e){var t=this;return this.parser.parse(e).then((function(e){return t.cacheData(e)}))},e.prototype.cacheData=function(e){return null!==this.cacheOptions.store&&this.cacheOptions.store.put(this.cacheOptions.key,e,this.cacheOptions.expiration),e},e}();function ee(e,t,n,r){Reflect.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get:function(){return n(this,r)}})}var te=!1,ne=[],re=Symbol("__extensions"),ie=function(e){te=!0,ue(ne,e)},oe=function(e,t){return te=!0,Reflect.has(e,re)||Reflect.set(e,re,[]),ue(Reflect.get(e,re),t),e},se=function(e,t){te=!0,void 0===e.__proto__[re]&&(e.__proto__[re]=[]),ue(e.__proto__[re],t)};function ue(e,t){v(t)?e.push.apply(e,B(t)):e.push(t)}var ae=function(){ne.length=0},ce=function(){te=!1},le=function(){te=!0},pe=function(e,t){var n=e(t);return e.__proto__[re]&&(n=oe(n,e.__proto__[re])),n};function de(e,t,n){for(var r=[],i=3;i0?JSON.parse(e):{}})).then((function(e){return t(r.parseODataJSON(e))})).catch((function(e){return n(e)}))},e.prototype.handleError=function(e,t){return e.ok||Te.init(e).then(t),e.ok},e.prototype.parseODataJSON=function(e){var t=e;return P(e,"d")?t=P(e.d,"results")?e.d.results:e.d:P(e,"value")&&(t=e.value),t},e}(),ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.parseImpl=function(e,t){e.text().then(t)},t}(ye),ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.parseImpl=function(e,t){e.blob().then(t)},t}(ye),me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.parseImpl=function(e,t){e.json().then(t)},t}(ye),be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.parseImpl=function(e,t){y(e.arrayBuffer)?e.arrayBuffer().then(t):e.buffer().then(t)},t}(ye),Se=function(e){function t(t){var n=e.call(this)||this;return n.parser=t,n}return U(t,e),t.prototype.parseImpl=function(e,t){this.parser(e).then(t)},t}(ye),Te=function(e){function t(t,n,r,i){void 0===r&&(r=n.status),void 0===i&&(i=n.statusText);var o=e.call(this,t)||this;return o.response=n,o.status=r,o.statusText=i,o.isHttpRequestError=!0,o}return U(t,e),t.init=function(e){return D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,e.clone().text()];case 1:return n=r.sent(),[2,new t("Error making HttpClient request in queryable ["+e.status+"] "+e.statusText+" ::> "+n,e.clone())]}}))}))},t}(Error);function we(e){var t=JSON.stringify(e,(function(e,t){switch(e){case"query":return JSON.stringify(B(t));case"batch":case"batchDependency":case"cachingOptions":case"clientFactory":case"parser":return"-";default:return t}}),0),n=JSON.parse(t,(function(t,n){switch(t){case"query":return new Map(JSON.parse(n));case"batch":return e.batch;case"batchDependency":return e.batchDependency;case"cachingOptions":return e.cachingOptions;case"clientFactory":return e.clientFactory;case"parser":return e.parser;default:return n}}));return e.options&&e.options.body&&(n.options.body=e.options.body),n}var Pe=function(){function e(e){void 0===e&&(e={}),this._data=Object.assign({},{cloneParentWasCaching:!1,options:{},parentUrl:"",parser:new ye,query:new Map,url:"",useCaching:!1},we(e))}return Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(e){this._data=Object.assign({},we(this.data),we(e))},enumerable:!0,configurable:!0}),e.prototype.toUrl=function(){return this.data.url},e.prototype.concat=function(e){return this.data.url+=e,this},Object.defineProperty(e.prototype,"query",{get:function(){return this.data.query},enumerable:!0,configurable:!0}),e.prototype.configure=function(e){return q(this.data.options,e),this},e.prototype.configureFrom=function(e){return q(this.data.options,e.data.options),this},e.prototype.usingCaching=function(e){return N.globalCacheDisable||(this.data.useCaching=!0,void 0!==e&&(this.data.cachingOptions=e)),this},e.prototype.usingParser=function(e){return this.data.parser=e,this},e.prototype.withPipeline=function(e){return this.data.pipes=e.slice(0),this},e.prototype.append=function(e){this.data.url=d(this.data.url,e)},e.prototype.inBatch=function(e){if(this.hasBatch)throw Error("This query is already part of a batch.");return g(e)&&e.track(this),this},e.prototype.addBatchDependency=function(){return g(this.data.batch)?this.data.batch.addDependency():function(){return null}},Object.defineProperty(e.prototype,"hasBatch",{get:function(){return g(this.data.batch)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"batch",{get:function(){return this.hasBatch?this.data.batch:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentUrl",{get:function(){return this.data.parentUrl},enumerable:!0,configurable:!0}),e.prototype.cloneTo=function(e,t){return void 0===t&&(t={includeBatch:!0}),e.data=Object.assign({},we(this.data),{batch:null,cloneParentCacheOptions:null,cloneParentWasCaching:!1},we(e.data)),e.configureFrom(this),t.includeBatch&&e.inBatch(this.batch),this.data.useCaching&&(e.data.cloneParentWasCaching=!0,e.data.cloneParentCacheOptions=this.data.cachingOptions),e},e}();function Ie(e,t){return new Promise((function(n){e.result=t,e.hasResult=!0,n(e)}))}function _e(e){return e.pipes.length>0?e.pipes.shift()(e):Promise.resolve(e)}function Oe(e){if(e.pipes.length<1)throw s.write("["+e.requestId+"] ("+(new Date).getTime()+") Request pipeline contains no methods!",3),Error("Request pipeline contains no methods!");var t=_e(e).then((function(e){return function(e){return s.log({data:0===s.activeLogLevel?e.result:{},level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Returning result from pipeline. Set logging to verbose to see data."}),Promise.resolve(e.result)}(e)})).catch((function(e){throw s.error(e),e}));return e.isBatched&&e.batch.addResolveBatchDependency(t),t}function Ce(e){return void 0===e&&(e=!1),function(t,n,r){var i=r.value;r.value=function(){for(var r=[],o=0;o0&&P(r[0],"hasResult")&&r[0].hasResult?(s.write("["+r[0].requestId+"] ("+(new Date).getTime()+") Skipping request pipeline method "+n+", existing result in pipeline.",0),Promise.resolve(r[0])):(s.write("["+r[0].requestId+"] ("+(new Date).getTime()+") Calling request pipeline method "+n+".",0),i.apply(t,r).then((function(e){return _e(e)})))}}}var Ee=function(){function e(){}return e.logStart=function(e){return new Promise((function(t){s.log({data:1===s.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Beginning "+e.method+" request ("+e.url+")"}),t(e)}))},e.caching=function(e){return new Promise((function(t){if(e.useCaching){s.write("["+e.requestId+"] ("+(new Date).getTime()+") Caching is enabled for request, checking cache...",1);var n=new Y(e.url.toLowerCase());if(void 0!==e.cachingOptions&&(n=m(n,e.cachingOptions)),null!==n.store){var r=n.store.get(n.key);if(null!==r)return s.log({data:1===s.activeLogLevel?{}:r,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Value returned from cache."}),y(e.batchDependency)&&e.batchDependency(),P(e.parser,"hydrate")&&(r=e.parser.hydrate(r)),Ie(e,r).then((function(e){return t(e)}))}s.write("["+e.requestId+"] ("+(new Date).getTime()+") Value not found in cache.",1),e.parser=new Z(e.parser,n)}return t(e)}))},e.send=function(e){return new Promise((function(t,n){if(e.isBatched){var r=e.batch.add(e);y(e.batchDependency)&&e.batchDependency(),s.write("["+e.requestId+"] ("+(new Date).getTime()+") Batching request in batch "+e.batch.batchId+".",1),t(Ie(e,r))}else{s.write("["+e.requestId+"] ("+(new Date).getTime()+") Sending request.",1);var i=e.clientFactory(),o=m(e.options||{},{method:e.method});i.fetch(e.url,o).then((function(t){return e.parser.parse(t)})).then((function(t){return Ie(e,t)})).then((function(e){return t(e)})).catch((function(e){return n(e)}))}}))},e.logEnd=function(e){return new Promise((function(t){e.isBatched?s.log({data:1===s.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") "+e.method+" request will complete in batch "+e.batch.batchId+"."}):s.log({data:1===s.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Completing "+e.method+" request."}),t(e)}))},x([Ce(!0)],e,"logStart",null),x([Ce()],e,"caching",null),x([Ce()],e,"send",null),x([Ce(!0)],e,"logEnd",null),e}();function Re(){return[Ee.logStart,Ee.caching,Ee.send,Ee.logEnd].slice(0)}function Ne(e){return function(t){return function(n){return function(r){return Oe(Object.assign({},{batch:null,batchDependency:null,batchIndex:-1,cachingOptions:null,clientFactory:t,cloneParentCacheOptions:null,cloneParentWasCaching:!1,hasResult:!1,isBatched:g(r.batch),method:n,options:null,parentUrl:"",parser:new ye,pipes:e.slice(0),query:new Map,requestId:f(),url:"",useCaching:/^get$/i.test(r.method)&&r.useCaching},we(r)))}}}}var Ae=Ne(Re());function Ue(e,t){return Object.assign({body:w(e)},t)}function xe(e,t){return Object.assign({headers:e},t)}function De(e){return{__metadata:{type:e}}}var Le="00000000-0000-0000-0000-000000000000";function ke(e){N.assign(e)}var Fe=new(function(){function e(){}return Object.defineProperty(e.prototype,"headers",{get:function(){var e=N.get("sp");return void 0!==e&&void 0!==e.headers?e.headers:{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseUrl",{get:function(){var e=N.get("sp");return void 0!==e&&void 0!==e.baseUrl?e.baseUrl:g(N.spfxContext)?N.spfxContext.pageContext.web.absoluteUrl:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fetchClientFactory",{get:function(){var e=N.get("sp");return void 0!==e&&void 0!==e.fetchClientFactory?e.fetchClientFactory:function(){return new W}},enumerable:!0,configurable:!0}),e}());function Be(e){if(S(e))return"";var t=e.indexOf("_api/");return t<0&&(t=e.indexOf("_vti_bin/")),t>-1?e.substr(0,t):e}function je(e){return function(t,n,r){void 0===r&&(r=Object.getOwnPropertyDescriptor(t,n));var i=r.value;return r.value=function(){for(var t=[],n=0;n32&&(o=o.substr(0,32)),r.append("X-ClientService-ClientTag",o)),!(n=m(n,{headers:r})).method||"GET"===n.method.toUpperCase()||r.has("X-RequestDigest")||r.has("Authorization")?[3,2]:[4,this._digestCache(Be(e))];case 1:s=u.sent(),r.append("X-RequestDigest",s),u.label=2;case 2:return[2,this.fetchRaw(e,n)]}}))}))},e.prototype.fetchRaw=function(e,t){var n=this;void 0===t&&(t={});var r=new Headers;M(r,t.headers),t=m(t,{headers:r});var i=function(r){var o=function(e){var t;e.headers.has("Retry-After")?t=1e3*parseInt(e.headers.get("Retry-After"),10):(t=r.delay,r.delay*=2),r.attempts++,r.retryCount<=r.attempts?r.reject(Error("Retry count exceeded ("+r.retryCount+") for request. Response status: ["+e.status+"] "+e.statusText)):setTimeout(l(n,i,r),t)};n._impl.fetch(e,t).then((function(e){429===e.status?o(e):r.resolve(e)})).catch((function(e){503===e.status||504===e.status?o(e):r.reject(e)}))};return new Promise((function(e,t){i.call(n,{attempts:0,delay:100,reject:t,resolve:e,retryCount:7})}))},e.prototype.get=function(e,t){void 0===t&&(t={});var n=m(t,{method:"GET"});return this.fetch(e,n)},e.prototype.post=function(e,t){void 0===t&&(t={});var n=m(t,{method:"POST"});return this.fetch(e,n)},e.prototype.patch=function(e,t){void 0===t&&(t={});var n=m(t,{method:"PATCH"});return this.fetch(e,n)},e.prototype.delete=function(e,t){void 0===t&&(t={});var n=m(t,{method:"DELETE"});return this.fetch(e,n)},e}(),qe=new Map;function Ge(e){return new Promise((function(t){if(b(e))return t(e);if(null!==Fe.baseUrl)return t(d(Fe.baseUrl,e));if(void 0!==j.a._spPageContextInfo){if(P(j.a._spPageContextInfo,"webAbsoluteUrl"))return t(d(j.a._spPageContextInfo.webAbsoluteUrl,e));if(P(j.a._spPageContextInfo,"webServerRelativeUrl"))return t(d(j.a._spPageContextInfo.webServerRelativeUrl,e))}if(void 0!==j.a.location){var n=j.a.location.toString().toLowerCase();["/_layouts/","/siteassets/"].forEach((function(r){var i=n.indexOf(r);if(i>0)return t(d(n.substr(0,i),e))}))}return t(e)}))}var We=Ae((function(){return new Me})),Ve=function(e){var t=We(e);return function(e,n){return D(this,void 0,void 0,(function(){var r,i,o;return L(this,(function(s){switch(s.label){case 0:return r=we(e.data),i=g(r.batch)?r.batch.addDependency():function(){},[4,Ge(e.toUrlAndQuery())];case 1:return o=s.sent(),q(r.options,n),[2,t(Object.assign({},r,{batchDependency:i,url:o}))]}}))}))}},He=function(e,t){return e.data.cloneParentWasCaching&&e.usingCaching(e.data.cloneParentCacheOptions),e._forceCaching&&(e.data.useCaching=!0),Ve("GET")(e,t)},Ke=Ve("POST"),Qe=Ve("DELETE"),ze=Ve("PATCH"),Xe=function(e,t){var n=Object.assign(xe({"X-HTTP-Method":"DELETE"}),t);return Ke(e,n)},Je=function(e,t,n){void 0===n&&(n="*");var r=Object.assign(xe({"X-HTTP-Method":"DELETE","IF-Match":n}),t);return Ke(e,r)},$e=function(e){return fe(e)},Ye=function(e){function t(t,n){var r=this,i="",o="",s=new Map;if("string"==typeof t)if(b(t)||t.lastIndexOf("/")<0)o=t,i=d(t,n);else if(t.lastIndexOf("/")>t.lastIndexOf("(")){var u=t.lastIndexOf("/");o=t.slice(0,u),n=d(t.slice(u),n),i=d(o,n)}else{u=t.lastIndexOf("(");o=t.slice(0,u),i=d(t,n)}else{i=d(o=t.toUrl(),n||"");var a=t.query.get("@target");void 0!==a&&s.set("@target",a)}return r=e.call(this,{parentUrl:o,query:s,url:i})||this,"string"!=typeof t&&r.configureFrom(t),r._forceCaching=!1,r}return U(t,e),t.prototype.toUrlAndQuery=function(){var e=new Map(this.query),t=this.toUrl().replace(/'!(@.*?)::(.*?)'/gi,(function(t,n,r){return s.write("Rewriting aliased parameter from match "+t+" to label: "+n+" value: "+r,0),e.set(n,"'"+r+"'"),n}));if(e.size>0){var n=t.indexOf("?")>-1?"&":"?";t+=""+n+Array.from(e).map((function(e){return e[0]+"="+e[1]})).join("&")}return t},t.prototype.select=function(){for(var e=[],t=0;t0&&this.query.set("$select",e.join(",")),this},t.prototype.get=function(e){return He(this,e)},t.prototype.expand=function(){for(var e=[],t=0;t0&&this.query.set("$expand",e.join(",")),this},t.prototype.clone=function(t,n,r){void 0===r&&(r=!0);var i=e.prototype.cloneTo.call(this,t(this,n),{includeBatch:r}),o="@target";return this.query.has(o)&&i.query.set(o,this.query.get(o)),i},t.prototype.defaultAction=function(e){return He(this,e)},t.prototype.getParent=function(e,t,n,r){void 0===t&&(t=this.parentUrl);var i=e(t,n).configureFrom(this),o="@target";return this.query.has(o)&&i.query.set(o,this.query.get(o)),void 0!==r&&(i=i.inBatch(r)),i},t}(Pe),Ze=$e(Ye),et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.filter=function(e){return this.query.set("$filter",e),this},t.prototype.orderBy=function(e,t){void 0===t&&(t=!0);var n="$orderby",r=this.query.has(n)?this.query.get(n).split(","):[];return r.push(e+" "+(t?"asc":"desc")),this.query.set(n,r.join(",")),this},t.prototype.skip=function(e){return this.query.set("$skip",e.toString()),this},t.prototype.top=function(e){return this.query.set("$top",e.toString()),this},t}(Ye),tt=$e(et),nt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype._update=function(e,t){var n=this;return function(r){return Ke(je.configure(n,e+".Update"),{body:w(m(De(e),r)),headers:{"X-HTTP-Method":"MERGE"}}).then((function(e){return t(e,r)}))}},t}(Ye),rt=$e(nt);function it(e){return function(){return Xe(je.configure(this,e+".delete"))}}function ot(e){return function(t){return void 0===t&&(t="*"),Je(je.configure(this,e+".delete"),{},t)}}function st(e){return function(t){return function(t){function n(){for(var n=[],r=0;r1&&void 0!==n[1]?n[1]:e)||this}return U(n,t),n}(t)}}function ut(e){var t=[],n=["odata.type","odata.editLink","__metadata","odata.metadata","odata.id"];if(P(e,n[0])&&"SP.Web"===e[n[0]])P(e,n[4])?t.push(e[n[4]]):P(e,n[2])&&t.push(e.__metadata.uri);else if(P(e,n[3])&&P(e,n[1])){var r=b(e[n[1]])?e[n[1]].split("_api")[1]:e[n[1]];t.push(Be(e[n[3]]),"_api",r)}else P(e,n[1])?t.push("_api",e[n[1]]):P(e,n[2])&&t.push(e.__metadata.uri);return t.length<1?(s.write("No uri information found in ODataEntity parsing, chaining will fail for this object.",2),""):d.apply(void 0,B(t))}var at=function(e){function t(t){var n=e.call(this)||this;return n.factory=t,n.hydrate=function(e){return m(n.factory(ut(e),null),e)},n}return U(t,e),t.prototype.parse=function(t){var n=this;return e.prototype.parse.call(this,t).then((function(e){return m(n.factory(ut(e),null),e)}))},t}(ye),ct=function(e){function t(t){var n=e.call(this)||this;return n.factory=t,n.hydrate=function(e){return e.map((function(e){return m(n.factory(ut(e),null),e)}))},n}return U(t,e),t.prototype.parse=function(t){var n=this;return e.prototype.parse.call(this,t).then((function(e){return e.map((function(e){return m(n.factory(ut(e),null),e)}))}))},t}(ye);function lt(e){return new at(e)}function pt(e){return new ct(e)}var dt=function(e){function t(t){var n=e.call(this)||this;return n.baseUrl=t,n}return U(t,e),t.ParseResponse=function(e){for(var t,n,r=[],i=new RegExp("^HTTP/[0-9.]+ +([0-9]+) +(.*)","i"),o=e.split("\n"),s="batch",u=0;u0&&(r.push("--changeset_"+i+"--\n\n"),i=""),r.push("--batch_"+this.batchId+"\n")):(i.length<1&&(i=f(),r.push("--batch_"+this.batchId+"\n"),r.push('Content-Type: multipart/mixed; boundary="changeset_'+i+'"\n\n')),r.push("--changeset_"+i+"\n")),r.push("Content-Type: application/http\n"),r.push("Content-Transfer-Encoding: binary\n\n"),a=new Headers,c=b(u.url)?u.url:d(n,u.url),s.write("["+this.batchId+"] ("+(new Date).getTime()+") Adding request "+u.method+" "+c+" to batch.",0),"GET"!==u.method?(l=u.method,p=u.options.headers,P(u,"options")&&P(u.options,"headers")&&void 0!==p["X-HTTP-Method"]&&(l=p["X-HTTP-Method"],delete p["X-HTTP-Method"]),r.push(l+" "+c+" HTTP/1.1\n"),a.set("Content-Type","application/json;odata=verbose;charset=utf-8")):r.push(u.method+" "+c+" HTTP/1.1\n"),M(a,Fe.headers),u.options&&M(a,u.options.headers),a.has("Accept")||a.append("Accept","application/json"),a.has("Content-Type")||a.append("Content-Type","application/json;odata=verbose;charset=utf-8"),a.has("X-ClientService-ClientTag")||a.append("X-ClientService-ClientTag","PnPCoreJS:@pnp-$$Version$$:batch"),a.forEach((function(e,t){r.push(t+": "+e+"\n")})),r.push("\n"),u.options.body&&r.push(u.options.body+"\n\n");return i.length>0&&(r.push("--changeset_"+i+"--\n\n"),i=""),r.push("--batch_"+this.batchId+"--\n"),h={body:r.join(""),headers:{"Content-Type":"multipart/mixed; boundary=batch_"+this.batchId},method:"POST"},s.write("["+this.batchId+"] ("+(new Date).getTime()+") Sending batch request.",1),[4,e.fetch(d(n,"/_api/$batch"),h)];case 2:return[4,m.sent().text()];case 3:if(y=m.sent(),(g=t.ParseResponse(y)).length!==this.requests.length)throw Error("Could not properly parse responses to match requests in batch.");return s.write("["+this.batchId+"] ("+(new Date).getTime()+") Resolving batched requests.",1),[2,g.reduce((function(e,t,n){return e.then((function(e){return D(v,void 0,void 0,(function(){var e,r,i,o;return L(this,(function(u){switch(u.label){case 0:e=this.requests[n],s.write("["+e.id+"] ("+(new Date).getTime()+") Resolving request in batch "+this.batchId+".",1),u.label=1;case 1:return u.trys.push([1,3,,4]),i=(r=e).resolve,[4,e.parser.parse(t)];case 2:return i.apply(r,[u.sent()]),[3,4];case 3:return o=u.sent(),e.reject(o),[3,4];case 4:return[2]}}))}))}))}),Promise.resolve(void 0))]}}))}))},t}($),ht=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=""),this._options=e,this._baseUrl=t}return e.prototype.configure=function(t,n){return void 0===n&&(n=""),new e(t,n)},e.prototype.setup=function(e){e.pageContext?ke({spfxContext:e}):ke(e)},e}();new ht;function ft(e){return S(e)?"":/!(@.*?)::(.*?)/gi.test(e)?e.replace(/!(@.*?)::(.*)$/gi,(function(e,t,n){return s.write("Rewriting aliased parameter from match "+e+" to label: "+t+" value: "+n,0),"!"+t+"::"+encodeURIComponent(n.replace(/\'/gi,"''"))})):encodeURIComponent(e.replace(/\'/gi,"''"))}var yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"rootWeb",{get:function(){return je.configure(St(this,"rootweb"),"si.rootWeb")},enumerable:!0,configurable:!0}),t.prototype.getRootWeb=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,this.rootWeb.select("Url")()];case 1:return e=t.sent(),[2,je.configure(St(e.Url),"si.getRootWeb")]}}))}))},t.prototype.getContextInfo=function(){return D(this,void 0,void 0,(function(){var e,t,n;return L(this,(function(r){switch(r.label){case 0:return e=je.configure(gt(this.parentUrl,"_api/contextinfo"),"si.getContextInfo"),[4,Ke(e)];case 1:return P(t=r.sent(),"GetContextWebInformation")?((n=t.GetContextWebInformation).SupportedSchemaVersions=n.SupportedSchemaVersions.results,[2,n]):[2,t]}}))}))},t.prototype.createBatch=function(){return new dt(this.parentUrl)},t.prototype.delete=function(){return D(this,void 0,void 0,(function(){var e,t;return L(this,(function(n){switch(n.label){case 0:return[4,this.clone(gt,"").select("Id")()];case 1:return e=n.sent(),t=je.configure(gt(this.parentUrl,"_api/SPSiteManager/Delete"),"si.delete"),[4,Ke(t,Ue({siteId:e.Id}))];case 2:return n.sent(),[2]}}))}))},t.prototype.getDocumentLibraries=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return(t=je.configure(Ze("","_api/sp.web.getdocumentlibraries(@v)"),"si.getDocumentLibraries")).query.set("@v","'"+ft(e)+"'"),[4,t()];case 1:return[2,P(n=r.sent(),"GetDocumentLibraries")?n.GetDocumentLibraries:n]}}))}))},t.prototype.getWebUrlFromPageUrl=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return(t=je.configure(Ze("","_api/sp.web.getweburlfrompageurl(@v)"),"si.getWebUrlFromPageUrl")).query.set("@v","'"+ft(e)+"'"),[4,t()];case 1:return[2,P(n=r.sent(),"GetWebUrlFromPageUrl")?n.GetWebUrlFromPageUrl:n]}}))}))},t.prototype.getChanges=function(e){var t=Ue({query:m(De("SP.ChangeQuery"),e)});return Ke(this.clone(St,"getchanges"),t)},t.prototype.openWebById=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(gt,"openWebById('"+e+"')"))];case 1:return[2,{data:t=n.sent(),web:St(Be(ut(t)))}]}}))}))},t.prototype.createCommunicationSite=function(e,t,n,r,i,o,s,u,a){return void 0===t&&(t=1033),void 0===n&&(n=!1),D(this,void 0,void 0,(function(){return L(this,(function(c){return[2,this.createCommunicationSiteFromProps({Classification:o,Description:i,HubSiteId:u,Lcid:t,Owner:a,ShareByEmailEnabled:n,SiteDesignId:s,Title:e,Url:r})]}))}))},t.prototype.createCommunicationSiteFromProps=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){return t=Object.assign({},{Classification:"",Description:"",HubSiteId:Le,Lcid:1033,ShareByEmailEnabled:!1,SiteDesignId:Le,WebTemplate:"SITEPAGEPUBLISHING#0",WebTemplateExtensionId:Le},e),n=Ue({request:m(De("Microsoft.SharePoint.Portal.SPSiteCreationRequest"),t)}),[2,Ke(gt(Be(this.toUrl()),"/_api/SPSiteManager/Create"),n)]}))}))},t.prototype.createModernTeamSite=function(e,t,n,r,i,o,s,u,a){return D(this,void 0,void 0,(function(){return L(this,(function(c){return[2,this.createModernTeamSiteFromProps({alias:t,classification:o,description:i,displayName:e,hubSiteId:u,isPublic:n,lcid:r,owners:s,siteDesignId:a})]}))}))},t.prototype.createModernTeamSiteFromProps=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){return t=Object.assign({},{classification:"",description:"",hubSiteId:Le,isPublic:!0,lcid:1033,owners:[]},e),n={alias:t.alias,displayName:t.displayName,isPublic:t.isPublic,optionalParams:{Classification:t.classification,CreationOptions:{results:["SPSiteLanguage:"+t.lcid,"HubSiteId:"+t.hubSiteId]},Description:t.description,Owners:{results:t.owners}}},t.siteDesignId&&n.optionalParams.CreationOptions.results.push("implicit_formula_292aa8a00786498a87a5ca52d9f4214a_"+t.siteDesignId),[2,Ke(gt(Be(this.toUrl()),"/_api/GroupSiteManager/CreateGroupEx"),Ue(n))]}))}))},x([je("si.getChanges")],t.prototype,"getChanges",null),x([je("si.openWebById")],t.prototype,"openWebById",null),t=x([st("_api/site")],t)}(nt),gt=$e(yt);Reflect.defineProperty(ht.prototype,"site",{configurable:!0,enumerable:!0,get:function(){return gt(this._baseUrl).configure(this._options)}});var vt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n,r,i,o){return void 0===n&&(n=""),void 0===r&&(r="STS"),void 0===i&&(i=1033),void 0===o&&(o=!0),D(this,void 0,void 0,(function(){var s,u;return L(this,(function(a){switch(a.label){case 0:return s=Ue({parameters:m(De("SP.WebCreationInformation"),{Description:n,Language:i,Title:e,Url:t,UseSamePermissionsAsParentSite:o,WebTemplate:r})}),[4,Ke(this.clone(mt,"add"),s)];case 1:return[2,{data:u=a.sent(),web:St(ut(u).replace(/_api\/web\/?/i,""))}]}}))}))},x([je("ws.add")],t.prototype,"add",null),t=x([st("webs")],t)}(et),mt=$e(vt),bt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("w"),t}return U(t,e),Object.defineProperty(t.prototype,"webs",{get:function(){return mt(this)},enumerable:!0,configurable:!0}),t.prototype.getParentWeb=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,He(this.select("ParentWeb/Id").expand("ParentWeb"))];case 1:return[2,(e=t.sent().ParentWeb)?gt(this.parentUrl).openWebById(e.Id):null]}}))}))},t.prototype.getSubwebsFilteredForCurrentUser=function(e,t){void 0===e&&(e=-1),void 0===t&&(t=-1);var n=this.clone(mt,"getSubwebsFilteredForCurrentUser(nWebTemplateFilter="+e+",nConfigurationFilter="+t+")");return je.configure(n,"w.getSubwebsFilteredForCurrentUser")},Object.defineProperty(t.prototype,"allProperties",{get:function(){return je.configure(this.clone(rt,"allproperties"),"w.allprops")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"webinfos",{get:function(){return je.configure(tt(this,"webinfos"),"w.webinfos")},enumerable:!0,configurable:!0}),t.prototype.createBatch=function(){return new dt(this.parentUrl)},t.prototype.update=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return t=Ue(m(De("SP.Web"),e),xe({"X-HTTP-Method":"MERGE"})),[4,Ke(this,t)];case 1:return[2,{data:n.sent(),web:this}]}}))}))},t.prototype.applyTheme=function(e,t,n,r){var i=Ue({backgroundImageUrl:n,colorPaletteUrl:e,fontSchemeUrl:t,shareGenerated:r});return Ke(this.clone(St,"applytheme"),i)},t.prototype.applyWebTemplate=function(e){var t=this.clone(St,"applywebtemplate");return t.concat("(webTemplate='"+ft(e)+"')"),Ke(t)},t.prototype.availableWebTemplates=function(e,t){void 0===e&&(e=1033),void 0===t&&(t=!0);var n="getavailablewebtemplates(lcid="+e+", doincludecrosslanguage="+t+")";return je.configure(tt(this,n),"w.availableWebTemplates")},t.prototype.getChanges=function(e){var t=Ue({query:m(De("SP.ChangeQuery"),e)});return Ke(this.clone(St,"getchanges"),t)},t.prototype.mapToIcon=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=""),He(this.clone(St,"maptoicon(filename='"+ft(e)+"', progid='"+ft(n)+"', size="+t+")"))},t.prototype.getStorageEntity=function(e){return He(this.clone(St,"getStorageEntity('"+ft(e)+"')"))},t.prototype.setStorageEntity=function(e,t,n,r){return void 0===n&&(n=""),void 0===r&&(r=""),Ke(this.clone(St,"setStorageEntity"),Ue({comments:r,description:n,key:e,value:t}))},t.prototype.removeStorageEntity=function(e){return Ke(this.clone(St,"removeStorageEntity('"+ft(e)+"')"))},x([je("w.getParentWeb")],t.prototype,"getParentWeb",null),x([je("w.update")],t.prototype,"update",null),x([je("w.applyTheme")],t.prototype,"applyTheme",null),x([je("w.applyWebTemplate")],t.prototype,"applyWebTemplate",null),x([je("w.getChanges")],t.prototype,"getChanges",null),x([je("w.mapToIcon")],t.prototype,"mapToIcon",null),x([je("w.getStorageEntity")],t.prototype,"getStorageEntity",null),x([je("w.setStorageEntity")],t.prototype,"setStorageEntity",null),x([je("w.removeStorageEntity")],t.prototype,"removeStorageEntity",null),t=x([st("_api/web")],t)}(nt),St=$e(bt);function Tt(e){return{DecodedUrl:e,__metadata:{type:"SP.ResourcePath"}}}var wt,Pt,It=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(Ct(this).concat("('"+e+"')"),"ls.getById")},t.prototype.getByTitle=function(e){return je.configure(Ct(this,"getByTitle('"+ft(e)+"')"),"ls.getByTitle")},t.prototype.add=function(e,t,n,r,i){return void 0===t&&(t=""),void 0===n&&(n=100),void 0===r&&(r=!1),void 0===i&&(i={}),D(this,void 0,void 0,(function(){var o;return L(this,(function(s){switch(s.label){case 0:return o=Object.assign({AllowContentTypes:r,BaseTemplate:n,ContentTypesEnabled:r,Description:t,Title:e},De("SP.List"),i),[4,Ke(this,Ue(o))];case 1:return[2,{data:s.sent(),list:this.getByTitle(o.Title)}]}}))}))},t.prototype.ensure=function(e,t,n,r,i){return void 0===t&&(t=""),void 0===n&&(n=100),void 0===r&&(r=!1),void 0===i&&(i={}),D(this,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:if(this.hasBatch)throw Error("The ensure list method is not supported for use in a batch.");o=m(i,{Title:e,Description:t,ContentTypesEnabled:r},!0),s=this.getByTitle(o.Title),u.label=1;case 1:return u.trys.push([1,4,,6]),[4,s.select("Title")()];case 2:return u.sent(),[4,s.update(o).then((function(e){return e.data}))];case 3:return[2,{created:!1,data:u.sent(),list:this.getByTitle(o.Title)}];case 4:return u.sent(),[4,this.add(e,t,n,r,o).then((function(e){return e.data}))];case 5:return[2,{created:!0,data:u.sent(),list:this.getByTitle(o.Title)}];case 6:return[2]}}))}))},t.prototype.ensureSiteAssetsLibrary=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(_t,"ensuresiteassetslibrary"))];case 1:return e=t.sent(),[2,Ct(ut(e))]}}))}))},t.prototype.ensureSitePagesLibrary=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(_t,"ensuresitepageslibrary"))];case 1:return e=t.sent(),[2,Ct(ut(e))]}}))}))},x([je("ls.add")],t.prototype,"add",null),x([je("ls.ensure")],t.prototype,"ensure",null),x([je("ls.ensureSiteAssetsLibrary")],t.prototype,"ensureSiteAssetsLibrary",null),x([je("ls.ensureSitePagesLibrary")],t.prototype,"ensureSitePagesLibrary",null),t=x([st("lists")],t)}(et),_t=$e(It),Ot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=ot("l"),t}return U(t,e),Object.defineProperty(t.prototype,"effectiveBasePermissions",{get:function(){return je.configure(Ze(this,"EffectiveBasePermissions"),"l.effectiveBasePermissions")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eventReceivers",{get:function(){return je.configure(tt(this,"EventReceivers"),"l.eventReceivers")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relatedFields",{get:function(){return je.configure(Ze(this,"getRelatedFields"),"l.relatedFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"informationRightsManagementSettings",{get:function(){return je.configure(Ze(this,"InformationRightsManagementSettings"),"l.informationRightsManagementSettings")},enumerable:!0,configurable:!0}),t.prototype.update=function(e,t){return void 0===t&&(t="*"),D(this,void 0,void 0,(function(){var n,r,i;return L(this,(function(o){switch(o.label){case 0:return n=Ue(m(De("SP.List"),e),xe({"IF-Match":t,"X-HTTP-Method":"MERGE"})),[4,Ke(this,n)];case 1:return r=o.sent(),i=this,P(e,"Title")&&(i=this.getParent(Ct,this.parentUrl,"getByTitle('"+e.Title+"')")),[2,{data:r,list:i}]}}))}))},t.prototype.getChanges=function(e){return Ke(this.clone(Ct,"getchanges"),Ue({query:m(De("SP.ChangeQuery"),e)}))},t.prototype.getItemsByCAMLQuery=function(e){for(var t=[],n=1;n0&&n.forEach((function(e,t){return i.query.set(t,e)})),Ke(i,r)},t.prototype.renderListFormData=function(e,t,n){return D(this,void 0,void 0,(function(){var r;return L(this,(function(i){switch(i.label){case 0:return[4,Ke(this.clone(Ct,"renderlistformdata(itemid="+e+", formid='"+t+"', mode='"+n+"')"))];case 1:return r=i.sent(),[2,JSON.parse(P(r,"RenderListFormData")?r.RenderListFormData:r)]}}))}))},t.prototype.reserveListItemId=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(Ct,"reservelistitemid"))];case 1:return[2,P(e=t.sent(),"ReserveListItemId")?e.ReserveListItemId:e]}}))}))},t.prototype.getListItemEntityTypeFullName=function(){return this.clone(Ct,null,!1).select("ListItemEntityTypeFullName").get().then((function(e){return e.ListItemEntityTypeFullName}))},t.prototype.addValidateUpdateItemUsingPath=function(e,t,n,r,i){return void 0===n&&(n=!1),D(this,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:return o={FolderPath:Tt(t)},g(i)&&(i.leafName&&(o.LeafName=Tt(i.leafName)),i.objectType&&(o.UnderlyingObjectType=i.objectType)),[4,Ke(this.clone(Ct,"AddValidateUpdateItemUsingPath()"),Ue({bNewDocumentUpdate:n,checkInComment:r,formValues:e,listItemCreateInfo:m(De("SP.ListItemCreationInformationUsingPath"),o)}))];case 1:return[2,P(s=u.sent(),"AddValidateUpdateItemUsingPath")?s.AddValidateUpdateItemUsingPath:s]}}))}))},x([je("l.update")],t.prototype,"update",null),x([je("l.getChanges")],t.prototype,"getChanges",null),x([je("l.CAMLQuery")],t.prototype,"getItemsByCAMLQuery",null),x([je("l.ChangesSinceToken")],t.prototype,"getListItemChangesSinceToken",null),x([je("l.recycle")],t.prototype,"recycle",null),x([je("l.renderListData")],t.prototype,"renderListData",null),x([je("l.AsStream")],t.prototype,"renderListDataAsStream",null),x([je("l.renderListFormData")],t.prototype,"renderListFormData",null),x([je("l.reserveListItemId")],t.prototype,"reserveListItemId",null),x([je("l.getListItemEntityTypeFullName")],t.prototype,"getListItemEntityTypeFullName",null),x([je("l.addValidateUpdateItemUsingPath")],t.prototype,"addValidateUpdateItemUsingPath",null),t}(nt),Ct=$e(Ot);!function(e){e[e.None=0]="None",e[e.ContextInfo=1]="ContextInfo",e[e.ListData=2]="ListData",e[e.ListSchema=4]="ListSchema",e[e.MenuView=8]="MenuView",e[e.ListContentType=16]="ListContentType",e[e.FileSystemItemId=32]="FileSystemItemId",e[e.ClientFormSchema=64]="ClientFormSchema",e[e.QuickLaunch=128]="QuickLaunch",e[e.Spotlight=256]="Spotlight",e[e.Visualization=512]="Visualization",e[e.ViewMetadata=1024]="ViewMetadata",e[e.DisableAutoHyperlink=2048]="DisableAutoHyperlink",e[e.EnableMediaTAUrls=4096]="EnableMediaTAUrls",e[e.ParentInfo=8192]="ParentInfo",e[e.PageContextInfo=16384]="PageContextInfo",e[e.ClientSideComponentManifest=32768]="ClientSideComponentManifest"}(wt||(wt={})),function(e){e[e.Display=1]="Display",e[e.Edit=2]="Edit",e[e.New=3]="New"}(Pt||(Pt={})),ee(bt,"lists",_t),ee(bt,"siteUserInfoList",Ct,"siteuserinfolist"),ee(bt,"defaultDocumentLibrary",Ct,"DefaultDocumentLibrary"),ee(bt,"customListTemplates",tt,"getcustomlisttemplates"),bt.prototype.getList=function(e){return Ct(this,"getList('"+ft(e)+"')")},bt.prototype.getCatalog=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,this.clone(St,"getcatalog("+e+")").select("Id").get()];case 1:return t=n.sent(),[2,Ct(ut(t))]}}))}))};var Et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(At(this).concat("("+e+")"),"is.getById")},t.prototype.getItemByStringId=function(e){return je.configure(At(this.parentUrl,"getItemByStringId('"+e+"')"),"is.getItemByStringId")},t.prototype.skip=function(e,t){return void 0===t&&(t=!1),t?this.query.set("$skiptoken",encodeURIComponent("Paged=TRUE&PagedPrev=TRUE&p_ID="+e)):this.query.set("$skiptoken",encodeURIComponent("Paged=TRUE&p_ID="+e)),this},t.prototype.getPaged=function(){return this.usingParser(new Ft(this))()},t.prototype.getAll=function(e,t){void 0===e&&(e=2e3),void 0===t&&(t="application/json;odata=nometadata"),s.write("Calling items.getAll should be done sparingly. Ensure this is the correct choice. If you are unsure, it is not.",2);var n=Rt(this,"").top(e).configure({headers:{Accept:t}});return this.query.forEach((function(e,t){/^\$select|filter|top|expand$/i.test(t)&&n.query.set(t,e)})),new Promise((function(e,t){var r=[],i=function(n){[].push.apply(r,n.results),n.hasNext?n.getNext().then(i).catch(t):e(r)};n.getPaged().then(i).catch(t)}))},t.prototype.add=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=null),D(this,void 0,void 0,(function(){var n,r,i,o,s=this;return L(this,(function(u){switch(u.label){case 0:return n=this.addBatchDependency(),[4,this.ensureListItemEntityTypeName(t)];case 1:return r=u.sent(),i=Ue(m(De(r),e)),o=Ke(this.clone(Rt,""),i).then((function(e){return{data:e,item:s.getById(e.Id)}})),n(),[2,o]}}))}))},t.prototype.ensureListItemEntityTypeName=function(e){return e?Promise.resolve(e):this.getParent(Ct).getListItemEntityTypeFullName()},x([je("is.getPaged")],t.prototype,"getPaged",null),x([je("is.getAll")],t.prototype,"getAll",null),x([je("is.add")],t.prototype,"add",null),t=x([st("items")],t)}(et),Rt=$e(Et),Nt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=ot("i"),t}return U(t,e),Object.defineProperty(t.prototype,"effectiveBasePermissions",{get:function(){return je.configure(Ze(this,"EffectiveBasePermissions"),"i.effectiveBasePermissions")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"effectiveBasePermissionsForUI",{get:function(){return je.configure(Ze(this,"EffectiveBasePermissionsForUI"),"i.effectiveBasePermissionsForUI")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fieldValuesAsHTML",{get:function(){return je.configure(rt(this,"FieldValuesAsHTML"),"i.fvHTML")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fieldValuesAsText",{get:function(){return je.configure(rt(this,"FieldValuesAsText"),"i.fvText")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fieldValuesForEdit",{get:function(){return je.configure(rt(this,"FieldValuesForEdit"),"i.fvEdit")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"versions",{get:function(){return je.configure(xt(this),"i.versions")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"list",{get:function(){return this.getParent(Ct,this.parentUrl.substr(0,this.parentUrl.lastIndexOf("/")))},enumerable:!0,configurable:!0}),t.prototype.update=function(e,t,n){return void 0===t&&(t="*"),void 0===n&&(n=null),D(this,void 0,void 0,(function(){var r,i,o,s;return L(this,(function(u){switch(u.label){case 0:return r=this.addBatchDependency(),[4,this.ensureListItemEntityTypeName(n)];case 1:return i=u.sent(),o=Ue(m(De(i),e),xe({"IF-Match":t,"X-HTTP-Method":"MERGE"})),r(),s=je.configure(this.clone(At).usingParser(new Bt),"i.update"),[4,Ke(s,o)];case 2:return[2,{data:u.sent(),item:this}]}}))}))},t.prototype.recycle=function(){return Ke(this.clone(At,"recycle"))},t.prototype.getWopiFrameUrl=function(e){return void 0===e&&(e=0),D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return(t=this.clone(At,"getWOPIFrameUrl(@action)")).query.set("@action",e),[4,Ke(t)];case 1:return P(n=r.sent(),"GetWOPIFrameUrl")?[2,n.GetWOPIFrameUrl]:[2,n]}}))}))},t.prototype.validateUpdateListItem=function(e,t){return void 0===t&&(t=!1),Ke(this.clone(At,"validateupdatelistitem"),Ue({formValues:e,bNewDocumentUpdate:t}))},t.prototype.ensureListItemEntityTypeName=function(e){return e?Promise.resolve(e):this.list.getListItemEntityTypeFullName()},x([je("i.recycle")],t.prototype,"recycle",null),x([je("i.getWopiFrameUrl")],t.prototype,"getWopiFrameUrl",null),x([je("i.validateUpdateListItem")],t.prototype,"validateUpdateListItem",null),t}(nt),At=$e(Nt),Ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(Lt(this).concat("("+e+")"),"iv.getById")},t=x([st("versions")],t)}(et),xt=$e(Ut),Dt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=ot("iv"),t}return U(t,e),t}(nt),Lt=$e(Dt),kt=function(){function e(e,t,n){this.parent=e,this.nextUrl=t,this.results=n}return Object.defineProperty(e.prototype,"hasNext",{get:function(){return"string"==typeof this.nextUrl&&this.nextUrl.length>0},enumerable:!0,configurable:!0}),e.prototype.getNext=function(){return this.hasNext?je.configure(Rt(this.nextUrl,null).configureFrom(this.parent),"ip.getNext").getPaged():new Promise((function(e){return e(null)}))},e}(),Ft=function(e){function t(t){var n=e.call(this)||this;return n._parent=t,n}return U(t,e),t.prototype.parse=function(e){var t=this;return new Promise((function(n,r){t.handleError(e,r)&&e.json().then((function(e){var r=P(e,"d")&&P(e.d,"__next")?e.d.__next:e["odata.nextLink"];n(new kt(t._parent,r,t.parseODataJSON(e)))}))}))},t}(ye),Bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.parse=function(e){var t=this;return new Promise((function(n,r){t.handleError(e,r)&&n({"odata.etag":e.headers.get("etag")})}))},t}(ye);ee(Ot,"items",Rt);var jt=function(){function e(e,t,n,r){void 0===t&&(t="config"),void 0===n&&(n="Title"),void 0===r&&(r="Value"),this.web=e,this.listTitle=t,this.keyFieldName=n,this.valueFieldName=r}return e.prototype.getConfiguration=function(){var e=this;return this.web.lists.getByTitle(this.listTitle).items.select(this.keyFieldName,this.valueFieldName)().then((function(t){return t.reduce((function(t,n){return t[n[e.keyFieldName]]=n[e.valueFieldName],t}),{})}))},e.prototype.asCaching=function(e){return void 0===e&&(e="pnp_configcache_splist_"+this.web.toUrl()+"+"+this.listTitle),new J(this,e)},e}(),Mt=(function(){function e(){this.convertToResponse=function(e){var t=new Headers;if(void 0!==e.headers)for(var n in e.headers)e.headers[n]&&t.append(n,e.headers[n]);var r=204===e.statusCode?null:e.body;return new Response(r,{headers:t,status:e.statusCode,statusText:e.statusText})}}e.prototype.fetch=function(e,t){var n=this;if(void 0===SP||void 0===SP.RequestExecutor)throw Error("SP.RequestExecutor is undefined. Load the SP.RequestExecutor.js library (/_layouts/15/SP.RequestExecutor.js) before loading the PnP JS Core library.");var r,i,o=e.substring(0,e.indexOf("/_api")),s=new SP.RequestExecutor(o),u={};if(t.headers&&t.headers instanceof Headers)for(i=(r=t.headers.entries()).next();!i.done;)u[i.value[0]]=i.value[1],i=r.next();else u=t.headers;return new Promise((function(r,i){var o={error:function(e){i(n.convertToResponse(e))},headers:u,method:t.method,success:function(e){r(n.convertToResponse(e))},url:e};o=t.body?m(o,{body:t.body}):m(o,{binaryStringRequestBody:!0}),s.executeAsync(o)}))}}(),function(e,t){return(Mt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)});var qt,Gt,Wt;function Vt(e){return m(De("Collection(SP.KeyValue)"),{results:Object.keys(e).map((function(t){return m(De("SP.KeyValue"),{Key:t,Value:Reflect.get(e,t),ValueType:"Edm.String"})}))})}!function(e){e[e.None=0]="None",e[e.User=1]="User",e[e.DistributionList=2]="DistributionList",e[e.SecurityGroup=4]="SecurityGroup",e[e.SharePointGroup=8]="SharePointGroup",e[e.All=15]="All"}(qt||(qt={})),function(e){e[e.None=0]="None",e[e.UserInfoList=1]="UserInfoList",e[e.Windows=2]="Windows",e[e.MembershipProvider=4]="MembershipProvider",e[e.RoleProvider=8]="RoleProvider",e[e.All=15]="All"}(Gt||(Gt={})),function(e){e[e.Invalid=-1]="Invalid",e[e.DefaultView=0]="DefaultView",e[e.NormalView=1]="NormalView",e[e.DialogView=2]="DialogView",e[e.View=3]="View",e[e.DisplayForm=4]="DisplayForm",e[e.DisplayFormDialog=5]="DisplayFormDialog",e[e.EditForm=6]="EditForm",e[e.EditFormDialog=7]="EditFormDialog",e[e.NewForm=8]="NewForm",e[e.NewFormDialog=9]="NewFormDialog",e[e.SolutionForm=10]="SolutionForm",e[e.PAGE_MAXITEMS=11]="PAGE_MAXITEMS"}(Wt||(Wt={}));var Ht=/["*:<>?/\\|\x00-\x1f\x7f-\x9f]/g,Kt=/["#%*:<>?/\\|\x00-\x1f\x7f-\x9f]/g;function Qt(e,t){return void 0===t&&(t=!1),t?Kt.test(e):Ht.test(e)}function zt(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=!1),n?e.replace(Kt,t):e.replace(Ht,t)}Reflect.defineProperty(ht.prototype,"web",{configurable:!0,enumerable:!0,get:function(){return St(this._baseUrl).configure(this._options)}}),ht.prototype.createBatch=function(){return this.web.createBatch()};var Xt=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function n(){this.constructor=e}Mt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.crossDomainSite=function(e,t){return this._cdImpl(gt,e,t,"site")},t.prototype.crossDomainWeb=function(e,t){return this._cdImpl(St,e,t,"web")},t.prototype._cdImpl=function(e,t,n,r){if(!b(t))throw Error("The addInWebUrl parameter must be an absolute url.");if(!b(n))throw Error("The hostWebUrl parameter must be an absolute url.");var i=e(d(t,"_api/SP.AppContextSite(@target)"),r);return i.query.set("@target","'"+encodeURIComponent(n)+"'"),i.configure(this._options)},t}(ht));var Jt=function(){function e(){}return e.ensure=function(t,n){var r=[e.Beta,e.V1],i=new RegExp(n,"i"),o=r.filter((function(e){return!i.test(e)})).map((function(e){return e.replace(".","\\.")}));return i=new RegExp("/?("+o.join("|")+")/","ig"),t.replace(i,"/"+n+"/")},e.Beta="beta",e.V1="v1.0",e}(),$t=n(1),Yt=function(e){function t(t,n,r){var i=e.call(this,null)||this;return i.clientId=t,i.tenant=n,i.redirectUri=r,i._displayCallback=null,i._loginPromise=null,i}return U(t,e),t.fromSPFxContext=function(e){return new H(e)},t.prototype.fetch=function(t,n){return D(this,void 0,void 0,(function(){var r;return L(this,(function(i){switch(i.label){case 0:if(!b(t))throw Error("You must supply absolute urls to AdalClient.fetch.");return[4,this.getToken(G(t))];case 1:return r=i.sent(),this.token=r,[2,e.prototype.fetch.call(this,t,n)]}}))}))},t.prototype.getToken=function(e){return D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,this.ensureAuthContext()];case 1:return r.sent(),[4,this.login()];case 2:return r.sent(),n=null,t._authContext.acquireToken(e,(function(e,t){if(e)throw Error(e);n=t})),[2,n]}}))}))},t.prototype.ensureAuthContext=function(){var e=this;return new Promise((function(n){null===t._authContext&&(t._authContext=$t.inject({clientId:e.clientId,displayCall:function(t){e._displayCallback&&e._displayCallback(t)},navigateToLoginRequestUrl:!1,redirectUri:e.redirectUri,tenant:e.tenant})),n()}))},t.prototype.login=function(){var e=this;return this._loginPromise?this._loginPromise:(this._loginPromise=new Promise((function(n,r){if(t._authContext.getCachedUser())return n();e._displayCallback=function(i){var o=window.open(i,"login","width=483, height=600");if(!o)return r(Error("Could not open pop-up window for auth. Likely pop-ups are blocked by the browser."));o&&o.focus&&o.focus();var s=window.setInterval((function(){o&&!o.closed&&void 0!==o.closed||window.clearInterval(s);try{-1!==o.document.URL.indexOf(e.redirectUri)&&(window.clearInterval(s),t._authContext.handleWindowCallback(o.location.hash),o.close(),n())}catch(e){r(e)}}),30)},e.ensureAuthContext().then((function(n){t._authContext._loginInProgress=!1,t._authContext.login(),e._displayCallback=null}))})),this._loginPromise)},t._authContext=null,t}(V);var Zt,en,tn,nn=new(function(){function e(){}return Object.defineProperty(e.prototype,"headers",{get:function(){var e=N.get("graph");return null!=e&&void 0!==e.headers?e.headers:{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fetchClientFactory",{get:function(){var e=N.get("graph");if(null!=e&&void 0!==e.fetchClientFactory)return e.fetchClientFactory;if(void 0!==N.spfxContext)return function(){return Yt.fromSPFxContext(N.spfxContext)};throw Error("There is no Graph Client available, either set one using configuraiton or provide a valid SPFx Context using setup.")},enumerable:!0,configurable:!0}),e}()),rn=function(){function e(){this._impl=nn.fetchClientFactory()}return e.prototype.fetch=function(e,t){void 0===t&&(t={});var n=new Headers;M(n,nn.headers),M(n,t.headers),n.has("Content-Type")||n.append("Content-Type","application/json"),n.has("SdkVersion")||n.append("SdkVersion","PnPCoreJS/$$Version$$");var r=m(t,{headers:n});return this.fetchRaw(e,r)},e.prototype.fetchRaw=function(e,t){var n=this;void 0===t&&(t={});var r=new Headers;M(r,t.headers),t=m(t,{headers:r});var i=function(r){n._impl.fetch(e,t).then((function(e){return r.resolve(e)})).catch((function(e){429!==e.status&&503!==e.status&&504!==e.status&&r.reject(e);var t=r.delay;r.delay*=2,r.attempts++,r.retryCount<=r.attempts&&r.reject(e),setTimeout(l(n,i,r),t)}))};return new Promise((function(e,t){var r={attempts:0,delay:100,reject:t,resolve:e,retryCount:7};i.call(n,r)}))},e.prototype.get=function(e,t){void 0===t&&(t={});var n=m(t,{method:"GET"});return this.fetch(e,n)},e.prototype.post=function(e,t){void 0===t&&(t={});var n=m(t,{method:"POST"});return this.fetch(e,n)},e.prototype.patch=function(e,t){void 0===t&&(t={});var n=m(t,{method:"PATCH"});return this.fetch(e,n)},e.prototype.delete=function(e,t){void 0===t&&(t={});var n=m(t,{method:"DELETE"});return this.fetch(e,n)},e}(),on=Ae((function(){return new rn})),sn=function(e){return function(t,n){return D(this,void 0,void 0,(function(){var r,i,o;return L(this,(function(s){return r=we(t.data),i=g(r.batch)?r.batch.addDependency():function(){},o=t.toUrlAndQuery(),q(r.options,n),[2,e(Object.assign({},r,{batchDependency:i,url:o}))]}))}))}},un=function(e,t){return sn(on("GET"))(e,t)},an=function(e,t){return sn(on("POST"))(e,t)},cn=function(e,t){return sn(on("DELETE"))(e,t)},ln=function(e,t){return sn(on("PATCH"))(e,t)},pn=function(e,t){return sn(on("PUT"))(e,t)},dn=function(e){return fe(e)},hn=function(e){function t(t,n){var r=this,i="",o="",s=new Map;return i=d(o="string"==typeof t?t:t.toUrl(),n),r=e.call(this,{parentUrl:o,query:s,url:i})||this,"string"!=typeof t&&r.configureFrom(t),r}return U(t,e),t.prototype.select=function(){for(var e=[],t=0;t0&&this.query.set("$select",e.join(",")),this},t.prototype.expand=function(){for(var e=[],t=0;t0&&this.query.set("$expand",e.join(",")),this},t.prototype.defaultAction=function(e){return un(this,e)},t.prototype.get=function(e){return un(this,e)},t.prototype.toUrlAndQuery=function(){var e=this.toUrl();if(b(e)||(e=d("https://graph.microsoft.com",e)),this.query.size>0){var t=e.indexOf("?")>-1?"&":"?";e+=""+t+Array.from(this.query).map((function(e){return e[0]+"="+e[1]})).join("&")}return e},t.prototype.getParent=function(e,t,n){return void 0===t&&(t=this.parentUrl),new e(t,n)},t.prototype.clone=function(t,n,r){return void 0===r&&(r=!0),e.prototype.cloneTo.call(this,t(this,n),{includeBatch:r})},t.prototype.setEndpoint=function(e){return this.data.url=Jt.ensure(this.data.url,e),this},t}(Pe),fn=(dn(hn),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.filter=function(e){return this.query.set("$filter",e),this},t.prototype.orderBy=function(e,t){void 0===t&&(t=!0);var n="$orderby",r=this.query.has(n)?this.query.get(n).split(","):[];return r.push(e+" "+(t?"asc":"desc")),this.query.set(n,r.join(",")),this},t.prototype.top=function(e){return this.query.set("$top",e.toString()),this},t.prototype.skip=function(e){return this.query.set("$skip",e.toString()),this},t.prototype.skipToken=function(e){return this.query.set("$skiptoken",e),this},Object.defineProperty(t.prototype,"count",{get:function(){return this.query.set("$count","true"),this},enumerable:!0,configurable:!0}),t}(hn)),yn=dn(fn),gn=(dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.search=function(e){return this.query.set("$search",e),this},t}(fn)),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(hn)),vn=dn(gn),mn=function(e){function t(t,n){void 0===t&&(t="https://graph.microsoft.com/v1.0/$batch"),void 0===n&&(n=20);var r=e.call(this)||this;return r.batchUrl=t,r.maxRequests=n,r}return U(t,e),t.makeUrlRelative=function(e){if(!b(e))return e;var t=e.indexOf(".com/v1.0/");return t<0?(t=e.indexOf(".com/beta/"))>-1?e.substr(t+10):e:e.substr(t+9)},t.formatRequests=function(e){var t=this;return e.map((function(e,n){var r={id:""+ ++n,method:e.method,url:t.makeUrlRelative(e.url)},i={};return void 0!==nn.headers&&null!==nn.headers&&(i=m(i,nn.headers)),void 0!==e.options&&(void 0!==e.options.headers&&null!==e.options.headers&&(i=m(i,e.options.headers)),"GET"!==e.method&&(i["Content-Type"]="application/json"),void 0!==e.options.body&&null!==e.options.body&&(r=m(r,{body:JSON.parse(e.options.body)}))),r=m(r,{headers:i})}))},t.parseResponse=function(e,t){return new Promise((function(n,r){if(P(t,"error"))return r(Error("Error Porcessing Batch: ("+t.error.code+") "+t.error.message));for(var i=new Array(e.length).fill(null),o=0;o0?[5,e()]:[3,3];case 2:return"break"===l.sent()?[3,3]:[3,1];case 3:return i||o(),[2]}}))}))}))},t}($),bn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.createBatch=function(){return new mn},t.prototype.setup=function(e){!function(e){N.assign(e)}(e)},t}(hn),Sn=new bn("v1.0"),Tn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getByName=function(e){if(/\%#/.test(e))throw Error("For file names containing % or # please use web.getFileByServerRelativePath");return je.configure(In(this).concat("('"+ft(e)+"')"),"fis.getByName")},t.prototype.add=function(e,t,n){return void 0===n&&(n=!0),D(this,void 0,void 0,(function(){return L(this,(function(r){switch(r.label){case 0:return[4,Ke(wn(this,"add(overwrite="+n+",url='"+ft(e)+"')"),{body:t})];case 1:return[2,{data:r.sent(),file:this.getByName(e)}]}}))}))},t.prototype.addUsingPath=function(e,t,n){return void 0===n&&(n={Overwrite:!1}),D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=["AddUsingPath(decodedurl='"+ft(e)+"'"],n&&(n.Overwrite&&r.push(",Overwrite=true"),n.AutoCheckoutOnInvalidData&&r.push(",AutoCheckoutOnInvalidData=true"),S(n.XorHash)||r.push(",XorHash="+ft(n.XorHash))),r.push(")"),[4,Ke(wn(this,r.join("")),{body:t})];case 1:return[2,{data:i=o.sent(),file:In(ut(i))}]}}))}))},t.prototype.addChunked=function(e,t,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=10485760),D(this,void 0,void 0,(function(){return L(this,(function(o){switch(o.label){case 0:return[4,Ke(this.clone(wn,"add(overwrite="+r+",url='"+ft(e)+"')",!1))];case 1:return o.sent(),[4,this.getByName(e).setContentChunked(t,n,i)];case 2:return[2,o.sent()]}}))}))},t.prototype.addTemplateFile=function(e,t){return D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,Ke(this.clone(wn,"addTemplateFile(urloffile='"+ft(e)+"',templatefiletype="+t+")",!1))];case 1:return[2,{data:n=r.sent(),file:In(ut(n))}]}}))}))},x([je("fis.add")],t.prototype,"add",null),x([je("fis.addUsingPath")],t.prototype,"addUsingPath",null),x([je("fis.addChunked")],t.prototype,"addChunked",null),x([je("fis.addTemplateFile")],t.prototype,"addTemplateFile",null),t=x([st("files")],t)}(et),wn=$e(Tn),Pn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=ot("fi"),t}return U(t,e),Object.defineProperty(t.prototype,"listItemAllFields",{get:function(){return je.configure(rt(this,"listItemAllFields"),"fi.listItemAllFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"versions",{get:function(){return je.configure(On(this),"fi.versions")},enumerable:!0,configurable:!0}),t.prototype.approve=function(e){return void 0===e&&(e=""),Ke(this.clone(In,"approve(comment='"+ft(e)+"')"))},t.prototype.cancelUpload=function(e){return Ke(this.clone(In,"cancelUpload(uploadId=guid'"+e+"')",!1))},t.prototype.checkin=function(e,t){if(void 0===e&&(e=""),void 0===t&&(t=Zt.Major),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return Ke(this.clone(In,"checkin(comment='"+ft(e)+"',checkintype="+t+")"))},t.prototype.checkout=function(){return Ke(this.clone(In,"checkout"))},t.prototype.copyTo=function(e,t){return void 0===t&&(t=!0),Ke(this.clone(In,"copyTo(strnewurl='"+ft(e)+"',boverwrite="+t+")"))},t.prototype.copyByPath=function(e,t,n){return void 0===n&&(n=!1),D(this,void 0,void 0,(function(){var r,i,o,s,u;return L(this,(function(a){switch(a.label){case 0:return[4,this.select("ServerRelativeUrl")()];case 1:return r=a.sent(),i=r.ServerRelativeUrl,o=r["odata.id"],s=Be(o),u=s.replace("://","___").split("/")[0].replace("___","://"),[4,Ke(In(s,"/_api/SP.MoveCopyUtil.CopyFileByPath(overwrite=@a1)?@a1="+t),Ue({destPath:Tt(b(e)?e:""+u+e),options:{KeepBoth:n,ResetAuthorAndCreatedOnCopy:!0,ShouldBypassSharedLocks:!0,__metadata:{type:"SP.MoveCopyOptions"}},srcPath:Tt(b(i)?i:""+u+i)}))];case 2:return a.sent(),[2]}}))}))},t.prototype.deny=function(e){if(void 0===e&&(e=""),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return Ke(this.clone(In,"deny(comment='"+ft(e)+"')"))},t.prototype.moveTo=function(e,t){return void 0===t&&(t=en.Overwrite),Ke(this.clone(In,"moveTo(newurl='"+ft(e)+"',flags="+t+")"))},t.prototype.moveByPath=function(e,t,n){return void 0===n&&(n=!1),D(this,void 0,void 0,(function(){var r,i,o,s,u;return L(this,(function(a){switch(a.label){case 0:return[4,this.select("ServerRelativeUrl")()];case 1:return r=a.sent(),i=r.ServerRelativeUrl,o=r["odata.id"],s=Be(o),u=s.replace("://","___").split("/")[0].replace("___","://"),[4,Ke(In(s,"/_api/SP.MoveCopyUtil.MoveFileByPath(overwrite=@a1)?@a1="+t),Ue({destPath:Tt(b(e)?e:""+u+e),options:{KeepBoth:n,ResetAuthorAndCreatedOnCopy:!1,ShouldBypassSharedLocks:!0,__metadata:{type:"SP.MoveCopyOptions"}},srcPath:Tt(b(i)?i:""+u+i)}))];case 2:return a.sent(),[2]}}))}))},t.prototype.publish=function(e){if(void 0===e&&(e=""),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return Ke(this.clone(In,"publish(comment='"+ft(e)+"')"))},t.prototype.recycle=function(){return Ke(this.clone(In,"recycle"))},t.prototype.undoCheckout=function(){return Ke(this.clone(In,"undoCheckout"))},t.prototype.unpublish=function(e){if(void 0===e&&(e=""),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return Ke(this.clone(In,"unpublish(comment='"+ft(e)+"')"))},t.prototype.getText=function(){return this.clone(In,"$value",!1).usingParser(new ge)(xe({binaryStringResponseBody:"true"}))},t.prototype.getBlob=function(){return this.clone(In,"$value",!1).usingParser(new ve)(xe({binaryStringResponseBody:"true"}))},t.prototype.getBuffer=function(){return this.clone(In,"$value",!1).usingParser(new be)(xe({binaryStringResponseBody:"true"}))},t.prototype.getJSON=function(){return this.clone(In,"$value",!1).usingParser(new me)(xe({binaryStringResponseBody:"true"}))},t.prototype.setContent=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(In,"$value",!1),{body:e,headers:{"X-HTTP-Method":"PUT"}})];case 1:return t.sent(),[2,In(this)]}}))}))},t.prototype.getItem=function(){for(var e=[],t=0;t0))throw Error("Did not find the app with id "+e+" in the appcatalog.");n=s[0].Id,a.label=4;case 4:return u=je.configure(Nn(r,"_api/web/tenantappcatalog/SyncSolutionToTeams(id="+n+")"),"ac.syncSolutionToTeams"),[4,Ke(u,{})];case 5:return[2,a.sent()]}}))}))},t.prototype.add=function(e,t,n){return void 0===n&&(n=!0),D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=je.configure(Nn(Be(this.toUrl()),"_api/web/tenantappcatalog/add(overwrite="+n+",url='"+e+"')"),"ac.add"),[4,Ke(r,{body:t,headers:{binaryStringRequestBody:"true"}})];case 1:return[2,{data:i=o.sent(),file:In(ut(i))}]}}))}))},t}(et),Nn=$e(Rn),An=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.deploy=function(e){return void 0===e&&(e=!1),this.do("Deploy("+e+")")},t.prototype.retract=function(){return this.do("Retract")},t.prototype.install=function(){return this.do("Install")},t.prototype.uninstall=function(){return this.do("Uninstall")},t.prototype.upgrade=function(){return this.do("Upgrade")},t.prototype.remove=function(){return this.do("Remove")},t.prototype.do=function(e){return Ke(this.clone(Un,e))},x([je("app.deploy")],t.prototype,"deploy",null),x([je("app.retract")],t.prototype,"retract",null),x([je("app.install")],t.prototype,"install",null),x([je("app.uninstall")],t.prototype,"uninstall",null),x([je("app.upgrade")],t.prototype,"upgrade",null),x([je("app.remove")],t.prototype,"remove",null),t}(nt),Un=$e(An);bt.prototype.getAppCatalog=function(e){return Nn(e||this)},ht.prototype.getTenantAppCatalogWeb=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,Ze("/","_api/SP_TenantSettings_Current")()];case 1:return e=t.sent(),[2,St(e.CorporateCatalogUrl)]}}))}))};var xn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getByName=function(e){var t=je.configure(kn(this),"ats.getByName");return t.concat("('"+e+"')"),t},t.prototype.add=function(e,t){return D(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(Dn,"add(FileName='"+e+"')",!1),{body:t})];case 1:return[2,{data:n.sent(),file:this.getByName(e)}]}}))}))},t.prototype.addMultiple=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:t=0,n.label=1;case 1:return t-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"authorByLine",{get:function(){return v(this.json.AuthorByline)&&this.json.AuthorByline.length>0?this.json.AuthorByline[0]:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"verticalSection",{get:function(){return this.hasVerticalSection?this.addVerticalSection():null},enumerable:!0,configurable:!0}),t.prototype.addSection=function(){var e=new $n(this,Fn(this.sections),1);return this.sections.push(e),e},t.prototype.addVerticalSection=function(){var e=this.sections.findIndex((function(e){return 2===e.layoutIndex}));if(e>-1)return this.sections[e];var t=new $n(this,Fn(this.sections),2);return this.sections.push(t),t},t.prototype.fromJSON=function(e){this.json=e;var t=JSON.parse(e.CanvasContent1),n=JSON.parse(e.LayoutWebpartsContent);return n&&n.length>0&&(this._layoutPart=n[0]),this.setControls(t),this},t.prototype.load=function(){return D(this,void 0,void 0,(function(){var e,t;return L(this,(function(n){switch(n.label){case 0:return[4,this.getItem("Id","CommentsDisabled")];case 1:return e=n.sent(),[4,Ze(this,"_api/sitepages/pages("+e.Id+")")()];case 2:return t=n.sent(),this.commentsDisabled=e.CommentsDisabled,[2,this.fromJSON(t)]}}))}))},t.prototype.save=function(e){return void 0===e&&(e=!0),D(this,void 0,void 0,(function(){var t,n,r,i,o,s,u,a,c,l,p,d,h,f;return L(this,(function(y){switch(y.label){case 0:if(null===this.json.Id)throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create");return this._bannerImageDirty?(b(t=this.json.BannerImageUrl)&&(t=t.replace(/^https?:\/\/[a-z0-9\.]*?\.[a-z]{2,3}\//i,"/")),n=gt(Be(this.toUrl())),r=St(Be(this.toUrl())),i=r.getFileByServerRelativePath(t),o="",s="",u="",a="",c="",l=r.createBatch(),n.select("Id","Url").inBatch(l)().then((function(e){return o=e.Id})),r.select("Id","Url").inBatch(l)().then((function(e){s=e.Id,c=e.Url})),i.listItemAllFields.select("UniqueId","ParentList/Id").expand("ParentList").inBatch(l)().then((function(e){u=e.UniqueId,a=e.ParentList.Id})),[4,l.execute()]):[3,2];case 1:y.sent(),(p=Ze(c,"_layouts/15/getpreview.ashx")).query.set("guidSite",""+o),p.query.set("guidWeb",""+s),p.query.set("guidFile",""+u),this.bannerImageUrl=p.toUrlAndQuery(),g(this._layoutPart.serverProcessedContent)||(this._layoutPart.serverProcessedContent={}),this._layoutPart.serverProcessedContent.imageSources={imageSource:t},g(this._layoutPart.serverProcessedContent.customMetadata)||(this._layoutPart.serverProcessedContent.customMetadata={}),this._layoutPart.serverProcessedContent.customMetadata.imageSource={listId:a,siteId:o,uniqueId:u,webId:s},this._layoutPart.properties.webId=s,this._layoutPart.properties.siteId=o,this._layoutPart.properties.listId=a,this._layoutPart.properties.uniqueId=u,y.label=2;case 2:return this.json.IsPageCheckedOutToCurrentUser?[3,4]:[4,Ke(Kn(this,"_api/sitepages/pages("+this.json.Id+")/checkoutpage"))];case 3:y.sent(),y.label=4;case 4:return d=Object.assign(De("SP.Publishing.SitePage"),{AuthorByline:this.json.AuthorByline||[],BannerImageUrl:this.bannerImageUrl,CanvasContent1:this.getCanvasContent1(),LayoutWebpartsContent:this.getLayoutWebpartsContent(),Title:this.title,TopicHeader:this.topicHeader}),h=Kn(this,"_api/sitepages/pages("+this.json.Id+")/savepage"),[4,Ke(h,xe({"if-match":"*"},Ue(d)))];case 5:return y.sent(),f=!0,e?[4,Ke(Kn(this,"_api/sitepages/pages("+this.json.Id+")/publish"))]:[3,7];case 6:(f=y.sent())&&(this.json.IsPageCheckedOutToCurrentUser=!1),y.label=7;case 7:return this._bannerImageDirty=!1,[2,f]}}))}))},t.prototype.discardPageCheckout=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:if(null===this.json.Id)throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create");return[4,Ke(Kn(this,"_api/sitepages/pages("+this.json.Id+")/discardPage"),Ue(De("SP.Publishing.SitePage")))];case 1:return e=t.sent(),this.fromJSON(e),[2]}}))}))},t.prototype.promoteToNews=function(){return D(this,void 0,void 0,(function(){return L(this,(function(e){return[2,this.promoteNewsImpl("promoteToNews")]}))}))},t.prototype.findControlById=function(e){return this.findControl((function(t){return t.id===e}))},t.prototype.findControl=function(e){for(var t=0;t3?{}:{zoneEmphasis:e}},t.prototype.promoteNewsImpl=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:if(null===this.json.Id)throw Error("The id for this page is null.");return S(this.json.VersionInfo.LastVersionCreatedBy)&&new Date(this.json.VersionInfo.LastVersionCreated).getFullYear()<2e3?[4,this.save(!0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[4,Ke(Kn(this,"_api/sitepages/pages("+this.json.Id+")/"+e),Ue(De("SP.Publishing.SitePage")))];case 3:return[2,t.sent()]}}))}))},t.prototype.mergePartToTree=function(e,t){var n,r,i,o=null,s=12,u=0,a=0,c=1;t&&(P(t,"zoneIndex")&&(a=t.zoneIndex),P(t,"sectionIndex")&&(u=t.sectionIndex),P(t,"sectionFactor")&&(s=t.sectionFactor),P(t,"layoutIndex")&&(c=t.layoutIndex));var l=null!=(i=null===(r=null===(n=e.data)||void 0===n?void 0:n.emphasis)||void 0===r?void 0:r.zoneEmphasis)?i:0,p=this.getOrCreateSection(a,c,l),d=p.columns.filter((function(e){return e.order===u}));o=d.length<1?p.addColumn(s,c):d[0],e.column=o,o.addControl(e)},t.prototype.mergeColumnToTree=function(e){var t=P(e.data,"position")&&P(e.data.position,"zoneIndex")?e.data.position.zoneIndex:0,n=P(e.data,"position")&&P(e.data.position,"layoutIndex")?e.data.position.layoutIndex:1,r=this.getOrCreateSection(t,n,e.data.emphasis.zoneEmphasis||0);e.section=r,r.columns.push(e)},t.prototype.getOrCreateSection=function(e,t,n){var r=null,i=this.sections.filter((function(n){return n.order===e&&n.layoutIndex===t}));return i.length<1?((r=2===t?this.addVerticalSection():this.addSection()).order=e,r.emphasis=n):r=i[0],r},x([je("csp.load")],t.prototype,"load",null),x([je("csp.save")],t.prototype,"save",null),x([je("csp.discardPageCheckout")],t.prototype,"discardPageCheckout",null),x([je("csp.promoteToNews")],t.prototype,"promoteToNews",null),x([je("csp.copy")],t.prototype,"copy",null),x([je("csp.getItem")],t.prototype,"getItem",null),t}(Ye),zn=function(e,t,n,r,i,o){return void 0===r&&(r=!1),void 0===i&&(i=[]),void 0===o&&(o=!1),fe(Qn)(e,t,n,r,i,o)},Xn=function(e){return D(void 0,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,e.getItem()];case 1:return t=n.sent(),[2,zn(Be(e.toUrl()),"",{Id:t.Id},!0).configureFrom(e).load()]}}))}))},Jn=function(e,t,n,r,i){return void 0===r&&(r="Article"),void 0===i&&(i=0),D(void 0,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:return t=t.replace(/\.aspx$/i,""),[4,Ke(Kn(e,"_api/sitepages/pages"),Ue(Object.assign(De("SP.Publishing.SitePage"),{PageLayoutType:r,PromotedState:i})))];case 1:return o=u.sent(),(s=zn(e,"",o)).title=t,[4,s.save(!1)];case 2:return u.sent(),s.title=n,[2,s]}}))}))},$n=function(){function e(e,t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i=0),this.page=e,this.columns=r,this._emphasis=i,this._memId=f(),this._order=t,this._layoutIndex=n}return Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=e;for(var t=0;t")||(e="

"+e+"

"),this.data.innerHTML=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"order",{get:function(){return this.data.position.controlIndex},set:function(e){this.data.position.controlIndex=e},enumerable:!0,configurable:!0}),t.prototype.onColumnChange=function(e){this.data.position.sectionFactor=e.factor,this.data.position.controlIndex=Fn(e.controls),this.data.position.zoneIndex=e.data.position.zoneIndex,this.data.position.sectionIndex=e.order,this.data.position.layoutIndex=e.data.position.layoutIndex},t.Default={addedFromPersistedData:!1,anchorComponentId:"",controlType:4,displayMode:2,editorType:"CKEditor",emphasis:{},id:"",innerHTML:"",position:{controlIndex:1,layoutIndex:1,sectionFactor:12,sectionIndex:1,zoneIndex:1}},t}(Zn),tr=function(e){function t(n){return void 0===n&&(n=JSON.parse(JSON.stringify(t.Default))),e.call(this,n)||this}return U(t,e),t.fromComponentDef=function(e){var n=new t;return n.import(e),n},Object.defineProperty(t.prototype,"title",{get:function(){return this.data.webPartData.title},set:function(e){this.data.webPartData.title=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this.data.webPartData.description},set:function(e){this.data.webPartData.description=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"order",{get:function(){return this.data.position.controlIndex},set:function(e){this.data.position.controlIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.data.reservedHeight},set:function(e){this.data.reservedHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.data.reservedWidth},set:function(e){this.data.reservedWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataVersion",{get:function(){return this.data.webPartData.dataVersion},set:function(e){this.data.webPartData.dataVersion=e},enumerable:!0,configurable:!0}),t.prototype.setProperties=function(e){return this.data.webPartData.properties=m(this.data.webPartData.properties,e),this},t.prototype.getProperties=function(){return this.data.webPartData.properties},t.prototype.onColumnChange=function(e){this.data.position.sectionFactor=e.factor,this.data.position.controlIndex=Fn(e.controls),this.data.position.zoneIndex=e.data.position.zoneIndex,this.data.position.sectionIndex=e.data.position.sectionIndex,this.data.position.layoutIndex=e.data.position.layoutIndex},t.prototype.import=function(e){var t=f(),n=e.Id.replace(/^\{|\}$/g,"").toLowerCase(),r=JSON.parse(e.Manifest).preconfiguredEntries[0];this.setData(Object.assign({},this.data,{id:t,webPartData:{dataVersion:"1.0",description:r.description.default,id:n,instanceId:t,properties:r.properties,title:r.title.default},webPartId:n}))},t.Default={addedFromPersistedData:!1,controlType:3,displayMode:2,emphasis:{},id:null,position:{controlIndex:1,layoutIndex:1,sectionFactor:12,sectionIndex:1,zoneIndex:1},reservedHeight:500,reservedWidth:500,webPartData:null,webPartId:null},t}(Zn);bt.prototype.getClientsideWebParts=function(){return this.clone(tt,"GetClientSideWebParts")()},bt.prototype.addClientsidePage=function(e,t,n,r){return void 0===t&&(t=e.replace(/\.[^/.]+$/,"")),Jn(this,e,t,n,r)},bt.prototype.loadClientsidePage=function(e){return Xn(this.getFileByServerRelativePath(e))};var nr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getByName=function(e){return je.configure(or(this).concat("('"+ft(e)+"')"),"fs.getByName")},t.prototype.add=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(rr,"add('"+ft(e)+"')"))];case 1:return[2,{data:t.sent(),folder:this.getByName(e)}]}}))}))},t.prototype.addUsingPath=function(e,t){return void 0===t&&(t=!1),D(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(rr,"addUsingPath(DecodedUrl='"+ft(e)+"',overwrite="+t+")"))];case 1:return[2,{data:n.sent(),folder:or(Be(this.toUrl()),"_api/web/getFolderByServerRelativePath(decodedUrl='"+ft(e)+"')")}]}}))}))},x([je("fs.add")],t.prototype,"add",null),x([je("fs.addUsingPath")],t.prototype,"addUsingPath",null),t=x([st("folders")],t)}(et),rr=$e(nr),ir=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=ot("f"),t.update=t._update("SP.Folder",(function(e){return{data:e,folder:t}})),t}return U(t,e),Object.defineProperty(t.prototype,"contentTypeOrder",{get:function(){return je.configure(tt(this,"contentTypeOrder"),"f.contentTypeOrder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"folders",{get:function(){return rr(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listItemAllFields",{get:function(){return je.configure(rt(this,"listItemAllFields"),"f.listItemAllFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentFolder",{get:function(){return je.configure(or(this,"parentFolder"),"f.parentFolder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return je.configure(rt(this,"properties"),"f.properties")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverRelativeUrl",{get:function(){return je.configure(Ze(this,"serverRelativeUrl"),"f.serverRelativeUrl")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uniqueContentTypeOrder",{get:function(){return je.configure(tt(this,"uniqueContentTypeOrder"),"f.uniqueContentTypeOrder")},enumerable:!0,configurable:!0}),t.prototype.recycle=function(){return Ke(this.clone(or,"recycle"))},t.prototype.getItem=function(){for(var e=[],t=0;t/gi),[2,(null===u?[]:u.map((function(e){return e.trim()}))).map((function(e){var t=/(.*?)<\/DefaultValue>/gi.exec(e);return t.length<1?(s.write("Could not parse default column value from '"+e+"'",2),null):{name:t[2],path:decodeURIComponent(t[1]),value:t[3]}})).filter((function(e){return null!==e}))]}}))}))},Ot.prototype.setDefaultColumnValues=function(e){return D(this,void 0,void 0,(function(){var t,n,r,i,o,s,u;return L(this,(function(a){switch(a.label){case 0:return[4,tt(this,"fields").select("InternalName","TypeAsString").filter("Hidden ne true")()];case 1:return t=a.sent(),n=e.map((function(e){var n=t.findIndex((function(t){return t.InternalName===e.name}));if(n<0)throw Error("Field '"+e.name+"' does not exist in the list. Please check the internal field name. Failed to set defaults.");var r=t[n],i="";switch(r.TypeAsString){case"Boolean":case"Currency":case"Text":case"DateTime":case"Number":case"Choice":case"User":if(v(e.value))throw Error("The type '"+r.TypeAsString+"' does not support multiple values.");i=""+e.value;break;case"MultiChoice":i=v(e.value)?e.value.map((function(e){return""+e})).join(";"):""+e.value;break;case"UserMulti":i=v(e.value)?e.value.map((function(e){return""+e})).join(";#"):""+e.value;break;case"Taxonomy":if(v(e.value))throw Error("The type '"+r.TypeAsString+"' does not support multiple values.");i=e.value.wssId+";#"+e.value.termName+"|"+e.value.termId;break;case"TaxonomyMulti":v(e.value)&&(i=e.value.map((function(e){return e.wssId+";#"+e.termName+"|"+e.termId})).join(";#")),i=e.value.wssId+";#"+e.value.termName+"|"+e.value.termId}return''+i+""})),r=""+n.join("")+"",[4,this.rootFolder.select("ServerRelativePath")()];case 2:return i=a.sent(),[4,this.select("ParentWeb/Url").expand("ParentWeb")()];case 3:return o=a.sent(),s=d("/",i.ServerRelativePath.DecodedUrl,"Forms"),u=d(o.ParentWeb.Url,"_api/web","getFolderByServerRelativePath(decodedUrl='"+ft(s)+"')","files"),[4,Ke(or(u,"add(overwrite=true,url='client_LocationBasedDefaults.html')"),{body:r})];case 4:return a.sent(),[4,this.eventReceivers.filter("ReceiverName eq 'LocationBasedMetadataDefaultsReceiver ItemAdded'").select("ReceiverId")()];case 5:return a.sent().length<1?[4,Ke(Ct(this.eventReceivers,"add"),Ue({eventReceiverCreationInformation:{EventType:10001,ReceiverAssembly:"Microsoft.Office.DocumentManagement, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c",ReceiverClass:"Microsoft.Office.DocumentManagement.LocationBasedMetadataDefaultsReceiver",ReceiverName:"LocationBasedMetadataDefaultsReceiver ItemAdded",SequenceNumber:1e3,Synchronization:1}}))]:[3,7];case 6:a.sent(),a.label=7;case 7:return[2]}}))}))},ir.prototype.getDefaultColumnValues=function(){return D(this,void 0,void 0,(function(){var e,t,n;return L(this,(function(r){switch(r.label){case 0:return[4,or(this,"Properties").select("vti_x005f_listname")()];case 1:return e=r.sent(),[4,this.select("ServerRelativePath")()];case 2:return t=r.sent().ServerRelativePath,n=St(Be(ut(e))),[4,n.lists.getById(e.vti_x005f_listname).getDefaultColumnValues()];case 3:return[2,r.sent().filter((function(e){return e.path.toLowerCase()===t.DecodedUrl.toLowerCase()}))]}}))}))},ir.prototype.setDefaultColumnValues=function(e,t){return void 0===t&&(t=!0),D(this,void 0,void 0,(function(){var n,r,i,o,s,u;return L(this,(function(a){switch(a.label){case 0:return[4,or(this,"Properties").select("vti_x005f_listname")()];case 1:return n=a.sent(),r=St(Be(ut(n))),i=r.lists.getById(n.vti_x005f_listname),[4,this.select("ServerRelativePath")()];case 2:return o=a.sent().ServerRelativePath.DecodedUrl,[4,i.getDefaultColumnValues()];case 3:return s=a.sent(),u=t?s:s.filter((function(e){return e.path!==o})),e.forEach((function(e){var t=u.find((function(t){return t.name===e.name&&t.path===o}));t?t.value=e.value:u.push({name:e.name,path:o,value:e.value})})),[4,i.setDefaultColumnValues(u)];case 4:return a.sent(),[2]}}))}))},ir.prototype.clearDefaultColumnValues=function(){return D(this,void 0,void 0,(function(){return L(this,(function(e){switch(e.label){case 0:return[4,this.setDefaultColumnValues([],!1)];case 1:return e.sent(),[2]}}))}))};var sr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.addAvailableContentType=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(ur,"addAvailableContentType"),Ue({contentTypeId:e}))];case 1:return t=n.sent(),[2,{contentType:this.getById(t.id),data:t}]}}))}))},t.prototype.getById=function(e){return je.configure(cr(this).concat("('"+e+"')"),"cts.getById")},t.prototype.add=function(e,t,n,r,i){return void 0===n&&(n=""),void 0===r&&(r="Custom Content Types"),void 0===i&&(i={}),D(this,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:return o=Ue(Object.assign(De("SP.ContentType"),{Description:n,Group:r,Id:{StringValue:e},Name:t},i)),[4,Ke(this,o)];case 1:return s=u.sent(),[2,{contentType:this.getById(s.id),data:s}]}}))}))},x([je("cts.addAvailableContentType")],t.prototype,"addAvailableContentType",null),x([je("cts.add")],t.prototype,"add",null),t=x([st("contenttypes")],t)}(et),ur=$e(sr),ar=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("ct"),t}return U(t,e),Object.defineProperty(t.prototype,"fieldLinks",{get:function(){return je.configure(pr(this),"ct.fieldLinks")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fields",{get:function(){return je.configure(tt(this,"fields"),"ct.fields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return je.configure(cr(this,"parent"),"ct.parent")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"workflowAssociations",{get:function(){return je.configure(tt(this,"workflowAssociations"),"ct.workflowAssociations")},enumerable:!0,configurable:!0}),t}(nt),cr=$e(ar),lr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(hr(this).concat("(guid'"+e+"')"),"fls.getById")},t=x([st("fieldlinks")],t)}(et),pr=$e(lr),dr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(nt),hr=$e(dr);ee(bt,"contentTypes",ur),ee(Nt,"contentType",cr,"ContentType"),ee(Ot,"contentTypes",ur);var fr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t){return void 0===t&&(t=!1),D(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(yr,"add"),Ue({featdefScope:0,featureId:e,force:t}))];case 1:return[2,{data:n.sent(),feature:this.getById(e)}]}}))}))},t.prototype.getById=function(e){var t=vr(this);return t.concat("('"+e+"')"),je.configure(t,"fes.getById")},t.prototype.remove=function(e,t){return void 0===t&&(t=!1),Ke(this.clone(yr,"remove"),Ue({featureId:e,force:t}))},x([je("fes.add")],t.prototype,"add",null),x([je("fes.remove")],t.prototype,"remove",null),t=x([st("features")],t)}(et),yr=$e(fr),gr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.deactivate=function(e){return void 0===e&&(e=!1),D(this,void 0,void 0,(function(){var t,n,r;return L(this,(function(i){switch(i.label){case 0:return t=this.addBatchDependency(),[4,vr(this).select("DefinitionId")()];case 1:return n=i.sent(),r=this.getParent(yr,this.parentUrl,"",this.batch).remove(n.DefinitionId,e),t(),[2,r]}}))}))},x([je("fe.deactivate")],t.prototype,"deactivate",null),t}(nt),vr=$e(gr);ee(yt,"features",yr),ee(bt,"features",yr);var mr,br,Sr,Tr,wr,Pr,Ir,_r,Or=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(Rr(this).concat("('"+e+"')"),"fs.getById")},t.prototype.getByTitle=function(e){return je.configure(Rr(this,"getByTitle('"+e+"')"),"fs.getByTitle")},t.prototype.getByInternalNameOrTitle=function(e){return je.configure(Rr(this,"getByInternalNameOrTitle('"+e+"')"),"fs.getByInternalNameOrTitle")},t.prototype.createFieldAsXml=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return"string"==typeof e&&(e={SchemaXml:e}),t=Ue({parameters:m(De("SP.XmlSchemaFieldCreationInformation"),e)}),[4,Ke(this.clone(Cr,"createfieldasxml"),t)];case 1:return[2,{data:n=r.sent(),field:this.getById(n.Id)}]}}))}))},t.prototype.add=function(e,t,n){return D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=Ue(Object.assign(De(t),{Title:e},n)),je.isTagged(this)||je.configure(this,"fs.add"),[4,Ke(this.clone(Cr,null),r)];case 1:return[2,{data:i=o.sent(),field:this.getById(i.Id)}]}}))}))},t.prototype.addText=function(e,t,n){void 0===t&&(t=255);var r={FieldTypeKind:2,MaxLength:t};return this.add(e,"SP.FieldText",m(r,n))},t.prototype.addCalculated=function(e,t,n,r,i){void 0===r&&(r=mr.Text);var o={DateFormat:n,FieldTypeKind:17,Formula:t,OutputType:r};return this.add(e,"SP.FieldCalculated",m(o,i))},t.prototype.addDateTime=function(e,t,n,r,i){void 0===t&&(t=br.DateOnly),void 0===n&&(n=wr.Gregorian),void 0===r&&(r=Sr.Unspecified);var o={DateTimeCalendarType:n,DisplayFormat:t,FieldTypeKind:4,FriendlyDisplayFormat:r};return this.add(e,"SP.FieldDateTime",m(o,i))},t.prototype.addNumber=function(e,t,n,r){var i={FieldTypeKind:9};return void 0!==t&&(i=m({MinimumValue:t},i)),void 0!==n&&(i=m({MaximumValue:n},i)),this.add(e,"SP.FieldNumber",m(i,r))},t.prototype.addCurrency=function(e,t,n,r,i){void 0===r&&(r=1033);var o={CurrencyLocaleId:r,FieldTypeKind:10};return void 0!==t&&(o=m({MinimumValue:t},o)),void 0!==n&&(o=m({MaximumValue:n},o)),this.add(e,"SP.FieldCurrency",m(o,i))},t.prototype.addMultilineText=function(e,t,n,r,i,o,s){void 0===t&&(t=6),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===o&&(o=!0);var u={AllowHyperlink:o,AppendOnly:i,FieldTypeKind:3,NumberOfLines:t,RestrictedMode:r,RichText:n};return this.add(e,"SP.FieldMultiLineText",m(u,s))},t.prototype.addUrl=function(e,t,n){void 0===t&&(t=Pr.Hyperlink);var r={DisplayFormat:t,FieldTypeKind:11};return this.add(e,"SP.FieldUrl",m(r,n))},t.prototype.addUser=function(e,t,n){var r={FieldTypeKind:20,SelectionMode:t};return this.add(e,"SP.FieldUser",m(r,n))},t.prototype.addLookup=function(e,t,n,r){return D(this,void 0,void 0,(function(){var i,o,s;return L(this,(function(u){switch(u.label){case 0:return i=m({FieldTypeKind:7,LookupFieldName:n,LookupListId:t,Title:e},r),o=Ue({parameters:m(De("SP.FieldCreationInformation"),i)}),[4,Ke(this.clone(Cr,"addfield"),o)];case 1:return[2,{data:s=u.sent(),field:this.getById(s.Id)}]}}))}))},t.prototype.addChoice=function(e,t,n,r,i){void 0===n&&(n=_r.Dropdown);var o={Choices:{results:t},EditFormat:n,FieldTypeKind:6,FillInChoice:r};return this.add(e,"SP.FieldChoice",m(o,i))},t.prototype.addMultiChoice=function(e,t,n,r){var i={Choices:{results:t},FieldTypeKind:15,FillInChoice:n};return this.add(e,"SP.FieldMultiChoice",m(i,r))},t.prototype.addBoolean=function(e,t){return this.add(e,"SP.Field",m({FieldTypeKind:8},t))},t.prototype.addDependentLookupField=function(e,t,n){return D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r="adddependentlookupfield(displayName='"+e+"', primarylookupfieldid='"+t+"', showfield='"+n+"')",[4,Ke(this.clone(Cr,r))];case 1:return[2,{data:i=o.sent(),field:this.getById(i.Id)}]}}))}))},t.prototype.addLocation=function(e,t){return this.add(e,"SP.FieldLocation",m({FieldTypeKind:33},t))},x([je("fs.createFieldAsXml")],t.prototype,"createFieldAsXml",null),x([je("fs.addText")],t.prototype,"addText",null),x([je("fs.addCalculated")],t.prototype,"addCalculated",null),x([je("fs.addDateTime")],t.prototype,"addDateTime",null),x([je("fs.addNumber")],t.prototype,"addNumber",null),x([je("fs.addCurrency")],t.prototype,"addCurrency",null),x([je("fs.addMultilineText")],t.prototype,"addMultilineText",null),x([je("fs.addUrl")],t.prototype,"addUrl",null),x([je("fs.addUser")],t.prototype,"addUser",null),x([je("fs.addLookup")],t.prototype,"addLookup",null),x([je("fs.addChoice")],t.prototype,"addChoice",null),x([je("fs.addMultiChoice")],t.prototype,"addMultiChoice",null),x([je("fs.addBoolean")],t.prototype,"addBoolean",null),x([je("fs.addDependentLookupField")],t.prototype,"addDependentLookupField",null),x([je("fs.addLocation")],t.prototype,"addLocation",null),t=x([st("fields")],t)}(et),Cr=$e(Or),Er=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.update=function(e,t){return void 0===t&&(t="SP.Field"),D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return n=Ue(m(De(t),e),xe({"X-HTTP-Method":"MERGE"})),[4,Ke(this,n)];case 1:return[2,{data:r.sent(),field:this}]}}))}))},t.prototype.setShowInDisplayForm=function(e){return Ke(this.clone(Rr,"setshowindisplayform("+e+")"))},t.prototype.setShowInEditForm=function(e){return Ke(this.clone(Rr,"setshowineditform("+e+")"))},t.prototype.setShowInNewForm=function(e){return Ke(this.clone(Rr,"setshowinnewform("+e+")"))},x([je("f.update")],t.prototype,"update",null),x([je("f.setShowInDisplayForm")],t.prototype,"setShowInDisplayForm",null),x([je("f.setShowInEditForm")],t.prototype,"setShowInEditForm",null),x([je("f.setShowInNewForm")],t.prototype,"setShowInNewForm",null),t}(nt),Rr=$e(Er);!function(e){e[e.Invalid=0]="Invalid",e[e.Integer=1]="Integer",e[e.Text=2]="Text",e[e.Note=3]="Note",e[e.DateTime=4]="DateTime",e[e.Counter=5]="Counter",e[e.Choice=6]="Choice",e[e.Lookup=7]="Lookup",e[e.Boolean=8]="Boolean",e[e.Number=9]="Number",e[e.Currency=10]="Currency",e[e.URL=11]="URL",e[e.Computed=12]="Computed",e[e.Threading=13]="Threading",e[e.Guid=14]="Guid",e[e.MultiChoice=15]="MultiChoice",e[e.GridChoice=16]="GridChoice",e[e.Calculated=17]="Calculated",e[e.File=18]="File",e[e.Attachments=19]="Attachments",e[e.User=20]="User",e[e.Recurrence=21]="Recurrence",e[e.CrossProjectLink=22]="CrossProjectLink",e[e.ModStat=23]="ModStat",e[e.Error=24]="Error",e[e.ContentTypeId=25]="ContentTypeId",e[e.PageSeparator=26]="PageSeparator",e[e.ThreadIndex=27]="ThreadIndex",e[e.WorkflowStatus=28]="WorkflowStatus",e[e.AllDayEvent=29]="AllDayEvent",e[e.WorkflowEventType=30]="WorkflowEventType"}(mr||(mr={})),function(e){e[e.DateOnly=0]="DateOnly",e[e.DateTime=1]="DateTime"}(br||(br={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.Disabled=1]="Disabled",e[e.Relative=2]="Relative"}(Sr||(Sr={})),function(e){e[e.DefaultValue=0]="DefaultValue",e[e.AddToDefaultContentType=1]="AddToDefaultContentType",e[e.AddToNoContentType=2]="AddToNoContentType",e[e.AddToAllContentTypes=4]="AddToAllContentTypes",e[e.AddFieldInternalNameHint=8]="AddFieldInternalNameHint",e[e.AddFieldToDefaultView=16]="AddFieldToDefaultView",e[e.AddFieldCheckDisplayName=32]="AddFieldCheckDisplayName"}(Tr||(Tr={})),function(e){e[e.Gregorian=1]="Gregorian",e[e.Japan=3]="Japan",e[e.Taiwan=4]="Taiwan",e[e.Korea=5]="Korea",e[e.Hijri=6]="Hijri",e[e.Thai=7]="Thai",e[e.Hebrew=8]="Hebrew",e[e.GregorianMEFrench=9]="GregorianMEFrench",e[e.GregorianArabic=10]="GregorianArabic",e[e.GregorianXLITEnglish=11]="GregorianXLITEnglish",e[e.GregorianXLITFrench=12]="GregorianXLITFrench",e[e.KoreaJapanLunar=14]="KoreaJapanLunar",e[e.ChineseLunar=15]="ChineseLunar",e[e.SakaEra=16]="SakaEra",e[e.UmAlQura=23]="UmAlQura"}(wr||(wr={})),function(e){e[e.Hyperlink=0]="Hyperlink",e[e.Image=1]="Image"}(Pr||(Pr={})),function(e){e[e.PeopleAndGroups=1]="PeopleAndGroups",e[e.PeopleOnly=0]="PeopleOnly"}(Ir||(Ir={})),function(e){e[e.Dropdown=0]="Dropdown",e[e.RadioButtons=1]="RadioButtons"}(_r||(_r={})),ee(bt,"fields",Cr),ee(bt,"availablefields",Cr,"availablefields"),ee(Ot,"fields",Cr),ee(ir,"files",wn),ee(Nt,"file",In,"file"),ee(Nt,"folder",or,"folder"),ee(Ot,"rootFolder",or,"rootFolder"),ee(bt,"folders",rr),ee(bt,"rootFolder",or,"rootFolder"),bt.prototype.getFolderByServerRelativeUrl=function(e){return or(this,"getFolderByServerRelativeUrl('"+ft(e)+"')")},bt.prototype.getFolderByServerRelativePath=function(e){return or(this,"getFolderByServerRelativePath(decodedUrl='"+ft(e)+"')")},bt.prototype.getFolderById=function(e){return or(this,"getFolderById('"+e+"')")};var Nr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(xr(this).concat("('"+e+"')"),"fos.getById")},t=x([st("forms")],t)}(et),Ar=$e(Nr),Ur=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(nt),xr=$e(Ur);ee(Ot,"forms",Ar,"forms");var Dr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(Fr(this,"GetById?hubSiteId='"+e+"'"),"hss.getById")},t=x([st("_api/hubsites")],t)}(et),Lr=$e(Dr),kr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getSite=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,this.select("SiteUrl")()];case 1:return e=t.sent(),[2,gt(e.SiteUrl)]}}))}))},x([je("hs.getSite")],t.prototype,"getSite",null),t}(nt),Fr=$e(kr);yt.prototype.joinHubSite=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(gt,"joinHubSite('"+e+"')"))];case 1:return t.sent(),[2]}}))}))},yt.prototype.registerHubSite=function(){return D(this,void 0,void 0,(function(){return L(this,(function(e){switch(e.label){case 0:return[4,Ke(this.clone(gt,"registerHubSite"))];case 1:return e.sent(),[2]}}))}))},yt.prototype.unRegisterHubSite=function(){return D(this,void 0,void 0,(function(){return L(this,(function(e){switch(e.label){case 0:return[4,Ke(this.clone(gt,"unRegisterHubSite"))];case 1:return e.sent(),[2]}}))}))},bt.prototype.hubSiteData=function(e){return void 0===e&&(e=!1),D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,this.clone(St,"hubSiteData("+e+")")()];case 1:return"string"==typeof(t=n.sent())?[2,JSON.parse(t)]:[2,t]}}))}))},bt.prototype.syncHubSiteTheme=function(){return Ke(this.clone(St,"syncHubSiteTheme"))},Reflect.defineProperty(ht.prototype,"hubSites",{configurable:!0,enumerable:!0,get:function(){return Lr(this._baseUrl).configure(this._options)}});var Br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(qr(this).concat("("+e+")"),"nns.getById")},t.prototype.add=function(e,t,n){return void 0===n&&(n=!0),D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=Ue(m(De("SP.NavigationNode"),{IsVisible:n,Title:e,Url:t})),[4,Ke(this.clone(jr,null),r)];case 1:return[2,{data:i=o.sent(),node:this.getById(i.Id)}]}}))}))},t.prototype.moveAfter=function(e,t){var n=Ue({nodeId:e,previousNodeId:t});return Ke(this.clone(jr,"MoveAfter"),n)},x([je("nns.add")],t.prototype,"add",null),x([je("nns.moveAfter")],t.prototype,"moveAfter",null),t}(et),jr=$e(Br),Mr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("nn"),t}return U(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return je.configure(jr(this,"children"),"nn.children")},enumerable:!0,configurable:!0}),t.prototype.update=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return t=Ue(m(De("SP.NavigationNode"),e),xe({"X-HTTP-Method":"MERGE"})),[4,Ke(this,t)];case 1:return[2,{data:n.sent(),node:this}]}}))}))},x([je("nn.update")],t.prototype,"update",null),t}(nt),qr=$e(Mr),Gr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"quicklaunch",{get:function(){return je.configure(jr(this,"quicklaunch"),"n.quicklaunch")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topNavigationBar",{get:function(){return je.configure(jr(this,"topnavigationbar"),"n.topnavigationbar")},enumerable:!0,configurable:!0}),t=x([st("navigation")],t)}(Ye),Wr=$e(Gr),Vr=function(e){function t(t){return void 0===t&&(t=null),e.call(this,"_api/navigation",t)||this}return U(t,e),t.prototype.getMenuState=function(e,t,n,r){return void 0===e&&(e=null),void 0===t&&(t=10),void 0===n&&(n=null),void 0===r&&(r=null),Ke(Hr("MenuState"),Ue({customProperties:r,depth:t,mapProviderName:n,menuNodeKey:e}))},t.prototype.getMenuNodeKey=function(e,t){return void 0===t&&(t=null),Ke(Hr("MenuNodeKey"),Ue({currentUrl:e,mapProviderName:t}))},x([je("ns.getMenuState")],t.prototype,"getMenuState",null),x([je("ns.getMenuNodeKey")],t.prototype,"getMenuNodeKey",null),t}(Ye),Hr=function(e){return new Vr(e)};ee(bt,"navigation",Wr),Reflect.defineProperty(ht.prototype,"navigation",{configurable:!0,enumerable:!0,get:function(){return Hr().configure(this._options)}});var Kr,Qr=function(e){function t(t,n){void 0===n&&(n="_api/sp.userprofiles.peoplemanager");var r=e.call(this,t,n)||this;return r.clientPeoplePickerQuery=new $r(t).configureFrom(r),r.profileLoader=new Xr(t).configureFrom(r),r}return U(t,e),Object.defineProperty(t.prototype,"editProfileLink",{get:function(){return this.clone(zr,"EditProfileLink").get()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isMyPeopleListPublic",{get:function(){return this.clone(zr,"IsMyPeopleListPublic").get()},enumerable:!0,configurable:!0}),t.prototype.amIFollowedBy=function(e){var t=this.clone(zr,"amifollowedby(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),t.get()},t.prototype.amIFollowing=function(e){var t=this.clone(zr,"amifollowing(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),t.get()},t.prototype.getFollowedTags=function(e){return void 0===e&&(e=20),this.clone(zr,"getfollowedtags("+e+")").get()},t.prototype.getFollowersFor=function(e){var t=this.clone(zr,"getfollowersfor(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),t.get()},Object.defineProperty(t.prototype,"myFollowers",{get:function(){return tt(this,"getmyfollowers")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"myProperties",{get:function(){return new t(this,"getmyproperties")},enumerable:!0,configurable:!0}),t.prototype.getPeopleFollowedBy=function(e){var t=this.clone(zr,"getpeoplefollowedby(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),t.get()},t.prototype.getPropertiesFor=function(e){var t=this.clone(zr,"getpropertiesfor(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),t.get()},Object.defineProperty(t.prototype,"trendingTags",{get:function(){var e=this.clone(zr,null);return e.concat(".gettrendingtags"),e.get()},enumerable:!0,configurable:!0}),t.prototype.getUserProfilePropertyFor=function(e,t){var n=this.clone(zr,"getuserprofilepropertyfor(accountname=@v, propertyname='"+t+"')");return n.query.set("@v","'"+encodeURIComponent(e)+"'"),n.get()},t.prototype.hideSuggestion=function(e){var t=this.clone(zr,"hidesuggestion(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),Ke(t)},t.prototype.isFollowing=function(e,t){var n=this.clone(zr,null);return n.concat(".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)"),n.query.set("@v","'"+encodeURIComponent(e)+"'"),n.query.set("@y","'"+encodeURIComponent(t)+"'"),n.get()},t.prototype.setMyProfilePic=function(e){var n=null,r=new FileReader;r.onload=function(e){return n=e.target.result},r.readAsArrayBuffer(e);var i=new t(this,"setmyprofilepicture");return Ke(i,Ue(String.fromCharCode.apply(null,new Uint16Array(n))))},t.prototype.setSingleValueProfileProperty=function(e,t,n){return Ke(this.clone(zr,"SetSingleValueProfileProperty"),Ue({accountName:e,propertyName:t,propertyValue:n}))},t.prototype.setMultiValuedProfileProperty=function(e,t,n){return Ke(this.clone(zr,"SetMultiValuedProfileProperty"),Ue({accountName:e,propertyName:t,propertyValues:n}))},t.prototype.createPersonalSiteEnqueueBulk=function(){for(var e=[],t=0;t0?o:gi(r)]=t.length>1?t:t[0],n};var i=yi.has(r)?yi.get(r):gi(r);return e.query[i]=!0,n}})}var mi,bi,Si,Ti=/_api\/search\/postquery$/i,wi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.execute=function(e){return D(this,void 0,void 0,(function(){var t,n,r,i;return L(this,(function(o){switch(o.label){case 0:return t=this.parseQuery(e),n=Ue({request:m(De("Microsoft.Office.Server.Search.REST.SearchRequest"),Object.assign({},t,{HitHighlightedProperties:this.fixArrProp(t.HitHighlightedProperties),Properties:this.fixArrProp(t.Properties),RefinementFilters:this.fixArrProp(t.RefinementFilters),ReorderingRules:this.fixArrProp(t.ReorderingRules),SelectProperties:this.fixArrProp(t.SelectProperties),SortList:this.fixArrProp(t.SortList)}))}),this.data.useCaching&&(this._forceCaching=!0,r="PnPjs.SearchWithCaching("+I(n.body)+")",g(this.data.cachingOptions)?Ti.test(this.data.cachingOptions.key)&&(this.data.cachingOptions.key=r):this.data.cachingOptions=new Y(r)),[4,Ke(this,n)];case 1:return i=o.sent(),[2,new Ii(i,this.toUrl(),t)]}}))}))},t.prototype.fixArrProp=function(e){return void 0===e?{results:[]}:{results:v(e)?e:[e]}},t.prototype.parseQuery=function(e){return"string"==typeof e?{Querytext:e}:e.toSearchQuery?e.toSearchQuery():e},x([je("se.execute")],t.prototype,"execute",null),t=x([st("_api/search/postquery")],t)}(nt),Pi=function(e,t){return void 0===t&&(t={}),function(n){return new wi(e).configure(t).execute(n)}},Ii=function(){function e(e,t,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),this._url=t,this._query=n,this._raw=r,this._primary=i,this._url=this._url.replace(Ti,""),this._raw=e.postquery?e.postquery:e}return Object.defineProperty(e.prototype,"ElapsedTime",{get:function(){return this.RawSearchResults.ElapsedTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"RowCount",{get:function(){return this.RawSearchResults.PrimaryQueryResult.RelevantResults.RowCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"TotalRows",{get:function(){return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRows},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"TotalRowsIncludingDuplicates",{get:function(){return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"RawSearchResults",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"PrimarySearchResults",{get:function(){return null===this._primary&&(this._primary=this.formatSearchResults(this._raw.PrimaryQueryResult.RelevantResults.Table.Rows)),this._primary},enumerable:!0,configurable:!0}),e.prototype.getPage=function(e,t){if(this.TotalRowsthis.TotalRows?Promise.resolve(null):Pi(this._url)(r)},e.prototype.formatSearchResults=function(e){var t,n,r=new Array,i=e.results?e.results:e;try{for(var o=k(i),s=o.next();!s.done;s=o.next()){var u=s.value,a=u.Cells.results?u.Cells.results:u.Cells;r.push(a.reduce((function(e,t){return Reflect.defineProperty(e,t.Key,{configurable:!1,enumerable:!0,value:t.Value,writable:!1}),e}),{}))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},e}(),_i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.execute=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return this.mapQueryToQueryString(e),[4,this.get()];case 1:return t=r.sent(),[2,{PeopleNames:(n=P(t,"suggest")?function(e){return t.suggest[e].results}:function(e){return t[e]})("PeopleNames"),PersonalResults:n("PersonalResults"),Queries:n("Queries")}]}}))}))},t.prototype.mapQueryToQueryString=function(e){var t=this;this.query.set("querytext","'"+e.querytext+"'");var n,r=(n=e,function(e){return function(r){P(n,e)&&t.query.set(r,n[e].toString())}});r("count")("inumberofquerysuggestions"),r("personalCount")("inumberofresultsuggestions"),r("preQuery")("fprequerysuggestions"),r("hitHighlighting")("fhithighlighting"),r("capitalize")("fcapitalizefirstletters"),r("culture")("culture"),r("stemming")("enablestemming"),r("includePeople")("showpeoplenamesuggestions"),r("queryRules")("enablequeryrules"),r("prefixMatch")("fprefixmatchallterms")},x([je("su.execute")],t.prototype,"execute",null),t=x([st("_api/search/suggest")],t)}(nt),Oi=function(e,t){return void 0===t&&(t={}),function(n){return new _i(e).configure(t).execute(n)}};!function(e){e[e.Ascending=0]="Ascending",e[e.Descending=1]="Descending",e[e.FQLFormula=2]="FQLFormula"}(mi||(mi={})),function(e){e[e.ResultContainsKeyword=0]="ResultContainsKeyword",e[e.TitleContainsKeyword=1]="TitleContainsKeyword",e[e.TitleMatchesKeyword=2]="TitleMatchesKeyword",e[e.UrlStartsWith=3]="UrlStartsWith",e[e.UrlExactlyMatches=4]="UrlExactlyMatches",e[e.ContentTypeIs=5]="ContentTypeIs",e[e.FileExtensionMatches=6]="FileExtensionMatches",e[e.ResultHasTag=7]="ResultHasTag",e[e.ManualCondition=8]="ManualCondition"}(bi||(bi={})),function(e){e[e.None=0]="None",e[e.StringType=1]="StringType",e[e.Int32Type=2]="Int32Type",e[e.BooleanType=3]="BooleanType",e[e.StringArrayType=4]="StringArrayType",e[e.UnSupportedType=5]="UnSupportedType"}(Si||(Si={}));var Ci=function(){function e(){}return e.Documents="e7ec8cee-ded8-43c9-beb5-436b54b31e84",e.ItemsMatchingContentType="5dc9f503-801e-4ced-8a2c-5d1237132419",e.ItemsMatchingTag="e1327b9c-2b8c-4b23-99c9-3730cb29c3f7",e.ItemsRelatedToCurrentUser="48fec42e-4a92-48ce-8363-c2703a40e67d",e.ItemsWithSameKeywordAsThisItem="5c069288-1d17-454a-8ac6-9c642a065f48",e.LocalPeopleResults="b09a7990-05ea-4af9-81ef-edfab16c4e31",e.LocalReportsAndDataResults="203fba36-2763-4060-9931-911ac8c0583b",e.LocalSharePointResults="8413cd39-2156-4e00-b54d-11efd9abdb89",e.LocalVideoResults="78b793ce-7956-4669-aa3b-451fc5defebf",e.Pages="5e34578e-4d08-4edc-8bf3-002acf3cdbcc",e.Pictures="38403c8c-3975-41a8-826e-717f2d41568a",e.Popular="97c71db1-58ce-4891-8b64-585bc2326c12",e.RecentlyChangedItems="ba63bbae-fa9c-42c0-b027-9a878f16557c",e.RecommendedItems="ec675252-14fa-4fbe-84dd-8d098ed74181",e.Wiki="9479bf85-e257-4318-b5a8-81a180f5faa1",e}();ht.prototype.search=function(e){return Pi(this._baseUrl,this._options)(e)},ht.prototype.searchWithCaching=function(e,t){return new wi(this._baseUrl,null).configure(this._options).usingCaching(t).execute(e)},ht.prototype.searchSuggest=function(e){return Oi(this._baseUrl,this._options)("string"==typeof e?{querytext:e}:e)};var Ei,Ri,Ni,Ai,Ui,xi,Di,Li=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(Bi(this,"getById("+e+")"),"sus.getById")},t.prototype.getByEmail=function(e){return je.configure(Bi(this,"getByEmail('"+e+"')"),"sus.getByEmail")},t.prototype.getByLoginName=function(e){return je.configure(Bi(this).concat("('!@v::"+encodeURIComponent(e)+"')"),"sus.getByLoginName")},t.prototype.removeById=function(e){return Ke(this.clone(ki,"removeById("+e+")"))},t.prototype.removeByLoginName=function(e){var t=this.clone(ki,"removeByLoginName(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),Ke(t)},t.prototype.add=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this,Ue(m(De("SP.User"),{LoginName:e})))];case 1:return t.sent(),[2,this.getByLoginName(e)]}}))}))},x([je("sus.remId")],t.prototype,"removeById",null),x([je("sus.remLoginName")],t.prototype,"removeByLoginName",null),x([je("sus.add")],t.prototype,"add",null),t=x([st("siteusers")],t)}(et),ki=$e(Li),Fi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("su"),t.update=t._update("SP.User",(function(e){return{data:e,user:t}})),t}return U(t,e),Object.defineProperty(t.prototype,"groups",{get:function(){return je.configure(Mi(this,"groups"),"su.groups")},enumerable:!0,configurable:!0}),t}(nt),Bi=$e(Fi),ji=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(Gi(this).concat("("+e+")"),"sgs.getById")},t.prototype.add=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return t=Ue(m(De("SP.Group"),e)),[4,Ke(je.configure(this,"sgs.add"),t)];case 1:return[2,{data:n=r.sent(),group:this.getById(n.Id)}]}}))}))},t.prototype.getByName=function(e){return je.configure(Gi(this,"getByName('"+e+"')"),"sgs.getByName")},t.prototype.removeById=function(e){return Ke(this.clone(Mi,"removeById('"+e+"')"))},t.prototype.removeByLoginName=function(e){return Ke(this.clone(Mi,"removeByLoginName('"+e+"')"))},x([je("sgs.removeById")],t.prototype,"removeById",null),x([je("sgs.removeByLoginName")],t.prototype,"removeByLoginName",null),t=x([st("sitegroups")],t)}(et),Mi=$e(ji),qi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.update=t._update("SP.Group",(function(e,n){var r=t;return P(n,"Title")&&(r=t.getParent(Gi,t.parentUrl,"getByName('"+n.Title+"')")),{data:e,group:r}})),t}return U(t,e),Object.defineProperty(t.prototype,"users",{get:function(){return je.configure(ki(this,"users"),"sg.users")},enumerable:!0,configurable:!0}),t.prototype.setUserAsOwner=function(e){return Ke(this.clone(Gi,"SetUserAsOwner("+e+")"))},x([je("sg.setUserAsOwner")],t.prototype,"setUserAsOwner",null),t}(nt),Gi=$e(qi),Wi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return Ki(this).concat("("+e+")")},t.prototype.add=function(e,t){return D(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(Vi,"addroleassignment(principalid="+e+", roledefid="+t+")"))];case 1:return n.sent(),[2]}}))}))},t.prototype.remove=function(e,t){return D(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(Vi,"removeroleassignment(principalid="+e+", roledefid="+t+")"))];case 1:return n.sent(),[2]}}))}))},t=x([st("roleassignments")],t)}(et),Vi=$e(Wi),Hi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("ra"),t}return U(t,e),Object.defineProperty(t.prototype,"groups",{get:function(){return je.configure(Mi(this,"groups"),"ra.groups")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bindings",{get:function(){return tt(this,"roledefinitionbindings")},enumerable:!0,configurable:!0}),t}(nt),Ki=$e(Hi),Qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return Ji(this,"getById("+e+")")},t.prototype.getByName=function(e){return Ji(this,"getbyname('"+e+"')")},t.prototype.getByType=function(e){return Ji(this,"getbytype("+e+")")},t.prototype.add=function(e,t,n,r){return D(this,void 0,void 0,(function(){var i,o;return L(this,(function(s){switch(s.label){case 0:return i=Ue({BasePermissions:m(De("SP.BasePermissions"),r),Description:t,Name:e,Order:n,__metadata:{type:"SP.RoleDefinition"}}),[4,Ke(this,i)];case 1:return[2,{data:o=s.sent(),definition:this.getById(o.Id)}]}}))}))},t=x([st("roledefinitions")],t)}(et),zi=$e(Qi),Xi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("rd"),t}return U(t,e),t.prototype.update=function(e){return D(this,void 0,void 0,(function(){var t,n,r,i,o;return L(this,(function(s){switch(s.label){case 0:return void 0!==P(e,(t=["BasePermissions"])[0])&&(e[t[0]]=m(De("SP."+t[0]),e[t[0]])),n=Ue(m(De("SP.RoleDefinition"),e),xe({"X-HTTP-Method":"MERGE"})),[4,Ke(this,n)];case 1:return r=s.sent(),i=this,P(e,"Name")&&(o=this.getParent(zi,this.parentUrl,""),i=o.getByName(e.Name)),[2,{data:r,definition:i}]}}))}))},t}(nt),Ji=$e(Xi);function $i(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return(t=this.clone(rt,"getUserEffectivePermissions(@user)")).query.set("@user","'"+encodeURIComponent(e)+"'"),[4,t.get()];case 1:return[2,P(n=r.sent(),"GetUserEffectivePermissions")?n.GetUserEffectivePermissions:n]}}))}))}function Yi(){return D(this,void 0,void 0,(function(){return L(this,(function(e){return[2,this.clone(Ze,"EffectiveBasePermissions").get().then((function(e){return P(e,"EffectiveBasePermissions")?e.EffectiveBasePermissions:e}))]}))}))}function Zi(e,t){return void 0===e&&(e=!1),void 0===t&&(t=!1),D(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(Ze,"breakroleinheritance(copyroleassignments="+e+", clearsubscopes="+t+")"))];case 1:return n.sent(),[2]}}))}))}function eo(){return D(this,void 0,void 0,(function(){return L(this,(function(e){switch(e.label){case 0:return[4,Ke(this.clone(Ze,"resetroleinheritance"))];case 1:return e.sent(),[2]}}))}))}function to(e,t){return D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,$i.call(this,e)];case 1:return n=r.sent(),[2,this.hasPermissions(n,t)]}}))}))}function no(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,Yi.call(this)];case 1:return t=n.sent(),[2,this.hasPermissions(t,e)]}}))}))}function ro(e,t){if(!t)return!0;if(t===Ei.FullMask)return 32767==(32767&e.High)&&65535===e.Low;var n=1;return(t-=1)>=0&&t<32?(n<<=t,0!=(e.Low&n)):t>=32&&t<64&&(n<<=t-32,0!=(e.High&n))}function io(e,t,n){return void 0===n&&(n=!1),D(this,void 0,void 0,(function(){var r,i,o;return L(this,(function(s){switch(s.label){case 0:return n?[2,fo(e,t)]:[4,yo((t=m(t,{group:null,includeAnonymousLinkInEmail:!1,propagateAcl:!1,useSimplifiedRoles:!0},!0)).role,t.group)];case 1:return r=s.sent(),Array.isArray(t.loginNames)||(t.loginNames=[t.loginNames]),i=w(t.loginNames.map((function(e){return{Key:e}}))),o={peoplePickerInput:i,roleValue:r,url:t.url},void 0!==t.emailData&&null!==t.emailData&&(o=m(o,{emailBody:t.emailData.body,emailSubject:void 0!==t.emailData.subject?t.emailData.subject:"Shared with you.",sendEmail:!0})),[2,fo(e,o)]}}))}))}function oo(e,t){void 0===t&&(t=null);var n=null!==t?t.toISOString():null,r=je.configure(this.clone(rt,"shareLink"),"sh.getShareLink");return Ke(r,Ue({request:{createLink:!0,emailData:null,settings:{expiration:n,linkKind:e}}}))}function so(e){var t=je.configure(this.clone(rt,"checkPermissions"),"sh.checkPermissions");return Ke(t,Ue({recipients:e}))}function uo(e,t){void 0===e&&(e=null),void 0===t&&(t=[]);var n=je.configure(this.clone(rt,"getSharingInformation"),"sh.getSharingInformation");return Ke(n.expand.apply(n,B(t)),Ue({request:e}))}function ao(e){void 0===e&&(e=!0);var t=je.configure(this.clone(rt,"getObjectSharingSettings"),"sh.getObjectSharingSettings");return Ke(t,Ue({useSimplifiedRoles:e}))}function co(){return Ke(je.configure(this.clone(rt,"unshareObject"),"sh.unshareObject"))}function lo(e){return Ke(je.configure(this.clone(rt,"deleteLinkByKind"),"sh.deleteLinkByKind"),Ue({linkKind:e}))}function po(e,t){return void 0===t&&(t=Le),Ke(je.configure(this.clone(rt,"unshareLink"),"sh.unshareLink"),Ue({linkKind:e,shareId:t}))}function ho(e,t,n,r,i,o){return void 0===r&&(r=!1),void 0===i&&(i=!1),D(this,void 0,void 0,(function(){var s,u,a,c;return L(this,(function(l){switch(l.label){case 0:return Array.isArray(t)||(t=[t]),s=w(t.map((function(e){return{Key:e}}))),u=n===Ri.Edit?Di.Contributor:Di.Reader,[4,tt("_api/web","roledefinitions").select("Id").filter("RoleTypeKind eq "+u).get()];case 1:if(a=l.sent(),!Array.isArray(a)||a.length<1)throw Error("Could not locate a role defintion with RoleTypeKind "+u);return c={includeAnonymousLinkInEmail:r,peoplePickerInput:s,propagateAcl:i,roleValue:"role:"+a[0].Id,useSimplifiedRoles:!0},void 0!==o&&(c=m(c,{emailBody:o.body,emailSubject:void 0!==o.subject?o.subject:"",sendEmail:!0})),[2,Ke(je.configure(e.clone(rt,"shareObject"),"sh.shareWith"),Ue(c))]}}))}))}function fo(e,t){var n=je.configure(St(Be(e.toUrl()),"/_api/SP.Web.ShareObject"),"sh.sendShareObjectRequest");return Ke(n.expand("UsersWithAccessRequests","GroupsSharedWith"),Ue(t))}function yo(e,t){return D(this,void 0,void 0,(function(){var n,r;return L(this,(function(i){switch(i.label){case 0:if(null==t)return[3,7];switch(t){case Di.Contributor:return[3,1];case Di.Reader:case Di.Guest:return[3,3]}return[3,5];case 1:return[4,St("_api/web","associatedmembergroup").select("Id")()];case 2:return[2,"group: "+i.sent().Id];case 3:return[4,St("_api/web","associatedvisitorgroup").select("Id")()];case 4:return[2,"group: "+i.sent().Id];case 5:throw Error("Could not determine role value for supplied value. Contributor, Reader, and Guest are supported");case 6:return[3,9];case 7:return n=e===Ri.Edit?Di.Contributor:Di.Reader,[4,zi("_api/web").select("Id").top(1).filter("RoleTypeKind eq "+n)()];case 8:if((r=i.sent()).length<1)throw Error("Could not locate associated role definition for supplied role. Edit and View are supported");return[2,"role: "+r[0].Id];case 9:return[2]}}))}))}!function(e){e[e.EmptyMask=0]="EmptyMask",e[e.ViewListItems=1]="ViewListItems",e[e.AddListItems=2]="AddListItems",e[e.EditListItems=3]="EditListItems",e[e.DeleteListItems=4]="DeleteListItems",e[e.ApproveItems=5]="ApproveItems",e[e.OpenItems=6]="OpenItems",e[e.ViewVersions=7]="ViewVersions",e[e.DeleteVersions=8]="DeleteVersions",e[e.CancelCheckout=9]="CancelCheckout",e[e.ManagePersonalViews=10]="ManagePersonalViews",e[e.ManageLists=12]="ManageLists",e[e.ViewFormPages=13]="ViewFormPages",e[e.AnonymousSearchAccessList=14]="AnonymousSearchAccessList",e[e.Open=17]="Open",e[e.ViewPages=18]="ViewPages",e[e.AddAndCustomizePages=19]="AddAndCustomizePages",e[e.ApplyThemeAndBorder=20]="ApplyThemeAndBorder",e[e.ApplyStyleSheets=21]="ApplyStyleSheets",e[e.ViewUsageData=22]="ViewUsageData",e[e.CreateSSCSite=23]="CreateSSCSite",e[e.ManageSubwebs=24]="ManageSubwebs",e[e.CreateGroups=25]="CreateGroups",e[e.ManagePermissions=26]="ManagePermissions",e[e.BrowseDirectories=27]="BrowseDirectories",e[e.BrowseUserInfo=28]="BrowseUserInfo",e[e.AddDelPrivateWebParts=29]="AddDelPrivateWebParts",e[e.UpdatePersonalWebParts=30]="UpdatePersonalWebParts",e[e.ManageWeb=31]="ManageWeb",e[e.AnonymousSearchAccessWebLists=32]="AnonymousSearchAccessWebLists",e[e.UseClientIntegration=37]="UseClientIntegration",e[e.UseRemoteAPIs=38]="UseRemoteAPIs",e[e.ManageAlerts=39]="ManageAlerts",e[e.CreateAlerts=40]="CreateAlerts",e[e.EditMyUserInfo=41]="EditMyUserInfo",e[e.EnumeratePermissions=63]="EnumeratePermissions",e[e.FullMask=65]="FullMask"}(Ei||(Ei={})),ee(Nt,"roleAssignments",Vi),ee(Nt,"firstUniqueAncestorSecurableObject",rt),Nt.prototype.getUserEffectivePermissions=$i,Nt.prototype.getCurrentUserEffectivePermissions=Yi,Nt.prototype.breakRoleInheritance=Zi,Nt.prototype.resetRoleInheritance=eo,Nt.prototype.userHasPermissions=to,Nt.prototype.currentUserHasPermissions=no,Nt.prototype.hasPermissions=ro,ee(Ot,"roleAssignments",Vi),ee(Ot,"firstUniqueAncestorSecurableObject",rt),Ot.prototype.getUserEffectivePermissions=$i,Ot.prototype.getCurrentUserEffectivePermissions=Yi,Ot.prototype.breakRoleInheritance=Zi,Ot.prototype.resetRoleInheritance=eo,Ot.prototype.userHasPermissions=to,Ot.prototype.currentUserHasPermissions=no,Ot.prototype.hasPermissions=ro,ee(bt,"roleDefinitions",zi),ee(bt,"roleAssignments",Vi),ee(bt,"firstUniqueAncestorSecurableObject",rt),bt.prototype.getUserEffectivePermissions=$i,bt.prototype.getCurrentUserEffectivePermissions=Yi,bt.prototype.breakRoleInheritance=Zi,bt.prototype.resetRoleInheritance=eo,bt.prototype.userHasPermissions=to,bt.prototype.currentUserHasPermissions=no,bt.prototype.hasPermissions=ro,function(e){e[e.None=0]="None",e[e.View=1]="View",e[e.Edit=2]="Edit",e[e.Owner=3]="Owner"}(Ri||(Ri={})),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Folder=2]="Folder",e[e.Item=3]="Item",e[e.List=4]="List",e[e.Web=5]="Web",e[e.Max=6]="Max"}(Ni||(Ni={})),function(e){e[e.None=0]="None",e[e.AllowList=1]="AllowList",e[e.BlockList=2]="BlockList"}(Ai||(Ai={})),function(e){e[e.CompletedSuccessfully=0]="CompletedSuccessfully",e[e.AccessRequestsQueued=1]="AccessRequestsQueued",e[e.NoResolvedUsers=-1]="NoResolvedUsers",e[e.AccessDenied=-2]="AccessDenied",e[e.CrossSiteRequestNotSupported=-3]="CrossSiteRequestNotSupported",e[e.UnknowError=-4]="UnknowError",e[e.EmailBodyTooLong=-5]="EmailBodyTooLong",e[e.ListUniqueScopesExceeded=-6]="ListUniqueScopesExceeded",e[e.CapabilityDisabled=-7]="CapabilityDisabled",e[e.ObjectNotSupported=-8]="ObjectNotSupported",e[e.NestedGroupsNotSupported=-9]="NestedGroupsNotSupported"}(Ui||(Ui={})),function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Direct=1]="Direct",e[e.OrganizationView=2]="OrganizationView",e[e.OrganizationEdit=3]="OrganizationEdit",e[e.AnonymousView=4]="AnonymousView",e[e.AnonymousEdit=5]="AnonymousEdit",e[e.Flexible=6]="Flexible"}(xi||(xi={})),function(e){e[e.None=0]="None",e[e.Guest=1]="Guest",e[e.Reader=2]="Reader",e[e.Contributor=3]="Contributor",e[e.WebDesigner=4]="WebDesigner",e[e.Administrator=5]="Administrator"}(Di||(Di={})),Pn.prototype.shareWith=function(e,t,n,r){return void 0===t&&(t=Ri.View),void 0===n&&(n=!1),ho(this,e,t,n,!1,r)},Pn.prototype.getShareLink=oo,Pn.prototype.checkSharingPermissions=so,Pn.prototype.getSharingInformation=uo,Pn.prototype.getObjectSharingSettings=ao,Pn.prototype.unshare=co,Pn.prototype.deleteSharingLinkByKind=lo,Pn.prototype.unshareLink=po,ir.prototype.shareWith=function(e,t,n,r,i){return void 0===t&&(t=Ri.View),void 0===n&&(n=!1),void 0===r&&(r=!1),D(this,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:return o=this.addBatchDependency(),[4,this.getShareable()];case 1:return s=u.sent(),o(),[2,s.shareWith(e,t,n,r,i)]}}))}))},ir.prototype.getShareLink=function(e,t){return void 0===t&&(t=null),D(this,void 0,void 0,(function(){var n,r;return L(this,(function(i){switch(i.label){case 0:return n=this.addBatchDependency(),[4,this.getShareable()];case 1:return r=i.sent(),n(),[2,r.getShareLink(e,t)]}}))}))},ir.prototype.checkSharingPermissions=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return t=this.addBatchDependency(),[4,this.getShareable()];case 1:return n=r.sent(),t(),[2,n.checkSharingPermissions(e)]}}))}))},ir.prototype.getSharingInformation=function(e,t){return D(this,void 0,void 0,(function(){var n,r;return L(this,(function(i){switch(i.label){case 0:return n=this.addBatchDependency(),[4,this.getShareable()];case 1:return r=i.sent(),n(),[2,r.getSharingInformation(e,t)]}}))}))},ir.prototype.getObjectSharingSettings=function(e){return void 0===e&&(e=!0),D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return t=this.addBatchDependency(),[4,this.getShareable()];case 1:return n=r.sent(),t(),[2,n.getObjectSharingSettings(e)]}}))}))},ir.prototype.unshare=function(){return D(this,void 0,void 0,(function(){var e,t;return L(this,(function(n){switch(n.label){case 0:return e=this.addBatchDependency(),[4,this.getShareable()];case 1:return t=n.sent(),e(),[2,t.unshare()]}}))}))},ir.prototype.deleteSharingLinkByKind=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return t=this.addBatchDependency(),[4,this.getShareable()];case 1:return n=r.sent(),t(),[2,n.deleteSharingLinkByKind(e)]}}))}))},ir.prototype.unshareLink=function(e,t){return D(this,void 0,void 0,(function(){var n,r;return L(this,(function(i){switch(i.label){case 0:return n=this.addBatchDependency(),[4,this.getShareable()];case 1:return r=i.sent(),n(),[2,r.unshareLink(e,t)]}}))}))},Nt.prototype.shareWith=function(e,t,n,r){return void 0===t&&(t=Ri.View),void 0===n&&(n=!1),ho(this,e,t,n,!1,r)},Nt.prototype.getShareLink=oo,Nt.prototype.checkSharingPermissions=so,Nt.prototype.getSharingInformation=uo,Nt.prototype.getObjectSharingSettings=ao,Nt.prototype.unshare=co,Nt.prototype.deleteSharingLinkByKind=lo,Nt.prototype.unshareLink=po,bt.prototype.shareWith=function(e,t,n){return void 0===t&&(t=Ri.View),D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=this.addBatchDependency(),[4,new nt(Be(this.toUrl()),"/_api/web/url").get()];case 1:return i=o.sent(),r(),[2,this.shareObject(d(i,"/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1"),e,t,n)]}}))}))},bt.prototype.shareObject=function(e,t,n,r,i,o,s,u){return void 0===o&&(o=!1),void 0===s&&(s=!1),void 0===u&&(u=!0),io(this,{emailData:r,group:i,includeAnonymousLinkInEmail:s,loginNames:t,propagateAcl:o,role:n,url:e,useSimplifiedRoles:u})},bt.prototype.shareObjectRaw=function(e){return io(this,e,!0)},bt.prototype.unshareObject=function(e){return Ke(St(this,"unshareObject"),Ue({url:e}))};var go=function(e){function t(t,n){void 0===n&&(n="");var r="string"==typeof t?t:t.toUrl();return e.call(this,Be(r),"_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility."+n)||this}return U(t,e),t.prototype.execute=function(e){return Ke(this,Ue(e,xe({"Content-Type":"application/json;charset=utf-8"})))},t.prototype.createSiteDesign=function(e){return this.clone(mo,"CreateSiteDesign").execute({info:e})},t.prototype.applySiteDesign=function(e,t){return this.clone(mo,"ApplySiteDesign").execute({siteDesignId:e,webUrl:t})},t.prototype.getSiteDesigns=function(){return this.clone(mo,"GetSiteDesigns").execute({})},t.prototype.getSiteDesignMetadata=function(e){return this.clone(mo,"GetSiteDesignMetadata").execute({id:e})},t.prototype.updateSiteDesign=function(e){return this.clone(mo,"UpdateSiteDesign").execute({updateInfo:e})},t.prototype.deleteSiteDesign=function(e){return this.clone(mo,"DeleteSiteDesign").execute({id:e})},t.prototype.getSiteDesignRights=function(e){return this.clone(mo,"GetSiteDesignRights").execute({id:e})},t.prototype.grantSiteDesignRights=function(e,t,n){return void 0===n&&(n=1),this.clone(mo,"GrantSiteDesignRights").execute({grantedRights:n.toString(),id:e,principalNames:t})},t.prototype.revokeSiteDesignRights=function(e,t){return this.clone(mo,"RevokeSiteDesignRights").execute({id:e,principalNames:t})},t.prototype.addSiteDesignTask=function(e,t){return this.clone(mo,"AddSiteDesignTask").execute({webUrl:e,siteDesignId:t})},t.prototype.addSiteDesignTaskToCurrentWeb=function(e){return this.clone(mo,"AddSiteDesignTaskToCurrentWeb").execute({siteDesignId:e})},t.prototype.getSiteDesignTask=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,this.clone(mo,"GetSiteDesignTask").execute({taskId:e})];case 1:return[2,P(t=n.sent(),"ID")?t:null]}}))}))},t.prototype.getSiteDesignRun=function(e,t){return this.clone(mo,"GetSiteDesignRun").execute({webUrl:e,siteDesignId:t})},t.prototype.getSiteDesignRunStatus=function(e,t){return this.clone(mo,"GetSiteDesignRunStatus").execute({webUrl:e,runId:t})},x([je("sd.createSiteDesign")],t.prototype,"createSiteDesign",null),x([je("sd.applySiteDesign")],t.prototype,"applySiteDesign",null),x([je("sd.getSiteDesigns")],t.prototype,"getSiteDesigns",null),x([je("sd.getSiteDesignMetadata")],t.prototype,"getSiteDesignMetadata",null),x([je("sd.updateSiteDesign")],t.prototype,"updateSiteDesign",null),x([je("sd.deleteSiteDesign")],t.prototype,"deleteSiteDesign",null),x([je("sd.getSiteDesignRights")],t.prototype,"getSiteDesignRights",null),x([je("sd.grantSiteDesignRights")],t.prototype,"grantSiteDesignRights",null),x([je("sd.revokeSiteDesignRights")],t.prototype,"revokeSiteDesignRights",null),x([je("sd.addSiteDesignTask")],t.prototype,"addSiteDesignTask",null),x([je("sd.addSiteDesignTaskToCurrentWeb")],t.prototype,"addSiteDesignTaskToCurrentWeb",null),x([je("sd.getSiteDesignTask")],t.prototype,"getSiteDesignTask",null),x([je("sd.getSiteDesignRun")],t.prototype,"getSiteDesignRun",null),x([je("sd.getSiteDesignRunStatus")],t.prototype,"getSiteDesignRunStatus",null),t}(Ye),vo=function(e,t){return new go(e,t)},mo=function(e,t){return void 0===t&&(t=""),vo(e,t)};bt.prototype.getSiteDesignRuns=function(e){return vo(this,"").getSiteDesignRun(void 0,e)},bt.prototype.addSiteDesignTask=function(e){return vo(this,"").addSiteDesignTaskToCurrentWeb(e)},bt.prototype.getSiteDesignRunStatus=function(e){return vo(this,"").getSiteDesignRunStatus(void 0,e)},Reflect.defineProperty(ht.prototype,"siteDesigns",{configurable:!0,enumerable:!0,get:function(){return vo(this._baseUrl)}}),ee(bt,"siteGroups",Mi),ee(bt,"associatedOwnerGroup",Mi,"associatedownergroup"),ee(bt,"associatedMemberGroup",Mi,"associatedmembergroup"),ee(bt,"associatedVisitorGroup",Mi,"associatedvisitorgroup"),bt.prototype.createDefaultAssociatedGroups=function(e,t,n,r,i){return void 0===n&&(n=!1),void 0===r&&(r=!0),D(this,void 0,void 0,(function(){var o;return L(this,(function(s){switch(s.label){case 0:return[4,this.breakRoleInheritance(n,r)];case 1:return s.sent(),(o=this.clone(St,"createDefaultAssociatedGroups(userLogin=@u,userLogin2=@v,groupNameSeed=@s)")).query.set("@u","'"+ft(t||"")+"'"),o.query.set("@v","'"+ft(i||"")+"'"),o.query.set("@s","'"+ft(e||"")+"'"),[2,Ke(o)]}}))}))};var bo,So=function(e){function t(t,n){void 0===n&&(n="");var r="string"==typeof t?t:t.toUrl();return e.call(this,Be(r),"_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility."+n)||this}return U(t,e),t.prototype.execute=function(e){return Ke(this,Ue(e))},t.prototype.getSiteScripts=function(){return this.clone(wo,"GetSiteScripts",!0).execute({})},t.prototype.createSiteScript=function(e,t,n){return this.clone(wo,"CreateSiteScript(Title=@title,Description=@desc)?@title='"+ft(e)+"'&@desc='"+ft(t)+"'").execute(n)},t.prototype.getSiteScriptMetadata=function(e){return this.clone(wo,"GetSiteScriptMetadata").execute({id:e})},t.prototype.deleteSiteScript=function(e){return this.clone(wo,"DeleteSiteScript").execute({id:e})},t.prototype.updateSiteScript=function(e,t){return t&&(e.Content=JSON.stringify(t)),this.clone(wo,"UpdateSiteScript").execute({updateInfo:e})},t.prototype.getSiteScriptFromList=function(e){return this.clone(wo,"GetSiteScriptFromList").execute({listUrl:e})},t.prototype.getSiteScriptFromWeb=function(e,t){return this.clone(wo,"getSiteScriptFromWeb").execute({webUrl:e,info:t})},t.prototype.executeSiteScriptAction=function(e){return this.clone(wo,"executeSiteScriptAction").execute({actionDefinition:e})},x([je("ss.getSiteScripts")],t.prototype,"getSiteScripts",null),x([je("ss.createSiteScript")],t.prototype,"createSiteScript",null),x([je("ss.getSiteScriptMetadata")],t.prototype,"getSiteScriptMetadata",null),x([je("ss.deleteSiteScript")],t.prototype,"deleteSiteScript",null),x([je("ss.updateSiteScript")],t.prototype,"updateSiteScript",null),x([je("ss.getSiteScriptFromList")],t.prototype,"getSiteScriptFromList",null),x([je("ss.getSiteScriptFromWeb")],t.prototype,"getSiteScriptFromWeb",null),x([je("ss.executeSiteScriptAction")],t.prototype,"executeSiteScriptAction",null),t}(Ye),To=function(e,t){return new So(e,t)},wo=function(e,t){return void 0===t&&(t=""),To(e,t)};!function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure",e[e.NoOp=2]="NoOp",e[e.SucceededWithException=3]="SucceededWithException"}(bo||(bo={})),bt.prototype.getSiteScript=function(e){return To(this.toUrl(),"").getSiteScriptFromWeb(void 0,e)},Ot.prototype.getSiteScript=function(){return D(this,void 0,void 0,(function(){var e,t,n;return L(this,(function(r){switch(r.label){case 0:return[4,this.clone(Ct).rootFolder.get()];case 1:return e=r.sent(),[4,St(Be(this.toUrl())).select("Url").get()];case 2:return t=r.sent(),n=d(t.Url,"Lists",e.Name),[2,To(this,"").getSiteScriptFromList(n)]}}))}))},Reflect.defineProperty(ht.prototype,"siteScripts",{configurable:!0,enumerable:!0,get:function(){return To(this._baseUrl)}}),ee(bt,"siteUsers",ki),ee(bt,"currentUser",Bi,"currentuser"),bt.prototype.ensureUser=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(St,"ensureuser"),Ue({logonName:e}))];case 1:return[2,{data:t=n.sent(),user:Bi(ut(t))}]}}))}))},bt.prototype.getUserById=function(e){return Bi(this,"getUserById("+e+")")};var Po,Io,_o,Oo,Co=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"my",{get:function(){return Ao(this)},enumerable:!0,configurable:!0}),t.prototype.getFollowedSitesUri=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,this.clone(Ro,"FollowedSitesUri").get()];case 1:return[2,(e=t.sent()).FollowedSitesUri||e]}}))}))},t.prototype.getFollowedDocumentsUri=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,this.clone(Ro,"FollowedDocumentsUri").get()];case 1:return[2,(e=t.sent()).FollowedDocumentsUri||e]}}))}))},t.prototype.follow=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(Ro,"follow"),this.createSocialActorInfoRequestBody(e))];case 1:return[2,t.sent()]}}))}))},t.prototype.isFollowed=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(Ro,"isfollowed"),this.createSocialActorInfoRequestBody(e))];case 1:return[2,t.sent()]}}))}))},t.prototype.stopFollowing=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(Ro,"stopfollowing"),this.createSocialActorInfoRequestBody(e))];case 1:return[2,t.sent()]}}))}))},t.prototype.createSocialActorInfoRequestBody=function(e){return Ue({actor:Object.assign(De("SP.Social.SocialActorInfo"),{Id:null},e)})},x([je("soc.getFollowedSitesUri")],t.prototype,"getFollowedSitesUri",null),x([je("soc.getFollowedDocumentsUri")],t.prototype,"getFollowedDocumentsUri",null),x([je("soc.follow")],t.prototype,"follow",null),x([je("soc.isFollowed")],t.prototype,"isFollowed",null),x([je("soc.stopFollowing")],t.prototype,"stopFollowing",null),t=x([st("_api/social.following")],t)}(nt),Eo=function(e){return new Co(e)},Ro=function(e,t){return new Co(e,t)},No=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.followed=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,this.clone(Uo,"followed(types="+e+")")()];case 1:return[2,P(t=n.sent(),"Followed")?t.Followed.results:t]}}))}))},t.prototype.followedCount=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,this.clone(Uo,"followedcount(types="+e+")")()];case 1:return[2,(t=n.sent()).FollowedCount||t]}}))}))},t.prototype.followers=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,this.clone(Uo,"followers")()];case 1:return[2,P(e=t.sent(),"Followers")?e.Followers.results:e]}}))}))},t.prototype.suggestions=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,this.clone(Uo,"suggestions")()];case 1:return[2,P(e=t.sent(),"Suggestions")?e.Suggestions.results:e]}}))}))},x([je("msoc.followed")],t.prototype,"followed",null),x([je("msoc.followedCount")],t.prototype,"followedCount",null),x([je("msoc.followers")],t.prototype,"followers",null),x([je("msoc.suggestions")],t.prototype,"suggestions",null),t=x([st("my")],t)}(nt),Ao=$e(No),Uo=function(e,t){return Ao(e,t)};!function(e){e[e.User=0]="User",e[e.Document=1]="Document",e[e.Site=2]="Site",e[e.Tag=3]="Tag"}(Po||(Po={})),function(e){e[e.None=0]="None",e[e.User=1]="User",e[e.Document=2]="Document",e[e.Site=4]="Site",e[e.Tag=8]="Tag",e[e.ExcludeContentWithoutFeeds=268435456]="ExcludeContentWithoutFeeds",e[e.IncludeGroupsSites=536870912]="IncludeGroupsSites",e[e.WithinLast24Hours=1073741824]="WithinLast24Hours"}(Io||(Io={})),function(e){e[e.Ok=0]="Ok",e[e.AlreadyFollowing=1]="AlreadyFollowing",e[e.LimitReached=2]="LimitReached",e[e.InternalError=3]="InternalError"}(_o||(_o={})),function(e){e[e.OK=0]="OK",e[e.InvalidRequest=1]="InvalidRequest",e[e.AccessDenied=2]="AccessDenied",e[e.ItemNotFound=3]="ItemNotFound",e[e.InvalidOperation=4]="InvalidOperation",e[e.ItemNotModified=5]="ItemNotModified",e[e.InternalError=6]="InternalError",e[e.CacheReadError=7]="CacheReadError",e[e.CacheUpdateError=8]="CacheUpdateError",e[e.PersonalSiteNotFound=9]="PersonalSiteNotFound",e[e.FailedToCreatePersonalSite=10]="FailedToCreatePersonalSite",e[e.NotAuthorizedToCreatePersonalSite=11]="NotAuthorizedToCreatePersonalSite",e[e.CannotCreatePersonalSite=12]="CannotCreatePersonalSite",e[e.LimitReached=13]="LimitReached",e[e.AttachmentError=14]="AttachmentError",e[e.PartialData=15]="PartialData",e[e.FeatureDisabled=16]="FeatureDisabled",e[e.StorageQuotaExceeded=17]="StorageQuotaExceeded",e[e.DatabaseError=18]="DatabaseError"}(Oo||(Oo={})),Reflect.defineProperty(ht.prototype,"social",{configurable:!0,enumerable:!0,get:function(){return Eo(this._baseUrl)}});var xo=function(e){function t(t,n){var r="string"==typeof t?t:t.toUrl();return e.call(this,Be(r),"_api/SP.Utilities.Utility."+n)||this}return U(t,e),t.prototype.excute=function(e){return Ke(this,Ue(e))},t.prototype.sendEmail=function(e){var t={properties:m(De("SP.Utilities.EmailProperties"),{Body:e.Body,From:e.From,Subject:e.Subject})};return e.To&&e.To.length>0&&(t.properties=m(t.properties,{To:{results:e.To}})),e.CC&&e.CC.length>0&&(t.properties=m(t.properties,{CC:{results:e.CC}})),e.BCC&&e.BCC.length>0&&(t.properties=m(t.properties,{BCC:{results:e.BCC}})),e.AdditionalHeaders&&(t.properties=m(t.properties,{AdditionalHeaders:Vt(e.AdditionalHeaders)})),je.configure(this.clone(Lo,"SendEmail",!0),"u.sendEmail").excute(t)},t.prototype.getCurrentUserEmailAddresses=function(){return je.configure(this.clone(Lo,"GetCurrentUserEmailAddresses",!0),"u.getCurrentUserEmailAddresses").excute({})},t.prototype.resolvePrincipal=function(e,t,n,r,i,o){void 0===o&&(o=!1);var s={addToUserInfoList:i,input:e,inputIsEmailOnly:r,matchUserInfoList:o,scopes:t,sources:n},u=this.clone(Lo,"ResolvePrincipalInCurrentContext",!0);return je.configure(u,"u.ResolvePrincipalInCurrentContext").excute(s)},t.prototype.searchPrincipals=function(e,t,n,r,i){var o={groupName:r,input:e,maxCount:i,scopes:t,sources:n},s=this.clone(Lo,"SearchPrincipalsUsingContextWeb",!0);return je.configure(s,"u.SearchPrincipalsUsingContextWeb").excute(o)},t.prototype.createEmailBodyForInvitation=function(e){var t={pageAddress:e},n=this.clone(Lo,"CreateEmailBodyForInvitation",!0);return je.configure(n,"u.CreateEmailBodyForInvitation").excute(t)},t.prototype.expandGroupsToPrincipals=function(e,t){void 0===t&&(t=30);var n={inputs:e,maxCount:t},r=this.clone(Lo,"ExpandGroupsToPrincipals",!0);return je.configure(r,"u.ExpandGroupsToPrincipals").excute(n)},t.prototype.createWikiPage=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return t=this.clone(Lo,"CreateWikiPageInContextWeb",!0),[4,je.configure(t,"u.CreateWikiPageInContextWeb").excute({parameters:e})];case 1:return[2,{data:n=r.sent(),file:In(ut(n))}]}}))}))},t}(Ye),Do=$e(xo),Lo=function(e,t){return Do(e,t)};Reflect.defineProperty(ht.prototype,"utility",{configurable:!0,enumerable:!0,get:function(){return Do(this._baseUrl,"")}});var ko=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(jo(this).concat("('"+e+"')"),"subs.getById")},t.prototype.add=function(e,t,n){return D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r={expirationDateTime:t,notificationUrl:e,resource:this.toUrl()},n&&(r.clientState=n),[4,Ke(this,Ue(r,xe({"Content-Type":"application/json"})))];case 1:return[2,{data:i=o.sent(),subscription:this.getById(i.id)}]}}))}))},x([je("subs.add")],t.prototype,"add",null),t=x([st("subscriptions")],t)}(et),Fo=$e(ko),Bo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.update=function(e,t,n){return D(this,void 0,void 0,(function(){var r;return L(this,(function(i){switch(i.label){case 0:return r={},e&&(r.expirationDateTime=e),t&&(r.notificationUrl=t),n&&(r.clientState=n),[4,ze(this,Ue(r,xe({"Content-Type":"application/json"})))];case 1:return[2,{data:i.sent(),subscription:this}]}}))}))},t.prototype.delete=function(){return Qe(this)},x([je("sub.update")],t.prototype,"update",null),x([je("sub.delete")],t.prototype,"delete",null),t}(nt),jo=$e(Bo);ee(Ot,"subscriptions",Fo),ee(Ot,"userCustomActions",ci),ee(bt,"userCustomActions",ci),ee(yt,"userCustomActions",ci);var Mo,qo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return Vo(this).concat("('"+e+"')")},t.prototype.getByTitle=function(e){return Vo(this,"getByTitle('"+e+"')")},t.prototype.add=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n={}),D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=Ue(Object.assign(De("SP.View"),{PersonalView:t,Title:e},n)),[4,Ke(this.clone(Go,null),r)];case 1:return[2,{data:i=o.sent(),view:this.getById(i.Id)}]}}))}))},x([je("vs.add")],t.prototype,"add",null),t=x([st("views")],t)}(et),Go=$e(qo),Wo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("vw"),t.update=t._update("SP.View",(function(e){return{data:e,view:t}})),t}return U(t,e),Object.defineProperty(t.prototype,"fields",{get:function(){return Ko(this)},enumerable:!0,configurable:!0}),t.prototype.renderAsHtml=function(){return this.clone(Vo,"renderashtml")()},t.prototype.setViewXml=function(e){return Ke(this.clone(Vo,"SetViewXml"),Ue({viewXml:e}))},x([je("v.renderAsHtml")],t.prototype,"renderAsHtml",null),x([je("v.setViewXml")],t.prototype,"setViewXml",null),t}(nt),Vo=$e(Wo),Ho=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getSchemaXml=function(){return this.clone(Ko,"schemaxml")()},t.prototype.add=function(e){return Ke(this.clone(Ko,"addviewfield('"+e+"')"))},t.prototype.move=function(e,t){return Ke(this.clone(Ko,"moveviewfieldto"),Ue({field:e,index:t}))},t.prototype.removeAll=function(){return Ke(this.clone(Ko,"removeallviewfields"))},t.prototype.remove=function(e){return Ke(this.clone(Ko,"removeviewfield('"+e+"')"))},x([je("vfs.getSchemaXml")],t.prototype,"getSchemaXml",null),x([je("vfs.add")],t.prototype,"add",null),x([je("vfs.move")],t.prototype,"move",null),x([je("vfs.removeAll")],t.prototype,"removeAll",null),x([je("vfs.remove")],t.prototype,"remove",null),t=x([st("viewfields")],t)}(et),Ko=$e(Ho);!function(e){e[e.DefaultValue=0]="DefaultValue",e[e.Recursive=1]="Recursive",e[e.RecursiveAll=2]="RecursiveAll",e[e.FilesOnly=3]="FilesOnly"}(Mo||(Mo={})),ee(Ot,"views",Go),ee(Ot,"defaultView",Vo,"DefaultView"),Ot.prototype.getView=function(e){return Vo(this,"getView('"+e+"')")};var Qo,zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"scope",{get:function(){return je.configure(Ze(this,"Scope"),"f.scope")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"webparts",{get:function(){return Yo(this,"webparts")},enumerable:!0,configurable:!0}),t.prototype.export=function(e){return Ke(this.clone(Jo,"ExportWebPart"),Ue({webPartId:e}))},t.prototype.import=function(e){return Ke(this.clone(Jo,"ImportWebPart"),Ue({webPartXml:e}))},t}(Ye),Xo=function(e,t){return new zo(e,t)},Jo=function(e,t){return Xo(e,t)},$o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return es(this,"getbyid('"+e+"')")},t.prototype.getByControlId=function(e){return es(this,"getByControlId('"+e+"')")},t}(et),Yo=$e($o),Zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"webpart",{get:function(){return rt(this,"webpart")},enumerable:!0,configurable:!0}),t.prototype.saveChanges=function(){return Ke(this.clone(es,"SaveWebPartChanges"))},t.prototype.moveTo=function(e,t){return Ke(this.clone(es,"MoveWebPartTo(zoneID='"+e+"', zoneIndex="+t+")"))},t.prototype.close=function(){return Ke(this.clone(es,"CloseWebPart"))},t.prototype.open=function(){return Ke(this.clone(es,"OpenWebPart"))},t.prototype.delete=function(){return Ke(this.clone(es,"DeleteWebPart"))},t}(nt),es=$e(Zo);!function(e){e[e.User=0]="User",e[e.Shared=1]="Shared"}(Qo||(Qo={})),Pn.prototype.getLimitedWebPartManager=function(e){return void 0===e&&(e=Qo.Shared),Xo(this,"getLimitedWebPartManager(scope="+e+")")};var ts=new ht;function ns(e){return function(t){return function(t){function n(){for(var n=[],r=0;r1&&void 0!==n[1]?n[1]:e)||this}return U(n,t),n}(t)}}function rs(){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.delete=function(){return cn(this)},t}(e)}}function is(){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.delete=function(e){return void 0===e&&(e="*"),cn(this,xe({"If-Match":e}))},t}(e)}}function os(){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.update=function(e){return ln(this,Ue(e))},t}(e)}}function ss(){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.update=function(e,t){return void 0===t&&(t="*"),ln(this,Ue(e,xe({"If-Match":t})))},t}(e)}}function us(){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e){return an(this,Ue(e))},t}(e)}}function as(e){return function(t){return function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return U(n,t),n.prototype.getById=function(t){return e(this,t)},n}(t)}}var cs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"threads",{get:function(){return ds(this)},enumerable:!0,configurable:!0}),t=x([os(),rs()],t)}(gn)),ls=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("conversations"),us(),as(cs)],t)}(fn)),ps=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"posts",{get:function(){return ys(this)},enumerable:!0,configurable:!0}),t.prototype.reply=function(e){return an(this.clone(ps,"reply"),Ue(e))},t=x([rs()],t)}(gn)),ds=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("threads"),us(),as(ps)],t)}(fn)),hs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.forward=function(e){return an(this.clone(fs,"forward"),Ue(e))},t.prototype.reply=function(e){return an(this.clone(fs,"reply"),Ue(e))},t=x([rs()],t)}(gn),fs=dn(hs),ys=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("posts"),us(),as(fs)],t)}(fn)),gs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e){return an(this.clone(gs,"$ref"),Ue({"@odata.id":e}))},t.prototype.remove=function(e){var t=this.clone(gs,"$ref");return t.query.set("$id",e),cn(t)},t}(fn));var vs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(gn)),ms=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.addFile=function(e,t){return an(this,Ue((n="#microsoft.graph.fileAttachment",r={contentBytes:t,name:e},Object.assign({"@odata.type":n},r))));var n,r},t=x([ns("attachments"),as(vs)],t)}(fn));ee(hs,"attachments",ms);var bs,Ss,Ts=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getMemberObjects=function(e){return void 0===e&&(e=!1),an(this.clone(ws,"getMemberObjects"),Ue({securityEnabledOnly:e}))},t.prototype.getMemberGroups=function(e){return void 0===e&&(e=!1),an(this.clone(ws,"getMemberGroups"),Ue({securityEnabledOnly:e}))},t.prototype.checkMemberGroups=function(e){return an(this.clone(ws,"checkMemberGroups"),Ue({groupIds:e}))},t=x([rs()],t)}(gn),ws=dn(Ts),Ps=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getByIds=function(e,t){return void 0===t&&(t=bs.directoryObject),an(this.clone(Ps,"getByIds"),Ue({ids:e,type:t}))},t=x([ns("directoryObjects"),as(ws)],t)}(fn));!function(e){e[e.directoryObject=0]="directoryObject",e[e.user=1]="user",e[e.group=2]="group",e[e.device=3]="device"}(bs||(bs={})),function(e){e[e.Office365=0]="Office365",e[e.Dynamic=1]="Dynamic",e[e.Security=2]="Security"}(Ss||(Ss={}));var Is=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.addFavorite=function(){return an(this.clone(_s,"addFavorite"))},t.prototype.removeFavorite=function(){return an(this.clone(_s,"removeFavorite"))},t.prototype.resetUnseenCount=function(){return an(this.clone(_s,"resetUnseenCount"))},t.prototype.subscribeByMail=function(){return an(this.clone(_s,"subscribeByMail"))},t.prototype.unsubscribeByMail=function(){return an(this.clone(_s,"unsubscribeByMail"))},t.prototype.getCalendarView=function(e,t){var n=this.clone(_s,"calendarView");return n.query.set("startDateTime",e.toISOString()),n.query.set("endDateTime",t.toISOString()),n()},t=x([rs(),os()],t)}(Ts),_s=dn(Is),Os=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n,r){return void 0===r&&(r={}),D(this,void 0,void 0,(function(){var i,o;return L(this,(function(s){switch(s.label){case 0:return i=m({displayName:e,mailEnabled:n===Ss.Office365,mailNickname:t,securityEnabled:n!==Ss.Office365},r),n!==Ss.Security&&(i=m(i,{groupTypes:n===Ss.Office365?["Unified"]:["DynamicMembership"]})),[4,an(this,Ue(i))];case 1:return[2,{data:o=s.sent(),group:this.getById(o.id)}]}}))}))},t=x([ns("groups"),as(_s)],t)}(fn)),Cs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("calendars")],t)}(fn)),Es=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"events",{get:function(){return Ns(this)},enumerable:!0,configurable:!0}),t}(gn)),Rs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([rs(),os()],t)}(gn)),Ns=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,an(this,Ue(e))];case 1:return[2,{data:t=n.sent(),event:this.getById(t.id)}]}}))}))},t=x([ns("events"),as(Rs)],t)}(fn));ee(Is,"calendar",Es,"calendar"),ee(Is,"events",Ns);var As=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"memberOf",{get:function(){return Ps(this,"memberOf")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"people",{get:function(){return Ds(this)},enumerable:!0,configurable:!0}),t=x([os(),rs()],t)}(Ts),Us=dn(As),xs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("users"),as(Us)],t)}(fn)),Ds=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("people")],t)}(fn)),Ls=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([os(),rs()],t)}(gn)),ks=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n,r,i){return void 0===i&&(i={}),D(this,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:return o=m({businessPhones:r,emailAddresses:n,givenName:e,surName:t},i),[4,an(this,Ue(o))];case 1:return s=u.sent(),[2,{contact:this.getById(s.id),data:s}]}}))}))},t=x([ns("contacts"),as(Ls)],t)}(fn)),Fs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"contacts",{get:function(){return ks(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"childFolders",{get:function(){return Bs(this,"childFolders")},enumerable:!0,configurable:!0}),t=x([rs(),os()],t)}(gn)),Bs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t){return D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,an(this,Ue({displayName:e,parentFolderId:t}))];case 1:return n=r.sent(),[2,{contactFolder:this.getById(n.id),data:n}]}}))}))},t=x([ns("contactFolders"),as(Fs)],t)}(fn));ee(As,"contacts",ks),ee(As,"contactFolders",Bs),ee(Is,"conversations",ls),ee(Is,"acceptedSenders",gs,"acceptedsenders"),ee(Is,"rejectedSenders",gs,"rejectedsenders"),Reflect.defineProperty(bn.prototype,"directoryObjects",{configurable:!0,enumerable:!0,get:function(){return Ps(this)}}),Reflect.defineProperty(bn.prototype,"groups",{configurable:!0,enumerable:!0,get:function(){return Os(this)}});var js=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"trending",{get:function(){return qs(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"used",{get:function(){return Ws(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shared",{get:function(){return Hs(this)},enumerable:!0,configurable:!0}),t=x([ns("insights")],t)}(gn)),Ms=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"resource",{get:function(){return Ks(this)},enumerable:!0,configurable:!0}),t}(gn)),qs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("trending"),as(Ms)],t)}(fn)),Gs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"resource",{get:function(){return Ks(this)},enumerable:!0,configurable:!0}),t}(gn)),Ws=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("used"),as(Gs)],t)}(fn)),Vs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"resource",{get:function(){return Ks(this)},enumerable:!0,configurable:!0}),t}(gn)),Hs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("shared"),as(Vs)],t)}(fn)),Ks=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("resource")],t)}(gn));ee(As,"insights",js);var Qs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.create=function(e,t,n){return void 0===n&&(n={}),D(this,void 0,void 0,(function(){var r;return L(this,(function(i){switch(i.label){case 0:return r=m({inviteRedirectUrl:t,invitedUserEmailAddress:e},n),[4,an(this,Ue(r))];case 1:return[2,{data:i.sent()}]}}))}))},t=x([ns("invitations")],t)}(fn));Reflect.defineProperty(bn.prototype,"invitations",{configurable:!0,enumerable:!0,get:function(){return Qs(this)}});var zs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.remove=function(){return cn(this.clone(zs,"$ref"))},t}(gn)),Xs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e){return an(this.clone(Xs,"$ref"),Ue({"@odata.id":e}))},t=x([ns("members"),as(zs)],t)}(fn));ee(Is,"owners",Xs,"owners"),ee(Is,"members",Xs);var Js=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(gn)),$s=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("messages"),as(Js),us()],t)}(fn)),Ys=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(gn)),Zs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("mailFolders"),as(Ys),us()],t)}(fn)),eu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("mailboxSettings"),os()],t)}(gn));ee(As,"messages",$s),ee(As,"mailboxSettings",eu),ee(As,"mailFolders",Zs),As.prototype.sendMail=function(e){return an(this.clone(Us,"sendMail"),Ue(e))};var tu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"root",{get:function(){return ru(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"list",{get:function(){return vn(this,"list")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"recent",{get:function(){return ou(this,"recent")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sharedWithMe",{get:function(){return ou(this,"sharedWithMe")},enumerable:!0,configurable:!0}),t.prototype.getItemById=function(e){return iu(this,d("items",e))},t=x([ns("drive")],t)}(gn)),nu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("drives"),as(tu)],t)}(fn)),ru=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return ou(this,"children")},enumerable:!0,configurable:!0}),t.prototype.search=function(e){var t=this.clone(ru);return t.query.set("search","'"+e+"'"),t()},Object.defineProperty(t.prototype,"thumbnails",{get:function(){return yn(this,"thumbnails")},enumerable:!0,configurable:!0}),t=x([ns("root")],t)}(gn)),iu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return ou(this,"children")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"thumbnails",{get:function(){return yn(this,"thumbnails")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"versions",{get:function(){return yn(this,"versions")},enumerable:!0,configurable:!0}),t.prototype.move=function(e,t){return ln(this,Ue(m(e,{name:t})))},t.prototype.getContent=function(){return un(this.clone(iu,"content"))},t.prototype.setContent=function(e){return pn(this.clone(iu,"content"),{body:e})},t=x([rs(),os()],t)}(gn)),ou=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([as(iu)],t)}(fn));ee(As,"drive",tu),ee(As,"drives",nu);var su=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"notebooks",{get:function(){return au(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sections",{get:function(){return lu(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pages",{get:function(){return yn(this,"pages")},enumerable:!0,configurable:!0}),t=x([ns("onenote")],t)}(gn)),uu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"sections",{get:function(){return lu(this)},enumerable:!0,configurable:!0}),t}(gn)),au=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,an(this,Ue({displayName:e}))];case 1:return[2,{data:t=n.sent(),notebook:this.getById(t.id)}]}}))}))},t=x([ns("notebooks"),as(uu)],t)}(fn)),cu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(gn)),lu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,an(this,Ue({displayName:e}))];case 1:return[2,{data:t=n.sent(),section:this.getById(t.id)}]}}))}))},t=x([ns("sections"),as(cu)],t)}(fn));ee(As,"onenote",su);var pu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getBlob=function(){return this.clone(pu,"$value",!1).usingParser(new ve)()},t.prototype.getBuffer=function(){return this.clone(pu,"$value",!1).usingParser(new be)()},t.prototype.setContent=function(e){return ln(this.clone(pu,"$value",!1),{body:e})},t=x([ns("photo")],t)}(gn));ee(Is,"photo",pu);var du=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"plans",{get:function(){return fu(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tasks",{get:function(){return gu(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buckets",{get:function(){return mu(this)},enumerable:!0,configurable:!0}),t=x([ns("planner")],t)}(gn)),hu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"tasks",{get:function(){return gu(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buckets",{get:function(){return mu(this)},enumerable:!0,configurable:!0}),t=x([ss(),is()],t)}(gn)),fu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t){return D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,an(this,Ue({owner:e,title:t}))];case 1:return[2,{data:n=r.sent(),plan:this.getById(n.id)}]}}))}))},t=x([ns("plans"),as(hu)],t)}(fn)),yu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ss(),is()],t)}(gn)),gu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n,r){return D(this,void 0,void 0,(function(){var i,o;return L(this,(function(s){switch(s.label){case 0:return i=m({planId:e,title:t},n),r&&(i=m(i,{bucketId:r})),[4,an(this,Ue(i))];case 1:return[2,{data:o=s.sent(),task:this.getById(o.id)}]}}))}))},t=x([ns("tasks"),as(yu)],t)}(fn)),vu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"tasks",{get:function(){return gu(this)},enumerable:!0,configurable:!0}),t=x([ss(),is()],t)}(gn)),mu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n){return D(this,void 0,void 0,(function(){var r;return L(this,(function(i){switch(i.label){case 0:return[4,an(this,Ue({name:e,orderHint:n||"",planId:t}))];case 1:return r=i.sent(),[2,{bucket:this.getById(r.id),data:r}]}}))}))},t=x([ns("buckets"),as(vu)],t)}(fn));ee(Is,"plans",fu,"planner/plans"),ee(As,"tasks",gu,"planner/tasks"),Reflect.defineProperty(bn.prototype,"planner",{configurable:!0,enumerable:!0,get:function(){return du(this)}});var bu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([rs(),os()],t)}(gn)),Su=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n,r,i){return void 0===i&&(i={}),D(this,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:return o=m({changeType:e,expirationDateTime:r,notificationUrl:t,resource:n},i),[4,an(this,Ue(o))];case 1:return[2,{data:s=u.sent(),subscription:this.getById(s.id)}]}}))}))},t=x([ns("subscriptions"),as(bu)],t)}(fn));Reflect.defineProperty(bn.prototype,"subscriptions",{configurable:!0,enumerable:!0,get:function(){return Su(this)}});var Tu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"channels",{get:function(){return Iu(this)},enumerable:!0,configurable:!0}),t.prototype.archive=function(e){return void 0===e&&(e=!1),an(this.clone(Tu,"archive"),Ue({shouldSetSpoSiteReadOnlyForMembers:e}))},t.prototype.unarchive=function(){return an(this.clone(Tu,"unarchive"))},t.prototype.cloneTeam=function(e,t,n,r){void 0===t&&(t=""),void 0===n&&(n="apps,tabs,settings,channels,members"),void 0===r&&(r="private");var i={description:t||"",displayName:e,mailNickname:e,partsToClone:n,visibility:r};return an(this.clone(Tu,"clone"),Ue(i))},t=x([ns("team"),os()],t)}(gn)),wu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("teams"),as(Tu)],t)}(fn)),Pu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"tabs",{get:function(){return Ou(this)},enumerable:!0,configurable:!0}),t}(gn)),Iu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t){return void 0===t&&(t=""),D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,an(this,Ue({description:t,displayName:e}))];case 1:return n=r.sent(),[2,{channel:this.getById(n.id),data:n}]}}))}))},t=x([ns("channels"),as(Pu)],t)}(fn)),_u=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("tab"),os(),rs()],t)}(gn)),Ou=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n){return D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=m({displayName:e,"teamsApp@odata.bind":t},n),[4,an(this,Ue(r))];case 1:return[2,{data:i=o.sent(),tab:this.getById(i.id)}]}}))}))},t=x([ns("tabs"),as(_u)],t)}(fn));ee(As,"joinedTeams",wu,"joinedTeams"),ee(Is,"team",Tu),Is.prototype.createTeam=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,pn(this.clone(_s,"team"),Ue(e))];case 1:return[2,{data:t.sent(),team:this.team}]}}))}))},Reflect.defineProperty(bn.prototype,"teams",{configurable:!0,enumerable:!0,get:function(){return wu(this)}}),Reflect.defineProperty(bn.prototype,"me",{configurable:!0,enumerable:!0,get:function(){return Us(this,"me")}}),Reflect.defineProperty(bn.prototype,"users",{configurable:!0,enumerable:!0,get:function(){return xs(this)}}),n.d(t,"util",(function(){return Cu})),n.d(t,"sp",(function(){return Eu})),n.d(t,"graph",(function(){return Ru})),n.d(t,"storage",(function(){return Nu})),n.d(t,"config",(function(){return Au})),n.d(t,"log",(function(){return Uu})),n.d(t,"setup",(function(){return xu})),n.d(t,"objectToMap",(function(){return O})),n.d(t,"mergeMaps",(function(){return C})),n.d(t,"RuntimeConfigImpl",(function(){return R})),n.d(t,"RuntimeConfig",(function(){return N})),n.d(t,"mergeHeaders",(function(){return M})),n.d(t,"mergeOptions",(function(){return q})),n.d(t,"getADALResource",(function(){return G})),n.d(t,"FetchClient",(function(){return W})),n.d(t,"BearerTokenFetchClient",(function(){return V})),n.d(t,"SPFxAdalClient",(function(){return H})),n.d(t,"PnPClientStorageWrapper",(function(){return K})),n.d(t,"PnPClientStorage",(function(){return z})),n.d(t,"getCtxCallback",(function(){return l})),n.d(t,"dateAdd",(function(){return p})),n.d(t,"combine",(function(){return d})),n.d(t,"getRandomString",(function(){return h})),n.d(t,"getGUID",(function(){return f})),n.d(t,"isFunc",(function(){return y})),n.d(t,"objectDefinedNotNull",(function(){return g})),n.d(t,"isArray",(function(){return v})),n.d(t,"assign",(function(){return m})),n.d(t,"isUrlAbsolute",(function(){return b})),n.d(t,"stringIsNullOrEmpty",(function(){return S})),n.d(t,"sanitizeGuid",(function(){return T})),n.d(t,"jsS",(function(){return w})),n.d(t,"hOP",(function(){return P})),n.d(t,"getHashCode",(function(){return I})),n.d(t,"safeGlobal",(function(){return j.a})),n.d(t,"Logger",(function(){return s})),n.d(t,"LogLevel",(function(){return o})),n.d(t,"ConsoleListener",(function(){return a})),n.d(t,"FunctionListener",(function(){return c})),n.d(t,"Settings",(function(){return X})),n.d(t,"CachingConfigurationProvider",(function(){return J})),n.d(t,"SPListConfigurationProvider",(function(){return jt})),n.d(t,"Batch",(function(){return $})),n.d(t,"CachingOptions",(function(){return Y})),n.d(t,"CachingParserWrapper",(function(){return Z})),n.d(t,"addProp",(function(){return ee})),n.d(t,"invokableFactory",(function(){return fe})),n.d(t,"pipelineBinder",(function(){return Ne})),n.d(t,"defaultPipelineBinder",(function(){return Ae})),n.d(t,"ODataParser",(function(){return ye})),n.d(t,"TextParser",(function(){return ge})),n.d(t,"BlobParser",(function(){return ve})),n.d(t,"JSONParser",(function(){return me})),n.d(t,"BufferParser",(function(){return be})),n.d(t,"LambdaParser",(function(){return Se})),n.d(t,"HttpRequestError",(function(){return Te})),n.d(t,"setResult",(function(){return Ie})),n.d(t,"pipe",(function(){return Oe})),n.d(t,"requestPipelineMethod",(function(){return Ce})),n.d(t,"PipelineMethods",(function(){return Ee})),n.d(t,"getDefaultPipeline",(function(){return Re})),n.d(t,"cloneQueryableData",(function(){return we})),n.d(t,"Queryable",(function(){return Pe})),n.d(t,"body",(function(){return Ue})),n.d(t,"headers",(function(){return xe})),n.d(t,"extendGlobal",(function(){return ie})),n.d(t,"extendObj",(function(){return oe})),n.d(t,"extendFactory",(function(){return se})),n.d(t,"clearGlobalExtensions",(function(){return ae})),n.d(t,"enableExtensions",(function(){return le})),n.d(t,"disableExtensions",(function(){return ce})),n.d(t,"SPNS",(function(){return r})),n.d(t,"GraphNS",(function(){return i}));var Cu={assign:m,combine:d,dateAdd:p,getCtxCallback:l,getGUID:f,getRandomString:h,isArray:v,isFunc:y,isUrlAbsolute:b,objectDefinedNotNull:g,sanitizeGuid:T,stringIsNullOrEmpty:S},Eu=Xt,Ru=Sn,Nu=new z,Au=new X,Uu=s,xu=function(e){N.assign(e)},Du={config:Au,graph:Ru,log:Uu,setup:xu,sp:Eu,storage:Nu,util:Cu};t.default=Du}])})); +var r=function(){"use strict";return r=function(e){if(this.REQUEST_TYPE={LOGIN:"LOGIN",RENEW_TOKEN:"RENEW_TOKEN",UNKNOWN:"UNKNOWN"},this.RESPONSE_TYPE={ID_TOKEN_TOKEN:"id_token token",TOKEN:"token"},this.CONSTANTS={ACCESS_TOKEN:"access_token",EXPIRES_IN:"expires_in",ID_TOKEN:"id_token",ERROR_DESCRIPTION:"error_description",SESSION_STATE:"session_state",ERROR:"error",STORAGE:{TOKEN_KEYS:"adal.token.keys",ACCESS_TOKEN_KEY:"adal.access.token.key",EXPIRATION_KEY:"adal.expiration.key",STATE_LOGIN:"adal.state.login",STATE_RENEW:"adal.state.renew",NONCE_IDTOKEN:"adal.nonce.idtoken",SESSION_STATE:"adal.session.state",USERNAME:"adal.username",IDTOKEN:"adal.idtoken",ERROR:"adal.error",ERROR_DESCRIPTION:"adal.error.description",LOGIN_REQUEST:"adal.login.request",LOGIN_ERROR:"adal.login.error",RENEW_STATUS:"adal.token.renew.status",ANGULAR_LOGIN_REQUEST:"adal.angular.login.request"},RESOURCE_DELIMETER:"|",CACHE_DELIMETER:"||",LOADFRAME_TIMEOUT:6e3,TOKEN_RENEW_STATUS_CANCELED:"Canceled",TOKEN_RENEW_STATUS_COMPLETED:"Completed",TOKEN_RENEW_STATUS_IN_PROGRESS:"In Progress",LOGGING_LEVEL:{ERROR:0,WARN:1,INFO:2,VERBOSE:3},LEVEL_STRING_MAP:{0:"ERROR:",1:"WARNING:",2:"INFO:",3:"VERBOSE:"},POPUP_WIDTH:483,POPUP_HEIGHT:600},r.prototype._singletonInstance)return r.prototype._singletonInstance;if(r.prototype._singletonInstance=this,this.instance="https://login.microsoftonline.com/",this.config={},this.callback=null,this.popUp=!1,this.isAngular=!1,this._user=null,this._activeRenewals={},this._loginInProgress=!1,this._acquireTokenInProgress=!1,this._renewStates=[],this._callBackMappedToRenewStates={},this._callBacksMappedToRenewStates={},this._openedWindows=[],this._requestType=this.REQUEST_TYPE.LOGIN,window._adalInstance=this,e.displayCall&&"function"!=typeof e.displayCall)throw new Error("displayCall is not a function");if(!e.clientId)throw new Error("clientId is required");this.config=this._cloneConfig(e),void 0===this.config.navigateToLoginRequestUrl&&(this.config.navigateToLoginRequestUrl=!0),this.config.popUp&&(this.popUp=!0),this.config.callback&&"function"==typeof this.config.callback&&(this.callback=this.config.callback),this.config.instance&&(this.instance=this.config.instance),this.config.loginResource||(this.config.loginResource=this.config.clientId),this.config.redirectUri||(this.config.redirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.postLogoutRedirectUri||(this.config.postLogoutRedirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.anonymousEndpoints||(this.config.anonymousEndpoints=[]),this.config.isAngular&&(this.isAngular=this.config.isAngular),this.config.loadFrameTimeout&&(this.CONSTANTS.LOADFRAME_TIMEOUT=this.config.loadFrameTimeout)},"undefined"!=typeof window&&(window.Logging={piiLoggingEnabled:!1,level:0,log:function(e){}}),r.prototype.login=function(){if(this._loginInProgress)this.info("Login in progress");else{this._loginInProgress=!0;var e=this._guid();this.config.state=e,this._idTokenNonce=this._guid();var t=this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST);t&&""!==t?this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""):t=window.location.href,this.verbose("Expected state: "+e+" startPage:"+t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,e,!0),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var n=this._getNavigateUrl("id_token",null)+"&nonce="+encodeURIComponent(this._idTokenNonce);this.config.displayCall?this.config.displayCall(n):this.popUp?(this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._renewStates.push(e),this.registerCallback(e,this.config.clientId,this.callback),this._loginPopup(n)):this.promptUser(n)}},r.prototype._openPopup=function(e,t,n,r){try{var i=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,s=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,u=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a=s/2-n/2+i,c=u/2-r/2+o,l=window.open(e,t,"width="+n+", height="+r+", top="+c+", left="+a);return l.focus&&l.focus(),l}catch(e){return this.warn("Error opening popup, "+e.message),this._loginInProgress=!1,this._acquireTokenInProgress=!1,null}},r.prototype._handlePopupError=function(e,t,n,r,i){this.warn(r),this._saveItem(this.CONSTANTS.STORAGE.ERROR,n),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,r),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,i),t&&this._activeRenewals[t]&&(this._activeRenewals[t]=null),this._loginInProgress=!1,this._acquireTokenInProgress=!1,e&&e(r,null,n)},r.prototype._loginPopup=function(e,t,n){var r=this._openPopup(e,"login",this.CONSTANTS.POPUP_WIDTH,this.CONSTANTS.POPUP_HEIGHT),i=n||this.callback;if(null!=r){if(this._openedWindows.push(r),-1!=this.config.redirectUri.indexOf("#"))var o=this.config.redirectUri.split("#")[0];else o=this.config.redirectUri;var s=this,u=window.setInterval((function(){if(!r||r.closed||void 0===r.closed){var e="Popup Window closed",n="Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge";return s.isAngular&&s._broadcast("adal:popUpClosed",n+s.CONSTANTS.RESOURCE_DELIMETER+e),s._handlePopupError(i,t,e,n,n),void window.clearInterval(u)}try{var a=r.location;if(-1!=encodeURI(a.href).indexOf(encodeURI(o)))return s.isAngular?s._broadcast("adal:popUpHashChanged",a.hash):s.handleWindowCallback(a.hash),window.clearInterval(u),s._loginInProgress=!1,s._acquireTokenInProgress=!1,s.info("Closing popup window"),s._openedWindows=[],void r.close()}catch(e){}}),1)}else{var a="Popup Window is null. This can happen if you are using IE";this._handlePopupError(i,t,"Error opening popup",a,a)}},r.prototype._broadcast=function(e,t){!function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}if("function"==typeof window.CustomEvent)return!1;e.prototype=window.Event.prototype,window.CustomEvent=e}();var n=new CustomEvent(e,{detail:t});window.dispatchEvent(n)},r.prototype.loginInProgress=function(){return this._loginInProgress},r.prototype._hasResource=function(e){var t=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);return t&&!this._isEmpty(t)&&t.indexOf(e+this.CONSTANTS.RESOURCE_DELIMETER)>-1},r.prototype.getCachedToken=function(e){if(!this._hasResource(e))return null;var t=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e),n=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e),r=this.config.expireOffsetSeconds||300;return n&&n>this._now()+r?t:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e,0),null)},r.prototype.getCachedUser=function(){if(this._user)return this._user;var e=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(e),this._user},r.prototype.registerCallback=function(e,t,n){this._activeRenewals[t]=e,this._callBacksMappedToRenewStates[e]||(this._callBacksMappedToRenewStates[e]=[]);var r=this;this._callBacksMappedToRenewStates[e].push(n),this._callBackMappedToRenewStates[e]||(this._callBackMappedToRenewStates[e]=function(n,i,o,s){r._activeRenewals[t]=null;for(var u=0;u-1)){var t=this._user.profile.upn.split("@");e+="&domain_hint="+encodeURIComponent(t[t.length-1])}return e},r.prototype._createUser=function(e){var t=null,n=this._extractIdToken(e);return n&&n.hasOwnProperty("aud")&&(n.aud.toLowerCase()===this.config.clientId.toLowerCase()?(t={userName:"",profile:n},n.hasOwnProperty("upn")?t.userName=n.upn:n.hasOwnProperty("email")&&(t.userName=n.email)):this.warn("IdToken has invalid aud field")),t},r.prototype._getHash=function(e){return e.indexOf("#/")>-1?e=e.substring(e.indexOf("#/")+2):e.indexOf("#")>-1&&(e=e.substring(1)),e},r.prototype.isCallback=function(e){e=this._getHash(e);var t=this._deserialize(e);return t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},r.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},r.prototype.getRequestInfo=function(e){e=this._getHash(e);var t=this._deserialize(e),n={valid:!1,parameters:{},stateMatch:!1,stateResponse:"",requestType:this.REQUEST_TYPE.UNKNOWN};if(t&&(n.parameters=t,t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){n.valid=!0;var r;if(!t.hasOwnProperty("state"))return this.warn("No state returned"),n;if(this.verbose("State: "+t.state),r=t.state,n.stateResponse=r,this._matchState(n))return n;if(!n.stateMatch&&window.parent){n.requestType=this._requestType;for(var i=this._renewStates,o=0;o-1&&t+1-1)return null;if(this.config&&this.config.endpoints)for(var n in this.config.endpoints)if(e.indexOf(n)>-1)return this.config.endpoints[n];return e.indexOf("http://")>-1||e.indexOf("https://")>-1?this._getHostFromUri(e)===this._getHostFromUri(this.config.redirectUri)?this.config.loginResource:null:this.config.loginResource},r.prototype._getHostFromUri=function(e){var t=String(e).replace(/^(https?:)\/\//,"");return t.split("/")[0]},r.prototype.handleWindowCallback=function(e){if(null==e&&(e=window.location.hash),this.isCallback(e)){var t=null,n=!1;this._openedWindows.length>0&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(t=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,n=!0):window.parent&&window.parent._adalInstance&&(t=window.parent._adalInstance);var r,i,o=t.getRequestInfo(e),s=null;i=n||window.parent!==window?t._callBackMappedToRenewStates[o.stateResponse]:t.callback,t.info("Returned from redirect url"),t.saveTokenFromHash(o),o.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?t.verbose("Window is in iframe, acquiring token silently"):t.verbose("acquiring token interactive in progress"),r=o.parameters[t.CONSTANTS.ACCESS_TOKEN]||o.parameters[t.CONSTANTS.ID_TOKEN],s=t.CONSTANTS.ACCESS_TOKEN):o.requestType===this.REQUEST_TYPE.LOGIN&&(r=o.parameters[t.CONSTANTS.ID_TOKEN],s=t.CONSTANTS.ID_TOKEN);var u=o.parameters[t.CONSTANTS.ERROR_DESCRIPTION],a=o.parameters[t.CONSTANTS.ERROR];try{i&&i(u,r,a,s)}catch(e){t.error("Error occurred in user defined callback function: "+e)}window.parent!==window||n||(t.config.navigateToLoginRequestUrl?window.location.href=t._getItem(t.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash="")}},r.prototype._getNavigateUrl=function(e,t){var n="common";this.config.tenant&&(n=this.config.tenant);var r=this.instance+n+"/oauth2/authorize"+this._serialize(e,this.config,t)+this._addLibMetadata();return this.info("Navigate url:"+r),r},r.prototype._extractIdToken=function(e){var t=this._decodeJwt(e);if(!t)return null;try{var n=t.JWSPayload,r=this._base64DecodeStringUrlSafe(n);return r?JSON.parse(r):(this.info("The returned id_token could not be base64 url safe decoded."),null)}catch(e){this.error("The returned id_token could not be decoded",e)}return null},r.prototype._base64DecodeStringUrlSafe=function(e){return e=e.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(e))):decodeURIComponent(escape(this._decode(e)))},r.prototype._decode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=(e=String(e).replace(/=+$/,"")).length;if(n%4==1)throw new Error("The token to be decoded is not correctly encoded.");for(var r,i,o,s,u,a,c,l,p="",d=0;d>16&255,c=u>>8&255,p+=String.fromCharCode(a,c);break}if(d+1===n-1){a=(u=r<<18|i<<12)>>16&255,p+=String.fromCharCode(a);break}a=(u=r<<18|i<<12|o<<6|s)>>16&255,c=u>>8&255,l=255&u,p+=String.fromCharCode(a,c,l)}return p},r.prototype._decodeJwt=function(e){if(this._isEmpty(e))return null;var t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);return!t||t.length<4?(this.warn("The returned id_token is not parseable."),null):{header:t[1],JWSPayload:t[2],JWSSig:t[3]}},r.prototype._convertUrlSafeToRegularBase64EncodedString=function(e){return e.replace("-","+").replace("_","/")},r.prototype._serialize=function(e,t,n){var r=[];if(null!==t){r.push("?response_type="+e),r.push("client_id="+encodeURIComponent(t.clientId)),n&&r.push("resource="+encodeURIComponent(n)),r.push("redirect_uri="+encodeURIComponent(t.redirectUri)),r.push("state="+encodeURIComponent(t.state)),t.hasOwnProperty("slice")&&r.push("slice="+encodeURIComponent(t.slice)),t.hasOwnProperty("extraQueryParameter")&&r.push(t.extraQueryParameter);var i=t.correlationId?t.correlationId:this._guid();r.push("client-request-id="+encodeURIComponent(i))}return r.join("&")},r.prototype._deserialize=function(e){var t,n=/\+/g,r=/([^&=]+)=([^&]*)/g,i=function(e){return decodeURIComponent(e.replace(n," "))},o={};for(t=r.exec(e);t;)o[i(t[1])]=i(t[2]),t=r.exec(e);return o},r.prototype._decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},r.prototype._guid=function(){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues){var t=new Uint8Array(16);return e.getRandomValues(t),t[6]|=64,t[6]&=79,t[8]|=128,t[8]&=191,this._decimalToHex(t[0])+this._decimalToHex(t[1])+this._decimalToHex(t[2])+this._decimalToHex(t[3])+"-"+this._decimalToHex(t[4])+this._decimalToHex(t[5])+"-"+this._decimalToHex(t[6])+this._decimalToHex(t[7])+"-"+this._decimalToHex(t[8])+this._decimalToHex(t[9])+"-"+this._decimalToHex(t[10])+this._decimalToHex(t[11])+this._decimalToHex(t[12])+this._decimalToHex(t[13])+this._decimalToHex(t[14])+this._decimalToHex(t[15])}for(var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",r="0123456789abcdef",i=0,o="",s=0;s<36;s++)"-"!==n[s]&&"4"!==n[s]&&(i=16*Math.random()|0),"x"===n[s]?o+=r[i]:"y"===n[s]?(i&=3,o+=r[i|=8]):o+=n[s];return o},r.prototype._expiresIn=function(e){return e||(e=3599),this._now()+parseInt(e,10)},r.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},r.prototype._addAdalFrame=function(e){if(void 0!==e){this.info("Add adal frame to document:"+e);var t=document.getElementById(e);if(!t){if(document.createElement&&document.documentElement&&(window.opera||-1===window.navigator.userAgent.indexOf("MSIE 5.0"))){var n=document.createElement("iframe");n.setAttribute("id",e),n.setAttribute("aria-hidden","true"),n.style.visibility="hidden",n.style.position="absolute",n.style.width=n.style.height=n.borderWidth="0px",t=document.getElementsByTagName("body")[0].appendChild(n)}else document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeEnd",'');window.frames&&window.frames[e]&&(t=window.frames[e])}return t}},r.prototype._saveItem=function(e,t,n){if(this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation){if(!this._supportsLocalStorage())return this.info("Local storage is not supported"),!1;if(n){var r=this._getItem(e)||"";localStorage.setItem(e,r+t+this.CONSTANTS.CACHE_DELIMETER)}else localStorage.setItem(e,t);return!0}return this._supportsSessionStorage()?(sessionStorage.setItem(e,t),!0):(this.info("Session storage is not supported"),!1)},r.prototype._getItem=function(e){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?localStorage.getItem(e):(this.info("Local storage is not supported"),null):this._supportsSessionStorage()?sessionStorage.getItem(e):(this.info("Session storage is not supported"),null)},r.prototype._supportsLocalStorage=function(){try{return!!window.localStorage&&(window.localStorage.setItem("storageTest","A"),"A"==window.localStorage.getItem("storageTest")&&(window.localStorage.removeItem("storageTest"),!window.localStorage.getItem("storageTest")))}catch(e){return!1}},r.prototype._supportsSessionStorage=function(){try{return!!window.sessionStorage&&(window.sessionStorage.setItem("storageTest","A"),"A"==window.sessionStorage.getItem("storageTest")&&(window.sessionStorage.removeItem("storageTest"),!window.sessionStorage.getItem("storageTest")))}catch(e){return!1}},r.prototype._cloneConfig=function(e){if(null===e||"object"!=typeof e)return e;var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},r.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()},r.prototype.log=function(e,t,n,r){if(e<=Logging.level){if(!Logging.piiLoggingEnabled&&r)return;var i=(new Date).toUTCString(),o="";o=this.config.correlationId?i+":"+this.config.correlationId+"-"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[e]+" "+t:i+":"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[e]+" "+t,n&&(o+="\nstack:\n"+n.stack),Logging.log(o)}},r.prototype.error=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t)},r.prototype.warn=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null)},r.prototype.info=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null)},r.prototype.verbose=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null)},r.prototype.errorPii=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t,!0)},r.prototype.warnPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null,!0)},r.prototype.infoPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null,!0)},r.prototype.verbosePii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null,!0)},r.prototype._libVersion=function(){return"1.0.17"},e.exports&&(e.exports=r,e.exports.inject=function(e){return new r(e)}),r}()},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"App",(function(){return Un})),n.d(r,"AppCatalog",(function(){return Nn})),n.d(r,"Attachment",(function(){return kn})),n.d(r,"Attachments",(function(){return Dn})),n.d(r,"ClientsidePageFromFile",(function(){return Xn})),n.d(r,"CreateClientsidePage",(function(){return Jn})),n.d(r,"CanvasColumn",(function(){return Yn})),n.d(r,"CanvasSection",(function(){return $n})),n.d(r,"ClientsideText",(function(){return er})),n.d(r,"ClientsideWebpart",(function(){return tr})),n.d(r,"ColumnControl",(function(){return Zn})),n.d(r,"PromotedState",(function(){return jn})),n.d(r,"Comment",(function(){return Wn})),n.d(r,"Comments",(function(){return qn})),n.d(r,"Replies",(function(){return Hn})),n.d(r,"ContentType",(function(){return cr})),n.d(r,"ContentTypes",(function(){return ur})),n.d(r,"FieldLink",(function(){return hr})),n.d(r,"FieldLinks",(function(){return pr})),n.d(r,"Feature",(function(){return vr})),n.d(r,"Features",(function(){return yr})),n.d(r,"Fields",(function(){return Cr})),n.d(r,"Field",(function(){return Rr})),n.d(r,"AddFieldOptions",(function(){return Tr})),n.d(r,"CalendarType",(function(){return Pr})),n.d(r,"ChoiceFieldFormatType",(function(){return _r})),n.d(r,"DateTimeFieldFormatType",(function(){return br})),n.d(r,"DateTimeFieldFriendlyFormatType",(function(){return Sr})),n.d(r,"FieldTypes",(function(){return mr})),n.d(r,"FieldUserSelectionMode",(function(){return Ir})),n.d(r,"UrlFieldFormatType",(function(){return wr})),n.d(r,"File",(function(){return In})),n.d(r,"Files",(function(){return Pn})),n.d(r,"CheckinType",(function(){return Zt})),n.d(r,"MoveOperations",(function(){return en})),n.d(r,"TemplateFileType",(function(){return tn})),n.d(r,"Version",(function(){return En})),n.d(r,"Versions",(function(){return On})),n.d(r,"Folder",(function(){return or})),n.d(r,"Folders",(function(){return rr})),n.d(r,"Form",(function(){return xr})),n.d(r,"Forms",(function(){return Ar})),n.d(r,"HubSite",(function(){return Fr})),n.d(r,"HubSites",(function(){return Lr})),n.d(r,"Item",(function(){return At})),n.d(r,"Items",(function(){return Rt})),n.d(r,"ItemVersion",(function(){return Lt})),n.d(r,"ItemVersions",(function(){return xt})),n.d(r,"PagedItemCollection",(function(){return kt})),n.d(r,"List",(function(){return Ct})),n.d(r,"Lists",(function(){return _t})),n.d(r,"ControlMode",(function(){return wt})),n.d(r,"RenderListDataOptions",(function(){return Pt})),n.d(r,"Navigation",(function(){return Wr})),n.d(r,"NavigationNode",(function(){return qr})),n.d(r,"NavigationNodes",(function(){return jr})),n.d(r,"NavigationService",(function(){return Hr})),n.d(r,"spODataEntity",(function(){return lt})),n.d(r,"spODataEntityArray",(function(){return pt})),n.d(r,"Profiles",(function(){return zr})),n.d(r,"UrlZone",(function(){return Kr})),n.d(r,"RegionalSettings",(function(){return ei})),n.d(r,"TimeZone",(function(){return ni})),n.d(r,"TimeZones",(function(){return ii})),n.d(r,"RelatedItemManager",(function(){return hi})),n.d(r,"SortDirection",(function(){return mi})),n.d(r,"ReorderingRuleMatchType",(function(){return bi})),n.d(r,"QueryPropertyValueType",(function(){return Si})),n.d(r,"SearchBuiltInSourceId",(function(){return Ci})),n.d(r,"SearchQueryBuilder",(function(){return vi})),n.d(r,"SearchResults",(function(){return Ii})),n.d(r,"Search",(function(){return wi})),n.d(r,"Suggest",(function(){return Oi})),n.d(r,"RoleAssignment",(function(){return Ki})),n.d(r,"RoleAssignments",(function(){return Vi})),n.d(r,"RoleDefinition",(function(){return Ji})),n.d(r,"RoleDefinitions",(function(){return zi})),n.d(r,"PermissionKind",(function(){return Ei})),n.d(r,"SPSharedObjectType",(function(){return Ni})),n.d(r,"SharingDomainRestrictionMode",(function(){return Ai})),n.d(r,"SharingLinkKind",(function(){return xi})),n.d(r,"SharingOperationStatusCode",(function(){return Ui})),n.d(r,"SharingRole",(function(){return Ri})),n.d(r,"RoleType",(function(){return Di})),n.d(r,"SiteDesigns",(function(){return vo})),n.d(r,"SiteGroup",(function(){return Gi})),n.d(r,"SiteGroups",(function(){return Mi})),n.d(r,"SiteScripts",(function(){return To})),n.d(r,"SiteUser",(function(){return Bi})),n.d(r,"SiteUsers",(function(){return ki})),n.d(r,"Site",(function(){return gt})),n.d(r,"MySocial",(function(){return Ao})),n.d(r,"Social",(function(){return Eo})),n.d(r,"SocialActorType",(function(){return wo})),n.d(r,"SocialActorTypes",(function(){return Io})),n.d(r,"SocialFollowResult",(function(){return _o})),n.d(r,"SocialStatusCode",(function(){return Oo})),n.d(r,"Utilities",(function(){return Do})),n.d(r,"Subscription",(function(){return jo})),n.d(r,"Subscriptions",(function(){return Fo})),n.d(r,"UserCustomAction",(function(){return pi})),n.d(r,"UserCustomActions",(function(){return ci})),n.d(r,"UserCustomActionRegistrationType",(function(){return si})),n.d(r,"UserCustomActionScope",(function(){return ui})),n.d(r,"View",(function(){return Vo})),n.d(r,"ViewFields",(function(){return Ko})),n.d(r,"Views",(function(){return Go})),n.d(r,"ViewScope",(function(){return Mo})),n.d(r,"WebPartsPersonalizationScope",(function(){return Qo})),n.d(r,"WebPartDefinitions",(function(){return Yo})),n.d(r,"WebPartDefinition",(function(){return es})),n.d(r,"LimitedWebPartManager",(function(){return Xo})),n.d(r,"Web",(function(){return St})),n.d(r,"Webs",(function(){return mt})),n.d(r,"SharePointQueryableInstance",(function(){return rt})),n.d(r,"SharePointQueryableCollection",(function(){return tt})),n.d(r,"SharePointQueryable",(function(){return Ze})),n.d(r,"spInvokableFactory",(function(){return $e})),n.d(r,"SPBatch",(function(){return dt})),n.d(r,"defaultPath",(function(){return st})),n.d(r,"spGet",(function(){return He})),n.d(r,"spPost",(function(){return Ke})),n.d(r,"spDelete",(function(){return Qe})),n.d(r,"spPatch",(function(){return ze})),n.d(r,"spPostDelete",(function(){return Xe})),n.d(r,"spPostDeleteETag",(function(){return Je})),n.d(r,"SPHttpClient",(function(){return Me})),n.d(r,"SPRest",(function(){return ht})),n.d(r,"sp",(function(){return ts})),n.d(r,"PrincipalType",(function(){return qt})),n.d(r,"PrincipalSource",(function(){return Gt})),n.d(r,"PageType",(function(){return Wt})),n.d(r,"toAbsoluteUrl",(function(){return Ge})),n.d(r,"extractWebUrl",(function(){return Be})),n.d(r,"objectToSPKeyValueCollection",(function(){return Vt})),n.d(r,"stripInvalidFileFolderChars",(function(){return zt})),n.d(r,"containsInvalidFileFolderChars",(function(){return Qt}));var i={};n.r(i),n.d(i,"Attachment",(function(){return vs})),n.d(i,"Attachments",(function(){return ms})),n.d(i,"Calendar",(function(){return Es})),n.d(i,"Calendars",(function(){return Cs})),n.d(i,"Event",(function(){return Rs})),n.d(i,"Events",(function(){return Ns})),n.d(i,"Contact",(function(){return Ls})),n.d(i,"ContactFolder",(function(){return Fs})),n.d(i,"ContactFolders",(function(){return Bs})),n.d(i,"Contacts",(function(){return ks})),n.d(i,"Conversation",(function(){return cs})),n.d(i,"Conversations",(function(){return ls})),n.d(i,"Post",(function(){return fs})),n.d(i,"Posts",(function(){return ys})),n.d(i,"Senders",(function(){return gs})),n.d(i,"Thread",(function(){return ps})),n.d(i,"Threads",(function(){return ds})),n.d(i,"DirectoryObjectTypes",(function(){return bs})),n.d(i,"DirectoryObject",(function(){return Ps})),n.d(i,"DirectoryObjects",(function(){return ws})),n.d(i,"Group",(function(){return _s})),n.d(i,"GroupType",(function(){return Ss})),n.d(i,"Groups",(function(){return Os})),n.d(i,"Insights",(function(){return js})),n.d(i,"SharedInsight",(function(){return Vs})),n.d(i,"SharedInsights",(function(){return Hs})),n.d(i,"TrendingInsight",(function(){return Ms})),n.d(i,"TrendingInsights",(function(){return qs})),n.d(i,"UsedInsight",(function(){return Gs})),n.d(i,"UsedInsights",(function(){return Ws})),n.d(i,"Resource",(function(){return Ks})),n.d(i,"Invitations",(function(){return Qs})),n.d(i,"Member",(function(){return zs})),n.d(i,"Members",(function(){return Xs})),n.d(i,"MailFolder",(function(){return Ys})),n.d(i,"MailFolders",(function(){return Zs})),n.d(i,"MailboxSettings",(function(){return eu})),n.d(i,"Message",(function(){return Js})),n.d(i,"Messages",(function(){return $s})),n.d(i,"Drive",(function(){return tu})),n.d(i,"DriveItem",(function(){return iu})),n.d(i,"DriveItems",(function(){return ou})),n.d(i,"Drives",(function(){return nu})),n.d(i,"Root",(function(){return ru})),n.d(i,"Notebook",(function(){return uu})),n.d(i,"Notebooks",(function(){return au})),n.d(i,"OneNote",(function(){return su})),n.d(i,"Section",(function(){return cu})),n.d(i,"Sections",(function(){return lu})),n.d(i,"Photo",(function(){return pu})),n.d(i,"Bucket",(function(){return vu})),n.d(i,"Buckets",(function(){return mu})),n.d(i,"Plan",(function(){return hu})),n.d(i,"Planner",(function(){return du})),n.d(i,"Plans",(function(){return fu})),n.d(i,"Task",(function(){return yu})),n.d(i,"Tasks",(function(){return gu})),n.d(i,"Subscription",(function(){return bu})),n.d(i,"Subscriptions",(function(){return Su})),n.d(i,"Channel",(function(){return wu})),n.d(i,"Channels",(function(){return Iu})),n.d(i,"Tab",(function(){return _u})),n.d(i,"Tabs",(function(){return Ou})),n.d(i,"Team",(function(){return Tu})),n.d(i,"Teams",(function(){return Pu})),n.d(i,"User",(function(){return Us})),n.d(i,"Users",(function(){return xs})),n.d(i,"People",(function(){return Ds})),n.d(i,"graph",(function(){return Sn})),n.d(i,"GraphRest",(function(){return bn}));var o,s=function(){function e(){}return Object.defineProperty(e,"activeLogLevel",{get:function(){return e.instance.activeLogLevel},set:function(t){e.instance.activeLogLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return void 0!==e._instance&&null!==e._instance||(e._instance=new u),e._instance},enumerable:!0,configurable:!0}),e.subscribe=function(){for(var t=[],n=0;n=0;u--)(i=e[u])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function D(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(s,u)}a((r=r.apply(e,t||[])).next())}))}function L(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function F(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function B(){for(var e=[],t=0;t0&&(n=60*this.defaultTimeoutMinutes),t=p(new Date,"second",n)}return P({pnp:1,expiration:t,value:e})},e.prototype.cacheExpirationHandler=function(){var e=this;this.enabled&&this.deleteExpired().then((function(t){setTimeout(l(e,e.cacheExpirationHandler),N.cacheExpirationIntervalMilliseconds)})).catch(console.error)},e}(),Q=function(){function e(e){void 0===e&&(e=new Map),this._store=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this._store.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this._store.clear()},e.prototype.getItem=function(e){return this._store.get(e)},e.prototype.key=function(e){return Array.from(this._store)[e][0]},e.prototype.removeItem=function(e){this._store.delete(e)},e.prototype.setItem=function(e,t){this._store.set(e,t)},e}(),z=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this._local=e,this._session=t}return Object.defineProperty(e.prototype,"local",{get:function(){return null===this._local&&(this._local=new K("undefined"==typeof localStorage?new Q:localStorage)),this._local},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"session",{get:function(){return null===this._session&&(this._session=new K("undefined"==typeof sessionStorage?new Q:sessionStorage)),this._session},enumerable:!0,configurable:!0}),e}(),X=function(){function e(e){void 0===e&&(e=new Map),this._settings=e}return e.prototype.add=function(e,t){this._settings.set(e,t)},e.prototype.addJSON=function(e,t){this._settings.set(e,P(t))},e.prototype.apply=function(e){var t=this;return new Promise((function(n,r){try{t._settings=C(t._settings,O(e)),n()}catch(e){r(e)}}))},e.prototype.load=function(e){var t=this;return new Promise((function(n,r){e.getConfiguration().then((function(e){t._settings=C(t._settings,O(e)),n()})).catch(r)}))},e.prototype.get=function(e){return this._settings.get(e)||null},e.prototype.getJSON=function(e){var t=this.get(e);return null==t?t:JSON.parse(t)},e}(),J=function(){function e(e,t,n){this.wrappedProvider=e,this.cacheKey=t,this.wrappedProvider=e,this.store=n||this.selectPnPCache()}return e.prototype.getWrappedProvider=function(){return this.wrappedProvider},e.prototype.getConfiguration=function(){var e=this;return this.store&&this.store.enabled?this.store.getOrPut(this.cacheKey,(function(){return e.wrappedProvider.getConfiguration().then((function(t){return e.store.put(e.cacheKey,t),t}))})):this.wrappedProvider.getConfiguration()},e.prototype.selectPnPCache=function(){var e=new z;if(e.local&&e.local.enabled)return e.local;if(e.session&&e.session.enabled)return e.session;throw Error("Cannot create a caching configuration provider since cache is not available.")},e}(),$=function(){function e(e){void 0===e&&(e=f()),this._batchId=e,this._reqs=[],this._deps=[],this._rDeps=[],this._index=-1}return Object.defineProperty(e.prototype,"batchId",{get:function(){return this._batchId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._reqs.sort((function(e,t){return e.index-t.index}))},enumerable:!0,configurable:!0}),e.prototype.track=function(e){e.data.batch=this,(void 0===e.data.batchIndex||e.data.batchIndex<0)&&(e.data.batchIndex=++this._index)},e.prototype.add=function(e){var t={id:e.requestId,index:e.batchIndex,method:e.method.toUpperCase(),options:e.options,parser:e.parser,reject:null,resolve:null,url:e.url},n=new Promise((function(e,n){t.resolve=e,t.reject=n}));return this._reqs.push(t),n},e.prototype.addDependency=function(){var e=function(){};return this._deps.push(new Promise((function(t){e=t}))),e},e.prototype.addResolveBatchDependency=function(e){this._rDeps.push(e)},e.prototype.execute=function(){var e=this;return Promise.all(this._deps).then((function(){return Promise.all(e._deps)})).then((function(){return e.executeImpl()})).then((function(){return Promise.all(e._rDeps)})).then((function(){}))},e}(),Y=function(){function e(e,t,n){void 0===t&&(t=N.defaultCachingStore),void 0===n&&(n=p(new Date,"second",N.defaultCachingTimeoutSeconds)),this.key=e,this.storeName=t,this.expiration=n}return Object.defineProperty(e.prototype,"store",{get:function(){return"local"===this.storeName?e.storage.local:e.storage.session},enumerable:!0,configurable:!0}),e.storage=new z,e}(),Z=function(){function e(e,t){this.parser=e,this.cacheOptions=t}return e.prototype.parse=function(e){var t=this;return this.parser.parse(e).then((function(e){return t.cacheData(e)}))},e.prototype.cacheData=function(e){return null!==this.cacheOptions.store&&this.cacheOptions.store.put(this.cacheOptions.key,e,this.cacheOptions.expiration),e},e}();function ee(e,t,n,r){Reflect.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get:function(){return n(this,r)}})}var te=!1,ne=[],re=Symbol("__extensions"),ie=function(e){te=!0,ue(ne,e)},oe=function(e,t){return te=!0,Reflect.has(e,re)||Reflect.set(e,re,[]),ue(Reflect.get(e,re),t),e},se=function(e,t){te=!0,void 0===e.__proto__[re]&&(e.__proto__[re]=[]),ue(e.__proto__[re],t)};function ue(e,t){v(t)?e.push.apply(e,B(t)):e.push(t)}var ae=function(){ne.length=0},ce=function(){te=!1},le=function(){te=!0},pe=function(e,t){var n=e(t);return e.__proto__[re]&&(n=oe(n,e.__proto__[re])),n};function de(e,t,n){for(var r=[],i=3;i0?JSON.parse(e):{}})).then((function(e){return t(r.parseODataJSON(e))})).catch((function(e){return n(e)}))},e.prototype.handleError=function(e,t){return e.ok||Te.init(e).then(t),e.ok},e.prototype.parseODataJSON=function(e){var t=e;return w(e,"d")?t=w(e.d,"results")?e.d.results:e.d:w(e,"value")&&(t=e.value),t},e}(),ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.parseImpl=function(e,t){e.text().then(t)},t}(ye),ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.parseImpl=function(e,t){e.blob().then(t)},t}(ye),me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.parseImpl=function(e,t){e.json().then(t)},t}(ye),be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.parseImpl=function(e,t){y(e.arrayBuffer)?e.arrayBuffer().then(t):e.buffer().then(t)},t}(ye),Se=function(e){function t(t){var n=e.call(this)||this;return n.parser=t,n}return U(t,e),t.prototype.parseImpl=function(e,t){this.parser(e).then(t)},t}(ye),Te=function(e){function t(t,n,r,i){void 0===r&&(r=n.status),void 0===i&&(i=n.statusText);var o=e.call(this,t)||this;return o.response=n,o.status=r,o.statusText=i,o.isHttpRequestError=!0,o}return U(t,e),t.init=function(e){return D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,e.clone().text()];case 1:return n=r.sent(),[2,new t("Error making HttpClient request in queryable ["+e.status+"] "+e.statusText+" ::> "+n,e.clone())]}}))}))},t}(Error);function Pe(e){var t=JSON.stringify(e,(function(e,t){switch(e){case"query":return JSON.stringify(B(t));case"batch":case"batchDependency":case"cachingOptions":case"clientFactory":case"parser":return"-";default:return t}}),0),n=JSON.parse(t,(function(t,n){switch(t){case"query":return new Map(JSON.parse(n));case"batch":return e.batch;case"batchDependency":return e.batchDependency;case"cachingOptions":return e.cachingOptions;case"clientFactory":return e.clientFactory;case"parser":return e.parser;default:return n}}));return e.options&&e.options.body&&(n.options.body=e.options.body),n}var we=function(){function e(e){void 0===e&&(e={}),this._data=Object.assign({},{cloneParentWasCaching:!1,options:{},parentUrl:"",parser:new ye,query:new Map,url:"",useCaching:!1},Pe(e))}return Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(e){this._data=Object.assign({},Pe(this.data),Pe(e))},enumerable:!0,configurable:!0}),e.prototype.toUrl=function(){return this.data.url},e.prototype.concat=function(e){return this.data.url+=e,this},Object.defineProperty(e.prototype,"query",{get:function(){return this.data.query},enumerable:!0,configurable:!0}),e.prototype.configure=function(e){return q(this.data.options,e),this},e.prototype.configureFrom=function(e){return q(this.data.options,e.data.options),this},e.prototype.usingCaching=function(e){return N.globalCacheDisable||(this.data.useCaching=!0,void 0!==e&&(this.data.cachingOptions=e)),this},e.prototype.usingParser=function(e){return this.data.parser=e,this},e.prototype.withPipeline=function(e){return this.data.pipes=e.slice(0),this},e.prototype.append=function(e){this.data.url=d(this.data.url,e)},e.prototype.inBatch=function(e){if(this.hasBatch)throw Error("This query is already part of a batch.");return g(e)&&e.track(this),this},e.prototype.addBatchDependency=function(){return g(this.data.batch)?this.data.batch.addDependency():function(){return null}},Object.defineProperty(e.prototype,"hasBatch",{get:function(){return g(this.data.batch)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"batch",{get:function(){return this.hasBatch?this.data.batch:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentUrl",{get:function(){return this.data.parentUrl},enumerable:!0,configurable:!0}),e.prototype.cloneTo=function(e,t){return void 0===t&&(t={includeBatch:!0}),e.data=Object.assign({},Pe(this.data),{batch:null,cloneParentCacheOptions:null,cloneParentWasCaching:!1},Pe(e.data)),e.configureFrom(this),t.includeBatch&&e.inBatch(this.batch),this.data.useCaching&&(e.data.cloneParentWasCaching=!0,e.data.cloneParentCacheOptions=this.data.cachingOptions),e},e}();function Ie(e,t){return new Promise((function(n){e.result=t,e.hasResult=!0,n(e)}))}function _e(e){return e.pipes.length>0?e.pipes.shift()(e):Promise.resolve(e)}function Oe(e){if(e.pipes.length<1)throw s.write("["+e.requestId+"] ("+(new Date).getTime()+") Request pipeline contains no methods!",3),Error("Request pipeline contains no methods!");var t=_e(e).then((function(e){return function(e){return s.log({data:0===s.activeLogLevel?e.result:{},level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Returning result from pipeline. Set logging to verbose to see data."}),Promise.resolve(e.result)}(e)})).catch((function(e){throw s.error(e),e}));return e.isBatched&&e.batch.addResolveBatchDependency(t),t}function Ce(e){return void 0===e&&(e=!1),function(t,n,r){var i=r.value;r.value=function(){for(var r=[],o=0;o0&&w(r[0],"hasResult")&&r[0].hasResult?(s.write("["+r[0].requestId+"] ("+(new Date).getTime()+") Skipping request pipeline method "+n+", existing result in pipeline.",0),Promise.resolve(r[0])):(s.write("["+r[0].requestId+"] ("+(new Date).getTime()+") Calling request pipeline method "+n+".",0),i.apply(t,r).then((function(e){return _e(e)})))}}}var Ee=function(){function e(){}return e.logStart=function(e){return new Promise((function(t){s.log({data:1===s.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Beginning "+e.method+" request ("+e.url+")"}),t(e)}))},e.caching=function(e){return new Promise((function(t){if(e.useCaching){s.write("["+e.requestId+"] ("+(new Date).getTime()+") Caching is enabled for request, checking cache...",1);var n=new Y(e.url.toLowerCase());if(void 0!==e.cachingOptions&&(n=m(n,e.cachingOptions)),null!==n.store){var r=n.store.get(n.key);if(null!==r)return s.log({data:1===s.activeLogLevel?{}:r,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Value returned from cache."}),y(e.batchDependency)&&e.batchDependency(),w(e.parser,"hydrate")&&(r=e.parser.hydrate(r)),Ie(e,r).then((function(e){return t(e)}))}s.write("["+e.requestId+"] ("+(new Date).getTime()+") Value not found in cache.",1),e.parser=new Z(e.parser,n)}return t(e)}))},e.send=function(e){return new Promise((function(t,n){if(e.isBatched){var r=e.batch.add(e);y(e.batchDependency)&&e.batchDependency(),s.write("["+e.requestId+"] ("+(new Date).getTime()+") Batching request in batch "+e.batch.batchId+".",1),t(Ie(e,r))}else{s.write("["+e.requestId+"] ("+(new Date).getTime()+") Sending request.",1);var i=e.clientFactory(),o=m(e.options||{},{method:e.method});i.fetch(e.url,o).then((function(t){return e.parser.parse(t)})).then((function(t){return Ie(e,t)})).then((function(e){return t(e)})).catch((function(e){return n(e)}))}}))},e.logEnd=function(e){return new Promise((function(t){e.isBatched?s.log({data:1===s.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") "+e.method+" request will complete in batch "+e.batch.batchId+"."}):s.log({data:1===s.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Completing "+e.method+" request."}),t(e)}))},x([Ce(!0)],e,"logStart",null),x([Ce()],e,"caching",null),x([Ce()],e,"send",null),x([Ce(!0)],e,"logEnd",null),e}();function Re(){return[Ee.logStart,Ee.caching,Ee.send,Ee.logEnd].slice(0)}function Ne(e){return function(t){return function(n){return function(r){return Oe(Object.assign({},{batch:null,batchDependency:null,batchIndex:-1,cachingOptions:null,clientFactory:t,cloneParentCacheOptions:null,cloneParentWasCaching:!1,hasResult:!1,isBatched:g(r.batch),method:n,options:null,parentUrl:"",parser:new ye,pipes:e.slice(0),query:new Map,requestId:f(),url:"",useCaching:/^get$/i.test(r.method)&&r.useCaching},Pe(r)))}}}}var Ae=Ne(Re());function Ue(e,t){return Object.assign({body:P(e)},t)}function xe(e,t){return Object.assign({headers:e},t)}function De(e){return{__metadata:{type:e}}}var Le="00000000-0000-0000-0000-000000000000";function ke(e){N.assign(e)}var Fe=new(function(){function e(){}return Object.defineProperty(e.prototype,"headers",{get:function(){var e=N.get("sp");return void 0!==e&&void 0!==e.headers?e.headers:{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseUrl",{get:function(){var e=N.get("sp");return void 0!==e&&void 0!==e.baseUrl?e.baseUrl:g(N.spfxContext)?N.spfxContext.pageContext.web.absoluteUrl:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fetchClientFactory",{get:function(){var e=N.get("sp");return void 0!==e&&void 0!==e.fetchClientFactory?e.fetchClientFactory:function(){return new W}},enumerable:!0,configurable:!0}),e}());function Be(e){if(S(e))return"";var t=e.indexOf("_api/");return t<0&&(t=e.indexOf("_vti_bin/")),t>-1?e.substr(0,t):e}function je(e){return function(t,n,r){void 0===r&&(r=Object.getOwnPropertyDescriptor(t,n));var i=r.value;return r.value=function(){for(var t=[],n=0;n32&&(o=o.substr(0,32)),r.append("X-ClientService-ClientTag",o)),!(n=m(n,{headers:r})).method||"GET"===n.method.toUpperCase()||r.has("X-RequestDigest")||r.has("Authorization")?[3,2]:[4,this._digestCache(Be(e))];case 1:s=u.sent(),r.append("X-RequestDigest",s),u.label=2;case 2:return[2,this.fetchRaw(e,n)]}}))}))},e.prototype.fetchRaw=function(e,t){var n=this;void 0===t&&(t={});var r=new Headers;M(r,t.headers),t=m(t,{headers:r});var i=function(r){var o=function(e){var t;e.headers.has("Retry-After")?t=1e3*parseInt(e.headers.get("Retry-After"),10):(t=r.delay,r.delay*=2),r.attempts++,r.retryCount<=r.attempts?r.reject(Error("Retry count exceeded ("+r.retryCount+") for request. Response status: ["+e.status+"] "+e.statusText)):setTimeout(l(n,i,r),t)};n._impl.fetch(e,t).then((function(e){429===e.status?o(e):r.resolve(e)})).catch((function(e){503===e.status||504===e.status?o(e):r.reject(e)}))};return new Promise((function(e,t){i.call(n,{attempts:0,delay:100,reject:t,resolve:e,retryCount:7})}))},e.prototype.get=function(e,t){void 0===t&&(t={});var n=m(t,{method:"GET"});return this.fetch(e,n)},e.prototype.post=function(e,t){void 0===t&&(t={});var n=m(t,{method:"POST"});return this.fetch(e,n)},e.prototype.patch=function(e,t){void 0===t&&(t={});var n=m(t,{method:"PATCH"});return this.fetch(e,n)},e.prototype.delete=function(e,t){void 0===t&&(t={});var n=m(t,{method:"DELETE"});return this.fetch(e,n)},e}(),qe=new Map;function Ge(e){return new Promise((function(t){if(b(e))return t(e);if(null!==Fe.baseUrl)return t(d(Fe.baseUrl,e));if(void 0!==j.a._spPageContextInfo){if(w(j.a._spPageContextInfo,"webAbsoluteUrl"))return t(d(j.a._spPageContextInfo.webAbsoluteUrl,e));if(w(j.a._spPageContextInfo,"webServerRelativeUrl"))return t(d(j.a._spPageContextInfo.webServerRelativeUrl,e))}if(void 0!==j.a.location){var n=j.a.location.toString().toLowerCase();["/_layouts/","/siteassets/"].forEach((function(r){var i=n.indexOf(r);if(i>0)return t(d(n.substr(0,i),e))}))}return t(e)}))}var We=Ae((function(){return new Me})),Ve=function(e){var t=We(e);return function(e,n){return D(this,void 0,void 0,(function(){var r,i,o;return L(this,(function(s){switch(s.label){case 0:return r=Pe(e.data),i=g(r.batch)?r.batch.addDependency():function(){},[4,Ge(e.toUrlAndQuery())];case 1:return o=s.sent(),q(r.options,n),[2,t(Object.assign({},r,{batchDependency:i,url:o}))]}}))}))}},He=function(e,t){return e.data.cloneParentWasCaching&&e.usingCaching(e.data.cloneParentCacheOptions),e._forceCaching&&(e.data.useCaching=!0),Ve("GET")(e,t)},Ke=Ve("POST"),Qe=Ve("DELETE"),ze=Ve("PATCH"),Xe=function(e,t){var n=Object.assign(xe({"X-HTTP-Method":"DELETE"}),t);return Ke(e,n)},Je=function(e,t,n){void 0===n&&(n="*");var r=Object.assign(xe({"X-HTTP-Method":"DELETE","IF-Match":n}),t);return Ke(e,r)},$e=function(e){return fe(e)},Ye=function(e){function t(t,n){var r=this,i="",o="",s=new Map;if("string"==typeof t)if(b(t)||t.lastIndexOf("/")<0)o=t,i=d(t,n);else if(t.lastIndexOf("/")>t.lastIndexOf("(")){var u=t.lastIndexOf("/");o=t.slice(0,u),n=d(t.slice(u),n),i=d(o,n)}else{u=t.lastIndexOf("(");o=t.slice(0,u),i=d(t,n)}else{i=d(o=t.toUrl(),n||"");var a=t.query.get("@target");void 0!==a&&s.set("@target",a)}return r=e.call(this,{parentUrl:o,query:s,url:i})||this,"string"!=typeof t&&r.configureFrom(t),r._forceCaching=!1,r}return U(t,e),t.prototype.toUrlAndQuery=function(){var e=new Map(this.query),t=this.toUrl().replace(/'!(@.*?)::(.*?)'/gi,(function(t,n,r){return s.write("Rewriting aliased parameter from match "+t+" to label: "+n+" value: "+r,0),e.set(n,"'"+r+"'"),n}));if(e.size>0){var n=t.indexOf("?")>-1?"&":"?";t+=""+n+Array.from(e).map((function(e){return e[0]+"="+e[1]})).join("&")}return t},t.prototype.select=function(){for(var e=[],t=0;t0&&this.query.set("$select",e.join(",")),this},t.prototype.get=function(e){return He(this,e)},t.prototype.expand=function(){for(var e=[],t=0;t0&&this.query.set("$expand",e.join(",")),this},t.prototype.clone=function(t,n,r){void 0===r&&(r=!0);var i=e.prototype.cloneTo.call(this,t(this,n),{includeBatch:r}),o="@target";return this.query.has(o)&&i.query.set(o,this.query.get(o)),i},t.prototype.defaultAction=function(e){return He(this,e)},t.prototype.getParent=function(e,t,n,r){void 0===t&&(t=this.parentUrl);var i=e(t,n).configureFrom(this),o="@target";return this.query.has(o)&&i.query.set(o,this.query.get(o)),void 0!==r&&(i=i.inBatch(r)),i},t}(we),Ze=$e(Ye),et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.filter=function(e){return this.query.set("$filter",e),this},t.prototype.orderBy=function(e,t){void 0===t&&(t=!0);var n="$orderby",r=this.query.has(n)?this.query.get(n).split(","):[];return r.push(e+" "+(t?"asc":"desc")),this.query.set(n,r.join(",")),this},t.prototype.skip=function(e){return this.query.set("$skip",e.toString()),this},t.prototype.top=function(e){return this.query.set("$top",e.toString()),this},t}(Ye),tt=$e(et),nt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype._update=function(e,t){var n=this;return function(r){return Ke(je.configure(n,e+".Update"),{body:P(m(De(e),r)),headers:{"X-HTTP-Method":"MERGE"}}).then((function(e){return t(e,r)}))}},t}(Ye),rt=$e(nt);function it(e){return function(){return Xe(je.configure(this,e+".delete"))}}function ot(e){return function(t){return void 0===t&&(t="*"),Je(je.configure(this,e+".delete"),{},t)}}function st(e){return function(t){return function(t){function n(){for(var n=[],r=0;r1&&void 0!==n[1]?n[1]:e)||this}return U(n,t),n}(t)}}function ut(e){var t=[],n=["odata.type","odata.editLink","__metadata","odata.metadata","odata.id"];if(w(e,n[0])&&"SP.Web"===e[n[0]])w(e,n[4])?t.push(e[n[4]]):w(e,n[2])&&t.push(e.__metadata.uri);else if(w(e,n[3])&&w(e,n[1])){var r=b(e[n[1]])?e[n[1]].split("_api")[1]:e[n[1]];t.push(Be(e[n[3]]),"_api",r)}else w(e,n[1])?t.push("_api",e[n[1]]):w(e,n[2])&&t.push(e.__metadata.uri);return t.length<1?(s.write("No uri information found in ODataEntity parsing, chaining will fail for this object.",2),""):d.apply(void 0,B(t))}var at=function(e){function t(t){var n=e.call(this)||this;return n.factory=t,n.hydrate=function(e){return m(n.factory(ut(e),null),e)},n}return U(t,e),t.prototype.parse=function(t){var n=this;return e.prototype.parse.call(this,t).then((function(e){return m(n.factory(ut(e),null),e)}))},t}(ye),ct=function(e){function t(t){var n=e.call(this)||this;return n.factory=t,n.hydrate=function(e){return e.map((function(e){return m(n.factory(ut(e),null),e)}))},n}return U(t,e),t.prototype.parse=function(t){var n=this;return e.prototype.parse.call(this,t).then((function(e){return e.map((function(e){return m(n.factory(ut(e),null),e)}))}))},t}(ye);function lt(e){return new at(e)}function pt(e){return new ct(e)}var dt=function(e){function t(t){var n=e.call(this)||this;return n.baseUrl=t,n}return U(t,e),t.ParseResponse=function(e){for(var t,n,r=[],i=new RegExp("^HTTP/[0-9.]+ +([0-9]+) +(.*)","i"),o=e.split("\n"),s="batch",u=0;u0&&(r.push("--changeset_"+i+"--\n\n"),i=""),r.push("--batch_"+this.batchId+"\n")):(i.length<1&&(i=f(),r.push("--batch_"+this.batchId+"\n"),r.push('Content-Type: multipart/mixed; boundary="changeset_'+i+'"\n\n')),r.push("--changeset_"+i+"\n")),r.push("Content-Type: application/http\n"),r.push("Content-Transfer-Encoding: binary\n\n"),a=new Headers,c=b(u.url)?u.url:d(n,u.url),s.write("["+this.batchId+"] ("+(new Date).getTime()+") Adding request "+u.method+" "+c+" to batch.",0),"GET"!==u.method?(l=u.method,p=u.options.headers,w(u,"options")&&w(u.options,"headers")&&void 0!==p["X-HTTP-Method"]&&(l=p["X-HTTP-Method"],delete p["X-HTTP-Method"]),r.push(l+" "+c+" HTTP/1.1\n"),a.set("Content-Type","application/json;odata=verbose;charset=utf-8")):r.push(u.method+" "+c+" HTTP/1.1\n"),M(a,Fe.headers),u.options&&M(a,u.options.headers),a.has("Accept")||a.append("Accept","application/json"),a.has("Content-Type")||a.append("Content-Type","application/json;odata=verbose;charset=utf-8"),a.has("X-ClientService-ClientTag")||a.append("X-ClientService-ClientTag","PnPCoreJS:@pnp-$$Version$$:batch"),a.forEach((function(e,t){r.push(t+": "+e+"\n")})),r.push("\n"),u.options.body&&r.push(u.options.body+"\n\n");return i.length>0&&(r.push("--changeset_"+i+"--\n\n"),i=""),r.push("--batch_"+this.batchId+"--\n"),h={body:r.join(""),headers:{"Content-Type":"multipart/mixed; boundary=batch_"+this.batchId},method:"POST"},s.write("["+this.batchId+"] ("+(new Date).getTime()+") Sending batch request.",1),[4,e.fetch(d(n,"/_api/$batch"),h)];case 2:return[4,m.sent().text()];case 3:if(y=m.sent(),(g=t.ParseResponse(y)).length!==this.requests.length)throw Error("Could not properly parse responses to match requests in batch.");return s.write("["+this.batchId+"] ("+(new Date).getTime()+") Resolving batched requests.",1),[2,g.reduce((function(e,t,n){return e.then((function(e){return D(v,void 0,void 0,(function(){var e,r,i,o;return L(this,(function(u){switch(u.label){case 0:e=this.requests[n],s.write("["+e.id+"] ("+(new Date).getTime()+") Resolving request in batch "+this.batchId+".",1),u.label=1;case 1:return u.trys.push([1,3,,4]),i=(r=e).resolve,[4,e.parser.parse(t)];case 2:return i.apply(r,[u.sent()]),[3,4];case 3:return o=u.sent(),e.reject(o),[3,4];case 4:return[2]}}))}))}))}),Promise.resolve(void 0))]}}))}))},t}($),ht=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=""),this._options=e,this._baseUrl=t}return e.prototype.configure=function(t,n){return void 0===n&&(n=""),new e(t,n)},e.prototype.setup=function(e){e.pageContext?ke({spfxContext:e}):ke(e)},e}();new ht;function ft(e){return S(e)?"":/!(@.*?)::(.*?)/gi.test(e)?e.replace(/!(@.*?)::(.*)$/gi,(function(e,t,n){return s.write("Rewriting aliased parameter from match "+e+" to label: "+t+" value: "+n,0),"!"+t+"::"+encodeURIComponent(n.replace(/\'/gi,"''"))})):encodeURIComponent(e.replace(/\'/gi,"''"))}var yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"rootWeb",{get:function(){return je.configure(St(this,"rootweb"),"si.rootWeb")},enumerable:!0,configurable:!0}),t.prototype.getRootWeb=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,this.rootWeb.select("Url")()];case 1:return e=t.sent(),[2,je.configure(St(e.Url),"si.getRootWeb")]}}))}))},t.prototype.getContextInfo=function(){return D(this,void 0,void 0,(function(){var e,t,n;return L(this,(function(r){switch(r.label){case 0:return e=je.configure(gt(this.parentUrl,"_api/contextinfo"),"si.getContextInfo"),[4,Ke(e)];case 1:return w(t=r.sent(),"GetContextWebInformation")?((n=t.GetContextWebInformation).SupportedSchemaVersions=n.SupportedSchemaVersions.results,[2,n]):[2,t]}}))}))},t.prototype.createBatch=function(){return new dt(this.parentUrl)},t.prototype.delete=function(){return D(this,void 0,void 0,(function(){var e,t;return L(this,(function(n){switch(n.label){case 0:return[4,this.clone(gt,"").select("Id")()];case 1:return e=n.sent(),t=je.configure(gt(this.parentUrl,"_api/SPSiteManager/Delete"),"si.delete"),[4,Ke(t,Ue({siteId:e.Id}))];case 2:return n.sent(),[2]}}))}))},t.prototype.getDocumentLibraries=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return(t=je.configure(Ze("","_api/sp.web.getdocumentlibraries(@v)"),"si.getDocumentLibraries")).query.set("@v","'"+ft(e)+"'"),[4,t()];case 1:return[2,w(n=r.sent(),"GetDocumentLibraries")?n.GetDocumentLibraries:n]}}))}))},t.prototype.getWebUrlFromPageUrl=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return(t=je.configure(Ze("","_api/sp.web.getweburlfrompageurl(@v)"),"si.getWebUrlFromPageUrl")).query.set("@v","'"+ft(e)+"'"),[4,t()];case 1:return[2,w(n=r.sent(),"GetWebUrlFromPageUrl")?n.GetWebUrlFromPageUrl:n]}}))}))},t.prototype.getChanges=function(e){var t=Ue({query:m(De("SP.ChangeQuery"),e)});return Ke(this.clone(St,"getchanges"),t)},t.prototype.openWebById=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(gt,"openWebById('"+e+"')"))];case 1:return[2,{data:t=n.sent(),web:St(Be(ut(t)))}]}}))}))},t.prototype.createCommunicationSite=function(e,t,n,r,i,o,s,u,a){return void 0===t&&(t=1033),void 0===n&&(n=!1),D(this,void 0,void 0,(function(){return L(this,(function(c){return[2,this.createCommunicationSiteFromProps({Classification:o,Description:i,HubSiteId:u,Lcid:t,Owner:a,ShareByEmailEnabled:n,SiteDesignId:s,Title:e,Url:r})]}))}))},t.prototype.createCommunicationSiteFromProps=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){return t=Object.assign({},{Classification:"",Description:"",HubSiteId:Le,Lcid:1033,ShareByEmailEnabled:!1,SiteDesignId:Le,WebTemplate:"SITEPAGEPUBLISHING#0",WebTemplateExtensionId:Le},e),n=Ue({request:m(De("Microsoft.SharePoint.Portal.SPSiteCreationRequest"),t)}),[2,Ke(gt(Be(this.toUrl()),"/_api/SPSiteManager/Create"),n)]}))}))},t.prototype.exists=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return t=Ue({url:e}),[4,Ke(gt(Be(this.toUrl()),"/_api/SP.Site.Exists"),t)];case 1:return[2,n.sent()]}}))}))},t.prototype.createModernTeamSite=function(e,t,n,r,i,o,s,u,a){return D(this,void 0,void 0,(function(){return L(this,(function(c){return[2,this.createModernTeamSiteFromProps({alias:t,classification:o,description:i,displayName:e,hubSiteId:u,isPublic:n,lcid:r,owners:s,siteDesignId:a})]}))}))},t.prototype.createModernTeamSiteFromProps=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){return t=Object.assign({},{classification:"",description:"",hubSiteId:Le,isPublic:!0,lcid:1033,owners:[]},e),n={alias:t.alias,displayName:t.displayName,isPublic:t.isPublic,optionalParams:{Classification:t.classification,CreationOptions:{results:["SPSiteLanguage:"+t.lcid,"HubSiteId:"+t.hubSiteId]},Description:t.description,Owners:{results:t.owners}}},t.siteDesignId&&n.optionalParams.CreationOptions.results.push("implicit_formula_292aa8a00786498a87a5ca52d9f4214a_"+t.siteDesignId),[2,Ke(gt(Be(this.toUrl()),"/_api/GroupSiteManager/CreateGroupEx"),Ue(n))]}))}))},x([je("si.getChanges")],t.prototype,"getChanges",null),x([je("si.openWebById")],t.prototype,"openWebById",null),t=x([st("_api/site")],t)}(nt),gt=$e(yt);Reflect.defineProperty(ht.prototype,"site",{configurable:!0,enumerable:!0,get:function(){return gt(this._baseUrl).configure(this._options)}});var vt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n,r,i,o){return void 0===n&&(n=""),void 0===r&&(r="STS"),void 0===i&&(i=1033),void 0===o&&(o=!0),D(this,void 0,void 0,(function(){var s,u;return L(this,(function(a){switch(a.label){case 0:return s=Ue({parameters:m(De("SP.WebCreationInformation"),{Description:n,Language:i,Title:e,Url:t,UseSamePermissionsAsParentSite:o,WebTemplate:r})}),[4,Ke(this.clone(mt,"add"),s)];case 1:return[2,{data:u=a.sent(),web:St(ut(u).replace(/_api\/web\/?/i,""))}]}}))}))},x([je("ws.add")],t.prototype,"add",null),t=x([st("webs")],t)}(et),mt=$e(vt),bt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("w"),t}return U(t,e),Object.defineProperty(t.prototype,"webs",{get:function(){return mt(this)},enumerable:!0,configurable:!0}),t.prototype.getParentWeb=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,He(this.select("ParentWeb/Id").expand("ParentWeb"))];case 1:return[2,(e=t.sent().ParentWeb)?gt(this.parentUrl).openWebById(e.Id):null]}}))}))},t.prototype.getSubwebsFilteredForCurrentUser=function(e,t){void 0===e&&(e=-1),void 0===t&&(t=-1);var n=this.clone(mt,"getSubwebsFilteredForCurrentUser(nWebTemplateFilter="+e+",nConfigurationFilter="+t+")");return je.configure(n,"w.getSubwebsFilteredForCurrentUser")},Object.defineProperty(t.prototype,"allProperties",{get:function(){return je.configure(this.clone(rt,"allproperties"),"w.allprops")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"webinfos",{get:function(){return je.configure(tt(this,"webinfos"),"w.webinfos")},enumerable:!0,configurable:!0}),t.prototype.createBatch=function(){return new dt(this.parentUrl)},t.prototype.update=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return t=Ue(m(De("SP.Web"),e),xe({"X-HTTP-Method":"MERGE"})),[4,Ke(this,t)];case 1:return[2,{data:n.sent(),web:this}]}}))}))},t.prototype.applyTheme=function(e,t,n,r){var i=Ue({backgroundImageUrl:n,colorPaletteUrl:e,fontSchemeUrl:t,shareGenerated:r});return Ke(this.clone(St,"applytheme"),i)},t.prototype.applyWebTemplate=function(e){var t=this.clone(St,"applywebtemplate");return t.concat("(webTemplate='"+ft(e)+"')"),Ke(t)},t.prototype.availableWebTemplates=function(e,t){void 0===e&&(e=1033),void 0===t&&(t=!0);var n="getavailablewebtemplates(lcid="+e+", doincludecrosslanguage="+t+")";return je.configure(tt(this,n),"w.availableWebTemplates")},t.prototype.getChanges=function(e){var t=Ue({query:m(De("SP.ChangeQuery"),e)});return Ke(this.clone(St,"getchanges"),t)},t.prototype.mapToIcon=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=""),He(this.clone(St,"maptoicon(filename='"+ft(e)+"', progid='"+ft(n)+"', size="+t+")"))},t.prototype.getStorageEntity=function(e){return He(this.clone(St,"getStorageEntity('"+ft(e)+"')"))},t.prototype.setStorageEntity=function(e,t,n,r){return void 0===n&&(n=""),void 0===r&&(r=""),Ke(this.clone(St,"setStorageEntity"),Ue({comments:r,description:n,key:e,value:t}))},t.prototype.removeStorageEntity=function(e){return Ke(this.clone(St,"removeStorageEntity('"+ft(e)+"')"))},x([je("w.getParentWeb")],t.prototype,"getParentWeb",null),x([je("w.update")],t.prototype,"update",null),x([je("w.applyTheme")],t.prototype,"applyTheme",null),x([je("w.applyWebTemplate")],t.prototype,"applyWebTemplate",null),x([je("w.getChanges")],t.prototype,"getChanges",null),x([je("w.mapToIcon")],t.prototype,"mapToIcon",null),x([je("w.getStorageEntity")],t.prototype,"getStorageEntity",null),x([je("w.setStorageEntity")],t.prototype,"setStorageEntity",null),x([je("w.removeStorageEntity")],t.prototype,"removeStorageEntity",null),t=x([st("_api/web")],t)}(nt),St=$e(bt);function Tt(e){return{DecodedUrl:e,__metadata:{type:"SP.ResourcePath"}}}var Pt,wt,It=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(Ct(this).concat("('"+e+"')"),"ls.getById")},t.prototype.getByTitle=function(e){return je.configure(Ct(this,"getByTitle('"+ft(e)+"')"),"ls.getByTitle")},t.prototype.add=function(e,t,n,r,i){return void 0===t&&(t=""),void 0===n&&(n=100),void 0===r&&(r=!1),void 0===i&&(i={}),D(this,void 0,void 0,(function(){var o;return L(this,(function(s){switch(s.label){case 0:return o=Object.assign({AllowContentTypes:r,BaseTemplate:n,ContentTypesEnabled:r,Description:t,Title:e},De("SP.List"),i),[4,Ke(this,Ue(o))];case 1:return[2,{data:s.sent(),list:this.getByTitle(o.Title)}]}}))}))},t.prototype.ensure=function(e,t,n,r,i){return void 0===t&&(t=""),void 0===n&&(n=100),void 0===r&&(r=!1),void 0===i&&(i={}),D(this,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:if(this.hasBatch)throw Error("The ensure list method is not supported for use in a batch.");o=m(i,{Title:e,Description:t,ContentTypesEnabled:r},!0),s=this.getByTitle(o.Title),u.label=1;case 1:return u.trys.push([1,4,,6]),[4,s.select("Title")()];case 2:return u.sent(),[4,s.update(o).then((function(e){return e.data}))];case 3:return[2,{created:!1,data:u.sent(),list:this.getByTitle(o.Title)}];case 4:return u.sent(),[4,this.add(e,t,n,r,o).then((function(e){return e.data}))];case 5:return[2,{created:!0,data:u.sent(),list:this.getByTitle(o.Title)}];case 6:return[2]}}))}))},t.prototype.ensureSiteAssetsLibrary=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(_t,"ensuresiteassetslibrary"))];case 1:return e=t.sent(),[2,Ct(ut(e))]}}))}))},t.prototype.ensureSitePagesLibrary=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(_t,"ensuresitepageslibrary"))];case 1:return e=t.sent(),[2,Ct(ut(e))]}}))}))},x([je("ls.add")],t.prototype,"add",null),x([je("ls.ensure")],t.prototype,"ensure",null),x([je("ls.ensureSiteAssetsLibrary")],t.prototype,"ensureSiteAssetsLibrary",null),x([je("ls.ensureSitePagesLibrary")],t.prototype,"ensureSitePagesLibrary",null),t=x([st("lists")],t)}(et),_t=$e(It),Ot=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=ot("l"),t}return U(t,e),Object.defineProperty(t.prototype,"effectiveBasePermissions",{get:function(){return je.configure(Ze(this,"EffectiveBasePermissions"),"l.effectiveBasePermissions")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eventReceivers",{get:function(){return je.configure(tt(this,"EventReceivers"),"l.eventReceivers")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relatedFields",{get:function(){return je.configure(Ze(this,"getRelatedFields"),"l.relatedFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"informationRightsManagementSettings",{get:function(){return je.configure(Ze(this,"InformationRightsManagementSettings"),"l.informationRightsManagementSettings")},enumerable:!0,configurable:!0}),t.prototype.update=function(e,t){return void 0===t&&(t="*"),D(this,void 0,void 0,(function(){var n,r,i;return L(this,(function(o){switch(o.label){case 0:return n=Ue(m(De("SP.List"),e),xe({"IF-Match":t,"X-HTTP-Method":"MERGE"})),[4,Ke(this,n)];case 1:return r=o.sent(),i=this,w(e,"Title")&&(i=this.getParent(Ct,this.parentUrl,"getByTitle('"+e.Title+"')")),[2,{data:r,list:i}]}}))}))},t.prototype.getChanges=function(e){return Ke(this.clone(Ct,"getchanges"),Ue({query:m(De("SP.ChangeQuery"),e)}))},t.prototype.getItemsByCAMLQuery=function(e){for(var t=[],n=1;n0&&n.forEach((function(e,t){return i.query.set(t,e)})),Ke(i,r)},t.prototype.renderListFormData=function(e,t,n){return D(this,void 0,void 0,(function(){var r;return L(this,(function(i){switch(i.label){case 0:return[4,Ke(this.clone(Ct,"renderlistformdata(itemid="+e+", formid='"+t+"', mode='"+n+"')"))];case 1:return r=i.sent(),[2,JSON.parse(w(r,"RenderListFormData")?r.RenderListFormData:r)]}}))}))},t.prototype.reserveListItemId=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(Ct,"reservelistitemid"))];case 1:return[2,w(e=t.sent(),"ReserveListItemId")?e.ReserveListItemId:e]}}))}))},t.prototype.getListItemEntityTypeFullName=function(){return this.clone(Ct,null,!1).select("ListItemEntityTypeFullName").get().then((function(e){return e.ListItemEntityTypeFullName}))},t.prototype.addValidateUpdateItemUsingPath=function(e,t,n,r,i){return void 0===n&&(n=!1),D(this,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:return o={FolderPath:Tt(t)},g(i)&&(i.leafName&&(o.LeafName=Tt(i.leafName)),i.objectType&&(o.UnderlyingObjectType=i.objectType)),[4,Ke(this.clone(Ct,"AddValidateUpdateItemUsingPath()"),Ue({bNewDocumentUpdate:n,checkInComment:r,formValues:e,listItemCreateInfo:m(De("SP.ListItemCreationInformationUsingPath"),o)}))];case 1:return[2,w(s=u.sent(),"AddValidateUpdateItemUsingPath")?s.AddValidateUpdateItemUsingPath:s]}}))}))},x([je("l.update")],t.prototype,"update",null),x([je("l.getChanges")],t.prototype,"getChanges",null),x([je("l.CAMLQuery")],t.prototype,"getItemsByCAMLQuery",null),x([je("l.ChangesSinceToken")],t.prototype,"getListItemChangesSinceToken",null),x([je("l.recycle")],t.prototype,"recycle",null),x([je("l.renderListData")],t.prototype,"renderListData",null),x([je("l.AsStream")],t.prototype,"renderListDataAsStream",null),x([je("l.renderListFormData")],t.prototype,"renderListFormData",null),x([je("l.reserveListItemId")],t.prototype,"reserveListItemId",null),x([je("l.getListItemEntityTypeFullName")],t.prototype,"getListItemEntityTypeFullName",null),x([je("l.addValidateUpdateItemUsingPath")],t.prototype,"addValidateUpdateItemUsingPath",null),t}(nt),Ct=$e(Ot);!function(e){e[e.None=0]="None",e[e.ContextInfo=1]="ContextInfo",e[e.ListData=2]="ListData",e[e.ListSchema=4]="ListSchema",e[e.MenuView=8]="MenuView",e[e.ListContentType=16]="ListContentType",e[e.FileSystemItemId=32]="FileSystemItemId",e[e.ClientFormSchema=64]="ClientFormSchema",e[e.QuickLaunch=128]="QuickLaunch",e[e.Spotlight=256]="Spotlight",e[e.Visualization=512]="Visualization",e[e.ViewMetadata=1024]="ViewMetadata",e[e.DisableAutoHyperlink=2048]="DisableAutoHyperlink",e[e.EnableMediaTAUrls=4096]="EnableMediaTAUrls",e[e.ParentInfo=8192]="ParentInfo",e[e.PageContextInfo=16384]="PageContextInfo",e[e.ClientSideComponentManifest=32768]="ClientSideComponentManifest"}(Pt||(Pt={})),function(e){e[e.Display=1]="Display",e[e.Edit=2]="Edit",e[e.New=3]="New"}(wt||(wt={})),ee(bt,"lists",_t),ee(bt,"siteUserInfoList",Ct,"siteuserinfolist"),ee(bt,"defaultDocumentLibrary",Ct,"DefaultDocumentLibrary"),ee(bt,"customListTemplates",tt,"getcustomlisttemplates"),bt.prototype.getList=function(e){return Ct(this,"getList('"+ft(e)+"')")},bt.prototype.getCatalog=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,this.clone(St,"getcatalog("+e+")").select("Id").get()];case 1:return t=n.sent(),[2,Ct(ut(t))]}}))}))};var Et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(At(this).concat("("+e+")"),"is.getById")},t.prototype.getItemByStringId=function(e){return je.configure(At(this.parentUrl,"getItemByStringId('"+e+"')"),"is.getItemByStringId")},t.prototype.skip=function(e,t){return void 0===t&&(t=!1),t?this.query.set("$skiptoken",encodeURIComponent("Paged=TRUE&PagedPrev=TRUE&p_ID="+e)):this.query.set("$skiptoken",encodeURIComponent("Paged=TRUE&p_ID="+e)),this},t.prototype.getPaged=function(){return this.usingParser(new Ft(this))()},t.prototype.getAll=function(e,t){void 0===e&&(e=2e3),void 0===t&&(t="application/json;odata=nometadata"),s.write("Calling items.getAll should be done sparingly. Ensure this is the correct choice. If you are unsure, it is not.",2);var n=Rt(this,"").top(e).configure({headers:{Accept:t}});return this.query.forEach((function(e,t){/^\$select|filter|top|expand$/i.test(t)&&n.query.set(t,e)})),new Promise((function(e,t){var r=[],i=function(n){[].push.apply(r,n.results),n.hasNext?n.getNext().then(i).catch(t):e(r)};n.getPaged().then(i).catch(t)}))},t.prototype.add=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=null),D(this,void 0,void 0,(function(){var n,r,i,o,s=this;return L(this,(function(u){switch(u.label){case 0:return n=this.addBatchDependency(),[4,this.ensureListItemEntityTypeName(t)];case 1:return r=u.sent(),i=Ue(m(De(r),e)),o=Ke(this.clone(Rt,""),i).then((function(e){return{data:e,item:s.getById(e.Id)}})),n(),[2,o]}}))}))},t.prototype.ensureListItemEntityTypeName=function(e){return e?Promise.resolve(e):this.getParent(Ct).getListItemEntityTypeFullName()},x([je("is.getPaged")],t.prototype,"getPaged",null),x([je("is.getAll")],t.prototype,"getAll",null),x([je("is.add")],t.prototype,"add",null),t=x([st("items")],t)}(et),Rt=$e(Et),Nt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=ot("i"),t}return U(t,e),Object.defineProperty(t.prototype,"effectiveBasePermissions",{get:function(){return je.configure(Ze(this,"EffectiveBasePermissions"),"i.effectiveBasePermissions")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"effectiveBasePermissionsForUI",{get:function(){return je.configure(Ze(this,"EffectiveBasePermissionsForUI"),"i.effectiveBasePermissionsForUI")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fieldValuesAsHTML",{get:function(){return je.configure(rt(this,"FieldValuesAsHTML"),"i.fvHTML")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fieldValuesAsText",{get:function(){return je.configure(rt(this,"FieldValuesAsText"),"i.fvText")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fieldValuesForEdit",{get:function(){return je.configure(rt(this,"FieldValuesForEdit"),"i.fvEdit")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"versions",{get:function(){return je.configure(xt(this),"i.versions")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"list",{get:function(){return this.getParent(Ct,this.parentUrl.substr(0,this.parentUrl.lastIndexOf("/")))},enumerable:!0,configurable:!0}),t.prototype.update=function(e,t,n){return void 0===t&&(t="*"),void 0===n&&(n=null),D(this,void 0,void 0,(function(){var r,i,o,s;return L(this,(function(u){switch(u.label){case 0:return r=this.addBatchDependency(),[4,this.ensureListItemEntityTypeName(n)];case 1:return i=u.sent(),o=Ue(m(De(i),e),xe({"IF-Match":t,"X-HTTP-Method":"MERGE"})),r(),s=je.configure(this.clone(At).usingParser(new Bt),"i.update"),[4,Ke(s,o)];case 2:return[2,{data:u.sent(),item:this}]}}))}))},t.prototype.recycle=function(){return Ke(this.clone(At,"recycle"))},t.prototype.getWopiFrameUrl=function(e){return void 0===e&&(e=0),D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return(t=this.clone(At,"getWOPIFrameUrl(@action)")).query.set("@action",e),[4,Ke(t)];case 1:return w(n=r.sent(),"GetWOPIFrameUrl")?[2,n.GetWOPIFrameUrl]:[2,n]}}))}))},t.prototype.validateUpdateListItem=function(e,t){return void 0===t&&(t=!1),Ke(this.clone(At,"validateupdatelistitem"),Ue({formValues:e,bNewDocumentUpdate:t}))},t.prototype.ensureListItemEntityTypeName=function(e){return e?Promise.resolve(e):this.list.getListItemEntityTypeFullName()},x([je("i.recycle")],t.prototype,"recycle",null),x([je("i.getWopiFrameUrl")],t.prototype,"getWopiFrameUrl",null),x([je("i.validateUpdateListItem")],t.prototype,"validateUpdateListItem",null),t}(nt),At=$e(Nt),Ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(Lt(this).concat("("+e+")"),"iv.getById")},t=x([st("versions")],t)}(et),xt=$e(Ut),Dt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=ot("iv"),t}return U(t,e),t}(nt),Lt=$e(Dt),kt=function(){function e(e,t,n){this.parent=e,this.nextUrl=t,this.results=n}return Object.defineProperty(e.prototype,"hasNext",{get:function(){return"string"==typeof this.nextUrl&&this.nextUrl.length>0},enumerable:!0,configurable:!0}),e.prototype.getNext=function(){return this.hasNext?je.configure(Rt(this.nextUrl,null).configureFrom(this.parent),"ip.getNext").getPaged():new Promise((function(e){return e(null)}))},e}(),Ft=function(e){function t(t){var n=e.call(this)||this;return n._parent=t,n}return U(t,e),t.prototype.parse=function(e){var t=this;return new Promise((function(n,r){t.handleError(e,r)&&e.json().then((function(e){var r=w(e,"d")&&w(e.d,"__next")?e.d.__next:e["odata.nextLink"];n(new kt(t._parent,r,t.parseODataJSON(e)))}))}))},t}(ye),Bt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.parse=function(e){var t=this;return new Promise((function(n,r){t.handleError(e,r)&&n({"odata.etag":e.headers.get("etag")})}))},t}(ye);ee(Ot,"items",Rt);var jt=function(){function e(e,t,n,r){void 0===t&&(t="config"),void 0===n&&(n="Title"),void 0===r&&(r="Value"),this.web=e,this.listTitle=t,this.keyFieldName=n,this.valueFieldName=r}return e.prototype.getConfiguration=function(){var e=this;return this.web.lists.getByTitle(this.listTitle).items.select(this.keyFieldName,this.valueFieldName)().then((function(t){return t.reduce((function(t,n){return t[n[e.keyFieldName]]=n[e.valueFieldName],t}),{})}))},e.prototype.asCaching=function(e){return void 0===e&&(e="pnp_configcache_splist_"+this.web.toUrl()+"+"+this.listTitle),new J(this,e)},e}(),Mt=(function(){function e(){this.convertToResponse=function(e){var t=new Headers;if(void 0!==e.headers)for(var n in e.headers)e.headers[n]&&t.append(n,e.headers[n]);var r=204===e.statusCode?null:e.body;return new Response(r,{headers:t,status:e.statusCode,statusText:e.statusText})}}e.prototype.fetch=function(e,t){var n=this;if(void 0===SP||void 0===SP.RequestExecutor)throw Error("SP.RequestExecutor is undefined. Load the SP.RequestExecutor.js library (/_layouts/15/SP.RequestExecutor.js) before loading the PnP JS Core library.");var r,i,o=e.substring(0,e.indexOf("/_api")),s=new SP.RequestExecutor(o),u={};if(t.headers&&t.headers instanceof Headers)for(i=(r=t.headers.entries()).next();!i.done;)u[i.value[0]]=i.value[1],i=r.next();else u=t.headers;return new Promise((function(r,i){var o={error:function(e){i(n.convertToResponse(e))},headers:u,method:t.method,success:function(e){r(n.convertToResponse(e))},url:e};o=t.body?m(o,{body:t.body}):m(o,{binaryStringRequestBody:!0}),s.executeAsync(o)}))}}(),function(e,t){return(Mt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)});var qt,Gt,Wt;function Vt(e){return m(De("Collection(SP.KeyValue)"),{results:Object.keys(e).map((function(t){return m(De("SP.KeyValue"),{Key:t,Value:Reflect.get(e,t),ValueType:"Edm.String"})}))})}!function(e){e[e.None=0]="None",e[e.User=1]="User",e[e.DistributionList=2]="DistributionList",e[e.SecurityGroup=4]="SecurityGroup",e[e.SharePointGroup=8]="SharePointGroup",e[e.All=15]="All"}(qt||(qt={})),function(e){e[e.None=0]="None",e[e.UserInfoList=1]="UserInfoList",e[e.Windows=2]="Windows",e[e.MembershipProvider=4]="MembershipProvider",e[e.RoleProvider=8]="RoleProvider",e[e.All=15]="All"}(Gt||(Gt={})),function(e){e[e.Invalid=-1]="Invalid",e[e.DefaultView=0]="DefaultView",e[e.NormalView=1]="NormalView",e[e.DialogView=2]="DialogView",e[e.View=3]="View",e[e.DisplayForm=4]="DisplayForm",e[e.DisplayFormDialog=5]="DisplayFormDialog",e[e.EditForm=6]="EditForm",e[e.EditFormDialog=7]="EditFormDialog",e[e.NewForm=8]="NewForm",e[e.NewFormDialog=9]="NewFormDialog",e[e.SolutionForm=10]="SolutionForm",e[e.PAGE_MAXITEMS=11]="PAGE_MAXITEMS"}(Wt||(Wt={}));var Ht=/["*:<>?/\\|\x00-\x1f\x7f-\x9f]/g,Kt=/["#%*:<>?/\\|\x00-\x1f\x7f-\x9f]/g;function Qt(e,t){return void 0===t&&(t=!1),t?Kt.test(e):Ht.test(e)}function zt(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=!1),n?e.replace(Kt,t):e.replace(Ht,t)}Reflect.defineProperty(ht.prototype,"web",{configurable:!0,enumerable:!0,get:function(){return St(this._baseUrl).configure(this._options)}}),ht.prototype.createBatch=function(){return this.web.createBatch()};var Xt=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function n(){this.constructor=e}Mt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.crossDomainSite=function(e,t){return this._cdImpl(gt,e,t,"site")},t.prototype.crossDomainWeb=function(e,t){return this._cdImpl(St,e,t,"web")},t.prototype._cdImpl=function(e,t,n,r){if(!b(t))throw Error("The addInWebUrl parameter must be an absolute url.");if(!b(n))throw Error("The hostWebUrl parameter must be an absolute url.");var i=e(d(t,"_api/SP.AppContextSite(@target)"),r);return i.query.set("@target","'"+encodeURIComponent(n)+"'"),i.configure(this._options)},t}(ht));var Jt=function(){function e(){}return e.ensure=function(t,n){var r=[e.Beta,e.V1],i=new RegExp(n,"i"),o=r.filter((function(e){return!i.test(e)})).map((function(e){return e.replace(".","\\.")}));return i=new RegExp("/?("+o.join("|")+")/","ig"),t.replace(i,"/"+n+"/")},e.Beta="beta",e.V1="v1.0",e}(),$t=n(1),Yt=function(e){function t(t,n,r){var i=e.call(this,null)||this;return i.clientId=t,i.tenant=n,i.redirectUri=r,i._displayCallback=null,i._loginPromise=null,i}return U(t,e),t.fromSPFxContext=function(e){return new H(e)},t.prototype.fetch=function(t,n){return D(this,void 0,void 0,(function(){var r;return L(this,(function(i){switch(i.label){case 0:if(!b(t))throw Error("You must supply absolute urls to AdalClient.fetch.");return[4,this.getToken(G(t))];case 1:return r=i.sent(),this.token=r,[2,e.prototype.fetch.call(this,t,n)]}}))}))},t.prototype.getToken=function(e){return D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,this.ensureAuthContext()];case 1:return r.sent(),[4,this.login()];case 2:return r.sent(),n=null,t._authContext.acquireToken(e,(function(e,t){if(e)throw Error(e);n=t})),[2,n]}}))}))},t.prototype.ensureAuthContext=function(){var e=this;return new Promise((function(n){null===t._authContext&&(t._authContext=$t.inject({clientId:e.clientId,displayCall:function(t){e._displayCallback&&e._displayCallback(t)},navigateToLoginRequestUrl:!1,redirectUri:e.redirectUri,tenant:e.tenant})),n()}))},t.prototype.login=function(){var e=this;return this._loginPromise?this._loginPromise:(this._loginPromise=new Promise((function(n,r){if(t._authContext.getCachedUser())return n();e._displayCallback=function(i){var o=window.open(i,"login","width=483, height=600");if(!o)return r(Error("Could not open pop-up window for auth. Likely pop-ups are blocked by the browser."));o&&o.focus&&o.focus();var s=window.setInterval((function(){o&&!o.closed&&void 0!==o.closed||window.clearInterval(s);try{-1!==o.document.URL.indexOf(e.redirectUri)&&(window.clearInterval(s),t._authContext.handleWindowCallback(o.location.hash),o.close(),n())}catch(e){r(e)}}),30)},e.ensureAuthContext().then((function(n){t._authContext._loginInProgress=!1,t._authContext.login(),e._displayCallback=null}))})),this._loginPromise)},t._authContext=null,t}(V);var Zt,en,tn,nn=new(function(){function e(){}return Object.defineProperty(e.prototype,"headers",{get:function(){var e=N.get("graph");return null!=e&&void 0!==e.headers?e.headers:{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fetchClientFactory",{get:function(){var e=N.get("graph");if(null!=e&&void 0!==e.fetchClientFactory)return e.fetchClientFactory;if(void 0!==N.spfxContext)return function(){return Yt.fromSPFxContext(N.spfxContext)};throw Error("There is no Graph Client available, either set one using configuraiton or provide a valid SPFx Context using setup.")},enumerable:!0,configurable:!0}),e}()),rn=function(){function e(){this._impl=nn.fetchClientFactory()}return e.prototype.fetch=function(e,t){void 0===t&&(t={});var n=new Headers;M(n,nn.headers),M(n,t.headers),n.has("Content-Type")||n.append("Content-Type","application/json"),n.has("SdkVersion")||n.append("SdkVersion","PnPCoreJS/$$Version$$");var r=m(t,{headers:n});return this.fetchRaw(e,r)},e.prototype.fetchRaw=function(e,t){var n=this;void 0===t&&(t={});var r=new Headers;M(r,t.headers),t=m(t,{headers:r});var i=function(r){n._impl.fetch(e,t).then((function(e){return r.resolve(e)})).catch((function(e){429!==e.status&&503!==e.status&&504!==e.status&&r.reject(e);var t=r.delay;r.delay*=2,r.attempts++,r.retryCount<=r.attempts&&r.reject(e),setTimeout(l(n,i,r),t)}))};return new Promise((function(e,t){var r={attempts:0,delay:100,reject:t,resolve:e,retryCount:7};i.call(n,r)}))},e.prototype.get=function(e,t){void 0===t&&(t={});var n=m(t,{method:"GET"});return this.fetch(e,n)},e.prototype.post=function(e,t){void 0===t&&(t={});var n=m(t,{method:"POST"});return this.fetch(e,n)},e.prototype.patch=function(e,t){void 0===t&&(t={});var n=m(t,{method:"PATCH"});return this.fetch(e,n)},e.prototype.delete=function(e,t){void 0===t&&(t={});var n=m(t,{method:"DELETE"});return this.fetch(e,n)},e}(),on=Ae((function(){return new rn})),sn=function(e){return function(t,n){return D(this,void 0,void 0,(function(){var r,i,o;return L(this,(function(s){return r=Pe(t.data),i=g(r.batch)?r.batch.addDependency():function(){},o=t.toUrlAndQuery(),q(r.options,n),[2,e(Object.assign({},r,{batchDependency:i,url:o}))]}))}))}},un=function(e,t){return sn(on("GET"))(e,t)},an=function(e,t){return sn(on("POST"))(e,t)},cn=function(e,t){return sn(on("DELETE"))(e,t)},ln=function(e,t){return sn(on("PATCH"))(e,t)},pn=function(e,t){return sn(on("PUT"))(e,t)},dn=function(e){return fe(e)},hn=function(e){function t(t,n){var r=this,i="",o="",s=new Map;return i=d(o="string"==typeof t?t:t.toUrl(),n),r=e.call(this,{parentUrl:o,query:s,url:i})||this,"string"!=typeof t&&r.configureFrom(t),r}return U(t,e),t.prototype.select=function(){for(var e=[],t=0;t0&&this.query.set("$select",e.join(",")),this},t.prototype.expand=function(){for(var e=[],t=0;t0&&this.query.set("$expand",e.join(",")),this},t.prototype.defaultAction=function(e){return un(this,e)},t.prototype.get=function(e){return un(this,e)},t.prototype.toUrlAndQuery=function(){var e=this.toUrl();if(b(e)||(e=d("https://graph.microsoft.com",e)),this.query.size>0){var t=e.indexOf("?")>-1?"&":"?";e+=""+t+Array.from(this.query).map((function(e){return e[0]+"="+e[1]})).join("&")}return e},t.prototype.getParent=function(e,t,n){return void 0===t&&(t=this.parentUrl),new e(t,n)},t.prototype.clone=function(t,n,r){return void 0===r&&(r=!0),e.prototype.cloneTo.call(this,t(this,n),{includeBatch:r})},t.prototype.setEndpoint=function(e){return this.data.url=Jt.ensure(this.data.url,e),this},t}(we),fn=(dn(hn),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.filter=function(e){return this.query.set("$filter",e),this},t.prototype.orderBy=function(e,t){void 0===t&&(t=!0);var n="$orderby",r=this.query.has(n)?this.query.get(n).split(","):[];return r.push(e+" "+(t?"asc":"desc")),this.query.set(n,r.join(",")),this},t.prototype.top=function(e){return this.query.set("$top",e.toString()),this},t.prototype.skip=function(e){return this.query.set("$skip",e.toString()),this},t.prototype.skipToken=function(e){return this.query.set("$skiptoken",e),this},Object.defineProperty(t.prototype,"count",{get:function(){return this.query.set("$count","true"),this},enumerable:!0,configurable:!0}),t}(hn)),yn=dn(fn),gn=(dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.search=function(e){return this.query.set("$search",e),this},t}(fn)),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(hn)),vn=dn(gn),mn=function(e){function t(t,n){void 0===t&&(t="https://graph.microsoft.com/v1.0/$batch"),void 0===n&&(n=20);var r=e.call(this)||this;return r.batchUrl=t,r.maxRequests=n,r}return U(t,e),t.makeUrlRelative=function(e){if(!b(e))return e;var t=e.indexOf(".com/v1.0/");return t<0?(t=e.indexOf(".com/beta/"))>-1?e.substr(t+10):e:e.substr(t+9)},t.formatRequests=function(e){var t=this;return e.map((function(e,n){var r={id:""+ ++n,method:e.method,url:t.makeUrlRelative(e.url)},i={};return void 0!==nn.headers&&null!==nn.headers&&(i=m(i,nn.headers)),void 0!==e.options&&(void 0!==e.options.headers&&null!==e.options.headers&&(i=m(i,e.options.headers)),"GET"!==e.method&&(i["Content-Type"]="application/json"),void 0!==e.options.body&&null!==e.options.body&&(r=m(r,{body:JSON.parse(e.options.body)}))),r=m(r,{headers:i})}))},t.parseResponse=function(e,t){return new Promise((function(n,r){if(w(t,"error"))return r(Error("Error Porcessing Batch: ("+t.error.code+") "+t.error.message));for(var i=new Array(e.length).fill(null),o=0;o0?[5,e()]:[3,3];case 2:return"break"===l.sent()?[3,3]:[3,1];case 3:return i||o(),[2]}}))}))}))},t}($),bn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.createBatch=function(){return new mn},t.prototype.setup=function(e){!function(e){N.assign(e)}(e)},t}(hn),Sn=new bn("v1.0"),Tn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getByName=function(e){if(/\%#/.test(e))throw Error("For file names containing % or # please use web.getFileByServerRelativePath");return je.configure(In(this).concat("('"+ft(e)+"')"),"fis.getByName")},t.prototype.add=function(e,t,n){return void 0===n&&(n=!0),D(this,void 0,void 0,(function(){return L(this,(function(r){switch(r.label){case 0:return[4,Ke(Pn(this,"add(overwrite="+n+",url='"+ft(e)+"')"),{body:t})];case 1:return[2,{data:r.sent(),file:this.getByName(e)}]}}))}))},t.prototype.addUsingPath=function(e,t,n){return void 0===n&&(n={Overwrite:!1}),D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=["AddUsingPath(decodedurl='"+ft(e)+"'"],n&&(n.Overwrite&&r.push(",Overwrite=true"),n.AutoCheckoutOnInvalidData&&r.push(",AutoCheckoutOnInvalidData=true"),S(n.XorHash)||r.push(",XorHash="+ft(n.XorHash))),r.push(")"),[4,Ke(Pn(this,r.join("")),{body:t})];case 1:return[2,{data:i=o.sent(),file:In(ut(i))}]}}))}))},t.prototype.addChunked=function(e,t,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=10485760),D(this,void 0,void 0,(function(){return L(this,(function(o){switch(o.label){case 0:return[4,Ke(this.clone(Pn,"add(overwrite="+r+",url='"+ft(e)+"')",!1))];case 1:return o.sent(),[4,this.getByName(e).setContentChunked(t,n,i)];case 2:return[2,o.sent()]}}))}))},t.prototype.addTemplateFile=function(e,t){return D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,Ke(this.clone(Pn,"addTemplateFile(urloffile='"+ft(e)+"',templatefiletype="+t+")",!1))];case 1:return[2,{data:n=r.sent(),file:In(ut(n))}]}}))}))},x([je("fis.add")],t.prototype,"add",null),x([je("fis.addUsingPath")],t.prototype,"addUsingPath",null),x([je("fis.addChunked")],t.prototype,"addChunked",null),x([je("fis.addTemplateFile")],t.prototype,"addTemplateFile",null),t=x([st("files")],t)}(et),Pn=$e(Tn),wn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=ot("fi"),t}return U(t,e),Object.defineProperty(t.prototype,"listItemAllFields",{get:function(){return je.configure(rt(this,"listItemAllFields"),"fi.listItemAllFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"versions",{get:function(){return je.configure(On(this),"fi.versions")},enumerable:!0,configurable:!0}),t.prototype.approve=function(e){return void 0===e&&(e=""),Ke(this.clone(In,"approve(comment='"+ft(e)+"')"))},t.prototype.cancelUpload=function(e){return Ke(this.clone(In,"cancelUpload(uploadId=guid'"+e+"')",!1))},t.prototype.checkin=function(e,t){if(void 0===e&&(e=""),void 0===t&&(t=Zt.Major),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return Ke(this.clone(In,"checkin(comment='"+ft(e)+"',checkintype="+t+")"))},t.prototype.checkout=function(){return Ke(this.clone(In,"checkout"))},t.prototype.copyTo=function(e,t){return void 0===t&&(t=!0),Ke(this.clone(In,"copyTo(strnewurl='"+ft(e)+"',boverwrite="+t+")"))},t.prototype.copyByPath=function(e,t,n){return void 0===n&&(n=!1),D(this,void 0,void 0,(function(){var r,i,o,s,u;return L(this,(function(a){switch(a.label){case 0:return[4,this.select("ServerRelativeUrl")()];case 1:return r=a.sent(),i=r.ServerRelativeUrl,o=r["odata.id"],s=Be(o),u=s.replace("://","___").split("/")[0].replace("___","://"),[4,Ke(In(s,"/_api/SP.MoveCopyUtil.CopyFileByPath(overwrite=@a1)?@a1="+t),Ue({destPath:Tt(b(e)?e:""+u+e),options:{KeepBoth:n,ResetAuthorAndCreatedOnCopy:!0,ShouldBypassSharedLocks:!0,__metadata:{type:"SP.MoveCopyOptions"}},srcPath:Tt(b(i)?i:""+u+i)}))];case 2:return a.sent(),[2]}}))}))},t.prototype.deny=function(e){if(void 0===e&&(e=""),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return Ke(this.clone(In,"deny(comment='"+ft(e)+"')"))},t.prototype.moveTo=function(e,t){return void 0===t&&(t=en.Overwrite),Ke(this.clone(In,"moveTo(newurl='"+ft(e)+"',flags="+t+")"))},t.prototype.moveByPath=function(e,t,n){return void 0===n&&(n=!1),D(this,void 0,void 0,(function(){var r,i,o,s,u;return L(this,(function(a){switch(a.label){case 0:return[4,this.select("ServerRelativeUrl")()];case 1:return r=a.sent(),i=r.ServerRelativeUrl,o=r["odata.id"],s=Be(o),u=s.replace("://","___").split("/")[0].replace("___","://"),[4,Ke(In(s,"/_api/SP.MoveCopyUtil.MoveFileByPath(overwrite=@a1)?@a1="+t),Ue({destPath:Tt(b(e)?e:""+u+e),options:{KeepBoth:n,ResetAuthorAndCreatedOnCopy:!1,ShouldBypassSharedLocks:!0,__metadata:{type:"SP.MoveCopyOptions"}},srcPath:Tt(b(i)?i:""+u+i)}))];case 2:return a.sent(),[2]}}))}))},t.prototype.publish=function(e){if(void 0===e&&(e=""),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return Ke(this.clone(In,"publish(comment='"+ft(e)+"')"))},t.prototype.recycle=function(){return Ke(this.clone(In,"recycle"))},t.prototype.undoCheckout=function(){return Ke(this.clone(In,"undoCheckout"))},t.prototype.unpublish=function(e){if(void 0===e&&(e=""),e.length>1023)throw Error("The maximum comment length is 1023 characters.");return Ke(this.clone(In,"unpublish(comment='"+ft(e)+"')"))},t.prototype.getText=function(){return this.clone(In,"$value",!1).usingParser(new ge)(xe({binaryStringResponseBody:"true"}))},t.prototype.getBlob=function(){return this.clone(In,"$value",!1).usingParser(new ve)(xe({binaryStringResponseBody:"true"}))},t.prototype.getBuffer=function(){return this.clone(In,"$value",!1).usingParser(new be)(xe({binaryStringResponseBody:"true"}))},t.prototype.getJSON=function(){return this.clone(In,"$value",!1).usingParser(new me)(xe({binaryStringResponseBody:"true"}))},t.prototype.setContent=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(In,"$value",!1),{body:e,headers:{"X-HTTP-Method":"PUT"}})];case 1:return t.sent(),[2,In(this)]}}))}))},t.prototype.getItem=function(){for(var e=[],t=0;t0))throw Error("Did not find the app with id "+e+" in the appcatalog.");n=s[0].Id,a.label=4;case 4:return u=je.configure(Nn(r,"_api/web/tenantappcatalog/SyncSolutionToTeams(id="+n+")"),"ac.syncSolutionToTeams"),[4,Ke(u,{})];case 5:return[2,a.sent()]}}))}))},t.prototype.add=function(e,t,n){return void 0===n&&(n=!0),D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=je.configure(Nn(Be(this.toUrl()),"_api/web/tenantappcatalog/add(overwrite="+n+",url='"+e+"')"),"ac.add"),[4,Ke(r,{body:t,headers:{binaryStringRequestBody:"true"}})];case 1:return[2,{data:i=o.sent(),file:In(ut(i))}]}}))}))},t}(et),Nn=$e(Rn),An=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.deploy=function(e){return void 0===e&&(e=!1),this.do("Deploy("+e+")")},t.prototype.retract=function(){return this.do("Retract")},t.prototype.install=function(){return this.do("Install")},t.prototype.uninstall=function(){return this.do("Uninstall")},t.prototype.upgrade=function(){return this.do("Upgrade")},t.prototype.remove=function(){return this.do("Remove")},t.prototype.do=function(e){return Ke(this.clone(Un,e))},x([je("app.deploy")],t.prototype,"deploy",null),x([je("app.retract")],t.prototype,"retract",null),x([je("app.install")],t.prototype,"install",null),x([je("app.uninstall")],t.prototype,"uninstall",null),x([je("app.upgrade")],t.prototype,"upgrade",null),x([je("app.remove")],t.prototype,"remove",null),t}(nt),Un=$e(An);bt.prototype.getAppCatalog=function(e){return Nn(e||this)},ht.prototype.getTenantAppCatalogWeb=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,Ze("/","_api/SP_TenantSettings_Current")()];case 1:return e=t.sent(),[2,St(e.CorporateCatalogUrl)]}}))}))};var xn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getByName=function(e){var t=je.configure(kn(this),"ats.getByName");return t.concat("('"+e+"')"),t},t.prototype.add=function(e,t){return D(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(Dn,"add(FileName='"+e+"')",!1),{body:t})];case 1:return[2,{data:n.sent(),file:this.getByName(e)}]}}))}))},t.prototype.addMultiple=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:t=0,n.label=1;case 1:return t-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"authorByLine",{get:function(){return v(this.json.AuthorByline)&&this.json.AuthorByline.length>0?this.json.AuthorByline[0]:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"verticalSection",{get:function(){return this.hasVerticalSection?this.addVerticalSection():null},enumerable:!0,configurable:!0}),t.prototype.addSection=function(){var e=new $n(this,Fn(this.sections),1);return this.sections.push(e),e},t.prototype.addVerticalSection=function(){var e=this.sections.findIndex((function(e){return 2===e.layoutIndex}));if(e>-1)return this.sections[e];var t=new $n(this,Fn(this.sections),2);return this.sections.push(t),t},t.prototype.fromJSON=function(e){this.json=e;var t=JSON.parse(e.CanvasContent1),n=JSON.parse(e.LayoutWebpartsContent);return n&&n.length>0&&(this._layoutPart=n[0]),this.setControls(t),this},t.prototype.load=function(){return D(this,void 0,void 0,(function(){var e,t;return L(this,(function(n){switch(n.label){case 0:return[4,this.getItem("Id","CommentsDisabled")];case 1:return e=n.sent(),[4,Ze(this,"_api/sitepages/pages("+e.Id+")")()];case 2:return t=n.sent(),this.commentsDisabled=e.CommentsDisabled,[2,this.fromJSON(t)]}}))}))},t.prototype.save=function(e){return void 0===e&&(e=!0),D(this,void 0,void 0,(function(){var t,n,r,i,o,s,u,a,c,l,p,d,h,f;return L(this,(function(y){switch(y.label){case 0:if(null===this.json.Id)throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create");return this._bannerImageDirty?(b(t=this.json.BannerImageUrl)&&(t=t.replace(/^https?:\/\/[a-z0-9\.]*?\.[a-z]{2,3}\//i,"/")),n=gt(Be(this.toUrl())),r=St(Be(this.toUrl())),i=r.getFileByServerRelativePath(t),o="",s="",u="",a="",c="",l=r.createBatch(),n.select("Id","Url").inBatch(l)().then((function(e){return o=e.Id})),r.select("Id","Url").inBatch(l)().then((function(e){s=e.Id,c=e.Url})),i.listItemAllFields.select("UniqueId","ParentList/Id").expand("ParentList").inBatch(l)().then((function(e){u=e.UniqueId,a=e.ParentList.Id})),[4,l.execute()]):[3,2];case 1:y.sent(),(p=Ze(c,"_layouts/15/getpreview.ashx")).query.set("guidSite",""+o),p.query.set("guidWeb",""+s),p.query.set("guidFile",""+u),this.bannerImageUrl=p.toUrlAndQuery(),g(this._layoutPart.serverProcessedContent)||(this._layoutPart.serverProcessedContent={}),this._layoutPart.serverProcessedContent.imageSources={imageSource:t},g(this._layoutPart.serverProcessedContent.customMetadata)||(this._layoutPart.serverProcessedContent.customMetadata={}),this._layoutPart.serverProcessedContent.customMetadata.imageSource={listId:a,siteId:o,uniqueId:u,webId:s},this._layoutPart.properties.webId=s,this._layoutPart.properties.siteId=o,this._layoutPart.properties.listId=a,this._layoutPart.properties.uniqueId=u,y.label=2;case 2:return this.json.IsPageCheckedOutToCurrentUser?[3,4]:[4,Ke(Kn(this,"_api/sitepages/pages("+this.json.Id+")/checkoutpage"))];case 3:y.sent(),y.label=4;case 4:return d=Object.assign(De("SP.Publishing.SitePage"),{AuthorByline:this.json.AuthorByline||[],BannerImageUrl:this.bannerImageUrl,CanvasContent1:this.getCanvasContent1(),LayoutWebpartsContent:this.getLayoutWebpartsContent(),Title:this.title,TopicHeader:this.topicHeader}),h=Kn(this,"_api/sitepages/pages("+this.json.Id+")/savepage"),[4,Ke(h,xe({"if-match":"*"},Ue(d)))];case 5:return y.sent(),f=!0,e?[4,Ke(Kn(this,"_api/sitepages/pages("+this.json.Id+")/publish"))]:[3,7];case 6:(f=y.sent())&&(this.json.IsPageCheckedOutToCurrentUser=!1),y.label=7;case 7:return this._bannerImageDirty=!1,[2,f]}}))}))},t.prototype.discardPageCheckout=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:if(null===this.json.Id)throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create");return[4,Ke(Kn(this,"_api/sitepages/pages("+this.json.Id+")/discardPage"),Ue(De("SP.Publishing.SitePage")))];case 1:return e=t.sent(),this.fromJSON(e),[2]}}))}))},t.prototype.promoteToNews=function(){return D(this,void 0,void 0,(function(){return L(this,(function(e){return[2,this.promoteNewsImpl("promoteToNews")]}))}))},t.prototype.findControlById=function(e){return this.findControl((function(t){return t.id===e}))},t.prototype.findControl=function(e){for(var t=0;t3?{}:{zoneEmphasis:e}},t.prototype.promoteNewsImpl=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:if(null===this.json.Id)throw Error("The id for this page is null.");return S(this.json.VersionInfo.LastVersionCreatedBy)&&new Date(this.json.VersionInfo.LastVersionCreated).getFullYear()<2e3?[4,this.save(!0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[4,Ke(Kn(this,"_api/sitepages/pages("+this.json.Id+")/"+e),Ue(De("SP.Publishing.SitePage")))];case 3:return[2,t.sent()]}}))}))},t.prototype.mergePartToTree=function(e,t){var n,r,i,o=null,s=12,u=0,a=0,c=1;t&&(w(t,"zoneIndex")&&(a=t.zoneIndex),w(t,"sectionIndex")&&(u=t.sectionIndex),w(t,"sectionFactor")&&(s=t.sectionFactor),w(t,"layoutIndex")&&(c=t.layoutIndex));var l=null!=(i=null===(r=null===(n=e.data)||void 0===n?void 0:n.emphasis)||void 0===r?void 0:r.zoneEmphasis)?i:0,p=this.getOrCreateSection(a,c,l),d=p.columns.filter((function(e){return e.order===u}));o=d.length<1?p.addColumn(s,c):d[0],e.column=o,o.addControl(e)},t.prototype.mergeColumnToTree=function(e){var t=w(e.data,"position")&&w(e.data.position,"zoneIndex")?e.data.position.zoneIndex:0,n=w(e.data,"position")&&w(e.data.position,"layoutIndex")?e.data.position.layoutIndex:1,r=this.getOrCreateSection(t,n,e.data.emphasis.zoneEmphasis||0);e.section=r,r.columns.push(e)},t.prototype.getOrCreateSection=function(e,t,n){var r=null,i=this.sections.filter((function(n){return n.order===e&&n.layoutIndex===t}));return i.length<1?((r=2===t?this.addVerticalSection():this.addSection()).order=e,r.emphasis=n):r=i[0],r},x([je("csp.load")],t.prototype,"load",null),x([je("csp.save")],t.prototype,"save",null),x([je("csp.discardPageCheckout")],t.prototype,"discardPageCheckout",null),x([je("csp.promoteToNews")],t.prototype,"promoteToNews",null),x([je("csp.copy")],t.prototype,"copy",null),x([je("csp.getItem")],t.prototype,"getItem",null),t}(Ye),zn=function(e,t,n,r,i,o){return void 0===r&&(r=!1),void 0===i&&(i=[]),void 0===o&&(o=!1),fe(Qn)(e,t,n,r,i,o)},Xn=function(e){return D(void 0,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,e.getItem()];case 1:return t=n.sent(),[2,zn(Be(e.toUrl()),"",{Id:t.Id},!0).configureFrom(e).load()]}}))}))},Jn=function(e,t,n,r,i){return void 0===r&&(r="Article"),void 0===i&&(i=0),D(void 0,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:return t=t.replace(/\.aspx$/i,""),[4,Ke(Kn(e,"_api/sitepages/pages"),Ue(Object.assign(De("SP.Publishing.SitePage"),{PageLayoutType:r,PromotedState:i})))];case 1:return o=u.sent(),(s=zn(e,"",o)).title=t,[4,s.save(!1)];case 2:return u.sent(),s.title=n,[2,s]}}))}))},$n=function(){function e(e,t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i=0),this.page=e,this.columns=r,this._emphasis=i,this._memId=f(),this._order=t,this._layoutIndex=n}return Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=e;for(var t=0;t")||(e="

"+e+"

"),this.data.innerHTML=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"order",{get:function(){return this.data.position.controlIndex},set:function(e){this.data.position.controlIndex=e},enumerable:!0,configurable:!0}),t.prototype.onColumnChange=function(e){this.data.position.sectionFactor=e.factor,this.data.position.controlIndex=Fn(e.controls),this.data.position.zoneIndex=e.data.position.zoneIndex,this.data.position.sectionIndex=e.order,this.data.position.layoutIndex=e.data.position.layoutIndex},t.Default={addedFromPersistedData:!1,anchorComponentId:"",controlType:4,displayMode:2,editorType:"CKEditor",emphasis:{},id:"",innerHTML:"",position:{controlIndex:1,layoutIndex:1,sectionFactor:12,sectionIndex:1,zoneIndex:1}},t}(Zn),tr=function(e){function t(n){return void 0===n&&(n=JSON.parse(JSON.stringify(t.Default))),e.call(this,n)||this}return U(t,e),t.fromComponentDef=function(e){var n=new t;return n.import(e),n},Object.defineProperty(t.prototype,"title",{get:function(){return this.data.webPartData.title},set:function(e){this.data.webPartData.title=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this.data.webPartData.description},set:function(e){this.data.webPartData.description=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"order",{get:function(){return this.data.position.controlIndex},set:function(e){this.data.position.controlIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.data.reservedHeight},set:function(e){this.data.reservedHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.data.reservedWidth},set:function(e){this.data.reservedWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataVersion",{get:function(){return this.data.webPartData.dataVersion},set:function(e){this.data.webPartData.dataVersion=e},enumerable:!0,configurable:!0}),t.prototype.setProperties=function(e){return this.data.webPartData.properties=m(this.data.webPartData.properties,e),this},t.prototype.getProperties=function(){return this.data.webPartData.properties},t.prototype.onColumnChange=function(e){this.data.position.sectionFactor=e.factor,this.data.position.controlIndex=Fn(e.controls),this.data.position.zoneIndex=e.data.position.zoneIndex,this.data.position.sectionIndex=e.data.position.sectionIndex,this.data.position.layoutIndex=e.data.position.layoutIndex},t.prototype.import=function(e){var t=f(),n=e.Id.replace(/^\{|\}$/g,"").toLowerCase(),r=JSON.parse(e.Manifest).preconfiguredEntries[0];this.setData(Object.assign({},this.data,{id:t,webPartData:{dataVersion:"1.0",description:r.description.default,id:n,instanceId:t,properties:r.properties,title:r.title.default},webPartId:n}))},t.Default={addedFromPersistedData:!1,controlType:3,displayMode:2,emphasis:{},id:null,position:{controlIndex:1,layoutIndex:1,sectionFactor:12,sectionIndex:1,zoneIndex:1},reservedHeight:500,reservedWidth:500,webPartData:null,webPartId:null},t}(Zn);bt.prototype.getClientsideWebParts=function(){return this.clone(tt,"GetClientSideWebParts")()},bt.prototype.addClientsidePage=function(e,t,n,r){return void 0===t&&(t=e.replace(/\.[^/.]+$/,"")),Jn(this,e,t,n,r)},bt.prototype.loadClientsidePage=function(e){return Xn(this.getFileByServerRelativePath(e))};var nr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getByName=function(e){return je.configure(or(this).concat("('"+ft(e)+"')"),"fs.getByName")},t.prototype.add=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(rr,"add('"+ft(e)+"')"))];case 1:return[2,{data:t.sent(),folder:this.getByName(e)}]}}))}))},t.prototype.addUsingPath=function(e,t){return void 0===t&&(t=!1),D(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(rr,"addUsingPath(DecodedUrl='"+ft(e)+"',overwrite="+t+")"))];case 1:return[2,{data:n.sent(),folder:or(Be(this.toUrl()),"_api/web/getFolderByServerRelativePath(decodedUrl='"+ft(e)+"')")}]}}))}))},x([je("fs.add")],t.prototype,"add",null),x([je("fs.addUsingPath")],t.prototype,"addUsingPath",null),t=x([st("folders")],t)}(et),rr=$e(nr),ir=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=ot("f"),t.update=t._update("SP.Folder",(function(e){return{data:e,folder:t}})),t}return U(t,e),Object.defineProperty(t.prototype,"contentTypeOrder",{get:function(){return je.configure(tt(this,"contentTypeOrder"),"f.contentTypeOrder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"folders",{get:function(){return rr(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listItemAllFields",{get:function(){return je.configure(rt(this,"listItemAllFields"),"f.listItemAllFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentFolder",{get:function(){return je.configure(or(this,"parentFolder"),"f.parentFolder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return je.configure(rt(this,"properties"),"f.properties")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverRelativeUrl",{get:function(){return je.configure(Ze(this,"serverRelativeUrl"),"f.serverRelativeUrl")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uniqueContentTypeOrder",{get:function(){return je.configure(tt(this,"uniqueContentTypeOrder"),"f.uniqueContentTypeOrder")},enumerable:!0,configurable:!0}),t.prototype.recycle=function(){return Ke(this.clone(or,"recycle"))},t.prototype.getItem=function(){for(var e=[],t=0;t/gi),[2,(null===u?[]:u.map((function(e){return e.trim()}))).map((function(e){var t=/(.*?)<\/DefaultValue>/gi.exec(e);return t.length<1?(s.write("Could not parse default column value from '"+e+"'",2),null):{name:t[2],path:decodeURIComponent(t[1]),value:t[3]}})).filter((function(e){return null!==e}))]}}))}))},Ot.prototype.setDefaultColumnValues=function(e){return D(this,void 0,void 0,(function(){var t,n,r,i,o,s,u;return L(this,(function(a){switch(a.label){case 0:return[4,tt(this,"fields").select("InternalName","TypeAsString").filter("Hidden ne true")()];case 1:return t=a.sent(),n=e.map((function(e){var n=t.findIndex((function(t){return t.InternalName===e.name}));if(n<0)throw Error("Field '"+e.name+"' does not exist in the list. Please check the internal field name. Failed to set defaults.");var r=t[n],i="";switch(r.TypeAsString){case"Boolean":case"Currency":case"Text":case"DateTime":case"Number":case"Choice":case"User":if(v(e.value))throw Error("The type '"+r.TypeAsString+"' does not support multiple values.");i=""+e.value;break;case"MultiChoice":i=v(e.value)?e.value.map((function(e){return""+e})).join(";"):""+e.value;break;case"UserMulti":i=v(e.value)?e.value.map((function(e){return""+e})).join(";#"):""+e.value;break;case"Taxonomy":if(v(e.value))throw Error("The type '"+r.TypeAsString+"' does not support multiple values.");i=e.value.wssId+";#"+e.value.termName+"|"+e.value.termId;break;case"TaxonomyMulti":v(e.value)&&(i=e.value.map((function(e){return e.wssId+";#"+e.termName+"|"+e.termId})).join(";#")),i=e.value.wssId+";#"+e.value.termName+"|"+e.value.termId}return''+i+""})),r=""+n.join("")+"",[4,this.rootFolder.select("ServerRelativePath")()];case 2:return i=a.sent(),[4,this.select("ParentWeb/Url").expand("ParentWeb")()];case 3:return o=a.sent(),s=d("/",i.ServerRelativePath.DecodedUrl,"Forms"),u=d(o.ParentWeb.Url,"_api/web","getFolderByServerRelativePath(decodedUrl='"+ft(s)+"')","files"),[4,Ke(or(u,"add(overwrite=true,url='client_LocationBasedDefaults.html')"),{body:r})];case 4:return a.sent(),[4,this.eventReceivers.filter("ReceiverName eq 'LocationBasedMetadataDefaultsReceiver ItemAdded'").select("ReceiverId")()];case 5:return a.sent().length<1?[4,Ke(Ct(this.eventReceivers,"add"),Ue({eventReceiverCreationInformation:{EventType:10001,ReceiverAssembly:"Microsoft.Office.DocumentManagement, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c",ReceiverClass:"Microsoft.Office.DocumentManagement.LocationBasedMetadataDefaultsReceiver",ReceiverName:"LocationBasedMetadataDefaultsReceiver ItemAdded",SequenceNumber:1e3,Synchronization:1}}))]:[3,7];case 6:a.sent(),a.label=7;case 7:return[2]}}))}))},ir.prototype.getDefaultColumnValues=function(){return D(this,void 0,void 0,(function(){var e,t,n;return L(this,(function(r){switch(r.label){case 0:return[4,or(this,"Properties").select("vti_x005f_listname")()];case 1:return e=r.sent(),[4,this.select("ServerRelativePath")()];case 2:return t=r.sent().ServerRelativePath,n=St(Be(ut(e))),[4,n.lists.getById(e.vti_x005f_listname).getDefaultColumnValues()];case 3:return[2,r.sent().filter((function(e){return e.path.toLowerCase()===t.DecodedUrl.toLowerCase()}))]}}))}))},ir.prototype.setDefaultColumnValues=function(e,t){return void 0===t&&(t=!0),D(this,void 0,void 0,(function(){var n,r,i,o,s,u;return L(this,(function(a){switch(a.label){case 0:return[4,or(this,"Properties").select("vti_x005f_listname")()];case 1:return n=a.sent(),r=St(Be(ut(n))),i=r.lists.getById(n.vti_x005f_listname),[4,this.select("ServerRelativePath")()];case 2:return o=a.sent().ServerRelativePath.DecodedUrl,[4,i.getDefaultColumnValues()];case 3:return s=a.sent(),u=t?s:s.filter((function(e){return e.path!==o})),e.forEach((function(e){var t=u.find((function(t){return t.name===e.name&&t.path===o}));t?t.value=e.value:u.push({name:e.name,path:o,value:e.value})})),[4,i.setDefaultColumnValues(u)];case 4:return a.sent(),[2]}}))}))},ir.prototype.clearDefaultColumnValues=function(){return D(this,void 0,void 0,(function(){return L(this,(function(e){switch(e.label){case 0:return[4,this.setDefaultColumnValues([],!1)];case 1:return e.sent(),[2]}}))}))};var sr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.addAvailableContentType=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(ur,"addAvailableContentType"),Ue({contentTypeId:e}))];case 1:return t=n.sent(),[2,{contentType:this.getById(t.id),data:t}]}}))}))},t.prototype.getById=function(e){return je.configure(cr(this).concat("('"+e+"')"),"cts.getById")},t.prototype.add=function(e,t,n,r,i){return void 0===n&&(n=""),void 0===r&&(r="Custom Content Types"),void 0===i&&(i={}),D(this,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:return o=Ue(Object.assign(De("SP.ContentType"),{Description:n,Group:r,Id:{StringValue:e},Name:t},i)),[4,Ke(this,o)];case 1:return s=u.sent(),[2,{contentType:this.getById(s.id),data:s}]}}))}))},x([je("cts.addAvailableContentType")],t.prototype,"addAvailableContentType",null),x([je("cts.add")],t.prototype,"add",null),t=x([st("contenttypes")],t)}(et),ur=$e(sr),ar=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("ct"),t}return U(t,e),Object.defineProperty(t.prototype,"fieldLinks",{get:function(){return je.configure(pr(this),"ct.fieldLinks")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fields",{get:function(){return je.configure(tt(this,"fields"),"ct.fields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return je.configure(cr(this,"parent"),"ct.parent")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"workflowAssociations",{get:function(){return je.configure(tt(this,"workflowAssociations"),"ct.workflowAssociations")},enumerable:!0,configurable:!0}),t}(nt),cr=$e(ar),lr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(hr(this).concat("(guid'"+e+"')"),"fls.getById")},t=x([st("fieldlinks")],t)}(et),pr=$e(lr),dr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(nt),hr=$e(dr);ee(bt,"contentTypes",ur),ee(Nt,"contentType",cr,"ContentType"),ee(Ot,"contentTypes",ur);var fr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t){return void 0===t&&(t=!1),D(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(yr,"add"),Ue({featdefScope:0,featureId:e,force:t}))];case 1:return[2,{data:n.sent(),feature:this.getById(e)}]}}))}))},t.prototype.getById=function(e){var t=vr(this);return t.concat("('"+e+"')"),je.configure(t,"fes.getById")},t.prototype.remove=function(e,t){return void 0===t&&(t=!1),Ke(this.clone(yr,"remove"),Ue({featureId:e,force:t}))},x([je("fes.add")],t.prototype,"add",null),x([je("fes.remove")],t.prototype,"remove",null),t=x([st("features")],t)}(et),yr=$e(fr),gr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.deactivate=function(e){return void 0===e&&(e=!1),D(this,void 0,void 0,(function(){var t,n,r;return L(this,(function(i){switch(i.label){case 0:return t=this.addBatchDependency(),[4,vr(this).select("DefinitionId")()];case 1:return n=i.sent(),r=this.getParent(yr,this.parentUrl,"",this.batch).remove(n.DefinitionId,e),t(),[2,r]}}))}))},x([je("fe.deactivate")],t.prototype,"deactivate",null),t}(nt),vr=$e(gr);ee(yt,"features",yr),ee(bt,"features",yr);var mr,br,Sr,Tr,Pr,wr,Ir,_r,Or=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(Rr(this).concat("('"+e+"')"),"fs.getById")},t.prototype.getByTitle=function(e){return je.configure(Rr(this,"getByTitle('"+e+"')"),"fs.getByTitle")},t.prototype.getByInternalNameOrTitle=function(e){return je.configure(Rr(this,"getByInternalNameOrTitle('"+e+"')"),"fs.getByInternalNameOrTitle")},t.prototype.createFieldAsXml=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return"string"==typeof e&&(e={SchemaXml:e}),t=Ue({parameters:m(De("SP.XmlSchemaFieldCreationInformation"),e)}),[4,Ke(this.clone(Cr,"createfieldasxml"),t)];case 1:return[2,{data:n=r.sent(),field:this.getById(n.Id)}]}}))}))},t.prototype.add=function(e,t,n){return D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=Ue(Object.assign(De(t),{Title:e},n)),je.isTagged(this)||je.configure(this,"fs.add"),[4,Ke(this.clone(Cr,null),r)];case 1:return[2,{data:i=o.sent(),field:this.getById(i.Id)}]}}))}))},t.prototype.addText=function(e,t,n){void 0===t&&(t=255);var r={FieldTypeKind:2,MaxLength:t};return this.add(e,"SP.FieldText",m(r,n))},t.prototype.addCalculated=function(e,t,n,r,i){void 0===r&&(r=mr.Text);var o={DateFormat:n,FieldTypeKind:17,Formula:t,OutputType:r};return this.add(e,"SP.FieldCalculated",m(o,i))},t.prototype.addDateTime=function(e,t,n,r,i){void 0===t&&(t=br.DateOnly),void 0===n&&(n=Pr.Gregorian),void 0===r&&(r=Sr.Unspecified);var o={DateTimeCalendarType:n,DisplayFormat:t,FieldTypeKind:4,FriendlyDisplayFormat:r};return this.add(e,"SP.FieldDateTime",m(o,i))},t.prototype.addNumber=function(e,t,n,r){var i={FieldTypeKind:9};return void 0!==t&&(i=m({MinimumValue:t},i)),void 0!==n&&(i=m({MaximumValue:n},i)),this.add(e,"SP.FieldNumber",m(i,r))},t.prototype.addCurrency=function(e,t,n,r,i){void 0===r&&(r=1033);var o={CurrencyLocaleId:r,FieldTypeKind:10};return void 0!==t&&(o=m({MinimumValue:t},o)),void 0!==n&&(o=m({MaximumValue:n},o)),this.add(e,"SP.FieldCurrency",m(o,i))},t.prototype.addMultilineText=function(e,t,n,r,i,o,s){void 0===t&&(t=6),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===o&&(o=!0);var u={AllowHyperlink:o,AppendOnly:i,FieldTypeKind:3,NumberOfLines:t,RestrictedMode:r,RichText:n};return this.add(e,"SP.FieldMultiLineText",m(u,s))},t.prototype.addUrl=function(e,t,n){void 0===t&&(t=wr.Hyperlink);var r={DisplayFormat:t,FieldTypeKind:11};return this.add(e,"SP.FieldUrl",m(r,n))},t.prototype.addUser=function(e,t,n){var r={FieldTypeKind:20,SelectionMode:t};return this.add(e,"SP.FieldUser",m(r,n))},t.prototype.addLookup=function(e,t,n,r){return D(this,void 0,void 0,(function(){var i,o,s;return L(this,(function(u){switch(u.label){case 0:return i=m({FieldTypeKind:7,LookupFieldName:n,LookupListId:t,Title:e},r),o=Ue({parameters:m(De("SP.FieldCreationInformation"),i)}),[4,Ke(this.clone(Cr,"addfield"),o)];case 1:return[2,{data:s=u.sent(),field:this.getById(s.Id)}]}}))}))},t.prototype.addChoice=function(e,t,n,r,i){void 0===n&&(n=_r.Dropdown);var o={Choices:{results:t},EditFormat:n,FieldTypeKind:6,FillInChoice:r};return this.add(e,"SP.FieldChoice",m(o,i))},t.prototype.addMultiChoice=function(e,t,n,r){var i={Choices:{results:t},FieldTypeKind:15,FillInChoice:n};return this.add(e,"SP.FieldMultiChoice",m(i,r))},t.prototype.addBoolean=function(e,t){return this.add(e,"SP.Field",m({FieldTypeKind:8},t))},t.prototype.addDependentLookupField=function(e,t,n){return D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r="adddependentlookupfield(displayName='"+e+"', primarylookupfieldid='"+t+"', showfield='"+n+"')",[4,Ke(this.clone(Cr,r))];case 1:return[2,{data:i=o.sent(),field:this.getById(i.Id)}]}}))}))},t.prototype.addLocation=function(e,t){return this.add(e,"SP.FieldLocation",m({FieldTypeKind:33},t))},x([je("fs.createFieldAsXml")],t.prototype,"createFieldAsXml",null),x([je("fs.addText")],t.prototype,"addText",null),x([je("fs.addCalculated")],t.prototype,"addCalculated",null),x([je("fs.addDateTime")],t.prototype,"addDateTime",null),x([je("fs.addNumber")],t.prototype,"addNumber",null),x([je("fs.addCurrency")],t.prototype,"addCurrency",null),x([je("fs.addMultilineText")],t.prototype,"addMultilineText",null),x([je("fs.addUrl")],t.prototype,"addUrl",null),x([je("fs.addUser")],t.prototype,"addUser",null),x([je("fs.addLookup")],t.prototype,"addLookup",null),x([je("fs.addChoice")],t.prototype,"addChoice",null),x([je("fs.addMultiChoice")],t.prototype,"addMultiChoice",null),x([je("fs.addBoolean")],t.prototype,"addBoolean",null),x([je("fs.addDependentLookupField")],t.prototype,"addDependentLookupField",null),x([je("fs.addLocation")],t.prototype,"addLocation",null),t=x([st("fields")],t)}(et),Cr=$e(Or),Er=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("f"),t}return U(t,e),t.prototype.update=function(e,t){return D(this,void 0,void 0,(function(){var n,r;return L(this,(function(i){switch(i.label){case 0:return null!=t?[3,2]:[4,this.select("FieldTypeKind")()];case 1:n=i.sent(),t="SP.Field"+mr[n.FieldTypeKind],i.label=2;case 2:return r=Ue(m(De(t),e),xe({"X-HTTP-Method":"MERGE"})),[4,Ke(this,r)];case 3:return[2,{data:i.sent(),field:this}]}}))}))},t.prototype.setShowInDisplayForm=function(e){return Ke(this.clone(Rr,"setshowindisplayform("+e+")"))},t.prototype.setShowInEditForm=function(e){return Ke(this.clone(Rr,"setshowineditform("+e+")"))},t.prototype.setShowInNewForm=function(e){return Ke(this.clone(Rr,"setshowinnewform("+e+")"))},x([je("f.update")],t.prototype,"update",null),x([je("f.setShowInDisplayForm")],t.prototype,"setShowInDisplayForm",null),x([je("f.setShowInEditForm")],t.prototype,"setShowInEditForm",null),x([je("f.setShowInNewForm")],t.prototype,"setShowInNewForm",null),t}(nt),Rr=$e(Er);!function(e){e[e.Invalid=0]="Invalid",e[e.Integer=1]="Integer",e[e.Text=2]="Text",e[e.Note=3]="Note",e[e.DateTime=4]="DateTime",e[e.Counter=5]="Counter",e[e.Choice=6]="Choice",e[e.Lookup=7]="Lookup",e[e.Boolean=8]="Boolean",e[e.Number=9]="Number",e[e.Currency=10]="Currency",e[e.URL=11]="URL",e[e.Computed=12]="Computed",e[e.Threading=13]="Threading",e[e.Guid=14]="Guid",e[e.MultiChoice=15]="MultiChoice",e[e.GridChoice=16]="GridChoice",e[e.Calculated=17]="Calculated",e[e.File=18]="File",e[e.Attachments=19]="Attachments",e[e.User=20]="User",e[e.Recurrence=21]="Recurrence",e[e.CrossProjectLink=22]="CrossProjectLink",e[e.ModStat=23]="ModStat",e[e.Error=24]="Error",e[e.ContentTypeId=25]="ContentTypeId",e[e.PageSeparator=26]="PageSeparator",e[e.ThreadIndex=27]="ThreadIndex",e[e.WorkflowStatus=28]="WorkflowStatus",e[e.AllDayEvent=29]="AllDayEvent",e[e.WorkflowEventType=30]="WorkflowEventType"}(mr||(mr={})),function(e){e[e.DateOnly=0]="DateOnly",e[e.DateTime=1]="DateTime"}(br||(br={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.Disabled=1]="Disabled",e[e.Relative=2]="Relative"}(Sr||(Sr={})),function(e){e[e.DefaultValue=0]="DefaultValue",e[e.AddToDefaultContentType=1]="AddToDefaultContentType",e[e.AddToNoContentType=2]="AddToNoContentType",e[e.AddToAllContentTypes=4]="AddToAllContentTypes",e[e.AddFieldInternalNameHint=8]="AddFieldInternalNameHint",e[e.AddFieldToDefaultView=16]="AddFieldToDefaultView",e[e.AddFieldCheckDisplayName=32]="AddFieldCheckDisplayName"}(Tr||(Tr={})),function(e){e[e.Gregorian=1]="Gregorian",e[e.Japan=3]="Japan",e[e.Taiwan=4]="Taiwan",e[e.Korea=5]="Korea",e[e.Hijri=6]="Hijri",e[e.Thai=7]="Thai",e[e.Hebrew=8]="Hebrew",e[e.GregorianMEFrench=9]="GregorianMEFrench",e[e.GregorianArabic=10]="GregorianArabic",e[e.GregorianXLITEnglish=11]="GregorianXLITEnglish",e[e.GregorianXLITFrench=12]="GregorianXLITFrench",e[e.KoreaJapanLunar=14]="KoreaJapanLunar",e[e.ChineseLunar=15]="ChineseLunar",e[e.SakaEra=16]="SakaEra",e[e.UmAlQura=23]="UmAlQura"}(Pr||(Pr={})),function(e){e[e.Hyperlink=0]="Hyperlink",e[e.Image=1]="Image"}(wr||(wr={})),function(e){e[e.PeopleAndGroups=1]="PeopleAndGroups",e[e.PeopleOnly=0]="PeopleOnly"}(Ir||(Ir={})),function(e){e[e.Dropdown=0]="Dropdown",e[e.RadioButtons=1]="RadioButtons"}(_r||(_r={})),ee(bt,"fields",Cr),ee(bt,"availablefields",Cr,"availablefields"),ee(Ot,"fields",Cr),ee(ir,"files",Pn),ee(Nt,"file",In,"file"),ee(Nt,"folder",or,"folder"),ee(Ot,"rootFolder",or,"rootFolder"),ee(bt,"folders",rr),ee(bt,"rootFolder",or,"rootFolder"),bt.prototype.getFolderByServerRelativeUrl=function(e){return or(this,"getFolderByServerRelativeUrl('"+ft(e)+"')")},bt.prototype.getFolderByServerRelativePath=function(e){return or(this,"getFolderByServerRelativePath(decodedUrl='"+ft(e)+"')")},bt.prototype.getFolderById=function(e){return or(this,"getFolderById('"+e+"')")};var Nr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(xr(this).concat("('"+e+"')"),"fos.getById")},t=x([st("forms")],t)}(et),Ar=$e(Nr),Ur=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(nt),xr=$e(Ur);ee(Ot,"forms",Ar,"forms");var Dr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(Fr(this,"GetById?hubSiteId='"+e+"'"),"hss.getById")},t=x([st("_api/hubsites")],t)}(et),Lr=$e(Dr),kr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getSite=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,this.select("SiteUrl")()];case 1:return e=t.sent(),[2,gt(e.SiteUrl)]}}))}))},x([je("hs.getSite")],t.prototype,"getSite",null),t}(nt),Fr=$e(kr);yt.prototype.joinHubSite=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(gt,"joinHubSite('"+e+"')"))];case 1:return t.sent(),[2]}}))}))},yt.prototype.registerHubSite=function(){return D(this,void 0,void 0,(function(){return L(this,(function(e){switch(e.label){case 0:return[4,Ke(this.clone(gt,"registerHubSite"))];case 1:return e.sent(),[2]}}))}))},yt.prototype.unRegisterHubSite=function(){return D(this,void 0,void 0,(function(){return L(this,(function(e){switch(e.label){case 0:return[4,Ke(this.clone(gt,"unRegisterHubSite"))];case 1:return e.sent(),[2]}}))}))},bt.prototype.hubSiteData=function(e){return void 0===e&&(e=!1),D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,this.clone(St,"hubSiteData("+e+")")()];case 1:return"string"==typeof(t=n.sent())?[2,JSON.parse(t)]:[2,t]}}))}))},bt.prototype.syncHubSiteTheme=function(){return Ke(this.clone(St,"syncHubSiteTheme"))},Reflect.defineProperty(ht.prototype,"hubSites",{configurable:!0,enumerable:!0,get:function(){return Lr(this._baseUrl).configure(this._options)}});var Br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(qr(this).concat("("+e+")"),"nns.getById")},t.prototype.add=function(e,t,n){return void 0===n&&(n=!0),D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=Ue(m(De("SP.NavigationNode"),{IsVisible:n,Title:e,Url:t})),[4,Ke(this.clone(jr,null),r)];case 1:return[2,{data:i=o.sent(),node:this.getById(i.Id)}]}}))}))},t.prototype.moveAfter=function(e,t){var n=Ue({nodeId:e,previousNodeId:t});return Ke(this.clone(jr,"MoveAfter"),n)},x([je("nns.add")],t.prototype,"add",null),x([je("nns.moveAfter")],t.prototype,"moveAfter",null),t}(et),jr=$e(Br),Mr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("nn"),t}return U(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return je.configure(jr(this,"children"),"nn.children")},enumerable:!0,configurable:!0}),t.prototype.update=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return t=Ue(m(De("SP.NavigationNode"),e),xe({"X-HTTP-Method":"MERGE"})),[4,Ke(this,t)];case 1:return[2,{data:n.sent(),node:this}]}}))}))},x([je("nn.update")],t.prototype,"update",null),t}(nt),qr=$e(Mr),Gr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"quicklaunch",{get:function(){return je.configure(jr(this,"quicklaunch"),"n.quicklaunch")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topNavigationBar",{get:function(){return je.configure(jr(this,"topnavigationbar"),"n.topnavigationbar")},enumerable:!0,configurable:!0}),t=x([st("navigation")],t)}(Ye),Wr=$e(Gr),Vr=function(e){function t(t){return void 0===t&&(t=null),e.call(this,"_api/navigation",t)||this}return U(t,e),t.prototype.getMenuState=function(e,t,n,r){return void 0===e&&(e=null),void 0===t&&(t=10),void 0===n&&(n=null),void 0===r&&(r=null),Ke(Hr("MenuState"),Ue({customProperties:r,depth:t,mapProviderName:n,menuNodeKey:e}))},t.prototype.getMenuNodeKey=function(e,t){return void 0===t&&(t=null),Ke(Hr("MenuNodeKey"),Ue({currentUrl:e,mapProviderName:t}))},x([je("ns.getMenuState")],t.prototype,"getMenuState",null),x([je("ns.getMenuNodeKey")],t.prototype,"getMenuNodeKey",null),t}(Ye),Hr=function(e){return new Vr(e)};ee(bt,"navigation",Wr),Reflect.defineProperty(ht.prototype,"navigation",{configurable:!0,enumerable:!0,get:function(){return Hr().configure(this._options)}});var Kr,Qr=function(e){function t(t,n){void 0===n&&(n="_api/sp.userprofiles.peoplemanager");var r=e.call(this,t,n)||this;return r.clientPeoplePickerQuery=new $r(t).configureFrom(r),r.profileLoader=new Xr(t).configureFrom(r),r}return U(t,e),Object.defineProperty(t.prototype,"editProfileLink",{get:function(){return this.clone(zr,"EditProfileLink").get()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isMyPeopleListPublic",{get:function(){return this.clone(zr,"IsMyPeopleListPublic").get()},enumerable:!0,configurable:!0}),t.prototype.amIFollowedBy=function(e){var t=this.clone(zr,"amifollowedby(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),t.get()},t.prototype.amIFollowing=function(e){var t=this.clone(zr,"amifollowing(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),t.get()},t.prototype.getFollowedTags=function(e){return void 0===e&&(e=20),this.clone(zr,"getfollowedtags("+e+")").get()},t.prototype.getFollowersFor=function(e){var t=this.clone(zr,"getfollowersfor(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),t.get()},Object.defineProperty(t.prototype,"myFollowers",{get:function(){return tt(this,"getmyfollowers")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"myProperties",{get:function(){return new t(this,"getmyproperties")},enumerable:!0,configurable:!0}),t.prototype.getPeopleFollowedBy=function(e){var t=this.clone(zr,"getpeoplefollowedby(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),t.get()},t.prototype.getPropertiesFor=function(e){var t=this.clone(zr,"getpropertiesfor(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),t.get()},Object.defineProperty(t.prototype,"trendingTags",{get:function(){var e=this.clone(zr,null);return e.concat(".gettrendingtags"),e.get()},enumerable:!0,configurable:!0}),t.prototype.getUserProfilePropertyFor=function(e,t){var n=this.clone(zr,"getuserprofilepropertyfor(accountname=@v, propertyname='"+t+"')");return n.query.set("@v","'"+encodeURIComponent(e)+"'"),n.get()},t.prototype.hideSuggestion=function(e){var t=this.clone(zr,"hidesuggestion(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),Ke(t)},t.prototype.isFollowing=function(e,t){var n=this.clone(zr,null);return n.concat(".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)"),n.query.set("@v","'"+encodeURIComponent(e)+"'"),n.query.set("@y","'"+encodeURIComponent(t)+"'"),n.get()},t.prototype.setMyProfilePic=function(e){var n=null,r=new FileReader;r.onload=function(e){return n=e.target.result},r.readAsArrayBuffer(e);var i=new t(this,"setmyprofilepicture");return Ke(i,Ue(String.fromCharCode.apply(null,new Uint16Array(n))))},t.prototype.setSingleValueProfileProperty=function(e,t,n){return Ke(this.clone(zr,"SetSingleValueProfileProperty"),Ue({accountName:e,propertyName:t,propertyValue:n}))},t.prototype.setMultiValuedProfileProperty=function(e,t,n){return Ke(this.clone(zr,"SetMultiValuedProfileProperty"),Ue({accountName:e,propertyName:t,propertyValues:n}))},t.prototype.createPersonalSiteEnqueueBulk=function(){for(var e=[],t=0;t0?o:gi(r)]=t.length>1?t:t[0],n};var i=yi.has(r)?yi.get(r):gi(r);return e.query[i]=!0,n}})}var mi,bi,Si,Ti=/_api\/search\/postquery$/i,Pi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.execute=function(e){return D(this,void 0,void 0,(function(){var t,n,r,i;return L(this,(function(o){switch(o.label){case 0:return t=this.parseQuery(e),n=Ue({request:m(De("Microsoft.Office.Server.Search.REST.SearchRequest"),Object.assign({},t,{HitHighlightedProperties:this.fixArrProp(t.HitHighlightedProperties),Properties:this.fixArrProp(t.Properties),RefinementFilters:this.fixArrProp(t.RefinementFilters),ReorderingRules:this.fixArrProp(t.ReorderingRules),SelectProperties:this.fixArrProp(t.SelectProperties),SortList:this.fixArrProp(t.SortList)}))}),this.data.useCaching&&(this._forceCaching=!0,r="PnPjs.SearchWithCaching("+I(n.body)+")",g(this.data.cachingOptions)?Ti.test(this.data.cachingOptions.key)&&(this.data.cachingOptions.key=r):this.data.cachingOptions=new Y(r)),[4,Ke(this,n)];case 1:return i=o.sent(),[2,new Ii(i,this.toUrl(),t)]}}))}))},t.prototype.fixArrProp=function(e){return void 0===e?{results:[]}:{results:v(e)?e:[e]}},t.prototype.parseQuery=function(e){return"string"==typeof e?{Querytext:e}:e.toSearchQuery?e.toSearchQuery():e},x([je("se.execute")],t.prototype,"execute",null),t=x([st("_api/search/postquery")],t)}(nt),wi=function(e,t){return void 0===t&&(t={}),function(n){return new Pi(e).configure(t).execute(n)}},Ii=function(){function e(e,t,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),this._url=t,this._query=n,this._raw=r,this._primary=i,this._url=this._url.replace(Ti,""),this._raw=e.postquery?e.postquery:e}return Object.defineProperty(e.prototype,"ElapsedTime",{get:function(){var e;return(null===(e=null===this||void 0===this?void 0:this.RawSearchResults)||void 0===e?void 0:e.ElapsedTime)||0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"RowCount",{get:function(){var e,t,n;return(null===(n=null===(t=null===(e=null===this||void 0===this?void 0:this.RawSearchResults)||void 0===e?void 0:e.PrimaryQueryResult)||void 0===t?void 0:t.RelevantResults)||void 0===n?void 0:n.RowCount)||0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"TotalRows",{get:function(){var e,t,n;return(null===(n=null===(t=null===(e=null===this||void 0===this?void 0:this.RawSearchResults)||void 0===e?void 0:e.PrimaryQueryResult)||void 0===t?void 0:t.RelevantResults)||void 0===n?void 0:n.TotalRows)||0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"TotalRowsIncludingDuplicates",{get:function(){var e,t,n;return(null===(n=null===(t=null===(e=null===this||void 0===this?void 0:this.RawSearchResults)||void 0===e?void 0:e.PrimaryQueryResult)||void 0===t?void 0:t.RelevantResults)||void 0===n?void 0:n.TotalRowsIncludingDuplicates)||0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"RawSearchResults",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"PrimarySearchResults",{get:function(){var e,t,n,r;return null===this._primary&&(this._primary=this.formatSearchResults((null===(r=null===(n=null===(t=null===(e=this._raw)||void 0===e?void 0:e.PrimaryQueryResult)||void 0===t?void 0:t.RelevantResults)||void 0===n?void 0:n.Table)||void 0===r?void 0:r.Rows)||null)),this._primary},enumerable:!0,configurable:!0}),e.prototype.getPage=function(e,t){if(this.TotalRowsthis.TotalRows?Promise.resolve(null):wi(this._url)(r)},e.prototype.formatSearchResults=function(e){var t,n,r=new Array;if(void 0===e||null==e)return[];var i=e.results?e.results:e;try{for(var o=k(i),s=o.next();!s.done;s=o.next()){var u=s.value,a=u.Cells.results?u.Cells.results:u.Cells;r.push(a.reduce((function(e,t){return Reflect.defineProperty(e,t.Key,{configurable:!1,enumerable:!0,value:t.Value,writable:!1}),e}),{}))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},e}(),_i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.execute=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return this.mapQueryToQueryString(e),[4,this.get()];case 1:return t=r.sent(),[2,{PeopleNames:(n=w(t,"suggest")?function(e){return t.suggest[e].results}:function(e){return t[e]})("PeopleNames"),PersonalResults:n("PersonalResults"),Queries:n("Queries")}]}}))}))},t.prototype.mapQueryToQueryString=function(e){var t=this;this.query.set("querytext","'"+e.querytext+"'");var n,r=(n=e,function(e){return function(r){w(n,e)&&t.query.set(r,n[e].toString())}});r("count")("inumberofquerysuggestions"),r("personalCount")("inumberofresultsuggestions"),r("preQuery")("fprequerysuggestions"),r("hitHighlighting")("fhithighlighting"),r("capitalize")("fcapitalizefirstletters"),r("culture")("culture"),r("stemming")("enablestemming"),r("includePeople")("showpeoplenamesuggestions"),r("queryRules")("enablequeryrules"),r("prefixMatch")("fprefixmatchallterms")},x([je("su.execute")],t.prototype,"execute",null),t=x([st("_api/search/suggest")],t)}(nt),Oi=function(e,t){return void 0===t&&(t={}),function(n){return new _i(e).configure(t).execute(n)}};!function(e){e[e.Ascending=0]="Ascending",e[e.Descending=1]="Descending",e[e.FQLFormula=2]="FQLFormula"}(mi||(mi={})),function(e){e[e.ResultContainsKeyword=0]="ResultContainsKeyword",e[e.TitleContainsKeyword=1]="TitleContainsKeyword",e[e.TitleMatchesKeyword=2]="TitleMatchesKeyword",e[e.UrlStartsWith=3]="UrlStartsWith",e[e.UrlExactlyMatches=4]="UrlExactlyMatches",e[e.ContentTypeIs=5]="ContentTypeIs",e[e.FileExtensionMatches=6]="FileExtensionMatches",e[e.ResultHasTag=7]="ResultHasTag",e[e.ManualCondition=8]="ManualCondition"}(bi||(bi={})),function(e){e[e.None=0]="None",e[e.StringType=1]="StringType",e[e.Int32Type=2]="Int32Type",e[e.BooleanType=3]="BooleanType",e[e.StringArrayType=4]="StringArrayType",e[e.UnSupportedType=5]="UnSupportedType"}(Si||(Si={}));var Ci=function(){function e(){}return e.Documents="e7ec8cee-ded8-43c9-beb5-436b54b31e84",e.ItemsMatchingContentType="5dc9f503-801e-4ced-8a2c-5d1237132419",e.ItemsMatchingTag="e1327b9c-2b8c-4b23-99c9-3730cb29c3f7",e.ItemsRelatedToCurrentUser="48fec42e-4a92-48ce-8363-c2703a40e67d",e.ItemsWithSameKeywordAsThisItem="5c069288-1d17-454a-8ac6-9c642a065f48",e.LocalPeopleResults="b09a7990-05ea-4af9-81ef-edfab16c4e31",e.LocalReportsAndDataResults="203fba36-2763-4060-9931-911ac8c0583b",e.LocalSharePointResults="8413cd39-2156-4e00-b54d-11efd9abdb89",e.LocalVideoResults="78b793ce-7956-4669-aa3b-451fc5defebf",e.Pages="5e34578e-4d08-4edc-8bf3-002acf3cdbcc",e.Pictures="38403c8c-3975-41a8-826e-717f2d41568a",e.Popular="97c71db1-58ce-4891-8b64-585bc2326c12",e.RecentlyChangedItems="ba63bbae-fa9c-42c0-b027-9a878f16557c",e.RecommendedItems="ec675252-14fa-4fbe-84dd-8d098ed74181",e.Wiki="9479bf85-e257-4318-b5a8-81a180f5faa1",e}();ht.prototype.search=function(e){return wi(this._baseUrl,this._options)(e)},ht.prototype.searchWithCaching=function(e,t){return new Pi(this._baseUrl).configure(this._options).usingCaching(t).execute(e)},ht.prototype.searchSuggest=function(e){return Oi(this._baseUrl,this._options)("string"==typeof e?{querytext:e}:e)};var Ei,Ri,Ni,Ai,Ui,xi,Di,Li=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(Bi(this,"getById("+e+")"),"sus.getById")},t.prototype.getByEmail=function(e){return je.configure(Bi(this,"getByEmail('"+e+"')"),"sus.getByEmail")},t.prototype.getByLoginName=function(e){return je.configure(Bi(this).concat("('!@v::"+encodeURIComponent(e)+"')"),"sus.getByLoginName")},t.prototype.removeById=function(e){return Ke(this.clone(ki,"removeById("+e+")"))},t.prototype.removeByLoginName=function(e){var t=this.clone(ki,"removeByLoginName(@v)");return t.query.set("@v","'"+encodeURIComponent(e)+"'"),Ke(t)},t.prototype.add=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this,Ue(m(De("SP.User"),{LoginName:e})))];case 1:return t.sent(),[2,this.getByLoginName(e)]}}))}))},x([je("sus.remId")],t.prototype,"removeById",null),x([je("sus.remLoginName")],t.prototype,"removeByLoginName",null),x([je("sus.add")],t.prototype,"add",null),t=x([st("siteusers")],t)}(et),ki=$e(Li),Fi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("su"),t.update=t._update("SP.User",(function(e){return{data:e,user:t}})),t}return U(t,e),Object.defineProperty(t.prototype,"groups",{get:function(){return je.configure(Mi(this,"groups"),"su.groups")},enumerable:!0,configurable:!0}),t}(nt),Bi=$e(Fi),ji=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(Gi(this).concat("("+e+")"),"sgs.getById")},t.prototype.add=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return t=Ue(m(De("SP.Group"),e)),[4,Ke(je.configure(this,"sgs.add"),t)];case 1:return[2,{data:n=r.sent(),group:this.getById(n.Id)}]}}))}))},t.prototype.getByName=function(e){return je.configure(Gi(this,"getByName('"+e+"')"),"sgs.getByName")},t.prototype.removeById=function(e){return Ke(this.clone(Mi,"removeById('"+e+"')"))},t.prototype.removeByLoginName=function(e){return Ke(this.clone(Mi,"removeByLoginName('"+e+"')"))},x([je("sgs.removeById")],t.prototype,"removeById",null),x([je("sgs.removeByLoginName")],t.prototype,"removeByLoginName",null),t=x([st("sitegroups")],t)}(et),Mi=$e(ji),qi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.update=t._update("SP.Group",(function(e,n){var r=t;return w(n,"Title")&&(r=t.getParent(Gi,t.parentUrl,"getByName('"+n.Title+"')")),{data:e,group:r}})),t}return U(t,e),Object.defineProperty(t.prototype,"users",{get:function(){return je.configure(ki(this,"users"),"sg.users")},enumerable:!0,configurable:!0}),t.prototype.setUserAsOwner=function(e){return Ke(this.clone(Gi,"SetUserAsOwner("+e+")"))},x([je("sg.setUserAsOwner")],t.prototype,"setUserAsOwner",null),t}(nt),Gi=$e(qi),Wi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return Ki(this).concat("("+e+")")},t.prototype.add=function(e,t){return D(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(Vi,"addroleassignment(principalid="+e+", roledefid="+t+")"))];case 1:return n.sent(),[2]}}))}))},t.prototype.remove=function(e,t){return D(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(Vi,"removeroleassignment(principalid="+e+", roledefid="+t+")"))];case 1:return n.sent(),[2]}}))}))},t=x([st("roleassignments")],t)}(et),Vi=$e(Wi),Hi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("ra"),t}return U(t,e),Object.defineProperty(t.prototype,"groups",{get:function(){return je.configure(Mi(this,"groups"),"ra.groups")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bindings",{get:function(){return tt(this,"roledefinitionbindings")},enumerable:!0,configurable:!0}),t}(nt),Ki=$e(Hi),Qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return Ji(this,"getById("+e+")")},t.prototype.getByName=function(e){return Ji(this,"getbyname('"+e+"')")},t.prototype.getByType=function(e){return Ji(this,"getbytype("+e+")")},t.prototype.add=function(e,t,n,r){return D(this,void 0,void 0,(function(){var i,o;return L(this,(function(s){switch(s.label){case 0:return i=Ue({BasePermissions:m(De("SP.BasePermissions"),r),Description:t,Name:e,Order:n,__metadata:{type:"SP.RoleDefinition"}}),[4,Ke(this,i)];case 1:return[2,{data:o=s.sent(),definition:this.getById(o.Id)}]}}))}))},t=x([st("roledefinitions")],t)}(et),zi=$e(Qi),Xi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("rd"),t}return U(t,e),t.prototype.update=function(e){return D(this,void 0,void 0,(function(){var t,n,r,i,o;return L(this,(function(s){switch(s.label){case 0:return void 0!==w(e,(t=["BasePermissions"])[0])&&(e[t[0]]=m(De("SP."+t[0]),e[t[0]])),n=Ue(m(De("SP.RoleDefinition"),e),xe({"X-HTTP-Method":"MERGE"})),[4,Ke(this,n)];case 1:return r=s.sent(),i=this,w(e,"Name")&&(o=this.getParent(zi,this.parentUrl,""),i=o.getByName(e.Name)),[2,{data:r,definition:i}]}}))}))},t}(nt),Ji=$e(Xi);function $i(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return(t=this.clone(rt,"getUserEffectivePermissions(@user)")).query.set("@user","'"+encodeURIComponent(e)+"'"),[4,t.get()];case 1:return[2,w(n=r.sent(),"GetUserEffectivePermissions")?n.GetUserEffectivePermissions:n]}}))}))}function Yi(){return D(this,void 0,void 0,(function(){return L(this,(function(e){return[2,this.clone(Ze,"EffectiveBasePermissions").get().then((function(e){return w(e,"EffectiveBasePermissions")?e.EffectiveBasePermissions:e}))]}))}))}function Zi(e,t){return void 0===e&&(e=!1),void 0===t&&(t=!1),D(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(Ze,"breakroleinheritance(copyroleassignments="+e+", clearsubscopes="+t+")"))];case 1:return n.sent(),[2]}}))}))}function eo(){return D(this,void 0,void 0,(function(){return L(this,(function(e){switch(e.label){case 0:return[4,Ke(this.clone(Ze,"resetroleinheritance"))];case 1:return e.sent(),[2]}}))}))}function to(e,t){return D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,$i.call(this,e)];case 1:return n=r.sent(),[2,this.hasPermissions(n,t)]}}))}))}function no(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,Yi.call(this)];case 1:return t=n.sent(),[2,this.hasPermissions(t,e)]}}))}))}function ro(e,t){if(!t)return!0;if(t===Ei.FullMask)return 32767==(32767&e.High)&&65535===e.Low;var n=1;return(t-=1)>=0&&t<32?(n<<=t,0!=(e.Low&n)):t>=32&&t<64&&(n<<=t-32,0!=(e.High&n))}function io(e,t,n){return void 0===n&&(n=!1),D(this,void 0,void 0,(function(){var r,i,o;return L(this,(function(s){switch(s.label){case 0:return n?[2,fo(e,t)]:[4,yo((t=m(t,{group:null,includeAnonymousLinkInEmail:!1,propagateAcl:!1,useSimplifiedRoles:!0},!0)).role,t.group)];case 1:return r=s.sent(),Array.isArray(t.loginNames)||(t.loginNames=[t.loginNames]),i=P(t.loginNames.map((function(e){return{Key:e}}))),o={peoplePickerInput:i,roleValue:r,url:t.url},void 0!==t.emailData&&null!==t.emailData&&(o=m(o,{emailBody:t.emailData.body,emailSubject:void 0!==t.emailData.subject?t.emailData.subject:"Shared with you.",sendEmail:!0})),[2,fo(e,o)]}}))}))}function oo(e,t){void 0===t&&(t=null);var n=null!==t?t.toISOString():null,r=je.configure(this.clone(rt,"shareLink"),"sh.getShareLink");return Ke(r,Ue({request:{createLink:!0,emailData:null,settings:{expiration:n,linkKind:e}}}))}function so(e){var t=je.configure(this.clone(rt,"checkPermissions"),"sh.checkPermissions");return Ke(t,Ue({recipients:e}))}function uo(e,t){void 0===e&&(e=null),void 0===t&&(t=[]);var n=je.configure(this.clone(rt,"getSharingInformation"),"sh.getSharingInformation");return Ke(n.expand.apply(n,B(t)),Ue({request:e}))}function ao(e){void 0===e&&(e=!0);var t=je.configure(this.clone(rt,"getObjectSharingSettings"),"sh.getObjectSharingSettings");return Ke(t,Ue({useSimplifiedRoles:e}))}function co(){return Ke(je.configure(this.clone(rt,"unshareObject"),"sh.unshareObject"))}function lo(e){return Ke(je.configure(this.clone(rt,"deleteLinkByKind"),"sh.deleteLinkByKind"),Ue({linkKind:e}))}function po(e,t){return void 0===t&&(t=Le),Ke(je.configure(this.clone(rt,"unshareLink"),"sh.unshareLink"),Ue({linkKind:e,shareId:t}))}function ho(e,t,n,r,i,o){return void 0===r&&(r=!1),void 0===i&&(i=!1),D(this,void 0,void 0,(function(){var s,u,a,c;return L(this,(function(l){switch(l.label){case 0:return Array.isArray(t)||(t=[t]),s=P(t.map((function(e){return{Key:e}}))),u=n===Ri.Edit?Di.Contributor:Di.Reader,[4,tt("_api/web","roledefinitions").select("Id").filter("RoleTypeKind eq "+u).get()];case 1:if(a=l.sent(),!Array.isArray(a)||a.length<1)throw Error("Could not locate a role defintion with RoleTypeKind "+u);return c={includeAnonymousLinkInEmail:r,peoplePickerInput:s,propagateAcl:i,roleValue:"role:"+a[0].Id,useSimplifiedRoles:!0},void 0!==o&&(c=m(c,{emailBody:o.body,emailSubject:void 0!==o.subject?o.subject:"",sendEmail:!0})),[2,Ke(je.configure(e.clone(rt,"shareObject"),"sh.shareWith"),Ue(c))]}}))}))}function fo(e,t){var n=je.configure(St(Be(e.toUrl()),"/_api/SP.Web.ShareObject"),"sh.sendShareObjectRequest");return Ke(n.expand("UsersWithAccessRequests","GroupsSharedWith"),Ue(t))}function yo(e,t){return D(this,void 0,void 0,(function(){var n,r;return L(this,(function(i){switch(i.label){case 0:if(null==t)return[3,7];switch(t){case Di.Contributor:return[3,1];case Di.Reader:case Di.Guest:return[3,3]}return[3,5];case 1:return[4,St("_api/web","associatedmembergroup").select("Id")()];case 2:return[2,"group: "+i.sent().Id];case 3:return[4,St("_api/web","associatedvisitorgroup").select("Id")()];case 4:return[2,"group: "+i.sent().Id];case 5:throw Error("Could not determine role value for supplied value. Contributor, Reader, and Guest are supported");case 6:return[3,9];case 7:return n=e===Ri.Edit?Di.Contributor:Di.Reader,[4,zi("_api/web").select("Id").top(1).filter("RoleTypeKind eq "+n)()];case 8:if((r=i.sent()).length<1)throw Error("Could not locate associated role definition for supplied role. Edit and View are supported");return[2,"role: "+r[0].Id];case 9:return[2]}}))}))}!function(e){e[e.EmptyMask=0]="EmptyMask",e[e.ViewListItems=1]="ViewListItems",e[e.AddListItems=2]="AddListItems",e[e.EditListItems=3]="EditListItems",e[e.DeleteListItems=4]="DeleteListItems",e[e.ApproveItems=5]="ApproveItems",e[e.OpenItems=6]="OpenItems",e[e.ViewVersions=7]="ViewVersions",e[e.DeleteVersions=8]="DeleteVersions",e[e.CancelCheckout=9]="CancelCheckout",e[e.ManagePersonalViews=10]="ManagePersonalViews",e[e.ManageLists=12]="ManageLists",e[e.ViewFormPages=13]="ViewFormPages",e[e.AnonymousSearchAccessList=14]="AnonymousSearchAccessList",e[e.Open=17]="Open",e[e.ViewPages=18]="ViewPages",e[e.AddAndCustomizePages=19]="AddAndCustomizePages",e[e.ApplyThemeAndBorder=20]="ApplyThemeAndBorder",e[e.ApplyStyleSheets=21]="ApplyStyleSheets",e[e.ViewUsageData=22]="ViewUsageData",e[e.CreateSSCSite=23]="CreateSSCSite",e[e.ManageSubwebs=24]="ManageSubwebs",e[e.CreateGroups=25]="CreateGroups",e[e.ManagePermissions=26]="ManagePermissions",e[e.BrowseDirectories=27]="BrowseDirectories",e[e.BrowseUserInfo=28]="BrowseUserInfo",e[e.AddDelPrivateWebParts=29]="AddDelPrivateWebParts",e[e.UpdatePersonalWebParts=30]="UpdatePersonalWebParts",e[e.ManageWeb=31]="ManageWeb",e[e.AnonymousSearchAccessWebLists=32]="AnonymousSearchAccessWebLists",e[e.UseClientIntegration=37]="UseClientIntegration",e[e.UseRemoteAPIs=38]="UseRemoteAPIs",e[e.ManageAlerts=39]="ManageAlerts",e[e.CreateAlerts=40]="CreateAlerts",e[e.EditMyUserInfo=41]="EditMyUserInfo",e[e.EnumeratePermissions=63]="EnumeratePermissions",e[e.FullMask=65]="FullMask"}(Ei||(Ei={})),ee(Nt,"roleAssignments",Vi),ee(Nt,"firstUniqueAncestorSecurableObject",rt),Nt.prototype.getUserEffectivePermissions=$i,Nt.prototype.getCurrentUserEffectivePermissions=Yi,Nt.prototype.breakRoleInheritance=Zi,Nt.prototype.resetRoleInheritance=eo,Nt.prototype.userHasPermissions=to,Nt.prototype.currentUserHasPermissions=no,Nt.prototype.hasPermissions=ro,ee(Ot,"roleAssignments",Vi),ee(Ot,"firstUniqueAncestorSecurableObject",rt),Ot.prototype.getUserEffectivePermissions=$i,Ot.prototype.getCurrentUserEffectivePermissions=Yi,Ot.prototype.breakRoleInheritance=Zi,Ot.prototype.resetRoleInheritance=eo,Ot.prototype.userHasPermissions=to,Ot.prototype.currentUserHasPermissions=no,Ot.prototype.hasPermissions=ro,ee(bt,"roleDefinitions",zi),ee(bt,"roleAssignments",Vi),ee(bt,"firstUniqueAncestorSecurableObject",rt),bt.prototype.getUserEffectivePermissions=$i,bt.prototype.getCurrentUserEffectivePermissions=Yi,bt.prototype.breakRoleInheritance=Zi,bt.prototype.resetRoleInheritance=eo,bt.prototype.userHasPermissions=to,bt.prototype.currentUserHasPermissions=no,bt.prototype.hasPermissions=ro,function(e){e[e.None=0]="None",e[e.View=1]="View",e[e.Edit=2]="Edit",e[e.Owner=3]="Owner"}(Ri||(Ri={})),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Folder=2]="Folder",e[e.Item=3]="Item",e[e.List=4]="List",e[e.Web=5]="Web",e[e.Max=6]="Max"}(Ni||(Ni={})),function(e){e[e.None=0]="None",e[e.AllowList=1]="AllowList",e[e.BlockList=2]="BlockList"}(Ai||(Ai={})),function(e){e[e.CompletedSuccessfully=0]="CompletedSuccessfully",e[e.AccessRequestsQueued=1]="AccessRequestsQueued",e[e.NoResolvedUsers=-1]="NoResolvedUsers",e[e.AccessDenied=-2]="AccessDenied",e[e.CrossSiteRequestNotSupported=-3]="CrossSiteRequestNotSupported",e[e.UnknowError=-4]="UnknowError",e[e.EmailBodyTooLong=-5]="EmailBodyTooLong",e[e.ListUniqueScopesExceeded=-6]="ListUniqueScopesExceeded",e[e.CapabilityDisabled=-7]="CapabilityDisabled",e[e.ObjectNotSupported=-8]="ObjectNotSupported",e[e.NestedGroupsNotSupported=-9]="NestedGroupsNotSupported"}(Ui||(Ui={})),function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Direct=1]="Direct",e[e.OrganizationView=2]="OrganizationView",e[e.OrganizationEdit=3]="OrganizationEdit",e[e.AnonymousView=4]="AnonymousView",e[e.AnonymousEdit=5]="AnonymousEdit",e[e.Flexible=6]="Flexible"}(xi||(xi={})),function(e){e[e.None=0]="None",e[e.Guest=1]="Guest",e[e.Reader=2]="Reader",e[e.Contributor=3]="Contributor",e[e.WebDesigner=4]="WebDesigner",e[e.Administrator=5]="Administrator"}(Di||(Di={})),wn.prototype.shareWith=function(e,t,n,r){return void 0===t&&(t=Ri.View),void 0===n&&(n=!1),ho(this,e,t,n,!1,r)},wn.prototype.getShareLink=oo,wn.prototype.checkSharingPermissions=so,wn.prototype.getSharingInformation=uo,wn.prototype.getObjectSharingSettings=ao,wn.prototype.unshare=co,wn.prototype.deleteSharingLinkByKind=lo,wn.prototype.unshareLink=po,ir.prototype.shareWith=function(e,t,n,r,i){return void 0===t&&(t=Ri.View),void 0===n&&(n=!1),void 0===r&&(r=!1),D(this,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:return o=this.addBatchDependency(),[4,this.getShareable()];case 1:return s=u.sent(),o(),[2,s.shareWith(e,t,n,r,i)]}}))}))},ir.prototype.getShareLink=function(e,t){return void 0===t&&(t=null),D(this,void 0,void 0,(function(){var n,r;return L(this,(function(i){switch(i.label){case 0:return n=this.addBatchDependency(),[4,this.getShareable()];case 1:return r=i.sent(),n(),[2,r.getShareLink(e,t)]}}))}))},ir.prototype.checkSharingPermissions=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return t=this.addBatchDependency(),[4,this.getShareable()];case 1:return n=r.sent(),t(),[2,n.checkSharingPermissions(e)]}}))}))},ir.prototype.getSharingInformation=function(e,t){return D(this,void 0,void 0,(function(){var n,r;return L(this,(function(i){switch(i.label){case 0:return n=this.addBatchDependency(),[4,this.getShareable()];case 1:return r=i.sent(),n(),[2,r.getSharingInformation(e,t)]}}))}))},ir.prototype.getObjectSharingSettings=function(e){return void 0===e&&(e=!0),D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return t=this.addBatchDependency(),[4,this.getShareable()];case 1:return n=r.sent(),t(),[2,n.getObjectSharingSettings(e)]}}))}))},ir.prototype.unshare=function(){return D(this,void 0,void 0,(function(){var e,t;return L(this,(function(n){switch(n.label){case 0:return e=this.addBatchDependency(),[4,this.getShareable()];case 1:return t=n.sent(),e(),[2,t.unshare()]}}))}))},ir.prototype.deleteSharingLinkByKind=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return t=this.addBatchDependency(),[4,this.getShareable()];case 1:return n=r.sent(),t(),[2,n.deleteSharingLinkByKind(e)]}}))}))},ir.prototype.unshareLink=function(e,t){return D(this,void 0,void 0,(function(){var n,r;return L(this,(function(i){switch(i.label){case 0:return n=this.addBatchDependency(),[4,this.getShareable()];case 1:return r=i.sent(),n(),[2,r.unshareLink(e,t)]}}))}))},Nt.prototype.shareWith=function(e,t,n,r){return void 0===t&&(t=Ri.View),void 0===n&&(n=!1),ho(this,e,t,n,!1,r)},Nt.prototype.getShareLink=oo,Nt.prototype.checkSharingPermissions=so,Nt.prototype.getSharingInformation=uo,Nt.prototype.getObjectSharingSettings=ao,Nt.prototype.unshare=co,Nt.prototype.deleteSharingLinkByKind=lo,Nt.prototype.unshareLink=po,bt.prototype.shareWith=function(e,t,n){return void 0===t&&(t=Ri.View),D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=this.addBatchDependency(),[4,new nt(Be(this.toUrl()),"/_api/web/url").get()];case 1:return i=o.sent(),r(),[2,this.shareObject(d(i,"/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1"),e,t,n)]}}))}))},bt.prototype.shareObject=function(e,t,n,r,i,o,s,u){return void 0===o&&(o=!1),void 0===s&&(s=!1),void 0===u&&(u=!0),io(this,{emailData:r,group:i,includeAnonymousLinkInEmail:s,loginNames:t,propagateAcl:o,role:n,url:e,useSimplifiedRoles:u})},bt.prototype.shareObjectRaw=function(e){return io(this,e,!0)},bt.prototype.unshareObject=function(e){return Ke(St(this,"unshareObject"),Ue({url:e}))};var go=function(e){function t(t,n){void 0===n&&(n="");var r="string"==typeof t?t:t.toUrl();return e.call(this,Be(r),"_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility."+n)||this}return U(t,e),t.prototype.execute=function(e){return Ke(this,Ue(e,xe({"Content-Type":"application/json;charset=utf-8"})))},t.prototype.createSiteDesign=function(e){return this.clone(mo,"CreateSiteDesign").execute({info:e})},t.prototype.applySiteDesign=function(e,t){return this.clone(mo,"ApplySiteDesign").execute({siteDesignId:e,webUrl:t})},t.prototype.getSiteDesigns=function(){return this.clone(mo,"GetSiteDesigns").execute({})},t.prototype.getSiteDesignMetadata=function(e){return this.clone(mo,"GetSiteDesignMetadata").execute({id:e})},t.prototype.updateSiteDesign=function(e){return this.clone(mo,"UpdateSiteDesign").execute({updateInfo:e})},t.prototype.deleteSiteDesign=function(e){return this.clone(mo,"DeleteSiteDesign").execute({id:e})},t.prototype.getSiteDesignRights=function(e){return this.clone(mo,"GetSiteDesignRights").execute({id:e})},t.prototype.grantSiteDesignRights=function(e,t,n){return void 0===n&&(n=1),this.clone(mo,"GrantSiteDesignRights").execute({grantedRights:n.toString(),id:e,principalNames:t})},t.prototype.revokeSiteDesignRights=function(e,t){return this.clone(mo,"RevokeSiteDesignRights").execute({id:e,principalNames:t})},t.prototype.addSiteDesignTask=function(e,t){return this.clone(mo,"AddSiteDesignTask").execute({webUrl:e,siteDesignId:t})},t.prototype.addSiteDesignTaskToCurrentWeb=function(e){return this.clone(mo,"AddSiteDesignTaskToCurrentWeb").execute({siteDesignId:e})},t.prototype.getSiteDesignTask=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,this.clone(mo,"GetSiteDesignTask").execute({taskId:e})];case 1:return[2,w(t=n.sent(),"ID")?t:null]}}))}))},t.prototype.getSiteDesignRun=function(e,t){return this.clone(mo,"GetSiteDesignRun").execute({webUrl:e,siteDesignId:t})},t.prototype.getSiteDesignRunStatus=function(e,t){return this.clone(mo,"GetSiteDesignRunStatus").execute({webUrl:e,runId:t})},x([je("sd.createSiteDesign")],t.prototype,"createSiteDesign",null),x([je("sd.applySiteDesign")],t.prototype,"applySiteDesign",null),x([je("sd.getSiteDesigns")],t.prototype,"getSiteDesigns",null),x([je("sd.getSiteDesignMetadata")],t.prototype,"getSiteDesignMetadata",null),x([je("sd.updateSiteDesign")],t.prototype,"updateSiteDesign",null),x([je("sd.deleteSiteDesign")],t.prototype,"deleteSiteDesign",null),x([je("sd.getSiteDesignRights")],t.prototype,"getSiteDesignRights",null),x([je("sd.grantSiteDesignRights")],t.prototype,"grantSiteDesignRights",null),x([je("sd.revokeSiteDesignRights")],t.prototype,"revokeSiteDesignRights",null),x([je("sd.addSiteDesignTask")],t.prototype,"addSiteDesignTask",null),x([je("sd.addSiteDesignTaskToCurrentWeb")],t.prototype,"addSiteDesignTaskToCurrentWeb",null),x([je("sd.getSiteDesignTask")],t.prototype,"getSiteDesignTask",null),x([je("sd.getSiteDesignRun")],t.prototype,"getSiteDesignRun",null),x([je("sd.getSiteDesignRunStatus")],t.prototype,"getSiteDesignRunStatus",null),t}(Ye),vo=function(e,t){return new go(e,t)},mo=function(e,t){return void 0===t&&(t=""),vo(e,t)};bt.prototype.getSiteDesignRuns=function(e){return vo(this,"").getSiteDesignRun(void 0,e)},bt.prototype.addSiteDesignTask=function(e){return vo(this,"").addSiteDesignTaskToCurrentWeb(e)},bt.prototype.getSiteDesignRunStatus=function(e){return vo(this,"").getSiteDesignRunStatus(void 0,e)},Reflect.defineProperty(ht.prototype,"siteDesigns",{configurable:!0,enumerable:!0,get:function(){return vo(this._baseUrl)}}),ee(bt,"siteGroups",Mi),ee(bt,"associatedOwnerGroup",Mi,"associatedownergroup"),ee(bt,"associatedMemberGroup",Mi,"associatedmembergroup"),ee(bt,"associatedVisitorGroup",Mi,"associatedvisitorgroup"),bt.prototype.createDefaultAssociatedGroups=function(e,t,n,r,i){return void 0===n&&(n=!1),void 0===r&&(r=!0),D(this,void 0,void 0,(function(){var o;return L(this,(function(s){switch(s.label){case 0:return[4,this.breakRoleInheritance(n,r)];case 1:return s.sent(),(o=this.clone(St,"createDefaultAssociatedGroups(userLogin=@u,userLogin2=@v,groupNameSeed=@s)")).query.set("@u","'"+ft(t||"")+"'"),o.query.set("@v","'"+ft(i||"")+"'"),o.query.set("@s","'"+ft(e||"")+"'"),[2,Ke(o)]}}))}))};var bo,So=function(e){function t(t,n){void 0===n&&(n="");var r="string"==typeof t?t:t.toUrl();return e.call(this,Be(r),"_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility."+n)||this}return U(t,e),t.prototype.execute=function(e){return Ke(this,Ue(e))},t.prototype.getSiteScripts=function(){return this.clone(Po,"GetSiteScripts",!0).execute({})},t.prototype.createSiteScript=function(e,t,n){return this.clone(Po,"CreateSiteScript(Title=@title,Description=@desc)?@title='"+ft(e)+"'&@desc='"+ft(t)+"'").execute(n)},t.prototype.getSiteScriptMetadata=function(e){return this.clone(Po,"GetSiteScriptMetadata").execute({id:e})},t.prototype.deleteSiteScript=function(e){return this.clone(Po,"DeleteSiteScript").execute({id:e})},t.prototype.updateSiteScript=function(e,t){return t&&(e.Content=JSON.stringify(t)),this.clone(Po,"UpdateSiteScript").execute({updateInfo:e})},t.prototype.getSiteScriptFromList=function(e){return this.clone(Po,"GetSiteScriptFromList").execute({listUrl:e})},t.prototype.getSiteScriptFromWeb=function(e,t){return this.clone(Po,"getSiteScriptFromWeb").execute({webUrl:e,info:t})},t.prototype.executeSiteScriptAction=function(e){return this.clone(Po,"executeSiteScriptAction").execute({actionDefinition:e})},x([je("ss.getSiteScripts")],t.prototype,"getSiteScripts",null),x([je("ss.createSiteScript")],t.prototype,"createSiteScript",null),x([je("ss.getSiteScriptMetadata")],t.prototype,"getSiteScriptMetadata",null),x([je("ss.deleteSiteScript")],t.prototype,"deleteSiteScript",null),x([je("ss.updateSiteScript")],t.prototype,"updateSiteScript",null),x([je("ss.getSiteScriptFromList")],t.prototype,"getSiteScriptFromList",null),x([je("ss.getSiteScriptFromWeb")],t.prototype,"getSiteScriptFromWeb",null),x([je("ss.executeSiteScriptAction")],t.prototype,"executeSiteScriptAction",null),t}(Ye),To=function(e,t){return new So(e,t)},Po=function(e,t){return void 0===t&&(t=""),To(e,t)};!function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure",e[e.NoOp=2]="NoOp",e[e.SucceededWithException=3]="SucceededWithException"}(bo||(bo={})),bt.prototype.getSiteScript=function(e){return To(this.toUrl(),"").getSiteScriptFromWeb(void 0,e)},Ot.prototype.getSiteScript=function(){return D(this,void 0,void 0,(function(){var e,t,n;return L(this,(function(r){switch(r.label){case 0:return[4,this.clone(Ct).rootFolder.get()];case 1:return e=r.sent(),[4,St(Be(this.toUrl())).select("Url").get()];case 2:return t=r.sent(),n=d(t.Url,"Lists",e.Name),[2,To(this,"").getSiteScriptFromList(n)]}}))}))},Reflect.defineProperty(ht.prototype,"siteScripts",{configurable:!0,enumerable:!0,get:function(){return To(this._baseUrl)}}),ee(bt,"siteUsers",ki),ee(bt,"currentUser",Bi,"currentuser"),bt.prototype.ensureUser=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,Ke(this.clone(St,"ensureuser"),Ue({logonName:e}))];case 1:return[2,{data:t=n.sent(),user:Bi(ut(t))}]}}))}))},bt.prototype.getUserById=function(e){return Bi(this,"getUserById("+e+")")};var wo,Io,_o,Oo,Co=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"my",{get:function(){return Ao(this)},enumerable:!0,configurable:!0}),t.prototype.getFollowedSitesUri=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,this.clone(Ro,"FollowedSitesUri").get()];case 1:return[2,(e=t.sent()).FollowedSitesUri||e]}}))}))},t.prototype.getFollowedDocumentsUri=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,this.clone(Ro,"FollowedDocumentsUri").get()];case 1:return[2,(e=t.sent()).FollowedDocumentsUri||e]}}))}))},t.prototype.follow=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(Ro,"follow"),this.createSocialActorInfoRequestBody(e))];case 1:return[2,t.sent()]}}))}))},t.prototype.isFollowed=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(Ro,"isfollowed"),this.createSocialActorInfoRequestBody(e))];case 1:return[2,t.sent()]}}))}))},t.prototype.stopFollowing=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Ke(this.clone(Ro,"stopfollowing"),this.createSocialActorInfoRequestBody(e))];case 1:return[2,t.sent()]}}))}))},t.prototype.createSocialActorInfoRequestBody=function(e){return Ue({actor:Object.assign(De("SP.Social.SocialActorInfo"),{Id:null},e)})},x([je("soc.getFollowedSitesUri")],t.prototype,"getFollowedSitesUri",null),x([je("soc.getFollowedDocumentsUri")],t.prototype,"getFollowedDocumentsUri",null),x([je("soc.follow")],t.prototype,"follow",null),x([je("soc.isFollowed")],t.prototype,"isFollowed",null),x([je("soc.stopFollowing")],t.prototype,"stopFollowing",null),t=x([st("_api/social.following")],t)}(nt),Eo=function(e){return new Co(e)},Ro=function(e,t){return new Co(e,t)},No=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.followed=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,this.clone(Uo,"followed(types="+e+")")()];case 1:return[2,w(t=n.sent(),"Followed")?t.Followed.results:t]}}))}))},t.prototype.followedCount=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,this.clone(Uo,"followedcount(types="+e+")")()];case 1:return[2,(t=n.sent()).FollowedCount||t]}}))}))},t.prototype.followers=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,this.clone(Uo,"followers")()];case 1:return[2,w(e=t.sent(),"Followers")?e.Followers.results:e]}}))}))},t.prototype.suggestions=function(){return D(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,this.clone(Uo,"suggestions")()];case 1:return[2,w(e=t.sent(),"Suggestions")?e.Suggestions.results:e]}}))}))},x([je("msoc.followed")],t.prototype,"followed",null),x([je("msoc.followedCount")],t.prototype,"followedCount",null),x([je("msoc.followers")],t.prototype,"followers",null),x([je("msoc.suggestions")],t.prototype,"suggestions",null),t=x([st("my")],t)}(nt),Ao=$e(No),Uo=function(e,t){return Ao(e,t)};!function(e){e[e.User=0]="User",e[e.Document=1]="Document",e[e.Site=2]="Site",e[e.Tag=3]="Tag"}(wo||(wo={})),function(e){e[e.None=0]="None",e[e.User=1]="User",e[e.Document=2]="Document",e[e.Site=4]="Site",e[e.Tag=8]="Tag",e[e.ExcludeContentWithoutFeeds=268435456]="ExcludeContentWithoutFeeds",e[e.IncludeGroupsSites=536870912]="IncludeGroupsSites",e[e.WithinLast24Hours=1073741824]="WithinLast24Hours"}(Io||(Io={})),function(e){e[e.Ok=0]="Ok",e[e.AlreadyFollowing=1]="AlreadyFollowing",e[e.LimitReached=2]="LimitReached",e[e.InternalError=3]="InternalError"}(_o||(_o={})),function(e){e[e.OK=0]="OK",e[e.InvalidRequest=1]="InvalidRequest",e[e.AccessDenied=2]="AccessDenied",e[e.ItemNotFound=3]="ItemNotFound",e[e.InvalidOperation=4]="InvalidOperation",e[e.ItemNotModified=5]="ItemNotModified",e[e.InternalError=6]="InternalError",e[e.CacheReadError=7]="CacheReadError",e[e.CacheUpdateError=8]="CacheUpdateError",e[e.PersonalSiteNotFound=9]="PersonalSiteNotFound",e[e.FailedToCreatePersonalSite=10]="FailedToCreatePersonalSite",e[e.NotAuthorizedToCreatePersonalSite=11]="NotAuthorizedToCreatePersonalSite",e[e.CannotCreatePersonalSite=12]="CannotCreatePersonalSite",e[e.LimitReached=13]="LimitReached",e[e.AttachmentError=14]="AttachmentError",e[e.PartialData=15]="PartialData",e[e.FeatureDisabled=16]="FeatureDisabled",e[e.StorageQuotaExceeded=17]="StorageQuotaExceeded",e[e.DatabaseError=18]="DatabaseError"}(Oo||(Oo={})),Reflect.defineProperty(ht.prototype,"social",{configurable:!0,enumerable:!0,get:function(){return Eo(this._baseUrl)}});var xo=function(e){function t(t,n){var r="string"==typeof t?t:t.toUrl();return e.call(this,Be(r),"_api/SP.Utilities.Utility."+n)||this}return U(t,e),t.prototype.excute=function(e){return Ke(this,Ue(e))},t.prototype.sendEmail=function(e){var t={properties:m(De("SP.Utilities.EmailProperties"),{Body:e.Body,From:e.From,Subject:e.Subject})};return e.To&&e.To.length>0&&(t.properties=m(t.properties,{To:{results:e.To}})),e.CC&&e.CC.length>0&&(t.properties=m(t.properties,{CC:{results:e.CC}})),e.BCC&&e.BCC.length>0&&(t.properties=m(t.properties,{BCC:{results:e.BCC}})),e.AdditionalHeaders&&(t.properties=m(t.properties,{AdditionalHeaders:Vt(e.AdditionalHeaders)})),je.configure(this.clone(Lo,"SendEmail",!0),"u.sendEmail").excute(t)},t.prototype.getCurrentUserEmailAddresses=function(){return je.configure(this.clone(Lo,"GetCurrentUserEmailAddresses",!0),"u.getCurrentUserEmailAddresses").excute({})},t.prototype.resolvePrincipal=function(e,t,n,r,i,o){void 0===o&&(o=!1);var s={addToUserInfoList:i,input:e,inputIsEmailOnly:r,matchUserInfoList:o,scopes:t,sources:n},u=this.clone(Lo,"ResolvePrincipalInCurrentContext",!0);return je.configure(u,"u.ResolvePrincipalInCurrentContext").excute(s)},t.prototype.searchPrincipals=function(e,t,n,r,i){var o={groupName:r,input:e,maxCount:i,scopes:t,sources:n},s=this.clone(Lo,"SearchPrincipalsUsingContextWeb",!0);return je.configure(s,"u.SearchPrincipalsUsingContextWeb").excute(o)},t.prototype.createEmailBodyForInvitation=function(e){var t={pageAddress:e},n=this.clone(Lo,"CreateEmailBodyForInvitation",!0);return je.configure(n,"u.CreateEmailBodyForInvitation").excute(t)},t.prototype.expandGroupsToPrincipals=function(e,t){void 0===t&&(t=30);var n={inputs:e,maxCount:t},r=this.clone(Lo,"ExpandGroupsToPrincipals",!0);return je.configure(r,"u.ExpandGroupsToPrincipals").excute(n)},t.prototype.createWikiPage=function(e){return D(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return t=this.clone(Lo,"CreateWikiPageInContextWeb",!0),[4,je.configure(t,"u.CreateWikiPageInContextWeb").excute({parameters:e})];case 1:return[2,{data:n=r.sent(),file:In(ut(n))}]}}))}))},t}(Ye),Do=$e(xo),Lo=function(e,t){return Do(e,t)};Reflect.defineProperty(ht.prototype,"utility",{configurable:!0,enumerable:!0,get:function(){return Do(this._baseUrl,"")}});var ko=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return je.configure(jo(this).concat("('"+e+"')"),"subs.getById")},t.prototype.add=function(e,t,n){return D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r={expirationDateTime:t,notificationUrl:e,resource:this.toUrl()},n&&(r.clientState=n),[4,Ke(this,Ue(r,xe({"Content-Type":"application/json"})))];case 1:return[2,{data:i=o.sent(),subscription:this.getById(i.id)}]}}))}))},x([je("subs.add")],t.prototype,"add",null),t=x([st("subscriptions")],t)}(et),Fo=$e(ko),Bo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.update=function(e,t,n){return D(this,void 0,void 0,(function(){var r;return L(this,(function(i){switch(i.label){case 0:return r={},e&&(r.expirationDateTime=e),t&&(r.notificationUrl=t),n&&(r.clientState=n),[4,ze(this,Ue(r,xe({"Content-Type":"application/json"})))];case 1:return[2,{data:i.sent(),subscription:this}]}}))}))},t.prototype.delete=function(){return Qe(this)},x([je("sub.update")],t.prototype,"update",null),x([je("sub.delete")],t.prototype,"delete",null),t}(nt),jo=$e(Bo);ee(Ot,"subscriptions",Fo),ee(Ot,"userCustomActions",ci),ee(bt,"userCustomActions",ci),ee(yt,"userCustomActions",ci);var Mo,qo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return Vo(this).concat("('"+e+"')")},t.prototype.getByTitle=function(e){return Vo(this,"getByTitle('"+e+"')")},t.prototype.add=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n={}),D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=Ue(Object.assign(De("SP.View"),{PersonalView:t,Title:e},n)),[4,Ke(this.clone(Go,null),r)];case 1:return[2,{data:i=o.sent(),view:this.getById(i.Id)}]}}))}))},x([je("vs.add")],t.prototype,"add",null),t=x([st("views")],t)}(et),Go=$e(qo),Wo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=it("vw"),t.update=t._update("SP.View",(function(e){return{data:e,view:t}})),t}return U(t,e),Object.defineProperty(t.prototype,"fields",{get:function(){return Ko(this)},enumerable:!0,configurable:!0}),t.prototype.renderAsHtml=function(){return this.clone(Vo,"renderashtml")()},t.prototype.setViewXml=function(e){return Ke(this.clone(Vo,"SetViewXml"),Ue({viewXml:e}))},x([je("v.renderAsHtml")],t.prototype,"renderAsHtml",null),x([je("v.setViewXml")],t.prototype,"setViewXml",null),t}(nt),Vo=$e(Wo),Ho=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getSchemaXml=function(){return this.clone(Ko,"schemaxml")()},t.prototype.add=function(e){return Ke(this.clone(Ko,"addviewfield('"+e+"')"))},t.prototype.move=function(e,t){return Ke(this.clone(Ko,"moveviewfieldto"),Ue({field:e,index:t}))},t.prototype.removeAll=function(){return Ke(this.clone(Ko,"removeallviewfields"))},t.prototype.remove=function(e){return Ke(this.clone(Ko,"removeviewfield('"+e+"')"))},x([je("vfs.getSchemaXml")],t.prototype,"getSchemaXml",null),x([je("vfs.add")],t.prototype,"add",null),x([je("vfs.move")],t.prototype,"move",null),x([je("vfs.removeAll")],t.prototype,"removeAll",null),x([je("vfs.remove")],t.prototype,"remove",null),t=x([st("viewfields")],t)}(et),Ko=$e(Ho);!function(e){e[e.DefaultValue=0]="DefaultValue",e[e.Recursive=1]="Recursive",e[e.RecursiveAll=2]="RecursiveAll",e[e.FilesOnly=3]="FilesOnly"}(Mo||(Mo={})),ee(Ot,"views",Go),ee(Ot,"defaultView",Vo,"DefaultView"),Ot.prototype.getView=function(e){return Vo(this,"getView('"+e+"')")};var Qo,zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"scope",{get:function(){return je.configure(Ze(this,"Scope"),"f.scope")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"webparts",{get:function(){return Yo(this,"webparts")},enumerable:!0,configurable:!0}),t.prototype.export=function(e){return Ke(this.clone(Jo,"ExportWebPart"),Ue({webPartId:e}))},t.prototype.import=function(e){return Ke(this.clone(Jo,"ImportWebPart"),Ue({webPartXml:e}))},t}(Ye),Xo=function(e,t){return new zo(e,t)},Jo=function(e,t){return Xo(e,t)},$o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getById=function(e){return es(this,"getbyid('"+e+"')")},t.prototype.getByControlId=function(e){return es(this,"getByControlId('"+e+"')")},t}(et),Yo=$e($o),Zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"webpart",{get:function(){return rt(this,"webpart")},enumerable:!0,configurable:!0}),t.prototype.saveChanges=function(){return Ke(this.clone(es,"SaveWebPartChanges"))},t.prototype.moveTo=function(e,t){return Ke(this.clone(es,"MoveWebPartTo(zoneID='"+e+"', zoneIndex="+t+")"))},t.prototype.close=function(){return Ke(this.clone(es,"CloseWebPart"))},t.prototype.open=function(){return Ke(this.clone(es,"OpenWebPart"))},t.prototype.delete=function(){return Ke(this.clone(es,"DeleteWebPart"))},t}(nt),es=$e(Zo);!function(e){e[e.User=0]="User",e[e.Shared=1]="Shared"}(Qo||(Qo={})),wn.prototype.getLimitedWebPartManager=function(e){return void 0===e&&(e=Qo.Shared),Xo(this,"getLimitedWebPartManager(scope="+e+")")};var ts=new ht;function ns(e){return function(t){return function(t){function n(){for(var n=[],r=0;r1&&void 0!==n[1]?n[1]:e)||this}return U(n,t),n}(t)}}function rs(){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.delete=function(){return cn(this)},t}(e)}}function is(){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.delete=function(e){return void 0===e&&(e="*"),cn(this,xe({"If-Match":e}))},t}(e)}}function os(){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.update=function(e){return ln(this,Ue(e))},t}(e)}}function ss(){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.update=function(e,t){return void 0===t&&(t="*"),ln(this,Ue(e,xe({"If-Match":t})))},t}(e)}}function us(){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e){return an(this,Ue(e))},t}(e)}}function as(e){return function(t){return function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return U(n,t),n.prototype.getById=function(t){return e(this,t)},n}(t)}}var cs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"threads",{get:function(){return ds(this)},enumerable:!0,configurable:!0}),t=x([os(),rs()],t)}(gn)),ls=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("conversations"),us(),as(cs)],t)}(fn)),ps=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"posts",{get:function(){return ys(this)},enumerable:!0,configurable:!0}),t.prototype.reply=function(e){return an(this.clone(ps,"reply"),Ue(e))},t=x([rs()],t)}(gn)),ds=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("threads"),us(),as(ps)],t)}(fn)),hs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.forward=function(e){return an(this.clone(fs,"forward"),Ue(e))},t.prototype.reply=function(e){return an(this.clone(fs,"reply"),Ue(e))},t=x([rs()],t)}(gn),fs=dn(hs),ys=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("posts"),us(),as(fs)],t)}(fn)),gs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e){return an(this.clone(gs,"$ref"),Ue({"@odata.id":e}))},t.prototype.remove=function(e){var t=this.clone(gs,"$ref");return t.query.set("$id",e),cn(t)},t}(fn));var vs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(gn)),ms=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.addFile=function(e,t){return an(this,Ue((n="#microsoft.graph.fileAttachment",r={contentBytes:t,name:e},Object.assign({"@odata.type":n},r))));var n,r},t=x([ns("attachments"),as(vs)],t)}(fn));ee(hs,"attachments",ms);var bs,Ss,Ts=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getMemberObjects=function(e){return void 0===e&&(e=!1),an(this.clone(Ps,"getMemberObjects"),Ue({securityEnabledOnly:e}))},t.prototype.getMemberGroups=function(e){return void 0===e&&(e=!1),an(this.clone(Ps,"getMemberGroups"),Ue({securityEnabledOnly:e}))},t.prototype.checkMemberGroups=function(e){return an(this.clone(Ps,"checkMemberGroups"),Ue({groupIds:e}))},t=x([rs()],t)}(gn),Ps=dn(Ts),ws=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getByIds=function(e,t){return void 0===t&&(t=bs.directoryObject),an(this.clone(ws,"getByIds"),Ue({ids:e,type:t}))},t=x([ns("directoryObjects"),as(Ps)],t)}(fn));!function(e){e[e.directoryObject=0]="directoryObject",e[e.user=1]="user",e[e.group=2]="group",e[e.device=3]="device"}(bs||(bs={})),function(e){e[e.Office365=0]="Office365",e[e.Dynamic=1]="Dynamic",e[e.Security=2]="Security"}(Ss||(Ss={}));var Is=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.addFavorite=function(){return an(this.clone(_s,"addFavorite"))},t.prototype.removeFavorite=function(){return an(this.clone(_s,"removeFavorite"))},t.prototype.resetUnseenCount=function(){return an(this.clone(_s,"resetUnseenCount"))},t.prototype.subscribeByMail=function(){return an(this.clone(_s,"subscribeByMail"))},t.prototype.unsubscribeByMail=function(){return an(this.clone(_s,"unsubscribeByMail"))},t.prototype.getCalendarView=function(e,t){var n=this.clone(_s,"calendarView");return n.query.set("startDateTime",e.toISOString()),n.query.set("endDateTime",t.toISOString()),n()},t=x([rs(),os()],t)}(Ts),_s=dn(Is),Os=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n,r){return void 0===r&&(r={}),D(this,void 0,void 0,(function(){var i,o;return L(this,(function(s){switch(s.label){case 0:return i=m({displayName:e,mailEnabled:n===Ss.Office365,mailNickname:t,securityEnabled:n!==Ss.Office365},r),n!==Ss.Security&&(i=m(i,{groupTypes:n===Ss.Office365?["Unified"]:["DynamicMembership"]})),[4,an(this,Ue(i))];case 1:return[2,{data:o=s.sent(),group:this.getById(o.id)}]}}))}))},t=x([ns("groups"),as(_s)],t)}(fn)),Cs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("calendars")],t)}(fn)),Es=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"events",{get:function(){return Ns(this)},enumerable:!0,configurable:!0}),t}(gn)),Rs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([rs(),os()],t)}(gn)),Ns=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,an(this,Ue(e))];case 1:return[2,{data:t=n.sent(),event:this.getById(t.id)}]}}))}))},t=x([ns("events"),as(Rs)],t)}(fn));ee(Is,"calendar",Es,"calendar"),ee(Is,"events",Ns);var As=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"memberOf",{get:function(){return ws(this,"memberOf")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"people",{get:function(){return Ds(this)},enumerable:!0,configurable:!0}),t=x([os(),rs()],t)}(Ts),Us=dn(As),xs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("users"),as(Us)],t)}(fn)),Ds=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("people")],t)}(fn)),Ls=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([os(),rs()],t)}(gn)),ks=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n,r,i){return void 0===i&&(i={}),D(this,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:return o=m({businessPhones:r,emailAddresses:n,givenName:e,surName:t},i),[4,an(this,Ue(o))];case 1:return s=u.sent(),[2,{contact:this.getById(s.id),data:s}]}}))}))},t=x([ns("contacts"),as(Ls)],t)}(fn)),Fs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"contacts",{get:function(){return ks(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"childFolders",{get:function(){return Bs(this,"childFolders")},enumerable:!0,configurable:!0}),t=x([rs(),os()],t)}(gn)),Bs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t){return D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,an(this,Ue({displayName:e,parentFolderId:t}))];case 1:return n=r.sent(),[2,{contactFolder:this.getById(n.id),data:n}]}}))}))},t=x([ns("contactFolders"),as(Fs)],t)}(fn));ee(As,"contacts",ks),ee(As,"contactFolders",Bs),ee(Is,"conversations",ls),ee(Is,"acceptedSenders",gs,"acceptedsenders"),ee(Is,"rejectedSenders",gs,"rejectedsenders"),Reflect.defineProperty(bn.prototype,"directoryObjects",{configurable:!0,enumerable:!0,get:function(){return ws(this)}}),Reflect.defineProperty(bn.prototype,"groups",{configurable:!0,enumerable:!0,get:function(){return Os(this)}});var js=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"trending",{get:function(){return qs(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"used",{get:function(){return Ws(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shared",{get:function(){return Hs(this)},enumerable:!0,configurable:!0}),t=x([ns("insights")],t)}(gn)),Ms=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"resource",{get:function(){return Ks(this)},enumerable:!0,configurable:!0}),t}(gn)),qs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("trending"),as(Ms)],t)}(fn)),Gs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"resource",{get:function(){return Ks(this)},enumerable:!0,configurable:!0}),t}(gn)),Ws=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("used"),as(Gs)],t)}(fn)),Vs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"resource",{get:function(){return Ks(this)},enumerable:!0,configurable:!0}),t}(gn)),Hs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("shared"),as(Vs)],t)}(fn)),Ks=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("resource")],t)}(gn));ee(As,"insights",js);var Qs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.create=function(e,t,n){return void 0===n&&(n={}),D(this,void 0,void 0,(function(){var r;return L(this,(function(i){switch(i.label){case 0:return r=m({inviteRedirectUrl:t,invitedUserEmailAddress:e},n),[4,an(this,Ue(r))];case 1:return[2,{data:i.sent()}]}}))}))},t=x([ns("invitations")],t)}(fn));Reflect.defineProperty(bn.prototype,"invitations",{configurable:!0,enumerable:!0,get:function(){return Qs(this)}});var zs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.remove=function(){return cn(this.clone(zs,"$ref"))},t}(gn)),Xs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e){return an(this.clone(Xs,"$ref"),Ue({"@odata.id":e}))},t=x([ns("members"),as(zs)],t)}(fn));ee(Is,"owners",Xs,"owners"),ee(Is,"members",Xs);var Js=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(gn)),$s=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("messages"),as(Js),us()],t)}(fn)),Ys=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(gn)),Zs=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("mailFolders"),as(Ys),us()],t)}(fn)),eu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("mailboxSettings"),os()],t)}(gn));ee(As,"messages",$s),ee(As,"mailboxSettings",eu),ee(As,"mailFolders",Zs),As.prototype.sendMail=function(e){return an(this.clone(Us,"sendMail"),Ue(e))};var tu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"root",{get:function(){return ru(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"list",{get:function(){return vn(this,"list")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"recent",{get:function(){return ou(this,"recent")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sharedWithMe",{get:function(){return ou(this,"sharedWithMe")},enumerable:!0,configurable:!0}),t.prototype.getItemById=function(e){return iu(this,d("items",e))},t=x([ns("drive")],t)}(gn)),nu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("drives"),as(tu)],t)}(fn)),ru=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return ou(this,"children")},enumerable:!0,configurable:!0}),t.prototype.search=function(e){var t=this.clone(ru);return t.query.set("search","'"+e+"'"),t()},Object.defineProperty(t.prototype,"thumbnails",{get:function(){return yn(this,"thumbnails")},enumerable:!0,configurable:!0}),t=x([ns("root")],t)}(gn)),iu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return ou(this,"children")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"thumbnails",{get:function(){return yn(this,"thumbnails")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"versions",{get:function(){return yn(this,"versions")},enumerable:!0,configurable:!0}),t.prototype.move=function(e,t){return ln(this,Ue(m(e,{name:t})))},t.prototype.getContent=function(){return un(this.clone(iu,"content"))},t.prototype.setContent=function(e){return pn(this.clone(iu,"content"),{body:e})},t=x([rs(),os()],t)}(gn)),ou=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([as(iu)],t)}(fn));ee(As,"drive",tu),ee(As,"drives",nu);var su=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"notebooks",{get:function(){return au(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sections",{get:function(){return lu(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pages",{get:function(){return yn(this,"pages")},enumerable:!0,configurable:!0}),t=x([ns("onenote")],t)}(gn)),uu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"sections",{get:function(){return lu(this)},enumerable:!0,configurable:!0}),t}(gn)),au=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,an(this,Ue({displayName:e}))];case 1:return[2,{data:t=n.sent(),notebook:this.getById(t.id)}]}}))}))},t=x([ns("notebooks"),as(uu)],t)}(fn)),cu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t}(gn)),lu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e){return D(this,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,an(this,Ue({displayName:e}))];case 1:return[2,{data:t=n.sent(),section:this.getById(t.id)}]}}))}))},t=x([ns("sections"),as(cu)],t)}(fn));ee(As,"onenote",su);var pu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.getBlob=function(){return this.clone(pu,"$value",!1).usingParser(new ve)()},t.prototype.getBuffer=function(){return this.clone(pu,"$value",!1).usingParser(new be)()},t.prototype.setContent=function(e){return ln(this.clone(pu,"$value",!1),{body:e})},t=x([ns("photo")],t)}(gn));ee(Is,"photo",pu);var du=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"plans",{get:function(){return fu(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tasks",{get:function(){return gu(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buckets",{get:function(){return mu(this)},enumerable:!0,configurable:!0}),t=x([ns("planner")],t)}(gn)),hu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"tasks",{get:function(){return gu(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buckets",{get:function(){return mu(this)},enumerable:!0,configurable:!0}),t=x([ss(),is()],t)}(gn)),fu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t){return D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,an(this,Ue({owner:e,title:t}))];case 1:return[2,{data:n=r.sent(),plan:this.getById(n.id)}]}}))}))},t=x([ns("plans"),as(hu)],t)}(fn)),yu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ss(),is()],t)}(gn)),gu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n,r){return D(this,void 0,void 0,(function(){var i,o;return L(this,(function(s){switch(s.label){case 0:return i=m({planId:e,title:t},n),r&&(i=m(i,{bucketId:r})),[4,an(this,Ue(i))];case 1:return[2,{data:o=s.sent(),task:this.getById(o.id)}]}}))}))},t=x([ns("tasks"),as(yu)],t)}(fn)),vu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"tasks",{get:function(){return gu(this)},enumerable:!0,configurable:!0}),t=x([ss(),is()],t)}(gn)),mu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n){return D(this,void 0,void 0,(function(){var r;return L(this,(function(i){switch(i.label){case 0:return[4,an(this,Ue({name:e,orderHint:n||"",planId:t}))];case 1:return r=i.sent(),[2,{bucket:this.getById(r.id),data:r}]}}))}))},t=x([ns("buckets"),as(vu)],t)}(fn));ee(Is,"plans",fu,"planner/plans"),ee(As,"tasks",gu,"planner/tasks"),Reflect.defineProperty(bn.prototype,"planner",{configurable:!0,enumerable:!0,get:function(){return du(this)}});var bu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([rs(),os()],t)}(gn)),Su=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n,r,i){return void 0===i&&(i={}),D(this,void 0,void 0,(function(){var o,s;return L(this,(function(u){switch(u.label){case 0:return o=m({changeType:e,expirationDateTime:r,notificationUrl:t,resource:n},i),[4,an(this,Ue(o))];case 1:return[2,{data:s=u.sent(),subscription:this.getById(s.id)}]}}))}))},t=x([ns("subscriptions"),as(bu)],t)}(fn));Reflect.defineProperty(bn.prototype,"subscriptions",{configurable:!0,enumerable:!0,get:function(){return Su(this)}});var Tu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"channels",{get:function(){return Iu(this)},enumerable:!0,configurable:!0}),t.prototype.archive=function(e){return void 0===e&&(e=!1),an(this.clone(Tu,"archive"),Ue({shouldSetSpoSiteReadOnlyForMembers:e}))},t.prototype.unarchive=function(){return an(this.clone(Tu,"unarchive"))},t.prototype.cloneTeam=function(e,t,n,r){void 0===t&&(t=""),void 0===n&&(n="apps,tabs,settings,channels,members"),void 0===r&&(r="private");var i={description:t||"",displayName:e,mailNickname:e,partsToClone:n,visibility:r};return an(this.clone(Tu,"clone"),Ue(i))},t=x([ns("team"),os()],t)}(gn)),Pu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("teams"),as(Tu)],t)}(fn)),wu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),Object.defineProperty(t.prototype,"tabs",{get:function(){return Ou(this)},enumerable:!0,configurable:!0}),t}(gn)),Iu=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t){return void 0===t&&(t=""),D(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,an(this,Ue({description:t,displayName:e}))];case 1:return n=r.sent(),[2,{channel:this.getById(n.id),data:n}]}}))}))},t=x([ns("channels"),as(wu)],t)}(fn)),_u=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t=x([ns("tab"),os(),rs()],t)}(gn)),Ou=dn(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),t.prototype.add=function(e,t,n){return D(this,void 0,void 0,(function(){var r,i;return L(this,(function(o){switch(o.label){case 0:return r=m({displayName:e,"teamsApp@odata.bind":t},n),[4,an(this,Ue(r))];case 1:return[2,{data:i=o.sent(),tab:this.getById(i.id)}]}}))}))},t=x([ns("tabs"),as(_u)],t)}(fn));ee(As,"joinedTeams",Pu,"joinedTeams"),ee(Is,"team",Tu),Is.prototype.createTeam=function(e){return D(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,pn(this.clone(_s,"team"),Ue(e))];case 1:return[2,{data:t.sent(),team:this.team}]}}))}))},Reflect.defineProperty(bn.prototype,"teams",{configurable:!0,enumerable:!0,get:function(){return Pu(this)}}),Reflect.defineProperty(bn.prototype,"me",{configurable:!0,enumerable:!0,get:function(){return Us(this,"me")}}),Reflect.defineProperty(bn.prototype,"users",{configurable:!0,enumerable:!0,get:function(){return xs(this)}}),n.d(t,"util",(function(){return Cu})),n.d(t,"sp",(function(){return Eu})),n.d(t,"graph",(function(){return Ru})),n.d(t,"storage",(function(){return Nu})),n.d(t,"config",(function(){return Au})),n.d(t,"log",(function(){return Uu})),n.d(t,"setup",(function(){return xu})),n.d(t,"objectToMap",(function(){return O})),n.d(t,"mergeMaps",(function(){return C})),n.d(t,"RuntimeConfigImpl",(function(){return R})),n.d(t,"RuntimeConfig",(function(){return N})),n.d(t,"mergeHeaders",(function(){return M})),n.d(t,"mergeOptions",(function(){return q})),n.d(t,"getADALResource",(function(){return G})),n.d(t,"FetchClient",(function(){return W})),n.d(t,"BearerTokenFetchClient",(function(){return V})),n.d(t,"SPFxAdalClient",(function(){return H})),n.d(t,"PnPClientStorageWrapper",(function(){return K})),n.d(t,"PnPClientStorage",(function(){return z})),n.d(t,"getCtxCallback",(function(){return l})),n.d(t,"dateAdd",(function(){return p})),n.d(t,"combine",(function(){return d})),n.d(t,"getRandomString",(function(){return h})),n.d(t,"getGUID",(function(){return f})),n.d(t,"isFunc",(function(){return y})),n.d(t,"objectDefinedNotNull",(function(){return g})),n.d(t,"isArray",(function(){return v})),n.d(t,"assign",(function(){return m})),n.d(t,"isUrlAbsolute",(function(){return b})),n.d(t,"stringIsNullOrEmpty",(function(){return S})),n.d(t,"sanitizeGuid",(function(){return T})),n.d(t,"jsS",(function(){return P})),n.d(t,"hOP",(function(){return w})),n.d(t,"getHashCode",(function(){return I})),n.d(t,"safeGlobal",(function(){return j.a})),n.d(t,"Logger",(function(){return s})),n.d(t,"LogLevel",(function(){return o})),n.d(t,"ConsoleListener",(function(){return a})),n.d(t,"FunctionListener",(function(){return c})),n.d(t,"Settings",(function(){return X})),n.d(t,"CachingConfigurationProvider",(function(){return J})),n.d(t,"SPListConfigurationProvider",(function(){return jt})),n.d(t,"Batch",(function(){return $})),n.d(t,"CachingOptions",(function(){return Y})),n.d(t,"CachingParserWrapper",(function(){return Z})),n.d(t,"addProp",(function(){return ee})),n.d(t,"invokableFactory",(function(){return fe})),n.d(t,"pipelineBinder",(function(){return Ne})),n.d(t,"defaultPipelineBinder",(function(){return Ae})),n.d(t,"ODataParser",(function(){return ye})),n.d(t,"TextParser",(function(){return ge})),n.d(t,"BlobParser",(function(){return ve})),n.d(t,"JSONParser",(function(){return me})),n.d(t,"BufferParser",(function(){return be})),n.d(t,"LambdaParser",(function(){return Se})),n.d(t,"HttpRequestError",(function(){return Te})),n.d(t,"setResult",(function(){return Ie})),n.d(t,"pipe",(function(){return Oe})),n.d(t,"requestPipelineMethod",(function(){return Ce})),n.d(t,"PipelineMethods",(function(){return Ee})),n.d(t,"getDefaultPipeline",(function(){return Re})),n.d(t,"cloneQueryableData",(function(){return Pe})),n.d(t,"Queryable",(function(){return we})),n.d(t,"body",(function(){return Ue})),n.d(t,"headers",(function(){return xe})),n.d(t,"extendGlobal",(function(){return ie})),n.d(t,"extendObj",(function(){return oe})),n.d(t,"extendFactory",(function(){return se})),n.d(t,"clearGlobalExtensions",(function(){return ae})),n.d(t,"enableExtensions",(function(){return le})),n.d(t,"disableExtensions",(function(){return ce})),n.d(t,"SPNS",(function(){return r})),n.d(t,"GraphNS",(function(){return i}));var Cu={assign:m,combine:d,dateAdd:p,getCtxCallback:l,getGUID:f,getRandomString:h,isArray:v,isFunc:y,isUrlAbsolute:b,objectDefinedNotNull:g,sanitizeGuid:T,stringIsNullOrEmpty:S},Eu=Xt,Ru=Sn,Nu=new z,Au=new X,Uu=s,xu=function(e){N.assign(e)},Du={config:Au,graph:Ru,log:Uu,setup:xu,sp:Eu,storage:Nu,util:Cu};t.default=Du}])})); diff --git a/public/bundles/sp-addinhelpers.es5.umd.bundle.js b/public/bundles/sp-addinhelpers.es5.umd.bundle.js index 29895a93..867817b3 100644 --- a/public/bundles/sp-addinhelpers.es5.umd.bundle.js +++ b/public/bundles/sp-addinhelpers.es5.umd.bundle.js @@ -1048,7 +1048,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._local === null) { - this._local = storage_PnPClientStorageWrapper.bind(localStorage); + this._local = new storage_PnPClientStorageWrapper(typeof (localStorage) === "undefined" ? new MemoryStorage() : localStorage); } return this._local; }, @@ -1061,7 +1061,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._session === null) { - this._session = storage_PnPClientStorageWrapper.bind(sessionStorage); + this._session = new storage_PnPClientStorageWrapper(typeof (sessionStorage) === "undefined" ? new MemoryStorage() : sessionStorage); } return this._session; }, @@ -1746,9 +1746,9 @@ var queryable_Queryable = /** @class */ (function () { return this.data.url; }; /** - * Directly concatonates the supplied string to the current url, not normalizing "/" chars + * Directly concatenates the supplied string to the current url, not normalizing "/" chars * - * @param pathPart The string to concatonate to the url + * @param pathPart The string to concatenate to the url */ Queryable.prototype.concat = function (pathPart) { this.data.url += pathPart; @@ -2566,7 +2566,7 @@ var sphttpclient_SPHttpClient = /** @class */ (function () { } if (!headers.has("X-ClientService-ClientTag")) { methodName = tag.getClientTag(headers); - clientTag = "PnPCoreJS:2.0.4:" + methodName; + clientTag = "PnPCoreJS:2.0.5:" + methodName; if (clientTag.length > 32) { clientTag = clientTag.substr(0, 32); } @@ -3219,7 +3219,7 @@ var batch_SPBatch = /** @class */ (function (_super) { headers.append("Content-Type", "application/json;odata=verbose;charset=utf-8"); } if (!headers.has("X-ClientService-ClientTag")) { - headers.append("X-ClientService-ClientTag", "PnPCoreJS:@pnp-2.0.4:batch"); + headers.append("X-ClientService-ClientTag", "PnPCoreJS:@pnp-2.0.5:batch"); } // write headers into batch body headers.forEach(function (value, name) { @@ -3857,6 +3857,25 @@ var types_Site = /** @class */ (function (_super) { }); }); }; + /** + * + * @param url Site Url that you want to check if exists + */ + _Site.prototype.exists = function (url) { + return __awaiter(this, void 0, void 0, function () { + var postBody, value; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + postBody = body({ url: url }); + return [4 /*yield*/, spPost(Site(extractWebUrl(this.toUrl()), "/_api/SP.Site.Exists"), postBody)]; + case 1: + value = _a.sent(); + return [2 /*return*/, value]; + } + }); + }); + }; /** * Creates a Modern team site backed by Office 365 group. For use in SP Online only. This will not work with App-only tokens * diff --git a/public/bundles/sp.es5.umd.bundle.js b/public/bundles/sp.es5.umd.bundle.js index 3ad0ea5b..126a88ec 100644 --- a/public/bundles/sp.es5.umd.bundle.js +++ b/public/bundles/sp.es5.umd.bundle.js @@ -1182,7 +1182,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._local === null) { - this._local = storage_PnPClientStorageWrapper.bind(localStorage); + this._local = new storage_PnPClientStorageWrapper(typeof (localStorage) === "undefined" ? new MemoryStorage() : localStorage); } return this._local; }, @@ -1195,7 +1195,7 @@ var PnPClientStorage = /** @class */ (function () { */ get: function () { if (this._session === null) { - this._session = storage_PnPClientStorageWrapper.bind(sessionStorage); + this._session = new storage_PnPClientStorageWrapper(typeof (sessionStorage) === "undefined" ? new MemoryStorage() : sessionStorage); } return this._session; }, @@ -1907,9 +1907,9 @@ var queryable_Queryable = /** @class */ (function () { return this.data.url; }; /** - * Directly concatonates the supplied string to the current url, not normalizing "/" chars + * Directly concatenates the supplied string to the current url, not normalizing "/" chars * - * @param pathPart The string to concatonate to the url + * @param pathPart The string to concatenate to the url */ Queryable.prototype.concat = function (pathPart) { this.data.url += pathPart; @@ -2675,7 +2675,7 @@ var sphttpclient_SPHttpClient = /** @class */ (function () { } if (!headers.has("X-ClientService-ClientTag")) { methodName = tag.getClientTag(headers); - clientTag = "PnPCoreJS:2.0.4:" + methodName; + clientTag = "PnPCoreJS:2.0.5:" + methodName; if (clientTag.length > 32) { clientTag = clientTag.substr(0, 32); } @@ -3449,7 +3449,7 @@ var batch_SPBatch = /** @class */ (function (_super) { headers.append("Content-Type", "application/json;odata=verbose;charset=utf-8"); } if (!headers.has("X-ClientService-ClientTag")) { - headers.append("X-ClientService-ClientTag", "PnPCoreJS:@pnp-2.0.4:batch"); + headers.append("X-ClientService-ClientTag", "PnPCoreJS:@pnp-2.0.5:batch"); } // write headers into batch body headers.forEach(function (value, name) { @@ -3766,6 +3766,25 @@ var types_Site = /** @class */ (function (_super) { }); }); }; + /** + * + * @param url Site Url that you want to check if exists + */ + _Site.prototype.exists = function (url) { + return __awaiter(this, void 0, void 0, function () { + var postBody, value; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + postBody = body({ url: url }); + return [4 /*yield*/, spPost(Site(extractWebUrl(this.toUrl()), "/_api/SP.Site.Exists"), postBody)]; + case 1: + value = _a.sent(); + return [2 /*return*/, value]; + } + }); + }); + }; /** * Creates a Modern team site backed by Office 365 group. For use in SP Online only. This will not work with App-only tokens * @@ -7023,7 +7042,7 @@ var types_ClientsidePage = /** @class */ (function (_super) { _ClientsidePage.prototype.copy = function (web, pageName, title, publish, promotedState) { if (publish === void 0) { publish = true; } return __awaiter(this, void 0, void 0, function () { - var page; + var page, url, makeGuid, guidSite, guidWeb, guidFile, site, id, openWeb, file, props; return __generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, CreateClientsidePage(web, pageName, title, this.pageLayout, promotedState)]; @@ -7031,8 +7050,43 @@ var types_ClientsidePage = /** @class */ (function (_super) { page = _a.sent(); // we know the method is on the class - but it is protected so not part of the interface page.setControls(this.getControls()); - return [4 /*yield*/, page.save(publish)]; + if (!!stringIsNullOrEmpty(this.json.BannerImageUrl)) return [3 /*break*/, 5]; + url = new URL(this.json.BannerImageUrl); + makeGuid = function (s) { return s.replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/g, "$1-$2-$3-$4-$5"); }; + if (!(url.searchParams.has("guidSite") && url.searchParams.has("guidWeb") && url.searchParams.has("guidFile"))) return [3 /*break*/, 5]; + guidSite = makeGuid(url.searchParams.get("guidSite")); + guidWeb = makeGuid(url.searchParams.get("guidWeb")); + guidFile = makeGuid(url.searchParams.get("guidFile")); + site = Site(extractWebUrl(this.toUrl())); + return [4 /*yield*/, site.select("Id")()]; case 2: + id = _a.sent(); + if (!(id.Id === guidSite)) return [3 /*break*/, 5]; + return [4 /*yield*/, site.openWebById(guidWeb)]; + case 3: + openWeb = _a.sent(); + return [4 /*yield*/, openWeb.web.getFileById(guidFile).select("ServerRelativeUrl")()]; + case 4: + file = _a.sent(); + props = {}; + if (this._layoutPart.properties) { + if (hOP(this._layoutPart.properties, "translateX")) { + props.translateX = this._layoutPart.properties.translateX; + } + if (hOP(this._layoutPart.properties, "translateY")) { + props.translateY = this._layoutPart.properties.translateY; + } + if (hOP(this._layoutPart.properties, "imageSourceType")) { + props.imageSourceType = this._layoutPart.properties.imageSourceType; + } + if (hOP(this._layoutPart.properties, "altText")) { + props.altText = this._layoutPart.properties.altText; + } + } + page.setBannerImage(file.ServerRelativeUrl, props); + _a.label = 5; + case 5: return [4 /*yield*/, page.save(publish)]; + case 6: _a.sent(); return [2 /*return*/, page]; } @@ -9230,24 +9284,32 @@ var Fields = spInvokableFactory(types_Fields); var types_Field = /** @class */ (function (_super) { __extends(_Field, _super); function _Field() { - return _super !== null && _super.apply(this, arguments) || this; + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.delete = deleteable("f"); + return _this; } /** * Updates this field instance with the supplied properties * * @param properties A plain object hash of values to update for the list - * @param fieldType The type value, required to update child field type properties + * @param fieldType The type value such as SP.FieldLookup. Optional, looked up from the field if not provided */ _Field.prototype.update = function (properties, fieldType) { - if (fieldType === void 0) { fieldType = "SP.Field"; } return __awaiter(this, void 0, void 0, function () { - var req, data; + var info, req, data; return __generator(this, function (_a) { switch (_a.label) { case 0: + if (!(typeof fieldType === "undefined" || fieldType === null)) return [3 /*break*/, 2]; + return [4 /*yield*/, this.select("FieldTypeKind")()]; + case 1: + info = _a.sent(); + fieldType = "SP.Field" + FieldTypes[info.FieldTypeKind]; + _a.label = 2; + case 2: req = body(util_assign(metadata(fieldType), properties), request_builders_headers({ "X-HTTP-Method": "MERGE" })); return [4 /*yield*/, spPost(this, req)]; - case 1: + case 3: data = _a.sent(); return [2 /*return*/, { data: data, @@ -10964,28 +11026,32 @@ var query_SearchResults = /** @class */ (function () { } Object.defineProperty(SearchResults.prototype, "ElapsedTime", { get: function () { - return this.RawSearchResults.ElapsedTime; + var _a, _b; + return ((_b = (_a = this) === null || _a === void 0 ? void 0 : _a.RawSearchResults) === null || _b === void 0 ? void 0 : _b.ElapsedTime) || 0; }, enumerable: true, configurable: true }); Object.defineProperty(SearchResults.prototype, "RowCount", { get: function () { - return this.RawSearchResults.PrimaryQueryResult.RelevantResults.RowCount; + var _a, _b, _c, _d; + return ((_d = (_c = (_b = (_a = this) === null || _a === void 0 ? void 0 : _a.RawSearchResults) === null || _b === void 0 ? void 0 : _b.PrimaryQueryResult) === null || _c === void 0 ? void 0 : _c.RelevantResults) === null || _d === void 0 ? void 0 : _d.RowCount) || 0; }, enumerable: true, configurable: true }); Object.defineProperty(SearchResults.prototype, "TotalRows", { get: function () { - return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRows; + var _a, _b, _c, _d; + return ((_d = (_c = (_b = (_a = this) === null || _a === void 0 ? void 0 : _a.RawSearchResults) === null || _b === void 0 ? void 0 : _b.PrimaryQueryResult) === null || _c === void 0 ? void 0 : _c.RelevantResults) === null || _d === void 0 ? void 0 : _d.TotalRows) || 0; }, enumerable: true, configurable: true }); Object.defineProperty(SearchResults.prototype, "TotalRowsIncludingDuplicates", { get: function () { - return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates; + var _a, _b, _c, _d; + return ((_d = (_c = (_b = (_a = this) === null || _a === void 0 ? void 0 : _a.RawSearchResults) === null || _b === void 0 ? void 0 : _b.PrimaryQueryResult) === null || _c === void 0 ? void 0 : _c.RelevantResults) === null || _d === void 0 ? void 0 : _d.TotalRowsIncludingDuplicates) || 0; }, enumerable: true, configurable: true @@ -10999,8 +11065,9 @@ var query_SearchResults = /** @class */ (function () { }); Object.defineProperty(SearchResults.prototype, "PrimarySearchResults", { get: function () { + var _a, _b, _c, _d; if (this._primary === null) { - this._primary = this.formatSearchResults(this._raw.PrimaryQueryResult.RelevantResults.Table.Rows); + this._primary = this.formatSearchResults(((_d = (_c = (_b = (_a = this._raw) === null || _a === void 0 ? void 0 : _a.PrimaryQueryResult) === null || _b === void 0 ? void 0 : _b.RelevantResults) === null || _c === void 0 ? void 0 : _c.Table) === null || _d === void 0 ? void 0 : _d.Rows) || null); } return this._primary; }, @@ -11039,6 +11106,9 @@ var query_SearchResults = /** @class */ (function () { SearchResults.prototype.formatSearchResults = function (rawResults) { var e_1, _a; var results = new Array(); + if (typeof (rawResults) === "undefined" || rawResults == null) { + return []; + } var tempResults = rawResults.results ? rawResults.results : rawResults; try { for (var tempResults_1 = __values(tempResults), tempResults_1_1 = tempResults_1.next(); !tempResults_1_1.done; tempResults_1_1 = tempResults_1.next()) { @@ -11206,7 +11276,7 @@ rest_SPRest.prototype.search = function (query) { return Search(this._baseUrl, this._options)(query); }; rest_SPRest.prototype.searchWithCaching = function (query, options) { - return (new query_Search(this._baseUrl, null)).configure(this._options).usingCaching(options).execute(query); + return (new query_Search(this._baseUrl)).configure(this._options).usingCaching(options).execute(query); }; rest_SPRest.prototype.searchSuggest = function (query) { return Suggest(this._baseUrl, this._options)(typeof query === "string" ? { querytext: query } : query); diff --git a/src/App.tsx b/src/App.tsx index e8ad544d..74b93743 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -33,10 +33,10 @@ import { Customizer, } from 'office-ui-fabric-react/lib/Utilities' +import { DarkCustomizations, DefaultCustomizations } from '@uifabric/theme-samples' import { useDispatch, useSelector } from 'react-redux' import LoadingSpinner from './components/loadingSpinner' import MessageBar from './components/messageBar' -import { fabricDark, fabricDefault } from './fabricThemes' import ListProperties from './pages/listproperties' import Webhooks from './pages/webhooks' import WebProperties from './pages/webproperties' @@ -55,7 +55,7 @@ const App = () => { const toggleDarkTheme = (shouldAdd: boolean) => { document.body.classList.toggle('dark', shouldAdd) - dispatch(setTheme(shouldAdd ? fabricDark : fabricDefault)) + dispatch(setTheme(shouldAdd ? DarkCustomizations : DefaultCustomizations)) dispatch(setDarkMode(shouldAdd)) } diff --git a/src/components/navigation.tsx b/src/components/navigation.tsx index beda75ad..635445d5 100644 --- a/src/components/navigation.tsx +++ b/src/components/navigation.tsx @@ -7,11 +7,11 @@ import { IonToggle, IonToolbar, } from '@ionic/react' +import { DarkCustomizations, DefaultCustomizations } from '@uifabric/theme-samples' import { FontIcon, Nav, ScrollablePane, TooltipDelay, TooltipHost } from 'office-ui-fabric-react' import React, { useState } from 'react' import { useDispatch, useSelector } from 'react-redux' import { RouteComponentProps, withRouter } from 'react-router' -import { fabricDark, fabricDefault } from '../fabricThemes' import { IRootState } from '../store' import { setDarkMode, setLoading, setTheme } from '../store/home/actions' @@ -23,7 +23,7 @@ export const FabricNav = withRouter(({ history }: RouteComponentProps) => { const toggleDarkTheme = () => { document.body.classList.toggle('dark', !isDark) - dispatch(setTheme(!isDark ? fabricDark : fabricDefault)) + dispatch(setTheme(!isDark ? DarkCustomizations : DefaultCustomizations)) dispatch(setDarkMode(!isDark)) } From 4d5cb3fc0ed3930f3be085234459930a8dcc092d Mon Sep 17 00:00:00 2001 From: Tomi Tavela Date: Fri, 15 May 2020 21:37:11 +0300 Subject: [PATCH 2/4] scriptlinks for modern --- package-lock.json | 201 +++++++++--------- package.json | 16 +- public/bundles/sp-scriptlinks.sppkg | Bin 0 -> 9626 bytes public/manifest.json | 3 +- src/App.tsx | 2 + src/components/navigation.tsx | 6 + src/pages/apitester/components/commands.tsx | 48 +++++ .../apitester/components/resultsview.tsx | 99 +++++++++ src/pages/apitester/index.tsx | 21 ++ .../pnpjsconsole/components/pnpjseditor.tsx | 2 +- src/pages/pnpjsconsole/components/utils.ts | 5 +- .../scriptlinks/chrome/addandinstallapp.ts | 103 +++++++++ .../scriptlinks/chrome/chrome-actions.ts | 104 +++++++++ .../scriptlinks/chrome/uninstallappfromweb.ts | 56 +++++ src/pages/scriptlinks/components/commands.tsx | 29 +++ 15 files changed, 588 insertions(+), 107 deletions(-) create mode 100644 public/bundles/sp-scriptlinks.sppkg create mode 100644 src/pages/apitester/components/commands.tsx create mode 100644 src/pages/apitester/components/resultsview.tsx create mode 100644 src/pages/apitester/index.tsx create mode 100644 src/pages/scriptlinks/chrome/addandinstallapp.ts create mode 100644 src/pages/scriptlinks/chrome/uninstallappfromweb.ts diff --git a/package-lock.json b/package-lock.json index 892ee24f..a31418cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1095,26 +1095,35 @@ "resolved": "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-10.1.0.tgz", "integrity": "sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg==" }, + "@fluentui/keyboard-key": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@fluentui/keyboard-key/-/keyboard-key-0.2.0.tgz", + "integrity": "sha512-2CdaGMONY1ijub9Y6HbamcimhHsBHll5NwLTvomG15NGCftX9N3jlCnHbBBpiFCG0wDFcn1TVWyvcXRQ4BvUeg==", + "requires": { + "tslib": "^1.10.0" + } + }, "@fluentui/react-focus": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/@fluentui/react-focus/-/react-focus-7.11.1.tgz", - "integrity": "sha512-P+dYpJndpCVDsYsr2x6AjGwkI3M4E/zT7AcnRdb3RlVtHSVIMifXyf9TThPNERSBFQsYfMl8KR1qZqnUSV8sOg==", + "version": "7.11.6", + "resolved": "https://registry.npmjs.org/@fluentui/react-focus/-/react-focus-7.11.6.tgz", + "integrity": "sha512-Hp/gqTkh5pLtyUFcqoeUmIv/tOF5H0wW9u6g99aYPWQkiidw9RkoSuhYtobl1u6XvPVBZHgNSN9ql2QPQUz4Yw==", "requires": { - "@uifabric/merge-styles": "^7.12.0", + "@fluentui/keyboard-key": "^0.2.0", + "@uifabric/merge-styles": "^7.13.0", "@uifabric/set-version": "^7.0.12", - "@uifabric/styling": "^7.12.5", - "@uifabric/utilities": "^7.16.4", + "@uifabric/styling": "^7.12.8", + "@uifabric/utilities": "^7.17.2", "tslib": "^1.10.0" } }, "@fluentui/react-icons": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/@fluentui/react-icons/-/react-icons-0.1.14.tgz", - "integrity": "sha512-Z6JiMIn1RAkw2aJ4TJB4K1tjsQKV89U8xvBY9g4Q2/iK6Nm7fc/otCb25x+76XohYmw0vBw7m5eEgPHzj0HNWg==", + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/@fluentui/react-icons/-/react-icons-0.1.17.tgz", + "integrity": "sha512-vu4DqVz5PuQO6NwLsuElAFdAkYKb+w+wnkpDwYWuV8OmIEZ7ZlR5OWM1uhKTJHD+4GM1bpgcJplOJMtt3xX8RA==", "requires": { "@uifabric/set-version": "^7.0.12", - "@uifabric/styling": "^7.12.5", - "@uifabric/utilities": "^7.16.4", + "@uifabric/styling": "^7.12.8", + "@uifabric/utilities": "^7.17.2", "tslib": "^1.10.0" } }, @@ -1153,28 +1162,28 @@ } }, "@ionic/core": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.1.0.tgz", - "integrity": "sha512-L3Ps+0B0SqHlArMxPqgzmgtCs2D/cmgWw7rIDsOclh21igXZ9957kRR4BO7hzaXLbBIKjG1IzK2TAcX0uC94Sw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.1.1.tgz", + "integrity": "sha512-mmQL7hzwwReqFCJlRyxo3sNoI7r63GYnZD6QBXbYmCp83POvL89fQYegUfURM1Fcw0JiAZ3BsCoMYxuFXa7+cA==", "requires": { "ionicons": "^5.0.1", "tslib": "^1.10.0" } }, "@ionic/react": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ionic/react/-/react-5.1.0.tgz", - "integrity": "sha512-aa8PHsq+s6MAP2au4nSfp/cWR/QEi0Bpv0CLsjK88ap7ynU3QAZHZD2cxmOlCtbQfY5tBRAHIFU6vbYBIJmi/g==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@ionic/react/-/react-5.1.1.tgz", + "integrity": "sha512-2a6WsidlmxljoPbKwqstHYxbI2cOU+A1Am3RRCgn0CnCFNP155bO0K/2P1vDDZEPGAIO3UcJ4xTnpXKLlQY6/w==", "requires": { - "@ionic/core": "5.1.0", + "@ionic/core": "5.1.1", "ionicons": "^5.0.1", "tslib": "*" } }, "@ionic/react-router": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ionic/react-router/-/react-router-5.1.0.tgz", - "integrity": "sha512-k9tS7PxQjkaZjNO3Fmi4wqymZJey8F2Ip07dBDo/bTwDysu4TqEftzdrRwxgnD0Gi4PVQ67RHKJuodXITWS38Q==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@ionic/react-router/-/react-router-5.1.1.tgz", + "integrity": "sha512-jv3jotjPbkTqwgyyjk0PGiVyrc+jBmG6yx0eKvFL+GYV81CPV+JA5P/krOqZaxvydXWqlgqke0yI1CQk8WbAZw==", "requires": { "tslib": "*" } @@ -1371,9 +1380,9 @@ } }, "@microsoft/load-themed-styles": { - "version": "1.10.45", - "resolved": "https://registry.npmjs.org/@microsoft/load-themed-styles/-/load-themed-styles-1.10.45.tgz", - "integrity": "sha512-JdwSqtXfkJXRzHfQT5gjYt9Xhoon56uQtbY6gOaLiIyzabvuv5ttzAvQceMsFowm8+Tsod8JjVjYnXRg2U6zJA==" + "version": "1.10.46", + "resolved": "https://registry.npmjs.org/@microsoft/load-themed-styles/-/load-themed-styles-1.10.46.tgz", + "integrity": "sha512-Zhu/rW6XwkQC9ZXt7IWxDpMAyYIyNsT5ZF0gMfFDXnZCKNPm9GZca8HV5AYB1X6gvPGiz8gV60I+o9+KSH+aTw==" }, "@microsoft/microsoft-graph-types": { "version": "1.5.0", @@ -1708,9 +1717,9 @@ } }, "@types/chrome": { - "version": "0.0.107", - "resolved": "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.107.tgz", - "integrity": "sha512-7z/4YkJu4B8ROxZhbzIx5olbRJqzoDdAoMhSzcJlElsZzv2eTxsvxNkN/QFq0ClbAFNkFf07XVoTrWFHD12QyA==", + "version": "0.0.112", + "resolved": "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.112.tgz", + "integrity": "sha512-VJjHiDuF4Xmcn1DuOnGcrMDiGBvoJnaIE6u3ZkhsSz2L16HhnfqIuuM8EAvgQa0ODbNpotHqtPRTKpYoNfpAqQ==", "dev": true, "requires": { "@types/filesystem": "*", @@ -1802,9 +1811,9 @@ } }, "@types/jest": { - "version": "25.2.1", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-25.2.1.tgz", - "integrity": "sha512-msra1bCaAeEdkSyA0CZ6gW1ukMIvZ5YoJkdXw/qhQdsuuDlFTcEUrUw8CLCPt2rVRUfXlClVvK2gvPs9IokZaA==", + "version": "25.2.2", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-25.2.2.tgz", + "integrity": "sha512-aRctFbG8Pb7DSLzUt/fEtL3q/GKb9mretFuYhRub2J0q6NhzBYbx9HTQzHrWgBNIxYOlxGNVe6Z54cpbUt+Few==", "dev": true, "requires": { "jest-diff": "^25.2.1", @@ -1812,9 +1821,9 @@ }, "dependencies": { "@jest/types": { - "version": "25.2.6", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-25.2.6.tgz", - "integrity": "sha512-myJTTV37bxK7+3NgKc4Y/DlQ5q92/NOwZsZ+Uch7OXdElxOg61QYc72fPYNAjlvbnJ2YvbXLamIsa9tj48BmyQ==", + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-25.5.0.tgz", + "integrity": "sha512-OXD0RgQ86Tu3MazKo8bnrkDRaDXXMGUqd+kTtLtK1Zb7CRzQcaSRPPPV37SvYTdevXEBVxe0HXylEjs8ibkmCw==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", @@ -1824,9 +1833,9 @@ } }, "@types/yargs": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.4.tgz", - "integrity": "sha512-9T1auFmbPZoxHz0enUFlUuKRy3it01R+hlggyVUMtnCTQRunsQYifnSGb8hET4Xo8yiC0o0r1paW3ud5+rbURg==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.5.tgz", + "integrity": "sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -1880,15 +1889,15 @@ "dev": true }, "jest-diff": { - "version": "25.2.6", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-25.2.6.tgz", - "integrity": "sha512-KuadXImtRghTFga+/adnNrv9s61HudRMR7gVSbP35UKZdn4IK2/0N0PpGZIqtmllK9aUyye54I3nu28OYSnqOg==", + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-25.5.0.tgz", + "integrity": "sha512-z1kygetuPiREYdNIumRpAHY6RXiGmp70YHptjdaxTWGmA085W3iCnXNx0DhflK3vwrKmrRWyY1wUpkPMVxMK7A==", "dev": true, "requires": { "chalk": "^3.0.0", "diff-sequences": "^25.2.6", "jest-get-type": "^25.2.6", - "pretty-format": "^25.2.6" + "pretty-format": "^25.5.0" } }, "jest-get-type": { @@ -1898,12 +1907,12 @@ "dev": true }, "pretty-format": { - "version": "25.2.6", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.2.6.tgz", - "integrity": "sha512-DEiWxLBaCHneffrIT4B+TpMvkV9RNvvJrd3lY9ew1CEQobDzEXmYT1mg0hJhljZty7kCc10z13ohOFAE8jrUDg==", + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.5.0.tgz", + "integrity": "sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ==", "dev": true, "requires": { - "@jest/types": "^25.2.6", + "@jest/types": "^25.5.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" @@ -1943,9 +1952,9 @@ "dev": true }, "@types/node": { - "version": "13.13.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.5.tgz", - "integrity": "sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g==" + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.1.tgz", + "integrity": "sha512-FAYBGwC+W6F9+huFIDtn43cpy7+SzG+atzRiTfdp3inUKL2hXnd4rG8hylJLIh4+hqrQy1P17kvJByE/z825hA==" }, "@types/normalize-package-data": { "version": "2.4.0", @@ -2105,43 +2114,43 @@ } }, "@uifabric/foundation": { - "version": "7.7.12", - "resolved": "https://registry.npmjs.org/@uifabric/foundation/-/foundation-7.7.12.tgz", - "integrity": "sha512-4VFGjLyzgdEFpmbyu3t7xsxyRtFPcrVaHYNetQ0qVLtFyqPm/YqTtThiJ08WOJb8JXJVzW5p8NWof+6AzmbRcw==", + "version": "7.7.15", + "resolved": "https://registry.npmjs.org/@uifabric/foundation/-/foundation-7.7.15.tgz", + "integrity": "sha512-YHWTowzPdrQT+t6KHJAY/4F8ZVj4HLD0wrIvM5EdniwnGD+y0UslslvH7KURDuvQq6vR5Xt0IDfvIQVm34e02g==", "requires": { - "@uifabric/merge-styles": "^7.12.0", + "@uifabric/merge-styles": "^7.13.0", "@uifabric/set-version": "^7.0.12", - "@uifabric/styling": "^7.12.5", - "@uifabric/utilities": "^7.16.4", + "@uifabric/styling": "^7.12.8", + "@uifabric/utilities": "^7.17.2", "tslib": "^1.10.0" } }, "@uifabric/icons": { - "version": "7.3.38", - "resolved": "https://registry.npmjs.org/@uifabric/icons/-/icons-7.3.38.tgz", - "integrity": "sha512-R6QCmX7dyj6cG8yjUkeIJX4IUujUdPXFPXJSbMxQlUQqIu9UxgyAi9+X0AhFgX1Oafrw6U2/UDl9s/Wd6WMBCQ==", + "version": "7.3.41", + "resolved": "https://registry.npmjs.org/@uifabric/icons/-/icons-7.3.41.tgz", + "integrity": "sha512-5979pepxlJzE4CTxKbnSlIOqqnKQ7VZ5DZ7kDOJt1AgvsxFeCE2/BwhS5gMdvqCUoB584cnKE6U2hv7YVsq1YQ==", "requires": { "@uifabric/set-version": "^7.0.12", - "@uifabric/styling": "^7.12.5", + "@uifabric/styling": "^7.12.8", "tslib": "^1.10.0" } }, "@uifabric/merge-styles": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/@uifabric/merge-styles/-/merge-styles-7.12.0.tgz", - "integrity": "sha512-MQt2AqJJAn0boaGm9nBk4d7LntOCCiowgF35bK01WLD2fOymDKr7QberkqfzTzajPN/+9d+KQXguEBUUZd0deQ==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@uifabric/merge-styles/-/merge-styles-7.13.0.tgz", + "integrity": "sha512-aMglSZUrLtDcto5TeQc8w1Tndy8e+BW2iGkB4KuYpQk+xjoNmB810Gw3llt3UKKIBwjLoQpY+muUFL74wBEc8g==", "requires": { "@uifabric/set-version": "^7.0.12", "tslib": "^1.10.0" } }, "@uifabric/react-hooks": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@uifabric/react-hooks/-/react-hooks-7.3.3.tgz", - "integrity": "sha512-XhmmrTChLc/iABuw90d74y5WgUes1nkSpIGNwIJbQqNGYVxSydjdNZ4fYez76xfEs6pgl4pHwOsjFvG+5HWrsw==", + "version": "7.3.6", + "resolved": "https://registry.npmjs.org/@uifabric/react-hooks/-/react-hooks-7.3.6.tgz", + "integrity": "sha512-6jlWLTInpg+1eoKxYKZxtZlIg/nDTRKy5XqMYTCxdlHPKHm7z5vtct5uV3o/0ogtffihMIr1nFiZJKLx3OVBUQ==", "requires": { "@uifabric/set-version": "^7.0.12", - "@uifabric/utilities": "^7.16.4", + "@uifabric/utilities": "^7.17.2", "tslib": "^1.10.0" } }, @@ -2154,46 +2163,46 @@ } }, "@uifabric/styling": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@uifabric/styling/-/styling-7.12.5.tgz", - "integrity": "sha512-oFx7Rjx3+wMJfhSiDJR2yP2/5eirsdZ2EObPdpeod9VrM0BrOjPDEiKgnUnj/5OQFwcc4cyWvBpFGdML+Ix+SQ==", + "version": "7.12.8", + "resolved": "https://registry.npmjs.org/@uifabric/styling/-/styling-7.12.8.tgz", + "integrity": "sha512-C7yy51Wydh/O7FWnzEs9tyDWtpdBssvJrGy4NYzkOToBxyFjiN5vIa4xljUJ+dTZIhbFOq2L64+tQyFlO2qAUQ==", "requires": { "@microsoft/load-themed-styles": "^1.10.26", - "@uifabric/merge-styles": "^7.12.0", + "@uifabric/merge-styles": "^7.13.0", "@uifabric/set-version": "^7.0.12", - "@uifabric/utilities": "^7.16.4", + "@uifabric/utilities": "^7.17.2", "tslib": "^1.10.0" } }, "@uifabric/theme-samples": { - "version": "7.0.72", - "resolved": "https://registry.npmjs.org/@uifabric/theme-samples/-/theme-samples-7.0.72.tgz", - "integrity": "sha512-qGXm8ZLV6OE8MX77Sh1rxo7XagYW/BnSk5H7YiQL1Z1810uPWam+gQfd3o488NTHnPDJQB5flnSflY36vMObEw==", + "version": "7.0.77", + "resolved": "https://registry.npmjs.org/@uifabric/theme-samples/-/theme-samples-7.0.77.tgz", + "integrity": "sha512-/dOi40/iZaJObRp1T+ak1Pz50RGypb5Fnsw1EUtXtgcfBkOBqWbNS2fcbUScWGYdP3C2fc5PsZTCpWG4ME1agQ==", "requires": { "@uifabric/set-version": "^7.0.12", - "@uifabric/variants": "^7.1.62", - "office-ui-fabric-react": "^7.112.0", + "@uifabric/variants": "^7.1.67", + "office-ui-fabric-react": "^7.114.1", "tslib": "^1.10.0" } }, "@uifabric/utilities": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@uifabric/utilities/-/utilities-7.16.4.tgz", - "integrity": "sha512-XTbnhvCbE5vd9lLqZyEfSZN/DyGxPHy8MrdCB0cHd/YNeuJiECw3WH/MfggCvLmkaCU/g0eQ3bkVSAoYQm5yIw==", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@uifabric/utilities/-/utilities-7.17.2.tgz", + "integrity": "sha512-7lz1ItkZeLyGKTG4rm1vE1ttL6sYXv2vyyZROSuWHhqNCTeOJcyukVrgVLIinSz5gm/I0ju0F4npG2GDZ3NASw==", "requires": { - "@uifabric/merge-styles": "^7.12.0", + "@uifabric/merge-styles": "^7.13.0", "@uifabric/set-version": "^7.0.12", "prop-types": "^15.7.2", "tslib": "^1.10.0" } }, "@uifabric/variants": { - "version": "7.1.62", - "resolved": "https://registry.npmjs.org/@uifabric/variants/-/variants-7.1.62.tgz", - "integrity": "sha512-bhJo8xe2EnNcJhT+jVSKpc74V3rfWGIeKZhs7bBMaBF+4v0pMXC2fx8aM25RtZQ3n7HXDRVtjGZB9IOpmGR0zA==", + "version": "7.1.67", + "resolved": "https://registry.npmjs.org/@uifabric/variants/-/variants-7.1.67.tgz", + "integrity": "sha512-ZBt1Fm9rMmxgkn0AH7/9sXcBHj3nXhYdYw+k5QKFsErE1atsSkT/E4hB1gmipgUrrFMNRDHa6Hsjxhq5h5clqQ==", "requires": { "@uifabric/set-version": "^7.0.12", - "office-ui-fabric-react": "^7.112.0", + "office-ui-fabric-react": "^7.114.1", "tslib": "^1.10.0" } }, @@ -11855,20 +11864,20 @@ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" }, "office-ui-fabric-react": { - "version": "7.112.0", - "resolved": "https://registry.npmjs.org/office-ui-fabric-react/-/office-ui-fabric-react-7.112.0.tgz", - "integrity": "sha512-PXl3otHvPZt+gqEPu1gz5tEOfGsQcZt0r4u4kbQmYsNAB4kKwvMnLytKUayDToTog/6B2DpzWhkkUSEYDxCcOA==", + "version": "7.114.1", + "resolved": "https://registry.npmjs.org/office-ui-fabric-react/-/office-ui-fabric-react-7.114.1.tgz", + "integrity": "sha512-Sm8aXTwOBiyXciZ9lKtCE7lzPcbxtCoP3p7e9qkwGKlNH9FT8AkX9nTi4yo8ArXDYEs9mQP8gJ+FGrRImSsKJA==", "requires": { - "@fluentui/react-focus": "^7.11.1", - "@fluentui/react-icons": "^0.1.14", + "@fluentui/react-focus": "^7.11.6", + "@fluentui/react-icons": "^0.1.17", "@microsoft/load-themed-styles": "^1.10.26", - "@uifabric/foundation": "^7.7.12", - "@uifabric/icons": "^7.3.38", - "@uifabric/merge-styles": "^7.12.0", - "@uifabric/react-hooks": "^7.3.3", + "@uifabric/foundation": "^7.7.15", + "@uifabric/icons": "^7.3.41", + "@uifabric/merge-styles": "^7.13.0", + "@uifabric/react-hooks": "^7.3.6", "@uifabric/set-version": "^7.0.12", - "@uifabric/styling": "^7.12.5", - "@uifabric/utilities": "^7.16.4", + "@uifabric/styling": "^7.12.8", + "@uifabric/utilities": "^7.17.2", "prop-types": "^15.7.2", "tslib": "^1.10.0" } @@ -16562,9 +16571,9 @@ "integrity": "sha512-bna6Yi1pRznoo6Bz1cE6btB/Yy8Xywytyfrzu/wc+NFW3ZF0I+2iCGImhBsoYYCOWuICtRO4yHcnDlzgo1AdNg==" }, "typescript": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", - "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==" + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.2.tgz", + "integrity": "sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==" }, "uglify-js": { "version": "3.4.10", diff --git a/package.json b/package.json index 75e4f733..bf33b2ed 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,13 @@ "version": "6.0.4", "private": true, "dependencies": { - "@ionic/react": "^5.1.0", - "@ionic/react-router": "^5.1.0", - "@uifabric/theme-samples": "^7.0.72", + "@ionic/react": "^5.1.1", + "@ionic/react-router": "^5.1.1", + "@uifabric/theme-samples": "^7.0.77", "gsap": "^3.2.6", "ionicons": "^5.0.1", "monaco-editor": "^0.20.0", - "office-ui-fabric-react": "^7.112.0", + "office-ui-fabric-react": "^7.114.1", "react": "^16.13.1", "react-dom": "^16.13.1", "react-redux": "^7.2.0", @@ -18,7 +18,7 @@ "redux": "^4.0.5", "redux-thunk": "^2.3.0", "typesafe-actions": "^5.1.0", - "typescript": "^3.8.3" + "typescript": "^3.9.2" }, "scripts": { "build": "INLINE_RUNTIME_CHUNK=false react-scripts build", @@ -52,9 +52,9 @@ "@pnp/sp-addinhelpers": "^2.0.5", "@pnp/sp-clientsvc": "^1.3.11", "@pnp/sp-taxonomy": "^1.3.11", - "@types/chrome": "0.0.107", - "@types/jest": "25.2.1", - "@types/node": "13.13.5", + "@types/chrome": "0.0.112", + "@types/jest": "25.2.2", + "@types/node": "14.0.1", "@types/react": "^16.9.35", "@types/react-dom": "16.9.8", "@types/react-redux": "^7.1.8", diff --git a/public/bundles/sp-scriptlinks.sppkg b/public/bundles/sp-scriptlinks.sppkg new file mode 100644 index 0000000000000000000000000000000000000000..515291bde3645ab37b45da67f0da207259aff39d GIT binary patch literal 9626 zcmb`N1z1$u_xB0uMi7;5q+=LDkdTn>Mrx>`W9Sx!?oN>gDG327=@z6#LQ;{G9{N9A z-+TRC?)|<0d!P5+&oj@NdFJf3_xYZ+_gU++j!m0pbeX8TRS7bL?8%p3^o*J?vu5^BPQAf&7L# zidxAQBv-2+6gYTe4j~awQdSS_9q=+Onyo_C-(vNO=RfGBD0_)+ypE~eF@y_VHy~Hy zzsOT6@-541^wTn%Tq0HeKT;w5CKX(rKN>3ho1v4LjWfsZ=lqn@lZol;2K>KOxSS9F zIOmqA>^B|X#tbULm6i1C-d}KxFPwN)NNm!5uTh%TD^t4*&qM!?UyK+lq05K;;Vc0` zXCc2csE-i?NoQYE;Tm>ebPp7~I&A`7{x-gcLc-({Xr2-}nIKA=EhmGg8vk+>nU~AB zI4Wx9X$hAScYtpQhS`@oH}1*@-h-wol|g(GyO3xiTQKA>-nZHiw4U(Kcw-&PWW@T>d5K8!nf!srE_>*d_9x8>E|FK*353Q@i; z(vP?*tur7C79Xau~|LEGV`k=8IGO^1DKRRgoU9kSPzBF%N*3pUoHq zFk=G%c)8dF__&SP`1!ewxy|`a`8l~vZ;3n+f@=C1-W3QJnd_gLFtahUHM4^_-*~lx z@}OM@Cw}uc7Md^QY6jFAWI;5zNeu-e_?b95ODS6@IlewPp=0m1cZP;7H?}{lUtm(_ z*2Mb|@gxUo*ok_@Z;8`>d1IR}>4k&J+ATC{n`lF`pDixI8}J=utc*f3{|xFR)m4JG zNUlp**1sRr*dpO%Uc@vb1a$MJ1;>^hWMQs<_dh0^`Es!A{)y^UA>zKH)_YXZ1XPi??(3Dm%*W@66HW{}&?YpTVbX^Vz{pob6t{N3r!4s6aK zC$IyA%?4~|?aXHE;9vs=8AHJKc5EOQXNbKm*wf6(5Wr>3&BF@>nVItPbD99T0ek{L zP9P^ACxC~G7i7lAZsiQs+OwanBfQcg%lRmgs6x)Dpjl$G@EOMox$dpru`hR!XyFKk z9`ulj8En4k=jTR5Kcjd?f!{^sA-&+^cCyzHlr$DAQMzWuphaRIT{Jk}y*JbSeRE}( z#KHCAZ23cXhR!MK@CZjm(RYAw7)(ThcyS)L{bybTGOBq)HvvVn~NG9W7FIOcPlWixM1KzP|e|+VL zX*k`}D9A`mYbk4^Ztjspp7rBRs_kbWo@{iYsg6e2cb9idE8094#a*M2OzXhcin~E8 zf=Ni*iYX=|1OTO?;9#4k%LW+sSb<#3F{AaA(R?1stiRn(TXF;@x6lfzzPaAivajYA z4L)z(hj2xE8G}}g8;WfhXbd4p905l1_N!=oh2J4GbVxh>}YyK=w!_lQ8;%w!*dF>cb-Wqj%rGY~w zZ4Lf_qp^%1rffKLc=BPLCG87j%tPrEmr@NzJ9{z<&3DI}1)i9P5!fvd5h2nO?sw3I zo9&b1Sdw1+Kn|8K4G!--;@A9Q(xDhrnw&E7>Qf4l5S?d}Lak`aV+~|bKUE~tu7tjd zAFBj4a>G&xd$wJIf+CmMGCobOLatt^&l*EYabsw zg00g>j4_7|N;$Aw z@NlVPhL&hUt3e``D?ahTr7(E^OiYDBCqNiWjQ;C<)u(pYDic0o_>7cEJuuDu>Kh%8 z_*X2*SGgU=;p#UzvOX}w)~!l!!Nl>nPpWUTer(z#R(D`6R*ln0BS|PfT<>D%exx4$ zF1F%>VEew@Bay}!6@b3m0~+b!WkbeZB!T7(8lW?eGPEeznT~hgswoRf(0QK*dN^Cx zFb~!iKc%gikI&kTye?eQ;}JR1&0<-I!X+3Jri65!=?(l)NpFSuQ-f2VkIuYYFIz+m zDQxYw!IG^NmAyvGx%YVZDqXXwmip_rIpX^P;0T)#q!>~*Y~LK-N*~;y$Yf9su2{Ex z{`akg;x*HUNJ6%=rtAV^@Ljig!P+SJ^^2<2bx#4p=UR7Rs1dPv(*&xul><}@R0NN0 zv|Jkr^87{zgw;Nn)oXBaTx^9BSfHSuG*A8rPZ3@!6I>JX?gr+_Yd%*FwpxGp^pK>X zvr%q(4aXaO1x-7DEf=Ve`O_Cdu0R*Ym8@-M&PmQ78Tt;xEENl>%bH%e7B; z0k4F!_dXg>9f36GK?20Ko4aewVlR14jLLPztMnL!HZW0|oIR0@d$aovg?G+7VPw~f zHA9vOh} zHYsPkuX?KHb4deZt$k=%^Ai1wz)3Y4o3}B6d~xj*SZrxsFk0L<0v9Hy)9M7q3CPLJ zMYDd5XW4C*zvYa(&jws%eY|jHqW%Hhd|Abg*%vK7KX8;oIe?$}5!1w}>2Sp9{<)1L zRi$vN)_OKj;<60`nwJ%LoUdjYTmP#6$i^7j>v3XrX#jDDFb1Xur6^LD&uSm^F(qrU zeuQA56|4+Kp6Ln}jv^W-34`UURSd-*Pcn=aUrV1JDFOZdtl9YzTGatuD>=AsobaQ$ znK8u0$;|Md1g|%OYQ&1c(CQnpb<63}+LmZmD_vvTX`ylN$vhBu#70y;1&nF2 z_vT9p&rsD*`+h{<5JAn>MEw*4oL?`?5pHUG!p4ZqEH!ofHQa%lEnTBTbFy(bv4W}e zwM*Lk7d8#eX}Pys)@mHGfj`cQq5$;bMFROm_7Exe>K~vMzFv1;DnPP(KiAcj&P68s zvIUUfZWJWXBHMxHbeLnj;0kBL!EG6!#B|MEn@M>kK ztxuwu%x_S?6fG?g7_GAxWLEq%RzZ0d(CMF{@IHR^`q};y3a!12>^;hXhVwgr7X631 zP(d|ZY$~|$SbvEAn}}x7Vs=Pe*piim9wY8XDmmf)+SNvCj)*Mo=DG1*;W#g56C_za z)DGJFiM*d*O0(N(*8ufXOg+boc4nGRmBw=;)zstPax?U%wZ_THEw*OV5tcXK4=Xla zmiSD(GzWZI5?0nNn5zscjB^}6q166{t<62ZMt>2LYEmpYX!M*3!zFh>)ugUR&puWn zdFYEi|K*Cblky6t#$mOq88p;`-l7|u)8kTsDHk+#2x;sH25X8z&|(s z^shY$WN&8y+ zCk?@Lf^Fj8+O~tKI*@M20zdp_62XtRbGhI0+E_8`pWDnwVHr8ygh&Q@8x~S*V4wC# zSUD?dFECE9&hLHxrtvym{z)q%dGwcrK#ueoRKq3UJXP#;yY{utl4Njx8_0)Wg)t?~ zNat98iHUHxI`Zh5TJLw$BQk#M_zg}oAy=MmqZU*2T}?6#_gz+xfT@Qsg42QsC_;~H z^7Pwru=#=_v)Z1qzsOndz*`q#tNh$8g8II0eiDUFv}u1qlcL$vLbw2Zq)@!TX+xt* z!PT58AxqUqHQg!Org-SUL|O0)2|DGqq9In!BsF{7$ONsB4#@Js%k-3Eg3YI{UJ{pB zfA)speO=ykxF$E=K>1&^VgJuNu7DdzbsweDMbW6;oFxJ%O#{;@}l9&^#JwV+^ zS|~+ivXCEh7^X@YvN>N`3g;&!Cu@9i@AC&DY2voWAkcDBCi5;w+IRiX&oc|yAr5B@ zGn!CD6S?(H)3zRq@pfSvy7&3I-guPRbY5G!gcAF?-%PG^N|cyW)hATe@MOZDNRvm# zoSJS?9Nfu>d{X7))3$DYfUzW*7|y|5l2e*&!}zY4w4bgtO*=6uxY4~k+kY|&b<1NK zkh}EO&Q+h;@{D}iq{Ip(cjJ@2s0aCv+^!>%KYPyU(`7AwxV$GQ2nbqmiT}w1okP+c z9xpk=p@*TlsW~^uoKJv_)0D@A4Zz34%f@eF24Lgm6W|lzHWn}g0{LzhW=rC8`*BX9 z;A`1ctO|$L4R3b1pqsv98JEuEpQ%<=SF~3fE8Z!Mb+6lmN z_*CSf*<_%!z4Xl9kNUBo2)hc>l8O++z$81o`T2KWGh|tNE7I?!XTNN-vc{x4$&VF| z+`yE8;FNf_sF`$SRD6DL*&0)+RXRAPq3ah(oOf~p6Mgb`s$!RSa7cUak=&pA&}`uHHIi_pR` zT^92}-UEpQWl^Di0tuB!_tY-_rG$V_!fms4VMtqEVb+c9$j_&vc0R+l(EjYKc-n~% zQsI1V=Kqz?nRA;82ml1Q`9K0D+(2V90do^>5P;v9&)5vWYsz`U=d^9@XZZ=QSfZ6J zW#D}7u|l0{+FV`zC%sqo+qTC~FvO|GAsw33EksEG>rLPD56X$AkNe5-Cx|S9Gp8+r zpARIB#s9|VG{5b_`P}I;?9lt_7}g6F6881F+PRo7^JW|w9ZX5zCur7NUISX+% z{2aEL0o>$cOxJEyVWDx>`$!eADdB5Ky19WZiQUWAs#0R6;R)$L;+n6uy%$7=8CLx| z^t)M_@rte*tQa;5nX?WoR@`X-2@;SUDkgi6;43RJqNYHaE}LP@P`TuVS;I0NxlIb; zS*eY$il3cS`iXWL;@ID^*)9nUx(UMpT>>1?%?Vc&=qOZB?A|L3U)kYv{5qghV1LDA zzYHrN&EDt!VK>nat$t^fDnpD+gF)k5skBA26TN;<`T5L6Yiev_BqJd{iYEG>ZPsEe43pk!?dD`Y`MXI^)N;-Pfv;g+e#f>sg4gJ#sfEqtZ&Bt! z#D%j^?s2$uQdtvPXBrrB_{Ju$F!}BwMG#M?<+IO{kq`R(*O!{kS#sqU&r&$X+I5%C zTF<5{-`Me2jl7l%4xJwJ`R;Pn{1edyZ*BrObPKGttOBUd`#1>U?8sIgHa6jW(^k_>|!%gMCIP+*21K-d&0d!OPPa% zm$k_Nl zc9p+uDuZfRE2kQ1t3`Al<;(k}lwty38F&)E{1}h0AJ6RDz`LH&k6B%K;@kOL`2QY=??zkex_Y#5L_pp9U6)3#O zSsFA%4nrjq#u%H2C}Tgj#dKNkL}`+4n@~$dV0=o)#dG!qTzw{HOre9zgVh-RZT>Ci z4WetKzh4vO54Po2xEztOYUsOXG*mxipINvhngsjt-gmy=XGQyoAKsD&G5{eeas(3Zf8fh)X$QMFMYi;TF$Q?Hd`aU`a)uAEvg}oDxC^RIP z2Z6Wt2GJ2i?;`~r_SQMf3B~$f_u14Je}nFQY4En+f0wc$zh@4i5SytH1AhDh3XYkB zb)!<|2F;jdZC4Fr-n;lXQ6Fn7hK|8>=qEJM(KS;Kev3saBm%1NN0-+VeQe}DXKA;H zRqL_oOl4YoAIk-u*_6hv=tPQ*aU6dUJR7gi>Hnq9R;Pup4O@f0H@@@OsjI1kVG)Oj zn)EY)D4fu>Eg;}OzOUt42q$!tH-t{ZOhR&DeA* zU!WQ!O?_ErX=Sk^TWRQXYE{6Dz<1RTi75@caNh4svLDV)ygKfr^VN{EDQ%u@u6}XU zyvG7c8Dpn7O}eOw<0MfS&~3|1%B~jH*gO(hbUCh4#V5E@L-#;;!XebLy&6zY32vyYiz8C;T}d(K?nVOtl~11zJ~Ib z`0NNDA5uI^bN_P3iNWA~Vg9NDJ7zjIduZOM&POr#cTbrU+AX{&AEQ5g)}0~+tHlA$ zj3jk&5W3K+-Z`GSXI@V3Veupl4J`7aJqRhWvQ)M0{7mFN$e0urm=ZO7AS@+eod9u?rO91$OPbMDW90LXsqL74m@_`3Q zlt-w+6OeHOB9uyQS8O-e_EKG$P*lg6qg+EyXG`-@L?bt}9`Q-rVvCr>KH~5t_+rFA z=1In+Az^Rx6;9`7@)Ar$k>F~N>b#y;z8^dLPSXfhRHu?sND9sq`mxUMtwq+AUdQm9 z5D|$8;lG#f;UVmQv|DxOU!DJ2ioGdl|7`H!0)Yjdb^Ko5{_}vh3*5i=LO@XZqtC5j ze@jmOZ)4w-fq%A}u^r*z_&*B6f0_K5F5NB*|85ikq4uAe{LdosFY|v@>!z6cv)#;i z9!^qkXJzn`^`C{iU0nU$00IK`oxkb+|F6_~dm^{_@2`pM!y(b%(BRt!Zo|-D1{iSu zJ&Cz({WdB5W!(bzcc=W { + diff --git a/src/components/navigation.tsx b/src/components/navigation.tsx index 635445d5..d993e725 100644 --- a/src/components/navigation.tsx +++ b/src/components/navigation.tsx @@ -101,6 +101,12 @@ export const FabricNav = withRouter(({ history }: RouteComponentProps) => { key: 'key7', disabled: true, }, + { + name: 'Api tester', + url: '/apitester', + key: 'key17', + disabled: true, + }, { name: 'Files', url: '/files', diff --git a/src/pages/apitester/components/commands.tsx b/src/pages/apitester/components/commands.tsx new file mode 100644 index 00000000..1fef5ee2 --- /dev/null +++ b/src/pages/apitester/components/commands.tsx @@ -0,0 +1,48 @@ +import { Dropdown, IconButton, IStackStyles, Stack, TextField } from 'office-ui-fabric-react' +import React from 'react' + +const ApiTesterCommands = () => { + + const stackStyles: IStackStyles = { + root: { + marginTop: 5, + marginLeft: 26, + marginRight: 26, + }, + } + + return ( + + + + + + + ) +} + +export default ApiTesterCommands diff --git a/src/pages/apitester/components/resultsview.tsx b/src/pages/apitester/components/resultsview.tsx new file mode 100644 index 00000000..3b4fd251 --- /dev/null +++ b/src/pages/apitester/components/resultsview.tsx @@ -0,0 +1,99 @@ +import { IStackStyles, Stack, StackItem } from 'office-ui-fabric-react' +import React, { useCallback, useEffect, useRef, useState } from 'react' +import { useDispatch, useSelector } from 'react-redux' +import { IRootState } from '../../../store' + +const ApiTesterResults = () => { + + const dispatch = useDispatch() + const { isDark } = useSelector((state: IRootState) => state.home) + + const editor = useRef(null) + const outputDiv = useRef(null) + + const COMMON_CONFIG: monaco.editor.IEditorOptions = { + lineNumbers: 'on', + roundedSelection: true, + scrollBeyondLastLine: false, + readOnly: false, + fontSize: 16, + renderIndentGuides: true, + suggestOnTriggerCharacters: true, + colorDecorators: true, + minimap: { + enabled: false, + }, + // automaticLayout: true, + } + monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({ + noSemanticValidation: false, + noSyntaxValidation: false, + }) + monaco.languages.typescript.javascriptDefaults.setCompilerOptions({ + target: monaco.languages.typescript.ScriptTarget.ES5, + allowNonTsExtensions: true, + moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs, + module: monaco.languages.typescript.ModuleKind.CommonJS, + noEmit: true, + // typeRoots: ['@pnp', '@microsoft'], + allowSyntheticDefaultImports: true, + }) + + useEffect(() => { + const resizeListener = () => { + if (editor && editor.current) { + editor.current.layout() + } + } + window.addEventListener('resize', resizeListener) + return () => { + window.removeEventListener('resize', resizeListener) + } + }, []) + + const initEditor = useCallback(() => { + if (outputDiv.current) { + editor.current = monaco.editor.create(outputDiv.current, { + model: monaco.editor.createModel( + ``, + 'json', + // @ts-ignore: this is the only way to make it work + new monaco.Uri('indexkoko.ts'), + ), + ...COMMON_CONFIG, + }) + + if (editor && editor.current) { + // trigget resize to make editor visible (bug in monaco 0.20.0?) + setTimeout(() => { window.dispatchEvent(new Event('resize')) }, 1) + } + } + }, [COMMON_CONFIG]) + + const [ initialized, setInitialized ] = useState(false) + + // this will run always when the isDark changes + useEffect(() => { + monaco.editor.setTheme(isDark ? 'vs-dark' : 'vs') + }, [isDark]) + + // this will run when the compunent unmounts + useEffect(() => { + return () => { + monaco.editor.getModels().forEach(model => model.dispose()) + } + }, [dispatch]) + + useEffect(() => { + if (!initialized) { + setInitialized(true) + initEditor() + } + }, [dispatch, initEditor, initialized]) + + return ( +
+ ) +} + +export default ApiTesterResults diff --git a/src/pages/apitester/index.tsx b/src/pages/apitester/index.tsx new file mode 100644 index 00000000..acae3ae1 --- /dev/null +++ b/src/pages/apitester/index.tsx @@ -0,0 +1,21 @@ +import { IonContent, IonPage } from '@ionic/react' +import React from 'react' +import Header from '../../components/header' +import ApiTesterCommands from './components/commands' +import ApiTesterResults from './components/resultsview' + +const ApiTester = () => { + + return ( + +
+ {/* Actions menu */} + + + + + + ) +} + +export default ApiTester diff --git a/src/pages/pnpjsconsole/components/pnpjseditor.tsx b/src/pages/pnpjsconsole/components/pnpjseditor.tsx index bb7b5eda..f46f4566 100644 --- a/src/pages/pnpjsconsole/components/pnpjseditor.tsx +++ b/src/pages/pnpjsconsole/components/pnpjseditor.tsx @@ -43,7 +43,7 @@ const PnPjsEditor = () => { const { isDark } = useSelector((state: IRootState) => state.home) - const COMMON_CONFIG: monaco.editor.IStandaloneEditorConstructionOptions = pnpjsMonacoConfigs() + const COMMON_CONFIG: monaco.editor.IEditorOptions = pnpjsMonacoConfigs() useEffect(() => { const resizeListener = () => { diff --git a/src/pages/pnpjsconsole/components/utils.ts b/src/pages/pnpjsconsole/components/utils.ts index 2a3f9203..20e91324 100644 --- a/src/pages/pnpjsconsole/components/utils.ts +++ b/src/pages/pnpjsconsole/components/utils.ts @@ -59,7 +59,7 @@ export const getExtensionDirectory = (): Promise => new Promise(resolve => chrome.runtime.getPackageDirectoryEntry(resolve)) export const pnpjsMonacoConfigs = () => { - const COMMON_CONFIG: monaco.editor.IStandaloneEditorConstructionOptions = { + const COMMON_CONFIG: monaco.editor.IEditorOptions = { lineNumbers: 'on', roundedSelection: true, scrollBeyondLastLine: false, @@ -68,6 +68,9 @@ export const pnpjsMonacoConfigs = () => { renderIndentGuides: true, suggestOnTriggerCharacters: true, colorDecorators: true, + minimap: { + enabled: true, + }, // automaticLayout: true, } monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({ diff --git a/src/pages/scriptlinks/chrome/addandinstallapp.ts b/src/pages/scriptlinks/chrome/addandinstallapp.ts new file mode 100644 index 00000000..975342be --- /dev/null +++ b/src/pages/scriptlinks/chrome/addandinstallapp.ts @@ -0,0 +1,103 @@ +import { ILogEntry } from '@pnp/logging' +import * as pnp from '@pnp/pnpjs' +import { IApp } from '@pnp/sp/appcatalog' + +// we cannot use async methods, they do not work correctly when running 'npm run build', +// async methods works when running 'npm run watch' +export function addAndInstallApp(...args: any) { + + /* get parameters */ + const params = args + const functionName = params[0].name + const url = params[1]; + + /* import pnp */ + (window as any).SystemJS.import(((window as any).speditorpnp)).then(($pnp: typeof pnp) => { + /*** setup pnp ***/ + $pnp.setup({ + sp: { + headers: { + Accept: 'application/json; odata=verbose', + 'Cache-Control': 'no-cache', + }, + }, + }) + /*** clear previous log listeners ***/ + $pnp.log.clearSubscribers() + /*** setup log listener ***/ + const listener = new $pnp.FunctionListener((entry: ILogEntry) => { + entry.data.response.clone().json().then((error: any) => { + window.postMessage(JSON.stringify({ + function: functionName, + success: false, + result: null, + errorMessage: error.error.message.value, + source: 'chrome-sp-editor', + }), '*') + }) + }) + $pnp.log.subscribe(listener) + /* *** */ + + const postMessage = (actions: any) => { + window.postMessage(JSON.stringify({ + function: functionName, + success: true, + result: actions, + errorMessage: '', + source: 'chrome-sp-editor', + }), '*') + } + const spScriptLinksAppId = '5a2f0e0f-2f29-4e49-9351-73495827a6f3' + + interface IAppInfo extends IApp { + AadAppId: string, + AadPermissions: any, + AppCatalogVersion: string, + CDNLocation: string, + CanUpgrade: boolean, + ContainsTenantWideExtension: boolean, + CurrentVersionDeployed: boolean, + Deployed: boolean, + ErrorMessage: string, + ID: string, + InstalledVersion: string, + IsClientSideSolution: boolean, + IsEnabled: boolean, + IsPackageDefaultSkipFeatureDeployment: boolean, + IsValidAppPackage: boolean, + ProductId: string, + ShortDescription: string, + SkipDeploymentFeature: boolean, + ThumbnailUrl: string, + Title: string, + } + + const catalog = $pnp.sp.web.getAppCatalog() + catalog.filter(`ProductId eq '${spScriptLinksAppId}'`).get().then(app => { + if (app.length === 0) { + fetch(url).then(response => { + response.blob().then(blob => { + catalog.add('sp-scriptlinks.sppkg', blob, true).then(r => { + $pnp.sp.web.getAppCatalog() + .getAppById(spScriptLinksAppId).install() + .then(() => postMessage('App added to AppCatalog and installed to site succesfully')) + }) + }) + }) + } else { + catalog.getAppById(spScriptLinksAppId)().then((spApp: IAppInfo) => { + if (spApp.InstalledVersion === '') { + catalog.getAppById(spScriptLinksAppId).install().then(() => postMessage('App Installed succesfully')) + } else if (spApp.InstalledVersion < spApp.AppCatalogVersion) { + spApp.upgrade().then(() => postMessage(`App upgraded succesfully to version ${spApp.InstalledVersion}`)) + } else { + postMessage('App already installed to this site') + } + }) + } + }) + + }) + +} diff --git a/src/pages/scriptlinks/chrome/chrome-actions.ts b/src/pages/scriptlinks/chrome/chrome-actions.ts index 4822d949..03db51ca 100644 --- a/src/pages/scriptlinks/chrome/chrome-actions.ts +++ b/src/pages/scriptlinks/chrome/chrome-actions.ts @@ -5,9 +5,11 @@ import * as actions from '../../../store/scriptlinks/actions' import { INewScriptLink, IScriptLink, ScriptLinksActions } from '../../../store/scriptlinks/types' import { exescript } from '../../../utilities/chromecommon' import { getPnpjsPath, getSystemjsPath, spDelay } from '../../../utilities/utilities' +import { addAndInstallApp } from './addandinstallapp' import { createCustomAction } from './createscriptlink' import { deleteCustomActions } from './deletescriptlinks' import { getCustomActions } from './getscriptlinks' +import { unInstallAppFromWeb } from './uninstallappfromweb' import { updateCustomAction } from './updatescriptlink' import { updateCacheCustomAction } from './updatescriptlinkcache' @@ -288,3 +290,105 @@ export async function cacheScriptLinks(dispatch: Dispatch) { + + dispatch(rootActions.setLoading(true)); + // add listener to receive the results from inspectedPage + (window as any).port.onMessage.addListener(function installAppCallback(message: any) { + + if ( + typeof message !== 'object' || + message === null || + message === undefined || + message.source === undefined + ) { + return + } + + switch (message.function) { + case addAndInstallApp.name: + if (message.success) { + /* on success */ + dispatch(rootActions.setAppMessage({ + showMessage: true, + message: message.result, + color: MessageBarColors.success, + })) + // hide loading component + dispatch(rootActions.setLoading(false)) + } else { + /* on error */ + // hide loading component + dispatch(rootActions.setLoading(false)) + // show error message + dispatch(rootActions.setAppMessage({ + showMessage: true, + message: message.errorMessage, + color: MessageBarColors.danger, + })) + } + // remove listener + (window as any).port.onMessage.removeListener(installAppCallback) + break + } + }) + const url = chrome.runtime.getURL('bundles/sp-scriptlinks.sppkg') + + // execute script in inspectedWindow + let script = `${getPnpjsPath()} ${getSystemjsPath()} ${exescript} ${addAndInstallApp}` + script += ` ${exescript.name}(${addAndInstallApp.name}, '${url}');` + chrome.devtools.inspectedWindow.eval(script) + +} + +export async function unInstallApp(dispatch: Dispatch) { + + dispatch(rootActions.setLoading(true)); + // add listener to receive the results from inspectedPage + (window as any).port.onMessage.addListener(function unInstallAppCallback(message: any) { + + if ( + typeof message !== 'object' || + message === null || + message === undefined || + message.source === undefined + ) { + return + } + + switch (message.function) { + case unInstallAppFromWeb.name: + if (message.success) { + /* on success */ + dispatch(rootActions.setAppMessage({ + showMessage: true, + message: message.result, + color: MessageBarColors.success, + })) + // hide loading component + dispatch(rootActions.setLoading(false)) + } else { + /* on error */ + // hide loading component + dispatch(rootActions.setLoading(false)) + // show error message + dispatch(rootActions.setAppMessage({ + showMessage: true, + message: message.errorMessage, + color: MessageBarColors.danger, + })) + } + // remove listener + (window as any).port.onMessage.removeListener(unInstallAppCallback) + break + } + }) + const url = chrome.runtime.getURL('bundles/sp-scriptlinks.sppkg') + + // execute script in inspectedWindow + let script = `${getPnpjsPath()} ${getSystemjsPath()} ${exescript} ${unInstallAppFromWeb}` + script += ` ${exescript.name}(${unInstallAppFromWeb.name}, '${url}');` + chrome.devtools.inspectedWindow.eval(script) + +} diff --git a/src/pages/scriptlinks/chrome/uninstallappfromweb.ts b/src/pages/scriptlinks/chrome/uninstallappfromweb.ts new file mode 100644 index 00000000..4eec437d --- /dev/null +++ b/src/pages/scriptlinks/chrome/uninstallappfromweb.ts @@ -0,0 +1,56 @@ +import { ILogEntry } from '@pnp/logging' +import * as pnp from '@pnp/pnpjs' + +// we cannot use async methods, they do not work correctly when running 'npm run build', +// async methods works when running 'npm run watch' +export function unInstallAppFromWeb(...args: any) { + + /* get parameters */ + const params = args + const functionName = params[0].name; + + /* import pnp */ + (window as any).SystemJS.import(((window as any).speditorpnp)).then(($pnp: typeof pnp) => { + /*** setup pnp ***/ + $pnp.setup({ + sp: { + headers: { + Accept: 'application/json; odata=verbose', + 'Cache-Control': 'no-cache', + }, + }, + }) + /*** clear previous log listeners ***/ + $pnp.log.clearSubscribers() + /*** setup log listener ***/ + const listener = new $pnp.FunctionListener((entry: ILogEntry) => { + entry.data.response.clone().json().then((error: any) => { + window.postMessage(JSON.stringify({ + function: functionName, + success: false, + result: null, + errorMessage: error.error.message.value, + source: 'chrome-sp-editor', + }), '*') + }) + }) + $pnp.log.subscribe(listener) + /* *** */ + + const postMessage = (actions: any) => { + window.postMessage(JSON.stringify({ + function: functionName, + success: true, + result: actions, + errorMessage: '', + source: 'chrome-sp-editor', + }), '*') + } + const spScriptLinksAppId = '5a2f0e0f-2f29-4e49-9351-73495827a6f3' + + const catalog = $pnp.sp.web.getAppCatalog() + catalog.getAppById(spScriptLinksAppId).uninstall().then(() => postMessage('App removed')) + + }) + +} diff --git a/src/pages/scriptlinks/components/commands.tsx b/src/pages/scriptlinks/components/commands.tsx index 0b73ded4..f036ca78 100644 --- a/src/pages/scriptlinks/components/commands.tsx +++ b/src/pages/scriptlinks/components/commands.tsx @@ -3,6 +3,7 @@ import React from 'react' import { useDispatch, useSelector } from 'react-redux' import { IRootState } from '../../../store' import { setConfirmCacheDialog, setConfirmRemoveDialog, setNewPanel } from '../../../store/scriptlinks/actions' +import { installApp, unInstallApp } from '../chrome/chrome-actions' const ScriptLinkCommands = () => { const dispatch = useDispatch() @@ -38,6 +39,34 @@ const ScriptLinkCommands = () => { disabled: selectedItems.length < 1, }, ]} + farItems={[ + { + key: 'app', + text: 'ScriptLinks App', + cacheKey: 'myCacheKey', + iconProps: { iconName: 'AppIconDefault' }, + subMenuProps: { + items: [ + { + key: 'addApp', + text: 'Install', + iconProps: { iconName: 'AppIconDefaultAdd' }, + onClick: () => { + installApp(dispatch) + }, + }, + { + key: 'removeApp', + text: 'Uninstall', + iconProps: { iconName: 'Delete' }, + onClick: () => { + unInstallApp(dispatch) + }, + }, + ], + }, + }, + ]} /> ) } From 0dd762a5d84a43c31c3970b35be29f34748ebbcb Mon Sep 17 00:00:00 2001 From: Tomi Tavela Date: Fri, 15 May 2020 23:16:14 +0300 Subject: [PATCH 3/4] deploy after adding the app --- .../scriptlinks/chrome/addandinstallapp.ts | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/pages/scriptlinks/chrome/addandinstallapp.ts b/src/pages/scriptlinks/chrome/addandinstallapp.ts index 975342be..8fef921a 100644 --- a/src/pages/scriptlinks/chrome/addandinstallapp.ts +++ b/src/pages/scriptlinks/chrome/addandinstallapp.ts @@ -73,31 +73,33 @@ export function addAndInstallApp(...args: any) { Title: string, } - const catalog = $pnp.sp.web.getAppCatalog() - catalog.filter(`ProductId eq '${spScriptLinksAppId}'`).get().then(app => { - if (app.length === 0) { - fetch(url).then(response => { - response.blob().then(blob => { - catalog.add('sp-scriptlinks.sppkg', blob, true).then(r => { - $pnp.sp.web.getAppCatalog() - .getAppById(spScriptLinksAppId).install() - .then(() => postMessage('App added to AppCatalog and installed to site succesfully')) + $pnp.sp.getTenantAppCatalogWeb().then(appCatweb => { + const catalog = appCatweb.getAppCatalog() + catalog.filter(`ProductId eq '${spScriptLinksAppId}'`).get().then(app => { + if (app.length === 0) { + fetch(url).then(response => { + response.blob().then(blob => { + catalog.add('sp-scriptlinks.sppkg', blob, true).then(r => { + catalog.getAppById(spScriptLinksAppId).deploy() + .then(() => $pnp.sp.web.getAppCatalog() + .getAppById(spScriptLinksAppId).install() + .then(() => postMessage('App added to AppCatalog and installed to site succesfully'))) + }) }) }) - }) - } else { - catalog.getAppById(spScriptLinksAppId)().then((spApp: IAppInfo) => { - if (spApp.InstalledVersion === '') { - catalog.getAppById(spScriptLinksAppId).install().then(() => postMessage('App Installed succesfully')) - } else if (spApp.InstalledVersion < spApp.AppCatalogVersion) { - spApp.upgrade().then(() => postMessage(`App upgraded succesfully to version ${spApp.InstalledVersion}`)) - } else { - postMessage('App already installed to this site') - } - }) - } + } else { + catalog.getAppById(spScriptLinksAppId)().then((spApp: IAppInfo) => { + if (spApp.InstalledVersion === '') { + catalog.getAppById(spScriptLinksAppId).install().then(() => postMessage('App Installed succesfully')) + } else if (spApp.InstalledVersion < spApp.AppCatalogVersion) { + spApp.upgrade().then(() => postMessage(`App upgraded succesfully to version ${spApp.InstalledVersion}`)) + } else { + postMessage('App already installed to this site') + } + }) + } + }) }) - }) } From 355de4f9dfd584e09b93ef0cbd97152b0d81cb25 Mon Sep 17 00:00:00 2001 From: Tomi Tavela Date: Sat, 16 May 2020 01:02:48 +0300 Subject: [PATCH 4/4] package updates, version update, ready to ship --- package.json | 2 +- public/manifest.json | 2 +- src/pages/scriptlinks/chrome/addandinstallapp.ts | 6 +++--- src/pages/scriptlinks/components/commands.tsx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index bf33b2ed..cc3e9241 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sp-editor", - "version": "6.0.4", + "version": "6.0.5", "private": true, "dependencies": { "@ionic/react": "^5.1.1", diff --git a/public/manifest.json b/public/manifest.json index be4e3222..9b018ddd 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,7 +1,7 @@ { "name": "SP Editor", "homepage_url": "https://microsoftedge.microsoft.com/addons/detail/affnnhcbfmcbbdlcadgkdbfafigmjdkk", - "version": "6.0.4", + "version": "6.0.5", "description": "Create and update SharePoint Online/SP2013/SP2016/SP2019 css/js files, inject files to web, manage web/list properties, list Webhook", "icons": { "16": "icons/icon16.png", diff --git a/src/pages/scriptlinks/chrome/addandinstallapp.ts b/src/pages/scriptlinks/chrome/addandinstallapp.ts index 8fef921a..54611707 100644 --- a/src/pages/scriptlinks/chrome/addandinstallapp.ts +++ b/src/pages/scriptlinks/chrome/addandinstallapp.ts @@ -88,11 +88,11 @@ export function addAndInstallApp(...args: any) { }) }) } else { - catalog.getAppById(spScriptLinksAppId)().then((spApp: IAppInfo) => { + $pnp.sp.web.getAppCatalog().getAppById(spScriptLinksAppId)().then((spApp: IAppInfo) => { if (spApp.InstalledVersion === '') { - catalog.getAppById(spScriptLinksAppId).install().then(() => postMessage('App Installed succesfully')) + $pnp.sp.web.getAppCatalog().getAppById(spScriptLinksAppId).install().then(() => postMessage('App Installed succesfully')) } else if (spApp.InstalledVersion < spApp.AppCatalogVersion) { - spApp.upgrade().then(() => postMessage(`App upgraded succesfully to version ${spApp.InstalledVersion}`)) + $pnp.sp.web.getAppCatalog().getAppById(spScriptLinksAppId).upgrade().then(() => postMessage(`App upgraded succesfully to version ${spApp.InstalledVersion}`)) } else { postMessage('App already installed to this site') } diff --git a/src/pages/scriptlinks/components/commands.tsx b/src/pages/scriptlinks/components/commands.tsx index f036ca78..73c7830a 100644 --- a/src/pages/scriptlinks/components/commands.tsx +++ b/src/pages/scriptlinks/components/commands.tsx @@ -42,7 +42,7 @@ const ScriptLinkCommands = () => { farItems={[ { key: 'app', - text: 'ScriptLinks App', + text: 'Modern ScriptLinks App', cacheKey: 'myCacheKey', iconProps: { iconName: 'AppIconDefault' }, subMenuProps: {