@planningcenter/url 3.0.0-rc.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/url.js +1 -1
- package/dist/url.js.map +1 -1
- package/dist/url.modern.js +1 -1
- package/dist/url.modern.js.map +1 -1
- package/dist/url.module.js +1 -1
- package/dist/url.module.js.map +1 -1
- package/dist/url.umd.js +1 -1
- package/dist/url.umd.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -114,6 +114,16 @@ pcoApiUrl("people"); // https://{app}.planningcenteronline.com/~api/people/v2
|
|
|
114
114
|
|
|
115
115
|
The `inferEnv` `pcoUrl` and `pcoApiUrl` use is exported, should you need it.
|
|
116
116
|
|
|
117
|
+
## Building and Testing Locally
|
|
118
|
+
|
|
119
|
+
You can use Devbox to test this project locally:
|
|
120
|
+
|
|
121
|
+
```sh
|
|
122
|
+
devbox run setup # installs JavaScript dependencies
|
|
123
|
+
devbox run build # builds the dist folder
|
|
124
|
+
devbox run test # runs the jest tests
|
|
125
|
+
```
|
|
126
|
+
|
|
117
127
|
## Legacy
|
|
118
128
|
|
|
119
129
|
In `@planningcenter/url` versions <= 2.7.2, the default export was a function that took the `env` as an argument and returned a curried function for generating urls. That's still available, but its use is discouraged.
|
package/dist/url.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var n=function(n){return function(t){if(n&&t)switch(n){case"production":return"https://"+t+"."+o();case"staging":return"https://"+t+"-staging."+o();case"development":var i="test";try{i=location.hostname.match(/\pco\.(\w+)$/)[1]}catch(n){"localhost"!==location.hostname&&console.error(location.hostname+" is not a supported dev TLD")}return"
|
|
1
|
+
var n=function(n){return function(t){if(n&&t){var c=function(){return"undefined"!=typeof location&&location&&location.protocol&&"https:"===location.protocol?"https":"http"};switch(n){case"production":return"https://"+t+"."+o();case"staging":return"https://"+t+"-staging."+o();case"development":var i="test";try{i=location.hostname.match(/\pco\.(\w+)$/)[1]}catch(n){"localhost"!==location.hostname&&console.error(location.hostname+" is not a supported dev TLD")}return c()+"://"+t+".pco."+i;case"prototype":return"https://"+e()+"."+t+".planningcenter.ninja";case"test":return c()+"://"+t+".pco.test";default:return"http://"+t+"."+o()}}}},t=function(){var n=window.location.origin;return n.endsWith("-staging.planningcenteronline.com")||n.endsWith("/staging.planningcenteronline.com")||n.endsWith(".staging.churchcenter.com")||n.endsWith("/staging.churchcenter.com")?"staging":n.endsWith(".planningcenteronline.com")||n.endsWith(".churchcenter.com")||n.endsWith("/churchcenter.com")?"production":n.endsWith(".planningcenter.ninja")||n.endsWith(".churchcenter.ninja")?"prototype":n.endsWith("pco.codes")||n.endsWith("pco.dev")||n.endsWith("pco.test")||n.endsWith("churchcenter.test")?"development":"production"},e=function(){var n,t,e=null==(n=location)||null==(t=n.hostname)?void 0:t.match(/(?:www\.)?(.+)\..+\.planningcenter\.ninja/);return e&&"localhost"!==e[1]?e[1]:"main"},o=function(){var n=location.hostname.match(/planningcenter(online)?.com/);return null===n?"planningcenteronline.com":n[0]};exports.default=n,exports.inferEnvironment=t,exports.pcoApiUrl=function(e,o){var c,i,r=void 0===o?{}:o,a=r.env,s=void 0===a?t():a,l=r.squiggly,p=void 0===l||l,h=p?"/~api":"";return h+="/"+e+"/v2",n(s)(p?(void 0===c&&(c=1),(i=window.location.hostname.split(".").slice(0,-1*(1+c)))["prototype"===t()?i.length-1:0].replace(/-staging$/,"")):"api")+h},exports.pcoUrl=function(e,o){var c=(void 0===o?{}:o).env,i=void 0===c?t():c;return n(i)(e)};
|
|
2
2
|
//# sourceMappingURL=url.js.map
|
package/dist/url.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","sources":["../index.ts"],"sourcesContent":["export type Environment =\n | \"production\"\n | \"staging\"\n | \"development\"\n | \"test\"\n | \"prototype\"\n\nexport type Product =\n | \"api\"\n | \"accounts\"\n | \"calendar\"\n | \"check-ins\"\n | \"giving\"\n | \"groups\"\n | \"home\"\n | \"login\"\n | \"people\"\n | \"publishing\"\n | \"registrations\"\n | \"services\"\n\nconst legacy = (env: Environment) => (productName: Product) => {\n if (!(env && productName)) return\n\n switch (env) {\n case \"production\":\n return `https://${productName}.${domain()}`\n case \"staging\":\n return `https://${productName}-staging.${domain()}`\n case \"development\":\n let tld = \"test\"\n\n try {\n tld = location.hostname.match(/\\pco\\.(\\w+)$/)[1]\n } catch (error) {\n // don't show warning in Topbar's local dev env\n if (location.hostname !== \"localhost\") {\n console.error(`${location.hostname} is not a supported dev TLD`)\n }\n }\n\n return
|
|
1
|
+
{"version":3,"file":"url.js","sources":["../index.ts"],"sourcesContent":["export type Environment =\n | \"production\"\n | \"staging\"\n | \"development\"\n | \"test\"\n | \"prototype\"\n\nexport type Product =\n | \"api\"\n | \"accounts\"\n | \"calendar\"\n | \"check-ins\"\n | \"giving\"\n | \"groups\"\n | \"home\"\n | \"login\"\n | \"people\"\n | \"publishing\"\n | \"registrations\"\n | \"services\"\n\nconst legacy = (env: Environment) => (productName: Product) => {\n if (!(env && productName)) return\n\n const getCurrentProtocol = () => {\n if (typeof location !== 'undefined' && location && location.protocol) {\n return location.protocol === 'https:' ? 'https' : 'http'\n }\n return 'http'\n }\n\n switch (env) {\n case \"production\":\n return `https://${productName}.${domain()}`\n case \"staging\":\n return `https://${productName}-staging.${domain()}`\n case \"development\":\n let tld = \"test\"\n\n try {\n tld = location.hostname.match(/\\pco\\.(\\w+)$/)[1]\n } catch (error) {\n // don't show warning in Topbar's local dev env\n if (location.hostname !== \"localhost\") {\n console.error(`${location.hostname} is not a supported dev TLD`)\n }\n }\n\n return `${getCurrentProtocol()}://${productName}.pco.${tld}`\n case \"prototype\":\n return `https://${prototypeEnv()}.${productName}.planningcenter.ninja`\n case \"test\":\n return `${getCurrentProtocol()}://${productName}.pco.test`\n default:\n return `http://${productName}.${domain()}`\n }\n}\n\nexport default legacy\n\nexport function pcoUrl(\n product: Product,\n { env = inferEnvironment() }: { env?: Environment } = {},\n) {\n return legacy(env)(product)\n}\n\nexport function pcoApiUrl(\n product: Product,\n {\n env = inferEnvironment(),\n squiggly = true,\n }: { env?: Environment; squiggly?: boolean } = {},\n) {\n let path = squiggly ? \"/~api\" : \"\"\n path += `/${product}/v2`\n\n return legacy(env)(squiggly ? inferProduct() : \"api\") + path\n}\n\nexport const inferEnvironment = () => {\n const origin = window.location.origin\n\n if (origin.endsWith(\"-staging.planningcenteronline.com\")) return \"staging\"\n if (origin.endsWith(\"/staging.planningcenteronline.com\")) return \"staging\"\n if (origin.endsWith(\".staging.churchcenter.com\")) return \"staging\"\n if (origin.endsWith(\"/staging.churchcenter.com\")) return \"staging\"\n if (origin.endsWith(\".planningcenteronline.com\")) return \"production\"\n if (origin.endsWith(\".churchcenter.com\")) return \"production\"\n if (origin.endsWith(\"/churchcenter.com\")) return \"production\"\n if (origin.endsWith(\".planningcenter.ninja\")) return \"prototype\"\n if (origin.endsWith(\".churchcenter.ninja\")) return \"prototype\"\n if (origin.endsWith(\"pco.codes\")) return \"development\"\n if (origin.endsWith(\"pco.dev\")) return \"development\"\n if (origin.endsWith(\"pco.test\")) return \"development\"\n if (origin.endsWith(\"churchcenter.test\")) return \"development\"\n\n return \"production\"\n}\n/**\n * If the hostname is a Protonova URL, get the env from the subdomain. Defaults to main.\n * Example: my-cool-change.accounts.planningcenter.ninja -> my-cool-change\n * @returns {string}\n */\nconst prototypeEnv = () => {\n const result = location?.hostname?.match(\n /(?:www\\.)?(.+)\\..+\\.planningcenter\\.ninja/,\n )\n\n if (result && result[1] !== \"localhost\") {\n return result[1]\n }\n\n return \"main\"\n}\n\nconst domain = () => {\n const result = location.hostname.match(/planningcenter(online)?.com/)\n\n if (result === null) {\n return \"planningcenteronline.com\"\n } else {\n return result[0]\n }\n}\n\nconst extractSubdomainsFrom = (host, tldLength = 1) => {\n return host.split(\".\").slice(0, (1 + tldLength) * -1)\n}\n\nconst inferProduct = () => {\n const subdomains = extractSubdomainsFrom(window.location.hostname)\n\n return subdomains[\n inferEnvironment() === \"prototype\" ? subdomains.length - 1 : 0\n ].replace(/-staging$/, \"\")\n}\n"],"names":["legacy","env","productName","getCurrentProtocol","location","protocol","domain","tld","hostname","match","error","console","prototypeEnv","inferEnvironment","origin","window","endsWith","_location","_location$hostname","result","product","_temp2","tldLength","subdomains","_ref2","_ref2$env","squiggly","_ref2$squiggly","path","split","slice","length","replace","pcoUrl","_temp","_ref$env"],"mappings":"AAqBMA,IAAAA,EAAS,SAACC,GAAD,OAAuBC,SAAAA,GACpC,GAAMD,GAAOC,EAAb,CAEA,IAAMC,EAAqB,WACzB,MAAwB,oBAAbC,UAA4BA,UAAYA,SAASC,UAC7B,WAAtBD,SAASC,SAAwB,QAEnC,MACR,EAED,OAAQJ,GACN,IAAK,aACH,MAAA,WAAkBC,EAAlB,IAAiCI,IACnC,IAAK,UACH,MAAA,WAAkBJ,EAAlB,YAAyCI,IAC3C,IAAK,cACH,IAAIC,EAAM,OAEV,IACEA,EAAMH,SAASI,SAASC,MAAM,gBAAgB,EAM/C,CALC,MAAOC,GAEmB,cAAtBN,SAASI,UACXG,QAAQD,MAASN,SAASI,uCAE7B,CAED,OAAUL,IAA0BD,MAAAA,UAAmBK,EACzD,IAAK,YACH,MAAkBK,WAAAA,IAAlB,IAAoCV,EACtC,wBAAA,IAAK,OACH,OAAUC,UAA0BD,EAApC,YACF,QACE,MAAA,UAAiBA,EAAjB,IAAgCI,IAhCT,CAkC5B,CAnCc,EA2DFO,EAAmB,WAC9B,IAAMC,EAASC,OAAOX,SAASU,OAE/B,OAAIA,EAAOE,SAAS,sCAChBF,EAAOE,SAAS,sCAChBF,EAAOE,SAAS,8BAChBF,EAAOE,SAAS,6BAH6C,UAI7DF,EAAOE,SAAS,8BAChBF,EAAOE,SAAS,sBAChBF,EAAOE,SAAS,qBAFqC,aAGrDF,EAAOE,SAAS,0BAChBF,EAAOE,SAAS,uBADiC,YAEjDF,EAAOE,SAAS,cAChBF,EAAOE,SAAS,YAChBF,EAAOE,SAAS,aAChBF,EAAOE,SAAS,qBAHqB,cAKlC,YACR,EAMKJ,EAAe,WAAK,IAAAK,EAAAC,EAClBC,EAAS,OAAHF,EAAGb,WAAH,OAAGc,EAAAD,EAAUT,eAAV,EAAAU,EAAoBT,MACjC,6CAGF,OAAIU,GAAwB,cAAdA,EAAO,GACZA,EAAO,GAGT,MACR,EAEKb,EAAS,WACb,IAAMa,EAASf,SAASI,SAASC,MAAM,+BAEvC,OAAe,OAAXU,EACK,2BAEAA,EAAO,EAEjB,0EAxDCC,EAIiDC,GAAA,IAsDdC,EAK7BC,EA3D2CC,OAAA,IAAAH,EAAF,CAAA,EAAEA,EAAAI,EAAAD,EAF/CvB,IAAAA,OAAMY,IAAAA,EAAAA,IACNa,EAAAA,EAAAA,EAAAA,SAAAA,cAC+CC,EAE7CC,EAAOF,EAAW,QAAU,GAGhC,OAFAE,GAAYR,IAAAA,EAAZ,MAEOpB,EAAOC,EAAPD,CAAY0B,QAiDgBJ,IAAAA,IAAAA,EAAY,IAKzCC,EAAmCR,OAAOX,SAASI,SAJ7CqB,MAAM,KAAKC,MAAM,GAAsB,GAAlB,EAAIR,KAOZ,cAAvBT,IAAqCU,EAAWQ,OAAS,EAAI,GAC7DC,QAAQ,YAAa,KA1DwB,OAASJ,CACzD,iBAlBeK,SACdb,EACwDc,GAAA,IAAAC,QAAA,IAAAD,EAAF,GAAEA,GAAtDjC,IAAAA,OAAMY,IAAAA,EAAAA,IAAgDsB,EAExD,OAAOnC,EAAOC,EAAPD,CAAYoB,EACpB"}
|
package/dist/url.modern.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const n=n=>t=>{if(n
|
|
1
|
+
const n=n=>t=>{if(!n||!t)return;const e=()=>"undefined"!=typeof location&&location&&location.protocol&&"https:"===location.protocol?"https":"http";switch(n){case"production":return`https://${t}.${i()}`;case"staging":return`https://${t}-staging.${i()}`;case"development":let n="test";try{n=location.hostname.match(/\pco\.(\w+)$/)[1]}catch(n){"localhost"!==location.hostname&&console.error(`${location.hostname} is not a supported dev TLD`)}return`${e()}://${t}.pco.${n}`;case"prototype":return`https://${c()}.${t}.planningcenter.ninja`;case"test":return`${e()}://${t}.pco.test`;default:return`http://${t}.${i()}`}};function t(t,{env:e=o()}={}){return n(e)(t)}function e(t,{env:e=o(),squiggly:c=!0}={}){let i=c?"/~api":"";return i+=`/${t}/v2`,n(e)(c?r():"api")+i}const o=()=>{const n=window.location.origin;return n.endsWith("-staging.planningcenteronline.com")||n.endsWith("/staging.planningcenteronline.com")||n.endsWith(".staging.churchcenter.com")||n.endsWith("/staging.churchcenter.com")?"staging":n.endsWith(".planningcenteronline.com")||n.endsWith(".churchcenter.com")||n.endsWith("/churchcenter.com")?"production":n.endsWith(".planningcenter.ninja")||n.endsWith(".churchcenter.ninja")?"prototype":n.endsWith("pco.codes")||n.endsWith("pco.dev")||n.endsWith("pco.test")||n.endsWith("churchcenter.test")?"development":"production"},c=()=>{var n,t;const e=null==(n=location)||null==(t=n.hostname)?void 0:t.match(/(?:www\.)?(.+)\..+\.planningcenter\.ninja/);return e&&"localhost"!==e[1]?e[1]:"main"},i=()=>{const n=location.hostname.match(/planningcenter(online)?.com/);return null===n?"planningcenteronline.com":n[0]},r=()=>{const n=((n,t=1)=>window.location.hostname.split(".").slice(0,-1*(1+t)))();return n["prototype"===o()?n.length-1:0].replace(/-staging$/,"")};export{n as default,o as inferEnvironment,e as pcoApiUrl,t as pcoUrl};
|
|
2
2
|
//# sourceMappingURL=url.modern.js.map
|
package/dist/url.modern.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.modern.js","sources":["../index.ts"],"sourcesContent":["export type Environment =\n | \"production\"\n | \"staging\"\n | \"development\"\n | \"test\"\n | \"prototype\"\n\nexport type Product =\n | \"api\"\n | \"accounts\"\n | \"calendar\"\n | \"check-ins\"\n | \"giving\"\n | \"groups\"\n | \"home\"\n | \"login\"\n | \"people\"\n | \"publishing\"\n | \"registrations\"\n | \"services\"\n\nconst legacy = (env: Environment) => (productName: Product) => {\n if (!(env && productName)) return\n\n switch (env) {\n case \"production\":\n return `https://${productName}.${domain()}`\n case \"staging\":\n return `https://${productName}-staging.${domain()}`\n case \"development\":\n let tld = \"test\"\n\n try {\n tld = location.hostname.match(/\\pco\\.(\\w+)$/)[1]\n } catch (error) {\n // don't show warning in Topbar's local dev env\n if (location.hostname !== \"localhost\") {\n console.error(`${location.hostname} is not a supported dev TLD`)\n }\n }\n\n return
|
|
1
|
+
{"version":3,"file":"url.modern.js","sources":["../index.ts"],"sourcesContent":["export type Environment =\n | \"production\"\n | \"staging\"\n | \"development\"\n | \"test\"\n | \"prototype\"\n\nexport type Product =\n | \"api\"\n | \"accounts\"\n | \"calendar\"\n | \"check-ins\"\n | \"giving\"\n | \"groups\"\n | \"home\"\n | \"login\"\n | \"people\"\n | \"publishing\"\n | \"registrations\"\n | \"services\"\n\nconst legacy = (env: Environment) => (productName: Product) => {\n if (!(env && productName)) return\n\n const getCurrentProtocol = () => {\n if (typeof location !== 'undefined' && location && location.protocol) {\n return location.protocol === 'https:' ? 'https' : 'http'\n }\n return 'http'\n }\n\n switch (env) {\n case \"production\":\n return `https://${productName}.${domain()}`\n case \"staging\":\n return `https://${productName}-staging.${domain()}`\n case \"development\":\n let tld = \"test\"\n\n try {\n tld = location.hostname.match(/\\pco\\.(\\w+)$/)[1]\n } catch (error) {\n // don't show warning in Topbar's local dev env\n if (location.hostname !== \"localhost\") {\n console.error(`${location.hostname} is not a supported dev TLD`)\n }\n }\n\n return `${getCurrentProtocol()}://${productName}.pco.${tld}`\n case \"prototype\":\n return `https://${prototypeEnv()}.${productName}.planningcenter.ninja`\n case \"test\":\n return `${getCurrentProtocol()}://${productName}.pco.test`\n default:\n return `http://${productName}.${domain()}`\n }\n}\n\nexport default legacy\n\nexport function pcoUrl(\n product: Product,\n { env = inferEnvironment() }: { env?: Environment } = {},\n) {\n return legacy(env)(product)\n}\n\nexport function pcoApiUrl(\n product: Product,\n {\n env = inferEnvironment(),\n squiggly = true,\n }: { env?: Environment; squiggly?: boolean } = {},\n) {\n let path = squiggly ? \"/~api\" : \"\"\n path += `/${product}/v2`\n\n return legacy(env)(squiggly ? inferProduct() : \"api\") + path\n}\n\nexport const inferEnvironment = () => {\n const origin = window.location.origin\n\n if (origin.endsWith(\"-staging.planningcenteronline.com\")) return \"staging\"\n if (origin.endsWith(\"/staging.planningcenteronline.com\")) return \"staging\"\n if (origin.endsWith(\".staging.churchcenter.com\")) return \"staging\"\n if (origin.endsWith(\"/staging.churchcenter.com\")) return \"staging\"\n if (origin.endsWith(\".planningcenteronline.com\")) return \"production\"\n if (origin.endsWith(\".churchcenter.com\")) return \"production\"\n if (origin.endsWith(\"/churchcenter.com\")) return \"production\"\n if (origin.endsWith(\".planningcenter.ninja\")) return \"prototype\"\n if (origin.endsWith(\".churchcenter.ninja\")) return \"prototype\"\n if (origin.endsWith(\"pco.codes\")) return \"development\"\n if (origin.endsWith(\"pco.dev\")) return \"development\"\n if (origin.endsWith(\"pco.test\")) return \"development\"\n if (origin.endsWith(\"churchcenter.test\")) return \"development\"\n\n return \"production\"\n}\n/**\n * If the hostname is a Protonova URL, get the env from the subdomain. Defaults to main.\n * Example: my-cool-change.accounts.planningcenter.ninja -> my-cool-change\n * @returns {string}\n */\nconst prototypeEnv = () => {\n const result = location?.hostname?.match(\n /(?:www\\.)?(.+)\\..+\\.planningcenter\\.ninja/,\n )\n\n if (result && result[1] !== \"localhost\") {\n return result[1]\n }\n\n return \"main\"\n}\n\nconst domain = () => {\n const result = location.hostname.match(/planningcenter(online)?.com/)\n\n if (result === null) {\n return \"planningcenteronline.com\"\n } else {\n return result[0]\n }\n}\n\nconst extractSubdomainsFrom = (host, tldLength = 1) => {\n return host.split(\".\").slice(0, (1 + tldLength) * -1)\n}\n\nconst inferProduct = () => {\n const subdomains = extractSubdomainsFrom(window.location.hostname)\n\n return subdomains[\n inferEnvironment() === \"prototype\" ? subdomains.length - 1 : 0\n ].replace(/-staging$/, \"\")\n}\n"],"names":["legacy","env","productName","getCurrentProtocol","location","protocol","domain","tld","hostname","match","error","console","prototypeEnv","pcoUrl","product","inferEnvironment","pcoApiUrl","squiggly","path","inferProduct","origin","window","endsWith","_location","_location$hostname","result","subdomains","host","tldLength","split","slice","extractSubdomainsFrom","length","replace"],"mappings":"AAqBMA,MAAAA,EAAUC,GAAsBC,IACpC,IAAMD,IAAOC,EAAc,OAE3B,MAAMC,EAAqB,IACD,oBAAbC,UAA4BA,UAAYA,SAASC,UAC7B,WAAtBD,SAASC,SAAwB,QAEnC,OAGT,OAAQJ,GACN,IAAK,aACH,iBAAkBC,KAAeI,MACnC,IAAK,UACH,iBAAkBJ,aAAuBI,MAC3C,IAAK,cACH,IAAIC,EAAM,OAEV,IACEA,EAAMH,SAASI,SAASC,MAAM,gBAAgB,EAM/C,CALC,MAAOC,GAEmB,cAAtBN,SAASI,UACXG,QAAQD,MAAM,GAAGN,SAASI,sCAE7B,CAED,MAAO,GAAGL,SAA0BD,SAAmBK,IACzD,IAAK,YACH,iBAAkBK,OAAkBV,yBACtC,IAAK,OACH,SAAUC,SAA0BD,aACtC,QACE,gBAAiBA,KAAeI,MAvBpC,EA6BI,SAAUO,EACdC,GACAb,IAAEA,EAAMc,KAA8C,CAAA,GAEtD,OAAOf,EAAOC,EAAPD,CAAYc,EACpB,CAEeE,SAAAA,EACdF,GACAb,IACEA,EAAMc,IADRE,SAEEA,GAAW,GACkC,CALjC,GAOd,IAAIC,EAAOD,EAAW,QAAU,GAGhC,OAFAC,GAAQ,IAAIJ,OAELd,EAAOC,EAAPD,CAAYiB,EAAWE,IAAiB,OAASD,CACzD,CAEYH,MAAAA,EAAmB,KAC9B,MAAMK,EAASC,OAAOjB,SAASgB,OAE/B,OAAIA,EAAOE,SAAS,sCAChBF,EAAOE,SAAS,sCAChBF,EAAOE,SAAS,8BAChBF,EAAOE,SAAS,6BAH6C,UAI7DF,EAAOE,SAAS,8BAChBF,EAAOE,SAAS,sBAChBF,EAAOE,SAAS,qBAFqC,aAGrDF,EAAOE,SAAS,0BAChBF,EAAOE,SAAS,uBADiC,YAEjDF,EAAOE,SAAS,cAChBF,EAAOE,SAAS,YAChBF,EAAOE,SAAS,aAChBF,EAAOE,SAAS,qBAHqB,cAKlC,cAOHV,EAAe,KAAK,IAAAW,EAAAC,EACxB,MAAMC,EAAM,OAAAF,EAAGnB,WAAH,OAAAoB,EAAGD,EAAUf,eAAb,EAAGgB,EAAoBf,MACjC,6CAGF,OAAIgB,GAAwB,cAAdA,EAAO,GACZA,EAAO,GAGT,QAGHnB,EAAS,KACb,MAAMmB,EAASrB,SAASI,SAASC,MAAM,+BAEvC,OAAe,OAAXgB,EACK,2BAEAA,EAAO,EACf,EAOGN,EAAe,KACnB,MAAMO,EALsB,EAACC,EAAMC,EAAY,IAKNP,OAAOjB,SAASI,SAJ7CqB,MAAM,KAAKC,MAAM,GAAsB,GAAlB,EAAIF,IAIlBG,GAEnB,OAAOL,EACkB,cAAvBX,IAAqCW,EAAWM,OAAS,EAAI,GAC7DC,QAAQ,YAAa,GAFhB"}
|
package/dist/url.module.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var n=function(n){return function(t){if(n&&t)switch(n){case"production":return"https://"+t+"."+i();case"staging":return"https://"+t+"-staging."+i();case"development":var
|
|
1
|
+
var n=function(n){return function(t){if(n&&t){var e=function(){return"undefined"!=typeof location&&location&&location.protocol&&"https:"===location.protocol?"https":"http"};switch(n){case"production":return"https://"+t+"."+i();case"staging":return"https://"+t+"-staging."+i();case"development":var o="test";try{o=location.hostname.match(/\pco\.(\w+)$/)[1]}catch(n){"localhost"!==location.hostname&&console.error(location.hostname+" is not a supported dev TLD")}return e()+"://"+t+".pco."+o;case"prototype":return"https://"+c()+"."+t+".planningcenter.ninja";case"test":return e()+"://"+t+".pco.test";default:return"http://"+t+"."+i()}}}};function t(t,e){var c=(void 0===e?{}:e).env,i=void 0===c?o():c;return n(i)(t)}function e(t,e){var c=void 0===e?{}:e,i=c.env,a=void 0===i?o():i,s=c.squiggly,h=void 0===s||s,l=h?"/~api":"";return l+="/"+t+"/v2",n(a)(h?r():"api")+l}var o=function(){var n=window.location.origin;return n.endsWith("-staging.planningcenteronline.com")||n.endsWith("/staging.planningcenteronline.com")||n.endsWith(".staging.churchcenter.com")||n.endsWith("/staging.churchcenter.com")?"staging":n.endsWith(".planningcenteronline.com")||n.endsWith(".churchcenter.com")||n.endsWith("/churchcenter.com")?"production":n.endsWith(".planningcenter.ninja")||n.endsWith(".churchcenter.ninja")?"prototype":n.endsWith("pco.codes")||n.endsWith("pco.dev")||n.endsWith("pco.test")||n.endsWith("churchcenter.test")?"development":"production"},c=function(){var n,t,e=null==(n=location)||null==(t=n.hostname)?void 0:t.match(/(?:www\.)?(.+)\..+\.planningcenter\.ninja/);return e&&"localhost"!==e[1]?e[1]:"main"},i=function(){var n=location.hostname.match(/planningcenter(online)?.com/);return null===n?"planningcenteronline.com":n[0]},r=function(){var n,t=(void 0===n&&(n=1),window.location.hostname.split(".").slice(0,-1*(1+n)));return t["prototype"===o()?t.length-1:0].replace(/-staging$/,"")};export{n as default,o as inferEnvironment,e as pcoApiUrl,t as pcoUrl};
|
|
2
2
|
//# sourceMappingURL=url.module.js.map
|
package/dist/url.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.module.js","sources":["../index.ts"],"sourcesContent":["export type Environment =\n | \"production\"\n | \"staging\"\n | \"development\"\n | \"test\"\n | \"prototype\"\n\nexport type Product =\n | \"api\"\n | \"accounts\"\n | \"calendar\"\n | \"check-ins\"\n | \"giving\"\n | \"groups\"\n | \"home\"\n | \"login\"\n | \"people\"\n | \"publishing\"\n | \"registrations\"\n | \"services\"\n\nconst legacy = (env: Environment) => (productName: Product) => {\n if (!(env && productName)) return\n\n switch (env) {\n case \"production\":\n return `https://${productName}.${domain()}`\n case \"staging\":\n return `https://${productName}-staging.${domain()}`\n case \"development\":\n let tld = \"test\"\n\n try {\n tld = location.hostname.match(/\\pco\\.(\\w+)$/)[1]\n } catch (error) {\n // don't show warning in Topbar's local dev env\n if (location.hostname !== \"localhost\") {\n console.error(`${location.hostname} is not a supported dev TLD`)\n }\n }\n\n return
|
|
1
|
+
{"version":3,"file":"url.module.js","sources":["../index.ts"],"sourcesContent":["export type Environment =\n | \"production\"\n | \"staging\"\n | \"development\"\n | \"test\"\n | \"prototype\"\n\nexport type Product =\n | \"api\"\n | \"accounts\"\n | \"calendar\"\n | \"check-ins\"\n | \"giving\"\n | \"groups\"\n | \"home\"\n | \"login\"\n | \"people\"\n | \"publishing\"\n | \"registrations\"\n | \"services\"\n\nconst legacy = (env: Environment) => (productName: Product) => {\n if (!(env && productName)) return\n\n const getCurrentProtocol = () => {\n if (typeof location !== 'undefined' && location && location.protocol) {\n return location.protocol === 'https:' ? 'https' : 'http'\n }\n return 'http'\n }\n\n switch (env) {\n case \"production\":\n return `https://${productName}.${domain()}`\n case \"staging\":\n return `https://${productName}-staging.${domain()}`\n case \"development\":\n let tld = \"test\"\n\n try {\n tld = location.hostname.match(/\\pco\\.(\\w+)$/)[1]\n } catch (error) {\n // don't show warning in Topbar's local dev env\n if (location.hostname !== \"localhost\") {\n console.error(`${location.hostname} is not a supported dev TLD`)\n }\n }\n\n return `${getCurrentProtocol()}://${productName}.pco.${tld}`\n case \"prototype\":\n return `https://${prototypeEnv()}.${productName}.planningcenter.ninja`\n case \"test\":\n return `${getCurrentProtocol()}://${productName}.pco.test`\n default:\n return `http://${productName}.${domain()}`\n }\n}\n\nexport default legacy\n\nexport function pcoUrl(\n product: Product,\n { env = inferEnvironment() }: { env?: Environment } = {},\n) {\n return legacy(env)(product)\n}\n\nexport function pcoApiUrl(\n product: Product,\n {\n env = inferEnvironment(),\n squiggly = true,\n }: { env?: Environment; squiggly?: boolean } = {},\n) {\n let path = squiggly ? \"/~api\" : \"\"\n path += `/${product}/v2`\n\n return legacy(env)(squiggly ? inferProduct() : \"api\") + path\n}\n\nexport const inferEnvironment = () => {\n const origin = window.location.origin\n\n if (origin.endsWith(\"-staging.planningcenteronline.com\")) return \"staging\"\n if (origin.endsWith(\"/staging.planningcenteronline.com\")) return \"staging\"\n if (origin.endsWith(\".staging.churchcenter.com\")) return \"staging\"\n if (origin.endsWith(\"/staging.churchcenter.com\")) return \"staging\"\n if (origin.endsWith(\".planningcenteronline.com\")) return \"production\"\n if (origin.endsWith(\".churchcenter.com\")) return \"production\"\n if (origin.endsWith(\"/churchcenter.com\")) return \"production\"\n if (origin.endsWith(\".planningcenter.ninja\")) return \"prototype\"\n if (origin.endsWith(\".churchcenter.ninja\")) return \"prototype\"\n if (origin.endsWith(\"pco.codes\")) return \"development\"\n if (origin.endsWith(\"pco.dev\")) return \"development\"\n if (origin.endsWith(\"pco.test\")) return \"development\"\n if (origin.endsWith(\"churchcenter.test\")) return \"development\"\n\n return \"production\"\n}\n/**\n * If the hostname is a Protonova URL, get the env from the subdomain. Defaults to main.\n * Example: my-cool-change.accounts.planningcenter.ninja -> my-cool-change\n * @returns {string}\n */\nconst prototypeEnv = () => {\n const result = location?.hostname?.match(\n /(?:www\\.)?(.+)\\..+\\.planningcenter\\.ninja/,\n )\n\n if (result && result[1] !== \"localhost\") {\n return result[1]\n }\n\n return \"main\"\n}\n\nconst domain = () => {\n const result = location.hostname.match(/planningcenter(online)?.com/)\n\n if (result === null) {\n return \"planningcenteronline.com\"\n } else {\n return result[0]\n }\n}\n\nconst extractSubdomainsFrom = (host, tldLength = 1) => {\n return host.split(\".\").slice(0, (1 + tldLength) * -1)\n}\n\nconst inferProduct = () => {\n const subdomains = extractSubdomainsFrom(window.location.hostname)\n\n return subdomains[\n inferEnvironment() === \"prototype\" ? subdomains.length - 1 : 0\n ].replace(/-staging$/, \"\")\n}\n"],"names":["legacy","env","productName","getCurrentProtocol","location","protocol","domain","tld","hostname","match","error","console","prototypeEnv","pcoUrl","product","_temp","_ref$env","inferEnvironment","pcoApiUrl","_temp2","_ref2","_ref2$env","squiggly","_ref2$squiggly","path","inferProduct","origin","window","endsWith","_location","_location$hostname","result","tldLength","subdomains","split","slice","length","replace"],"mappings":"AAqBMA,IAAAA,EAAS,SAACC,GAAD,OAAuBC,SAAAA,GACpC,GAAMD,GAAOC,EAAb,CAEA,IAAMC,EAAqB,WACzB,MAAwB,oBAAbC,UAA4BA,UAAYA,SAASC,UAC7B,WAAtBD,SAASC,SAAwB,QAEnC,MACR,EAED,OAAQJ,GACN,IAAK,aACH,MAAA,WAAkBC,EAAlB,IAAiCI,IACnC,IAAK,UACH,MAAA,WAAkBJ,EAAlB,YAAyCI,IAC3C,IAAK,cACH,IAAIC,EAAM,OAEV,IACEA,EAAMH,SAASI,SAASC,MAAM,gBAAgB,EAM/C,CALC,MAAOC,GAEmB,cAAtBN,SAASI,UACXG,QAAQD,MAASN,SAASI,uCAE7B,CAED,OAAUL,IAA0BD,MAAAA,UAAmBK,EACzD,IAAK,YACH,MAAkBK,WAAAA,IAAlB,IAAoCV,EACtC,wBAAA,IAAK,OACH,OAAUC,UAA0BD,EAApC,YACF,QACE,MAAA,UAAiBA,EAAjB,IAAgCI,IAhCT,CAkC5B,CAnCc,EAuCCO,SAAAA,EACdC,EACwDC,GAAA,IAAAC,QAAA,IAAAD,EAAF,GAAEA,GAAtDd,IAAAA,OAAMgB,IAAAA,EAAAA,IAAgDD,EAExD,OAAOhB,EAAOC,EAAPD,CAAYc,EACpB,UAEeI,EACdJ,EAIiDK,GAAA,IAAAC,OAAA,IAAAD,EAAF,CAAA,EAAEA,EAAAE,EAAAD,EAF/CnB,IAAAA,OAAMgB,IAAAA,EAAAA,IACNK,EAAAA,EAAAA,EAAAA,SAAAA,cAC+CC,EAE7CC,EAAOF,EAAW,QAAU,GAGhC,OAFAE,GAAYV,IAAAA,EAAZ,MAEOd,EAAOC,EAAPD,CAAYsB,EAAWG,IAAiB,OAASD,CACzD,CAEYP,IAAAA,EAAmB,WAC9B,IAAMS,EAASC,OAAOvB,SAASsB,OAE/B,OAAIA,EAAOE,SAAS,sCAChBF,EAAOE,SAAS,sCAChBF,EAAOE,SAAS,8BAChBF,EAAOE,SAAS,6BAH6C,UAI7DF,EAAOE,SAAS,8BAChBF,EAAOE,SAAS,sBAChBF,EAAOE,SAAS,qBAFqC,aAGrDF,EAAOE,SAAS,0BAChBF,EAAOE,SAAS,uBADiC,YAEjDF,EAAOE,SAAS,cAChBF,EAAOE,SAAS,YAChBF,EAAOE,SAAS,aAChBF,EAAOE,SAAS,qBAHqB,cAKlC,YACR,EAMKhB,EAAe,WAAK,IAAAiB,EAAAC,EAClBC,EAAS,OAAHF,EAAGzB,WAAH,OAAG0B,EAAAD,EAAUrB,eAAV,EAAAsB,EAAoBrB,MACjC,6CAGF,OAAIsB,GAAwB,cAAdA,EAAO,GACZA,EAAO,GAGT,MACR,EAEKzB,EAAS,WACb,IAAMyB,EAAS3B,SAASI,SAASC,MAAM,+BAEvC,OAAe,OAAXsB,EACK,2BAEAA,EAAO,EAEjB,EAMKN,EAAe,WACnB,IALmCO,EAK7BC,QAL6BD,IAAAA,IAAAA,EAAY,GAKNL,OAAOvB,SAASI,SAJ7C0B,MAAM,KAAKC,MAAM,GAAsB,GAAlB,EAAIH,KAMrC,OAAOC,EACkB,cAAvBhB,IAAqCgB,EAAWG,OAAS,EAAI,GAC7DC,QAAQ,YAAa,GACxB"}
|
package/dist/url.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((n||self).PLANNINGCENTER=n.PLANNINGCENTER||{},n.PLANNINGCENTER.url={}))}(this,function(n){var t=function(n){return function(t){if(n&&t)switch(n){case"production":return"https://"+t+"."+i();case"staging":return"https://"+t+"-staging."+i();case"development":var
|
|
1
|
+
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((n||self).PLANNINGCENTER=n.PLANNINGCENTER||{},n.PLANNINGCENTER.url={}))}(this,function(n){var t=function(n){return function(t){if(n&&t){var e=function(){return"undefined"!=typeof location&&location&&location.protocol&&"https:"===location.protocol?"https":"http"};switch(n){case"production":return"https://"+t+"."+i();case"staging":return"https://"+t+"-staging."+i();case"development":var c="test";try{c=location.hostname.match(/\pco\.(\w+)$/)[1]}catch(n){"localhost"!==location.hostname&&console.error(location.hostname+" is not a supported dev TLD")}return e()+"://"+t+".pco."+c;case"prototype":return"https://"+o()+"."+t+".planningcenter.ninja";case"test":return e()+"://"+t+".pco.test";default:return"http://"+t+"."+i()}}}},e=function(){var n=window.location.origin;return n.endsWith("-staging.planningcenteronline.com")||n.endsWith("/staging.planningcenteronline.com")||n.endsWith(".staging.churchcenter.com")||n.endsWith("/staging.churchcenter.com")?"staging":n.endsWith(".planningcenteronline.com")||n.endsWith(".churchcenter.com")||n.endsWith("/churchcenter.com")?"production":n.endsWith(".planningcenter.ninja")||n.endsWith(".churchcenter.ninja")?"prototype":n.endsWith("pco.codes")||n.endsWith("pco.dev")||n.endsWith("pco.test")||n.endsWith("churchcenter.test")?"development":"production"},o=function(){var n,t,e=null==(n=location)||null==(t=n.hostname)?void 0:t.match(/(?:www\.)?(.+)\..+\.planningcenter\.ninja/);return e&&"localhost"!==e[1]?e[1]:"main"},i=function(){var n=location.hostname.match(/planningcenter(online)?.com/);return null===n?"planningcenteronline.com":n[0]};n.default=t,n.inferEnvironment=e,n.pcoApiUrl=function(n,o){var i,c,r=void 0===o?{}:o,a=r.env,s=void 0===a?e():a,l=r.squiggly,p=void 0===l||l,h=p?"/~api":"";return h+="/"+n+"/v2",t(s)(p?(void 0===i&&(i=1),(c=window.location.hostname.split(".").slice(0,-1*(1+i)))["prototype"===e()?c.length-1:0].replace(/-staging$/,"")):"api")+h},n.pcoUrl=function(n,o){var i=(void 0===o?{}:o).env,c=void 0===i?e():i;return t(c)(n)}});
|
|
2
2
|
//# sourceMappingURL=url.umd.js.map
|
package/dist/url.umd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.umd.js","sources":["../index.ts"],"sourcesContent":["export type Environment =\n | \"production\"\n | \"staging\"\n | \"development\"\n | \"test\"\n | \"prototype\"\n\nexport type Product =\n | \"api\"\n | \"accounts\"\n | \"calendar\"\n | \"check-ins\"\n | \"giving\"\n | \"groups\"\n | \"home\"\n | \"login\"\n | \"people\"\n | \"publishing\"\n | \"registrations\"\n | \"services\"\n\nconst legacy = (env: Environment) => (productName: Product) => {\n if (!(env && productName)) return\n\n switch (env) {\n case \"production\":\n return `https://${productName}.${domain()}`\n case \"staging\":\n return `https://${productName}-staging.${domain()}`\n case \"development\":\n let tld = \"test\"\n\n try {\n tld = location.hostname.match(/\\pco\\.(\\w+)$/)[1]\n } catch (error) {\n // don't show warning in Topbar's local dev env\n if (location.hostname !== \"localhost\") {\n console.error(`${location.hostname} is not a supported dev TLD`)\n }\n }\n\n return
|
|
1
|
+
{"version":3,"file":"url.umd.js","sources":["../index.ts"],"sourcesContent":["export type Environment =\n | \"production\"\n | \"staging\"\n | \"development\"\n | \"test\"\n | \"prototype\"\n\nexport type Product =\n | \"api\"\n | \"accounts\"\n | \"calendar\"\n | \"check-ins\"\n | \"giving\"\n | \"groups\"\n | \"home\"\n | \"login\"\n | \"people\"\n | \"publishing\"\n | \"registrations\"\n | \"services\"\n\nconst legacy = (env: Environment) => (productName: Product) => {\n if (!(env && productName)) return\n\n const getCurrentProtocol = () => {\n if (typeof location !== 'undefined' && location && location.protocol) {\n return location.protocol === 'https:' ? 'https' : 'http'\n }\n return 'http'\n }\n\n switch (env) {\n case \"production\":\n return `https://${productName}.${domain()}`\n case \"staging\":\n return `https://${productName}-staging.${domain()}`\n case \"development\":\n let tld = \"test\"\n\n try {\n tld = location.hostname.match(/\\pco\\.(\\w+)$/)[1]\n } catch (error) {\n // don't show warning in Topbar's local dev env\n if (location.hostname !== \"localhost\") {\n console.error(`${location.hostname} is not a supported dev TLD`)\n }\n }\n\n return `${getCurrentProtocol()}://${productName}.pco.${tld}`\n case \"prototype\":\n return `https://${prototypeEnv()}.${productName}.planningcenter.ninja`\n case \"test\":\n return `${getCurrentProtocol()}://${productName}.pco.test`\n default:\n return `http://${productName}.${domain()}`\n }\n}\n\nexport default legacy\n\nexport function pcoUrl(\n product: Product,\n { env = inferEnvironment() }: { env?: Environment } = {},\n) {\n return legacy(env)(product)\n}\n\nexport function pcoApiUrl(\n product: Product,\n {\n env = inferEnvironment(),\n squiggly = true,\n }: { env?: Environment; squiggly?: boolean } = {},\n) {\n let path = squiggly ? \"/~api\" : \"\"\n path += `/${product}/v2`\n\n return legacy(env)(squiggly ? inferProduct() : \"api\") + path\n}\n\nexport const inferEnvironment = () => {\n const origin = window.location.origin\n\n if (origin.endsWith(\"-staging.planningcenteronline.com\")) return \"staging\"\n if (origin.endsWith(\"/staging.planningcenteronline.com\")) return \"staging\"\n if (origin.endsWith(\".staging.churchcenter.com\")) return \"staging\"\n if (origin.endsWith(\"/staging.churchcenter.com\")) return \"staging\"\n if (origin.endsWith(\".planningcenteronline.com\")) return \"production\"\n if (origin.endsWith(\".churchcenter.com\")) return \"production\"\n if (origin.endsWith(\"/churchcenter.com\")) return \"production\"\n if (origin.endsWith(\".planningcenter.ninja\")) return \"prototype\"\n if (origin.endsWith(\".churchcenter.ninja\")) return \"prototype\"\n if (origin.endsWith(\"pco.codes\")) return \"development\"\n if (origin.endsWith(\"pco.dev\")) return \"development\"\n if (origin.endsWith(\"pco.test\")) return \"development\"\n if (origin.endsWith(\"churchcenter.test\")) return \"development\"\n\n return \"production\"\n}\n/**\n * If the hostname is a Protonova URL, get the env from the subdomain. Defaults to main.\n * Example: my-cool-change.accounts.planningcenter.ninja -> my-cool-change\n * @returns {string}\n */\nconst prototypeEnv = () => {\n const result = location?.hostname?.match(\n /(?:www\\.)?(.+)\\..+\\.planningcenter\\.ninja/,\n )\n\n if (result && result[1] !== \"localhost\") {\n return result[1]\n }\n\n return \"main\"\n}\n\nconst domain = () => {\n const result = location.hostname.match(/planningcenter(online)?.com/)\n\n if (result === null) {\n return \"planningcenteronline.com\"\n } else {\n return result[0]\n }\n}\n\nconst extractSubdomainsFrom = (host, tldLength = 1) => {\n return host.split(\".\").slice(0, (1 + tldLength) * -1)\n}\n\nconst inferProduct = () => {\n const subdomains = extractSubdomainsFrom(window.location.hostname)\n\n return subdomains[\n inferEnvironment() === \"prototype\" ? subdomains.length - 1 : 0\n ].replace(/-staging$/, \"\")\n}\n"],"names":["legacy","env","productName","getCurrentProtocol","location","protocol","domain","tld","hostname","match","error","console","prototypeEnv","inferEnvironment","origin","window","endsWith","_location","_location$hostname","result","product","_temp2","tldLength","subdomains","_ref2","_ref2$env","squiggly","_ref2$squiggly","path","split","slice","length","replace","pcoUrl","_temp","_ref$env"],"mappings":"oRAqBMA,IAAAA,EAAS,SAACC,GAAD,OAAuBC,SAAAA,GACpC,GAAMD,GAAOC,EAAb,CAEA,IAAMC,EAAqB,WACzB,MAAwB,oBAAbC,UAA4BA,UAAYA,SAASC,UAC7B,WAAtBD,SAASC,SAAwB,QAEnC,MACR,EAED,OAAQJ,GACN,IAAK,aACH,MAAA,WAAkBC,EAAlB,IAAiCI,IACnC,IAAK,UACH,MAAA,WAAkBJ,EAAlB,YAAyCI,IAC3C,IAAK,cACH,IAAIC,EAAM,OAEV,IACEA,EAAMH,SAASI,SAASC,MAAM,gBAAgB,EAM/C,CALC,MAAOC,GAEmB,cAAtBN,SAASI,UACXG,QAAQD,MAASN,SAASI,uCAE7B,CAED,OAAUL,IAA0BD,MAAAA,UAAmBK,EACzD,IAAK,YACH,MAAkBK,WAAAA,IAAlB,IAAoCV,EACtC,wBAAA,IAAK,OACH,OAAUC,UAA0BD,EAApC,YACF,QACE,MAAA,UAAiBA,EAAjB,IAAgCI,IAhCT,CAkC5B,CAnCc,EA2DFO,EAAmB,WAC9B,IAAMC,EAASC,OAAOX,SAASU,OAE/B,OAAIA,EAAOE,SAAS,sCAChBF,EAAOE,SAAS,sCAChBF,EAAOE,SAAS,8BAChBF,EAAOE,SAAS,6BAH6C,UAI7DF,EAAOE,SAAS,8BAChBF,EAAOE,SAAS,sBAChBF,EAAOE,SAAS,qBAFqC,aAGrDF,EAAOE,SAAS,0BAChBF,EAAOE,SAAS,uBADiC,YAEjDF,EAAOE,SAAS,cAChBF,EAAOE,SAAS,YAChBF,EAAOE,SAAS,aAChBF,EAAOE,SAAS,qBAHqB,cAKlC,YACR,EAMKJ,EAAe,WAAK,IAAAK,EAAAC,EAClBC,EAAS,OAAHF,EAAGb,WAAH,OAAGc,EAAAD,EAAUT,eAAV,EAAAU,EAAoBT,MACjC,6CAGF,OAAIU,GAAwB,cAAdA,EAAO,GACZA,EAAO,GAGT,MACR,EAEKb,EAAS,WACb,IAAMa,EAASf,SAASI,SAASC,MAAM,+BAEvC,OAAe,OAAXU,EACK,2BAEAA,EAAO,EAEjB,wDAxDCC,EAIiDC,GAAA,IAsDdC,EAK7BC,EA3D2CC,OAAA,IAAAH,EAAF,CAAA,EAAEA,EAAAI,EAAAD,EAF/CvB,IAAAA,OAAMY,IAAAA,EAAAA,IACNa,EAAAA,EAAAA,EAAAA,SAAAA,cAC+CC,EAE7CC,EAAOF,EAAW,QAAU,GAGhC,OAFAE,GAAYR,IAAAA,EAAZ,MAEOpB,EAAOC,EAAPD,CAAY0B,QAiDgBJ,IAAAA,IAAAA,EAAY,IAKzCC,EAAmCR,OAAOX,SAASI,SAJ7CqB,MAAM,KAAKC,MAAM,GAAsB,GAAlB,EAAIR,KAOZ,cAAvBT,IAAqCU,EAAWQ,OAAS,EAAI,GAC7DC,QAAQ,YAAa,KA1DwB,OAASJ,CACzD,WAlBeK,SACdb,EACwDc,GAAA,IAAAC,QAAA,IAAAD,EAAF,GAAEA,GAAtDjC,IAAAA,OAAMY,IAAAA,EAAAA,IAAgDsB,EAExD,OAAOnC,EAAOC,EAAPD,CAAYoB,EACpB"}
|